Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1265)

Issue 16019004: Text Autosizing: Treat position:absolute/fixed as constrained height. (Closed)

Created:
7 years, 7 months ago by johnme
Modified:
7 years, 6 months ago
CC:
blink-reviews, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, kenneth.christiansen
Visibility:
Public.

Description

Text Autosizing: Treat position:absolute/fixed as constrained height. This patch changes Text Autosizing to consider out of flow positioned elements (position:absolute and position:fixed) as having constrained height (like e.g. max-height:50px). Hence Text Autosizing will no longer autosize them nor their descendents, unless they are themselves explicitly unconstrained (e.g. with overflow:auto). This fixes a bunch of known cases (see bugs below) where web designers overuse position:absolute (often trying to exactly recreate something they were given in Photoshop), and when Text Autosizing subsequently autosizes the absolutely positioned text, the various bits of text overlap each other. The patch had very few negative impacts on the Alexa 2000 homepages, so this seems a reasonable change to make. Added test positioned-out-of-flow.html covering this new behavior. Deleted tests constrained-then-position-absolute-ancestors.html and constrained-then-position-fixed-ancestors.html which inherently relied upon the old behavior. Coalesced tests constrained-then-float-ancestors.html and constrained-out-of-flow.html into a single constrained-floats.html test that just covers float behavior, removing parts that relied on the old behavior. Modified the following tests which used the old behavior, but for which an equivalent is still possible, to use position:absolute;overflow:auto instead of just position:absolute, hence they continue to get the old behavior: - cluster-list-item.html - clusters-insufficient-text.html - clusters-insufficient-width.html - clusters-sufficient-text-except-in-root.html - clusters-sufficient-width.html - oscillation-javascript-fontsize-change.html BUG=162006, 162009, 178123, 181174 R=jchaffraix@chromium.org, kenneth.r.christiansen@intel.com Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=151558

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -258 lines) Patch
M LayoutTests/fast/text-autosizing/cluster-list-item.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/text-autosizing/cluster-list-item-expected.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/text-autosizing/clusters-insufficient-text.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/text-autosizing/clusters-insufficient-text-expected.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/text-autosizing/clusters-insufficient-width.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/text-autosizing/clusters-insufficient-width-expected.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/text-autosizing/clusters-sufficient-text-except-in-root.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/text-autosizing/clusters-sufficient-text-except-in-root-expected.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/text-autosizing/clusters-sufficient-width.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/text-autosizing/clusters-sufficient-width-expected.html View 1 chunk +1 line, -1 line 0 comments Download
A + LayoutTests/fast/text-autosizing/constrained-floats.html View 1 chunk +6 lines, -1 line 0 comments Download
A + LayoutTests/fast/text-autosizing/constrained-floats-expected.html View 1 chunk +6 lines, -1 line 0 comments Download
D LayoutTests/fast/text-autosizing/constrained-out-of-flow.html View 1 chunk +0 lines, -36 lines 0 comments Download
D LayoutTests/fast/text-autosizing/constrained-out-of-flow-expected.html View 1 chunk +0 lines, -27 lines 0 comments Download
D LayoutTests/fast/text-autosizing/constrained-then-float-ancestors.html View 1 chunk +0 lines, -33 lines 0 comments Download
D LayoutTests/fast/text-autosizing/constrained-then-float-ancestors-expected.html View 1 chunk +0 lines, -24 lines 0 comments Download
D LayoutTests/fast/text-autosizing/constrained-then-position-absolute-ancestors.html View 1 chunk +0 lines, -37 lines 0 comments Download
D LayoutTests/fast/text-autosizing/constrained-then-position-absolute-ancestors-expected.html View 1 chunk +0 lines, -28 lines 0 comments Download
D LayoutTests/fast/text-autosizing/constrained-then-position-fixed-ancestors.html View 1 chunk +0 lines, -33 lines 0 comments Download
D LayoutTests/fast/text-autosizing/constrained-then-position-fixed-ancestors-expected.html View 1 chunk +0 lines, -24 lines 0 comments Download
M LayoutTests/fast/text-autosizing/oscillation-javascript-fontsize-change.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/text-autosizing/oscillation-javascript-fontsize-change-expected.html View 1 chunk +1 line, -1 line 0 comments Download
A LayoutTests/fast/text-autosizing/positioned-out-of-flow.html View 1 chunk +42 lines, -0 lines 0 comments Download
A LayoutTests/fast/text-autosizing/positioned-out-of-flow-expected.html View 1 chunk +33 lines, -0 lines 0 comments Download
M Source/core/rendering/TextAutosizer.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
johnme
7 years, 6 months ago (2013-05-28 12:46:14 UTC) #1
kenneth.r.christiansen
lgtm, but what about sticky positioned elements? I mean, many sites try to accomplish sticky ...
7 years, 6 months ago (2013-05-28 13:30:55 UTC) #2
Julien - ping for review
lgtm. > lgtm, but what about sticky positioned elements? I don't think we should be ...
7 years, 6 months ago (2013-05-29 21:53:39 UTC) #3
johnme
On 2013/05/28 13:30:55, kenneth.r.christiansen wrote: > many sites try to accomplish sticky positioned elements using ...
7 years, 6 months ago (2013-05-30 10:35:31 UTC) #4
johnme
7 years, 6 months ago (2013-05-31 15:48:40 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 manually as r151558 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698