Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Side by Side Diff: Source/core/dom/shadow/InsertionPoint.cpp

Issue 547823002: Track reasons for |Node::SetNeedsStyleRecalc| (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use AtomicString Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/dom/shadow/ElementShadow.cpp ('k') | Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
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)
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); 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
134 bool InsertionPoint::canBeActive() const 134 bool InsertionPoint::canBeActive() const
135 { 135 {
136 if (!isInShadowTree()) 136 if (!isInShadowTree())
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « Source/core/dom/shadow/ElementShadow.cpp ('k') | Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698