OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 12 matching lines...) Expand all Loading... |
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 */ | 26 */ |
27 | 27 |
28 #include "config.h" | 28 #include "config.h" |
29 #include "core/dom/shadow/ComposedTreeWalker.h" | 29 #include "core/dom/shadow/ComposedTreeWalker.h" |
30 | 30 |
31 #include "core/dom/Element.h" | 31 #include "core/dom/Element.h" |
32 #include "core/dom/shadow/ElementShadow.h" | 32 #include "core/dom/shadow/ElementShadow.h" |
33 #include "core/html/shadow/HTMLShadowElement.h" | 33 #include "core/html/HTMLShadowElement.h" |
34 | 34 |
35 namespace WebCore { | 35 namespace WebCore { |
36 | 36 |
37 static inline ElementShadow* shadowFor(const Node* node) | 37 static inline ElementShadow* shadowFor(const Node* node) |
38 { | 38 { |
39 if (node && node->isElementNode()) | 39 if (node && node->isElementNode()) |
40 return toElement(node)->shadow(); | 40 return toElement(node)->shadow(); |
41 return 0; | 41 return 0; |
42 } | 42 } |
43 | 43 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 ShadowRoot* shadowRoot = toShadowRoot(parent); | 156 ShadowRoot* shadowRoot = toShadowRoot(parent); |
157 ASSERT(!shadowRoot->shadowInsertionPointOfYoungerShadowRoot()); | 157 ASSERT(!shadowRoot->shadowInsertionPointOfYoungerShadowRoot()); |
158 if (!shadowRoot->isYoungest()) | 158 if (!shadowRoot->isYoungest()) |
159 return 0; | 159 return 0; |
160 if (details) | 160 if (details) |
161 details->didTraverseShadowRoot(shadowRoot); | 161 details->didTraverseShadowRoot(shadowRoot); |
162 return shadowRoot->host(); | 162 return shadowRoot->host(); |
163 } | 163 } |
164 | 164 |
165 } // namespace | 165 } // namespace |
OLD | NEW |