Index: Source/WebCore/xml/XSLStyleSheetQt.cpp |
=================================================================== |
--- Source/WebCore/xml/XSLStyleSheetQt.cpp (revision 78109) |
+++ Source/WebCore/xml/XSLStyleSheetQt.cpp (working copy) |
@@ -34,7 +34,6 @@ |
XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& originalURL, const KURL& finalURL, bool embedded) |
: StyleSheet(parentNode, originalURL, finalURL) |
- , m_ownerDocument(parentNode->document()) |
, m_embedded(embedded) |
{ |
} |
@@ -62,9 +61,10 @@ |
CachedResourceLoader* XSLStyleSheet::cachedResourceLoader() |
{ |
- if (!m_ownerDocument) |
+ Document* document = ownerDocument(); |
+ if (!document) |
return 0; |
- return m_ownerDocument->cachedResourceLoader(); |
+ return document->cachedResourceLoader(); |
} |
bool XSLStyleSheet::parseString(const String& string, bool) |
@@ -87,6 +87,12 @@ |
notImplemented(); |
} |
+Document* XSLStyleSheet::ownerDocument() |
+{ |
+ Node* node = ownerNode(); |
+ return node ? node->document() : 0; |
+} |
+ |
void XSLStyleSheet::setParentStyleSheet(XSLStyleSheet*) |
{ |
notImplemented(); |