Closed
Bug 281260
Opened 20 years ago
Closed 18 years ago
display:none on foreignObject content can't be removed
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
People
(Reporter: harald.albrecht, Unassigned)
References
Details
(Whiteboard: [reflow-refactor])
Attachments
(4 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050201 Firefox/1.0+ Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050201 Firefox/1.0+ (X)HTML elements (such as <div>) inside <foreignObject> are not shown if they have been created first with "display:none" and this CSS property has later been changed to "display:block". Normally this should make the XHTML elements appear. Reproducible: Always Steps to Reproduce: 1. Load attached testcase Actual Results: Only an empty canvas. The rectangle is not shown. Expected Results: A red dotted rectangled should be shown after one second.
| Reporter | ||
Comment 1•20 years ago
|
||
Load the example. The inner <div> is first hidden (display:none). After one second its CSS property "display" is set to "block" which should ordinarily make the div appear on screen. Instead, nothing happens. The alert box shows that the "display:block" has been set after one second.
Attachment #173532 -
Attachment mime type: text/xml → text/xhtml
Attachment #173532 -
Attachment mime type: text/xhtml → text/html
Attachment #173532 -
Attachment mime type: text/html → text/xml
sorry for the mimetyp changes but I had the wrong browser window open and did not see anything, this testcase triggers ###!!! ASSERTION: zero axis length: 'd!=0.0f', file e:/moz_src/mozilla/content/svg/content/src/nsSVGLength.cpp, line 551
Comment 3•20 years ago
|
||
Confirming. Interestingly, setting the CSS display property to values other than 'none' seems to work okay, but as soon as display is to 'none', setting it to another value fails to cause the element to show again.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: "display" CSS property is not honered properly → display:none on foreignObject content can't be removed
Comment 4•20 years ago
|
||
Comment 5•20 years ago
|
||
Does this work if display is toggled for a grandchild of a foreignObject?
Comment 6•20 years ago
|
||
apparently not
Comment 7•20 years ago
|
||
So with the first testcase, the first problem is that the positioned node ends up not being a child of the foreignObject, since the foreignObject is not detected as an absolute containing block by nsCSSFrameConstructor::GetAbsoluteContainingBlock... Not sure what's going on in the other testcases, offhand.
Comment 8•20 years ago
|
||
In the second testcase, a click gives me:
###!!! ASSERTION: uh oh. the block we need to reframe has no parent!: 'Error',
file /home/bzbarsky/mozilla/xlib/mozilla/layout/base/nsCSSFrameConstructor.cpp,
line 13329
This keeps the frame for the child from even being created. This is
WipeContainingBlock, so the problem is that the foreignobject frame has
display:inline, which means we look for the block containing it and try to
reframe the whole thing, since we think we're in an {ib} split.
Probably worth filing a bug on that, as well as on the abs pos issue I pointed
out in comment 7.
The third testcase works if I change the sizedReflowState to explicitly have a
"Initial" reflow reason. So it's some issue with blocks and the bizarre reflow
state and such they get from this code (unconstrained computed width and height,
weird mRect, etc, etc). It's almost worth just waiting for the reflow branch
and seeing whether the problem remains at that point.
Updated•18 years ago
|
Whiteboard: [reflow-refactor]
Updated•18 years ago
|
Flags: blocking1.9?
Comment 9•18 years ago
|
||
This works for me now.
Comment 10•18 years ago
|
||
The "another testcase" got fixed between 2007-01-25 and 2007-01-26: http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2007-01-25+04&maxdate=2007-01-26+09&cvsroot=%2Fcvsroot Fixed by bug 368101?
Flags: blocking1.9?
Comment 11•18 years ago
|
||
Yeah, I think that patch would have this effect.
Status: NEW → RESOLVED
Closed: 18 years ago
Depends on: 368101
Flags: in-testsuite?
Resolution: --- → FIXED
Comment 12•18 years ago
|
||
Comment 13•18 years ago
|
||
Checked in reftest: http://lxr.mozilla.org/seamonkey/source/layout/reftests/svg/foreignObject-display-01.svg
Flags: in-testsuite? → in-testsuite+
OS: Windows 2000 → All
Hardware: PC → All
You need to log in
before you can comment on or make changes to this bug.
Description
•