RESOLVED FIXED 82607
Shadow DOM is exposed in JS
https://bugs.webkit.org/show_bug.cgi?id=82607
Summary Shadow DOM is exposed in JS
Shinya Kawanaka
Reported 2012-03-29 06:17:33 PDT
Created attachment 134560 [details] Repro When getSelection() is called in nested shadow root, shadow dom is exposed in JS level. This issue won't expose the deepest shadow tree, but the other shadow trees could be exposed.
Attachments
Repro (1.37 KB, text/html)
2012-03-29 06:17 PDT, Shinya Kawanaka
no flags
WIP (7.02 KB, patch)
2012-04-02 00:54 PDT, Shinya Kawanaka
no flags
WIP (7.59 KB, patch)
2012-04-02 03:51 PDT, Shinya Kawanaka
no flags
WIP (10.37 KB, patch)
2012-04-02 04:39 PDT, Shinya Kawanaka
no flags
Patch (12.16 KB, patch)
2012-04-02 05:43 PDT, Shinya Kawanaka
no flags
Patch (12.12 KB, patch)
2012-04-02 05:51 PDT, Shinya Kawanaka
no flags
Archive of layout-test-results from ec2-cr-linux-01 (7.40 MB, application/zip)
2012-04-02 07:33 PDT, WebKit Review Bot
no flags
Archive of layout-test-results from ec2-cr-linux-03 (7.25 MB, application/zip)
2012-04-02 08:37 PDT, WebKit Review Bot
no flags
Patch (12.25 KB, patch)
2012-04-02 18:46 PDT, Shinya Kawanaka
no flags
Patch (11.84 KB, patch)
2012-04-03 22:30 PDT, Shinya Kawanaka
no flags
Patch for landing (11.67 KB, patch)
2012-04-04 19:06 PDT, Shinya Kawanaka
no flags
Shinya Kawanaka
Comment 1 2012-04-02 00:54:09 PDT
Gustavo Noronha (kov)
Comment 2 2012-04-02 01:52:11 PDT
Early Warning System Bot
Comment 3 2012-04-02 02:07:35 PDT
Build Bot
Comment 4 2012-04-02 02:07:39 PDT
Early Warning System Bot
Comment 5 2012-04-02 02:12:17 PDT
WebKit Review Bot
Comment 6 2012-04-02 02:22:20 PDT
Comment on attachment 135038 [details] WIP Attachment 135038 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/12309458
Gyuyoung Kim
Comment 7 2012-04-02 02:29:00 PDT
Shinya Kawanaka
Comment 8 2012-04-02 03:51:45 PDT
Philippe Normand
Comment 9 2012-04-02 04:06:13 PDT
Build Bot
Comment 10 2012-04-02 04:27:55 PDT
Build Bot
Comment 11 2012-04-02 04:31:30 PDT
Shinya Kawanaka
Comment 12 2012-04-02 04:39:22 PDT
Build Bot
Comment 13 2012-04-02 05:25:43 PDT
Shinya Kawanaka
Comment 14 2012-04-02 05:43:05 PDT
Shinya Kawanaka
Comment 15 2012-04-02 05:51:50 PDT
WebKit Review Bot
Comment 16 2012-04-02 07:33:31 PDT
Comment on attachment 135079 [details] Patch Attachment 135079 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/12311484 New failing tests: fast/dom/shadow/selection-shouldnt-expose-shadow-dom.html
WebKit Review Bot
Comment 17 2012-04-02 07:33:38 PDT
Created attachment 135096 [details] Archive of layout-test-results from ec2-cr-linux-01 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: ec2-cr-linux-01 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
WebKit Review Bot
Comment 18 2012-04-02 08:37:44 PDT
Comment on attachment 135079 [details] Patch Attachment 135079 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/12313520 New failing tests: fast/dom/shadow/selection-shouldnt-expose-shadow-dom.html
WebKit Review Bot
Comment 19 2012-04-02 08:37:50 PDT
Created attachment 135108 [details] Archive of layout-test-results from ec2-cr-linux-03 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: ec2-cr-linux-03 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Shinya Kawanaka
Comment 20 2012-04-02 18:46:01 PDT
Hajime Morrita
Comment 21 2012-04-02 21:29:44 PDT
Comment on attachment 135252 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=135252&action=review > Source/WebCore/page/DOMSelection.cpp:52 > + if (!node->treeScope()->rootNode()->isShadowRoot()) It looks there is TreeScope::isShadowRoot(). Does it work for this? > Source/WebCore/page/DOMSelection.cpp:56 > + while (shadowAncestor->treeScope()->rootNode()->isShadowRoot()) It looks we can loop over TreeScope instead of Node.
Shinya Kawanaka
Comment 22 2012-04-03 18:21:45 PDT
(In reply to comment #21) > (From update of attachment 135252 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=135252&action=review > > > Source/WebCore/page/DOMSelection.cpp:52 > > + if (!node->treeScope()->rootNode()->isShadowRoot()) > > It looks there is TreeScope::isShadowRoot(). Does it work for this? We've removed the function before. > > > Source/WebCore/page/DOMSelection.cpp:56 > > + while (shadowAncestor->treeScope()->rootNode()->isShadowRoot()) > > It looks we can loop over TreeScope instead of Node.
Hajime Morrita
Comment 23 2012-04-03 19:10:23 PDT
(In reply to comment #22) > (In reply to comment #21) > > (From update of attachment 135252 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=135252&action=review > > > > > Source/WebCore/page/DOMSelection.cpp:52 > > > + if (!node->treeScope()->rootNode()->isShadowRoot()) > > > > It looks there is TreeScope::isShadowRoot(). Does it work for this? > > We've removed the function before. Oh I didn't notice that. So how about Node::isInShadowTree() ? > > > > > > Source/WebCore/page/DOMSelection.cpp:56 > > > + while (shadowAncestor->treeScope()->rootNode()->isShadowRoot()) > > > > It looks we can loop over TreeScope instead of Node.
Shinya Kawanaka
Comment 24 2012-04-03 22:30:02 PDT
Hajime Morrita
Comment 25 2012-04-03 23:12:43 PDT
Comment on attachment 135515 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=135515&action=review > Source/WebCore/page/DOMSelection.cpp:52 > + if (!node->treeScope()->rootNode()->isShadowRoot()) can we use isInSahdowTree() here too?
Shinya Kawanaka
Comment 26 2012-04-04 19:06:55 PDT
Created attachment 135743 [details] Patch for landing
Shinya Kawanaka
Comment 27 2012-04-04 19:28:50 PDT
Kristóf Kosztyó
Comment 28 2012-04-05 01:59:47 PDT
Zoltan Arvai
Comment 29 2012-04-05 02:03:01 PDT
http://trac.webkit.org/changeset/113302(In reply to comment #28) > Committed r113302: <http://trac.webkit.org/changeset/113302> Skipped test on Qt because V8 not yet supported on Qt bots: fast/dom/shadow/selection-shouldnt-expose-shadow-dom.html
Hajime Morrita
Comment 30 2012-04-08 18:22:24 PDT
(In reply to comment #29) > > Skipped test on Qt because V8 not yet supported on Qt bots: > fast/dom/shadow/selection-shouldnt-expose-shadow-dom.html Zoltan, thanks for caring this.
Note You need to log in before you can comment on or make changes to this bug.