Commit 2c403b0f authored by beidson@apple.com's avatar beidson@apple.com

https://bugs.webkit.org/show_bug.cgi?id=56320

Remove HistoryItem::icon() and the WebCore dependency on "IconDatabaseBase::defaultIcon()"

Reviewed by Anders Carlsson.

../WebCore: 

Remove HistoryItem::icon():
* history/HistoryItem.cpp:
* history/HistoryItem.h:
* WebCore.exp.in:

* loader/icon/IconDatabaseBase.h:
(WebCore::IconDatabaseBase::defaultIcon):

../WebKit/efl: 

* ewk/ewk_history.cpp:
(ewk_history_item_icon_surface_get): Use IconDatabase directly.

../WebKit/mac: 

* History/WebHistoryItem.mm:
(-[WebHistoryItem icon]): This far-future FIXME is now irrelevant.

../WebKit/qt: 

* Api/qwebhistory.cpp:
(QWebHistoryItem::icon): Use IconDatabase directly.



git-svn-id: svn://svn.chromium.org/blink/trunk@81058 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 96b07243
2011-03-14 Brady Eidson <beidson@apple.com>
Reviewed by Anders Carlsson.
https://bugs.webkit.org/show_bug.cgi?id=56320
Remove HistoryItem::icon() and the WebCore dependency on "IconDatabaseBase::defaultIcon()"
Remove HistoryItem::icon():
* history/HistoryItem.cpp:
* history/HistoryItem.h:
* WebCore.exp.in:
* loader/icon/IconDatabaseBase.h:
(WebCore::IconDatabaseBase::defaultIcon):
2011-03-14 Andy Estes <aestes@apple.com>
Reviewed by Darin Adler.
......
......@@ -1032,7 +1032,6 @@ __ZNK7WebCore11HistoryItem20getTransientPropertyERKN3WTF6StringE
__ZNK7WebCore11HistoryItem21encodeBackForwardTreeERN3WTF7EncoderE
__ZNK7WebCore11HistoryItem3urlEv
__ZNK7WebCore11HistoryItem4copyEv
__ZNK7WebCore11HistoryItem4iconEv
__ZNK7WebCore11HistoryItem5titleEv
__ZNK7WebCore11HistoryItem6targetEv
__ZNK7WebCore11HistoryItem8childrenEv
......
......@@ -231,12 +231,6 @@ const String& HistoryItem::alternateTitle() const
return m_displayTitle;
}
Image* HistoryItem::icon() const
{
Image* result = iconDatabase().iconForPageURL(m_urlString, IntSize(16, 16));
return result ? result : iconDatabase().defaultIcon(IntSize(16, 16));
}
double HistoryItem::lastVisitedTime() const
{
return m_lastVisitedTime;
......
......@@ -105,8 +105,6 @@ public:
void setAlternateTitle(const String& alternateTitle);
const String& alternateTitle() const;
Image* icon() const;
const String& parent() const;
KURL url() const;
KURL originalURL() const;
......
......@@ -58,7 +58,6 @@ public:
virtual bool isEnabled() const { return false; }
virtual Image* iconForPageURL(const String&, const IntSize&) { return 0; }
virtual Image* defaultIcon(const IntSize&) { return 0; }
virtual void retainIconForPageURL(const String&) { }
virtual void releaseIconForPageURL(const String&) { }
......@@ -72,9 +71,10 @@ public:
// Used within one or more WebKit ports.
// We should try to remove these dependencies from the IconDatabaseBase class.
virtual void setEnabled(bool) { }
virtual Image* defaultIcon(const IntSize&) { return 0; }
virtual size_t pageURLMappingCount() { return 0; }
virtual size_t retainedPageURLCount() { return 0; }
virtual size_t iconRecordCount() { return 0; }
......
2011-03-14 Brady Eidson <beidson@apple.com>
Reviewed by Anders Carlsson.
https://bugs.webkit.org/show_bug.cgi?id=56320
Remove HistoryItem::icon() and the WebCore dependency on "IconDatabaseBase::defaultIcon()"
* ewk/ewk_history.cpp:
(ewk_history_item_icon_surface_get): Use IconDatabase directly.
2011-03-14 Ryuan Choi <ryuan.choi@samsung.com>
Reviewed by Kenneth Rohde Christiansen.
......
......@@ -24,6 +24,7 @@
#include "BackForwardListImpl.h"
#include "EWebKit.h"
#include "HistoryItem.h"
#include "IconDatabaseBase.h"
#include "Image.h"
#include "ewk_private.h"
#include <wtf/text/CString.h>
......@@ -578,7 +579,8 @@ double ewk_history_item_time_last_visited_get(const Ewk_History_Item* item)
cairo_surface_t* ewk_history_item_icon_surface_get(const Ewk_History_Item* item)
{
EWK_HISTORY_ITEM_CORE_GET_OR_RETURN(item, core, 0);
WebCore::Image* icon = core->icon();
WebCore::Image* icon = iconDatabase().iconForPageURL(core->url(), IntSize(16, 16));
if (!icon) {
ERR("icon is NULL.");
return 0;
......
2011-03-14 Brady Eidson <beidson@apple.com>
Reviewed by Anders Carlsson.
https://bugs.webkit.org/show_bug.cgi?id=56320
Remove HistoryItem::icon() and the WebCore dependency on "IconDatabaseBase::defaultIcon()"
* History/WebHistoryItem.mm:
(-[WebHistoryItem icon]): This far-future FIXME is now irrelevant.
2011-03-13 Pratik Solanki <psolanki@apple.com>
Reviewed by Brady Eidson.
......
......@@ -185,12 +185,6 @@ void WKNotifyHistoryItemChanged(HistoryItem*)
- (NSImage *)icon
{
return [[WebIconDatabase sharedIconDatabase] iconForURL:[self URLString] withSize:WebIconSmallSize];
// FIXME: Ideally, this code should simply be the following -
// return core(_private)->icon()->getNSImage();
// Once radar -
// <rdar://problem/4906567> - NSImage returned from WebCore::Image may be incorrect size
// is resolved
}
- (NSTimeInterval)lastVisitedTimeInterval
......
......@@ -23,11 +23,13 @@
#include "qwebframe_p.h"
#include "BackForwardListImpl.h"
#include "PlatformString.h"
#include "IconDatabaseBase.h"
#include "Image.h"
#include "IntSize.h"
#include "KURL.h"
#include "Page.h"
#include "PageGroup.h"
#include "PlatformString.h"
#include <QSharedData>
#include <QDebug>
......@@ -156,7 +158,8 @@ QDateTime QWebHistoryItem::lastVisited() const
QIcon QWebHistoryItem::icon() const
{
if (d->item)
return *d->item->icon()->nativeImageForCurrentFrame();
return *WebCore::iconDatabase().iconForPageURL(d->item->url(), WebCore::IntSize(16, 16))->nativeImageForCurrentFrame();
return QIcon();
}
......
2011-03-14 Brady Eidson <beidson@apple.com>
Reviewed by Anders Carlsson.
https://bugs.webkit.org/show_bug.cgi?id=56320
Remove HistoryItem::icon() and the WebCore dependency on "IconDatabaseBase::defaultIcon()"
* Api/qwebhistory.cpp:
(QWebHistoryItem::icon): Use IconDatabase directly.
2011-03-11 Brady Eidson <beidson@apple.com>
Reviewed by attempt at build fix!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment