WebCore:
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Apr 2006 04:51:48 +0000 (04:51 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Apr 2006 04:51:48 +0000 (04:51 +0000)
commitf7661d634bf6bf43569491592bfaca52dcc03b71
tree07fd859baecede43eb0f46fcd47af9e97b0864ab
parentd5845f2f4b3ec15ff97bf5e73bb5c08d2a1d8918
WebCore:

        Reviewed by Darin.

        WebCore part of:
        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8276
          REGRESSION (NativeTextField): Pasting a Finder item into a text field results in
            a file: URL being pasted instead of just the file name
        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8283
          REGRESSION: File's path doesn't appear after dragging file into input field

        * bridge/mac/WebCoreFrameBridge.h:
        * bridge/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge isDragCaretRichlyEditable]): Added.
        * manual-tests/plain-text-paste.html: Added.
        * manual-tests/resources/plain-text-paste: Added.
        * manual-tests/resources/plain-text-paste/1.textClipping: Added.
        * manual-tests/resources/plain-text-paste/2.textClipping: Added.
        * manual-tests/resources/plain-text-paste/3.gif: Added.
        * manual-tests/resources/plain-text-paste/4.txt: Added.
        * manual-tests/resources/plain-text-paste/5.webloc: Added.

WebKit:

        Reviewed by Darin.

        WebKit part of:
        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8276
          REGRESSION (NativeTextField): Pasting a Finder item into a text field results in
            a file: URL being pasted instead of just the file name
        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8283
          REGRESSION: File's path doesn't appear after dragging file into input field

        * WebView/WebHTMLView.m:
        (-[WebHTMLView _plainTextFromPasteboard:]): Added method that tries to copy AppKit
        text fields' logic for extracting plain text from the pasteboard.
        (-[WebHTMLView _pasteAsPlainTextWithPasteboard:]): Added helper method.
        (-[WebHTMLView _shouldInsertText:replacingDOMRange:givenAction:]):
        (-[WebHTMLView _shouldReplaceSelectionWithText:givenAction:]):
        (-[WebHTMLView readSelectionFromPasteboard:]): Paste as plain text if
        rich text is not allowed.
        (-[WebHTMLView validateUserInterfaceItem:]): Changed to not allow pasteAsRichText:
        if the paste is not going to be handled by the DOM and the selection
        does not allow pasting rich text.
        (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): Paste as plain text if
        rich text is not allowed.
        (-[WebHTMLView paste:]): Ditto.
        (-[WebHTMLView pasteAsPlainText:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13990 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/bridge/mac/WebCoreFrameBridge.h
WebCore/bridge/mac/WebCoreFrameBridge.mm
WebCore/manual-tests/plain-text-paste.html [new file with mode: 0644]
WebCore/manual-tests/resources/plain-text-paste/1.textClipping [new file with mode: 0644]
WebCore/manual-tests/resources/plain-text-paste/2.textClipping [new file with mode: 0644]
WebCore/manual-tests/resources/plain-text-paste/3.gif [new file with mode: 0644]
WebCore/manual-tests/resources/plain-text-paste/4.txt [new file with mode: 0644]
WebCore/manual-tests/resources/plain-text-paste/5.webloc [new file with mode: 0644]
WebKit/ChangeLog
WebKit/WebView/WebHTMLView.m