| 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 | 52 |
| 53 RawPtr<HTMLProgressElement> HTMLProgressElement::create(Document& document) | 53 RawPtr<HTMLProgressElement> HTMLProgressElement::create(Document& document) |
| 54 { | 54 { |
| 55 RawPtr<HTMLProgressElement> progress = new HTMLProgressElement(document); | 55 RawPtr<HTMLProgressElement> progress = new HTMLProgressElement(document); |
| 56 progress->ensureUserAgentShadowRoot(); | 56 progress->ensureUserAgentShadowRoot(); |
| 57 return progress.release(); | 57 return progress.release(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 LayoutObject* HTMLProgressElement::createLayoutObject(const ComputedStyle& style
) | 60 LayoutObject* HTMLProgressElement::createLayoutObject(const ComputedStyle& style
) |
| 61 { | 61 { |
| 62 if (!style.hasAppearance() || openShadowRoot()) | 62 if (!style.hasAppearance()) { |
| 63 UseCounter::count(document(), UseCounter::ProgressElementWithNoneAppeara
nce); |
| 63 return LayoutObject::createObject(this, style); | 64 return LayoutObject::createObject(this, style); |
| 65 } |
| 66 UseCounter::count(document(), UseCounter::ProgressElementWithProgressBarAppe
arance); |
| 64 return new LayoutProgress(this); | 67 return new LayoutProgress(this); |
| 65 } | 68 } |
| 66 | 69 |
| 67 LayoutProgress* HTMLProgressElement::layoutProgress() const | 70 LayoutProgress* HTMLProgressElement::layoutProgress() const |
| 68 { | 71 { |
| 69 if (layoutObject() && layoutObject()->isProgress()) | 72 if (layoutObject() && layoutObject()->isProgress()) |
| 70 return toLayoutProgress(layoutObject()); | 73 return toLayoutProgress(layoutObject()); |
| 71 | 74 |
| 72 LayoutObject* layoutObject = userAgentShadowRoot()->firstChild()->layoutObje
ct(); | 75 LayoutObject* layoutObject = userAgentShadowRoot()->firstChild()->layoutObje
ct(); |
| 73 ASSERT_WITH_SECURITY_IMPLICATION(!layoutObject || layoutObject->isProgress()
); | 76 ASSERT_WITH_SECURITY_IMPLICATION(!layoutObject || layoutObject->isProgress()
); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 return !isDeterminate(); | 172 return !isDeterminate(); |
| 170 } | 173 } |
| 171 | 174 |
| 172 DEFINE_TRACE(HTMLProgressElement) | 175 DEFINE_TRACE(HTMLProgressElement) |
| 173 { | 176 { |
| 174 visitor->trace(m_value); | 177 visitor->trace(m_value); |
| 175 LabelableElement::trace(visitor); | 178 LabelableElement::trace(visitor); |
| 176 } | 179 } |
| 177 | 180 |
| 178 } // namespace blink | 181 } // namespace blink |
| OLD | NEW |