Backed out changeset 7c3db413f9da (bug 1061469)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 02 Oct 2014 13:59:59 +0200
changeset 208378 946466b93fb68216b2c465c082eebf47f3521dd3
parent 208377 b0c87b1e4e6e2791b283f65533246c418964efd7
child 208379 1abc9335763e348a695b3b84f36e7fe607ec2bdf
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs1061469
milestone35.0a1
backs out7c3db413f9da1fa18f1818603a257fa2a1441cf4
Backed out changeset 7c3db413f9da (bug 1061469)
content/base/src/nsDocument.cpp
content/html/content/test/imports/file_encoding.html
content/html/content/test/imports/mochitest.ini
content/html/content/test/imports/test_encoding.html
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -3515,20 +3515,16 @@ nsDocument::GetBaseTarget(nsAString &aBa
 
 void
 nsDocument::SetDocumentCharacterSet(const nsACString& aCharSetID)
 {
   // XXX it would be a good idea to assert the sanity of the argument,
   // but before we figure out what to do about non-Encoding Standard
   // encodings in the charset menu and in mailnews, assertions are futile.
   if (!mCharacterSet.Equals(aCharSetID)) {
-    if (mMasterDocument && !aCharSetID.EqualsLiteral("UTF-8")) {
-      // Imports are always UTF-8
-      return;
-    }
     mCharacterSet = aCharSetID;
 
     int32_t n = mCharSetObservers.Length();
 
     for (int32_t i = 0; i < n; i++) {
       nsIObserver* observer = mCharSetObservers.ElementAt(i);
 
       observer->Observe(static_cast<nsIDocument *>(this), "charset",
deleted file mode 100644
--- a/content/html/content/test/imports/file_encoding.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<!DOCTYPE html>
-<head>
-<meta charset="EUC-KR">
-</head>
-<body>Ignore my encoding</body>
\ No newline at end of file
--- a/content/html/content/test/imports/mochitest.ini
+++ b/content/html/content/test/imports/mochitest.ini
@@ -30,21 +30,19 @@ support-files =
   file_cycle_4_B.html
   file_cycle_4_C.html
   file_cycle_4_D.html
   file_cycle_4_E.html
   file_cycle_5_A.html
   file_cycle_5_B.html
   file_cycle_5_C.html
   file_cycle_5_D.html
-  file_encoding.html
 
 [test_cycle_1.html]
 skip-if = toolkit == 'gonk' # nested imports fail on b2g emulator
 [test_cycle_2.html]
 skip-if = toolkit == 'gonk' # nested imports fail on b2g emulator
 [test_cycle_3.html]
 skip-if = toolkit == 'gonk' # nested imports fail on b2g emulator
 [test_cycle_4.html]
 skip-if = toolkit == 'gonk' # nested imports fail on b2g emulator
 [test_cycle_5.html]
 skip-if = toolkit == 'gonk' # nested imports fail on b2g emulator
-[test_encoding.html]
deleted file mode 100644
--- a/content/html/content/test/imports/test_encoding.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=1061469
--->
-<head>
-  <title>Test for Bug 1061469</title>
-  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-  <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
-</head>
-<body>
-  <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1061469">Mozilla Bug 1061469</a>
-  <script type="text/javascript">
-    SimpleTest.waitForExplicitFinish();
-    var success = false;
-    function loaded() {
-      success = true;
-    }
-    function failed() {
-      ok(false, "Import loading failed");
-    }
-  </script>
-  <link rel="import" href="file_encoding.html" id="import" onload="loaded()" onerror="failed()"></link>
-  <script type="text/javascript">
-    is(document.getElementById("import").import.characterSet, "UTF-8", "characterSet should be UTF-8 for imports");
-    SimpleTest.finish();
-  </script>
-</body>
-</html>
\ No newline at end of file