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

Issue 236203020: Separate repaint and layout requirements of StyleDifference (Step 1) (Closed)

Created:
6 years, 8 months ago by Xianzhu
Modified:
6 years, 8 months ago
CC:
blink-reviews, mstensho+blink_opera.com, krit, bemjb+rendering_chromium.org, dsinclair, zoltan1, eae+blinkwatch, leviw+renderwatch, kouhei+svg_chromium.org, fs, blink-layers+watch_chromium.org, ed+blinkwatch_opera.com, f(malita), gyuyoung.kim_webkit.org, jchaffraix+rendering, pdr., rwlbuis, Stephen Chennney, rune+blink
Visibility:
Public.

Description

Separate repaint and layout requirements of StyleDifference (Step 1) Previously StyleDifference was an enum that proximately bigger values imply smaller values (e.g. StyleDifferenceLayout implies StyleDifferenceRepaint). This causes unnecessary repaints in some cases on layout change. Convert StyleDifference to a structure containing relatively independent flags. This change doesn't directly improve the result, but can make further repaint optimizations possible. Step 1 doesn't change any functionality. RenderStyle still generate the legacy StyleDifference enum when comparing styles and convert the result to the new StyleDifference. Implicit requirements are not handled during the conversion. Converted call sites to use the new StyleDifference according to the following conversion rules: - diff == StyleDifferenceEqual (&& !context) => diff.hasNoChange() - diff == StyleDifferenceRepaint => diff.needsRepaintObjectOnly() - diff == StyleDifferenceRepaintLayer => diff.needsRepaintLayer() - diff == StyleDifferenceRepaint || diff == StyleDifferenceRepaintLayer => diff.needsRepaintLayer() - diff >= StyleDifferenceRepaint => diff.needsRepaint() || diff.needsLayout() - diff >= StyleDifferenceRepaintLayer => diff.needsRepaintLayer() || diff.needsLayout() - diff > StyleDifferenceRepaintLayer => diff.needsLayout() - diff == StyleDifferencePositionedMovementLayoutOnly => diff.needsPositionedMovementLayoutOnly() - diff == StyleDifferenceLayout => diff.needsFullLayout() BUG=358460 TEST=All existing layout tests. R=eseidel@chromium.org, esprehn@chromium.org, jchaffraix@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=171983 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=172331

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Fix SVG #

Patch Set 4 : Update layout test expectations #

Total comments: 7

Patch Set 5 : No functional change #

Patch Set 6 : Rebase; Renaming of some methods and small changes in StyleDifference #

Total comments: 30

Patch Set 7 : Revert changes about context sensitive properties, etc. #

Patch Set 8 : Rebase on reverted https://codereview.chromium.org/203463007/ #

Patch Set 9 : Rebase, Fix break #

