OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 bool isYoungest() const { return !youngerShadowRoot(); } | 77 bool isYoungest() const { return !youngerShadowRoot(); } |
78 bool isOldest() const { return !olderShadowRoot(); } | 78 bool isOldest() const { return !olderShadowRoot(); } |
79 bool isOldestAuthorShadowRoot() const; | 79 bool isOldestAuthorShadowRoot() const; |
80 | 80 |
81 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; | 81 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; |
82 | 82 |
83 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 83 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; |
84 virtual void removedFrom(ContainerNode*) OVERRIDE; | 84 virtual void removedFrom(ContainerNode*) OVERRIDE; |
85 | 85 |
86 virtual void registerScopedHTMLStyleChild() OVERRIDE; | 86 void registerScopedHTMLStyleChild(); |
87 virtual void unregisterScopedHTMLStyleChild() OVERRIDE; | 87 void unregisterScopedHTMLStyleChild(); |
88 | 88 |
89 bool containsShadowElements() const; | 89 bool containsShadowElements() const; |
90 bool containsContentElements() const; | 90 bool containsContentElements() const; |
91 bool containsInsertionPoints() const { return containsShadowElements() || co
ntainsContentElements(); } | 91 bool containsInsertionPoints() const { return containsShadowElements() || co
ntainsContentElements(); } |
92 bool containsShadowRoots() const; | 92 bool containsShadowRoots() const; |
93 | 93 |
94 unsigned descendantShadowElementCount() const; | 94 unsigned descendantShadowElementCount() const; |
95 | 95 |
96 // For Internals, don't use this. | 96 // For Internals, don't use this. |
97 unsigned childShadowRootCount() const; | 97 unsigned childShadowRootCount() const; |
| 98 unsigned numberOfStyles() const { return m_numberOfStyles; } |
98 | 99 |
99 HTMLShadowElement* shadowInsertionPointOfYoungerShadowRoot() const; | 100 HTMLShadowElement* shadowInsertionPointOfYoungerShadowRoot() const; |
100 void setShadowInsertionPointOfYoungerShadowRoot(PassRefPtrWillBeRawPtr<HTMLS
hadowElement>); | 101 void setShadowInsertionPointOfYoungerShadowRoot(PassRefPtrWillBeRawPtr<HTMLS
hadowElement>); |
101 | 102 |
102 void didAddInsertionPoint(InsertionPoint*); | 103 void didAddInsertionPoint(InsertionPoint*); |
103 void didRemoveInsertionPoint(InsertionPoint*); | 104 void didRemoveInsertionPoint(InsertionPoint*); |
104 const WillBeHeapVector<RefPtrWillBeMember<InsertionPoint> >& descendantInser
tionPoints(); | 105 const WillBeHeapVector<RefPtrWillBeMember<InsertionPoint> >& descendantInser
tionPoints(); |
105 | 106 |
106 ShadowRootType type() const { return static_cast<ShadowRootType>(m_type); } | 107 ShadowRootType type() const { return static_cast<ShadowRootType>(m_type); } |
107 | 108 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 { | 160 { |
160 return adjustedFocusedElement(); | 161 return adjustedFocusedElement(); |
161 } | 162 } |
162 | 163 |
163 DEFINE_NODE_TYPE_CASTS(ShadowRoot, isShadowRoot()); | 164 DEFINE_NODE_TYPE_CASTS(ShadowRoot, isShadowRoot()); |
164 DEFINE_TYPE_CASTS(ShadowRoot, TreeScope, treeScope, treeScope->rootNode().isShad
owRoot(), treeScope.rootNode().isShadowRoot()); | 165 DEFINE_TYPE_CASTS(ShadowRoot, TreeScope, treeScope, treeScope->rootNode().isShad
owRoot(), treeScope.rootNode().isShadowRoot()); |
165 | 166 |
166 } // namespace | 167 } // namespace |
167 | 168 |
168 #endif | 169 #endif |
OLD | NEW |