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

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

Issue 24253004: Cleanup: Start using toFoo methods as part of newly adopted coding guideline. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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
« no previous file with comments | « Source/core/html/HTMLMeterElement.cpp ('k') | Source/core/html/shadow/SpinButtonElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 { 61 {
62 if (!style->hasAppearance() || hasAuthorShadowRoot()) 62 if (!style->hasAppearance() || hasAuthorShadowRoot())
63 return RenderObject::createObject(this, style); 63 return RenderObject::createObject(this, style);
64 64
65 return new RenderProgress(this); 65 return new RenderProgress(this);
66 } 66 }
67 67
68 RenderProgress* HTMLProgressElement::renderProgress() const 68 RenderProgress* HTMLProgressElement::renderProgress() const
69 { 69 {
70 if (renderer() && renderer()->isProgress()) 70 if (renderer() && renderer()->isProgress())
71 return static_cast<RenderProgress*>(renderer()); 71 return toRenderProgress(renderer());
72 72
73 RenderObject* renderObject = userAgentShadowRoot()->firstChild()->renderer() ; 73 RenderObject* renderObject = userAgentShadowRoot()->firstChild()->renderer() ;
74 ASSERT_WITH_SECURITY_IMPLICATION(!renderObject || renderObject->isProgress() ); 74 ASSERT_WITH_SECURITY_IMPLICATION(!renderObject || renderObject->isProgress() );
75 return static_cast<RenderProgress*>(renderObject); 75 return toRenderProgress(renderObject);
76 } 76 }
77 77
78 void HTMLProgressElement::parseAttribute(const QualifiedName& name, const Atomic String& value) 78 void HTMLProgressElement::parseAttribute(const QualifiedName& name, const Atomic String& value)
79 { 79 {
80 if (name == valueAttr) 80 if (name == valueAttr)
81 didElementStateChange(); 81 didElementStateChange();
82 else if (name == maxAttr) 82 else if (name == maxAttr)
83 didElementStateChange(); 83 didElementStateChange();
84 else 84 else
85 LabelableElement::parseAttribute(name, value); 85 LabelableElement::parseAttribute(name, value);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 inner->appendChild(bar); 164 inner->appendChild(bar);
165 } 165 }
166 166
167 bool HTMLProgressElement::shouldAppearIndeterminate() const 167 bool HTMLProgressElement::shouldAppearIndeterminate() const
168 { 168 {
169 return !isDeterminate(); 169 return !isDeterminate();
170 } 170 }
171 171
172 } // namespace 172 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMeterElement.cpp ('k') | Source/core/html/shadow/SpinButtonElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698