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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutButton.h

Issue 2766943002: Do-not-commit: Count layout tree memory usage
Patch Set: Rebase, add object paint property counter Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005 Apple Computer 2 * Copyright (C) 2005 Apple Computer
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 19 matching lines...) Expand all
30 // LayoutButtons are just like normal flexboxes except that they will generate 30 // LayoutButtons are just like normal flexboxes except that they will generate
31 // an anonymous block child. 31 // an anonymous block child.
32 // For inputs, they will also generate an anonymous LayoutText and keep its 32 // For inputs, they will also generate an anonymous LayoutText and keep its
33 // style and content up to date as the button changes. 33 // style and content up to date as the button changes.
34 class LayoutButton final : public LayoutFlexibleBox { 34 class LayoutButton final : public LayoutFlexibleBox {
35 public: 35 public:
36 explicit LayoutButton(Element*); 36 explicit LayoutButton(Element*);
37 ~LayoutButton() override; 37 ~LayoutButton() override;
38 38
39 const char* name() const override { return "LayoutButton"; } 39 const char* name() const override { return "LayoutButton"; }
40 char objectSize() const override { return sizeof(this); }
40 bool isOfType(LayoutObjectType type) const override { 41 bool isOfType(LayoutObjectType type) const override {
41 return type == LayoutObjectLayoutButton || 42 return type == LayoutObjectLayoutButton ||
42 LayoutFlexibleBox::isOfType(type); 43 LayoutFlexibleBox::isOfType(type);
43 } 44 }
44 45
45 bool canBeSelectionLeaf() const override { 46 bool canBeSelectionLeaf() const override {
46 return node() && hasEditableStyle(*node()); 47 return node() && hasEditableStyle(*node());
47 } 48 }
48 49
49 void addChild(LayoutObject* newChild, 50 void addChild(LayoutObject* newChild,
(...skipping 17 matching lines...) Expand all
67 bool hasLineIfEmpty() const override { return isHTMLInputElement(node()); } 68 bool hasLineIfEmpty() const override { return isHTMLInputElement(node()); }
68 69
69 LayoutBlock* m_inner; 70 LayoutBlock* m_inner;
70 }; 71 };
71 72
72 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutButton, isLayoutButton()); 73 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutButton, isLayoutButton());
73 74
74 } // namespace blink 75 } // namespace blink
75 76
76 #endif // LayoutButton_h 77 #endif // LayoutButton_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698