| Index: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
|
| index 20b440299a1d9f0efc16e798a2e6cac37a9547f1..e19a8a7664ae6e8dc2a07a34b99d5ab1fd8453aa 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
|
| @@ -107,7 +107,6 @@ static void deriveBorderBoxFromContainerContext(const LayoutObject& object, Pain
|
|
|
| const LayoutBoxModelObject& boxModelObject = toLayoutBoxModelObject(object);
|
|
|
| - // TODO(trchen): There is some insanity going on with tables. Double check results.
|
| switch (object.styleRef().position()) {
|
| case StaticPosition:
|
| break;
|
| @@ -130,8 +129,17 @@ static void deriveBorderBoxFromContainerContext(const LayoutObject& object, Pain
|
| default:
|
| ASSERT_NOT_REACHED();
|
| }
|
| - if (boxModelObject.isBox())
|
| + if (boxModelObject.isBox()) {
|
| context.paintOffset += toLayoutBox(boxModelObject).locationOffset();
|
| + // This is a weird quirk that table cells paint as children of table rows,
|
| + // but their location have the row's location baked-in.
|
| + // Similar adjustment is done in LayoutTableCell::offsetFromContainer().
|
| + if (boxModelObject.isTableCell()) {
|
| + LayoutObject* parentRow = boxModelObject.parent();
|
| + ASSERT(parentRow && parentRow->isTableRow());
|
| + context.paintOffset -= toLayoutBox(parentRow)->locationOffset();
|
| + }
|
| + }
|
| }
|
|
|
| static PassRefPtr<TransformPaintPropertyNode> createPaintOffsetTranslationIfNeeded(const LayoutObject& object, PaintPropertyTreeBuilderContext& context)
|
|
|