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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 { | 151 { |
152 Vector<RefPtr<StyleSheet> > styleSheets; | 152 Vector<RefPtr<StyleSheet> > styleSheets; |
153 Vector<RefPtr<CSSStyleSheet> > activeCSSStyleSheets; | 153 Vector<RefPtr<CSSStyleSheet> > activeCSSStyleSheets; |
154 activeCSSStyleSheets.append(collections->injectedAuthorStyleSheets()); | 154 activeCSSStyleSheets.append(collections->injectedAuthorStyleSheets()); |
155 activeCSSStyleSheets.append(collections->documentAuthorStyleSheets()); | 155 activeCSSStyleSheets.append(collections->documentAuthorStyleSheets()); |
156 collectActiveCSSStyleSheetsFromSeamlessParents(activeCSSStyleSheets, documen
t()); | 156 collectActiveCSSStyleSheetsFromSeamlessParents(activeCSSStyleSheets, documen
t()); |
157 collectStyleSheets(collections, styleSheets, activeCSSStyleSheets); | 157 collectStyleSheets(collections, styleSheets, activeCSSStyleSheets); |
158 | 158 |
159 StyleResolverUpdateType styleResolverUpdateType; | 159 StyleResolverUpdateType styleResolverUpdateType; |
160 bool requiresFullStyleRecalc; | 160 bool requiresFullStyleRecalc; |
161 analyzeStyleSheetChange(updateMode, activeAuthorStyleSheets(), activeCSSStyl
eSheets, styleResolverUpdateType, requiresFullStyleRecalc); | 161 bool requiresResetFontSelector; |
| 162 analyzeStyleSheetChange(updateMode, activeAuthorStyleSheets(), activeCSSStyl
eSheets, styleResolverUpdateType, requiresFullStyleRecalc, requiresResetFontSele
ctor); |
162 | 163 |
163 if (styleResolverUpdateType == Reconstruct) { | 164 if (styleResolverUpdateType == Reconstruct) { |
164 document()->clearStyleResolver(); | 165 document()->clearStyleResolver(); |
165 } else { | 166 } else { |
166 StyleResolver* styleResolver = document()->styleResolverIfExists(); | 167 StyleResolver* styleResolver = document()->styleResolverIfExists(); |
167 ASSERT(styleResolver); | 168 ASSERT(styleResolver); |
168 // FIXME: We might have already had styles in child treescope. In this c
ase, we cannot use buildScopedStyleTreeInDocumentOrder. | 169 // FIXME: We might have already had styles in child treescope. In this c
ase, we cannot use buildScopedStyleTreeInDocumentOrder. |
169 // Need to change "false" to some valid condition. | 170 // Need to change "false" to some valid condition. |
170 styleResolver->setBuildScopedStyleTreeInDocumentOrder(false); | 171 styleResolver->setBuildScopedStyleTreeInDocumentOrder(false); |
171 if (styleResolverUpdateType == Reset) { | 172 if (styleResolverUpdateType == Reset) { |
172 resetAllRuleSetsInTreeScope(styleResolver); | 173 resetAllRuleSetsInTreeScope(styleResolver); |
| 174 if (requiresResetFontSelector) |
| 175 styleResolver->resetFontSelector(); |
173 styleResolver->appendAuthorStyleSheets(0, activeCSSStyleSheets); | 176 styleResolver->appendAuthorStyleSheets(0, activeCSSStyleSheets); |
174 } else { | 177 } else { |
175 ASSERT(styleResolverUpdateType == Additive); | 178 ASSERT(styleResolverUpdateType == Additive); |
176 styleResolver->appendAuthorStyleSheets(m_activeAuthorStyleSheets.siz
e(), activeCSSStyleSheets); | 179 styleResolver->appendAuthorStyleSheets(m_activeAuthorStyleSheets.siz
e(), activeCSSStyleSheets); |
177 } | 180 } |
178 } | 181 } |
179 m_scopingNodesForStyleScoped.didRemoveScopingNodes(); | 182 m_scopingNodesForStyleScoped.didRemoveScopingNodes(); |
180 m_activeAuthorStyleSheets.swap(activeCSSStyleSheets); | 183 m_activeAuthorStyleSheets.swap(activeCSSStyleSheets); |
181 m_styleSheetsForStyleSheetList.swap(styleSheets); | 184 m_styleSheetsForStyleSheetList.swap(styleSheets); |
182 updateUsesRemUnits(); | 185 updateUsesRemUnits(); |
183 | 186 |
184 return requiresFullStyleRecalc; | 187 return requiresFullStyleRecalc; |
185 } | 188 } |
186 | 189 |
187 } | 190 } |
OLD | NEW |