| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of the XSL implementation. | 2 * This file is part of the XSL implementation. |
| 3 * | 3 * |
| 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple, Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple, Inc. All rights reserved. |
| 5 * Copyright (C) 2005, 2006 Alexey Proskuryakov <ap@webkit.org> | 5 * Copyright (C) 2005, 2006 Alexey Proskuryakov <ap@webkit.org> |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 if (frame) { | 77 if (frame) { |
| 78 Document* oldDocument = frame->document(); | 78 Document* oldDocument = frame->document(); |
| 79 // Before parsing, we need to save & detach the old document and get the new | 79 // Before parsing, we need to save & detach the old document and get the new |
| 80 // document in place. Document::shutdown() tears down the FrameView, so | 80 // document in place. Document::shutdown() tears down the FrameView, so |
| 81 // remember whether or not there was one. | 81 // remember whether or not there was one. |
| 82 bool hasView = frame->view(); | 82 bool hasView = frame->view(); |
| 83 oldDocument->shutdown(); | 83 oldDocument->shutdown(); |
| 84 // Re-create the FrameView if needed. | 84 // Re-create the FrameView if needed. |
| 85 if (hasView) | 85 if (hasView) |
| 86 frame->loader().client()->transitionToCommittedForNewPage(); | 86 frame->loader().client()->transitionToCommittedForNewPage(); |
| 87 result = frame->localDOMWindow()->installNewDocument(sourceMIMEType, init, | 87 result = frame->domWindow()->installNewDocument(sourceMIMEType, init, |
| 88 forceXHTML); | 88 forceXHTML); |
| 89 | 89 |
| 90 if (oldDocument) { | 90 if (oldDocument) { |
| 91 DocumentXSLT::from(*result).setTransformSourceDocument(oldDocument); | 91 DocumentXSLT::from(*result).setTransformSourceDocument(oldDocument); |
| 92 result->updateSecurityOrigin(oldDocument->getSecurityOrigin()); | 92 result->updateSecurityOrigin(oldDocument->getSecurityOrigin()); |
| 93 result->setCookieURL(oldDocument->cookieURL()); | 93 result->setCookieURL(oldDocument->cookieURL()); |
| 94 | 94 |
| 95 ContentSecurityPolicy* csp = ContentSecurityPolicy::create(); | 95 ContentSecurityPolicy* csp = ContentSecurityPolicy::create(); |
| 96 csp->copyStateFrom(oldDocument->contentSecurityPolicy()); | 96 csp->copyStateFrom(oldDocument->contentSecurityPolicy()); |
| 97 result->initContentSecurityPolicy(csp); | 97 result->initContentSecurityPolicy(csp); |
| 98 } | 98 } |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 m_parameters.clear(); | 165 m_parameters.clear(); |
| 166 } | 166 } |
| 167 | 167 |
| 168 DEFINE_TRACE(XSLTProcessor) { | 168 DEFINE_TRACE(XSLTProcessor) { |
| 169 visitor->trace(m_stylesheet); | 169 visitor->trace(m_stylesheet); |
| 170 visitor->trace(m_stylesheetRootNode); | 170 visitor->trace(m_stylesheetRootNode); |
| 171 visitor->trace(m_document); | 171 visitor->trace(m_document); |
| 172 } | 172 } |
| 173 | 173 |
| 174 } // namespace blink | 174 } // namespace blink |
| OLD | NEW |