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; |