Commit 11fc281b authored by rwlbuis's avatar rwlbuis

Reviewed by Mitz.

        http://bugs.webkit.org/show_bug.cgi?id=11635
        Bug 11635: Fix potential issue with non-xslt build

        Fix the issue and do style guideline corrections.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent be8aefa3
2006-11-17 Rob Buis <buis@kde.org>
Reviewed by Mitz.
http://bugs.webkit.org/show_bug.cgi?id=11635
Bug 11635: Fix potential issue with non-xslt build
Fix the issue and do style guideline corrections.
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::checkStyleSheet):
(WebCore::ProcessingInstruction::sheetLoaded):
(WebCore::ProcessingInstruction::setCSSStyleSheet):
(WebCore::ProcessingInstruction::setXSLStyleSheet):
(WebCore::ProcessingInstruction::parseStyleSheet):
2006-11-17 Timothy Hatcher <timothy@apple.com>
Reviewed by Harrison.
......@@ -120,7 +120,7 @@ bool ProcessingInstruction::checkStyleSheet()
String type;
if (i != attrs.end())
type = i->second;
bool isCSS = type.isEmpty() || type == "text/css";
#if XSLT_SUPPORT
m_isXSL = (type == "text/xml" || type == "text/xsl" || type == "application/xml" ||
......@@ -142,7 +142,7 @@ bool ProcessingInstruction::checkStyleSheet()
if (m_isXSL) {
m_sheet = new XSLStyleSheet(this, m_localHref, true);
m_loading = false;
}
}
return !m_isXSL;
#endif
}
......@@ -167,13 +167,12 @@ bool ProcessingInstruction::checkStyleSheet()
m_cachedSheet = document()->docLoader()->requestCSSStyleSheet(document()->completeURL(href), charset);
}
if (m_cachedSheet)
m_cachedSheet->ref( this );
m_cachedSheet->ref(this);
#if XSLT_SUPPORT
return !m_isXSL;
#endif
}
}
}
}
......@@ -193,20 +192,22 @@ bool ProcessingInstruction::sheetLoaded()
{
if (!isLoading()) {
document()->stylesheetLoaded();
return true;
return true;
}
return false;
}
void ProcessingInstruction::setCSSStyleSheet(const String &url, const String& charset, const String &sheet)
void ProcessingInstruction::setCSSStyleSheet(const String& url, const String& charset, const String& sheet)
{
#if XSLT_SUPPORT
ASSERT(!m_isXSL);
#endif
m_sheet = new CSSStyleSheet(this, url, charset);
parseStyleSheet(sheet);
}
#if XSLT_SUPPORT
void ProcessingInstruction::setXSLStyleSheet(const String &url, const String &sheet)
void ProcessingInstruction::setXSLStyleSheet(const String& url, const String& sheet)
{
ASSERT(m_isXSL);
m_sheet = new XSLStyleSheet(this, url);
......@@ -214,7 +215,7 @@ void ProcessingInstruction::setXSLStyleSheet(const String &url, const String &sh
}
#endif
void ProcessingInstruction::parseStyleSheet(const String &sheet)
void ProcessingInstruction::parseStyleSheet(const String& sheet)
{
m_sheet->parseString(sheet);
if (m_cachedSheet)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment