WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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
Details
WIP
(7.02 KB, patch)
2012-04-02 00:54 PDT
,
Shinya Kawanaka
no flags
Details
Formatted Diff
Diff
WIP
(7.59 KB, patch)
2012-04-02 03:51 PDT
,
Shinya Kawanaka
no flags
Details
Formatted Diff
Diff
WIP
(10.37 KB, patch)
2012-04-02 04:39 PDT
,
Shinya Kawanaka
no flags
Details
Formatted Diff
Diff
Patch
(12.16 KB, patch)
2012-04-02 05:43 PDT
,
Shinya Kawanaka
no flags
Details
Formatted Diff
Diff
Patch
(12.12 KB, patch)
2012-04-02 05:51 PDT
,
Shinya Kawanaka
no flags
Details
Formatted Diff
Diff
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
Details
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
Details
Patch
(12.25 KB, patch)
2012-04-02 18:46 PDT
,
Shinya Kawanaka
no flags
Details
Formatted Diff
Diff
Patch
(11.84 KB, patch)
2012-04-03 22:30 PDT
,
Shinya Kawanaka
no flags
Details
Formatted Diff
Diff
Patch for landing
(11.67 KB, patch)
2012-04-04 19:06 PDT
,
Shinya Kawanaka
no flags
Details
Formatted Diff
Diff
Show Obsolete
(7)
View All
Add attachment
proposed patch, testcase, etc.
Shinya Kawanaka
Comment 1
2012-04-02 00:54:09 PDT
Created
attachment 135038
[details]
WIP
Gustavo Noronha (kov)
Comment 2
2012-04-02 01:52:11 PDT
Comment on
attachment 135038
[details]
WIP
Attachment 135038
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/12310408
Early Warning System Bot
Comment 3
2012-04-02 02:07:35 PDT
Comment on
attachment 135038
[details]
WIP
Attachment 135038
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/12306590
Build Bot
Comment 4
2012-04-02 02:07:39 PDT
Comment on
attachment 135038
[details]
WIP
Attachment 135038
[details]
did not pass win-ews (win): Output:
http://queues.webkit.org/results/12306588
Early Warning System Bot
Comment 5
2012-04-02 02:12:17 PDT
Comment on
attachment 135038
[details]
WIP
Attachment 135038
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/12307522
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
Comment on
attachment 135038
[details]
WIP
Attachment 135038
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/12313392
Shinya Kawanaka
Comment 8
2012-04-02 03:51:45 PDT
Created
attachment 135060
[details]
WIP
Philippe Normand
Comment 9
2012-04-02 04:06:13 PDT
Comment on
attachment 135060
[details]
WIP
Attachment 135060
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/12309505
Build Bot
Comment 10
2012-04-02 04:27:55 PDT
Comment on
attachment 135060
[details]
WIP
Attachment 135060
[details]
did not pass win-ews (win): Output:
http://queues.webkit.org/results/12307566
Build Bot
Comment 11
2012-04-02 04:31:30 PDT
Comment on
attachment 135060
[details]
WIP
Attachment 135060
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/12309508
Shinya Kawanaka
Comment 12
2012-04-02 04:39:22 PDT
Created
attachment 135064
[details]
WIP
Build Bot
Comment 13
2012-04-02 05:25:43 PDT
Comment on
attachment 135064
[details]
WIP
Attachment 135064
[details]
did not pass win-ews (win): Output:
http://queues.webkit.org/results/12311429
Shinya Kawanaka
Comment 14
2012-04-02 05:43:05 PDT
Created
attachment 135076
[details]
Patch
Shinya Kawanaka
Comment 15
2012-04-02 05:51:50 PDT
Created
attachment 135079
[details]
Patch
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
Created
attachment 135252
[details]
Patch
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
Created
attachment 135515
[details]
Patch
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
Committed
r113276
: <
http://trac.webkit.org/changeset/113276
>
Kristóf Kosztyó
Comment 28
2012-04-05 01:59:47 PDT
Committed
r113302
: <
http://trac.webkit.org/changeset/113302
>
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.
Top of Page
Format For Printing
XML
Clone This Bug