| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |