diff options
author | miletus <miletus@chromium.org> | 2015-01-29 12:52:37 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-29 20:53:26 +0000 |
commit | 2c78036b520cbb4ab8bf7e090208bbbe22f43cba (patch) | |
tree | cb3cb9d9254a8fcea05fe331d15146ee62f567c3 /cc/blink/web_layer_impl.h | |
parent | d120360c6836854d4536969df71a1ca3b0d4073e (diff) | |
download | chromium_src-2c78036b520cbb4ab8bf7e090208bbbe22f43cba.zip chromium_src-2c78036b520cbb4ab8bf7e090208bbbe22f43cba.tar.gz chromium_src-2c78036b520cbb4ab8bf7e090208bbbe22f43cba.tar.bz2 |
Fixed position layer counter-scroll with main thread scroll offset fractional part
Main thread can scroll with non-integral scroll offset, but Blink currently
only handles integral part of the scroll offset. For example, if main thread
scrolls by 10.5, Blink tells CC that the scroll offset is 10 (currently truncated
inside Blink) and Blink also sets fixed-position layer's position at 10.
This CL makes the non-integral scroll offset works correctly in this case:
1. Blink can tell CC the non-integral scroll offset 10.5 (truncation inside Blink
will be removed after this CL).
2. Blink sets fixed-position layer at 10.
3. CC tracks the fractional part of the scroll offset 0.5 and applied it when
computing scroll compensation for fixed-position layer during drawing.
BUG=414283
Review URL: https://codereview.chromium.org/877173002
Cr-Commit-Position: refs/heads/master@{#313783}
Diffstat (limited to 'cc/blink/web_layer_impl.h')
-rw-r--r-- | cc/blink/web_layer_impl.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cc/blink/web_layer_impl.h b/cc/blink/web_layer_impl.h index bced5980..67d78f5 100644 --- a/cc/blink/web_layer_impl.h +++ b/cc/blink/web_layer_impl.h @@ -105,6 +105,7 @@ class WebLayerImpl : public blink::WebLayer, public cc::LayerClient { virtual void setForceRenderSurface(bool force); virtual void setScrollPositionDouble(blink::WebDoublePoint position); virtual blink::WebDoublePoint scrollPositionDouble() const; + virtual void setScrollPositionFractionalPart(blink::WebDoublePoint position); virtual void setScrollClipLayer(blink::WebLayer* clip_layer); virtual bool scrollable() const; virtual void setUserScrollable(bool horizontal, bool vertical); |