Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp |
| diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp |
| index 73db16f2d022f3215a4de8cdfcbac15ecc48ecf3..2655a8c4cba8225b097233de3b050f12df5c1a51 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintLayerPainterTest.cpp |
| @@ -503,4 +503,21 @@ TEST_P(PaintLayerPainterTest, PaintPhasesUpdateOnBecomingNonSelfPainting) |
| EXPECT_TRUE(htmlLayer.needsPaintPhaseDescendantBlockBackgrounds()); |
| } |
| +TEST_P(PaintLayerPainterTest, TableCollapsedBorderNeedsPaintPhaseDescendantBlockBackgrounds) |
| +{ |
| + // "position: relative" makes the table and td self-painting layers. |
| + // The table's layer should be marked needsPaintPhaseDescendantBlockBackground because it |
| + // will paint collapsed borders in the phase. |
| + setBodyInnerHTML( |
| + "<table id='table' style='position: relative; border-collapse: collapse'>" |
| + " <tr><td style='position: relative; border: 1px solid green'>Cell</td></tr>" |
| + "</table>"); |
| + |
| + LayoutBlock& table = *toLayoutBlock(getLayoutObjectByElementId("table")); |
| + ASSERT_TRUE(table.hasLayer()); |
| + PaintLayer& layer = *table.layer(); |
| + EXPECT_TRUE(layer.isSelfPaintingLayer()); |
| + EXPECT_TRUE(layer.needsPaintPhaseDescendantBlockBackgrounds()); |
|
chrishtr
2016/04/27 19:57:22
Also test that adding the property resuts in setti
Xianzhu
2016/04/27 22:08:38
Done.
|
| +} |
| + |
| } // namespace blink |