| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/xml/DocumentXSLT.h" | 6 #include "core/xml/DocumentXSLT.h" |
| 7 | 7 |
| 8 #include "bindings/core/v8/DOMWrapperWorld.h" | 8 #include "bindings/core/v8/DOMWrapperWorld.h" |
| 9 #include "bindings/core/v8/ScriptState.h" | 9 #include "bindings/core/v8/ScriptState.h" |
| 10 #include "bindings/core/v8/V8AbstractEventListener.h" | 10 #include "bindings/core/v8/V8AbstractEventListener.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 ProcessingInstruction* DocumentXSLT::findXSLStyleSheet(Document& document) | 122 ProcessingInstruction* DocumentXSLT::findXSLStyleSheet(Document& document) |
| 123 { | 123 { |
| 124 for (Node* node = document.firstChild(); node; node = node->nextSibling()) { | 124 for (Node* node = document.firstChild(); node; node = node->nextSibling()) { |
| 125 if (node->nodeType() != Node::PROCESSING_INSTRUCTION_NODE) | 125 if (node->nodeType() != Node::PROCESSING_INSTRUCTION_NODE) |
| 126 continue; | 126 continue; |
| 127 | 127 |
| 128 ProcessingInstruction* pi = toProcessingInstruction(node); | 128 ProcessingInstruction* pi = toProcessingInstruction(node); |
| 129 if (pi->isXSL()) | 129 if (pi->isXSL()) |
| 130 return pi; | 130 return pi; |
| 131 } | 131 } |
| 132 return 0; | 132 return nullptr; |
| 133 } | 133 } |
| 134 | 134 |
| 135 bool DocumentXSLT::processingInstructionInsertedIntoDocument(Document& document,
ProcessingInstruction* pi) | 135 bool DocumentXSLT::processingInstructionInsertedIntoDocument(Document& document,
ProcessingInstruction* pi) |
| 136 { | 136 { |
| 137 if (!pi->isXSL()) | 137 if (!pi->isXSL()) |
| 138 return false; | 138 return false; |
| 139 | 139 |
| 140 if (!RuntimeEnabledFeatures::xsltEnabled() || !document.frame()) | 140 if (!RuntimeEnabledFeatures::xsltEnabled() || !document.frame()) |
| 141 return true; | 141 return true; |
| 142 | 142 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 return *supplement; | 196 return *supplement; |
| 197 } | 197 } |
| 198 | 198 |
| 199 DEFINE_TRACE(DocumentXSLT) | 199 DEFINE_TRACE(DocumentXSLT) |
| 200 { | 200 { |
| 201 visitor->trace(m_transformSourceDocument); | 201 visitor->trace(m_transformSourceDocument); |
| 202 WillBeHeapSupplement<Document>::trace(visitor); | 202 WillBeHeapSupplement<Document>::trace(visitor); |
| 203 } | 203 } |
| 204 | 204 |
| 205 } // namespace blink | 205 } // namespace blink |
| OLD | NEW |