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

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

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

Powered by Google App Engine
This is Rietveld 408576698