# HG changeset patch # Parent 5fc5e8e2c3f1fff233886fbc457d173f9de0bba8 # User Marco Bonardo diff --git a/browser/base/content/aboutHome-glogo.png b/browser/base/content/aboutHome-glogo.png new file mode 100644 index 0000000000000000000000000000000000000000..d82ee17f5c4687792ab0ee6ddacb501dcebfe16a GIT binary patch literal 1489 zc$@*z1upuDP)nTfXv?vGIWES_W6ymzDjE#!aS`r#QT*Ed8)kX-~RtxBhG|2V+t!rNY^=#|2 zOZe!|{_Rti>iWq*3jr>NA$Gr~m|y<-kCY7pyz>0oVFs(Ks~l>z)A|0qyu9Oe8smEk zd3SZH7zE@~29vAXr0n_BYbRtNB*{n+__!e8WDNcIxQgib(PUBg-Fx)brt6m+=Y|XL z$Cv^HCeBh4<9saPYZ3FcalA$q{oOyi%dpb_8v{{PMBog+{RQ|*qs8Aub!pd@ES<#4o(o7BVh#tw0AL*$-&(F{MmJsiJ z98*$BedP8(L`?%DWRPt>%gmVZb`4H3JnpwC=bLN(|=H7Bgfz87|ab z4>gzACP-)(Iajc-qqoQ50xQUT$9Vhw`#EgDWP7PDPHZSeU(##}%6Tfm*2&o4z47Iw zh(|v;V2kT&0K@0$XQH()Nnw1@@Q|;nI4EMWva%jRVjx_dRd0y@|NlN+cAzr8$NPBRIoD?-u#Kp$s<>fd?XDe{AEI(WiDPH^g`||ViL6N{_tlyoi zxg|7W4m5N*S#@#B=`>Yw$IsVh#_A_!s8g)kkD;*~KVL#sa}-30W6tqEq1^WN_8dQT zVtJA1=;%UVd`??$a@zA)!S4P2{rC9!)Y;)Nfx_3=*xujX%_zL%0007vNklBjE6vsUnE2E%;D1uHs1fEoXf)3_(6L3gYV`Ky#T7fZiHHCE3F5`5_;?a7syxC&| zIfOg}t3yR_hE6rK_F@aEcRD$ZU5A*uH|XARcfa@E|LI=l75N_{lg|B4f6p78ccrUJ zybIG&9LFgZvEAMS(+^6O*Sn&zXM?Csy7mm9xlcT$%Fzyt4PLsKPThaTL@-`2CTCt_lqnlwYk*$Py0-i2-P-8D^=9 zbf<+z3`4xk9c*HP@+g@_R3~wci*TOPX(1wNVfe~10;1LM)x4Q%gJHUXX`%PYe2U~~ zSiMf{7dhR%lO}|PbI&oV>46F6PGOWIZaxQIHpbt zRFf1#H?=ReU1XUtjDbFW+rV4^0KZ5Si3VQgSuJFf1XZ4uud~VZ9R8;=%mqSXa;Lq1 z46Y`Doh-0Ms}{(zLG3Jq)pXsbCmU&Q3RoONAA>2QvQGr#0YhR-lZseTuw}8B!;!3t zqL?&}p01x4PL9(WC;(1}oK-3xj{3yR%d$KY9`_s9yB&E*)r))^wVuN + +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License +# Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" +# basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is aboutHome.xhtml. +# +# The Initial Developer of the Original Code is the Mozilla Foundation. +# Portions created by the Initial Developer are Copyright (C) 2010 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# Marco Bonardo (original author) +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# 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 ***** + + + %htmlDTD; + + %globalDTD; + + %aboutHomeDTD; +]> + + + + &abouthome.pageTitle; + + + + + + +
+ +
+ +
+ &brandShortName; + Start +
+ + + +
+ +
+ + + diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -2927,15 +2927,19 @@ const DOMLinkHandler = { break; // Verify that the load of this icon is legal. - // error pages can load their favicon, to be on the safe side, - // only allow chrome:// favicons - const aboutNeterr = /^about:neterror\?/; - const aboutBlocked = /^about:blocked\?/; - const aboutCert = /^about:certerror\?/; - if (!(aboutNeterr.test(targetDoc.documentURI) || - aboutBlocked.test(targetDoc.documentURI) || - aboutCert.test(targetDoc.documentURI)) || - !uri.schemeIs("chrome")) { + // Some error or special pages can load their favicon. + // To be on the safe side, only allow chrome:// favicons. + var isAllowedPage = false; + [ + /^about:neterror\?/, + /^about:blocked\?/, + /^about:certerror\?/, + /^about:home$/, + ].some(function(re) { + return isAllowedPage = re.test(targetDoc.documentURI); + }); + + if (!isAllowedPage || !uri.schemeIs("chrome")) { var ssm = Cc["@mozilla.org/scriptsecuritymanager;1"]. getService(Ci.nsIScriptSecurityManager); try { diff --git a/browser/base/jar.mn b/browser/base/jar.mn --- a/browser/base/jar.mn +++ b/browser/base/jar.mn @@ -14,6 +14,8 @@ browser.jar: * content/browser/aboutDialog.js (content/aboutDialog.js) content/browser/aboutDialog.css (content/aboutDialog.css) * content/browser/aboutRobots.xhtml (content/aboutRobots.xhtml) +* content/browser/aboutHome.xhtml (content/aboutHome.xhtml) + content/browser/aboutHome-glogo.png (content/aboutHome-glogo.png) content/browser/aboutRobots-icon.png (content/aboutRobots-icon.png) content/browser/aboutRobots-icon-rtl.png (content/aboutRobots-icon-rtl.png) content/browser/aboutRobots-widget-left.png (content/aboutRobots-widget-left.png) diff --git a/browser/branding/nightly/content/jar.mn b/browser/branding/nightly/content/jar.mn --- a/browser/branding/nightly/content/jar.mn +++ b/browser/branding/nightly/content/jar.mn @@ -5,3 +5,5 @@ browser.jar: content/branding/aboutFooter.png (aboutFooter.png) content/branding/icon48.png (icon48.png) content/branding/icon64.png (icon64.png) + content/browser/icon128.png (../mozicon128.png) + content/browser/icon16.png (../default16.png) diff --git a/browser/branding/unofficial/content/jar.mn b/browser/branding/unofficial/content/jar.mn --- a/browser/branding/unofficial/content/jar.mn +++ b/browser/branding/unofficial/content/jar.mn @@ -5,3 +5,5 @@ browser.jar: content/branding/aboutFooter.png (aboutFooter.png) content/branding/icon48.png (icon48.png) content/branding/icon64.png (icon64.png) + content/browser/icon128.png (../mozicon128.png) + content/browser/icon16.png (../default16.png) diff --git a/browser/components/about/AboutRedirector.cpp b/browser/components/about/AboutRedirector.cpp --- a/browser/components/about/AboutRedirector.cpp +++ b/browser/components/about/AboutRedirector.cpp @@ -96,6 +96,9 @@ static RedirEntry kRedirMap[] = { nsIAboutModule::ALLOW_SCRIPT }, { "sessionrestore", "chrome://browser/content/aboutSessionRestore.xhtml", nsIAboutModule::ALLOW_SCRIPT }, + { "home", "chrome://browser/content/aboutHome.xhtml", + nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT | + nsIAboutModule::ALLOW_SCRIPT }, }; static const int kRedirTotal = NS_ARRAY_LENGTH(kRedirMap); diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/nsModule.cpp --- a/browser/components/build/nsModule.cpp +++ b/browser/components/build/nsModule.cpp @@ -189,6 +189,11 @@ static const nsModuleComponentInfo compo NS_ABOUT_MODULE_CONTRACTID_PREFIX "sessionrestore", AboutRedirector::Create }, + { "about:home", + NS_BROWSER_ABOUT_REDIRECTOR_CID, + NS_ABOUT_MODULE_CONTRACTID_PREFIX "home", + AboutRedirector::Create }, + #ifndef WINCE { "Profile Migrator", diff --git a/browser/locales/en-US/chrome/browser/aboutHome.dtd b/browser/locales/en-US/chrome/browser/aboutHome.dtd new file mode 100644 --- /dev/null +++ b/browser/locales/en-US/chrome/browser/aboutHome.dtd @@ -0,0 +1,21 @@ + + %brandDTD; + + + + + + + + + + + + + + + + diff --git a/browser/locales/jar.mn b/browser/locales/jar.mn --- a/browser/locales/jar.mn +++ b/browser/locales/jar.mn @@ -6,6 +6,7 @@ locale/browser/aboutDialog.dtd (%chrome/browser/aboutDialog.dtd) locale/browser/aboutPrivateBrowsing.dtd (%chrome/browser/aboutPrivateBrowsing.dtd) locale/browser/aboutRobots.dtd (%chrome/browser/aboutRobots.dtd) + locale/browser/aboutHome.dtd (%chrome/browser/aboutHome.dtd) locale/browser/aboutSessionRestore.dtd (%chrome/browser/aboutSessionRestore.dtd) locale/browser/credits.dtd (%chrome/browser/credits.dtd) * locale/browser/browser.dtd (%chrome/browser/browser.dtd) diff --git a/browser/themes/gnomestripe/browser/aboutHome.css b/browser/themes/gnomestripe/browser/aboutHome.css new file mode 100644 --- /dev/null +++ b/browser/themes/gnomestripe/browser/aboutHome.css @@ -0,0 +1,109 @@ +%if 0 +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is aboutHome.xhtml. + * + * The Initial Developer of the Original Code is the Mozilla Foundation. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Marco Bonardo (original author) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * 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 ***** */ +%endif + +html { + font: message-box; + background: -moz-Field; + color: -moz-FieldText; +} + +#topSection { + position: relative; + margin: 1em auto; + padding: 25px; + width: 560px; +} + +#brandStart { + background: -moz-linear-gradient(top, #42607C, #1E4262 30%, #1E4262 80%, #143552 98%, #244665); + -moz-border-radius: 1%; + padding-bottom: 0.2em; + -moz-padding-start: 0.5em; + font-size: 250%; + font-weight: bold; + color: white; + margin-top: 18px; + margin-bottom: 6px; +} +#brandStart > span:last-child { + opacity: 0.4; +} + +#brandLogo { + position: absolute; + top: 0; +} +body[dir="ltr"] #brandLogo { + right: 0; +} +body[dir="rtl"] #brandLogo { + left: 0px; + margin-left: -15px; +} + +#searchContainer { + border: 1px solid ThreeDShadow; + -moz-border-radius: 1%; + padding: 3em; +} +#searchLinks { + font-size: 80%; +} +body[dir="ltr"] #searchLinks { + float: right; +} +body[dir="rtl"] #searchLinks { + float: left; +} +#googleSearchText { + width: 100%; +} +#googleLogo { + margin: 5px; +} + +#MozillaSnippet { + margin: 2em auto; +} + +#aboutMozilla { + margin: 2em auto; + text-align: center; +} diff --git a/browser/themes/gnomestripe/browser/jar.mn b/browser/themes/gnomestripe/browser/jar.mn --- a/browser/themes/gnomestripe/browser/jar.mn +++ b/browser/themes/gnomestripe/browser/jar.mn @@ -3,6 +3,7 @@ browser.jar: % override chrome://global/skin/icons/warning-16.png moz-icon://stock/gtk-dialog-warning?size=menu skin/classic/browser/sanitizeDialog.css (sanitizeDialog.css) * skin/classic/browser/aboutPrivateBrowsing.css (aboutPrivateBrowsing.css) +* skin/classic/browser/aboutHome.css (aboutHome.css) * skin/classic/browser/aboutSessionRestore.css (aboutSessionRestore.css) skin/classic/browser/aboutSessionRestore-window-icon.png skin/classic/browser/aboutCertError.css (aboutCertError.css) diff --git a/browser/themes/pinstripe/browser/aboutHome.css b/browser/themes/pinstripe/browser/aboutHome.css new file mode 100644 --- /dev/null +++ b/browser/themes/pinstripe/browser/aboutHome.css @@ -0,0 +1,109 @@ +%if 0 +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is aboutHome.xhtml. + * + * The Initial Developer of the Original Code is the Mozilla Foundation. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Marco Bonardo (original author) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * 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 ***** */ +%endif + +html { + font: message-box; + background: -moz-Field; + color: -moz-FieldText; +} + +#topSection { + position: relative; + margin: 1em auto; + padding: 25px; + width: 560px; +} + +#brandStart { + background: -moz-linear-gradient(top, #42607C, #1E4262 30%, #1E4262 80%, #143552 98%, #244665); + -moz-border-radius: 1%; + padding-bottom: 0.2em; + -moz-padding-start: 0.5em; + font-size: 250%; + font-weight: bold; + color: white; + margin-top: 18px; + margin-bottom: 6px; +} +#brandStart > span:last-child { + opacity: 0.4; +} + +#brandLogo { + position: absolute; + top: 0; +} +body[dir="ltr"] #brandLogo { + right: 0; +} +body[dir="rtl"] #brandLogo { + left: 0px; + margin-left: -15px; +} + +#searchContainer { + border: 1px solid ThreeDShadow; + -moz-border-radius: 1%; + padding: 3em; +} +#searchLinks { + font-size: 80%; +} +body[dir="ltr"] #searchLinks { + float: right; +} +body[dir="rtl"] #searchLinks { + float: left; +} +#googleSearchText { + width: 100%; +} +#googleLogo { + margin: 5px; +} + +#MozillaSnippet { + margin: 2em auto; +} + +#aboutMozilla { + margin: 2em auto; + text-align: center; +} diff --git a/browser/themes/pinstripe/browser/jar.mn b/browser/themes/pinstripe/browser/jar.mn --- a/browser/themes/pinstripe/browser/jar.mn +++ b/browser/themes/pinstripe/browser/jar.mn @@ -2,6 +2,7 @@ browser.jar: % skin browser classic/1.0 %skin/classic/browser/ skin/classic/browser/sanitizeDialog.css (sanitizeDialog.css) * skin/classic/browser/aboutPrivateBrowsing.css (aboutPrivateBrowsing.css) +* skin/classic/browser/aboutHome.css (aboutHome.css) * skin/classic/browser/aboutSessionRestore.css (aboutSessionRestore.css) skin/classic/browser/aboutSessionRestore-window-icon.png skin/classic/browser/aboutCertError.css (aboutCertError.css) diff --git a/browser/themes/winstripe/browser/aboutHome.css b/browser/themes/winstripe/browser/aboutHome.css new file mode 100644 --- /dev/null +++ b/browser/themes/winstripe/browser/aboutHome.css @@ -0,0 +1,109 @@ +%if 0 +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is aboutHome.xhtml. + * + * The Initial Developer of the Original Code is the Mozilla Foundation. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Marco Bonardo (original author) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * 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 ***** */ +%endif + +html { + font: message-box; + background: -moz-Field; + color: -moz-FieldText; +} + +#topSection { + position: relative; + margin: 1em auto; + padding: 25px; + width: 560px; +} + +#brandStart { + background: -moz-linear-gradient(top, #42607C, #1E4262 30%, #1E4262 80%, #143552 98%, #244665); + -moz-border-radius: 1%; + padding-bottom: 0.2em; + -moz-padding-start: 0.5em; + font-size: 250%; + font-weight: bold; + color: white; + margin-top: 18px; + margin-bottom: 6px; +} +#brandStart > span:last-child { + opacity: 0.4; +} + +#brandLogo { + position: absolute; + top: 0; +} +body[dir="ltr"] #brandLogo { + right: 0; +} +body[dir="rtl"] #brandLogo { + left: 0px; + margin-left: -15px; +} + +#searchContainer { + border: 1px solid ThreeDShadow; + -moz-border-radius: 1%; + padding: 3em; +} +#searchLinks { + font-size: 80%; +} +body[dir="ltr"] #searchLinks { + float: right; +} +body[dir="rtl"] #searchLinks { + float: left; +} +#googleSearchText { + width: 100%; +} +#googleLogo { + margin: 5px; +} + +#MozillaSnippet { + margin: 2em auto; +} + +#aboutMozilla { + margin: 2em auto; + text-align: center; +} diff --git a/browser/themes/winstripe/browser/jar.mn b/browser/themes/winstripe/browser/jar.mn --- a/browser/themes/winstripe/browser/jar.mn +++ b/browser/themes/winstripe/browser/jar.mn @@ -5,6 +5,7 @@ browser.jar: # section at the bottom of this file skin/classic/browser/sanitizeDialog.css (sanitizeDialog.css) * skin/classic/browser/aboutPrivateBrowsing.css (aboutPrivateBrowsing.css) +* skin/classic/browser/aboutHome.css (aboutHome.css) * skin/classic/browser/aboutSessionRestore.css (aboutSessionRestore.css) skin/classic/browser/aboutSessionRestore-window-icon.png (aboutSessionRestore-window-icon.png) skin/classic/browser/aboutCertError.css (aboutCertError.css) @@ -89,6 +90,7 @@ browser.jar: % skin browser classic/1.0 %skin/classic/aero/browser/ os=WINNT osversion>=6 skin/classic/aero/browser/sanitizeDialog.css (sanitizeDialog.css) * skin/classic/aero/browser/aboutPrivateBrowsing.css (aboutPrivateBrowsing.css) +* skin/classic/aero/browser/aboutHome.css (aboutHome.css) * skin/classic/aero/browser/aboutSessionRestore.css (aboutSessionRestore.css) skin/classic/aero/browser/aboutSessionRestore-window-icon.png (aboutSessionRestore-window-icon-aero.png) skin/classic/aero/browser/aboutCertError.css (aboutCertError.css) diff --git a/other-licenses/branding/firefox/content/jar.mn b/other-licenses/branding/firefox/content/jar.mn --- a/other-licenses/branding/firefox/content/jar.mn +++ b/other-licenses/branding/firefox/content/jar.mn @@ -5,3 +5,5 @@ browser.jar: content/branding/aboutFooter.png (aboutFooter.png) content/branding/icon48.png (icon48.png) content/branding/icon64.png (icon64.png) + content/browser/icon128.png (../mozicon128.png) + content/browser/icon16.png (../default16.png)