Skip to content

Commit

Permalink
Merge inbound to mozilla-central. a=merge
Browse files Browse the repository at this point in the history
  • Loading branch information
ncsoregi committed Dec 11, 2018
2 parents f5eeb09 + 83760c3 commit 10fdbf6
Show file tree
Hide file tree
Showing 58 changed files with 1,649 additions and 341 deletions.
3 changes: 0 additions & 3 deletions dom/encoding/FallbackEncoding.cpp
Expand Up @@ -55,7 +55,6 @@ NS_IMPL_ISUPPORTS(FallbackEncoding, nsIObserver)

StaticRefPtr<FallbackEncoding> FallbackEncoding::sInstance;
bool FallbackEncoding::sGuessFallbackFromTopLevelDomain = true;
bool FallbackEncoding::sFallbackToUTF8ForFile = false;

FallbackEncoding::FallbackEncoding() : mFallback(nullptr) {
MOZ_ASSERT(!FallbackEncoding::sInstance, "Singleton already exists.");
Expand Down Expand Up @@ -141,8 +140,6 @@ void FallbackEncoding::Initialize() {
"intl.charset.fallback.override");
Preferences::AddBoolVarCache(&sGuessFallbackFromTopLevelDomain,
"intl.charset.fallback.tld");
Preferences::AddBoolVarCache(&sFallbackToUTF8ForFile,
"intl.charset.fallback.utf8_for_file");

nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
if (obs) {
Expand Down
5 changes: 0 additions & 5 deletions dom/encoding/FallbackEncoding.h
Expand Up @@ -27,11 +27,6 @@ class FallbackEncoding : public nsIObserver, nsSupportsWeakReference {
*/
static bool sGuessFallbackFromTopLevelDomain;

/**
* Whether UTF-8 should be used for file URLs.
*/
static bool sFallbackToUTF8ForFile;

/**
* Gets the locale-dependent fallback encoding for legacy HTML and plain
* text content.
Expand Down
6 changes: 0 additions & 6 deletions dom/html/nsHTMLDocument.cpp
Expand Up @@ -438,12 +438,6 @@ void nsHTMLDocument::TryFallback(int32_t& aCharsetSource,
if (kCharsetFromFallback <= aCharsetSource) return;

aCharsetSource = kCharsetFromFallback;
bool isFile = false;
if (FallbackEncoding::sFallbackToUTF8ForFile && mDocumentURI &&
NS_SUCCEEDED(mDocumentURI->SchemeIs("file", &isFile)) && isFile) {
aEncoding = UTF_8_ENCODING;
return;
}
aEncoding = FallbackEncoding::FromLocale();
}

Expand Down
4 changes: 2 additions & 2 deletions dom/html/nsHTMLDocument.h
Expand Up @@ -282,8 +282,8 @@ class nsHTMLDocument : public nsDocument, public nsIHTMLDocument {
void TryParentCharset(nsIDocShell* aDocShell, int32_t& charsetSource,
NotNull<const Encoding*>& aEncoding);
void TryTLD(int32_t& aCharsetSource, NotNull<const Encoding*>& aCharset);
void TryFallback(int32_t& aCharsetSource,
NotNull<const Encoding*>& aEncoding);
static void TryFallback(int32_t& aCharsetSource,
NotNull<const Encoding*>& aEncoding);

// Override so we can munge the charset on our wyciwyg channel as needed.
virtual void SetDocumentCharacterSet(
Expand Down
1 change: 1 addition & 0 deletions dom/reporting/tests/mochitest.ini
Expand Up @@ -7,4 +7,5 @@ prefs =
[test_deprecated.html]
[test_memoryPressure.html]
[test_delivering.html]
skip-if = (os == "android" && debug) # Bug 1511666
support-files = delivering.sjs iframe_delivering.html worker_delivering.js
2 changes: 1 addition & 1 deletion dom/u2f/tests/frame_appid_facet_insecure.html
Expand Up @@ -33,7 +33,7 @@
local_ok(false, "Callbacks should not be called.");
});
} catch (err) {
local_ok(err.toString().includes("TypeError: window.u2f is undefined"), "accessing window.u2f should have thrown from an insecure origin");
local_ok(err == "TypeError: window.u2f is undefined", "accessing window.u2f should have thrown from an insecure origin");
}

try {
Expand Down
9 changes: 9 additions & 0 deletions extensions/universalchardet/tests/bug1071816-1_text.html
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>UTF-8</title>
</head>
<body>
§
</body>
</html>
9 changes: 9 additions & 0 deletions extensions/universalchardet/tests/bug1071816-2_text.html
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>windows-1252</title>
</head>
<body>
§
</body>
</html>

0 comments on commit 10fdbf6

Please sign in to comment.