Bug 515777 - move css files, hiddenWindow.html to jar r=bsmedberg sr=bz
☠☠ backed out by 5dcf2d7c7350 ☠ ☠
authorTaras Glek <tglek@mozilla.com>
Thu, 08 Oct 2009 11:22:50 -0700
changeset 33681 e22bef491d844c8dfd344c27a9b40a86ba24c287
parent 33680 144b01b90ecbb0fca2ae90f7ddfa71082b041c33
child 33682 9df8361fa9ef8f27b59f7e82aaa93ed7b0d73aba
child 33687 5dcf2d7c7350fbc0d9a4685106ec44207146194e
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg, bz
bugs515777
milestone1.9.3a1pre
Bug 515777 - move css files, hiddenWindow.html to jar r=bsmedberg sr=bz
browser/base/content/pageinfo/pageInfo.xul
browser/installer/package-manifest.in
browser/installer/removed-files.in
caps/tests/mochitest/test_bug423375.html
dom/src/Makefile.in
dom/src/jar.mn
layout/generic/Makefile.in
layout/generic/jar.mn
layout/generic/nsImageFrame.cpp
layout/mathml/Makefile.in
layout/mathml/jar.mn
layout/mathml/mathml-css.pl
layout/style/Makefile.in
layout/style/jar.mn
layout/style/nsLayoutStylesheetCache.cpp
layout/style/ua.css
parser/htmlparser/src/nsExpatDriver.cpp
parser/htmlparser/src/nsViewSourceHTML.cpp
xpfe/appshell/src/nsAppShellService.cpp
--- a/browser/base/content/pageinfo/pageInfo.xul
+++ b/browser/base/content/pageinfo/pageInfo.xul
@@ -284,17 +284,17 @@
                   icon="save" id="imagesaveasbutton"
                   oncommand="saveMedia();"/>
         </hbox>
         <vbox class="inset iframe" flex="1" pack="center">
           <hbox id="theimagecontainer" pack="center">
             <image id="thepreviewimage"/>
           </hbox>
           <hbox id="brokenimagecontainer" pack="center" collapsed="true">
-            <image id="brokenimage" src="resource:///res/broken-image.png"/>
+            <image id="brokenimage" src="resource://gre-resources/broken-image.png"/>
           </hbox>
         </vbox>
       </vbox>
       <hbox id="mediaSaveBox" collapsed="true">
         <spacer flex="1"/>
         <button label="&mediaSaveAs;" accesskey="&mediaSaveAs2.accesskey;"
                 icon="save" oncommand="saveMedia();"/>
       </hbox>
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -359,21 +359,16 @@
 @BINPATH@/@PREF_DIR@/firefox-branding.js
 @BINPATH@/@PREF_DIR@/channel-prefs.js
 @BINPATH@/greprefs.js
 @BINPATH@/defaults/autoconfig/platform.js
 @BINPATH@/defaults/autoconfig/prefcalls.js
 
 ; [Layout Engine Resources]
 ; Style Sheets, Graphics and other Resources used by the layout engine. 
-@BINPATH@/res/hiddenWindow.html
-@BINPATH@/res/ua.css
-@BINPATH@/res/html.css
-@BINPATH@/res/quirk.css
-@BINPATH@/res/forms.css
 @BINPATH@/res/EditorOverride.css
 @BINPATH@/res/contenteditable.css
 @BINPATH@/res/designmode.css
 @BINPATH@/res/table-add-column-after-active.gif
 @BINPATH@/res/table-add-column-after-hover.gif
 @BINPATH@/res/table-add-column-after.gif
 @BINPATH@/res/table-add-column-before-active.gif
 @BINPATH@/res/table-add-column-before-hover.gif
@@ -387,21 +382,17 @@
 @BINPATH@/res/table-remove-column-active.gif
 @BINPATH@/res/table-remove-column-hover.gif
 @BINPATH@/res/table-remove-column.gif
 @BINPATH@/res/table-remove-row-active.gif
 @BINPATH@/res/table-remove-row-hover.gif
 @BINPATH@/res/table-remove-row.gif
 @BINPATH@/res/arrowd.gif
 @BINPATH@/res/grabber.gif
