Changeset 268665 in webkit
- Timestamp:
- Oct 19, 2020 2:24:46 AM (21 months ago)
- Location:
- trunk
- Files:
-
- 11 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/css3/scroll-snap/scroll-snap-inherit.html (modified) (4 diffs)
-
LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style-expected.txt (modified) (1 diff)
-
LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style.js (modified) (1 diff)
-
LayoutTests/css3/scroll-snap/scroll-snap-property-parsing-expected.txt (modified) (1 diff)
-
LayoutTests/css3/scroll-snap/scroll-snap-property-parsing.js (modified) (1 diff)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-type-invalid-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/parser/CSSPropertyParser.cpp (modified) (1 diff)
-
Source/WebCore/style/StyleBuilderConverter.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r268659 r268665 1 2020-10-19 Martin Robinson <mrobinson@igalia.com> 2 3 axis in scroll-snap-type should be required 4 https://bugs.webkit.org/show_bug.cgi?id=210468 5 <rdar://problem/61746766> 6 7 Reviewed by Simon Fraser. 8 9 * css3/scroll-snap/scroll-snap-inherit.html: Update test and results to reflect specification. 10 * css3/scroll-snap/scroll-snap-property-computed-style-expected.txt: Ditto. 11 * css3/scroll-snap/scroll-snap-property-computed-style.js: Ditto. 12 * css3/scroll-snap/scroll-snap-property-parsing-expected.txt: Ditto. 13 * css3/scroll-snap/scroll-snap-property-parsing.js: Ditto. 14 1 15 2020-10-18 Emilio Cobos Álvarez <emilio@crisal.io> 2 16 -
trunk/LayoutTests/css3/scroll-snap/scroll-snap-inherit.html
r268348 r268665 30 30 31 31 .noInherit { 32 scroll-snap-type: mandatory;32 scroll-snap-type: both mandatory; 33 33 scroll-snap-align: center; 34 34 scroll-padding: 20px; … … 44 44 45 45 .inheritAlign { 46 scroll-snap-type: mandatory;46 scroll-snap-type: both mandatory; 47 47 scroll-snap-align: inherit; 48 48 scroll-padding: 20px; … … 51 51 52 52 .inheritPadding { 53 scroll-snap-type: mandatory;53 scroll-snap-type: both mandatory; 54 54 scroll-snap-align: center; 55 55 scroll-padding: inherit; … … 58 58 59 59 .inheritMargin { 60 scroll-snap-type: mandatory;60 scroll-snap-type: both mandatory; 61 61 scroll-snap-align: center; 62 62 scroll-padding: 20px; -
trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style-expected.txt
r268348 r268665 26 26 PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-type') is 'none' 27 27 28 only strictness: `mandatory` 29 PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-type') is 'none' 30 28 31 initial value: `initial` 29 32 PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-type') is 'none' 30 31 only strictness: `mandatory`32 PASS window.getComputedStyle(document.body).getPropertyValue('scroll-snap-type') is 'both mandatory'33 33 34 34 only axis: `both` -
trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-computed-style.js
r268348 r268665 28 28 testComputedScrollSnapRule("two strictness values", "scroll-snap-type", "proximity mandatory", "none"); 29 29 testComputedScrollSnapRule("axis following strictness", "scroll-snap-type", "mandatory inline", "none"); 30 testComputedScrollSnapRule("only strictness", "scroll-snap-type", "mandatory", "none"); 30 31 // Valid declarations 31 32 testComputedScrollSnapRule("initial value", "scroll-snap-type", "initial", "none"); 32 testComputedScrollSnapRule("only strictness", "scroll-snap-type", "mandatory", "both mandatory");33 33 testComputedScrollSnapRule("only axis", "scroll-snap-type", "both", "both"); 34 34 testComputedScrollSnapRule("none", "scroll-snap-type", "none", "none"); -
trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-parsing-expected.txt
r253079 r268665 9 9 PASS declaration.length is 1 10 10 PASS declaration.getPropertyValue('scroll-snap-type') is 'initial' 11 12 only strictness : mandatory13 PASS cssRule.type is 114 PASS declaration.length is 115 PASS declaration.getPropertyValue('scroll-snap-type') is 'mandatory'16 11 17 12 only axis : both -
trunk/LayoutTests/css3/scroll-snap/scroll-snap-property-parsing.js
r253079 r268665 22 22 23 23 testScrollSnapRule("initial value", "scroll-snap-type", "initial", "initial", 1); 24 testScrollSnapRule("only strictness", "scroll-snap-type", "mandatory", "mandatory", 1);25 24 testScrollSnapRule("only axis", "scroll-snap-type", "both", "both", 1); 26 25 testScrollSnapRule("none", "scroll-snap-type", "none", "none", 1); -
trunk/LayoutTests/imported/w3c/ChangeLog
r268659 r268665 1 2020-10-19 Martin Robinson <mrobinson@igalia.com> 2 3 axis in scroll-snap-type should be required 4 https://bugs.webkit.org/show_bug.cgi?id=210468 5 <rdar://problem/61746766> 6 7 Reviewed by Simon Fraser. 8 9 * web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-type-invalid-expected.txt: Update 10 expected results to note newly passing tests. 11 1 12 2020-10-18 Emilio Cobos Álvarez <emilio@crisal.io> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/parsing/scroll-snap-type-invalid-expected.txt
r268250 r268665 4 4 PASS e.style['scroll-snap-type'] = "block mandatory inline" should not set the property value 5 5 PASS e.style['scroll-snap-type'] = "both none" should not set the property value 6 FAIL e.style['scroll-snap-type'] = "mandatory" should not set the property value assert_equals: expected "" but got "mandatory" 7 FAIL e.style['scroll-snap-type'] = "proximity" should not set the property value assert_equals: expected "" but got "proximity" 6 PASS e.style['scroll-snap-type'] = "mandatory" should not set the property value 7 PASS e.style['scroll-snap-type'] = "proximity" should not set the property value 8 8 PASS e.style['scroll-snap-type'] = "mandatory inline" should not set the property value 9 9 PASS e.style['scroll-snap-type'] = "proximity both" should not set the property value -
trunk/Source/WebCore/ChangeLog
r268663 r268665 1 2020-10-19 Martin Robinson <mrobinson@igalia.com> 2 3 axis in scroll-snap-type should be required 4 https://bugs.webkit.org/show_bug.cgi?id=210468 5 <rdar://problem/61746766> 6 7 Reviewed by Simon Fraser. 8 9 * css/parser/CSSPropertyParser.cpp: 10 (WebCore::consumeScrollSnapType): The first value is either the scroll axis or 'none'. 11 * style/StyleBuilderConverter.h: 12 (WebCore::Style::BuilderConverter::convertScrollSnapType): If the first value is 'none', 13 the default values of ScrollSnapType should be fine. If we have a second value, use it. 14 Otherwise the default for strictness is "proximity." 15 1 16 2020-10-18 Joonghun Park <jh718.park@samsung.com> 2 17 -
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
r268599 r268665 2543 2543 { 2544 2544 RefPtr<CSSValueList> typeValue = CSSValueList::createSpaceSeparated(); 2545 RefPtr<CSSPrimitiveValue> secondValue; 2546 2547 auto firstValue = consumeIdent<CSSValueX, CSSValueY, CSSValueBlock, CSSValueInline, CSSValueBoth>(range); 2548 if (firstValue) 2549 secondValue = consumeIdent<CSSValueProximity, CSSValueMandatory>(range); 2550 else 2551 firstValue = consumeIdent<CSSValueNone, CSSValueProximity, CSSValueMandatory>(range); 2552 2545 2546 auto firstValue = consumeIdent<CSSValueNone, CSSValueX, CSSValueY, CSSValueBlock, CSSValueInline, CSSValueBoth>(range); 2553 2547 if (!firstValue) 2554 2548 return nullptr; 2549 auto secondValue = consumeIdent<CSSValueProximity, CSSValueMandatory>(range); 2555 2550 2556 2551 typeValue->append(firstValue.releaseNonNull()); -
trunk/Source/WebCore/style/StyleBuilderConverter.h
r268138 r268665 907 907 auto& values = downcast<CSSValueList>(value); 908 908 auto& firstValue = downcast<CSSPrimitiveValue>(*values.item(0)); 909 if (values.length() == 2) { 910 type.axis = firstValue; 909 if (firstValue.valueID() == CSSValueNone) 910 return type; 911 912 type.axis = firstValue; 913 if (values.length() == 2) 911 914 type.strictness = downcast<CSSPrimitiveValue>(*values.item(1)); 912 return type; 913 } 914 915 switch (firstValue.valueID()) { 916 case CSSValueNone: 917 case CSSValueMandatory: 918 case CSSValueProximity: 919 type.strictness = firstValue; 920 break; 921 default: 922 type.axis = firstValue; 915 else 923 916 type.strictness = ScrollSnapStrictness::Proximity; 924 break; 925 } 917 926 918 return type; 927 919 }
Note: See TracChangeset
for help on using the changeset viewer.