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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLScriptElement.cpp

Issue 2696653004: [Script Spec Annotation] Annotate and refactor script element's flags (Closed)
Patch Set: More refactor 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/ScriptLoader.cpp ('k') | no next file » | 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 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights
6 * reserved. 6 * reserved.
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 void HTMLScriptElement::setText(const String& value) { 119 void HTMLScriptElement::setText(const String& value) {
120 setTextContent(value); 120 setTextContent(value);
121 } 121 }
122 122
123 void HTMLScriptElement::setAsync(bool async) { 123 void HTMLScriptElement::setAsync(bool async) {
124 setBooleanAttribute(asyncAttr, async); 124 setBooleanAttribute(asyncAttr, async);
125 m_loader->handleAsyncAttribute(); 125 m_loader->handleAsyncAttribute();
126 } 126 }
127 127
128 bool HTMLScriptElement::async() const { 128 bool HTMLScriptElement::async() const {
129 return fastHasAttribute(asyncAttr) || (m_loader->forceAsync()); 129 return fastHasAttribute(asyncAttr) || m_loader->isNonBlocking();
130 } 130 }
131 131
132 KURL HTMLScriptElement::src() const { 132 KURL HTMLScriptElement::src() const {
133 return document().completeURL(sourceAttributeValue()); 133 return document().completeURL(sourceAttributeValue());
134 } 134 }
135 135
136 String HTMLScriptElement::sourceAttributeValue() const { 136 String HTMLScriptElement::sourceAttributeValue() const {
137 return getAttribute(srcAttr).getString(); 137 return getAttribute(srcAttr).getString();
138 } 138 }
139 139
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 return new HTMLScriptElement(document(), false, m_loader->alreadyStarted(), 178 return new HTMLScriptElement(document(), false, m_loader->alreadyStarted(),
179 false); 179 false);
180 } 180 }
181 181
182 DEFINE_TRACE(HTMLScriptElement) { 182 DEFINE_TRACE(HTMLScriptElement) {
183 visitor->trace(m_loader); 183 visitor->trace(m_loader);
184 HTMLElement::trace(visitor); 184 HTMLElement::trace(visitor);
185 } 185 }
186 186
187 } // namespace blink 187 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ScriptLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698