Chromium Code Reviews| 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); |