[webkit-changes] [WebKit/WebKit] f121c1: [css-scroll-snap] focus should not take into accou...
Nikos Mouchtaris
noreply at github.com
Wed Sep 21 11:11:18 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f121c13339f2b359b9a6aaf8e9186ec8c539f58e
https://github.com/WebKit/WebKit/commit/f121c13339f2b359b9a6aaf8e9186ec8c539f58e
Author: Nikolaos Mouchtaris <nmouchtaris at apple.com>
Date: 2022-09-21 (Wed, 21 Sep 2022)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-margin-visibility-check-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-margin-visibility-check.html
M Source/WebCore/dom/Element.cpp
M Source/WebCore/page/FrameView.cpp
M Source/WebCore/platform/ScrollableArea.cpp
M Source/WebCore/platform/ScrollableArea.h
M Source/WebCore/rendering/RenderElement.cpp
M Source/WebCore/rendering/RenderElement.h
M Source/WebCore/rendering/RenderLayer.h
M Source/WebCore/rendering/RenderLayerScrollableArea.cpp
Log Message:
-----------
[css-scroll-snap] focus should not take into account scroll margin for visibility check
https://bugs.webkit.org/show_bug.cgi?id=245100
<rdar://99840839>
Reviewed by Simon Fraser.
When an element is focused, we perform a visibility calculation to determine if we need to scroll
the element into view. This visibility calculation should not take into account the scroll margin of
the element. This prevents a bug where we wont scroll an element into view that is offscreen because
the rect including its scroll margnin is within the viewport.
* LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-margin-visibility-check.html:
* Source/WebCore/page/FrameView.cpp:
(WebCore::FrameView::scrollToFocusedElementInternal):
Canonical link: https://commits.webkit.org/254732@main
More information about the webkit-changes
mailing list