| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 { | 61 { |
| 62 if (!style->hasAppearance() || hasAuthorShadowRoot()) | 62 if (!style->hasAppearance() || hasAuthorShadowRoot()) |
| 63 return RenderObject::createObject(this, style); | 63 return RenderObject::createObject(this, style); |
| 64 | 64 |
| 65 return new RenderProgress(this); | 65 return new RenderProgress(this); |
| 66 } | 66 } |
| 67 | 67 |
| 68 RenderProgress* HTMLProgressElement::renderProgress() const | 68 RenderProgress* HTMLProgressElement::renderProgress() const |
| 69 { | 69 { |
| 70 if (renderer() && renderer()->isProgress()) | 70 if (renderer() && renderer()->isProgress()) |
| 71 return static_cast<RenderProgress*>(renderer()); | 71 return toRenderProgress(renderer()); |
| 72 | 72 |
| 73 RenderObject* renderObject = userAgentShadowRoot()->firstChild()->renderer()
; | 73 RenderObject* renderObject = userAgentShadowRoot()->firstChild()->renderer()
; |
| 74 ASSERT_WITH_SECURITY_IMPLICATION(!renderObject || renderObject->isProgress()
); | 74 ASSERT_WITH_SECURITY_IMPLICATION(!renderObject || renderObject->isProgress()
); |
| 75 return static_cast<RenderProgress*>(renderObject); | 75 return toRenderProgress(renderObject); |
| 76 } | 76 } |
| 77 | 77 |
| 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); |
| (...skipping 77 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 |