зеркало из https://github.com/mozilla/gecko-dev.git
Bug 793612 - Make nsSVGArcConverter robust against zero-sized arc segments. r=longsonr
This commit is contained in:
Родитель
3f513ca403
Коммит
a159762d42
|
@ -855,6 +855,12 @@ nsSVGArcConverter::nsSVGArcConverter(const gfxPoint &from,
|
|||
bool sweepFlag)
|
||||
{
|
||||
const double radPerDeg = M_PI/180.0;
|
||||
mSegIndex = 0;
|
||||
|
||||
if (from == to) {
|
||||
mNumSegs = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
// Convert to center parameterization as shown in
|
||||
// http://www.w3.org/TR/SVG/implnote.html
|
||||
|
@ -910,7 +916,6 @@ nsSVGArcConverter::nsSVGArcConverter(const gfxPoint &from,
|
|||
mT = 8.0/3.0 * sin(mDelta/4.0) * sin(mDelta/4.0) / sin(mDelta/2.0);
|
||||
|
||||
mFrom = from;
|
||||
mSegIndex = 0;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
|
||||
<title>Reference for zero-sized path arc handling</title>
|
||||
|
||||
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=793612 -->
|
||||
|
||||
<!-- Check that a zero-sized arc segment is ignored. -->
|
||||
<path d="M 100,100 H 200 H 300" stroke="red" stroke-width="3px"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 424 B |
|
@ -0,0 +1,13 @@
|
|||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
|
||||
<title>Testcase for zero-sized path arc handling</title>
|
||||
|
||||
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=793612 -->
|
||||
|
||||
<!-- Check that a zero-sized arc segment is ignored. -->
|
||||
<path d="M 100,100 H 200 A 200,100 0 0 0 200,100 H 300" stroke="red" stroke-width="3px"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 447 B |
|
@ -200,6 +200,7 @@ random-if(gtk2Widget) == objectBoundingBox-and-fePointLight-02.svg objectBoundin
|
|||
== path-03.svg pass.svg
|
||||
== path-04.svg pass.svg
|
||||
== path-05.svg pass.svg
|
||||
== path-06.svg path-06-ref.svg
|
||||
== pathLength-01.svg pass.svg
|
||||
== pathLength-02.svg pass.svg
|
||||
== pattern-invalid-01.svg pattern-invalid-01-ref.svg
|
||||
|
|
Загрузка…
Ссылка в новой задаче