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 11c0c801fdd6bd7da035a40a7ec70ca5fb1d55b1..c161f6bb39fb3731ddc98e5e5f9b12b9a6f80adc 100644 |
--- a/third_party/WebKit/Source/web/RotationViewportAnchor.cpp |
+++ b/third_party/WebKit/Source/web/RotationViewportAnchor.cpp |
@@ -107,8 +107,7 @@ void RotationViewportAnchor::setAnchor() { |
IntRect outerViewRect = |
layoutViewport().visibleContentRect(IncludeScrollbars); |
- IntRect innerViewRect = |
- enclosedIntRect(rootFrameViewport->visibleContentRectDouble()); |
+ IntRect innerViewRect = rootFrameViewport->visibleContentRect(); |
m_oldPageScaleFactor = m_visualViewport->scale(); |
m_oldMinimumPageScaleFactor = |
@@ -116,7 +115,7 @@ void RotationViewportAnchor::setAnchor() { |
// Save the absolute location in case we won't find the anchor node, we'll fall back to that. |
m_visualViewportInDocument = |
- FloatPoint(rootFrameViewport->visibleContentRectDouble().location()); |
+ FloatPoint(rootFrameViewport->visibleContentRect().location()); |
m_anchorNode.clear(); |
m_anchorNodeBounds = LayoutRect(); |
@@ -180,7 +179,8 @@ void RotationViewportAnchor::restoreToAnchor() { |
computeOrigins(visualViewportSize, mainFrameOrigin, visualViewportOrigin); |
- layoutViewport().setScrollPosition(mainFrameOrigin, ProgrammaticScroll); |
+ layoutViewport().setScrollOffset(toScrollOffset(mainFrameOrigin), |
+ ProgrammaticScroll); |
// Set scale before location, since location can be clamped on setting scale. |
m_visualViewport->setScale(newPageScaleFactor); |
@@ -212,8 +212,8 @@ void RotationViewportAnchor::computeOrigins( |
moveToEncloseRect(outerRect, innerRect); |
- outerRect.setLocation( |
- layoutViewport().clampScrollPosition(outerRect.location())); |
+ outerRect.setLocation(IntPoint( |
+ layoutViewport().clampScrollOffset(toIntSize(outerRect.location())))); |
moveIntoRect(innerRect, outerRect); |