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

Unified Diff: Source/web/RotationViewportAnchor.cpp

Issue 1207103002: Update WebLocalFrameImpl and RotationViewportAnchor for root layer scrolling. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/RotationViewportAnchor.cpp
diff --git a/Source/web/RotationViewportAnchor.cpp b/Source/web/RotationViewportAnchor.cpp
index 46f85629722a9b55a17f7b927385b01f3f34c909..45584d3dcced791f3a0899f6d7d2b63ee4f5371e 100644
--- a/Source/web/RotationViewportAnchor.cpp
+++ b/Source/web/RotationViewportAnchor.cpp
@@ -101,7 +101,7 @@ void RotationViewportAnchor::setAnchor()
{
// FIXME: Scroll offsets are now fractional (DoublePoint and FloatPoint for the FrameView and PinchViewport
// respectively. This path should be rewritten without pixel snapping.
- IntRect outerViewRect = m_rootFrameView->visibleContentRect();
+ IntRect outerViewRect = m_rootFrameView->layoutViewportScrollableArea()->visibleContentRect();
IntRect innerViewRect = enclosedIntRect(m_rootFrameView->scrollableArea()->visibleContentRectDouble());
m_oldPageScaleFactor = m_pinchViewport->scale();
@@ -160,7 +160,7 @@ void RotationViewportAnchor::restoreToAnchor()
computeOrigins(pinchViewportSize, mainFrameOrigin, pinchViewportOrigin);
- m_rootFrameView->setScrollPosition(mainFrameOrigin, ProgrammaticScroll);
+ m_rootFrameView->layoutViewportScrollableArea()->setScrollPosition(mainFrameOrigin, ProgrammaticScroll);
// Set scale before location, since location can be clamped on setting scale.
m_pinchViewport->setScale(newPageScaleFactor);
@@ -169,7 +169,7 @@ void RotationViewportAnchor::restoreToAnchor()
void RotationViewportAnchor::computeOrigins(const FloatSize& innerSize, IntPoint& mainFrameOffset, FloatPoint& pinchViewportOffset) const
{
- IntSize outerSize = m_rootFrameView->visibleContentRect().size();
+ IntSize outerSize = m_rootFrameView->layoutViewportScrollableArea()->visibleContentRect().size();
// Compute the viewport origins in CSS pixels relative to the document.
FloatSize absPinchViewportOffset = m_normalizedPinchViewportOffset;
@@ -183,7 +183,7 @@ void RotationViewportAnchor::computeOrigins(const FloatSize& innerSize, IntPoint
moveToEncloseRect(outerRect, innerRect);
- outerRect.setLocation(m_rootFrameView->clampScrollPosition(outerRect.location()));
+ outerRect.setLocation(m_rootFrameView->layoutViewportScrollableArea()->clampScrollPosition(outerRect.location()));
moveIntoRect(innerRect, outerRect);
« no previous file with comments | « no previous file | Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698