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

Side by Side Diff: Source/core/inspector/InspectorDOMAgent.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/frame/UseCounter.h ('k') | Source/core/xml/XPathStep.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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
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 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 for (Document* document : docs) { 1119 for (Document* document : docs) {
1120 Node* documentElement = document->documentElement(); 1120 Node* documentElement = document->documentElement();
1121 Node* node = documentElement; 1121 Node* node = documentElement;
1122 if (!node) 1122 if (!node)
1123 continue; 1123 continue;
1124 1124
1125 // Manual plain text search. 1125 // Manual plain text search.
1126 for (; node; node = nextNodeWithShadowDOMInMind(*node, documentElement, includeUserAgentShadowDOM)) { 1126 for (; node; node = nextNodeWithShadowDOMInMind(*node, documentElement, includeUserAgentShadowDOM)) {
1127 switch (node->nodeType()) { 1127 switch (node->nodeType()) {
1128 case Node::TEXT_NODE: 1128 case Node::TEXT_NODE:
1129 case Node::COMMENT_NODE: 1129 case Node::COMMENT_NODE: {
1130 case Node::CDATA_SECTION_NODE: {
1131 String text = node->nodeValue(); 1130 String text = node->nodeValue();
1132 if (text.findIgnoringCase(whitespaceTrimmedQuery) != kNotFound) 1131 if (text.findIgnoringCase(whitespaceTrimmedQuery) != kNotFound)
1133 resultCollector.add(node); 1132 resultCollector.add(node);
1134 break; 1133 break;
1135 } 1134 }
1136 case Node::ELEMENT_NODE: { 1135 case Node::ELEMENT_NODE: {
1137 if ((!startTagFound && !endTagFound && (node->nodeName().findIgn oringCase(tagNameQuery) != kNotFound)) 1136 if ((!startTagFound && !endTagFound && (node->nodeName().findIgn oringCase(tagNameQuery) != kNotFound))
1138 || (startTagFound && endTagFound && equalIgnoringCase(node-> nodeName(), tagNameQuery)) 1137 || (startTagFound && endTagFound && equalIgnoringCase(node-> nodeName(), tagNameQuery))
1139 || (startTagFound && !endTagFound && node->nodeName().starts With(tagNameQuery, false)) 1138 || (startTagFound && !endTagFound && node->nodeName().starts With(tagNameQuery, false))
1140 || (!startTagFound && endTagFound && node->nodeName().endsWi th(tagNameQuery, false))) { 1139 || (!startTagFound && endTagFound && node->nodeName().endsWi th(tagNameQuery, false))) {
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 1645
1647 PassRefPtr<TypeBuilder::DOM::Node> InspectorDOMAgent::buildObjectForNode(Node* n ode, int depth, NodeToIdMap* nodesMap) 1646 PassRefPtr<TypeBuilder::DOM::Node> InspectorDOMAgent::buildObjectForNode(Node* n ode, int depth, NodeToIdMap* nodesMap)
1648 { 1647 {
1649 int id = bind(node, nodesMap); 1648 int id = bind(node, nodesMap);
1650 String localName; 1649 String localName;
1651 String nodeValue; 1650 String nodeValue;
1652 1651
1653 switch (node->nodeType()) { 1652 switch (node->nodeType()) {
1654 case Node::TEXT_NODE: 1653 case Node::TEXT_NODE:
1655 case Node::COMMENT_NODE: 1654 case Node::COMMENT_NODE:
1656 case Node::CDATA_SECTION_NODE:
1657 nodeValue = node->nodeValue(); 1655 nodeValue = node->nodeValue();
1658 if (nodeValue.length() > maxTextSize) 1656 if (nodeValue.length() > maxTextSize)
1659 nodeValue = nodeValue.left(maxTextSize) + ellipsisUChar; 1657 nodeValue = nodeValue.left(maxTextSize) + ellipsisUChar;
1660 break; 1658 break;
1661 case Node::ATTRIBUTE_NODE: 1659 case Node::ATTRIBUTE_NODE:
1662 case Node::DOCUMENT_FRAGMENT_NODE: 1660 case Node::DOCUMENT_FRAGMENT_NODE:
1663 case Node::DOCUMENT_NODE: 1661 case Node::DOCUMENT_NODE:
1664 case Node::ELEMENT_NODE: 1662 case Node::ELEMENT_NODE:
1665 default: 1663 default:
1666 localName = node->localName(); 1664 localName = node->localName();
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
2307 visitor->trace(m_revalidateTask); 2305 visitor->trace(m_revalidateTask);
2308 visitor->trace(m_searchResults); 2306 visitor->trace(m_searchResults);
2309 #endif 2307 #endif
2310 visitor->trace(m_history); 2308 visitor->trace(m_history);
2311 visitor->trace(m_domEditor); 2309 visitor->trace(m_domEditor);
2312 visitor->trace(m_listener); 2310 visitor->trace(m_listener);
2313 InspectorBaseAgent::trace(visitor); 2311 InspectorBaseAgent::trace(visitor);
2314 } 2312 }
2315 2313
2316 } // namespace blink 2314 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/UseCounter.h ('k') | Source/core/xml/XPathStep.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698