Bug 82429

Summary: ShadowRoot should have selection attribute.
Product: WebKit Reporter: Shinya Kawanaka <shinyak>
Component: DOMAssignee: Shinya Kawanaka <shinyak>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dglazkov, dominicc, hayato, morrita, ojan, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 82607    
Bug Blocks: 82697, 82683, 82698    
Attachments:
Description Flags
Patch
none
Patch none

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.