Index: third_party/WebKit/Source/core/frame/LocalFrame.cpp |
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp |
index 80e692a96d2c29a743fcd76d8e388a8890f506ce..085943698c4a8b5d7421fb71c4f335562a6ac6c6 100644 |
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp |
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp |
@@ -755,50 +755,6 @@ void LocalFrame::removeSpellingMarkersUnderWords(const Vector<String>& words) |
spellChecker().removeSpellingMarkersUnderWords(words); |
} |
-ScrollResult LocalFrame::applyScrollDelta(ScrollGranularity granularity, const FloatSize& delta, bool isScrollBegin) |
-{ |
- if (isScrollBegin) |
- host()->topControls().scrollBegin(); |
- |
- if (!view() || delta.isZero()) |
- return ScrollResult(false, false, delta.width(), delta.height()); |
- |
- FloatSize remainingDelta = delta; |
- |
- // If this is main frame, allow top controls to scroll first. |
- if (shouldScrollTopControls(granularity, delta)) |
- remainingDelta = host()->topControls().scrollBy(remainingDelta); |
- |
- if (remainingDelta.isZero()) |
- return ScrollResult(delta.width(), delta.height(), 0.0f, 0.0f); |
- |
- ScrollResult result = view()->getScrollableArea()->userScroll(granularity, remainingDelta); |
- result.didScrollX = result.didScrollX || (remainingDelta.width() != delta.width()); |
- result.didScrollY = result.didScrollY || (remainingDelta.height() != delta.height()); |
- |
- return result; |
-} |
- |
-bool LocalFrame::shouldScrollTopControls(ScrollGranularity granularity, const FloatSize& delta) const |
-{ |
- if (!isMainFrame()) |
- return false; |
- |
- if (granularity != ScrollByPixel && granularity != ScrollByPrecisePixel) |
- return false; |
- |
- // Always give the delta to the top controls if the scroll is in |
- // the direction to show the top controls. If it's in the |
- // direction to hide the top controls, only give the delta to the |
- // top controls when the frame can scroll. |
- DoublePoint maximumScrollPosition = |
- host()->visualViewport().maximumScrollPositionDouble() + |
- toDoubleSize(view()->maximumScrollPositionDouble()); |
- DoublePoint scrollPosition = host()->visualViewport() |
- .visibleRectInDocument().location(); |
- return delta.height() < 0 || scrollPosition.y() < maximumScrollPosition.y(); |
-} |
- |
String LocalFrame::localLayerTreeAsText(unsigned flags) const |
{ |
if (!contentLayoutObject()) |