Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(637)

Unified Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp

Issue 2031873005: [spv2] Account for flipped writing modes in paint offset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Higher expectations Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b215ab15b4383a7d77e484f80a95c6c899f813be..dba877e5fbd228b86a083dd8ffc5f2fbd413f52b 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -345,14 +345,17 @@ static void deriveBorderBoxFromContainerContext(const LayoutObject& object, Pain
ASSERT_NOT_REACHED();
}
if (boxModelObject.isBox()) {
- context.paintOffset += toLayoutBox(boxModelObject).locationOffset();
+ // TODO(pdr): Several calls in this function walk back up the tree to calculate containers
+ // (e.g., topLeftLocation, offsetForInFlowPosition*). The containing block and other
+ // containers can be stored on PaintPropertyTreeBuilderContext instead of recomputing them.
+ context.paintOffset.moveBy(toLayoutBox(boxModelObject).topLeftLocation());
// 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();
+ context.paintOffset.moveBy(-toLayoutBox(parentRow)->topLeftLocation());
}
}
}
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698