WebCore:
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Sep 2004 14:16:36 +0000 (14:16 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Sep 2004 14:16:36 +0000 (14:16 +0000)
commit21794f0dab63e3041cbd4cc97c2ba05c8aefb7d5
tree5b4170b642e172bd8e4827d3aafa29b15c144933
parent2bfb49e0a5e7800fddeda847e161570a87363322
WebCore:

        Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3818296> REGRESSION (Mail): centerSelectionInVisibleArea does not work correctly

        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::centerSelectionInVisibleArea): New function. Handles both caret
        and range selections correctly.
        * kwq/KWQNSViewExtras.h: Add forceCentering boolean to some methods in this file.
        * kwq/KWQNSViewExtras.m: Ditto. This addition has been done since the AppKit
        method we use to do the centering, -[NSView scrollRectToVisible:],  does not alter
        the view if the rectangle passed to it is already in view. When forceCentering is
        true, extra math is done to make scrollRectToVisible center the rectangle we want.
        (-[NSView _KWQ_scrollFrameToVisible]): Pass NO for forceCentering in call through to
        _KWQ_scrollRectToVisible:forceCentering:
        (-[NSView _KWQ_scrollRectToVisible:forceCentering:]): Add forceCentering argument.
        (-[NSView _KWQ_scrollRectToVisible:inView:forceCentering:]): Ditto.
        (-[NSClipView _KWQ_scrollRectToVisible:inView:forceCentering:]): Ditto. Do extra
        math to implement the forceCentering effect.
        * kwq/KWQScrollView.h: Add forceCentering default argument to ensureRectVisibleCentered.
        * kwq/KWQScrollView.mm:
        (QScrollView::ensureRectVisibleCentered): Ditto.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge centerSelectionInVisibleArea]): New function. Call through to KWQKHTMLPart.

WebKit:

        Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3818296> REGRESSION (Mail): centerSelectionInVisibleArea does not work correctly

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView centerSelectionInVisibleArea:]): Now calls new centerSelectionInVisibleArea
        bridge function instead of ensureCaretVisible. Now handles caret selections and range
        selections correctly.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7720 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog-2005-08-23
WebCore/kwq/KWQKHTMLPart.h
WebCore/kwq/KWQKHTMLPart.mm
WebCore/kwq/KWQNSViewExtras.h
WebCore/kwq/KWQNSViewExtras.m
WebCore/kwq/KWQScrollView.h
WebCore/kwq/KWQScrollView.mm
WebCore/kwq/WebCoreBridge.h
WebCore/kwq/WebCoreBridge.mm
WebKit/ChangeLog
WebKit/WebView.subproj/WebHTMLView.m