Changeset 35993 in webkit
- Timestamp:
- Aug 29, 2008 8:57:44 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r35992 r35993 1 2008-08-29 Holger Hans Peter Freyther <zecke@selfish.org> 2 3 Reviewed by Eric Seidel. 4 5 [janitor/qt] Start replacing port specific getters with the generic native getter 6 To get the native presentation of an image we currently have platform 7 specific #ifdef's and a generic getter using NativeImagePtr. This patch 8 extends this to the ImageBuffer and updates the Qt platform to get rid 9 of the special #ifdefs. 10 11 https://bugs.webkit.org/attachment.cgi?id=22861 12 13 * platform/graphics/BitmapImage.h: 14 * platform/graphics/Image.h: 15 * platform/graphics/qt/ImageQt.cpp: 16 * platform/graphics/qt/StillImageQt.cpp: 17 * platform/graphics/qt/StillImageQt.h: 18 * platform/qt/ClipboardQt.cpp: 19 (WebCore::ClipboardQt::createDragImage): 20 (WebCore::ClipboardQt::declareAndWriteDragImage): 21 * platform/qt/CursorQt.cpp: 22 * platform/qt/PasteboardQt.cpp: 23 (WebCore::Pasteboard::writeImage): 24 1 25 2008-08-29 Holger Hans Peter Freyther <zecke@selfish.org> 2 26 -
trunk/WebCore/platform/graphics/BitmapImage.h
r35934 r35993 129 129 #endif 130 130 131 #if PLATFORM(QT)132 virtual QPixmap* getPixmap() const;133 #endif134 135 131 #if PLATFORM(WIN) 136 132 virtual bool getHBITMAP(HBITMAP); -
trunk/WebCore/platform/graphics/Image.h
r35934 r35993 135 135 #endif 136 136 137 #if PLATFORM(QT)138 virtual QPixmap* getPixmap() const { return 0; }139 #endif140 141 137 #if PLATFORM(WIN) 142 138 virtual bool getHBITMAP(HBITMAP) { return false; } -
trunk/WebCore/platform/graphics/qt/ImageQt.cpp
r35737 r35993 165 165 } 166 166 167 QPixmap* BitmapImage::getPixmap() const168 {169 return const_cast<BitmapImage*>(this)->frameAtIndex(0);170 }171 172 167 } 173 168 -
trunk/WebCore/platform/graphics/qt/StillImageQt.cpp
r32981 r35993 45 45 } 46 46 47 QPixmap* StillImage::getPixmap() const 47 NativeImagePtr StillImage::nativeImageForCurrentFrame() 48 48 { 49 return const_cast< QPixmap*>(&m_pixmap);49 return const_cast<NativeImagePtr>(&m_pixmap); 50 50 } 51 51 -
trunk/WebCore/platform/graphics/qt/StillImageQt.h
r35737 r35993 46 46 47 47 virtual IntSize size() const; 48 virtual QPixmap* getPixmap() const;48 virtual NativeImagePtr nativeImageForCurrentFrame(); 49 49 virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, CompositeOperator); 50 50 -
trunk/WebCore/platform/qt/ClipboardQt.cpp
r32625 r35993 209 209 return 0; 210 210 dragLoc = m_dragLoc; 211 return m_dragImage->image()-> getPixmap();211 return m_dragImage->image()->nativeImageForCurrentFrame(); 212 212 } 213 213 … … 241 241 if (!cachedImage || !cachedImage->image() || !cachedImage->isLoaded()) 242 242 return; 243 QPixmap *pixmap = cachedImage->image()-> getPixmap();243 QPixmap *pixmap = cachedImage->image()->nativeImageForCurrentFrame(); 244 244 if (pixmap) 245 245 m_writableData->setImageData(pixmap); -
trunk/WebCore/platform/qt/CursorQt.cpp
r35532 r35993 60 60 Cursor::Cursor(Image* image, const IntPoint& hotspot) 61 61 #ifndef QT_NO_CURSOR 62 : m_impl(*(image-> getPixmap()), hotspot.x(), hotspot.y())62 : m_impl(*(image->nativeImageForCurrentFrame()), hotspot.x(), hotspot.y()) 63 63 #endif 64 64 { -
trunk/WebCore/platform/qt/PasteboardQt.cpp
r32625 r35993 145 145 ASSERT(image); 146 146 147 QPixmap* pixmap = image-> getPixmap();147 QPixmap* pixmap = image->nativeImageForCurrentFrame(); 148 148 ASSERT(pixmap); 149 149 -
trunk/WebKit/qt/Api/qwebframe.cpp
r35853 r35993 983 983 WebCore::Image *img = hitTest.image(); 984 984 if (img) { 985 QPixmap *pix = img-> getPixmap();985 QPixmap *pix = img->nativeImageForCurrentFrame(); 986 986 if (pix) 987 987 pixmap = *pix; -
trunk/WebKit/qt/Api/qwebhistory.cpp
r35991 r35993 131 131 QIcon QWebHistoryItem::icon() const 132 132 { 133 return *d->item->icon()-> getPixmap();133 return *d->item->icon()->nativeImageForCurrentFrame(); 134 134 } 135 135 -
trunk/WebKit/qt/Api/qwebsettings.cpp
r35716 r35993 439 439 return QPixmap(); 440 440 } 441 QPixmap *icon = image-> getPixmap();441 QPixmap *icon = image->nativeImageForCurrentFrame(); 442 442 if (!icon) { 443 443 return QPixmap(); -
trunk/WebKit/qt/ChangeLog
r35991 r35993 1 2008-08-29 Holger Hans Peter Freyther <zecke@selfish.org> 2 3 Reviewed by Eric Seidel. 4 5 [janitor/qt] Start replacing port specific getters with the generic native getter 6 To get the native presentation of an image we currently have platform 7 specific #ifdef's and a generic getter using NativeImagePtr. This patch 8 extends this to the ImageBuffer and updates the Qt platform to get rid 9 of the special #ifdefs. 10 11 https://bugs.webkit.org/attachment.cgi?id=22861 12 13 * Api/qwebframe.cpp: 14 (QWebHitTestResultPrivate::QWebHitTestResultPrivate): 15 * Api/qwebhistory.cpp: 16 * Api/qwebsettings.cpp: 17 (QWebSettings::iconForUrl): 18 1 19 2008-08-29 Holger Hans Peter Freyther <zecke@selfish.org> 2 20
Note: See TracChangeset
for help on using the changeset viewer.