Closed
Bug 368683
Opened 18 years ago
Closed 17 years ago
SVG clips to original dimensions after resizing root <svg> width and height
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jwatt, Unassigned)
Details
(Keywords: regression, testcase)
Attachments
(2 files)
383 bytes,
image/svg+xml
|
Details | |
1.68 KB,
patch
|
Details | Diff | Splinter Review |
We seem to continue to clip to the original dimensions of SVG after resizing the root <svg> tag's width and height. In the attached testcase the green rect should fill the viewport. As can be seen from the stroke, that seems to happen, but the clip remains at the original 50x50 dimensions so most of the viewport remains white. Triggering the resize during onload works fine, but if triggered at some later stage using onclick say (or using setTimeout as in the testcase) it doesn't.
Reporter | ||
Comment 1•18 years ago
|
||
Resizing the window fixes the display.
Reporter | ||
Comment 2•18 years ago
|
||
Seems to be a regression from bug 301628.
Reporter | ||
Comment 3•18 years ago
|
||
So after bug 301628 we stopped calling nsSVGOuterSVGFrame::InitiateReflow() whenever the width/height of an outer <svg> changed. This patch makes sure we reflow, but perhaps there's a better way to do this.
Reporter | ||
Updated•18 years ago
|
Attachment #253331 -
Flags: superreview?(dbaron)
Attachment #253331 -
Flags: review?(tor)
Comment 4•18 years ago
|
||
Yeah, there is. The better way is to map these attributes into style, dammit! ;)
Reporter | ||
Comment 5•18 years ago
|
||
Comment on attachment 253331 [details] [diff] [review] patch Hmm. I won't bother asking if I should be creating a nsSVGSVGElement::GetAttributeChangeHint instead then. ;-) Thanks for pointing that out. Mapping width and height on outer <svg> into style is certainly on my to-do list, but I found it's not so simple (what with CSS 2.1 aspect ratio complications).
Attachment #253331 -
Flags: superreview?(dbaron)
Attachment #253331 -
Flags: review?(tor)
Reporter | ||
Comment 6•17 years ago
|
||
This bug disappeared in 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-03-09&maxdate=2007-03-10+04%3A00&cvsroot=%2Fcvsroot Perhaps the coordinate context rewrite (bug 353172)?
Reporter | ||
Comment 7•17 years ago
|
||
Yeah, the patch for bug 353172 added an nsSVGOuterSVGFrame::AttributeChanged that is pretty much exactly the same as the one in the patch on this bug. The SVG 'width' and 'height' attributes are actually not to be mapped into style, so this is probably the way to handle width/height changes, contrary to comment 4. Boris? Closing as fixed by bug 353172.
Reporter | ||
Updated•17 years ago
|
Flags: in-testsuite?
You need to log in
before you can comment on or make changes to this bug.
Description
•