[Bug 16176] New: [Shadow]: What should we do if an event happens on light child which is distributed to a insertion point.

https://www.w3.org/Bugs/Public/show_bug.cgi?id=16176

           Summary: [Shadow]: What should we do if an event happens on
                    light child which is distributed to a insertion point.
           Product: WebAppsWG
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Component Model
        AssignedTo: dglazkov@chromium.org
        ReportedBy: hayato@chromium.org
         QAContact: public-webapps-bugzilla@w3.org
                CC: dglazkov@chromium.org, dominicc@chromium.org,
                    morrita@google.com, rolandsteiner@chromium.org
            Blocks: 14978


Let me explain using the following example.

Case A)

DOM Tree is here:
  <div id='a'>
    <div id='b'>
    </div>
  </div>

An element #a has a ShadowRoot, which has a <content> element as a child.
  <shadow-root>
    <content>

A result of node distribution algorithm is here (it's the same to original DOM
tree except for there is a shadow boundary between #a and #b):
  <div id='a'>
    -- <shadow boundary> --
      <div id='b'>
      </div>
  </div>



Case B)

DOM Tree is here:
  <div id='a'>
    <div id='b'>
    </div>
  </div>

There is no ShadowRoot.



Suppose a user move mouse cursor from '#b' to '#a'.

In Case A)
- 'mouseout' event should happen only at '#b' and stop here since there is a
shadow boundary between '#a' and '#b'. Mouse cursor moves within a shadowHost
'#a', so a shadowHost '#a' should not receive any mouseout events.

In Case B)
- 'mouseout' event should bubble up usually. An 'mouseout' event
(currentTarget='#a', target='#b') happens also at '#a' as well as at '#b'.


I am afraid that users might be upset in case A) because it behaves differently
than normal DOM tree.

I've found this issue when I was implementing new event dispatching logic in
WebKit and apply a new event dispatching logic to <details> and <summary>:

 <details>
   <summary>summary<summary>
   details
  </details>


If mouse moves form <summary> to <details>, 'mouseout' event should happen at
<summary> and <details> (at BUBBLE).
But WebKit uses ShadowRoot internally, 'mouseout' event does not happen at
<details> if I apply the new event dispatching algorithm.

I'd like to treat these cases uniformly.

Which should I fix? I think this is worth discussing because we might want to
modify the spec.
Is there any ideas?

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 1 March 2012 12:54:07 UTC