Bug 86999 - When a text node is clicked, event's target should be adjusted by using composed shadow tree.
Summary: When a text node is clicked, event's target should be adjusted by using compo...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Hayato Ito
URL:
Keywords:
Depends on: 87072
Blocks: 59805
  Show dependency treegraph
 
Reported: 2012-05-21 02:19 PDT by Hayato Ito
Modified: 2012-06-18 15:59 PDT (History)
6 users (show)

See Also:


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

Note You need to log in before you can comment on or make changes to this bug.
Description Hayato Ito 2012-05-21 02:19:35 PDT
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 Hayato Ito 2012-05-23 00:27:54 PDT
Created attachment 143485 [details]
use composed shadow tree
Comment 2 Dimitri Glazkov (Google) 2012-05-23 09:00:52 PDT
Comment on attachment 143485 [details]
use composed shadow tree

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 Hayato Ito 2012-05-23 18:24:36 PDT
Thank you for the review.

(In reply to comment #2)
> (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.

Yeah, let me name these functions to good ones in another patch.
Comment 4 WebKit Review Bot 2012-05-23 18:47:08 PDT
Comment on attachment 143485 [details]
use composed shadow tree

Clearing flags on attachment: 143485

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