Title: [120089] branches/safari-536-branch

Diff

Modified: branches/safari-536-branch/LayoutTests/ChangeLog (120088 => 120089)


--- branches/safari-536-branch/LayoutTests/ChangeLog	2012-06-12 17:05:44 UTC (rev 120088)
+++ branches/safari-536-branch/LayoutTests/ChangeLog	2012-06-12 17:08:25 UTC (rev 120089)
@@ -1,3 +1,18 @@
+2012-06-12  Lucas Forschler  <lforsch...@apple.com>
+
+    Merge 119644
+
+    2012-06-06  Brady Eidson  <beid...@apple.com>
+
+            <rdar://problem/11575112> and https://bugs.webkit.org/show_bug.cgi?id=88428
+            REGRESSION (r115654): Opening many non-English WebArchives shows obvious encoding issues
+
+            Reviewed by Nate Chapin.
+
+            * fast/loader/resources/utf8-encoded.webarchive: Added.
+            * fast/loader/webarchive-encoding-respected-expected.txt: Added.
+            * fast/loader/webarchive-encoding-respected.html: Added.
+
 2012-06-06  Mark Rowe  <mr...@apple.com>
 
         Merge r119274.

Copied: branches/safari-536-branch/LayoutTests/fast/loader/resources/utf8-encoded.webarchive (from rev 119644, trunk/LayoutTests/fast/loader/resources/utf8-encoded.webarchive) (0 => 120089)


--- branches/safari-536-branch/LayoutTests/fast/loader/resources/utf8-encoded.webarchive	                        (rev 0)
+++ branches/safari-536-branch/LayoutTests/fast/loader/resources/utf8-encoded.webarchive	2012-06-12 17:08:25 UTC (rev 120089)
@@ -0,0 +1,4 @@
+bplist00\xD1_WebMainResource\xD5	
+_WebResourceMIMEType_WebResourceTextEncodingName_WebResourceFrameName^WebResourceURL_WebResourceDataYtext/htmlUUTF-8P_http://127.0.0.1:8000/utf-8.cgiOs<html><head></head><body>This content is UTF-8 encoded and includes a Hebrew Resh character -&gt; ר
+</body></html>(>\s\x82\x94\x9E\xA4\xA5\xC7
+=
\ No newline at end of file

Copied: branches/safari-536-branch/LayoutTests/fast/loader/webarchive-encoding-respected-expected.txt (from rev 119644, trunk/LayoutTests/fast/loader/webarchive-encoding-respected-expected.txt) (0 => 120089)


--- branches/safari-536-branch/LayoutTests/fast/loader/webarchive-encoding-respected-expected.txt	                        (rev 0)
+++ branches/safari-536-branch/LayoutTests/fast/loader/webarchive-encoding-respected-expected.txt	2012-06-12 17:08:25 UTC (rev 120089)
@@ -0,0 +1,7 @@
+The webarchive in this iframe is utf-8 encoded and will only display properly if the webarchive's encoding is respected.
+
+
+--------
+Frame: '<!--framePath //<!--frame0-->-->'
+--------
+This content is UTF-8 encoded and includes a Hebrew Resh character -> ר

Copied: branches/safari-536-branch/LayoutTests/fast/loader/webarchive-encoding-respected.html (from rev 119644, trunk/LayoutTests/fast/loader/webarchive-encoding-respected.html) (0 => 120089)


--- branches/safari-536-branch/LayoutTests/fast/loader/webarchive-encoding-respected.html	                        (rev 0)
+++ branches/safari-536-branch/LayoutTests/fast/loader/webarchive-encoding-respected.html	2012-06-12 17:08:25 UTC (rev 120089)
@@ -0,0 +1,8 @@
+<script>
+if (window.layoutTestController) {
+	layoutTestController.dumpAsText();
+	layoutTestController.dumpChildFramesAsText();
+}
+</script>
+The webarchive in this iframe is utf-8 encoded and will only display properly if the webarchive's encoding is respected.<br>
+<iframe src=""

Modified: branches/safari-536-branch/Source/WebCore/ChangeLog (120088 => 120089)


--- branches/safari-536-branch/Source/WebCore/ChangeLog	2012-06-12 17:05:44 UTC (rev 120088)
+++ branches/safari-536-branch/Source/WebCore/ChangeLog	2012-06-12 17:08:25 UTC (rev 120089)
@@ -1,3 +1,19 @@
+2012-06-12  Lucas Forschler  <lforsch...@apple.com>
+
+    Merge 119644
+
+    2012-06-06  Brady Eidson  <beid...@apple.com>
+
+            <rdar://problem/11575112> and https://bugs.webkit.org/show_bug.cgi?id=88428
+            REGRESSION (r115654): Opening many non-English WebArchives shows obvious encoding issues
+
+            Reviewed by Nate Chapin.
+
+            Test: fast/loader/webarchive-encoding-respected.html
+
+            * loader/DocumentLoader.cpp:
+            (WebCore::DocumentLoader::commitData): Properly set the main resource encoding from the webarchive.
+
 2012-06-06  Mark Rowe  <mr...@apple.com>
 
         Merge r119548.

Modified: branches/safari-536-branch/Source/WebCore/loader/DocumentLoader.cpp (120088 => 120089)


--- branches/safari-536-branch/Source/WebCore/loader/DocumentLoader.cpp	2012-06-12 17:05:44 UTC (rev 120088)
+++ branches/safari-536-branch/Source/WebCore/loader/DocumentLoader.cpp	2012-06-12 17:08:25 UTC (rev 120089)
@@ -342,6 +342,10 @@
         if (encoding.isNull()) {
             userChosen = false;
             encoding = response().textEncodingName();
+#if ENABLE(WEB_ARCHIVE)
+            if (m_archive && m_archive->type() == Archive::WebArchive)
+                encoding = m_archive->mainResource()->textEncoding();
+#endif
         }
         m_writer.setEncoding(encoding, userChosen);
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to