RESOLVED FIXED 149591
relatedNode should be retargeted respecting slots
https://bugs.webkit.org/show_bug.cgi?id=149591
Summary relatedNode should be retargeted respecting slots
Ryosuke Niwa
Reported 2015-09-27 22:22:52 PDT
Re-implement the event retargeting for shadow DOM.
Attachments
Implements retargeting of relatedNode (35.14 KB, patch)
2015-09-28 00:29 PDT, Ryosuke Niwa
no flags
Patch for landing (35.15 KB, patch)
2015-09-28 14:17 PDT, Ryosuke Niwa
no flags
Ryosuke Niwa
Comment 1 2015-09-28 00:29:41 PDT
Created attachment 262003 [details] Implements retargeting of relatedNode
Radar WebKit Bug Importer
Comment 2 2015-09-28 00:31:49 PDT
Antti Koivisto
Comment 3 2015-09-28 11:10:46 PDT
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 (&currentTreeScope->documentScope() != &targetTreeScope.documentScope()) { > + m_inDifferentTree = true; m_inDifferentDocumentScope might be a more accurate name.
Ryosuke Niwa
Comment 4 2015-09-28 11:13:32 PDT
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.
Antti Koivisto
Comment 5 2015-09-28 12:02:43 PDT
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.
Ryosuke Niwa
Comment 6 2015-09-28 13:05:49 PDT
(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?
Ryosuke Niwa
Comment 7 2015-09-28 14:17:31 PDT
Created attachment 262018 [details] Patch for landing
WebKit Commit Bot
Comment 8 2015-09-28 15:11:33 PDT
Comment on attachment 262018 [details] Patch for landing Clearing flags on attachment: 262018 Committed r190288: <http://trac.webkit.org/changeset/190288>
WebKit Commit Bot
Comment 9 2015-09-28 15:11:37 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.