Diff
Modified: trunk/Source/WebCore/ChangeLog (120693 => 120694)
--- trunk/Source/WebCore/ChangeLog 2012-06-19 08:45:40 UTC (rev 120693)
+++ trunk/Source/WebCore/ChangeLog 2012-06-19 08:55:09 UTC (rev 120694)
@@ -1,3 +1,22 @@
+2012-06-19 Sergio Villar Senin <svil...@igalia.com>
+
+ Calling nativeImageForCurrentFrame() causes assertion failure: m_verifier.isSafeToUse()
+ https://bugs.webkit.org/show_bug.cgi?id=67582
+
+ Reviewed by David Levin.
+
+ Added a new synchronous method to the IconDatabase that returns a
+ native image for the platform instead of a WebCore::Image*.
+
+ * loader/icon/IconDatabase.cpp:
+ (WebCore::IconDatabase::synchronousNativeIconForPageURL):
+ (WebCore):
+ * loader/icon/IconDatabase.h:
+ (IconDatabase):
+ * loader/icon/IconDatabaseBase.h:
+ (WebCore::IconDatabaseBase::synchronousNativeIconForPageURL):
+ (IconDatabaseBase):
+
2012-06-19 Andy Estes <aes...@apple.com>
[Mac] Use AutodrainedPool instead of NSAutoreleasePool in AudioBus::loadPlatformResource()
Modified: trunk/Source/WebCore/loader/icon/IconDatabase.cpp (120693 => 120694)
--- trunk/Source/WebCore/loader/icon/IconDatabase.cpp 2012-06-19 08:45:40 UTC (rev 120693)
+++ trunk/Source/WebCore/loader/icon/IconDatabase.cpp 2012-06-19 08:55:09 UTC (rev 120694)
@@ -34,6 +34,7 @@
#include "FileSystem.h"
#include "IconDatabaseClient.h"
#include "IconRecord.h"
+#include "Image.h"
#include "IntSize.h"
#include "Logging.h"
#include "SQLiteStatement.h"
@@ -292,6 +293,16 @@
return iconRecord->image(size);
}
+NativeImagePtr IconDatabase::synchronousNativeIconForPageURL(const String& pageURLOriginal, const IntSize& size)
+{
+ Image* icon = synchronousIconForPageURL(pageURLOriginal, size);
+ if (!icon)
+ return 0;
+
+ MutexLocker locker(m_urlAndIconLock);
+ return icon->nativeImageForCurrentFrame();
+}
+
void IconDatabase::readIconForPageURLFromDisk(const String& pageURL)
{
// The effect of asking for an Icon for a pageURL automatically queues it to be read from disk
Modified: trunk/Source/WebCore/loader/icon/IconDatabase.h (120693 => 120694)
--- trunk/Source/WebCore/loader/icon/IconDatabase.h 2012-06-19 08:45:40 UTC (rev 120693)
+++ trunk/Source/WebCore/loader/icon/IconDatabase.h 2012-06-19 08:55:09 UTC (rev 120694)
@@ -97,6 +97,7 @@
virtual void setIconURLForPageURL(const String& iconURL, const String& pageURL);
virtual Image* synchronousIconForPageURL(const String&, const IntSize&);
+ virtual NativeImagePtr synchronousNativeIconForPageURL(const String& pageURLOriginal, const IntSize&);
virtual String synchronousIconURLForPageURL(const String&);
virtual bool synchronousIconDataKnownForIconURL(const String&);
virtual IconLoadDecision synchronousLoadDecisionForIconURL(const String&, DocumentLoader*);
Modified: trunk/Source/WebCore/loader/icon/IconDatabaseBase.h (120693 => 120694)
--- trunk/Source/WebCore/loader/icon/IconDatabaseBase.h 2012-06-19 08:45:40 UTC (rev 120693)
+++ trunk/Source/WebCore/loader/icon/IconDatabaseBase.h 2012-06-19 08:55:09 UTC (rev 120694)
@@ -26,13 +26,14 @@
#ifndef IconDatabaseBase_h
#define IconDatabaseBase_h
+#include "ImageSource.h"
#include "SharedBuffer.h"
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
#include <wtf/PassRefPtr.h>
-namespace WebCore {
+namespace WebCore {
class DocumentLoader;
class IconDatabaseClient;
@@ -178,7 +179,8 @@
virtual bool synchronousIconDataKnownForIconURL(const String&) { return false; }
virtual IconLoadDecision synchronousLoadDecisionForIconURL(const String&, DocumentLoader*) { return IconLoadNo; }
virtual Image* synchronousIconForPageURL(const String&, const IntSize&) { return 0; }
-
+ virtual NativeImagePtr synchronousNativeIconForPageURL(const String&, const IntSize&) { return 0; }
+
// Asynchronous calls we should use to replace the above when supported.
virtual bool supportsAsynchronousMode() { return false; }
virtual void loadDecisionForIconURL(const String&, PassRefPtr<IconLoadDecisionCallback>) { }
Modified: trunk/Source/WebKit/blackberry/ChangeLog (120693 => 120694)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-06-19 08:45:40 UTC (rev 120693)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-06-19 08:55:09 UTC (rev 120694)
@@ -1,3 +1,15 @@
+2012-06-19 Sergio Villar Senin <svil...@igalia.com>
+
+ Calling nativeImageForCurrentFrame() causes assertion failure: m_verifier.isSafeToUse()
+ https://bugs.webkit.org/show_bug.cgi?id=67582
+
+ Reviewed by David Levin.
+
+ Use synchronousNativeIconForPageURL() to retrieve favicons.
+
+ * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+ (WebCore::FrameLoaderClientBlackBerry::dispatchDidReceiveIcon):
+
2012-06-18 Antonio Gomes <ago...@rim.com>
[BlackBerry] Overscroll can get reset while interacting with a page, due to style recalculations and scroll position clamping
Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp (120693 => 120694)
--- trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp 2012-06-19 08:45:40 UTC (rev 120693)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp 2012-06-19 08:55:09 UTC (rev 120694)
@@ -1149,13 +1149,10 @@
void FrameLoaderClientBlackBerry::dispatchDidReceiveIcon()
{
String url = ""
- Image* img = iconDatabase().synchronousIconForPageURL(url, IntSize(10, 10));
- if (!img || !img->data())
- return;
-
- NativeImageSkia* bitmap = img->nativeImageForCurrentFrame();
+ NativeImageSkia* bitmap = iconDatabase().synchronousNativeIconForPageURL(url, IntSize(10, 10));
if (!bitmap)
return;
+
bitmap->lockPixels();
String iconUrl = iconDatabase().synchronousIconURLForPageURL(url);
m_webPagePrivate->m_client->setFavicon(img->width(), img->height(), (unsigned char*)bitmap->getPixels(), iconUrl.utf8().data());
Modified: trunk/Source/WebKit/cf/ChangeLog (120693 => 120694)
--- trunk/Source/WebKit/cf/ChangeLog 2012-06-19 08:45:40 UTC (rev 120693)
+++ trunk/Source/WebKit/cf/ChangeLog 2012-06-19 08:55:09 UTC (rev 120694)
@@ -1,3 +1,14 @@
+2012-06-19 Sergio Villar Senin <svil...@igalia.com>
+
+ Calling nativeImageForCurrentFrame() causes assertion failure: m_verifier.isSafeToUse()
+ https://bugs.webkit.org/show_bug.cgi?id=67582
+
+ Reviewed by David Levin.
+
+ Fixes windows build.
+
+ * WebCoreSupport/WebInspectorClientCF.cpp:
+
2011-12-20 Pavel Feldman <pavel.feld...@gmail.com>
Web Inspector: reproducible crash after closing web inspector and browser window (iCab)
Modified: trunk/Source/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp (120693 => 120694)
--- trunk/Source/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp 2012-06-19 08:45:40 UTC (rev 120693)
+++ trunk/Source/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp 2012-06-19 08:55:09 UTC (rev 120694)
@@ -33,6 +33,14 @@
#define WTF_USE_CF 1
#endif
+#include <wtf/Platform.h>
+
+#if PLATFORM(WIN) && !OS(WINCE)
+#ifndef WTF_USE_CG
+#define WTF_USE_CG 1
+#endif
+#endif
+
// NOTE: These need to appear up top, as they declare macros
// used in the JS and WTF headers.
#include <runtime/JSExportMacros.h>
Modified: trunk/Source/WebKit/efl/ChangeLog (120693 => 120694)
--- trunk/Source/WebKit/efl/ChangeLog 2012-06-19 08:45:40 UTC (rev 120693)
+++ trunk/Source/WebKit/efl/ChangeLog 2012-06-19 08:55:09 UTC (rev 120694)
@@ -1,3 +1,19 @@
+2012-06-19 Sergio Villar Senin <svil...@igalia.com>
+
+ Calling nativeImageForCurrentFrame() causes assertion failure: m_verifier.isSafeToUse()
+ https://bugs.webkit.org/show_bug.cgi?id=67582
+
+ Reviewed by David Levin.
+
+ Use synchronousNativeIconForPageURL() to retrieve favicons.
+
+ * ewk/ewk_history.cpp:
+ (ewk_history_item_icon_surface_get):
+ (ewk_history_item_icon_object_add):
+ * ewk/ewk_settings.cpp:
+ (ewk_settings_icon_database_icon_surface_get):
+ (ewk_settings_icon_database_icon_object_add):
+
2012-06-19 Christophe Dumez <christophe.du...@intel.com>
[EFL] EFL's LayoutTestController does not support setTextDirection
Modified: trunk/Source/WebKit/efl/ewk/ewk_history.cpp (120693 => 120694)
--- trunk/Source/WebKit/efl/ewk/ewk_history.cpp 2012-06-19 08:45:40 UTC (rev 120693)
+++ trunk/Source/WebKit/efl/ewk/ewk_history.cpp 2012-06-19 08:55:09 UTC (rev 120694)
@@ -336,29 +336,26 @@
{
EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core, 0);
- WebCore::Image* icon = WebCore::iconDatabase().synchronousIconForPageURL(core->url(), WebCore::IntSize(16, 16));
- if (!icon) {
+ WebCore::NativeImagePtr icon = WebCore::iconDatabase().synchronousNativeIconForPageURL(core->url(), WebCore::IntSize(16, 16));
+ if (!icon)
ERR("icon is NULL.");
- return 0;
- }
- WebCore::NativeImageCairo* nativeImage = icon->nativeImageForCurrentFrame();
- return nativeImage ? nativeImage->surface() : 0;
+ return icon ? icon->surface() : 0;
}
Evas_Object* ewk_history_item_icon_object_add(const Ewk_History_Item* item, Evas* canvas)
{
EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core, 0);
EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, 0);
- WebCore::Image* icon = WebCore::iconDatabase().synchronousIconForPageURL(core->url(), WebCore::IntSize(16, 16));
+ WebCore::NativeImagePtr icon = WebCore::iconDatabase().synchronousNativeIconForPageURL(core->url(), WebCore::IntSize(16, 16));
if (!icon) {
ERR("icon is NULL.");
return 0;
}
- WebCore::NativeImageCairo* nativeImage = icon->nativeImageForCurrentFrame();
- return nativeImage ? ewk_util_image_from_cairo_surface_add(canvas, nativeImage->surface()) : 0;
+ cairo_surface_t* surface = icon->surface();
+ return surface ? ewk_util_image_from_cairo_surface_add(canvas, surface) : 0;
}
Eina_Bool ewk_history_item_page_cache_exists(const Ewk_History_Item* item)
Modified: trunk/Source/WebKit/efl/ewk/ewk_settings.cpp (120693 => 120694)
--- trunk/Source/WebKit/efl/ewk/ewk_settings.cpp 2012-06-19 08:45:40 UTC (rev 120693)
+++ trunk/Source/WebKit/efl/ewk/ewk_settings.cpp 2012-06-19 08:55:09 UTC (rev 120694)
@@ -207,15 +207,11 @@
EINA_SAFETY_ON_NULL_RETURN_VAL(url, 0);
WebCore::KURL kurl(WebCore::KURL(), WTF::String::fromUTF8(url));
- WebCore::Image* icon = WebCore::iconDatabase().synchronousIconForPageURL(kurl.string(), WebCore::IntSize(16, 16));
-
- if (!icon) {
+ WebCore::NativeImagePtr icon = WebCore::iconDatabase().synchronousNativeIconForPageURL(kurl.string(), WebCore::IntSize(16, 16));
+ if (!icon)
ERR("no icon for url %s", url);
- return 0;
- }
- WebCore::NativeImageCairo* nativeImage = icon->nativeImageForCurrentFrame();
- return nativeImage ? nativeImage->surface() : 0;
+ return icon ? icon->surface() : 0;
}
Evas_Object* ewk_settings_icon_database_icon_object_get(const char* url, Evas* canvas)
@@ -224,15 +220,15 @@
EINA_SAFETY_ON_NULL_RETURN_VAL(canvas, 0);
WebCore::KURL kurl(WebCore::KURL(), WTF::String::fromUTF8(url));
- WebCore::Image* icon = WebCore::iconDatabase().synchronousIconForPageURL(kurl.string(), WebCore::IntSize(16, 16));
+ WebCore::NativeImagePtr icon = WebCore::iconDatabase().synchronousNativeIconForPageURL(kurl.string(), WebCore::IntSize(16, 16));
if (!icon) {
ERR("no icon for url %s", url);
return 0;
}
- WebCore::NativeImageCairo* nativeImage = icon->nativeImageForCurrentFrame();
- return nativeImage ? ewk_util_image_from_cairo_surface_add(canvas, nativeImage->surface()) : 0;
+ cairo_surface_t* surface = icon->surface();
+ return surface ? ewk_util_image_from_cairo_surface_add(canvas, surface) : 0;
}
void ewk_settings_object_cache_capacity_set(unsigned minDeadCapacity, unsigned maxDeadCapacity, unsigned totalCapacity)
Modified: trunk/Source/WebKit/gtk/ChangeLog (120693 => 120694)
--- trunk/Source/WebKit/gtk/ChangeLog 2012-06-19 08:45:40 UTC (rev 120693)
+++ trunk/Source/WebKit/gtk/ChangeLog 2012-06-19 08:55:09 UTC (rev 120694)
@@ -1,3 +1,15 @@
+2012-06-19 Sergio Villar Senin <svil...@igalia.com>
+
+ Calling nativeImageForCurrentFrame() causes assertion failure: m_verifier.isSafeToUse()
+ https://bugs.webkit.org/show_bug.cgi?id=67582
+
+ Reviewed by David Levin.
+
+ Use synchronousNativeIconForPageURL() to retrieve favicons.
+
+ * webkit/webkitfavicondatabase.cpp:
+ (getIconPixbufSynchronously):
+
2012-06-18 Mario Sanchez Prada <msanc...@igalia.com>
[GTK] Get rid of DumpRenderTreeSupportGtk::{in|de}crementAccessibilityValue
Modified: trunk/Source/WebKit/gtk/webkit/webkitfavicondatabase.cpp (120693 => 120694)
--- trunk/Source/WebKit/gtk/webkit/webkitfavicondatabase.cpp 2012-06-19 08:45:40 UTC (rev 120693)
+++ trunk/Source/WebKit/gtk/webkit/webkitfavicondatabase.cpp 2012-06-19 08:55:09 UTC (rev 120694)
@@ -24,6 +24,7 @@
#include "DatabaseDetails.h"
#include "DatabaseTracker.h"
#include "FileSystem.h"
+#include "GdkCairoUtilities.h"
#include "IconDatabase.h"
#include "IconDatabaseClient.h"
#include "Image.h"
@@ -394,16 +395,18 @@
// The exact size we pass is irrelevant to the iconDatabase code.
// We must pass something greater than 0x0 to get a pixbuf.
- Image* icon = iconDatabase().synchronousIconForPageURL(pageURL, !iconSize.isZero() ? iconSize : IntSize(1, 1));
+ NativeImagePtr icon = iconDatabase().synchronousNativeIconForPageURL(pageURL, !iconSize.isZero() ? iconSize : IntSize(1, 1));
if (!icon)
return 0;
- GRefPtr<GdkPixbuf> pixbuf = adoptGRef(icon->getGdkPixbuf());
+ GRefPtr<GdkPixbuf> pixbuf = adoptGRef(cairoImageSurfaceToGdkPixbuf(icon->surface()));
if (!pixbuf)
return 0;
// A size of (0, 0) means the maximum available size.
- if (!iconSize.isZero() && (icon->width() != iconSize.width() || icon->height() != iconSize.height()))
+ int pixbufWidth = gdk_pixbuf_get_width(pixbuf.get());
+ int pixbufHeight = gdk_pixbuf_get_height(pixbuf.get());
+ if (!iconSize.isZero() && (pixbufWidth != iconSize.width() || pixbufHeight != iconSize.height()))
pixbuf = gdk_pixbuf_scale_simple(pixbuf.get(), iconSize.width(), iconSize.height(), GDK_INTERP_BILINEAR);
return pixbuf.leakRef();
}
Modified: trunk/Source/WebKit/qt/Api/qwebhistory.cpp (120693 => 120694)
--- trunk/Source/WebKit/qt/Api/qwebhistory.cpp 2012-06-19 08:45:40 UTC (rev 120693)
+++ trunk/Source/WebKit/qt/Api/qwebhistory.cpp 2012-06-19 08:55:09 UTC (rev 120694)
@@ -158,7 +158,7 @@
QIcon QWebHistoryItem::icon() const
{
if (d->item)
- return *WebCore::iconDatabase().synchronousIconForPageURL(d->item->url(), WebCore::IntSize(16, 16))->nativeImageForCurrentFrame();
+ return *WebCore::iconDatabase().synchronousNativeIconForPageURL(d->item->url(), WebCore::IntSize(16, 16));
return QIcon();
}
Modified: trunk/Source/WebKit/qt/Api/qwebsettings.cpp (120693 => 120694)
--- trunk/Source/WebKit/qt/Api/qwebsettings.cpp 2012-06-19 08:45:40 UTC (rev 120693)
+++ trunk/Source/WebKit/qt/Api/qwebsettings.cpp 2012-06-19 08:55:09 UTC (rev 120694)
@@ -715,12 +715,8 @@
QIcon QWebSettings::iconForUrl(const QUrl& url)
{
WebCore::initializeWebCoreQt();
- WebCore::Image* image = WebCore::iconDatabase().synchronousIconForPageURL(WebCore::KURL(url).string(),
+ QPixmap* icon = WebCore::iconDatabase().synchronousNativeIconForPageURL(WebCore::KURL(url).string(),
WebCore::IntSize(16, 16));
- if (!image)
- return QPixmap();
-
- QPixmap* icon = image->nativeImageForCurrentFrame();
if (!icon)
return QPixmap();
Modified: trunk/Source/WebKit/qt/ChangeLog (120693 => 120694)
--- trunk/Source/WebKit/qt/ChangeLog 2012-06-19 08:45:40 UTC (rev 120693)
+++ trunk/Source/WebKit/qt/ChangeLog 2012-06-19 08:55:09 UTC (rev 120694)
@@ -1,3 +1,17 @@
+2012-06-19 Sergio Villar Senin <svil...@igalia.com>
+
+ Calling nativeImageForCurrentFrame() causes assertion failure: m_verifier.isSafeToUse()
+ https://bugs.webkit.org/show_bug.cgi?id=67582
+
+ Reviewed by David Levin.
+
+ Use synchronousNativeIconForPageURL() to retrieve favicons.
+
+ * Api/qwebhistory.cpp:
+ (QWebHistoryItem::icon):
+ * Api/qwebsettings.cpp:
+ (QWebSettings::iconForUrl):
+
2012-06-18 Andras Becsi <andras.be...@nokia.com>
[Qt] Update QML plugins to Qt 5 style
Modified: trunk/Source/WebKit2/UIProcess/WebIconDatabase.cpp (120693 => 120694)
--- trunk/Source/WebKit2/UIProcess/WebIconDatabase.cpp 2012-06-19 08:45:40 UTC (rev 120693)
+++ trunk/Source/WebKit2/UIProcess/WebIconDatabase.cpp 2012-06-19 08:55:09 UTC (rev 120694)
@@ -190,6 +190,14 @@
return m_iconDatabaseImpl->synchronousIconForPageURL(pageURL, iconSize);
}
+WebCore::NativeImagePtr WebIconDatabase::nativeImageForPageURL(const String& pageURL, const WebCore::IntSize& iconSize)
+{
+ if (!m_webContext || !m_iconDatabaseImpl || !m_iconDatabaseImpl->isOpen() || pageURL.isEmpty())
+ return 0;
+
+ return m_iconDatabaseImpl->synchronousNativeIconForPageURL(pageURL, iconSize);
+}
+
bool WebIconDatabase::isOpen()
{
return m_iconDatabaseImpl && m_iconDatabaseImpl->isOpen();
Modified: trunk/Source/WebKit2/UIProcess/WebIconDatabase.h (120693 => 120694)
--- trunk/Source/WebKit2/UIProcess/WebIconDatabase.h 2012-06-19 08:45:40 UTC (rev 120693)
+++ trunk/Source/WebKit2/UIProcess/WebIconDatabase.h 2012-06-19 08:55:09 UTC (rev 120694)
@@ -31,6 +31,7 @@
#include "Connection.h"
#include "WebIconDatabaseClient.h"
#include <WebCore/IconDatabaseClient.h>
+#include <WebCore/ImageSource.h>
#include <WebCore/IntSize.h>
#include <wtf/Forward.h>
#include <wtf/PassRefPtr.h>
@@ -78,6 +79,7 @@
void getLoadDecisionForIconURL(const String&, uint64_t callbackID);
WebCore::Image* imageForPageURL(const String&, const WebCore::IntSize& iconSize = WebCore::IntSize(32, 32));
+ WebCore::NativeImagePtr nativeImageForPageURL(const String&, const WebCore::IntSize& iconSize = WebCore::IntSize(32, 32));
bool isOpen();
void removeAllIcons();
Modified: trunk/Source/WebKit2/UIProcess/qt/QtWebIconDatabaseClient.cpp (120693 => 120694)
--- trunk/Source/WebKit2/UIProcess/qt/QtWebIconDatabaseClient.cpp 2012-06-19 08:45:40 UTC (rev 120693)
+++ trunk/Source/WebKit2/UIProcess/qt/QtWebIconDatabaseClient.cpp 2012-06-19 08:55:09 UTC (rev 120694)
@@ -89,11 +89,8 @@
MutexLocker locker(m_imageLock);
WebCore::IntSize size(iconSize.width(), iconSize.height());
- RefPtr<WebCore::Image> image = m_iconDatabase->imageForPageURL(pageURL, size);
- if (!image)
- return QImage();
- QPixmap* nativeImage = image->nativeImageForCurrentFrame();
+ QPixmap* nativeImage = m_iconDatabase->nativeImageForPageURL(pageURL, size);
if (!nativeImage)
return QImage();