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

Unified Diff: public/platform/WebLayer.h

Issue 889453002: Add a WebLayer:setScrollCompensationAdjustment between Blink and CC (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add reftest Created 5 years, 11 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 | « Source/core/page/scrolling/ScrollingCoordinator.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebLayer.h
diff --git a/public/platform/WebLayer.h b/public/platform/WebLayer.h
index 74bf4978e4e0f83a0095f5f457519a45f76952b6..f4fcc94d70a8173e5b168e517cfb5ef045cb8fc7 100644
--- a/public/platform/WebLayer.h
+++ b/public/platform/WebLayer.h
@@ -164,6 +164,18 @@ public:
// Scrolling
virtual void setScrollPositionDouble(WebDoublePoint) = 0;
virtual WebDoublePoint scrollPositionDouble() const = 0;
+ // Blink tells cc the scroll offset through setScrollPositionDouble() using
+ // floating precision but it currently can only position cc layers at integer
+ // boundary. So Blink needs to also call setScrollCompensationAdjustment()
+ // to tell cc what's the part of the scroll offset that Blink doesn't handle
+ // but cc needs to take into consideration, e.g. compensating
+ // for fixed-position layer that's positioned in Blink using only integer scroll
+ // offset.
+ // We make this call explicit, instead of letting cc to infer the fractional part
+ // from the scroll offset, to be clear that this is Blink's limitation. Once
+ // Blink can fully handle fractional scroll offset, it can stop calling
+ // this function and cc side would just work.
+ virtual void setScrollCompensationAdjustment(WebDoublePoint) = 0;
// To set a WebLayer as scrollable we must specify the corresponding clip layer.
virtual void setScrollClipLayer(WebLayer*) = 0;
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698