WebCore:
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Jan 2009 18:23:37 +0000 (18:23 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Jan 2009 18:23:37 +0000 (18:23 +0000)
commit58ac81ba6c667c4b1a39473322eb1c722fdd7482
treeb146d8e79cd5616269f9765de69f4eebd7bdeae1
parent795e569df33cc68b47dd6ea7b1c3a13f2c7e699c
WebCore:

2009-01-14  Nigel Tao  <nigel.tao.gnome@gmail.com>

        Reviewed by Darin Adler.

        - fix https://bugs.webkit.org/show_bug.cgi?id=22476
        Check that the document's SecurityOrigin canLoadLocalResources,
        when pages try to put NSFilenamesPboardtype data on the clipboard,
        by calling event.dataTransfer.setData('URL', 'file:///foo/bar');

        Tests: http/tests/security/dataTransfer-set-data-file-url.html
               platform/mac/editing/pasteboard/dataTransfer-set-data-file-url.html

        * platform/mac/ClipboardMac.mm:
        (WebCore::ClipboardMac::setData):

LayoutTests:

2009-01-14  Nigel Tao  <nigel.tao.gnome@gmail.com>

        Reviewed by Darin Adler.

        - tests for https://bugs.webkit.org/show_bug.cgi?id=22476
        Added tests that calling dataTransfer.setData('URL', aFileUrl)
        only puts NSFilenamesPboardtype data on the clipboard if called
        from a locally served page.

        * http/tests/security/dataTransfer-set-data-file-url-expected.txt: Added.
        * http/tests/security/dataTransfer-set-data-file-url.html: Added.
        * platform/mac/editing/pasteboard/dataTransfer-set-data-file-url-expected.txt: Added.
        * platform/mac/editing/pasteboard/dataTransfer-set-data-file-url.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/security/dataTransfer-set-data-file-url-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/security/dataTransfer-set-data-file-url.html [new file with mode: 0644]
LayoutTests/platform/mac/editing/pasteboard/dataTransfer-set-data-file-url-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/editing/pasteboard/dataTransfer-set-data-file-url.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/platform/mac/ClipboardMac.mm