| 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, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 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) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 { | 164 { |
| 165 // FIXME: we should not update generic font family settings when | 165 // FIXME: we should not update generic font family settings when |
| 166 // document is inactive. | 166 // document is inactive. |
| 167 ASSERT(m_document->isActive()); | 167 ASSERT(m_document->isActive()); |
| 168 | 168 |
| 169 m_fontSelector->updateGenericFontFamilySettings(*m_document); | 169 m_fontSelector->updateGenericFontFamilySettings(*m_document); |
| 170 if (m_resolver) | 170 if (m_resolver) |
| 171 m_resolver->invalidateMatchedPropertiesCache(); | 171 m_resolver->invalidateMatchedPropertiesCache(); |
| 172 } | 172 } |
| 173 | 173 |
| 174 void StyleEngine::removeFontFaceRules(const Vector<RawPtr<const StyleRuleFontFac
e> >& fontFaceRules) | |
| 175 { | |
| 176 FontFaceCache* cache = m_fontSelector->fontFaceCache(); | |
| 177 for (unsigned i = 0; i < fontFaceRules.size(); ++i) | |
| 178 cache->remove(fontFaceRules[i]); | |
| 179 if (m_resolver) | |
| 180 m_resolver->invalidateMatchedPropertiesCache(); | |
| 181 } | |
| 182 | |
| 183 PassRefPtr<CSSStyleSheet> StyleEngine::createSheet(Element* e, const String& tex
t) | 174 PassRefPtr<CSSStyleSheet> StyleEngine::createSheet(Element* e, const String& tex
t) |
| 184 { | 175 { |
| 185 RefPtr<CSSStyleSheet> styleSheet; | 176 RefPtr<CSSStyleSheet> styleSheet; |
| 186 AtomicString textContent(text); | 177 AtomicString textContent(text); |
| 187 | 178 |
| 188 HashMap<AtomicString, StyleSheetContents*>::AddResult result = m_textToSheet
Cache.add(textContent, nullptr); | 179 HashMap<AtomicString, StyleSheetContents*>::AddResult result = m_textToSheet
Cache.add(textContent, nullptr); |
| 189 if (result.isNewEntry || !result.storedValue->value) { | 180 if (result.isNewEntry || !result.storedValue->value) { |
| 190 styleSheet = CSSStyleSheet::create(e, KURL()); | 181 styleSheet = CSSStyleSheet::create(e, KURL()); |
| 191 styleSheet->contents()->parseString(text); | 182 styleSheet->contents()->parseString(text); |
| 192 if (result.isNewEntry) { | 183 if (result.isNewEntry) { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 } | 222 } |
| 232 | 223 |
| 233 void StyleEngine::fontsNeedUpdate(CSSFontSelector*) | 224 void StyleEngine::fontsNeedUpdate(CSSFontSelector*) |
| 234 { | 225 { |
| 235 if (m_resolver) | 226 if (m_resolver) |
| 236 m_resolver->invalidateMatchedPropertiesCache(); | 227 m_resolver->invalidateMatchedPropertiesCache(); |
| 237 m_document->setNeedsStyleRecalc(SubtreeStyleChange); | 228 m_document->setNeedsStyleRecalc(SubtreeStyleChange); |
| 238 } | 229 } |
| 239 | 230 |
| 240 } | 231 } |
| OLD | NEW |