WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
89172
[Shadow] parentTreeScope() of nested shadow DOM subtree returns document().
https://bugs.webkit.org/show_bug.cgi?id=89172
Summary
[Shadow] parentTreeScope() of nested shadow DOM subtree returns document().
Takashi Sakamoto
Reported
2012-06-14 22:51:26 PDT
<body> <div id="test"> </div> <script> var div = document.getElementById("test"); var shadow1 = new WebKitShadowRoot(div); shadow1.innerHTML = "<div id='E'></div>"; var e = shadow1.getElementById("E"); var shadow2 = new WebKitShadowRoot(e); shadow2.innerHTML = "<div id='F'></div>"; var f = shadow2.getElementById("F"); var shadow3 = new WebKitShadowRoot(f); shadow3.innerHTML = "<div id='G'></div>"; </script> </body> The shadow1, shadow2, and shadow3's parentTreeScope() are the same as document(). If creating the same DOM tree by using the following script, parentTreeScope() returns correct parent tree scope. <script> var f = document.createElement("div"); var shadow3 = new WebKitShadowRoot(f); shadow3.innerHTML = "<div id='G'></div>"; var e = document.createElement("div"); var shadow2 = new WebKitShadowRoot(e); shadow2.appendChild(f); var test = document.getElementById("test"); var shadow1 = new WebKitShadowRoot(test); shadow1.appendChild(e); </script>
Attachments
Patch
(8.49 KB, patch)
2012-06-15 01:05 PDT
,
Takashi Sakamoto
no flags
Details
Formatted Diff
Diff
Patch
(8.40 KB, patch)
2012-06-21 20:36 PDT
,
Takashi Sakamoto
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Takashi Sakamoto
Comment 1
2012-06-15 01:05:55 PDT
Created
attachment 147770
[details]
Patch
Shinya Kawanaka
Comment 2
2012-06-20 14:09:47 PDT
Looks sane for me, wait for the reviewers' comment!
Hajime Morrita
Comment 3
2012-06-20 19:14:42 PDT
Comment on
attachment 147770
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=147770&action=review
> Source/WebCore/testing/Internals.cpp:208 > +Node* Internals::parentTreeScopeRootNode(Node* node, ExceptionCode& ec)
Why not just pass a TreeScope and make this parentScope() or something? I hope Internals APIs be a set of thin wrappers of private DOM API to make them orthogonal.
Shinya Kawanaka
Comment 4
2012-06-21 17:32:19 PDT
Comment on
attachment 147770
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=147770&action=review
>> Source/WebCore/testing/Internals.cpp:208 >> +Node* Internals::parentTreeScopeRootNode(Node* node, ExceptionCode& ec) > > Why not just pass a TreeScope and make this parentScope() or something? > I hope Internals APIs be a set of thin wrappers of private DOM API to make them orthogonal.
Is TreeScope available from JS...?
Takashi Sakamoto
Comment 5
2012-06-21 20:36:06 PDT
Created
attachment 148952
[details]
Patch
WebKit Review Bot
Comment 6
2012-06-22 09:01:03 PDT
Comment on
attachment 148952
[details]
Patch Clearing flags on attachment: 148952 Committed
r121027
: <
http://trac.webkit.org/changeset/121027
>
WebKit Review Bot
Comment 7
2012-06-22 09:01:08 PDT
All reviewed patches have been landed. Closing bug.
Sudarsana Nagineni (babu)
Comment 8
2012-07-13 05:21:59 PDT
***
Bug 89694
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug