Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/HTMLLinkElement.cpp |
| diff --git a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp |
| index 148eba27bca841209b44c02459e4d5a4ceb6849d..dff20833b7610beecd6f8d17b9d995fc3733e671 100644 |
| --- a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp |
| +++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp |
| @@ -126,6 +126,11 @@ static LinkEventSender& linkLoadEventSender() |
| return *sharedLoadEventSender; |
| } |
| +static bool styleSheetTypeIsSupported(const String& type) |
| +{ |
| + return type.isEmpty() || type.contains("text/css"); |
|
Yoav Weiss
2016/01/18 08:21:18
This should be a case agnostic comparison, and sho
suzyh_UTC10 (ex-contributor)
2016/01/19 01:58:12
I've plumbed it through platform/MimeTypeRegistry
|
| +} |
| + |
| void HTMLLinkElement::parseSizesAttribute(const AtomicString& value, Vector<IntSize>& iconSizes) |
| { |
| ASSERT(iconSizes.isEmpty()); |
| @@ -701,6 +706,9 @@ void LinkStyle::process() |
| if (!m_owner->loadLink(type, as, builder.url())) |
| return; |
| + if (!styleSheetTypeIsSupported(type)) |
| + UseCounter::countDeprecation(document(), UseCounter::NonCSSStylesheetType); |
| + |
| if (m_disabledState != Disabled && m_owner->relAttribute().isStyleSheet() && shouldLoadResource() && builder.url().isValid()) { |
| if (resource()) { |