diff options
author | Steve Block <steveblock@google.com> | 2010-02-15 12:23:52 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-02-16 11:48:32 +0000 |
commit | 8a0914b749bbe7da7768e07a7db5c6d4bb09472b (patch) | |
tree | 73f9065f370435d6fde32ae129d458a8c77c8dff /WebCore/xml | |
parent | bf14be70295513b8076f3fa47a268a7e42b2c478 (diff) | |
download | external_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.zip external_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.tar.gz external_webkit-8a0914b749bbe7da7768e07a7db5c6d4bb09472b.tar.bz2 |
Merge webkit.org at r54731 : Initial merge by git
Change-Id: Ia79977b6cf3b0b00c06ef39419989b28e57e4f4a
Diffstat (limited to 'WebCore/xml')
-rw-r--r-- | WebCore/xml/XSLImportRule.cpp | 6 | ||||
-rw-r--r-- | WebCore/xml/XSLStyleSheet.h | 16 | ||||
-rw-r--r-- | WebCore/xml/XSLStyleSheetLibxslt.cpp | 12 | ||||
-rw-r--r-- | WebCore/xml/XSLStyleSheetQt.cpp | 4 | ||||
-rw-r--r-- | WebCore/xml/XSLTProcessorLibxslt.cpp | 8 |
5 files changed, 23 insertions, 23 deletions
diff --git a/WebCore/xml/XSLImportRule.cpp b/WebCore/xml/XSLImportRule.cpp index c0f6363..0908d75 100644 --- a/WebCore/xml/XSLImportRule.cpp +++ b/WebCore/xml/XSLImportRule.cpp @@ -87,14 +87,14 @@ void XSLImportRule::loadSheet() String absHref = m_strHref; XSLStyleSheet* parentSheet = parentStyleSheet(); - if (!parentSheet->putativeBaseURL().isNull()) + if (!parentSheet->finalURL().isNull()) // use parent styleheet's URL as the base URL - absHref = KURL(parentSheet->putativeBaseURL(), m_strHref).string(); + absHref = KURL(parentSheet->finalURL(), m_strHref).string(); // Check for a cycle in our import chain. If we encounter a stylesheet // in our parent chain with the same URL, then just bail. for (parent = this->parent(); parent; parent = parent->parent()) { - if (parent->isXSLStyleSheet() && absHref == static_cast<XSLStyleSheet*>(parent)->putativeBaseURL().string()) + if (parent->isXSLStyleSheet() && absHref == static_cast<XSLStyleSheet*>(parent)->finalURL().string()) return; } diff --git a/WebCore/xml/XSLStyleSheet.h b/WebCore/xml/XSLStyleSheet.h index b3861a0..e6e4063 100644 --- a/WebCore/xml/XSLStyleSheet.h +++ b/WebCore/xml/XSLStyleSheet.h @@ -43,18 +43,18 @@ class XSLImportRule; class XSLStyleSheet : public StyleSheet { public: #if !USE(QXMLQUERY) - static PassRefPtr<XSLStyleSheet> create(XSLImportRule* parentImport, const String& href, const KURL& baseURL) + static PassRefPtr<XSLStyleSheet> create(XSLImportRule* parentImport, const String& originalURL, const KURL& finalURL) { - return adoptRef(new XSLStyleSheet(parentImport, href, baseURL)); + return adoptRef(new XSLStyleSheet(parentImport, originalURL, finalURL)); } #endif - static PassRefPtr<XSLStyleSheet> create(Node* parentNode, const String& href, const KURL& baseURL) + static PassRefPtr<XSLStyleSheet> create(Node* parentNode, const String& originalURL, const KURL& finalURL) { - return adoptRef(new XSLStyleSheet(parentNode, href, baseURL, false)); + return adoptRef(new XSLStyleSheet(parentNode, originalURL, finalURL, false)); } - static PassRefPtr<XSLStyleSheet> createEmbedded(Node* parentNode, const String& href, const KURL& baseURL) + static PassRefPtr<XSLStyleSheet> createInline(Node* parentNode, const KURL& finalURL) { - return adoptRef(new XSLStyleSheet(parentNode, href, baseURL, true)); + return adoptRef(new XSLStyleSheet(parentNode, finalURL.string(), finalURL, true)); } virtual ~XSLStyleSheet(); @@ -90,9 +90,9 @@ public: bool processed() const { return m_processed; } private: - XSLStyleSheet(Node* parentNode, const String& href, const KURL& baseURL, bool embedded); + XSLStyleSheet(Node* parentNode, const String& originalURL, const KURL& finalURL, bool embedded); #if !USE(QXMLQUERY) - XSLStyleSheet(XSLImportRule* parentImport, const String& href, const KURL& baseURL); + XSLStyleSheet(XSLImportRule* parentImport, const String& originalURL, const KURL& finalURL); #endif Document* m_ownerDocument; diff --git a/WebCore/xml/XSLStyleSheetLibxslt.cpp b/WebCore/xml/XSLStyleSheetLibxslt.cpp index 4122aa1..dbd806a 100644 --- a/WebCore/xml/XSLStyleSheetLibxslt.cpp +++ b/WebCore/xml/XSLStyleSheetLibxslt.cpp @@ -55,8 +55,8 @@ SOFT_LINK(libxslt, xsltLoadStylesheetPI, xsltStylesheetPtr, (xmlDocPtr doc), (do namespace WebCore { -XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& href, const KURL& baseURL) - : StyleSheet(parentRule, href, baseURL) +XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& originalURL, const KURL& finalURL) + : StyleSheet(parentRule, originalURL, finalURL) , m_ownerDocument(0) , m_embedded(false) , m_processed(false) // Child sheets get marked as processed when the libxslt engine has finally seen them. @@ -66,8 +66,8 @@ XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& href, cons { } -XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, const KURL& baseURL, bool embedded) - : StyleSheet(parentNode, href, baseURL) +XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& originalURL, const KURL& finalURL, bool embedded) + : StyleSheet(parentNode, originalURL, finalURL) , m_ownerDocument(parentNode->document()) , m_embedded(embedded) , m_processed(true) // The root sheet starts off processed. @@ -168,7 +168,7 @@ bool XSLStyleSheet::parseString(const String& string, bool) } m_stylesheetDoc = xmlCtxtReadMemory(ctxt, buffer, size, - putativeBaseURL().string().utf8().data(), + finalURL().string().utf8().data(), BOMHighByte == 0xFF ? "UTF-16LE" : "UTF-16BE", XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_NOWARNING | XML_PARSE_NOCDATA); xmlFreeParserCtxt(ctxt); @@ -192,7 +192,7 @@ void XSLStyleSheet::loadChildSheets() if (m_embedded) { // We have to locate (by ID) the appropriate embedded stylesheet element, so that we can walk the // import/include list. - xmlAttrPtr idNode = xmlGetID(document(), (const xmlChar*)(putativeBaseURL().string().utf8().data())); + xmlAttrPtr idNode = xmlGetID(document(), (const xmlChar*)(finalURL().string().utf8().data())); if (!idNode) return; stylesheetRoot = idNode->parent; diff --git a/WebCore/xml/XSLStyleSheetQt.cpp b/WebCore/xml/XSLStyleSheetQt.cpp index 4151be4..cb55993 100644 --- a/WebCore/xml/XSLStyleSheetQt.cpp +++ b/WebCore/xml/XSLStyleSheetQt.cpp @@ -33,8 +33,8 @@ namespace WebCore { -XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, const KURL& baseURL, bool embedded) - : StyleSheet(parentNode, href, baseURL) +XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& originalURL, const KURL& finalURL, bool embedded) + : StyleSheet(parentNode, originalURL, finalURL) , m_ownerDocument(parentNode->document()) , m_embedded(embedded) { diff --git a/WebCore/xml/XSLTProcessorLibxslt.cpp b/WebCore/xml/XSLTProcessorLibxslt.cpp index ded5c68..e2da3ed 100644 --- a/WebCore/xml/XSLTProcessorLibxslt.cpp +++ b/WebCore/xml/XSLTProcessorLibxslt.cpp @@ -201,8 +201,8 @@ static const char** xsltParamArrayFromParameterMap(XSLTProcessor::ParameterMap& XSLTProcessor::ParameterMap::iterator end = parameters.end(); unsigned index = 0; for (XSLTProcessor::ParameterMap::iterator it = parameters.begin(); it != end; ++it) { - parameterArray[index++] = strdup(it->first.utf8().data()); - parameterArray[index++] = strdup(it->second.utf8().data()); + parameterArray[index++] = fastStrDup(it->first.utf8().data()); + parameterArray[index++] = fastStrDup(it->second.utf8().data()); } parameterArray[index] = 0; @@ -216,8 +216,8 @@ static void freeXsltParamArray(const char** params) return; while (*temp) { - free((void*)*(temp++)); // strdup returns malloc'd blocks, so we have to use free() here - free((void*)*(temp++)); + fastFree((void*)*(temp++)); + fastFree((void*)*(temp++)); } fastFree(params); } |