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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 28 matching lines...) Expand all
39 HTMLMeterElement::HTMLMeterElement(Document& document) 39 HTMLMeterElement::HTMLMeterElement(Document& document)
40 : LabelableElement(meterTag, document) 40 : LabelableElement(meterTag, document)
41 { 41 {
42 UseCounter::count(document, UseCounter::MeterElement); 42 UseCounter::count(document, UseCounter::MeterElement);
43 } 43 }
44 44
45 HTMLMeterElement::~HTMLMeterElement() 45 HTMLMeterElement::~HTMLMeterElement()
46 { 46 {
47 } 47 }
48 48
49 PassRefPtrWillBeRawPtr<HTMLMeterElement> HTMLMeterElement::create(Document& docu ment) 49 RawPtr<HTMLMeterElement> HTMLMeterElement::create(Document& document)
50 { 50 {
51 RefPtrWillBeRawPtr<HTMLMeterElement> meter = adoptRefWillBeNoop(new HTMLMete rElement(document)); 51 RawPtr<HTMLMeterElement> meter = (new HTMLMeterElement(document));
52 meter->ensureUserAgentShadowRoot(); 52 meter->ensureUserAgentShadowRoot();
53 return meter.release(); 53 return meter.release();
54 } 54 }
55 55
56 LayoutObject* HTMLMeterElement::createLayoutObject(const ComputedStyle& style) 56 LayoutObject* HTMLMeterElement::createLayoutObject(const ComputedStyle& style)
57 { 57 {
58 switch (style.appearance()) { 58 switch (style.appearance()) {
59 case ContinuousCapacityLevelIndicatorPart: 59 case ContinuousCapacityLevelIndicatorPart:
60 UseCounter::count(document(), UseCounter::MeterElementWithContinuousCapa cityAppearance); 60 UseCounter::count(document(), UseCounter::MeterElementWithContinuousCapa cityAppearance);
61 break; 61 break;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 return toLayoutMeter(layoutObject()); 212 return toLayoutMeter(layoutObject());
213 213
214 LayoutObject* layoutObject = userAgentShadowRoot()->firstChild()->layoutObje ct(); 214 LayoutObject* layoutObject = userAgentShadowRoot()->firstChild()->layoutObje ct();
215 return toLayoutMeter(layoutObject); 215 return toLayoutMeter(layoutObject);
216 } 216 }
217 217
218 void HTMLMeterElement::didAddUserAgentShadowRoot(ShadowRoot& root) 218 void HTMLMeterElement::didAddUserAgentShadowRoot(ShadowRoot& root)
219 { 219 {
220 ASSERT(!m_value); 220 ASSERT(!m_value);
221 221
222 RefPtrWillBeRawPtr<MeterInnerElement> inner = MeterInnerElement::create(docu ment()); 222 RawPtr<MeterInnerElement> inner = MeterInnerElement::create(document());
223 root.appendChild(inner); 223 root.appendChild(inner);
224 224
225 RefPtrWillBeRawPtr<MeterBarElement> bar = MeterBarElement::create(document() ); 225 RawPtr<MeterBarElement> bar = MeterBarElement::create(document());
226 m_value = MeterValueElement::create(document()); 226 m_value = MeterValueElement::create(document());
227 m_value->setWidthPercentage(0); 227 m_value->setWidthPercentage(0);
228 m_value->updatePseudo(); 228 m_value->updatePseudo();
229 bar->appendChild(m_value); 229 bar->appendChild(m_value);
230 230
231 inner->appendChild(bar); 231 inner->appendChild(bar);
232 } 232 }
233 233
234 void HTMLMeterElement::willAddFirstAuthorShadowRoot() 234 void HTMLMeterElement::willAddFirstAuthorShadowRoot()
235 { 235 {
236 ASSERT(RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled()); 236 ASSERT(RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled());
237 lazyReattachIfAttached(); 237 lazyReattachIfAttached();
238 } 238 }
239 239
240 DEFINE_TRACE(HTMLMeterElement) 240 DEFINE_TRACE(HTMLMeterElement)
241 { 241 {
242 visitor->trace(m_value); 242 visitor->trace(m_value);
243 LabelableElement::trace(visitor); 243 LabelableElement::trace(visitor);
244 } 244 }
245 245
246 } // namespace blink 246 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698