| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 if (wasDeterminate != isDeterminate()) | 143 if (wasDeterminate != isDeterminate()) |
| 144 pseudoStateChanged(CSSSelector::PseudoIndeterminate); | 144 pseudoStateChanged(CSSSelector::PseudoIndeterminate); |
| 145 } | 145 } |
| 146 } | 146 } |
| 147 | 147 |
| 148 void HTMLProgressElement::didAddUserAgentShadowRoot(ShadowRoot& root) | 148 void HTMLProgressElement::didAddUserAgentShadowRoot(ShadowRoot& root) |
| 149 { | 149 { |
| 150 ASSERT(!m_value); | 150 ASSERT(!m_value); |
| 151 | 151 |
| 152 RefPtrWillBeRawPtr<ProgressInnerElement> inner = ProgressInnerElement::creat
e(document()); | 152 RefPtrWillBeRawPtr<ProgressInnerElement> inner = ProgressInnerElement::creat
e(document()); |
| 153 inner->setShadowPseudoId(AtomicString("-webkit-progress-inner-element", Atom
icString::ConstructFromLiteral)); | 153 inner->setShadowPseudoId(AtomicString("-webkit-progress-inner-element")); |
| 154 root.appendChild(inner); | 154 root.appendChild(inner); |
| 155 | 155 |
| 156 RefPtrWillBeRawPtr<ProgressBarElement> bar = ProgressBarElement::create(docu
ment()); | 156 RefPtrWillBeRawPtr<ProgressBarElement> bar = ProgressBarElement::create(docu
ment()); |
| 157 bar->setShadowPseudoId(AtomicString("-webkit-progress-bar", AtomicString::Co
nstructFromLiteral)); | 157 bar->setShadowPseudoId(AtomicString("-webkit-progress-bar")); |
| 158 RefPtrWillBeRawPtr<ProgressValueElement> value = ProgressValueElement::creat
e(document()); | 158 RefPtrWillBeRawPtr<ProgressValueElement> value = ProgressValueElement::creat
e(document()); |
| 159 m_value = value.get(); | 159 m_value = value.get(); |
| 160 m_value->setShadowPseudoId(AtomicString("-webkit-progress-value", AtomicStri
ng::ConstructFromLiteral)); | 160 m_value->setShadowPseudoId(AtomicString("-webkit-progress-value")); |
| 161 m_value->setWidthPercentage(HTMLProgressElement::IndeterminatePosition * 100
); | 161 m_value->setWidthPercentage(HTMLProgressElement::IndeterminatePosition * 100
); |
| 162 bar->appendChild(m_value); | 162 bar->appendChild(m_value); |
| 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 DEFINE_TRACE(HTMLProgressElement) | 172 DEFINE_TRACE(HTMLProgressElement) |
| 173 { | 173 { |
| 174 visitor->trace(m_value); | 174 visitor->trace(m_value); |
| 175 LabelableElement::trace(visitor); | 175 LabelableElement::trace(visitor); |
| 176 } | 176 } |
| 177 | 177 |
| 178 } // namespace blink | 178 } // namespace blink |
| OLD | NEW |