| 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, 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 if (m_embedded) | 232 if (m_embedded) |
| 233 return xsltLoadStylesheetPI(document()); | 233 return xsltLoadStylesheetPI(document()); |
| 234 | 234 |
| 235 // Certain libxslt versions are corrupting the xmlDoc on compilation | 235 // Certain libxslt versions are corrupting the xmlDoc on compilation |
| 236 // failures - hence attempting to recompile after a failure is unsafe. | 236 // failures - hence attempting to recompile after a failure is unsafe. |
| 237 if (m_compilationFailed) | 237 if (m_compilationFailed) |
| 238 return 0; | 238 return 0; |
| 239 | 239 |
| 240 // xsltParseStylesheetDoc makes the document part of the stylesheet | 240 // xsltParseStylesheetDoc makes the document part of the stylesheet |
| 241 // so we have to release our pointer to it. | 241 // so we have to release our pointer to it. |
| 242 ASSERT(!m_stylesheetDocTaken); | 242 DCHECK(!m_stylesheetDocTaken); |
| 243 xsltStylesheetPtr result = xsltParseStylesheetDoc(m_stylesheetDoc); | 243 xsltStylesheetPtr result = xsltParseStylesheetDoc(m_stylesheetDoc); |
| 244 if (result) | 244 if (result) |
| 245 m_stylesheetDocTaken = true; | 245 m_stylesheetDocTaken = true; |
| 246 else | 246 else |
| 247 m_compilationFailed = true; | 247 m_compilationFailed = true; |
| 248 return result; | 248 return result; |
| 249 } | 249 } |
| 250 | 250 |
| 251 void XSLStyleSheet::setParentStyleSheet(XSLStyleSheet* parent) | 251 void XSLStyleSheet::setParentStyleSheet(XSLStyleSheet* parent) |
| 252 { | 252 { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 xmlDocPtr result = import->styleSheet()->locateStylesheetSubResource(par
entDoc, uri); | 296 xmlDocPtr result = import->styleSheet()->locateStylesheetSubResource(par
entDoc, uri); |
| 297 if (result) | 297 if (result) |
| 298 return result; | 298 return result; |
| 299 } | 299 } |
| 300 | 300 |
| 301 return 0; | 301 return 0; |
| 302 } | 302 } |
| 303 | 303 |
| 304 void XSLStyleSheet::markAsProcessed() | 304 void XSLStyleSheet::markAsProcessed() |
| 305 { | 305 { |
| 306 ASSERT(!m_processed); | 306 DCHECK(!m_processed); |
| 307 ASSERT(!m_stylesheetDocTaken); | 307 DCHECK(!m_stylesheetDocTaken); |
| 308 m_processed = true; | 308 m_processed = true; |
| 309 m_stylesheetDocTaken = true; | 309 m_stylesheetDocTaken = true; |
| 310 } | 310 } |
| 311 | 311 |
| 312 DEFINE_TRACE(XSLStyleSheet) | 312 DEFINE_TRACE(XSLStyleSheet) |
| 313 { | 313 { |
| 314 visitor->trace(m_ownerNode); | 314 visitor->trace(m_ownerNode); |
| 315 visitor->trace(m_children); | 315 visitor->trace(m_children); |
| 316 visitor->trace(m_parentStyleSheet); | 316 visitor->trace(m_parentStyleSheet); |
| 317 visitor->trace(m_ownerDocument); | 317 visitor->trace(m_ownerDocument); |
| 318 StyleSheet::trace(visitor); | 318 StyleSheet::trace(visitor); |
| 319 } | 319 } |
| 320 | 320 |
| 321 } // namespace blink | 321 } // namespace blink |
| OLD | NEW |