Re-implement the event retargeting for shadow DOM.
Created attachment 262003 [details] Implements retargeting of relatedNode
<rdar://problem/22875812>
Comment on attachment 262003 [details] Implements retargeting of relatedNode View in context: https://bugs.webkit.org/attachment.cgi?id=262003&action=review r=me, looks like the best solution for this. It would be nice if we didn't need to do anything this convoluted but I suppose it is unavoidable with the current spec. > Source/WebCore/dom/EventDispatcher.cpp:514 > + if (¤tTreeScope->documentScope() != &targetTreeScope.documentScope()) { > + m_inDifferentTree = true; m_inDifferentDocumentScope might be a more accurate name.
Comment on attachment 262003 [details] Implements retargeting of relatedNode View in context: https://bugs.webkit.org/attachment.cgi?id=262003&action=review >> Source/WebCore/dom/EventDispatcher.cpp:514 >> + m_inDifferentTree = true; > > m_inDifferentDocumentScope might be a more accurate name. This flag is also here below where we detect that one is in the document and the other one isn't. > Source/WebCore/dom/EventDispatcher.cpp:519 > + m_inDifferentTree = true; Here. We still have to do some work to get out of the shadow DOM but we can avoid all subsequent works.
It is not clear what the "tree" is in m_inDifferentTree. It apparently doesn't mean different shadow tree so I thought adding "Document" there would clarify things.
(In reply to comment #5) > It is not clear what the "tree" is in m_inDifferentTree. It apparently > doesn't mean different shadow tree so I thought adding "Document" there > would clarify things. They're not necessarily in two different documents. They could have the same owner document but one inside the document and another outside the document. How about m_hasDifferentTreeRoot?
Created attachment 262018 [details] Patch for landing
Comment on attachment 262018 [details] Patch for landing Clearing flags on attachment: 262018 Committed r190288: <http://trac.webkit.org/changeset/190288>
All reviewed patches have been landed. Closing bug.