| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 for (size_t i = 0; i < m_distribution.size(); ++i) | 117 for (size_t i = 0; i < m_distribution.size(); ++i) |
| 118 m_distribution.at(i)->lazyReattachIfAttached(); | 118 m_distribution.at(i)->lazyReattachIfAttached(); |
| 119 | 119 |
| 120 HTMLElement::detach(context); | 120 HTMLElement::detach(context); |
| 121 } | 121 } |
| 122 | 122 |
| 123 void InsertionPoint::willRecalcStyle(StyleRecalcChange change) | 123 void InsertionPoint::willRecalcStyle(StyleRecalcChange change) |
| 124 { | 124 { |
| 125 if (change < Inherit) | 125 if (change < Inherit) |
| 126 return; | 126 return; |
| 127 for (size_t i = 0; i < m_distribution.size(); ++i) | 127 for (size_t i = 0; i < m_distribution.size(); ++i) { |
| 128 m_distribution.at(i)->setNeedsStyleRecalc(LocalStyleChange); | 128 Node* node = m_distribution.at(i).get(); |
| 129 if (isShadowHost(node->parentElement())) |
| 130 node->setNeedsStyleRecalc(LocalStyleChange); |
| 131 } |
| 129 } | 132 } |
| 130 | 133 |
| 131 bool InsertionPoint::shouldUseFallbackElements() const | 134 bool InsertionPoint::shouldUseFallbackElements() const |
| 132 { | 135 { |
| 133 return isActive() && !hasDistribution(); | 136 return isActive() && !hasDistribution(); |
| 134 } | 137 } |
| 135 | 138 |
| 136 bool InsertionPoint::canBeActive() const | 139 bool InsertionPoint::canBeActive() const |
| 137 { | 140 { |
| 138 if (!isInShadowTree()) | 141 if (!isInShadowTree()) |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 if (!insertionPoints) | 313 if (!insertionPoints) |
| 311 return; | 314 return; |
| 312 for (size_t i = 0; i < insertionPoints->size(); ++i) | 315 for (size_t i = 0; i < insertionPoints->size(); ++i) |
| 313 results.append(insertionPoints->at(i).get()); | 316 results.append(insertionPoints->at(i).get()); |
| 314 ASSERT(current != insertionPoints->last().get()); | 317 ASSERT(current != insertionPoints->last().get()); |
| 315 current = insertionPoints->last().get(); | 318 current = insertionPoints->last().get(); |
| 316 } | 319 } |
| 317 } | 320 } |
| 318 | 321 |
| 319 } // namespace WebCore | 322 } // namespace WebCore |
| OLD | NEW |