OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef StyleResolverParentScope_h | 5 #ifndef StyleResolverParentScope_h |
6 #define StyleResolverParentScope_h | 6 #define StyleResolverParentScope_h |
7 | 7 |
8 #include "core/css/resolver/StyleResolver.h" | 8 #include "core/css/resolver/StyleResolver.h" |
| 9 #include "core/dom/Document.h" |
9 #include "core/dom/Element.h" | 10 #include "core/dom/Element.h" |
10 #include "core/dom/shadow/ShadowRoot.h" | 11 #include "core/dom/shadow/ShadowRoot.h" |
11 | 12 |
12 namespace WebCore { | 13 namespace WebCore { |
13 | 14 |
14 // Maintains the parent element stack (and bloom filter) inside recalcStyle. | 15 // Maintains the parent element stack (and bloom filter) inside recalcStyle. |
15 class StyleResolverParentScope FINAL { | 16 class StyleResolverParentScope FINAL { |
16 public: | 17 public: |
17 explicit StyleResolverParentScope(Node& parent); | 18 explicit StyleResolverParentScope(Node& parent); |
18 ~StyleResolverParentScope(); | 19 ~StyleResolverParentScope(); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 if (m_parent.isElementNode()) | 70 if (m_parent.isElementNode()) |
70 m_resolver.pushParentElement(toElement(m_parent)); | 71 m_resolver.pushParentElement(toElement(m_parent)); |
71 else | 72 else |
72 m_resolver.pushParentShadowRoot(toShadowRoot(m_parent)); | 73 m_resolver.pushParentShadowRoot(toShadowRoot(m_parent)); |
73 m_pushed = true; | 74 m_pushed = true; |
74 } | 75 } |
75 | 76 |
76 } // namespace WebCore | 77 } // namespace WebCore |
77 | 78 |
78 #endif // StyleResolverParentScope_h | 79 #endif // StyleResolverParentScope_h |
OLD | NEW |