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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 void InsertionPoint::detachLayoutTree(const AttachContext& context) | 115 void InsertionPoint::detachLayoutTree(const AttachContext& context) |
116 { | 116 { |
117 for (size_t i = 0; i < m_distributedNodes.size(); ++i) | 117 for (size_t i = 0; i < m_distributedNodes.size(); ++i) |
118 m_distributedNodes.at(i)->lazyReattachIfAttached(); | 118 m_distributedNodes.at(i)->lazyReattachIfAttached(); |
119 | 119 |
120 HTMLElement::detachLayoutTree(context); | 120 HTMLElement::detachLayoutTree(context); |
121 } | 121 } |
122 | 122 |
123 void InsertionPoint::willRecalcStyle(StyleRecalcChange change) | 123 void InsertionPoint::willRecalcStyle(StyleRecalcChange change) |
124 { | 124 { |
125 if (change < Inherit && getStyleChangeType() < SubtreeStyleChange) | 125 if (change < IndependentInherit && getStyleChangeType() < SubtreeStyleChange
) |
126 return; | 126 return; |
127 for (size_t i = 0; i < m_distributedNodes.size(); ++i) | 127 for (size_t i = 0; i < m_distributedNodes.size(); ++i) |
128 m_distributedNodes.at(i)->setNeedsStyleRecalc(SubtreeStyleChange, StyleC
hangeReasonForTracing::create(StyleChangeReason::PropagateInheritChangeToDistrib
utedNodes)); | 128 m_distributedNodes.at(i)->setNeedsStyleRecalc(SubtreeStyleChange, StyleC
hangeReasonForTracing::create(StyleChangeReason::PropagateInheritChangeToDistrib
utedNodes)); |
129 } | 129 } |
130 | 130 |
131 bool InsertionPoint::canBeActive() const | 131 bool InsertionPoint::canBeActive() const |
132 { | 132 { |
133 ShadowRoot* shadowRoot = containingShadowRoot(); | 133 ShadowRoot* shadowRoot = containingShadowRoot(); |
134 if (!shadowRoot) | 134 if (!shadowRoot) |
135 return false; | 135 return false; |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 if (!insertionPoints) | 285 if (!insertionPoints) |
286 return; | 286 return; |
287 for (size_t i = 0; i < insertionPoints->size(); ++i) | 287 for (size_t i = 0; i < insertionPoints->size(); ++i) |
288 results.append(insertionPoints->at(i).get()); | 288 results.append(insertionPoints->at(i).get()); |
289 DCHECK_NE(current, insertionPoints->last().get()); | 289 DCHECK_NE(current, insertionPoints->last().get()); |
290 current = insertionPoints->last().get(); | 290 current = insertionPoints->last().get(); |
291 } | 291 } |
292 } | 292 } |
293 | 293 |
294 } // namespace blink | 294 } // namespace blink |
OLD | NEW |