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

Side by Side Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 2918053002: Move middle-click autoscroll to synthetic fling. (Closed)
Patch Set: Clean up Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * 10 *
(...skipping 2334 matching lines...) Expand 10 before | Expand all | Expand 10 after
2345 !ToLayoutBox(layout_object)->CanBeScrolledAndHasScrollableArea())) { 2345 !ToLayoutBox(layout_object)->CanBeScrolledAndHasScrollableArea())) {
2346 if (layout_object->GetNode() && 2346 if (layout_object->GetNode() &&
2347 layout_object->GetNode()->IsDocumentNode()) { 2347 layout_object->GetNode()->IsDocumentNode()) {
2348 Element* owner = ToDocument(layout_object->GetNode())->LocalOwner(); 2348 Element* owner = ToDocument(layout_object->GetNode())->LocalOwner();
2349 layout_object = owner ? owner->GetLayoutObject() : nullptr; 2349 layout_object = owner ? owner->GetLayoutObject() : nullptr;
2350 } else { 2350 } else {
2351 layout_object = layout_object->Parent(); 2351 layout_object = layout_object->Parent();
2352 } 2352 }
2353 } 2353 }
2354 if (layout_object) { 2354 if (layout_object) {
2355 if (LocalFrame* frame = GetDocument().GetFrame()) 2355 if (LocalFrame* frame = GetDocument().GetFrame()) {
bokan 2017/06/15 17:40:12 Nit: no braces
aelias_OOO_until_Jul13 2017/06/15 22:19:54 Done.
2356 frame->GetEventHandler().StartMiddleClickAutoscroll(layout_object); 2356 frame->GetEventHandler().StartMiddleClickAutoscroll(layout_object);
2357 }
2357 } 2358 }
2358 } 2359 }
2359 } else if (event->type() == EventTypeNames::webkitEditableContentChanged) { 2360 } else if (event->type() == EventTypeNames::webkitEditableContentChanged) {
2360 // TODO(chongz): Remove after shipped. 2361 // TODO(chongz): Remove after shipped.
2361 // New InputEvent are dispatched in Editor::appliedEditing, etc. 2362 // New InputEvent are dispatched in Editor::appliedEditing, etc.
2362 if (!RuntimeEnabledFeatures::InputEventEnabled()) 2363 if (!RuntimeEnabledFeatures::InputEventEnabled())
2363 DispatchInputEvent(); 2364 DispatchInputEvent();
2364 } 2365 }
2365 } 2366 }
2366 2367
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
2658 if (node) { 2659 if (node) {
2659 std::stringstream stream; 2660 std::stringstream stream;
2660 node->PrintNodePathTo(stream); 2661 node->PrintNodePathTo(stream);
2661 LOG(INFO) << stream.str(); 2662 LOG(INFO) << stream.str();
2662 } else { 2663 } else {
2663 LOG(INFO) << "Cannot showNodePath for <null>"; 2664 LOG(INFO) << "Cannot showNodePath for <null>";
2664 } 2665 }
2665 } 2666 }
2666 2667
2667 #endif 2668 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698