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 |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 * Library General Public License for more details. | 12 * Library General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU Library General Public License | 14 * You should have received a copy of the GNU Library General Public License |
15 * along with this library; see the file COPYING.LIB. If not, write to | 15 * along with this library; see the file COPYING.LIB. If not, write to |
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
17 * Boston, MA 02110-1301, USA. | 17 * Boston, MA 02110-1301, USA. |
18 * | 18 * |
19 */ | 19 */ |
20 | 20 |
21 #ifndef RenderButton_h | 21 #ifndef RenderButton_h |
22 #define RenderButton_h | 22 #define RenderButton_h |
23 | 23 |
24 #include "core/html/HTMLInputElement.h" | 24 #include "core/html/HTMLInputElement.h" |
25 #include "core/rendering/RenderFlexibleBox.h" | 25 #include "core/rendering/RenderFlexibleBox.h" |
26 | 26 |
27 namespace WebCore { | 27 namespace WebCore { |
28 | 28 |
29 class RenderTextFragment; | |
30 | |
31 // RenderButtons are just like normal flexboxes except that they will generate a
n anonymous block child. | 29 // RenderButtons are just like normal flexboxes except that they will generate a
n anonymous block child. |
32 // For inputs, they will also generate an anonymous RenderText and keep its styl
e and content up | 30 // For inputs, they will also generate an anonymous RenderText and keep its styl
e and content up |
33 // to date as the button changes. | 31 // to date as the button changes. |
34 class RenderButton FINAL : public RenderFlexibleBox { | 32 class RenderButton FINAL : public RenderFlexibleBox { |
35 public: | 33 public: |
36 explicit RenderButton(Element*); | 34 explicit RenderButton(Element*); |
37 virtual ~RenderButton(); | 35 virtual ~RenderButton(); |
38 | 36 |
39 virtual const char* renderName() const OVERRIDE { return "RenderButton"; } | 37 virtual const char* renderName() const OVERRIDE { return "RenderButton"; } |
40 virtual bool isRenderButton() const OVERRIDE { return true; } | 38 virtual bool isRenderButton() const OVERRIDE { return true; } |
(...skipping 24 matching lines...) Expand all Loading... |
65 virtual bool hasLineIfEmpty() const OVERRIDE { return isHTMLInputElement(nod
e()); } | 63 virtual bool hasLineIfEmpty() const OVERRIDE { return isHTMLInputElement(nod
e()); } |
66 | 64 |
67 RenderBlock* m_inner; | 65 RenderBlock* m_inner; |
68 }; | 66 }; |
69 | 67 |
70 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderButton, isRenderButton()); | 68 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderButton, isRenderButton()); |
71 | 69 |
72 } // namespace WebCore | 70 } // namespace WebCore |
73 | 71 |
74 #endif // RenderButton_h | 72 #endif // RenderButton_h |
OLD | NEW |