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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 { | 116 { |
117 StyleSheetCollection collection; | 117 StyleSheetCollection collection; |
118 ActiveDocumentStyleSheetCollector collector(collection); | 118 ActiveDocumentStyleSheetCollector collector(collection); |
119 collectStyleSheets(engine, collector); | 119 collectStyleSheets(engine, collector); |
120 | 120 |
121 StyleSheetChange change; | 121 StyleSheetChange change; |
122 analyzeStyleSheetChange(updateMode, collection, change); | 122 analyzeStyleSheetChange(updateMode, collection, change); |
123 | 123 |
124 if (change.styleResolverUpdateType == Reconstruct) { | 124 if (change.styleResolverUpdateType == Reconstruct) { |
125 engine->clearMasterResolver(); | 125 engine->clearMasterResolver(); |
126 engine->resetFontSelector(); | 126 // FIMXE: The following depends on whether StyleRuleFontFace was modifie
d or not. |
| 127 // No need to always-clear font cache. |
| 128 engine->clearFontCache(); |
127 } else if (StyleResolver* styleResolver = engine->resolver()) { | 129 } else if (StyleResolver* styleResolver = engine->resolver()) { |
128 // FIXME: We might have already had styles in child treescope. In this c
ase, we cannot use buildScopedStyleTreeInDocumentOrder. | 130 // FIXME: We might have already had styles in child treescope. In this c
ase, we cannot use buildScopedStyleTreeInDocumentOrder. |
129 // Need to change "false" to some valid condition. | 131 // Need to change "false" to some valid condition. |
130 styleResolver->setBuildScopedStyleTreeInDocumentOrder(false); | 132 styleResolver->setBuildScopedStyleTreeInDocumentOrder(false); |
131 if (change.styleResolverUpdateType != Additive) { | 133 if (change.styleResolverUpdateType != Additive) { |
132 ASSERT(change.styleResolverUpdateType == Reset || change.styleResolv
erUpdateType == ResetStyleResolverAndFontSelector); | 134 ASSERT(change.styleResolverUpdateType == Reset); |
133 resetAllRuleSetsInTreeScope(styleResolver); | 135 resetAllRuleSetsInTreeScope(styleResolver); |
134 if (change.styleResolverUpdateType == ResetStyleResolverAndFontSelec
tor) | 136 engine->removeFontFaceRules(change.fontFaceRulesToRemove); |
135 engine->resetFontSelector(); | |
136 styleResolver->removePendingAuthorStyleSheets(m_activeAuthorStyleShe
ets); | 137 styleResolver->removePendingAuthorStyleSheets(m_activeAuthorStyleShe
ets); |
137 styleResolver->lazyAppendAuthorStyleSheets(0, collection.activeAutho
rStyleSheets()); | 138 styleResolver->lazyAppendAuthorStyleSheets(0, collection.activeAutho
rStyleSheets()); |
138 } else { | 139 } else { |
139 styleResolver->lazyAppendAuthorStyleSheets(m_activeAuthorStyleSheets
.size(), collection.activeAuthorStyleSheets()); | 140 styleResolver->lazyAppendAuthorStyleSheets(m_activeAuthorStyleSheets
.size(), collection.activeAuthorStyleSheets()); |
140 } | 141 } |
141 } else if (change.styleResolverUpdateType == ResetStyleResolverAndFontSelect
or) { | |
142 engine->resetFontSelector(); | |
143 } | 142 } |
144 m_scopingNodesForStyleScoped.didRemoveScopingNodes(); | 143 m_scopingNodesForStyleScoped.didRemoveScopingNodes(); |
145 | 144 |
146 collection.swap(*this); | 145 collection.swap(*this); |
147 | 146 |
148 updateUsesRemUnits(); | 147 updateUsesRemUnits(); |
149 | 148 |
150 return change.requiresFullStyleRecalc; | 149 return change.requiresFullStyleRecalc; |
151 } | 150 } |
152 | 151 |
153 } | 152 } |
OLD | NEW |