diff options
author | Leon Clarke <leonclarke@google.com> | 2010-07-15 12:03:35 +0100 |
---|---|---|
committer | Leon Clarke <leonclarke@google.com> | 2010-07-20 16:57:23 +0100 |
commit | e458d70a0d18538346f41b503114c9ebe6b2ce12 (patch) | |
tree | 86f1637deca2c524432a822e5fcedd4bef221091 /WebCore/xml | |
parent | f43eabc081f7ce6af24b9df4953498a3cd6ca24d (diff) | |
download | external_webkit-e458d70a0d18538346f41b503114c9ebe6b2ce12.zip external_webkit-e458d70a0d18538346f41b503114c9ebe6b2ce12.tar.gz external_webkit-e458d70a0d18538346f41b503114c9ebe6b2ce12.tar.bz2 |
Merge WebKit at r63173 : Initial merge by git.
Change-Id: Ife5af0c7c6261fbbc8ae6bc08c390efa9ef10b44
Diffstat (limited to 'WebCore/xml')
-rw-r--r-- | WebCore/xml/XMLHttpRequest.cpp | 4 | ||||
-rw-r--r-- | WebCore/xml/XPathEvaluator.idl | 2 | ||||
-rw-r--r-- | WebCore/xml/XPathFunctions.cpp | 10 | ||||
-rw-r--r-- | WebCore/xml/XSLTProcessorLibxslt.cpp | 2 |
4 files changed, 12 insertions, 6 deletions
diff --git a/WebCore/xml/XMLHttpRequest.cpp b/WebCore/xml/XMLHttpRequest.cpp index da95d32..8762bb5 100644 --- a/WebCore/xml/XMLHttpRequest.cpp +++ b/WebCore/xml/XMLHttpRequest.cpp @@ -872,6 +872,10 @@ void XMLHttpRequest::didFail(const ResourceError& error) return; } + // Network failures are already reported to Web Inspector by ResourceLoader. + if (error.domain() == errorDomainWebKitInternal) + reportUnsafeUsage(scriptExecutionContext(), "XMLHttpRequest cannot load " + error.failingURL() + ". " + error.localizedDescription()); + m_exceptionCode = XMLHttpRequestException::NETWORK_ERR; networkError(); } diff --git a/WebCore/xml/XPathEvaluator.idl b/WebCore/xml/XPathEvaluator.idl index c075b01..30df23a 100644 --- a/WebCore/xml/XPathEvaluator.idl +++ b/WebCore/xml/XPathEvaluator.idl @@ -21,7 +21,7 @@ module xpath { interface [CanBeConstructed, Conditional=XPATH] XPathEvaluator { XPathExpression createExpression(in DOMString expression, in XPathNSResolver resolver) - raises(core::DOMException); + raises(DOMException); XPathNSResolver createNSResolver(in Node nodeResolver); diff --git a/WebCore/xml/XPathFunctions.cpp b/WebCore/xml/XPathFunctions.cpp index a727680..41bf795 100644 --- a/WebCore/xml/XPathFunctions.cpp +++ b/WebCore/xml/XPathFunctions.cpp @@ -516,11 +516,13 @@ Value FunSubstring::evaluate() const if (pos > long(s.length())) return ""; - if (haveLength && pos < 1) { - len -= 1 - pos; + if (pos < 1) { + if (haveLength) { + len -= 1 - pos; + if (len < 1) + return ""; + } pos = 1; - if (len < 1) - return ""; } return s.substring(pos - 1, len); diff --git a/WebCore/xml/XSLTProcessorLibxslt.cpp b/WebCore/xml/XSLTProcessorLibxslt.cpp index 4ac9f4c..ed4303d 100644 --- a/WebCore/xml/XSLTProcessorLibxslt.cpp +++ b/WebCore/xml/XSLTProcessorLibxslt.cpp @@ -297,7 +297,7 @@ bool XSLTProcessor::transformToString(Node* sourceNode, String& mimeType, String xsltTransformContextPtr transformContext = xsltNewTransformContext(sheet, sourceDoc); registerXSLTExtensions(transformContext); - // <http://bugs.webkit.org/show_bug.cgi?id=16077>: XSLT processor <xsl:sort> algorithm only compares by code point + // <http://bugs.webkit.org/show_bug.cgi?id=16077>: XSLT processor <xsl:sort> algorithm only compares by code point. xsltSetCtxtSortFunc(transformContext, xsltUnicodeSortFunction); // This is a workaround for a bug in libxslt. |