| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 void HTMLProgressElement::parseAttribute(const QualifiedName& name, const Atomic
String& value) | 78 void HTMLProgressElement::parseAttribute(const QualifiedName& name, const Atomic
String& value) |
| 79 { | 79 { |
| 80 if (name == valueAttr) | 80 if (name == valueAttr) |
| 81 didElementStateChange(); | 81 didElementStateChange(); |
| 82 else if (name == maxAttr) | 82 else if (name == maxAttr) |
| 83 didElementStateChange(); | 83 didElementStateChange(); |
| 84 else | 84 else |
| 85 LabelableElement::parseAttribute(name, value); | 85 LabelableElement::parseAttribute(name, value); |
| 86 } | 86 } |
| 87 | 87 |
| 88 void HTMLProgressElement::attach(const AttachContext& context) | 88 void HTMLProgressElement::createRenderTree(const AttachContext& context) |
| 89 { | 89 { |
| 90 LabelableElement::attach(context); | 90 LabelableElement::createRenderTree(context); |
| 91 if (RenderProgress* render = renderProgress()) | 91 if (RenderProgress* render = renderProgress()) |
| 92 render->updateFromElement(); | 92 render->updateFromElement(); |
| 93 } | 93 } |
| 94 | 94 |
| 95 double HTMLProgressElement::value() const | 95 double HTMLProgressElement::value() const |
| 96 { | 96 { |
| 97 double value = parseToDoubleForNumberType(fastGetAttribute(valueAttr)); | 97 double value = parseToDoubleForNumberType(fastGetAttribute(valueAttr)); |
| 98 return !std::isfinite(value) || value < 0 ? 0 : std::min(value, max()); | 98 return !std::isfinite(value) || value < 0 ? 0 : std::min(value, max()); |
| 99 } | 99 } |
| 100 | 100 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 163 |
| 164 inner->appendChild(bar); | 164 inner->appendChild(bar); |
| 165 } | 165 } |
| 166 | 166 |
| 167 bool HTMLProgressElement::shouldAppearIndeterminate() const | 167 bool HTMLProgressElement::shouldAppearIndeterminate() const |
| 168 { | 168 { |
| 169 return !isDeterminate(); | 169 return !isDeterminate(); |
| 170 } | 170 } |
| 171 | 171 |
| 172 } // namespace | 172 } // namespace |
| OLD | NEW |