Index: third_party/WebKit/Source/core/dom/StyleEngine.cpp |
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp |
index db587b430b914da1dccc41d3b4bb4ab662bf1d91..a7825c539b26af6749b3605f577a6e4976998b20 100644 |
--- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp |
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp |
@@ -61,9 +61,7 @@ StyleEngine::StyleEngine(Document& document) |
: m_document(&document) |
, m_isMaster(!document.importsController() || document.importsController()->master() == &document) |
, m_documentStyleSheetCollection(DocumentStyleSheetCollection::create(document)) |
- // We don't need to create CSSFontSelector for imported document or |
- // HTMLTemplateElement's document, because those documents have no frame. |
- , m_fontSelector(document.frame() ? CSSFontSelector::create(&document) : nullptr) |
+ , m_fontSelector(CSSFontSelector::create(&document)) |
Justin Novosad
2016/09/12 18:44:59
This should be lazily allocated instead of in the
zakerinasab
2016/09/12 19:47:34
Done.
|
{ |
if (m_fontSelector) |
m_fontSelector->registerForInvalidationCallbacks(this); |
@@ -390,13 +388,6 @@ void StyleEngine::appendActiveAuthorStyleSheets() |
void StyleEngine::createResolver() |
{ |
- TRACE_EVENT1("blink", "StyleEngine::createResolver", "frame", document().frame()); |
- // It is a programming error to attempt to resolve style on a Document |
- // which is not in a frame. Code which hits this should have checked |
- // Document::isActive() before calling into code which could get here. |
- |
- DCHECK(document().frame()); |
- |
m_resolver = StyleResolver::create(*m_document); |
// A scoped style resolver for document will be created during |