Title: [124129] branches/safari-536.26-branch

Diff

Modified: branches/safari-536.26-branch/LayoutTests/ChangeLog (124128 => 124129)


--- branches/safari-536.26-branch/LayoutTests/ChangeLog	2012-07-31 00:49:39 UTC (rev 124128)
+++ branches/safari-536.26-branch/LayoutTests/ChangeLog	2012-07-31 00:53:20 UTC (rev 124129)
@@ -1,5 +1,18 @@
 2012-07-30  Lucas Forschler  <[email protected]>
 
+    Merge 121912
+
+    2012-07-05  Nate Chapin  <[email protected]>
+
+            Test for https://bugs.webkit.org/show_bug.cgi?id=88436.
+
+            Reviewed by Brady Eidson.
+
+            * http/tests/multipart/multipart-replace-non-html-content-expected.txt: Added.
+            * http/tests/multipart/multipart-replace-non-html-content.php: Added.
+
+2012-07-30  Lucas Forschler  <[email protected]>
+
     Merge 121645
 
     2012-07-01  Dan Bernstein  <[email protected]>

Copied: branches/safari-536.26-branch/LayoutTests/http/tests/multipart/multipart-replace-non-html-content-expected.txt (from rev 121912, trunk/LayoutTests/http/tests/multipart/multipart-replace-non-html-content-expected.txt) (0 => 124129)


--- branches/safari-536.26-branch/LayoutTests/http/tests/multipart/multipart-replace-non-html-content-expected.txt	                        (rev 0)
+++ branches/safari-536.26-branch/LayoutTests/http/tests/multipart/multipart-replace-non-html-content-expected.txt	2012-07-31 00:53:20 UTC (rev 124129)
@@ -0,0 +1,3 @@
+This text should only appear once 10                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
+
+

Copied: branches/safari-536.26-branch/LayoutTests/http/tests/multipart/multipart-replace-non-html-content.php (from rev 121912, trunk/LayoutTests/http/tests/multipart/multipart-replace-non-html-content.php) (0 => 124129)


--- branches/safari-536.26-branch/LayoutTests/http/tests/multipart/multipart-replace-non-html-content.php	                        (rev 0)
+++ branches/safari-536.26-branch/LayoutTests/http/tests/multipart/multipart-replace-non-html-content.php	2012-07-31 00:53:20 UTC (rev 124129)
@@ -0,0 +1,26 @@
+<?php
+header('Content-type: multipart/x-mixed-replace; boundary=boundary');
+header('Connection: keep-alive');
+echo "--boundary\r\n";
+echo "Content-Type: text/html\r\n\r\n";
+echo str_pad('', 5000);
+?>
+
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+</script>
+
+<?php
+for ($i = 0; $i <= 10; $i++) {
+    echo "--boundary\r\n";
+    echo "Content-Type: text/plain\r\n\r\n";
+    echo "This text should only appear once ";
+    echo $i;
+    echo str_pad('', 5000);
+    echo "\r\n\r\n";
+    flush();
+    usleep(100000);
+    $i++;
+}
+?>

Modified: branches/safari-536.26-branch/Source/WebCore/ChangeLog (124128 => 124129)


--- branches/safari-536.26-branch/Source/WebCore/ChangeLog	2012-07-31 00:49:39 UTC (rev 124128)
+++ branches/safari-536.26-branch/Source/WebCore/ChangeLog	2012-07-31 00:53:20 UTC (rev 124129)
@@ -1,5 +1,28 @@
 2012-07-30  Lucas Forschler  <[email protected]>
 
+    Merge 121912
+
+    2012-07-05  Nate Chapin  <[email protected]>
+
+            REGRESSION (r115654): Sometimes does not replace content for multipart/x-mixed-replace
+            https://bugs.webkit.org/show_bug.cgi?id=88436
+
+            Reviewed by Brady Eidson.
+
+            Test: http/tests/multipart/multipart-replace-non-html-content.php
+
+            * loader/DocumentLoader.cpp:
+            (WebCore::DocumentLoader::commitData): We should only send receivedFirstData() once per main resource load,
+                rather than multiple times in a multipart load. 
+            (WebCore::DocumentLoader::setupForReplaceByMIMEType): m_gotFirstByte isn't set to true until data is
+                actually committed, and multipart data is often not committed until the part is finished. Check
+                whether the SharedBuffer is non-null instead.
+            * testing/js/WebCoreTestSupport.cpp:
+            (WebCoreTestSupport::resetInternalsObject): The JSInternals object my have already been cleared if the window shell
+                was cleared as part of creation of a new Document. Check it before using it.
+
+2012-07-30  Lucas Forschler  <[email protected]>
+
     Merge 121646
 
     2012-07-01  Timothy Hatcher  <[email protected]>

Modified: branches/safari-536.26-branch/Source/WebCore/loader/DocumentLoader.cpp (124128 => 124129)


--- branches/safari-536.26-branch/Source/WebCore/loader/DocumentLoader.cpp	2012-07-31 00:49:39 UTC (rev 124128)
+++ branches/safari-536.26-branch/Source/WebCore/loader/DocumentLoader.cpp	2012-07-31 00:53:20 UTC (rev 124129)
@@ -335,7 +335,8 @@
             m_frame->document()->setBaseURLOverride(m_archive->mainResource()->url());
 #endif
 
-        frameLoader()->receivedFirstData();
+        if (!frameLoader()->isReplacing())
+            frameLoader()->receivedFirstData();
 
         bool userChosen = true;
         String encoding = overrideEncoding();
@@ -366,7 +367,7 @@
 
 void DocumentLoader::setupForReplaceByMIMEType(const String& newMIMEType)
 {
-    if (!m_gotFirstByte)
+    if (!mainResourceData())
         return;
     
     String oldMIMEType = m_response.mimeType();

Modified: branches/safari-536.26-branch/Source/WebCore/testing/js/WebCoreTestSupport.cpp (124128 => 124129)


--- branches/safari-536.26-branch/Source/WebCore/testing/js/WebCoreTestSupport.cpp	2012-07-31 00:49:39 UTC (rev 124128)
+++ branches/safari-536.26-branch/Source/WebCore/testing/js/WebCoreTestSupport.cpp	2012-07-31 00:53:20 UTC (rev 124129)
@@ -52,8 +52,10 @@
     JSLock lock(SilenceAssertionsOnly);
     ExecState* exec = toJS(context);
     JSDOMGlobalObject* globalObject = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject());
-    Internals * internals = toInternals(globalObject->getDirect(exec->globalData(), Identifier(exec, Internals::internalsId)));
-    if (internals) {
+    JSValue internalsJS = globalObject->getDirect(exec->globalData(), Identifier(exec, Internals::internalsId));
+    if (internalsJS.isNull() || internalsJS.isEmpty())
+        return;
+    if (Internals* internals = toInternals(internalsJS)) {
         ScriptExecutionContext* scriptContext = globalObject->scriptExecutionContext();
         if (scriptContext->isDocument())
             internals->reset(static_cast<Document*>(scriptContext));
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to