Reviewed by Maciej.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Mar 2006 16:50:13 +0000 (16:50 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Mar 2006 16:50:13 +0000 (16:50 +0000)
commit998e8c6a7eb514156b5a327ee7fb142eecb3b33f
treee5d39f26274da5992c9ec6dd8403c516984f8520
parentc8bdc3815e7c27eb0973b9c09044f88ae8d32698
    Reviewed by Maciej.

        - moved all the remnants of the public C++ DOM API out of khtml/dom
        - changed from "int" to "ExceptionCode" for DOM exceptions
        - removed unused CSS_HTML_RELATIVE
        - changed offsetInCharacters to be a member function of NodeImpl
        - changed DOM functions that take a NodeType to use NodeType instead of
          unsigned short for clarity (will still be unsigned short in bindings)
        - changed exception constants so they can be used directly in the
          implementation code (added in the offsets for different types of exceptions)
        - replaced the eventListenerType function with an isHTMLEventListener function
        - got rid of EventListenerEvent, which is a synonym for EventImpl*
        - eliminated handleEventImpl, whish is now the same as handleEvent

        - did other preparation for the "remove Impl suffix" renaming
          (tested by using a script that does the renaming)

        * khtml/dom/css_rule.h: Removed.
        * khtml/dom/css_stylesheet.h: Removed.
        * khtml/dom/css_value.h: Removed.
        * khtml/dom/dom2_events.cpp: Removed.
        * khtml/dom/dom2_events.h: Removed.
        * khtml/dom/dom2_range.h: Removed.
        * khtml/dom/dom2_traversal.cpp: Removed.
        * khtml/dom/dom2_traversal.h: Removed.
        * khtml/dom/dom_exception.h: Removed.
        * khtml/dom/dom_node.h: Removed.

        * dom/EventListener.h: Added.
        * dom/ExceptionCode.h: Added.

        * WebCore+SVG/kdom.h: Removed NodeType and ExceptionCodes
        * WebCore+SVG/kdomevents.h: Removed.

        * WebCore.xcodeproj/project.pbxproj: Updated for file changes.
        * WebCore.xcodeproj/project.pbxproj: Updated for file changes.

        * bindings/scripts/CodeGeneratorJS.pm: Removed unneeded DOM:: prefix. Updated file
        names and exception prefix for changes in DOM exceptions.

        * bindings/js/JSDOMCore.cpp: Touched to cause auto-generated code to be
        recompiled. We need to get this fixed!
        * bindings/js/JSDOMEvents.cpp: Ditto.

        * dom/Attr.idl:
        * dom/CharacterData.idl:
        * dom/DOMImplementation.idl:
        * dom/DocumentType.idl:
        * dom/Element.idl:
        * dom/Entity.idl:
        * dom/MutationEvent.idl:
        * dom/Notation.idl:
        * dom/ProcessingInstruction.idl:
        * dom/Text.idl:
        * dom/WheelEvent.idl:
        Touched all IDL files so that changes in CodeGeneratorJS.pm would take effect.
        Added license headers.

        * bindings/objc/DOM.mm: Fixed garbled license agreement. Updated includes.
        Changed from a single "using namespace WebCore" to individual using statements
        because of the imminent conflict between DOMImplementation in Objective C
        and WebCore::DOMImplementation (currently has an Impl suffix). Added a typedef
        for WebCore::DOMImplementationImpl. Changed to use ExceptionCode instead of int.

        * bindings/objc/DOMCSS.h: Removed DOMCSSException and the special CSS exception
        codes. This is a feature of DOM Level 1 only. In DOM Level 2 these were eliminated
        and use basic DOM exception codes instead. We might have to do something for binary
        compatibility eventually, but perhaps not.

        * bindings/objc/DOMCSS.mm:
        * bindings/objc/DOMEvents.mm:
        * bindings/objc/DOMEventsInternal.h:
        * bindings/objc/DOMHTML.mm:
        * bindings/objc/DOMHTMLInternal.h:
        * bindings/objc/DOMViews.mm:
        * bindings/objc/DOMViewsInternal.h:
        Fixed garbled license agreements.
        Changed to use ExceptionCode instead of int and name the variable "ec".

        * bindings/objc/DOMInternal.h: Changed addDOMWrapperImpl to take NSObject* instead
        of id. This helps with overload resolution when addDOMWrapperImpl is renamed to be
        addDOMWrapper. Changed ALLOW_DOM_CAST to always use "class" in from of the type name
        of the WebCore class. This helps work around what seems like a bug in namespace support
        in Objective-C mode, although the bug only happens after the "remove Impl" renaming.
        * bindings/objc/DOMInternal.mm:
        (getDOMWrapperImpl): Changed to use HashMap.
        (addDOMWrapperImpl): Ditto.
        (removeDOMWrapper): Ditto.
        (raiseDOMException): Update to use new names for exception number ranges.

        * bridge/mac/WebCoreFrameBridge.mm:
        * khtml/ecma/xmlserializer.cpp:
        * kwq/KWQAccObject.mm:
        Removed unneeded includes.

        * css/css_ruleimpl.h: Moved "rule type" into this header.

        * dom/CommentImpl.h:
        * dom/CommentImpl.cpp: (WebCore::CommentImpl::offsetInCharacters): Added. Returns true.

        * khtml/ecma/XSLTProcessor.cpp: (KJS::XSLTProcessorProtoFunc::callAsFunction):
        Changed this around so we don't have a local variable named docImpl.

        * khtml/ecma/kjs_binding.cpp: (KJS::setDOMException): Updated for new form of exception
        constants.

        * khtml/ecma/kjs_events.h:
        * khtml/ecma/kjs_events.cpp:
        (KJS::JSAbstractEventListener::handleEvent): Changed to no longer use EventListenerEvent.
        (KJS::JSAbstractEventListener::isHTMLEventListener): Added.

        * rendering/RenderTextField.h: Updated includes. Tweaked the code formatting of
        InputMutationListener. (Might be unnecessary since this class might be deleted soon.)

        * bridge/mac/MacFrame.mm:
        * css/css_computedstyle.cpp:
        * css/css_computedstyle.h:
        * css/css_ruleimpl.cpp:
        * css/css_stylesheetimpl.cpp:
        * css/css_stylesheetimpl.h:
        * css/css_valueimpl.cpp:
        * css/css_valueimpl.cpp:
        * css/css_valueimpl.h:
        * css/css_valueimpl.h:
        * css/cssparser.cpp:
        * css/cssstyleselector.cpp:
        * dom/CDATASectionImpl.cpp:
        * dom/CDATASectionImpl.h:
        * dom/CharacterDataImpl.cpp:
        * dom/CharacterDataImpl.h:
        * dom/ContainerNodeImpl.cpp:
        * dom/DOMImplementationImpl.cpp:
        * dom/DocumentFragmentImpl.cpp:
        * dom/DocumentFragmentImpl.h:
        * dom/DocumentImpl.cpp:
        * dom/DocumentImpl.h:
        * dom/DocumentTypeImpl.cpp:
        * dom/DocumentTypeImpl.h:
        * dom/NamedNodeMapImpl.h:
        * dom/NodeImpl.cpp:
        * dom/NodeImpl.h:
        * dom/NodeListImpl.cpp:
        * dom/TextImpl.cpp:
        * dom/TextImpl.h:
        * dom/dom2_eventsimpl.cpp:
        * dom/dom2_eventsimpl.h:
        * dom/dom2_rangeimpl.cpp:
        * dom/dom2_rangeimpl.h:
        * dom/dom2_traversalimpl.cpp:
        * dom/dom2_traversalimpl.h:
        * dom/dom_elementimpl.cpp:
        * dom/dom_elementimpl.h:
        * dom/dom_position.cpp:
        * dom/dom_xmlimpl.cpp:
        * dom/dom_xmlimpl.h:
        * dom/xml_tokenizer.cpp:
        * editing/AppendNodeCommand.cpp:
        * editing/ApplyStyleCommand.cpp:
        * editing/CompositeEditCommand.cpp:
        * editing/DeleteFromTextNodeCommand.cpp:
        * editing/InsertIntoTextNodeCommand.cpp:
        * editing/InsertLineBreakCommand.cpp:
        * editing/InsertNodeBeforeCommand.cpp:
        * editing/InsertParagraphSeparatorCommand.cpp:
        * editing/JoinTextNodesCommand.cpp:
        * editing/MergeIdenticalElementsCommand.cpp:
        * editing/RemoveNodeAttributeCommand.cpp:
        * editing/RemoveNodeCommand.cpp:
        * editing/ReplaceSelectionCommand.cpp:
        * editing/Selection.cpp:
        * editing/SelectionController.cpp:
        * editing/SelectionController.h:
        * editing/SetNodeAttributeCommand.cpp:
        * editing/SplitElementCommand.cpp:
        * editing/SplitTextNodeCommand.cpp:
        * editing/VisiblePosition.cpp:
        * editing/WrapContentsInDummySpanCommand.cpp:
        * editing/htmlediting.cpp:
        * editing/markup.cpp:
        * editing/visible_text.cpp:
        * khtml/ecma/kjs_binding.h:
        * khtml/ecma/kjs_css.cpp:
        * khtml/ecma/kjs_dom.cpp:
        * khtml/ecma/kjs_html.cpp:
        * khtml/ecma/kjs_range.cpp:
        * khtml/ecma/kjs_traversal.cpp:
        * khtml/ecma/kjs_traversal.h:
        * khtml/ecma/kjs_window.cpp:
        * khtml/html/HTMLElementImpl.cpp:
        * khtml/html/HTMLOptionElementImpl.cpp:
        * khtml/html/HTMLOptionElementImpl.h:
        * khtml/html/HTMLOptionsCollectionImpl.cpp:
        * khtml/html/HTMLSelectElementImpl.cpp:
        * khtml/html/HTMLTextAreaElementImpl.cpp:
        * khtml/html/html_documentimpl.cpp:
        * khtml/html/html_documentimpl.h:
        * khtml/html/html_headimpl.cpp:
        * khtml/html/html_tableimpl.cpp:
        * khtml/html/html_tableimpl.h:
        * khtml/html/htmlparser.cpp:
        * khtml/xbl/xbl_tokenizer.cpp:
        * khtml/xsl/xsl_stylesheetimpl.cpp:
        * ksvg2/misc/SVGDocumentExtensions.cpp:
        * ksvg2/svg/SVGAnimationElementImpl.cpp:
        * ksvg2/svg/SVGDOMImplementationImpl.cpp:
        * ksvg2/svg/SVGDOMImplementationImpl.h:
        * ksvg2/svg/SVGDocumentImpl.cpp:
        * ksvg2/svg/SVGDocumentImpl.h:
        * ksvg2/svg/SVGElementImpl.cpp:
        * ksvg2/svg/SVGLengthImpl.cpp:
        * ksvg2/svg/SVGLocatableImpl.cpp:
        * ksvg2/svg/SVGPolyElementImpl.cpp:
        * ksvg2/svg/SVGSVGElementImpl.cpp:
        * ksvg2/svg/SVGStyleElementImpl.cpp:
        * ksvg2/svg/SVGStyleElementImpl.h:
        * ksvg2/svg/SVGUseElementImpl.cpp:
        * page/Frame.cpp:
        * page/FrameView.cpp:
        * rendering/render_object.cpp:
        * xml/xmlhttprequest.cpp:
        Changed to use ExceptionCode instead of int and name the variable "ec".
        Also updated use of exception codes and other constants to get them from
        their new locations.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
159 files changed:
WebCore/ChangeLog
WebCore/WebCore+SVG/kdom.h
WebCore/WebCore+SVG/kdomevents.h [deleted file]
WebCore/WebCore.vcproj/WebCore/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/js/JSDOMCore.cpp
WebCore/bindings/js/JSDOMEvents.cpp
WebCore/bindings/objc/DOM.mm
WebCore/bindings/objc/DOMCSS.h
WebCore/bindings/objc/DOMCSS.mm
WebCore/bindings/objc/DOMEvents.mm
WebCore/bindings/objc/DOMEventsInternal.h
WebCore/bindings/objc/DOMHTML.mm
WebCore/bindings/objc/DOMHTMLInternal.h
WebCore/bindings/objc/DOMInternal.h
WebCore/bindings/objc/DOMInternal.mm
WebCore/bindings/objc/DOMViews.mm
WebCore/bindings/objc/DOMViewsInternal.h
WebCore/bindings/scripts/CodeGeneratorJS.pm
WebCore/bridge/mac/MacFrame.mm
WebCore/bridge/mac/WebCoreFrameBridge.mm
WebCore/css/css_computedstyle.cpp
WebCore/css/css_computedstyle.h
WebCore/css/css_ruleimpl.cpp
WebCore/css/css_ruleimpl.h
WebCore/css/css_stylesheetimpl.cpp
WebCore/css/css_stylesheetimpl.h
WebCore/css/css_valueimpl.cpp
WebCore/css/css_valueimpl.h
WebCore/css/cssparser.cpp
WebCore/css/cssstyleselector.cpp
WebCore/dom/Attr.idl
WebCore/dom/CDATASectionImpl.cpp
WebCore/dom/CDATASectionImpl.h
WebCore/dom/CharacterData.idl
WebCore/dom/CharacterDataImpl.cpp
WebCore/dom/CharacterDataImpl.h
WebCore/dom/CommentImpl.cpp
WebCore/dom/CommentImpl.h
WebCore/dom/ContainerNodeImpl.cpp
WebCore/dom/DOMImplementation.idl
WebCore/dom/DOMImplementationImpl.cpp
WebCore/dom/DocumentFragmentImpl.cpp
WebCore/dom/DocumentFragmentImpl.h
WebCore/dom/DocumentImpl.cpp
WebCore/dom/DocumentImpl.h
WebCore/dom/DocumentType.idl
WebCore/dom/DocumentTypeImpl.cpp
WebCore/dom/DocumentTypeImpl.h
WebCore/dom/Element.idl
WebCore/dom/Entity.idl
WebCore/dom/EventListener.h [moved from WebCore/khtml/dom/dom2_traversal.cpp with 62% similarity]
WebCore/dom/ExceptionCode.h [new file with mode: 0644]
WebCore/dom/MutationEvent.idl
WebCore/dom/NamedNodeMapImpl.h
WebCore/dom/NodeImpl.cpp
WebCore/dom/NodeImpl.h
WebCore/dom/NodeListImpl.cpp
WebCore/dom/Notation.idl
WebCore/dom/ProcessingInstruction.idl
WebCore/dom/Text.idl
WebCore/dom/TextImpl.cpp
WebCore/dom/TextImpl.h
WebCore/dom/WheelEvent.idl
WebCore/dom/dom2_eventsimpl.cpp
WebCore/dom/dom2_eventsimpl.h
WebCore/dom/dom2_rangeimpl.cpp
WebCore/dom/dom2_rangeimpl.h
WebCore/dom/dom2_traversalimpl.cpp
WebCore/dom/dom2_traversalimpl.h
WebCore/dom/dom_elementimpl.cpp
WebCore/dom/dom_elementimpl.h
WebCore/dom/dom_position.cpp
WebCore/dom/dom_xmlimpl.cpp
WebCore/dom/dom_xmlimpl.h
WebCore/dom/xml_tokenizer.cpp
WebCore/editing/AppendNodeCommand.cpp
WebCore/editing/ApplyStyleCommand.cpp
WebCore/editing/CompositeEditCommand.cpp
WebCore/editing/DeleteFromTextNodeCommand.cpp
WebCore/editing/InsertIntoTextNodeCommand.cpp
WebCore/editing/InsertLineBreakCommand.cpp
WebCore/editing/InsertNodeBeforeCommand.cpp
WebCore/editing/InsertParagraphSeparatorCommand.cpp
WebCore/editing/JoinTextNodesCommand.cpp
WebCore/editing/MergeIdenticalElementsCommand.cpp
WebCore/editing/RemoveNodeAttributeCommand.cpp
WebCore/editing/RemoveNodeCommand.cpp
WebCore/editing/ReplaceSelectionCommand.cpp
WebCore/editing/Selection.cpp
WebCore/editing/SelectionController.cpp
WebCore/editing/SelectionController.h
WebCore/editing/SetNodeAttributeCommand.cpp
WebCore/editing/SplitElementCommand.cpp
WebCore/editing/SplitTextNodeCommand.cpp
WebCore/editing/TypingCommand.cpp
WebCore/editing/VisiblePosition.cpp
WebCore/editing/WrapContentsInDummySpanCommand.cpp
WebCore/editing/htmlediting.cpp
WebCore/editing/markup.cpp
WebCore/editing/visible_text.cpp
WebCore/khtml/dom/css_rule.h [deleted file]
WebCore/khtml/dom/css_stylesheet.h [deleted file]
WebCore/khtml/dom/css_value.h [deleted file]
WebCore/khtml/dom/dom2_events.cpp [deleted file]
WebCore/khtml/dom/dom2_events.h [deleted file]
WebCore/khtml/dom/dom2_range.h [deleted file]
WebCore/khtml/dom/dom2_traversal.h [deleted file]
WebCore/khtml/dom/dom_exception.h [deleted file]
WebCore/khtml/dom/dom_node.h [deleted file]
WebCore/khtml/ecma/XSLTProcessor.cpp
WebCore/khtml/ecma/kjs_binding.cpp
WebCore/khtml/ecma/kjs_binding.h
WebCore/khtml/ecma/kjs_css.cpp
WebCore/khtml/ecma/kjs_dom.cpp
WebCore/khtml/ecma/kjs_events.cpp
WebCore/khtml/ecma/kjs_events.h
WebCore/khtml/ecma/kjs_html.cpp
WebCore/khtml/ecma/kjs_range.cpp
WebCore/khtml/ecma/kjs_traversal.cpp
WebCore/khtml/ecma/kjs_traversal.h
WebCore/khtml/ecma/kjs_window.cpp
WebCore/khtml/ecma/xmlserializer.cpp
WebCore/khtml/html/HTMLElementImpl.cpp
WebCore/khtml/html/HTMLOptionElementImpl.cpp
WebCore/khtml/html/HTMLOptionElementImpl.h
WebCore/khtml/html/HTMLOptionsCollectionImpl.cpp
WebCore/khtml/html/HTMLSelectElementImpl.cpp
WebCore/khtml/html/HTMLTextAreaElementImpl.cpp
WebCore/khtml/html/html_documentimpl.cpp
WebCore/khtml/html/html_documentimpl.h
WebCore/khtml/html/html_headimpl.cpp
WebCore/khtml/html/html_tableimpl.cpp
WebCore/khtml/html/html_tableimpl.h
WebCore/khtml/html/htmlparser.cpp
WebCore/khtml/xbl/xbl_tokenizer.cpp
WebCore/khtml/xsl/xsl_stylesheetimpl.cpp
WebCore/ksvg2/misc/SVGDocumentExtensions.cpp
WebCore/ksvg2/svg/SVGAElementImpl.cpp
WebCore/ksvg2/svg/SVGAnimationElementImpl.cpp
WebCore/ksvg2/svg/SVGDOMImplementationImpl.cpp
WebCore/ksvg2/svg/SVGDOMImplementationImpl.h
WebCore/ksvg2/svg/SVGDocumentImpl.cpp
WebCore/ksvg2/svg/SVGDocumentImpl.h
WebCore/ksvg2/svg/SVGElementImpl.cpp
WebCore/ksvg2/svg/SVGLengthImpl.cpp
WebCore/ksvg2/svg/SVGLocatableImpl.cpp
WebCore/ksvg2/svg/SVGPolyElementImpl.cpp
WebCore/ksvg2/svg/SVGSVGElementImpl.cpp
WebCore/ksvg2/svg/SVGStyleElementImpl.cpp
WebCore/ksvg2/svg/SVGStyleElementImpl.h
WebCore/ksvg2/svg/SVGUseElementImpl.cpp
WebCore/kwq/KWQAccObject.mm
WebCore/page/Frame.cpp
WebCore/page/FrameView.cpp
WebCore/platform/mac/GraphicsContextMac.mm
WebCore/rendering/RenderTextField.h
WebCore/rendering/render_object.cpp
WebCore/xml/xmlhttprequest.cpp