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

Unified Diff: Source/core/frame/RootFrameViewport.cpp

Issue 1303413004: Convert some call sites to use explicit LayoutRect->FloatRect conversion. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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: Source/core/frame/RootFrameViewport.cpp
diff --git a/Source/core/frame/RootFrameViewport.cpp b/Source/core/frame/RootFrameViewport.cpp
index 6ba7d2e5d353e405d89374dfaf3594284ac09da3..84601b5bfbee029561c3c1fa00f8e8857ad0e6e2 100644
--- a/Source/core/frame/RootFrameViewport.cpp
+++ b/Source/core/frame/RootFrameViewport.cpp
@@ -161,8 +161,7 @@ LayoutRect RootFrameViewport::scrollIntoView(const LayoutRect& rectInContent, co
targetViewport.setSize(LayoutSize(visualViewport().visibleContentRect().size()));
// Snap the visible rect to layout units to match the calculated target viewport rect.
- FloatRect visible =
- LayoutRect(visualViewport().scrollPositionDouble(), visualViewport().visibleContentRect().size());
+ FloatRect visible(LayoutRect(visualViewport().scrollPositionDouble(), visualViewport().visibleContentRect().size()));
float centeringOffsetX = (visible.width() - targetViewport.width()) / 2;
float centeringOffsetY = (visible.height() - targetViewport.height()) / 2;
« no previous file with comments | « Source/core/editing/markers/DocumentMarkerControllerTest.cpp ('k') | Source/core/inspector/InspectorTraceEvents.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698