Bug 1398401 - Add preference check for custom element setup. r=smaug
authorJohn Dai <jdai@mozilla.com>
Tue, 12 Sep 2017 00:40:00 -0400
changeset 380691 48448bff8f92f3e56847063f5c2cb532bb05e46f
parent 380690 838c6c929f5f1eb6f3bf6c5c33173ff765db348e
child 380692 5d6a0d528af19cde89843f651f3a0d80a3b7b11d
push id32492
push userarchaeopteryx@coole-files.de
push dateWed, 13 Sep 2017 21:59:20 +0000
treeherdermozilla-central@8645a74bbbd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1398401
milestone57.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 1398401 - Add preference check for custom element setup. r=smaug
parser/html/nsHtml5TreeOperation.cpp
--- a/parser/html/nsHtml5TreeOperation.cpp
+++ b/parser/html/nsHtml5TreeOperation.cpp
@@ -440,17 +440,19 @@ nsHtml5TreeOperation::CreateHTMLElement(
       } else {
         newContent->SetAttr(nsuri,
                             localName,
                             prefix,
                             value,
                             false);
 
         // Custom element setup may be needed if there is an "is" attribute.
-        if (kNameSpaceID_None == nsuri && !prefix && nsGkAtoms::is == localName) {
+        if (nsContentUtils::IsWebComponentsEnabled() &&
+            kNameSpaceID_None == nsuri &&
+            !prefix && nsGkAtoms::is == localName) {
           nsContentUtils::SetupCustomElement(newContent, &value);
         }
       }
     }
   }
   return newContent;
 }