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

Unified Diff: sky/engine/web/WebViewImpl.cpp

Issue 678193005: 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/web/WebViewImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/web/WebViewImpl.cpp
diff --git a/sky/engine/web/WebViewImpl.cpp b/sky/engine/web/WebViewImpl.cpp
index f1eb3427c8f21ed7a2fa86cf1273a71efb67f765..1dbcb64035181a7d5928c00d4404eead32ef8766 100644
--- a/sky/engine/web/WebViewImpl.cpp
+++ b/sky/engine/web/WebViewImpl.cpp
@@ -619,13 +619,10 @@ WebRect WebViewImpl::widenRectWithinPageBounds(const WebRect& source, int target
WebSize maxSize;
if (mainFrame())
maxSize = mainFrame()->contentsSize();
- IntSize scrollOffset;
- if (mainFrame())
- scrollOffset = mainFrame()->scrollOffset();
int leftMargin = targetMargin;
int rightMargin = targetMargin;
- const int absoluteSourceX = source.x + scrollOffset.width();
+ const int absoluteSourceX = source.x;
if (leftMargin > absoluteSourceX) {
leftMargin = absoluteSourceX;
rightMargin = std::max(leftMargin, minimumMargin);
@@ -641,7 +638,7 @@ WebRect WebViewImpl::widenRectWithinPageBounds(const WebRect& source, int target
const int newX = source.x - leftMargin;
ASSERT(newWidth >= 0);
- ASSERT(scrollOffset.width() + newX + newWidth <= maxSize.width);
+ ASSERT(newX + newWidth <= maxSize.width);
return WebRect(newX, source.y, newWidth, source.height);
}
@@ -2333,19 +2330,6 @@ void WebViewImpl::updateMainFrameScrollPosition(const IntPoint& scrollPosition,
// FIXME(sky): Remove
}
-void WebViewImpl::applyScrollAndScale(const WebSize& scrollDelta, float pageScaleDelta)
-{
- if (!mainFrameImpl() || !mainFrameImpl()->frameView())
- return;
-
- // TODO(bokan): Old pinch path only - virtual viewport pinch scrolls are automatically updated via GraphicsLayer::DidScroll.
- // this should be removed once old pinch is removed.
- TRACE_EVENT_INSTANT2("blink", "WebViewImpl::applyScrollAndScale::scrollBy", "x", scrollDelta.width, "y", scrollDelta.height);
- WebSize webScrollOffset = mainFrame()->scrollOffset();
- IntPoint scrollOffset(webScrollOffset.width + scrollDelta.width, webScrollOffset.height + scrollDelta.height);
- updateMainFrameScrollPosition(scrollOffset, false);
-}
-
void WebViewImpl::updateLayerTreeBackgroundColor()
{
if (!m_layerTreeView)
« no previous file with comments | « sky/engine/web/WebViewImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698