Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: Source/WebCore/html/HTMLProgressElement.cpp

Issue 10448068: Merge 118236 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 134
135 bool HTMLProgressElement::isDeterminate() const 135 bool HTMLProgressElement::isDeterminate() const
136 { 136 {
137 return fastHasAttribute(valueAttr); 137 return fastHasAttribute(valueAttr);
138 } 138 }
139 139
140 void HTMLProgressElement::didElementStateChange() 140 void HTMLProgressElement::didElementStateChange()
141 { 141 {
142 m_value->setWidthPercentage(position() * 100); 142 m_value->setWidthPercentage(position() * 100);
143 if (renderer()) { 143 if (renderer() && renderer()->isProgress()) {
144 RenderProgress* render = toRenderProgress(renderer()); 144 RenderProgress* render = toRenderProgress(renderer());
145 bool wasDeterminate = render->isDeterminate(); 145 bool wasDeterminate = render->isDeterminate();
146 renderer()->updateFromElement(); 146 renderer()->updateFromElement();
147 if (wasDeterminate != isDeterminate()) 147 if (wasDeterminate != isDeterminate())
148 setNeedsStyleRecalc(); 148 setNeedsStyleRecalc();
149 } 149 }
150 } 150 }
151 151
152 void HTMLProgressElement::createShadowSubtree() 152 void HTMLProgressElement::createShadowSubtree()
153 { 153 {
154 ASSERT(!hasShadowRoot()); 154 ASSERT(!hasShadowRoot());
155 155
156 RefPtr<ProgressBarElement> bar = ProgressBarElement::create(document()); 156 RefPtr<ProgressBarElement> bar = ProgressBarElement::create(document());
157 m_value = ProgressValueElement::create(document()); 157 m_value = ProgressValueElement::create(document());
158 bar->appendChild(m_value, ASSERT_NO_EXCEPTION); 158 bar->appendChild(m_value, ASSERT_NO_EXCEPTION);
159 159
160 RefPtr<ShadowRoot> root = ShadowRoot::create(this, ShadowRoot::CreatingUserA gentShadowRoot, ASSERT_NO_EXCEPTION); 160 RefPtr<ShadowRoot> root = ShadowRoot::create(this, ShadowRoot::CreatingUserA gentShadowRoot, ASSERT_NO_EXCEPTION);
161 root->appendChild(bar, ASSERT_NO_EXCEPTION); 161 root->appendChild(bar, ASSERT_NO_EXCEPTION);
162 } 162 }
163 163
164 } // namespace 164 } // namespace
165 #endif 165 #endif
OLDNEW
« no previous file with comments | « LayoutTests/fast/runin/progress-run-in-crash-expected.txt ('k') | Source/WebCore/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698