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

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

Issue 2807123002: Fix the wrong non-element node handling in EventHanlder and MouseEventManager (Closed)
Patch Set: Addressed 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/EventHandlingUtil.cpp
diff --git a/third_party/WebKit/Source/core/input/EventHandlingUtil.cpp b/third_party/WebKit/Source/core/input/EventHandlingUtil.cpp
index 8ce9d0cac29983c8d1b672e86243e670d4b616e1..0872c3ac80eb61dceed1e067cf3500d9f46606ca 100644
--- a/third_party/WebKit/Source/core/input/EventHandlingUtil.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandlingUtil.cpp
@@ -92,6 +92,14 @@ ScrollableArea* AssociatedScrollableArea(const PaintLayer* layer) {
return nullptr;
}
+Element* ParentElementIfNeeded(Node* node) {
+ if (!node)
+ return nullptr;
+ if (node->IsElementNode())
+ return ToElement(node);
+ return FlatTreeTraversal::ParentElement(*node);
+}
+
ContainerNode* ParentForClickEvent(const Node& node) {
// IE doesn't dispatch click events for mousedown/mouseup events across form
// controls.

Powered by Google App Engine
This is Rietveld 408576698