OLD | NEW |
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 144 |
145 // FIXME: If styleResolverUpdateType is still Reconstruct, we could return e
arly here | 145 // FIXME: If styleResolverUpdateType is still Reconstruct, we could return e
arly here |
146 // as destroying the StyleResolver will recalc the whole document anyway? | 146 // as destroying the StyleResolver will recalc the whole document anyway? |
147 | 147 |
148 // If we are already parsing the body and so may have significant amount of
elements, put some effort into trying to avoid style recalcs. | 148 // If we are already parsing the body and so may have significant amount of
elements, put some effort into trying to avoid style recalcs. |
149 if (!document()->body() || document()->hasNodesWithPlaceholderStyle()) | 149 if (!document()->body() || document()->hasNodesWithPlaceholderStyle()) |
150 return; | 150 return; |
151 StyleInvalidationAnalysis invalidationAnalysis(addedSheets); | 151 StyleInvalidationAnalysis invalidationAnalysis(addedSheets); |
152 if (invalidationAnalysis.dirtiesAllStyle()) | 152 if (invalidationAnalysis.dirtiesAllStyle()) |
153 return; | 153 return; |
154 invalidationAnalysis.invalidateStyle(document()); | 154 invalidationAnalysis.invalidateStyle(*document()); |
155 requiresFullStyleRecalc = false; | 155 requiresFullStyleRecalc = false; |
156 } | 156 } |
157 | 157 |
158 void StyleSheetCollection::resetAllRuleSetsInTreeScope(StyleResolver* styleResol
ver) | 158 void StyleSheetCollection::resetAllRuleSetsInTreeScope(StyleResolver* styleResol
ver) |
159 { | 159 { |
160 // FIXME: If many web developers use style scoped, implement reset RuleSets
in per-scoping node manner. | 160 // FIXME: If many web developers use style scoped, implement reset RuleSets
in per-scoping node manner. |
161 if (DocumentOrderedList* styleScopedScopingNodes = scopingNodesForStyleScope
d()) { | 161 if (DocumentOrderedList* styleScopedScopingNodes = scopingNodesForStyleScope
d()) { |
162 for (DocumentOrderedList::iterator it = styleScopedScopingNodes->begin()
; it != styleScopedScopingNodes->end(); ++it) | 162 for (DocumentOrderedList::iterator it = styleScopedScopingNodes->begin()
; it != styleScopedScopingNodes->end(); ++it) |
163 styleResolver->resetAuthorStyle(toContainerNode(*it)); | 163 styleResolver->resetAuthorStyle(toContainerNode(*it)); |
164 } | 164 } |
(...skipping 12 matching lines...) Expand all Loading... |
177 } | 177 } |
178 return false; | 178 return false; |
179 } | 179 } |
180 | 180 |
181 void StyleSheetCollection::updateUsesRemUnits() | 181 void StyleSheetCollection::updateUsesRemUnits() |
182 { | 182 { |
183 m_usesRemUnits = styleSheetsUseRemUnits(m_activeAuthorStyleSheets); | 183 m_usesRemUnits = styleSheetsUseRemUnits(m_activeAuthorStyleSheets); |
184 } | 184 } |
185 | 185 |
186 } | 186 } |
OLD | NEW |