Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Issue 2698313003: Fix caret paint invalidation when moving between blocks (Closed)

Created:
3 years, 10 months ago by Xianzhu
Modified:
3 years, 10 months ago
Reviewers:
chrishtr
CC:
blink-reviews, blink-reviews-paint_chromium.org, chromium-reviews, dshwang
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix 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
Unified diffs Side-by-side diffs Delta from patch set Stats (+177 lines, -186 lines) Patch
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/4776765-expected.txt View 1 2 3 1 chunk +4 lines, -0 lines 1 comment Download
M third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/4776765-expected.txt View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/4776765-expected.txt View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/4776765-expected.txt View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/paint/invalidation/4776765-expected.txt View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/4776765-expected.txt View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/BUILD.gn View 1 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/CaretDisplayItemClient.h View 1 1 chunk +18 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/editing/CaretDisplayItemClient.cpp View 1 2 3 chunks +49 lines, -43 lines 2 comments Download
A + third_party/WebKit/Source/core/editing/CaretDisplayItemClientTest.cpp View 1 3 chunks +84 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameSelection.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/BlockPaintInvalidatorTest.cpp View 1 1 chunk +0 lines, -135 lines 0 comments Download

Messages

Total messages: 22 (16 generated)
Xianzhu
https://codereview.chromium.org/2698313003/diff/60001/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/4776765-expected.txt File third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/4776765-expected.txt (right): https://codereview.chromium.org/2698313003/diff/60001/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/4776765-expected.txt#newcode35 third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/4776765-expected.txt:35: }, This is because now we invalidate caret display ...
3 years, 10 months ago (2017-02-17 18:02:58 UTC) #10
chrishtr
lgtm
3 years, 10 months ago (2017-02-17 21:10:52 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2698313003/60001
3 years, 10 months ago (2017-02-17 21:12:02 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
3 years, 10 months ago (2017-02-17 23:14:41 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2698313003/60001
3 years, 10 months ago (2017-02-18 07:30:23 UTC) #19
commit-bot: I haz the power
3 years, 10 months ago (2017-02-18 07:34:47 UTC) #22
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/942dfae2326142b0af47b32c407b...

Powered by Google App Engine
This is Rietveld 408576698