| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
| 7 * rights reserved. | 7 * rights reserved. |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 namespace blink { | 58 namespace blink { |
| 59 | 59 |
| 60 using namespace HTMLNames; | 60 using namespace HTMLNames; |
| 61 | 61 |
| 62 StyleEngine::StyleEngine(Document& document) | 62 StyleEngine::StyleEngine(Document& document) |
| 63 : m_document(&document), | 63 : m_document(&document), |
| 64 m_isMaster(!document.importsController() || | 64 m_isMaster(!document.importsController() || |
| 65 document.importsController()->master() == &document), | 65 document.importsController()->master() == &document), |
| 66 m_documentStyleSheetCollection( | 66 m_documentStyleSheetCollection( |
| 67 DocumentStyleSheetCollection::create(document)) | 67 DocumentStyleSheetCollection::create(document)), |
| 68 // We don't need to create CSSFontSelector for imported document or | 68 // We don't need to create CSSFontSelector for imported document or |
| 69 // HTMLTemplateElement's document, because those documents have no frame. | 69 // HTMLTemplateElement's document, because those documents have no frame. |
| 70 , | |
| 71 m_fontSelector(document.frame() ? CSSFontSelector::create(&document) | 70 m_fontSelector(document.frame() ? CSSFontSelector::create(&document) |
| 72 : nullptr) { | 71 : nullptr) { |
| 73 if (m_fontSelector) | 72 if (m_fontSelector) |
| 74 m_fontSelector->registerForInvalidationCallbacks(this); | 73 m_fontSelector->registerForInvalidationCallbacks(this); |
| 75 } | 74 } |
| 76 | 75 |
| 77 StyleEngine::~StyleEngine() {} | 76 StyleEngine::~StyleEngine() {} |
| 78 | 77 |
| 79 static bool isStyleElement(Node& node) { | 78 static bool isStyleElement(Node& node) { |
| 80 return isHTMLStyleElement(node) || isSVGStyleElement(node); | 79 return isHTMLStyleElement(node) || isSVGStyleElement(node); |
| (...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 965 } | 964 } |
| 966 | 965 |
| 967 DEFINE_TRACE_WRAPPERS(StyleEngine) { | 966 DEFINE_TRACE_WRAPPERS(StyleEngine) { |
| 968 for (auto sheet : m_injectedAuthorStyleSheets) { | 967 for (auto sheet : m_injectedAuthorStyleSheets) { |
| 969 visitor->traceWrappers(sheet); | 968 visitor->traceWrappers(sheet); |
| 970 } | 969 } |
| 971 visitor->traceWrappers(m_documentStyleSheetCollection); | 970 visitor->traceWrappers(m_documentStyleSheetCollection); |
| 972 } | 971 } |
| 973 | 972 |
| 974 } // namespace blink | 973 } // namespace blink |
| OLD | NEW |