Bug 20172 - [XBL] XBL elements should not be rendered
Summary: [XBL] XBL elements should not be rendered
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-25 12:41 PDT by Julien Chaffraix
Modified: 2008-07-26 13:07 PDT (History)
0 users

See Also:


Attachments
Proposed fix: create the render but remove the root from the hierarchy (3.01 KB, patch)
2008-07-25 12:51 PDT, Julien Chaffraix
hyatt: review-
Details | Formatted Diff | Diff
Updated version: using html4.css (4.59 KB, patch)
2008-07-25 15:27 PDT, Julien Chaffraix
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Chaffraix 2008-07-25 12:41:55 PDT
Currently XBL elements are shown on the screen and they should not.
Comment 1 Dave Hyatt 2008-07-25 12:50:24 PDT
You can just add style rules for xbl to html4.css.  Should only take two...

xbl|* { display: none }
xbl|div { display: block }

Comment 2 Julien Chaffraix 2008-07-25 12:51:54 PDT
Created attachment 22477 [details]
Proposed fix: create the render but remove the root from the hierarchy

This gist of this patch is to let attach() create the renderers for us so that we can use them to generate our shadow tree later. In order for them not to be displayed, we remove the renderer at the root of the hierarchy (which is the <xbl> element renderer).
Comment 3 Dave Hyatt 2008-07-25 12:57:46 PDT
Comment on attachment 22477 [details]
Proposed fix: create the render but remove the root from the hierarchy

Renderers for shadow content are going to be created when you clone the shadow content templates.  The original tree is not going to have any renderers for the shadow content template.  Only the clones will have renderers.

In order to just make sure the main XBL document tree has no renderers, you just need a couple of style rules added to html4.css.

These style rules are described in the spec:

http://www.w3.org/TR/xbl/#xbl-elements

@namespace xbl url(http://www.w3.org/ns/xbl);
xbl|* { display: none; }
xbl|div { display: block; }
Comment 4 Julien Chaffraix 2008-07-25 15:27:28 PDT
Created attachment 22483 [details]
Updated version: using html4.css
Comment 5 Dave Hyatt 2008-07-25 17:48:53 PDT
Comment on attachment 22483 [details]
Updated version: using html4.css

r=me
Comment 6 Julien Chaffraix 2008-07-26 13:07:17 PDT
Landed in r35372 on XBL2 branch.