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

Issue 2665823002: Invalidate caret during paint invalidation (Closed)

Created:
3 years, 10 months ago by Xianzhu
Modified:
3 years, 10 months ago
CC:
ajuma+watch_chromium.org, blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dglazkov+blink, dshwang, drott+blinkwatch_chromium.org, krit, eae+blinkwatch, f(malita), jbroman, jchaffraix+rendering, Justin Novosad, kinuko+watch, leviw+renderwatch, pdr+graphicswatchlist_chromium.org, pdr+renderingwatchlist_chromium.org, rwlbuis, Stephen Chennney, sof, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Invalidate caret during paint invalidation Previously we invalidated caret when it changed which caused several issues such as accessing dirty layout, etc., which were also the same issues when we had encountered before we had "repaint-after-layout". This CL moves caret paint invalidation into paint invalidation stage to avoid the issues. It basically uses the same method as layout object paint invalidation: save the previous visual rects of carets; when a caret changes, invalidate both the old and the new visual rects. BUG=682367 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Review-Url: https://codereview.chromium.org/2665823002 Cr-Commit-Position: refs/heads/master@{#448799} Committed: https://chromium.googlesource.com/chromium/src/+/94d07a45f859a3430ea9de1ff8c2a95708cb23b1

Patch Set 1 #

Patch Set 2 : - #

Patch Set 3 : - #

Patch Set 4 : - #

Patch Set 5 : Rebaseline #

Patch Set 6 : Rebaseline #

Total comments: 37

Patch Set 7 : Address comments; avoid 1px inflation #

Patch Set 8 : Refactor #

Patch Set 9 : Refactor #

Total comments: 2

Patch Set 10 : - #

Total comments: 2

Patch Set 11 : - #

Patch Set 12 : NeedsRebaseline #

