[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

trey trey at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:45:59 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit ebc032f812a018ec9dfbf172c4b4f286f267713f
Author: trey <trey at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jun 15 06:22:45 2004 +0000

    	Dashboard wants access to pastboard data during the drag gesture.
    
    	We address this need be allowing docs that are local files to access the
    	pasteboard data during a drag, while other pages can only get at the types
    	list until the drop happens.  This is deemed safe because local files already
    	have such broad super powers.
    
            Reviewed by Maciej.
    
            * kwq/KWQKURL.h:
            * kwq/KWQKURL.mm:
            (KURL::isLocalFile):  Implement this QT method to look for the file scheme.
            * kwq/WebCoreBridge.mm:
            (-[WebCoreBridge dragOperationForDraggingInfo:]):  Use more relaxed clipboard
    	security for local file pages.
            (-[WebCoreBridge dragExitedWithDraggingInfo:]):  Ditto.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6840 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index ab3a424..da0ab90 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,22 @@
+2004-06-14  Trey Matteson  <trey at apple.com>
+
+	Dashboard wants access to pastboard data during the drag gesture.
+
+	We address this need be allowing docs that are local files to access the
+	pasteboard data during a drag, while other pages can only get at the types
+	list until the drop happens.  This is deemed safe because local files already
+	have such broad super powers.
+
+        Reviewed by Maciej.
+
+        * kwq/KWQKURL.h:
+        * kwq/KWQKURL.mm:
+        (KURL::isLocalFile):  Implement this QT method to look for the file scheme.
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge dragOperationForDraggingInfo:]):  Use more relaxed clipboard
+	security for local file pages.
+        (-[WebCoreBridge dragExitedWithDraggingInfo:]):  Ditto.
+
 2004-06-14  Darin Adler  <darin at apple.com>
 
         Reviewed by me, code changes by Patrick Beard.
diff --git a/WebCore/kwq/KWQKURL.h b/WebCore/kwq/KWQKURL.h
index cc512cf..d3e4ac5 100644
--- a/WebCore/kwq/KWQKURL.h
+++ b/WebCore/kwq/KWQKURL.h
@@ -87,7 +87,9 @@ public:
     
     NSURL *getNSURL() const;
     NSData *getNSData() const;
-    
+
+    bool isLocalFile() const;
+
     static QString decode_string(const QString &, const QTextCodec * = 0);
     static QString encode_string(const QString &);
     
diff --git a/WebCore/kwq/KWQKURL.mm b/WebCore/kwq/KWQKURL.mm
index 643333e..a793906 100644
--- a/WebCore/kwq/KWQKURL.mm
+++ b/WebCore/kwq/KWQKURL.mm
@@ -976,6 +976,12 @@ QString KURL::decode_string(const QString &urlString, const QTextCodec *codec)
     return result;
 }
 
+bool KURL::isLocalFile() const
+{
+    // FIXME - include feed: here too?
+    return protocol() == "file";
+}
+
 static void appendEscapingBadChars(char*& buffer, const char *strStart, size_t length)
 {
     char *p = buffer;
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index 3b2a785..f4c8354 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -1556,7 +1556,8 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
             // Sending an event can result in the destruction of the view and part.
             v->ref();
             
-            KWQClipboard *clipboard = new KWQClipboard(true, [info draggingPasteboard], KWQClipboard::TypesReadable);
+            KWQClipboard::AccessPolicy policy = _part->baseURL().isLocalFile() ? KWQClipboard::Readable : KWQClipboard::TypesReadable;
+            KWQClipboard *clipboard = new KWQClipboard(true, [info draggingPasteboard], policy);
             clipboard->ref();
             NSDragOperation srcOp = [info draggingSourceOperationMask];
             clipboard->setSourceOperation(srcOp);
@@ -1599,7 +1600,8 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
             // Sending an event can result in the destruction of the view and part.
             v->ref();
 
-            KWQClipboard *clipboard = new KWQClipboard(true, [info draggingPasteboard], KWQClipboard::TypesReadable);
+            KWQClipboard::AccessPolicy policy = _part->baseURL().isLocalFile() ? KWQClipboard::Readable : KWQClipboard::TypesReadable;
+            KWQClipboard *clipboard = new KWQClipboard(true, [info draggingPasteboard], policy);
             clipboard->ref();
             
             v->cancelDragAndDrop(QPoint([info draggingLocation]), clipboard);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list