http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#shadow-element
Created attachment 177972 [details] Patch
Comment on attachment 177972 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=177972&action=review > Source/WebCore/html/shadow/HTMLShadowElement.cpp:98 > + TreeScope* scope = treeScope(); We have to check distribution is finished here.
Created attachment 178145 [details] Patch
Comment on attachment 178145 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=178145&action=review > Source/WebCore/html/shadow/HTMLShadowElement.cpp:101 > + document()->updateLayout(); Whoa. I am curious why have to do something so drastic here.
(In reply to comment #4) > (From update of attachment 178145 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=178145&action=review > > > Source/WebCore/html/shadow/HTMLShadowElement.cpp:101 > > + document()->updateLayout(); > > Whoa. I am curious why have to do something so drastic here. When <shadow> is in a nested ShadowRoot, we have to ensure distribution of the parent TreeScope recursively... Actually I've just followed HTMLContentElement::getDistributedNodes() though, because I know the above condition. assignedTo() might be calculated by a partial distribution, but I'm not sure yet.
Ah, if <shadow> is not in document tree, distribution won't happen by this code... I think getDistributedNodes() has the same bug. I'll confirm and fix it.
Anyway, we have to fix https://bugs.webkit.org/show_bug.cgi?id=104346 first. This prevents us from fixing this issue.
Created attachment 178959 [details] Patch
This patch can be applied after Bug 104346 is resolved.
Created attachment 178977 [details] Patch
Comment on attachment 178977 [details] Patch Clearing flags on attachment: 178977 Committed r137429: <http://trac.webkit.org/changeset/137429>
All reviewed patches have been landed. Closing bug.
*** Bug 105269 has been marked as a duplicate of this bug. ***