Bug 104897
| Summary: | Text Autosizing: Descendants of a narrow overflow-x:scroll should use its width as an upper bound on cluster width | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | John Mellor <johnme> |
| Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED WONTFIX | ||
| Severity: | Normal | CC: | avayvod, dbates |
| Priority: | P3 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 84186 | ||
John Mellor
Consider the following situation (after bug 103627 has landed):
<div style="width: 400px">
<div style="overflow-x: scroll">
<div style="width: 800px">
This text should be autosized to 40px computed font size (16 * 800/320), since it's wider than the lowest common ancestor of its enclosing cluster and therefore becomes a cluster itself.<br>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</div>
</div>
</div>
The innermost div is 800px wide so will get a large textAutosizingMultiplier. But only 400px of the div will ever be visible at once, so the core assumption - that the user is going to zoom such that the full 800px of the div is onscreen at once - is false! Instead the innermost div should be autosized as if it were 400px wide (i.e. assume the user will zoom such that as much as possible [400px] of the div is onscreen at once).
In general, after computing the width of the lowest common ancestor of a cluster, this should be limited using the minimum of the widths of all overflow:scroll ancestors as an upper bound.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
John Mellor
There is an instance of this in LayoutTests/fast/text-autosizing/wide-in-narrow-overflow-scroll.html
Daniel Bates
Marking this bug Resolved WontFix because the TEXT_AUTOSIZING feature was removed in <https://trac.webkit.org/changeset/206119> (bug #162167). See bug 84186, comment 32 for more details.