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

Unified Diff: sky/engine/core/dom/Node.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/Element.cpp ('k') | sky/engine/core/html/HTMLStyleElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/Node.cpp
diff --git a/sky/engine/core/dom/Node.cpp b/sky/engine/core/dom/Node.cpp
index e56d01eca8cf877500002a04d241c5a7e5436865..4bb54e7f4b94ea9717224b0a4f1f628956d69cfc 100644
--- a/sky/engine/core/dom/Node.cpp
+++ b/sky/engine/core/dom/Node.cpp
@@ -908,6 +908,8 @@ ContainerNode* Node::ownerScope() const
String Node::textContent() const
{
+ if (isTextNode())
+ return toText(this)->data();
StringBuilder content;
for (const Node* node = this; node; node = NodeTraversal::next(*node, this)) {
if (node->isTextNode())
« no previous file with comments | « sky/engine/core/dom/Element.cpp ('k') | sky/engine/core/html/HTMLStyleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698