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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLPlugInImageElement.cpp ('k') | Source/core/html/HTMLScriptElement.cpp » ('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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 render->updateFromElement(); 143 render->updateFromElement();
144 if (wasDeterminate != isDeterminate()) 144 if (wasDeterminate != isDeterminate())
145 didAffectSelector(AffectedSelectorIndeterminate); 145 didAffectSelector(AffectedSelectorIndeterminate);
146 } 146 }
147 } 147 }
148 148
149 void HTMLProgressElement::didAddUserAgentShadowRoot(ShadowRoot* root) 149 void HTMLProgressElement::didAddUserAgentShadowRoot(ShadowRoot* root)
150 { 150 {
151 ASSERT(!m_value); 151 ASSERT(!m_value);
152 152
153 RefPtr<ProgressInnerElement> inner = ProgressInnerElement::create(document() ); 153 RefPtr<ProgressInnerElement> inner = ProgressInnerElement::create(&document( ));
154 inner->setPart(AtomicString("-webkit-progress-inner-element", AtomicString:: ConstructFromLiteral)); 154 inner->setPart(AtomicString("-webkit-progress-inner-element", AtomicString:: ConstructFromLiteral));
155 root->appendChild(inner); 155 root->appendChild(inner);
156 156
157 RefPtr<ProgressBarElement> bar = ProgressBarElement::create(document()); 157 RefPtr<ProgressBarElement> bar = ProgressBarElement::create(&document());
158 bar->setPart(AtomicString("-webkit-progress-bar", AtomicString::ConstructFro mLiteral)); 158 bar->setPart(AtomicString("-webkit-progress-bar", AtomicString::ConstructFro mLiteral));
159 RefPtr<ProgressValueElement> value = ProgressValueElement::create(document() ); 159 RefPtr<ProgressValueElement> value = ProgressValueElement::create(&document( ));
160 m_value = value.get(); 160 m_value = value.get();
161 m_value->setPart(AtomicString("-webkit-progress-value", AtomicString::Constr uctFromLiteral)); 161 m_value->setPart(AtomicString("-webkit-progress-value", AtomicString::Constr uctFromLiteral));
162 m_value->setWidthPercentage(HTMLProgressElement::IndeterminatePosition * 100 ); 162 m_value->setWidthPercentage(HTMLProgressElement::IndeterminatePosition * 100 );
163 bar->appendChild(m_value); 163 bar->appendChild(m_value);
164 164
165 inner->appendChild(bar); 165 inner->appendChild(bar);
166 } 166 }
167 167
168 bool HTMLProgressElement::shouldAppearIndeterminate() const 168 bool HTMLProgressElement::shouldAppearIndeterminate() const
169 { 169 {
170 return !isDeterminate(); 170 return !isDeterminate();
171 } 171 }
172 172
173 } // namespace 173 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLPlugInImageElement.cpp ('k') | Source/core/html/HTMLScriptElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698