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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
128 } | 128 } |
129 | 129 |
130 ElementShadow::ElementShadow() | 130 ElementShadow::ElementShadow() |
131 : m_needsDistributionRecalc(false) | 131 : m_needsDistributionRecalc(false) |
132 , m_needsSelectFeatureSet(false) | 132 , m_needsSelectFeatureSet(false) |
133 { | 133 { |
134 } | 134 } |
135 | 135 |
136 ElementShadow::~ElementShadow() | 136 ElementShadow::~ElementShadow() |
137 { | 137 { |
138 #if !ENABLE(OILPAN) | |
138 removeDetachedShadowRoots(); | 139 removeDetachedShadowRoots(); |
140 #endif | |
139 } | 141 } |
140 | 142 |
141 ShadowRoot& ElementShadow::addShadowRoot(Element& shadowHost, ShadowRoot::Shadow RootType type) | 143 ShadowRoot& ElementShadow::addShadowRoot(Element& shadowHost, ShadowRoot::Shadow RootType type) |
142 { | 144 { |
143 RefPtr<ShadowRoot> shadowRoot = ShadowRoot::create(shadowHost.document(), ty pe); | 145 RefPtr<ShadowRoot> shadowRoot = ShadowRoot::create(shadowHost.document(), ty pe); |
144 | 146 |
145 if (type == ShadowRoot::AuthorShadowRoot && (!youngestShadowRoot() || younge stShadowRoot()->type() == ShadowRoot::UserAgentShadowRoot)) | 147 if (type == ShadowRoot::AuthorShadowRoot && (!youngestShadowRoot() || younge stShadowRoot()->type() == ShadowRoot::UserAgentShadowRoot)) |
146 shadowHost.willAddFirstAuthorShadowRoot(); | 148 shadowHost.willAddFirstAuthorShadowRoot(); |
147 | 149 |
148 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow Root()) | 150 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow Root()) |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
343 } | 345 } |
344 | 346 |
345 void ElementShadow::clearDistribution() | 347 void ElementShadow::clearDistribution() |
346 { | 348 { |
347 m_nodeToInsertionPoints.clear(); | 349 m_nodeToInsertionPoints.clear(); |
348 | 350 |
349 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow Root()) | 351 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow Root()) |
350 root->setShadowInsertionPointOfYoungerShadowRoot(nullptr); | 352 root->setShadowInsertionPointOfYoungerShadowRoot(nullptr); |
351 } | 353 } |
352 | 354 |
355 void ElementShadow::trace(Visitor* visitor) | |
356 { | |
357 visitor->mark(m_shadowRoots.head()); | |
sof
2014/05/05 11:27:48
nit: you prefer to use mark() on raw pointers inst
Mads Ager (chromium)
2014/05/05 11:35:54
Oops. Nothing special going on here. In the old da
| |
358 } | |
359 | |
353 } // namespace | 360 } // namespace |
OLD | NEW |