Index: Source/WebCore/page/EventHandler.cpp |
=================================================================== |
--- Source/WebCore/page/EventHandler.cpp (revision 122864) |
+++ Source/WebCore/page/EventHandler.cpp (working copy) |
@@ -1880,8 +1880,13 @@ |
bool swallowMouseUpEvent = dispatchMouseEvent(eventNames().mouseupEvent, targetNode(mev), true, m_clickCount, mouseEvent, false); |
- bool swallowClickEvent = m_clickCount > 0 && mouseEvent.button() != RightButton && targetNode(mev) == m_clickNode && dispatchMouseEvent(eventNames().clickEvent, targetNode(mev), true, m_clickCount, mouseEvent, true); |
+ Node* clickTarget = targetNode(mev); |
+ if (clickTarget) |
+ clickTarget = clickTarget->shadowAncestorNode(); |
+ Node* adjustedClickNode = m_clickNode ? m_clickNode->shadowAncestorNode() : 0; |
+ bool swallowClickEvent = m_clickCount > 0 && mouseEvent.button() != RightButton && clickTarget == adjustedClickNode && dispatchMouseEvent(eventNames().clickEvent, targetNode(mev), true, m_clickCount, mouseEvent, true); |
+ |
if (m_resizeLayer) { |
m_resizeLayer->setInResizeMode(false); |
m_resizeLayer = 0; |