Remove some dead code.

These methods have no callers. I also added a TODO
to actually clear the font cache properly.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/816423004
This commit is contained in:
Elliott Sprehn 2015-01-12 23:33:11 -08:00
parent 60748a6f94
commit a5d3fcd3d4
4 changed files with 8 additions and 17 deletions

View File

@ -957,11 +957,6 @@ void Document::scheduleRenderTreeUpdate()
TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), "CallStack", TRACE_EVENT_SCOPE_PROCESS, "stack", InspectorCallStackEvent::currentCallStack());
}
bool Document::hasPendingForcedStyleRecalc() const
{
return hasPendingStyleRecalc() && !inStyleRecalc() && styleChangeType() >= SubtreeStyleChange;
}
void Document::updateDistributionIfNeeded()
{
ScriptForbiddenScope forbidScript;

View File

@ -343,7 +343,6 @@ public:
void updateHoverActiveState(const HitTestRequest&, Element*, const PlatformMouseEvent* = 0);
void scheduleRenderTreeUpdateIfNeeded();
bool hasPendingForcedStyleRecalc() const;
void attachRange(Range*);
void detachRange(Range*);

View File

@ -81,11 +81,6 @@ void StyleEngine::updateActiveStyleSheets()
m_document->renderView()->style()->font().update(fontSelector());
}
unsigned StyleEngine::resolverAccessCount() const
{
return m_resolver->accessCount();
}
void StyleEngine::resolverChanged()
{
if (!m_document->isActive())

View File

@ -50,24 +50,23 @@ class StyleSheetContents;
class StyleEngine final : public CSSFontSelectorClient {
WTF_MAKE_FAST_ALLOCATED;
public:
static PassOwnPtr<StyleEngine> create(Document& document) { return adoptPtr(new StyleEngine(document)); }
static PassOwnPtr<StyleEngine> create(Document& document)
{
return adoptPtr(new StyleEngine(document));
}
~StyleEngine();
void detachFromDocument();
void addTreeScope(TreeScope&);
void removeTreeScope(TreeScope&);
StyleResolver& resolver() { return *m_resolver; }
CSSFontSelector* fontSelector() { return m_fontSelector.get(); }
void clearFontCache();
// updateGenericFontFamilySettings is used from WebSettingsImpl.
void updateGenericFontFamilySettings();
void resolverChanged();
unsigned resolverAccessCount() const;
PassRefPtr<CSSStyleSheet> createSheet(Element*, const String& text);
void removeSheet(StyleSheetContents*);
@ -79,6 +78,9 @@ private:
private:
explicit StyleEngine(Document&);
// TODO(esprehn): Need to call this after @font-face rules load.
void clearFontCache();
void updateActiveStyleSheets();
RawPtr<Document> m_document;