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

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

Issue 2589243002: Clear CSSGlobalRuleSet on StyleEngine::didDetach(). (Closed)
Patch Set: reset() -> dispose(). Created 3 years, 12 months 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 | « third_party/WebKit/Source/core/css/CSSGlobalRuleSet.cpp ('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 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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 450
451 if (m_resolver) { 451 if (m_resolver) {
452 TRACE_EVENT1("blink", "StyleEngine::clearResolver", "frame", 452 TRACE_EVENT1("blink", "StyleEngine::clearResolver", "frame",
453 document().frame()); 453 document().frame());
454 m_resolver->dispose(); 454 m_resolver->dispose();
455 m_resolver.clear(); 455 m_resolver.clear();
456 } 456 }
457 } 457 }
458 458
459 void StyleEngine::didDetach() { 459 void StyleEngine::didDetach() {
460 m_globalRuleSet.dispose();
460 clearResolver(); 461 clearResolver();
461 m_viewportResolver = nullptr; 462 m_viewportResolver = nullptr;
462 m_mediaQueryEvaluator = nullptr; 463 m_mediaQueryEvaluator = nullptr;
463 clearFontCache(); 464 clearFontCache();
464 } 465 }
465 466
466 void StyleEngine::clearFontCache() { 467 void StyleEngine::clearFontCache() {
467 if (m_fontSelector) 468 if (m_fontSelector)
468 m_fontSelector->fontFaceCache()->clearCSSConnected(); 469 m_fontSelector->fontFaceCache()->clearCSSConnected();
469 if (m_resolver) 470 if (m_resolver)
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 } 1142 }
1142 1143
1143 DEFINE_TRACE_WRAPPERS(StyleEngine) { 1144 DEFINE_TRACE_WRAPPERS(StyleEngine) {
1144 for (auto sheet : m_injectedAuthorStyleSheets) { 1145 for (auto sheet : m_injectedAuthorStyleSheets) {
1145 visitor->traceWrappers(sheet); 1146 visitor->traceWrappers(sheet);
1146 } 1147 }
1147 visitor->traceWrappers(m_documentStyleSheetCollection); 1148 visitor->traceWrappers(m_documentStyleSheetCollection);
1148 } 1149 }
1149 1150
1150 } // namespace blink 1151 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSGlobalRuleSet.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698