| Index: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
|
| index 22eb5bdbf61de29c17a1d02a88a0719a8bab20f6..42aac1843e81d5f068738e8be8731ad949367c16 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
|
| @@ -679,4 +679,44 @@ TEST_F(PaintPropertyTreeBuilderTest, TreeContextUnclipFromParentStackingContext)
|
| EXPECT_EQ(scrollerProperties->effect(), childProperties->localBorderBoxProperties()->effect);
|
| }
|
|
|
| +TEST_F(PaintPropertyTreeBuilderTest, TableCellLayoutLocation)
|
| +{
|
| + // This test verifies that the border box space of a table cell is being correctly computed.
|
| + // Table cells have weird location adjustment in our layout/paint implementation.
|
| + setBodyInnerHTML(
|
| + "<style>"
|
| + " body {"
|
| + " margin: 0;"
|
| + " }"
|
| + " table {"
|
| + " border-spacing: 0;"
|
| + " margin: 20px;"
|
| + " padding: 40px;"
|
| + " border: 10px solid black;"
|
| + " }"
|
| + " td {"
|
| + " width: 100px;"
|
| + " height: 100px;"
|
| + " padding: 0;"
|
| + " }"
|
| + " #target {"
|
| + " position: relative;"
|
| + " width: 100px;"
|
| + " height: 100px;"
|
| + " }"
|
| + "</style>"
|
| + "<table>"
|
| + " <tr><td></td><td></td></tr>"
|
| + " <tr><td></td><td><div id='target'></div></td></tr>"
|
| + "</table>"
|
| + );
|
| +
|
| + FrameView* frameView = document().view();
|
| + LayoutObject& target = *document().getElementById("target")->layoutObject();
|
| + ObjectPaintProperties* targetProperties = target.objectPaintProperties();
|
| +
|
| + EXPECT_EQ(LayoutPoint(170, 170), targetProperties->localBorderBoxProperties()->paintOffset);
|
| + EXPECT_EQ(frameView->scrollTranslation(), targetProperties->localBorderBoxProperties()->transform);
|
| +}
|
| +
|
| } // namespace blink
|
|
|