Merge LocalCaretRect's line end hack into ComputeInlineBoxPosition()
As a half-baked utility function, ComputeInlineBoxPosition() used to return null for positions after linebreak. Some callers have ad hoc hacks to fix up such null returns. r547639 added such a fixup in LocalCaretRectOfPosition(). This patch merges the fixup into ComputeInlineBoxPosition(), since LocalCaretRectOfPosition() is supposed to be a wrapper of CIBP(). For changes in SelectionModifierCharacter: the class has code handling positions after linebreaks, but misses the case of '\n' in 'white-space: pre' style, and handles the case by other fixup path. With the merge, we no longer hit the fixup path, and have to fix the linebreak handling in it. Bug: 812535 Change-Id: I9308dcd2bd911b63b0d2268a2db7a0cb94e63d4c Reviewed-on: https://chromium-review.googlesource.com/1014606 Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Reviewed-by:Yoichi Osato <yoichio@chromium.org> Reviewed-by:
Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#551408}
Showing
Please register or sign in to comment