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

Side by Side Diff: third_party/WebKit/Source/core/dom/StyleEngine.cpp

Issue 2582413002: Get rid of @font-face resource leak. (Closed)
Patch Set: Created 4 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 | « no previous file | 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 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 document().frame()); 457 document().frame());
458 m_resolver->dispose(); 458 m_resolver->dispose();
459 m_resolver.clear(); 459 m_resolver.clear();
460 } 460 }
461 } 461 }
462 462
463 void StyleEngine::didDetach() { 463 void StyleEngine::didDetach() {
464 clearResolver(); 464 clearResolver();
465 m_viewportResolver = nullptr; 465 m_viewportResolver = nullptr;
466 m_mediaQueryEvaluator = nullptr; 466 m_mediaQueryEvaluator = nullptr;
467 clearFontCache();
467 } 468 }
468 469
469 void StyleEngine::clearFontCache() { 470 void StyleEngine::clearFontCache() {
470 if (m_fontSelector) 471 if (m_fontSelector)
471 m_fontSelector->fontFaceCache()->clearCSSConnected(); 472 m_fontSelector->fontFaceCache()->clearCSSConnected();
472 if (m_resolver) 473 if (m_resolver)
473 m_resolver->invalidateMatchedPropertiesCache(); 474 m_resolver->invalidateMatchedPropertiesCache();
474 } 475 }
475 476
476 void StyleEngine::updateGenericFontFamilySettings() { 477 void StyleEngine::updateGenericFontFamilySettings() {
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 } 1145 }
1145 1146
1146 DEFINE_TRACE_WRAPPERS(StyleEngine) { 1147 DEFINE_TRACE_WRAPPERS(StyleEngine) {
1147 for (auto sheet : m_injectedAuthorStyleSheets) { 1148 for (auto sheet : m_injectedAuthorStyleSheets) {
1148 visitor->traceWrappers(sheet); 1149 visitor->traceWrappers(sheet);
1149 } 1150 }
1150 visitor->traceWrappers(m_documentStyleSheetCollection); 1151 visitor->traceWrappers(m_documentStyleSheetCollection);
1151 } 1152 }
1152 1153
1153 } // namespace blink 1154 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698