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

Unified Diff: Source/core/dom/Document.cpp

Issue 87503003: Moving fontSelector from StyleResolver to StyleEngine. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reverted hasAnyFontFaceRule Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 89d04e2a62c50f6a09b002d7ffecccd864d450d9..0a7575a641ef28bfeafb21045b1e762cbc51a64c 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -166,6 +166,7 @@
#include "core/rendering/RenderWidget.h"
#include "core/rendering/TextAutosizer.h"
#include "core/svg/SVGDocumentExtensions.h"
+#include "core/svg/SVGFontFaceElement.h"
#include "core/svg/SVGStyleElement.h"
#include "core/xml/XSLTProcessor.h"
#include "core/xml/parser/XMLDocumentParser.h"
@@ -392,7 +393,6 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC
, m_domTreeVersion(++s_globalTreeVersion)
, m_listenerTypes(0)
, m_mutationObserverTypes(0)
- , m_styleEngine(StyleEngine::create(*this))
, m_visitedLinkState(VisitedLinkState::create(*this))
, m_visuallyOrdered(false)
, m_readyState(Complete)
@@ -480,6 +480,11 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC
InspectorCounters::incrementCounter(InspectorCounters::DocumentCounter);
m_lifecyle.advanceTo(DocumentLifecycle::Inactive);
+
+ // Since CSSFontSelector requires Document::m_fetcher and StyleEngine owns
+ // CSSFontSelector, need to initialize m_styleEngine after initializing
+ // m_fetcher.
+ m_styleEngine = StyleEngine::create(*this);
}
Document::~Document()
@@ -1951,6 +1956,11 @@ void Document::clearStyleResolver()
m_styleEngine->clearResolver();
}
+CSSFontSelector* Document::fontSelector() const
dglazkov 2013/12/02 17:47:42 This function doesn't do anything useful and hides
tasak 2013/12/05 05:09:44 Done.
+{
+ return m_styleEngine->fontSelector();
+}
+
void Document::attach(const AttachContext& context)
{
ASSERT(m_lifecyle.state() == DocumentLifecycle::Inactive);

Powered by Google App Engine
This is Rietveld 408576698