| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 return 0; | 95 return 0; |
| 96 | 96 |
| 97 switch (type) { | 97 switch (type) { |
| 98 case XSLT_LOAD_DOCUMENT: { | 98 case XSLT_LOAD_DOCUMENT: { |
| 99 xsltTransformContextPtr context = (xsltTransformContextPtr)ctxt; | 99 xsltTransformContextPtr context = (xsltTransformContextPtr)ctxt; |
| 100 xmlChar* base = xmlNodeGetBase(context->document->doc, context->node); | 100 xmlChar* base = xmlNodeGetBase(context->document->doc, context->node); |
| 101 KURL url(KURL(ParsedURLString, reinterpret_cast<const char*>(base)), rei
nterpret_cast<const char*>(uri)); | 101 KURL url(KURL(ParsedURLString, reinterpret_cast<const char*>(base)), rei
nterpret_cast<const char*>(uri)); |
| 102 xmlFree(base); | 102 xmlFree(base); |
| 103 | 103 |
| 104 ResourceLoaderOptions fetchOptions(ResourceFetcher::defaultResourceOptio
ns()); | 104 ResourceLoaderOptions fetchOptions(ResourceFetcher::defaultResourceOptio
ns()); |
| 105 fetchOptions.requestOriginPolicy = RestrictToSameOrigin; | |
| 106 FetchRequest request(ResourceRequest(url), FetchInitiatorTypeNames::xml,
fetchOptions); | 105 FetchRequest request(ResourceRequest(url), FetchInitiatorTypeNames::xml,
fetchOptions); |
| 106 request.setOriginRestriction(FetchRequest::RestrictToSameOrigin); |
| 107 ResourcePtr<Resource> resource = globalResourceFetcher->fetchSynchronous
ly(request); | 107 ResourcePtr<Resource> resource = globalResourceFetcher->fetchSynchronous
ly(request); |
| 108 if (!resource || !globalProcessor) | 108 if (!resource || !globalProcessor) |
| 109 return 0; | 109 return 0; |
| 110 | 110 |
| 111 PageConsole* console = 0; | 111 PageConsole* console = 0; |
| 112 Frame* frame = globalProcessor->xslStylesheet()->ownerDocument()->frame(
); | 112 Frame* frame = globalProcessor->xslStylesheet()->ownerDocument()->frame(
); |
| 113 if (frame && frame->page()) | 113 if (frame && frame->page()) |
| 114 console = &frame->page()->console(); | 114 console = &frame->page()->console(); |
| 115 xmlSetStructuredErrorFunc(console, XSLTProcessor::parseErrorFunc); | 115 xmlSetStructuredErrorFunc(console, XSLTProcessor::parseErrorFunc); |
| 116 xmlSetGenericErrorFunc(console, XSLTProcessor::genericErrorFunc); | 116 xmlSetGenericErrorFunc(console, XSLTProcessor::genericErrorFunc); |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 | 338 |
| 339 sheet->method = origMethod; | 339 sheet->method = origMethod; |
| 340 setXSLTLoadCallBack(0, 0, 0); | 340 setXSLTLoadCallBack(0, 0, 0); |
| 341 xsltFreeStylesheet(sheet); | 341 xsltFreeStylesheet(sheet); |
| 342 m_stylesheet = 0; | 342 m_stylesheet = 0; |
| 343 | 343 |
| 344 return success; | 344 return success; |
| 345 } | 345 } |
| 346 | 346 |
| 347 } // namespace WebCore | 347 } // namespace WebCore |
| OLD | NEW |