Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d020c84b296a8de91bcb3a72c3c8faa70ec72e07
      
https://github.com/WebKit/WebKit/commit/d020c84b296a8de91bcb3a72c3c8faa70ec72e07
  Author: Simon Fraser <[email protected]>
  Date:   2026-04-07 (Tue, 07 Apr 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    M 
LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollIntoView-multiple-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollIntoView-multiple-nested-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollIntoView-scrolling-container-expected.txt
    M LayoutTests/platform/ios/TestExpectations
    M LayoutTests/platform/mac-wk2/TestExpectations
    M Source/WebCore/dom/Element.cpp
    M Source/WebCore/page/LocalFrameView.cpp
    M Source/WebCore/rendering/RenderLayer.h

  Log Message:
  -----------
  scrollIntoView on an overflow scroller scrolls its contents
https://bugs.webkit.org/show_bug.cgi?id=311571
rdar://174173683

Reviewed by Abrar Rahman Protyasha.

Calling `scrollIntoView` on an element with scrollable contents should not 
scroll its contents,
yet WebKit did, so fix that via a new `SkipScrollingTargetElement` flag on 
`ScrollRectToVisibleOptions`.
Other callers of `LocalFrameView::scrollRectToVisible` do want the existing 
behavior, so the new
flag is required.

Use cleaner struct initializers in a few places.

Clean up some text expectations.

* LayoutTests/TestExpectations:
* 
LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollIntoView-multiple-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollIntoView-multiple-nested-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollIntoView-scrolling-container-expected.txt:
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::scrollIntoView):
(WebCore::Element::scrollIntoViewIfNeeded):
(WebCore::Element::scrollIntoViewIfNotVisible):
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::scrollRectToVisible):
* Source/WebCore/rendering/RenderLayer.h:

Canonical link: https://commits.webkit.org/310734@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to