Bug 1285474: stylo: Conditionally compile UpdateStyleBackendType draft
authorEmilio Cobos Álvarez <ecoal95@gmail.com>
Sat, 09 Jul 2016 18:01:54 -0700
changeset 386040 e7860085eabce587d65a4a7cbd7dd51a7caeb18d
parent 386039 919fc2cec640330b1b552613a7e0cfd82d8dcf4a
child 386041 88badd7273b6e8e0d56129c12a17f51134b30f0c
push id22603
push userbmo:ealvarez@mozilla.com
push dateSun, 10 Jul 2016 08:31:11 +0000
bugs1285474
milestone50.0a1
Bug 1285474: stylo: Conditionally compile UpdateStyleBackendType This silences NS_ASSERTION messages than don't make sense in a non-stylo build. MozReview-Commit-ID: ACwHLvf3YNT
dom/base/nsDocument.cpp
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -13650,24 +13650,27 @@ nsIDocument::ReportHasScrollLinkedEffect
                                   "ScrollLinkedEffectFound2");
 }
 
 void
 nsIDocument::UpdateStyleBackendType()
 {
   MOZ_ASSERT(mStyleBackendType == StyleBackendType(0),
              "no need to call UpdateStyleBackendType now");
-
+#ifdef MOZ_STYLO
   // XXX For now we use a Servo-backed style set only for (X)HTML documents
   // in content docshells.  This should let us avoid implementing XUL-specific
   // CSS features.  And apart from not supporting SVG properties in Servo
   // yet, the root SVG element likes to create a style sheet for an SVG
   // document before we have a pres shell (i.e. before we make the decision
   // here about whether to use a Gecko- or Servo-backed style system), so
   // we avoid Servo-backed style sets for SVG documents.
   NS_ASSERTION(mDocumentContainer, "stylo: calling UpdateStyleBackendType "
                                    "before we have a docshell");
   mStyleBackendType =
     nsLayoutUtils::SupportsServoStyleBackend(this) &&
     mDocumentContainer ?
       StyleBackendType::Servo :
       StyleBackendType::Gecko;
-}
+#else
+  mStyleBackendType = StyleBackendType::Gecko;
+#endif
+}