зеркало из https://github.com/mozilla/gecko-dev.git
Bug 604723: Multiply onto (instead of replacing) our gfxContext matrix when painting SVG images. r=longsonr a=blocking
This commit is contained in:
Родитель
f45b1ab1d7
Коммит
1059ac4571
|
@ -0,0 +1,16 @@
|
|||
<html>
|
||||
<!-- Test to make sure svg:image is painted at correct position when its
|
||||
containing SVG is included inline in HTML at some non-(0,0) position. -->
|
||||
<body style="background: lime">
|
||||
<!-- 100x100 red div -->
|
||||
<div style="background: red;
|
||||
margin-left: 60px; margin-top: 80px;
|
||||
width: 100px; height: 100px;">
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- 1x1 lime PNG, scaled to 100x100 -->
|
||||
<image xlink:href="data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%01%00%00%00%01%08%02%00%00%00%90wS%DE%00%00%00%01sRGB%00%AE%CE%1C%E9%00%00%00%0CIDAT%08%D7c%60%F8%CF%00%00%02%02%01%00%AA*%9E'%00%00%00%00IEND%AEB%60%82" width="100" height="100"/>
|
||||
</svg>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,17 +1,18 @@
|
|||
# Tests of the SVG <image> element
|
||||
|
||||
== image-fill-01.svg ../pass.svg
|
||||
== image-opacity-01.svg image-opacity-01-ref.svg
|
||||
== image-opacity-02.svg image-opacity-02-ref.svg
|
||||
== image-rotate-01.svg image-rotate-01-ref.svg
|
||||
== image-rotate-02a.svg image-rotate-02-ref.svg
|
||||
== image-rotate-02b.svg image-rotate-02-ref.svg
|
||||
== image-scaling-01.svg ../pass.svg
|
||||
== image-scaling-02.svg ../pass.svg
|
||||
== image-translate-01.svg image-translate-01-ref.svg
|
||||
== image-x-01.svg image-x-01-ref.svg
|
||||
== image-xy-01.svg image-xy-01-ref.svg
|
||||
== image-y-01.svg image-y-01-ref.svg
|
||||
== image-fill-01.svg ../pass.svg
|
||||
== image-opacity-01.svg image-opacity-01-ref.svg
|
||||
== image-opacity-02.svg image-opacity-02-ref.svg
|
||||
== image-rotate-01.svg image-rotate-01-ref.svg
|
||||
== image-rotate-02a.svg image-rotate-02-ref.svg
|
||||
== image-rotate-02b.svg image-rotate-02-ref.svg
|
||||
== image-scaling-01.svg ../pass.svg
|
||||
== image-scaling-02.svg ../pass.svg
|
||||
== image-svg-inline-01.html ../pass.svg
|
||||
== image-translate-01.svg image-translate-01-ref.svg
|
||||
== image-x-01.svg image-x-01-ref.svg
|
||||
== image-xy-01.svg image-xy-01-ref.svg
|
||||
== image-y-01.svg image-y-01-ref.svg
|
||||
|
||||
# Tests for <image> with preserveAspectRatio
|
||||
# NOTE: The reference cases in the following tests trigger 20 assertions each
|
||||
|
|
|
@ -258,7 +258,7 @@ nsSVGImageFrame::PaintSVG(nsSVGRenderState *aContext,
|
|||
// NOTE: To ensure that |width| and |height| don't accidentally
|
||||
// scale the user-unit size in SVG images, we apply those attributes
|
||||
// via |destRect|, not via our gfxContext's transform.
|
||||
ctx->SetMatrix(GetImageTransform());
|
||||
ctx->Multiply(GetImageTransform());
|
||||
|
||||
// fill-opacity doesn't affect <image>, so if we're allowed to
|
||||
// optimize group opacity, the opacity used for compositing the
|
||||
|
|
Загрузка…
Ссылка в новой задаче