| 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 "core/xml/DocumentXSLT.h" | 5 #include "core/xml/DocumentXSLT.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/DOMWrapperWorld.h" | 7 #include "bindings/core/v8/DOMWrapperWorld.h" |
| 8 #include "bindings/core/v8/ScriptState.h" | 8 #include "bindings/core/v8/ScriptState.h" |
| 9 #include "bindings/core/v8/V8AbstractEventListener.h" | 9 #include "bindings/core/v8/V8AbstractEventListener.h" |
| 10 #include "bindings/core/v8/V8Binding.h" | 10 #include "bindings/core/v8/V8Binding.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // FIXME: If the transform failed we should probably report an error (like M
ozilla does). | 113 // FIXME: If the transform failed we should probably report an error (like M
ozilla does). |
| 114 LocalFrame* ownerFrame = document.frame(); | 114 LocalFrame* ownerFrame = document.frame(); |
| 115 processor->createDocumentFromSource(newSource, resultEncoding, resultMIMETyp
e, &document, ownerFrame); | 115 processor->createDocumentFromSource(newSource, resultEncoding, resultMIMETyp
e, &document, ownerFrame); |
| 116 InspectorInstrumentation::frameDocumentUpdated(ownerFrame); | 116 InspectorInstrumentation::frameDocumentUpdated(ownerFrame); |
| 117 document.setParsingState(Document::FinishedParsing); | 117 document.setParsingState(Document::FinishedParsing); |
| 118 } | 118 } |
| 119 | 119 |
| 120 ProcessingInstruction* DocumentXSLT::findXSLStyleSheet(Document& document) | 120 ProcessingInstruction* DocumentXSLT::findXSLStyleSheet(Document& document) |
| 121 { | 121 { |
| 122 for (Node* node = document.firstChild(); node; node = node->nextSibling()) { | 122 for (Node* node = document.firstChild(); node; node = node->nextSibling()) { |
| 123 if (node->getNodeType() != Node::PROCESSING_INSTRUCTION_NODE) | 123 if (node->getNodeType() != Node::kProcessingInstructionNode) |
| 124 continue; | 124 continue; |
| 125 | 125 |
| 126 ProcessingInstruction* pi = toProcessingInstruction(node); | 126 ProcessingInstruction* pi = toProcessingInstruction(node); |
| 127 if (pi->isXSL()) | 127 if (pi->isXSL()) |
| 128 return pi; | 128 return pi; |
| 129 } | 129 } |
| 130 return nullptr; | 130 return nullptr; |
| 131 } | 131 } |
| 132 | 132 |
| 133 bool DocumentXSLT::processingInstructionInsertedIntoDocument(Document& document,
ProcessingInstruction* pi) | 133 bool DocumentXSLT::processingInstructionInsertedIntoDocument(Document& document,
ProcessingInstruction* pi) |
| (...skipping 62 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 Supplement<Document>::trace(visitor); | 202 Supplement<Document>::trace(visitor); |
| 203 } | 203 } |
| 204 | 204 |
| 205 } // namespace blink | 205 } // namespace blink |
| OLD | NEW |