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

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

Issue 2130773002: Revert of Don't preload scripts with invalid type/language attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 a6b599231d39d14670e873df1952c1a64c19bafb..14ecba3af799fc287ea7b8df14d276a57f7e19fe 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
@@ -34,7 +34,6 @@
#include "core/css/MediaValuesCached.h"
#include "core/css/parser/SizesAttributeParser.h"
#include "core/dom/Document.h"
-#include "core/dom/ScriptLoader.h"
#include "core/fetch/IntegrityMetadata.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/Settings.h"
@@ -221,6 +220,7 @@
return nullptr;
}
}
+
TextPosition position = TextPosition(source.currentLine(), source.currentColumn());
FetchRequest::ResourceWidth resourceWidth;
@@ -272,10 +272,6 @@
// explanation.
else if (match(attributeName, integrityAttr))
SubresourceIntegrity::parseIntegrityAttribute(attributeValue, m_integrityMetadata);
- else if (match(attributeName, typeAttr))
- m_typeAttributeValue = attributeValue;
- else if (match(attributeName, languageAttr))
- m_languageAttributeValue = attributeValue;
}
template<typename NameType>
@@ -444,8 +440,6 @@
return false;
if (match(m_tagImpl, inputTag) && !m_inputIsImage)
return false;
- if (match(m_tagImpl, scriptTag) && !ScriptLoader::isValidScriptTypeAndLanguage(m_typeAttributeValue, m_languageAttributeValue, ScriptLoader::AllowLegacyTypeInTypeAttribute))
- return false;
return true;
}
@@ -477,8 +471,6 @@
String m_imgSrcUrl;
String m_srcsetAttributeValue;
String m_asAttributeValue;
- String m_typeAttributeValue;
- String m_languageAttributeValue;
float m_sourceSize;
bool m_sourceSizeSet;
FetchRequest::DeferOption m_defer;

Powered by Google App Engine
This is Rietveld 408576698