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

Side by Side Diff: Source/core/css/invalidation/StyleInvalidator.cpp

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 8 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 | Annotate | Revision Log
OLDNEW
1 1
2 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Copyright 2014 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include "config.h" 6 #include "config.h"
7 7
8 #include "core/css/invalidation/StyleInvalidator.h" 8 #include "core/css/invalidation/StyleInvalidator.h"
9 9
10 #include "core/css/invalidation/DescendantInvalidationSet.h" 10 #include "core/css/invalidation/DescendantInvalidationSet.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 bool thisElementNeedsStyleRecalc = checkInvalidationSetsAgainstElement(eleme nt, recursionData); 169 bool thisElementNeedsStyleRecalc = checkInvalidationSetsAgainstElement(eleme nt, recursionData);
170 170
171 bool someChildrenNeedStyleRecalc = false; 171 bool someChildrenNeedStyleRecalc = false;
172 if (recursionData.hasInvalidationSets() || element.childNeedsStyleInvalidati on()) 172 if (recursionData.hasInvalidationSets() || element.childNeedsStyleInvalidati on())
173 someChildrenNeedStyleRecalc = invalidateChildren(element, recursionData) ; 173 someChildrenNeedStyleRecalc = invalidateChildren(element, recursionData) ;
174 174
175 if (thisElementNeedsStyleRecalc) { 175 if (thisElementNeedsStyleRecalc) {
176 ASSERT(!recursionData.wholeSubtreeInvalid()); 176 ASSERT(!recursionData.wholeSubtreeInvalid());
177 element.setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracin g::create(StyleChangeReason::StyleInvalidator)); 177 element.setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracin g::create(StyleChangeReason::StyleInvalidator));
178 } else if (recursionData.hasInvalidationSets() && someChildrenNeedStyleRecal c) { 178 } else if (recursionData.hasInvalidationSets() && someChildrenNeedStyleRecal c) {
179 // Clone the LayoutStyle in order to preserve correct style sharing, if possible. Otherwise recalc style. 179 // Clone the ComputedStyle in order to preserve correct style sharing, i f possible. Otherwise recalc style.
180 if (LayoutObject* renderer = element.layoutObject()) { 180 if (LayoutObject* renderer = element.layoutObject()) {
181 renderer->setStyleInternal(LayoutStyle::clone(renderer->styleRef())) ; 181 renderer->setStyleInternal(ComputedStyle::clone(renderer->styleRef() ));
182 } else { 182 } else {
183 TRACE_STYLE_INVALIDATOR_INVALIDATION_IF_ENABLED(element, PreventStyl eSharingForParent); 183 TRACE_STYLE_INVALIDATOR_INVALIDATION_IF_ENABLED(element, PreventStyl eSharingForParent);
184 element.setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTr acing::create(StyleChangeReason::StyleInvalidator)); 184 element.setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTr acing::create(StyleChangeReason::StyleInvalidator));
185 } 185 }
186 } 186 }
187 187
188 if (recursionData.insertionPointCrossing() && element.isInsertionPoint()) 188 if (recursionData.insertionPointCrossing() && element.isInsertionPoint())
189 element.setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTrac ing::create(StyleChangeReason::StyleInvalidator)); 189 element.setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTrac ing::create(StyleChangeReason::StyleInvalidator));
190 190
191 element.clearChildNeedsStyleInvalidation(); 191 element.clearChildNeedsStyleInvalidation();
192 element.clearNeedsStyleInvalidation(); 192 element.clearNeedsStyleInvalidation();
193 193
194 return thisElementNeedsStyleRecalc; 194 return thisElementNeedsStyleRecalc;
195 } 195 }
196 196
197 DEFINE_TRACE(StyleInvalidator) 197 DEFINE_TRACE(StyleInvalidator)
198 { 198 {
199 #if ENABLE(OILPAN) 199 #if ENABLE(OILPAN)
200 visitor->trace(m_pendingInvalidationMap); 200 visitor->trace(m_pendingInvalidationMap);
201 #endif 201 #endif
202 } 202 }
203 203
204 } // namespace blink 204 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/SiblingTraversalStrategies.h ('k') | Source/core/css/resolver/AnimatedStyleBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698