[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
japhet at chromium.org
japhet at chromium.org
Wed Dec 22 12:56:55 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 7426155686189a16fe193a490dd2dc60e0809467
Author: japhet at chromium.org <japhet at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Sep 2 18:55:02 2010 +0000
2010-09-02 Sheriff Bot <webkit.review.bot at gmail.com>
Unreviewed, rolling out r66671.
http://trac.webkit.org/changeset/66671
https://bugs.webkit.org/show_bug.cgi?id=45115
http/tests/misc/redirect-to-about-blank.html is failing on
several platforms (Requested by japhet on #webkit).
* WebCore.exp.in:
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::updateURLForPushOrReplaceState):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::begin):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::iconURL):
(WebCore::FrameLoader::didOpenURL):
(WebCore::FrameLoader::didExplicitOpen):
(WebCore::FrameLoader::receivedFirstData):
(WebCore::FrameLoader::setURL):
(WebCore::FrameLoader::startIconLoader):
(WebCore::FrameLoader::commitIconURLToIconDatabase):
(WebCore::FrameLoader::finishedParsing):
(WebCore::FrameLoader::checkIfDisplayInsecureContent):
(WebCore::FrameLoader::checkIfRunInsecureContent):
(WebCore::FrameLoader::updateFirstPartyForCookies):
(WebCore::FrameLoader::loadInSameDocument):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::open):
(WebCore::FrameLoader::shouldScrollToAnchor):
* loader/FrameLoader.h:
(WebCore::FrameLoader::url):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index cab15c3..df04569 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-09-02 Sheriff Bot <webkit.review.bot at gmail.com>
+
+ Unreviewed, rolling out r66671.
+ http://trac.webkit.org/changeset/66671
+ https://bugs.webkit.org/show_bug.cgi?id=45115
+
+ http/tests/misc/redirect-to-about-blank.html is failing on
+ several platforms (Requested by japhet on #webkit).
+
+ * fast/dom/resources/a.html:
+
2010-09-02 Andrey Kosyakov <caseq at chromium.org>
Unreviewed test fix.
diff --git a/LayoutTests/fast/dom/resources/a.html b/LayoutTests/fast/dom/resources/a.html
index 0bd2ad7..dfe4032 100644
--- a/LayoutTests/fast/dom/resources/a.html
+++ b/LayoutTests/fast/dom/resources/a.html
@@ -1,12 +1,9 @@
<HTML>
<HEAD>
<SCRIPT>
-function checkURL()
+function writeDot()
{
- if (!parent.frames[1].document.URL)
- setTimeout(checkURL, 0);
- else if (window.layoutTestController)
- layoutTestController.notifyDone();
+ while(!parent.frames[1].document.URL) { }
}
</SCRIPT>
</HEAD>
@@ -15,7 +12,9 @@ This test checks whether document.URL is initially set to an empty
value or "about:blank" for frames. The right answer is
"about:blank". If it is empty, then this test will hang.
<script>
- checkURL();
+writeDot();
+if (window.layoutTestController)
+ layoutTestController.notifyDone();
</script>
</BODY>
</HTML>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 249666c..560feff 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,37 @@
+2010-09-02 Sheriff Bot <webkit.review.bot at gmail.com>
+
+ Unreviewed, rolling out r66671.
+ http://trac.webkit.org/changeset/66671
+ https://bugs.webkit.org/show_bug.cgi?id=45115
+
+ http/tests/misc/redirect-to-about-blank.html is failing on
+ several platforms (Requested by japhet on #webkit).
+
+ * WebCore.exp.in:
+ * dom/Document.cpp:
+ (WebCore::Document::Document):
+ (WebCore::Document::updateURLForPushOrReplaceState):
+ * loader/DocumentWriter.cpp:
+ (WebCore::DocumentWriter::begin):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::iconURL):
+ (WebCore::FrameLoader::didOpenURL):
+ (WebCore::FrameLoader::didExplicitOpen):
+ (WebCore::FrameLoader::receivedFirstData):
+ (WebCore::FrameLoader::setURL):
+ (WebCore::FrameLoader::startIconLoader):
+ (WebCore::FrameLoader::commitIconURLToIconDatabase):
+ (WebCore::FrameLoader::finishedParsing):
+ (WebCore::FrameLoader::checkIfDisplayInsecureContent):
+ (WebCore::FrameLoader::checkIfRunInsecureContent):
+ (WebCore::FrameLoader::updateFirstPartyForCookies):
+ (WebCore::FrameLoader::loadInSameDocument):
+ (WebCore::FrameLoader::commitProvisionalLoad):
+ (WebCore::FrameLoader::open):
+ (WebCore::FrameLoader::shouldScrollToAnchor):
+ * loader/FrameLoader.h:
+ (WebCore::FrameLoader::url):
+
2010-09-01 Zhenyao Mo <zmo at google.com>
Reviewed by Kenneth Russell.
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index 9509103..e8b4fe7 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -860,7 +860,6 @@ __ZNK7WebCore11FrameLoader14frameHasLoadedEv
__ZNK7WebCore11FrameLoader16outgoingReferrerEv
__ZNK7WebCore11FrameLoader20activeDocumentLoaderEv
__ZNK7WebCore11FrameLoader27numPendingOrLoadingRequestsEb
-__ZNK7WebCore11FrameLoader3urlEv
__ZNK7WebCore11FrameLoader8loadTypeEv
__ZNK7WebCore11HistoryItem10visitCountEv
__ZNK7WebCore11HistoryItem11hasChildrenEv
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index b95ecbb..dbf447d 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -417,7 +417,7 @@ Document::Document(Frame* frame, const KURL& url, bool isXHTML, bool isHTML)
m_frame = frame;
- if (!url.isEmpty() || (frame && !frame->loader()->stateMachine()->creatingInitialEmptyDocument()))
+ if (frame || !url.isEmpty())
setURL(url);
m_axObjectCache = 0;
@@ -4424,8 +4424,9 @@ void Document::updateURLForPushOrReplaceState(const KURL& url)
if (!f)
return;
+ // FIXME: Eliminate this redundancy.
setURL(url);
- f->loader()->setOutgoingReferrer(url);
+ f->loader()->setURL(url);
f->loader()->documentLoader()->replaceRequestURLForSameDocumentNavigation(url);
}
diff --git a/WebCore/loader/DocumentWriter.cpp b/WebCore/loader/DocumentWriter.cpp
index a400c68..cd82d6e 100644
--- a/WebCore/loader/DocumentWriter.cpp
+++ b/WebCore/loader/DocumentWriter.cpp
@@ -126,7 +126,7 @@ void DocumentWriter::begin(const KURL& url, bool dispatch, SecurityOrigin* origi
if (resetScripting)
m_frame->script()->updatePlatformScriptObjects();
- m_frame->loader()->setOutgoingReferrer(url);
+ m_frame->loader()->setURL(url);
m_frame->setDocument(document);
if (m_decoder)
diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp
index cbabe99..ccbccc9 100644
--- a/WebCore/loader/FrameLoader.cpp
+++ b/WebCore/loader/FrameLoader.cpp
@@ -471,16 +471,15 @@ KURL FrameLoader::iconURL()
return KURL(ParsedURLString, m_frame->document()->iconURL());
// Don't return a favicon iconURL unless we're http or https
- KURL documentURL = m_frame->document()->url();
- if (!documentURL.protocolInHTTPFamily())
+ if (!m_URL.protocolInHTTPFamily())
return KURL();
KURL url;
- bool couldSetProtocol = url.setProtocol(documentURL.protocol());
+ bool couldSetProtocol = url.setProtocol(m_URL.protocol());
ASSERT_UNUSED(couldSetProtocol, couldSetProtocol);
- url.setHost(documentURL.host());
- if (documentURL.hasPort())
- url.setPort(documentURL.port());
+ url.setHost(m_URL.host());
+ if (m_URL.hasPort())
+ url.setPort(m_URL.port());
url.setPath("/favicon.ico");
return url;
}
@@ -509,7 +508,10 @@ bool FrameLoader::didOpenURL(const KURL& url)
window->setDefaultStatus(String());
}
}
- m_workingURL = url;
+ m_URL = url;
+ if (m_URL.protocolInHTTPFamily() && !m_URL.host().isEmpty() && m_URL.path().isEmpty())
+ m_URL.setPath("/");
+ m_workingURL = m_URL;
started();
@@ -529,7 +531,9 @@ void FrameLoader::didExplicitOpen()
// from a subsequent window.document.open / window.document.write call.
// Canceling redirection here works for all cases because document.open
// implicitly precedes document.write.
- m_frame->redirectScheduler()->cancel();
+ m_frame->redirectScheduler()->cancel();
+ if (m_frame->document()->url() != blankURL())
+ m_URL = m_frame->document()->url();
}
@@ -620,26 +624,21 @@ void FrameLoader::receivedFirstData()
return;
if (url.isEmpty())
- url = m_frame->document()->url().string();
+ url = m_URL.string();
else
url = m_frame->document()->completeURL(url).string();
m_frame->redirectScheduler()->scheduleRedirect(delay, url);
}
-const KURL& FrameLoader::url() const
-{
- ASSERT(m_frame->document());
- return m_frame->document()->url();
-}
-
-void FrameLoader::setOutgoingReferrer(const KURL& url)
+void FrameLoader::setURL(const KURL& url)
{
KURL ref(url);
ref.setUser(String());
ref.setPass(String());
ref.removeFragmentIdentifier();
m_outgoingReferrer = ref.string();
+ m_URL = url;
}
void FrameLoader::didBeginDocument(bool dispatch)
@@ -714,7 +713,7 @@ void FrameLoader::startIconLoader()
if (!iconDatabase()->iconDataKnownForIconURL(urlString)) {
LOG(IconDatabase, "Told not to load icon %s but icon data is not yet available - registering for notification and requesting load from disk", urlString.ascii().data());
m_client->registerForIconNotification();
- iconDatabase()->iconForPageURL(m_frame->document()->url().string(), IntSize(0, 0));
+ iconDatabase()->iconForPageURL(m_URL.string(), IntSize(0, 0));
iconDatabase()->iconForPageURL(originalRequestURL().string(), IntSize(0, 0));
} else
m_client->dispatchDidReceiveIcon();
@@ -751,8 +750,8 @@ void FrameLoader::startIconLoader()
void FrameLoader::commitIconURLToIconDatabase(const KURL& icon)
{
ASSERT(iconDatabase());
- LOG(IconDatabase, "Committing iconURL %s to database for pageURLs %s and %s", icon.string().ascii().data(), m_frame->document()->url().string().ascii().data(), originalRequestURL().string().ascii().data());
- iconDatabase()->setIconURLForPageURL(icon.string(), m_frame->document()->url().string());
+ LOG(IconDatabase, "Committing iconURL %s to database for pageURLs %s and %s", icon.string().ascii().data(), m_URL.string().ascii().data(), originalRequestURL().string().ascii().data());
+ iconDatabase()->setIconURLForPageURL(icon.string(), m_URL.string());
iconDatabase()->setIconURLForPageURL(icon.string(), originalRequestURL().string());
}
@@ -778,7 +777,7 @@ void FrameLoader::finishedParsing()
// Check if the scrollbars are really needed for the content.
// If not, remove them, relayout, and repaint.
m_frame->view()->restoreScrollbar();
- m_frame->view()->scrollToFragment(m_frame->document()->url());
+ m_frame->view()->scrollToFragment(m_URL);
}
void FrameLoader::loadDone()
@@ -1006,7 +1005,7 @@ void FrameLoader::checkIfDisplayInsecureContent(SecurityOrigin* context, const K
return;
String message = String::format("The page at %s displayed insecure content from %s.\n",
- m_frame->document()->url().string().utf8().data(), url.string().utf8().data());
+ m_URL.string().utf8().data(), url.string().utf8().data());
m_frame->domWindow()->console()->addMessage(HTMLMessageSource, LogMessageType, WarningMessageLevel, message, 1, String());
m_client->didDisplayInsecureContent();
@@ -1018,7 +1017,7 @@ void FrameLoader::checkIfRunInsecureContent(SecurityOrigin* context, const KURL&
return;
String message = String::format("The page at %s ran insecure content from %s.\n",
- m_frame->document()->url().string().utf8().data(), url.string().utf8().data());
+ m_URL.string().utf8().data(), url.string().utf8().data());
m_frame->domWindow()->console()->addMessage(HTMLMessageSource, LogMessageType, WarningMessageLevel, message, 1, String());
m_client->didRunInsecureContent(context);
@@ -1102,7 +1101,7 @@ void FrameLoader::updateFirstPartyForCookies()
if (m_frame->tree()->parent())
setFirstPartyForCookies(m_frame->tree()->parent()->document()->firstPartyForCookies());
else
- setFirstPartyForCookies(m_frame->document()->url());
+ setFirstPartyForCookies(m_URL);
}
void FrameLoader::setFirstPartyForCookies(const KURL& url)
@@ -1120,7 +1119,6 @@ void FrameLoader::loadInSameDocument(const KURL& url, SerializedScriptValue* sta
ASSERT(!stateObject || (stateObject && !isNewNavigation));
// Update the data source's request with the new URL to fake the URL change
- KURL oldURL = m_frame->document()->url();
m_frame->document()->setURL(url);
documentLoader()->replaceRequestURLForSameDocumentNavigation(url);
if (isNewNavigation && !shouldTreatURLAsSameAsCurrent(url) && !stateObject) {
@@ -1138,8 +1136,11 @@ void FrameLoader::loadInSameDocument(const KURL& url, SerializedScriptValue* sta
history()->updateBackForwardListForFragmentScroll();
}
- bool hashChange = equalIgnoringFragmentIdentifier(url, oldURL) && url.fragmentIdentifier() != oldURL.fragmentIdentifier();
+ String oldURL;
+ bool hashChange = equalIgnoringFragmentIdentifier(url, m_URL) && url.fragmentIdentifier() != m_URL.fragmentIdentifier();
+ oldURL = m_URL;
+ m_URL = url;
history()->updateForSameDocumentNavigation();
// If we were in the autoscroll/panScroll mode we want to stop it before following the link to the anchor
@@ -1153,7 +1154,7 @@ void FrameLoader::loadInSameDocument(const KURL& url, SerializedScriptValue* sta
// We need to scroll to the fragment whether or not a hash change occurred, since
// the user might have scrolled since the previous navigation.
if (FrameView* view = m_frame->view())
- view->scrollToFragment(url);
+ view->scrollToFragment(m_URL);
m_isComplete = false;
checkCompleted();
@@ -1820,8 +1821,7 @@ void FrameLoader::commitProvisionalLoad()
RefPtr<CachedPage> cachedPage = m_loadingFromCachedPage ? pageCache()->get(history()->provisionalItem()) : 0;
RefPtr<DocumentLoader> pdl = m_provisionalDocumentLoader;
- LOG(PageCache, "WebCoreLoading %s: About to commit provisional load from previous URL '%s' to new URL '%s'", m_frame->tree()->name().string().utf8().data(),
- m_frame->document() ? m_frame->document()->url().string().utf8().data() : "",
+ LOG(PageCache, "WebCoreLoading %s: About to commit provisional load from previous URL '%s' to new URL '%s'", m_frame->tree()->name().string().utf8().data(), m_URL.string().utf8().data(),
pdl ? pdl->url().string().utf8().data() : "<no provisional DocumentLoader>");
// Check to see if we need to cache the page we are navigating away from into the back/forward cache.
@@ -1861,8 +1861,7 @@ void FrameLoader::commitProvisionalLoad()
didOpenURL(url);
}
- LOG(Loading, "WebCoreLoading %s: Finished committing provisional load to URL %s", m_frame->tree()->name().string().utf8().data(),
- m_frame->document() ? m_frame->document()->url().string().utf8().data() : "");
+ LOG(Loading, "WebCoreLoading %s: Finished committing provisional load to URL %s", m_frame->tree()->name().string().utf8().data(), m_URL.string().utf8().data());
if (m_loadType == FrameLoadTypeStandard && m_documentLoader->isClientRedirect())
history()->updateForClientRedirect();
@@ -2106,6 +2105,7 @@ void FrameLoader::open(CachedFrameBase& cachedFrame)
if (url.protocolInHTTPFamily() && !url.host().isEmpty() && url.path().isEmpty())
url.setPath("/");
+ m_URL = url;
m_workingURL = url;
started();
@@ -2857,7 +2857,7 @@ bool FrameLoader::shouldScrollToAnchor(bool isFormSubmission, FrameLoadType load
&& loadType != FrameLoadTypeReload
&& loadType != FrameLoadTypeReloadFromOrigin
&& loadType != FrameLoadTypeSame
- && !shouldReload(m_frame->document()->url(), url)
+ && !shouldReload(this->url(), url)
// We don't want to just scroll if a link from within a
// frameset is trying to reload the frameset into _top.
&& !m_frame->document()->isFrameSet();
diff --git a/WebCore/loader/FrameLoader.h b/WebCore/loader/FrameLoader.h
index 33ad438..5adcf41 100644
--- a/WebCore/loader/FrameLoader.h
+++ b/WebCore/loader/FrameLoader.h
@@ -266,8 +266,10 @@ public:
void frameDetached();
- const KURL& url() const;
- void setOutgoingReferrer(const KURL&);
+ const KURL& url() const { return m_URL; }
+
+ // setURL is a low-level setter and does not trigger loading.
+ void setURL(const KURL&);
void loadDone();
void finishedParsing();
@@ -468,6 +470,7 @@ private:
RefPtr<SerializedScriptValue> m_pendingStateObject;
+ KURL m_URL;
KURL m_workingURL;
OwnPtr<IconLoader> m_iconLoader;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list