Changeset 30571 in webkit
- Timestamp:
- Feb 25, 2008 9:33:47 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r30563 r30571 1 2008-02-25 Darin Adler <darin@apple.com> 2 3 Reviewed by Anders. 4 5 - test for http://bugs.webkit.org/show_bug.cgi?id=17186 6 Fragment navigation within a page permanently cancels meta refresh 7 8 * fast/loader/meta-refresh-anchor-click-expected.txt: Added. 9 * fast/loader/meta-refresh-anchor-click.html: Added. 10 * fast/loader/resources/meta-refresh-subframe.html: Added. 11 1 12 2008-02-25 Johnny Ding <johnnyding.webkit@gmail.com> 2 13 -
trunk/WebCore/ChangeLog
r30570 r30571 1 2008-02-25 Darin Adler <darin@apple.com> 2 3 Reviewed by Anders. 4 Based on a patch by Tim Steele <timsteele41@gmail.com>. 5 6 - fix http://bugs.webkit.org/show_bug.cgi?id=17186 7 Fragment navigation within a page permanently cancels meta refresh 8 9 Test: fast/loader/meta-refresh-anchor-click.html 10 11 * loader/FrameLoader.cpp: 12 (WebCore::FrameLoader::load): When load type is FrameLoadTypeRedirectWithLockedHistory, 13 always do a real load. This makes sure that meta refresh loads are treated as real loads 14 rather than anchor scrolls. Also tweaked formatting a bit. 15 (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy): This function is 16 an alternate way to complete a load, so it needs to start the redirection timer if 17 redirection has already been scheduled. 18 1 19 2008-02-25 Dan Bernstein <mitz@apple.com> 2 20 -
trunk/WebCore/loader/FrameLoader.cpp
r30549 r30571 2012 2012 // work properly. 2013 2013 if (!isFormSubmission 2014 && newLoadType != FrameLoadTypeReload 2015 && newLoadType != FrameLoadTypeSame 2016 && !shouldReload(newURL, url()) 2017 // We don't want to just scroll if a link from within a 2018 // frameset is trying to reload the frameset into _top. 2019 && !m_frame->isFrameSet()) { 2014 && newLoadType != FrameLoadTypeRedirectWithLockedHistory 2015 && newLoadType != FrameLoadTypeReload 2016 && newLoadType != FrameLoadTypeSame 2017 && !shouldReload(newURL, url()) 2018 && !m_frame->isFrameSet()) { 2020 2019 2021 2020 // Just do anchor navigation within the existing content. … … 2023 2022 // We don't do this if we are submitting a form, explicitly reloading, 2024 2023 // currently displaying a frameset, or if the new URL does not have a fragment. 2025 // These rules are based on what KHTML was doing in KHTMLPart::openURL. 2024 2025 // These rules were originally based on what KHTML was doing in KHTMLPart::openURL. 2026 2026 2027 2027 // FIXME: What about load types other than Standard and Reload? … … 2032 2032 callContinueFragmentScrollAfterNavigationPolicy, this); 2033 2033 } else { 2034 // must grab this now, since this load may stop the previous load and clear this flag2034 // must grab m_quickRedirectComing now, since this load may stop the previous load and clear this flag. 2035 2035 bool isRedirect = m_quickRedirectComing; 2036 2036 load(request, action, newLoadType, formState); … … 2039 2039 if (m_provisionalDocumentLoader) 2040 2040 m_provisionalDocumentLoader->setIsClientRedirect(true); 2041 } else if (sameURL) 2041 } else if (sameURL) { 2042 2042 // Example of this case are sites that reload the same URL with a different cookie 2043 2043 // driving the generated content, or a master frame with links that drive a target 2044 2044 // frame, where the user has clicked on the same link repeatedly. 2045 2045 m_loadType = FrameLoadTypeSame; 2046 } 2046 2047 } 2047 2048 } … … 3148 3149 void FrameLoader::tokenizerProcessedData() 3149 3150 { 3150 // ASSERT(m_frame->page());3151 // ASSERT(m_frame->document());3152 3153 3151 checkCompleted(); 3154 3152 } … … 3395 3393 void FrameLoader::continueFragmentScrollAfterNavigationPolicy(const ResourceRequest& request, bool shouldContinue) 3396 3394 { 3397 // FIXME: 3398 // some functions check m_quickRedirectComing, and others check for 3399 // FrameLoadTypeRedirectWithLockedHistory. 3395 // FIXME: Some functions check m_quickRedirectComing, and others check for 3396 // FrameLoadTypeRedirectWithLockedHistory; need to unify these. 3400 3397 bool isRedirect = m_quickRedirectComing || m_policyLoadType == FrameLoadTypeRedirectWithLockedHistory; 3401 3398 m_quickRedirectComing = false; … … 3424 3421 scrollToAnchor(url); 3425 3422 3426 if (!isRedirect) 3423 if (!isRedirect) { 3427 3424 // This will clear previousItem from the rest of the frame tree that didn't 3428 3425 // doing any loading. We need to make a pass on this now, since for anchor nav 3429 3426 // we'll not go through a real load and reach Completed state. 3430 3427 checkLoadComplete(); 3428 } 3431 3429 3432 3430 m_client->dispatchDidChangeLocationWithinPage(); 3433 3431 m_client->didFinishLoad(); 3432 3433 if (m_scheduledRedirection && !m_redirectionTimer.isActive()) 3434 startRedirectionTimer(); 3434 3435 } 3435 3436
Note: See TracChangeset
for help on using the changeset viewer.