Bug 1463820 - Load components.css as an author sheet
MozReview-Commit-ID: E6Nano0ebjK
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -2484,22 +2484,16 @@ nsDocumentViewer::CreateStyleSet(nsIDocu
// nsXULElement::BindToTree.)
sheet = cache->FormsSheet();
if (sheet) {
styleSet->PrependStyleSheet(SheetType::Agent, sheet);
}
if (aDocument->LoadsFullXULStyleSheetUpFront()) {
- // This is the only place components.css gets loaded, unlike xul.css
- sheet = cache->XULComponentsSheet();
- if (sheet) {
- styleSet->PrependStyleSheet(SheetType::Agent, sheet);
- }
-
// nsXULElement::BindToTree loads xul.css on-demand if we don't load it
// up-front here.
sheet = cache->XULSheet();
if (sheet) {
styleSet->PrependStyleSheet(SheetType::Agent, sheet);
}
}
--- a/layout/style/nsLayoutStylesheetCache.cpp
+++ b/layout/style/nsLayoutStylesheetCache.cpp
@@ -136,17 +136,17 @@ nsLayoutStylesheetCache::XULSheet()
return mXULSheet;
}
StyleSheet*
nsLayoutStylesheetCache::XULComponentsSheet()
{
if (!mXULComponentsSheet) {
LoadSheetURL("chrome://global/content/components.css",
- &mXULComponentsSheet, eAgentSheetFeatures, eCrash);
+ &mXULComponentsSheet, eAuthorSheetFeatures, eCrash);
}
return mXULComponentsSheet;
}
StyleSheet*
nsLayoutStylesheetCache::QuirkSheet()
{
--- a/toolkit/themes/linux/global/global.css
+++ b/toolkit/themes/linux/global/global.css
@@ -3,16 +3,18 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* ===== global.css =====================================================
== Styles that apply everywhere.
======================================================================= */
/* all localizable skin settings shall live here */
@import url("chrome://global/locale/intl.css");
+@import url("chrome://global/content/components.css");
+
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* ::::: XBL bindings ::::: */
menulist > menupopup {
-moz-binding: url("chrome://global/content/bindings/popup.xml#popup-scrollbars");
}
--- a/toolkit/themes/osx/global/global.css
+++ b/toolkit/themes/osx/global/global.css
@@ -1,14 +1,15 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* all localizable skin settings shall live here */
@import url("chrome://global/locale/intl.css");
+@import url("chrome://global/content/components.css");
%include shared.inc
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* ::::: XBL bindings ::::: */
menulist > menupopup {
-moz-binding: url("chrome://global/content/bindings/popup.xml#popup-scrollbars");
--- a/toolkit/themes/windows/global/global.css
+++ b/toolkit/themes/windows/global/global.css
@@ -3,16 +3,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* ===== global.css =====================================================
== Styles that apply everywhere.
======================================================================= */
/* all localizable skin settings shall live here */
@import url("chrome://global/locale/intl.css");
+@import url("chrome://global/content/components.css");
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* ::::: XBL bindings ::::: */
menulist > menupopup {
-moz-binding: url("chrome://global/content/bindings/popup.xml#popup-scrollbars");
}