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 render->updateFromElement(); | 143 render->updateFromElement(); |
144 if (wasDeterminate != isDeterminate()) | 144 if (wasDeterminate != isDeterminate()) |
145 didAffectSelector(AffectedSelectorIndeterminate); | 145 didAffectSelector(AffectedSelectorIndeterminate); |
146 } | 146 } |
147 } | 147 } |
148 | 148 |
149 void HTMLProgressElement::didAddUserAgentShadowRoot(ShadowRoot* root) | 149 void HTMLProgressElement::didAddUserAgentShadowRoot(ShadowRoot* root) |
150 { | 150 { |
151 ASSERT(!m_value); | 151 ASSERT(!m_value); |
152 | 152 |
153 RefPtr<ProgressInnerElement> inner = ProgressInnerElement::create(document()
); | 153 RefPtr<ProgressInnerElement> inner = ProgressInnerElement::create(&document(
)); |
154 inner->setPart(AtomicString("-webkit-progress-inner-element", AtomicString::
ConstructFromLiteral)); | 154 inner->setPart(AtomicString("-webkit-progress-inner-element", AtomicString::
ConstructFromLiteral)); |
155 root->appendChild(inner); | 155 root->appendChild(inner); |
156 | 156 |
157 RefPtr<ProgressBarElement> bar = ProgressBarElement::create(document()); | 157 RefPtr<ProgressBarElement> bar = ProgressBarElement::create(&document()); |
158 bar->setPart(AtomicString("-webkit-progress-bar", AtomicString::ConstructFro
mLiteral)); | 158 bar->setPart(AtomicString("-webkit-progress-bar", AtomicString::ConstructFro
mLiteral)); |
159 RefPtr<ProgressValueElement> value = ProgressValueElement::create(document()
); | 159 RefPtr<ProgressValueElement> value = ProgressValueElement::create(&document(
)); |
160 m_value = value.get(); | 160 m_value = value.get(); |
161 m_value->setPart(AtomicString("-webkit-progress-value", AtomicString::Constr
uctFromLiteral)); | 161 m_value->setPart(AtomicString("-webkit-progress-value", AtomicString::Constr
uctFromLiteral)); |
162 m_value->setWidthPercentage(HTMLProgressElement::IndeterminatePosition * 100
); | 162 m_value->setWidthPercentage(HTMLProgressElement::IndeterminatePosition * 100
); |
163 bar->appendChild(m_value); | 163 bar->appendChild(m_value); |
164 | 164 |
165 inner->appendChild(bar); | 165 inner->appendChild(bar); |
166 } | 166 } |
167 | 167 |
168 bool HTMLProgressElement::shouldAppearIndeterminate() const | 168 bool HTMLProgressElement::shouldAppearIndeterminate() const |
169 { | 169 { |
170 return !isDeterminate(); | 170 return !isDeterminate(); |
171 } | 171 } |
172 | 172 |
173 } // namespace | 173 } // namespace |
OLD | NEW |