gecko-dev/layout/svg
Alexis Beingessner 6b442a22a5 Bug 1555356 - Make images inside of SVGs active. r=aosmond
This is done using a similar approach to CreateWebRenderCommands
but slightly modified. In particular the active layer check needs
to be done before we're ready to CreateWebRenderCommands, but once
we decide to activate an item, we can't let CreateWebRenderCommands
fail. Unfortunately, the need to query ImageLib for support means
we need to do basically ~all of the work of CreateWebRenderCommands
to do this check.

As such, this introduces a modified version of CreateWebRenderCommands
that SVGGeometryFrames implement with a "dry run" flag. When true,
it runs the same code but stops short of mutating the WR DL/state.

ImageLib may be encouraged to do some extra work that could be thrown
away, but I'm not sure there's any way to avoid that.

For now, only SVGImageFrame actually provides an implementation. The
bulk of the implementation is handling the on-by-default
preserveAspectRatio feature of SVG images. It was cleaner to just
reimplement that logic than reuse the existing preserveAspectRatio
code, as it was too tangled up in the particulars of how the PaintSVG
path is designed.

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

--HG--
extra : moz-landing-system : lando
2020-02-14 14:50:36 +00:00
..
crashtests Bug 1605223. Handle SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN when computing webrender filter information for component transfer filters. r=mstange 2020-01-28 10:00:25 +00:00
tests
AutoReferenceChainGuard.h
moz.build Bug 1555356 - Make images inside of SVGs active. r=aosmond 2020-02-14 14:50:36 +00:00
nsCSSClipPathInstance.cpp Bug 1614510 - Split clip-path and shape-outside values. r=boris 2020-02-11 23:34:53 +00:00
nsCSSClipPathInstance.h Bug 1614510 - Split clip-path and shape-outside values. r=boris 2020-02-11 23:34:53 +00:00
nsCSSFilterInstance.cpp
nsCSSFilterInstance.h
nsFilterInstance.cpp Bug 1605223. Handle SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN when computing webrender filter information for component transfer filters. r=mstange 2020-01-28 10:00:25 +00:00
nsFilterInstance.h
nsISVGSVGFrame.h
nsSVGAFrame.cpp Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron 2020-02-01 09:40:36 +00:00
nsSVGClipPathFrame.cpp
nsSVGClipPathFrame.h
nsSVGContainerFrame.cpp Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron 2020-02-01 09:40:36 +00:00
nsSVGContainerFrame.h Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron 2020-02-01 09:40:36 +00:00
nsSVGDisplayableFrame.h
nsSVGFilterFrame.cpp
nsSVGFilterFrame.h
nsSVGFilterInstance.cpp
nsSVGFilterInstance.h
nsSVGFilterPaintCallback.h
nsSVGForeignObjectFrame.cpp Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron 2020-02-01 09:40:36 +00:00
nsSVGForeignObjectFrame.h Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron 2020-02-01 09:40:36 +00:00
nsSVGGenericContainerFrame.cpp
nsSVGGenericContainerFrame.h
nsSVGGFrame.cpp
nsSVGGFrame.h Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron 2020-02-01 09:40:36 +00:00
nsSVGGradientFrame.cpp
nsSVGGradientFrame.h
nsSVGImageFrame.cpp Bug 1555356 - Make images inside of SVGs active. r=aosmond 2020-02-14 14:50:36 +00:00
nsSVGImageFrame.h Bug 1555356 - Make images inside of SVGs active. r=aosmond 2020-02-14 14:50:36 +00:00
nsSVGInnerSVGFrame.cpp
nsSVGInnerSVGFrame.h
nsSVGIntegrationUtils.cpp Bug 1614510 - Use cbindgen for shape-outside and clip-path. r=boris 2020-02-11 22:03:53 +00:00
nsSVGIntegrationUtils.h
nsSVGMarkerFrame.cpp
nsSVGMarkerFrame.h
nsSVGMaskFrame.cpp Bug 1611415 - Prefer using std::move over forget. r=froydnj 2020-02-13 14:38:48 +00:00
nsSVGMaskFrame.h
nsSVGOuterSVGFrame.cpp Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron 2020-02-01 09:40:36 +00:00
nsSVGOuterSVGFrame.h Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron 2020-02-01 09:40:36 +00:00
nsSVGPaintServerFrame.h
nsSVGPatternFrame.cpp Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron 2020-02-01 09:40:36 +00:00
nsSVGPatternFrame.h Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron 2020-02-01 09:40:36 +00:00
nsSVGStopFrame.cpp
nsSVGSwitchFrame.cpp
nsSVGSymbolFrame.cpp
nsSVGSymbolFrame.h
nsSVGUseFrame.cpp
nsSVGUseFrame.h
nsSVGUtils.cpp Bug 1614510 - Split clip-path and shape-outside values. r=boris 2020-02-11 23:34:53 +00:00
nsSVGUtils.h
nsSVGViewportFrame.cpp
nsSVGViewportFrame.h Bug 1610387 - Remove nsAutoPtr usage from layout/. r=dbaron 2020-02-01 09:40:36 +00:00
svg.css
SVGContextPaint.cpp
SVGContextPaint.h Bug 1602421 - Remove some useless includes. r=jfkthame 2019-12-09 14:53:50 +00:00
SVGFEContainerFrame.cpp
SVGFEImageFrame.cpp
SVGFELeafFrame.cpp
SVGFEUnstyledLeafFrame.cpp
SVGGeometryFrame.cpp Bug 1555356 - Make images inside of SVGs active. r=aosmond 2020-02-14 14:50:36 +00:00
SVGGeometryFrame.h Bug 1555356 - Make images inside of SVGs active. r=aosmond 2020-02-14 14:50:36 +00:00
SVGImageContext.cpp Bug 1611415 - Prefer using std::move over forget. r=froydnj 2020-02-13 14:38:48 +00:00
SVGImageContext.h
SVGObserverUtils.cpp Bug 1614510 - Split clip-path and shape-outside values. r=boris 2020-02-11 23:34:53 +00:00
SVGObserverUtils.h Bug 1593222: part 12) Rename "nsNodeUtils.*" to "MutationObservers.*". r=smaug 2019-11-06 09:08:06 +00:00
SVGTextFrame.cpp Bug 1614636: simplify arguments of nsFrameSelection::HandleClick. r=jfkthame 2020-02-11 15:12:26 +00:00
SVGTextFrame.h Bug 1614165 part 1. Improve error messages for SVG text. r=emilio 2020-02-09 02:15:32 +00:00
SVGViewFrame.cpp