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

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

Issue 2843013002: Revert of Don't lower priority for scripts inserted by doc.write (Closed)
Patch Set: 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 8b065f6a970a1b84b674cd0a532107477447919e..afbd37486b3cc38d4e9b356f3454e707d2db2dc4 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp
@@ -136,9 +136,7 @@
STACK_ALLOCATED();
public:
- StartTagScanner(const StringImpl* tag_impl,
- MediaValuesCached* media_values,
- TokenPreloadScanner::ScannerType scanner_type)
+ StartTagScanner(const StringImpl* tag_impl, MediaValuesCached* media_values)
: tag_impl_(tag_impl),
link_is_style_sheet_(false),
link_is_preconnect_(false),
@@ -153,8 +151,7 @@
cross_origin_(kCrossOriginAttributeNotSet),
media_values_(media_values),
referrer_policy_set_(false),
- referrer_policy_(kReferrerPolicyDefault),
- scanner_type_(scanner_type) {
+ referrer_policy_(kReferrerPolicyDefault) {
if (Match(tag_impl_, imgTag) || Match(tag_impl_, sourceTag)) {
source_size_ = SizesAttributeParser(media_values_, String()).length();
return;
@@ -261,8 +258,6 @@
request->SetCharset(Charset());
request->SetDefer(defer_);
request->SetIntegrityMetadata(integrity_metadata_);
- if (scanner_type_ == ScannerType::kInsertion)
- request->SetFromInsertionScanner(true);
return request;
}
@@ -579,14 +574,12 @@
bool referrer_policy_set_;
ReferrerPolicy referrer_policy_;
IntegrityMetadataSet integrity_metadata_;
- TokenPreloadScanner::ScannerType scanner_type_;
};
TokenPreloadScanner::TokenPreloadScanner(
const KURL& document_url,
std::unique_ptr<CachedDocumentParameters> document_parameters,
- const MediaValuesCached::MediaValuesCachedData& media_values_cached_data,
- const ScannerType scanner_type)
+ const MediaValuesCached::MediaValuesCachedData& media_values_cached_data)
: document_url_(document_url),
in_style_(false),
in_picture_(false),
@@ -594,7 +587,6 @@
template_count_(0),
document_parameters_(std::move(document_parameters)),
media_values_(MediaValuesCached::Create(media_values_cached_data)),
- scanner_type_(scanner_type),
did_rewind_(false) {
DCHECK(document_parameters_.get());
DCHECK(media_values_.Get());
@@ -862,7 +854,7 @@
return;
}
- StartTagScanner scanner(tag_impl, media_values_, scanner_type_);
+ StartTagScanner scanner(tag_impl, media_values_);
scanner.ProcessAttributes(token.Attributes());
// TODO(yoav): ViewportWidth is currently racy and might be zero in some
// cases, at least in tests. That problem will go away once
@@ -896,12 +888,10 @@
const HTMLParserOptions& options,
const KURL& document_url,
std::unique_ptr<CachedDocumentParameters> document_parameters,
- const MediaValuesCached::MediaValuesCachedData& media_values_cached_data,
- const TokenPreloadScanner::ScannerType scanner_type)
+ const MediaValuesCached::MediaValuesCachedData& media_values_cached_data)
: scanner_(document_url,
std::move(document_parameters),
- media_values_cached_data,
- scanner_type),
+ media_values_cached_data),
tokenizer_(HTMLTokenizer::Create(options)) {}
HTMLPreloadScanner::~HTMLPreloadScanner() {}

Powered by Google App Engine
This is Rietveld 408576698