-
ap@apple.com authored
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: http://svn.webkit.org/repository/webkit/trunk@153060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
4da41dc6