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/paint/DisplayItemListPaintTest.h" | 7 #include "core/paint/DisplayItemListPaintTest.h" |
8 #include "platform/graphics/GraphicsContext.h" | 8 #include "platform/graphics/GraphicsContext.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 | 294 |
295 DeprecatedPaintLayer& rootLayer = *layoutView().layer(); | 295 DeprecatedPaintLayer& rootLayer = *layoutView().layer(); |
296 DeprecatedPaintLayer& htmlLayer = *toLayoutBoxModelObject(document().documen
tElement()->layoutObject())->layer(); | 296 DeprecatedPaintLayer& htmlLayer = *toLayoutBoxModelObject(document().documen
tElement()->layoutObject())->layer(); |
297 LayoutObject& container1 = *document().getElementById("container1")->layoutO
bject(); | 297 LayoutObject& container1 = *document().getElementById("container1")->layoutO
bject(); |
298 DeprecatedPaintLayer& container1Layer = *toLayoutBoxModelObject(container1).
layer(); | 298 DeprecatedPaintLayer& container1Layer = *toLayoutBoxModelObject(container1).
layer(); |
299 LayoutObject& container2 = *document().getElementById("container2")->layoutO
bject(); | 299 LayoutObject& container2 = *document().getElementById("container2")->layoutO
bject(); |
300 DeprecatedPaintLayer& container2Layer = *toLayoutBoxModelObject(container2).
layer(); | 300 DeprecatedPaintLayer& container2Layer = *toLayoutBoxModelObject(container2).
layer(); |
301 LayoutObject& container3 = *document().getElementById("container3")->layoutO
bject(); | 301 LayoutObject& container3 = *document().getElementById("container3")->layoutO
bject(); |
302 DeprecatedPaintLayer& container3Layer = *toLayoutBoxModelObject(container3).
layer(); | 302 DeprecatedPaintLayer& container3Layer = *toLayoutBoxModelObject(container3).
layer(); |
303 | 303 |
304 document().view()->updateAllLifecyclePhases(LayoutRect(0, 0, 400, 300)); | 304 document().view()->updateAllLifecyclePhases(DocumentLifecycle::ThrottlingMod
e::Disallow, LayoutRect(0, 0, 400, 300)); |
305 | 305 |
306 // Container1 is fully in the interest rect; | 306 // Container1 is fully in the interest rect; |
307 // Container2 is partly (including its stacking chidren) in the interest rec
t; | 307 // Container2 is partly (including its stacking chidren) in the interest rec
t; |
308 // Content2 is out of the interest rect and output nothing; | 308 // Content2 is out of the interest rect and output nothing; |
309 // Container3 is fully in the interest rect. | 309 // Container3 is fully in the interest rect. |
310 EXPECT_DISPLAY_LIST(rootDisplayItemList().displayItems(), 14, | 310 EXPECT_DISPLAY_LIST(rootDisplayItemList().displayItems(), 14, |
311 TestDisplayItem(rootLayer, DisplayItem::BeginSubsequence), | 311 TestDisplayItem(rootLayer, DisplayItem::BeginSubsequence), |
312 TestDisplayItem(layoutView(), DisplayItem::BoxDecorationBackground), | 312 TestDisplayItem(layoutView(), DisplayItem::BoxDecorationBackground), |
313 TestDisplayItem(htmlLayer, DisplayItem::BeginSubsequence), | 313 TestDisplayItem(htmlLayer, DisplayItem::BeginSubsequence), |
314 TestDisplayItem(container1Layer, DisplayItem::BeginSubsequence), | 314 TestDisplayItem(container1Layer, DisplayItem::BeginSubsequence), |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 TestDisplayItem(container1, DisplayItem::BoxDecorationBackground), | 351 TestDisplayItem(container1, DisplayItem::BoxDecorationBackground), |
352 TestDisplayItem(container1Layer, DisplayItem::EndSubsequence), | 352 TestDisplayItem(container1Layer, DisplayItem::EndSubsequence), |
353 TestDisplayItem(container2Layer, DisplayItem::BeginSubsequence), | 353 TestDisplayItem(container2Layer, DisplayItem::BeginSubsequence), |
354 TestDisplayItem(container2, DisplayItem::BoxDecorationBackground), | 354 TestDisplayItem(container2, DisplayItem::BoxDecorationBackground), |
355 TestDisplayItem(container2Layer, DisplayItem::EndSubsequence), | 355 TestDisplayItem(container2Layer, DisplayItem::EndSubsequence), |
356 TestDisplayItem(htmlLayer, DisplayItem::EndSubsequence), | 356 TestDisplayItem(htmlLayer, DisplayItem::EndSubsequence), |
357 TestDisplayItem(rootLayer, DisplayItem::EndSubsequence)); | 357 TestDisplayItem(rootLayer, DisplayItem::EndSubsequence)); |
358 } | 358 } |
359 | 359 |
360 } // namespace blink | 360 } // namespace blink |
OLD | NEW |