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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 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
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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 // and it's not needed even for documents, as the result of this 336 // and it's not needed even for documents, as the result of this
337 // function is always immediately parsed. 337 // function is always immediately parsed.
338 sheet->omitXmlDeclaration = true; 338 sheet->omitXmlDeclaration = true;
339 339
340 xsltTransformContextPtr transformContext = 340 xsltTransformContextPtr transformContext =
341 xsltNewTransformContext(sheet, sourceDoc); 341 xsltNewTransformContext(sheet, sourceDoc);
342 registerXSLTExtensions(transformContext); 342 registerXSLTExtensions(transformContext);
343 343
344 xsltSecurityPrefsPtr securityPrefs = xsltNewSecurityPrefs(); 344 xsltSecurityPrefsPtr securityPrefs = xsltNewSecurityPrefs();
345 // Read permissions are checked by docLoaderFunc. 345 // Read permissions are checked by docLoaderFunc.
346 if (0 != xsltSetSecurityPrefs(securityPrefs, XSLT_SECPREF_WRITE_FILE, 346 if (0 !=
347 xsltSecurityForbid)) 347 xsltSetSecurityPrefs(securityPrefs, XSLT_SECPREF_WRITE_FILE,
348 xsltSecurityForbid))
348 CRASH(); 349 CRASH();
349 if (0 != xsltSetSecurityPrefs(securityPrefs, XSLT_SECPREF_CREATE_DIRECTORY, 350 if (0 !=
350 xsltSecurityForbid)) 351 xsltSetSecurityPrefs(securityPrefs, XSLT_SECPREF_CREATE_DIRECTORY,
352 xsltSecurityForbid))
351 CRASH(); 353 CRASH();
352 if (0 != xsltSetSecurityPrefs(securityPrefs, XSLT_SECPREF_WRITE_NETWORK, 354 if (0 !=
353 xsltSecurityForbid)) 355 xsltSetSecurityPrefs(securityPrefs, XSLT_SECPREF_WRITE_NETWORK,
356 xsltSecurityForbid))
354 CRASH(); 357 CRASH();
355 if (0 != xsltSetCtxtSecurityPrefs(securityPrefs, transformContext)) 358 if (0 != xsltSetCtxtSecurityPrefs(securityPrefs, transformContext))
356 CRASH(); 359 CRASH();
357 360
358 // <http://bugs.webkit.org/show_bug.cgi?id=16077>: XSLT processor 361 // <http://bugs.webkit.org/show_bug.cgi?id=16077>: XSLT processor
359 // <xsl:sort> algorithm only compares by code point. 362 // <xsl:sort> algorithm only compares by code point.
360 xsltSetCtxtSortFunc(transformContext, xsltUnicodeSortFunction); 363 xsltSetCtxtSortFunc(transformContext, xsltUnicodeSortFunction);
361 364
362 // This is a workaround for a bug in libxslt. 365 // This is a workaround for a bug in libxslt.
363 // The bug has been fixed in version 1.1.13, so once we ship that this 366 // The bug has been fixed in version 1.1.13, so once we ship that this
(...skipping 23 matching lines...) Expand all
387 390
388 sheet->method = origMethod; 391 sheet->method = origMethod;
389 setXSLTLoadCallBack(0, 0, 0); 392 setXSLTLoadCallBack(0, 0, 0);
390 xsltFreeStylesheet(sheet); 393 xsltFreeStylesheet(sheet);
391 m_stylesheet = nullptr; 394 m_stylesheet = nullptr;
392 395
393 return success; 396 return success;
394 } 397 }
395 398
396 } // namespace blink 399 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698