[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

andreas.kling at nokia.com andreas.kling at nokia.com
Wed Dec 22 16:17:36 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit ace415783410d30a04322de747fc6d141ef97f3a
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Nov 21 06:44:29 2010 +0000

    2010-11-20  Andreas Kling  <kling at webkit.org>
    
            Reviewed by Antonio Gomes.
    
            [Qt] Limit the size of image preview "cursor" when dragging
            https://bugs.webkit.org/show_bug.cgi?id=49872
    
            Respect DragController::maxDragImageSize() (currently 400x400.)
    
            * platform/qt/DragImageQt.cpp:
            (WebCore::dragImageSize):
            (WebCore::scaleDragImage):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72495 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index be7b99c..77bc712 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,19 @@
 
         Reviewed by Antonio Gomes.
 
+        [Qt] Limit the size of image preview "cursor" when dragging
+        https://bugs.webkit.org/show_bug.cgi?id=49872
+
+        Respect DragController::maxDragImageSize() (currently 400x400.)
+
+        * platform/qt/DragImageQt.cpp:
+        (WebCore::dragImageSize):
+        (WebCore::scaleDragImage):
+
+2010-11-20  Andreas Kling  <kling at webkit.org>
+
+        Reviewed by Antonio Gomes.
+
         [Qt] Dragging a selection should use a rendering of the selection as "cursor" for the drag
         https://bugs.webkit.org/show_bug.cgi?id=49870
 
diff --git a/WebCore/platform/qt/DragImageQt.cpp b/WebCore/platform/qt/DragImageQt.cpp
index b153e88..90b1bbc 100644
--- a/WebCore/platform/qt/DragImageQt.cpp
+++ b/WebCore/platform/qt/DragImageQt.cpp
@@ -31,9 +31,12 @@
 
 namespace WebCore {
 
-IntSize dragImageSize(DragImageRef)
+IntSize dragImageSize(DragImageRef image)
 {
-    return IntSize(0, 0);
+    if (!image)
+        return IntSize();
+
+    return image->size();
 }
 
 void deleteDragImage(DragImageRef image)
@@ -41,8 +44,15 @@ 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;
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list