Skip to content

Commit 1e0a89e

Browse files
surajt6fujii
authored andcommitted
Implement overflow-clip-margin parsing.
https://bugs.webkit.org/show_bug.cgi?id=308225 Reviewed by Sam Weinig. Parse overflow-clip-margin CSS property value behind a feature flag. Added additional tests that use calc(). * LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/overflow-no-interpolation-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/parsing/overflow-clip-margin-computed-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/parsing/overflow-clip-margin-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/parsing/overflow-clip-margin.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/overflow-clip-margin-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/overflow-clip-margin.html: * LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: * Source/WebCore/Headers.cmake: * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/css/CSSPrimitiveValueMappings.h: * Source/WebCore/css/CSSProperties.json: * Source/WebCore/css/parser/CSSPropertyParserConsumer+Overflow.cpp: Added. (WebCore::CSSPropertyParserHelpers::consumeOverflowClipMargin): * Source/WebCore/css/parser/CSSPropertyParserConsumer+Overflow.h: Added. * Source/WebCore/css/parser/CSSPropertyParserCustom.h: * Source/WebCore/rendering/style/RenderStyleConstants.cpp: (WebCore::operator<<): * Source/WebCore/rendering/style/RenderStyleConstants.h: * Source/WebCore/style/StyleBuilderCustom.h: (WebCore::Style::forwardInheritedValue): * Source/WebCore/style/computed/StyleComputedStyleBase.h: * Source/WebCore/style/computed/data/StyleNonInheritedRareData.cpp: (WebCore::Style::NonInheritedRareData::NonInheritedRareData): (WebCore::Style::NonInheritedRareData::operator== const): (WebCore::Style::NonInheritedRareData::dumpDifferences const): * Source/WebCore/style/computed/data/StyleNonInheritedRareData.h: * Source/WebCore/style/values/overflow/StyleOverflowClipMargin.cpp: Added. (WebCore::Style::CSSValueConversion<OverflowClipMargin>::operator): * Source/WebCore/style/values/overflow/StyleOverflowClipMargin.h: Added. (WebCore::Style::OverflowClipMargin::OverflowClipMargin): (WebCore::Style::OverflowClipMargin::switchOn const): Canonical link: https://commits.webkit.org/307956@main
1 parent 20dd659 commit 1e0a89e

26 files changed

Lines changed: 476 additions & 82 deletions

LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ PASS outline-style
260260
PASS outline-width
261261
PASS overflow-anchor
262262
PASS overflow-block
263+
PASS overflow-clip-margin
263264
PASS overflow-inline
264265
PASS overflow-wrap
265266
PASS overflow-x

LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-revert-layer-expected.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ PASS outline-style
232232
PASS outline-width
233233
PASS overflow-anchor
234234
PASS overflow-block
235+
FAIL overflow-clip-margin assert_not_equals: Should get a different computed value. got disallowed value "0px"
235236
PASS overflow-inline
236237
PASS overflow-wrap
237238
PASS overflow-x

LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/overflow-no-interpolation-expected.txt

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11

