Refactor Renderedposition::ComputeCompositedSelection using LocalCaretRect
This patch refactors the function replacing LayoutObject::LocalCaretRect(InlineBox, int offset) with LocalCaretRectOfPosition(PositionWithAffinity) for NG. Since RenderedPosition stores a InlineBox and computes LayoutRect in its instance functions, this patch makes the functions static and receive LocalCaretRect. As a result, this patch makes ComputeCompositedSelection independent from RenderedPosition class. This patch also remove GetSamplePointForVisibility test because it is now local function only used by IsVisible which is test inside ComputeCompositedSelection test; Note: CompositedSelectionBoundsTest also tests ComputeCompositedSelection Bug: 789870 Change-Id: If955d56deac1477e65d71523fb628d75b421b2ab Reviewed-on: https://chromium-review.googlesource.com/875842Reviewed-by:Xiaocheng Hu <xiaochengh@chromium.org> Commit-Queue: Yoichi Osato <yoichio@chromium.org> Cr-Commit-Position: refs/heads/master@{#531788}
Showing
Please register or sign in to comment