| 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 if (styleSheetContentsHasFontFaceRule(addedSheets)) { | 195 if (styleSheetContentsHasFontFaceRule(addedSheets)) { |
| 196 change.styleResolverUpdateType = ResetStyleResolverAndFontSelect
or; | 196 change.styleResolverUpdateType = ResetStyleResolverAndFontSelect
or; |
| 197 return; | 197 return; |
| 198 } | 198 } |
| 199 // FIXME: since currently all stylesheets are re-added after resetin
g styleresolver, | 199 // FIXME: since currently all stylesheets are re-added after resetin
g styleresolver, |
| 200 // fontSelector should be always reset. After creating RuleSet for e
ach StyleSheetContents, | 200 // fontSelector should be always reset. After creating RuleSet for e
ach StyleSheetContents, |
| 201 // we can avoid appending all stylesheetcontents in reset case. | 201 // we can avoid appending all stylesheetcontents in reset case. |
| 202 // So we can remove "styleSheetContentsHasFontFaceRule(newSheets)". | 202 // So we can remove "styleSheetContentsHasFontFaceRule(newSheets)". |
| 203 if (cssStyleSheetHasFontFaceRule(newCollection.activeAuthorStyleShee
ts())) | 203 if (cssStyleSheetHasFontFaceRule(newCollection.activeAuthorStyleShee
ts())) |
| 204 change.styleResolverUpdateType = ResetStyleResolverAndFontSelect
or; | 204 change.styleResolverUpdateType = ResetStyleResolverAndFontSelect
or; |
| 205 change.styleResolverUpdateType = Reset; | 205 else |
| 206 change.styleResolverUpdateType = Reset; |
| 206 } | 207 } |
| 207 } | 208 } |
| 208 | 209 |
| 209 // FIXME: If styleResolverUpdateType is still Reconstruct, we could return e
arly here | 210 // FIXME: If styleResolverUpdateType is still Reconstruct, we could return e
arly here |
| 210 // as destroying the StyleResolver will recalc the whole document anyway? | 211 // as destroying the StyleResolver will recalc the whole document anyway? |
| 211 | 212 |
| 212 // If we are already parsing the body and so may have significant amount of
elements, put some effort into trying to avoid style recalcs. | 213 // If we are already parsing the body and so may have significant amount of
elements, put some effort into trying to avoid style recalcs. |
| 213 if (!document()->body() || document()->hasNodesWithPlaceholderStyle()) | 214 if (!document()->body() || document()->hasNodesWithPlaceholderStyle()) |
| 214 return; | 215 return; |
| 215 StyleInvalidationAnalysis invalidationAnalysis(addedSheets); | 216 StyleInvalidationAnalysis invalidationAnalysis(addedSheets); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 242 } | 243 } |
| 243 return false; | 244 return false; |
| 244 } | 245 } |
| 245 | 246 |
| 246 void StyleSheetCollection::updateUsesRemUnits() | 247 void StyleSheetCollection::updateUsesRemUnits() |
| 247 { | 248 { |
| 248 m_usesRemUnits = styleSheetsUseRemUnits(m_activeAuthorStyleSheets); | 249 m_usesRemUnits = styleSheetsUseRemUnits(m_activeAuthorStyleSheets); |
| 249 } | 250 } |
| 250 | 251 |
| 251 } | 252 } |
| OLD | NEW |