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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 void InsertionPoint::detach(const AttachContext& context) | 113 void InsertionPoint::detach(const AttachContext& context) |
114 { | 114 { |
115 for (size_t i = 0; i < m_distribution.size(); ++i) | 115 for (size_t i = 0; i < m_distribution.size(); ++i) |
116 m_distribution.at(i)->lazyReattachIfAttached(); | 116 m_distribution.at(i)->lazyReattachIfAttached(); |
117 | 117 |
118 HTMLElement::detach(context); | 118 HTMLElement::detach(context); |
119 } | 119 } |
120 | 120 |
121 void InsertionPoint::willRecalcStyle(StyleRecalcChange change) | 121 void InsertionPoint::willRecalcStyle(StyleRecalcChange change) |
122 { | 122 { |
123 if (change < Inherit) | 123 if (change < Inherit && styleChangeType() < SubtreeStyleChange) |
124 return; | 124 return; |
125 for (size_t i = 0; i < m_distribution.size(); ++i) | 125 for (size_t i = 0; i < m_distribution.size(); ++i) |
126 m_distribution.at(i)->setNeedsStyleRecalc(SubtreeStyleChange, StyleChang
eReasonForTracing::create(StyleChangeReason::PropagateInheritChangeToDistributed
Nodes)); | 126 m_distribution.at(i)->setNeedsStyleRecalc(SubtreeStyleChange, StyleChang
eReasonForTracing::create(StyleChangeReason::PropagateInheritChangeToDistributed
Nodes)); |
127 } | 127 } |
128 | 128 |
129 bool InsertionPoint::shouldUseFallbackElements() const | 129 bool InsertionPoint::shouldUseFallbackElements() const |
130 { | 130 { |
131 return isActive() && !hasDistribution(); | 131 return isActive() && !hasDistribution(); |
132 } | 132 } |
133 | 133 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 if (!insertionPoints) | 282 if (!insertionPoints) |
283 return; | 283 return; |
284 for (size_t i = 0; i < insertionPoints->size(); ++i) | 284 for (size_t i = 0; i < insertionPoints->size(); ++i) |
285 results.append(insertionPoints->at(i).get()); | 285 results.append(insertionPoints->at(i).get()); |
286 ASSERT(current != insertionPoints->last().get()); | 286 ASSERT(current != insertionPoints->last().get()); |
287 current = insertionPoints->last().get(); | 287 current = insertionPoints->last().get(); |
288 } | 288 } |
289 } | 289 } |
290 | 290 |
291 } // namespace blink | 291 } // namespace blink |
OLD | NEW |