Bug 104218 - [Shadow DOM] Implement HTMLShadowElement::olderShadowRoot
Summary: [Shadow DOM] Implement HTMLShadowElement::olderShadowRoot
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Shinya Kawanaka
URL:
Keywords:
: 105269 (view as bug list)
Depends on: 104346
Blocks: 63606
  Show dependency treegraph
 
Reported: 2012-12-05 22:32 PST by Hajime Morrita
Modified: 2012-12-18 18:19 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.09 KB, patch)
2012-12-06 01:46 PST, Hajime Morrita
no flags Details | Formatted Diff | Diff
Patch (7.94 KB, patch)
2012-12-06 20:27 PST, Shinya Kawanaka
no flags Details | Formatted Diff | Diff
Patch (9.59 KB, patch)
2012-12-11 21:29 PST, Shinya Kawanaka
no flags Details | Formatted Diff | Diff
Patch (9.89 KB, patch)
2012-12-11 23:30 PST, Shinya Kawanaka
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Hajime Morrita 2012-12-06 01:46:57 PST
Created attachment 177972 [details]
Patch
Comment 2 Shinya Kawanaka 2012-12-06 18:06:39 PST
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.
Comment 3 Shinya Kawanaka 2012-12-06 20:27:46 PST
Created attachment 178145 [details]
Patch
Comment 4 Dimitri Glazkov (Google) 2012-12-06 20:55:55 PST
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.
Comment 5 Shinya Kawanaka 2012-12-06 22:25:20 PST
(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.
Comment 6 Shinya Kawanaka 2012-12-06 22:37:22 PST
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.
Comment 7 Shinya Kawanaka 2012-12-07 00:13:16 PST
Anyway, we have to fix https://bugs.webkit.org/show_bug.cgi?id=104346 first. This prevents us from fixing this issue.
Comment 8 Shinya Kawanaka 2012-12-11 21:29:58 PST
Created attachment 178959 [details]
Patch
Comment 9 Shinya Kawanaka 2012-12-11 21:30:46 PST
This patch can be applied after Bug 104346 is resolved.
Comment 10 Shinya Kawanaka 2012-12-11 23:30:20 PST
Created attachment 178977 [details]
Patch
Comment 11 WebKit Review Bot 2012-12-12 00:14:10 PST
Comment on attachment 178977 [details]
Patch

Clearing flags on attachment: 178977

Committed r137429: <http://trac.webkit.org/changeset/137429>
Comment 12 WebKit Review Bot 2012-12-12 00:14:14 PST
All reviewed patches have been landed.  Closing bug.
Comment 13 Shinya Kawanaka 2012-12-18 18:19:54 PST
*** Bug 105269 has been marked as a duplicate of this bug. ***