mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-24 03:19:06 +00:00
Merge mozilla-inbound to mozilla-central a=merge
This commit is contained in:
commit
a85880b516
@ -7694,7 +7694,7 @@ nsresult QuotaClient::InitOrigin(PersistenceType aPersistenceType,
|
||||
}
|
||||
}
|
||||
|
||||
MOZ_ASSERT(usage >= 0);
|
||||
MOZ_DIAGNOSTIC_ASSERT(usage >= 0);
|
||||
|
||||
if (!aForGetUsage) {
|
||||
InitUsageForOrigin(aOrigin, usage);
|
||||
|
@ -71,8 +71,8 @@ class SMILTimeValueSpec {
|
||||
void UnregisterFromReferencedElement(Element* aElement);
|
||||
SMILTimedElement* GetTimedElement(Element* aElement);
|
||||
bool IsWhitelistedEvent();
|
||||
void RegisterEventListener(Element* aElement);
|
||||
void UnregisterEventListener(Element* aElement);
|
||||
void RegisterEventListener(Element* aTarget);
|
||||
void UnregisterEventListener(Element* aTarget);
|
||||
void HandleEvent(Event* aEvent);
|
||||
bool CheckRepeatEventDetail(Event* aEvent);
|
||||
SMILTimeValue ConvertBetweenTimeContainers(
|
||||
|
@ -175,12 +175,12 @@ class SMILTimedElement {
|
||||
* SMILTimeValueSpec object. Used when an ID assignment changes and hence
|
||||
* all the previously associated instance times become invalid.
|
||||
*
|
||||
* @param aSpec The SMILTimeValueSpec object whose created
|
||||
* @param aCreator The SMILTimeValueSpec object whose created
|
||||
* SMILInstanceTime's should be removed.
|
||||
* @param aIsBegin true if the times to be removed represent begin
|
||||
* times or false if they are end times.
|
||||
*/
|
||||
void RemoveInstanceTimesForCreator(const SMILTimeValueSpec* aSpec,
|
||||
void RemoveInstanceTimesForCreator(const SMILTimeValueSpec* aCreator,
|
||||
bool aIsBegin);
|
||||
|
||||
/**
|
||||
|
@ -165,7 +165,7 @@ class DOMSVGLength final : public nsISupports, public nsWrapperCache {
|
||||
// WebIDL
|
||||
uint16_t UnitType();
|
||||
float GetValue(ErrorResult& aRv);
|
||||
void SetValue(float aValue, ErrorResult& aRv);
|
||||
void SetValue(float aUserUnitValue, ErrorResult& aRv);
|
||||
float ValueInSpecifiedUnits();
|
||||
void SetValueInSpecifiedUnits(float aValue, ErrorResult& aRv);
|
||||
void GetValueAsString(nsAString& aValue);
|
||||
|
@ -105,15 +105,15 @@ class DOMSVGNumberList final : public nsISupports, public nsWrapperCache {
|
||||
return LengthNoFlush();
|
||||
}
|
||||
void Clear(ErrorResult& error);
|
||||
already_AddRefed<DOMSVGNumber> Initialize(DOMSVGNumber& newItem,
|
||||
already_AddRefed<DOMSVGNumber> Initialize(DOMSVGNumber& aItem,
|
||||
ErrorResult& error);
|
||||
already_AddRefed<DOMSVGNumber> GetItem(uint32_t index, ErrorResult& error);
|
||||
already_AddRefed<DOMSVGNumber> IndexedGetter(uint32_t index, bool& found,
|
||||
ErrorResult& error);
|
||||
already_AddRefed<DOMSVGNumber> InsertItemBefore(DOMSVGNumber& newItem,
|
||||
already_AddRefed<DOMSVGNumber> InsertItemBefore(DOMSVGNumber& aItem,
|
||||
uint32_t index,
|
||||
ErrorResult& error);
|
||||
already_AddRefed<DOMSVGNumber> ReplaceItem(DOMSVGNumber& newItem,
|
||||
already_AddRefed<DOMSVGNumber> ReplaceItem(DOMSVGNumber& aItem,
|
||||
uint32_t index,
|
||||
ErrorResult& error);
|
||||
already_AddRefed<DOMSVGNumber> RemoveItem(uint32_t index, ErrorResult& error);
|
||||
|
@ -134,7 +134,7 @@ class DOMSVGPathSeg : public nsWrapperCache {
|
||||
* encoded into a float, followed by its arguments in the same order as they
|
||||
* are given in the <path> element's 'd' attribute).
|
||||
*/
|
||||
void ToSVGPathSegEncodedData(float* aData);
|
||||
void ToSVGPathSegEncodedData(float* aRaw);
|
||||
|
||||
/**
|
||||
* The type of this path segment.
|
||||
@ -439,9 +439,9 @@ class DOMSVGPathSegArcAbs : public DOMSVGPathSeg {
|
||||
float Angle();
|
||||
void SetAngle(float aAngle, ErrorResult& rv);
|
||||
bool LargeArcFlag();
|
||||
void SetLargeArcFlag(bool aFlag, ErrorResult& rv);
|
||||
void SetLargeArcFlag(bool aLargeArcFlag, ErrorResult& rv);
|
||||
bool SweepFlag();
|
||||
void SetSweepFlag(bool aFlag, ErrorResult& rv);
|
||||
void SetSweepFlag(bool aSweepFlag, ErrorResult& rv);
|
||||
|
||||
protected:
|
||||
float mArgs[7];
|
||||
@ -475,9 +475,9 @@ class DOMSVGPathSegArcRel : public DOMSVGPathSeg {
|
||||
float Angle();
|
||||
void SetAngle(float aAngle, ErrorResult& rv);
|
||||
bool LargeArcFlag();
|
||||
void SetLargeArcFlag(bool aFlag, ErrorResult& rv);
|
||||
void SetLargeArcFlag(bool aLargeArcFlag, ErrorResult& rv);
|
||||
bool SweepFlag();
|
||||
void SetSweepFlag(bool aFlag, ErrorResult& rv);
|
||||
void SetSweepFlag(bool aSweepFlag, ErrorResult& rv);
|
||||
|
||||
protected:
|
||||
float mArgs[7];
|
||||
|
@ -54,7 +54,7 @@ class DOMSVGTransform final : public nsWrapperCache {
|
||||
/**
|
||||
* Ctor for creating an unowned copy. Used with Clone().
|
||||
*/
|
||||
explicit DOMSVGTransform(const SVGTransform& aMatrix);
|
||||
explicit DOMSVGTransform(const SVGTransform& aTransform);
|
||||
|
||||
/**
|
||||
* Create an unowned copy of an owned transform. The caller is responsible for
|
||||
|
@ -76,9 +76,8 @@ class SVGAElement final : public SVGAElementBase, public Link {
|
||||
void SetPing(const nsAString& aPing, mozilla::ErrorResult& rv);
|
||||
void GetRel(nsAString& aRel);
|
||||
void SetRel(const nsAString& aRel, mozilla::ErrorResult& rv);
|
||||
void SetReferrerPolicy(const nsAString& aReferrerPolicy,
|
||||
mozilla::ErrorResult& rv);
|
||||
void GetReferrerPolicy(nsAString& aReferrerPolicy);
|
||||
void SetReferrerPolicy(const nsAString& aPolicy, mozilla::ErrorResult& rv);
|
||||
void GetReferrerPolicy(nsAString& aPolicy);
|
||||
nsDOMTokenList* RelList();
|
||||
void GetHreflang(nsAString& aHreflang);
|
||||
void SetHreflang(const nsAString& aHreflang, mozilla::ErrorResult& rv);
|
||||
|
@ -34,7 +34,7 @@ class SVGAnimatedClass {
|
||||
void GetBaseValue(nsAString& aValue, const SVGElement* aSVGElement) const;
|
||||
|
||||
void SetAnimValue(const nsAString& aValue, SVGElement* aSVGElement);
|
||||
void GetAnimValue(nsAString& aValue, const SVGElement* aSVGElement) const;
|
||||
void GetAnimValue(nsAString& aResult, const SVGElement* aSVGElement) const;
|
||||
bool IsAnimated() const { return !!mAnimVal; }
|
||||
|
||||
already_AddRefed<mozilla::dom::DOMSVGAnimatedString> ToDOMAnimatedString(
|
||||
|
@ -41,7 +41,8 @@ class SVGAnimatedIntegerPair {
|
||||
nsresult SetBaseValueString(const nsAString& aValue, SVGElement* aSVGElement);
|
||||
void GetBaseValueString(nsAString& aValue) const;
|
||||
|
||||
void SetBaseValue(int32_t aValue, PairIndex aIndex, SVGElement* aSVGElement);
|
||||
void SetBaseValue(int32_t aValue, PairIndex aPairIndex,
|
||||
SVGElement* aSVGElement);
|
||||
void SetBaseValues(int32_t aValue1, int32_t aValue2, SVGElement* aSVGElement);
|
||||
int32_t GetBaseValue(PairIndex aIndex) const {
|
||||
return mBaseVal[aIndex == eFirst ? 0 : 1];
|
||||
|
@ -286,22 +286,22 @@ nsresult SVGAnimatedLength::ConvertToSpecifiedUnits(uint16_t unitType,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult SVGAnimatedLength::NewValueSpecifiedUnits(uint16_t unitType,
|
||||
float valueInSpecifiedUnits,
|
||||
nsresult SVGAnimatedLength::NewValueSpecifiedUnits(uint16_t aUnitType,
|
||||
float aValueInSpecifiedUnits,
|
||||
SVGElement* aSVGElement) {
|
||||
NS_ENSURE_FINITE(valueInSpecifiedUnits, NS_ERROR_ILLEGAL_VALUE);
|
||||
NS_ENSURE_FINITE(aValueInSpecifiedUnits, NS_ERROR_ILLEGAL_VALUE);
|
||||
|
||||
if (!IsValidUnitType(unitType)) return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
|
||||
if (!IsValidUnitType(aUnitType)) return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
|
||||
|
||||
if (mIsBaseSet && mBaseVal == valueInSpecifiedUnits &&
|
||||
mSpecifiedUnitType == uint8_t(unitType)) {
|
||||
if (mIsBaseSet && mBaseVal == aValueInSpecifiedUnits &&
|
||||
mSpecifiedUnitType == uint8_t(aUnitType)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsAttrValue emptyOrOldValue = aSVGElement->WillChangeLength(mAttrEnum);
|
||||
mBaseVal = valueInSpecifiedUnits;
|
||||
mBaseVal = aValueInSpecifiedUnits;
|
||||
mIsBaseSet = true;
|
||||
mSpecifiedUnitType = uint8_t(unitType);
|
||||
mSpecifiedUnitType = uint8_t(aUnitType);
|
||||
if (!mIsAnimated) {
|
||||
mAnimVal = mBaseVal;
|
||||
} else {
|
||||
|
@ -187,7 +187,8 @@ class SVGAnimatedLength {
|
||||
bool aDoSetAttr);
|
||||
nsresult SetAnimValue(float aValue, SVGElement* aSVGElement);
|
||||
void SetAnimValueInSpecifiedUnits(float aValue, SVGElement* aSVGElement);
|
||||
nsresult NewValueSpecifiedUnits(uint16_t aUnitType, float aValue,
|
||||
nsresult NewValueSpecifiedUnits(uint16_t aUnitType,
|
||||
float aValueInSpecifiedUnits,
|
||||
SVGElement* aSVGElement);
|
||||
nsresult ConvertToSpecifiedUnits(uint16_t aUnitType, SVGElement* aSVGElement);
|
||||
already_AddRefed<DOMSVGLength> ToDOMBaseVal(SVGElement* aSVGElement);
|
||||
|
@ -61,8 +61,8 @@ class SVGAnimatedLengthList {
|
||||
return mAnimVal ? *mAnimVal : mBaseVal;
|
||||
}
|
||||
|
||||
nsresult SetAnimValue(const SVGLengthList& aValue, dom::SVGElement* aElement,
|
||||
uint32_t aAttrEnum);
|
||||
nsresult SetAnimValue(const SVGLengthList& aNewAnimValue,
|
||||
dom::SVGElement* aElement, uint32_t aAttrEnum);
|
||||
|
||||
void ClearAnimValue(dom::SVGElement* aElement, uint32_t aAttrEnum);
|
||||
|
||||
|
@ -61,8 +61,8 @@ class SVGAnimatedNumberList {
|
||||
return mAnimVal ? *mAnimVal : mBaseVal;
|
||||
}
|
||||
|
||||
nsresult SetAnimValue(const SVGNumberList& aValue, dom::SVGElement* aElement,
|
||||
uint32_t aAttrEnum);
|
||||
nsresult SetAnimValue(const SVGNumberList& aNewAnimValue,
|
||||
dom::SVGElement* aElement, uint32_t aAttrEnum);
|
||||
|
||||
void ClearAnimValue(dom::SVGElement* aElement, uint32_t aAttrEnum);
|
||||
|
||||
|
@ -42,7 +42,8 @@ class SVGAnimatedNumberPair {
|
||||
nsresult SetBaseValueString(const nsAString& aValue, SVGElement* aSVGElement);
|
||||
void GetBaseValueString(nsAString& aValue) const;
|
||||
|
||||
void SetBaseValue(float aValue, PairIndex aIndex, SVGElement* aSVGElement);
|
||||
void SetBaseValue(float aValue, PairIndex aPairIndex,
|
||||
SVGElement* aSVGElement);
|
||||
void SetBaseValues(float aValue1, float aValue2, SVGElement* aSVGElement);
|
||||
float GetBaseValue(PairIndex aIndex) const {
|
||||
return mBaseVal[aIndex == eFirst ? 0 : 1];
|
||||
|
@ -184,21 +184,22 @@ nsresult SVGAnimatedOrient::ConvertToSpecifiedUnits(uint16_t unitType,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult SVGAnimatedOrient::NewValueSpecifiedUnits(uint16_t unitType,
|
||||
float valueInSpecifiedUnits,
|
||||
nsresult SVGAnimatedOrient::NewValueSpecifiedUnits(uint16_t aUnitType,
|
||||
float aValueInSpecifiedUnits,
|
||||
SVGElement* aSVGElement) {
|
||||
NS_ENSURE_FINITE(valueInSpecifiedUnits, NS_ERROR_ILLEGAL_VALUE);
|
||||
NS_ENSURE_FINITE(aValueInSpecifiedUnits, NS_ERROR_ILLEGAL_VALUE);
|
||||
|
||||
if (!IsValidAngleUnitType(unitType)) return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
|
||||
if (!IsValidAngleUnitType(aUnitType)) return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
|
||||
|
||||
if (mBaseVal == valueInSpecifiedUnits && mBaseValUnit == uint8_t(unitType) &&
|
||||
if (mBaseVal == aValueInSpecifiedUnits &&
|
||||
mBaseValUnit == uint8_t(aUnitType) &&
|
||||
mBaseType == SVG_MARKER_ORIENT_ANGLE)
|
||||
return NS_OK;
|
||||
|
||||
AutoChangeOrientNotifier notifier(this, aSVGElement);
|
||||
|
||||
mBaseVal = valueInSpecifiedUnits;
|
||||
mBaseValUnit = uint8_t(unitType);
|
||||
mBaseVal = aValueInSpecifiedUnits;
|
||||
mBaseValUnit = uint8_t(aUnitType);
|
||||
mBaseType = SVG_MARKER_ORIENT_ANGLE;
|
||||
if (!mIsAnimated) {
|
||||
mAnimVal = mBaseVal;
|
||||
|
@ -64,7 +64,7 @@ class SVGAnimatedOrient {
|
||||
bool aDoSetAttr);
|
||||
nsresult SetBaseType(SVGEnumValue aValue, SVGElement* aSVGElement);
|
||||
void SetAnimValue(float aValue, uint8_t aUnit, SVGElement* aSVGElement);
|
||||
void SetAnimType(SVGEnumValue aType, SVGElement* aSVGElement);
|
||||
void SetAnimType(SVGEnumValue aValue, SVGElement* aSVGElement);
|
||||
|
||||
uint8_t GetBaseValueUnit() const { return mBaseValUnit; }
|
||||
uint8_t GetAnimValueUnit() const { return mAnimValUnit; }
|
||||
@ -92,7 +92,8 @@ class SVGAnimatedOrient {
|
||||
bool mIsAnimated;
|
||||
|
||||
void SetBaseValueInSpecifiedUnits(float aValue, SVGElement* aSVGElement);
|
||||
nsresult NewValueSpecifiedUnits(uint16_t aUnitType, float aValue,
|
||||
nsresult NewValueSpecifiedUnits(uint16_t aUnitType,
|
||||
float aValueInSpecifiedUnits,
|
||||
SVGElement* aSVGElement);
|
||||
nsresult ConvertToSpecifiedUnits(uint16_t aUnitType, SVGElement* aSVGElement);
|
||||
already_AddRefed<dom::DOMSVGAngle> ToDOMBaseVal(SVGElement* aSVGElement);
|
||||
|
@ -65,7 +65,8 @@ class SVGAnimatedPathSegList final {
|
||||
return mAnimVal ? *mAnimVal : mBaseVal;
|
||||
}
|
||||
|
||||
nsresult SetAnimValue(const SVGPathData& aValue, dom::SVGElement* aElement);
|
||||
nsresult SetAnimValue(const SVGPathData& aNewAnimValue,
|
||||
dom::SVGElement* aElement);
|
||||
|
||||
void ClearAnimValue(dom::SVGElement* aElement);
|
||||
|
||||
|
@ -64,7 +64,8 @@ class SVGAnimatedPointList {
|
||||
return mAnimVal ? *mAnimVal : mBaseVal;
|
||||
}
|
||||
|
||||
nsresult SetAnimValue(const SVGPointList& aValue, dom::SVGElement* aElement);
|
||||
nsresult SetAnimValue(const SVGPointList& aNewAnimValue,
|
||||
dom::SVGElement* aElement);
|
||||
|
||||
void ClearAnimValue(dom::SVGElement* aElement);
|
||||
|
||||
|
@ -38,7 +38,7 @@ class SVGAnimatedString {
|
||||
}
|
||||
|
||||
void SetAnimValue(const nsAString& aValue, SVGElement* aSVGElement);
|
||||
void GetAnimValue(nsAString& aValue, const SVGElement* aSVGElement) const;
|
||||
void GetAnimValue(nsAString& aResult, const SVGElement* aSVGElement) const;
|
||||
|
||||
// Returns true if the animated value of this string has been explicitly
|
||||
// set (either by animation, or by taking on the base value which has been
|
||||
|
@ -69,7 +69,7 @@ class SVGAnimatedTransformList {
|
||||
return mAnimVal ? *mAnimVal : mBaseVal;
|
||||
}
|
||||
|
||||
nsresult SetAnimValue(const SVGTransformList& aNewAnimValue,
|
||||
nsresult SetAnimValue(const SVGTransformList& aValue,
|
||||
dom::SVGElement* aElement);
|
||||
|
||||
void ClearAnimValue(dom::SVGElement* aElement);
|
||||
@ -134,7 +134,7 @@ class SVGAnimatedTransformList {
|
||||
SMILValue& aValue, bool& aPreventCachingOfSandwich) const override;
|
||||
virtual SMILValue GetBaseValue() const override;
|
||||
virtual void ClearAnimValue() override;
|
||||
virtual nsresult SetAnimValue(const SMILValue& aValue) override;
|
||||
virtual nsresult SetAnimValue(const SMILValue& aNewAnimValue) override;
|
||||
|
||||
protected:
|
||||
static void ParseValue(const nsAString& aSpec, const nsAtom* aTransformType,
|
||||
|
@ -578,8 +578,7 @@ class SVGElement : public SVGElementBase // nsIContent
|
||||
static SVGEnumMapping sSVGUnitTypesMap[];
|
||||
|
||||
private:
|
||||
void UnsetAttrInternal(int32_t aNameSpaceID, nsAtom* aAttribute,
|
||||
bool aNotify);
|
||||
void UnsetAttrInternal(int32_t aNameSpaceID, nsAtom* aName, bool aNotify);
|
||||
|
||||
SVGAnimatedClass mClassAttribute;
|
||||
nsAutoPtr<nsAttrValue> mClassAnimAttr;
|
||||
|
@ -53,7 +53,7 @@ class SVGLength {
|
||||
* This method returns true, unless there was a parse failure, in which
|
||||
* case it returns false (and the length is left unchanged).
|
||||
*/
|
||||
bool SetValueFromString(const nsAString &aValue);
|
||||
bool SetValueFromString(const nsAString &aString);
|
||||
|
||||
/**
|
||||
* This will usually return a valid, finite number. There is one exception
|
||||
|
@ -76,7 +76,7 @@ class SVGMotionSMILAnimationFunction final : public SMILAnimationFunction {
|
||||
|
||||
// Helpers for GetValues
|
||||
void MarkStaleIfAttributeAffectsPath(nsAtom* aAttribute);
|
||||
void RebuildPathAndVertices(const nsIContent* aContextElem);
|
||||
void RebuildPathAndVertices(const nsIContent* aTargetElement);
|
||||
void RebuildPathAndVerticesFromMpathElem(dom::SVGMPathElement* aMpathElem);
|
||||
void RebuildPathAndVerticesFromPathAttr();
|
||||
void RebuildPathAndVerticesFromBasicAttrs(const nsIContent* aContextElem);
|
||||
|
@ -66,7 +66,8 @@ class SVGMotionSMILPathUtils {
|
||||
|
||||
protected:
|
||||
// Helper methods
|
||||
bool ParseCoordinatePair(const nsAString& aStr, float& aXVal, float& aYVal);
|
||||
bool ParseCoordinatePair(const nsAString& aCoordPairStr, float& aXVal,
|
||||
float& aYVal);
|
||||
|
||||
// Member data
|
||||
const dom::SVGElement* mSVGElement; // context for converting to user units
|
||||
|
@ -135,7 +135,7 @@ class SVGPathData {
|
||||
|
||||
float GetPathLength() const;
|
||||
|
||||
uint32_t GetPathSegAtLength(float aLength) const;
|
||||
uint32_t GetPathSegAtLength(float aDistance) const;
|
||||
|
||||
void GetMarkerPositioningData(nsTArray<SVGMark>* aMarks) const;
|
||||
|
||||
@ -148,7 +148,7 @@ class SVGPathData {
|
||||
* Returns true, except on OOM, in which case returns false.
|
||||
*/
|
||||
bool GetDistancesFromOriginToEndsOfVisibleSegments(
|
||||
FallibleTArray<double>* aArray) const;
|
||||
FallibleTArray<double>* aOutput) const;
|
||||
|
||||
/**
|
||||
* This returns a path without the extra little line segments that
|
||||
@ -157,7 +157,8 @@ class SVGPathData {
|
||||
*/
|
||||
already_AddRefed<Path> BuildPathForMeasuring() const;
|
||||
|
||||
already_AddRefed<Path> BuildPath(PathBuilder* aBuilder, uint8_t aCapStyle,
|
||||
already_AddRefed<Path> BuildPath(PathBuilder* aBuilder,
|
||||
uint8_t aStrokeLineCap,
|
||||
Float aStrokeWidth) const;
|
||||
/**
|
||||
* This function tries to build the path by an array of StylePathCommand,
|
||||
@ -166,7 +167,7 @@ class SVGPathData {
|
||||
*/
|
||||
static already_AddRefed<Path> BuildPath(
|
||||
const nsTArray<StylePathCommand>& aPath, PathBuilder* aBuilder,
|
||||
uint8_t aCapStyle, Float aStrokeWidth, float aZoomFactor = 1.0);
|
||||
uint8_t aStrokeLineCap, Float aStrokeWidth, float aZoomFactor = 1.0);
|
||||
|
||||
const_iterator begin() const { return mData.Elements(); }
|
||||
const_iterator end() const { return mData.Elements() + mData.Length(); }
|
||||
|
@ -64,7 +64,7 @@ class SVGViewportElement : public SVGGraphicsElement {
|
||||
|
||||
// SVGViewportElement methods:
|
||||
|
||||
float GetLength(uint8_t mCtxType);
|
||||
float GetLength(uint8_t aCtxType);
|
||||
|
||||
// public helpers:
|
||||
|
||||
|
@ -633,9 +633,9 @@ gfxMatrix SVGGeometryFrame::GetCanvasTM() {
|
||||
}
|
||||
|
||||
void SVGGeometryFrame::Render(gfxContext* aContext, uint32_t aRenderComponents,
|
||||
const gfxMatrix& aNewTransform,
|
||||
const gfxMatrix& aTransform,
|
||||
imgDrawingParams& aImgParams) {
|
||||
MOZ_ASSERT(!aNewTransform.IsSingular());
|
||||
MOZ_ASSERT(!aTransform.IsSingular());
|
||||
|
||||
DrawTarget* drawTarget = aContext->GetDrawTarget();
|
||||
|
||||
@ -655,7 +655,7 @@ void SVGGeometryFrame::Render(gfxContext* aContext, uint32_t aRenderComponents,
|
||||
// set it unnecessarily if we return early (it's an expensive operation for
|
||||
// some backends).
|
||||
gfxContextMatrixAutoSaveRestore autoRestoreTransform(aContext);
|
||||
aContext->SetMatrixDouble(aNewTransform);
|
||||
aContext->SetMatrixDouble(aTransform);
|
||||
|
||||
if (GetStateBits() & NS_STATE_SVG_CLIPPATH_CHILD) {
|
||||
// We don't complicate this code with GetAsSimplePath since the cost of
|
||||
|
@ -123,7 +123,7 @@ class SVGGeometryFrame : public nsFrame, public nsSVGDisplayableFrame {
|
||||
* @param aMatrix The transform that must be multiplied onto aContext to
|
||||
* establish this frame's SVG user space.
|
||||
*/
|
||||
void PaintMarkers(gfxContext& aContext, const gfxMatrix& aMatrix,
|
||||
void PaintMarkers(gfxContext& aContext, const gfxMatrix& aTransform,
|
||||
imgDrawingParams& aImgParams);
|
||||
};
|
||||
} // namespace mozilla
|
||||
|
@ -573,7 +573,7 @@ class SVGFilterObserverList : public nsISupports {
|
||||
public:
|
||||
SVGFilterObserverList(const nsTArray<nsStyleFilter>& aFilters,
|
||||
nsIContent* aFilteredElement,
|
||||
nsIFrame* aFiltedFrame = nullptr);
|
||||
nsIFrame* aFilteredFrame = nullptr);
|
||||
|
||||
bool ReferencesValidResources();
|
||||
void Invalidate() { OnRenderingChange(); }
|
||||
|
@ -251,7 +251,7 @@ class SVGObserverUtils {
|
||||
* Get the paint server for aPaintedFrame.
|
||||
*/
|
||||
static nsSVGPaintServerFrame* GetAndObservePaintServer(
|
||||
nsIFrame* aPaintedFrame, nsStyleSVGPaint nsStyleSVG::*aPaint);
|
||||
nsIFrame* aTargetFrame, nsStyleSVGPaint nsStyleSVG::*aPaint);
|
||||
|
||||
/**
|
||||
* Get the start/mid/end-markers for the given frame, and add the frame as
|
||||
|
@ -146,7 +146,7 @@ class nsFilterInstance {
|
||||
* @param aPreFilterDirtyRegion [optional] The pre-filter area of
|
||||
* the filtered element that changed, in app units. Only required if you
|
||||
* will call ComputePostFilterDirtyRegion().
|
||||
* @param aOverridePreFilterVisualOverflowRect [optional] Use a different
|
||||
* @param aPreFilterVisualOverflowRectOverride [optional] Use a different
|
||||
* visual overflow rect for the target element.
|
||||
* @param aOverrideBBox [optional] Use a different SVG bbox for the target
|
||||
* element. Must be non-null if aTargetFrame is null.
|
||||
@ -159,7 +159,7 @@ class nsFilterInstance {
|
||||
const gfxMatrix& aPaintTransform,
|
||||
const nsRegion* aPostFilterDirtyRegion = nullptr,
|
||||
const nsRegion* aPreFilterDirtyRegion = nullptr,
|
||||
const nsRect* aOverridePreFilterVisualOverflowRect = nullptr,
|
||||
const nsRect* aPreFilterVisualOverflowRectOverride = nullptr,
|
||||
const gfxRect* aOverrideBBox = nullptr);
|
||||
|
||||
/**
|
||||
@ -227,7 +227,7 @@ class nsFilterInstance {
|
||||
* Creates a SourceSurface for either the FillPaint or StrokePaint graph
|
||||
* nodes
|
||||
*/
|
||||
void BuildSourcePaint(SourceInfo* aPrimitive, imgDrawingParams& aImgParams);
|
||||
void BuildSourcePaint(SourceInfo* aSource, imgDrawingParams& aImgParams);
|
||||
|
||||
/**
|
||||
* Creates a SourceSurface for either the FillPaint and StrokePaint graph
|
||||
|
@ -43,7 +43,7 @@ class nsSVGGradientFrame : public nsSVGPaintServerFrame {
|
||||
virtual already_AddRefed<gfxPattern> GetPaintServerPattern(
|
||||
nsIFrame* aSource, const DrawTarget* aDrawTarget,
|
||||
const gfxMatrix& aContextMatrix,
|
||||
nsStyleSVGPaint nsStyleSVG::*aFillOrStroke, float aOpacity,
|
||||
nsStyleSVGPaint nsStyleSVG::*aFillOrStroke, float aGraphicOpacity,
|
||||
imgDrawingParams& aImgParams, const gfxRect* aOverrideBounds) override;
|
||||
|
||||
// nsIFrame interface:
|
||||
|
@ -141,7 +141,7 @@ class nsSVGIntegrationUtils final {
|
||||
* repaint
|
||||
*/
|
||||
static nsRect GetRequiredSourceForInvalidArea(nsIFrame* aFrame,
|
||||
const nsRect& aDamageRect);
|
||||
const nsRect& aDirtyRect);
|
||||
|
||||
/**
|
||||
* Returns true if the given point is not clipped out by effects.
|
||||
|
@ -294,10 +294,10 @@ nsSize nsSVGOuterSVGFrame::GetIntrinsicRatio() {
|
||||
|
||||
/* virtual */
|
||||
LogicalSize nsSVGOuterSVGFrame::ComputeSize(
|
||||
gfxContext* aRenderingContext, WritingMode aWM, const LogicalSize& aCBSize,
|
||||
nscoord aAvailableISize, const LogicalSize& aMargin,
|
||||
const LogicalSize& aBorder, const LogicalSize& aPadding,
|
||||
ComputeSizeFlags aFlags) {
|
||||
gfxContext* aRenderingContext, WritingMode aWritingMode,
|
||||
const LogicalSize& aCBSize, nscoord aAvailableISize,
|
||||
const LogicalSize& aMargin, const LogicalSize& aBorder,
|
||||
const LogicalSize& aPadding, ComputeSizeFlags aFlags) {
|
||||
if (IsRootOfImage() || IsRootOfReplacedElementSubDoc()) {
|
||||
// The embedding element has sized itself using the CSS replaced element
|
||||
// sizing rules, using our intrinsic dimensions as necessary. The SVG spec
|
||||
@ -314,13 +314,13 @@ LogicalSize nsSVGOuterSVGFrame::ComputeSize(
|
||||
// We're the root of the outermost browsing context, so we need to scale
|
||||
// cbSize by the full-zoom so that SVGs with percentage width/height zoom:
|
||||
|
||||
NS_ASSERTION(aCBSize.ISize(aWM) != NS_AUTOHEIGHT &&
|
||||
aCBSize.BSize(aWM) != NS_AUTOHEIGHT,
|
||||
NS_ASSERTION(aCBSize.ISize(aWritingMode) != NS_AUTOHEIGHT &&
|
||||
aCBSize.BSize(aWritingMode) != NS_AUTOHEIGHT,
|
||||
"root should not have auto-width/height containing block");
|
||||
|
||||
if (!IsContainingWindowElementOfType(nullptr, nsGkAtoms::iframe)) {
|
||||
cbSize.ISize(aWM) *= PresContext()->GetFullZoom();
|
||||
cbSize.BSize(aWM) *= PresContext()->GetFullZoom();
|
||||
cbSize.ISize(aWritingMode) *= PresContext()->GetFullZoom();
|
||||
cbSize.BSize(aWritingMode) *= PresContext()->GetFullZoom();
|
||||
}
|
||||
|
||||
// We also need to honour the width and height attributes' default values
|
||||
@ -337,18 +337,20 @@ LogicalSize nsSVGOuterSVGFrame::ComputeSize(
|
||||
MOZ_ASSERT(!intrinsicSize.width,
|
||||
"GetIntrinsicSize should have reported no intrinsic width");
|
||||
float val = width.GetAnimValInSpecifiedUnits() / 100.0f;
|
||||
intrinsicSize.width.emplace(std::max(val, 0.0f) * cbSize.Width(aWM));
|
||||
intrinsicSize.width.emplace(std::max(val, 0.0f) *
|
||||
cbSize.Width(aWritingMode));
|
||||
}
|
||||
|
||||
const SVGAnimatedLength& height =
|
||||
content->mLengthAttributes[SVGSVGElement::ATTR_HEIGHT];
|
||||
NS_ASSERTION(aCBSize.BSize(aWM) != NS_AUTOHEIGHT,
|
||||
NS_ASSERTION(aCBSize.BSize(aWritingMode) != NS_AUTOHEIGHT,
|
||||
"root should not have auto-height containing block");
|
||||
if (height.IsPercentage()) {
|
||||
MOZ_ASSERT(!intrinsicSize.height,
|
||||
"GetIntrinsicSize should have reported no intrinsic height");
|
||||
float val = height.GetAnimValInSpecifiedUnits() / 100.0f;
|
||||
intrinsicSize.height.emplace(std::max(val, 0.0f) * cbSize.Height(aWM));
|
||||
intrinsicSize.height.emplace(std::max(val, 0.0f) *
|
||||
cbSize.Height(aWritingMode));
|
||||
}
|
||||
MOZ_ASSERT(intrinsicSize.height && intrinsicSize.width,
|
||||
"We should have just handled the only situation where"
|
||||
@ -356,8 +358,8 @@ LogicalSize nsSVGOuterSVGFrame::ComputeSize(
|
||||
}
|
||||
|
||||
return ComputeSizeWithIntrinsicDimensions(
|
||||
aRenderingContext, aWM, intrinsicSize, GetIntrinsicRatio(), cbSize,
|
||||
aMargin, aBorder, aPadding, aFlags);
|
||||
aRenderingContext, aWritingMode, intrinsicSize, GetIntrinsicRatio(),
|
||||
cbSize, aMargin, aBorder, aPadding, aFlags);
|
||||
}
|
||||
|
||||
void nsSVGOuterSVGFrame::Reflow(nsPresContext* aPresContext,
|
||||
@ -556,7 +558,8 @@ class nsDisplayOuterSVG final : public nsDisplayItem {
|
||||
virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
|
||||
HitTestState* aState,
|
||||
nsTArray<nsIFrame*>* aOutFrames) override;
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, gfxContext* aCtx) override;
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder,
|
||||
gfxContext* aContext) override;
|
||||
|
||||
virtual void ComputeInvalidationRegion(
|
||||
nsDisplayListBuilder* aBuilder, const nsDisplayItemGeometry* aGeometry,
|
||||
|
@ -41,7 +41,7 @@ class nsSVGPatternFrame final : public nsSVGPaintServerFrame {
|
||||
virtual already_AddRefed<gfxPattern> GetPaintServerPattern(
|
||||
nsIFrame* aSource, const DrawTarget* aDrawTarget,
|
||||
const gfxMatrix& aContextMatrix,
|
||||
nsStyleSVGPaint nsStyleSVG::*aFillOrStroke, float aOpacity,
|
||||
nsStyleSVGPaint nsStyleSVG::*aFillOrStroke, float aGraphicOpacity,
|
||||
imgDrawingParams& aImgParams, const gfxRect* aOverrideBounds) override;
|
||||
|
||||
public:
|
||||
@ -111,7 +111,7 @@ class nsSVGPatternFrame final : public nsSVGPaintServerFrame {
|
||||
nsSVGPatternFrame* GetPatternWithChildren();
|
||||
|
||||
gfxRect GetPatternRect(uint16_t aPatternUnits, const gfxRect& bbox,
|
||||
const Matrix& callerCTM, nsIFrame* aTarget);
|
||||
const Matrix& aTargetCTM, nsIFrame* aTarget);
|
||||
gfxMatrix ConstructCTM(const SVGAnimatedViewBox& aViewBox,
|
||||
uint16_t aPatternContentUnits, uint16_t aPatternUnits,
|
||||
const gfxRect& callerBBox, const Matrix& callerCTM,
|
||||
|
@ -45,7 +45,7 @@ class nsSVGSwitchFrame final : public nsSVGGFrame {
|
||||
|
||||
// nsSVGDisplayableFrame interface:
|
||||
virtual void PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform,
|
||||
imgDrawingParams& aPackage,
|
||||
imgDrawingParams& aImgParams,
|
||||
const nsIntRect* aDirtyRect = nullptr) override;
|
||||
nsIFrame* GetFrameForPoint(const gfxPoint& aPoint) override;
|
||||
virtual void ReflowSVG() override;
|
||||
|
@ -176,7 +176,7 @@ class nsSVGUtils {
|
||||
* being filtered, this function simply returns aUnfilteredRect.
|
||||
*/
|
||||
static nsRect GetPostFilterVisualOverflowRect(nsIFrame* aFrame,
|
||||
const nsRect& aUnfilteredRect);
|
||||
const nsRect& aPreFilterRect);
|
||||
|
||||
/**
|
||||
* Schedules an update of the frame's bounds (which will in turn invalidate
|
||||
@ -235,7 +235,8 @@ class nsSVGUtils {
|
||||
*/
|
||||
static float UserSpace(SVGElement* aSVGElement,
|
||||
const SVGAnimatedLength* aLength);
|
||||
static float UserSpace(nsIFrame* aFrame, const SVGAnimatedLength* aLength);
|
||||
static float UserSpace(nsIFrame* aNonSVGContext,
|
||||
const SVGAnimatedLength* aLength);
|
||||
static float UserSpace(const mozilla::dom::UserSpaceMetrics& aMetrics,
|
||||
const SVGAnimatedLength* aLength);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user