| 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 inline bool isActiveInsertionPoint(const Node& node) | 90 inline bool isActiveInsertionPoint(const Node& node) |
| 91 { | 91 { |
| 92 return node.isInsertionPoint() && toInsertionPoint(node).isActive(); | 92 return node.isInsertionPoint() && toInsertionPoint(node).isActive(); |
| 93 } | 93 } |
| 94 | 94 |
| 95 inline bool isActiveShadowInsertionPoint(const Node& node) | 95 inline bool isActiveShadowInsertionPoint(const Node& node) |
| 96 { | 96 { |
| 97 return node.isInsertionPoint() && toInsertionPoint(node).isShadowInsertionPo
int(); | 97 return node.isInsertionPoint() && toInsertionPoint(node).isShadowInsertionPo
int(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 // TODO(hayato): The function name is confusing. This neither resolve a reprojec
tion nor support v1 shadow trees. | 100 inline ElementShadow* shadowWhereNodeCanBeDistributedForV0(const Node& node) |
| 101 inline ElementShadow* shadowWhereNodeCanBeDistributed(const Node& node) | |
| 102 { | 101 { |
| 103 Node* parent = node.parentNode(); | 102 Node* parent = node.parentNode(); |
| 104 if (!parent) | 103 if (!parent) |
| 105 return 0; | 104 return 0; |
| 106 if (parent->isShadowRoot() && !toShadowRoot(parent)->isYoungest()) | 105 if (parent->isShadowRoot() && !toShadowRoot(parent)->isYoungest()) |
| 107 return node.ownerShadowHost()->shadow(); | 106 return node.ownerShadowHost()->shadow(); |
| 108 if (isActiveInsertionPoint(*parent)) | 107 if (isActiveInsertionPoint(*parent)) |
| 109 return node.ownerShadowHost()->shadow(); | 108 return node.ownerShadowHost()->shadow(); |
| 110 if (parent->isElementNode()) | 109 if (parent->isElementNode()) |
| 111 return toElement(parent)->shadow(); | 110 return toElement(parent)->shadow(); |
| 112 return 0; | 111 return 0; |
| 113 } | 112 } |
| 114 | 113 |
| 115 const InsertionPoint* resolveReprojection(const Node*); | 114 const InsertionPoint* resolveReprojection(const Node*); |
| 116 | 115 |
| 117 void collectDestinationInsertionPoints(const Node&, HeapVector<Member<InsertionP
oint>, 8>& results); | 116 void collectDestinationInsertionPoints(const Node&, HeapVector<Member<InsertionP
oint>, 8>& results); |
| 118 | 117 |
| 119 } // namespace blink | 118 } // namespace blink |
| 120 | 119 |
| 121 #endif // InsertionPoint_h | 120 #endif // InsertionPoint_h |
| OLD | NEW |