summaryrefslogtreecommitdiff
path: root/dom/svg
diff options
context:
space:
mode:
authorBotond Ballo <botond@mozilla.com>2018-03-09 17:26:24 -0500
committerwolfbeast <mcwerewolf@gmail.com>2018-04-19 11:38:48 +0200
commit1d126c1d566d104a0976992c63c624785825770d (patch)
tree2802ed586a7d9fbb26bbb061794f433ff83bcbd5 /dom/svg
parentf90d03e8578054715c1f7b64d1fde3c38887c062 (diff)
downloaduxp-1d126c1d566d104a0976992c63c624785825770d.tar.gz
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
Diffstat (limited to 'dom/svg')
-rw-r--r--dom/svg/SVGClipPathElement.cpp7
-rw-r--r--dom/svg/SVGClipPathElement.h4
2 files changed, 11 insertions, 0 deletions
diff --git a/dom/svg/SVGClipPathElement.cpp b/dom/svg/SVGClipPathElement.cpp
index 60d72fdf04..682d1271e1 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 d84f5b30fb..2d9f4c15e5 100644
--- a/dom/svg/SVGClipPathElement.h
+++ b/dom/svg/SVGClipPathElement.h
@@ -36,6 +36,10 @@ public:
// WebIDL
already_AddRefed<SVGAnimatedEnumeration> 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 };