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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp

Issue 2824583002: Implement <script nomodule> (Closed)
Patch Set: Fix a couple of tests I missed Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
index 05ffc6b464cbc334cfba759883037467daee38c3..987188ba6db07afa12572bb6145ec753fb3b427d 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
@@ -144,6 +144,7 @@ class TokenPreloadScanner::StartTagScanner {
link_is_import_(false),
matched_(true),
input_is_image_(false),
+ nomodule_attribute_value_(false),
source_size_(0),
source_size_set_(false),
defer_(FetchParameters::kNoDefer),
@@ -289,6 +290,8 @@ class TokenPreloadScanner::StartTagScanner {
type_attribute_value_ = attribute_value;
else if (Match(attribute_name, languageAttr))
language_attribute_value_ = attribute_value;
+ else if (Match(attribute_name, nomoduleAttr))
+ nomodule_attribute_value_ = true;
}
template <typename NameType>
@@ -524,6 +527,7 @@ class TokenPreloadScanner::StartTagScanner {
if (Match(tag_impl_, scriptTag) &&
!ScriptLoader::IsValidScriptTypeAndLanguage(
type_attribute_value_, language_attribute_value_,
+ nomodule_attribute_value_,
ScriptLoader::kAllowLegacyTypeInTypeAttribute)) {
return false;
}
@@ -555,6 +559,7 @@ class TokenPreloadScanner::StartTagScanner {
String as_attribute_value_;
String type_attribute_value_;
String language_attribute_value_;
+ bool nomodule_attribute_value_;
float source_size_;
bool source_size_set_;
FetchParameters::DeferOption defer_;

Powered by Google App Engine
This is Rietveld 408576698