| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 { | 119 { |
| 120 if (str.isEmpty()) { | 120 if (str.isEmpty()) { |
| 121 if (m_buttonText) { | 121 if (m_buttonText) { |
| 122 m_buttonText->destroy(); | 122 m_buttonText->destroy(); |
| 123 m_buttonText = 0; | 123 m_buttonText = 0; |
| 124 } | 124 } |
| 125 } else { | 125 } else { |
| 126 if (m_buttonText) | 126 if (m_buttonText) |
| 127 m_buttonText->setText(str.impl()); | 127 m_buttonText->setText(str.impl()); |
| 128 else { | 128 else { |
| 129 m_buttonText = new (renderArena()) RenderTextFragment(document(), st
r.impl()); | 129 m_buttonText = new RenderTextFragment(document(), str.impl()); |
| 130 m_buttonText->setStyle(style()); | 130 m_buttonText->setStyle(style()); |
| 131 addChild(m_buttonText); | 131 addChild(m_buttonText); |
| 132 } | 132 } |
| 133 } | 133 } |
| 134 } | 134 } |
| 135 | 135 |
| 136 String RenderButton::text() const | 136 String RenderButton::text() const |
| 137 { | 137 { |
| 138 return m_buttonText ? m_buttonText->text() : 0; | 138 return m_buttonText ? m_buttonText->text() : 0; |
| 139 } | 139 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 164 // baseline for the empty case manually here. | 164 // baseline for the empty case manually here. |
| 165 if (direction == HorizontalLine) | 165 if (direction == HorizontalLine) |
| 166 return marginTop() + borderTop() + paddingTop() + contentHeight(); | 166 return marginTop() + borderTop() + paddingTop() + contentHeight(); |
| 167 | 167 |
| 168 return marginRight() + borderRight() + paddingRight() + contentWidth(); | 168 return marginRight() + borderRight() + paddingRight() + contentWidth(); |
| 169 } | 169 } |
| 170 return RenderFlexibleBox::baselinePosition(baseline, firstLine, direction, l
inePositionMode); | 170 return RenderFlexibleBox::baselinePosition(baseline, firstLine, direction, l
inePositionMode); |
| 171 } | 171 } |
| 172 | 172 |
| 173 } // namespace WebCore | 173 } // namespace WebCore |
| OLD | NEW |