-@BINPATH@/res/viewsource.css
-@BINPATH@/res/mathml.css
 @BINPATH@/res/arrow.gif
-@BINPATH@/res/loading-image.png
-@BINPATH@/res/broken-image.png
 #ifdef XP_MACOSX
 @BINPATH@/res/cursors/*
 #endif
 @BINPATH@/res/fonts/*
 @BINPATH@/res/dtd/*
 @BINPATH@/res/html/*
 @BINPATH@/res/langGroups.properties
 @BINPATH@/res/language.properties
--- a/browser/installer/removed-files.in
+++ b/browser/installer/removed-files.in
@@ -569,16 +569,25 @@ components/airbag.xpt
 components/nsUrlClassifierTable.js
 res/charsetalias.properties
 res/charsetData.properties
 res/os2charset.properties
 res/wincharset.properties
 res/maccharset.properties
 res/unixcharset.properties
 res/cmessage.txt
+res/hiddenWindow.html
+res/ua.css
+res/html.css
+res/quirk.css
+res/forms.css
+res/viewsource.css
+res/mathml.css
+res/loading-image.png
+res/broken-image.png
 res/html/gopher-audio.gif
 res/html/gopher-binary.gif
 res/html/gopher-find.gif
 res/html/gopher-image.gif
 res/html/gopher-menu.gif
 res/html/gopher-movie.gif
 res/html/gopher-sound.gif
 res/html/gopher-telnet.gif
--- a/caps/tests/mochitest/test_bug423375.html
+++ b/caps/tests/mochitest/test_bug423375.html
@@ -31,15 +31,15 @@ function tryLoad(url)
         return "denied";
     } catch (e) {
         return "unexpected: " + e;
     }
 }
 
 is(tryLoad("chrome://global/content/mozilla.xhtml"), "denied",
    "content should have been prevented from loading chrome: URL");
-is(tryLoad("resource://gre/res/html.css"), "denied",
+is(tryLoad("resource://gre-resources/html.css"), "denied",
    "content should have been prevented from loading resource: URL");
 </script>
 </pre>
 </body>
 </html>
 
--- a/dom/src/Makefile.in
+++ b/dom/src/Makefile.in
@@ -40,18 +40,8 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS		= jsurl events storage offline json geolocation threads
 
 include $(topsrcdir)/config/rules.mk
-
-_FILES = \
-	$(srcdir)/res/hiddenWindow.html \
-	$(NULL)
-
-libs::
-	$(INSTALL) $(_FILES) $(DIST)/bin/res
-
-install::
-	$(SYSINSTALL) $(IFLAGS1) $(_FILES) $(DESTDIR)$(mozappdir)/res
new file mode 100644
--- /dev/null
+++ b/dom/src/jar.mn
@@ -0,0 +1,2 @@
+toolkit.jar:
+   res/hiddenWindow.html                 (res/hiddenWindow.html)
--- a/layout/generic/Makefile.in
+++ b/layout/generic/Makefile.in
@@ -138,21 +138,16 @@ CMMSRCS		+= \
 		nsPluginUtilsOSX.mm \
 		$(NULL)
 endif
 
 RESOURCES_HTML = \
 		$(srcdir)/folder.png \
 		$(NULL)
 
-RESOURCES = \
-		$(srcdir)/broken-image.png \
-		$(srcdir)/loading-image.png \
-		$(NULL)
-
 FORCE_STATIC_LIB = 1
 
 include $(topsrcdir)/config/rules.mk
 
 LOCAL_INCLUDES += \
 		-I$(srcdir) \
 		-I$(srcdir)/../base \
 		-I$(srcdir)/../forms \
@@ -170,15 +165,13 @@ CXXFLAGS += $(MOZ_GTK2_CFLAGS)
 endif
 
 ifdef MOZ_ENABLE_QT
 CXXFLAGS += $(MOZ_QT_CFLAGS)
 endif
 
 libs::
 	$(INSTALL) $(RESOURCES_HTML) $(DIST)/bin/res/html
-	$(INSTALL) $(RESOURCES) $(DIST)/bin/res
 
 install::
 	$(SYSINSTALL) $(IFLAGS1) $(RESOURCES_HTML) $(DESTDIR)$(mozappdir)/res/html
-	$(SYSINSTALL) $(IFLAGS1) $(RESOURCES) $(DESTDIR)$(mozappdir)/res
 
 DEFINES += -D_IMPL_NS_LAYOUT
new file mode 100644
--- /dev/null
+++ b/layout/generic/jar.mn
@@ -0,0 +1,3 @@
+toolkit.jar:
+   res/broken-image.png                (broken-image.png)
+   res/loading-image.png               (loading-image.png)
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -1708,18 +1708,18 @@ nsImageFrame::GetLoadGroup(nsPresContext
 
   *aLoadGroup = doc->GetDocumentLoadGroup().get();  // already_AddRefed
 }
 
 nsresult nsImageFrame::LoadIcons(nsPresContext *aPresContext)
 {
   NS_ASSERTION(!gIconLoad, "called LoadIcons twice");
 
-  NS_NAMED_LITERAL_STRING(loadingSrc,"resource://gre/res/loading-image.png");
-  NS_NAMED_LITERAL_STRING(brokenSrc,"resource://gre/res/broken-image.png");
+  NS_NAMED_LITERAL_STRING(loadingSrc,"resource://gre-resources/loading-image.png");
+  NS_NAMED_LITERAL_STRING(brokenSrc,"resource://gre-resources/broken-image.png");
 
   gIconLoad = new IconLoad();
   if (!gIconLoad) 
     return NS_ERROR_OUT_OF_MEMORY;
   NS_ADDREF(gIconLoad);
 
   nsresult rv;
   // create a loader and load the images
--- a/layout/mathml/Makefile.in
+++ b/layout/mathml/Makefile.in
@@ -91,19 +91,16 @@ CPPSRCS =         nsMathMLChar.cpp		    
 include $(topsrcdir)/config/config.mk
 
 # we don't want the shared lib, but we want to force the creation of a static lib.
 # do we still want this? - DJF
 FORCE_STATIC_LIB = 1
 
 include $(topsrcdir)/config/rules.mk
 
-libs::
-	$(INSTALL) $(srcdir)/mathml.css $(DIST)/bin/res
-
 font_properties = \
 	mathfontUnicode.properties \
 	mathfontSTIXNonUnicode.properties \
 	mathfontSTIXSize1.properties \
 	mathfontStandardSymbolsL.properties \
 	$(NULL)
 
 ifeq ($(TARGET_MD_ARCH),win32)
new file mode 100644
--- /dev/null
+++ b/layout/mathml/jar.mn
@@ -0,0 +1,2 @@
+toolkit.jar:
+   res/mathml.css               (mathml.css)
--- a/layout/mathml/mathml-css.pl
+++ b/layout/mathml/mathml-css.pl
@@ -7,14 +7,14 @@
 open(UA, $ua) || die "Cannot find ua.css\n";
 $css = join("", <UA>);
 close(UA);
 
 if (!($css =~ m|\@import.*mathml\.css|)) 
 {
   # since bad end of lines cause troubles on some platforms
   # do a little perl magic for dos2{unix or mac} here
-  $css =~ s#(\@import[^\@]+\;)(\cM?)(\n\cM?\n)#$1$2\n\@import url\(resource://gre/res/mathml\.css\);$2$3#;
+  $css =~ s#(\@import[^\@]+\;)(\cM?)(\n\cM?\n)#$1$2\n\@import url\(resource://gre-resources/mathml\.css\);$2$3#;
   open(UA, ">$ua");
   print UA $css;
   close(UA);
 }
 
--- a/layout/style/Makefile.in
+++ b/layout/style/Makefile.in
@@ -151,20 +151,16 @@ include $(topsrcdir)/config/rules.mk
 LOCAL_INCLUDES	= \
 		-I$(srcdir)/../../content/base/src \
 		-I$(srcdir)/../../content/html/content/src \
 		-I$(srcdir)/../../content/xbl/src \
 		-I$(srcdir)/../../content/xul/document/src \
 		$(NULL)
 
 _FILES	= \
-	ua.css \
-	html.css \
-	quirk.css \
-	viewsource.css \
 	arrow.gif \
 	arrowd.gif \
 	contenteditable.css \
 	designmode.css \
 	$(NULL)
 
 GARBAGE		+= $(addprefix $(DIST)/bin/res/,$(_FILES))
 
new file mode 100644
--- /dev/null
+++ b/layout/style/jar.mn
@@ -0,0 +1,6 @@
+toolkit.jar:
+   res/ua.css    (ua.css)
+   res/html.css    (html.css)
+   res/quirk.css    (quirk.css)
+   res/viewsource.css    (viewsource.css)
+   res/forms.css    (forms.css)
--- a/layout/style/nsLayoutStylesheetCache.cpp
+++ b/layout/style/nsLayoutStylesheetCache.cpp
@@ -97,17 +97,17 @@ nsLayoutStylesheetCache::FormsSheet()
 {
   EnsureGlobal();
   if (!gStyleCache)
     return nsnull;
 
   if (!gStyleCache->mFormsSheet) {
     nsCOMPtr<nsIURI> sheetURI;
       NS_NewURI(getter_AddRefs(sheetURI),
-                NS_LITERAL_CSTRING("resource://gre/res/forms.css"));
+                NS_LITERAL_CSTRING("resource://gre-resources/forms.css"));
 
     // forms.css needs access to unsafe rules
     if (sheetURI)
       LoadSheet(sheetURI, gStyleCache->mFormsSheet, PR_TRUE);
 
     NS_ASSERTION(gStyleCache->mFormsSheet, "Could not load forms.css.");
   }
 
@@ -174,23 +174,23 @@ nsLayoutStylesheetCache::nsLayoutStylesh
     obsSvc->AddObserver(this, "chrome-flush-caches", PR_FALSE);
   }
 
   InitFromProfile();
 
   // And make sure that we load our UA sheets.  No need to do this
   // per-profile, since they're profile-invariant.
   nsCOMPtr<nsIURI> uri;
-  NS_NewURI(getter_AddRefs(uri), "resource://gre/res/ua.css");
+  NS_NewURI(getter_AddRefs(uri), "resource://gre-resources/ua.css");
   if (uri) {
     LoadSheet(uri, mUASheet, PR_TRUE);
   }
   NS_ASSERTION(mUASheet, "Could not load ua.css");
 
-  NS_NewURI(getter_AddRefs(uri), "resource://gre/res/quirk.css");
+  NS_NewURI(getter_AddRefs(uri), "resource://gre-resources/quirk.css");
   if (uri) {
     LoadSheet(uri, mQuirkSheet, PR_TRUE);
   }
   NS_ASSERTION(mQuirkSheet, "Could not load quirk.css");
 }
 
 nsLayoutStylesheetCache::~nsLayoutStylesheetCache()
 {
--- a/layout/style/ua.css
+++ b/layout/style/ua.css
@@ -29,17 +29,17 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-@import url(resource://gre/res/html.css);
+@import url(resource://gre-resources/html.css);
 @import url(chrome://global/content/xul.css);
 
 @namespace parsererror url(http://www.mozilla.org/newlayout/xml/parsererror.xml);
 
 /* magic -- some of these rules are important to keep pages from overriding
             them
 */
 
