diff --git a/engine/core/dom/Document.cpp b/engine/core/dom/Document.cpp index 6e00ce36440..504b9189051 100644 --- a/engine/core/dom/Document.cpp +++ b/engine/core/dom/Document.cpp @@ -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; diff --git a/engine/core/dom/Document.h b/engine/core/dom/Document.h index 12d581c41d7..5336b75d210 100644 --- a/engine/core/dom/Document.h +++ b/engine/core/dom/Document.h @@ -343,7 +343,6 @@ public: void updateHoverActiveState(const HitTestRequest&, Element*, const PlatformMouseEvent* = 0); void scheduleRenderTreeUpdateIfNeeded(); - bool hasPendingForcedStyleRecalc() const; void attachRange(Range*); void detachRange(Range*); diff --git a/engine/core/dom/StyleEngine.cpp b/engine/core/dom/StyleEngine.cpp index 20c7a0471f1..a38b3dc1218 100644 --- a/engine/core/dom/StyleEngine.cpp +++ b/engine/core/dom/StyleEngine.cpp @@ -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()) diff --git a/engine/core/dom/StyleEngine.h b/engine/core/dom/StyleEngine.h index de1d5642a20..6d21618bda4 100644 --- a/engine/core/dom/StyleEngine.h +++ b/engine/core/dom/StyleEngine.h @@ -50,24 +50,23 @@ class StyleSheetContents; class StyleEngine final : public CSSFontSelectorClient { WTF_MAKE_FAST_ALLOCATED; public: - static PassOwnPtr create(Document& document) { return adoptPtr(new StyleEngine(document)); } + static PassOwnPtr 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 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 m_document;