Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a1352e0bb8d4f6b7792ebf7de283b9ab3ac59f0d
      
https://github.com/WebKit/WebKit/commit/a1352e0bb8d4f6b7792ebf7de283b9ab3ac59f0d
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-08-14 (Fri, 14 Aug 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WebCore/dom/Element.cpp

  Log Message:
  -----------
  [css-contain] element.scroll()/scrollTo() does not scroll inside a 
content-visibility: hidden subtree
https://bugs.webkit.org/show_bug.cgi?id=321800
rdar://184935071

Reviewed by Simon Fraser.

This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.

Element::scrollTo() was the only scroll-related entry point that did not ask
layout to descend into a content-visibility skipped subtree; scrollLeft/
scrollTop, their setters, scrollWidth/scrollHeight and the client/offset/
getBoundingClientRect family all already do.

Without those options Document::updateLayout() skips
runForcedLayoutOnSkippedContentIfNeeded(), so the target is never laid out and
setScrollPosition() clamps to 0 against a zero-sized scrollable area. Affects
element.scroll(), scrollTo() and scrollBy(), which share this overload.

* LayoutTests/TestExpectations: Unskip now passing test
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::scrollTo):

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



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

Reply via email to