OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 void HTMLMeterElement::didElementStateChange() | 181 void HTMLMeterElement::didElementStateChange() |
182 { | 182 { |
183 m_value->setWidthPercentage(valueRatio()*100); | 183 m_value->setWidthPercentage(valueRatio()*100); |
184 m_value->updatePseudo(); | 184 m_value->updatePseudo(); |
185 if (LayoutMeter* render = layoutMeter()) | 185 if (LayoutMeter* render = layoutMeter()) |
186 render->updateFromElement(); | 186 render->updateFromElement(); |
187 } | 187 } |
188 | 188 |
189 LayoutMeter* HTMLMeterElement::layoutMeter() const | 189 LayoutMeter* HTMLMeterElement::layoutMeter() const |
190 { | 190 { |
191 if (renderer() && renderer()->isMeter()) | 191 if (layoutObject() && layoutObject()->isMeter()) |
192 return toLayoutMeter(renderer()); | 192 return toLayoutMeter(layoutObject()); |
193 | 193 |
194 LayoutObject* layoutObject = closedShadowRoot()->firstChild()->renderer(); | 194 LayoutObject* layoutObject = closedShadowRoot()->firstChild()->layoutObject(
); |
195 return toLayoutMeter(layoutObject); | 195 return toLayoutMeter(layoutObject); |
196 } | 196 } |
197 | 197 |
198 void HTMLMeterElement::didAddClosedShadowRoot(ShadowRoot& root) | 198 void HTMLMeterElement::didAddClosedShadowRoot(ShadowRoot& root) |
199 { | 199 { |
200 ASSERT(!m_value); | 200 ASSERT(!m_value); |
201 | 201 |
202 RefPtrWillBeRawPtr<MeterInnerElement> inner = MeterInnerElement::create(docu
ment()); | 202 RefPtrWillBeRawPtr<MeterInnerElement> inner = MeterInnerElement::create(docu
ment()); |
203 root.appendChild(inner); | 203 root.appendChild(inner); |
204 | 204 |
(...skipping 12 matching lines...) Expand all Loading... |
217 lazyReattachIfAttached(); | 217 lazyReattachIfAttached(); |
218 } | 218 } |
219 | 219 |
220 DEFINE_TRACE(HTMLMeterElement) | 220 DEFINE_TRACE(HTMLMeterElement) |
221 { | 221 { |
222 visitor->trace(m_value); | 222 visitor->trace(m_value); |
223 LabelableElement::trace(visitor); | 223 LabelableElement::trace(visitor); |
224 } | 224 } |
225 | 225 |
226 } // namespace | 226 } // namespace |
OLD | NEW |