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

Unified Diff: third_party/WebKit/Source/core/input/GestureManager.cpp

Issue 2849403002: Use const ref for LocalFrame::LocalFrameRoot and FrameTree::Top (Closed)
Patch Set: Created 3 years, 8 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
Index: third_party/WebKit/Source/core/input/GestureManager.cpp
diff --git a/third_party/WebKit/Source/core/input/GestureManager.cpp b/third_party/WebKit/Source/core/input/GestureManager.cpp
index 131f5d8b890a11e0152421081e9b67e22fa29536..1554c160209746c014aef38a7062dd7aeea547db 100644
--- a/third_party/WebKit/Source/core/input/GestureManager.cpp
+++ b/third_party/WebKit/Source/core/input/GestureManager.cpp
@@ -175,9 +175,9 @@ WebInputEventResult GestureManager::HandleGestureTap(
// FIXME: Use a hit-test cache to avoid unnecessary hit tests.
// http://crbug.com/398920
if (current_hit_test.InnerNode()) {
- LocalFrame* main_frame = frame_->LocalFrameRoot();
- if (main_frame && main_frame->View())
- main_frame->View()->UpdateLifecycleToCompositingCleanPlusScrolling();
+ LocalFrame& main_frame = frame_->LocalFrameRoot();
+ if (main_frame.View())
+ main_frame.View()->UpdateLifecycleToCompositingCleanPlusScrolling();
adjusted_point = frame_view->RootFrameToContents(
FlooredIntPoint(gesture_event.PositionInRootFrame()));
current_hit_test = EventHandlingUtil::HitTestResultInFrame(
@@ -237,9 +237,9 @@ WebInputEventResult GestureManager::HandleGestureTap(
// FIXME: Use a hit-test cache to avoid unnecessary hit tests.
// http://crbug.com/398920
if (current_hit_test.InnerNode()) {
- LocalFrame* main_frame = frame_->LocalFrameRoot();
- if (main_frame && main_frame->View())
- main_frame->View()->UpdateAllLifecyclePhases();
+ LocalFrame& main_frame = frame_->LocalFrameRoot();
+ if (main_frame.View())
+ main_frame.View()->UpdateAllLifecyclePhases();
adjusted_point = frame_view->RootFrameToContents(tapped_position);
current_hit_test = EventHandlingUtil::HitTestResultInFrame(
frame_, adjusted_point, hit_type);

Powered by Google App Engine
This is Rietveld 408576698