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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.h

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/LayoutObject.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
index c80c9bb0d936bf93b20f0aa2fe4136868db93ae6..c71a89ac6990d64abd562b36b70570f96930525b 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -1365,6 +1365,20 @@ public:
// Called before anonymousChild.setStyle(). Override to set custom styles for the child.
virtual void updateAnonymousChildStyle(const LayoutObject& anonymousChild, ComputedStyle& style) const { }
+ // Fixed implementation for LayoutText, LayoutInline, LayoutTableCell and
+ // LayoutBox.
+ virtual LayoutRect debugRect() const
+ {
+ // This method should never be reached as it's overriden by subclasses.
+ NOTREACHED();
+ LayoutRect r;
+ return r;
+ }
+
+ // Called within debugRect(), shared across LayoutText, LayoutInline,
+ // LayoutTable Cell and LayoutBox.
+ void setLayoutRectDimForLayoutView(LayoutRect&) const;
+
// Painters can use const methods only, except for these explicitly declared methods.
class MutableForPainting {
public:

Powered by Google App Engine
This is Rietveld 408576698