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

Side by Side Diff: Source/core/xml/XPathStep.cpp

Issue 739433003: Remove CDATASection (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.cpp ('k') | Source/core/xml/XPathUtil.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) 2005 Frerich Raabe <raabe@kde.org> 2 * Copyright (C) 2005 Frerich Raabe <raabe@kde.org>
3 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 default: 163 default:
164 return Node::ELEMENT_NODE; 164 return Node::ELEMENT_NODE;
165 } 165 }
166 } 166 }
167 #endif 167 #endif
168 168
169 // Evaluate NodeTest without considering merged predicates. 169 // Evaluate NodeTest without considering merged predicates.
170 static inline bool nodeMatchesBasicTest(Node* node, Step::Axis axis, const Step: :NodeTest& nodeTest) 170 static inline bool nodeMatchesBasicTest(Node* node, Step::Axis axis, const Step: :NodeTest& nodeTest)
171 { 171 {
172 switch (nodeTest.kind()) { 172 switch (nodeTest.kind()) {
173 case Step::NodeTest::TextNodeTest: { 173 case Step::NodeTest::TextNodeTest:
174 Node::NodeType type = node->nodeType(); 174 return node->nodeType() == Node::TEXT_NODE;
175 return type == Node::TEXT_NODE || type == Node::CDATA_SECTION_NODE;
176 }
177 case Step::NodeTest::CommentNodeTest: 175 case Step::NodeTest::CommentNodeTest:
178 return node->nodeType() == Node::COMMENT_NODE; 176 return node->nodeType() == Node::COMMENT_NODE;
179 case Step::NodeTest::ProcessingInstructionNodeTest: { 177 case Step::NodeTest::ProcessingInstructionNodeTest: {
180 const AtomicString& name = nodeTest.data(); 178 const AtomicString& name = nodeTest.data();
181 return node->nodeType() == Node::PROCESSING_INSTRUCTION_NODE && (name.is Empty() || node->nodeName() == name); 179 return node->nodeType() == Node::PROCESSING_INSTRUCTION_NODE && (name.is Empty() || node->nodeName() == name);
182 } 180 }
183 case Step::NodeTest::AnyNodeTest: 181 case Step::NodeTest::AnyNodeTest:
184 return true; 182 return true;
185 case Step::NodeTest::NameTest: { 183 case Step::NodeTest::NameTest: {
186 const AtomicString& name = nodeTest.data(); 184 const AtomicString& name = nodeTest.data();
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 nodes.markSorted(false); 428 nodes.markSorted(false);
431 return; 429 return;
432 } 430 }
433 } 431 }
434 ASSERT_NOT_REACHED(); 432 ASSERT_NOT_REACHED();
435 } 433 }
436 434
437 } 435 }
438 436
439 } 437 }
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.cpp ('k') | Source/core/xml/XPathUtil.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698