Closed Bug 280923 Opened 20 years ago Closed 17 years ago

svg element does not apply width and height settings from CSS

Categories

(Core :: SVG, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: harald.albrecht, Unassigned)

References

Details

(Whiteboard: [reflow-refactor])

Attachments

(2 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+ <svg> elements do not apply their width and/or height settings from CSS. Instead, only the values directly set through the width= and height= attributes of <svg> elements are used. Reproducible: Always Steps to Reproduce: 1. Use attached testcase file. Actual Results: The black circle is shown completely. However, if the width and height CSS settings would be properly honored, then only the topleft quarter of the black circle should be shown. Expected Results: The black circle should be clipped, so that only its topleft quarter should be visible.
Attached image simpler testcase
Attachment #173262 - Attachment description: simpler patch → simpler testcase
Status: UNCONFIRMED → NEW
Ever confirmed: true
I meant simpler *testcase* of course. As Harald says, it works fine if we use the attributes.
So isn't this just a matter of mapping width/height into CSS on outer SVG elements and then actually using the reflow state data when you reflow?
Well first I was wondering whether we should be doing this.
Depends on: 292844
See also bug #288276
Depends on: 288276
Boris: so given http://lists.w3.org/Archives/Public/www-svg/2006Feb/0051 I guess this isn't quite as you describe in comment 4?
Yeah, given that these are intrinsic sizes not specified sizes...
Blocks: 342532
Whiteboard: [reflow-refactor]
The SetCoordCtxRect call in nsSVGOuterSVGFrame::Reflow is just wrong. We should only be doing that if there's no viewBox attribute.
Blocks: 368683
Blocks: 373960
Moving deps to bug 294086.
No longer blocks: 342532, 368683, 373960
No longer depends on: 288276
Depends on: 294086
This bug was fixed by the fix for bug 294086. A lot of the reftests checked in for that bug cover this bug too, so marking in-testsuite+.
Status: NEW → RESOLVED
Closed: 17 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: