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

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: Created 7 years 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
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/DocumentStyleSheetCollection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 367574167ee7cfceab6616ae24f5bc7973f5ebaa..5afff14e6f1f08f757a3705140b9662c00103da2 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()
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/DocumentStyleSheetCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698