| 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/PaintControllerPaintTest.h" | 7 #include "core/paint/PaintControllerPaintTest.h" |
| 8 #include "core/paint/PaintLayerPainter.h" | 8 #include "core/paint/PaintLayerPainter.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 "</style>" | 23 "</style>" |
| 24 "<table>" | 24 "<table>" |
| 25 " <tr><td id='cell1'></td></tr>" | 25 " <tr><td id='cell1'></td></tr>" |
| 26 " <tr><td id='cell2'></td></tr>" | 26 " <tr><td id='cell2'></td></tr>" |
| 27 "</table>"); | 27 "</table>"); |
| 28 | 28 |
| 29 LayoutView& layoutView = *document().layoutView(); | 29 LayoutView& layoutView = *document().layoutView(); |
| 30 PaintLayer& rootLayer = *layoutView.layer(); | 30 PaintLayer& rootLayer = *layoutView.layer(); |
| 31 LayoutObject& cell1 = *document().getElementById("cell1")->layoutObject(); | 31 LayoutObject& cell1 = *document().getElementById("cell1")->layoutObject(); |
| 32 LayoutObject& cell2 = *document().getElementById("cell2")->layoutObject(); | 32 LayoutObject& cell2 = *document().getElementById("cell2")->layoutObject(); |
| 33 DisplayItemClientWrapper rootLayerClient(rootLayer.displayItemClientForNorma
lAndPositiveZOrderChildren()); |
| 33 | 34 |
| 34 rootPaintController().invalidateAll(); | 35 rootPaintController().invalidateAll(); |
| 35 updateLifecyclePhasesBeforePaint(); | 36 updateLifecyclePhasesBeforePaint(); |
| 36 IntRect interestRect(0, 0, 200, 200); | 37 IntRect interestRect(0, 0, 200, 200); |
| 37 paint(&interestRect); | 38 paint(&interestRect); |
| 38 commit(); | 39 commit(); |
| 39 | 40 |
| 40 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 4, | 41 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 4, |
| 41 TestDisplayItem(layoutView, DisplayItem::BoxDecorationBackground), | 42 TestDisplayItem(layoutView, DisplayItem::BoxDecorationBackground), |
| 42 TestDisplayItem(rootLayer, subsequenceType), | 43 TestDisplayItem(rootLayerClient, DisplayItem::Subsequence), |
| 43 TestDisplayItem(cell1, DisplayItem::TableCellBackgroundFromRow), | 44 TestDisplayItem(cell1, DisplayItem::TableCellBackgroundFromRow), |
| 44 TestDisplayItem(rootLayer, endSubsequenceType)); | 45 TestDisplayItem(rootLayerClient, DisplayItem::EndSubsequence)); |
| 45 | 46 |
| 46 updateLifecyclePhasesBeforePaint(); | 47 updateLifecyclePhasesBeforePaint(); |
| 47 interestRect = IntRect(0, 300, 200, 1000); | 48 interestRect = IntRect(0, 300, 200, 1000); |
| 48 paint(&interestRect); | 49 paint(&interestRect); |
| 49 commit(); | 50 commit(); |
| 50 | 51 |
| 51 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 4, | 52 EXPECT_DISPLAY_LIST(rootPaintController().displayItemList(), 4, |
| 52 TestDisplayItem(layoutView, DisplayItem::BoxDecorationBackground), | 53 TestDisplayItem(layoutView, DisplayItem::BoxDecorationBackground), |
| 53 TestDisplayItem(rootLayer, subsequenceType), | 54 TestDisplayItem(rootLayerClient, DisplayItem::Subsequence), |
| 54 TestDisplayItem(cell2, DisplayItem::TableCellBackgroundFromRow), | 55 TestDisplayItem(cell2, DisplayItem::TableCellBackgroundFromRow), |
| 55 TestDisplayItem(rootLayer, endSubsequenceType)); | 56 TestDisplayItem(rootLayerClient, DisplayItem::EndSubsequence)); |
| 56 } | 57 } |
| 57 | 58 |
| 58 } // namespace blink | 59 } // namespace blink |
| OLD | NEW |