Range::BoundingRect() must independent from Selection.
Range::BoundingRect() returns different Rect depending on whether included Text nodes are selected or not. Since Range itself lives independently from user selection, this function also should be away from Selection. The root cause is InlineTextBox::LocalSelectionRect(), which is called by BoundingRect(), depends on SelectionState. LocalSelectionRect() refers current SelectionState so that paint invalidation invalids wrapping line endings. This patch change LocalSelectionRect(start,end) to have another boolean option which decides if we use current SelectionState. (core/layout/*) This patch also fixes InlineTextBox::GetSelectionState() can update SelectionState by calling LayoutSelection::SelectionStartEnd(). Callers of SelectionStartEnd() must know SelectionState but Commit() in SelectionStartEnd() can change the state. (core/editing/LayoutSelection.*) Bug: 739062 Change-Id: I98987940cd014d302c13d1370111a6664740e646 Reviewed-on: https://chromium-review.googlesource.com/567791 Commit-Queue: Yoichi Osato <yoichio@chromium.org> Reviewed-by:Koji Ishii <kojii@chromium.org> Reviewed-by:
Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#486277}
Showing
Please register or sign in to comment