|
|
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
|
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
|
Total messages: 5 (0 generated)
|