WebCore:
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 May 2004 23:26:30 +0000 (23:26 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 May 2004 23:26:30 +0000 (23:26 +0000)
commitfa58e5badd5f32af13361dde287b84dbd120aa75
treea39294eba6c3338a35ec976accb50eac557b8d1e
parentcc7fed28795bf7c92de699063084ff82f530e314
WebCore:

        Reviewed by Ken.

        - various editing-related improvements

        * khtml/xml/dom_selection.h: Removed UP and DOWN directions, and added PARAGRAPH granularity.
        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::modify): Got rid of the UP and DOWN directions, and made movement
        between lines happen when granularity is LINE. Added a new unimplemented granularity:
        PARAGRAPH.
        (DOM::Selection::validate): Remove some unneeded APPLE_CHANGES. The code need not be ifdef'd.
        (DOM::Selection::debugPosition): Ditto.

        * kwq/WebCoreBridge.h: Removed WebSelectUp and WebSelectDown, and added WebSelectByParagraph.
        Added stringForRange: and selectedDOMRangeWithGranularity:, and renamed replaceSelectionWithNewline
        to insertNewline because it has the insertText: semantic, not the replaceSelectionWithText: one.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge stringForRange:]): Added.
        (-[WebCoreBridge selectedDOMRangeWithGranularity:]): Added.
        (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Updated code to understand
        that vertical movement is based on granularity now, not direction.
        (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:]): Moved an ensureCaretVisible
        from the WebKit down here. I think perhaps this should go down even further in WebCore.
        (-[WebCoreBridge insertNewline]): Renamed, and moved ensureCaretVisible here.
        (-[WebCoreBridge insertText:]): Moved ensureCaretVisible here.
        (-[WebCoreBridge deleteKeyPressed]): Moved ensureCaretVisible here.

        * khtml/xml/dom_position.cpp: Some ifdef tweaks.

        * khtml/misc/helper.cpp: Namespace and formatting tweaks.
        * khtml/misc/helper.h: Removed some unused stuff.

        * khtml/dom/dom2_range.h: Make range constructor public so that anyone with
        a RangeImpl can easily make a Range.

WebKit:

        Reviewed by Ken.

        - various editing-related improvements
        - fixed <rdar://problem/3655366>: (Editing: -selectParagraph: method unimplemented (WebKit editing API))
        - fixed <rdar://problem/3655367>: (Editing: -selectLine: method unimplemented (WebKit editing API))
        - fixed <rdar://problem/3655369>: (Editing: -selectWord: method unimplemented (WebKit editing API))
        - fixed <rdar://problem/3655392>: (Editing: -uppercaseWord: method unimplemented (WebKit editing API))
        - fixed <rdar://problem/3655393>: (Editing: -lowercaseWord: method unimplemented (WebKit editing API))
        - fixed <rdar://problem/3655394>: (Editing: -capitalizeWord: method unimplemented (WebKit editing API))

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _alterCurrentSelection:direction:granularity:]): Removed the call to
        ensureCaretVisible. This is now handled on the other side of the bridge.
        (-[WebHTMLView moveDown:]): Changed to use WebSelectByLine granularity instead of
        WebSelectDown direction.
        (-[WebHTMLView moveDownAndModifySelection:]): Ditto.
        (-[WebHTMLView moveUp:]): Ditto.
        (-[WebHTMLView moveUpAndModifySelection:]): Ditto.
        (-[WebHTMLView _expandSelectionToGranularity:]): Added.
        (-[WebHTMLView selectParagraph:]): Implemented by calling _expandSelectionToGranularity.
        (-[WebHTMLView selectLine:]): Ditto.
        (-[WebHTMLView selectWord:]): Ditto.
        (-[WebHTMLView _fontManagerOperationAsStyle]): Added. Placeholder for the job of figuring
        out what style change to make based on NSFontManager.
        (-[WebHTMLView changeFont:]): Implemented, but not really tested because guts are still
        missing due to lack of above method.
        (-[WebHTMLView insertTab:]): Removed the call to ensureCaretVisible.
        (-[WebHTMLView insertNewline:]): Removed the call to ensureCaretVisible.
        (-[WebHTMLView insertParagraphSeparator:]): Made this insert a newline for now.
        (-[WebHTMLView _changeWordCaseWithSelector:]): Added.
        (-[WebHTMLView uppercaseWord:]): Implemented by calling _changeWordCaseWithSelector.
        (-[WebHTMLView lowercaseWord:]): Ditto.
        (-[WebHTMLView capitalizeWord:]): Ditto.
        (-[WebHTMLView deleteBackward:]): Removed the call to ensureCaretVisible.
        (-[WebHTMLView checkSpelling:]): Put a pile of AppKit code in here as a placeholder.
        (-[WebHTMLView startSpeaking:]): Use the new stringForRange: method instead of outerText.
        That way we can handle cases where the entire document is selected.
        (-[WebHTMLView insertText:]): Removed the call to ensureCaretVisible.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@6731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
WebCore/ChangeLog-2005-08-23
WebCore/khtml/dom/dom2_range.h
WebCore/khtml/editing/SelectionController.cpp
WebCore/khtml/editing/SelectionController.h
WebCore/khtml/editing/selection.cpp
WebCore/khtml/editing/selection.h
WebCore/khtml/misc/helper.cpp
WebCore/khtml/misc/helper.h
WebCore/khtml/xml/dom_position.cpp
WebCore/khtml/xml/dom_selection.cpp
WebCore/khtml/xml/dom_selection.h
WebCore/kwq/WebCoreBridge.h
WebCore/kwq/WebCoreBridge.mm
WebKit/ChangeLog
WebKit/Misc.subproj/WebNSURLExtras.m
WebKit/WebView.subproj/WebHTMLView.m