Changeset 44468 in webkit
- Timestamp:
- Jun 5, 2009 7:00:20 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r44452 r44468 1 2009-06-01 Ben Murdoch <benm@google.com> 2 3 <https://bugs.webkit.org/show_bug.cgi?id=25710> HTML5 Database stops executing transactions if the URL hash changes while a transaction is open and an XHR is in progress. 4 5 Reviewed by Alexey Proskuryakov. 6 7 Fix a bug that causes database transactions to fail if a history 8 navigation to a hash fragment of the same document is made while 9 resources (e.g. an XHR) are loading. 10 11 https://bugs.webkit.org/show_bug.cgi?id=25710 12 13 * storage/hash-change-with-xhr-expected.txt: Added. 14 * storage/hash-change-with-xhr.html: Added. 15 1 16 2009-06-03 Antti Koivisto <antti@apple.com> 2 17 -
trunk/WebCore/ChangeLog
r44467 r44468 1 2009-06-03 Ben Murdoch <benm@google.com> 2 3 <https://bugs.webkit.org/show_bug.cgi?id=25710> HTML5 Database stops executing transactions if the URL hash changes while a transaction is open and an XHR is in progress. 4 5 Reviewed by Alexey Proskuryakov. 6 7 Fix a bug that causes database transactions to fail if a history navigation to a hash fragment of the same document is made while resources (e.g. an XHR) are loading 8 9 Test: storage/hash-change-with-xhr.html 10 11 * loader/DocumentLoader.cpp: 12 (WebCore::DocumentLoader::stopLoading): 13 * loader/DocumentLoader.h: 14 * loader/FrameLoader.cpp: 15 (WebCore::FrameLoader::stopLoading): 16 (WebCore::FrameLoader::stopAllLoaders): 17 * loader/FrameLoader.h: 18 * loader/FrameLoaderTypes.h: 19 (WebCore::): 20 * page/Page.cpp: 21 (WebCore::Page::goToItem): 22 * WebCore.base.exp: 23 1 24 2009-06-03 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> 2 25 -
trunk/WebCore/WebCore.base.exp
r44452 r44468 156 156 __ZN7WebCore11FrameLoader11loadArchiveEN3WTF10PassRefPtrINS_7ArchiveEEE 157 157 __ZN7WebCore11FrameLoader11setEncodingERKNS_6StringEb 158 __ZN7WebCore11FrameLoader11stopLoadingEb 158 __ZN7WebCore11FrameLoader11stopLoadingEbNS_14DatabasePolicyE 159 159 __ZN7WebCore11FrameLoader12shouldReloadERKNS_4KURLES3_ 160 160 __ZN7WebCore11FrameLoader13executeScriptERKNS_6StringEb 161 161 __ZN7WebCore11FrameLoader14detachChildrenEv 162 162 __ZN7WebCore11FrameLoader14scrollToAnchorERKNS_4KURLE 163 __ZN7WebCore11FrameLoader14stopAllLoadersE v163 __ZN7WebCore11FrameLoader14stopAllLoadersENS_14DatabasePolicyE 164 164 __ZN7WebCore11FrameLoader16detachFromParentEv 165 165 __ZN7WebCore11FrameLoader16loadFrameRequestERKNS_16FrameLoadRequestEbbN3WTF10PassRefPtrINS_5EventEEENS5_INS_9FormStateEEE -
trunk/WebCore/loader/DocumentLoader.cpp
r44352 r44468 280 280 // stopLoading will stop all loads initiated by the data source, 281 281 // but not loads initiated by child frames' data sources -- that's the WebFrame's job. 282 void DocumentLoader::stopLoading( )282 void DocumentLoader::stopLoading(DatabasePolicy databasePolicy) 283 283 { 284 284 // In some rare cases, calling FrameLoader::stopLoading could set m_loading to false. … … 293 293 294 294 if (loading || doc->parsing()) 295 m_frame->loader()->stopLoading(false );295 m_frame->loader()->stopLoading(false, databasePolicy); 296 296 } 297 297 -
trunk/WebCore/loader/DocumentLoader.h
r44352 r44468 94 94 void replaceRequestURLForAnchorScroll(const KURL&); 95 95 bool isStopping() const { return m_isStopping; } 96 void stopLoading( );96 void stopLoading(DatabasePolicy = DatabasePolicyStop); 97 97 void setCommitted(bool committed) { m_committed = committed; } 98 98 bool isCommitted() const { return m_committed; } -
trunk/WebCore/loader/FrameLoader.cpp
r44352 r44468 604 604 } 605 605 606 void FrameLoader::stopLoading(bool sendUnload )606 void FrameLoader::stopLoading(bool sendUnload, DatabasePolicy databasePolicy) 607 607 { 608 608 if (m_frame->document() && m_frame->document()->tokenizer()) … … 646 646 647 647 #if ENABLE(DATABASE) 648 doc->stopDatabases(); 648 if (databasePolicy == DatabasePolicyStop) 649 doc->stopDatabases(); 649 650 #endif 650 651 } … … 2658 2659 } 2659 2660 2660 void FrameLoader::stopAllLoaders( )2661 void FrameLoader::stopAllLoaders(DatabasePolicy databasePolicy) 2661 2662 { 2662 2663 if (m_unloadEventBeingDispatched) … … 2673 2674 stopLoadingSubframes(); 2674 2675 if (m_provisionalDocumentLoader) 2675 m_provisionalDocumentLoader->stopLoading( );2676 m_provisionalDocumentLoader->stopLoading(databasePolicy); 2676 2677 if (m_documentLoader) 2677 m_documentLoader->stopLoading( );2678 m_documentLoader->stopLoading(databasePolicy); 2678 2679 2679 2680 setProvisionalDocumentLoader(0); -
trunk/WebCore/loader/FrameLoader.h
r44352 r44468 156 156 157 157 // Also not cool. 158 void stopAllLoaders( );158 void stopAllLoaders(DatabasePolicy = DatabasePolicyStop); 159 159 void stopForUserCancel(bool deferCheckLoadComplete = false); 160 160 … … 265 265 266 266 void stop(); 267 void stopLoading(bool sendUnload );267 void stopLoading(bool sendUnload, DatabasePolicy = DatabasePolicyStop); 268 268 bool closeURL(); 269 269 -
trunk/WebCore/loader/FrameLoaderTypes.h
r44352 r44468 67 67 }; 68 68 69 enum DatabasePolicy { 70 DatabasePolicyStop, // The database thread should be stopped and database connections closed. 71 DatabasePolicyContinue 72 }; 73 69 74 enum ObjectContentType { 70 75 ObjectContentNone, -
trunk/WebCore/page/Page.cpp
r44352 r44468 202 202 { 203 203 // Abort any current load if we're going to a history item 204 m_mainFrame->loader()->stopAllLoaders(); 204 205 // Define what to do with any open database connections. By default we stop them and terminate the database thread. 206 DatabasePolicy databasePolicy = DatabasePolicyStop; 207 208 #if ENABLE(DATABASE) 209 // If we're navigating the history via a fragment on the same document, then we do not want to stop databases. 210 const KURL& currentURL = m_mainFrame->loader()->url(); 211 const KURL& newURL = item->url(); 212 213 if (newURL.hasRef() && equalIgnoringRef(currentURL, newURL)) 214 databasePolicy = DatabasePolicyContinue; 215 #endif 216 m_mainFrame->loader()->stopAllLoaders(databasePolicy); 205 217 m_mainFrame->loader()->goToItem(item, type); 206 218 }
Note: See TracChangeset
for help on using the changeset viewer.