| Index: Source/core/dom/StyleEngine.cpp
|
| diff --git a/Source/core/dom/StyleEngine.cpp b/Source/core/dom/StyleEngine.cpp
|
| index 9b72382bc7ab9eb1c8d22a770ebbfb87c3467798..bca61dddf1689c05f81b291f9cefdb4ccd8d4699 100644
|
| --- a/Source/core/dom/StyleEngine.cpp
|
| +++ b/Source/core/dom/StyleEngine.cpp
|
| @@ -69,7 +69,6 @@ StyleEngine::StyleEngine(Document& 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_xslStyleSheet(nullptr)
|
| {
|
| if (m_fontSelector)
|
| m_fontSelector->registerForInvalidationCallbacks(this);
|
| @@ -295,7 +294,6 @@ void StyleEngine::addStyleSheetCandidateNode(Node* node, bool createdByParser)
|
|
|
| TreeScope& treeScope = isStyleElement(*node) ? node->treeScope() : *m_document;
|
| ASSERT(isStyleElement(*node) || treeScope == m_document);
|
| - ASSERT(!isXSLStyleSheet(*node));
|
| TreeScopeStyleSheetCollection* collection = ensureStyleSheetCollectionFor(treeScope);
|
| ASSERT(collection);
|
| collection->addStyleSheetCandidateNode(node, createdByParser);
|
| @@ -313,7 +311,6 @@ void StyleEngine::removeStyleSheetCandidateNode(Node* node)
|
| void StyleEngine::removeStyleSheetCandidateNode(Node* node, TreeScope& treeScope)
|
| {
|
| ASSERT(isStyleElement(*node) || treeScope == m_document);
|
| - ASSERT(!isXSLStyleSheet(*node));
|
|
|
| TreeScopeStyleSheetCollection* collection = styleSheetCollectionFor(treeScope);
|
| ASSERT(collection);
|
| @@ -323,37 +320,6 @@ void StyleEngine::removeStyleSheetCandidateNode(Node* node, TreeScope& treeScope
|
| m_activeTreeScopes.remove(&treeScope);
|
| }
|
|
|
| -void StyleEngine::addXSLStyleSheet(ProcessingInstruction* node, bool createdByParser)
|
| -{
|
| - if (!node->inDocument())
|
| - return;
|
| -
|
| - ASSERT(isXSLStyleSheet(*node));
|
| - bool needToUpdate = false;
|
| - if (createdByParser || !m_xslStyleSheet) {
|
| - needToUpdate = !m_xslStyleSheet;
|
| - } else {
|
| - unsigned position = m_xslStyleSheet->compareDocumentPosition(node, Node::TreatShadowTreesAsDisconnected);
|
| - needToUpdate = position & Node::DOCUMENT_POSITION_FOLLOWING;
|
| - }
|
| -
|
| - if (!needToUpdate)
|
| - return;
|
| -
|
| - markTreeScopeDirty(*m_document);
|
| - m_xslStyleSheet = node;
|
| -}
|
| -
|
| -void StyleEngine::removeXSLStyleSheet(ProcessingInstruction* node)
|
| -{
|
| - ASSERT(isXSLStyleSheet(*node));
|
| - if (m_xslStyleSheet != node)
|
| - return;
|
| -
|
| - markTreeScopeDirty(*m_document);
|
| - m_xslStyleSheet = nullptr;
|
| -}
|
| -
|
| void StyleEngine::modifiedStyleSheetCandidateNode(Node* node)
|
| {
|
| if (!node->inDocument())
|
| @@ -535,13 +501,6 @@ bool StyleEngine::shouldClearResolver() const
|
| return !m_didCalculateResolver && !haveStylesheetsLoaded();
|
| }
|
|
|
| -bool StyleEngine::shouldApplyXSLTransform() const
|
| -{
|
| - if (!RuntimeEnabledFeatures::xsltEnabled())
|
| - return false;
|
| - return m_xslStyleSheet && !m_document->transformSourceDocument();
|
| -}
|
| -
|
| void StyleEngine::resolverChanged(StyleResolverUpdateMode mode)
|
| {
|
| if (!isMaster()) {
|
| @@ -557,15 +516,6 @@ void StyleEngine::resolverChanged(StyleResolverUpdateMode mode)
|
| return;
|
| }
|
|
|
| - if (shouldApplyXSLTransform()) {
|
| - // Processing instruction (XML documents only).
|
| - // We don't support linking to embedded CSS stylesheets, see <https://bugs.webkit.org/show_bug.cgi?id=49281> for discussion.
|
| - // Don't apply XSL transforms to already transformed documents -- <rdar://problem/4132806>
|
| - if (!m_document->parsing() && !m_xslStyleSheet->isLoading())
|
| - m_document->applyXSLTransform(m_xslStyleSheet.get());
|
| - return;
|
| - }
|
| -
|
| m_didCalculateResolver = true;
|
| updateActiveStyleSheets(mode);
|
| }
|
| @@ -717,7 +667,6 @@ void StyleEngine::trace(Visitor* visitor)
|
| visitor->trace(m_fontSelector);
|
| visitor->trace(m_textToSheetCache);
|
| visitor->trace(m_sheetToTextCache);
|
| - visitor->trace(m_xslStyleSheet);
|
| #endif
|
| CSSFontSelectorClient::trace(visitor);
|
| }
|
|
|