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 22 matching lines...) Expand all Loading... |
33 // to date as the button changes. | 33 // to date as the button changes. |
34 class RenderButton FINAL : public RenderFlexibleBox { | 34 class RenderButton FINAL : public RenderFlexibleBox { |
35 public: | 35 public: |
36 explicit RenderButton(Element*); | 36 explicit RenderButton(Element*); |
37 virtual ~RenderButton(); | 37 virtual ~RenderButton(); |
38 | 38 |
39 virtual const char* renderName() const OVERRIDE { return "RenderButton"; } | 39 virtual const char* renderName() const OVERRIDE { return "RenderButton"; } |
40 virtual bool isRenderButton() const OVERRIDE { return true; } | 40 virtual bool isRenderButton() const OVERRIDE { return true; } |
41 | 41 |
42 virtual bool canBeSelectionLeaf() const OVERRIDE { return node() && node()->
rendererIsEditable(); } | 42 virtual bool canBeSelectionLeaf() const OVERRIDE { return node() && node()->
rendererIsEditable(); } |
| 43 virtual bool canCollapseAnonymousBlockChild() const OVERRIDE { return true;
} |
43 | 44 |
44 virtual void addChild(RenderObject* newChild, RenderObject *beforeChild = 0)
OVERRIDE; | 45 virtual void addChild(RenderObject* newChild, RenderObject *beforeChild = 0)
OVERRIDE; |
45 virtual void removeChild(RenderObject*) OVERRIDE; | 46 virtual void removeChild(RenderObject*) OVERRIDE; |
46 virtual void removeLeftoverAnonymousBlock(RenderBlock*) OVERRIDE { } | 47 virtual void removeLeftoverAnonymousBlock(RenderBlock*) OVERRIDE { } |
47 virtual bool createsAnonymousWrapper() const OVERRIDE { return true; } | 48 virtual bool createsAnonymousWrapper() const OVERRIDE { return true; } |
48 | 49 |
49 void setupInnerStyle(RenderStyle*); | 50 void setupInnerStyle(RenderStyle*); |
50 | 51 |
51 // <button> should allow whitespace even though RenderFlexibleBox doesn't. | 52 // <button> should allow whitespace even though RenderFlexibleBox doesn't. |
52 virtual bool canHaveWhitespaceChildren() const OVERRIDE { return true; } | 53 virtual bool canHaveWhitespaceChildren() const OVERRIDE { return true; } |
(...skipping 11 matching lines...) Expand all Loading... |
64 virtual bool hasLineIfEmpty() const OVERRIDE { return node() && node()->hasT
agName(HTMLNames::inputTag); } | 65 virtual bool hasLineIfEmpty() const OVERRIDE { return node() && node()->hasT
agName(HTMLNames::inputTag); } |
65 | 66 |
66 RenderBlock* m_inner; | 67 RenderBlock* m_inner; |
67 }; | 68 }; |
68 | 69 |
69 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderButton, isRenderButton()); | 70 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderButton, isRenderButton()); |
70 | 71 |
71 } // namespace WebCore | 72 } // namespace WebCore |
72 | 73 |
73 #endif // RenderButton_h | 74 #endif // RenderButton_h |
OLD | NEW |