2-
FAIL CSS Transitions with transition-behavior:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (-0.3) should be [initial] assert_true: 'from' value should be supported expected true got false
3-
FAIL CSS Transitions with transition-behavior:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (0) should be [initial] assert_true: 'from' value should be supported expected true got false
4-
FAIL CSS Transitions with transition-behavior:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (0.3) should be [initial] assert_true: 'from' value should be supported expected true got false
5-
FAIL CSS Transitions with transition-behavior:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (0.5) should be [123px] assert_true: 'from' value should be supported expected true got false
6-
FAIL CSS Transitions with transition-behavior:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (0.6) should be [123px] assert_true: 'from' value should be supported expected true got false
7-
FAIL CSS Transitions with transition-behavior:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (1) should be [123px] assert_true: 'from' value should be supported expected true got false
8-
FAIL CSS Transitions with transition-behavior:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (1.5) should be [123px] assert_true: 'from' value should be supported expected true got false
9-
FAIL CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (-0.3) should be [initial] assert_true: 'from' value should be supported expected true got false
10-
FAIL CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (0) should be [initial] assert_true: 'from' value should be supported expected true got false
11-
FAIL CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (0.3) should be [initial] assert_true: 'from' value should be supported expected true got false
12-
FAIL CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (0.5) should be [123px] assert_true: 'from' value should be supported expected true got false
13-
FAIL CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (0.6) should be [123px] assert_true: 'from' value should be supported expected true got false
14-
FAIL CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (1) should be [123px] assert_true: 'from' value should be supported expected true got false
15-
FAIL CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (1.5) should be [123px] assert_true: 'from' value should be supported expected true got false
16-
FAIL CSS Transitions: property <overflow-clip-margin> from [initial] to [123px] at (-0.3) should be [123px] assert_true: 'from' value should be supported expected true got false
17-
FAIL CSS Transitions: property <overflow-clip-margin> from [initial] to [123px] at (0) should be [123px] assert_true: 'from' value should be supported expected true got false
18-
FAIL CSS Transitions: property <overflow-clip-margin> from [initial] to [123px] at (0.3) should be [123px] assert_true: 'from' value should be supported expected true got false
19-
FAIL CSS Transitions: property <overflow-clip-margin> from [initial] to [123px] at (0.5) should be [123px] assert_true: 'from' value should be supported expected true got false
20-
FAIL CSS Transitions: property <overflow-clip-margin> from [initial] to [123px] at (0.6) should be [123px] assert_true: 'from' value should be supported expected true got false
21-
FAIL CSS Transitions: property <overflow-clip-margin> from [initial] to [123px] at (1) should be [123px] assert_true: 'from' value should be supported expected true got false
22-
FAIL CSS Transitions: property <overflow-clip-margin> from [initial] to [123px] at (1.5) should be [123px] assert_true: 'from' value should be supported expected true got false
23-
FAIL CSS Transitions with transition: all: property <overflow-clip-margin> from [initial] to [123px] at (-0.3) should be [123px] assert_true: 'from' value should be supported expected true got false
24-
FAIL CSS Transitions with transition: all: property <overflow-clip-margin> from [initial] to [123px] at (0) should be [123px] assert_true: 'from' value should be supported expected true got false
25-
FAIL CSS Transitions with transition: all: property <overflow-clip-margin> from [initial] to [123px] at (0.3) should be [123px] assert_true: 'from' value should be supported expected true got false
26-
FAIL CSS Transitions with transition: all: property <overflow-clip-margin> from [initial] to [123px] at (0.5) should be [123px] assert_true: 'from' value should be supported expected true got false
27-
FAIL CSS Transitions with transition: all: property <overflow-clip-margin> from [initial] to [123px] at (0.6) should be [123px] assert_true: 'from' value should be supported expected true got false
28-
FAIL CSS Transitions with transition: all: property <overflow-clip-margin> from [initial] to [123px] at (1) should be [123px] assert_true: 'from' value should be supported expected true got false
29-
FAIL CSS Transitions with transition: all: property <overflow-clip-margin> from [initial] to [123px] at (1.5) should be [123px] assert_true: 'from' value should be supported expected true got false
30-
FAIL CSS Animations: property <overflow-clip-margin> from [initial] to [123px] at (-0.3) should be [initial] assert_true: 'from' value should be supported expected true got false
31-
FAIL CSS Animations: property <overflow-clip-margin> from [initial] to [123px] at (0) should be [initial] assert_true: 'from' value should be supported expected true got false
32-
FAIL CSS Animations: property <overflow-clip-margin> from [initial] to [123px] at (0.3) should be [initial] assert_true: 'from' value should be supported expected true got false
33-
FAIL CSS Animations: property <overflow-clip-margin> from [initial] to [123px] at (0.5) should be [123px] assert_true: 'from' value should be supported expected true got false
34-
FAIL CSS Animations: property <overflow-clip-margin> from [initial] to [123px] at (0.6) should be [123px] assert_true: 'from' value should be supported expected true got false
35-
FAIL CSS Animations: property <overflow-clip-margin> from [initial] to [123px] at (1) should be [123px] assert_true: 'from' value should be supported expected true got false
36-
FAIL CSS Animations: property <overflow-clip-margin> from [initial] to [123px] at (1.5) should be [123px] assert_true: 'from' value should be supported expected true got false
37-
FAIL Web Animations: property <overflow-clip-margin> from [initial] to [123px] at (-0.3) should be [initial] assert_true: 'from' value should be supported expected true got false
38-
FAIL Web Animations: property <overflow-clip-margin> from [initial] to [123px] at (0) should be [initial] assert_true: 'from' value should be supported expected true got false
39-
FAIL Web Animations: property <overflow-clip-margin> from [initial] to [123px] at (0.3) should be [initial] assert_true: 'from' value should be supported expected true got false
40-
FAIL Web Animations: property <overflow-clip-margin> from [initial] to [123px] at (0.5) should be [123px] assert_true: 'from' value should be supported expected true got false
41-
FAIL Web Animations: property <overflow-clip-margin> from [initial] to [123px] at (0.6) should be [123px] assert_true: 'from' value should be supported expected true got false
42-
FAIL Web Animations: property <overflow-clip-margin> from [initial] to [123px] at (1) should be [123px] assert_true: 'from' value should be supported expected true got false
43-
FAIL Web Animations: property <overflow-clip-margin> from [initial] to [123px] at (1.5) should be [123px] assert_true: 'from' value should be supported expected true got false
2+
PASS CSS Transitions with transition-behavior:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (-0.3) should be [initial]
3+
PASS CSS Transitions with transition-behavior:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (0) should be [initial]
4+
PASS CSS Transitions with transition-behavior:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (0.3) should be [initial]
5+
PASS CSS Transitions with transition-behavior:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (0.5) should be [123px]
6+
PASS CSS Transitions with transition-behavior:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (0.6) should be [123px]
7+
PASS CSS Transitions with transition-behavior:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (1) should be [123px]
8+
PASS CSS Transitions with transition-behavior:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (1.5) should be [123px]
9+
PASS CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (-0.3) should be [initial]
10+
PASS CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (0) should be [initial]
11+
PASS CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (0.3) should be [initial]
12+
PASS CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (0.5) should be [123px]
13+
PASS CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (0.6) should be [123px]
14+
PASS CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (1) should be [123px]
15+
PASS CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <overflow-clip-margin> from [initial] to [123px] at (1.5) should be [123px]
16+
PASS CSS Transitions: property <overflow-clip-margin> from [initial] to [123px] at (-0.3) should be [123px]
17+
PASS CSS Transitions: property <overflow-clip-margin> from [initial] to [123px] at (0) should be [123px]
18+
PASS CSS Transitions: property <overflow-clip-margin> from [initial] to [123px] at (0.3) should be [123px]
19+
PASS CSS Transitions: property <overflow-clip-margin> from [initial] to [123px] at (0.5) should be [123px]
20+
PASS CSS Transitions: property <overflow-clip-margin> from [initial] to [123px] at (0.6) should be [123px]
21+
PASS CSS Transitions: property <overflow-clip-margin> from [initial] to [123px] at (1) should be [123px]
22+
PASS CSS Transitions: property <overflow-clip-margin> from [initial] to [123px] at (1.5) should be [123px]
23+
PASS CSS Transitions with transition: all: property <overflow-clip-margin> from [initial] to [123px] at (-0.3) should be [123px]
24+
PASS CSS Transitions with transition: all: property <overflow-clip-margin> from [initial] to [123px] at (0) should be [123px]
25+
PASS CSS Transitions with transition: all: property <overflow-clip-margin> from [initial] to [123px] at (0.3) should be [123px]
26+
PASS CSS Transitions with transition: all: property <overflow-clip-margin> from [initial] to [123px] at (0.5) should be [123px]
27+
PASS CSS Transitions with transition: all: property <overflow-clip-margin> from [initial] to [123px] at (0.6) should be [123px]
28+
PASS CSS Transitions with transition: all: property <overflow-clip-margin> from [initial] to [123px] at (1) should be [123px]
29+
PASS CSS Transitions with transition: all: property <overflow-clip-margin> from [initial] to [123px] at (1.5) should be [123px]
30+
PASS CSS Animations: property <overflow-clip-margin> from [initial] to [123px] at (-0.3) should be [initial]
31+
PASS CSS Animations: property <overflow-clip-margin> from [initial] to [123px] at (0) should be [initial]
32+
PASS CSS Animations: property <overflow-clip-margin> from [initial] to [123px] at (0.3) should be [initial]
33+
PASS CSS Animations: property <overflow-clip-margin> from [initial] to [123px] at (0.5) should be [123px]
34+
PASS CSS Animations: property <overflow-clip-margin> from [initial] to [123px] at (0.6) should be [123px]
35+
PASS CSS Animations: property <overflow-clip-margin> from [initial] to [123px] at (1) should be [123px]
36+
PASS CSS Animations: property <overflow-clip-margin> from [initial] to [123px] at (1.5) should be [123px]
37+
PASS Web Animations: property <overflow-clip-margin> from [initial] to [123px] at (-0.3) should be [initial]
38+
PASS Web Animations: property <overflow-clip-margin> from [initial] to [123px] at (0) should be [initial]
39+
PASS Web Animations: property <overflow-clip-margin> from [initial] to [123px] at (0.3) should be [initial]
40+
PASS Web Animations: property <overflow-clip-margin> from [initial] to [123px] at (0.5) should be [123px]
41+
PASS Web Animations: property <overflow-clip-margin> from [initial] to [123px] at (0.6) should be [123px]
42+
PASS Web Animations: property <overflow-clip-margin> from [initial] to [123px] at (1) should be [123px]
43+
PASS Web Animations: property <overflow-clip-margin> from [initial] to [123px] at (1.5) should be [123px]
4444
PASS CSS Transitions with transition-behavior:allow-discrete: property <overflow-x> from [hidden] to [visible] at (-0.3) should be [hidden]
4545
PASS CSS Transitions with transition-behavior:allow-discrete: property <overflow-x> from [hidden] to [visible] at (0) should be [hidden]
4646
PASS CSS Transitions with transition-behavior:allow-discrete: property <overflow-x> from [hidden] to [visible] at (0.3) should be [hidden]
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11

