зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1446831 - move label, description css rules out of minimal-xul.css, patch=bgrins, surkov, r=smaug
This commit is contained in:
Родитель
8eac4fe0d9
Коммит
0868d78991
|
@ -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
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче