diff --git a/gfx/skia/skia/src/core/SkAAClip.cpp b/gfx/skia/skia/src/core/SkAAClip.cpp index fc81cd886a60..787f23413832 100644 --- a/gfx/skia/skia/src/core/SkAAClip.cpp +++ b/gfx/skia/skia/src/core/SkAAClip.cpp @@ -1412,7 +1412,9 @@ bool SkAAClip::setPath(const SkPath& path, const SkIRect& clip, bool doAA) { ibounds = clip; } else { path.getBounds().roundOut(&ibounds); - if (ibounds.isEmpty() || !ibounds.intersect(clip)) { + // Since clip is already validated with isEmpty, it is safe to use isEmpty64 + // for ibounds as it will be intersected with clip after. + if (ibounds.isEmpty64() || !ibounds.intersect(clip)) { return this->setEmpty(); } } diff --git a/layout/reftests/canvas/1909718-1-ref.html b/layout/reftests/canvas/1909718-1-ref.html new file mode 100644 index 000000000000..cb5d5d9e53a7 --- /dev/null +++ b/layout/reftests/canvas/1909718-1-ref.html @@ -0,0 +1,24 @@ + + + + + + + + + diff --git a/layout/reftests/canvas/1909718-1.html b/layout/reftests/canvas/1909718-1.html new file mode 100644 index 000000000000..0d4045f094f6 --- /dev/null +++ b/layout/reftests/canvas/1909718-1.html @@ -0,0 +1,24 @@ + + + + + + + + + diff --git a/layout/reftests/canvas/reftest.list b/layout/reftests/canvas/reftest.list index f5ce61dc93c4..9875168a026d 100644 --- a/layout/reftests/canvas/reftest.list +++ b/layout/reftests/canvas/reftest.list @@ -127,3 +127,5 @@ fuzzy-if(winWidget,0-94,0-1575) fuzzy-if(cocoaWidget,0-1,0-34) == 1304353-text-g != 1850727-1.html 1850727-1-ref.html == transformed-line-stroke.html transformed-line-stroke-ref.html + +== 1909718-1.html 1909718-1-ref.html