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

Side by Side Diff: Source/WebCore/xml/XSLStyleSheetQt.cpp

Issue 6483001: Merge 76728 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 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
« no previous file with comments | « Source/WebCore/xml/XSLStyleSheetLibxslt.cpp ('k') | no next file » | 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) 2009 Jakub Wieczorek <faw217@gmail.com> 4 * Copyright (C) 2009 Jakub Wieczorek <faw217@gmail.com>
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 16 matching lines...) Expand all
27 #include "DOMWindow.h" 27 #include "DOMWindow.h"
28 #include "Document.h" 28 #include "Document.h"
29 #include "Node.h" 29 #include "Node.h"
30 #include "NotImplemented.h" 30 #include "NotImplemented.h"
31 #include "XSLTProcessor.h" 31 #include "XSLTProcessor.h"
32 32
33 namespace WebCore { 33 namespace WebCore {
34 34
35 XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& originalURL, const KURL& finalURL, bool embedded) 35 XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& originalURL, const KURL& finalURL, bool embedded)
36 : StyleSheet(parentNode, originalURL, finalURL) 36 : StyleSheet(parentNode, originalURL, finalURL)
37 , m_ownerDocument(parentNode->document())
38 , m_embedded(embedded) 37 , m_embedded(embedded)
39 { 38 {
40 } 39 }
41 40
42 XSLStyleSheet::~XSLStyleSheet() 41 XSLStyleSheet::~XSLStyleSheet()
43 { 42 {
44 } 43 }
45 44
46 bool XSLStyleSheet::isLoading() 45 bool XSLStyleSheet::isLoading()
47 { 46 {
48 notImplemented(); 47 notImplemented();
49 return false; 48 return false;
50 } 49 }
51 50
52 void XSLStyleSheet::checkLoaded() 51 void XSLStyleSheet::checkLoaded()
53 { 52 {
54 if (ownerNode()) 53 if (ownerNode())
55 ownerNode()->sheetLoaded(); 54 ownerNode()->sheetLoaded();
56 } 55 }
57 56
58 void XSLStyleSheet::clearDocuments() 57 void XSLStyleSheet::clearDocuments()
59 { 58 {
60 notImplemented(); 59 notImplemented();
61 } 60 }
62 61
63 CachedResourceLoader* XSLStyleSheet::cachedResourceLoader() 62 CachedResourceLoader* XSLStyleSheet::cachedResourceLoader()
64 { 63 {
65 if (!m_ownerDocument) 64 Document* document = ownerDocument();
65 if (!document)
66 return 0; 66 return 0;
67 return m_ownerDocument->cachedResourceLoader(); 67 return document->cachedResourceLoader();
68 } 68 }
69 69
70 bool XSLStyleSheet::parseString(const String& string, bool) 70 bool XSLStyleSheet::parseString(const String& string, bool)
71 { 71 {
72 // FIXME: Fix QXmlQuery so that it allows compiling the stylesheet before se tting the document 72 // FIXME: Fix QXmlQuery so that it allows compiling the stylesheet before se tting the document
73 // to be transformed. This way we could not only check if the stylesheet is correct before using it 73 // to be transformed. This way we could not only check if the stylesheet is correct before using it
74 // but also turn XSLStyleSheet::sheetString() into XSLStyleSheet::query() th at returns a QXmlQuery. 74 // but also turn XSLStyleSheet::sheetString() into XSLStyleSheet::query() th at returns a QXmlQuery.
75 75
76 m_sheetString = string; 76 m_sheetString = string;
77 return !m_sheetString.isEmpty(); 77 return !m_sheetString.isEmpty();
78 } 78 }
79 79
80 void XSLStyleSheet::loadChildSheets() 80 void XSLStyleSheet::loadChildSheets()
81 { 81 {
82 notImplemented(); 82 notImplemented();
83 } 83 }
84 84
85 void XSLStyleSheet::loadChildSheet(const String&) 85 void XSLStyleSheet::loadChildSheet(const String&)
86 { 86 {
87 notImplemented(); 87 notImplemented();
88 } 88 }
89 89
90 Document* XSLStyleSheet::ownerDocument()
91 {
92 Node* node = ownerNode();
93 return node ? node->document() : 0;
94 }
95
90 void XSLStyleSheet::setParentStyleSheet(XSLStyleSheet*) 96 void XSLStyleSheet::setParentStyleSheet(XSLStyleSheet*)
91 { 97 {
92 notImplemented(); 98 notImplemented();
93 } 99 }
94 100
95 void XSLStyleSheet::markAsProcessed() 101 void XSLStyleSheet::markAsProcessed()
96 { 102 {
97 notImplemented(); 103 notImplemented();
98 } 104 }
99 105
100 } // namespace WebCore 106 } // namespace WebCore
101 107
102 #endif // ENABLE(XSLT) 108 #endif // ENABLE(XSLT)
OLDNEW
« no previous file with comments | « Source/WebCore/xml/XSLStyleSheetLibxslt.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698