forked from crosswalk-project/chromium-crosswalk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Account for scroll origin in scroll animators.
Blink and cc have different notions of scroll offset - Blink's is relative to the scroll origin which is non-zero in RTL documents. The CompositorScrollOffsetAnimationCurve must work entirely in cc scroll offsets since it is handed over to cc which doesn't know about the scroll origin. This patch teaches ScrollAnimator and ProgrammaticScrollAnimator to convert in both directions when creating and using the curve object. BUG=581264 Review URL: https://codereview.chromium.org/1776503002 Cr-Commit-Position: refs/heads/master@{#379974}
- Loading branch information
1 parent
4d90c49
commit 0bb1660
Showing
7 changed files
with
82 additions
and
10 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
11 changes: 11 additions & 0 deletions
11
.../threaded/fast/scroll-behavior/smooth-scroll/horizontal-smooth-scroll-in-rtl-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,11 @@ | ||
This test verifies that both input-driven and programmatic smooth scrolls serviced by the compositor thread go to the correct scroll position on RTL pages with horizontal overflow. | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS scrollX became -80 | ||
PASS scrollX became -40 | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
40 changes: 40 additions & 0 deletions
40
.../virtual/threaded/fast/scroll-behavior/smooth-scroll/horizontal-smooth-scroll-in-rtl.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,40 @@ | ||
<!DOCTYPE html> | ||
<script src="../../../../../resources/js-test.js"></script> | ||
<style> | ||
|
||
html { | ||
writing-mode: vertical-rl; | ||
width: 1000px; | ||
} | ||
|
||
</style> | ||
<script> | ||
|
||
var jsTestIsAsync = true; | ||
|
||
description("This test verifies that both input-driven and programmatic " + | ||
"smooth scrolls serviced by the compositor thread go to the correct " + | ||
"scroll position on RTL pages with horizontal overflow."); | ||
|
||
onload = function() { | ||
if (!window.eventSender) { | ||
debug("This test requires window.eventSender.") | ||
finishJSTest(); | ||
return; | ||
} | ||
|
||
// Start scrolled due to http://crbug.com/592799. | ||
scrollBy(-120, 0); | ||
|
||
// Click scrollbar stepper. | ||
eventSender.mouseMoveTo(795, 595); | ||
eventSender.mouseDown(); | ||
eventSender.mouseUp(); | ||
|
||
shouldBecomeEqual("scrollX", "-80", function() { | ||
scrollBy({left: 40, behavior: "smooth"}); | ||
shouldBecomeEqual("scrollX", "-40", finishJSTest); | ||
}); | ||
}; | ||
|
||
</script> |
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