diff --git a/b2g/app/b2g.js b/b2g/app/b2g.js
index e3ef95aedbcd..8c528941c8ca 100644
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -803,3 +803,6 @@ pref("gfx.canvas.azure.accelerated", true);
// Enable Telephony API
pref("dom.telephony.enabled", true);
+
+// The url of the page used to display network error details.
+pref("b2g.neterror.url", "app://system.gaiamobile.org/net_error.html");
diff --git a/b2g/chrome/content/netError.css b/b2g/chrome/content/netError.css
deleted file mode 100644
index 6bb8c0c66102..000000000000
--- a/b2g/chrome/content/netError.css
+++ /dev/null
@@ -1,131 +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/. */
-
-/*
- * This defines the look-and-feel styling of the error pages.
- * (see: netError.xhtml)
- *
- * Original styling by William Price
- * Updated for mobile by: Wes Johnston
- */
-
-body {
- margin: 0;
- padding: 0 8px 8px;
- font-family: "Nokia Sans", Tahoma, sans-serif !important;
-}
-
-h1 {
- font-size: 22px;
-}
-
-h2 {
- font-size: 16px;
-}
-
-ul {
- margin: 0px;
- padding: 0px 0px 0px 1em;
-}
-
-li {
- margin: 0px;
- padding: 8px 0px;
-}
-
-#errorPage {
- background-color: #CEE6F4;
-}
-
-#errorPage.certerror {
- background-color: #EFD400;
-}
-
-#errorPage.blockedsite {
- background-color: #BF0000;
-}
-
-#errorTitle {
- background: url("chrome://browser/content/images/errorpage-warning.png") left center no-repeat;
- /* Scaled by .666 of their actual size */
- background-size: 40px 40px;
- background-origin: content-box;
- min-height: 60px;
- margin-left: auto;
- margin-right: auto;
- max-width: 500px;
- margin-left: auto;
- margin-right: auto;
-}
-
-#errorPage.certerror #errorTitle {
- background-image: url("chrome://browser/content/images/errorpage-larry-black.png");
-}
-
-#errorPage.blockedsite #errorTitle {
- background-image: url("chrome://browser/content/images/errorpage-larry-white.png");
- color: white;
-}
-
-.errorTitleText {
- padding: 0px 0px 0px 50px;
- display: inline-block;
- vertical-align: middle
-}
-
-#errorPageContainer {
- background-color: white;
- border: 1px solid #999999;
- border-radius: 6px;
- padding: 6px 20px 20px;
- font-size: 14px;
- max-width: 500px;
- margin-left: auto;
- margin-right: auto;
-}
-
-#errorShortDesc > p:empty {
- display: none;
-}
-
-#errorShortDesc > p {
- overflow: auto;
- border-bottom: 1px solid #999999;
- padding-bottom: 1em;
-}
-
-#errorPage.blockedsite #errorShortDesc > p {
- font-weight: bold;
- border-bottom: none;
- padding-bottom: 0px;
-}
-
-#securityOverrideDiv {
- padding-top: 10px;
-}
-
-div[collapsed] {
- padding-left: 15px;
- background-image: url("chrome://browser/skin/images/arrowright-16.png");
- background-size: 11px 11px;
- background-repeat: no-repeat;
- background-position: left 0.3em;
-}
-
-div[collapsed="true"] {
- background-image: url("chrome://browser/skin/images/arrowright-16.png");
-}
-
-div[collapsed="false"] {
- background-image: url("chrome://browser/skin/images/arrowdown-16.png");
-}
-
-div[collapsed="true"] > p,
-div[collapsed="true"] > div {
- display: none;
-}
-
-button {
- padding: 0.3em !important;
-}
diff --git a/b2g/chrome/content/netError.xhtml b/b2g/chrome/content/netError.xhtml
deleted file mode 100644
index 615a52a4f326..000000000000
--- a/b2g/chrome/content/netError.xhtml
+++ /dev/null
@@ -1,364 +0,0 @@
-
-
-
-
-
- %htmlDTD;
-
- %netErrorDTD;
-
- %globalDTD;
-]>
-
-
-
-
- &loadError.label;
-
-
-
-
-
-
-
-
-
-
-
-
&generic.title;
- &dnsNotFound.title;
- &fileNotFound.title;
-
- &protocolNotFound.title;
- &connectionFailure.title;
- &netTimeout.title;
- &redirectLoop.title;
- &unknownSocketType.title;
- &netReset.title;
- ¬Cached.title;
- &netOffline.title;
- &netInterrupt.title;
- &deniedPortAccess.title;
- &proxyResolveFailure.title;
- &proxyConnectFailure.title;
- &contentEncodingError.title;
- &unsafeContentType.title;
- &nssFailure2.title;
- &nssBadCert.title;
- &cspFrameAncestorBlocked.title;
- &remoteXUL.title;
- &corruptedContentError.title;
-
-
-
&generic.longDesc;
-
&dnsNotFound.longDesc2;
-
&fileNotFound.longDesc;
-
&malformedURI.longDesc;
-
&protocolNotFound.longDesc;
-
&connectionFailure.longDesc;
-
&netTimeout.longDesc;
-
&redirectLoop.longDesc;
-
&unknownSocketType.longDesc;
-
&netReset.longDesc;
-
¬Cached.longDesc;
-
&netOffline.longDesc2;
-
&netInterrupt.longDesc;
-
&deniedPortAccess.longDesc;
-
&proxyResolveFailure.longDesc2;
-
&proxyConnectFailure.longDesc;
-
&contentEncodingError.longDesc;
-
&unsafeContentType.longDesc;
-
&nssFailure2.longDesc;
-
&nssBadCert.longDesc2;
-
&cspFrameAncestorBlocked.longDesc;
-
&remoteXUL.longDesc;
-
&corruptedContentError.longDesc;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
&retry.label;
-
-
-
-
-
-
-
-
diff --git a/b2g/chrome/jar.mn b/b2g/chrome/jar.mn
index 258218d59799..1514f481cc95 100644
--- a/b2g/chrome/jar.mn
+++ b/b2g/chrome/jar.mn
@@ -24,14 +24,10 @@ chrome.jar:
* content/payment.js (content/payment.js)
content/identity.js (content/identity.js)
-% override chrome://global/content/netError.xhtml chrome://browser/content/netError.xhtml
-% override chrome://global/skin/netError.css chrome://browser/content/netError.css
% override chrome://global/skin/media/videocontrols.css chrome://browser/content/touchcontrols.css
% override chrome://global/content/aboutCertError.xhtml chrome://browser/content/aboutCertError.xhtml
content/ErrorPage.js (content/ErrorPage.js)
- content/netError.xhtml (content/netError.xhtml)
- content/netError.css (content/netError.css)
content/aboutCertError.xhtml (content/aboutCertError.xhtml)
content/images/errorpage-larry-black.png (content/images/errorpage-larry-black.png)
content/images/errorpage-larry-white.png (content/images/errorpage-larry-white.png)
diff --git a/b2g/components/B2GAboutRedirector.js b/b2g/components/B2GAboutRedirector.js
index 75844f6998db..0b03c455d6e3 100644
--- a/b2g/components/B2GAboutRedirector.js
+++ b/b2g/components/B2GAboutRedirector.js
@@ -5,16 +5,30 @@ const Cc = Components.classes;
const Ci = Components.interfaces;
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+Components.utils.import("resource://gre/modules/Services.jsm");
function debug(msg) {
//dump("B2GAboutRedirector: " + msg + "\n");
}
+function netErrorURL() {
+ let uri = "app://system.gaiamobile.org/net_error.html";
+ try {
+ uri = Services.prefs.getCharPref("b2g.neterror.url");
+ } catch(e) {}
+ return uri;
+}
+
let modules = {
certerror: {
uri: "chrome://browser/content/aboutCertError.xhtml",
privileged: false,
hide: true
+ },
+ neterror: {
+ uri: netErrorURL(),
+ privileged: false,
+ hide: true
}
};
diff --git a/b2g/components/B2GComponents.manifest b/b2g/components/B2GComponents.manifest
index 331e78a7da40..cfea8f8b3a04 100644
--- a/b2g/components/B2GComponents.manifest
+++ b/b2g/components/B2GComponents.manifest
@@ -69,6 +69,7 @@ contract @mozilla.org/recovery-service;1 {b3caca5d-0bb0-48c6-912b-6be6cbf08832}
# B2GAboutRedirector
component {920400b1-cf8f-4760-a9c4-441417b15134} B2GAboutRedirector.js
contract @mozilla.org/network/protocol/about;1?what=certerror {920400b1-cf8f-4760-a9c4-441417b15134}
+contract @mozilla.org/network/protocol/about;1?what=neterror {920400b1-cf8f-4760-a9c4-441417b15134}
# FilePicker.js
component {436ff8f9-0acc-4b11-8ec7-e293efba3141} FilePicker.js
diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json
index f8469024ce4e..284515d07c48 100644
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -1,4 +1,4 @@
{
- "revision": "e03c317f861e6c01078b358321ef8f576ca81377",
+ "revision": "44efe8a2b5ce1abc18fb4da92fe774d08290bd31",
"repo_path": "/integration/gaia-central"
}
diff --git a/b2g/locales/en-US/chrome/overrides/netError.dtd b/b2g/locales/en-US/chrome/overrides/netError.dtd
deleted file mode 100644
index d43c0e4c2459..000000000000
--- a/b2g/locales/en-US/chrome/overrides/netError.dtd
+++ /dev/null
@@ -1,176 +0,0 @@
-
-
-
-%brandDTD;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Check the address for typing errors such as
- ww .example.com instead of
- www .example.com
- If you are unable to load any pages, check your device's data or Wi-Fi connection.
-
-">
-
-
-
- Check the file name for capitalization or other typing errors.
- Check to see if the file was moved, renamed or deleted.
-
-">
-
-
-
-&brandShortName; can't load this page for some reason.
-">
-
-
-
- Web addresses are usually written like
- http://www.example.com/
- Make sure that you're using forward slashes (i.e.
- / ).
-
-">
-
-
-
-
-
-The requested document is not available in &brandShortName;'s cache.As a security precaution, &brandShortName; does not automatically re-request sensitive documents. Click Try Again to re-request the document from the website. ">
-
-
-
- Try again. &brandShortName; will attempt to open a connection and reload the page.
-
-">
-
-
-
- Please contact the website owners to inform them of this problem.
-
-">
-
-
-
- Please contact the website owners to inform them of this problem.
-
-">
-
-
-
-
-
-
-
-
-
- You might need to install other software to open this address.
-
-">
-
-
-
- Check the proxy settings to make sure that they are correct.
- Contact your network administrator to make sure the proxy server is
- working.
-
-">
-
-
-
- Check the proxy settings to make sure that they are correct.
- Check to make sure your device has a working data or Wi-Fi connection.
-
-">
-
-
-
- This problem can sometimes be caused by disabling or refusing to accept
- cookies.
-
-">
-
-
-
- Check to make sure your system has the Personal Security Manager
- installed.
- This might be due to a non-standard configuration on the server.
-
-">
-
-
-
- The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
- Please contact the website owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.
-
-">
-
-
-
- This could be a problem with the server's configuration, or it could be
-someone trying to impersonate the server.
- If you have connected to this server successfully in the past, the error may
-be temporary, and you can try again later.
-
-">
-
-
- The site could be temporarily unavailable or too busy. Try again in a few moments.
- If you are unable to load any pages, check your mobile device's data or Wi-Fi connection.
-
-">
-
-
-&brandShortName; prevented this page from loading in this way because the page has a content security policy that disallows it.">
-
-
-The page you are trying to view cannot be shown because an error in the data transmission was detected.Please contact the website owners to inform them of this problem. ">
-
-
-
-
-
-
-
-You should not add an exception if you are using an internet connection that you do not trust completely or if you are not used to seeing a warning for this server.
-
-&securityOverride.getMeOutOfHereButton;
-&securityOverride.exceptionButtonLabel;
-">
-
-
-Please contact the website owners to inform them of this problem. ">
-
diff --git a/b2g/locales/jar.mn b/b2g/locales/jar.mn
index 72a443723c56..d0b650a58fc2 100644
--- a/b2g/locales/jar.mn
+++ b/b2g/locales/jar.mn
@@ -7,10 +7,8 @@
@AB_CD@.jar:
% locale b2g-l10n @AB_CD@ %locale/@AB_CD@/b2g-l10n/
-% override chrome://global/locale/netError.dtd chrome://b2g-l10n/locale/netError.dtd
% override chrome://global/locale/aboutCertError.dtd chrome://b2g-l10n/locale/aboutCertError.dtd
% override chrome://global/locale/appstrings.properties chrome://b2g-l10n/locale/appstrings.properties
-* locale/@AB_CD@/b2g-l10n/netError.dtd (%chrome/overrides/netError.dtd)
* locale/@AB_CD@/b2g-l10n/aboutCertError.dtd (%chrome/overrides/aboutCertError.dtd)
* locale/@AB_CD@/b2g-l10n/appstrings.properties (%chrome/overrides/appstrings.properties)
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
index 8c24616d84ed..218bae3fb43c 100644
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -4598,8 +4598,26 @@ nsDocShell::LoadErrorPage(nsIURI *aURI, const PRUnichar *aURL,
errorPageUrl.AppendLiteral("&d=");
errorPageUrl.AppendASCII(escapedDescription.get());
+ // Append the manifest URL if the error comes from an app.
+ uint32_t appId;
+ nsresult rv = GetAppId(&appId);
+ if (appId != nsIScriptSecurityManager::NO_APP_ID &&
+ appId != nsIScriptSecurityManager::UNKNOWN_APP_ID) {
+ nsCOMPtr appsService =
+ do_GetService(APPS_SERVICE_CONTRACTID);
+ NS_ASSERTION(appsService, "No AppsService available");
+ nsAutoString manifestURL;
+ appsService->GetManifestURLByLocalId(appId, manifestURL);
+ nsCString manifestParam;
+ SAFE_ESCAPE(manifestParam,
+ NS_ConvertUTF16toUTF8(manifestURL).get(),
+ url_Path);
+ errorPageUrl.AppendLiteral("&m=");
+ errorPageUrl.AppendASCII(manifestParam.get());
+ }
+
nsCOMPtr errorPageURI;
- nsresult rv = NS_NewURI(getter_AddRefs(errorPageURI), errorPageUrl);
+ rv = NS_NewURI(getter_AddRefs(errorPageURI), errorPageUrl);
NS_ENSURE_SUCCESS(rv, rv);
return InternalLoad(errorPageURI, nullptr, nullptr,
diff --git a/gfx/thebes/gfxFT2FontList.cpp b/gfx/thebes/gfxFT2FontList.cpp
index 3453eee9d1a4..f356446c9747 100644
--- a/gfx/thebes/gfxFT2FontList.cpp
+++ b/gfx/thebes/gfxFT2FontList.cpp
@@ -1426,7 +1426,12 @@ gfxFT2FontList::GetDefaultFont(const gfxFontStyle* aStyle)
return FindFamily(resolvedName);
}
}
-#elif defined(ANDROID)
+#elif defined(MOZ_WIDGET_GONK)
+ nsAutoString resolvedName;
+ if (ResolveFontName(NS_LITERAL_STRING("Fira Sans OT"), resolvedName)) {
+ return FindFamily(resolvedName);
+ }
+#elif defined(MOZ_WIDGET_ANDROID)
nsAutoString resolvedName;
if (ResolveFontName(NS_LITERAL_STRING("Roboto"), resolvedName) ||
ResolveFontName(NS_LITERAL_STRING("Droid Sans"), resolvedName)) {
diff --git a/layout/reftests/canvas/reftest.list b/layout/reftests/canvas/reftest.list
index b557068d5e84..0e291e473b39 100644
--- a/layout/reftests/canvas/reftest.list
+++ b/layout/reftests/canvas/reftest.list
@@ -43,7 +43,7 @@ fuzzy-if(azureSkiaGL,10,400) == text-not-in-doc-test.html text-not-in-doc-ref.ht
!= text-bidi-ltr-test.html text-bidi-ltr-notref.html # for bug 698185
== text-bidi-rtl-test.html text-bidi-rtl-ref.html
-!= text-font-lang.html text-font-lang-notref.html
+skip-if(B2G) != text-font-lang.html text-font-lang-notref.html
== text-measure.html text-measure-ref.html
diff --git a/netwerk/ipc/NeckoParent.cpp b/netwerk/ipc/NeckoParent.cpp
index 9272801996b8..53a12d853aca 100644
--- a/netwerk/ipc/NeckoParent.cpp
+++ b/netwerk/ipc/NeckoParent.cpp
@@ -397,7 +397,21 @@ NeckoParent::AllocPRemoteOpenFileParent(const URIParams& aURI,
fileURL->GetPath(requestedPath);
NS_UnescapeURL(requestedPath);
- if (hasManage) {
+ // Check if we load the whitelisted app uri for the neterror page.
+ bool netErrorWhiteList = false;
+
+ nsCOMPtr appUri = DeserializeURI(aAppURI);
+ if (appUri) {
+ nsAdoptingString netErrorURI;
+ netErrorURI = Preferences::GetString("b2g.neterror.url");
+ if (netErrorURI) {
+ nsAutoCString spec;
+ appUri->GetSpec(spec);
+ netErrorWhiteList = spec.Equals(NS_ConvertUTF16toUTF8(netErrorURI).get());
+ }
+ }
+
+ if (hasManage || netErrorWhiteList) {
// webapps-manage permission means allow reading any application.zip file
// in either the regular webapps directory, or the core apps directory (if
// we're using one).
diff --git a/widget/gonk/nsAppShell.cpp b/widget/gonk/nsAppShell.cpp
index c71e2afeeea1..d44e3274bc92 100644
--- a/widget/gonk/nsAppShell.cpp
+++ b/widget/gonk/nsAppShell.cpp
@@ -467,9 +467,18 @@ GeckoInputReaderPolicy::setDisplayInfo()
"Orientation enums not matched!");
DisplayViewport viewport;
- viewport.setNonDisplayViewport(gScreenBounds.width, gScreenBounds.height);
viewport.displayId = 0;
viewport.orientation = nsScreenGonk::GetRotation();
+ viewport.physicalRight = viewport.deviceWidth = gScreenBounds.width;
+ viewport.physicalBottom = viewport.deviceHeight = gScreenBounds.height;
+ if (viewport.orientation == DISPLAY_ORIENTATION_90 ||
+ viewport.orientation == DISPLAY_ORIENTATION_270) {
+ viewport.logicalRight = gScreenBounds.height;
+ viewport.logicalBottom = gScreenBounds.width;
+ } else {
+ viewport.logicalRight = gScreenBounds.width;
+ viewport.logicalBottom = gScreenBounds.height;
+ }
mConfig.setDisplayInfo(false, viewport);
}
diff --git a/widget/gonk/nsLookAndFeel.cpp b/widget/gonk/nsLookAndFeel.cpp
index 14dc8930daa7..ccedd40d0191 100644
--- a/widget/gonk/nsLookAndFeel.cpp
+++ b/widget/gonk/nsLookAndFeel.cpp
@@ -420,7 +420,7 @@ nsLookAndFeel::GetFontImpl(FontID aID, nsString& aFontName,
gfxFontStyle& aFontStyle,
float aDevPixPerCSSPixel)
{
- aFontName.AssignLiteral("\"Fira Sans\"");
+ aFontName.AssignLiteral("\"Fira Sans OT\"");
aFontStyle.style = NS_FONT_STYLE_NORMAL;
aFontStyle.weight = NS_FONT_WEIGHT_NORMAL;
aFontStyle.stretch = NS_FONT_STRETCH_NORMAL;