| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 inline ShadowRoot* Node::youngestShadowRoot() const | 93 inline ShadowRoot* Node::youngestShadowRoot() const |
| 94 { | 94 { |
| 95 if (!this->isElementNode()) | 95 if (!this->isElementNode()) |
| 96 return 0; | 96 return 0; |
| 97 if (ElementShadow* shadow = toElement(this)->shadow()) | 97 if (ElementShadow* shadow = toElement(this)->shadow()) |
| 98 return shadow->youngestShadowRoot(); | 98 return shadow->youngestShadowRoot(); |
| 99 return 0; | 99 return 0; |
| 100 } | 100 } |
| 101 | 101 |
| 102 inline void Element::ensureDistribution() |
| 103 { |
| 104 ContentDistributor::ensureDistribution(this); |
| 105 } |
| 106 |
| 102 inline ElementShadow* ElementShadow::containingShadow() const | 107 inline ElementShadow* ElementShadow::containingShadow() const |
| 103 { | 108 { |
| 104 if (ShadowRoot* parentRoot = host()->containingShadowRoot()) | 109 if (ShadowRoot* parentRoot = host()->containingShadowRoot()) |
| 105 return parentRoot->owner(); | 110 return parentRoot->owner(); |
| 106 return 0; | 111 return 0; |
| 107 } | 112 } |
| 108 | 113 |
| 109 class ShadowRootVector : public Vector<RefPtr<ShadowRoot> > { | 114 class ShadowRootVector : public Vector<RefPtr<ShadowRoot> > { |
| 110 public: | 115 public: |
| 111 explicit ShadowRootVector(ElementShadow* tree) | 116 explicit ShadowRootVector(ElementShadow* tree) |
| (...skipping 10 matching lines...) Expand all Loading... |
| 122 if (Node* parent = node->parentNode()) | 127 if (Node* parent = node->parentNode()) |
| 123 if (parent->isElementNode()) | 128 if (parent->isElementNode()) |
| 124 return toElement(parent)->shadow(); | 129 return toElement(parent)->shadow(); |
| 125 return 0; | 130 return 0; |
| 126 } | 131 } |
| 127 | 132 |
| 128 | 133 |
| 129 } // namespace | 134 } // namespace |
| 130 | 135 |
| 131 #endif | 136 #endif |
| OLD | NEW |