Unified diffs Side-by-side diffs Delta from patch set Stats (+237 lines, -85 lines) Patch
M Source/core/editing/SimplifyMarkupCommand.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderBlock.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderBlockFlow.cpp View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/rendering/RenderBox.cpp View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -4 lines 0 comments Download
M Source/core/rendering/RenderFlexibleBox.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderLayer.cpp View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/rendering/RenderLayerModelObject.cpp View 1 2 3 4 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderObject.cpp View 1 2 3 4 5 6 7 8 7 chunks +41 lines, -42 lines 0 comments Download
M Source/core/rendering/RenderScrollbarPart.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderTableRow.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderText.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderTextControlSingleLine.cpp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/style/RenderStyle.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -1 line 0 comments Download
M Source/core/rendering/style/RenderStyle.cpp View 1 2 3 4 5 6 2 chunks +8 lines, -3 lines 0 comments Download
M Source/core/rendering/style/RenderStyleConstants.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M Source/core/rendering/style/SVGRenderStyle.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/style/SVGRenderStyle.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A Source/core/rendering/style/StyleDifference.h View 1 2 3 4 5 6 7 1 chunk +134 lines, -0 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGBlock.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/svg/RenderSVGGradientStop.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/svg/RenderSVGInline.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/svg/RenderSVGInlineText.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/svg/RenderSVGModelObject.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/svg/RenderSVGResourceContainer.cpp View 1 chunk +4 lines, -1 line 0 comments Download
M Source/core/rendering/svg/RenderSVGResourceFilterPrimitive.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/svg/RenderSVGRoot.cpp View 1 2 3 4 5 6 7 1 chunk +3 lines, -2 lines 0 comments Download
M Source/core/rendering/svg/SVGInlineTextBox.cpp View 1 2 3 4 5 1 chunk +10 lines, -4 lines 0 comments Download
M Source/core/rendering/svg/SVGResourcesCache.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/svg/SVGResourcesCache.cpp View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 45 (0 generated)
Xianzhu
PTAL. Still checking layout test results. There are no over-repaints or under-repaints. Some repaint test ...
6 years, 8 months ago (2014-04-16 01:32:36 UTC) #1
Xianzhu
Updated layout tests. Added explanations of layout test changes in CL description.
6 years, 8 months ago (2014-04-16 18:37:37 UTC) #2
Xianzhu
6 years, 8 months ago (2014-04-17 18:23:10 UTC) #3
eseidel
If I were doing this, I probably would have done it in smaller pieces. I ...
6 years, 8 months ago (2014-04-17 19:21:51 UTC) #4
Xianzhu
On 2014/04/17 19:21:51, eseidel wrote: > If I were doing this, I probably would have ...
6 years, 8 months ago (2014-04-17 19:31:28 UTC) #5
eseidel
Yeah, so reviewing this again, this looks fantastic. I think that either we can get ...
6 years, 8 months ago (2014-04-17 20:03:33 UTC) #6
ojan
On 2014/04/17 20:03:33, eseidel wrote: > Yeah, so reviewing this again, this looks fantastic. I ...
6 years, 8 months ago (2014-04-17 20:06:30 UTC) #7
Xianzhu
Separated change about zIndex into https://codereview.chromium.org/240253007. Will convert this change to the first step change ...
6 years, 8 months ago (2014-04-17 20:18:50 UTC) #8
Xianzhu
PTAL. The latest Patch Set keeps functionality unchanged.
6 years, 8 months ago (2014-04-18 01:56:08 UTC) #9
esprehn
Looking this over...
6 years, 8 months ago (2014-04-18 03:31:21 UTC) #10
esprehn
lgtm, this seems reasonable. Hopefully we can get rid of the Legacy enum swiftly.
6 years, 8 months ago (2014-04-18 05:38:02 UTC) #11
Xianzhu
The CQ bit was checked by wangxianzhu@chromium.org
6 years, 8 months ago (2014-04-18 16:13:54 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/236203020/140001
6 years, 8 months ago (2014-04-18 16:14:02 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-18 16:14:23 UTC) #14
commit-bot: I haz the power
Failed to apply patch for Source/core/rendering/RenderLayerModelObject.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 8 months ago (2014-04-18 16:14:23 UTC) #15
Julien - ping for review
It really looks like we are over-encapsulating on this one: we are bundling several mostly ...
6 years, 8 months ago (2014-04-18 16:37:00 UTC) #16
Xianzhu
PTAL. On 2014/04/18 16:37:00, Julien Chaffraix - PST wrote: > It really looks like we ...
6 years, 8 months ago (2014-04-18 17:46:55 UTC) #17
eseidel
lgtm This is amazing. Thank you.
6 years, 8 months ago (2014-04-18 18:01:12 UTC) #18
Xianzhu
The CQ bit was checked by wangxianzhu@chromium.org
6 years, 8 months ago (2014-04-18 19:17:21 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/236203020/190001
6 years, 8 months ago (2014-04-18 19:17:30 UTC) #20
Julien - ping for review
The CQ bit was unchecked by jchaffraix@chromium.org
6 years, 8 months ago (2014-04-18 19:56:59 UTC) #21
Julien - ping for review
lgtm. I won't block this change on that but consider not including the context-sensitive flags. ...
6 years, 8 months ago (2014-04-18 20:35:14 UTC) #22
Xianzhu
https://codereview.chromium.org/236203020/diff/190001/Source/core/rendering/style/StyleDifference.h File Source/core/rendering/style/StyleDifference.h (right): https://codereview.chromium.org/236203020/diff/190001/Source/core/rendering/style/StyleDifference.h#newcode8 Source/core/rendering/style/StyleDifference.h:8: #include "core/rendering/style/RenderStyleConstants.h" On 2014/04/18 20:35:15, Julien Chaffraix - PST ...
6 years, 8 months ago (2014-04-18 22:02:26 UTC) #23
Xianzhu
The CQ bit was checked by wangxianzhu@chromium.org
6 years, 8 months ago (2014-04-18 22:06:22 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/236203020/210001
6 years, 8 months ago (2014-04-18 22:06:37 UTC) #25
Xianzhu
The CQ bit was unchecked by wangxianzhu@chromium.org
6 years, 8 months ago (2014-04-18 23:16:58 UTC) #26
Xianzhu
The CQ bit was checked by wangxianzhu@chromium.org
6 years, 8 months ago (2014-04-18 23:17:08 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/236203020/210001
6 years, 8 months ago (2014-04-18 23:17:23 UTC) #28
Xianzhu
Committed patchset #7 manually as r171983 (presubmit successful).
6 years, 8 months ago (2014-04-18 23:18:02 UTC) #29
aboxhall
A revert of this CL has been created in https://codereview.chromium.org/247583003/ by aboxhall@chromium.org. The reason for ...
6 years, 8 months ago (2014-04-22 20:14:41 UTC) #30
Xianzhu
The CQ bit was checked by wangxianzhu@chromium.org
6 years, 8 months ago (2014-04-22 22:44:06 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/236203020/260001
6 years, 8 months ago (2014-04-22 22:44:32 UTC) #32
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-22 23:19:15 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_rel
6 years, 8 months ago (2014-04-22 23:19:16 UTC) #34
Xianzhu
The CQ bit was checked by wangxianzhu@chromium.org
6 years, 8 months ago (2014-04-22 23:24:39 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/236203020/260001
6 years, 8 months ago (2014-04-22 23:26:47 UTC) #36
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-23 01:09:31 UTC) #37
commit-bot: I haz the power
Failed to apply patch for Source/core/rendering/RenderBox.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 8 months ago (2014-04-23 01:09:32 UTC) #38
Xianzhu
The CQ bit was checked by wangxianzhu@chromium.org
6 years, 8 months ago (2014-04-23 01:56:49 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/236203020/280001
6 years, 8 months ago (2014-04-23 01:57:12 UTC) #40
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-23 02:31:03 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_compile_dbg
6 years, 8 months ago (2014-04-23 02:31:04 UTC) #42
Xianzhu
The CQ bit was checked by wangxianzhu@chromium.org
6 years, 8 months ago (2014-04-23 04:25:56 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/236203020/300001
6 years, 8 months ago (2014-04-23 04:26:17 UTC) #44
commit-bot: I haz the power
6 years, 8 months ago (2014-04-23 07:16:02 UTC) #45
Message was sent while issue was closed.
Change committed as 172331

Powered by Google App Engine
This is Rietveld 408576698