Index: third_party/WebKit/Source/core/input/EventHandler.cpp |
diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp |
index 2d6734fe3e55de31552918063107734b5633b74f..4d09e2db4f1f991626057e2b4a386f0e34fae25b 100644 |
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp |
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp |
@@ -1463,12 +1463,14 @@ WebInputEventResult EventHandler::handleMouseReleaseEvent(const PlatformMouseEve |
&& mev.innerNode()->canParticipateInFlatTree() && m_clickNode->canParticipateInFlatTree() |
&& !(selectionController().hasExtendedSelection() && isLinkSelection(mev)); |
if (shouldDispatchClickEvent) { |
- // Updates distribution because a 'mouseup' event listener can make the |
- // tree dirty at dispatchMouseEvent() invocation above. |
- // Unless distribution is updated, commonAncestor would hit ASSERT. |
- // Both m_clickNode and mev.innerNode() don't need to be updated |
- // because commonAncestor() will exit early if their documents are different. |
- m_clickNode->updateDistribution(); |
+ if (m_clickNode != mev.innerNode() |
dtapuska
2016/04/21 16:08:27
This isn't the same code as before..
What happens
|
+ && m_clickNode->document() == mev.innerNode()->document()) { |
+ // Updates distribution because a 'mouseup' event listener can make the |
+ // tree dirty at dispatchMouseEvent() invocation above. |
+ // Unless distribution is updated, commonAncestor would hit ASSERT. |
+ m_clickNode->updateDistribution(); |
+ mev.innerNode()->updateDistribution(); |
+ } |
if (Node* clickTargetNode = mev.innerNode()->commonAncestor( |
*m_clickNode, parentForClickEvent)) { |