Bug 1379864 - stylo: Remove <style scoped> warning. r=xidorn
☠☠ backed out by 5e2692f8a367 ☠ ☠
authorCameron McCormack <cam@mcc.id.au>
Tue, 11 Jul 2017 10:35:54 +0800
changeset 368183 7b267e692c04976e761cce412f25415970ba3f23
parent 368182 7c7d9ba9ede6a964d3202f3606527f39f9e48802
child 368184 d34a24ce501438cd8ed456403f9708b4eb556e8b
push id32158
push usercbook@mozilla.com
push dateTue, 11 Jul 2017 10:48:59 +0000
treeherdermozilla-central@5e2692f8a367 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersxidorn
bugs1379864
milestone56.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 1379864 - stylo: Remove <style scoped> warning. r=xidorn MozReview-Commit-ID: 6hUcdLAeaxs
dom/base/nsStyleLinkElement.cpp
--- a/dom/base/nsStyleLinkElement.cpp
+++ b/dom/base/nsStyleLinkElement.cpp
@@ -422,21 +422,21 @@ nsStyleLinkElement::DoUpdateStyleSheet(n
   // Check for a ShadowRoot because link elements are inert in a
   // ShadowRoot.
   ShadowRoot* containingShadow = thisContent->GetContainingShadow();
   if (thisContent->IsHTMLElement(nsGkAtoms::link) &&
       (aOldShadowRoot || containingShadow)) {
     return NS_OK;
   }
 
-  // XXXheycam ServoStyleSheets do not support <style scoped>.
   Element* oldScopeElement = nullptr;
   if (mStyleSheet) {
     if (mStyleSheet->IsServo()) {
-      NS_WARNING("stylo: ServoStyleSheets don't support <style scoped>");
+      MOZ_ASSERT(!aOldDocument->IsScopedStyleEnabled(),
+                 "stylo: ServoStyleSheets don't support <style scoped>");
     } else {
       oldScopeElement = mStyleSheet->AsGecko()->GetScopeElement();
     }
   }
 
   if (mStyleSheet && (aOldDocument || aOldShadowRoot)) {
     MOZ_ASSERT(!(aOldDocument && aOldShadowRoot),
                "ShadowRoot content is never in document, thus "