<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[169227] branches/safari-537.77-branch/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/169227">169227</a></dd>
<dt>Author</dt> <dd>dburkart@apple.com</dd>
<dt>Date</dt> <dd>2014-05-22 16:43:01 -0700 (Thu, 22 May 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/167856">r167856</a>. <rdar://problem/16975541></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari53777branchSourceWebCoreChangeLog">branches/safari-537.77-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari53777branchSourceWebCoredomDocumentcpp">branches/safari-537.77-branch/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#branchessafari53777branchSourceWebCoreloaderFrameLoadercpp">branches/safari-537.77-branch/Source/WebCore/loader/FrameLoader.cpp</a></li>
<li><a href="#branchessafari53777branchSourceWebCoreloaderNavigationSchedulercpp">branches/safari-537.77-branch/Source/WebCore/loader/NavigationScheduler.cpp</a></li>
<li><a href="#branchessafari53777branchSourceWebCoreloaderNavigationSchedulerh">branches/safari-537.77-branch/Source/WebCore/loader/NavigationScheduler.h</a></li>
<li><a href="#branchessafari53777branchSourceWebCoreloaderSubframeLoadercpp">branches/safari-537.77-branch/Source/WebCore/loader/SubframeLoader.cpp</a></li>
<li><a href="#branchessafari53777branchSourceWebCorepageDOMWindowcpp">branches/safari-537.77-branch/Source/WebCore/page/DOMWindow.cpp</a></li>
<li><a href="#branchessafari53777branchSourceWebCorepageSecurityOrigincpp">branches/safari-537.77-branch/Source/WebCore/page/SecurityOrigin.cpp</a></li>
<li><a href="#branchessafari53777branchSourceWebCorepageSecurityOriginh">branches/safari-537.77-branch/Source/WebCore/page/SecurityOrigin.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari53777branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-537.77-branch/Source/WebCore/ChangeLog (169226 => 169227)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.77-branch/Source/WebCore/ChangeLog        2014-05-22 23:34:16 UTC (rev 169226)
+++ branches/safari-537.77-branch/Source/WebCore/ChangeLog        2014-05-22 23:43:01 UTC (rev 169227)
</span><span class="lines">@@ -1,3 +1,56 @@
</span><ins>+2014-05-22 Dana Burkart <dburkart@apple.com>
+
+ Merge r167856
+
+ 2014-04-27 Darin Adler <darin@apple.com>
+
+ Webpages can trigger loads with invalid URLs
+ https://bugs.webkit.org/show_bug.cgi?id=132224
+ rdar://problem/16697142
+
+ Reviewed by Alexey Proskuryakov.
+
+ Invalid URLs can be a way to trick the user about what website they
+ are looking at. Still trying to figure out a good way to regression-test this.
+
+ * dom/Document.cpp:
+ (WebCore::Document::processHttpEquiv): Pass a URL rather than a String to
+ the navigation scheduler.
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::receivedFirstData): Ditto.
+
+ * loader/NavigationScheduler.cpp:
+ (WebCore::ScheduledURLNavigation::ScheduledURLNavigation): Take a URL rather
+ than a string.
+ (WebCore::ScheduledURLNavigation::url): Ditto.
+ (WebCore::ScheduledRedirect::ScheduledRedirect): Ditto.
+ (WebCore::ScheduledLocationChange::ScheduledLocationChange): Ditto.
+ (WebCore::ScheduledRefresh::ScheduledRefresh): Ditto.
+ (WebCore::NavigationScheduler::shouldScheduleNavigation): Added a check that
+ prevents navigation to any URL that is invalid, except for JavaScript URLs,
+ which need not be valid.
+ (WebCore::NavigationScheduler::scheduleRedirect): Use URL instead of String.
+ (WebCore::NavigationScheduler::scheduleLocationChange): Use URL instead of
+ String. Also got rid of empty string check since empty URLs are also invalid,
+ and so shouldScheduleNavigation will take care of it.
+ (WebCore::NavigationScheduler::scheduleRefresh): Use URL instead of String.
+
+ * loader/NavigationScheduler.h: Take URL instead of String. Also removed some
+ unneeded incldues and uses of WTF_MAKE_NONCOPYABLE. NavigationScheduler is
+ already noncopyable because it has a reference for a data member, and the
+ disabler doesn't have any real reason to be noncopyable.
+
+ * loader/SubframeLoader.cpp:
+ (WebCore::SubframeLoader::loadOrRedirectSubframe): Pass a URL rather than a
+ String to the NavigationScheduler.
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::createWindow): Ditto.
+
+ * page/SecurityOrigin.cpp:
+ (WebCore::SecurityOrigin::urlWithUniqueSecurityOrigin): Return a URL instead
+ of a String.
+ * page/SecurityOrigin.h: Updated for above change.
+
</ins><span class="cx"> 2014-05-22 Lucas Forschler <lforschler@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r168636
</span></span></pre></div>
<a id="branchessafari53777branchSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-537.77-branch/Source/WebCore/dom/Document.cpp (169226 => 169227)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.77-branch/Source/WebCore/dom/Document.cpp        2014-05-22 23:34:16 UTC (rev 169226)
+++ branches/safari-537.77-branch/Source/WebCore/dom/Document.cpp        2014-05-22 23:43:01 UTC (rev 169227)
</span><span class="lines">@@ -2833,13 +2833,19 @@
</span><span class="cx"> styleResolverChanged(DeferRecalcStyle);
</span><span class="cx"> } else if (equalIgnoringCase(equiv, "refresh")) {
</span><span class="cx"> double delay;
</span><del>- String url;
- if (frame && parseHTTPRefresh(content, true, delay, url)) {
- if (url.isEmpty())
- url = m_url.string();
</del><ins>+ String urlString;
+ if (frame && parseHTTPRefresh(content, true, delay, urlString)) {
+ KURL completedURL;
+ if (urlString.isEmpty())
+ completedURL = m_url;
</ins><span class="cx"> else
</span><del>- url = completeURL(url).string();
- frame->navigationScheduler()->scheduleRedirect(delay, url);
</del><ins>+ completedURL = completeURL(urlString);
+ if (!protocolIsJavaScript(completedURL))
+ frame->navigationScheduler()->scheduleRedirect(delay, completedURL);
+ else {
+ String message = "Refused to refresh " + m_url.stringCenterEllipsizedToLength() + " to a javascript: URL";
+ addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message);
+ }
</ins><span class="cx"> }
</span><span class="cx"> } else if (equalIgnoringCase(equiv, "set-cookie")) {
</span><span class="cx"> // FIXME: make setCookie work on XML documents too; e.g. in case of <html:meta .....>
</span></span></pre></div>
<a id="branchessafari53777branchSourceWebCoreloaderFrameLoadercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-537.77-branch/Source/WebCore/loader/FrameLoader.cpp (169226 => 169227)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.77-branch/Source/WebCore/loader/FrameLoader.cpp        2014-05-22 23:34:16 UTC (rev 169226)
+++ branches/safari-537.77-branch/Source/WebCore/loader/FrameLoader.cpp        2014-05-22 23:43:01 UTC (rev 169227)
</span><span class="lines">@@ -630,15 +630,21 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> double delay;
</span><del>- String url;
- if (!parseHTTPRefresh(m_documentLoader->response().httpHeaderField("Refresh"), false, delay, url))
</del><ins>+ String urlString;
+ if (!parseHTTPRefresh(m_documentLoader->response().httpHeaderField("Refresh"), false, delay, urlString))
</ins><span class="cx"> return;
</span><del>- if (url.isEmpty())
- url = m_frame->document()->url().string();
</del><ins>+ KURL completedURL;
+ if (urlString.isEmpty())
+ completedURL = m_frame->document()->url();
</ins><span class="cx"> else
</span><del>- url = m_frame->document()->completeURL(url).string();
</del><ins>+ completedURL = m_frame->document()->completeURL(urlString);
</ins><span class="cx">
</span><del>- m_frame->navigationScheduler()->scheduleRedirect(delay, url);
</del><ins>+ if (!protocolIsJavaScript(completedURL))
+ m_frame->navigationScheduler()->scheduleRedirect(delay, completedURL);
+ else {
+ String message = "Refused to refresh " + m_frame->document()->url().stringCenterEllipsizedToLength() + " to a javascript: URL";
+ m_frame->document()->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, message);
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void FrameLoader::setOutgoingReferrer(const KURL& url)
</span></span></pre></div>
<a id="branchessafari53777branchSourceWebCoreloaderNavigationSchedulercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-537.77-branch/Source/WebCore/loader/NavigationScheduler.cpp (169226 => 169227)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.77-branch/Source/WebCore/loader/NavigationScheduler.cpp        2014-05-22 23:34:16 UTC (rev 169226)
+++ branches/safari-537.77-branch/Source/WebCore/loader/NavigationScheduler.cpp        2014-05-22 23:43:01 UTC (rev 169227)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx">
</span><span class="cx"> class ScheduledURLNavigation : public ScheduledNavigation {
</span><span class="cx"> protected:
</span><del>- ScheduledURLNavigation(double delay, SecurityOrigin* securityOrigin, const String& url, const String& referrer, bool lockHistory, bool lockBackForwardList, bool duringLoad, bool isLocationChange)
</del><ins>+ ScheduledURLNavigation(double delay, SecurityOrigin* securityOrigin, const KURL& url, const String& referrer, bool lockHistory, bool lockBackForwardList, bool duringLoad, bool isLocationChange)
</ins><span class="cx"> : ScheduledNavigation(delay, lockHistory, lockBackForwardList, duringLoad, isLocationChange)
</span><span class="cx"> , m_securityOrigin(securityOrigin)
</span><span class="cx"> , m_url(url)
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx"> virtual void fire(Frame* frame)
</span><span class="cx"> {
</span><span class="cx"> UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingNewUserGesture : DefinitelyNotProcessingUserGesture);
</span><del>- frame->loader()->changeLocation(m_securityOrigin.get(), KURL(ParsedURLString, m_url), m_referrer, lockHistory(), lockBackForwardList(), false);
</del><ins>+ frame->loader()->changeLocation(m_securityOrigin.get(), m_url, m_referrer, lockHistory(), lockBackForwardList(), false);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> virtual void didStartTimer(Frame* frame, Timer<NavigationScheduler>* timer)
</span><span class="lines">@@ -118,7 +118,7 @@
</span><span class="cx"> m_haveToldClient = true;
</span><span class="cx">
</span><span class="cx"> UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingNewUserGesture : DefinitelyNotProcessingUserGesture);
</span><del>- frame->loader()->clientRedirected(KURL(ParsedURLString, m_url), delay(), currentTime() + timer->nextFireInterval(), lockBackForwardList());
</del><ins>+ frame->loader()->clientRedirected(m_url, delay(), currentTime() + timer->nextFireInterval(), lockBackForwardList());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> virtual void didStopTimer(Frame* frame, bool newLoadInProgress)
</span><span class="lines">@@ -136,19 +136,19 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> SecurityOrigin* securityOrigin() const { return m_securityOrigin.get(); }
</span><del>- String url() const { return m_url; }
</del><ins>+ const KURL& url() const { return m_url; }
</ins><span class="cx"> String referrer() const { return m_referrer; }
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> RefPtr<SecurityOrigin> m_securityOrigin;
</span><del>- String m_url;
</del><ins>+ KURL m_url;
</ins><span class="cx"> String m_referrer;
</span><span class="cx"> bool m_haveToldClient;
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> class ScheduledRedirect : public ScheduledURLNavigation {
</span><span class="cx"> public:
</span><del>- ScheduledRedirect(double delay, SecurityOrigin* securityOrigin, const String& url, bool lockHistory, bool lockBackForwardList)
</del><ins>+ ScheduledRedirect(double delay, SecurityOrigin* securityOrigin, const KURL& url, bool lockHistory, bool lockBackForwardList)
</ins><span class="cx"> : ScheduledURLNavigation(delay, securityOrigin, url, String(), lockHistory, lockBackForwardList, false, false)
</span><span class="cx"> {
</span><span class="cx"> clearUserGesture();
</span><span class="lines">@@ -159,20 +159,20 @@
</span><span class="cx"> virtual void fire(Frame* frame)
</span><span class="cx"> {
</span><span class="cx"> UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingNewUserGesture : DefinitelyNotProcessingUserGesture);
</span><del>- bool refresh = equalIgnoringFragmentIdentifier(frame->document()->url(), KURL(ParsedURLString, url()));
- frame->loader()->changeLocation(securityOrigin(), KURL(ParsedURLString, url()), referrer(), lockHistory(), lockBackForwardList(), refresh);
</del><ins>+ bool refresh = equalIgnoringFragmentIdentifier(frame->document()->url(), url());
+ frame->loader()->changeLocation(securityOrigin(), url(), referrer(), lockHistory(), lockBackForwardList(), refresh);
</ins><span class="cx"> }
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> class ScheduledLocationChange : public ScheduledURLNavigation {
</span><span class="cx"> public:
</span><del>- ScheduledLocationChange(SecurityOrigin* securityOrigin, const String& url, const String& referrer, bool lockHistory, bool lockBackForwardList, bool duringLoad)
</del><ins>+ ScheduledLocationChange(SecurityOrigin* securityOrigin, const KURL& url, const String& referrer, bool lockHistory, bool lockBackForwardList, bool duringLoad)
</ins><span class="cx"> : ScheduledURLNavigation(0.0, securityOrigin, url, referrer, lockHistory, lockBackForwardList, duringLoad, true) { }
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> class ScheduledRefresh : public ScheduledURLNavigation {
</span><span class="cx"> public:
</span><del>- ScheduledRefresh(SecurityOrigin* securityOrigin, const String& url, const String& referrer)
</del><ins>+ ScheduledRefresh(SecurityOrigin* securityOrigin, const KURL& url, const String& referrer)
</ins><span class="cx"> : ScheduledURLNavigation(0.0, securityOrigin, url, referrer, true, true, false, true)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -180,7 +180,7 @@
</span><span class="cx"> virtual void fire(Frame* frame)
</span><span class="cx"> {
</span><span class="cx"> UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingNewUserGesture : DefinitelyNotProcessingUserGesture);
</span><del>- frame->loader()->changeLocation(securityOrigin(), KURL(ParsedURLString, url()), referrer(), lockHistory(), lockBackForwardList(), true);
</del><ins>+ frame->loader()->changeLocation(securityOrigin(), url(), referrer(), lockHistory(), lockBackForwardList(), true);
</ins><span class="cx"> }
</span><span class="cx"> };
</span><span class="cx">
</span><span class="lines">@@ -299,12 +299,18 @@
</span><span class="cx"> return m_frame->page();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline bool NavigationScheduler::shouldScheduleNavigation(const String& url) const
</del><ins>+inline bool NavigationScheduler::shouldScheduleNavigation(const KURL& url) const
</ins><span class="cx"> {
</span><del>- return shouldScheduleNavigation() && (protocolIsJavaScript(url) || NavigationDisablerForBeforeUnload::isNavigationAllowed());
</del><ins>+ if (!shouldScheduleNavigation())
+ return false;
+ if (protocolIsJavaScript(url))
+ return true;
+ if (!url.isValid())
+ return false;
+ return NavigationDisablerForBeforeUnload::isNavigationAllowed();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void NavigationScheduler::scheduleRedirect(double delay, const String& url)
</del><ins>+void NavigationScheduler::scheduleRedirect(double delay, const KURL& url)
</ins><span class="cx"> {
</span><span class="cx"> if (!shouldScheduleNavigation(url))
</span><span class="cx"> return;
</span><span class="lines">@@ -336,12 +342,10 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void NavigationScheduler::scheduleLocationChange(SecurityOrigin* securityOrigin, const String& url, const String& referrer, bool lockHistory, bool lockBackForwardList)
</del><ins>+void NavigationScheduler::scheduleLocationChange(SecurityOrigin* securityOrigin, const KURL& url, const String& referrer, bool lockHistory, bool lockBackForwardList)
</ins><span class="cx"> {
</span><span class="cx"> if (!shouldScheduleNavigation(url))
</span><span class="cx"> return;
</span><del>- if (url.isEmpty())
- return;
</del><span class="cx">
</span><span class="cx"> lockBackForwardList = lockBackForwardList || mustLockBackForwardList(m_frame);
</span><span class="cx">
</span><span class="lines">@@ -366,7 +370,7 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_frame->page());
</span><span class="cx">
</span><del>- // FIXME: Do we need special handling for form submissions where the URL is the same
</del><ins>+ // FIXME: Do we need special handling for form submissions where the KURL is the same
</ins><span class="cx"> // as the current one except for the fragment part? See scheduleLocationChange above.
</span><span class="cx">
</span><span class="cx"> // Handle a location change of a page with no document as a special case.
</span><span class="lines">@@ -391,7 +395,7 @@
</span><span class="cx"> if (url.isEmpty())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- schedule(adoptPtr(new ScheduledRefresh(m_frame->document()->securityOrigin(), url.string(), m_frame->loader()->outgoingReferrer())));
</del><ins>+ schedule(adoptPtr(new ScheduledRefresh(m_frame->document()->securityOrigin(), url, m_frame->loader()->outgoingReferrer())));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void NavigationScheduler::scheduleHistoryNavigation(int steps)
</span></span></pre></div>
<a id="branchessafari53777branchSourceWebCoreloaderNavigationSchedulerh"></a>
<div class="modfile"><h4>Modified: branches/safari-537.77-branch/Source/WebCore/loader/NavigationScheduler.h (169226 => 169227)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.77-branch/Source/WebCore/loader/NavigationScheduler.h        2014-05-22 23:34:16 UTC (rev 169226)
+++ branches/safari-537.77-branch/Source/WebCore/loader/NavigationScheduler.h        2014-05-22 23:43:01 UTC (rev 169227)
</span><span class="lines">@@ -33,10 +33,7 @@
</span><span class="cx">
</span><span class="cx"> #include "Timer.h"
</span><span class="cx"> #include <wtf/Forward.h>
</span><del>-#include <wtf/Noncopyable.h>
</del><span class="cx"> #include <wtf/OwnPtr.h>
</span><del>-#include <wtf/PassOwnPtr.h>
-#include <wtf/PassRefPtr.h>
</del><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -44,10 +41,9 @@
</span><span class="cx"> class Frame;
</span><span class="cx"> class ScheduledNavigation;
</span><span class="cx"> class SecurityOrigin;
</span><ins>+class KURL;
</ins><span class="cx">
</span><span class="cx"> class NavigationDisablerForBeforeUnload {
</span><del>- WTF_MAKE_NONCOPYABLE(NavigationDisablerForBeforeUnload);
-
</del><span class="cx"> public:
</span><span class="cx"> NavigationDisablerForBeforeUnload()
</span><span class="cx"> {
</span><span class="lines">@@ -65,8 +61,6 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> class NavigationScheduler {
</span><del>- WTF_MAKE_NONCOPYABLE(NavigationScheduler);
-
</del><span class="cx"> public:
</span><span class="cx"> explicit NavigationScheduler(Frame*);
</span><span class="cx"> ~NavigationScheduler();
</span><span class="lines">@@ -74,8 +68,8 @@
</span><span class="cx"> bool redirectScheduledDuringLoad();
</span><span class="cx"> bool locationChangePending();
</span><span class="cx">
</span><del>- void scheduleRedirect(double delay, const String& url);
- void scheduleLocationChange(SecurityOrigin*, const String& url, const String& referrer, bool lockHistory = true, bool lockBackForwardList = true);
</del><ins>+ void scheduleRedirect(double delay, const KURL& url);
+ void scheduleLocationChange(SecurityOrigin*, const KURL& url, const String& referrer, bool lockHistory = true, bool lockBackForwardList = true);
</ins><span class="cx"> void scheduleFormSubmission(PassRefPtr<FormSubmission>);
</span><span class="cx"> void scheduleRefresh();
</span><span class="cx"> void scheduleHistoryNavigation(int steps);
</span><span class="lines">@@ -87,7 +81,7 @@
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> bool shouldScheduleNavigation() const;
</span><del>- bool shouldScheduleNavigation(const String& url) const;
</del><ins>+ bool shouldScheduleNavigation(const KURL&) const;
</ins><span class="cx">
</span><span class="cx"> void timerFired(Timer<NavigationScheduler>*);
</span><span class="cx"> void schedule(PassOwnPtr<ScheduledNavigation>);
</span></span></pre></div>
<a id="branchessafari53777branchSourceWebCoreloaderSubframeLoadercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-537.77-branch/Source/WebCore/loader/SubframeLoader.cpp (169226 => 169227)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.77-branch/Source/WebCore/loader/SubframeLoader.cpp        2014-05-22 23:34:16 UTC (rev 169226)
+++ branches/safari-537.77-branch/Source/WebCore/loader/SubframeLoader.cpp        2014-05-22 23:43:01 UTC (rev 169227)
</span><span class="lines">@@ -337,7 +337,7 @@
</span><span class="cx"> {
</span><span class="cx"> Frame* frame = ownerElement->contentFrame();
</span><span class="cx"> if (frame)
</span><del>- frame->navigationScheduler()->scheduleLocationChange(m_frame->document()->securityOrigin(), url.string(), m_frame->loader()->outgoingReferrer(), lockHistory, lockBackForwardList);
</del><ins>+ frame->navigationScheduler()->scheduleLocationChange(m_frame->document()->securityOrigin(), url, m_frame->loader()->outgoingReferrer(), lockHistory, lockBackForwardList);
</ins><span class="cx"> else
</span><span class="cx"> frame = loadSubframe(ownerElement, url, frameName, m_frame->loader()->outgoingReferrer());
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari53777branchSourceWebCorepageDOMWindowcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-537.77-branch/Source/WebCore/page/DOMWindow.cpp (169226 => 169227)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.77-branch/Source/WebCore/page/DOMWindow.cpp        2014-05-22 23:34:16 UTC (rev 169226)
+++ branches/safari-537.77-branch/Source/WebCore/page/DOMWindow.cpp        2014-05-22 23:43:01 UTC (rev 169227)
</span><span class="lines">@@ -1934,7 +1934,7 @@
</span><span class="cx"> newFrame->loader()->changeLocation(activeWindow->document()->securityOrigin(), completedURL, referrer, false, false);
</span><span class="cx"> else if (!urlString.isEmpty()) {
</span><span class="cx"> bool lockHistory = !ScriptController::processingUserGesture();
</span><del>- newFrame->navigationScheduler()->scheduleLocationChange(activeWindow->document()->securityOrigin(), completedURL.string(), referrer, lockHistory, false);
</del><ins>+ newFrame->navigationScheduler()->scheduleLocationChange(activeWindow->document()->securityOrigin(), completedURL, referrer, lockHistory, false);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Navigating the new frame could result in it being detached from its page by a navigation policy delegate.
</span></span></pre></div>
<a id="branchessafari53777branchSourceWebCorepageSecurityOrigincpp"></a>
<div class="modfile"><h4>Modified: branches/safari-537.77-branch/Source/WebCore/page/SecurityOrigin.cpp (169226 => 169227)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.77-branch/Source/WebCore/page/SecurityOrigin.cpp        2014-05-22 23:34:16 UTC (rev 169226)
+++ branches/safari-537.77-branch/Source/WebCore/page/SecurityOrigin.cpp        2014-05-22 23:43:01 UTC (rev 169227)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> #include "SecurityPolicy.h"
</span><span class="cx"> #include "ThreadableBlobRegistry.h"
</span><span class="cx"> #include <wtf/MainThread.h>
</span><ins>+#include <wtf/NeverDestroyed.h>
</ins><span class="cx"> #include <wtf/StdLibExtras.h>
</span><span class="cx"> #include <wtf/text/StringBuilder.h>
</span><span class="cx">
</span><span class="lines">@@ -598,10 +599,10 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String SecurityOrigin::urlWithUniqueSecurityOrigin()
</del><ins>+KURL SecurityOrigin::urlWithUniqueSecurityOrigin()
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(isMainThread());
</span><del>- DEFINE_STATIC_LOCAL(const String, uniqueSecurityOriginURL, (ASCIILiteral("data:,")));
</del><ins>+ static NeverDestroyed<KURL> uniqueSecurityOriginURL(ParsedURLString, ASCIILiteral("data:,"));
</ins><span class="cx"> return uniqueSecurityOriginURL;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari53777branchSourceWebCorepageSecurityOriginh"></a>
<div class="modfile"><h4>Modified: branches/safari-537.77-branch/Source/WebCore/page/SecurityOrigin.h (169226 => 169227)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.77-branch/Source/WebCore/page/SecurityOrigin.h        2014-05-22 23:34:16 UTC (rev 169226)
+++ branches/safari-537.77-branch/Source/WebCore/page/SecurityOrigin.h        2014-05-22 23:43:01 UTC (rev 169227)
</span><span class="lines">@@ -205,7 +205,7 @@
</span><span class="cx"> // (and whether it was set) but considering the host. It is used for postMessage.
</span><span class="cx"> bool isSameSchemeHostPort(const SecurityOrigin*) const;
</span><span class="cx">
</span><del>- static String urlWithUniqueSecurityOrigin();
</del><ins>+ static KURL urlWithUniqueSecurityOrigin();
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> SecurityOrigin();
</span></span></pre>
</div>
</div>
</body>
</html>