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

Side by Side Diff: Source/core/inspector/InspectorDOMAgent.cpp

Issue 719053003: DevTools: [Elements] Do not miss DOM matches on documentElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add test Created 6 years, 1 month 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 | « LayoutTests/inspector/elements/elements-panel-search-expected.txt ('k') | no next file » | 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 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 WillBeHeapListHashSet<RawPtrWillBeMember<Node> > resultCollector; 1027 WillBeHeapListHashSet<RawPtrWillBeMember<Node> > resultCollector;
1028 1028
1029 for (WillBeHeapVector<RawPtrWillBeMember<Document> >::iterator it = docs.beg in(); it != docs.end(); ++it) { 1029 for (WillBeHeapVector<RawPtrWillBeMember<Document> >::iterator it = docs.beg in(); it != docs.end(); ++it) {
1030 Document* document = *it; 1030 Document* document = *it;
1031 Node* documentElement = document->documentElement(); 1031 Node* documentElement = document->documentElement();
1032 Node* node = documentElement; 1032 Node* node = documentElement;
1033 if (!node) 1033 if (!node)
1034 continue; 1034 continue;
1035 1035
1036 // Manual plain text search. 1036 // Manual plain text search.
1037 for (node = nextNodeWithShadowDOMInMind(*node, documentElement, includeU serAgentShadowDOM); node; node = nextNodeWithShadowDOMInMind(*node, documentElem ent, includeUserAgentShadowDOM)) { 1037 for (; node; node = nextNodeWithShadowDOMInMind(*node, documentElement, includeUserAgentShadowDOM)) {
1038 switch (node->nodeType()) { 1038 switch (node->nodeType()) {
1039 case Node::TEXT_NODE: 1039 case Node::TEXT_NODE:
1040 case Node::COMMENT_NODE: 1040 case Node::COMMENT_NODE:
1041 case Node::CDATA_SECTION_NODE: { 1041 case Node::CDATA_SECTION_NODE: {
1042 String text = node->nodeValue(); 1042 String text = node->nodeValue();
1043 if (text.findIgnoringCase(whitespaceTrimmedQuery) != kNotFound) 1043 if (text.findIgnoringCase(whitespaceTrimmedQuery) != kNotFound)
1044 resultCollector.add(node); 1044 resultCollector.add(node);
1045 break; 1045 break;
1046 } 1046 }
1047 case Node::ELEMENT_NODE: { 1047 case Node::ELEMENT_NODE: {
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
2194 visitor->trace(m_searchResults); 2194 visitor->trace(m_searchResults);
2195 #endif 2195 #endif
2196 visitor->trace(m_history); 2196 visitor->trace(m_history);
2197 visitor->trace(m_domEditor); 2197 visitor->trace(m_domEditor);
2198 visitor->trace(m_listener); 2198 visitor->trace(m_listener);
2199 InspectorBaseAgent::trace(visitor); 2199 InspectorBaseAgent::trace(visitor);
2200 } 2200 }
2201 2201
2202 } // namespace blink 2202 } // namespace blink
2203 2203
OLDNEW
« no previous file with comments | « LayoutTests/inspector/elements/elements-panel-search-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698