-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure RemoteScrollbarsController is used by scrollable areas with as…
…ync scrolling https://bugs.webkit.org/show_bug.cgi?id=272935 rdar://126719107 Reviewed by Simon Fraser. After https://commits.webkit.org/277015@main added use of usesAsyncScrolling to determine the scrollbars controller type, and since usesAsyncScrolling is not correct prior to layer creation, ensure creation of a RemoteScrollbarsController after layer creation if the scrollable area does use async scrolling. * Source/WebCore/platform/ScrollableArea.h: (WebCore::ScrollableArea::updateScrollbarsControllerForLayerCreation): (WebCore::ScrollableArea::hasRemoteScrollbarsController): * Source/WebCore/platform/ScrollbarsController.h: (WebCore::ScrollbarsController::isRemoteScrollbarsController): * Source/WebCore/rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingRole): * Source/WebCore/rendering/RenderLayerScrollableArea.cpp: (WebCore::RenderLayerScrollableArea::updateScrollbarsControllerForLayerCreation): (WebCore::RenderLayerScrollableArea::createScrollbarsController): * Source/WebCore/rendering/RenderLayerScrollableArea.h: * Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::createScrollbarsController const): * Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollbarsController.h: Canonical link: https://commits.webkit.org/278517@main
- Loading branch information
Showing
21 changed files
with
176 additions
and
40 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
LayoutTests/fast/scrolling/mac/scrollbars/scrollbars-controller-type-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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Ensure scrollbars controller state is correct for scroller type | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS window.internals.scrollbarsControllerTypeForNode(svgScroller) is "ScrollbarsControllerMac" | ||
PASS window.internals.scrollbarsControllerTypeForNode(scroller) is "RemoteScrollbarsController" | ||
PASS window.internals.scrollbarsControllerTypeForNode() is "RemoteScrollbarsController" | ||
|
65 changes: 65 additions & 0 deletions
65
LayoutTests/fast/scrolling/mac/scrollbars/scrollbars-controller-type.html
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<!DOCTYPE html> <!-- webkit-test-runner [ MockScrollbarsEnabled=false AsyncOverflowScrollingEnabled=true ] --> | ||
<html> | ||
<head> | ||
<style> | ||
body { | ||
height: 1000px; | ||
} | ||
.scroller { | ||
width: 100px; | ||
height: 100px; | ||
border: 1px solid black; | ||
overflow: scroll; | ||
} | ||
.contents { | ||
width: 100%; | ||
height: 200%; | ||
} | ||
</style> | ||
<script src="../../../../resources/js-test.js"></script> | ||
<script src="../../../../resources/ui-helper.js"></script> | ||
|
||
<script> | ||
jsTestIsAsync = true; | ||
|
||
if (window.internals) | ||
internals.setUsesOverlayScrollbars(true); | ||
|
||
async function doTest() | ||
{ | ||
description('Ensure scrollbars controller state is correct for scroller type'); | ||
if (window.testRunner) | ||
testRunner.waitUntilDone(); | ||
await UIHelper.renderingUpdate(); | ||
svgScroller = document.getElementById('svgScroller'); | ||
shouldBeEqualToString('window.internals.scrollbarsControllerTypeForNode(svgScroller)', 'ScrollbarsControllerMac'); | ||
|
||
scroller = document.getElementById('scroller'); | ||
shouldBeEqualToString('window.internals.scrollbarsControllerTypeForNode(scroller)', window.internals.isUsingUISideCompositing() ? 'RemoteScrollbarsController' : 'ScrollbarsControllerMac'); | ||
shouldBeEqualToString('window.internals.scrollbarsControllerTypeForNode()', window.internals.isUsingUISideCompositing() ? 'RemoteScrollbarsController' : 'ScrollbarsControllerMac'); | ||
|
||
testRunner.notifyDone(); | ||
} | ||
|
||
window.addEventListener('load', () => { | ||
doTest(); | ||
}, false); | ||
</script> | ||
</head> | ||
<body> | ||
<div id="scroller" class="scroller"> | ||
<div class="contents"></div> | ||
</div> | ||
|
||
<svg id="hello" width="400" height="400"> | ||
<foreignObject x="0" y="0" width="400" height="400"> | ||
|
||
<div id="svgScroller" class="scroller"> | ||
<div class="contents"> | ||
</div> | ||
</div> | ||
</foreignObject> | ||
</svg> | ||
<div id="console"></div> | ||
</body> | ||
</html> |
9 changes: 9 additions & 0 deletions
9
...rm/mac-monterey-wk2/fast/scrolling/mac/scrollbars/scrollbars-controller-type-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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Ensure scrollbars controller state is correct for scroller type | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS window.internals.scrollbarsControllerTypeForNode(svgScroller) is "ScrollbarsControllerMac" | ||
PASS window.internals.scrollbarsControllerTypeForNode(scroller) is "ScrollbarsControllerMac" | ||
PASS window.internals.scrollbarsControllerTypeForNode() is "ScrollbarsControllerMac" | ||
|
9 changes: 9 additions & 0 deletions
9
...orm/mac-ventura-wk2/fast/scrolling/mac/scrollbars/scrollbars-controller-type-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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Ensure scrollbars controller state is correct for scroller type | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS window.internals.scrollbarsControllerTypeForNode(svgScroller) is "ScrollbarsControllerMac" | ||
PASS window.internals.scrollbarsControllerTypeForNode(scroller) is "ScrollbarsControllerMac" | ||
PASS window.internals.scrollbarsControllerTypeForNode() is "ScrollbarsControllerMac" | ||
|
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
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
Oops, something went wrong.