Index: Source/core/dom/StyleSheetCollection.cpp |
diff --git a/Source/core/dom/StyleSheetCollection.cpp b/Source/core/dom/StyleSheetCollection.cpp |
index 2f3c5b754d7925ace3d71c4bc22bd407196251f4..136932ea89a1024d556aedeaca5a6d3d981a959e 100644 |
--- a/Source/core/dom/StyleSheetCollection.cpp |
+++ b/Source/core/dom/StyleSheetCollection.cpp |
@@ -41,6 +41,7 @@ |
#include "core/dom/WebCoreMemoryInstrumentation.h" |
#include "core/html/HTMLIFrameElement.h" |
#include "core/html/HTMLLinkElement.h" |
+#include "core/html/HTMLMetaElement.h" |
#include "core/html/HTMLStyleElement.h" |
#include "core/page/Page.h" |
#include "core/page/PageGroup.h" |
@@ -107,7 +108,7 @@ void StyleSheetCollection::collectStyleSheets(DocumentStyleSheetCollection* coll |
sheet = pi->sheet(); |
if (sheet && !sheet->disabled() && sheet->isCSSStyleSheet()) |
activeSheet = static_cast<CSSStyleSheet*>(sheet); |
- } else if ((n->isHTMLElement() && (n->hasTagName(linkTag) || n->hasTagName(styleTag))) || (n->isSVGElement() && n->hasTagName(SVGNames::styleTag))) { |
+ } else if ((n->isHTMLElement() && (n->hasTagName(linkTag) || n->hasTagName(styleTag) || n->hasTagName(metaTag))) || (n->isSVGElement() && n->hasTagName(SVGNames::styleTag))) { |
Element* e = toElement(n); |
AtomicString title = e->getAttribute(titleAttr); |
bool enabledViaScript = false; |
@@ -132,8 +133,10 @@ void StyleSheetCollection::collectStyleSheets(DocumentStyleSheetCollection* coll |
title = nullAtom; |
} else if (n->isSVGElement() && n->hasTagName(SVGNames::styleTag)) { |
sheet = static_cast<SVGStyleElement*>(n)->sheet(); |
- } else { |
+ } else if (n->hasTagName(styleTag)) { |
sheet = static_cast<HTMLStyleElement*>(n)->sheet(); |
+ } else { |
+ sheet = static_cast<HTMLMetaElement*>(n)->sheet(); |
} |
if (sheet && !sheet->disabled() && sheet->isCSSStyleSheet()) |