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

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

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 3 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/XPathStep.cpp ('k') | Source/core/xml/XSLTProcessor.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, 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
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
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
OLDNEW
« no previous file with comments | « Source/core/xml/XPathStep.cpp ('k') | Source/core/xml/XSLTProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698