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

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

Issue 15856002: First step of HTMLImports (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed Mac build Created 7 years, 6 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/Document.cpp ('k') | Source/core/dom/ScriptableDocumentParser.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) 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 if (hasSourceAttribute()) 213 if (hasSourceAttribute())
214 if (!requestScript(sourceAttributeValue())) 214 if (!requestScript(sourceAttributeValue()))
215 return false; 215 return false;
216 216
217 if (hasSourceAttribute() && deferAttributeValue() && m_parserInserted && !as yncAttributeValue()) { 217 if (hasSourceAttribute() && deferAttributeValue() && m_parserInserted && !as yncAttributeValue()) {
218 m_willExecuteWhenDocumentFinishedParsing = true; 218 m_willExecuteWhenDocumentFinishedParsing = true;
219 m_willBeParserExecuted = true; 219 m_willBeParserExecuted = true;
220 } else if (hasSourceAttribute() && m_parserInserted && !asyncAttributeValue( )) 220 } else if (hasSourceAttribute() && m_parserInserted && !asyncAttributeValue( ))
221 m_willBeParserExecuted = true; 221 m_willBeParserExecuted = true;
222 else if (!hasSourceAttribute() && m_parserInserted && !document->haveStylesh eetsLoaded()) { 222 else if (!hasSourceAttribute() && m_parserInserted && !document->haveStylesh eetsAndImportsLoaded()) {
223 m_willBeParserExecuted = true; 223 m_willBeParserExecuted = true;
224 m_readyToBeParserExecuted = true; 224 m_readyToBeParserExecuted = true;
225 } else if (hasSourceAttribute() && !asyncAttributeValue() && !m_forceAsync) { 225 } else if (hasSourceAttribute() && !asyncAttributeValue() && !m_forceAsync) {
226 m_willExecuteInOrder = true; 226 m_willExecuteInOrder = true;
227 document->scriptRunner()->queueScriptForExecution(this, m_cachedScript, ScriptRunner::IN_ORDER_EXECUTION); 227 document->scriptRunner()->queueScriptForExecution(this, m_cachedScript, ScriptRunner::IN_ORDER_EXECUTION);
228 m_cachedScript->addClient(this); 228 m_cachedScript->addClient(this);
229 } else if (hasSourceAttribute()) { 229 } else if (hasSourceAttribute()) {
230 m_element->document()->scriptRunner()->queueScriptForExecution(this, m_c achedScript, ScriptRunner::ASYNC_EXECUTION); 230 m_element->document()->scriptRunner()->queueScriptForExecution(this, m_c achedScript, ScriptRunner::ASYNC_EXECUTION);
231 m_cachedScript->addClient(this); 231 m_cachedScript->addClient(this);
232 } else { 232 } else {
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 if (element->isHTMLElement() && element->hasTagName(HTMLNames::scriptTag)) 411 if (element->isHTMLElement() && element->hasTagName(HTMLNames::scriptTag))
412 return static_cast<HTMLScriptElement*>(element); 412 return static_cast<HTMLScriptElement*>(element);
413 413
414 if (element->isSVGElement() && element->hasTagName(SVGNames::scriptTag)) 414 if (element->isSVGElement() && element->hasTagName(SVGNames::scriptTag))
415 return static_cast<SVGScriptElement*>(element); 415 return static_cast<SVGScriptElement*>(element);
416 416
417 return 0; 417 return 0;
418 } 418 }
419 419
420 } 420 }
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/ScriptableDocumentParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698