summaryrefslogtreecommitdiff
path: root/Source/WebCore/xml
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-02-24 16:36:50 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2012-02-24 16:36:50 +0100
commitad0d549d4cc13433f77c1ac8f0ab379c83d93f28 (patch)
treeb34b0daceb7c8e7fdde4b4ec43650ab7caadb0a9 /Source/WebCore/xml
parent03e12282df9aa1e1fb05a8b90f1cfc2e08764cec (diff)
downloadqtwebkit-ad0d549d4cc13433f77c1ac8f0ab379c83d93f28.tar.gz
Imported WebKit commit bb52bf3c0119e8a128cd93afe5572413a8617de9 (http://svn.webkit.org/repository/webkit/trunk@108790)
Diffstat (limited to 'Source/WebCore/xml')
-rw-r--r--Source/WebCore/xml/DOMParser.idl4
-rw-r--r--Source/WebCore/xml/DOMWindowXML.idl37
-rw-r--r--Source/WebCore/xml/XMLHttpRequest.cpp5
-rw-r--r--Source/WebCore/xml/XMLHttpRequest.idl6
-rw-r--r--Source/WebCore/xml/XMLSerializer.idl2
-rw-r--r--Source/WebCore/xml/XPathEvaluator.idl16
-rw-r--r--Source/WebCore/xml/XPathExpression.idl6
-rw-r--r--Source/WebCore/xml/XPathNSResolver.idl2
-rw-r--r--Source/WebCore/xml/XPathResult.idl2
-rw-r--r--Source/WebCore/xml/XPathUtil.cpp1
-rw-r--r--Source/WebCore/xml/XSLTProcessor.idl2
-rw-r--r--Source/WebCore/xml/parser/MarkupTokenBase.h2
-rw-r--r--Source/WebCore/xml/parser/XMLDocumentParserQt.cpp2
13 files changed, 63 insertions, 24 deletions
diff --git a/Source/WebCore/xml/DOMParser.idl b/Source/WebCore/xml/DOMParser.idl
index 716400814..5e51bc1e7 100644
--- a/Source/WebCore/xml/DOMParser.idl
+++ b/Source/WebCore/xml/DOMParser.idl
@@ -21,7 +21,7 @@ module xpath {
interface [
Constructor
] DOMParser {
- Document parseFromString(in [Optional=CallWithDefaultValue] DOMString str,
- in [Optional=CallWithDefaultValue] DOMString contentType);
+ Document parseFromString(in [Optional=DefaultIsUndefined] DOMString str,
+ in [Optional=DefaultIsUndefined] DOMString contentType);
};
}
diff --git a/Source/WebCore/xml/DOMWindowXML.idl b/Source/WebCore/xml/DOMWindowXML.idl
new file mode 100644
index 000000000..e527350ca
--- /dev/null
+++ b/Source/WebCore/xml/DOMWindowXML.idl
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+module window {
+
+ interface [
+ Supplemental=DOMWindow
+ ] DOMWindowXML {
+ // Mozilla has a separate XMLDocument object for XML documents.
+ // We just use Document for this.
+ attribute DocumentConstructor XMLDocument;
+ attribute DOMParserConstructor DOMParser;
+ attribute XMLSerializerConstructor XMLSerializer;
+ attribute XMLHttpRequestConstructor XMLHttpRequest; // Usable with the new operator
+ attribute XMLHttpRequestUploadConstructor XMLHttpRequestUpload;
+ attribute XMLHttpRequestExceptionConstructor XMLHttpRequestException;
+ attribute XMLHttpRequestProgressEventConstructor XMLHttpRequestProgressEvent;
+ attribute [Conditional=XSLT] XSLTProcessorConstructor XSLTProcessor; // Usable with the new operator
+ };
+
+}
diff --git a/Source/WebCore/xml/XMLHttpRequest.cpp b/Source/WebCore/xml/XMLHttpRequest.cpp
index 41f0621ec..7ed8212ee 100644
--- a/Source/WebCore/xml/XMLHttpRequest.cpp
+++ b/Source/WebCore/xml/XMLHttpRequest.cpp
@@ -154,7 +154,10 @@ static void logConsoleError(ScriptExecutionContext* context, const String& messa
PassRefPtr<XMLHttpRequest> XMLHttpRequest::create(ScriptExecutionContext* context, PassRefPtr<SecurityOrigin> securityOrigin)
{
- return adoptRef(new XMLHttpRequest(context, securityOrigin));
+ RefPtr<XMLHttpRequest> xmlHttpRequest(adoptRef(new XMLHttpRequest(context, securityOrigin)));
+ xmlHttpRequest->suspendIfNeeded();
+
+ return xmlHttpRequest.release();
}
XMLHttpRequest::XMLHttpRequest(ScriptExecutionContext* context, PassRefPtr<SecurityOrigin> securityOrigin)
diff --git a/Source/WebCore/xml/XMLHttpRequest.idl b/Source/WebCore/xml/XMLHttpRequest.idl
index b45baf2b1..0dcedfed1 100644
--- a/Source/WebCore/xml/XMLHttpRequest.idl
+++ b/Source/WebCore/xml/XMLHttpRequest.idl
@@ -89,11 +89,11 @@ module xml {
readonly attribute XMLHttpRequestUpload upload;
// response
- [ConvertNullStringTo=Undefined] DOMString getAllResponseHeaders()
+ [TreatReturnedNullStringAs=Undefined] DOMString getAllResponseHeaders()
raises(DOMException);
- [ConvertNullStringTo=Null] DOMString getResponseHeader(in DOMString header)
+ [TreatReturnedNullStringAs=Null] DOMString getResponseHeader(in DOMString header)
raises(DOMException);
- readonly attribute [CustomGetter] DOMString responseText // The custom getter implements ConvertNullStringTo=Null
+ readonly attribute [CustomGetter] DOMString responseText // The custom getter implements TreatReturnedNullStringAs=Null
getter raises(DOMException);
readonly attribute Document responseXML
getter raises(DOMException);
diff --git a/Source/WebCore/xml/XMLSerializer.idl b/Source/WebCore/xml/XMLSerializer.idl
index 5dabfdf15..58327cc2a 100644
--- a/Source/WebCore/xml/XMLSerializer.idl
+++ b/Source/WebCore/xml/XMLSerializer.idl
@@ -23,7 +23,7 @@ module xpath {
interface [
Constructor
] XMLSerializer {
- DOMString serializeToString(in [Optional=CallWithDefaultValue] Node node)
+ DOMString serializeToString(in [Optional=DefaultIsUndefined] Node node)
raises(DOMException);
};
diff --git a/Source/WebCore/xml/XPathEvaluator.idl b/Source/WebCore/xml/XPathEvaluator.idl
index 4d47ecfee..cb9950c2a 100644
--- a/Source/WebCore/xml/XPathEvaluator.idl
+++ b/Source/WebCore/xml/XPathEvaluator.idl
@@ -21,17 +21,17 @@ module xpath {
interface [
Constructor
] XPathEvaluator {
- XPathExpression createExpression(in [Optional=CallWithDefaultValue] DOMString expression,
- in [Optional=CallWithDefaultValue] XPathNSResolver resolver)
+ XPathExpression createExpression(in [Optional=DefaultIsUndefined] DOMString expression,
+ in [Optional=DefaultIsUndefined] XPathNSResolver resolver)
raises(DOMException);
- XPathNSResolver createNSResolver(in [Optional=CallWithDefaultValue] Node nodeResolver);
+ XPathNSResolver createNSResolver(in [Optional=DefaultIsUndefined] Node nodeResolver);
- XPathResult evaluate(in [Optional=CallWithDefaultValue] DOMString expression,
- in [Optional=CallWithDefaultValue] Node contextNode,
- in [Optional=CallWithDefaultValue] XPathNSResolver resolver,
- in [Optional=CallWithDefaultValue] unsigned short type,
- in [Optional=CallWithDefaultValue] XPathResult inResult)
+ XPathResult evaluate(in [Optional=DefaultIsUndefined] DOMString expression,
+ in [Optional=DefaultIsUndefined] Node contextNode,
+ in [Optional=DefaultIsUndefined] XPathNSResolver resolver,
+ in [Optional=DefaultIsUndefined] unsigned short type,
+ in [Optional=DefaultIsUndefined] XPathResult inResult)
raises(DOMException);
};
}
diff --git a/Source/WebCore/xml/XPathExpression.idl b/Source/WebCore/xml/XPathExpression.idl
index add53cff4..5e60840d2 100644
--- a/Source/WebCore/xml/XPathExpression.idl
+++ b/Source/WebCore/xml/XPathExpression.idl
@@ -21,9 +21,9 @@
module xpath {
interface XPathExpression {
- [ObjCLegacyUnnamedParameters] XPathResult evaluate(in [Optional=CallWithDefaultValue] Node contextNode,
- in [Optional=CallWithDefaultValue] unsigned short type,
- in [Optional=CallWithDefaultValue] XPathResult inResult)
+ [ObjCLegacyUnnamedParameters] XPathResult evaluate(in [Optional=DefaultIsUndefined] Node contextNode,
+ in [Optional=DefaultIsUndefined] unsigned short type,
+ in [Optional=DefaultIsUndefined] XPathResult inResult)
raises(DOMException);
};
diff --git a/Source/WebCore/xml/XPathNSResolver.idl b/Source/WebCore/xml/XPathNSResolver.idl
index e1d4e0e26..e9fa41be4 100644
--- a/Source/WebCore/xml/XPathNSResolver.idl
+++ b/Source/WebCore/xml/XPathNSResolver.idl
@@ -24,7 +24,7 @@ module xpath {
ObjCProtocol,
OmitConstructor
] XPathNSResolver {
- [ConvertNullStringTo=Null] DOMString lookupNamespaceURI(in [Optional=CallWithDefaultValue] DOMString prefix);
+ [TreatReturnedNullStringAs=Null] DOMString lookupNamespaceURI(in [Optional=DefaultIsUndefined] DOMString prefix);
};
}
diff --git a/Source/WebCore/xml/XPathResult.idl b/Source/WebCore/xml/XPathResult.idl
index cb5c92263..77c5b8e7c 100644
--- a/Source/WebCore/xml/XPathResult.idl
+++ b/Source/WebCore/xml/XPathResult.idl
@@ -52,7 +52,7 @@ module xpath {
Node iterateNext()
raises (DOMException);
- Node snapshotItem(in [Optional=CallWithDefaultValue] unsigned long index)
+ Node snapshotItem(in [Optional=DefaultIsUndefined] unsigned long index)
raises (DOMException);
};
diff --git a/Source/WebCore/xml/XPathUtil.cpp b/Source/WebCore/xml/XPathUtil.cpp
index 4c45fcbca..7a8ff33cf 100644
--- a/Source/WebCore/xml/XPathUtil.cpp
+++ b/Source/WebCore/xml/XPathUtil.cpp
@@ -85,7 +85,6 @@ bool isValidContextNode(Node* node)
case Node::ENTITY_NODE:
case Node::ENTITY_REFERENCE_NODE:
case Node::NOTATION_NODE:
- case Node::SHADOW_ROOT_NODE:
return false;
case Node::TEXT_NODE:
return !(node->parentNode() && node->parentNode()->isAttributeNode());
diff --git a/Source/WebCore/xml/XSLTProcessor.idl b/Source/WebCore/xml/XSLTProcessor.idl
index 4fcae9af5..48ec6c20e 100644
--- a/Source/WebCore/xml/XSLTProcessor.idl
+++ b/Source/WebCore/xml/XSLTProcessor.idl
@@ -42,7 +42,7 @@ module xml {
[Custom] Document transformToDocument(in Node source);
[Custom] void setParameter(in DOMString namespaceURI, in DOMString localName, in DOMString value);
- [Custom, ConvertNullStringTo=Undefined] DOMString getParameter(in DOMString namespaceURI, in DOMString localName);
+ [Custom, TreatReturnedNullStringAs=Undefined] DOMString getParameter(in DOMString namespaceURI, in DOMString localName);
[Custom] void removeParameter(in DOMString namespaceURI, in DOMString localName);
void clearParameters();
diff --git a/Source/WebCore/xml/parser/MarkupTokenBase.h b/Source/WebCore/xml/parser/MarkupTokenBase.h
index 7a30ed604..986538b8d 100644
--- a/Source/WebCore/xml/parser/MarkupTokenBase.h
+++ b/Source/WebCore/xml/parser/MarkupTokenBase.h
@@ -540,7 +540,7 @@ inline void AtomicMarkupTokenBase<Token>::initializeAttributes(const typename To
ASSERT(attribute.m_valueRange.m_start);
ASSERT(attribute.m_valueRange.m_end);
- String value(attribute.m_value.data(), attribute.m_value.size());
+ AtomicString value(attribute.m_value.data(), attribute.m_value.size());
m_attributes->insertAttribute(Attribute::create(nameForAttribute(attribute), value), false);
}
}
diff --git a/Source/WebCore/xml/parser/XMLDocumentParserQt.cpp b/Source/WebCore/xml/parser/XMLDocumentParserQt.cpp
index cd6ea1494..75b319ffe 100644
--- a/Source/WebCore/xml/parser/XMLDocumentParserQt.cpp
+++ b/Source/WebCore/xml/parser/XMLDocumentParserQt.cpp
@@ -138,7 +138,7 @@ XMLDocumentParser::XMLDocumentParser(DocumentFragment* fragment, Element* parent
QXmlStreamNamespaceDeclarations namespaces;
for (Element* element = elemStack.last(); !elemStack.isEmpty(); elemStack.removeLast()) {
- if (NamedNodeMap* attrs = element->updatedAttributes()) {
+ if (ElementAttributeData* attrs = element->updatedAttributeData()) {
for (unsigned i = 0; i < attrs->length(); i++) {
Attribute* attr = attrs->attributeItem(i);
if (attr->localName() == "xmlns")