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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 // FIXME: If the transform failed we should probably report an error (like M
ozilla does). | 123 // FIXME: If the transform failed we should probably report an error (like M
ozilla does). |
124 LocalFrame* ownerFrame = document.frame(); | 124 LocalFrame* ownerFrame = document.frame(); |
125 processor->createDocumentFromSource(newSource, resultEncoding, resultMIMETyp
e, &document, ownerFrame); | 125 processor->createDocumentFromSource(newSource, resultEncoding, resultMIMETyp
e, &document, ownerFrame); |
126 InspectorInstrumentation::frameDocumentUpdated(ownerFrame); | 126 InspectorInstrumentation::frameDocumentUpdated(ownerFrame); |
127 document.setParsingState(Document::FinishedParsing); | 127 document.setParsingState(Document::FinishedParsing); |
128 } | 128 } |
129 | 129 |
130 ProcessingInstruction* DocumentXSLT::findXSLStyleSheet(Document& document) | 130 ProcessingInstruction* DocumentXSLT::findXSLStyleSheet(Document& document) |
131 { | 131 { |
132 for (Node* node = document.firstChild(); node; node = node->nextSibling()) { | 132 for (Node* node = document.firstChild(); node; node = node->nextSibling()) { |
133 if (node->nodeType() != Node::PROCESSING_INSTRUCTION_NODE) | 133 if (node->getNodeType() != Node::PROCESSING_INSTRUCTION_NODE) |
134 continue; | 134 continue; |
135 | 135 |
136 ProcessingInstruction* pi = toProcessingInstruction(node); | 136 ProcessingInstruction* pi = toProcessingInstruction(node); |
137 if (pi->isXSL()) | 137 if (pi->isXSL()) |
138 return pi; | 138 return pi; |
139 } | 139 } |
140 return nullptr; | 140 return nullptr; |
141 } | 141 } |
142 | 142 |
143 bool DocumentXSLT::processingInstructionInsertedIntoDocument(Document& document,
ProcessingInstruction* pi) | 143 bool DocumentXSLT::processingInstructionInsertedIntoDocument(Document& document,
ProcessingInstruction* pi) |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 return *supplement; | 206 return *supplement; |
207 } | 207 } |
208 | 208 |
209 DEFINE_TRACE(DocumentXSLT) | 209 DEFINE_TRACE(DocumentXSLT) |
210 { | 210 { |
211 visitor->trace(m_transformSourceDocument); | 211 visitor->trace(m_transformSourceDocument); |
212 WillBeHeapSupplement<Document>::trace(visitor); | 212 WillBeHeapSupplement<Document>::trace(visitor); |
213 } | 213 } |
214 | 214 |
215 } // namespace blink | 215 } // namespace blink |
OLD | NEW |