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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLProgressElement.cpp

Issue 2258033002: Replace ASSERT()s with DCHECK*() in core/html/*.{cpp,h}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace ASSERT()s with DCHECK*() in core/html/*.{cpp,h}. Created 4 years, 4 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 void HTMLProgressElement::didElementStateChange() 139 void HTMLProgressElement::didElementStateChange()
140 { 140 {
141 setValueWidthPercentage(position() * 100); 141 setValueWidthPercentage(position() * 100);
142 if (LayoutProgressItem layoutItem = LayoutProgressItem(layoutProgress())) 142 if (LayoutProgressItem layoutItem = LayoutProgressItem(layoutProgress()))
143 layoutItem.updateFromElement(); 143 layoutItem.updateFromElement();
144 } 144 }
145 145
146 void HTMLProgressElement::didAddUserAgentShadowRoot(ShadowRoot& root) 146 void HTMLProgressElement::didAddUserAgentShadowRoot(ShadowRoot& root)
147 { 147 {
148 ASSERT(!m_value); 148 DCHECK(!m_value);
149 149
150 ProgressShadowElement* inner = ProgressShadowElement::create(document()); 150 ProgressShadowElement* inner = ProgressShadowElement::create(document());
151 inner->setShadowPseudoId(AtomicString("-webkit-progress-inner-element")); 151 inner->setShadowPseudoId(AtomicString("-webkit-progress-inner-element"));
152 root.appendChild(inner); 152 root.appendChild(inner);
153 153
154 ProgressShadowElement* bar = ProgressShadowElement::create(document()); 154 ProgressShadowElement* bar = ProgressShadowElement::create(document());
155 bar->setShadowPseudoId(AtomicString("-webkit-progress-bar")); 155 bar->setShadowPseudoId(AtomicString("-webkit-progress-bar"));
156 m_value = ProgressShadowElement::create(document()); 156 m_value = ProgressShadowElement::create(document());
157 m_value->setShadowPseudoId(AtomicString("-webkit-progress-value")); 157 m_value->setShadowPseudoId(AtomicString("-webkit-progress-value"));
158 setValueWidthPercentage(HTMLProgressElement::IndeterminatePosition * 100); 158 setValueWidthPercentage(HTMLProgressElement::IndeterminatePosition * 100);
(...skipping 12 matching lines...) Expand all
171 visitor->trace(m_value); 171 visitor->trace(m_value);
172 LabelableElement::trace(visitor); 172 LabelableElement::trace(visitor);
173 } 173 }
174 174
175 void HTMLProgressElement::setValueWidthPercentage(double width) const 175 void HTMLProgressElement::setValueWidthPercentage(double width) const
176 { 176 {
177 m_value->setInlineStyleProperty(CSSPropertyWidth, width, CSSPrimitiveValue:: UnitType::Percentage); 177 m_value->setInlineStyleProperty(CSSPropertyWidth, width, CSSPrimitiveValue:: UnitType::Percentage);
178 } 178 }
179 179
180 } // namespace blink 180 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLQuoteElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698