| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 void recalcStyle(StyleRecalcChange); | 62 void recalcStyle(StyleRecalcChange); |
| 63 | 63 |
| 64 // Disambiguate between Node and TreeScope hierarchies; TreeScope's implemen
tation is simpler. | 64 // Disambiguate between Node and TreeScope hierarchies; TreeScope's implemen
tation is simpler. |
| 65 using TreeScope::document; | 65 using TreeScope::document; |
| 66 | 66 |
| 67 Element* host() const { return toElement(parentOrShadowHostNode()); } | 67 Element* host() const { return toElement(parentOrShadowHostNode()); } |
| 68 ElementShadow* owner() const { return host() ? host()->shadow() : 0; } | 68 ElementShadow* owner() const { return host() ? host()->shadow() : 0; } |
| 69 | 69 |
| 70 ShadowRoot* youngerShadowRoot() const { return prev(); } | 70 ShadowRoot* youngerShadowRoot() const { return prev(); } |
| 71 | 71 |
| 72 ShadowRoot* bindingsOlderShadowRoot() const; | 72 ShadowRoot* olderShadowRootForBindings() const; |
| 73 bool shouldExposeToBindings() const { return type() == AuthorShadowRoot; } | 73 bool shouldExposeToBindings() const { return type() == AuthorShadowRoot; } |
| 74 | 74 |
| 75 bool isYoungest() const { return !youngerShadowRoot(); } | 75 bool isYoungest() const { return !youngerShadowRoot(); } |
| 76 bool isOldest() const { return !olderShadowRoot(); } | 76 bool isOldest() const { return !olderShadowRoot(); } |
| 77 bool isOldestAuthorShadowRoot() const; | 77 bool isOldestAuthorShadowRoot() const; |
| 78 | 78 |
| 79 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; | 79 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; |
| 80 | 80 |
| 81 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 81 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; |
| 82 virtual void removedFrom(ContainerNode*) OVERRIDE; | 82 virtual void removedFrom(ContainerNode*) OVERRIDE; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 { | 162 { |
| 163 return adjustedFocusedElement(); | 163 return adjustedFocusedElement(); |
| 164 } | 164 } |
| 165 | 165 |
| 166 DEFINE_NODE_TYPE_CASTS(ShadowRoot, isShadowRoot()); | 166 DEFINE_NODE_TYPE_CASTS(ShadowRoot, isShadowRoot()); |
| 167 DEFINE_TYPE_CASTS(ShadowRoot, TreeScope, treeScope, treeScope->rootNode() && tre
eScope->rootNode()->isShadowRoot(), treeScope.rootNode() && treeScope.rootNode()
->isShadowRoot()); | 167 DEFINE_TYPE_CASTS(ShadowRoot, TreeScope, treeScope, treeScope->rootNode() && tre
eScope->rootNode()->isShadowRoot(), treeScope.rootNode() && treeScope.rootNode()
->isShadowRoot()); |
| 168 | 168 |
| 169 } // namespace | 169 } // namespace |
| 170 | 170 |
| 171 #endif | 171 #endif |
| OLD | NEW |