WebCore:
authorcblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 May 2004 21:55:47 +0000 (21:55 +0000)
committercblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 May 2004 21:55:47 +0000 (21:55 +0000)
commit8f79351aaa3e9885c7e8a95f6149557359964e60
treef2baa7a080027a86dcf20f10e9daac0a7fdac6a2
parent1d0b6b7e35309a6645c93153845886003c980a79
WebCore:

Improved editing via drag.

        Reviewed by kocienda.

        * khtml/editing/htmlediting.cpp: Renamed PasteMarkupCommand to ReplaceSelectionCommand
        (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand):
        (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand):
        (khtml::ReplaceSelectionCommand::impl):
        (khtml::MoveSelectionCommand::MoveSelectionCommand):
        (khtml::MoveSelectionCommand::~MoveSelectionCommand):
        (khtml::MoveSelectionCommand::impl):
        * khtml/editing/htmlediting.h:
        (khtml::):
        * khtml/editing/htmlediting_impl.cpp:
        (khtml::ReplaceSelectionCommandImpl::ReplaceSelectionCommandImpl):
        (khtml::ReplaceSelectionCommandImpl::~ReplaceSelectionCommandImpl):
        (khtml::ReplaceSelectionCommandImpl::commandID):
        (khtml::ReplaceSelectionCommandImpl::doApply):
        (khtml::MoveSelectionCommandImpl::MoveSelectionCommandImpl): new command
        (khtml::MoveSelectionCommandImpl::~MoveSelectionCommandImpl):
        (khtml::MoveSelectionCommandImpl::commandID):
        (khtml::MoveSelectionCommandImpl::doApply):
        * khtml/editing/htmlediting_impl.h:
        * khtml/khtml_part.cpp:
        (KHTMLPart::dragCaret): new
        (KHTMLPart::setDragCaret): new
        (KHTMLPart::notifyDragCaretChanged): new
        (KHTMLPart::paintDragCaret): new
        * khtml/khtml_part.h:
        * khtml/khtmlpart_p.h:
        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::paintObject): paint the drag caret
        * kwq/DOM.mm:
        (+[DOMDocumentFragment _documentFragmentWithImpl:]): made internally available
        (-[DOMDocumentFragment _fragmentImpl]):
        * kwq/DOMInternal.h:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge documentFragmentWithMarkupString:baseURLString:]): new
        (-[WebCoreBridge documentFragmentWithText:]): new
        (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:]): new
        (-[WebCoreBridge replaceSelectionWithNode:selectReplacement:]): renamed to take the selectReplacement BOOL
        (-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:selectReplacement:]): ditto
        (-[WebCoreBridge replaceSelectionWithText:selectReplacement:]): ditto
        (-[WebCoreBridge replaceSelectionWithNewline]): moved
        (-[WebCoreBridge setSelectionToDragCaret]): new
        (-[WebCoreBridge moveSelectionToDragCaret:]): new
        (-[WebCoreBridge moveDragCaretToPoint:]): set the drag caret, not the selection
        (-[WebCoreBridge removeDragCaret]): new

WebKit:

Improved editing via drag

        Reviewed by kocienda.

        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _documentFragmentWithImageResource:]): made this method return a fragment instead of replace the selection so that the caller do other things with the fragment
        (-[WebDataSource _documentFragmentWithArchive:]): ditto
        (-[WebDataSource _replaceSelectionWithArchive:selectReplacement:]): call renamed methods
        * WebView.subproj/WebDataSourcePrivate.h:
        * WebView.subproj/WebDocumentInternal.h:
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _documentFragmentFromPasteboard:]): made this method return a fragment instead of replace the selection so that the caller do other things with the fragment
        (-[WebHTMLView _replaceSelectionWithPasteboard:selectReplacement:]): new
        (-[WebHTMLView paste:]): call _replaceSelectionWithPasteboard:selectReplacement:
        (-[WebHTMLView dragOperationForDraggingInfo:]): handle the case where the destination is editable, but the source is not
        (-[WebHTMLView draggingCancelledWithDraggingInfo:]): new, removes drag caret
        (-[WebHTMLView draggingUpdatedWithDraggingInfo:]): remove drag caret when we can't handle the drag
        (-[WebHTMLView concludeDragForDraggingInfo:]): instead of calling paste, move the selection when doing a move and replace the drag caret when doing a copy
        * WebView.subproj/WebHTMLViewPrivate.h:
        * WebView.subproj/WebView.m:
        (-[WebViewPrivate dealloc]):
        (-[WebView _setDraggingDocumentView:]): new
        (-[WebView _dragOperationForDraggingInfo:]): if the current dragging document view changes, tell the previous dragging document view that dragging cancelled
        (-[WebView draggingExited:]): new, tell the previous dragging document view that dragging cancelled
        (-[WebView concludeDragOperation:]): release the dragging document view
        (-[WebView replaceSelectionWithNode:]): pass the selectReplacement BOOL to the bridge
        (-[WebView replaceSelectionWithText:]): ditto
        (-[WebView replaceSelectionWithMarkupString:]): ditto
        (-[WebView replaceSelectionWithArchive:]): ditto
        (-[WebView pasteAsPlainText:]): ditto
        (-[WebView insertTab:]): ditto
        (-[WebView insertText:]): ditto
        * WebView.subproj/WebViewPrivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6675 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
WebCore/ChangeLog-2005-08-23
WebCore/khtml/editing/htmlediting.cpp
WebCore/khtml/editing/htmlediting.h
WebCore/khtml/editing/htmlediting_impl.cpp
WebCore/khtml/editing/htmlediting_impl.h
WebCore/khtml/khtml_part.cpp
WebCore/khtml/khtml_part.h
WebCore/khtml/khtmlpart_p.h
WebCore/khtml/rendering/render_block.cpp
WebCore/kwq/DOM.mm
WebCore/kwq/DOMInternal.h
WebCore/kwq/WebCoreBridge.h
WebCore/kwq/WebCoreBridge.mm
WebKit/ChangeLog
WebKit/WebView.subproj/WebDataSource.m
WebKit/WebView.subproj/WebDataSourcePrivate.h
WebKit/WebView.subproj/WebDocumentInternal.h
WebKit/WebView.subproj/WebHTMLView.m
WebKit/WebView.subproj/WebHTMLViewPrivate.h
WebKit/WebView.subproj/WebView.m
WebKit/WebView.subproj/WebViewPrivate.h