Dictionary hotkey does not work on vertical text
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jul 2013 19:09:39 +0000 (19:09 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jul 2013 19:09:39 +0000 (19:09 +0000)
commit98d75d7a06a61a4e4a0a0250a6f3f4d055dc1a30
tree4a20255fef96e07f9843808b82839d9eb4db88bf
parentcf868870f50d0afec9c519198b3a32a61aebd136
    Dictionary hotkey does not work on vertical text
        https://bugs.webkit.org/show_bug.cgi?id=118993
        <rdar://problem/14478260>

        Reviewed by Enrica Casucci.

        Test: platform/mac/editing/input/firstrectforcharacterrange-vertical.html

        * editing/Editor.cpp:
        (WebCore::collapseCaretWidth): A helper function.
        (WebCore::Editor::firstRectForRange): Many changes:
        - use RenderObject::absoluteBoundingBoxRectForRange() in regular case, because
        that's more direct that getting caret rects and computing bounding rect from those.
        - handle collapsed ranges separately, because absoluteBoundingBoxRectForRange()
        doesn't provide the needed result, and because it can be done faster.
        - wherever we use carets to compute the result, account for vertical text (in a hackish
        way, as we don't have layout information at Editor level).

        * rendering/RenderBlock.cpp: (WebCore::RenderBlock::localCaretRect): Removed
        dead code.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/editing/input/caret-primary-bidi-expected.txt
LayoutTests/platform/mac/editing/input/firstrectforcharacterrange-vertical-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/editing/input/firstrectforcharacterrange-vertical.html [new file with mode: 0644]
LayoutTests/platform/wk2/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/editing/Editor.cpp
Source/WebCore/rendering/RenderBlock.cpp