-
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.
Cherry-pick 2f97007. rdar://problem/113366817
[UI-side compositing] Webpage going blank when navigating diffs in https://whatpr.org/html/9537/238086f...f400a41/canvas.html#drawing-state https://bugs.webkit.org/show_bug.cgi?id=259813 rdar://113366817 Reviewed by Simon Fraser and Cameron McCormack. When getting multiple non-animated scroll requests, the current merging code loses the previous scroll request if a new delta update comes in. To resolve this, add the two scroll requests together if either or both are a delta update. Added a couple new tests for this since the tests in imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-* do not cover this since they are testing the web process position. * Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.cpp: (WebCore::RequestedScrollData::merge): Canonical link: https://commits.webkit.org/266646@main Identifier: 265870.307@safari-7616.1.27.10-branch
- Loading branch information
Showing
7 changed files
with
238 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
LayoutTests/fast/scrolling/programmatic-scroll-merge-delta-and-position-expected.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,37 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Only the green part of the div should be visible</title> | ||
<style> | ||
body { | ||
height: 2000px; | ||
background-image: repeating-linear-gradient(white, silver 200px); | ||
margin: 0px; | ||
} | ||
|
||
.box { | ||
width: 200px; | ||
height: 200px; | ||
background-image: linear-gradient(0deg, green 50%, red 50%); | ||
} | ||
</style> | ||
<script src="../../resources/ui-helper.js"></script> | ||
<script> | ||
if (window.testRunner) | ||
testRunner.waitUntilDone(); | ||
|
||
async function doTest() | ||
{ | ||
window.scrollBy(0, 100); | ||
|
||
await UIHelper.ensurePresentationUpdate(); | ||
testRunner.notifyDone(); | ||
} | ||
|
||
window.addEventListener('load', doTest, false); | ||
</script> | ||
</head> | ||
<body> | ||
<div class="box"></div> | ||
</body> | ||
</html> |
38 changes: 38 additions & 0 deletions
38
LayoutTests/fast/scrolling/programmatic-scroll-merge-delta-and-position.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,38 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Only the green part of the div should be visible</title> | ||
<style> | ||
body { | ||
height: 2000px; | ||
background-image: repeating-linear-gradient(white, silver 200px); | ||
margin: 0px; | ||
} | ||
|
||
.box { | ||
width: 200px; | ||
height: 200px; | ||
background-image: linear-gradient(0deg, green 50%, red 50%); | ||
} | ||
</style> | ||
<script src="../../resources/ui-helper.js"></script> | ||
<script> | ||
if (window.testRunner) | ||
testRunner.waitUntilDone(); | ||
|
||
async function doTest() | ||
{ | ||
window.scrollBy(0, 50); | ||
window.scrollTo(0, 100); | ||
|
||
await UIHelper.ensurePresentationUpdate(); | ||
testRunner.notifyDone(); | ||
} | ||
|
||
window.addEventListener('load', doTest, false); | ||
</script> | ||
</head> | ||
<body> | ||
<div class="box"></div> | ||
</body> | ||
</html> |
37 changes: 37 additions & 0 deletions
37
LayoutTests/fast/scrolling/programmatic-scroll-merge-delta-expected.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,37 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Only the green part of the div should be visible</title> | ||
<style> | ||
body { | ||
height: 2000px; | ||
background-image: repeating-linear-gradient(white, silver 200px); | ||
margin: 0px; | ||
} | ||
|
||
.box { | ||
width: 200px; | ||
height: 200px; | ||
background-image: linear-gradient(0deg, green 50%, red 50%); | ||
} | ||
</style> | ||
<script src="../../resources/ui-helper.js"></script> | ||
<script> | ||
if (window.testRunner) | ||
testRunner.waitUntilDone(); | ||
|
||
async function doTest() | ||
{ | ||
window.scrollBy(0, 100); | ||
|
||
await UIHelper.ensurePresentationUpdate(); | ||
testRunner.notifyDone(); | ||
} | ||
|
||
window.addEventListener('load', doTest, false); | ||
</script> | ||
</head> | ||
<body> | ||
<div class="box"></div> | ||
</body> | ||
</html> |
38 changes: 38 additions & 0 deletions
38
LayoutTests/fast/scrolling/programmatic-scroll-merge-delta.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,38 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Only the green part of the div should be visible</title> | ||
<style> | ||
body { | ||
height: 2000px; | ||
background-image: repeating-linear-gradient(white, silver 200px); | ||
margin: 0px; | ||
} | ||
|
||
.box { | ||
width: 200px; | ||
height: 200px; | ||
background-image: linear-gradient(0deg, green 50%, red 50%); | ||
} | ||
</style> | ||
<script src="../../resources/ui-helper.js"></script> | ||
<script> | ||
if (window.testRunner) | ||
testRunner.waitUntilDone(); | ||
|
||
async function doTest() | ||
{ | ||
window.scrollBy(0, 50); | ||
window.scrollBy(0, 50); | ||
|
||
await UIHelper.ensurePresentationUpdate(); | ||
testRunner.notifyDone(); | ||
} | ||
|
||
window.addEventListener('load', doTest, false); | ||
</script> | ||
</head> | ||
<body> | ||
<div class="box"></div> | ||
</body> | ||
</html> |
37 changes: 37 additions & 0 deletions
37
LayoutTests/fast/scrolling/programmatic-scroll-merge-position-and-delta-expected.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,37 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Only the green part of the div should be visible</title> | ||
<style> | ||
body { | ||
height: 2000px; | ||
background-image: repeating-linear-gradient(white, silver 200px); | ||
margin: 0px; | ||
} | ||
|
||
.box { | ||
width: 200px; | ||
height: 200px; | ||
background-image: linear-gradient(0deg, green 50%, red 50%); | ||
} | ||
</style> | ||
<script src="../../resources/ui-helper.js"></script> | ||
<script> | ||
if (window.testRunner) | ||
testRunner.waitUntilDone(); | ||
|
||
async function doTest() | ||
{ | ||
window.scrollBy(0, 100); | ||
|
||
await UIHelper.ensurePresentationUpdate(); | ||
testRunner.notifyDone(); | ||
} | ||
|
||
window.addEventListener('load', doTest, false); | ||
</script> | ||
</head> | ||
<body> | ||
<div class="box"></div> | ||
</body> | ||
</html> |
38 changes: 38 additions & 0 deletions
38
LayoutTests/fast/scrolling/programmatic-scroll-merge-position-and-delta.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,38 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Only the green part of the div should be visible</title> | ||
<style> | ||
body { | ||
height: 2000px; | ||
background-image: repeating-linear-gradient(white, silver 200px); | ||
margin: 0px; | ||
} | ||
|
||
.box { | ||
width: 200px; | ||
height: 200px; | ||
background-image: linear-gradient(0deg, green 50%, red 50%); | ||
} | ||
</style> | ||
<script src="../../resources/ui-helper.js"></script> | ||
<script> | ||
if (window.testRunner) | ||
testRunner.waitUntilDone(); | ||
|
||
async function doTest() | ||
{ | ||
window.scrollTo(0, 50); | ||
window.scrollBy(0, 50); | ||
|
||
await UIHelper.ensurePresentationUpdate(); | ||
testRunner.notifyDone(); | ||
} | ||
|
||
window.addEventListener('load', doTest, false); | ||
</script> | ||
</head> | ||
<body> | ||
<div class="box"></div> | ||
</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