Bug 1470873 - Part 1 - Remove support for "components.css". r=bzbarsky
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Thu, 15 Nov 2018 14:34:18 +0000
changeset 503195 4024ceceab4466ddb1792989245c51d9e52dee03
parent 503194 3d4dd037c4ceb41c227ef41270fefad15a8bb6f8
child 503196 c44903823d66dac1b9e1310951ce7095710d2afc
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs1470873
milestone65.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 1470873 - Part 1 - Remove support for "components.css". r=bzbarsky Differential Revision: https://phabricator.services.mozilla.com/D12029
layout/base/nsDocumentViewer.cpp
layout/style/nsLayoutStylesheetCache.cpp
layout/style/nsLayoutStylesheetCache.h
toolkit/content/components.css
toolkit/content/jar.mn
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -2463,23 +2463,17 @@ nsDocumentViewer::CreateStyleSet(nsIDocu
     styleSet->PrependStyleSheet(SheetType::Agent, sheet);
   }
 
   sheet = cache->FormsSheet();
   if (sheet) {
     styleSet->PrependStyleSheet(SheetType::Agent, sheet);
   }
 
-  // This is the only place components.css / xul.css get loaded.
   if (aDocument->LoadsFullXULStyleSheetUpFront()) {
-    sheet = cache->XULComponentsSheet();
-    if (sheet) {
-      styleSet->PrependStyleSheet(SheetType::Agent, sheet);
-    }
-
     sheet = cache->XULSheet();
     if (sheet) {
       styleSet->PrependStyleSheet(SheetType::Agent, sheet);
     }
   }
 
   sheet = cache->MinimalXULSheet();
   if (sheet) {
--- a/layout/style/nsLayoutStylesheetCache.cpp
+++ b/layout/style/nsLayoutStylesheetCache.cpp
@@ -132,27 +132,16 @@ nsLayoutStylesheetCache::XULSheet()
     LoadSheetURL("chrome://global/content/xul.css",
                  &mXULSheet, eAgentSheetFeatures, eCrash);
   }
 
   return mXULSheet;
 }
 
 StyleSheet*
-nsLayoutStylesheetCache::XULComponentsSheet()
-{
-  if (!mXULComponentsSheet) {
-    LoadSheetURL("chrome://global/content/components.css",
-                 &mXULComponentsSheet, eAgentSheetFeatures, eCrash);
-  }
-
-  return mXULComponentsSheet;
-}
-
-StyleSheet*
 nsLayoutStylesheetCache::QuirkSheet()
 {
   return mQuirkSheet;
 }
 
 StyleSheet*
 nsLayoutStylesheetCache::SVGSheet()
 {
@@ -292,17 +281,16 @@ nsLayoutStylesheetCache::SizeOfIncluding
   MEASURE(mNoScriptSheet);
   MEASURE(mQuirkSheet);
   MEASURE(mSVGSheet);
   MEASURE(mScrollbarsSheet);
   MEASURE(mUASheet);
   MEASURE(mUserChromeSheet);
   MEASURE(mUserContentSheet);
   MEASURE(mXULSheet);
-  MEASURE(mXULComponentsSheet);
 
   // Measurement of the following members may be added later if DMD finds it is
   // worthwhile:
   // - gCSSLoader
 
   return n;
 }
 
@@ -331,17 +319,16 @@ nsLayoutStylesheetCache::nsLayoutStylesh
                &mMinimalXULSheet, eAgentSheetFeatures, eCrash);
   LoadSheetURL("resource://gre-resources/quirk.css",
                &mQuirkSheet, eAgentSheetFeatures, eCrash);
   LoadSheetURL("resource://gre/res/svg.css",
                &mSVGSheet, eAgentSheetFeatures, eCrash);
   if (XRE_IsParentProcess()) {
     // We know we need xul.css for the UI, so load that now too:
     XULSheet();
-    XULComponentsSheet();
   }
 
   if (gUserContentSheetURL) {
     MOZ_ASSERT(XRE_IsContentProcess(), "Only used in content processes.");
     LoadSheet(gUserContentSheetURL, &mUserContentSheet,
               eUserSheetFeatures, eLogToConsole);
     gUserContentSheetURL = nullptr;
   }
--- a/layout/style/nsLayoutStylesheetCache.h
+++ b/layout/style/nsLayoutStylesheetCache.h
@@ -46,17 +46,16 @@ class nsLayoutStylesheetCache final
   mozilla::StyleSheet* ScrollbarsSheet();
   mozilla::StyleSheet* FormsSheet();
   mozilla::StyleSheet* UserContentSheet();
   mozilla::StyleSheet* UserChromeSheet();
   mozilla::StyleSheet* UASheet();
   mozilla::StyleSheet* HTMLSheet();
   mozilla::StyleSheet* MinimalXULSheet();
   mozilla::StyleSheet* XULSheet();
-  mozilla::StyleSheet* XULComponentsSheet();
   mozilla::StyleSheet* QuirkSheet();
   mozilla::StyleSheet* SVGSheet();
   mozilla::StyleSheet* MathMLSheet();
   mozilla::StyleSheet* CounterStylesSheet();
   mozilla::StyleSheet* NoScriptSheet();
   mozilla::StyleSheet* NoFramesSheet();
   mozilla::StyleSheet* ChromePreferenceSheet(nsPresContext* aPresContext);
   mozilla::StyleSheet* ContentPreferenceSheet(nsPresContext* aPresContext);
@@ -107,12 +106,11 @@ private:
   RefPtr<mozilla::StyleSheet> mNoScriptSheet;
   RefPtr<mozilla::StyleSheet> mQuirkSheet;
   RefPtr<mozilla::StyleSheet> mSVGSheet;
   RefPtr<mozilla::StyleSheet> mScrollbarsSheet;
   RefPtr<mozilla::StyleSheet> mUASheet;
   RefPtr<mozilla::StyleSheet> mUserChromeSheet;
   RefPtr<mozilla::StyleSheet> mUserContentSheet;
   RefPtr<mozilla::StyleSheet> mXULSheet;
-  RefPtr<mozilla::StyleSheet> mXULComponentsSheet;
 };
 
 #endif
deleted file mode 100644
--- a/toolkit/content/components.css
+++ /dev/null
@@ -1,14 +0,0 @@
-/* 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/. */
-
-/* ===== components.css ==================================================
-   ==
-   == THESE STYLES HAVE BEEN MOVED TO "widgets.css".
-   ==
-   == This file exists to allow debugging regressions more easily using
-   == just artifact builds, and will be removed in bug 1470873.
-   ==
-   ======================================================================= */
-
-
--- a/toolkit/content/jar.mn
+++ b/toolkit/content/jar.mn
@@ -1,14 +1,13 @@
 toolkit.jar:
 %  content global %content/global/ contentaccessible=yes
 *  content/global/license.html
    content/global/minimal-xul.css
 *  content/global/xul.css
-   content/global/components.css
    content/global/autocomplete.css
    content/global/aboutAbout.js
    content/global/aboutAbout.xhtml
 #ifdef MOZILLA_OFFICIAL
    content/global/aboutRights.xhtml
 #else
    content/global/aboutRights.xhtml           (aboutRights-unbranded.xhtml)
 #endif