DescriptionEditing: Fix caret blinking after a typing.
FrameCaret::updateAppearance() is called in updateStyleAndLayoutIfNeeded(). So
if shouldStopBlinkingDueToTypingCommand() is true, we repeatedly stop and start
the caret timer.
Because FrameSelection::didSetSelectionDeprecated() calls stopCaretBlinkTimer(),
we always restart the caret timer after every selection change. Checking
shouldStopBlinkingDueToTypingCommand() is unnecessary.
The core part of the CL is just to remove
shouldStopBlinkingDueToTypingCommand(), however this CL adds a lot of code to
make the code testable.
- Add FrameCaret::recreateCaretBlinkTimerForTesting(RefPtr<WebTaskRunner>)
- Add FrameSelection::frameCaretForTesting()
- Add support of delayed task to FakeWebTaskRunner
BUG=692900
Review-Url: https://codereview.chromium.org/2723003002
Cr-Commit-Position: refs/heads/master@{#453858}
Committed: https://chromium.googlesource.com/chromium/src/+/045a3dd143fabf6787774090a255dc0eda649c59
Patch Set 1 #
Total comments: 6
Patch Set 2 : Apply review comments #Messages
Total messages: 18 (13 generated)
|