| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 125 |
| 126 bool DocumentXSLT::processingInstructionInsertedIntoDocument( | 126 bool DocumentXSLT::processingInstructionInsertedIntoDocument( |
| 127 Document& document, | 127 Document& document, |
| 128 ProcessingInstruction* pi) { | 128 ProcessingInstruction* pi) { |
| 129 if (!pi->isXSL()) | 129 if (!pi->isXSL()) |
| 130 return false; | 130 return false; |
| 131 | 131 |
| 132 if (!RuntimeEnabledFeatures::xsltEnabled() || !document.frame()) | 132 if (!RuntimeEnabledFeatures::xsltEnabled() || !document.frame()) |
| 133 return true; | 133 return true; |
| 134 | 134 |
| 135 ScriptState* scriptState = ScriptState::forMainWorld(document.frame()); | 135 ScriptState* scriptState = toScriptStateForMainWorld(document.frame()); |
| 136 if (!scriptState) | 136 if (!scriptState) |
| 137 return false; | 137 return false; |
| 138 DOMContentLoadedListener* listener = | 138 DOMContentLoadedListener* listener = |
| 139 DOMContentLoadedListener::create(scriptState, pi); | 139 DOMContentLoadedListener::create(scriptState, pi); |
| 140 document.addEventListener(EventTypeNames::DOMContentLoaded, listener, false); | 140 document.addEventListener(EventTypeNames::DOMContentLoaded, listener, false); |
| 141 DCHECK(!pi->eventListenerForXSLT()); | 141 DCHECK(!pi->eventListenerForXSLT()); |
| 142 pi->setEventListenerForXSLT(listener); | 142 pi->setEventListenerForXSLT(listener); |
| 143 return true; | 143 return true; |
| 144 } | 144 } |
| 145 | 145 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 } | 189 } |
| 190 return *supplement; | 190 return *supplement; |
| 191 } | 191 } |
| 192 | 192 |
| 193 DEFINE_TRACE(DocumentXSLT) { | 193 DEFINE_TRACE(DocumentXSLT) { |
| 194 visitor->trace(m_transformSourceDocument); | 194 visitor->trace(m_transformSourceDocument); |
| 195 Supplement<Document>::trace(visitor); | 195 Supplement<Document>::trace(visitor); |
| 196 } | 196 } |
| 197 | 197 |
| 198 } // namespace blink | 198 } // namespace blink |
| OLD | NEW |