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

Side by Side Diff: third_party/WebKit/Source/core/xml/XSLStyleSheetLibxslt.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, 2008, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // with references to the symbol dictionaries of the style sheet 146 // with references to the symbol dictionaries of the style sheet
147 // and any of its children. XML document disposal can corrupt memory 147 // and any of its children. XML document disposal can corrupt memory
148 // if a document uses more than one symbol dictionary, so we 148 // if a document uses more than one symbol dictionary, so we
149 // ensure that all child stylesheets use the same dictionaries as their 149 // ensure that all child stylesheets use the same dictionaries as their
150 // parents. 150 // parents.
151 xmlDictFree(ctxt->dict); 151 xmlDictFree(ctxt->dict);
152 ctxt->dict = m_parentStyleSheet->m_stylesheetDoc->dict; 152 ctxt->dict = m_parentStyleSheet->m_stylesheetDoc->dict;
153 xmlDictReference(ctxt->dict); 153 xmlDictReference(ctxt->dict);
154 } 154 }
155 155
156 m_stylesheetDoc = xmlCtxtReadMemory( 156 m_stylesheetDoc =
157 ctxt, input.data(), input.size(), finalURL().getString().utf8().data(), 157 xmlCtxtReadMemory(ctxt, input.data(), input.size(),
158 input.encoding(), XML_PARSE_NOENT | XML_PARSE_DTDATTR | 158 finalURL().getString().utf8().data(), input.encoding(),
159 XML_PARSE_NOENT | XML_PARSE_DTDATTR |
159 XML_PARSE_NOWARNING | XML_PARSE_NOCDATA); 160 XML_PARSE_NOWARNING | XML_PARSE_NOCDATA);
160 161
161 xmlFreeParserCtxt(ctxt); 162 xmlFreeParserCtxt(ctxt);
162 loadChildSheets(); 163 loadChildSheets();
163 return m_stylesheetDoc; 164 return m_stylesheetDoc;
164 } 165 }
165 166
166 void XSLStyleSheet::loadChildSheets() { 167 void XSLStyleSheet::loadChildSheets() {
167 if (!document()) 168 if (!document())
168 return; 169 return;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 311
311 DEFINE_TRACE(XSLStyleSheet) { 312 DEFINE_TRACE(XSLStyleSheet) {
312 visitor->trace(m_ownerNode); 313 visitor->trace(m_ownerNode);
313 visitor->trace(m_children); 314 visitor->trace(m_children);
314 visitor->trace(m_parentStyleSheet); 315 visitor->trace(m_parentStyleSheet);
315 visitor->trace(m_ownerDocument); 316 visitor->trace(m_ownerDocument);
316 StyleSheet::trace(visitor); 317 StyleSheet::trace(visitor);
317 } 318 }
318 319
319 } // namespace blink 320 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/xml/XPathPath.cpp ('k') | third_party/WebKit/Source/core/xml/XSLTProcessorLibxslt.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698