Changeset 269622 in webkit
- Timestamp:
- Nov 10, 2020 1:28:40 AM (21 months ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal-with-margin-expected.txt (added)
-
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal-with-margin.html (added)
-
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-with-margin-expected.txt (added)
-
LayoutTests/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-with-margin.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/FrameView.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r269612 r269622 1 2020-11-10 Martin Robinson <mrobinson@igalia.com> 2 3 Scroll-snap on the root aligns to the body margin edge, not the viewport edge 4 https://bugs.webkit.org/show_bug.cgi?id=210476 5 <rdar://problem/61755103> 6 7 Reviewed by Simon Fraser. 8 9 Added tests for new behavior. 10 11 * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal-with-margin-expected.txt: Added. 12 * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal-with-margin.html: Added. 13 * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-with-margin-expected.txt: Added. 14 * tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-with-margin.html: Added. 15 1 16 2020-11-09 Chris Dumez <cdumez@apple.com> 2 17 -
trunk/Source/WebCore/ChangeLog
r269616 r269622 1 2020-11-10 Martin Robinson <mrobinson@igalia.com> 2 3 Scroll-snap on the root aligns to the body margin edge, not the viewport edge 4 https://bugs.webkit.org/show_bug.cgi?id=210476 5 <rdar://problem/61755103> 6 7 Reviewed by Simon Fraser. 8 9 When passing the frame viewport to updateSnapOffsetsForScrollableArea, be sure to put it 10 into the coordinate system of the root element padding box. This means offsetting it by the 11 margins of the root element. 12 13 Tests: tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-horizontal-with-margin.html 14 tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-with-margin.html 15 16 * page/FrameView.cpp: 17 (WebCore::FrameView::updateSnapOffsets): Offset viewport by top and left margins of the 18 root element. 19 1 20 2020-11-09 Tim Horton <timothy_horton@apple.com> 2 21 -
trunk/Source/WebCore/page/FrameView.cpp
r269506 r269622 942 942 } 943 943 944 // updateSnapOffsetsForScrollableArea calculates scroll offsets with all rectangles having their origin at the 945 // padding box rectangle of the scrollable element. Unlike for overflow:scroll, the FrameView viewport includes 946 // the root element margins. This means that we need to offset the viewport rectangle to make it relative to 947 // the padding box of the root element. 944 948 LayoutRect viewport = LayoutRect(IntPoint(), baseLayoutViewportSize()); 949 viewport.move(-rootRenderer->marginLeft(), -rootRenderer->marginTop()); 950 945 951 updateSnapOffsetsForScrollableArea(*this, *rootRenderer, *styleToUse, viewport); 946 952 }
Note: See TracChangeset
for help on using the changeset viewer.