Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 023b7cdd7312232a6c26168c008d5cc60c6d0be7
https://github.com/WebKit/WebKit/commit/023b7cdd7312232a6c26168c008d5cc60c6d0be7
Author: Joshua Hoffman <[email protected]>
Date: 2026-04-24 (Fri, 24 Apr 2026)
Changed paths:
A
LayoutTests/platform/mac-wk2/accessibility/content-inset-scrollview-frame-after-scroll-expected.txt
A
LayoutTests/platform/mac-wk2/accessibility/content-inset-scrollview-frame-after-scroll.html
M Source/WebCore/accessibility/AXObjectCache.cpp
M Source/WebCore/accessibility/AccessibilityObject.cpp
M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h
M Source/WebCore/page/LocalFrameView.cpp
Log Message:
-----------
AX: The scroll position applied during convertFrameToSpace needs to include
content insets
https://bugs.webkit.org/show_bug.cgi?id=313130
rdar://175426173
Reviewed by Tyler Wilcock.
When we compute the screen position for AXFrameGeometry, that calculation has
the scroll
position baked in using documentScrollPositionRelativeToViewOrigin, not the
regular scroll
offset. We need to make sure convertFrameToSpace matches that, so that when we
"undo"
the scroll offset to compute the bounds of the scroll view, we get an accurate
position.
This PR also adds a hook to trigger a frame geometry update whenever the
content insets
change. Before, this worked by chance, so now we make that update explicit.
A new test was added to verify that we verify that the scroll view's screen
position stays
consistent after scrolling with a content inset.
Test:
platform/mac-wk2/accessibility/content-inset-scrollview-frame-after-scroll.html
*
LayoutTests/platform/mac-wk2/accessibility/content-inset-scrollview-frame-after-scroll-expected.txt:
Added.
*
LayoutTests/platform/mac-wk2/accessibility/content-inset-scrollview-frame-after-scroll.html:
Added.
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::setFrameGeometry):
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::convertFrameToSpace const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::convertFrameToSpace const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::setFrameGeometry):
(WebCore::AXIsolatedTree::updateFrameGeometryAndScrollPositionIfNeeded):
(WebCore::AXIsolatedTree::applyPendingChangesLocked):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:
(WebCore::AXIsolatedTree::frameViewOriginScrollPosition const):
(WebCore::AXIsolatedTree::frameScrollPosition const): Deleted.
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::obscuredContentInsetsDidChange):
Canonical link: https://commits.webkit.org/311997@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications