Commit 3e2ea92a authored by Timothy Nikkel's avatar Timothy Nikkel
Browse files

Bug 1826444. Null check pattern in SVGContextPaintImpl::Paint::GetPattern....

Bug 1826444. Null check pattern in SVGContextPaintImpl::Paint::GetPattern. r=firefox-svg-reviewers,longsonr

It's null because there it's an empty pattern frame. SVGPatternFrame::GetPaintServerPattern returns null because SVGPatternFrame::PaintPattern returns null because SVGPatternFrame::GetPatternWithChildren returns null.

Differential Revision: https://phabricator.services.mozilla.com/D174713
parent 45cdbd76
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -259,6 +259,9 @@ already_AddRefed<gfxPattern> SVGContextPaintImpl::Paint::GetPattern(
      pattern = mPaintDefinition.mPaintServerFrame->GetPaintServerPattern(
          mFrame, aDrawTarget, mContextMatrix, aFillOrStroke, aOpacity,
          aImgParams);
      if (!pattern) {
        return nullptr;
      }
      {
        // m maps original-user-space to pattern space
        gfxMatrix m = pattern->GetMatrix();
+6 −0
Original line number Diff line number Diff line
<svg>
<marker id="a">
<circle stroke="context-fill" r="1em">
</marker>
<polygon points="1,50 1,511 0,1 0,0 30,71 32768,912 1,52 41146,14 0,120 814,7 868,16 973,83 8192,0 121,242 0,16384 0,1 541,44049 0,0 0,12 1,0 16376,0 2,7 0,1 0,0 0,16 953,15758 2048,992 1,8 33,0 58,0 0,6 26,7" fill="url(#b)" marker-mid="url(#a)" fill-opacity="0"></polygon>
<pattern id="b">
+1 −0
Original line number Diff line number Diff line
@@ -256,3 +256,4 @@ HTTP load 1755770-2.html
load 1764936-1.html
load 1804958.html
load 1810260.html
load 1826444-1.html