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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 RefPtr<HTMLMeterElement> meter = adoptRef(new HTMLMeterElement(tagName, docu
ment)); | 52 RefPtr<HTMLMeterElement> meter = adoptRef(new HTMLMeterElement(tagName, docu
ment)); |
53 meter->ensureUserAgentShadowRoot(); | 53 meter->ensureUserAgentShadowRoot(); |
54 return meter; | 54 return meter; |
55 } | 55 } |
56 | 56 |
57 RenderObject* HTMLMeterElement::createRenderer(RenderStyle* style) | 57 RenderObject* HTMLMeterElement::createRenderer(RenderStyle* style) |
58 { | 58 { |
59 if (hasAuthorShadowRoot() || !document()->page()->theme()->supportsMeter(sty
le->appearance())) | 59 if (hasAuthorShadowRoot() || !document()->page()->theme()->supportsMeter(sty
le->appearance())) |
60 return RenderObject::createObject(this, style); | 60 return RenderObject::createObject(this, style); |
61 | 61 |
62 return new (document()->renderArena()) RenderMeter(this); | 62 return new RenderMeter(this); |
63 } | 63 } |
64 | 64 |
65 void HTMLMeterElement::parseAttribute(const QualifiedName& name, const AtomicStr
ing& value) | 65 void HTMLMeterElement::parseAttribute(const QualifiedName& name, const AtomicStr
ing& value) |
66 { | 66 { |
67 if (name == valueAttr || name == minAttr || name == maxAttr || name == lowAt
tr || name == highAttr || name == optimumAttr) | 67 if (name == valueAttr || name == minAttr || name == maxAttr || name == lowAt
tr || name == highAttr || name == optimumAttr) |
68 didElementStateChange(); | 68 didElementStateChange(); |
69 else | 69 else |
70 LabelableElement::parseAttribute(name, value); | 70 LabelableElement::parseAttribute(name, value); |
71 } | 71 } |
72 | 72 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 RefPtr<MeterBarElement> bar = MeterBarElement::create(document()); | 230 RefPtr<MeterBarElement> bar = MeterBarElement::create(document()); |
231 m_value = MeterValueElement::create(document()); | 231 m_value = MeterValueElement::create(document()); |
232 m_value->setWidthPercentage(0); | 232 m_value->setWidthPercentage(0); |
233 m_value->updatePseudo(); | 233 m_value->updatePseudo(); |
234 bar->appendChild(m_value, ASSERT_NO_EXCEPTION); | 234 bar->appendChild(m_value, ASSERT_NO_EXCEPTION); |
235 | 235 |
236 inner->appendChild(bar, ASSERT_NO_EXCEPTION); | 236 inner->appendChild(bar, ASSERT_NO_EXCEPTION); |
237 } | 237 } |
238 | 238 |
239 } // namespace | 239 } // namespace |
OLD | NEW |