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

Unified Diff: third_party/WebKit/Source/core/layout/TracedLayoutObject.cpp

Issue 2503163003: Trace table cell position indicies accurately. (Closed)
Patch Set: logic Created 4 years, 1 month 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 | « no previous file | 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/layout/TracedLayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/TracedLayoutObject.cpp b/third_party/WebKit/Source/core/layout/TracedLayoutObject.cpp
index 84cf0f5d62f5031e3764a1b0d8b2ff155f69481b..96f8cee6f52f68828f16d72f31dd498cb8ca291e 100644
--- a/third_party/WebKit/Source/core/layout/TracedLayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/TracedLayoutObject.cpp
@@ -67,15 +67,25 @@ void dumpToTracedValue(const LayoutObject& object,
tracedValue->setBoolean("childNeeds", object.normalChildNeedsLayout());
if (object.posChildNeedsLayout())
tracedValue->setBoolean("posChildNeeds", object.posChildNeedsLayout());
+
if (object.isTableCell()) {
- const LayoutTableCell& c = toLayoutTableCell(object);
- tracedValue->setDouble("row", c.rowIndex());
- tracedValue->setDouble("col", c.absoluteColumnIndex());
- if (c.rowSpan() != 1)
- tracedValue->setDouble("rowSpan", c.rowSpan());
- if (c.colSpan() != 1)
- tracedValue->setDouble("colSpan", c.colSpan());
+ // Table layout might be dirty if traceGeometry is false.
+ // See https://crbug.com/664271 .
+ if (traceGeometry) {
+ const LayoutTableCell& c = toLayoutTableCell(object);
+ tracedValue->setDouble("row", c.rowIndex());
+ tracedValue->setDouble("col", c.absoluteColumnIndex());
+ if (c.rowSpan() != 1)
+ tracedValue->setDouble("rowSpan", c.rowSpan());
+ if (c.colSpan() != 1)
+ tracedValue->setDouble("colSpan", c.colSpan());
+ } else {
+ // At least indicate that object is a table cell.
+ tracedValue->setDouble("row", 0);
+ tracedValue->setDouble("col", 0);
+ }
}
+
if (object.isAnonymous())
tracedValue->setBoolean("anonymous", object.isAnonymous());
if (object.isRelPositioned())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698