Bug 1411707 - Allow tag names without dashes in Custom Elements in XUL draft
authorBrian Grinstead <bgrinstead@mozilla.com>
Tue, 09 Jan 2018 14:47:35 -0800
changeset 718234 46f6e34b45dc2010d199ea27c0a5ec5686584334
parent 717879 c38d22170d6f27e94c3c53093215d20255fab27a
child 718235 f6e1a251233058248a7b0da42a9aad6f0a8ab23b
push id94848
push userbgrinstead@mozilla.com
push dateTue, 09 Jan 2018 22:49:29 +0000
bugs1411707
milestone59.0a1
Bug 1411707 - Allow tag names without dashes in Custom Elements in XUL MozReview-Commit-ID: HEamLIGaw59
dom/base/nsContentUtils.cpp
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -3240,16 +3240,21 @@ nsContentUtils::NewURIWithDocumentCharse
   }
   return NS_NewURI(aResult, aSpec, nullptr, aBaseURI, sIOService);
 }
 
 // static
 bool
 nsContentUtils::IsCustomElementName(nsAtom* aName)
 {
+  // For browser chrome allow non-dashed names
+  if (XRE_IsParentProcess()) {
+    return true;
+  }
+
   // A valid custom element name is a sequence of characters name which
   // must match the PotentialCustomElementName production:
   // PotentialCustomElementName ::= [a-z] (PCENChar)* '-' (PCENChar)*
   const char16_t* name = aName->GetUTF16String();
   uint32_t len = aName->GetLength();
   bool hasDash = false;
 
   if (!len || name[0] < 'a' || name[0] > 'z') {