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

Side by Side Diff: Source/core/dom/ScriptLoader.cpp

Issue 428533006: Use ContainerNode::hasChildren() instead of firstChild() in conditionals (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: build fix Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Position.cpp ('k') | Source/core/dom/TreeWalker.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed.
6 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org> 6 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org>
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 wasParserInserted = true; 177 wasParserInserted = true;
178 m_parserInserted = false; 178 m_parserInserted = false;
179 } else { 179 } else {
180 wasParserInserted = false; 180 wasParserInserted = false;
181 } 181 }
182 182
183 if (wasParserInserted && !client->asyncAttributeValue()) 183 if (wasParserInserted && !client->asyncAttributeValue())
184 m_forceAsync = true; 184 m_forceAsync = true;
185 185
186 // FIXME: HTML5 spec says we should check that all children are either comme nts or empty text nodes. 186 // FIXME: HTML5 spec says we should check that all children are either comme nts or empty text nodes.
187 if (!client->hasSourceAttribute() && !m_element->firstChild()) 187 if (!client->hasSourceAttribute() && !m_element->hasChildren())
188 return false; 188 return false;
189 189
190 if (!m_element->inDocument()) 190 if (!m_element->inDocument())
191 return false; 191 return false;
192 192
193 if (!isScriptTypeSupported(supportLegacyTypes)) 193 if (!isScriptTypeSupported(supportLegacyTypes))
194 return false; 194 return false;
195 195
196 if (wasParserInserted) { 196 if (wasParserInserted) {
197 m_parserInserted = true; 197 m_parserInserted = true;
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 if (isHTMLScriptLoader(element)) 441 if (isHTMLScriptLoader(element))
442 return toHTMLScriptElement(element)->loader(); 442 return toHTMLScriptElement(element)->loader();
443 443
444 if (isSVGScriptLoader(element)) 444 if (isSVGScriptLoader(element))
445 return toSVGScriptElement(element)->loader(); 445 return toSVGScriptElement(element)->loader();
446 446
447 return 0; 447 return 0;
448 } 448 }
449 449
450 } 450 }
OLDNEW
« no previous file with comments | « Source/core/dom/Position.cpp ('k') | Source/core/dom/TreeWalker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698