Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d5c98ab9b8e7757990fcb1770e88dec88b6e412c
https://github.com/WebKit/WebKit/commit/d5c98ab9b8e7757990fcb1770e88dec88b6e412c
Author: Charlie Wolfe <[email protected]>
Date: 2026-06-17 (Wed, 17 Jun 2026)
Changed paths:
A
LayoutTests/fast/element-targeting/adjust-region-after-viewport-height-change-expected.html
A
LayoutTests/fast/element-targeting/adjust-region-after-viewport-height-change.html
M LayoutTests/platform/ios/TestExpectations
M Source/WebCore/page/ElementTargetingController.cpp
Log Message:
-----------
adjustRegionAfterViewportSizeChange shifts rects along X for a viewport
height change
https://bugs.webkit.org/show_bug.cgi?id=317211
rdar://179832395
Reviewed by Wenson Hsieh.
FloatRect::move(float dx, float dy) takes the X delta first and the Y delta
second. The height-delta
called adjustedRect.move(heightDelta, 0) and so shifted the rect horizontally
by the vertical delta
(and not vertically at all). As a result, after a vertical viewport size change
the tracked
adjustment regions shift sideways instead of up/down and no longer contain the
elements they track,
so previously-hidden out-of-flow elements are not re-adjusted.
Move along the Y axis with move(0, heightDelta).
Test: fast/element-targeting/adjust-region-after-viewport-height-change.html
*
LayoutTests/fast/element-targeting/adjust-region-after-viewport-height-change-expected.html:
Added.
*
LayoutTests/fast/element-targeting/adjust-region-after-viewport-height-change.html:
Added.
* Source/WebCore/page/ElementTargetingController.cpp:
(WebCore::adjustRegionAfterViewportSizeChange):
Canonical link: https://commits.webkit.org/315398@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications