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

Unified Diff: sky/engine/core/html/HTMLStyleElement.cpp

Issue 791453004: Remove the type attribute from <style>. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « sky/engine/core/html/HTMLStyleElement.h ('k') | sky/engine/core/html/HTMLStyleElement.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/html/HTMLStyleElement.cpp
diff --git a/sky/engine/core/html/HTMLStyleElement.cpp b/sky/engine/core/html/HTMLStyleElement.cpp
index 6942b9ee5968b8b889743e718251f6f77347503a..a14eefbc041af07e9069bc0c3c10c29d6d2cbfc0 100644
--- a/sky/engine/core/html/HTMLStyleElement.cpp
+++ b/sky/engine/core/html/HTMLStyleElement.cpp
@@ -119,11 +119,6 @@ const AtomicString& HTMLStyleElement::media() const
return getAttribute(HTMLNames::mediaAttr);
}
-const AtomicString& HTMLStyleElement::type() const
-{
- return getAttribute(HTMLNames::typeAttr);
-}
-
ContainerNode* HTMLStyleElement::scopingNode()
{
if (!inDocument())
@@ -155,19 +150,16 @@ void HTMLStyleElement::createSheet()
if (m_sheet)
clearSheet();
- const AtomicString& type = this->type();
- if (type.isEmpty() || type == "text/css") {
- RefPtr<MediaQuerySet> mediaQueries = MediaQuerySet::create(media());
-
- MediaQueryEvaluator screenEval("screen", true);
- MediaQueryEvaluator printEval("print", true);
- if (screenEval.eval(mediaQueries.get()) || printEval.eval(mediaQueries.get())) {
- m_loading = true;
- const String& text = textFromChildren();
- m_sheet = document().styleEngine()->createSheet(this, text);
- m_sheet->setMediaQueries(mediaQueries.release());
- m_loading = false;
- }
+ RefPtr<MediaQuerySet> mediaQueries = MediaQuerySet::create(media());
+
+ MediaQueryEvaluator screenEval("screen", true);
+ MediaQueryEvaluator printEval("print", true);
+ if (screenEval.eval(mediaQueries.get()) || printEval.eval(mediaQueries.get())) {
+ m_loading = true;
+ const String& text = textFromChildren();
+ m_sheet = document().styleEngine()->createSheet(this, text);
+ m_sheet->setMediaQueries(mediaQueries.release());
+ m_loading = false;
}
document().styleResolverChanged();
« no previous file with comments | « sky/engine/core/html/HTMLStyleElement.h ('k') | sky/engine/core/html/HTMLStyleElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698