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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 void XSLStyleSheet::setParentStyleSheet(XSLStyleSheet* parent) | 247 void XSLStyleSheet::setParentStyleSheet(XSLStyleSheet* parent) |
248 { | 248 { |
249 m_parentStyleSheet = parent; | 249 m_parentStyleSheet = parent; |
250 } | 250 } |
251 | 251 |
252 Document* XSLStyleSheet::ownerDocument() | 252 Document* XSLStyleSheet::ownerDocument() |
253 { | 253 { |
254 for (XSLStyleSheet* styleSheet = this; styleSheet; styleSheet = styleSheet->
parentStyleSheet()) { | 254 for (XSLStyleSheet* styleSheet = this; styleSheet; styleSheet = styleSheet->
parentStyleSheet()) { |
255 Node* node = styleSheet->ownerNode(); | 255 Node* node = styleSheet->ownerNode(); |
256 if (node) | 256 if (node) |
257 return node->document(); | 257 return &node->document(); |
258 } | 258 } |
259 return 0; | 259 return 0; |
260 } | 260 } |
261 | 261 |
262 xmlDocPtr XSLStyleSheet::locateStylesheetSubResource(xmlDocPtr parentDoc, const
xmlChar* uri) | 262 xmlDocPtr XSLStyleSheet::locateStylesheetSubResource(xmlDocPtr parentDoc, const
xmlChar* uri) |
263 { | 263 { |
264 bool matchedParent = (parentDoc == document()); | 264 bool matchedParent = (parentDoc == document()); |
265 for (unsigned i = 0; i < m_children.size(); ++i) { | 265 for (unsigned i = 0; i < m_children.size(); ++i) { |
266 XSLImportRule* import = m_children.at(i).get(); | 266 XSLImportRule* import = m_children.at(i).get(); |
267 XSLStyleSheet* child = import->styleSheet(); | 267 XSLStyleSheet* child = import->styleSheet(); |
(...skipping 29 matching lines...) Expand all Loading... |
297 | 297 |
298 void XSLStyleSheet::markAsProcessed() | 298 void XSLStyleSheet::markAsProcessed() |
299 { | 299 { |
300 ASSERT(!m_processed); | 300 ASSERT(!m_processed); |
301 ASSERT(!m_stylesheetDocTaken); | 301 ASSERT(!m_stylesheetDocTaken); |
302 m_processed = true; | 302 m_processed = true; |
303 m_stylesheetDocTaken = true; | 303 m_stylesheetDocTaken = true; |
304 } | 304 } |
305 | 305 |
306 } // namespace WebCore | 306 } // namespace WebCore |
OLD | NEW |