| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 bool InsertionPoint::shouldUseFallbackElements() const | 134 bool InsertionPoint::shouldUseFallbackElements() const |
| 135 { | 135 { |
| 136 return isActive() && !hasDistribution(); | 136 return isActive() && !hasDistribution(); |
| 137 } | 137 } |
| 138 | 138 |
| 139 bool InsertionPoint::canBeActive() const | 139 bool InsertionPoint::canBeActive() const |
| 140 { | 140 { |
| 141 if (!isInShadowTree()) | 141 if (!isInShadowTree()) |
| 142 return false; | 142 return false; |
| 143 if (containingShadowRoot()->isV1()) |
| 144 return false; |
| 143 return !Traversal<InsertionPoint>::firstAncestor(*this); | 145 return !Traversal<InsertionPoint>::firstAncestor(*this); |
| 144 } | 146 } |
| 145 | 147 |
| 146 bool InsertionPoint::isActive() const | 148 bool InsertionPoint::isActive() const |
| 147 { | 149 { |
| 148 if (!canBeActive()) | 150 if (!canBeActive()) |
| 149 return false; | 151 return false; |
| 150 ShadowRoot* shadowRoot = containingShadowRoot(); | 152 ShadowRoot* shadowRoot = containingShadowRoot(); |
| 151 if (!shadowRoot) | 153 if (!shadowRoot) |
| 152 return false; | 154 return false; |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 if (!insertionPoints) | 293 if (!insertionPoints) |
| 292 return; | 294 return; |
| 293 for (size_t i = 0; i < insertionPoints->size(); ++i) | 295 for (size_t i = 0; i < insertionPoints->size(); ++i) |
| 294 results.append(insertionPoints->at(i).get()); | 296 results.append(insertionPoints->at(i).get()); |
| 295 ASSERT(current != insertionPoints->last().get()); | 297 ASSERT(current != insertionPoints->last().get()); |
| 296 current = insertionPoints->last().get(); | 298 current = insertionPoints->last().get(); |
| 297 } | 299 } |
| 298 } | 300 } |
| 299 | 301 |
| 300 } // namespace blink | 302 } // namespace blink |
| OLD | NEW |