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

Side by Side Diff: sky/engine/core/dom/Node.h

Issue 855733005: Simplify Node::textContent(). (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 unified diff | Download patch
« no previous file with comments | « no previous file | sky/engine/core/dom/Node.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved. 5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved.
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // which will already know and hold a ref on the right node to return. 156 // which will already know and hold a ref on the right node to return.
157 PassRefPtr<Node> insertBefore(PassRefPtr<Node> newChild, Node* refChild, Exc eptionState& = ASSERT_NO_EXCEPTION); 157 PassRefPtr<Node> insertBefore(PassRefPtr<Node> newChild, Node* refChild, Exc eptionState& = ASSERT_NO_EXCEPTION);
158 PassRefPtr<Node> replaceChild(PassRefPtr<Node> newChild, PassRefPtr<Node> ol dChild, ExceptionState& = ASSERT_NO_EXCEPTION); 158 PassRefPtr<Node> replaceChild(PassRefPtr<Node> newChild, PassRefPtr<Node> ol dChild, ExceptionState& = ASSERT_NO_EXCEPTION);
159 PassRefPtr<Node> removeChild(PassRefPtr<Node> child, ExceptionState& = ASSER T_NO_EXCEPTION); 159 PassRefPtr<Node> removeChild(PassRefPtr<Node> child, ExceptionState& = ASSER T_NO_EXCEPTION);
160 PassRefPtr<Node> appendChild(PassRefPtr<Node> newChild, ExceptionState& = AS SERT_NO_EXCEPTION); 160 PassRefPtr<Node> appendChild(PassRefPtr<Node> newChild, ExceptionState& = AS SERT_NO_EXCEPTION);
161 161
162 bool hasChildren() const { return firstChild(); } 162 bool hasChildren() const { return firstChild(); }
163 virtual PassRefPtr<Node> cloneNode(bool deep = false) = 0; 163 virtual PassRefPtr<Node> cloneNode(bool deep = false) = 0;
164 virtual const AtomicString& localName() const; 164 virtual const AtomicString& localName() const;
165 165
166 String textContent(bool convertBRsToNewlines = false) const; 166 String textContent() const;
167 void setTextContent(const String&); 167 void setTextContent(const String&);
168 168
169 // Other methods (not part of DOM) 169 // Other methods (not part of DOM)
170 170
171 bool isElementNode() const { return getFlag(IsElementFlag); } 171 bool isElementNode() const { return getFlag(IsElementFlag); }
172 bool isContainerNode() const { return getFlag(IsContainerFlag); } 172 bool isContainerNode() const { return getFlag(IsContainerFlag); }
173 bool isTextNode() const { return getFlag(IsTextFlag); } 173 bool isTextNode() const { return getFlag(IsTextFlag); }
174 bool isHTMLElement() const { return getFlag(IsHTMLFlag); } 174 bool isHTMLElement() const { return getFlag(IsHTMLFlag); }
175 175
176 bool isCustomElement() const { return getFlag(CustomElementFlag); } 176 bool isCustomElement() const { return getFlag(CustomElementFlag); }
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 } // namespace blink 705 } // namespace blink
706 706
707 #ifndef NDEBUG 707 #ifndef NDEBUG
708 // Outside the WebCore namespace for ease of invocation from gdb. 708 // Outside the WebCore namespace for ease of invocation from gdb.
709 void showNode(const blink::Node*); 709 void showNode(const blink::Node*);
710 void showTree(const blink::Node*); 710 void showTree(const blink::Node*);
711 void showNodePath(const blink::Node*); 711 void showNodePath(const blink::Node*);
712 #endif 712 #endif
713 713
714 #endif // SKY_ENGINE_CORE_DOM_NODE_H_ 714 #endif // SKY_ENGINE_CORE_DOM_NODE_H_
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698