OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "core/layout/compositing/CompositedLayerMapping.h" | 7 #include "core/layout/compositing/CompositedLayerMapping.h" |
8 #include "core/paint/PaintControllerPaintTest.h" | 8 #include "core/paint/PaintControllerPaintTest.h" |
9 #include "platform/graphics/GraphicsContext.h" | 9 #include "platform/graphics/GraphicsContext.h" |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 setBodyInnerHTML( | 29 setBodyInnerHTML( |
30 "<div id='container1' style='position: relative; z-index: 1; width: 200p
x; height: 200px; background-color: blue'>" | 30 "<div id='container1' style='position: relative; z-index: 1; width: 200p
x; height: 200px; background-color: blue'>" |
31 " <div id='content1' style='position: absolute; width: 100px; height: 1
00px; background-color: red'></div>" | 31 " <div id='content1' style='position: absolute; width: 100px; height: 1
00px; background-color: red'></div>" |
32 "</div>" | 32 "</div>" |
33 "<div id='container2' style='position: relative; z-index: 1; width: 200p
x; height: 200px; background-color: blue'>" | 33 "<div id='container2' style='position: relative; z-index: 1; width: 200p
x; height: 200px; background-color: blue'>" |
34 " <div id='content2' style='position: absolute; width: 100px; height: 1
00px; background-color: green'></div>" | 34 " <div id='content2' style='position: absolute; width: 100px; height: 1
00px; background-color: green'></div>" |
35 "</div>"); | 35 "</div>"); |
36 document().view()->updateAllLifecyclePhases(); | 36 document().view()->updateAllLifecyclePhases(); |
37 | 37 |
38 bool rootLayerScrolls = document().frame()->settings()->rootLayerScrolls(); | |
39 PaintLayer& rootLayer = *layoutView().layer(); | 38 PaintLayer& rootLayer = *layoutView().layer(); |
40 PaintLayer& htmlLayer = *toLayoutBoxModelObject(document().documentElement()
->layoutObject())->layer(); | 39 PaintLayer& htmlLayer = *toLayoutBoxModelObject(document().documentElement()
->layoutObject())->layer(); |
41 LayoutObject& container1 = *document().getElementById("container1")->layoutO
bject(); | 40 LayoutObject& container1 = *document().getElementById("container1")->layoutO
bject(); |
42 PaintLayer& container1Layer = *toLayoutBoxModelObject(container1).layer(); | 41 PaintLayer& container1Layer = *toLayoutBoxModelObject(container1).layer(); |
43 LayoutObject& content1 = *document().getElementById("content1")->layoutObjec
t(); | 42 LayoutObject& content1 = *document().getElementById("content1")->layoutObjec
t(); |
44 LayoutObject& container2 = *document().getElementById("container2")->layoutO
bject(); | 43 LayoutObject& container2 = *document().getElementById("container2")->layoutO
bject(); |
45 PaintLayer& container2Layer = *toLayoutBoxModelObject(container2).layer(); | 44 PaintLayer& container2Layer = *toLayoutBoxModelObject(container2).layer(); |
46 LayoutObject& content2 = *document().getElementById("content2")->layoutObjec
t(); | 45 LayoutObject& content2 = *document().getElementById("content2")->layoutObjec
t(); |
47 | 46 |
48 if (rootLayerScrolls) { | 47 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 13, |
49 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 7, | 48 TestDisplayItem(rootLayer, DisplayItem::Subsequence), |
50 TestDisplayItem(rootLayer, DisplayItem::Subsequence), | 49 TestDisplayItem(layoutView(), backgroundType), |
51 TestDisplayItem(layoutView(), backgroundType), | 50 TestDisplayItem(htmlLayer, DisplayItem::Subsequence), |
52 TestDisplayItem(container1, backgroundType), | 51 TestDisplayItem(container1Layer, DisplayItem::Subsequence), |
53 TestDisplayItem(content1, backgroundType), | 52 TestDisplayItem(container1, backgroundType), |
54 TestDisplayItem(container2, backgroundType), | 53 TestDisplayItem(content1, backgroundType), |
55 TestDisplayItem(content2, backgroundType), | 54 TestDisplayItem(container1Layer, DisplayItem::EndSubsequence), |
56 TestDisplayItem(rootLayer, DisplayItem::EndSubsequence)); | 55 TestDisplayItem(container2Layer, DisplayItem::Subsequence), |
57 } else { | 56 TestDisplayItem(container2, backgroundType), |
58 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 13, | 57 TestDisplayItem(content2, backgroundType), |
59 TestDisplayItem(rootLayer, DisplayItem::Subsequence), | 58 TestDisplayItem(container2Layer, DisplayItem::EndSubsequence), |
60 TestDisplayItem(layoutView(), backgroundType), | 59 TestDisplayItem(htmlLayer, DisplayItem::EndSubsequence), |
61 TestDisplayItem(htmlLayer, DisplayItem::Subsequence), | 60 TestDisplayItem(rootLayer, DisplayItem::EndSubsequence)); |
62 TestDisplayItem(container1Layer, DisplayItem::Subsequence), | |
63 TestDisplayItem(container1, backgroundType), | |
64 TestDisplayItem(content1, backgroundType), | |
65 TestDisplayItem(container1Layer, DisplayItem::EndSubsequence), | |
66 TestDisplayItem(container2Layer, DisplayItem::Subsequence), | |
67 TestDisplayItem(container2, backgroundType), | |
68 TestDisplayItem(content2, backgroundType), | |
69 TestDisplayItem(container2Layer, DisplayItem::EndSubsequence), | |
70 TestDisplayItem(htmlLayer, DisplayItem::EndSubsequence), | |
71 TestDisplayItem(rootLayer, DisplayItem::EndSubsequence)); | |
72 } | |
73 | 61 |
74 toHTMLElement(content1.node())->setAttribute(HTMLNames::styleAttr, "position
: absolute; width: 100px; height: 100px; background-color: green"); | 62 toHTMLElement(content1.node())->setAttribute(HTMLNames::styleAttr, "position
: absolute; width: 100px; height: 100px; background-color: green"); |
75 updateLifecyclePhasesBeforePaint(); | 63 updateLifecyclePhasesBeforePaint(); |
76 paint(); | 64 paint(); |
77 | 65 |
78 if (rootLayerScrolls) { | 66 EXPECT_DISPLAY_LIST(rootPaintController().newDisplayItemList(), 10, |
79 EXPECT_DISPLAY_LIST(rootPaintController().newDisplayItemList(), 7, | 67 TestDisplayItem(rootLayer, DisplayItem::Subsequence), |
80 TestDisplayItem(rootLayer, DisplayItem::Subsequence), | 68 TestDisplayItem(layoutView(), cachedBackgroundType), |
81 TestDisplayItem(layoutView(), cachedBackgroundType), | 69 TestDisplayItem(htmlLayer, DisplayItem::Subsequence), |
82 TestDisplayItem(container1, cachedBackgroundType), | 70 TestDisplayItem(container1Layer, DisplayItem::Subsequence), |
83 TestDisplayItem(content1, backgroundType), | 71 TestDisplayItem(container1, cachedBackgroundType), |
84 TestDisplayItem(container2, cachedBackgroundType), | 72 TestDisplayItem(content1, backgroundType), |
85 TestDisplayItem(content2, cachedBackgroundType), | 73 TestDisplayItem(container1Layer, DisplayItem::EndSubsequence), |
86 TestDisplayItem(rootLayer, DisplayItem::EndSubsequence)); | 74 TestDisplayItem(container2Layer, DisplayItem::CachedSubsequence), |
87 } else { | 75 TestDisplayItem(htmlLayer, DisplayItem::EndSubsequence), |
88 EXPECT_DISPLAY_LIST(rootPaintController().newDisplayItemList(), 10, | 76 TestDisplayItem(rootLayer, DisplayItem::EndSubsequence)); |
89 TestDisplayItem(rootLayer, DisplayItem::Subsequence), | |
90 TestDisplayItem(layoutView(), cachedBackgroundType), | |
91 TestDisplayItem(htmlLayer, DisplayItem::Subsequence), | |
92 TestDisplayItem(container1Layer, DisplayItem::Subsequence), | |
93 TestDisplayItem(container1, cachedBackgroundType), | |
94 TestDisplayItem(content1, backgroundType), | |
95 TestDisplayItem(container1Layer, DisplayItem::EndSubsequence), | |
96 TestDisplayItem(container2Layer, DisplayItem::CachedSubsequence), | |
97 TestDisplayItem(htmlLayer, DisplayItem::EndSubsequence), | |
98 TestDisplayItem(rootLayer, DisplayItem::EndSubsequence)); | |
99 } | |
100 | 77 |
101 commit(); | 78 commit(); |
102 | 79 |
103 if (rootLayerScrolls) { | 80 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 13, |
104 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 7, | 81 TestDisplayItem(rootLayer, DisplayItem::Subsequence), |
105 TestDisplayItem(rootLayer, DisplayItem::Subsequence), | 82 TestDisplayItem(layoutView(), backgroundType), |
106 TestDisplayItem(layoutView(), backgroundType), | 83 TestDisplayItem(htmlLayer, DisplayItem::Subsequence), |
107 TestDisplayItem(container1, backgroundType), | 84 TestDisplayItem(container1Layer, DisplayItem::Subsequence), |
108 TestDisplayItem(content1, backgroundType), | 85 TestDisplayItem(container1, backgroundType), |
109 TestDisplayItem(container2, backgroundType), | 86 TestDisplayItem(content1, backgroundType), |
110 TestDisplayItem(content2, backgroundType), | 87 TestDisplayItem(container1Layer, DisplayItem::EndSubsequence), |
111 TestDisplayItem(rootLayer, DisplayItem::EndSubsequence)); | 88 TestDisplayItem(container2Layer, DisplayItem::Subsequence), |
112 } else { | 89 TestDisplayItem(container2, backgroundType), |
113 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 13, | 90 TestDisplayItem(content2, backgroundType), |
114 TestDisplayItem(rootLayer, DisplayItem::Subsequence), | 91 TestDisplayItem(container2Layer, DisplayItem::EndSubsequence), |
115 TestDisplayItem(layoutView(), backgroundType), | 92 TestDisplayItem(htmlLayer, DisplayItem::EndSubsequence), |
116 TestDisplayItem(htmlLayer, DisplayItem::Subsequence), | 93 TestDisplayItem(rootLayer, DisplayItem::EndSubsequence)); |
117 TestDisplayItem(container1Layer, DisplayItem::Subsequence), | |
118 TestDisplayItem(container1, backgroundType), | |
119 TestDisplayItem(content1, backgroundType), | |
120 TestDisplayItem(container1Layer, DisplayItem::EndSubsequence), | |
121 TestDisplayItem(container2Layer, DisplayItem::Subsequence), | |
122 TestDisplayItem(container2, backgroundType), | |
123 TestDisplayItem(content2, backgroundType), | |
124 TestDisplayItem(container2Layer, DisplayItem::EndSubsequence), | |
125 TestDisplayItem(htmlLayer, DisplayItem::EndSubsequence), | |
126 TestDisplayItem(rootLayer, DisplayItem::EndSubsequence)); | |
127 } | |
128 } | 94 } |
129 | 95 |
130 TEST_P(PaintLayerPainterTest, CachedSubsequenceOnInterestRectChange) | 96 TEST_P(PaintLayerPainterTest, CachedSubsequenceOnInterestRectChange) |
131 { | 97 { |
132 RuntimeEnabledFeatures::setSlimmingPaintSynchronizedPaintingEnabled(true); | 98 RuntimeEnabledFeatures::setSlimmingPaintSynchronizedPaintingEnabled(true); |
133 | 99 |
134 setBodyInnerHTML( | 100 setBodyInnerHTML( |
135 "<div id='container1' style='position: relative; z-index: 1; width: 200p
x; height: 200px; background-color: blue'>" | 101 "<div id='container1' style='position: relative; z-index: 1; width: 200p
x; height: 200px; background-color: blue'>" |
136 " <div id='content1' style='position: absolute; width: 100px; height: 1
00px; background-color: green'></div>" | 102 " <div id='content1' style='position: absolute; width: 100px; height: 1
00px; background-color: green'></div>" |
137 "</div>" | 103 "</div>" |
138 "<div id='container2' style='position: relative; z-index: 1; width: 200p
x; height: 200px; background-color: blue'>" | 104 "<div id='container2' style='position: relative; z-index: 1; width: 200p
x; height: 200px; background-color: blue'>" |
139 " <div id='content2a' style='position: absolute; width: 100px; height:
100px; background-color: green'></div>" | 105 " <div id='content2a' style='position: absolute; width: 100px; height:
100px; background-color: green'></div>" |
140 " <div id='content2b' style='position: absolute; top: 200px; width: 100
px; height: 100px; background-color: green'></div>" | 106 " <div id='content2b' style='position: absolute; top: 200px; width: 100
px; height: 100px; background-color: green'></div>" |
141 "</div>" | 107 "</div>" |
142 "<div id='container3' style='position: absolute; z-index: 2; left: 300px
; top: 0; width: 200px; height: 200px; background-color: blue'>" | 108 "<div id='container3' style='position: absolute; z-index: 2; left: 300px
; top: 0; width: 200px; height: 200px; background-color: blue'>" |
143 " <div id='content3' style='position: absolute; width: 200px; height: 2
00px; background-color: green'></div>" | 109 " <div id='content3' style='position: absolute; width: 200px; height: 2
00px; background-color: green'></div>" |
144 "</div>"); | 110 "</div>"); |
145 rootPaintController().invalidateAll(); | 111 rootPaintController().invalidateAll(); |
146 | 112 |
147 bool rootLayerScrolls = document().frame()->settings()->rootLayerScrolls(); | |
148 PaintLayer& rootLayer = *layoutView().layer(); | 113 PaintLayer& rootLayer = *layoutView().layer(); |
149 PaintLayer& htmlLayer = *toLayoutBoxModelObject(document().documentElement()
->layoutObject())->layer(); | 114 PaintLayer& htmlLayer = *toLayoutBoxModelObject(document().documentElement()
->layoutObject())->layer(); |
150 LayoutObject& container1 = *document().getElementById("container1")->layoutO
bject(); | 115 LayoutObject& container1 = *document().getElementById("container1")->layoutO
bject(); |
151 PaintLayer& container1Layer = *toLayoutBoxModelObject(container1).layer(); | 116 PaintLayer& container1Layer = *toLayoutBoxModelObject(container1).layer(); |
152 LayoutObject& content1 = *document().getElementById("content1")->layoutObjec
t(); | 117 LayoutObject& content1 = *document().getElementById("content1")->layoutObjec
t(); |
153 LayoutObject& container2 = *document().getElementById("container2")->layoutO
bject(); | 118 LayoutObject& container2 = *document().getElementById("container2")->layoutO
bject(); |
154 PaintLayer& container2Layer = *toLayoutBoxModelObject(container2).layer(); | 119 PaintLayer& container2Layer = *toLayoutBoxModelObject(container2).layer(); |
155 LayoutObject& content2a = *document().getElementById("content2a")->layoutObj
ect(); | 120 LayoutObject& content2a = *document().getElementById("content2a")->layoutObj
ect(); |
156 LayoutObject& content2b = *document().getElementById("content2b")->layoutObj
ect(); | 121 LayoutObject& content2b = *document().getElementById("content2b")->layoutObj
ect(); |
157 LayoutObject& container3 = *document().getElementById("container3")->layoutO
bject(); | 122 LayoutObject& container3 = *document().getElementById("container3")->layoutO
bject(); |
158 PaintLayer& container3Layer = *toLayoutBoxModelObject(container3).layer(); | 123 PaintLayer& container3Layer = *toLayoutBoxModelObject(container3).layer(); |
159 LayoutObject& content3 = *document().getElementById("content3")->layoutObjec
t(); | 124 LayoutObject& content3 = *document().getElementById("content3")->layoutObjec
t(); |
160 | 125 |
161 updateLifecyclePhasesBeforePaint(); | 126 updateLifecyclePhasesBeforePaint(); |
162 IntRect interestRect(0, 0, 400, 300); | 127 IntRect interestRect(0, 0, 400, 300); |
163 paint(&interestRect); | 128 paint(&interestRect); |
164 commit(); | 129 commit(); |
165 | 130 |
166 // Container1 is fully in the interest rect; | 131 // Container1 is fully in the interest rect; |
167 // Container2 is partly (including its stacking chidren) in the interest rec
t; | 132 // Container2 is partly (including its stacking chidren) in the interest rec
t; |
168 // Content2b is out of the interest rect and output nothing; | 133 // Content2b is out of the interest rect and output nothing; |
169 // Container3 is partly in the interest rect. | 134 // Container3 is partly in the interest rect. |
170 if (rootLayerScrolls) { | 135 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 17, |
171 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 9, | 136 TestDisplayItem(rootLayer, DisplayItem::Subsequence), |
172 TestDisplayItem(rootLayer, DisplayItem::Subsequence), | 137 TestDisplayItem(layoutView(), backgroundType), |
173 TestDisplayItem(layoutView(), backgroundType), | 138 TestDisplayItem(htmlLayer, DisplayItem::Subsequence), |
174 TestDisplayItem(container1, backgroundType), | 139 TestDisplayItem(container1Layer, DisplayItem::Subsequence), |
175 TestDisplayItem(content1, backgroundType), | 140 TestDisplayItem(container1, backgroundType), |
176 TestDisplayItem(container2, backgroundType), | 141 TestDisplayItem(content1, backgroundType), |
177 TestDisplayItem(content2a, backgroundType), | 142 TestDisplayItem(container1Layer, DisplayItem::EndSubsequence), |
178 TestDisplayItem(container3, backgroundType), | 143 TestDisplayItem(container2Layer, DisplayItem::Subsequence), |
179 TestDisplayItem(content3, backgroundType), | 144 TestDisplayItem(container2, backgroundType), |
180 TestDisplayItem(rootLayer, DisplayItem::EndSubsequence)); | 145 TestDisplayItem(content2a, backgroundType), |
181 } else { | 146 TestDisplayItem(container2Layer, DisplayItem::EndSubsequence), |
182 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 17, | 147 TestDisplayItem(container3Layer, DisplayItem::Subsequence), |
183 TestDisplayItem(rootLayer, DisplayItem::Subsequence), | 148 TestDisplayItem(container3, backgroundType), |
184 TestDisplayItem(layoutView(), backgroundType), | 149 TestDisplayItem(content3, backgroundType), |
185 TestDisplayItem(htmlLayer, DisplayItem::Subsequence), | 150 TestDisplayItem(container3Layer, DisplayItem::EndSubsequence), |
186 TestDisplayItem(container1Layer, DisplayItem::Subsequence), | 151 TestDisplayItem(htmlLayer, DisplayItem::EndSubsequence), |
187 TestDisplayItem(container1, backgroundType), | 152 TestDisplayItem(rootLayer, DisplayItem::EndSubsequence)); |
188 TestDisplayItem(content1, backgroundType), | |
189 TestDisplayItem(container1Layer, DisplayItem::EndSubsequence), | |
190 TestDisplayItem(container2Layer, DisplayItem::Subsequence), | |
191 TestDisplayItem(container2, backgroundType), | |
192 TestDisplayItem(content2a, backgroundType), | |
193 TestDisplayItem(container2Layer, DisplayItem::EndSubsequence), | |
194 TestDisplayItem(container3Layer, DisplayItem::Subsequence), | |
195 TestDisplayItem(container3, backgroundType), | |
196 TestDisplayItem(content3, backgroundType), | |
197 TestDisplayItem(container3Layer, DisplayItem::EndSubsequence), | |
198 TestDisplayItem(htmlLayer, DisplayItem::EndSubsequence), | |
199 TestDisplayItem(rootLayer, DisplayItem::EndSubsequence)); | |
200 } | |
201 | 153 |
202 updateLifecyclePhasesBeforePaint(); | 154 updateLifecyclePhasesBeforePaint(); |
203 IntRect newInterestRect(0, 100, 300, 1000); | 155 IntRect newInterestRect(0, 100, 300, 1000); |
204 paint(&newInterestRect); | 156 paint(&newInterestRect); |
205 | 157 |
206 // Container1 becomes partly in the interest rect, but uses cached subsequen
ce | 158 // Container1 becomes partly in the interest rect, but uses cached subsequen
ce |
207 // because it was fully painted before; | 159 // because it was fully painted before; |
208 // Container2's intersection with the interest rect changes; | 160 // Container2's intersection with the interest rect changes; |
209 // Content2b is out of the interest rect and outputs nothing; | 161 // Content2b is out of the interest rect and outputs nothing; |
210 // Container3 becomes out of the interest rect and outputs nothing. | 162 // Container3 becomes out of the interest rect and outputs nothing. |
211 | 163 EXPECT_DISPLAY_LIST(rootPaintController().newDisplayItemList(), 11, |
212 if (rootLayerScrolls) { | 164 TestDisplayItem(rootLayer, DisplayItem::Subsequence), |
213 EXPECT_DISPLAY_LIST(rootPaintController().newDisplayItemList(), 8, | 165 TestDisplayItem(layoutView(), cachedBackgroundType), |
214 TestDisplayItem(rootLayer, DisplayItem::Subsequence), | 166 TestDisplayItem(htmlLayer, DisplayItem::Subsequence), |
215 TestDisplayItem(layoutView(), cachedBackgroundType), | 167 TestDisplayItem(container1Layer, DisplayItem::CachedSubsequence), |
216 TestDisplayItem(container1, cachedBackgroundType), | 168 TestDisplayItem(container2Layer, DisplayItem::Subsequence), |
217 TestDisplayItem(content1, cachedBackgroundType), | 169 TestDisplayItem(container2, cachedBackgroundType), |
218 TestDisplayItem(container2, cachedBackgroundType), | 170 TestDisplayItem(content2a, cachedBackgroundType), |
219 TestDisplayItem(content2a, cachedBackgroundType), | 171 TestDisplayItem(content2b, backgroundType), |
220 TestDisplayItem(content2b, backgroundType), | 172 TestDisplayItem(container2Layer, DisplayItem::EndSubsequence), |
221 TestDisplayItem(rootLayer, DisplayItem::EndSubsequence)); | 173 TestDisplayItem(htmlLayer, DisplayItem::EndSubsequence), |
222 } else { | 174 TestDisplayItem(rootLayer, DisplayItem::EndSubsequence)); |
223 EXPECT_DISPLAY_LIST(rootPaintController().newDisplayItemList(), 11, | |
224 TestDisplayItem(rootLayer, DisplayItem::Subsequence), | |
225 TestDisplayItem(layoutView(), cachedBackgroundType), | |
226 TestDisplayItem(htmlLayer, DisplayItem::Subsequence), | |
227 TestDisplayItem(container1Layer, DisplayItem::CachedSubsequence), | |
228 TestDisplayItem(container2Layer, DisplayItem::Subsequence), | |
229 TestDisplayItem(container2, cachedBackgroundType), | |
230 TestDisplayItem(content2a, cachedBackgroundType), | |
231 TestDisplayItem(content2b, backgroundType), | |
232 TestDisplayItem(container2Layer, DisplayItem::EndSubsequence), | |
233 TestDisplayItem(htmlLayer, DisplayItem::EndSubsequence), | |
234 TestDisplayItem(rootLayer, DisplayItem::EndSubsequence)); | |
235 } | |
236 | 175 |
237 commit(); | 176 commit(); |
238 | 177 |
239 if (rootLayerScrolls) { | 178 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 14, |
240 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 8, | 179 TestDisplayItem(rootLayer, DisplayItem::Subsequence), |
241 TestDisplayItem(rootLayer, DisplayItem::Subsequence), | 180 TestDisplayItem(layoutView(), backgroundType), |
242 TestDisplayItem(layoutView(), backgroundType), | 181 TestDisplayItem(htmlLayer, DisplayItem::Subsequence), |
243 TestDisplayItem(container1, backgroundType), | 182 TestDisplayItem(container1Layer, DisplayItem::Subsequence), |
244 TestDisplayItem(content1, backgroundType), | 183 TestDisplayItem(container1, backgroundType), |
245 TestDisplayItem(container2, backgroundType), | 184 TestDisplayItem(content1, backgroundType), |
246 TestDisplayItem(content2a, backgroundType), | 185 TestDisplayItem(container1Layer, DisplayItem::EndSubsequence), |
247 TestDisplayItem(content2b, backgroundType), | 186 TestDisplayItem(container2Layer, DisplayItem::Subsequence), |
248 TestDisplayItem(rootLayer, DisplayItem::EndSubsequence)); | 187 TestDisplayItem(container2, backgroundType), |
249 } else { | 188 TestDisplayItem(content2a, backgroundType), |
250 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 14, | 189 TestDisplayItem(content2b, backgroundType), |
251 TestDisplayItem(rootLayer, DisplayItem::Subsequence), | 190 TestDisplayItem(container2Layer, DisplayItem::EndSubsequence), |
252 TestDisplayItem(layoutView(), backgroundType), | 191 TestDisplayItem(htmlLayer, DisplayItem::EndSubsequence), |
253 TestDisplayItem(htmlLayer, DisplayItem::Subsequence), | 192 TestDisplayItem(rootLayer, DisplayItem::EndSubsequence)); |
254 TestDisplayItem(container1Layer, DisplayItem::Subsequence), | |
255 TestDisplayItem(container1, backgroundType), | |
256 TestDisplayItem(content1, backgroundType), | |
257 TestDisplayItem(container1Layer, DisplayItem::EndSubsequence), | |
258 TestDisplayItem(container2Layer, DisplayItem::Subsequence), | |
259 TestDisplayItem(container2, backgroundType), | |
260 TestDisplayItem(content2a, backgroundType), | |
261 TestDisplayItem(content2b, backgroundType), | |
262 TestDisplayItem(container2Layer, DisplayItem::EndSubsequence), | |
263 TestDisplayItem(htmlLayer, DisplayItem::EndSubsequence), | |
264 TestDisplayItem(rootLayer, DisplayItem::EndSubsequence)); | |
265 } | |
266 } | 193 } |
267 | 194 |
268 } // namespace blink | 195 } // namespace blink |
OLD | NEW |