- fixed <rdar://problem/
5644300> Back/Forward Cache should not include pages with databases
Track whether a document has ever opened a database; if so, exclude it from b/f caching (for now)
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
(WebCore::Document::setHasOpenDatabases):
(WebCore::Document::hasOpenDatabases):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::canCachePage):
* storage/Database.cpp:
(WebCore::Database::openDatabase):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29291
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2008-01-07 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Brady.
+
+ - fixed <rdar://problem/5644300> Back/Forward Cache should not include pages with databases
+
+ Track whether a document has ever opened a database; if so, exclude it from b/f caching (for now)
+
+ * dom/Document.cpp:
+ (WebCore::Document::Document):
+ * dom/Document.h:
+ (WebCore::Document::setHasOpenDatabases):
+ (WebCore::Document::hasOpenDatabases):
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::canCachePage):
+ * storage/Database.cpp:
+ (WebCore::Database::openDatabase):
+
2008-01-07 Dan Bernstein <mitz@apple.com>
Reviewed by Oliver Hunt.
, m_useSecureKeyboardEntryWhenActive(false)
, m_isXHTML(isXHTML)
, m_numNodeLists(0)
+#if ENABLE(DATABASE)
+ , m_hasOpenDatabases(false)
+#endif
#if USE(LOW_BANDWIDTH_DISPLAY)
, m_inLowBandwidthDisplay(false)
#endif
#if ENABLE(DATABASE)
DatabaseThread* databaseThread();
+ void setHasOpenDatabases() { m_hasOpenDatabases = true; }
+ bool hasOpenDatabases() { return m_hasOpenDatabases; }
#endif
protected:
void clearXMLVersion() { m_xmlVersion = String(); }
#if ENABLE(DATABASE)
RefPtr<DatabaseThread> m_databaseThread;
+ bool m_hasOpenDatabases;
#endif
#if USE(LOW_BANDWIDTH_DISPLAY)
bool m_inLowBandwidthDisplay;
&& m_frame->document()
&& !m_frame->document()->applets()->length()
&& !m_frame->document()->hasWindowEventListener(unloadEvent)
+#if ENABLE(DATABASE)
+ && !m_frame->document()->hasOpenDatabases()
+#endif
&& m_frame->page()
&& m_frame->page()->backForwardList()->enabled()
&& m_frame->page()->backForwardList()->capacity() > 0
DatabaseTracker::tracker().setDatabaseDetails(document->securityOrigin()->securityOriginData(), name, displayName, estimatedSize);
+ document->setHasOpenDatabases();
+
if (Page* page = document->frame()->page())
page->inspectorController()->didOpenDatabase(database.get(), document->domain(), name, expectedVersion);