summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-24 16:12:30 +0100
committerBen Murdoch <benm@google.com>2011-06-02 10:37:18 +0100
commitd937470c29d31833299da3bb47599e43db82852b (patch)
tree0de35aa2c6de41d02ac7324eee75d74a99685b00
parent192c49d02eeb9cf618784ffef9639f8df38e3c16 (diff)
downloadexternal_webkit-d937470c29d31833299da3bb47599e43db82852b.zip
external_webkit-d937470c29d31833299da3bb47599e43db82852b.tar.gz
external_webkit-d937470c29d31833299da3bb47599e43db82852b.tar.bz2
Merge WebKit at r80534: Fix IconDatabase uses.
WebCore::iconDatabase() now returns a reference rather than a pointer. Update our calls to reflect this. See http://trac.webkit.org/changeset/80299 Change-Id: Iebf2f199fd8913e227572753cee2cf3a2e380985
-rw-r--r--Source/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp4
-rw-r--r--Source/WebKit/android/jni/WebCoreFrameBridge.cpp2
-rw-r--r--Source/WebKit/android/jni/WebHistory.cpp2
-rw-r--r--Source/WebKit/android/jni/WebIconDatabase.cpp20
4 files changed, 14 insertions, 14 deletions
diff --git a/Source/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/Source/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
index 86588ee..e94b35c 100644
--- a/Source/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
+++ b/Source/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
@@ -251,13 +251,13 @@ void FrameLoaderClientAndroid::dispatchDidReceiveIcon() {
return;
WTF::String url(m_frame->document()->url().string());
// Try to obtain the icon image.
- WebCore::Image* icon = WebCore::iconDatabase()->iconForPageURL(
+ WebCore::Image* icon = WebCore::iconDatabase().iconForPageURL(
url, WebCore::IntSize(16, 16));
// If the request fails, try the original request url.
if (!icon) {
DocumentLoader* docLoader = m_frame->loader()->activeDocumentLoader();
KURL originalURL = docLoader->originalRequest().url();
- icon = WebCore::iconDatabase()->iconForPageURL(
+ icon = WebCore::iconDatabase().iconForPageURL(
originalURL, WebCore::IntSize(16, 16));
}
// There is a bug in webkit where cancelling an icon load is treated as a
diff --git a/Source/WebKit/android/jni/WebCoreFrameBridge.cpp b/Source/WebKit/android/jni/WebCoreFrameBridge.cpp
index 5caf633..6d278f0 100644
--- a/Source/WebKit/android/jni/WebCoreFrameBridge.cpp
+++ b/Source/WebKit/android/jni/WebCoreFrameBridge.cpp
@@ -562,7 +562,7 @@ WebFrame::loadStarted(WebCore::Frame* frame)
// send it along with the page started notification.
jobject favicon = NULL;
if (isMainFrame) {
- WebCore::Image* icon = WebCore::iconDatabase()->iconForPageURL(urlString, WebCore::IntSize(16, 16));
+ WebCore::Image* icon = WebCore::iconDatabase().iconForPageURL(urlString, WebCore::IntSize(16, 16));
if (icon)
favicon = webcoreImageToJavaBitmap(env, icon);
LOGV("favicons", "Starting load with icon %p for %s", icon, url.string().utf8().data());
diff --git a/Source/WebKit/android/jni/WebHistory.cpp b/Source/WebKit/android/jni/WebHistory.cpp
index 97ce23b..dd68a4e 100644
--- a/Source/WebKit/android/jni/WebHistory.cpp
+++ b/Source/WebKit/android/jni/WebHistory.cpp
@@ -291,7 +291,7 @@ void WebHistoryItem::updateHistoryItem(WebCore::HistoryItem* item) {
int refIndex = url.reverseFind('#');
url = url.substring(0, refIndex);
}
- WebCore::Image* icon = WebCore::iconDatabase()->iconForPageURL(url,
+ WebCore::Image* icon = WebCore::iconDatabase().iconForPageURL(url,
WebCore::IntSize(16, 16));
if (icon)
diff --git a/Source/WebKit/android/jni/WebIconDatabase.cpp b/Source/WebKit/android/jni/WebIconDatabase.cpp
index 2a660d1..83c46f4 100644
--- a/Source/WebKit/android/jni/WebIconDatabase.cpp
+++ b/Source/WebKit/android/jni/WebIconDatabase.cpp
@@ -134,11 +134,11 @@ void WebIconDatabase::deliverNotifications()
static void Open(JNIEnv* env, jobject obj, jstring path)
{
- WebCore::IconDatabase* iconDb = WebCore::iconDatabase();
- if (iconDb->isOpen())
+ WebCore::IconDatabase& iconDb = WebCore::iconDatabase();
+ if (iconDb.isOpen())
return;
- iconDb->setEnabled(true);
- iconDb->setClient(gIconDatabaseClient);
+ iconDb.setEnabled(true);
+ iconDb.setClient(gIconDatabaseClient);
LOG_ASSERT(path, "No path given to nativeOpen");
WTF::String pathStr = jstringToWtfString(env, path);
WTF::CString fullPath = WebCore::pathByAppendingComponent(pathStr,
@@ -157,7 +157,7 @@ static void Open(JNIEnv* env, jobject obj, jstring path)
}
if (didSetPermissions) {
LOGV("Opening WebIconDatabase file '%s'", pathStr.latin1().data());
- bool res = iconDb->open(pathStr);
+ bool res = iconDb.open(pathStr);
if (!res)
LOGE("Open failed!");
} else
@@ -166,13 +166,13 @@ static void Open(JNIEnv* env, jobject obj, jstring path)
static void Close(JNIEnv* env, jobject obj)
{
- WebCore::iconDatabase()->close();
+ WebCore::iconDatabase().close();
}
static void RemoveAllIcons(JNIEnv* env, jobject obj)
{
LOGV("Removing all icons");
- WebCore::iconDatabase()->removeAllIcons();
+ WebCore::iconDatabase().removeAllIcons();
}
static jobject IconForPageUrl(JNIEnv* env, jobject obj, jstring url)
@@ -180,7 +180,7 @@ static jobject IconForPageUrl(JNIEnv* env, jobject obj, jstring url)
LOG_ASSERT(url, "No url given to iconForPageUrl");
WTF::String urlStr = jstringToWtfString(env, url);
- WebCore::Image* icon = WebCore::iconDatabase()->iconForPageURL(urlStr,
+ WebCore::Image* icon = WebCore::iconDatabase().iconForPageURL(urlStr,
WebCore::IntSize(16, 16));
LOGV("Retrieving icon for '%s' %p", urlStr.latin1().data(), icon);
return webcoreImageToJavaBitmap(env, icon);
@@ -192,7 +192,7 @@ static void RetainIconForPageUrl(JNIEnv* env, jobject obj, jstring url)
WTF::String urlStr = jstringToWtfString(env, url);
LOGV("Retaining icon for '%s'", urlStr.latin1().data());
- WebCore::iconDatabase()->retainIconForPageURL(urlStr);
+ WebCore::iconDatabase().retainIconForPageURL(urlStr);
}
static void ReleaseIconForPageUrl(JNIEnv* env, jobject obj, jstring url)
@@ -201,7 +201,7 @@ static void ReleaseIconForPageUrl(JNIEnv* env, jobject obj, jstring url)
WTF::String urlStr = jstringToWtfString(env, url);
LOGV("Releasing icon for '%s'", urlStr.latin1().data());
- WebCore::iconDatabase()->releaseIconForPageURL(urlStr);
+ WebCore::iconDatabase().releaseIconForPageURL(urlStr);
}
/*