|
Add CSS parser support for break-after, break-before and break-inside.
Note that this only adds support for these properties on specified and computed
style level, and does not extend the functionality in the layout engine. In
particular, we don't support break-(after|before):(avoid|left|right) any better
than before (i.e. we just recognize the values and do nothing about them in the
engine).
The (page|-webkit-column)-break-(after|before|inside) properties are treated as
shorthands for their break-(after|before|inside) counterparts, in accordance
with the spec.
This CL intends to make as few behavioral changes on computed style level as
humanly possible, apart from actually allowing the new properties. In order to
achieve that, we go against the spec when it comes to mapping between the three
modern break-(after|before|inside) properties and the old-fashioned ones. More
specifically, we map "right" and "left" values to "always", and we even support
those values on -webkit-column-break-(after|before), which is just bogus, but
this is how it's always been. We also violate the spec when it comes to mapping
"avoid" values. While the spec says that e.g. page-break-inside:avoid should
simply map to break-inside:avoid, we map it to avoid-page, so that the computed
value of -webkit-column-break-inside isn't affected by such a declaration.
There WILL be some minor behavioral changes, no matter how hard we try, though:
Since there's now just one property for each of before, after and inside
(instead of two - one for page and one for column), declaration sequences like
"page-break-inside:avoid; -webkit-column-break-inside:auto;" will not behave
like before. This will now become "break-inside:auto" (from the
-webkit-column-break-inside declaration), effectively allowing page breaks
inside.
The new test behaves exactly as it would have without the code changes in this
CL, apart from recognizing break-after, break-before and break-inside.
BUG= 223068, 492297
Committed: https://crrev.com/c78e9708e49aa13bd5bd9382983f4aa060680dfd
Cr-Commit-Position: refs/heads/master@{#376148}
Total comments: 3
Total comments: 6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+568 lines, -122 lines) |
Patch |
|
M |
third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-listing-expected.txt
|
View
|
1
2
3
4
|
3 chunks |
+3 lines, -6 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-listing-expected.txt
|
View
|
1
2
3
4
|
3 chunks |
+3 lines, -6 lines |
0 comments
|
Download
|
|
A |
third_party/WebKit/LayoutTests/fragmentation/README.txt
|
View
|
|
1 chunk |
+7 lines, -0 lines |
0 comments
|
Download
|
|
A |
third_party/WebKit/LayoutTests/fragmentation/break-properties.html
|
View
|
|
1 chunk |
+61 lines, -0 lines |
0 comments
|
Download
|
|
A |
third_party/WebKit/LayoutTests/fragmentation/break-properties-expected.txt
|
View
|
|
1 chunk |
+194 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/LayoutTests/svg/css/getComputedStyle-listing-expected.txt
|
View
|
1
2
3
4
|
3 chunks |
+3 lines, -6 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/LayoutTests/virtual/stable/webexposed/css-properties-as-js-properties-expected.txt
|
View
|
1
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/LayoutTests/webexposed/css-properties-as-js-properties-expected.txt
|
View
|
1
2
3
4
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp
|
View
|
1
2
3
4
|
3 chunks |
+3 lines, -6 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
|
View
|
1
2
3
4
|
1 chunk |
+52 lines, -15 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/css/CSSProperties.in
|
View
|
1
2
3
4
|
4 chunks |
+9 lines, -6 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/css/CSSValueKeywords.in
|
View
|
1
2
|
1 chunk |
+7 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
View
|
1
2
3
4
|
3 chunks |
+52 lines, -12 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp
|
View
|
1
2
3
|
3 chunks |
+8 lines, -14 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/css/parser/CSSPropertyParser.h
|
View
|
1
2
3
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
|
View
|
1
2
3
4
|
2 chunks |
+100 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/editing/EditingStyle.cpp
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/frame/UseCounter.cpp
|
View
|
1
2
3
4
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
View
|
1
2
3
4
|
3 chunks |
+7 lines, -6 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/style/ComputedStyle.h
|
View
|
1
2
3
4
|
9 chunks |
+21 lines, -25 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/style/ComputedStyle.cpp
|
View
|
1
2
3
4
|
3 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/style/ComputedStyleConstants.h
|
View
|
1
2
3
4
|
1 chunk |
+16 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/style/StyleMultiColData.h
|
View
|
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/style/StyleMultiColData.cpp
|
View
|
|
2 chunks |
+2 lines, -9 lines |
0 comments
|
Download
|
Total messages: 31 (9 generated)
|