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

Unified Diff: Source/core/page/EventHandler.cpp

Issue 33353003: Have Frame::tree() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 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 | « Source/core/page/CreateWindow.cpp ('k') | Source/core/page/FocusController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index 5b875ba1219d25c240b878511b4b65adb65f296d..0d696bf5228e63e9998ee608b42d44df0a976251 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -974,7 +974,7 @@ bool EventHandler::scrollRecursively(ScrollDirection direction, ScrollGranularit
FrameView* view = frame->view();
if (view && view->scroll(direction, granularity))
return true;
- frame = frame->tree()->parent();
+ frame = frame->tree().parent();
if (!frame)
return false;
return frame->eventHandler()->scrollRecursively(direction, granularity, m_frame->ownerElement());
@@ -997,7 +997,7 @@ bool EventHandler::logicalScrollRecursively(ScrollLogicalDirection direction, Sc
if (scrolled)
return true;
- frame = frame->tree()->parent();
+ frame = frame->tree().parent();
if (!frame)
return false;
@@ -1307,7 +1307,7 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)
return true;
UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
- m_frame->tree()->top()->eventHandler()->m_lastMouseDownUserGestureToken = gestureIndicator.currentToken();
+ m_frame->tree().top()->eventHandler()->m_lastMouseDownUserGestureToken = gestureIndicator.currentToken();
cancelFakeMouseMoveEvent();
if (m_eventHandlerWillResetCapturingMouseEventsNode)
@@ -1568,7 +1568,7 @@ bool EventHandler::handleMouseMoveOrLeaveEvent(const PlatformMouseEvent& mouseEv
RefPtr<Frame> newSubframe = m_capturingMouseEventsNode.get() ? subframeForTargetNode(m_capturingMouseEventsNode.get()) : subframeForHitTestResult(mev);
// We want mouseouts to happen first, from the inside out. First send a move event to the last subframe so that it will fire mouseouts.
- if (m_lastMouseMoveEventSubframe && m_lastMouseMoveEventSubframe->tree()->isDescendantOf(m_frame) && m_lastMouseMoveEventSubframe != newSubframe)
+ if (m_lastMouseMoveEventSubframe && m_lastMouseMoveEventSubframe->tree().isDescendantOf(m_frame) && m_lastMouseMoveEventSubframe != newSubframe)
passMouseMoveEventToSubframe(mev, m_lastMouseMoveEventSubframe.get());
if (newSubframe) {
@@ -1645,8 +1645,8 @@ bool EventHandler::handleMouseReleaseEvent(const PlatformMouseEvent& mouseEvent)
OwnPtr<UserGestureIndicator> gestureIndicator;
- if (m_frame->tree()->top()->eventHandler()->m_lastMouseDownUserGestureToken)
- gestureIndicator = adoptPtr(new UserGestureIndicator(m_frame->tree()->top()->eventHandler()->m_lastMouseDownUserGestureToken.release()));
+ if (m_frame->tree().top()->eventHandler()->m_lastMouseDownUserGestureToken)
+ gestureIndicator = adoptPtr(new UserGestureIndicator(m_frame->tree().top()->eventHandler()->m_lastMouseDownUserGestureToken.release()));
else
gestureIndicator = adoptPtr(new UserGestureIndicator(DefinitelyProcessingUserGesture));
« no previous file with comments | « Source/core/page/CreateWindow.cpp ('k') | Source/core/page/FocusController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698