Bug 79551 - <content> element should behave as HTMLUnknownElement outside of a shadow DOM subtree
Summary: <content> element should behave as HTMLUnknownElement outside of a shadow DOM...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Hajime Morrita
URL: http://dglazkov.github.com/Web-Compon...
Keywords:
Depends on:
Blocks: 76434
  Show dependency treegraph
 
Reported: 2012-02-24 19:04 PST by Dimitri Glazkov (Google)
Modified: 2012-02-28 18:00 PST (History)
2 users (show)

See Also:


Attachments
Patch (14.97 KB, patch)
2012-02-27 19:28 PST, Hajime Morrita
no flags Details | Formatted Diff | Diff
Patch (14.96 KB, patch)
2012-02-27 23:55 PST, Hajime Morrita
no flags Details | Formatted Diff | Diff
Catching up ToT (14.37 KB, patch)
2012-02-28 00:27 PST, Hajime Morrita
dglazkov: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitri Glazkov (Google) 2012-02-24 19:04:01 PST
This is specified here: http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#lower-boundary-encapsulation

The key is that if the element is inactive, it should act as any HTML element: be stylable and show its contents.

A good example of why this is good is http://dglazkov.github.com/Web-Components-Polyfill/news.html, which is a component definition (used here: http://dglazkov.github.com/Web-Components-Polyfill/).

I added a special debug.css, which helps understand the structure of the component. If <content> were visible, I could style it and put "CONTENTS GO HERE" label with a selector or something.

That's instant debugging for a component developer :)
Comment 1 Hajime Morrita 2012-02-26 22:00:49 PST
Looks like this came from http://crbug.com/114667
Comment 2 Hajime Morrita 2012-02-27 19:28:55 PST
Created attachment 129169 [details]
Patch
Comment 3 Hajime Morrita 2012-02-27 23:55:48 PST
Created attachment 129200 [details]
Patch
Comment 4 Hajime Morrita 2012-02-28 00:27:50 PST
Created attachment 129207 [details]
Catching up ToT
Comment 5 Dimitri Glazkov (Google) 2012-02-28 08:57:13 PST
Comment on attachment 129207 [details]
Catching up ToT

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

> Source/WebCore/dom/ShadowRoot.h:104
> +// Put this TreeScope method here to inline it.

Is it really so hot that we need to do this?

> Source/WebCore/dom/ShadowRoot.h:105
> +

Probably don't need this extra blank linke.
Comment 6 Hajime Morrita 2012-02-28 16:36:08 PST
Comment on attachment 129207 [details]
Catching up ToT

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

Hi Dimitri, thanks for the review! I'll land this after fixing your point.

>> Source/WebCore/dom/ShadowRoot.h:104
>> +// Put this TreeScope method here to inline it.
> 
> Is it really so hot that we need to do this?

Since this is in every attach path, I want to minimize the impact.

>> Source/WebCore/dom/ShadowRoot.h:105
>> +
> 
> Probably don't need this extra blank linke.

Sure.
Comment 7 Hajime Morrita 2012-02-28 18:00:21 PST
Committed r109179: <http://trac.webkit.org/changeset/109179>