OLD | NEW |
1 /** | 1 /** |
2 * Copyright (C) 2005 Apple Computer, Inc. | 2 * Copyright (C) 2005 Apple Computer, Inc. |
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 RenderButton::~RenderButton() | 43 RenderButton::~RenderButton() |
44 { | 44 { |
45 } | 45 } |
46 | 46 |
47 void RenderButton::addChild(RenderObject* newChild, RenderObject* beforeChild) | 47 void RenderButton::addChild(RenderObject* newChild, RenderObject* beforeChild) |
48 { | 48 { |
49 if (!m_inner) { | 49 if (!m_inner) { |
50 // Create an anonymous block. | 50 // Create an anonymous block. |
51 ASSERT(!firstChild()); | 51 ASSERT(!firstChild()); |
52 bool isFlexibleBox = style()->display() == BOX || style()->display() ==
INLINE_BOX; | 52 m_inner = createAnonymousBlock(style()->display()); |
53 m_inner = createAnonymousBlock(isFlexibleBox); | |
54 setupInnerStyle(m_inner->style()); | 53 setupInnerStyle(m_inner->style()); |
55 RenderDeprecatedFlexibleBox::addChild(m_inner); | 54 RenderDeprecatedFlexibleBox::addChild(m_inner); |
56 } | 55 } |
57 | 56 |
58 m_inner->addChild(newChild, beforeChild); | 57 m_inner->addChild(newChild, beforeChild); |
59 } | 58 } |
60 | 59 |
61 void RenderButton::removeChild(RenderObject* oldChild) | 60 void RenderButton::removeChild(RenderObject* oldChild) |
62 { | 61 { |
63 if (oldChild == m_inner || !m_inner) { | 62 if (oldChild == m_inner || !m_inner) { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 // enters the page cache. But we currently have no way of being notified | 168 // enters the page cache. But we currently have no way of being notified |
170 // when that happens, so we'll just ignore the timer firing as long as | 169 // when that happens, so we'll just ignore the timer firing as long as |
171 // we're in the cache. | 170 // we're in the cache. |
172 if (document()->inPageCache()) | 171 if (document()->inPageCache()) |
173 return; | 172 return; |
174 | 173 |
175 repaint(); | 174 repaint(); |
176 } | 175 } |
177 | 176 |
178 } // namespace WebCore | 177 } // namespace WebCore |
OLD | NEW |