Changeset 271480 in webkit
- Timestamp:
- Jan 14, 2021, 3:02:43 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/TestExpectations (modified) (1 diff)
-
LayoutTests/css3/scroll-snap/scroll-snap-mismatch.html (modified) (1 diff)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-snap-type-change-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-snap-type-on-root-element-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/snap-after-relayout/changing-scroll-snap-type-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/snap-after-relayout/snap-to-different-targets-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/snap-inline-block-expected.txt (modified) (1 diff)
-
LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-snap-type-on-root-element-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/CSSComputedStyleDeclaration.cpp (modified) (1 diff)
-
Source/WebCore/style/StyleBuilderConverter.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r271478 r271480 1 2021-01-14 Martin Robinson <mrobinson@igalia.com> 2 3 [css-scroll-snap] scroll-snap-align parsing is incorrect/backwards 4 https://bugs.webkit.org/show_bug.cgi?id=191865 5 <rdar://problem/46346516> 6 7 Reviewed by Simon Fraser. 8 9 * TestExpectations: Update test expectations. 10 * css3/scroll-snap/scroll-snap-mismatch.html: Flip scroll-snap-align arguments in this test. 11 * platform/ios-wk2/imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-snap-type-on-root-element-expected.txt: Update results to reflect new pass. 12 1 13 2021-01-13 Lauro Moura <lmoura@igalia.com> 2 14 -
trunk/LayoutTests/TestExpectations
r271436 r271480 4521 4521 imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-target-snap-003.html [ ImageOnlyFailure ] 4522 4522 imported/w3c/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/direction-rtl.html [ ImageOnlyFailure ] 4523 imported/w3c/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode- horizontal-tb.html [ ImageOnlyFailure ]4523 imported/w3c/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode-vertical-lr.html [ ImageOnlyFailure ] 4524 4524 4525 4525 # Cocoa-only -
trunk/LayoutTests/css3/scroll-snap/scroll-snap-mismatch.html
r217150 r271480 13 13 14 14 .good { 15 scroll-snap-align: start none;15 scroll-snap-align: none start; 16 16 } 17 17 18 18 .bad { 19 scroll-snap-align: none start;19 scroll-snap-align: start none; 20 20 } 21 21 -
trunk/LayoutTests/imported/w3c/ChangeLog
r271447 r271480 1 2021-01-14 Martin Robinson <mrobinson@igalia.com> 2 3 [css-scroll-snap] scroll-snap-align parsing is incorrect/backwards 4 https://bugs.webkit.org/show_bug.cgi?id=191865 5 <rdar://problem/46346516> 6 7 Reviewed by Simon Fraser. 8 9 * web-platform-tests/css/css-scroll-snap/scroll-snap-type-change-expected.txt: Update test expectations. 10 * web-platform-tests/css/css-scroll-snap/scroll-snap-type-on-root-element-expected.txt: Ditto. 11 * web-platform-tests/css/css-scroll-snap/snap-after-relayout/changing-scroll-snap-type-expected.txt: Ditto. 12 * web-platform-tests/css/css-scroll-snap/snap-after-relayout/snap-to-different-targets-expected.txt: Ditto. 13 * web-platform-tests/css/css-scroll-snap/snap-inline-block-expected.txt: Ditto. 14 1 15 2021-01-13 Ziran Sun <zsun@igalia.com> 2 16 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-snap-type-change-expected.txt
r268250 r271480 1 1 2 FAIL scroll-snap-type on HTML should control snapping behavior and changing it takes effect assert_equals: scrolling should snap expected 200 but got 1003 FAIL scroll-snap-type on DIV should control snapping behavior and changing it takes effect assert_equals: scrolling should snap expected 200 but got 100 2 FAIL scroll-snap-type on HTML should control snapping behavior and changing it takes effect assert_equals: scrolling should not snap expected 100 but got 200 3 PASS scroll-snap-type on DIV should control snapping behavior and changing it takes effect 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-snap-type-on-root-element-expected.txt
r268250 r271480 2 2 FAIL The scroll-snap-type on the root element is applied assert_equals: expected 515 but got 800 3 3 FAIL The writing-mode (vertical-lr) on the body is used assert_equals: inline should snap expected 515 but got 800 4 FAIL The writing-mode (horizontal-tb) on the body is used assert_equals: inline should snap expected 100 but got 200 4 PASS The writing-mode (horizontal-tb) on the body is used 5 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/snap-after-relayout/changing-scroll-snap-type-expected.txt
r268250 r271480 1 1 2 FAIL Changing the scroller's snap type to y should make it resnap on the y-axis. assert_equals: expected 100 but got 0 3 FAIL Changing the scroller's snap type to x should make it resnap on the x-axis. assert_equals: expected 100 but got 0 4 FAIL Changing the scroller's snap type axis should make it resnap. assert_equals: expected 100 but got 0 2 PASS Changing the scroller's snap type to y should make it resnap on the y-axis. 3 PASS Changing the scroller's snap type to x should make it resnap on the x-axis. 4 PASS Changing the scroller's snap type axis should make it resnap. 5 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/snap-after-relayout/snap-to-different-targets-expected.txt
r268856 r271480 1 1 2 FAIL Scroller should snap to at least one of the targets if unable to snap toboth after a layout change. assert_ equals: expected 200 but got 4002 FAIL Scroller should snap to at least one of the targets if unable to snap toboth after a layout change. assert_true: expected true got false 3 3 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/snap-inline-block-expected.txt
r271439 r271480 1 1 2 FAIL Snaps correctly for horizontal-tb writing mode with 'scroll-snap-align: end start' alignment assert_equals: aligns correctly on x expected 300 but got 115 3 PASS Snaps correctly for vertical-lr writing mode with 'scroll-snap-align: end start' alignment 4 FAIL Snaps correctly for vertical-rl writing mode with 'scroll-snap-align: end start' alignment assert_equals: aligns correctly on x expected -315 but got - 4852 PASS Snaps correctly for horizontal-tb writing mode with 'scroll-snap-align: end start' alignment 3 FAIL Snaps correctly for vertical-lr writing mode with 'scroll-snap-align: end start' alignment assert_equals: aligns correctly on x expected 115 but got 300 4 FAIL Snaps correctly for vertical-rl writing mode with 'scroll-snap-align: end start' alignment assert_equals: aligns correctly on x expected -315 but got -300 5 5 FAIL Snaps correctly for horizontal-tb writing mode with 'scroll-snap-align: start end' alignment assert_equals: aligns correctly on x expected 115 but got 0 6 6 FAIL Snaps correctly for vertical-lr writing mode with 'scroll-snap-align: start end' alignment assert_equals: aligns correctly on x expected 300 but got 0 7 FAIL Snaps correctly for vertical-rl writing mode with 'scroll-snap-align: start end' alignment assert_equals: aligns correctly on x expected -500 but got - 3008 FAIL Snaps correctly for 'direction: rtl' with 'scroll-snap-align: end start' alignment assert_equals: aligns correctly on x expected -500 but got - 3009 FAIL Snaps correctly for 'direction: rtl' with 'scroll-snap-align: start end' alignment assert_equals: aligns correctly on x expected -315 but got - 4857 FAIL Snaps correctly for vertical-rl writing mode with 'scroll-snap-align: start end' alignment assert_equals: aligns correctly on x expected -500 but got -485 8 FAIL Snaps correctly for 'direction: rtl' with 'scroll-snap-align: end start' alignment assert_equals: aligns correctly on x expected -500 but got -485 9 FAIL Snaps correctly for 'direction: rtl' with 'scroll-snap-align: start end' alignment assert_equals: aligns correctly on x expected -315 but got -300 10 10 -
trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-snap-type-on-root-element-expected.txt
r268250 r271480 2 2 FAIL The scroll-snap-type on the root element is applied assert_equals: expected 500 but got 800 3 3 FAIL The writing-mode (vertical-lr) on the body is used assert_equals: inline should snap expected 500 but got 800 4 FAIL The writing-mode (horizontal-tb) on the body is used assert_equals: inline should snap expected 100 but got 200 4 PASS The writing-mode (horizontal-tb) on the body is used 5 5 -
trunk/Source/WebCore/ChangeLog
r271476 r271480 1 2021-01-14 Martin Robinson <mrobinson@igalia.com> 2 3 [css-scroll-snap] scroll-snap-align parsing is incorrect/backwards 4 https://bugs.webkit.org/show_bug.cgi?id=191865 5 <rdar://problem/46346516> 6 7 Reviewed by Simon Fraser. 8 9 An earlier version of the scroll snap specification specified that the arguments to 10 scroll-snap-align should be <inline> and then <block>, but a later version reversed 11 the order. This change aligns the WebKit implementation with the specification. 12 13 This has some web compatibility implications, but current measurements show that 14 the use of the two value variant is still low. 15 16 * css/CSSComputedStyleDeclaration.cpp: 17 (WebCore::valueForScrollSnapAlignment): Reverse the order of scroll-snap-align serialization. 18 * style/StyleBuilderConverter.h: 19 (WebCore::Style::BuilderConverter::convertScrollSnapAlign): Reverse the order of scroll-snap-align parsing. 20 1 21 2021-01-13 Andres Gonzalez <andresg_22@apple.com> 2 22 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r271447 r271480 1113 1113 { 1114 1114 auto value = CSSValueList::createSpaceSeparated(); 1115 value->append(CSSPrimitiveValue::create(alignment.y)); 1115 1116 value->append(CSSPrimitiveValue::create(alignment.x)); 1116 value->append(CSSPrimitiveValue::create(alignment.y));1117 1117 return value; 1118 1118 } -
trunk/Source/WebCore/style/StyleBuilderConverter.h
r268665 r271480 923 923 auto& values = downcast<CSSValueList>(value); 924 924 ScrollSnapAlign alignment; 925 alignment. x= downcast<CSSPrimitiveValue>(*values.item(0));925 alignment.y = downcast<CSSPrimitiveValue>(*values.item(0)); 926 926 if (values.length() == 1) 927 alignment. y = alignment.x;927 alignment.x = alignment.y; 928 928 else 929 alignment. y= downcast<CSSPrimitiveValue>(*values.item(1));929 alignment.x = downcast<CSSPrimitiveValue>(*values.item(1)); 930 930 return alignment; 931 931 }
Note:
See TracChangeset
for help on using the changeset viewer.