mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 979407 - Fix ASSERTION: viewport height must be nonnegative, with negative markerHeight or markerWidth attribute. r=dholbert
This commit is contained in:
parent
3b37f2da27
commit
d40d374851
4
layout/svg/crashtests/979407-1.svg
Normal file
4
layout/svg/crashtests/979407-1.svg
Normal file
@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<marker id="marker" viewBox="0 0 10 10" markerHeight="-1px"/>
|
||||
<path d="M0,0 h10" marker-start="url(#marker)"/>
|
||||
</svg>
|
After Width: | Height: | Size: 163 B |
4
layout/svg/crashtests/979407-2.svg
Normal file
4
layout/svg/crashtests/979407-2.svg
Normal file
@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<marker id="marker" viewBox="0 0 10 10" markerWidth="-1px"/>
|
||||
<path d="M0,0 h10" marker-start="url(#marker)"/>
|
||||
</svg>
|
After Width: | Height: | Size: 162 B |
@ -181,3 +181,5 @@ load 952270-1.svg
|
||||
load 963086-1.svg
|
||||
load 975773-1.svg
|
||||
load 974746-1.svg
|
||||
load 979407-1.svg
|
||||
load 979407-2.svg
|
@ -116,6 +116,9 @@ nsSVGMarkerFrame::PaintMark(nsRenderingContext *aContext,
|
||||
AutoMarkerReferencer markerRef(this, aMarkedFrame);
|
||||
|
||||
SVGMarkerElement *marker = static_cast<SVGMarkerElement*>(mContent);
|
||||
if (!marker->HasValidDimensions()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
const nsSVGViewBoxRect viewBox = marker->GetViewBoxRect();
|
||||
|
||||
@ -171,6 +174,9 @@ nsSVGMarkerFrame::GetMarkBBoxContribution(const Matrix &aToBBoxUserspace,
|
||||
AutoMarkerReferencer markerRef(this, aMarkedFrame);
|
||||
|
||||
SVGMarkerElement *content = static_cast<SVGMarkerElement*>(mContent);
|
||||
if (!content->HasValidDimensions()) {
|
||||
return bbox;
|
||||
}
|
||||
|
||||
const nsSVGViewBoxRect viewBox = content->GetViewBoxRect();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user