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

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

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/LayoutObject.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
index dc73053c81ea21d00a0caf54fa45638805215bbe..045504c420623b2cb40aa86c1ed3832ef9af1dc8 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -1366,6 +1366,16 @@ 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
skobes 2016/09/09 20:27:41 The comment should describe what the method does,
lunalu1 2016/09/12 14:45:13 Done.
+ // LayoutBox.
+ virtual LayoutRect debugRect() const
+ {
+ // This method should never be reached as it's overriden by subclasses.
skobes 2016/09/09 20:27:41 Why not just make it pure virtual? Then the compi
lunalu1 2016/09/12 14:45:14 Then I have to write an overriding function for su
skobes 2016/09/12 17:09:35 If there are subclasses that don't override it, th
+ NOTREACHED();
+ LayoutRect r;
+ return r;
+ }
+
// Painters can use const methods only, except for these explicitly declared methods.
class MutableForPainting {
public:

Powered by Google App Engine
This is Rietveld 408576698