2-
FAIL Property overflow-clip-margin value '0px' assert_true: overflow-clip-margin doesn't seem to be supported in the computed style expected true got false
3-
FAIL Property overflow-clip-margin value '10px' assert_true: overflow-clip-margin doesn't seem to be supported in the computed style expected true got false
4-
FAIL Property overflow-clip-margin value 'content-box' assert_true: overflow-clip-margin doesn't seem to be supported in the computed style expected true got false
5-
FAIL Property overflow-clip-margin value 'content-box 0px' assert_true: overflow-clip-margin doesn't seem to be supported in the computed style expected true got false
6-
FAIL Property overflow-clip-margin value 'content-box 10px' assert_true: overflow-clip-margin doesn't seem to be supported in the computed style expected true got false
7-
FAIL Property overflow-clip-margin value '10px content-box' assert_true: overflow-clip-margin doesn't seem to be supported in the computed style expected true got false
8-
FAIL Property overflow-clip-margin value 'padding-box' assert_true: overflow-clip-margin doesn't seem to be supported in the computed style expected true got false
9-
FAIL Property overflow-clip-margin value 'padding-box 0px' assert_true: overflow-clip-margin doesn't seem to be supported in the computed style expected true got false
10-
FAIL Property overflow-clip-margin value 'padding-box 10px' assert_true: overflow-clip-margin doesn't seem to be supported in the computed style expected true got false
11-
FAIL Property overflow-clip-margin value '10px padding-box' assert_true: overflow-clip-margin doesn't seem to be supported in the computed style expected true got false
12-
FAIL Property overflow-clip-margin value 'border-box' assert_true: overflow-clip-margin doesn't seem to be supported in the computed style expected true got false
13-
FAIL Property overflow-clip-margin value 'border-box 0px' assert_true: overflow-clip-margin doesn't seem to be supported in the computed style expected true got false
14-
FAIL Property overflow-clip-margin value 'border-box 10px' assert_true: overflow-clip-margin doesn't seem to be supported in the computed style expected true got false
15-
FAIL Property overflow-clip-margin value '10px border-box' assert_true: overflow-clip-margin doesn't seem to be supported in the computed style expected true got false
2+
PASS Property overflow-clip-margin value '0px'
3+
FAIL Property overflow-clip-margin value '10px' assert_equals: expected "10px" but got "0px"
4+
FAIL Property overflow-clip-margin value 'content-box' assert_equals: expected "content-box" but got "0px"
5+
FAIL Property overflow-clip-margin value 'content-box 0px' assert_equals: expected "content-box" but got "0px"
6+
FAIL Property overflow-clip-margin value 'content-box 10px' assert_equals: expected "content-box 10px" but got "0px"
7+
FAIL Property overflow-clip-margin value '10px content-box' assert_equals: expected "content-box 10px" but got "0px"
8+
PASS Property overflow-clip-margin value 'padding-box'
9+
PASS Property overflow-clip-margin value 'padding-box 0px'
10+
FAIL Property overflow-clip-margin value 'padding-box 10px' assert_equals: expected "10px" but got "0px"
11+
FAIL Property overflow-clip-margin value '10px padding-box' assert_equals: expected "10px" but got "0px"
12+
FAIL Property overflow-clip-margin value 'border-box' assert_equals: expected "border-box" but got "0px"
13+
FAIL Property overflow-clip-margin value 'border-box 0px' assert_equals: expected "border-box" but got "0px"
14+
FAIL Property overflow-clip-margin value 'border-box 10px' assert_equals: expected "border-box 10px" but got "0px"
15+
FAIL Property overflow-clip-margin value '10px border-box' assert_equals: expected "border-box 10px" but got "0px"
1616

0 commit comments

Comments
 (0)