Bug 82429 - ShadowRoot should have selection attribute.
Summary: ShadowRoot should have selection attribute.
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:
Depends on: 82607
Blocks: 82697 82683 82698
  Show dependency treegraph
 
Reported: 2012-03-27 23:56 PDT by Shinya Kawanaka
Modified: 2012-04-09 20:05 PDT (History)
7 users (show)

See Also:


Attachments
Patch (6.86 KB, patch)
2012-03-30 00:55 PDT, Shinya Kawanaka
no flags Details | Formatted Diff | Diff
Patch (7.02 KB, patch)
2012-04-09 01:03 PDT, 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.
Description Shinya Kawanaka 2012-03-27 23:56:11 PDT
ShadowRoot currently does not have selection attribute. 

Spec is here.
https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#api-shadow-root-selection
Comment 1 Shinya Kawanaka 2012-03-29 06:24:28 PDT
Since we don't want to maintain multiple Selection objects, it would be good if we have a proxy object which implements Selection interface to return elements in shadow subtrees.
Comment 2 Shinya Kawanaka 2012-03-29 23:45:38 PDT
Let us just add a selection attribute for ShadowDOM. It's OK to return the same thing in window for now.
Comment 3 Shinya Kawanaka 2012-03-30 00:55:12 PDT
Created attachment 134741 [details]
Patch
Comment 4 Hajime Morrita 2012-04-02 21:47:57 PDT
Could you elaborate whole plan to have valid SadowRoot.selection?
Starting from just adding attribute is fine but we need a big picture to justify it.
Comment 5 Shinya Kawanaka 2012-04-09 00:51:07 PDT
Sorry for late response...

I'm panning to fix in the following way.
(1) Appending ShadowRoot.selection
(2) Extending DOMSelection to have TreeScope. Each TreeScope will have its own DOMSelection as a cache. This will be tracked in Bug 82698.
Comment 6 Shinya Kawanaka 2012-04-09 00:51:40 PDT
I'll update the ChangeLog to have the above explanation...
Comment 7 Shinya Kawanaka 2012-04-09 01:03:56 PDT
Created attachment 136196 [details]
Patch
Comment 8 WebKit Review Bot 2012-04-09 20:05:43 PDT
Comment on attachment 136196 [details]
Patch

Clearing flags on attachment: 136196

Committed r113667: <http://trac.webkit.org/changeset/113667>
Comment 9 WebKit Review Bot 2012-04-09 20:05:48 PDT
All reviewed patches have been landed.  Closing bug.