WebCore:
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Nov 2004 17:16:23 +0000 (17:16 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Nov 2004 17:16:23 +0000 (17:16 +0000)
commite074e7bb31b1502968d22fe16d32dbbb3923ff4b
treee15f6c2a485e0ec7babcfdeac4583e08fad43775
parent5895c011cd5cfc2ea674300c3737b1f04b021de2
WebCore:

        Reviewed by Harrison

        Change around the way we block the Javascript "Paste" command identifier from
        being available. Formerly, this was done with an ifdef we never compiled in.
        Now, this is done with a couple of cheap runtime checks. The advantage is that
        we can now compile this command into development builds, and still yet switch
        on the command in deployment builds through the use of WebCore SPI so we can
        write and run layout tests with all of our builds.

        * khtml/editing/jsediting.cpp:
        (DOM::JSEditor::queryCommandSupported): Checks state of paste command in case
        command being queried is the paste command.
        (DOM::JSEditor::setSupportsPasteCommand): New SPI to turn on paste command.
        * khtml/editing/jsediting.h: Ditto.
        * khtml/khtml_part.cpp:
        (KHTMLPart::pasteFromPasteboard): Added.
        (KHTMLPart::canPaste): Added.
        * kwq/KWQKHTMLPart.mm:
        (KHTMLPart::canPaste): Added.
        * kwq/KWQRenderTreeDebug.cpp:
        (externalRepresentation): Turn on paste command.
        * kwq/WebCoreBridge.h: Add canPaste call so WebKit can fill in the answer.

WebKit:

        Reviewed by Harrison

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge canPaste]): Call WebView _canPaste.
        * WebView.subproj/WebView.m:
        (-[WebView _canPaste]): Try to forward to document view's implementation. Only WebHTMLView
        answers right now. Returns NO otherwise.
        * WebView.subproj/WebViewInternal.h: Add _canPaste method to WebView.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog-2005-08-23
WebCore/khtml/editing/jsediting.cpp
WebCore/khtml/editing/jsediting.h
WebCore/khtml/khtml_part.cpp
WebCore/kwq/KWQKHTMLPart.mm
WebCore/kwq/KWQRenderTreeDebug.cpp
WebCore/kwq/WebCoreBridge.h
WebKit/ChangeLog
WebKit/WebCoreSupport.subproj/WebBridge.m
WebKit/WebView.subproj/WebView.m
WebKit/WebView.subproj/WebViewInternal.h