| 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 const Vector<StyleRuleFontFace*> fontFaceRules = authorRules.fontFaceRul
es(); | 242 const Vector<StyleRuleFontFace*> fontFaceRules = authorRules.fontFaceRul
es(); |
| 243 for (unsigned i = 0; i < fontFaceRules.size(); ++i) | 243 for (unsigned i = 0; i < fontFaceRules.size(); ++i) |
| 244 fontSelector()->addFontFaceRule(fontFaceRules[i]); | 244 fontSelector()->addFontFaceRule(fontFaceRules[i]); |
| 245 if (fontFaceRules.size()) | 245 if (fontFaceRules.size()) |
| 246 invalidateMatchedPropertiesCache(); | 246 invalidateMatchedPropertiesCache(); |
| 247 } else { | 247 } else { |
| 248 addTreeBoundaryCrossingRules(authorRules.shadowDistributedRules(), scope
); | 248 addTreeBoundaryCrossingRules(authorRules.shadowDistributedRules(), scope
); |
| 249 } | 249 } |
| 250 } | 250 } |
| 251 | 251 |
| 252 void StyleResolver::resetFontSelector() |
| 253 { |
| 254 ASSERT(m_fontSelector); |
| 255 m_fontSelector->unregisterForInvalidationCallbacks(this); |
| 256 m_fontSelector->clearDocument(); |
| 257 invalidateMatchedPropertiesCache(); |
| 258 |
| 259 m_fontSelector = CSSFontSelector::create(&m_document); |
| 260 m_fontSelector->registerForInvalidationCallbacks(this); |
| 261 } |
| 262 |
| 252 void StyleResolver::resetAuthorStyle(const ContainerNode* scopingNode) | 263 void StyleResolver::resetAuthorStyle(const ContainerNode* scopingNode) |
| 253 { | 264 { |
| 254 // FIXME: When chanking scoped attribute, scopingNode's hasScopedHTMLStyleCh
ild has been already modified. | 265 // FIXME: When chanking scoped attribute, scopingNode's hasScopedHTMLStyleCh
ild has been already modified. |
| 255 // So we cannot use hasScopedHTMLStyleChild flag here. | 266 // So we cannot use hasScopedHTMLStyleChild flag here. |
| 256 ScopedStyleResolver* resolver = scopingNode ? m_styleTree.lookupScopedStyleR
esolverFor(scopingNode) : m_styleTree.scopedStyleResolverForDocument(); | 267 ScopedStyleResolver* resolver = scopingNode ? m_styleTree.lookupScopedStyleR
esolverFor(scopingNode) : m_styleTree.scopedStyleResolverForDocument(); |
| 257 if (!resolver) | 268 if (!resolver) |
| 258 return; | 269 return; |
| 259 | 270 |
| 260 treeBoundaryCrossingRules().reset(scopingNode); | 271 treeBoundaryCrossingRules().reset(scopingNode); |
| 261 | 272 |
| (...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1417 bool StyleResolver::affectedByViewportChange() const | 1428 bool StyleResolver::affectedByViewportChange() const |
| 1418 { | 1429 { |
| 1419 for (unsigned i = 0; i < m_viewportDependentMediaQueryResults.size(); ++i) { | 1430 for (unsigned i = 0; i < m_viewportDependentMediaQueryResults.size(); ++i) { |
| 1420 if (m_medium->eval(&m_viewportDependentMediaQueryResults[i]->m_expressio
n) != m_viewportDependentMediaQueryResults[i]->m_result) | 1431 if (m_medium->eval(&m_viewportDependentMediaQueryResults[i]->m_expressio
n) != m_viewportDependentMediaQueryResults[i]->m_result) |
| 1421 return true; | 1432 return true; |
| 1422 } | 1433 } |
| 1423 return false; | 1434 return false; |
| 1424 } | 1435 } |
| 1425 | 1436 |
| 1426 } // namespace WebCore | 1437 } // namespace WebCore |
| OLD | NEW |