Unified diffs Side-by-side diffs Delta from patch set Stats (+654 lines, -802 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +29 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/caret-color-inline.html View 1 2 3 4 5 6 7 1 chunk +12 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/caret-color-inline-expected.html View 1 2 3 4 5 6 7 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/invalidate-caret-before-text-node-update.html View 1 2 3 4 5 1 chunk +12 lines, -24 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/invalidate-caret-before-text-node-update-expected.png View 1 2 3 4 5 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/invalidate-caret-before-text-node-update-expected.txt View 1 2 3 4 1 chunk +37 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/paint/invalidation/paint-caret-in-div-with-negative-indent-expected.txt View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/4776765-expected.txt View 1 2 3 4 5 6 7 2 chunks +3 lines, -30 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/caret-contenteditable-content-after-expected.txt View 1 2 3 4 5 6 7 7 chunks +4 lines, -123 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/caret-invalidation-in-overflow-scroll-expected.txt View 1 2 3 4 5 6 7 2 chunks +7 lines, -11 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/caret-outside-block-expected.txt View 1 2 3 4 5 6 7 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/caret-with-composited-scroll-expected.txt View 1 2 3 4 5 6 7 3 chunks +1 line, -24 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/caret-with-transformation-expected.txt View 1 2 3 4 5 6 7 2 chunks +7 lines, -11 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/delete-into-nested-block-expected.txt View 1 2 3 4 5 6 7 3 chunks +1 line, -24 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/inline-outline-repaint-expected.txt View 1 2 3 4 5 6 7 3 chunks +1 line, -24 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/invalidate-caret-in-composited-scrolling-container-expected.txt View 1 2 3 4 5 6 7 2 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/invalidate-caret-in-non-composited-scrolling-container-expected.txt View 1 2 3 4 5 6 7 2 chunks +1 line, -24 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/selection-after-delete-expected.txt View 1 2 3 4 5 6 7 3 chunks +1 line, -24 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/paint/invalidation/caret-subpixel-expected.txt View 1 2 3 4 5 6 7 2 chunks +1 line, -24 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/paint/invalidation/textarea-caret-expected.txt View 1 2 3 4 5 6 7 2 chunks +1 line, -24 lines 0 comments Download
M third_party/WebKit/Source/core/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/CharacterData.cpp View 1 2 3 4 5 6 7 1 chunk +0 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +0 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/editing/CaretDisplayItemClient.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +47 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/editing/CaretDisplayItemClient.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +114 lines, -31 lines 0 comments Download
M third_party/WebKit/Source/core/editing/DragCaret.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +17 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/editing/DragCaret.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +27 lines, -36 lines 0 comments Download
M third_party/WebKit/Source/core/editing/EditingUtilities.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameCaret.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +19 lines, -28 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameCaret.cpp View 1 2 3 4 5 6 7 8 9 10 10 chunks +37 lines, -123 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameSelection.h View 1 2 3 4 5 6 7 8 9 10 8 chunks +17 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameSelection.cpp View 1 2 3 4 5 6 7 8 9 10 10 chunks +31 lines, -35 lines 0 comments Download
M third_party/WebKit/Source/core/editing/FrameSelectionTest.cpp View 1 2 3 4 5 6 7 8 9 10 7 chunks +5 lines, -84 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 2 3 4 5 6 7 8 9 10 8 chunks +9 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlock.h View 1 2 3 4 5 6 7 2 chunks +7 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlock.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +15 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/paint/BlockPaintInvalidator.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/paint/BlockPaintInvalidator.cpp View 1 2 3 4 5 6 7 1 chunk +16 lines, -7 lines 0 comments Download
A third_party/WebKit/Source/core/paint/BlockPaintInvalidatorTest.cpp View 1 2 3 4 5 6 7 1 chunk +135 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/BlockPainter.cpp View 1 2 3 4 5 6 7 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/PaintInvalidator.cpp View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/PaintInvalidationReason.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/PaintInvalidationReason.cpp View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 70 (51 generated)
Xianzhu
https://codereview.chromium.org/2665823002/diff/100001/third_party/WebKit/LayoutTests/paint/invalidation/invalidate-caret-before-text-node-update.html File third_party/WebKit/LayoutTests/paint/invalidation/invalidate-caret-before-text-node-update.html (left): https://codereview.chromium.org/2665823002/diff/100001/third_party/WebKit/LayoutTests/paint/invalidation/invalidate-caret-before-text-node-update.html#oldcode32 third_party/WebKit/LayoutTests/paint/invalidation/invalidate-caret-before-text-node-update.html:32: }); This test is changed to a normal repaint ...
3 years, 10 months ago (2017-01-31 18:39:52 UTC) #24
yosin_UTC9
https://codereview.chromium.org/2665823002/diff/100001/third_party/WebKit/Source/core/editing/FrameCaret.cpp File third_party/WebKit/Source/core/editing/FrameCaret.cpp (right): https://codereview.chromium.org/2665823002/diff/100001/third_party/WebKit/Source/core/editing/FrameCaret.cpp#newcode151 third_party/WebKit/Source/core/editing/FrameCaret.cpp:151: if (LayoutBlock* block = caretLayoutBlock()) Let's use early-return style ...
3 years, 10 months ago (2017-01-31 20:12:59 UTC) #28
wkorman
lgtm This looks like a great change. I had only one minor documentation comment, otherwise ...
3 years, 10 months ago (2017-01-31 20:40:29 UTC) #29
yosin_UTC9
On 2017/01/31 at 20:40:29, wkorman wrote: > lgtm > > This looks like a great ...
3 years, 10 months ago (2017-01-31 21:03:05 UTC) #30
chrishtr
https://codereview.chromium.org/2665823002/diff/100001/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/caret-contenteditable-content-after-expected.txt File third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/caret-contenteditable-content-after-expected.txt (left): https://codereview.chromium.org/2665823002/diff/100001/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/caret-contenteditable-content-after-expected.txt#oldcode73 third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/caret-contenteditable-content-after-expected.txt:73: }, Shouldn't there be at least one new invalidation ...
3 years, 10 months ago (2017-01-31 22:51:04 UTC) #31
Xianzhu
https://codereview.chromium.org/2665823002/diff/100001/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/caret-contenteditable-content-after-expected.txt File third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/caret-contenteditable-content-after-expected.txt (left): https://codereview.chromium.org/2665823002/diff/100001/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/caret-contenteditable-content-after-expected.txt#oldcode73 third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/caret-contenteditable-content-after-expected.txt:73: }, On 2017/01/31 22:51:03, chrishtr wrote: > Shouldn't there ...
3 years, 10 months ago (2017-02-02 23:42:07 UTC) #38
Xianzhu
The latest patch is refactored. Ptal. - Removed the global map in BlockPaintInvalidator. Now enclose ...
3 years, 10 months ago (2017-02-02 23:45:05 UTC) #40
chrishtr
https://codereview.chromium.org/2665823002/diff/180001/third_party/WebKit/Source/core/layout/LayoutObject.cpp File third_party/WebKit/Source/core/layout/LayoutObject.cpp (left): https://codereview.chromium.org/2665823002/diff/180001/third_party/WebKit/Source/core/layout/LayoutObject.cpp#oldcode1523 third_party/WebKit/Source/core/layout/LayoutObject.cpp:1523: || (isLayoutBlock() && toLayoutBlock(this)->hasCaret()) || Why can this line ...
3 years, 10 months ago (2017-02-03 02:07:01 UTC) #45
Xianzhu
https://codereview.chromium.org/2665823002/diff/180001/third_party/WebKit/Source/core/layout/LayoutObject.cpp File third_party/WebKit/Source/core/layout/LayoutObject.cpp (left): https://codereview.chromium.org/2665823002/diff/180001/third_party/WebKit/Source/core/layout/LayoutObject.cpp#oldcode1523 third_party/WebKit/Source/core/layout/LayoutObject.cpp:1523: || (isLayoutBlock() && toLayoutBlock(this)->hasCaret()) || On 2017/02/03 02:07:01, chrishtr ...
3 years, 10 months ago (2017-02-03 04:31:28 UTC) #50
chrishtr
On 2017/02/03 at 04:31:28, wangxianzhu wrote: > https://codereview.chromium.org/2665823002/diff/180001/third_party/WebKit/Source/core/layout/LayoutObject.cpp > File third_party/WebKit/Source/core/layout/LayoutObject.cpp (left): > > https://codereview.chromium.org/2665823002/diff/180001/third_party/WebKit/Source/core/layout/LayoutObject.cpp#oldcode1523 ...
3 years, 10 months ago (2017-02-03 16:13:20 UTC) #53
Xianzhu
On 2017/02/03 16:13:20, chrishtr wrote: > On 2017/02/03 at 04:31:28, wangxianzhu wrote: > > > ...
3 years, 10 months ago (2017-02-03 18:37:55 UTC) #54
chrishtr
On 2017/02/03 at 18:37:55, wangxianzhu wrote: > On 2017/02/03 16:13:20, chrishtr wrote: > > On ...
3 years, 10 months ago (2017-02-06 22:54:11 UTC) #55
Xianzhu
On 2017/02/06 22:54:11, chrishtr wrote: > On 2017/02/03 at 18:37:55, wangxianzhu wrote: > > On ...
3 years, 10 months ago (2017-02-07 03:51:04 UTC) #56
chrishtr
On 2017/02/07 at 03:51:04, wangxianzhu wrote: > On 2017/02/06 22:54:11, chrishtr wrote: > > On ...
3 years, 10 months ago (2017-02-07 05:29:06 UTC) #57
chrishtr
https://codereview.chromium.org/2665823002/diff/200001/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2665823002/diff/200001/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode3045 third_party/WebKit/Source/core/frame/FrameView.cpp:3045: frameView.m_frame->page()->dragCaret().updateForPaintInvalidation(); How about conceptually adding this at the end ...
3 years, 10 months ago (2017-02-07 05:29:12 UTC) #58
Xianzhu
https://codereview.chromium.org/2665823002/diff/200001/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/2665823002/diff/200001/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode3045 third_party/WebKit/Source/core/frame/FrameView.cpp:3045: frameView.m_frame->page()->dragCaret().updateForPaintInvalidation(); On 2017/02/07 05:29:12, chrishtr wrote: > How about ...
3 years, 10 months ago (2017-02-07 20:00:15 UTC) #61
chrishtr
lgtm
3 years, 10 months ago (2017-02-07 21:33:07 UTC) #64
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/2665823002/240001
3 years, 10 months ago (2017-02-07 21:50:53 UTC) #67
commit-bot: I haz the power
3 years, 10 months ago (2017-02-07 23:52:03 UTC) #70
Message was sent while issue was closed.
Committed patchset #12 (id:240001) as
https://chromium.googlesource.com/chromium/src/+/94d07a45f859a3430ea9de1ff8c2...

Powered by Google App Engine
This is Rietveld 408576698