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

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

Issue 2280153002: Refactoring out the code in LayoutTreeAsText::writeLayoutObject. (Closed)
Patch Set: Initial commit Created 4 years, 4 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/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index c2163a8009c8d303946bc1a329cfbd8110711df5..4b8982265809017f9cbc51c9aa04a73387368145 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -4866,4 +4866,18 @@ SnapAreaSet* LayoutBox::snapAreas() const
return m_rareData ? m_rareData->m_snapAreas.get() : nullptr;
}
+LayoutRect LayoutBox::debugRect() const
+{
+ LayoutRect r = frameRect();
+
+ // FIXME: Temporary in order to ensure compatibility with existing layout
+ // test results.
+ LayoutBlock* cb = containingBlock();
+ if (cb && cb->isTableCell())
benjhayden 2016/08/29 20:45:27 Should this be moved to a virtual method so that y
lunalu1 2016/08/30 20:35:30 I moved this part to a virtual method but I don't
+ r.move(0, -toLayoutTableCell(containingBlock())->intrinsicPaddingBefore());
+
+ setLayoutRectDimForLayoutView(r);
+ return r;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698