xbl not created when inside display:none (or hidden=true) element

RESOLVED WONTFIX

Status

()

Core
XBL
RESOLVED WONTFIX
12 years ago
9 years ago

People

(Reporter: Martijn Wargers (dead), Unassigned)

Tracking

({testcase})

Trunk
x86
Windows 2000
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

885 bytes, application/xhtml+xml
Details
(Reporter)

Description

12 years ago
See upcoming testcase.
(Reporter)

Comment 1

12 years ago
Created attachment 194897 [details]
testcase
(Reporter)

Updated

12 years ago
Blocks: 307088
(Reporter)

Comment 2

12 years ago
Hmm, actually this is bug 64234 (which for some reason has become WFM).
Bug 64234, comment 10 says: (bzbarsky)
"We do resolve style for display:none elements (we need to find out they're
display:none!) but not for their descendants...."
(Reporter)

Updated

12 years ago
No longer blocks: 307088
Yep.  We're not going to support attachment of XBL via style inside display:none
subtrees.
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → WONTFIX
(Reporter)

Comment 4

12 years ago
So that means that CSS is not a reliable way for attaching xbl bindings to a
document, right? I really think this sucks.
I'm also thinking of bug 265086. CSS doesn't apply to nodes outside the
document, right?

The computed style of the element in question says it is bound, by the way. I
don't think that is correct when that's not the case. File a new bug?
(Reporter)

Comment 5

12 years ago
(In reply to comment #4)
> So that means that CSS is not a reliable way for attaching xbl bindings to a
> document, right? I really think this sucks.
Oops, I should not blaim CSS here, right? According to the CSS spec, the binding
should get applied, not?
> So that means that CSS is not a reliable way for attaching xbl bindings to a
> document, right?

In Mozilla, yes.  That's why we're working on introducing other binding methods...

> CSS doesn't apply to nodes outside the document, right?

It sorta can be forced to in Mozilla, but in general this is correct.

> The computed style of the element in question says it is bound,

Note that as soon as you access the element from JavaScript the binding _is_
attached.

> According to the CSS spec, the binding should get applied, not?

The CSS spec doesn't say anything about XBL...
(Reporter)

Comment 7

12 years ago
(In reply to comment #6)
> > CSS doesn't apply to nodes outside the document, right?
> It sorta can be forced to in Mozilla, but in general this is correct.

Wouldn't that mean that bug 265086 is invalid, then?

> > The computed style of the element in question says it is bound,
> Note that as soon as you access the element from JavaScript the binding _is_
> attached.
If that was the case, I should get an alert (I have an alert in the
constructor). But I don't get an alert, so I don't think that is the case.
> Wouldn't that mean that bug 265086 is invalid, then?

That bug covers the fact that XBL "cannot" be applied to nodes not in a document
even if a binding mechanism other than CSS were used. (I put "cannot" in quotes
because we apply it in some cases, but inconsistently.)

> If that was the case, I should get an alert

The constructor for this "attach because it was touched from JS" scenario is
only run if the binding can be loaded synchronously (i.e. it's already cached or
has a chrome:// URI).  The whole thing is a nasty hack.  :(

Updated

10 years ago
Blocks: 393966
You need to log in before you can comment on or make changes to this bug.