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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 analyzeStyleSheetChange(updateMode, activeAuthorStyleSheets(), activeCSSStyl
eSheets, styleResolverUpdateType, requiresFullStyleRecalc); | 103 analyzeStyleSheetChange(updateMode, activeAuthorStyleSheets(), activeCSSStyl
eSheets, styleResolverUpdateType, requiresFullStyleRecalc); |
104 | 104 |
105 if (StyleResolver* styleResolver = document()->styleResolverIfExists()) { | 105 if (StyleResolver* styleResolver = document()->styleResolverIfExists()) { |
106 // FIXME: We might have already had styles in child treescope. In this c
ase, we cannot use buildScopedStyleTreeInDocumentOrder. | 106 // FIXME: We might have already had styles in child treescope. In this c
ase, we cannot use buildScopedStyleTreeInDocumentOrder. |
107 // Need to change "false" to some valid condition. | 107 // Need to change "false" to some valid condition. |
108 styleResolver->setBuildScopedStyleTreeInDocumentOrder(false); | 108 styleResolver->setBuildScopedStyleTreeInDocumentOrder(false); |
109 if (styleResolverUpdateType == Reset || styleResolverUpdateType == Recon
struct) { | 109 if (styleResolverUpdateType == Reset || styleResolverUpdateType == Recon
struct) { |
110 // We should not destroy StyleResolver when we find any stylesheet u
pdate in a shadow tree. | 110 // We should not destroy StyleResolver when we find any stylesheet u
pdate in a shadow tree. |
111 // In this case, we will reset rulesets created from style elements
in the shadow tree. | 111 // In this case, we will reset rulesets created from style elements
in the shadow tree. |
112 resetAllRuleSetsInTreeScope(styleResolver); | 112 resetAllRuleSetsInTreeScope(styleResolver); |
113 styleResolver->appendAuthorStyleSheets(0, activeCSSStyleSheets); | 113 styleResolver->removePendingAuthorStyleSheets(m_activeAuthorStyleShe
ets); |
| 114 styleResolver->lazyAppendAuthorStyleSheets(0, activeCSSStyleSheets); |
114 } else { | 115 } else { |
115 ASSERT(styleResolverUpdateType == Additive); | 116 ASSERT(styleResolverUpdateType == Additive); |
116 styleResolver->appendAuthorStyleSheets(m_activeAuthorStyleSheets.siz
e(), activeCSSStyleSheets); | 117 styleResolver->lazyAppendAuthorStyleSheets(m_activeAuthorStyleSheets
.size(), activeCSSStyleSheets); |
117 } | 118 } |
118 } | 119 } |
119 if (requiresFullStyleRecalc) | 120 if (requiresFullStyleRecalc) |
120 toShadowRoot(m_treeScope.rootNode())->host()->setNeedsStyleRecalc(); | 121 toShadowRoot(m_treeScope.rootNode())->host()->setNeedsStyleRecalc(); |
121 | 122 |
122 m_scopingNodesForStyleScoped.didRemoveScopingNodes(); | 123 m_scopingNodesForStyleScoped.didRemoveScopingNodes(); |
123 m_activeAuthorStyleSheets.swap(activeCSSStyleSheets); | 124 m_activeAuthorStyleSheets.swap(activeCSSStyleSheets); |
124 m_styleSheetsForStyleSheetList.swap(styleSheets); | 125 m_styleSheetsForStyleSheetList.swap(styleSheets); |
125 updateUsesRemUnits(); | 126 updateUsesRemUnits(); |
126 | 127 |
127 return requiresFullStyleRecalc; | 128 return requiresFullStyleRecalc; |
128 } | 129 } |
129 | 130 |
130 } | 131 } |
OLD | NEW |