Changeset 20878 in webkit
- Timestamp:
- Apr 13, 2007 1:28:27 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r20876 r20878 1 2007-04-12 Brady Eidson <beidson@apple.com> 2 3 Reviewed by Geoose 4 5 <rdar://problem/4664154> and http://bugs.webkit.org/show_bug.cgi?id=3546 6 7 Layout test that covers opening an empty new window, then starting to navigate around in it 8 9 * history/new-window-redirect-history-expected.txt: Added. 10 * history/new-window-redirect-history.html: Added. 11 * history/resources/redirect-1.html: Added. 12 * history/resources/redirect-2.html: Added. 13 1 14 2007-04-13 Anders Carlsson <andersca@apple.com> 2 15 -
trunk/WebCore/ChangeLog
r20868 r20878 1 2007-04-12 Brady Eidson <beidson@apple.com> 2 3 Reviewed by Black Sheep 4 5 <rdar://problem/4664154> and http://bugs.webkit.org/show_bug.cgi?id=3546 6 7 When you click on a link that opens in a new window from within gmail, they first create a new window 8 with an empty URL, then immediately document.write() into the window to schedule a redirect. 9 10 Since the initial page doesn't have a URL associated with it, a history item never gets created. The 11 reasonable solution? To actually create the history item after the redirect (in updateHistoryForInternalLoad) 12 13 * loader/FrameLoader.cpp: 14 (WebCore::FrameLoader::addHistoryForCurrentLocation): Updates global and B/F history with a new history item 15 (WebCore::FrameLoader::updateHistoryForStandardLoad): Call addHistoryForCurrentLocation 16 (WebCore::FrameLoader::updateHistoryForInternalLoad): Call addHistoryForCurrentLocation if there is not already 17 a current history item 18 * loader/FrameLoader.h: 19 1 20 2007-04-12 Oliver Hunt <oliver@apple.com> 2 21 -
trunk/WebCore/loader/FrameLoader.cpp
r20856 r20878 3955 3955 } 3956 3956 3957 void FrameLoader::addHistoryForCurrentLocation() 3958 { 3959 if (!privateBrowsingEnabled()) { 3960 // FIXME: <rdar://problem/4880065> - This will be a hook into the WebCore global history, and this loader/client call will be removed 3961 updateGlobalHistoryForStandardLoad(documentLoader()->urlForHistory()); 3962 } 3963 addBackForwardItemClippedAtTarget(true); 3964 } 3965 3957 3966 void FrameLoader::updateHistoryForStandardLoad() 3958 3967 { … … 3960 3969 3961 3970 if (!documentLoader()->isClientRedirect()) { 3962 KURL url = documentLoader()->urlForHistory(); 3963 if (!url.isEmpty()) { 3964 if (!privateBrowsingEnabled()) { 3965 // FIXME: <rdar://problem/4880065> - This will be a hook into the WebCore global history, and this loader/client call will be removed 3966 updateGlobalHistoryForStandardLoad(url); 3967 } 3968 addBackForwardItemClippedAtTarget(true); 3969 } 3971 if (!documentLoader()->urlForHistory().isEmpty()) 3972 addHistoryForCurrentLocation(); 3970 3973 } else if (documentLoader()->unreachableURL().isEmpty() && m_currentHistoryItem) { 3971 3974 m_currentHistoryItem->setURL(documentLoader()->URL()); … … 4031 4034 4032 4035 if (documentLoader()->isClientRedirect()) { 4033 if (m_currentHistoryItem) { 4034 m_currentHistoryItem->setURL(documentLoader()->URL()); 4035 m_currentHistoryItem->setFormInfoFromRequest(documentLoader()->request()); 4036 } 4036 if (!m_currentHistoryItem) 4037 addHistoryForCurrentLocation(); 4038 4039 m_currentHistoryItem->setURL(documentLoader()->URL()); 4040 m_currentHistoryItem->setFormInfoFromRequest(documentLoader()->request()); 4037 4041 } else { 4038 4042 // Add an item to the item tree for this frame -
trunk/WebCore/loader/FrameLoader.h
r20837 r20878 430 430 bool childFramesMatchItem(HistoryItem*) const; 431 431 432 void addHistoryForCurrentLocation(); 432 433 void updateHistoryForBackForwardNavigation(); 433 434 void updateHistoryForReload();
Note: See TracChangeset
for help on using the changeset viewer.