DescriptionLet FrameSelection::localCaretRect on a text input field avoid synchronous
layout.
We use VisiblePosition canonicalize to know where to draw a caret.
However if selection is on a text input, we need concern just whether the text
input is visible or not.
It means we can change VisiblePosition to PositionWithAffinity.
Source/core/editing/Caret.cpp/h:
- Add a override method of updateCaretRect using PositionWithAffinity.
Source/core/editing/FrameSelection.cpp:
- if selection is on a TextFormControl, use the updateCaretRect function.
Source/core/editing/PositionWithAffinity.h, VisiblePosition.h:
- Move the localCaretRect function to PositionWithAffinity. It uses position and
affinity so moving is straightforward.
Source/core/html/HTMLTextFormControlElementTest.cpp:
- Add a test to confirm FrameSelection::localCaretRect not to cause layout.
BUG=382809
TEST=HTMLTextFormControlElementTest.cpp
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=179133
Patch Set 1 : fix #
Total comments: 12
Patch Set 2 : Move localCaretRect to VisibleUnits #
Total comments: 5
Patch Set 3 : Nits #
Total comments: 1
Messages
Total messages: 13 (0 generated)
|