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

Issue 544743003: Clean up paint invalidation container logic for RenderText. (Closed)

Created:
6 years, 3 months ago by chrishtr
Modified:
6 years, 3 months ago
CC:
blink-reviews, blink-reviews-rendering, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr., rune+blink, zoltan1
Project:
blink
Visibility:
Public.

Description

Fix paint invalidation logic for RenderText. Previously, there was some special logic in RenderText::clippedOverflowRectForPaintInvalidation to detect a special scenario when the paint invalidation container of the RenderText was a child of the containing block/layer of the RenderText. This had two flaws: one, it was checking for a condition different than that, and two the descendant check is quite expensive if the paint invalidation container is far away in the render tree from the RenderText. The intent of the code is to delegate invalidation to the containing block/layer. The new implementation does that directly, by overriding containerForPaintInvalidation as well as clippedOverflowRectForPaintInvalidation to delegate directly. This also fixes a bug in which RenderText objects invalidate much too widely if the RenderText is being reparented accross a frame boundary. This started happening because now we let paint invalidation containers cross frame boundaries. BUG=410541 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181494

Patch Set 1 #

Patch Set 2 : Fix crash for one test. #

Patch Set 3 : Fixed. #

Total comments: 2

Patch Set 4 : Fixed #

Patch Set 5 : Fix. #

Patch Set 6 : Fix #

Total comments: 8

Patch Set 7 : Fix #

Patch Set 8 : Fix test #

Patch Set 9 : Fixed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -13 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries.html View 1 2 3 4 5 6 7 1 chunk +16 lines, -0 lines 0 comments Download
A LayoutTests/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt View 1 2 3 4 5 6 7 1 chunk +21 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderObject.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderObject.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -3 lines 0 comments Download
M Source/core/rendering/RenderText.h View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderText.cpp View 1 2 3 1 chunk +22 lines, -9 lines 0 comments Download

Messages

Total messages: 22 (7 generated)
chrishtr
Turns out that no layout tests change after all. To make a new layout test ...
6 years, 3 months ago (2014-09-04 20:38:51 UTC) #2
dsinclair
+wangxianzhu who has been looking at invalidations of RenderText.
6 years, 3 months ago (2014-09-04 20:41:52 UTC) #4
leviw_travelin_and_unemployed
> To make a new layout test would involve carefully setting things up so that ...
6 years, 3 months ago (2014-09-04 20:47:09 UTC) #6
leviw_travelin_and_unemployed
Whoops... I guess reitveld clobbered your addition of reviewers.
6 years, 3 months ago (2014-09-04 20:48:01 UTC) #8
chrishtr
OK I'll give it a try. https://codereview.chromium.org/544743003/diff/40001/Source/core/rendering/RenderText.cpp File Source/core/rendering/RenderText.cpp (right): https://codereview.chromium.org/544743003/diff/40001/Source/core/rendering/RenderText.cpp#newcode1583 Source/core/rendering/RenderText.cpp:1583: const RenderObject* RenderText::containingObjectForPaintInvalidation() ...
6 years, 3 months ago (2014-09-04 20:55:06 UTC) #9
chrishtr
Added test. Now I know exactly what caused the bug.
6 years, 3 months ago (2014-09-04 22:33:01 UTC) #10
chrishtr
https://codereview.chromium.org/544743003/diff/100001/LayoutTests/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt File LayoutTests/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt (right): https://codereview.chromium.org/544743003/diff/100001/LayoutTests/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt#newcode17 LayoutTests/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt:17: [0, 175, 800, 20] Without my CL, there would ...
6 years, 3 months ago (2014-09-04 22:34:41 UTC) #11
chrishtr
Ping.
6 years, 3 months ago (2014-09-05 18:11:43 UTC) #12
dsinclair
https://codereview.chromium.org/544743003/diff/100001/LayoutTests/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt File LayoutTests/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt (right): https://codereview.chromium.org/544743003/diff/100001/LayoutTests/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt#newcode1 LayoutTests/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt:1: CONSOLE MESSAGE: line 12: [object HTMLDivElement] This should go ...
6 years, 3 months ago (2014-09-05 19:35:10 UTC) #13
chrishtr
https://codereview.chromium.org/544743003/diff/100001/LayoutTests/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt File LayoutTests/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt (right): https://codereview.chromium.org/544743003/diff/100001/LayoutTests/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt#newcode1 LayoutTests/fast/repaint/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt:1: CONSOLE MESSAGE: line 12: [object HTMLDivElement] On 2014/09/05 19:35:10, ...
6 years, 3 months ago (2014-09-05 19:59:09 UTC) #14
leviw_travelin_and_unemployed
lgtm
6 years, 3 months ago (2014-09-05 20:20:19 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/chrishtr@chromium.org/544743003/160001
6 years, 3 months ago (2014-09-05 20:25:20 UTC) #17
commit-bot: I haz the power
Exceeded time limit waiting for builds to trigger.
6 years, 3 months ago (2014-09-06 08:01:23 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/chrishtr@chromium.org/544743003/160001
6 years, 3 months ago (2014-09-06 15:53:54 UTC) #21
commit-bot: I haz the power
6 years, 3 months ago (2014-09-06 15:55:04 UTC) #22
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as 181494

Powered by Google App Engine
This is Rietveld 408576698