|
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
Total comments: 7
Total comments: 30
|
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
|
Total messages: 45 (0 generated)
|