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

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

Issue 2280153002: Refactoring out the code in LayoutTreeAsText::writeLayoutObject. (Closed)
Patch Set: Rename helper Created 4 years, 3 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
Index: third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
index 132b41dd4999e9a53eec4d200af4eaa201f84790..f7cadcaeac6b2e7fe8373aabfa603fde19dc66a0 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
@@ -1041,4 +1041,24 @@ bool LayoutTableCell::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR
return LayoutBlockFlow::backgroundIsKnownToBeOpaqueInRect(localRect);
}
+// FIXME: Deliberately dump the "inner" box of table cells, since that is what
+// current results reflect. We'd like to clean up the results to dump both the
+// outer box and the intrinsic padding so that both bits of information are
+// captured by the results.
+LayoutRect LayoutTableCell::debugRect() const
+{
+ LayoutRect r = LayoutRect(location().x(), location().y() + intrinsicPaddingBefore(), size().width(), size().height() - intrinsicPaddingBefore() - intrinsicPaddingAfter());
skobes 2016/09/09 20:27:41 Wrap this line at the commas for readability.
lunalu1 2016/09/12 14:45:14 Done.
+
+ LayoutBlock* cb = containingBlock();
+ if (cb)
+ cb->adjustChildDebugRect(r);
+
+ return r;
+}
+
+void LayoutTableCell::adjustChildDebugRect(LayoutRect& r) const
+{
+ r.move(0, -intrinsicPaddingBefore());
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698