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

Issue 1363823002: [Reland] Invalidate whitespace text on text color changes (Closed)

Created:
5 years, 3 months ago by pdr.
Modified:
5 years, 3 months ago
Reviewers:
chrishtr, eae
CC:
blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-style_chromium.org, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

[Reland] Invalidate whitespace text on text color changes This patch updates the optimization added in [1] to invalidate whitespace text on color changes because whitespace text can have decorations such as underlines which still need to repaint. The big idea of the optimization in [1] is to not unnecessarily repaint expensive items such as images that are in an <a> element. On hover, <a> will change color and underline styles which should not affect images. This patch adds a test to prove this optimization still works and prevents it from breaking in the future. This patch contains a fix for a performance regression[2] where text nodes without text (i.e., !firstTextBox) would be invalidated. This is tested by fast/repaint/inline-outline-repaint-2.html but was incorrectly thought to be a benign change in the original patch. Additional comments have been added both about the optimization and about the tricky empty-text case. Additionally, hasTextBoxes has been introduced to make this area cleaner. [1] https://src.chromium.org/viewvc/blink?view=rev&revision=152046 [2] https://src.chromium.org/viewvc/blink?view=rev&revision=202374 BUG=529944

Patch Set 1 #

Patch Set 2 : Revert changes to fast/repaint/inline-outline-repaint-2.html #

Total comments: 2

Patch Set 3 : firstTextBox() -> hasTextBoxes() where appropriate #

Patch Set 4 : Minor cleanup #

Total comments: 2

Patch Set 5 : Rebase after blink merge #

Patch Set 6 : Rebase with tests this time #

Patch Set 7 : Fix rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -15 lines) Patch
A third_party/WebKit/LayoutTests/paint/invalidation/non-text-link-invalidation-optimization.html View 1 2 3 4 5 1 chunk +28 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/paint/invalidation/non-text-link-invalidation-optimization-expected.txt View 1 2 3 4 5 6 0 chunks +-1 lines, --1 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/text-decoration-invalidation.html View 1 2 3 4 5 1 chunk +36 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/invalidation/text-decoration-invalidation-expected.html View 1 2 3 4 5 1 chunk +19 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ContainerNode.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/VisibleUnits.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.cpp View 1 2 3 4 1 chunk +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutText.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.cpp View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleDifference.h View 1 2 3 4 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 29 (10 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1363823002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1363823002/1
5 years, 3 months ago (2015-09-23 05:28:25 UTC) #3
pdr.
5 years, 3 months ago (2015-09-23 06:16:04 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1363823002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1363823002/20001
5 years, 3 months ago (2015-09-23 06:16:07 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_ng/builds/44311)
5 years, 3 months ago (2015-09-23 06:48:33 UTC) #8
chrishtr
https://codereview.chromium.org/1363823002/diff/20001/Source/core/layout/LayoutObject.cpp File Source/core/layout/LayoutObject.cpp (right): https://codereview.chromium.org/1363823002/diff/20001/Source/core/layout/LayoutObject.cpp#newcode1731 Source/core/layout/LayoutObject.cpp:1731: || (isText() && !isBR() && toLayoutText(this)->firstTextBox())) What does firstTextBox ...
5 years, 3 months ago (2015-09-23 16:26:56 UTC) #9
pdr.
On 2015/09/23 at 16:26:56, chrishtr wrote: > https://codereview.chromium.org/1363823002/diff/20001/Source/core/layout/LayoutObject.cpp > File Source/core/layout/LayoutObject.cpp (right): > > https://codereview.chromium.org/1363823002/diff/20001/Source/core/layout/LayoutObject.cpp#newcode1731 ...
5 years, 3 months ago (2015-09-23 16:38:46 UTC) #10
eae
https://codereview.chromium.org/1363823002/diff/20001/Source/core/layout/LayoutObject.cpp File Source/core/layout/LayoutObject.cpp (right): https://codereview.chromium.org/1363823002/diff/20001/Source/core/layout/LayoutObject.cpp#newcode1731 Source/core/layout/LayoutObject.cpp:1731: || (isText() && !isBR() && toLayoutText(this)->firstTextBox())) On 2015/09/23 16:26:56, ...
5 years, 3 months ago (2015-09-23 16:40:09 UTC) #12
chrishtr
On 2015/09/23 at 16:40:09, eae wrote: > https://codereview.chromium.org/1363823002/diff/20001/Source/core/layout/LayoutObject.cpp > File Source/core/layout/LayoutObject.cpp (right): > > https://codereview.chromium.org/1363823002/diff/20001/Source/core/layout/LayoutObject.cpp#newcode1731 ...
5 years, 3 months ago (2015-09-23 16:42:25 UTC) #13
pdr.
Done. PTAL?
5 years, 3 months ago (2015-09-23 17:41:14 UTC) #14
chrishtr
https://codereview.chromium.org/1363823002/diff/60001/Source/core/dom/ContainerNode.cpp File Source/core/dom/ContainerNode.cpp (right): https://codereview.chromium.org/1363823002/diff/60001/Source/core/dom/ContainerNode.cpp#newcode941 Source/core/dom/ContainerNode.cpp:941: // TODO(pdr): Shouldn't this be hasTextBoxes and not !hasTextBoxes? ...
5 years, 3 months ago (2015-09-23 17:45:24 UTC) #15
pdr.
https://codereview.chromium.org/1363823002/diff/60001/Source/core/dom/ContainerNode.cpp File Source/core/dom/ContainerNode.cpp (right): https://codereview.chromium.org/1363823002/diff/60001/Source/core/dom/ContainerNode.cpp#newcode941 Source/core/dom/ContainerNode.cpp:941: // TODO(pdr): Shouldn't this be hasTextBoxes and not !hasTextBoxes? ...
5 years, 3 months ago (2015-09-23 17:49:21 UTC) #16
chrishtr
lgtm
5 years, 3 months ago (2015-09-23 17:56:33 UTC) #17
eae
LGTM, thanks pdr!
5 years, 3 months ago (2015-09-23 18:01:57 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1363823002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1363823002/120001
5 years, 3 months ago (2015-09-23 18:17:56 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_android on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_android/builds/57590) linux_chromium_clobber_rel_ng on tryserver.chromium.linux (JOB_FAILED, ...
5 years, 3 months ago (2015-09-23 18:18:36 UTC) #23
pdr.
On 2015/09/23 at 18:18:36, commit-bot wrote: > Try jobs failed on following builders: > cast_shell_android ...
5 years, 3 months ago (2015-09-23 18:27:26 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1363823002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1363823002/120001
5 years, 3 months ago (2015-09-23 18:35:49 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/101394) mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 3 months ago (2015-09-23 18:37:02 UTC) #28
pdr.
5 years, 3 months ago (2015-09-24 04:20:21 UTC) #29
Message was sent while issue was closed.
On 2015/09/23 at 18:37:02, commit-bot wrote:
> Try jobs failed on following builders:
>   mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED,
http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...)
>   mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED,
http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)

This ended up landing in https://codereview.chromium.org/1363913004 with
https://crrev.com/72f85dacbbef4c117efdb8e353036873d167b989.

Powered by Google App Engine
This is Rietveld 408576698