Bug 86999 - When a text node is clicked, event's target should be adjusted by using composed shadow tree.
: When a text node is clicked, event's target should be adjusted by using compo...
Status: RESOLVED FIXED
: WebKit
HTML DOM
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To:
:
:
: 87072
: 59805
  Show dependency treegraph
 
Reported: 2012-05-21 02:19 PST by
Modified: 2012-06-18 15:59 PST (History)


Attachments
use composed shadow tree (5.81 KB, patch)
2012-05-23 00:27 PST, Hayato Ito
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2012-05-21 02:19:35 PST
Suppose the following tree:

<div id='host'>
  - <shadow root>
      - <content>
  - <text node A> 


When <text node A> is clicked,  click event's target becomes #host. But that should be 'shadow root'. 
The reason is that the text node is distributed and the nearest parentNode of the text node is 'shadow root' in composed shadow DOM tree.
------- Comment #1 From 2012-05-23 00:27:54 PST -------
Created an attachment (id=143485) [details]
use composed shadow tree
------- Comment #2 From 2012-05-23 09:00:52 PST -------
(From update of attachment 143485 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=143485&action=review

> LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching.html:193
> +function prepareDOMTree6(parent)

you really should consider naming these methods to describe the nature of the test.
------- Comment #3 From 2012-05-23 18:24:36 PST -------
Thank you for the review.

(In reply to comment #2)
> (From update of attachment 143485 [details] [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=143485&action=review
> 
> > LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching.html:193
> > +function prepareDOMTree6(parent)
> 
> you really should consider naming these methods to describe the nature of the test.

Yeah, let me name these functions to good ones in another patch.
------- Comment #4 From 2012-05-23 18:47:08 PST -------
(From update of attachment 143485 [details])
Clearing flags on attachment: 143485

Committed r118299: <http://trac.webkit.org/changeset/118299>
------- Comment #5 From 2012-05-23 18:47:20 PST -------
All reviewed patches have been landed.  Closing bug.