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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/xml/XSLTProcessor.cpp ('k') | Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 } 273 }
274 274
275 bool XSLTProcessor::transformToString(Node* sourceNode, String& mimeType, String & resultString, String& resultEncoding) 275 bool XSLTProcessor::transformToString(Node* sourceNode, String& mimeType, String & resultString, String& resultEncoding)
276 { 276 {
277 RefPtr<Document> ownerDocument(sourceNode->document()); 277 RefPtr<Document> ownerDocument(sourceNode->document());
278 278
279 setXSLTLoadCallBack(docLoaderFunc, this, ownerDocument->fetcher()); 279 setXSLTLoadCallBack(docLoaderFunc, this, ownerDocument->fetcher());
280 xsltStylesheetPtr sheet = xsltStylesheetPointer(m_stylesheet, m_stylesheetRo otNode.get()); 280 xsltStylesheetPtr sheet = xsltStylesheetPointer(m_stylesheet, m_stylesheetRo otNode.get());
281 if (!sheet) { 281 if (!sheet) {
282 setXSLTLoadCallBack(0, 0, 0); 282 setXSLTLoadCallBack(0, 0, 0);
283 m_stylesheet = 0; 283 m_stylesheet = nullptr;
284 return false; 284 return false;
285 } 285 }
286 m_stylesheet->clearDocuments(); 286 m_stylesheet->clearDocuments();
287 287
288 xmlChar* origMethod = sheet->method; 288 xmlChar* origMethod = sheet->method;
289 if (!origMethod && mimeType == "text/html") 289 if (!origMethod && mimeType == "text/html")
290 sheet->method = (xmlChar*)"html"; 290 sheet->method = (xmlChar*)"html";
291 291
292 bool success = false; 292 bool success = false;
293 bool shouldFreeSourceDoc = false; 293 bool shouldFreeSourceDoc = false;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 if ((success = saveResultToString(resultDoc, sheet, resultString))) { 332 if ((success = saveResultToString(resultDoc, sheet, resultString))) {
333 mimeType = resultMIMEType(resultDoc, sheet); 333 mimeType = resultMIMEType(resultDoc, sheet);
334 resultEncoding = (char*)resultDoc->encoding; 334 resultEncoding = (char*)resultDoc->encoding;
335 } 335 }
336 xmlFreeDoc(resultDoc); 336 xmlFreeDoc(resultDoc);
337 } 337 }
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 = nullptr;
343 343
344 return success; 344 return success;
345 } 345 }
346 346
347 } // namespace WebCore 347 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/xml/XSLTProcessor.cpp ('k') | Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698