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

Unified Diff: third_party/WebKit/Source/web/DevToolsEmulator.cpp

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: third_party/WebKit/Source/web/DevToolsEmulator.cpp
diff --git a/third_party/WebKit/Source/web/DevToolsEmulator.cpp b/third_party/WebKit/Source/web/DevToolsEmulator.cpp
index 9c25ced6e4e428c6bf36034d882076d3d294d39b..f0ce784e5acc58aec7f85ee7710608bb2388e306 100644
--- a/third_party/WebKit/Source/web/DevToolsEmulator.cpp
+++ b/third_party/WebKit/Source/web/DevToolsEmulator.cpp
@@ -496,8 +496,8 @@ bool DevToolsEmulator::handleInputEvent(const WebInputEvent& inputEvent) {
frameView, static_cast<const WebGestureEvent&>(inputEvent));
float pageScaleFactor = page->pageScaleFactor();
if (gestureEvent.type() == PlatformEvent::GesturePinchBegin) {
- m_lastPinchAnchorCss = wrapUnique(
- new IntPoint(frameView->scrollPosition() + gestureEvent.position()));
+ m_lastPinchAnchorCss = wrapUnique(new IntPoint(roundedIntPoint(
+ gestureEvent.position() + frameView->scrollOffset())));
m_lastPinchAnchorDip = wrapUnique(new IntPoint(gestureEvent.position()));
m_lastPinchAnchorDip->scale(pageScaleFactor, pageScaleFactor);
}

Powered by Google App Engine
This is Rietveld 408576698