Closed Bug 438867 Opened 17 years ago Closed 17 years ago

SVG not rendered due to <hr style="clear: both" />

Categories

(Core :: SVG, defect)

defect
Not set
major

Tracking

()

VERIFIED FIXED

People

(Reporter: christian, Assigned: longsonr)

References

()

Details

(Keywords: verified1.9.0.2)

Attachments

(2 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9) Gecko/2008061004 Firefox/3.0 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9) Gecko/2008061004 Firefox/3.0 This page contains SVG and SVG not rendered due to <hr style="clear: both" />. The style on the hr seems to break the SVG rendering. This page works fine in FF2 and Safari. I can reproduce the problem in FF3rc3 on mac and windows XP. The svg is actually in the DOM (according to Firebug), it is just not rendered. Reproducible: Always Steps to Reproduce: 1. create some SVG with javascript 2. add <hr style="clear: both" /> to that page 3. load page in FF3rc3 Actual Results: only see the <hr> Expected Results: see <hr> and the svg SVG example code, to reproduce problem: var SVG_NS = "http://www.w3.org/2000/svg"; var XLINK_NS = "http://www.w3.org/1999/xlink"; var svgNode = document.createElementNS(SVG_NS, 'svg'); svgNode.style.position = 'absolute'; svgNode.style.left = '10px'; svgNode.style.top = '10px'; svgNode.style.zIndex = '2000000'; document.body.appendChild(svgNode); var line = document.createElementNS(SVG_NS, "line"); line.setAttribute('x1', '0'); line.setAttribute('y1', '0'); line.setAttribute('x2', '100'); line.setAttribute('y2', '100'); line.setAttribute('stroke', 'black'); svgNode.appendChild(line); only required body content: <hr style="clear: both" />
Hey, I also found that <br clear=all> in the body breaks this example.
Another example, slightly different: http://pekeler.org/test/svg2.html
What happens if you use an xhtml rather than a html document?
Component: General → SVG
Product: Firefox → Core
QA Contact: general → general
Attached patch patch (obsolete) — Splinter Review
Assignee: nobody → longsonr
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #324930 - Flags: superreview?(roc)
Attachment #324930 - Flags: review?(roc)
Thanks for the regression range Ria, it really pinpointed what to look at.
Attached patch corrected patchSplinter Review
Attachment #324930 - Attachment is obsolete: true
Attachment #324930 - Flags: superreview?(roc)
Attachment #324930 - Flags: review?(roc)
Comment on attachment 324931 [details] [diff] [review] corrected patch can you make a reftest?
Attachment #324931 - Flags: superreview+
Attachment #324931 - Flags: review+
Attached patch reftestSplinter Review
checked in.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite+
Flags: blocking1.9.1?
Resolution: --- → FIXED
Flags: wanted1.9.0.x?
Flags: blocking1.9.1?
Robert, does this patch apply to the 1.9 branch? I think we want this...
Flags: wanted1.9.0.x? → wanted1.9.0.x+
I'm pretty sure it would apply, yes.
Attachment #324931 - Flags: approval1.9.0.2?
Comment on attachment 324931 [details] [diff] [review] corrected patch Approved for 1.9.0.2. Please land in CVS. a=ss Be sure to land the reftest as well.
Attachment #324931 - Flags: approval1.9.0.2? → approval1.9.0.2+
Keywords: fixed1.9.0.2
verified fixed on the 1.9.0 branch using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.2pre) Gecko/2008082004 GranParadiso/3.0.2pre. I verified using the test case in the URL. verified fixed on the trunk using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1a2pre) Gecko/20080820020636 Minefield/3.1a2pre.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: