Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[GTK][WPE] Wrong frame scrolled when view is horizontally scrolled wi…
…th async scrolling enabled https://bugs.webkit.org/show_bug.cgi?id=222900 Patch by Alejandro G. Castro <alex@igalia.com> on 2021-04-07 Reviewed by Žan Doberšek. Source/WebCore: We need to use the scrolling offset in the parent when collecting the descendant layers at a point. We substract the boundsOrigin to make sure we transform the point considering the scrolling offset. Test: fast/scrolling/scrolling-inside-scrolled-overflowarea.html * page/scrolling/nicosia/ScrollingTreeNicosia.cpp: (WebCore::collectDescendantLayersAtPoint): Tools: We were not testing the async code path for WPE, it is important we do it because it is the default option. * WebKitTestRunner/wpe/TestControllerWPE.cpp: (WTR::TestController::platformSpecificFeatureDefaultsForTest const): Activating AsyncOverflowScrollingEnabled. LayoutTests: Add test for the use case. * fast/scrolling/scrolling-inside-scrolled-overflowarea-expected.txt: Added. * fast/scrolling/scrolling-inside-scrolled-overflowarea.html: Added. * platform/ios/TestExpectations: The test uses mouseMoveTo and it is not supported in IOS. Canonical link: https://commits.webkit.org/236238@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
617bcf9
commit 2554b6e
Showing
8 changed files
with
192 additions
and
2 deletions.
There are no files selected for viewing
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
41 changes: 41 additions & 0 deletions
41
LayoutTests/fast/scrolling/scrolling-inside-scrolled-overflowarea-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,41 @@ | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
|
||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
|
||
Sending mouse events | ||
PASS: scrolled happened in the bottom div | ||
|
103 changes: 103 additions & 0 deletions
103
LayoutTests/fast/scrolling/scrolling-inside-scrolled-overflowarea.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,103 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<style> | ||
.content { | ||
height: 200px; | ||
overflow: scroll; | ||
background-image: linear-gradient(white, gray) | ||
} | ||
</style> | ||
<script> | ||
if (window.testRunner) { | ||
testRunner.dumpAsText(); | ||
testRunner.waitUntilDone(); | ||
} | ||
|
||
function logResult(s) | ||
{ | ||
document.getElementById('result').textContent += s + "\n"; | ||
} | ||
|
||
function scrolled() | ||
{ | ||
var divId = event.target.id; | ||
if (divId == "divBottom") | ||
logResult('PASS: scrolled happened in the bottom div'); | ||
else | ||
logResult('FAIL: scrolled happened in the top div'); | ||
|
||
testRunner.notifyDone(); | ||
} | ||
|
||
function scrollTest() | ||
{ | ||
var externalScrollableArea = document.getElementById('externalScrollableArea'); | ||
var externalScrollableAreaBounds = externalScrollableArea.getBoundingClientRect(); | ||
|
||
logResult('Sending mouse events'); | ||
eventSender.mouseMoveTo(externalScrollableAreaBounds.left + 60, externalScrollableAreaBounds.bottom - 60); | ||
eventSender.mouseScrollBy(0, -10); | ||
} | ||
|
||
function startTest() | ||
{ | ||
var externalScrollableArea = document.getElementById('externalScrollableArea'); | ||
externalScrollableArea.scrollTop = externalScrollableArea.scrollHeight; | ||
|
||
setTimeout(scrollTest, 0); | ||
} | ||
|
||
window.addEventListener('load', startTest, false); | ||
</script> | ||
</head> | ||
<body> | ||
<div id="externalScrollableArea" style="overflow: scroll; width: 200px; height: 200px;"> | ||
<div class="content" id="divTop" onscroll="scrolled()"> | ||
<pre> | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
</pre> | ||
</div> | ||
<div class="content" id="divBottom" onscroll="scrolled()"> | ||
<pre> | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
content | ||
</pre> | ||
</div> | ||
</div> | ||
<pre id="result"></pre> | ||
</body> | ||
</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
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