Issue #2737 - Part 1: Base implementation of SVGGeometryElement.

Mostly mechanical changes to generalize path geometry for all SVG draw
elements. No user-exposed changes.
This commit is contained in:
Moonchild 2025-04-27 18:03:48 +02:00 committed by roytam1
commit fd4a224d1d
45 changed files with 368 additions and 319 deletions

View file

@ -46,8 +46,8 @@
#include "nsSVGOuterSVGFrame.h"
#include "mozilla/dom/SVGClipPathElement.h"
#include "mozilla/dom/SVGPathElement.h"
#include "nsSVGPathGeometryElement.h"
#include "nsSVGPathGeometryFrame.h"
#include "SVGGeometryElement.h"
#include "SVGGeometryFrame.h"
#include "nsSVGPaintServerFrame.h"
#include "mozilla/dom/SVGSVGElement.h"
#include "nsTextFrame.h"
@ -415,7 +415,7 @@ nsSVGUtils::GetCanvasTM(nsIFrame *aFrame)
return containerFrame->GetCanvasTM();
}
return static_cast<nsSVGPathGeometryFrame*>(aFrame)->GetCanvasTM();
return static_cast<SVGGeometryFrame*>(aFrame)->GetCanvasTM();
}
gfxMatrix
@ -1223,7 +1223,7 @@ nsSVGUtils::CanOptimizeOpacity(nsIFrame *aFrame)
}
nsIAtom *type = aFrame->GetType();
if (type != nsGkAtoms::svgImageFrame &&
type != nsGkAtoms::svgPathGeometryFrame) {
type != nsGkAtoms::svgGeometryFrame) {
return false;
}
if (aFrame->StyleEffects()->HasFilters()) {
@ -1329,7 +1329,7 @@ nsSVGUtils::PathExtentsToMaxStrokeExtents(const gfxRect& aPathExtents,
/*static*/ gfxRect
nsSVGUtils::PathExtentsToMaxStrokeExtents(const gfxRect& aPathExtents,
nsSVGPathGeometryFrame* aFrame,
SVGGeometryFrame* aFrame,
const gfxMatrix& aMatrix)
{
bool strokeMayHaveCorners =