Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: third_party/WebKit/Source/core/xml/XSLTProcessorLibxslt.cpp

Issue 2054643003: Remove duplication of encoded image data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (rebase) Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 FrameConsole* console = nullptr; 111 FrameConsole* console = nullptr;
112 LocalFrame* frame = globalProcessor->xslStylesheet()->ownerDocument()->f rame(); 112 LocalFrame* frame = globalProcessor->xslStylesheet()->ownerDocument()->f rame();
113 if (frame) 113 if (frame)
114 console = &frame->console(); 114 console = &frame->console();
115 xmlSetStructuredErrorFunc(console, XSLTProcessor::parseErrorFunc); 115 xmlSetStructuredErrorFunc(console, XSLTProcessor::parseErrorFunc);
116 xmlSetGenericErrorFunc(console, XSLTProcessor::genericErrorFunc); 116 xmlSetGenericErrorFunc(console, XSLTProcessor::genericErrorFunc);
117 117
118 // We don't specify an encoding here. Neither Gecko nor WinIE respects 118 // We don't specify an encoding here. Neither Gecko nor WinIE respects
119 // the encoding specified in the HTTP headers. 119 // the encoding specified in the HTTP headers.
120 SharedBuffer* data = resource->resourceBuffer(); 120 RefPtr<SharedBuffer> data = resource->resourceBuffer();
121 xmlDocPtr doc = data ? xmlReadMemory(data->data(), data->size(), (const char*)uri, 0, options) : nullptr; 121 xmlDocPtr doc = data ? xmlReadMemory(data->data(), data->size(), (const char*)uri, 0, options) : nullptr;
122 122
123 xmlSetStructuredErrorFunc(0, 0); 123 xmlSetStructuredErrorFunc(0, 0);
124 xmlSetGenericErrorFunc(0, 0); 124 xmlSetGenericErrorFunc(0, 0);
125 125
126 return doc; 126 return doc;
127 } 127 }
128 case XSLT_LOAD_STYLESHEET: 128 case XSLT_LOAD_STYLESHEET:
129 return globalProcessor->xslStylesheet()->locateStylesheetSubResource(((x sltStylesheetPtr)ctxt)->doc, uri); 129 return globalProcessor->xslStylesheet()->locateStylesheetSubResource(((x sltStylesheetPtr)ctxt)->doc, uri);
130 default: 130 default:
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 354
355 sheet->method = origMethod; 355 sheet->method = origMethod;
356 setXSLTLoadCallBack(0, 0, 0); 356 setXSLTLoadCallBack(0, 0, 0);
357 xsltFreeStylesheet(sheet); 357 xsltFreeStylesheet(sheet);
358 m_stylesheet = nullptr; 358 m_stylesheet = nullptr;
359 359
360 return success; 360 return success;
361 } 361 }
362 362
363 } // namespace blink 363 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698