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

Unified Diff: cc/blink/web_layer_impl.cc

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: Created 4 years, 2 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
Index: cc/blink/web_layer_impl.cc
diff --git a/cc/blink/web_layer_impl.cc b/cc/blink/web_layer_impl.cc
index a88fd3068c090f3909c2dfa3deb9ce5e436ffa40..491b303df4df58cf508bd9cdeb0caf687b640a58 100644
--- a/cc/blink/web_layer_impl.cc
+++ b/cc/blink/web_layer_impl.cc
@@ -217,13 +217,13 @@ bool WebLayerImpl::hasActiveAnimationForTesting() {
return layer_->HasActiveAnimationForTesting();
}
-void WebLayerImpl::setScrollPositionDouble(blink::WebDoublePoint position) {
- layer_->SetScrollOffset(gfx::ScrollOffset(position.x, position.y));
+void WebLayerImpl::setScrollOffset(blink::WebFloatSize offset) {
+ layer_->SetScrollOffset(gfx::ScrollOffset(offset.width, offset.height));
}
-blink::WebDoublePoint WebLayerImpl::scrollPositionDouble() const {
- return blink::WebDoublePoint(layer_->scroll_offset().x(),
- layer_->scroll_offset().y());
+blink::WebFloatSize WebLayerImpl::scrollOffset() const {
+ return blink::WebFloatSize(layer_->scroll_offset().x(),
+ layer_->scroll_offset().y());
}
void WebLayerImpl::setScrollClipLayer(WebLayer* clip_layer) {

Powered by Google App Engine
This is Rietveld 408576698