summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/qt
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/qt')
-rw-r--r--WebCore/platform/qt/DragImageQt.cpp26
-rw-r--r--WebCore/platform/qt/PasteboardQt.cpp2
-rw-r--r--WebCore/platform/qt/ScrollViewQt.cpp8
3 files changed, 22 insertions, 14 deletions
diff --git a/WebCore/platform/qt/DragImageQt.cpp b/WebCore/platform/qt/DragImageQt.cpp
index 3a077e1..90b1bbc 100644
--- a/WebCore/platform/qt/DragImageQt.cpp
+++ b/WebCore/platform/qt/DragImageQt.cpp
@@ -31,17 +31,28 @@
namespace WebCore {
-IntSize dragImageSize(DragImageRef)
+IntSize dragImageSize(DragImageRef image)
{
- return IntSize(0, 0);
+ if (!image)
+ return IntSize();
+
+ return image->size();
}
-void deleteDragImage(DragImageRef)
+void deleteDragImage(DragImageRef image)
{
+ delete image;
}
-DragImageRef scaleDragImage(DragImageRef image, FloatSize)
+DragImageRef scaleDragImage(DragImageRef image, FloatSize scale)
{
+ if (!image)
+ return 0;
+
+ int scaledWidth = image->width() * scale.width();
+ int scaledHeight = image->height() * scale.height();
+
+ *image = image->scaled(scaledWidth, scaledHeight);
return image;
}
@@ -50,9 +61,12 @@ DragImageRef dissolveDragImageToFraction(DragImageRef image, float)
return image;
}
-DragImageRef createDragImageFromImage(Image*)
+DragImageRef createDragImageFromImage(Image* image)
{
- return 0;
+ if (!image)
+ return 0;
+
+ return new QPixmap(*image->nativeImageForCurrentFrame());
}
DragImageRef createDragImageIconForCachedImage(CachedImage*)
diff --git a/WebCore/platform/qt/PasteboardQt.cpp b/WebCore/platform/qt/PasteboardQt.cpp
index ac54fdb..b98e84e 100644
--- a/WebCore/platform/qt/PasteboardQt.cpp
+++ b/WebCore/platform/qt/PasteboardQt.cpp
@@ -77,8 +77,10 @@ void Pasteboard::writeSelection(Range* selectedRange, bool canSmartCopyOrDelete,
bool Pasteboard::canSmartReplace()
{
+#ifndef QT_NO_CLIPBOARD
if (QApplication::clipboard()->mimeData()->hasFormat((QLatin1String("application/vnd.qtwebkit.smartpaste"))))
return true;
+#endif
return false;
}
diff --git a/WebCore/platform/qt/ScrollViewQt.cpp b/WebCore/platform/qt/ScrollViewQt.cpp
index 17ad253..8fdfd29 100644
--- a/WebCore/platform/qt/ScrollViewQt.cpp
+++ b/WebCore/platform/qt/ScrollViewQt.cpp
@@ -34,14 +34,6 @@
namespace WebCore {
-void ScrollView::platformInit()
-{
-}
-
-void ScrollView::platformDestroy()
-{
-}
-
void ScrollView::platformAddChild(Widget*)
{
}