зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1323962 - Should support CSS transform for pattern r=longsonr
The same as mask. Differential Revision: https://phabricator.services.mozilla.com/D27882 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
5f0ba63570
Коммит
3d671c5897
|
@ -145,6 +145,7 @@ fuzzy-if(d2d||skiaContent,0-1,0-10000) == dynamic-filter-contents-01b.svg dynami
|
|||
== dynamic-mask-contents-01.svg pass.svg
|
||||
== dynamic-mask-pre-effects-bbox.html dynamic-mask-pre-effects-bbox-ref.html
|
||||
== test_bug1323962.html test_bug1323962-ref.html
|
||||
== test_bug1323962-2.html test_bug1323962-2-ref.html
|
||||
== dynamic-opacity-property-01.svg pass.svg
|
||||
== dynamic-pattern-01.svg pass.svg
|
||||
== dynamic-pattern-02.svg pass.svg
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<svg width="200" height="200">
|
||||
<defs>
|
||||
<pattern id="Pattern" x="0" y="0" width=".25" height=".25">
|
||||
<rect id="rec" x="0" y="0" width="30" height="30" fill="skyblue"/>
|
||||
</pattern>
|
||||
</defs>
|
||||
|
||||
<rect fill="url(#Pattern)" stroke="black" width="200" height="200"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 281 B |
|
@ -0,0 +1,14 @@
|
|||
<style>
|
||||
#rec {
|
||||
transform: scale(.6,.6);
|
||||
}
|
||||
</style>
|
||||
<svg width="200" height="200">
|
||||
<defs>
|
||||
<pattern id="Pattern" x="0" y="0" width=".25" height=".25">
|
||||
<rect id="rec" x="0" y="0" width="50" height="50" fill="skyblue"/>
|
||||
</pattern>
|
||||
</defs>
|
||||
|
||||
<rect fill="url(#Pattern)" stroke="black" width="200" height="200"/>
|
||||
</svg>
|
|
@ -355,15 +355,13 @@ already_AddRefed<SourceSurface> nsSVGPatternFrame::PaintPattern(
|
|||
NS_FRAME_DRAWING_AS_PAINTSERVER)) {
|
||||
AutoSetRestorePaintServerState paintServer(patternWithChildren);
|
||||
for (nsIFrame *kid = firstKid; kid; kid = kid->GetNextSibling()) {
|
||||
gfxMatrix tm = *(patternWithChildren->mCTM);
|
||||
|
||||
// The CTM of each frame referencing us can be different
|
||||
nsSVGDisplayableFrame *SVGFrame = do_QueryFrame(kid);
|
||||
if (SVGFrame) {
|
||||
SVGFrame->NotifySVGChanged(nsSVGDisplayableFrame::TRANSFORM_CHANGED);
|
||||
}
|
||||
gfxMatrix tm = *(patternWithChildren->mCTM);
|
||||
if (kid->GetContent()->IsSVGElement()) {
|
||||
tm = static_cast<SVGElement *>(kid->GetContent())
|
||||
->PrependLocalTransformsTo(tm, eUserSpaceToParent);
|
||||
tm = nsSVGUtils::GetTransformMatrixInUserSpace(kid, patternWithChildren) * tm;
|
||||
}
|
||||
|
||||
nsSVGUtils::PaintFrameWithEffects(kid, *ctx, tm, aImgParams);
|
||||
|
|
Загрузка…
Ссылка в новой задаче