Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: sky/engine/core/dom/StyleEngine.cpp

Issue 793933004: Remove dead StyleEngine::removeFontFaceRules. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/core/dom/StyleEngine.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « sky/engine/core/dom/StyleEngine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698