Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1412)

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp

Issue 1776503002: Account for scroll origin in scroll animators. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: super-nit Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp
index 294fcbeee926d2f6e577430edac2f6cdd08a84fd..b340b18f3654ca6fb8f8cf9c40a38979ff1be625 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.cpp
@@ -227,4 +227,16 @@ CompositorAnimationPlayer* ScrollAnimatorCompositorCoordinator::compositorPlayer
return m_compositorPlayer.get();
}
+FloatPoint ScrollAnimatorCompositorCoordinator::compositorOffsetFromBlinkOffset(FloatPoint offset)
+{
+ offset.moveBy(scrollableArea()->scrollOrigin());
+ return offset;
+}
+
+FloatPoint ScrollAnimatorCompositorCoordinator::blinkOffsetFromCompositorOffset(FloatPoint offset)
+{
+ offset.moveBy(-scrollableArea()->scrollOrigin());
+ return offset;
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/ScrollAnimatorCompositorCoordinator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698