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

Unified Diff: sky/engine/core/page/EventHandler.cpp

Issue 878303002: Remove more scrolling code from Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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/page/EventHandler.h ('k') | sky/engine/core/page/FocusController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/page/EventHandler.cpp
diff --git a/sky/engine/core/page/EventHandler.cpp b/sky/engine/core/page/EventHandler.cpp
index 882f7588d19914c915b21b25f5f8e6563b6dcbed..c61d3bd1bf2b2d88ff5c3badb152989c5c4fc92b 100644
--- a/sky/engine/core/page/EventHandler.cpp
+++ b/sky/engine/core/page/EventHandler.cpp
@@ -48,7 +48,6 @@
#include "sky/engine/core/frame/LocalFrame.h"
#include "sky/engine/core/frame/Settings.h"
#include "sky/engine/core/loader/FrameLoaderClient.h"
-#include "sky/engine/core/page/AutoscrollController.h"
#include "sky/engine/core/page/ChromeClient.h"
#include "sky/engine/core/page/EditorClient.h"
#include "sky/engine/core/page/FocusController.h"
@@ -198,13 +197,6 @@ void EventHandler::selectClosestMisspellingFromHitTestResult(const HitTestResult
}
}
-AutoscrollController* EventHandler::autoscrollController() const
-{
- if (Page* page = m_frame->page())
- return &page->autoscrollController();
- return 0;
-}
-
HitTestResult EventHandler::hitTestResultAtPoint(const LayoutPoint& point, HitTestRequest::HitTestRequestType hitType, const LayoutSize& padding)
{
TRACE_EVENT0("blink", "EventHandler::hitTestResultAtPoint");
@@ -227,54 +219,6 @@ HitTestResult EventHandler::hitTestResultAtPoint(const LayoutPoint& point, HitTe
return result;
}
-void EventHandler::stopAutoscroll()
-{
- if (AutoscrollController* controller = autoscrollController())
- controller->stopAutoscroll();
-}
-
-bool EventHandler::scroll(ScrollDirection direction, ScrollGranularity granularity, Node* startNode, Node** stopNode, float delta, IntPoint absolutePoint)
-{
- if (!delta)
- return false;
-
- Node* node = startNode;
-
- if (!node)
- node = m_frame->document()->focusedElement();
-
- if (!node || !node->renderer())
- return false;
-
- RenderBox* curBox = node->renderer()->enclosingBox();
- while (curBox && !curBox->isRenderView()) {
- // If we're at the stopNode, we should try to scroll it but we shouldn't bubble past it
- bool shouldStopBubbling = stopNode && *stopNode && curBox->node() == *stopNode;
- bool didScroll = curBox->scroll(direction, granularity, delta);
-
- if (didScroll && stopNode)
- *stopNode = curBox->node();
-
- if (didScroll || shouldStopBubbling) {
- return true;
- }
-
- curBox = curBox->containingBlock();
- }
-
- return false;
-}
-
-bool EventHandler::bubblingScroll(ScrollDirection direction, ScrollGranularity granularity, Node* startingNode)
-{
- // The layout needs to be up to date to determine if we can scroll. We may be
- // here because of an onLoad event, in which case the final layout hasn't been performed yet.
- m_frame->document()->updateLayout();
- if (scroll(direction, granularity, startingNode))
- return true;
- return false;
-}
-
bool EventHandler::useHandCursor(Node* node, bool isOverLink)
{
if (!node)
@@ -584,10 +528,6 @@ TouchAction EventHandler::computeEffectiveTouchAction(const Node& node)
if (effectiveTouchAction == TouchActionNone)
break;
}
-
- // If we've reached an ancestor that supports a touch action, search no further.
- if (renderer->isBox() && toRenderBox(renderer)->scrollsOverflow())
- break;
}
}
return effectiveTouchAction;
« no previous file with comments | « sky/engine/core/page/EventHandler.h ('k') | sky/engine/core/page/FocusController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698