Index: Source/core/page/EventHandler.cpp |
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp |
index 46e48ac448b53e0de8c14b10db360fc897fd2c5e..572ba648a6c9666bea623136e1f8455515c40698 100644 |
--- a/Source/core/page/EventHandler.cpp |
+++ b/Source/core/page/EventHandler.cpp |
@@ -475,6 +475,17 @@ static int textDistance(const Position& start, const Position& end) |
return TextIterator::rangeLength(range.get(), true); |
} |
+static bool isInteractiveNode(Node* node) |
+{ |
+ if (!node) |
+ return false; |
+ // Editable nodes are always interactive. |
+ if (node->rendererIsEditable()) |
+ return true; |
+ // TODO(donnd): check for other indications of interactivity, including control elements and ARIA roles. |
+ return false; |
+} |
+ |
bool EventHandler::handleMousePressEventSingleClick(const MouseEventWithHitTestResults& event) |
{ |
TRACE_EVENT0("webkit", "EventHandler::handleMousePressEventSingleClick"); |
@@ -538,8 +549,10 @@ bool EventHandler::handleMousePressEventSingleClick(const MouseEventWithHitTestR |
newSelection = expandSelectionToRespectUserSelectAll(innerNode, VisibleSelection(visiblePos)); |
} |
- bool handled = updateSelectionForMouseDownDispatchingSelectStart(innerNode, newSelection, granularity); |
- return handled; |
+ updateSelectionForMouseDownDispatchingSelectStart(innerNode, newSelection, granularity); |
Rick Byers
2014/05/28 17:36:57
I think this is fine for addressing the original p
donnd
2014/05/31 03:22:55
Done.
|
+ |
+ // If the target node is editable, then it handles the click, either directly or through a handler. |
Rick Byers
2014/05/28 17:36:57
Hmm, it seems wrong / error-prone to have this log
donnd
2014/05/31 03:22:55
For now, we just always return false. That should
|
+ return isInteractiveNode(event.targetNode()); |
} |
static inline bool canMouseDownStartSelect(Node* node) |