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

Unified Diff: third_party/WebKit/Source/core/loader/LinkLoader.cpp

Issue 1754453002: Change preload's as values audio/video to media (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and test alignment Created 4 years, 9 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/loader/LinkLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/LinkLoader.cpp b/third_party/WebKit/Source/core/loader/LinkLoader.cpp
index 024c8177dbb1de369c84d132dbdd11f993c98b45..4f4e00e3e00c8190c3dfaa0acdede072e495ed21 100644
--- a/third_party/WebKit/Source/core/loader/LinkLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/LinkLoader.cpp
@@ -171,17 +171,18 @@ static void preconnectIfNeeded(const LinkRelAttribute& relAttribute, const KURL&
bool LinkLoader::getResourceTypeFromAsAttribute(const String& as, Resource::Type& type)
{
- if (equalIgnoringCase(as, "image")) {
+ ASSERT(as.lower() == as);
Nate Chapin 2016/03/10 22:49:05 Was this always true?
Yoav Weiss 2016/03/10 23:12:12 Yes, it was (embarrassingly)
+ if (as == "image") {
type = Resource::Image;
- } else if (equalIgnoringCase(as, "script")) {
+ } else if (as == "script") {
type = Resource::Script;
- } else if (equalIgnoringCase(as, "style")) {
+ } else if (as == "style") {
type = Resource::CSSStyleSheet;
- } else if (equalIgnoringCase(as, "audio") || equalIgnoringCase(as, "video")) {
+ } else if (as == "media") {
type = Resource::Media;
- } else if (equalIgnoringCase(as, "font")) {
+ } else if (as == "font") {
type = Resource::Font;
- } else if (equalIgnoringCase(as, "track")) {
+ } else if (as == "track") {
type = Resource::TextTrack;
} else {
type = Resource::LinkPreload;

Powered by Google App Engine
This is Rietveld 408576698