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/svg') 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 From acf95284e7d9b00d4ab1e526dc5f12b4d29bdff1 Mon Sep 17 00:00:00 2001 From: Robert Longson Date: Thu, 29 Mar 2018 03:12:05 +0100 Subject: Bug 1448774. r=dholbert, a=RyanVM --HG-- extra : source : edfd9ffbd7208ef0a59f40a0d77d8dd53c905cb9 extra : intermediate-source : 3784b22ec536b08ce95201d73ae8806340c18b8c --- dom/svg/SVGTextContentElement.h | 1 + 1 file changed, 1 insertion(+) (limited to 'dom/svg') diff --git a/dom/svg/SVGTextContentElement.h b/dom/svg/SVGTextContentElement.h index 905468228..5f126c811 100644 --- a/dom/svg/SVGTextContentElement.h +++ b/dom/svg/SVGTextContentElement.h @@ -29,6 +29,7 @@ typedef SVGGraphicsElement SVGTextContentElementBase; class SVGTextContentElement : public SVGTextContentElementBase { + friend class ::SVGTextFrame; public: using FragmentOrElement::TextLength; -- cgit v1.2.3