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

Side by Side Diff: third_party/WebKit/Source/core/dom/ScriptLoader.h

Issue 2690273002: [Script Spec Annotation] Annotate "prepare a script" (Closed)
Patch Set: Rebase Created 3 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) 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org>
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 enum LegacyTypeSupport { 58 enum LegacyTypeSupport {
59 DisallowLegacyTypeInTypeAttribute, 59 DisallowLegacyTypeInTypeAttribute,
60 AllowLegacyTypeInTypeAttribute 60 AllowLegacyTypeInTypeAttribute
61 }; 61 };
62 static bool isValidScriptTypeAndLanguage( 62 static bool isValidScriptTypeAndLanguage(
63 const String& typeAttributeValue, 63 const String& typeAttributeValue,
64 const String& languageAttributeValue, 64 const String& languageAttributeValue,
65 LegacyTypeSupport supportLegacyTypes); 65 LegacyTypeSupport supportLegacyTypes);
66 66
67 // https://html.spec.whatwg.org/#prepare-a-script
67 bool prepareScript( 68 bool prepareScript(
68 const TextPosition& scriptStartPosition = TextPosition::minimumPosition(), 69 const TextPosition& scriptStartPosition = TextPosition::minimumPosition(),
69 LegacyTypeSupport = DisallowLegacyTypeInTypeAttribute); 70 LegacyTypeSupport = DisallowLegacyTypeInTypeAttribute);
70 71
71 String scriptContent() const; 72 String scriptContent() const;
72 // Returns false if and only if execution was blocked. 73 // Returns false if and only if execution was blocked.
73 bool executeScript(const ScriptSourceCode&); 74 bool executeScript(const ScriptSourceCode&);
74 virtual void execute(); 75 virtual void execute();
75 76
76 // XML parser calls these 77 // XML parser calls these
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 DocumentWriteIntervention m_documentWriteIntervention; 195 DocumentWriteIntervention m_documentWriteIntervention;
195 196
196 Member<PendingScript> m_pendingScript; 197 Member<PendingScript> m_pendingScript;
197 }; 198 };
198 199
199 ScriptLoader* toScriptLoaderIfPossible(Element*); 200 ScriptLoader* toScriptLoaderIfPossible(Element*);
200 201
201 } // namespace blink 202 } // namespace blink
202 203
203 #endif // ScriptLoader_h 204 #endif // ScriptLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698