OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 void StyleResolver::finishAppendAuthorStyleSheets() | 215 void StyleResolver::finishAppendAuthorStyleSheets() |
216 { | 216 { |
217 collectFeatures(); | 217 collectFeatures(); |
218 | 218 |
219 if (document().renderer() && document().renderer()->style()) | 219 if (document().renderer() && document().renderer()->style()) |
220 document().renderer()->style()->font().update(fontSelector()); | 220 document().renderer()->style()->font().update(fontSelector()); |
221 | 221 |
222 collectViewportRules(); | 222 collectViewportRules(); |
223 } | 223 } |
224 | 224 |
| 225 void StyleResolver::resetFontSelector() |
| 226 { |
| 227 ASSERT(m_fontSelector); |
| 228 m_fontSelector->unregisterForInvalidationCallbacks(this); |
| 229 m_fontSelector->clearDocument(); |
| 230 invalidateMatchedPropertiesCache(); |
| 231 |
| 232 m_fontSelector = CSSFontSelector::create(&m_document); |
| 233 m_fontSelector->registerForInvalidationCallbacks(this); |
| 234 } |
| 235 |
225 void StyleResolver::resetAuthorStyle(const ContainerNode* scopingNode) | 236 void StyleResolver::resetAuthorStyle(const ContainerNode* scopingNode) |
226 { | 237 { |
227 // FIXME: When chanking scoped attribute, scopingNode's hasScopedHTMLStyleCh
ild has been already modified. | 238 // FIXME: When chanking scoped attribute, scopingNode's hasScopedHTMLStyleCh
ild has been already modified. |
228 // So we cannot use hasScopedHTMLStyleChild flag here. | 239 // So we cannot use hasScopedHTMLStyleChild flag here. |
229 ScopedStyleResolver* resolver = scopingNode ? m_styleTree.lookupScopedStyleR
esolverFor(scopingNode) : m_styleTree.scopedStyleResolverForDocument(); | 240 ScopedStyleResolver* resolver = scopingNode ? m_styleTree.lookupScopedStyleR
esolverFor(scopingNode) : m_styleTree.scopedStyleResolverForDocument(); |
230 if (!resolver) | 241 if (!resolver) |
231 return; | 242 return; |
232 | 243 |
233 m_ruleSets.treeBoundaryCrossingRules().reset(scopingNode); | 244 m_ruleSets.treeBoundaryCrossingRules().reset(scopingNode); |
234 | 245 |
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1600 m_matchedPropertiesSearches, m_matchedPropertiesHit, m_matchedProperties
SharedInheritedHit, m_matchedPropertiesToCache, m_matchedPropertiesEnteredIntoCa
che); | 1611 m_matchedPropertiesSearches, m_matchedPropertiesHit, m_matchedProperties
SharedInheritedHit, m_matchedPropertiesToCache, m_matchedPropertiesEnteredIntoCa
che); |
1601 | 1612 |
1602 fprintf(stderr, "Total:\n"); | 1613 fprintf(stderr, "Total:\n"); |
1603 printStyleStats(m_totalSearches, m_totalElementsEligibleForSharing, m_totalS
tylesShared, m_totalSearchFoundSiblingForSharing, m_totalSearchesMissedSharing, | 1614 printStyleStats(m_totalSearches, m_totalElementsEligibleForSharing, m_totalS
tylesShared, m_totalSearchFoundSiblingForSharing, m_totalSearchesMissedSharing, |
1604 m_totalMatchedPropertiesSearches, m_totalMatchedPropertiesHit, m_totalMa
tchedPropertiesSharedInheritedHit, m_totalMatchedPropertiesToCache, m_totalMatch
edPropertiesEnteredIntoCache); | 1615 m_totalMatchedPropertiesSearches, m_totalMatchedPropertiesHit, m_totalMa
tchedPropertiesSharedInheritedHit, m_totalMatchedPropertiesToCache, m_totalMatch
edPropertiesEnteredIntoCache); |
1605 fprintf(stderr, "-----------------------------------------------------------
---------------------\n"); | 1616 fprintf(stderr, "-----------------------------------------------------------
---------------------\n"); |
1606 } | 1617 } |
1607 #endif | 1618 #endif |
1608 | 1619 |
1609 } // namespace WebCore | 1620 } // namespace WebCore |
OLD | NEW |