Commit a17471b3 authored by ap@webkit.org's avatar ap@webkit.org

Suggested by Darin, rubber-stamped by Mark.

        http://bugs.webkit.org/show_bug.cgi?id=17569
        REGRESSION (r30571): Buzzword.com doesn't load

        Rolling out r30571, as determining what is wrong with it proved tricky.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::load):
        (WebCore::FrameLoader::tokenizerProcessedData):
        (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e8d1ec8d
2008-03-04 Alexey Proskuryakov <ap@webkit.org>
Suggested by Darin, rubber-stamped by Mark.
http://bugs.webkit.org/show_bug.cgi?id=17569
REGRESSION (r30571): Buzzword.com doesn't load
Rolling out r30571, as determining what is wrong with it proved tricky.
* fast/loader/meta-refresh-anchor-click-expected.txt: Removed.
* fast/loader/meta-refresh-anchor-click.html: Removed.
* fast/loader/resources/meta-refresh-subframe.html: Removed.
2008-03-03 Sam Weinig <sam@webkit.org>
Reviewed by Mark Rowe.
This tests whether clicking on a link to an anchor stops meta refresh reloads; it should not!
We'll let the subframe load 10 times, then click the link, then let it refresh 10 more.
Times subframe has loaded: 20.
Test passed.
<html>
<head>
<script>
var count = 0;
function init()
{
if (layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
}
function bumpCount()
{
++count;
document.getElementById("count").innerHTML = count;
if (count == 10) {
var subframeDocument = frames[0].document;
var event = subframeDocument.createEvent("MouseEvents");
event.initEvent("click", true, true);
subframeDocument.getElementById("link").dispatchEvent(event);
}
if (count == 20) {
var subframe = document.getElementById("subframe");
subframe.parentNode.removeChild(subframe);
document.getElementById("result").innerHTML = "Test passed.";
if (layoutTestController)
layoutTestController.notifyDone();
}
}
</script>
</head>
<body onload="init()">
<p>This tests whether clicking on a link to an anchor stops meta refresh reloads; it should not!</p>
<p>We'll let the subframe load 10 times, then click the link, then let it refresh 10 more.</p>
<p>Times subframe has loaded: <span id="count">0</span>.</p>
<p id="result">TEST DID NOT YET COMPLETE.</p>
<iframe id="subframe" src="resources/meta-refresh-subframe.html"></iframe>
</body>
</html>
<html>
<head>
<meta http-equiv="refresh" content="0">
</head>
<body onload="top.bumpCount()">
<p><a id="link" href="#anchor">Clicking on this link should not stop this frame from refreshing.</a><p>
<p><a name="anchor">This is the anchor that the link points to.</a></p>
</body>
</html>
2008-03-04 Alexey Proskuryakov <ap@webkit.org>
Suggested by Darin, rubber-stamped by Mark.
http://bugs.webkit.org/show_bug.cgi?id=17569
REGRESSION (r30571): Buzzword.com doesn't load
Rolling out r30571, as determining what is wrong with it proved tricky.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::tokenizerProcessedData):
(WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
2008-03-04 Sam Weinig <sam@webkit.org>
Build fix.
......@@ -2013,18 +2013,18 @@ void FrameLoader::load(const KURL& newURL, const String& referrer, FrameLoadType
// exactly the same so pages with '#' links and DHTML side effects
// work properly.
if (!isFormSubmission
&& newLoadType != FrameLoadTypeRedirectWithLockedHistory
&& newLoadType != FrameLoadTypeReload
&& newLoadType != FrameLoadTypeSame
&& !shouldReload(newURL, url())
&& !m_frame->isFrameSet()) {
&& newLoadType != FrameLoadTypeReload
&& newLoadType != FrameLoadTypeSame
&& !shouldReload(newURL, 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->isFrameSet()) {
// Just do anchor navigation within the existing content.
// We don't do this if we are submitting a form, explicitly reloading,
// currently displaying a frameset, or if the new URL does not have a fragment.
// These rules were originally based on what KHTML was doing in KHTMLPart::openURL.
// These rules are based on what KHTML was doing in KHTMLPart::openURL.
// FIXME: What about load types other than Standard and Reload?
......@@ -2033,19 +2033,18 @@ void FrameLoader::load(const KURL& newURL, const String& referrer, FrameLoadType
checkNavigationPolicy(request, oldDocumentLoader.get(), formState,
callContinueFragmentScrollAfterNavigationPolicy, this);
} else {
// must grab m_quickRedirectComing now, since this load may stop the previous load and clear this flag.
// must grab this now, since this load may stop the previous load and clear this flag
bool isRedirect = m_quickRedirectComing;
load(request, action, newLoadType, formState);
if (isRedirect) {
m_quickRedirectComing = false;
if (m_provisionalDocumentLoader)
m_provisionalDocumentLoader->setIsClientRedirect(true);
} else if (sameURL) {
} else if (sameURL)
// Example of this case are sites that reload the same URL with a different cookie
// driving the generated content, or a master frame with links that drive a target
// frame, where the user has clicked on the same link repeatedly.
m_loadType = FrameLoadTypeSame;
}
}
}
......@@ -3150,6 +3149,9 @@ String FrameLoader::userAgent(const KURL& url) const
void FrameLoader::tokenizerProcessedData()
{
// ASSERT(m_frame->page());
// ASSERT(m_frame->document());
checkCompleted();
}
......@@ -3394,8 +3396,9 @@ void FrameLoader::callContinueFragmentScrollAfterNavigationPolicy(void* argument
void FrameLoader::continueFragmentScrollAfterNavigationPolicy(const ResourceRequest& request, bool shouldContinue)
{
// FIXME: Some functions check m_quickRedirectComing, and others check for
// FrameLoadTypeRedirectWithLockedHistory; need to unify these.
// FIXME:
// some functions check m_quickRedirectComing, and others check for
// FrameLoadTypeRedirectWithLockedHistory.
bool isRedirect = m_quickRedirectComing || m_policyLoadType == FrameLoadTypeRedirectWithLockedHistory;
m_quickRedirectComing = false;
......@@ -3422,18 +3425,14 @@ void FrameLoader::continueFragmentScrollAfterNavigationPolicy(const ResourceRequ
scrollToAnchor(url);
if (!isRedirect) {
if (!isRedirect)
// This will clear previousItem from the rest of the frame tree that didn't
// doing any loading. We need to make a pass on this now, since for anchor nav
// we'll not go through a real load and reach Completed state.
checkLoadComplete();
}
m_client->dispatchDidChangeLocationWithinPage();
m_client->didFinishLoad();
if (m_scheduledRedirection && !m_redirectionTimer.isActive())
startRedirectionTimer();
}
void FrameLoader::opened()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment