Bug 79745

Summary: [ShadowDOM] Replace createDom and createShadow function in LayoutTests/fast/dom/shadow/create-dom.js with more flexible one
Product: WebKit Reporter: Hayato Ito <hayato>
Component: DOMAssignee: Hayato Ito <hayato>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, dominicc, morrita, rolandsteiner, shinyak, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 80449    
Bug Blocks:    
Attachments:
Description Flags
rewrite createDOM none

Description Hayato Ito 2012-02-27 22:45:04 PST
This is a separated, but independent, patch from https://bugs.webkit.org/show_bug.cgi?id=79197.

We need to improve createDom and createShadow function defined in LayoutTests/fast/dom/shadow/create-dom.js because:
  - createShadow is confusing name. It actually creates ShadowHost and ShadowRoot at the same time.
  - createDom should be named createDOM since WebKit doesn't use CamelCase for abbreviation.
  - It might be better that we can create lightChildren and ShadowRoot for an element at the same time in one expression. This is impossible in the current implementation.
Comment 1 Hayato Ito 2012-02-27 22:56:10 PST
Created attachment 129191 [details]
rewrite createDOM
Comment 2 WebKit Review Bot 2012-02-28 22:09:40 PST
Comment on attachment 129191 [details]
rewrite createDOM

Clearing flags on attachment: 129191

Committed r109191: <http://trac.webkit.org/changeset/109191>
Comment 3 WebKit Review Bot 2012-02-28 22:09:44 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Dimitri Glazkov (Google) 2012-03-06 15:44:17 PST
Comment on attachment 129191 [details]
rewrite createDOM

View in context: https://bugs.webkit.org/attachment.cgi?id=129191&action=review

> LayoutTests/fast/dom/shadow/resources/create-dom.js:21
> +              shadowRoot = new internals.ensureShadowRoot(element);

This typo is making the tests fail on platforms that don't have SHADOW_ROOT enabled. Shouldn't have "new".
Comment 5 Hayato Ito 2012-03-06 18:03:03 PST
Ops. My bad. I should have tested this patch on platforms which don't have SHADOW_ROOT enabled.

(In reply to comment #4)
> (From update of attachment 129191 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=129191&action=review
> 
> > LayoutTests/fast/dom/shadow/resources/create-dom.js:21
> > +              shadowRoot = new internals.ensureShadowRoot(element);
> 
> This typo is making the tests fail on platforms that don't have SHADOW_ROOT enabled. Shouldn't have "new".