From 1d126c1d566d104a0976992c63c624785825770d Mon Sep 17 00:00:00 2001 From: Botond Ballo Date: Fri, 9 Mar 2018 17:26:24 -0500 Subject: Bug 1443092 - Avoid calling SVGAnimatedEnumeration::AnimVal() from nsSVGUtils::GetBBox(). r=jwatt, a=RyanVM AnimVal() is a DOM getter, and it flushes animations, which we don't want in GetBBox() which is called from display list building cide and FrameLayerBuilder. MozReview-Commit-ID: DWgm7wAV7C0 --- dom/svg/SVGClipPathElement.cpp | 7 +++++++ dom/svg/SVGClipPathElement.h | 4 ++++ 2 files changed, 11 insertions(+) (limited to 'dom') diff --git a/dom/svg/SVGClipPathElement.cpp b/dom/svg/SVGClipPathElement.cpp index 60d72fdf0..682d1271e 100644 --- a/dom/svg/SVGClipPathElement.cpp +++ b/dom/svg/SVGClipPathElement.cpp @@ -50,6 +50,13 @@ SVGClipPathElement::GetEnumInfo() ArrayLength(sEnumInfo)); } +bool +SVGClipPathElement::IsUnitsObjectBoundingBox() const +{ + return mEnumAttributes[CLIPPATHUNITS].GetAnimValue() == SVG_UNIT_TYPE_OBJECTBOUNDINGBOX; +} + + //---------------------------------------------------------------------- // nsIDOMNode methods diff --git a/dom/svg/SVGClipPathElement.h b/dom/svg/SVGClipPathElement.h index d84f5b30f..2d9f4c15e 100644 --- a/dom/svg/SVGClipPathElement.h +++ b/dom/svg/SVGClipPathElement.h @@ -36,6 +36,10 @@ public: // WebIDL already_AddRefed ClipPathUnits(); + // This is an internal method that does not flush style, and thus + // the answer may be out of date if there's a pending style flush. + bool IsUnitsObjectBoundingBox() const; + protected: enum { CLIPPATHUNITS }; -- cgit v1.2.3