-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[scroll-anchoring] Implement suppression triggers
https://bugs.webkit.org/show_bug.cgi?id=261719 rdar://115704143 Reviewed by Simon Fraser. Implement suppression of scroll anchoring adjustments according to the spec (https://www.w3.org/TR/css-scroll-anchoring-1/#suppression-triggers). This involves suppressing scroll anchoring adjustments when certain “suppression trigger” operations occur when an anchor element has been chosen but before a scroll anchoring adjustment has occurred, that would cause the next scroll anchoring adjustment to be incorrect. These suppression triggers are certain style changes on the anchor element or any element in the anchor element ancestor chain, up to and including the scrolling element that owns the scroll anchroing controller, as well as changing to or from being absolutely posititioned, for any element under the owning scrolling element. * LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-anchoring/ancestor-change-heuristic-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-anchoring/heuristic-with-offset-update-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-anchoring/opt-out-dynamic-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-anchoring/opt-out-dynamic-scroller-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-scroll-anchoring/position-change-heuristic-expected.txt: * Source/WebCore/page/LocalFrameView.cpp: (WebCore::LocalFrameView::scheduleResizeEventIfNeeded): * Source/WebCore/page/scrolling/ScrollAnchoringController.cpp: (WebCore::elementIsScrollableArea): (WebCore::setInScrollAnchoringAncestorChain): (WebCore::ScrollAnchoringController::invalidateAnchorElement): (WebCore::ScrollAnchoringController::notifyChildHadSuppressingStyleChange): (WebCore::scrollAnchoringControllerForElement): (WebCore::ScrollAnchoringController::notifyParentScrollAnchoringControllerHadSuppressingStyleChange): (WebCore::ScrollAnchoringController::didFindPriorityCandidate): (WebCore::ScrollAnchoringController::chooseAnchorElement): (WebCore::ScrollAnchoringController::adjustScrollPositionForAnchoring): * Source/WebCore/page/scrolling/ScrollAnchoringController.h: * Source/WebCore/rendering/RenderElement.cpp: (WebCore::RenderElement::styleDidChange): * Source/WebCore/rendering/RenderObject.h: (WebCore::RenderObject::isInScrollAnchoringAncestorChain const): (WebCore::RenderObject::setIsInScrollAnchoringAncestorChain): (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields): * Source/WebCore/rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::scrollAnchoringSuppressionStyleDidChange const): (WebCore::RenderStyle::absolutePositionStyleDidChange const): * Source/WebCore/rendering/style/RenderStyle.h: Canonical link: https://commits.webkit.org/270455@main
- Loading branch information
Showing
14 changed files
with
142 additions
and
11 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
...ed/w3c/web-platform-tests/css/css-scroll-anchoring/ancestor-change-heuristic-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
FAIL Ancestor changes in document scroller. assert_equals: expected 150 but got 220 | ||
FAIL Ancestor changes in scrollable <div>. assert_equals: expected 150 but got 220 | ||
PASS Ancestor changes in document scroller. | ||
PASS Ancestor changes in scrollable <div>. | ||
|
2 changes: 1 addition & 1 deletion
2
...w3c/web-platform-tests/css/css-scroll-anchoring/heuristic-with-offset-update-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
|
||
FAIL Positioned ancestors with dynamic changes to offsets trigger scroll suppressions. assert_equals: expected 200 but got 310 | ||
PASS Positioned ancestors with dynamic changes to offsets trigger scroll suppressions. | ||
|
2 changes: 1 addition & 1 deletion
2
...sts/imported/w3c/web-platform-tests/css/css-scroll-anchoring/opt-out-dynamic-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
content | ||
|
||
FAIL Dynamically styling 'overflow-anchor: none' on the anchor node should prevent scroll anchoring assert_equals: expected 150 but got 200 | ||
PASS Dynamically styling 'overflow-anchor: none' on the anchor node should prevent scroll anchoring | ||
|
2 changes: 1 addition & 1 deletion
2
...ted/w3c/web-platform-tests/css/css-scroll-anchoring/opt-out-dynamic-scroller-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
content | ||
|
||
FAIL Dynamically styling 'overflow-anchor: none' on the scroller element should prevent scroll anchoring assert_equals: expected 150 but got 200 | ||
PASS Dynamically styling 'overflow-anchor: none' on the scroller element should prevent scroll anchoring | ||
|
4 changes: 2 additions & 2 deletions
4
...ed/w3c/web-platform-tests/css/css-scroll-anchoring/position-change-heuristic-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
FAIL Position changes in document scroller. assert_equals: expected 200 but got 175 | ||
FAIL Position changes in scrollable <div>. assert_equals: expected 200 but got 175 | ||
PASS Position changes in document scroller. | ||
PASS Position changes in scrollable <div>. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters