mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
Bug 725918 patch 2: Fixed wrong assertion in nsSVGGlyphFrame. r=longsonr
This commit is contained in:
parent
e1c317e025
commit
da32cba556
@ -242,6 +242,7 @@ fails-if(Android) random-if(gtk2Widget) != text-language-01.xhtml text-language-
|
||||
== text-layout-03.svg text-layout-03-ref.svg
|
||||
== text-layout-04.svg text-layout-04-ref.svg
|
||||
== text-layout-05.svg text-layout-05-ref.svg
|
||||
== text-layout-06.svg text-layout-06-ref.svg
|
||||
== text-scale-01.svg text-scale-01-ref.svg
|
||||
== text-stroke-scaling-01.svg text-stroke-scaling-01-ref.svg
|
||||
== stroke-dasharray-and-pathLength-01.svg pass.svg
|
||||
|
10
layout/reftests/svg/text-layout-06-ref.svg
Normal file
10
layout/reftests/svg/text-layout-06-ref.svg
Normal file
@ -0,0 +1,10 @@
|
||||
<!--
|
||||
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 to check fill and stroke handling</title>
|
||||
|
||||
<text x="50" y="80" font-size="80" fill="blue" stroke="none">A B</text>
|
||||
<text x="50" y="80" font-size="80" fill="none" stroke="yellow" stroke-width="2">A B</text>
|
||||
</svg>
|
After Width: | Height: | Size: 395 B |
9
layout/reftests/svg/text-layout-06.svg
Normal file
9
layout/reftests/svg/text-layout-06.svg
Normal file
@ -0,0 +1,9 @@
|
||||
<!--
|
||||
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 to check fill and stroke handling</title>
|
||||
|
||||
<text x="50" y="80" font-size="80" fill="blue" stroke="yellow" stroke-width="2">A B</text>
|
||||
</svg>
|
After Width: | Height: | Size: 320 B |
@ -900,21 +900,25 @@ nsSVGGlyphFrame::SetupCairoState(gfxContext *aContext, nsRefPtr<gfxPattern> *aSt
|
||||
nsSVGPaintServerFrame *ps = GetPaintServer(&style->mStroke,
|
||||
nsSVGEffects::StrokeProperty());
|
||||
|
||||
nsRefPtr<gfxPattern> strokePattern;
|
||||
|
||||
if (ps) {
|
||||
// Gradient or Pattern: can get pattern directly from frame
|
||||
*aStrokePattern = ps->GetPaintServerPattern(this, opacity);
|
||||
strokePattern = ps->GetPaintServerPattern(this, opacity);
|
||||
}
|
||||
|
||||
NS_ASSERTION(*aStrokePattern, "No pattern returned from paint server");
|
||||
} else {
|
||||
if (!strokePattern) {
|
||||
nscolor color;
|
||||
nsSVGUtils::GetFallbackOrPaintColor(aContext, GetStyleContext(),
|
||||
&nsStyleSVG::mStroke, &opacity,
|
||||
&color);
|
||||
*aStrokePattern = new gfxPattern(gfxRGBA(NS_GET_R(color) / 255.0,
|
||||
NS_GET_G(color) / 255.0,
|
||||
NS_GET_B(color) / 255.0,
|
||||
NS_GET_A(color) / 255.0 * opacity));
|
||||
strokePattern = new gfxPattern(gfxRGBA(NS_GET_R(color) / 255.0,
|
||||
NS_GET_G(color) / 255.0,
|
||||
NS_GET_B(color) / 255.0,
|
||||
NS_GET_A(color) / 255.0 * opacity));
|
||||
}
|
||||
|
||||
strokePattern.swap(*aStrokePattern);
|
||||
}
|
||||
|
||||
if (SetupCairoFill(aContext)) {
|
||||
|
4
layout/svg/crashtests/725918-1.svg
Normal file
4
layout/svg/crashtests/725918-1.svg
Normal file
@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<text stroke="url(#p)">t</text>
|
||||
<pattern id="p"/>
|
||||
</svg>
|
After Width: | Height: | Size: 102 B |
@ -123,3 +123,4 @@ load 709920-1.svg
|
||||
load 709920-2.svg
|
||||
load 713413-1.svg
|
||||
load 722003-1.svg
|
||||
load 725918-1.svg
|
||||
|
Loading…
Reference in New Issue
Block a user