Title: [114077] trunk/Source/WebCore
Revision
114077
Author
[email protected]
Date
2012-04-12 20:47:20 -0700 (Thu, 12 Apr 2012)

Log Message

Use _self to represnet self-navigation, like in the HTML5 spec
https://bugs.webkit.org/show_bug.cgi?id=83834

Reviewed by Eric Seidel.

This patch aligns the internal state representation of the FrameLoader
more closely with the HTML5 spec.  Both the null string and "_self"
represent self-navigation, but the HTML5 spec distinguishes them when
navigating seamless iframes.  In that case, "_self" is explicit
self-navigation, whereas a null string will get redirected to the
"master" frame (the closest enclosing non-seamless frame).

This patch shouldn't have any observable behavior changes, but it will
be useful when we merge in the seamless branch from GitHub.
(See https://github.com/eseidel/webkit/commit/df0e71fcacdb0e7e45fe669afe1314cec5b76523
which contains this change.)

Once the seamless branch lands, this change will be tested by a number
of tests in
https://github.com/eseidel/webkit/tree/seamless/LayoutTests/fast/frames/seamless
including seamless-hyperlink.html.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::loadURL):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (114076 => 114077)


--- trunk/Source/WebCore/ChangeLog	2012-04-13 03:11:20 UTC (rev 114076)
+++ trunk/Source/WebCore/ChangeLog	2012-04-13 03:47:20 UTC (rev 114077)
@@ -1,3 +1,31 @@
+2012-04-12  Adam Barth  <[email protected]>
+
+        Use _self to represnet self-navigation, like in the HTML5 spec
+        https://bugs.webkit.org/show_bug.cgi?id=83834
+
+        Reviewed by Eric Seidel.
+
+        This patch aligns the internal state representation of the FrameLoader
+        more closely with the HTML5 spec.  Both the null string and "_self"
+        represent self-navigation, but the HTML5 spec distinguishes them when
+        navigating seamless iframes.  In that case, "_self" is explicit
+        self-navigation, whereas a null string will get redirected to the
+        "master" frame (the closest enclosing non-seamless frame).
+
+        This patch shouldn't have any observable behavior changes, but it will
+        be useful when we merge in the seamless branch from GitHub.
+        (See https://github.com/eseidel/webkit/commit/df0e71fcacdb0e7e45fe669afe1314cec5b76523
+        which contains this change.)
+
+        Once the seamless branch lands, this change will be tested by a number
+        of tests in
+        https://github.com/eseidel/webkit/tree/seamless/LayoutTests/fast/frames/seamless
+        including seamless-hyperlink.html.
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::loadURLIntoChildFrame):
+        (WebCore::FrameLoader::loadURL):
+
 2012-04-12  James Robinson  <[email protected]>
 
         [chromium] Move WebVideoFrame into Platform and remove WebCore::VideoFrameChromium wrapper API

Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (114076 => 114077)


--- trunk/Source/WebCore/loader/FrameLoader.cpp	2012-04-13 03:11:20 UTC (rev 114076)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp	2012-04-13 03:47:20 UTC (rev 114077)
@@ -804,7 +804,7 @@
         }
     }
 
-    childFrame->loader()->loadURL(url, referer, String(), false, FrameLoadTypeRedirectWithLockedBackForwardList, 0, 0);
+    childFrame->loader()->loadURL(url, referer, "_self", false, FrameLoadTypeRedirectWithLockedBackForwardList, 0, 0);
 }
 
 #if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
@@ -1193,7 +1193,7 @@
     // The search for a target frame is done earlier in the case of form submission.
     Frame* targetFrame = isFormSubmission ? 0 : findFrameForNavigation(frameName);
     if (targetFrame && targetFrame != m_frame) {
-        targetFrame->loader()->loadURL(newURL, referrer, String(), lockHistory, newLoadType, event, formState.release());
+        targetFrame->loader()->loadURL(newURL, referrer, "_self", lockHistory, newLoadType, event, formState.release());
         return;
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to