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

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

Issue 1447273003: Make the FloatSize constructor from an IntSize explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/web/PageOverlay.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/RotationViewportAnchor.cpp
diff --git a/third_party/WebKit/Source/web/RotationViewportAnchor.cpp b/third_party/WebKit/Source/web/RotationViewportAnchor.cpp
index 5b9bda8bef9dbbb211f4681bada32efa2936dfdb..fb1f13bd6e9cc92d9e56bd3ae3b95706f67b7d57 100644
--- a/third_party/WebKit/Source/web/RotationViewportAnchor.cpp
+++ b/third_party/WebKit/Source/web/RotationViewportAnchor.cpp
@@ -128,12 +128,12 @@ void RotationViewportAnchor::setAnchor()
// Outer rectangle is used as a scale, we need positive width and height.
ASSERT(!outerViewRect.isEmpty());
- m_normalizedVisualViewportOffset = innerViewRect.location() - outerViewRect.location();
+ m_normalizedVisualViewportOffset = FloatSize(innerViewRect.location() - outerViewRect.location());
// Normalize by the size of the outer rect
m_normalizedVisualViewportOffset.scale(1.0 / outerViewRect.width(), 1.0 / outerViewRect.height());
- FloatSize anchorOffset = innerViewRect.size();
+ FloatSize anchorOffset(innerViewRect.size());
anchorOffset.scale(m_anchorInInnerViewCoords.width(), m_anchorInInnerViewCoords.height());
const FloatPoint anchorPoint = FloatPoint(innerViewRect.location()) + anchorOffset;
@@ -152,7 +152,7 @@ void RotationViewportAnchor::restoreToAnchor()
float newPageScaleFactor = m_oldPageScaleFactor / m_oldMinimumPageScaleFactor * m_pageScaleConstraintsSet.finalConstraints().minimumScale;
newPageScaleFactor = m_pageScaleConstraintsSet.finalConstraints().clampToConstraints(newPageScaleFactor);
- FloatSize visualViewportSize = m_visualViewport->size();
+ FloatSize visualViewportSize(m_visualViewport->size());
visualViewportSize.scale(1 / newPageScaleFactor);
IntPoint mainFrameOrigin;
« no previous file with comments | « third_party/WebKit/Source/web/PageOverlay.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698