tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit f8131c020cce09fd41877ecc56c743d5386325fa
parent d82b4f012e34eb01336b0ccb6c878ece57d70ee4
Author: longsonr <longsonr@gmail.com>
Date:   Fri,  9 Jan 2026 20:50:08 +0000

Bug 2009364 Part 2 - Rename SVGIntegrationUtils::DecodeFlags r=jwatt

Differential Revision: https://phabricator.services.mozilla.com/D278453

Diffstat:
Mlayout/painting/nsImageRenderer.cpp | 2+-
Mlayout/svg/SVGIntegrationUtils.cpp | 10+++++-----
Mlayout/svg/SVGIntegrationUtils.h | 5+++--
3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/layout/painting/nsImageRenderer.cpp b/layout/painting/nsImageRenderer.cpp @@ -783,7 +783,7 @@ already_AddRefed<gfxDrawable> nsImageRenderer::DrawableForElement( drawable = SVGIntegrationUtils::DrawableFromPaintServer( mPaintServerFrame, mForFrame, mSize, imageSize, aContext.GetDrawTarget(), aContext.CurrentMatrixDouble(), - SVGIntegrationUtils::DecodeFlags::SyncDecodeImages); + SVGIntegrationUtils::DecodeFlag::SyncDecodeImages); } return drawable.forget(); diff --git a/layout/svg/SVGIntegrationUtils.cpp b/layout/svg/SVGIntegrationUtils.cpp @@ -1080,7 +1080,7 @@ class PaintFrameCallback : public gfxDrawingCallback { public: PaintFrameCallback(nsIFrame* aFrame, const nsSize aPaintServerSize, const IntSize aRenderSize, - EnumSet<SVGIntegrationUtils::DecodeFlags> aFlags) + SVGIntegrationUtils::DecodeFlags aFlags) : mFrame(aFrame), mPaintServerSize(aPaintServerSize), mRenderSize(aRenderSize), @@ -1093,7 +1093,7 @@ class PaintFrameCallback : public gfxDrawingCallback { nsIFrame* mFrame; nsSize mPaintServerSize; IntSize mRenderSize; - EnumSet<SVGIntegrationUtils::DecodeFlags> mFlags; + SVGIntegrationUtils::DecodeFlags mFlags; }; bool PaintFrameCallback::operator()(gfxContext* aContext, @@ -1141,7 +1141,7 @@ bool PaintFrameCallback::operator()(gfxContext* aContext, using PaintFrameFlags = nsLayoutUtils::PaintFrameFlags; PaintFrameFlags flags = PaintFrameFlags::InTransform; - if (mFlags.contains(SVGIntegrationUtils::DecodeFlags::SyncDecodeImages)) { + if (mFlags.contains(SVGIntegrationUtils::DecodeFlag::SyncDecodeImages)) { flags |= PaintFrameFlags::SyncDecodeImages; } nsLayoutUtils::PaintFrame(aContext, mFrame, dirty, NS_RGBA(0, 0, 0, 0), @@ -1173,7 +1173,7 @@ bool PaintFrameCallback::operator()(gfxContext* aContext, already_AddRefed<gfxDrawable> SVGIntegrationUtils::DrawableFromPaintServer( nsIFrame* aFrame, nsIFrame* aTarget, const nsSize& aPaintServerSize, const IntSize& aRenderSize, const DrawTarget* aDrawTarget, - const gfxMatrix& aContextMatrix, EnumSet<DecodeFlags> aFlags) { + const gfxMatrix& aContextMatrix, DecodeFlags aFlags) { // aPaintServerSize is the size that would be filled when using // background-repeat:no-repeat and background-size:auto. For normal background // images, this would be the intrinsic size of the image; for gradients and @@ -1188,7 +1188,7 @@ already_AddRefed<gfxDrawable> SVGIntegrationUtils::DrawableFromPaintServer( aPaintServerSize.height); overrideBounds.Scale(1.0 / aFrame->PresContext()->AppUnitsPerDevPixel()); uint32_t imgFlags = imgIContainer::FLAG_ASYNC_NOTIFY; - if (aFlags.contains(DecodeFlags::SyncDecodeImages)) { + if (aFlags.contains(DecodeFlag::SyncDecodeImages)) { imgFlags |= imgIContainer::FLAG_SYNC_DECODE; } imgDrawingParams imgParams(imgFlags); diff --git a/layout/svg/SVGIntegrationUtils.h b/layout/svg/SVGIntegrationUtils.h @@ -258,14 +258,15 @@ class SVGIntegrationUtils final { * @param aFlags pass SyncDecodeImages and any images in the paint * server will be decoding synchronously if they are not decoded already. */ - enum class DecodeFlags { + enum class DecodeFlag { SyncDecodeImages, }; + using DecodeFlags = EnumSet<DecodeFlag>; static already_AddRefed<gfxDrawable> DrawableFromPaintServer( nsIFrame* aFrame, nsIFrame* aTarget, const nsSize& aPaintServerSize, const gfx::IntSize& aRenderSize, const DrawTarget* aDrawTarget, - const gfxMatrix& aContextMatrix, EnumSet<DecodeFlags> aFlags); + const gfxMatrix& aContextMatrix, DecodeFlags aFlags); /** * For non-SVG frames, this gives the offset to the frame's "user space".