diff --git a/dom/xul/nsXULElement.cpp b/dom/xul/nsXULElement.cpp index 5f9000f69386..f29d2aeebb4e 100644 --- a/dom/xul/nsXULElement.cpp +++ b/dom/xul/nsXULElement.cpp @@ -620,27 +620,6 @@ nsXULElement::UpdateEditableState(bool aNotify) UpdateState(aNotify); } -#ifdef DEBUG -/** - * Returns true if the user-agent style sheet rules for this XUL element are - * in minimal-xul.css instead of xul.css. - */ -static inline bool XULElementsRulesInMinimalXULSheet(nsAtom* aTag) -{ - return // scrollbar parts: - aTag == nsGkAtoms::scrollbar || - aTag == nsGkAtoms::scrollbarbutton || - aTag == nsGkAtoms::scrollcorner || - aTag == nsGkAtoms::slider || - aTag == nsGkAtoms::thumb || - // other - aTag == nsGkAtoms::datetimebox || - aTag == nsGkAtoms::resizer || - aTag == nsGkAtoms::label || - aTag == nsGkAtoms::videocontrols; -} -#endif - class XULInContentErrorReporter : public Runnable { public: @@ -697,11 +676,23 @@ nsXULElement::BindToTree(nsIDocument* aDocument, // 'scrollbar' that may be created implicitly for their content (those // rules being in minimal-xul.css). // - // This assertion makes sure no other XUL element than the ones in the - // minimal XUL sheet is used in the bindings. - if (!XULElementsRulesInMinimalXULSheet(NodeInfo()->NameAtom())) { - NS_ERROR("Unexpected XUL element in non-XUL doc"); - } + // This assertion makes sure no other XUL element is used in a non-XUL + // document. + nsAtom* tag = NodeInfo()->NameAtom(); + MOZ_ASSERT( + // scrollbar parts + tag == nsGkAtoms::scrollbar || + tag == nsGkAtoms::scrollbarbutton || + tag == nsGkAtoms::scrollcorner || + tag == nsGkAtoms::slider || + tag == nsGkAtoms::thumb || + // other + tag == nsGkAtoms::datetimebox || + tag == nsGkAtoms::resizer || + tag == nsGkAtoms::label || + tag == nsGkAtoms::videocontrols, + "Unexpected XUL element in non-XUL doc" + ); } #endif diff --git a/toolkit/content/minimal-xul.css b/toolkit/content/minimal-xul.css index 1db405435513..d01b535d8f26 100644 --- a/toolkit/content/minimal-xul.css +++ b/toolkit/content/minimal-xul.css @@ -19,7 +19,6 @@ */ @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */ -@namespace html url("http://www.w3.org/1999/xhtml"); /* namespace for HTML elements */ * { -moz-user-focus: ignore; @@ -48,29 +47,6 @@ visibility: collapse; } -/********** label **********/ - -description { - -moz-binding: url("chrome://global/content/bindings/text.xml#text-base"); -} - -label { - -moz-binding: url("chrome://global/content/bindings/text.xml#text-label"); -} - -label.text-link, label[onclick] { - -moz-binding: url("chrome://global/content/bindings/text.xml#text-link"); - -moz-user-focus: normal; -} - -label[control], label.radio-label, label.checkbox-label, label.toolbarbutton-multiline-text { - -moz-binding: url("chrome://global/content/bindings/text.xml#label-control"); -} - -label html|span.accesskey { - text-decoration: underline; -} - /********** resizer **********/ resizer { diff --git a/toolkit/content/xul.css b/toolkit/content/xul.css index fab40fd0d099..292cc63663fb 100644 --- a/toolkit/content/xul.css +++ b/toolkit/content/xul.css @@ -98,6 +98,29 @@ vbox { -moz-box-orient: vertical; } +/********** label **********/ + +description { + -moz-binding: url("chrome://global/content/bindings/text.xml#text-base"); +} + +label { + -moz-binding: url("chrome://global/content/bindings/text.xml#text-label"); +} + +label.text-link, label[onclick] { + -moz-binding: url("chrome://global/content/bindings/text.xml#text-link"); + -moz-user-focus: normal; +} + +label[control], label.radio-label, label.checkbox-label, label.toolbarbutton-multiline-text { + -moz-binding: url("chrome://global/content/bindings/text.xml#label-control"); +} + +label html|span.accesskey { + text-decoration: underline; +} + /********** button **********/ button {