Changeset 90346 in webkit
- Timestamp:
- Jul 3, 2011 1:34:14 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r90345 r90346 1 2011-07-03 Robert Hogan <robert@webkit.org> 2 3 Restore scroll position on page reloads scheduled by <meta http-equiv="refresh" content="XX"/> 4 https://bugs.webkit.org/show_bug.cgi?id=62482 5 6 If a <meta http-equiv="refresh"> directive schedules a page reload rather than 7 a redirect restore the scroll position after the reload. Do the same on location.reload(). 8 9 Reviewed by Adam Barth. 10 11 * http/tests/navigation/scrollstate-after-http-equiv-refresh-expected.txt: Added. 12 * http/tests/navigation/scrollstate-after-http-equiv-refresh-fragment-identifier-2-expected.txt: Added. 13 * http/tests/navigation/scrollstate-after-http-equiv-refresh-fragment-identifier-2.html: Added. 14 * http/tests/navigation/scrollstate-after-http-equiv-refresh-fragment-identifier-expected.txt: Added. 15 * http/tests/navigation/scrollstate-after-http-equiv-refresh-fragment-identifier.html: Added. 16 * http/tests/navigation/scrollstate-after-http-equiv-refresh.html: Added. 17 * http/tests/navigation/scrollstate-after-location-reload-expected.txt: Added. 18 * http/tests/navigation/scrollstate-after-location-reload.html: Added. 19 1 20 2011-07-03 Dirk Schulze <krit@webkit.org> 2 21 -
trunk/Source/WebCore/ChangeLog
r90345 r90346 1 2011-07-03 Robert Hogan <robert@webkit.org> 2 3 Restore scroll position on page reloads scheduled by <meta http-equiv="refresh" content="XX"/> 4 https://bugs.webkit.org/show_bug.cgi?id=62482 5 6 If a <meta http-equiv="refresh"> directive schedules a page reload rather than 7 a redirect restore the scroll position after the reload. Do the same on location.reload(). 8 9 Reviewed by Adam Barth. 10 11 Tests: http/tests/navigation/scrollstate-after-http-equiv-refresh-fragment-identifier-2.html 12 http/tests/navigation/scrollstate-after-http-equiv-refresh-fragment-identifier.html 13 http/tests/navigation/scrollstate-after-http-equiv-refresh.html 14 http/tests/navigation/scrollstate-after-location-reload.html 15 16 * loader/FrameLoader.cpp: 17 (WebCore::FrameLoader::loadURL): 18 Only make the load FrameLoadTypeSame if it has not already been set as FrameLoadTypeReload*. 19 FrameLoadTypeReload* loads are set through http-equiv refreshes, manual reloads, or location.reload() 20 and honour the user's scroll position in the frame. A FrameLoadTypeSame is for when the frame is loading 21 the same page again, e.g. by clicking a link. 22 23 * loader/NavigationScheduler.cpp: 24 (WebCore::ScheduledRedirect::fire): Tell FrameLoader::changeLocation() if this is a reload. 25 1 26 2011-07-03 Dirk Schulze <krit@webkit.org> 2 27 -
trunk/Source/WebCore/loader/FrameLoader.cpp
r90344 r90346 1218 1218 if (m_provisionalDocumentLoader) 1219 1219 m_provisionalDocumentLoader->setIsClientRedirect(true); 1220 } else if (sameURL )1220 } else if (sameURL && newLoadType != FrameLoadTypeReload && newLoadType != FrameLoadTypeReloadFromOrigin) 1221 1221 // Example of this case are sites that reload the same URL with a different cookie 1222 1222 // driving the generated content, or a master frame with links that drive a target -
trunk/Source/WebCore/loader/NavigationScheduler.cpp
r90344 r90346 154 154 155 155 virtual bool shouldStartTimer(Frame* frame) { return frame->loader()->allAncestorsAreComplete(); } 156 157 virtual void fire(Frame* frame) 158 { 159 UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture); 160 bool refresh = equalIgnoringFragmentIdentifier(frame->document()->url(), KURL(ParsedURLString, url())); 161 frame->loader()->changeLocation(securityOrigin(), KURL(ParsedURLString, url()), referrer(), lockHistory(), lockBackForwardList(), refresh); 162 } 156 163 }; 157 164
Note: See TracChangeset
for help on using the changeset viewer.