Commit 1bb2f1d3 authored by rune's avatar rune Committed by Commit bot

Try to do less work clearing the font-cache in StyleEngine::didDetach.

Clearing the whole font-cache without considering css-connected fonts
could be cheaper. This is a speculative fix for issue 677415.

BUG=677415

Review-Url: https://codereview.chromium.org/2622673003
Cr-Commit-Position: refs/heads/master@{#443202}
parent 78dd11ea
...@@ -451,7 +451,9 @@ void StyleEngine::didDetach() { ...@@ -451,7 +451,9 @@ void StyleEngine::didDetach() {
m_activeTreeScopes.clear(); m_activeTreeScopes.clear();
m_viewportResolver = nullptr; m_viewportResolver = nullptr;
m_mediaQueryEvaluator = nullptr; m_mediaQueryEvaluator = nullptr;
clearFontCache(); if (m_fontSelector)
m_fontSelector->fontFaceCache()->clearAll();
m_fontSelector = nullptr;
} }
void StyleEngine::clearFontCache() { void StyleEngine::clearFontCache() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment