Closed Bug 292844 Opened 20 years ago Closed 20 years ago

Cannot view two SVG side by side

Categories

(Core :: SVG, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: CheongTM, Assigned: tor)

References

Details

(Keywords: testcase)

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050503 Firefox/1.0+ Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050503 Firefox/1.0+ For firefox (nightly built version on 3rd May): If I use two SVG <s:svg> ... </s:svg><s:svg> ... </s:svg>, it is displayed in two rows, instead of side-by-side. This problem does not occur for nightly built version of Mozilla with SVG native support. Reproducible: Always
Assignee: nobody → general
Component: General → SVG
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → Trunk
Could you provide a testcase? Thanks.
Attached file Requested testcase.
View this in nightly built Firefox and Mozilla with native SVG support. You will observe that nightly built Firefox shows the two SVG in two rows while Mozilla with native SVG support shows the two SVG in two columns.
Keywords: testcase
Where are you getting the build of Mozilla you're using for SVG testing? The behavior you're seeing seems to suggest that it isn't including svg.css. Boris: we've got a line in svg.css that's forcing "display: block" for svg. Should that be the case?
Well... You want the CSS width and height styles to apply to it, right? Then it can't be display:inline (since those properties do not apply to that display type). Does the SVG specification not recommend a default display value for the outermost svg? If not, then I'd say we want it to be display:block for now and maybe display:inline-block once we implement that.
(In reply to comment #4) > Does the SVG specification not recommend a default display value for the > outermost svg? If not, then I'd say we want it to be display:block for now and > maybe display:inline-block once we implement that. I could find no such recommendation, but I believe the SVG WG would be open to discussing and including it if it helps (we generally try to improve integration when we can, though it doesn't always show...), so please don't hesitate to send a comment along those lines.
The section on display in the SVG specification says the default should be "inline". I couldn't find anything specific to the outermost svg in the spec. http://www.w3.org/TR/SVG11/painting.html#DisplayProperty SVG isn't currently respecting width/height - bug 280923.
> The section on display in the SVG specification says the default should be > "inline". That's in the absense of any CSS rules. Basically a copy/paste from the definition in the CSS specification. Robin, I'll send mail on this. As the other bug points out, it's not clear whether CSS width/height should even apply to an outermost SVG....
Blocks: 280923
Wouldn't an <svg> element be a replaced element?
That's what I ended up concluding in my mail to the SVG WG...
(In reply to comment #3) > Where are you getting the build of Mozilla you're using for SVG testing? The > behavior you're seeing seems to suggest that it isn't including svg.css. > > Boris: we've got a line in svg.css that's forcing "display: block" for svg. > Should that be the case? The build id for Mozilla is 2004122409. It is downloaded from Mozilla nightly with native SVG support. I don't understand the exchange of comments thus far. I hope that the svg elements will be placed side by side in Firefox browser.
Since moving to replaced element apparently is going to take some time (dependency on reflow work) and we don't currently respect css width/height on the outermost svg, it seems that removing "display: block" would move us closer to where we want to be.
Attachment #183525 - Flags: review?(bzbarsky)
Comment on attachment 183525 [details] [diff] [review] remove display:block for svg r=bzbarsky if the width/height attributes still work... File a bug on making this a replaced element, please?
Attachment #183525 - Flags: review?(bzbarsky) → review+
Comment on attachment 183525 [details] [diff] [review] remove display:block for svg width/height attributes still work. Bug 294086 filed for future work.
Attachment #183525 - Flags: approval1.8b2?
(In reply to comment #13) > (From update of attachment 183525 [details] [diff] [review] [edit]) > width/height attributes still work. Bug 294086 filed for future work. > I am new to bugzilla. Does it mean that the bug is solved? Will this problem be rectified before Firefox 1.1 is released? Thanks.
The patch approval flag first has to be set to + by a driver before the patch can be landed. If approval is given, this bug is fixed in time for 1.1.
Assignee: general → tor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 183525 [details] [diff] [review] remove display:block for svg a=asa
Attachment #183525 - Flags: approval1.8b2? → approval1.8b2+
Checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: