Chromium Code Reviews
DescriptionFix caret paint invalidation when moving between blocks
Previously when caret is moved between blocks, the code only worked
if the source block was visited before the target block during paint
invalidation. If the target block was visited earlier (depending on
the dom order), CaretDisplayItemClient::m_visualRect would be set to
the visual rect of the new caret, then when the source block was
visited, we invalidated the old caret at the location of the new
caret.
Add CaretDisplayItemClient::m_previousVisualRect,
and set it to m_visualRect when m_previousBlock is set to
m_layoutBlock. When m_previousBlock is visited, invalidate
m_previousVisualRect.
Move Source/core/paint/BlockPaintInvalidatorTest.cpp to
Source/core/editing/CaretDisplayItemClientTest.cpp to be closer
to the tested code.
BUG=690352
TEST=CaretDisplayItemClientTest.CaretMovesBetweenBlocks
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Review-Url: https://codereview.chromium.org/2698313003
Cr-Commit-Position: refs/heads/master@{#451440}
Committed: https://chromium.googlesource.com/chromium/src/+/942dfae2326142b0af47b32c407b70c2e13e86fc
Patch Set 1 #Patch Set 2 : - #Patch Set 3 : - #Patch Set 4 : - #
Total comments: 3
Messages
Total messages: 22 (16 generated)
|