https://bugs.webkit.org/show_bug.cgi?id=80209
Patch by Michael BrĂ¼ning <michael.bruning@nokia.com> on 2012-05-15
Reviewed by Kenneth Rohde Christiansen.
This patch adds a method isOpen to WebIconDatabase to
be able to check whether the database has already been opened.
This helps preventing problems when reusing a WebContext
to create another view, as e.g. WebKitTestRunner does it in the
Qt port.
* UIProcess/WebIconDatabase.cpp:
(WebKit::WebIconDatabase::setDatabasePath):
(WebKit::WebIconDatabase::isOpen): Added.
(WebKit):
* UIProcess/WebIconDatabase.h:
(WebIconDatabase):
* UIProcess/qt/QtWebIconDatabaseClient.cpp:
(WebKit::QtWebIconDatabaseClient::QtWebIconDatabaseClient):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117141
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-05-15 Michael BrĂ¼ning <michael.bruning@nokia.com>
+
+ [Qt][WK2] http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml crashes
+ https://bugs.webkit.org/show_bug.cgi?id=80209
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ This patch adds a method isOpen to WebIconDatabase to
+ be able to check whether the database has already been opened.
+ This helps preventing problems when reusing a WebContext
+ to create another view, as e.g. WebKitTestRunner does it in the
+ Qt port.
+
+ * UIProcess/WebIconDatabase.cpp:
+ (WebKit::WebIconDatabase::setDatabasePath):
+ (WebKit::WebIconDatabase::isOpen): Added.
+ (WebKit):
+ * UIProcess/WebIconDatabase.h:
+ (WebIconDatabase):
+ * UIProcess/qt/QtWebIconDatabaseClient.cpp:
+ (WebKit::QtWebIconDatabaseClient::QtWebIconDatabaseClient):
+
2012-05-15 Anders Carlsson <andersca@apple.com>
Use unaccelerated scrolling deltas when rubber-banding
void WebIconDatabase::setDatabasePath(const String& path)
{
- if (m_iconDatabaseImpl && m_iconDatabaseImpl->isOpen()) {
+ if (isOpen()) {
LOG_ERROR("Icon database already has a path and is already open. We don't currently support changing its path and reopening.");
return;
}
return m_iconDatabaseImpl->synchronousIconForPageURL(pageURL, iconSize);
}
+bool WebIconDatabase::isOpen()
+{
+ return m_iconDatabaseImpl && m_iconDatabaseImpl->isOpen();
+}
+
void WebIconDatabase::removeAllIcons()
{
m_iconDatabaseImpl->removeAllIcons();
void getLoadDecisionForIconURL(const String&, uint64_t callbackID);
WebCore::Image* imageForPageURL(const String&, const WebCore::IntSize& iconSize = WebCore::IntSize(32, 32));
-
+ bool isOpen();
+
void removeAllIcons();
void checkIntegrityBeforeOpening();
void close();
m_contextId = qtWebContext->contextID();
// The setter calls the getter here as it triggers the startup of the icon database.
WebContext* context = qtWebContext->context();
- context->setIconDatabasePath(context->iconDatabasePath());
+ if (!context->iconDatabase()->isOpen())
+ context->setIconDatabasePath(context->iconDatabasePath());
m_iconDatabase = context->iconDatabase();
WKIconDatabaseClient iconDatabaseClient;