| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 { | 60 { |
| 61 if (!style.hasAppearance() || openShadowRoot()) | 61 if (!style.hasAppearance() || openShadowRoot()) |
| 62 return LayoutObject::createObject(this, style); | 62 return LayoutObject::createObject(this, style); |
| 63 return new LayoutProgress(this); | 63 return new LayoutProgress(this); |
| 64 } | 64 } |
| 65 | 65 |
| 66 LayoutProgress* HTMLProgressElement::layoutProgress() const | 66 LayoutProgress* HTMLProgressElement::layoutProgress() const |
| 67 { | 67 { |
| 68 if (layoutObject() && layoutObject()->isProgress()) | 68 if (layoutObject() && layoutObject()->isProgress()) |
| 69 return toLayoutProgress(layoutObject()); | 69 return toLayoutProgress(layoutObject()); |
| 70 | 70 return nullptr; |
| 71 LayoutObject* layoutObject = userAgentShadowRoot()->firstChild()->layoutObje
ct(); | |
| 72 ASSERT_WITH_SECURITY_IMPLICATION(!layoutObject || layoutObject->isProgress()
); | |
| 73 return toLayoutProgress(layoutObject); | |
| 74 } | 71 } |
| 75 | 72 |
| 76 void HTMLProgressElement::parseAttribute(const QualifiedName& name, const Atomic
String& oldValue, const AtomicString& value) | 73 void HTMLProgressElement::parseAttribute(const QualifiedName& name, const Atomic
String& oldValue, const AtomicString& value) |
| 77 { | 74 { |
| 78 if (name == valueAttr) { | 75 if (name == valueAttr) { |
| 79 if (oldValue.isNull() != value.isNull()) | 76 if (oldValue.isNull() != value.isNull()) |
| 80 pseudoStateChanged(CSSSelector::PseudoIndeterminate); | 77 pseudoStateChanged(CSSSelector::PseudoIndeterminate); |
| 81 didElementStateChange(); | 78 didElementStateChange(); |
| 82 } else if (name == maxAttr) { | 79 } else if (name == maxAttr) { |
| 83 didElementStateChange(); | 80 didElementStateChange(); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 return !isDeterminate(); | 164 return !isDeterminate(); |
| 168 } | 165 } |
| 169 | 166 |
| 170 DEFINE_TRACE(HTMLProgressElement) | 167 DEFINE_TRACE(HTMLProgressElement) |
| 171 { | 168 { |
| 172 visitor->trace(m_value); | 169 visitor->trace(m_value); |
| 173 LabelableElement::trace(visitor); | 170 LabelableElement::trace(visitor); |
| 174 } | 171 } |
| 175 | 172 |
| 176 } // namespace blink | 173 } // namespace blink |
| OLD | NEW |