This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24627 - [Shadow]: Support disconnected nodes
Summary: [Shadow]: Support disconnected nodes
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Hayato Ito
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 15480
  Show dependency treegraph
 
Reported: 2014-02-12 01:05 UTC by Hayato Ito
Modified: 2014-02-12 04:20 UTC (History)
7 users (show)

See Also:


Attachments

Description Hayato Ito 2014-02-12 01:05:23 UTC
The relevant background is:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24421
Comment 1 Hayato Ito 2014-02-12 01:21:40 UTC
At first, we should decide whether we should calculate distribution or not in disconnected nodes.

From the comments in https://www.w3.org/Bugs/Public/show_bug.cgi?id=24421, there are opinions we should calculate distribution because event.path depends on that.
That sounds reasonable.

On the other hand, I've never heard any use cases of distribution for disconnected nodes so far. Note that, although styles and distributions are completely different concepts, we don't calculate styles for disconnected nodes.

From the perspective of completeness of the specification, I think we should calculate distribution even in disconnected nodes. However, I am not sure this is hight priority tasks or not, given that no one depends on this behavior so far. Please correct me if this is wrong.

I don't have strong opinion either. Please leave comments so that we can raise the priority of this issue.
Comment 2 Boris Zbarsky 2014-02-12 02:37:52 UTC
> we don't calculate styles for disconnected nodes

That's not necessarily true.  Web pages can ask for the computed style of such nodes.

But again, this is irrelevant given that web components can expose APIs that depend on the shadow DOM being set up correctly.  So whether you in fact set it up seems quite observable to me. You can, of course, do it lazily just like you compute styles lazily in this situation.

> I am not sure this is hight priority tasks or not

It's really surprising to me that this wasn't done already....
Comment 3 Hayato Ito 2014-02-12 03:18:37 UTC
(In reply to Boris Zbarsky from comment #2)
> > we don't calculate styles for disconnected nodes
> 
> That's not necessarily true.  Web pages can ask for the computed style of
> such nodes.

Looks like this is yet another *broken* feature in WebKit and Blink for disconnected elements. From the perspective of spec, styles should be computed on getComputedStyle() and so on.
Comment 4 Hayato Ito 2014-02-12 03:27:03 UTC
I am now positive to support disconnected elements in the Shadow DOM spec.
Let me work on this. I have to update several parts carefully.
Comment 5 Hayato Ito 2014-02-12 04:20:30 UTC
I've updated the spec:

https://github.com/w3c/webcomponents/commit/bc9e62c9e6c13229f6944f4c798f603ad98b7697

Thanks to the concept of trees of trees, updating the spec is not so hard than I expected.