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

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

Issue 864613002: Remove Element::textFromChildren(). (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « sky/engine/core/dom/Node.cpp ('k') | no next file » | 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 d915dcfe3c93c43b714c31bf7002bddbb45ce11b..783ac86affc7c6b63557350939604da6b6a0ae66 100644
--- a/sky/engine/core/html/HTMLStyleElement.cpp
+++ b/sky/engine/core/html/HTMLStyleElement.cpp
@@ -30,6 +30,7 @@
#include "sky/engine/core/dom/Document.h"
#include "sky/engine/core/dom/Element.h"
#include "sky/engine/core/dom/StyleEngine.h"
+#include "sky/engine/core/dom/Text.h"
#include "sky/engine/core/dom/shadow/ShadowRoot.h"
#include "sky/engine/core/frame/LocalFrame.h"
#include "sky/engine/platform/TraceEvent.h"
@@ -135,8 +136,9 @@ void HTMLStyleElement::process()
MediaQueryEvaluator screenEval("screen", true);
if (screenEval.eval(mediaQueries.get())) {
- const String& text = textFromChildren();
- m_sheet = document().styleEngine()->createSheet(this, text);
+ if (hasOneTextChild())
+ toText(firstChild())->atomize();
+ m_sheet = document().styleEngine()->createSheet(this, textContent());
m_sheet->setMediaQueries(mediaQueries.release());
}
« no previous file with comments | « sky/engine/core/dom/Node.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698