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

Unified Diff: sky/engine/core/frame/PinchViewport.cpp

Issue 680703002: Remove more frame-level scrolling machinery. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « sky/engine/core/frame/LocalFrame.cpp ('k') | sky/engine/core/rendering/RenderBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/frame/PinchViewport.cpp
diff --git a/sky/engine/core/frame/PinchViewport.cpp b/sky/engine/core/frame/PinchViewport.cpp
index 9afe13a90319534ca2493dcb07fe6fed1ae5011b..bbf695c598b329c84da920cb53b87fd35fa1c0e6 100644
--- a/sky/engine/core/frame/PinchViewport.cpp
+++ b/sky/engine/core/frame/PinchViewport.cpp
@@ -130,22 +130,7 @@ FloatRect PinchViewport::visibleRectInDocument() const
void PinchViewport::scrollIntoView(const FloatRect& rect)
{
- if (!mainFrame() || !mainFrame()->view())
- return;
-
- FrameView* view = mainFrame()->view();
-
- float centeringOffsetX = (visibleRect().width() - rect.width()) / 2;
- float centeringOffsetY = (visibleRect().height() - rect.height()) / 2;
-
- FloatPoint targetOffset(
- rect.x() - centeringOffsetX - visibleRect().x(),
- rect.y() - centeringOffsetY - visibleRect().y());
-
- view->setScrollPosition(flooredIntPoint(targetOffset));
-
- FloatPoint remainder = FloatPoint(targetOffset - view->scrollPosition());
- move(remainder);
+ // FIXME(sky): Delete this whole file.
}
void PinchViewport::setLocation(const FloatPoint& newLocation)
« no previous file with comments | « sky/engine/core/frame/LocalFrame.cpp ('k') | sky/engine/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698