gecko-dev/layout/svg
Ting-Yu Lin 6ef06ff583 Bug 1660122 Part 7 - Implement GetAspectRatio(). r=emilio
This patch moves the preferred aspect-ratio calculation from each
replaced elements' GetIntrinicRatio() into GetAspectRatio(), because
they share the same logic.

For nsImageFrame, the cached mIntrinsicRatio now stores only the image's
intrinsic ratio, not considering the aspect-ratio property.

This patch fixed "object-fit:contain" for canvas, image because
GetIntrinicRatio() no longer considers aspect-ratio. This also fixed
replaced elements' size when both "aspect-ratio:<ratio>" and
"contain:size" is specified.

This also makes us pass some of the aspect-ratio tests because we change
GetIntrinicRatio() into GetAspectRatio() in
nsLayoutUtils::IntrinsicForAxis() in Part5, which is used by nsBlockFrame
(via nsLayoutUtils::IntrinsicForContainer) to implement GetMinISize().

Differential Revision: https://phabricator.services.mozilla.com/D91229
2020-09-29 22:33:05 +00:00
..
crashtests Bug 772313 - Add a crashtest r=dholbert 2020-07-18 23:05:35 +00:00
tests Bug 1658343 - Propagate intrinsic sizes from SVG documents in embed/object to parent using IPC. r=kmag,dholbert 2020-09-21 02:09:57 +00:00
AutoReferenceChainGuard.h Bug 1223932 - delete guard object uses from the tree; r=jwalden 2020-07-30 14:22:38 +00:00
CSSClipPathInstance.cpp Bug 1652430 - Fix some clang warnings in SVG r=dholbert 2020-07-13 15:20:36 +00:00
CSSClipPathInstance.h Bug 1652395 - Replace 'typedef' by 'using' in SVG and SMIL code r=dholbert 2020-07-15 10:37:55 +00:00
CSSFilterInstance.cpp Bug 1653193 - Hide complex template instance PrimitiveAttributes. r=mstange 2020-07-21 08:39:35 +00:00
CSSFilterInstance.h Bug 1637130 - Rename visual overflow to ink overflow. r=dbaron 2020-07-20 20:17:36 +00:00
FilterInstance.cpp Bug 1656711. Support hardware accelerated <feGaussianBlur> SVG filters if the x and y radius are not equal with webrender. r=gw 2020-08-25 07:26:21 +00:00
FilterInstance.h Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj 2020-08-04 11:27:07 +00:00
ISVGDisplayableFrame.h Bug 1652395 - Replace 'typedef' by 'using' in SVG and SMIL code r=dholbert 2020-07-15 10:37:55 +00:00
ISVGSVGFrame.h Bug 1652253 - Update SVG include guards r=dholbert 2020-07-14 23:40:05 +00:00
SVGAFrame.cpp Bug 1259861 - Move everything else into the mozilla namespace in layout/svg r=dholbert 2020-07-11 02:20:20 +00:00
SVGClipPathFrame.cpp Bug 1652430 - Fix some clang warnings in SVG r=dholbert 2020-07-13 15:20:36 +00:00
SVGClipPathFrame.h Bug 1652395 - Replace 'typedef' by 'using' in SVG and SMIL code r=dholbert 2020-07-15 10:37:55 +00:00
SVGContainerFrame.cpp Bug 1259861 - Move everything else into the mozilla namespace in layout/svg r=dholbert 2020-07-11 02:20:20 +00:00
SVGContainerFrame.h Bug 1652253 - Update SVG include guards r=dholbert 2020-07-14 23:40:05 +00:00
SVGContextPaint.cpp Bug 1652430 - Fix some clang warnings in SVG r=dholbert 2020-07-13 15:20:36 +00:00
SVGContextPaint.h Bug 1652395 - Replace 'typedef' by 'using' in SVG and SMIL code r=dholbert 2020-07-15 10:37:55 +00:00
SVGFEContainerFrame.cpp Bug 1658455 - Remove eANIMATION and eFILTER from IsNodeOfType r=dholbert 2020-08-15 10:38:17 +00:00
SVGFEImageFrame.cpp Bug 1658455 - Remove eANIMATION and eFILTER from IsNodeOfType r=dholbert 2020-08-15 10:38:17 +00:00
SVGFELeafFrame.cpp Bug 1658455 - Remove eANIMATION and eFILTER from IsNodeOfType r=dholbert 2020-08-15 10:38:17 +00:00
SVGFEUnstyledLeafFrame.cpp Bug 1658455 - Remove eANIMATION and eFILTER from IsNodeOfType r=dholbert 2020-08-15 10:38:17 +00:00
SVGFilterFrame.cpp Bug 1259861 - Move everything else into the mozilla namespace in layout/svg r=dholbert 2020-07-11 02:20:20 +00:00
SVGFilterFrame.h Bug 1652017 - Remove unnecessary includes for expensive nsIFrame.h. r=emilio 2020-07-15 13:44:39 +00:00
SVGFilterInstance.cpp Bug 1259861 - Move everything else into the mozilla namespace in layout/svg r=dholbert 2020-07-11 02:20:20 +00:00
SVGFilterInstance.h Bug 1652395 - Replace 'typedef' by 'using' in SVG and SMIL code r=dholbert 2020-07-15 10:37:55 +00:00
SVGFilterPaintCallback.h Bug 1652395 - Replace 'typedef' by 'using' in SVG and SMIL code r=dholbert 2020-07-15 10:37:55 +00:00
SVGForeignObjectFrame.cpp Bug 1637130 - Rename visual overflow to ink overflow. r=dbaron 2020-07-20 20:17:36 +00:00
SVGForeignObjectFrame.h Bug 1652253 - Update SVG include guards r=dholbert 2020-07-14 23:40:05 +00:00
SVGGFrame.cpp Bug 1259861 - Move everything else into the mozilla namespace in layout/svg r=dholbert 2020-07-11 02:20:20 +00:00
SVGGFrame.h Bug 1652253 - Update SVG include guards r=dholbert 2020-07-14 23:40:05 +00:00
SVGGeometryFrame.cpp Bug 1654723 - Skip building DisplaySVGGeometry items if fill, stroke and markers are none. r=jwatt 2020-09-10 13:52:31 +00:00
SVGGeometryFrame.h Bug 1652395 - Replace 'typedef' by 'using' in SVG and SMIL code r=dholbert 2020-07-15 10:37:55 +00:00
SVGGradientFrame.cpp Bug 1667594 - Avoid including nsLayoutUtils.h in nsContainerFrame.h. r=emilio 2020-09-26 18:19:14 +00:00
SVGGradientFrame.h Bug 1653848 - Make SVGPaintServer and SVGGradientFrames queryable r=dholbert 2020-07-20 18:02:25 +00:00
SVGImageContext.cpp Bug 1617425 - Use cbindgen for SVG lengths. r=jwatt 2020-02-23 15:43:03 +00:00
SVGImageContext.h Bug 1652253 - Update SVG include guards r=dholbert 2020-07-14 23:40:05 +00:00
SVGImageFrame.cpp Bug 1259861 - Move everything else into the mozilla namespace in layout/svg r=dholbert 2020-07-11 02:20:20 +00:00
SVGImageFrame.h Bug 1667594 - Avoid including nsLayoutUtils.h from various headers. r=kats 2020-09-26 17:55:00 +00:00
SVGInnerSVGFrame.cpp Bug 1651404 - Move nsSVGDisplayableFrame and nsISVGSVGFrame to the mozilla namespace r=dholbert 2020-07-09 18:34:54 +00:00
SVGInnerSVGFrame.h Bug 1652253 - Update SVG include guards r=dholbert 2020-07-14 23:40:05 +00:00
SVGIntegrationUtils.cpp Bug 1661912 - Convert remaining typedefs in SVG code to 'using' r=emilio 2020-08-29 14:24:37 +00:00
SVGIntegrationUtils.h Bug 1637130 - Rename visual overflow to ink overflow. r=dbaron 2020-07-20 20:17:36 +00:00
SVGMarkerFrame.cpp Bug 1223932 - delete guard object uses from the tree; r=jwalden 2020-07-30 14:22:38 +00:00
SVGMarkerFrame.h Bug 1223932 - delete guard object uses from the tree; r=jwalden 2020-07-30 14:22:38 +00:00
SVGMaskFrame.cpp Bug 1259861 - Move everything else into the mozilla namespace in layout/svg r=dholbert 2020-07-11 02:20:20 +00:00
SVGMaskFrame.h Bug 1652395 - Replace 'typedef' by 'using' in SVG and SMIL code r=dholbert 2020-07-15 10:37:55 +00:00
SVGObserverUtils.cpp Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi 2020-09-23 15:17:15 +00:00
SVGObserverUtils.h Bug 1637130 - Rename visual overflow to ink overflow. r=dbaron 2020-07-20 20:17:36 +00:00
SVGOuterSVGFrame.cpp Bug 1660122 Part 7 - Implement GetAspectRatio(). r=emilio 2020-09-29 22:33:05 +00:00
SVGOuterSVGFrame.h Bug 1660122 Part 3 - Make nsIFrame::GetIntrinsicRatio() a const method. r=boris 2020-09-29 22:32:40 +00:00
SVGPaintServerFrame.cpp Bug 1653848 - Make SVGPaintServer and SVGGradientFrames queryable r=dholbert 2020-07-20 18:02:25 +00:00
SVGPaintServerFrame.h Bug 1223932 - delete guard object uses from the tree; r=jwalden 2020-07-30 14:22:38 +00:00
SVGPatternFrame.cpp Bug 1653848 - Make SVGPaintServer and SVGGradientFrames queryable r=dholbert 2020-07-20 18:02:25 +00:00
SVGPatternFrame.h Bug 1653848 - Make SVGPaintServer and SVGGradientFrames queryable r=dholbert 2020-07-20 18:02:25 +00:00
SVGStopFrame.cpp Bug 1653848 - Make SVGPaintServer and SVGGradientFrames queryable r=dholbert 2020-07-20 18:02:25 +00:00
SVGSwitchFrame.cpp Bug 1259861 - Move everything else into the mozilla namespace in layout/svg r=dholbert 2020-07-11 02:20:20 +00:00
SVGSymbolFrame.cpp Bug 1648737 - Move SVGAFrame SVGGFrame SVGGenericContainerFrame SVGInnerSVGFrame SVGMarkerFrame SVGMaskFrame SVGSymbolFrame SVGViewportFrame to the mozilla namespace r=dholbert 2020-06-27 05:39:42 +00:00
SVGSymbolFrame.h Bug 1652253 - Update SVG include guards r=dholbert 2020-07-14 23:40:05 +00:00
SVGTextFrame.cpp Bug 1603629 - fix dominant-baseline hanging and mathematical r=jfkthame 2020-09-04 11:00:40 +00:00
SVGTextFrame.h Bug 1459905 - Merge DOMSVGTranslatePoint and DOMSVGPoint and fix updates r=emilio 2020-08-25 14:38:32 +00:00
SVGUseFrame.cpp Bug 1648550 - Fix getBoundingClientRect for use element position r=emilio 2020-08-25 23:36:18 +00:00
SVGUseFrame.h Bug 1648550 - Fix getBoundingClientRect for use element position r=emilio 2020-08-25 23:36:18 +00:00
SVGUtils.cpp Bug 1661912 - Convert remaining typedefs in SVG code to 'using' r=emilio 2020-08-29 14:24:37 +00:00
SVGUtils.h Bug 1648550 - Fix getBoundingClientRect for use element position r=emilio 2020-08-25 23:36:18 +00:00
SVGViewFrame.cpp Bug 1637130 - Rename visual overflow to ink overflow. r=dbaron 2020-07-20 20:17:36 +00:00
SVGViewportFrame.cpp Bug 1259861 - Move everything else into the mozilla namespace in layout/svg r=dholbert 2020-07-11 02:20:20 +00:00
SVGViewportFrame.h Bug 1652253 - Update SVG include guards r=dholbert 2020-07-14 23:40:05 +00:00
moz.build Bug 1653848 - Make SVGPaintServer and SVGGradientFrames queryable r=dholbert 2020-07-20 18:02:25 +00:00
svg.css Bug 1659267 - Remove usages of -moz-user-select across the Firefox codebase. r=emilio,marionette-reviewers,geckoview-reviewers,preferences-reviewers,whimboo,agi 2020-08-18 23:37:51 +00:00