|
|
Refactor root element background painting
Base background is the default color on the canvas when the document is
transparent. Logically it should be the embedder to paint the base background,
but instead we make Blink to paint it to perform culling optimization and
pre-blending with the root background color to reduce pixel count.
Before this CL, the <html> element is responsible for painting root
background and base background. This is incorrect, because in CSS,
the root background should be painted to the whole canvas, and technically
the root background doesn't belong to the root stacking context.
This CL does the following improvement:
1. Background for transformed root element now correctly expands to the whole
canvas. This also fixed the issue with fixed-positioned root element because
fixed-position blocks are now painted using transformation code path.
2. The root element no longer paints background. Hacks that involved root
element special rules are no longer needed. Now the LayoutView paints both
base and root background, and the invalidation is done by normal style update.
3. Correct the style invalidation with <body> background. This involves
another CSS quirk that <html> with no background should steal <body>'s
background.
4. Frames no longer incorrectly paint base background. The main frame which
owns the frame set will paint base background. Backgrounds specified on the
main frame will be correctly revealed by transparent frames.
Design document: https://goo.gl/KGhYpU
BUG= 458601, 475115, 481769, 499000
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196973
Total comments: 2
Total comments: 12
Total comments: 24
Total comments: 2
Total comments: 1
Total comments: 14
Total comments: 6
Total comments: 52
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+513 lines, -381 lines) |
Patch |
 |
M |
LayoutTests/TestExpectations
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
4 chunks |
+138 lines, -8 lines |
0 comments
|
Download
|
 |
M |
LayoutTests/fast/repaint/view-background-from-body-1.html
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
LayoutTests/fast/transforms/transformed-document-element.html
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
LayoutTests/platform/android/svg/transforms/animated-path-inside-transformed-html-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
LayoutTests/platform/android/tables/mozilla/bugs/bug2479-2-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
LayoutTests/platform/android/virtual/slimmingpaint/svg/transforms/animated-path-inside-transformed-html-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
LayoutTests/platform/linux/css1/formatting_model/canvas-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
LayoutTests/platform/linux/svg/transforms/animated-path-inside-transformed-html-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
LayoutTests/platform/linux/tables/mozilla/bugs/bug2479-2-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
LayoutTests/platform/linux/virtual/slimmingpaint/svg/transforms/animated-path-inside-transformed-html-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
LayoutTests/platform/mac/css1/formatting_model/canvas-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
LayoutTests/platform/mac/svg/transforms/animated-path-inside-transformed-html-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
LayoutTests/platform/mac/tables/mozilla/bugs/bug2479-2-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
LayoutTests/platform/mac/virtual/slimmingpaint/svg/transforms/animated-path-inside-transformed-html-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
LayoutTests/platform/win-xp/css1/formatting_model/canvas-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
LayoutTests/platform/win-xp/svg/transforms/animated-path-inside-transformed-html-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
LayoutTests/platform/win-xp/tables/mozilla/bugs/bug2479-2-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
LayoutTests/platform/win-xp/virtual/slimmingpaint/svg/transforms/animated-path-inside-transformed-html-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
LayoutTests/platform/win/css1/formatting_model/canvas-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
LayoutTests/platform/win/svg/transforms/animated-path-inside-transformed-html-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
LayoutTests/platform/win/tables/mozilla/bugs/bug2479-2-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
LayoutTests/platform/win/virtual/slimmingpaint/svg/transforms/animated-path-inside-transformed-html-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/dom/Document.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
3 chunks |
+31 lines, -4 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/LayoutBox.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/layout/LayoutBox.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
7 chunks |
+27 lines, -44 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/LayoutBoxModelObject.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/LayoutBoxModelObject.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
3 chunks |
+42 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/LayoutObject.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/LayoutObject.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
2 chunks |
+0 lines, -26 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/LayoutView.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
3 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/LayoutView.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
3 chunks |
+26 lines, -22 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
1 chunk |
+1 line, -5 lines |
0 comments
|
Download
|
 |
M |
Source/core/paint/BoxPainter.h
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+11 lines, -8 lines |
0 comments
|
Download
|
 |
M |
Source/core/paint/BoxPainter.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
13 chunks |
+99 lines, -180 lines |
0 comments
|
Download
|
 |
M |
Source/core/paint/DisplayItemListPaintTest.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
5 chunks |
+6 lines, -8 lines |
0 comments
|
Download
|
 |
M |
Source/core/paint/FrameSetPainter.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
3 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
Source/core/paint/ViewPainter.h
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/paint/ViewPainter.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
2 chunks |
+94 lines, -51 lines |
0 comments
|
Download
|
 |
M |
Source/core/style/FillLayer.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
Total messages: 59 (14 generated)
|