| 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 } else if (root->olderShadowRoot()->type() == root->type()) { | 198 } else if (root->olderShadowRoot()->type() == root->type()) { |
| 199 // Only allow reprojecting older shadow roots between the same type
to | 199 // Only allow reprojecting older shadow roots between the same type
to |
| 200 // disallow reprojecting UA elements into author shadows. | 200 // disallow reprojecting UA elements into author shadows. |
| 201 DistributionPool olderShadowRootPool(*root->olderShadowRoot()); | 201 DistributionPool olderShadowRootPool(*root->olderShadowRoot()); |
| 202 olderShadowRootPool.distributeTo(shadowInsertionPoint, this); | 202 olderShadowRootPool.distributeTo(shadowInsertionPoint, this); |
| 203 root->olderShadowRoot()->setShadowInsertionPointOfYoungerShadowRoot(
shadowInsertionPoint); | 203 root->olderShadowRoot()->setShadowInsertionPointOfYoungerShadowRoot(
shadowInsertionPoint); |
| 204 } | 204 } |
| 205 if (ElementShadow* shadow = shadowWhereNodeCanBeDistributedForV0(*shadow
InsertionPoint)) | 205 if (ElementShadow* shadow = shadowWhereNodeCanBeDistributedForV0(*shadow
InsertionPoint)) |
| 206 shadow->setNeedsDistributionRecalc(); | 206 shadow->setNeedsDistributionRecalc(); |
| 207 } | 207 } |
| 208 InspectorInstrumentation::didPerformElementShadowDistribution(const_cast<Ele
ment*>(&m_elementShadow->host())); | 208 InspectorInstrumentation::didPerformElementShadowDistribution(&m_elementShad
ow->host()); |
| 209 } | 209 } |
| 210 | 210 |
| 211 void ElementShadowV0::didDistributeNode(const Node* node, InsertionPoint* insert
ionPoint) | 211 void ElementShadowV0::didDistributeNode(const Node* node, InsertionPoint* insert
ionPoint) |
| 212 { | 212 { |
| 213 NodeToDestinationInsertionPoints::AddResult result = m_nodeToInsertionPoints
.add(node, nullptr); | 213 NodeToDestinationInsertionPoints::AddResult result = m_nodeToInsertionPoints
.add(node, nullptr); |
| 214 if (result.isNewEntry) | 214 if (result.isNewEntry) |
| 215 result.storedValue->value = new DestinationInsertionPoints; | 215 result.storedValue->value = new DestinationInsertionPoints; |
| 216 result.storedValue->value->append(insertionPoint); | 216 result.storedValue->value->append(insertionPoint); |
| 217 } | 217 } |
| 218 | 218 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 visitor->trace(m_elementShadow); | 268 visitor->trace(m_elementShadow); |
| 269 visitor->trace(m_nodeToInsertionPoints); | 269 visitor->trace(m_nodeToInsertionPoints); |
| 270 visitor->trace(m_selectFeatures); | 270 visitor->trace(m_selectFeatures); |
| 271 } | 271 } |
| 272 | 272 |
| 273 DEFINE_TRACE_WRAPPERS(ElementShadowV0) | 273 DEFINE_TRACE_WRAPPERS(ElementShadowV0) |
| 274 { | 274 { |
| 275 } | 275 } |
| 276 | 276 |
| 277 } // namespace blink | 277 } // namespace blink |
| OLD | NEW |