--- a/parser/htmlparser/src/nsExpatDriver.cpp
+++ b/parser/htmlparser/src/nsExpatDriver.cpp
@@ -285,19 +285,19 @@ struct nsCatalogData {
 
 // The order of this table is guestimated to be in the optimum order
 static const nsCatalogData kCatalogTable[] = {
   { "-//W3C//DTD XHTML 1.0 Transitional//EN",    "xhtml11.dtd", nsnull },
   { "-//W3C//DTD XHTML 1.1//EN",                 "xhtml11.dtd", nsnull },
   { "-//W3C//DTD XHTML 1.0 Strict//EN",          "xhtml11.dtd", nsnull },
   { "-//W3C//DTD XHTML 1.0 Frameset//EN",        "xhtml11.dtd", nsnull },
   { "-//W3C//DTD XHTML Basic 1.0//EN",           "xhtml11.dtd", nsnull },
-  { "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN", "mathml.dtd",  "resource://gre/res/mathml.css" },
-  { "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN", "mathml.dtd", "resource://gre/res/mathml.css" },
-  { "-//W3C//DTD MathML 2.0//EN",                "mathml.dtd",  "resource://gre/res/mathml.css" },
+  { "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN", "mathml.dtd",  "resource://gre-resources/res/mathml.css" },
+  { "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN", "mathml.dtd", "resource://gre-resources/mathml.css" },
+  { "-//W3C//DTD MathML 2.0//EN",                "mathml.dtd",  "resource://gre-resources/mathml.css" },
   { "-//WAPFORUM//DTD XHTML Mobile 1.0//EN",     "xhtml11.dtd", nsnull },
   { nsnull, nsnull, nsnull }
 };
 
 static const nsCatalogData*
 LookupCatalogData(const PRUnichar* aPublicID)
 {
   nsDependentString publicID(aPublicID);
--- a/parser/htmlparser/src/nsViewSourceHTML.cpp
+++ b/parser/htmlparser/src/nsViewSourceHTML.cpp
@@ -276,17 +276,17 @@ CViewSourceHTML::WillBuildModel(const CP
     if (gDumpFile) {
 
       fprintf(gDumpFile, "<html>\n");
       fprintf(gDumpFile, "<head>\n");
       fprintf(gDumpFile, "<title>");
       fprintf(gDumpFile, "Source of: ");
       fputs(NS_ConvertUTF16toUTF8(mFilename).get(), gDumpFile);
       fprintf(gDumpFile, "</title>\n");
-      fprintf(gDumpFile, "<link rel=\"stylesheet\" type=\"text/css\" href=\"resource://gre/res/viewsource.css\">\n");
+      fprintf(gDumpFile, "<link rel=\"stylesheet\" type=\"text/css\" href=\"resource://gre-resources/viewsource.css\">\n");
       fprintf(gDumpFile, "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n");
       fprintf(gDumpFile, "</head>\n");
       fprintf(gDumpFile, "<body id=\"viewsource\">\n");
       fprintf(gDumpFile, "<pre id=\"line1\">\n");
     }
 #endif //DUMP_TO_FILE
   }
 
@@ -366,17 +366,17 @@ NS_IMETHODIMP CViewSourceHTML::BuildMode
                         NS_LITERAL_STRING("stylesheet"));
 
           AddAttrToNode(theNode, theAllocator,
                         NS_LITERAL_STRING("type"),
                         NS_LITERAL_STRING("text/css"));
 
           AddAttrToNode(theNode, theAllocator,
                         NS_LITERAL_STRING("href"),
-                        NS_LITERAL_STRING("resource://gre/res/viewsource.css"));
+                        NS_LITERAL_STRING("resource://gre-resources/viewsource.css"));
 
           mSink->AddLeaf(theNode);
         }
         IF_FREE(theToken, theAllocator);
       }
 
       result = mSink->CloseContainer(eHTMLTag_head);
       if(NS_SUCCEEDED(result)) {
--- a/xpfe/appshell/src/nsAppShellService.cpp
+++ b/xpfe/appshell/src/nsAppShellService.cpp
@@ -72,17 +72,17 @@
 
 #include "nsAppShellService.h"
 #include "nsISupportsPrimitives.h"
 #include "nsIPlatformCharset.h"
 #include "nsICharsetConverterManager.h"
 #include "nsIUnicodeDecoder.h"
 
 // Default URL for the hidden window, can be overridden by a pref on Mac
-#define DEFAULT_HIDDENWINDOW_URL "resource://gre/res/hiddenWindow.html"
+#define DEFAULT_HIDDENWINDOW_URL "resource://gre-resources/hiddenWindow.html"
 
 class nsIAppShell;
 
 nsAppShellService::nsAppShellService() : 
   mXPCOMShuttingDown(PR_FALSE),
   mModalWindowCount(0),
   mApplicationProvidedHiddenWindow(PR_FALSE)
 {