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

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

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: Fix README.md 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 83c90346f44daede4eb39459b62284d241088f6f..65527e56ad5d310e46ec8ec76ea516648561ba8c 100644
--- a/third_party/WebKit/Source/web/DevToolsEmulator.cpp
+++ b/third_party/WebKit/Source/web/DevToolsEmulator.cpp
@@ -499,8 +499,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