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

Side by Side Diff: Source/core/dom/StyleSheetCollection.cpp

Issue 26155004: Rename WebCore::StyleResolverUpdateType to RecalcStyleTime (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | no next file » | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2013 Google Inc. All rights reserved. 9 * Copyright (C) 2013 Google Inc. All rights reserved.
10 * 10 *
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 if (updateMode != AnalyzedStyleUpdate) 133 if (updateMode != AnalyzedStyleUpdate)
134 return; 134 return;
135 if (!document()->styleResolverIfExists()) 135 if (!document()->styleResolverIfExists())
136 return; 136 return;
137 137
138 // Find out which stylesheets are new. 138 // Find out which stylesheets are new.
139 Vector<StyleSheetContents*> addedSheets; 139 Vector<StyleSheetContents*> addedSheets;
140 styleResolverUpdateType = compareStyleSheets(oldStyleSheets, newStyleSheets, addedSheets); 140 styleResolverUpdateType = compareStyleSheets(oldStyleSheets, newStyleSheets, addedSheets);
141 141
142 // FIXME: If styleResolverUpdateType is still Reconstruct, we could return e arly here
143 // as destroying the StyleResolver will recalc the whole document anyway?
144
142 // If we are already parsing the body and so may have significant amount of elements, put some effort into trying to avoid style recalcs. 145 // If we are already parsing the body and so may have significant amount of elements, put some effort into trying to avoid style recalcs.
143 if (!document()->body() || document()->hasNodesWithPlaceholderStyle()) 146 if (!document()->body() || document()->hasNodesWithPlaceholderStyle())
144 return; 147 return;
145 StyleInvalidationAnalysis invalidationAnalysis(addedSheets); 148 StyleInvalidationAnalysis invalidationAnalysis(addedSheets);
146 if (invalidationAnalysis.dirtiesAllStyle()) 149 if (invalidationAnalysis.dirtiesAllStyle())
147 return; 150 return;
148 invalidationAnalysis.invalidateStyle(document()); 151 invalidationAnalysis.invalidateStyle(document());
149 requiresFullStyleRecalc = false; 152 requiresFullStyleRecalc = false;
150 } 153 }
151 154
(...skipping 19 matching lines...) Expand all
171 } 174 }
172 return false; 175 return false;
173 } 176 }
174 177
175 void StyleSheetCollection::updateUsesRemUnits() 178 void StyleSheetCollection::updateUsesRemUnits()
176 { 179 {
177 m_usesRemUnits = styleSheetsUseRemUnits(m_activeAuthorStyleSheets); 180 m_usesRemUnits = styleSheetsUseRemUnits(m_activeAuthorStyleSheets);
178 } 181 }
179 182
180 } 183 }
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698