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

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

Issue 2495623002: Rename traverseFrames to pierce and traverse shadow dom too. (Closed)
Patch Set: Created 4 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
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 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1599 if (frame) 1599 if (frame)
1600 value->setFrameId(IdentifiersFactory::frameId(frame)); 1600 value->setFrameId(IdentifiersFactory::frameId(frame));
1601 } 1601 }
1602 1602
1603 ElementShadow* shadow = element->shadow(); 1603 ElementShadow* shadow = element->shadow();
1604 if (shadow) { 1604 if (shadow) {
1605 std::unique_ptr<protocol::Array<protocol::DOM::Node>> shadowRoots = 1605 std::unique_ptr<protocol::Array<protocol::DOM::Node>> shadowRoots =
1606 protocol::Array<protocol::DOM::Node>::create(); 1606 protocol::Array<protocol::DOM::Node>::create();
1607 for (ShadowRoot* root = &shadow->youngestShadowRoot(); root; 1607 for (ShadowRoot* root = &shadow->youngestShadowRoot(); root;
1608 root = root->olderShadowRoot()) { 1608 root = root->olderShadowRoot()) {
1609 shadowRoots->addItem( 1609 shadowRoots->addItem(buildObjectForNode(
1610 buildObjectForNode(root, 0, traverseFrames, nodesMap)); 1610 root, traverseFrames ? depth : 0, traverseFrames, nodesMap));
1611 } 1611 }
1612 value->setShadowRoots(std::move(shadowRoots)); 1612 value->setShadowRoots(std::move(shadowRoots));
1613 forcePushChildren = true; 1613 forcePushChildren = true;
1614 } 1614 }
1615 1615
1616 if (isHTMLLinkElement(*element)) { 1616 if (isHTMLLinkElement(*element)) {
1617 HTMLLinkElement& linkElement = toHTMLLinkElement(*element); 1617 HTMLLinkElement& linkElement = toHTMLLinkElement(*element);
1618 if (linkElement.isImport() && linkElement.import() && 1618 if (linkElement.isImport() && linkElement.import() &&
1619 innerParentNode(linkElement.import()) == linkElement) { 1619 innerParentNode(linkElement.import()) == linkElement) {
1620 value->setImportedDocument(buildObjectForNode( 1620 value->setImportedDocument(buildObjectForNode(
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
2281 visitor->trace(m_idToNodesMap); 2281 visitor->trace(m_idToNodesMap);
2282 visitor->trace(m_document); 2282 visitor->trace(m_document);
2283 visitor->trace(m_revalidateTask); 2283 visitor->trace(m_revalidateTask);
2284 visitor->trace(m_searchResults); 2284 visitor->trace(m_searchResults);
2285 visitor->trace(m_history); 2285 visitor->trace(m_history);
2286 visitor->trace(m_domEditor); 2286 visitor->trace(m_domEditor);
2287 InspectorBaseAgent::trace(visitor); 2287 InspectorBaseAgent::trace(visitor);
2288 } 2288 }
2289 2289
2290 } // namespace blink 2290 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698