Closed Bug 172574 Opened 19 years ago Closed 11 years ago

xbl elements with display:block don't work

Categories

(Core :: XBL, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: alex, Unassigned)

References

(Depends on 1 open bug)

Details

Dunno whether this bug belongs in XBL or Layout...

Elements with XBL bindings and display style 'block' are not rendered, because 
we hit an unimplemented case in nsCSSFrameConstructor::WipeContainingBlock(): 
... else { 
     //uh oh. the block we need to reframe has no parent! 
         }
...

A testcase is at http://www.croczilla.com/svg/xbl-block-bug/bug.xml:

bug.xml
-------
<?xml?>
<?xml-stylesheet href="bug-bindings.css" type="text/css"?>
<doc>
  <blockelement/>
</doc>

bug-bindings.css
----------------
blockelement {
 display: block;
 -moz-binding: url("bug-bindings.xml#blockelement");
}

bug-bindings.xml
----------------
<?xml?>
<bindings xmlns="http://www.mozilla.org/xbl">
 <binding id="blockelement">
   <content>foopy</content>
 </binding>
</bindings>

If the 'display: block;' declaration is left out, the element renders ok.
Blocks: 111317
Blocks: zoompan
Some more comments:

1) If the binding document is loaded synchronously (from the xul cache), the 
problem disappears. Only the first load in a session is problematic in these 
cases.

2) Elements that can't have bindings because of this bug include <html:div> and 
<svg:svg>.
Adding dependency to 142585.  I don't think it's worth the time to really fix
this properly (if such a thing is even possible in the current code), although
if you need it to work in some subset of cases, it might not be too hard.
Depends on: ib_reflow
No longer blocks: 111317
No longer blocks: zoompan
QA Contact: ian → xbl
Assignee: hyatt → nobody
Testcase is here no more. There's a way to reproduce or we can close this 8 years old bug?
This is fixed by one of the numerous root frame and ib changes since then.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
But it might be good to add a testcase.
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.