WebKit/mac:
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Mar 2008 00:37:58 +0000 (00:37 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Mar 2008 00:37:58 +0000 (00:37 +0000)
2008-03-24  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Maciej, landed by Brady

        Bug 3580: iFrames Appear to be Cached
        <http://bugs.webkit.org/show_bug.cgi?id=3580>

        Bug 15486: REGRESSION: Reload causes WebKit to *forget* fragment URLs
        <http://bugs.webkit.org/show_bug.cgi?id=15486>

        Bug 15554: Reload causes <object> to use old data
        <http://bugs.webkit.org/show_bug.cgi?id=15554>

        If a page is reloaded, a child frame's URL can not be taken from a history item.

        * WebView/WebFrame.mm:
        (-[WebFrame _loadURL:referrer:intoChild:]):

LayoutTests:

2008-03-24  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Maciej, landed by Brady

        Tests for the following bugs:

        Bug 3580: iFrames Appear to be Cached
        <http://bugs.webkit.org/show_bug.cgi?id=3580>

        Bug 15486: REGRESSION: Reload causes WebKit to *forget* fragment URLs
        <http://bugs.webkit.org/show_bug.cgi?id=15486>

        Bug 15554: Reload causes <object> to use old data
        <http://bugs.webkit.org/show_bug.cgi?id=15554>

        * http/tests/navigation/reload-subframe-frame-expected.txt: Added.
        * http/tests/navigation/reload-subframe-frame.html: Added.
        * http/tests/navigation/reload-subframe-iframe-expected.txt: Added.
        * http/tests/navigation/reload-subframe-iframe.html: Added.
        * http/tests/navigation/reload-subframe-object-expected.txt: Added.
        * http/tests/navigation/reload-subframe-object.html: Added.
        * http/tests/navigation/resources/reload-subframe-content.pl: Added.
        * http/tests/navigation/resources/reload-subframe.pl: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31264 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/http/tests/navigation/reload-subframe-frame-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/navigation/reload-subframe-frame.html [new file with mode: 0644]
LayoutTests/http/tests/navigation/reload-subframe-iframe-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/navigation/reload-subframe-iframe.html [new file with mode: 0644]
LayoutTests/http/tests/navigation/reload-subframe-object-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/navigation/reload-subframe-object.html [new file with mode: 0644]
LayoutTests/http/tests/navigation/resources/reload-subframe-content.pl [new file with mode: 0644]
LayoutTests/http/tests/navigation/resources/reload-subframe.pl [new file with mode: 0644]
WebKit/mac/ChangeLog
WebKit/mac/WebView/WebFrame.mm

index 0d7be96..f8d67d6 100644 (file)
@@ -1,3 +1,27 @@
+2008-03-24  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
+
+        Reviewed by Maciej, landed by Brady
+
+        Tests for the following bugs:
+
+        Bug 3580: iFrames Appear to be Cached
+        <http://bugs.webkit.org/show_bug.cgi?id=3580>
+
+        Bug 15486: REGRESSION: Reload causes WebKit to *forget* fragment URLs
+        <http://bugs.webkit.org/show_bug.cgi?id=15486>
+
+        Bug 15554: Reload causes <object> to use old data
+        <http://bugs.webkit.org/show_bug.cgi?id=15554>
+
+        * http/tests/navigation/reload-subframe-frame-expected.txt: Added.
+        * http/tests/navigation/reload-subframe-frame.html: Added.
+        * http/tests/navigation/reload-subframe-iframe-expected.txt: Added.
+        * http/tests/navigation/reload-subframe-iframe.html: Added.
+        * http/tests/navigation/reload-subframe-object-expected.txt: Added.
+        * http/tests/navigation/reload-subframe-object.html: Added.
+        * http/tests/navigation/resources/reload-subframe-content.pl: Added.
+        * http/tests/navigation/resources/reload-subframe.pl: Added.
+
 2008-03-24  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Sam Weinig.
diff --git a/LayoutTests/http/tests/navigation/reload-subframe-frame-expected.txt b/LayoutTests/http/tests/navigation/reload-subframe-frame-expected.txt
new file mode 100644 (file)
index 0000000..9214593
--- /dev/null
@@ -0,0 +1,6 @@
+
+
+--------
+Frame: '<!--framePath //<!--frame0-->-->'
+--------
+Pass
diff --git a/LayoutTests/http/tests/navigation/reload-subframe-frame.html b/LayoutTests/http/tests/navigation/reload-subframe-frame.html
new file mode 100644 (file)
index 0000000..a92568f
--- /dev/null
@@ -0,0 +1,15 @@
+<html>
+<head>
+<script type="text/javascript">
+function startTest()
+{
+    layoutTestController.dumpAsText();
+    layoutTestController.dumpChildFramesAsText();
+    layoutTestController.queueLoad("resources/reload-subframe.pl?type=frame");
+    layoutTestController.queueReload();
+}
+</script>
+</head>
+<body onload="startTest();">
+</body>
+</html>
diff --git a/LayoutTests/http/tests/navigation/reload-subframe-iframe-expected.txt b/LayoutTests/http/tests/navigation/reload-subframe-iframe-expected.txt
new file mode 100644 (file)
index 0000000..9214593
--- /dev/null
@@ -0,0 +1,6 @@
+
+
+--------
+Frame: '<!--framePath //<!--frame0-->-->'
+--------
+Pass
diff --git a/LayoutTests/http/tests/navigation/reload-subframe-iframe.html b/LayoutTests/http/tests/navigation/reload-subframe-iframe.html
new file mode 100644 (file)
index 0000000..a4e89cc
--- /dev/null
@@ -0,0 +1,15 @@
+<html>
+<head>
+<script type="text/javascript">
+function startTest()
+{
+    layoutTestController.dumpAsText();
+    layoutTestController.dumpChildFramesAsText();
+    layoutTestController.queueLoad("resources/reload-subframe.pl?type=iframe");
+    layoutTestController.queueReload();
+}
+</script>
+</head>
+<body onload="startTest();">
+</body>
+</html>
diff --git a/LayoutTests/http/tests/navigation/reload-subframe-object-expected.txt b/LayoutTests/http/tests/navigation/reload-subframe-object-expected.txt
new file mode 100644 (file)
index 0000000..9214593
--- /dev/null
@@ -0,0 +1,6 @@
+
+
+--------
+Frame: '<!--framePath //<!--frame0-->-->'
+--------
+Pass
diff --git a/LayoutTests/http/tests/navigation/reload-subframe-object.html b/LayoutTests/http/tests/navigation/reload-subframe-object.html
new file mode 100644 (file)
index 0000000..9c04b18
--- /dev/null
@@ -0,0 +1,15 @@
+<html>
+<head>
+<script type="text/javascript">
+function startTest()
+{
+    layoutTestController.dumpAsText();
+    layoutTestController.dumpChildFramesAsText();
+    layoutTestController.queueLoad("resources/reload-subframe.pl?type=object");
+    layoutTestController.queueReload();
+}
+</script>
+</head>
+<body onload="startTest();">
+</body>
+</html>
diff --git a/LayoutTests/http/tests/navigation/resources/reload-subframe-content.pl b/LayoutTests/http/tests/navigation/resources/reload-subframe-content.pl
new file mode 100644 (file)
index 0000000..9eead4e
--- /dev/null
@@ -0,0 +1,19 @@
+#!/usr/bin/perl
+
+print "Content-type: text/plain\r\n";
+print "\r\n";
+
+@keypairs = split(/&/, $ENV{'QUERY_STRING'});
+
+$text = "";
+
+foreach $pair (@keypairs)
+{
+    ($name, $value) = split(/=/, $pair);
+
+     if ($name eq "text") {
+         $text = $value;
+     }
+}
+
+print $text;
diff --git a/LayoutTests/http/tests/navigation/resources/reload-subframe.pl b/LayoutTests/http/tests/navigation/resources/reload-subframe.pl
new file mode 100644 (file)
index 0000000..917ff89
--- /dev/null
@@ -0,0 +1,57 @@
+#!/usr/bin/perl
+
+print "Content-type: text/html\r\n";
+
+@keypairs = split(/&/, $ENV{'QUERY_STRING'});
+
+$type = "";
+
+foreach $pair (@keypairs)
+{
+    ($name, $value) = split(/=/, $pair);
+    
+    if ($name eq "type") {
+        $type = $value;
+    }
+}
+
+print "Set-Cookie: reload-subframe-$type=1\r\n";
+print "\r\n";
+
+print "<html>";
+print "<head>";
+print "</head>";
+
+@cookies = split(/;/, $ENV{'HTTP_COOKIE'});
+
+$subframe_content = "Fail";
+
+foreach $pair (@cookies)
+{
+    ($name, $value) = split(/=/, $pair);
+    
+    $name =~ s/^\s+//;
+    $name =~ s/\s+$//;
+    
+    if ($name eq "reload-subframe-$type") {
+        $subframe_content = "Pass";
+    }
+}
+
+$src = "'reload-subframe-content.pl?text=$subframe_content'";
+
+if ($type eq "iframe") {
+    print "<body>";
+    print "<iframe src=$src></iframe>";
+    print "</body>";
+} elsif ($type eq "object") {
+    print "<body>";
+    print "<object data=$src></object>";
+    print "</body>";
+} else {
+    print "<frameset>";
+    print "<frame src=$src>";
+    print "</frameset>";
+}
+
+print "</html>";
index 6925b4e..d4d862d 100644 (file)
@@ -1,3 +1,21 @@
+2008-03-24  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
+
+        Reviewed by Maciej, landed by Brady
+
+        Bug 3580: iFrames Appear to be Cached
+        <http://bugs.webkit.org/show_bug.cgi?id=3580>
+
+        Bug 15486: REGRESSION: Reload causes WebKit to *forget* fragment URLs
+        <http://bugs.webkit.org/show_bug.cgi?id=15486>
+
+        Bug 15554: Reload causes <object> to use old data
+        <http://bugs.webkit.org/show_bug.cgi?id=15554>
+
+        If a page is reloaded, a child frame's URL can not be taken from a history item.
+
+        * WebView/WebFrame.mm:
+        (-[WebFrame _loadURL:referrer:intoChild:]):
+
 2008-03-24  Darin Adler  <darin@apple.com>
 
         Reviewed by Beth.
index 16493b2..e9efbaf 100644 (file)
@@ -312,7 +312,6 @@ WebView *getWebView(WebFrame *webFrame)
     // Reload will maintain the frame contents, LoadSame will not.
     if (parentItem && parentItem->children().size() &&
         (isBackForwardLoadType(loadType)
-         || loadType == FrameLoadTypeReload
          || loadType == FrameLoadTypeReloadAllowingStaleData))
     {
         HistoryItem* childItem = parentItem->childItemWithName([childFrame name]);