Bug 104897 - Text Autosizing: Descendants of a narrow overflow-x:scroll should use its width as an upper bound on cluster width
Summary: Text Autosizing: Descendants of a narrow overflow-x:scroll should use its wid...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P3 Normal
Assignee: Nobody
Depends on:
Blocks: FontBoosting
  Show dependency treegraph
Reported: 2012-12-13 03:01 PST by John Mellor
Modified: 2016-09-19 15:12 PDT (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description John Mellor 2012-12-13 03:01:03 PST
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.

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.
Comment 1 John Mellor 2012-12-13 03:04:28 PST
There is an instance of this in LayoutTests/fast/text-autosizing/wide-in-narrow-overflow-scroll.html
Comment 2 Daniel Bates 2016-09-19 15:12:52 PDT
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.