Bug 655877 - Part 22: Add function for getting the 'is SVG text using CSS frames' pref. r=jwatt
authorCameron McCormack <cam@mcc.id.au>
Wed, 08 Aug 2012 21:46:06 +1000
changeset 101810 76835a9e3efb5fb30f7ff510a458abd9da22c4ad
parent 101809 4823b8b02b27608768166b50c02b8dc12bf4fe43
child 101811 1ea9a4023efac7f108e6cb130b8f058cfdc392e9
push id13181
push usercmccormack@mozilla.com
push dateWed, 08 Aug 2012 11:49:19 +0000
treeherdermozilla-inbound@76835a9e3efb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs655877
milestone17.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 655877 - Part 22: Add function for getting the 'is SVG text using CSS frames' pref. r=jwatt
layout/svg/base/src/nsSVGUtils.cpp
layout/svg/base/src/nsSVGUtils.h
--- a/layout/svg/base/src/nsSVGUtils.cpp
+++ b/layout/svg/base/src/nsSVGUtils.cpp
@@ -132,16 +132,17 @@ 190, 192, 194, 196, 198, 200, 202, 204,
 206, 208, 210, 212, 214, 216, 218, 220,
 222, 224, 226, 229, 231, 233, 235, 237,
 239, 242, 244, 246, 248, 250, 253, 255
 };
 
 static bool sSMILEnabled;
 static bool sSVGDisplayListHitTestingEnabled;
 static bool sSVGDisplayListPaintingEnabled;
+static bool sSVGTextCSSFramesEnabled;
 
 bool
 NS_SMILEnabled()
 {
   return sSMILEnabled;
 }
 
 bool
@@ -151,16 +152,22 @@ NS_SVGDisplayListHitTestingEnabled()
 }
 
 bool
 NS_SVGDisplayListPaintingEnabled()
 {
   return sSVGDisplayListPaintingEnabled;
 }
 
+bool
+NS_SVGTextCSSFramesEnabled()
+{
+  return sSVGTextCSSFramesEnabled;
+}
+
 // we only take the address of this:
 static mozilla::gfx::UserDataKey sSVGAutoRenderStateKey;
 
 SVGAutoRenderState::SVGAutoRenderState(nsRenderingContext *aContext,
                                        RenderMode aMode)
   : mContext(aContext)
   , mOriginalRenderState(nullptr)
   , mMode(aMode)
@@ -213,16 +220,19 @@ nsSVGUtils::Init()
                                "svg.smil.enabled",
                                true);
 
   Preferences::AddBoolVarCache(&sSVGDisplayListHitTestingEnabled,
                                "svg.display-lists.hit-testing.enabled");
 
   Preferences::AddBoolVarCache(&sSVGDisplayListPaintingEnabled,
                                "svg.display-lists.painting.enabled");
+
+  Preferences::AddBoolVarCache(&sSVGTextCSSFramesEnabled,
+                               "svg.text.css-frames.enabled");
 }
 
 nsSVGSVGElement*
 nsSVGUtils::GetOuterSVGElement(nsSVGElement *aSVGElement)
 {
   nsIContent *element = nullptr;
   nsIContent *ancestor = aSVGElement->GetFlattenedTreeParent();
 
--- a/layout/svg/base/src/nsSVGUtils.h
+++ b/layout/svg/base/src/nsSVGUtils.h
@@ -107,16 +107,17 @@ IsSVGWhitespace(PRUnichar aChar)
 /*
  * Checks the smil enabled preference.  Declared as a function to match
  * NS_SVGEnabled().
  */
 bool NS_SMILEnabled();
 
 bool NS_SVGDisplayListHitTestingEnabled();
 bool NS_SVGDisplayListPaintingEnabled();
+bool NS_SVGTextCSSFramesEnabled();
 
 /**
  * Sometimes we need to distinguish between an empty box and a box
  * that contains an element that has no size e.g. a point at the origin.
  */
 class SVGBBox {
 public:
   SVGBBox()