diff options
Diffstat (limited to 'WebCore/dom/ProcessingInstruction.cpp')
-rw-r--r-- | WebCore/dom/ProcessingInstruction.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/WebCore/dom/ProcessingInstruction.cpp b/WebCore/dom/ProcessingInstruction.cpp index 8adf9aa..d4636b4 100644 --- a/WebCore/dom/ProcessingInstruction.cpp +++ b/WebCore/dom/ProcessingInstruction.cpp @@ -139,7 +139,8 @@ void ProcessingInstruction::checkStyleSheet() // We need to make a synthetic XSLStyleSheet that is embedded. It needs to be able // to kick off import/include loads that can hang off some parent sheet. if (m_isXSL) { - m_sheet = XSLStyleSheet::createEmbedded(this, m_localHref); + KURL baseURL = KURL(ParsedURLString, m_localHref); + m_sheet = XSLStyleSheet::createEmbedded(this, m_localHref, baseURL); m_loading = false; } #endif @@ -197,24 +198,27 @@ bool ProcessingInstruction::sheetLoaded() return false; } -void ProcessingInstruction::setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet* sheet) +void ProcessingInstruction::setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet) { #if ENABLE(XSLT) ASSERT(!m_isXSL); #endif - RefPtr<CSSStyleSheet> newSheet = CSSStyleSheet::create(this, url, charset); + RefPtr<CSSStyleSheet> newSheet = CSSStyleSheet::create(this, href, baseURL, charset); m_sheet = newSheet; - parseStyleSheet(sheet->sheetText()); + // We don't need the cross-origin security check here because we are + // getting the sheet text in "strict" mode. This enforces a valid CSS MIME + // type. + parseStyleSheet(sheet->sheetText(true)); newSheet->setTitle(m_title); newSheet->setMedia(MediaList::create(newSheet.get(), m_media)); newSheet->setDisabled(m_alternate); } #if ENABLE(XSLT) -void ProcessingInstruction::setXSLStyleSheet(const String& url, const String& sheet) +void ProcessingInstruction::setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet) { ASSERT(m_isXSL); - m_sheet = XSLStyleSheet::create(this, url); + m_sheet = XSLStyleSheet::create(this, href, baseURL); parseStyleSheet(sheet); } #endif |