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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp

Issue 1425593007: Separate display item clients for negative and normal/positive z-order children (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Struct DisplayItemClient Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 26 matching lines...) Expand all
37 37
38 bool rootLayerScrolls = document().frame()->settings()->rootLayerScrolls(); 38 bool rootLayerScrolls = document().frame()->settings()->rootLayerScrolls();
39 PaintLayer& rootLayer = *layoutView().layer(); 39 PaintLayer& rootLayer = *layoutView().layer();
40 PaintLayer& htmlLayer = *toLayoutBoxModelObject(document().documentElement() ->layoutObject())->layer(); 40 PaintLayer& htmlLayer = *toLayoutBoxModelObject(document().documentElement() ->layoutObject())->layer();
41 LayoutObject& container1 = *document().getElementById("container1")->layoutO bject(); 41 LayoutObject& container1 = *document().getElementById("container1")->layoutO bject();
42 PaintLayer& container1Layer = *toLayoutBoxModelObject(container1).layer(); 42 PaintLayer& container1Layer = *toLayoutBoxModelObject(container1).layer();
43 LayoutObject& content1 = *document().getElementById("content1")->layoutObjec t(); 43 LayoutObject& content1 = *document().getElementById("content1")->layoutObjec t();
44 LayoutObject& container2 = *document().getElementById("container2")->layoutO bject(); 44 LayoutObject& container2 = *document().getElementById("container2")->layoutO bject();
45 PaintLayer& container2Layer = *toLayoutBoxModelObject(container2).layer(); 45 PaintLayer& container2Layer = *toLayoutBoxModelObject(container2).layer();
46 LayoutObject& content2 = *document().getElementById("content2")->layoutObjec t(); 46 LayoutObject& content2 = *document().getElementById("content2")->layoutObjec t();
47 DisplayItemClientWrapper rootLayerClient(rootLayer.displayItemClientForNorma lAndPositiveZOrderChildren());
48 DisplayItemClientWrapper htmlLayerClient(htmlLayer.displayItemClientForNorma lAndPositiveZOrderChildren());
49 DisplayItemClientWrapper container1LayerClient(container1Layer.displayItemCl ientForNormalAndPositiveZOrderChildren());
50 DisplayItemClientWrapper container2LayerClient(container2Layer.displayItemCl ientForNormalAndPositiveZOrderChildren());
47 51
48 if (rootLayerScrolls) { 52 if (rootLayerScrolls) {
49 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 11, 53 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 11,
50 TestDisplayItem(layoutView(), backgroundType), 54 TestDisplayItem(layoutView(), backgroundType),
51 TestDisplayItem(rootLayer, subsequenceType), 55 TestDisplayItem(rootLayerClient, DisplayItem::Subsequence),
52 TestDisplayItem(container1, backgroundType), 56 TestDisplayItem(container1, backgroundType),
53 TestDisplayItem(container1Layer, subsequenceType), 57 TestDisplayItem(container1LayerClient, DisplayItem::Subsequence),
54 TestDisplayItem(content1, backgroundType), 58 TestDisplayItem(content1, backgroundType),
55 TestDisplayItem(container1Layer, endSubsequenceType), 59 TestDisplayItem(container1LayerClient, DisplayItem::EndSubsequence),
56 TestDisplayItem(container2, backgroundType), 60 TestDisplayItem(container2, backgroundType),
57 TestDisplayItem(container2Layer, subsequenceType), 61 TestDisplayItem(container2LayerClient, DisplayItem::Subsequence),
58 TestDisplayItem(content2, backgroundType), 62 TestDisplayItem(content2, backgroundType),
59 TestDisplayItem(container2Layer, endSubsequenceType), 63 TestDisplayItem(container2LayerClient, DisplayItem::EndSubsequence),
60 TestDisplayItem(rootLayer, endSubsequenceType)); 64 TestDisplayItem(rootLayerClient, DisplayItem::EndSubsequence));
61 } else { 65 } else {
62 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 13, 66 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 13,
63 TestDisplayItem(layoutView(), backgroundType), 67 TestDisplayItem(layoutView(), backgroundType),
64 TestDisplayItem(rootLayer, subsequenceType), 68 TestDisplayItem(rootLayerClient, DisplayItem::Subsequence),
65 TestDisplayItem(htmlLayer, subsequenceType), 69 TestDisplayItem(htmlLayerClient, DisplayItem::Subsequence),
66 TestDisplayItem(container1, backgroundType), 70 TestDisplayItem(container1, backgroundType),
67 TestDisplayItem(container1Layer, subsequenceType), 71 TestDisplayItem(container1LayerClient, DisplayItem::Subsequence),
68 TestDisplayItem(content1, backgroundType), 72 TestDisplayItem(content1, backgroundType),
69 TestDisplayItem(container1Layer, endSubsequenceType), 73 TestDisplayItem(container1LayerClient, DisplayItem::EndSubsequence),
70 TestDisplayItem(container2, backgroundType), 74 TestDisplayItem(container2, backgroundType),
71 TestDisplayItem(container2Layer, subsequenceType), 75 TestDisplayItem(container2LayerClient, DisplayItem::Subsequence),
72 TestDisplayItem(content2, backgroundType), 76 TestDisplayItem(content2, backgroundType),
73 TestDisplayItem(container2Layer, endSubsequenceType), 77 TestDisplayItem(container2LayerClient, DisplayItem::EndSubsequence),
74 TestDisplayItem(htmlLayer, endSubsequenceType), 78 TestDisplayItem(htmlLayerClient, DisplayItem::EndSubsequence),
75 TestDisplayItem(rootLayer, endSubsequenceType)); 79 TestDisplayItem(rootLayerClient, DisplayItem::EndSubsequence));
76 } 80 }
77 81
78 toHTMLElement(content1.node())->setAttribute(HTMLNames::styleAttr, "position : absolute; width: 100px; height: 100px; background-color: green"); 82 toHTMLElement(content1.node())->setAttribute(HTMLNames::styleAttr, "position : absolute; width: 100px; height: 100px; background-color: green");
79 updateLifecyclePhasesBeforePaint(); 83 updateLifecyclePhasesBeforePaint();
80 paint(); 84 paint();
81 85
82 if (rootLayerScrolls) { 86 if (rootLayerScrolls) {
83 EXPECT_DISPLAY_LIST(rootPaintController().newDisplayItemList(), 9, 87 EXPECT_DISPLAY_LIST(rootPaintController().newDisplayItemList(), 9,
84 TestDisplayItem(layoutView(), cachedBackgroundType), 88 TestDisplayItem(layoutView(), cachedBackgroundType),
85 TestDisplayItem(rootLayer, subsequenceType), 89 TestDisplayItem(rootLayerClient, DisplayItem::Subsequence),
86 TestDisplayItem(container1, cachedBackgroundType), 90 TestDisplayItem(container1, cachedBackgroundType),
87 TestDisplayItem(container1Layer, subsequenceType), 91 TestDisplayItem(container1LayerClient, DisplayItem::Subsequence),
88 TestDisplayItem(content1, backgroundType), 92 TestDisplayItem(content1, backgroundType),
89 TestDisplayItem(container1Layer, endSubsequenceType), 93 TestDisplayItem(container1LayerClient, DisplayItem::EndSubsequence),
90 TestDisplayItem(container2, cachedBackgroundType), 94 TestDisplayItem(container2, cachedBackgroundType),
91 TestDisplayItem(container2Layer, cachedSubsequenceType), 95 TestDisplayItem(container2LayerClient, DisplayItem::CachedSubsequenc e),
92 TestDisplayItem(rootLayer, endSubsequenceType)); 96 TestDisplayItem(rootLayerClient, DisplayItem::EndSubsequence));
93 } else { 97 } else {
94 EXPECT_DISPLAY_LIST(rootPaintController().newDisplayItemList(), 11, 98 EXPECT_DISPLAY_LIST(rootPaintController().newDisplayItemList(), 11,
95 TestDisplayItem(layoutView(), cachedBackgroundType), 99 TestDisplayItem(layoutView(), cachedBackgroundType),
96 TestDisplayItem(rootLayer, subsequenceType), 100 TestDisplayItem(rootLayerClient, DisplayItem::Subsequence),
97 TestDisplayItem(htmlLayer, subsequenceType), 101 TestDisplayItem(htmlLayerClient, DisplayItem::Subsequence),
98 TestDisplayItem(container1, cachedBackgroundType), 102 TestDisplayItem(container1, cachedBackgroundType),
99 TestDisplayItem(container1Layer, subsequenceType), 103 TestDisplayItem(container1LayerClient, DisplayItem::Subsequence),
100 TestDisplayItem(content1, backgroundType), 104 TestDisplayItem(content1, backgroundType),
101 TestDisplayItem(container1Layer, endSubsequenceType), 105 TestDisplayItem(container1LayerClient, DisplayItem::EndSubsequence),
102 TestDisplayItem(container2, cachedBackgroundType), 106 TestDisplayItem(container2, cachedBackgroundType),
103 TestDisplayItem(container2Layer, cachedSubsequenceType), 107 TestDisplayItem(container2LayerClient, DisplayItem::CachedSubsequenc e),
104 TestDisplayItem(htmlLayer, endSubsequenceType), 108 TestDisplayItem(htmlLayerClient, DisplayItem::EndSubsequence),
105 TestDisplayItem(rootLayer, endSubsequenceType)); 109 TestDisplayItem(rootLayerClient, DisplayItem::EndSubsequence));
106 } 110 }
107 111
108 commit(); 112 commit();
109 113
110 if (rootLayerScrolls) { 114 if (rootLayerScrolls) {
111 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 11, 115 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 11,
112 TestDisplayItem(layoutView(), backgroundType), 116 TestDisplayItem(layoutView(), backgroundType),
113 TestDisplayItem(rootLayer, subsequenceType), 117 TestDisplayItem(rootLayerClient, DisplayItem::Subsequence),
114 TestDisplayItem(container1, backgroundType), 118 TestDisplayItem(container1, backgroundType),
115 TestDisplayItem(container1Layer, subsequenceType), 119 TestDisplayItem(container1LayerClient, DisplayItem::Subsequence),
116 TestDisplayItem(content1, backgroundType), 120 TestDisplayItem(content1, backgroundType),
117 TestDisplayItem(container1Layer, endSubsequenceType), 121 TestDisplayItem(container1LayerClient, DisplayItem::EndSubsequence),
118 TestDisplayItem(container2, backgroundType), 122 TestDisplayItem(container2, backgroundType),
119 TestDisplayItem(container2Layer, subsequenceType), 123 TestDisplayItem(container2LayerClient, DisplayItem::Subsequence),
120 TestDisplayItem(content2, backgroundType), 124 TestDisplayItem(content2, backgroundType),
121 TestDisplayItem(container2Layer, endSubsequenceType), 125 TestDisplayItem(container2LayerClient, DisplayItem::EndSubsequence),
122 TestDisplayItem(rootLayer, endSubsequenceType)); 126 TestDisplayItem(rootLayerClient, DisplayItem::EndSubsequence));
123 } else { 127 } else {
124 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 13, 128 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 13,
125 TestDisplayItem(layoutView(), backgroundType), 129 TestDisplayItem(layoutView(), backgroundType),
126 TestDisplayItem(rootLayer, subsequenceType), 130 TestDisplayItem(rootLayerClient, DisplayItem::Subsequence),
127 TestDisplayItem(htmlLayer, subsequenceType), 131 TestDisplayItem(htmlLayerClient, DisplayItem::Subsequence),
128 TestDisplayItem(container1, backgroundType), 132 TestDisplayItem(container1, backgroundType),
129 TestDisplayItem(container1Layer, subsequenceType), 133 TestDisplayItem(container1LayerClient, DisplayItem::Subsequence),
130 TestDisplayItem(content1, backgroundType), 134 TestDisplayItem(content1, backgroundType),
131 TestDisplayItem(container1Layer, endSubsequenceType), 135 TestDisplayItem(container1LayerClient, DisplayItem::EndSubsequence),
132 TestDisplayItem(container2, backgroundType), 136 TestDisplayItem(container2, backgroundType),
133 TestDisplayItem(container2Layer, subsequenceType), 137 TestDisplayItem(container2LayerClient, DisplayItem::Subsequence),
134 TestDisplayItem(content2, backgroundType), 138 TestDisplayItem(content2, backgroundType),
135 TestDisplayItem(container2Layer, endSubsequenceType), 139 TestDisplayItem(container2LayerClient, DisplayItem::EndSubsequence),
136 TestDisplayItem(htmlLayer, endSubsequenceType), 140 TestDisplayItem(htmlLayerClient, DisplayItem::EndSubsequence),
137 TestDisplayItem(rootLayer, endSubsequenceType)); 141 TestDisplayItem(rootLayerClient, DisplayItem::EndSubsequence));
138 } 142 }
139 } 143 }
140 144
141 TEST_P(PaintLayerPainterTest, CachedSubsequenceOnInterestRectChange) 145 TEST_P(PaintLayerPainterTest, CachedSubsequenceOnInterestRectChange)
142 { 146 {
143 RuntimeEnabledFeatures::setSlimmingPaintSynchronizedPaintingEnabled(true); 147 RuntimeEnabledFeatures::setSlimmingPaintSynchronizedPaintingEnabled(true);
144 148
145 setBodyInnerHTML( 149 setBodyInnerHTML(
146 "<div id='container1' style='position: relative; z-index: 1; width: 200p x; height: 200px; background-color: blue'>" 150 "<div id='container1' style='position: relative; z-index: 1; width: 200p x; height: 200px; background-color: blue'>"
147 " <div id='content1' style='position: absolute; width: 100px; height: 1 00px; background-color: green'></div>" 151 " <div id='content1' style='position: absolute; width: 100px; height: 1 00px; background-color: green'></div>"
(...skipping 13 matching lines...) Expand all
161 LayoutObject& container1 = *document().getElementById("container1")->layoutO bject(); 165 LayoutObject& container1 = *document().getElementById("container1")->layoutO bject();
162 PaintLayer& container1Layer = *toLayoutBoxModelObject(container1).layer(); 166 PaintLayer& container1Layer = *toLayoutBoxModelObject(container1).layer();
163 LayoutObject& content1 = *document().getElementById("content1")->layoutObjec t(); 167 LayoutObject& content1 = *document().getElementById("content1")->layoutObjec t();
164 LayoutObject& container2 = *document().getElementById("container2")->layoutO bject(); 168 LayoutObject& container2 = *document().getElementById("container2")->layoutO bject();
165 PaintLayer& container2Layer = *toLayoutBoxModelObject(container2).layer(); 169 PaintLayer& container2Layer = *toLayoutBoxModelObject(container2).layer();
166 LayoutObject& content2a = *document().getElementById("content2a")->layoutObj ect(); 170 LayoutObject& content2a = *document().getElementById("content2a")->layoutObj ect();
167 LayoutObject& content2b = *document().getElementById("content2b")->layoutObj ect(); 171 LayoutObject& content2b = *document().getElementById("content2b")->layoutObj ect();
168 LayoutObject& container3 = *document().getElementById("container3")->layoutO bject(); 172 LayoutObject& container3 = *document().getElementById("container3")->layoutO bject();
169 PaintLayer& container3Layer = *toLayoutBoxModelObject(container3).layer(); 173 PaintLayer& container3Layer = *toLayoutBoxModelObject(container3).layer();
170 LayoutObject& content3 = *document().getElementById("content3")->layoutObjec t(); 174 LayoutObject& content3 = *document().getElementById("content3")->layoutObjec t();
175 DisplayItemClientWrapper rootLayerClient(rootLayer.displayItemClientForNorma lAndPositiveZOrderChildren());
176 DisplayItemClientWrapper htmlLayerClient(htmlLayer.displayItemClientForNorma lAndPositiveZOrderChildren());
177 DisplayItemClientWrapper container1LayerClient(container1Layer.displayItemCl ientForNormalAndPositiveZOrderChildren());
178 DisplayItemClientWrapper container2LayerClient(container2Layer.displayItemCl ientForNormalAndPositiveZOrderChildren());
179 DisplayItemClientWrapper container3LayerClient(container3Layer.displayItemCl ientForNormalAndPositiveZOrderChildren());
171 180
172 updateLifecyclePhasesBeforePaint(); 181 updateLifecyclePhasesBeforePaint();
173 IntRect interestRect(0, 0, 400, 300); 182 IntRect interestRect(0, 0, 400, 300);
174 paint(&interestRect); 183 paint(&interestRect);
175 commit(); 184 commit();
176 185
177 // Container1 is fully in the interest rect; 186 // Container1 is fully in the interest rect;
178 // Container2 is partly (including its stacking chidren) in the interest rec t; 187 // Container2 is partly (including its stacking chidren) in the interest rec t;
179 // Content2b is out of the interest rect and output nothing; 188 // Content2b is out of the interest rect and output nothing;
180 // Container3 is partly in the interest rect. 189 // Container3 is partly in the interest rect.
181 if (rootLayerScrolls) { 190 if (rootLayerScrolls) {
182 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 15, 191 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 15,
183 TestDisplayItem(layoutView(), backgroundType), 192 TestDisplayItem(layoutView(), backgroundType),
184 TestDisplayItem(rootLayer, subsequenceType), 193 TestDisplayItem(rootLayerClient, DisplayItem::Subsequence),
185 TestDisplayItem(container1, backgroundType), 194 TestDisplayItem(container1, backgroundType),
186 TestDisplayItem(container1Layer, subsequenceType), 195 TestDisplayItem(container1LayerClient, DisplayItem::Subsequence),
187 TestDisplayItem(content1, backgroundType), 196 TestDisplayItem(content1, backgroundType),
188 TestDisplayItem(container1Layer, endSubsequenceType), 197 TestDisplayItem(container1LayerClient, DisplayItem::EndSubsequence),
189 TestDisplayItem(container2, backgroundType), 198 TestDisplayItem(container2, backgroundType),
190 TestDisplayItem(container2Layer, subsequenceType), 199 TestDisplayItem(container2LayerClient, DisplayItem::Subsequence),
191 TestDisplayItem(content2a, backgroundType), 200 TestDisplayItem(content2a, backgroundType),
192 TestDisplayItem(container2Layer, endSubsequenceType), 201 TestDisplayItem(container2LayerClient, DisplayItem::EndSubsequence),
193 TestDisplayItem(container3, backgroundType), 202 TestDisplayItem(container3, backgroundType),
194 TestDisplayItem(container3Layer, subsequenceType), 203 TestDisplayItem(container3LayerClient, DisplayItem::Subsequence),
195 TestDisplayItem(content3, backgroundType), 204 TestDisplayItem(content3, backgroundType),
196 TestDisplayItem(container3Layer, endSubsequenceType), 205 TestDisplayItem(container3LayerClient, DisplayItem::EndSubsequence),
197 TestDisplayItem(rootLayer, endSubsequenceType)); 206 TestDisplayItem(rootLayerClient, DisplayItem::EndSubsequence));
198 } else { 207 } else {
199 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 17, 208 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 17,
200 TestDisplayItem(layoutView(), backgroundType), 209 TestDisplayItem(layoutView(), backgroundType),
201 TestDisplayItem(rootLayer, subsequenceType), 210 TestDisplayItem(rootLayerClient, DisplayItem::Subsequence),
202 TestDisplayItem(htmlLayer, subsequenceType), 211 TestDisplayItem(htmlLayerClient, DisplayItem::Subsequence),
203 TestDisplayItem(container1, backgroundType), 212 TestDisplayItem(container1, backgroundType),
204 TestDisplayItem(container1Layer, subsequenceType), 213 TestDisplayItem(container1LayerClient, DisplayItem::Subsequence),
205 TestDisplayItem(content1, backgroundType), 214 TestDisplayItem(content1, backgroundType),
206 TestDisplayItem(container1Layer, endSubsequenceType), 215 TestDisplayItem(container1LayerClient, DisplayItem::EndSubsequence),
207 TestDisplayItem(container2, backgroundType), 216 TestDisplayItem(container2, backgroundType),
208 TestDisplayItem(container2Layer, subsequenceType), 217 TestDisplayItem(container2LayerClient, DisplayItem::Subsequence),
209 TestDisplayItem(content2a, backgroundType), 218 TestDisplayItem(content2a, backgroundType),
210 TestDisplayItem(container2Layer, endSubsequenceType), 219 TestDisplayItem(container2LayerClient, DisplayItem::EndSubsequence),
211 TestDisplayItem(container3, backgroundType), 220 TestDisplayItem(container3, backgroundType),
212 TestDisplayItem(container3Layer, subsequenceType), 221 TestDisplayItem(container3LayerClient, DisplayItem::Subsequence),
213 TestDisplayItem(content3, backgroundType), 222 TestDisplayItem(content3, backgroundType),
214 TestDisplayItem(container3Layer, endSubsequenceType), 223 TestDisplayItem(container3LayerClient, DisplayItem::EndSubsequence),
215 TestDisplayItem(htmlLayer, endSubsequenceType), 224 TestDisplayItem(htmlLayerClient, DisplayItem::EndSubsequence),
216 TestDisplayItem(rootLayer, endSubsequenceType)); 225 TestDisplayItem(rootLayerClient, DisplayItem::EndSubsequence));
217 } 226 }
218 227
219 updateLifecyclePhasesBeforePaint(); 228 updateLifecyclePhasesBeforePaint();
220 IntRect newInterestRect(0, 100, 300, 1000); 229 IntRect newInterestRect(0, 100, 300, 1000);
221 paint(&newInterestRect); 230 paint(&newInterestRect);
222 231
223 // Container1 becomes partly in the interest rect, but uses cached subsequen ce 232 // Container1 becomes partly in the interest rect, but uses cached subsequen ce
224 // because it was fully painted before; 233 // because it was fully painted before;
225 // Container2's intersection with the interest rect changes; 234 // Container2's intersection with the interest rect changes;
226 // Content2b is out of the interest rect and outputs nothing; 235 // Content2b is out of the interest rect and outputs nothing;
227 // Container3 becomes out of the interest rect and outputs nothing. 236 // Container3 becomes out of the interest rect and outputs nothing.
228 237
229 if (rootLayerScrolls) { 238 if (rootLayerScrolls) {
230 EXPECT_DISPLAY_LIST(rootPaintController().newDisplayItemList(), 10, 239 EXPECT_DISPLAY_LIST(rootPaintController().newDisplayItemList(), 10,
231 TestDisplayItem(layoutView(), cachedBackgroundType), 240 TestDisplayItem(layoutView(), cachedBackgroundType),
232 TestDisplayItem(rootLayer, subsequenceType), 241 TestDisplayItem(rootLayerClient, DisplayItem::Subsequence),
233 TestDisplayItem(container1, cachedBackgroundType), 242 TestDisplayItem(container1, cachedBackgroundType),
234 TestDisplayItem(container1Layer, cachedSubsequenceType), 243 TestDisplayItem(container1LayerClient, DisplayItem::CachedSubsequenc e),
235 TestDisplayItem(container2, cachedBackgroundType), 244 TestDisplayItem(container2, cachedBackgroundType),
236 TestDisplayItem(container2Layer, subsequenceType), 245 TestDisplayItem(container2LayerClient, DisplayItem::Subsequence),
237 TestDisplayItem(content2a, cachedBackgroundType), 246 TestDisplayItem(content2a, cachedBackgroundType),
238 TestDisplayItem(content2b, backgroundType), 247 TestDisplayItem(content2b, backgroundType),
239 TestDisplayItem(container2Layer, endSubsequenceType), 248 TestDisplayItem(container2LayerClient, DisplayItem::EndSubsequence),
240 TestDisplayItem(rootLayer, endSubsequenceType)); 249 TestDisplayItem(rootLayerClient, DisplayItem::EndSubsequence));
241 } else { 250 } else {
242 EXPECT_DISPLAY_LIST(rootPaintController().newDisplayItemList(), 12, 251 EXPECT_DISPLAY_LIST(rootPaintController().newDisplayItemList(), 12,
243 TestDisplayItem(layoutView(), cachedBackgroundType), 252 TestDisplayItem(layoutView(), cachedBackgroundType),
244 TestDisplayItem(rootLayer, subsequenceType), 253 TestDisplayItem(rootLayerClient, DisplayItem::Subsequence),
245 TestDisplayItem(htmlLayer, subsequenceType), 254 TestDisplayItem(htmlLayerClient, DisplayItem::Subsequence),
246 TestDisplayItem(container1, cachedBackgroundType), 255 TestDisplayItem(container1, cachedBackgroundType),
247 TestDisplayItem(container1Layer, cachedSubsequenceType), 256 TestDisplayItem(container1LayerClient, DisplayItem::CachedSubsequenc e),
248 TestDisplayItem(container2, cachedBackgroundType), 257 TestDisplayItem(container2, cachedBackgroundType),
249 TestDisplayItem(container2Layer, subsequenceType), 258 TestDisplayItem(container2LayerClient, DisplayItem::Subsequence),
250 TestDisplayItem(content2a, cachedBackgroundType), 259 TestDisplayItem(content2a, cachedBackgroundType),
251 TestDisplayItem(content2b, backgroundType), 260 TestDisplayItem(content2b, backgroundType),
252 TestDisplayItem(container2Layer, endSubsequenceType), 261 TestDisplayItem(container2LayerClient, DisplayItem::EndSubsequence),
253 TestDisplayItem(htmlLayer, endSubsequenceType), 262 TestDisplayItem(htmlLayerClient, DisplayItem::EndSubsequence),
254 TestDisplayItem(rootLayer, endSubsequenceType)); 263 TestDisplayItem(rootLayerClient, DisplayItem::EndSubsequence));
255 } 264 }
256 265
257 commit(); 266 commit();
258 267
259 if (rootLayerScrolls) { 268 if (rootLayerScrolls) {
260 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 12, 269 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 12,
261 TestDisplayItem(layoutView(), backgroundType), 270 TestDisplayItem(layoutView(), backgroundType),
262 TestDisplayItem(rootLayer, subsequenceType), 271 TestDisplayItem(rootLayerClient, DisplayItem::Subsequence),
263 TestDisplayItem(container1, backgroundType), 272 TestDisplayItem(container1, backgroundType),
264 TestDisplayItem(container1Layer, subsequenceType), 273 TestDisplayItem(container1LayerClient, DisplayItem::Subsequence),
265 TestDisplayItem(content1, backgroundType), 274 TestDisplayItem(content1, backgroundType),
266 TestDisplayItem(container1Layer, endSubsequenceType), 275 TestDisplayItem(container1LayerClient, DisplayItem::EndSubsequence),
267 TestDisplayItem(container2, backgroundType), 276 TestDisplayItem(container2, backgroundType),
268 TestDisplayItem(container2Layer, subsequenceType), 277 TestDisplayItem(container2LayerClient, DisplayItem::Subsequence),
269 TestDisplayItem(content2a, backgroundType), 278 TestDisplayItem(content2a, backgroundType),
270 TestDisplayItem(content2b, backgroundType), 279 TestDisplayItem(content2b, backgroundType),
271 TestDisplayItem(container2Layer, endSubsequenceType), 280 TestDisplayItem(container2LayerClient, DisplayItem::EndSubsequence),
272 TestDisplayItem(rootLayer, endSubsequenceType)); 281 TestDisplayItem(rootLayerClient, DisplayItem::EndSubsequence));
273 } else { 282 } else {
274 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 14, 283 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 14,
275 TestDisplayItem(layoutView(), backgroundType), 284 TestDisplayItem(layoutView(), backgroundType),
276 TestDisplayItem(rootLayer, subsequenceType), 285 TestDisplayItem(rootLayerClient, DisplayItem::Subsequence),
277 TestDisplayItem(htmlLayer, subsequenceType), 286 TestDisplayItem(htmlLayerClient, DisplayItem::Subsequence),
278 TestDisplayItem(container1, backgroundType), 287 TestDisplayItem(container1, backgroundType),
279 TestDisplayItem(container1Layer, subsequenceType), 288 TestDisplayItem(container1LayerClient, DisplayItem::Subsequence),
280 TestDisplayItem(content1, backgroundType), 289 TestDisplayItem(content1, backgroundType),
281 TestDisplayItem(container1Layer, endSubsequenceType), 290 TestDisplayItem(container1LayerClient, DisplayItem::EndSubsequence),
282 TestDisplayItem(container2, backgroundType), 291 TestDisplayItem(container2, backgroundType),
283 TestDisplayItem(container2Layer, subsequenceType), 292 TestDisplayItem(container2LayerClient, DisplayItem::Subsequence),
284 TestDisplayItem(content2a, backgroundType), 293 TestDisplayItem(content2a, backgroundType),
285 TestDisplayItem(content2b, backgroundType), 294 TestDisplayItem(content2b, backgroundType),
286 TestDisplayItem(container2Layer, endSubsequenceType), 295 TestDisplayItem(container2LayerClient, DisplayItem::EndSubsequence),
287 TestDisplayItem(htmlLayer, endSubsequenceType), 296 TestDisplayItem(htmlLayerClient, DisplayItem::EndSubsequence),
288 TestDisplayItem(rootLayer, endSubsequenceType)); 297 TestDisplayItem(rootLayerClient, DisplayItem::EndSubsequence));
289 } 298 }
290 } 299 }
291 300
292 } // namespace blink 301 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698