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