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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLMeterElement.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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 return (value - min) / (max - min); 185 return (value - min) / (max - min);
186 } 186 }
187 187
188 void HTMLMeterElement::didElementStateChange() 188 void HTMLMeterElement::didElementStateChange()
189 { 189 {
190 updateValueAppearance(valueRatio() * 100); 190 updateValueAppearance(valueRatio() * 100);
191 } 191 }
192 192
193 void HTMLMeterElement::didAddUserAgentShadowRoot(ShadowRoot& root) 193 void HTMLMeterElement::didAddUserAgentShadowRoot(ShadowRoot& root)
194 { 194 {
195 ASSERT(!m_value); 195 DCHECK(!m_value);
196 196
197 HTMLDivElement* inner = HTMLDivElement::create(document()); 197 HTMLDivElement* inner = HTMLDivElement::create(document());
198 inner->setShadowPseudoId(AtomicString("-webkit-meter-inner-element")); 198 inner->setShadowPseudoId(AtomicString("-webkit-meter-inner-element"));
199 root.appendChild(inner); 199 root.appendChild(inner);
200 200
201 HTMLDivElement* bar = HTMLDivElement::create(document()); 201 HTMLDivElement* bar = HTMLDivElement::create(document());
202 bar->setShadowPseudoId(AtomicString("-webkit-meter-bar")); 202 bar->setShadowPseudoId(AtomicString("-webkit-meter-bar"));
203 203
204 m_value = HTMLDivElement::create(document()); 204 m_value = HTMLDivElement::create(document());
205 updateValueAppearance(0); 205 updateValueAppearance(0);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 return computedStyle() && !computedStyle()->hasAppearance(); 239 return computedStyle() && !computedStyle()->hasAppearance();
240 } 240 }
241 241
242 DEFINE_TRACE(HTMLMeterElement) 242 DEFINE_TRACE(HTMLMeterElement)
243 { 243 {
244 visitor->trace(m_value); 244 visitor->trace(m_value);
245 LabelableElement::trace(visitor); 245 LabelableElement::trace(visitor);
246 } 246 }
247 247
248 } // namespace blink 248 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMetaElement-in.cpp ('k') | third_party/WebKit/Source/core/html/HTMLNameCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698