Convert Document from ExceptionCode to Exception
https://bugs.webkit.org/show_bug.cgi?id=164212
Reviewed by Alex Christensen.
Source/WebCore:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::processBuffer): Removed IGNORE_EXCEPTION.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::takeAllChildrenFrom): Use releaseReturnValue
instead of ASSERT_NO_EXCEPTION.
(WebCore::ContainerNode::parserInsertBefore): Removed ASSERT_NO_EXCEPTION.
(WebCore::ContainerNode::parserAppendChild): Ditto.
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocumentType): Updated for new
exception handling.
(WebCore::DOMImplementation::createDocument): Ditto.
* dom/Document.cpp:
(WebCore::createHTMLElementWithNameValidation): Return ExceptionOr.
(WebCore::Document::createElementForBindings): Ditto.
(WebCore::Document::createCDATASection): Ditto.
(WebCore::Document::createProcessingInstruction): Ditto.
(WebCore::Document::importNode): Ditto.
(WebCore::Document::adoptNode): Ditto.
(WebCore::Document::createElementNS): Ditto.
(WebCore::Document::setXMLVersion): Ditto.
(WebCore::Document::setBodyOrFrameset): Ditto.
(WebCore::Document::processHttpEquiv): Ditto.
(WebCore::Document::createEvent): Ditto.
(WebCore::Document::cookie): Ditto.
(WebCore::Document::setCookie): Ditto.
(WebCore::Document::setDomain): Ditto.
(WebCore::Document::parseQualifiedName): Ditto. Also added an overload
that constructs a QualifiedName directly that most call sites can use.
(WebCore::Document::createAttribute): Return ExceptionOr.
(WebCore::Document::createAttributeNS): Ditto.
(WebCore::Document::createTouch): Removed unneeded ExceptionCode&.
* dom/Document.h: Updated for above.
* dom/Document.idl: Use non-legacy exceptions. Removed exception
entirely from createTouch.
* dom/Element.cpp:
(WebCore::Element::parseAttributeName): Updated to use the new
Document::parseQualifiedName.
* editing/EditorCommand.cpp:
(WebCore::executeFormatBlock): Ditto.
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setNodeName): Updated for the new
exception handling.
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies): Ditto.
* page/ios/FrameIOS.mm:
(WebCore::Frame::initWithSimpleHTMLDocument): Use the
HTMLHtmlElement::create and HTMLBodyElement::create instead of using
createElementNS to make the simple document.
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::constructAttributeName): Renamed, made this
a member function, updated to use the new Document::parseQualifiedName,
and also moved the code to get the attribute in here.
(WebCore::SVGSMILElement::constructAttributeName): Added. Helper function
for the two places we update the attribute name from attributeNameAttr.
(WebCore::SVGSMILElement::insertedInto): Use updateAttributeName.
(WebCore::SVGSMILElement::svgAttributeChanged): Ditto.
* svg/animation/SVGSMILElement.h: Updated for the above.
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::processingInstruction): Updated to understand
ExceptionOr rather than an out argument.
(WebCore::XMLDocumentParser::startDocument): Removed ASSERT_NO_EXCEPTION.
Source/WebKit/mac:
* DOM/DOMDocument.mm:
(-[DOMDocument setXmlVersion:]): Updated exception handling.
(-[DOMDocument cookie]): Ditto.
(-[DOMDocument setCookie:]): Ditto.
(-[DOMDocument setBody:]): Ditto.
(-[DOMDocument createElement:]): Ditto.
(-[DOMDocument createCDATASection:]): Ditto.
(-[DOMDocument createProcessingInstruction:data:]): Ditto.
(-[DOMDocument createAttribute:]): Ditto.
(-[DOMDocument createEntityReference:]): Ditto.
(-[DOMDocument importNode:deep:]): Ditto.
(-[DOMDocument createElementNS:qualifiedName:]): Ditto.
(-[DOMDocument createAttributeNS:qualifiedName:]): Ditto.
(-[DOMDocument getElementsByTagNameNS:localName:]): Ditto.
(-[DOMDocument adoptNode:]): Ditto.
(-[DOMDocument createEvent:]): Ditto.
Source/WebKit/win:
* DOMCoreClasses.cpp:
(DOMDocument::createElement): Updated exception handling.
(DOMDocument::createEvent): Ditto.
Source/WebKit2:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:
(webkit_dom_document_create_element): Updated exception handling.
(webkit_dom_document_create_cdata_section): Ditto.
(webkit_dom_document_create_processing_instruction): Ditto.
(webkit_dom_document_create_attribute): Ditto.
(webkit_dom_document_import_node): Ditto.
(webkit_dom_document_create_element_ns): Ditto.
(webkit_dom_document_create_attribute_ns): Ditto.
(webkit_dom_document_adopt_node): Ditto.
(webkit_dom_document_create_event): Ditto.
(webkit_dom_document_set_xml_version): Ditto.
(webkit_dom_document_get_cookie): Ditto.
(webkit_dom_document_set_cookie): Ditto.
(webkit_dom_document_set_body): Ditto.
* WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
(-[WKDOMDocument createElement:]): Ditto.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@208144 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed