| OLD | NEW |
| 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 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 | 977 |
| 978 // Then traverse siblings of the node itself and its ancestors. | 978 // Then traverse siblings of the node itself and its ancestors. |
| 979 const Node* node = ¤t; | 979 const Node* node = ¤t; |
| 980 do { | 980 do { |
| 981 if (node == stayWithin) | 981 if (node == stayWithin) |
| 982 return 0; | 982 return 0; |
| 983 if (node->isShadowRoot()) { | 983 if (node->isShadowRoot()) { |
| 984 const ShadowRoot* shadowRoot = toShadowRoot(node); | 984 const ShadowRoot* shadowRoot = toShadowRoot(node); |
| 985 if (shadowRoot->olderShadowRoot()) | 985 if (shadowRoot->olderShadowRoot()) |
| 986 return shadowRoot->olderShadowRoot(); | 986 return shadowRoot->olderShadowRoot(); |
| 987 Node* host = shadowRoot->host(); |
| 988 if (host && host->hasChildren()) |
| 989 return host->firstChild(); |
| 987 } | 990 } |
| 988 if (node->nextSibling()) | 991 if (node->nextSibling()) |
| 989 return node->nextSibling(); | 992 return node->nextSibling(); |
| 990 node = node->isShadowRoot() ? toShadowRoot(node)->host() : node->parentN
ode(); | 993 node = node->isShadowRoot() ? toShadowRoot(node)->host() : node->parentN
ode(); |
| 991 } while (node); | 994 } while (node); |
| 992 | 995 |
| 993 return 0; | 996 return 0; |
| 994 } | 997 } |
| 995 | 998 |
| 996 void InspectorDOMAgent::performSearch(ErrorString*, const String& whitespaceTrim
medQuery, const bool* optionalIncludeUserAgentShadowDOM, String* searchId, int*
resultCount) | 999 void InspectorDOMAgent::performSearch(ErrorString*, const String& whitespaceTrim
medQuery, const bool* optionalIncludeUserAgentShadowDOM, String* searchId, int*
resultCount) |
| (...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2191 visitor->trace(m_searchResults); | 2194 visitor->trace(m_searchResults); |
| 2192 #endif | 2195 #endif |
| 2193 visitor->trace(m_history); | 2196 visitor->trace(m_history); |
| 2194 visitor->trace(m_domEditor); | 2197 visitor->trace(m_domEditor); |
| 2195 visitor->trace(m_listener); | 2198 visitor->trace(m_listener); |
| 2196 InspectorBaseAgent::trace(visitor); | 2199 InspectorBaseAgent::trace(visitor); |
| 2197 } | 2200 } |
| 2198 | 2201 |
| 2199 } // namespace blink | 2202 } // namespace blink |
| 2200 | 2203 |
| OLD | NEW |