mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 15:28:39 +09:00
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:
parent
8ae2b45691
commit
fd4a224d1d
45 changed files with 368 additions and 319 deletions
|
|
@ -11,8 +11,8 @@
|
|||
#include "mozilla/dom/SVGClipPathElement.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsSVGEffects.h"
|
||||
#include "nsSVGPathGeometryElement.h"
|
||||
#include "nsSVGPathGeometryFrame.h"
|
||||
#include "SVGGeometryElement.h"
|
||||
#include "SVGGeometryFrame.h"
|
||||
#include "nsSVGUtils.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
|
@ -54,10 +54,10 @@ nsSVGClipPathFrame::ApplyClipPath(gfxContext& aContext,
|
|||
IsTrivial(&singleClipPathChild);
|
||||
|
||||
if (singleClipPathChild) {
|
||||
nsSVGPathGeometryFrame* pathFrame = do_QueryFrame(singleClipPathChild);
|
||||
SVGGeometryFrame* pathFrame = do_QueryFrame(singleClipPathChild);
|
||||
if (pathFrame) {
|
||||
nsSVGPathGeometryElement* pathElement =
|
||||
static_cast<nsSVGPathGeometryElement*>(pathFrame->GetContent());
|
||||
SVGGeometryElement* pathElement =
|
||||
static_cast<SVGGeometryElement*>(pathFrame->GetContent());
|
||||
gfxMatrix toChildsUserSpace = pathElement->
|
||||
PrependLocalTransformsTo(GetClipPathTransform(aClippedFrame) * aMatrix,
|
||||
eUserSpaceToParent);
|
||||
|
|
@ -214,7 +214,7 @@ nsSVGClipPathFrame::GetClipMask(gfxContext& aReferenceContext,
|
|||
}
|
||||
|
||||
// Our children have NS_STATE_SVG_CLIPPATH_CHILD set on them, and
|
||||
// nsSVGPathGeometryFrame::Render checks for that state bit and paints
|
||||
// SVGGeometryFrame::Render checks for that state bit and paints
|
||||
// only the geometry (opaque black) if set.
|
||||
DrawResult result = SVGFrame->PaintSVG(*ctx, toChildsUserSpace);
|
||||
if (aResult) {
|
||||
|
|
@ -394,7 +394,7 @@ nsSVGClipPathFrame::IsValid()
|
|||
|
||||
nsIAtom* grandKidType = grandKid->GetType();
|
||||
|
||||
if (grandKidType != nsGkAtoms::svgPathGeometryFrame &&
|
||||
if (grandKidType != nsGkAtoms::svgGeometryFrame &&
|
||||
grandKidType != nsGkAtoms::svgTextFrame) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -402,7 +402,7 @@ nsSVGClipPathFrame::IsValid()
|
|||
continue;
|
||||
}
|
||||
|
||||
if (kidType != nsGkAtoms::svgPathGeometryFrame &&
|
||||
if (kidType != nsGkAtoms::svgGeometryFrame &&
|
||||
kidType != nsGkAtoms::svgTextFrame) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue