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