[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
mrobinson at webkit.org
mrobinson at webkit.org
Wed Dec 22 11:46:49 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 790253634197bdadd5aa5064d8bb22456183e526
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Aug 6 15:59:55 2010 +0000
2010-08-06 Martin Robinson <mrobinson at igalia.com>
Reviewed by Gustavo Noronha Silva.
[GTK] Support for image drags
https://bugs.webkit.org/show_bug.cgi?id=40788
Unskip and add baselines for tests that are now passing with image drag support.
* platform/gtk/Skipped:
* platform/gtk/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.txt: Added.
* platform/gtk/editing/pasteboard/drag-selected-image-to-contenteditable-expected.txt: Added.
* platform/gtk/editing/selection/drag-to-contenteditable-iframe-expected.txt: Added.
* platform/gtk/fast/events/standalone-image-drag-to-editable-expected.txt: Added.
2010-08-06 Martin Robinson <mrobinson at igalia.com>
Reviewed by Gustavo Noronha Silva.
[GTK] Support for image drags
https://bugs.webkit.org/show_bug.cgi?id=40788
Add image drag-and-drop support for WebKit GTK+.
* platform/gtk/ClipboardGtk.cpp:
(WebCore::ClipboardGtk::setDragImage): Filled this stub.
(WebCore::ClipboardGtk::setDragImageElement): Filled this stub.
(WebCore::ClipboardGtk::createDragImage): Filled this stub.
(WebCore::ClipboardGtk::declareAndWriteDragImage): Write the image URL, markup, and image itself to the data object member.
* platform/gtk/ClipboardGtk.h: Brought method declarations into line with the parent class.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64852 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 384cdcb..16f57c0 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-08-06 Martin Robinson <mrobinson at igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] Support for image drags
+ https://bugs.webkit.org/show_bug.cgi?id=40788
+
+ Unskip and add baselines for tests that are now passing with image drag support.
+
+ * platform/gtk/Skipped:
+ * platform/gtk/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.txt: Added.
+ * platform/gtk/editing/pasteboard/drag-selected-image-to-contenteditable-expected.txt: Added.
+ * platform/gtk/editing/selection/drag-to-contenteditable-iframe-expected.txt: Added.
+ * platform/gtk/fast/events/standalone-image-drag-to-editable-expected.txt: Added.
+
2010-08-06 Nikolas Zimmermann <nzimmermann at rim.com>
Not reviewed. Rebaseline win specific getComputedStyle* results, after r64832.
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index dfaf827..e6498ee 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -5827,13 +5827,7 @@ fast/events/prevent-drag-to-navigate.html
fast/dom/Window/window-postmessage-clone.html
http/tests/security/clipboard/clipboard-file-access.html
-# Tests that fail because image dragging does not yet work
-editing/pasteboard/drag-image-in-about-blank-frame.html
-editing/pasteboard/drag-image-to-contenteditable-in-iframe.html
-editing/pasteboard/drag-selected-image-to-contenteditable.html
-editing/selection/drag-to-contenteditable-iframe.html
-fast/events/standalone-image-drag-to-editable.html
-editing/pasteboard/drag-drop-iframe-refresh-crash.html
+# Still failing, looks like a bug in the EventSender drag-and-drop
fast/css/user-drag-none.html
# Tests that fail because they assume a certain number of mouse
diff --git a/LayoutTests/platform/gtk/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.txt b/LayoutTests/platform/gtk/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.txt
new file mode 100644
index 0000000..78a932b
--- /dev/null
+++ b/LayoutTests/platform/gtk/editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.txt
@@ -0,0 +1,23 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x576
+ RenderBlock {P} at (0,0) size 784x40
+ RenderText {#text} at (0,0) size 744x40
+ text run at (0,0) width 744: "This tests that we can drag an image into the last position of a content editable div in an iframe that already contains an"
+ text run at (0,20) width 155: "image, without crashing."
+ RenderBlock (anonymous) at (0,56) size 784x159
+ RenderImage {IMG} at (0,51) size 76x103
+ RenderText {#text} at (76,139) size 4x20
+ text run at (76,139) width 4: " "
+ RenderPartObject {IFRAME} at (80,0) size 304x154 [border: (2px inset #000000)]
+ layer at (0,0) size 300x150
+ RenderView at (0,0) size 300x150
+ layer at (0,0) size 300x150
+ RenderBlock {HTML} at (0,0) size 300x150
+ RenderBody {BODY} at (8,8) size 284x134
+ RenderBlock {DIV} at (0,0) size 271x129 [border: (1px solid #000000)]
+ RenderImage {IMG} at (1,1) size 20x20
+ RenderText {#text} at (0,0) size 0x0
+ RenderBlock {UL} at (0,231) size 784x0
diff --git a/LayoutTests/platform/gtk/editing/pasteboard/drag-selected-image-to-contenteditable-expected.txt b/LayoutTests/platform/gtk/editing/pasteboard/drag-selected-image-to-contenteditable-expected.txt
new file mode 100644
index 0000000..2fdc758
--- /dev/null
+++ b/LayoutTests/platform/gtk/editing/pasteboard/drag-selected-image-to-contenteditable-expected.txt
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (0,0) size 800x584
+ RenderBlock {DIV} at (0,0) size 302x122 [border: (1px solid #000000)]
+ RenderImage {IMG} at (1,1) size 76x103
+ RenderBlock (anonymous) at (0,122) size 800x103
+ RenderImage {IMG} at (0,0) size 76x103
+ RenderText {#text} at (0,0) size 0x0
+ RenderBlock {UL} at (0,241) size 800x20
+ RenderListItem {LI} at (40,0) size 760x20
+ RenderListMarker at (-18,0) size 7x20: bullet
+ RenderText {#text} at (0,0) size 409x20
+ text run at (0,0) width 409: "Abe should appear twice, once inside the div and once outside it."
+selection start: position 0 of child 0 {IMG} of child 1 {DIV} of body
+selection end: position 1 of child 0 {IMG} of child 1 {DIV} of body
diff --git a/LayoutTests/platform/gtk/editing/selection/drag-to-contenteditable-iframe-expected.txt b/LayoutTests/platform/gtk/editing/selection/drag-to-contenteditable-iframe-expected.txt
new file mode 100644
index 0000000..d10bbb8
--- /dev/null
+++ b/LayoutTests/platform/gtk/editing/selection/drag-to-contenteditable-iframe-expected.txt
@@ -0,0 +1,21 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (0,0) size 800x584
+ RenderBlock (anonymous) at (0,0) size 800x213
+ RenderPartObject {IFRAME} at (0,0) size 208x208 [border: (4px solid #000000)]
+ layer at (0,0) size 200x200
+ RenderView at (0,0) size 200x200
+ layer at (0,0) size 200x200
+ RenderBlock {HTML} at (0,0) size 200x200
+ RenderBody {BODY} at (8,8) size 184x184 [bgcolor=#FFFFE0]
+ RenderText {#text} at (208,193) size 4x20
+ text run at (208,193) width 4: " "
+ RenderImage {IMG} at (212,105) size 76x103
+ RenderText {#text} at (0,0) size 0x0
+ RenderBlock {UL} at (0,229) size 800x20
+ RenderListItem {LI} at (40,0) size 760x20
+ RenderListMarker at (-18,0) size 7x20: bullet
+ RenderText {#text} at (0,0) size 288x20
+ text run at (0,0) width 288: "Abe should be outside the frame and inside it."
diff --git a/LayoutTests/platform/gtk/fast/events/standalone-image-drag-to-editable-expected.txt b/LayoutTests/platform/gtk/fast/events/standalone-image-drag-to-editable-expected.txt
new file mode 100644
index 0000000..2564f4b
--- /dev/null
+++ b/LayoutTests/platform/gtk/fast/events/standalone-image-drag-to-editable-expected.txt
@@ -0,0 +1,26 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderFrameSet {FRAMESET} at (0,0) size 800x600
+ RenderFrame {FRAME} at (0,0) size 800x100
+ layer at (0,0) size 786x102
+ RenderView at (0,0) size 786x100
+ layer at (0,0) size 786x102
+ RenderBlock {HTML} at (0,0) size 786x102
+ RenderBody {BODY} at (0,0) size 786x102
+ RenderBlock {DIV} at (0,0) size 786x102 [border: (1px solid #000000)]
+ RenderText {#text} at (1,1) size 689x20
+ text run at (1,1) width 689: "This layout test is checks that we don't crash when a stand alone image is dragged into a content editable div. "
+ RenderBR {BR} at (690,16) size 0x0
+ RenderInline {A} at (0,0) size 149x20 [color=#0000EE]
+ RenderText {#text} at (1,31) size 149x20
+ text run at (1,31) width 149: "rdar://problem/5021127"
+ RenderImage {IMG} at (150,21) size 25x25
+ RenderFrame {FRAME} at (0,106) size 800x100
+ layer at (0,0) size 800x100
+ RenderView at (0,0) size 800x100
+ layer at (0,0) size 800x100
+ RenderBlock {HTML} at (0,0) size 800x100
+ RenderBody {BODY} at (0,0) size 800x100
+ RenderImage {IMG} at (0,0) size 25x25
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 07ae173..65d9731 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-08-06 Martin Robinson <mrobinson at igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] Support for image drags
+ https://bugs.webkit.org/show_bug.cgi?id=40788
+
+ Add image drag-and-drop support for WebKit GTK+.
+
+ * platform/gtk/ClipboardGtk.cpp:
+ (WebCore::ClipboardGtk::setDragImage): Filled this stub.
+ (WebCore::ClipboardGtk::setDragImageElement): Filled this stub.
+ (WebCore::ClipboardGtk::createDragImage): Filled this stub.
+ (WebCore::ClipboardGtk::declareAndWriteDragImage): Write the image URL, markup, and image itself to the data object member.
+ * platform/gtk/ClipboardGtk.h: Brought method declarations into line with the parent class.
+
2010-08-06 Yury Semikhatsky <yurys at chromium.org>
Reviewed by Pavel Feldman.
diff --git a/WebCore/platform/gtk/ClipboardGtk.cpp b/WebCore/platform/gtk/ClipboardGtk.cpp
index c08b03f..7003cf0 100644
--- a/WebCore/platform/gtk/ClipboardGtk.cpp
+++ b/WebCore/platform/gtk/ClipboardGtk.cpp
@@ -23,6 +23,7 @@
#include "Element.h"
#include "FileList.h"
#include "Frame.h"
+#include "HTMLNames.h"
#include "Image.h"
#include "NotImplemented.h"
#include "Pasteboard.h"
@@ -271,38 +272,38 @@ PassRefPtr<FileList> ClipboardGtk::files() const
return fileList.release();
}
-IntPoint ClipboardGtk::dragLocation() const
+void ClipboardGtk::setDragImage(CachedImage* image, const IntPoint& location)
{
- notImplemented();
- return IntPoint(0, 0);
+ setDragImage(image, 0, location);
}
-CachedImage* ClipboardGtk::dragImage() const
+void ClipboardGtk::setDragImageElement(Node* element, const IntPoint& location)
{
- notImplemented();
- return 0;
+ setDragImage(0, element, location);
}
-void ClipboardGtk::setDragImage(CachedImage*, const IntPoint&)
+void ClipboardGtk::setDragImage(CachedImage* image, Node* element, const IntPoint& location)
{
- notImplemented();
-}
+ if (policy() != ClipboardImageWritable && policy() != ClipboardWritable)
+ return;
-Node* ClipboardGtk::dragImageElement()
-{
- notImplemented();
- return 0;
-}
+ if (m_dragImage)
+ m_dragImage->removeClient(this);
+ m_dragImage = image;
+ if (m_dragImage)
+ m_dragImage->addClient(this);
-void ClipboardGtk::setDragImageElement(Node*, const IntPoint&)
-{
- notImplemented();
+ m_dragLoc = location;
+ m_dragImageElement = element;
}
-DragImageRef ClipboardGtk::createDragImage(IntPoint&) const
+DragImageRef ClipboardGtk::createDragImage(IntPoint& location) const
{
- notImplemented();
- return 0;
+ location = m_dragLoc;
+ if (!m_dragImage)
+ return 0;
+
+ return createDragImageFromImage(m_dragImage->image());
}
static CachedImage* getCachedImage(Element* element)
@@ -320,23 +321,20 @@ static CachedImage* getCachedImage(Element* element)
return 0;
}
-void ClipboardGtk::declareAndWriteDragImage(Element* element, const KURL& url, const String& label, Frame*)
+void ClipboardGtk::declareAndWriteDragImage(Element* element, const KURL& url, const String& label, Frame* frame)
{
- CachedImage* cachedImage = getCachedImage(element);
- if (!cachedImage || !cachedImage->isLoaded())
+ m_dataObject->setURL(url, label);
+ m_dataObject->setMarkup(createMarkup(element, IncludeNode, 0, AbsoluteURLs));
+
+ CachedImage* image = getCachedImage(element);
+ if (!image || !image->isLoaded())
return;
- GdkPixbuf* pixbuf = cachedImage->image()->getGdkPixbuf();
+ GRefPtr<GdkPixbuf> pixbuf = adoptGRef(image->image()->getGdkPixbuf());
if (!pixbuf)
return;
- GtkClipboard* imageClipboard = gtk_clipboard_get(gdk_atom_intern_static_string("WebKitClipboardImage"));
- gtk_clipboard_clear(imageClipboard);
-
- gtk_clipboard_set_image(imageClipboard, pixbuf);
- g_object_unref(pixbuf);
-
- writeURL(url, label, 0);
+ m_dataObject->setImage(pixbuf.get());
}
void ClipboardGtk::writeURL(const KURL& url, const String& label, Frame*)
diff --git a/WebCore/platform/gtk/ClipboardGtk.h b/WebCore/platform/gtk/ClipboardGtk.h
index 5b42ac6..8b8ee38 100644
--- a/WebCore/platform/gtk/ClipboardGtk.h
+++ b/WebCore/platform/gtk/ClipboardGtk.h
@@ -27,6 +27,7 @@
#ifndef ClipboardGtk_h
#define ClipboardGtk_h
+#include "CachedResourceClient.h"
#include "Clipboard.h"
#include "DataObjectGtk.h"
@@ -39,7 +40,7 @@ namespace WebCore {
// State available during IE's events for drag and drop and copy/paste
// Created from the EventHandlerGtk to be used by the dom
- class ClipboardGtk : public Clipboard {
+ class ClipboardGtk : public Clipboard, public CachedResourceClient {
public:
static PassRefPtr<ClipboardGtk> create(ClipboardAccessPolicy policy, GtkClipboard* clipboard, bool isForDragging, Frame* frame)
{
@@ -60,14 +61,14 @@ namespace WebCore {
virtual HashSet<String> types() const;
virtual PassRefPtr<FileList> files() const;
- IntPoint dragLocation() const;
- CachedImage* dragImage() const;
void setDragImage(CachedImage*, const IntPoint&);
- Node* dragImageElement();
void setDragImageElement(Node*, const IntPoint&);
+ void setDragImage(CachedImage*, Node*, const IntPoint&);
virtual DragImageRef createDragImage(IntPoint&) const;
+#if ENABLE(DRAG_SUPPORT)
virtual void declareAndWriteDragImage(Element*, const KURL&, const String&, Frame*);
+#endif
virtual void writeURL(const KURL&, const String&, Frame*);
virtual void writeRange(Range*, Frame*);
virtual void writePlainText(const String&);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list