| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 { | 50 { |
| 51 } | 51 } |
| 52 | 52 |
| 53 PassRefPtr<HTMLProgressElement> HTMLProgressElement::create(const QualifiedName&
tagName, Document* document) | 53 PassRefPtr<HTMLProgressElement> HTMLProgressElement::create(const QualifiedName&
tagName, Document* document) |
| 54 { | 54 { |
| 55 RefPtr<HTMLProgressElement> progress = adoptRef(new HTMLProgressElement(tagN
ame, document)); | 55 RefPtr<HTMLProgressElement> progress = adoptRef(new HTMLProgressElement(tagN
ame, document)); |
| 56 progress->ensureUserAgentShadowRoot(); | 56 progress->ensureUserAgentShadowRoot(); |
| 57 return progress.release(); | 57 return progress.release(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 RenderObject* HTMLProgressElement::createRenderer(RenderArena* arena, RenderStyl
e* style) | 60 RenderObject* HTMLProgressElement::createRenderer(RenderStyle* style) |
| 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 (arena) RenderProgress(this); | 65 return new RenderProgress(this); |
| 66 } | 66 } |
| 67 | 67 |
| 68 bool HTMLProgressElement::childShouldCreateRenderer(const NodeRenderingContext&
childContext) const | 68 bool HTMLProgressElement::childShouldCreateRenderer(const NodeRenderingContext&
childContext) const |
| 69 { | 69 { |
| 70 return childContext.isOnUpperEncapsulationBoundary() && HTMLElement::childSh
ouldCreateRenderer(childContext); | 70 return childContext.isOnUpperEncapsulationBoundary() && HTMLElement::childSh
ouldCreateRenderer(childContext); |
| 71 } | 71 } |
| 72 | 72 |
| 73 RenderProgress* HTMLProgressElement::renderProgress() const | 73 RenderProgress* HTMLProgressElement::renderProgress() const |
| 74 { | 74 { |
| 75 if (renderer() && renderer()->isProgress()) | 75 if (renderer() && renderer()->isProgress()) |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 inner->appendChild(bar, ASSERT_NO_EXCEPTION); | 166 inner->appendChild(bar, ASSERT_NO_EXCEPTION); |
| 167 } | 167 } |
| 168 | 168 |
| 169 bool HTMLProgressElement::shouldAppearIndeterminate() const | 169 bool HTMLProgressElement::shouldAppearIndeterminate() const |
| 170 { | 170 { |
| 171 return !isDeterminate(); | 171 return !isDeterminate(); |
| 172 } | 172 } |
| 173 | 173 |
| 174 } // namespace | 174 } // namespace |
| OLD | NEW |