2006-01-19 Eric Seidel <eseidel@apple.com>
authoreseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jan 2006 23:50:13 +0000 (23:50 +0000)
committereseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jan 2006 23:50:13 +0000 (23:50 +0000)
        Reviewed by darin.

        Split html_miscimpl.* into separate files and move html_elementimpl
        http://bugzilla.opendarwin.org/show_bug.cgi?id=6670

        * WebCore.xcodeproj/project.pbxproj:
        * bindings/objc/DOM.mm:
        * bindings/objc/DOMHTML.mm:
        * bridge/mac/WebCoreFrameBridge.mm:
        * css/css_valueimpl.cpp:
        * css/cssstyleselector.cpp:
        (WebCore::CSSStyleSelector::applyProperty):
        * khtml/ecma/kjs_dom.cpp:
        * khtml/ecma/kjs_html.cpp:
        * khtml/editing/apply_style_command.cpp:
        * khtml/editing/markup.cpp:
        * khtml/editing/replace_selection_command.cpp:
        * khtml/html/HTMLBaseFontElementImpl.cpp: Added.
        * khtml/html/HTMLBaseFontElementImpl.h: Added.
        * khtml/html/HTMLButtonElementImpl.cpp:
        * khtml/html/HTMLCollectionImpl.cpp: Added.
        (WebCore::HTMLCollectionImpl::traverseNextItem):
        * khtml/html/HTMLCollectionImpl.h: Added.
        * khtml/html/HTMLElementImpl.cpp: Added.
        * khtml/html/HTMLElementImpl.h: Added.
        * khtml/html/HTMLFieldSetElementImpl.cpp:
        * khtml/html/HTMLFormCollectionImpl.cpp: Added.
        * khtml/html/HTMLFormCollectionImpl.h: Added.
        * khtml/html/HTMLFormElementImpl.cpp:
        * khtml/html/HTMLFormElementImpl.h:
        * khtml/html/HTMLGenericFormElementImpl.cpp:
        * khtml/html/HTMLGenericFormElementImpl.h:
        * khtml/html/HTMLInputElementImpl.cpp:
        * khtml/html/HTMLIsIndexElementImpl.cpp:
        * khtml/html/HTMLLabelElementImpl.h:
        * khtml/html/HTMLLegendElementImpl.cpp:
        * khtml/html/HTMLNameCollectionImpl.cpp: Added.
        * khtml/html/HTMLNameCollectionImpl.h: Added.
        * khtml/html/HTMLOptGroupElementImpl.cpp:
        * khtml/html/HTMLOptGroupElementImpl.h:
        * khtml/html/HTMLOptionElementImpl.h:
        * khtml/html/HTMLSelectElementImpl.cpp:
        * khtml/html/HTMLTextAreaElementImpl.cpp:
        * khtml/html/html_baseimpl.cpp:
        * khtml/html/html_baseimpl.h:
        * khtml/html/html_blockimpl.cpp:
        * khtml/html/html_blockimpl.h:
        * khtml/html/html_canvasimpl.cpp:
        * khtml/html/html_documentimpl.cpp:
        * khtml/html/html_documentimpl.h:
        * khtml/html/html_elementimpl.cpp: Removed.
        * khtml/html/html_elementimpl.h: Removed.
        * khtml/html/html_headimpl.cpp:
        (WebCore::HTMLLinkElementImpl::setStyleSheet):
        (WebCore::HTMLLinkElementImpl::isLoading):
        * khtml/html/html_headimpl.h:
        * khtml/html/html_imageimpl.cpp:
        * khtml/html/html_inlineimpl.cpp:
        * khtml/html/html_inlineimpl.h:
        * khtml/html/html_listimpl.h:
        * khtml/html/html_miscimpl.cpp: Removed.
        * khtml/html/html_miscimpl.h: Removed.
        * khtml/html/html_objectimpl.cpp:
        * khtml/html/html_tableimpl.h:
        * khtml/html/htmlfactory.cpp:
        * khtml/html/htmlparser.cpp:
        * khtml/html/htmltokenizer.cpp:
        (WebCore::HTMLTokenizer::scriptHandler):
        (WebCore::HTMLTokenizer::scriptExecution):
        * khtml/xml/DocumentImpl.cpp:
        * khtml/xml/dom2_rangeimpl.cpp:
        * khtml/xml/dom_elementimpl.cpp:
        * kwq/KWQAccObject.mm:
        * loader/loader.cpp:
        * page/Frame.cpp:
        (Frame::restoreURL):
        (Frame::stopLoading):
        (Frame::receivedFirstData):
        (Frame::gotoAnchor):
        (Frame::requestObject):
        (Frame::processObjectRequest):
        (Frame::submitForm):
        (Frame::slotParentCompleted):
        (Frame::findFrame):
        (Frame::executeScript):
        * page/FrameView.cpp:
        (FrameView::useSlowRepaints):
        * rendering/render_applet.cpp:
        * rendering/render_applet.h:
        * rendering/render_box.cpp:
        (WebCore::RenderBox::contentWidth):
        (WebCore::RenderBox::paintRootBoxDecorations):
        (WebCore::RenderBox::paintBoxDecorations):
        (WebCore::RenderBox::getClipRect):
        (WebCore::RenderBox::calcWidth):
        (WebCore::RenderBox::calcHeight):
        * rendering/render_canvasimage.cpp:
        * rendering/render_canvasimage.h:
        * rendering/render_frames.cpp:
        * rendering/render_image.cpp:
        * rendering/render_image.h:
        * rendering/render_layer.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@12243 268f45cc-cd09-0410-ab3c-d52691b4dbfc

74 files changed:
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/objc/DOM.mm
WebCore/bindings/objc/DOMHTML.mm
WebCore/bridge/mac/WebCoreFrameBridge.mm
WebCore/css/css_valueimpl.cpp
WebCore/css/cssstyleselector.cpp
WebCore/kcanvas/device/quartz/KCanvasItemQuartz.mm
WebCore/kcanvas/device/quartz/KCanvasResourcesQuartz.mm
WebCore/khtml/ecma/kjs_dom.cpp
WebCore/khtml/ecma/kjs_html.cpp
WebCore/khtml/editing/apply_style_command.cpp
WebCore/khtml/editing/markup.cpp
WebCore/khtml/editing/replace_selection_command.cpp
WebCore/khtml/html/HTMLBaseFontElementImpl.cpp [new file with mode: 0644]
WebCore/khtml/html/HTMLBaseFontElementImpl.h [new file with mode: 0644]
WebCore/khtml/html/HTMLButtonElementImpl.cpp
WebCore/khtml/html/HTMLCollectionImpl.cpp [moved from WebCore/khtml/html/html_miscimpl.cpp with 51% similarity]
WebCore/khtml/html/HTMLCollectionImpl.h [moved from WebCore/khtml/html/html_miscimpl.h with 64% similarity]
WebCore/khtml/html/HTMLElementImpl.cpp [moved from WebCore/khtml/html/html_elementimpl.cpp with 98% similarity]
WebCore/khtml/html/HTMLElementImpl.h [moved from WebCore/khtml/html/html_elementimpl.h with 97% similarity]
WebCore/khtml/html/HTMLFieldSetElementImpl.cpp
WebCore/khtml/html/HTMLFormCollectionImpl.cpp [new file with mode: 0644]
WebCore/khtml/html/HTMLFormCollectionImpl.h [new file with mode: 0644]
WebCore/khtml/html/HTMLFormElementImpl.cpp
WebCore/khtml/html/HTMLFormElementImpl.h
WebCore/khtml/html/HTMLGenericFormElementImpl.cpp
WebCore/khtml/html/HTMLGenericFormElementImpl.h
WebCore/khtml/html/HTMLInputElementImpl.cpp
WebCore/khtml/html/HTMLIsIndexElementImpl.cpp
WebCore/khtml/html/HTMLLabelElementImpl.h
WebCore/khtml/html/HTMLLegendElementImpl.cpp
WebCore/khtml/html/HTMLNameCollectionImpl.cpp [new file with mode: 0644]
WebCore/khtml/html/HTMLNameCollectionImpl.h [new file with mode: 0644]
WebCore/khtml/html/HTMLOptGroupElementImpl.cpp
WebCore/khtml/html/HTMLOptGroupElementImpl.h
WebCore/khtml/html/HTMLOptionElementImpl.h
WebCore/khtml/html/HTMLSelectElementImpl.cpp
WebCore/khtml/html/HTMLTextAreaElementImpl.cpp
WebCore/khtml/html/html_baseimpl.cpp
WebCore/khtml/html/html_baseimpl.h
WebCore/khtml/html/html_blockimpl.cpp
WebCore/khtml/html/html_blockimpl.h
WebCore/khtml/html/html_canvasimpl.cpp
WebCore/khtml/html/html_documentimpl.cpp
WebCore/khtml/html/html_documentimpl.h
WebCore/khtml/html/html_headimpl.cpp
WebCore/khtml/html/html_headimpl.h
WebCore/khtml/html/html_imageimpl.cpp
WebCore/khtml/html/html_inlineimpl.cpp
WebCore/khtml/html/html_inlineimpl.h
WebCore/khtml/html/html_listimpl.h
WebCore/khtml/html/html_objectimpl.cpp
WebCore/khtml/html/html_tableimpl.h
WebCore/khtml/html/htmlfactory.cpp
WebCore/khtml/html/htmlparser.cpp
WebCore/khtml/html/htmltokenizer.cpp
WebCore/khtml/xml/DocumentImpl.cpp
WebCore/khtml/xml/dom2_rangeimpl.cpp
WebCore/khtml/xml/dom_elementimpl.cpp
WebCore/kwq/KWQAccObject.mm
WebCore/kwq/KWQPageState.mm
WebCore/loader/loader.cpp
WebCore/page/Frame.cpp
WebCore/page/FrameView.cpp
WebCore/rendering/render_applet.cpp
WebCore/rendering/render_applet.h
WebCore/rendering/render_box.cpp
WebCore/rendering/render_canvasimage.cpp
WebCore/rendering/render_canvasimage.h
WebCore/rendering/render_frames.cpp
WebCore/rendering/render_image.cpp
WebCore/rendering/render_image.h
WebCore/rendering/render_layer.cpp

index d26af66..bc30a26 100644 (file)
@@ -1,3 +1,108 @@
+2006-01-19  Eric Seidel  <eseidel@apple.com>
+
+        Reviewed by darin.
+
+        Split html_miscimpl.* into separate files and move html_elementimpl
+        http://bugzilla.opendarwin.org/show_bug.cgi?id=6670
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/objc/DOM.mm:
+        * bindings/objc/DOMHTML.mm:
+        * bridge/mac/WebCoreFrameBridge.mm:
+        * css/css_valueimpl.cpp:
+        * css/cssstyleselector.cpp:
+        (WebCore::CSSStyleSelector::applyProperty):
+        * khtml/ecma/kjs_dom.cpp:
+        * khtml/ecma/kjs_html.cpp:
+        * khtml/editing/apply_style_command.cpp:
+        * khtml/editing/markup.cpp:
+        * khtml/editing/replace_selection_command.cpp:
+        * khtml/html/HTMLBaseFontElementImpl.cpp: Added.
+        * khtml/html/HTMLBaseFontElementImpl.h: Added.
+        * khtml/html/HTMLButtonElementImpl.cpp:
+        * khtml/html/HTMLCollectionImpl.cpp: Added.
+        (WebCore::HTMLCollectionImpl::traverseNextItem):
+        * khtml/html/HTMLCollectionImpl.h: Added.
+        * khtml/html/HTMLElementImpl.cpp: Added.
+        * khtml/html/HTMLElementImpl.h: Added.
+        * khtml/html/HTMLFieldSetElementImpl.cpp:
+        * khtml/html/HTMLFormCollectionImpl.cpp: Added.
+        * khtml/html/HTMLFormCollectionImpl.h: Added.
+        * khtml/html/HTMLFormElementImpl.cpp:
+        * khtml/html/HTMLFormElementImpl.h:
+        * khtml/html/HTMLGenericFormElementImpl.cpp:
+        * khtml/html/HTMLGenericFormElementImpl.h:
+        * khtml/html/HTMLInputElementImpl.cpp:
+        * khtml/html/HTMLIsIndexElementImpl.cpp:
+        * khtml/html/HTMLLabelElementImpl.h:
+        * khtml/html/HTMLLegendElementImpl.cpp:
+        * khtml/html/HTMLNameCollectionImpl.cpp: Added.
+        * khtml/html/HTMLNameCollectionImpl.h: Added.
+        * khtml/html/HTMLOptGroupElementImpl.cpp:
+        * khtml/html/HTMLOptGroupElementImpl.h:
+        * khtml/html/HTMLOptionElementImpl.h:
+        * khtml/html/HTMLSelectElementImpl.cpp:
+        * khtml/html/HTMLTextAreaElementImpl.cpp:
+        * khtml/html/html_baseimpl.cpp:
+        * khtml/html/html_baseimpl.h:
+        * khtml/html/html_blockimpl.cpp:
+        * khtml/html/html_blockimpl.h:
+        * khtml/html/html_canvasimpl.cpp:
+        * khtml/html/html_documentimpl.cpp:
+        * khtml/html/html_documentimpl.h:
+        * khtml/html/html_elementimpl.cpp: Removed.
+        * khtml/html/html_elementimpl.h: Removed.
+        * khtml/html/html_headimpl.cpp:
+        (WebCore::HTMLLinkElementImpl::setStyleSheet):
+        (WebCore::HTMLLinkElementImpl::isLoading):
+        * khtml/html/html_headimpl.h:
+        * khtml/html/html_imageimpl.cpp:
+        * khtml/html/html_inlineimpl.cpp:
+        * khtml/html/html_inlineimpl.h:
+        * khtml/html/html_listimpl.h:
+        * khtml/html/html_miscimpl.cpp: Removed.
+        * khtml/html/html_miscimpl.h: Removed.
+        * khtml/html/html_objectimpl.cpp:
+        * khtml/html/html_tableimpl.h:
+        * khtml/html/htmlfactory.cpp:
+        * khtml/html/htmlparser.cpp:
+        * khtml/html/htmltokenizer.cpp:
+        (WebCore::HTMLTokenizer::scriptHandler):
+        (WebCore::HTMLTokenizer::scriptExecution):
+        * khtml/xml/DocumentImpl.cpp:
+        * khtml/xml/dom2_rangeimpl.cpp:
+        * khtml/xml/dom_elementimpl.cpp:
+        * kwq/KWQAccObject.mm:
+        * loader/loader.cpp:
+        * page/Frame.cpp:
+        (Frame::restoreURL):
+        (Frame::stopLoading):
+        (Frame::receivedFirstData):
+        (Frame::gotoAnchor):
+        (Frame::requestObject):
+        (Frame::processObjectRequest):
+        (Frame::submitForm):
+        (Frame::slotParentCompleted):
+        (Frame::findFrame):
+        (Frame::executeScript):
+        * page/FrameView.cpp:
+        (FrameView::useSlowRepaints):
+        * rendering/render_applet.cpp:
+        * rendering/render_applet.h:
+        * rendering/render_box.cpp:
+        (WebCore::RenderBox::contentWidth):
+        (WebCore::RenderBox::paintRootBoxDecorations):
+        (WebCore::RenderBox::paintBoxDecorations):
+        (WebCore::RenderBox::getClipRect):
+        (WebCore::RenderBox::calcWidth):
+        (WebCore::RenderBox::calcHeight):
+        * rendering/render_canvasimage.cpp:
+        * rendering/render_canvasimage.h:
+        * rendering/render_frames.cpp:
+        * rendering/render_image.cpp:
+        * rendering/render_image.h:
+        * rendering/render_layer.cpp:
+
 2006-01-19  Anders Carlsson  <andersca@mac.com>
 
         Reviewed by Darin.
index 3fa8c2e..b8fb40e 100644 (file)
                93F198E308245E59001E9ABC /* html_baseimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D23802DE4396018635CA /* html_baseimpl.h */; };
                93F198E408245E59001E9ABC /* html_blockimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D23A02DE4396018635CA /* html_blockimpl.h */; };
                93F198E508245E59001E9ABC /* html_documentimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D23C02DE4396018635CA /* html_documentimpl.h */; };
-               93F198E608245E59001E9ABC /* html_elementimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D23F02DE4396018635CA /* html_elementimpl.h */; };
+               93F198E608245E59001E9ABC /* HTMLElementImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D23F02DE4396018635CA /* HTMLElementImpl.h */; };
                93F198E808245E59001E9ABC /* html_headimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D24302DE4396018635CA /* html_headimpl.h */; };
                93F198E908245E59001E9ABC /* html_imageimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D24502DE4396018635CA /* html_imageimpl.h */; };
                93F198EA08245E59001E9ABC /* html_inlineimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D24702DE4396018635CA /* html_inlineimpl.h */; };
                93F198EB08245E59001E9ABC /* html_listimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D24902DE4396018635CA /* html_listimpl.h */; };
-               93F198EC08245E59001E9ABC /* html_miscimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D24B02DE4396018635CA /* html_miscimpl.h */; };
                93F198ED08245E59001E9ABC /* html_objectimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D24D02DE4396018635CA /* html_objectimpl.h */; };
                93F198EE08245E59001E9ABC /* html_tableimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D24F02DE4396018635CA /* html_tableimpl.h */; };
                93F198EF08245E59001E9ABC /* htmlparser.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D25102DE4396018635CA /* htmlparser.h */; };
                93F19A8F08245E59001E9ABC /* html_baseimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D23702DE4396018635CA /* html_baseimpl.cpp */; };
                93F19A9008245E59001E9ABC /* html_blockimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D23902DE4396018635CA /* html_blockimpl.cpp */; };
                93F19A9108245E59001E9ABC /* html_documentimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D23B02DE4396018635CA /* html_documentimpl.cpp */; };
-               93F19A9208245E59001E9ABC /* html_elementimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D23E02DE4396018635CA /* html_elementimpl.cpp */; };
+               93F19A9208245E59001E9ABC /* HTMLElementImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D23E02DE4396018635CA /* HTMLElementImpl.cpp */; };
                93F19A9408245E59001E9ABC /* html_headimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D24202DE4396018635CA /* html_headimpl.cpp */; };
                93F19A9508245E59001E9ABC /* html_imageimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D24402DE4396018635CA /* html_imageimpl.cpp */; };
                93F19A9608245E59001E9ABC /* html_inlineimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D24602DE4396018635CA /* html_inlineimpl.cpp */; };
                93F19A9708245E59001E9ABC /* html_listimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D24802DE4396018635CA /* html_listimpl.cpp */; };
-               93F19A9808245E59001E9ABC /* html_miscimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D24A02DE4396018635CA /* html_miscimpl.cpp */; };
                93F19A9908245E59001E9ABC /* html_objectimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D24C02DE4396018635CA /* html_objectimpl.cpp */; };
                93F19A9A08245E59001E9ABC /* html_tableimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D24E02DE4396018635CA /* html_tableimpl.cpp */; };
                93F19A9B08245E59001E9ABC /* htmlparser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D25002DE4396018635CA /* htmlparser.cpp */; };
                A88AD1310952480A001DD196 /* html_baseimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D23802DE4396018635CA /* html_baseimpl.h */; };
                A88AD1320952480A001DD196 /* html_blockimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D23A02DE4396018635CA /* html_blockimpl.h */; };
                A88AD1330952480A001DD196 /* html_documentimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D23C02DE4396018635CA /* html_documentimpl.h */; };
-               A88AD1340952480A001DD196 /* html_elementimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D23F02DE4396018635CA /* html_elementimpl.h */; };
+               A88AD1340952480A001DD196 /* HTMLElementImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D23F02DE4396018635CA /* HTMLElementImpl.h */; };
                A88AD1360952480A001DD196 /* html_headimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D24302DE4396018635CA /* html_headimpl.h */; };
                A88AD1370952480A001DD196 /* html_imageimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D24502DE4396018635CA /* html_imageimpl.h */; };
                A88AD1380952480A001DD196 /* html_inlineimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D24702DE4396018635CA /* html_inlineimpl.h */; };
                A88AD1390952480A001DD196 /* html_listimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D24902DE4396018635CA /* html_listimpl.h */; };
-               A88AD13A0952480A001DD196 /* html_miscimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D24B02DE4396018635CA /* html_miscimpl.h */; };
                A88AD13B0952480A001DD196 /* html_objectimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D24D02DE4396018635CA /* html_objectimpl.h */; };
                A88AD13C0952480A001DD196 /* html_tableimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D24F02DE4396018635CA /* html_tableimpl.h */; };
                A88AD13D0952480A001DD196 /* htmlparser.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D25102DE4396018635CA /* htmlparser.h */; };
                A88AD2D20952480A001DD196 /* html_baseimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D23702DE4396018635CA /* html_baseimpl.cpp */; };
                A88AD2D30952480A001DD196 /* html_blockimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D23902DE4396018635CA /* html_blockimpl.cpp */; };
                A88AD2D40952480A001DD196 /* html_documentimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D23B02DE4396018635CA /* html_documentimpl.cpp */; };
-               A88AD2D50952480A001DD196 /* html_elementimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D23E02DE4396018635CA /* html_elementimpl.cpp */; };
+               A88AD2D50952480A001DD196 /* HTMLElementImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D23E02DE4396018635CA /* HTMLElementImpl.cpp */; };
                A88AD2D70952480A001DD196 /* html_headimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D24202DE4396018635CA /* html_headimpl.cpp */; };
                A88AD2D80952480A001DD196 /* html_imageimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D24402DE4396018635CA /* html_imageimpl.cpp */; };
                A88AD2D90952480A001DD196 /* html_inlineimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D24602DE4396018635CA /* html_inlineimpl.cpp */; };
                A88AD2DA0952480A001DD196 /* html_listimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D24802DE4396018635CA /* html_listimpl.cpp */; };
-               A88AD2DB0952480A001DD196 /* html_miscimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D24A02DE4396018635CA /* html_miscimpl.cpp */; };
                A88AD2DC0952480A001DD196 /* html_objectimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D24C02DE4396018635CA /* html_objectimpl.cpp */; };
                A88AD2DD0952480A001DD196 /* html_tableimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D24E02DE4396018635CA /* html_tableimpl.cpp */; };
                A88AD2DE0952480A001DD196 /* htmlparser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F523D25002DE4396018635CA /* htmlparser.cpp */; };
                A88AD51E0952499F001DD196 /* SVGNamesWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A884283809308C1C00B6D461 /* SVGNamesWrapper.cpp */; };
                A88AD52F09524B92001DD196 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A85D7A2F0879EBA9006A9172 /* QuartzCore.framework */; };
                A88AD5AA09525131001DD196 /* SVGCSSStyleSelector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0F6FB089701F100BA5114 /* SVGCSSStyleSelector.cpp */; };
+               A8DF3FCE097FA0FC0052981B /* HTMLFormCollectionImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = A8DF3FC6097FA0FB0052981B /* HTMLFormCollectionImpl.h */; };
+               A8DF3FCF097FA0FC0052981B /* HTMLFormCollectionImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8DF3FC7097FA0FB0052981B /* HTMLFormCollectionImpl.cpp */; };
+               A8DF3FD0097FA0FC0052981B /* HTMLCollectionImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = A8DF3FC8097FA0FB0052981B /* HTMLCollectionImpl.h */; };
+               A8DF3FD1097FA0FC0052981B /* HTMLCollectionImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8DF3FC9097FA0FB0052981B /* HTMLCollectionImpl.cpp */; };
+               A8DF3FD2097FA0FC0052981B /* HTMLBaseFontElementImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = A8DF3FCA097FA0FB0052981B /* HTMLBaseFontElementImpl.h */; };
+               A8DF3FD3097FA0FC0052981B /* HTMLBaseFontElementImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8DF3FCB097FA0FB0052981B /* HTMLBaseFontElementImpl.cpp */; };
+               A8DF3FD4097FA0FC0052981B /* HTMLNameCollectionImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = A8DF3FCC097FA0FB0052981B /* HTMLNameCollectionImpl.h */; };
+               A8DF3FD5097FA0FC0052981B /* HTMLNameCollectionImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8DF3FCD097FA0FB0052981B /* HTMLNameCollectionImpl.cpp */; };
+               A8DF3FD6097FA0FC0052981B /* HTMLFormCollectionImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = A8DF3FC6097FA0FB0052981B /* HTMLFormCollectionImpl.h */; };
+               A8DF3FD7097FA0FC0052981B /* HTMLFormCollectionImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8DF3FC7097FA0FB0052981B /* HTMLFormCollectionImpl.cpp */; };
+               A8DF3FD8097FA0FC0052981B /* HTMLCollectionImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = A8DF3FC8097FA0FB0052981B /* HTMLCollectionImpl.h */; };
+               A8DF3FD9097FA0FC0052981B /* HTMLCollectionImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8DF3FC9097FA0FB0052981B /* HTMLCollectionImpl.cpp */; };
+               A8DF3FDA097FA0FC0052981B /* HTMLBaseFontElementImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = A8DF3FCA097FA0FB0052981B /* HTMLBaseFontElementImpl.h */; };
+               A8DF3FDB097FA0FC0052981B /* HTMLBaseFontElementImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8DF3FCB097FA0FB0052981B /* HTMLBaseFontElementImpl.cpp */; };
+               A8DF3FDC097FA0FC0052981B /* HTMLNameCollectionImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = A8DF3FCC097FA0FB0052981B /* HTMLNameCollectionImpl.h */; };
+               A8DF3FDD097FA0FC0052981B /* HTMLNameCollectionImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8DF3FCD097FA0FB0052981B /* HTMLNameCollectionImpl.cpp */; };
                A8FD8B86087CB44C00DC3707 /* KWQWMatrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A85D7A8C0879EC64006A9172 /* KWQWMatrix.cpp */; };
                A8FD8B87087CB45700DC3707 /* KWQWMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = A85D7A8D0879EC64006A9172 /* KWQWMatrix.h */; };
                A8FEFB0A0979F472005839FD /* RenderForeignObject.h in Headers */ = {isa = PBXBuildFile; fileRef = A8FEFB080979F472005839FD /* RenderForeignObject.h */; };
                A8C32967093BB7B2000B9CAC /* SVGFEPointLightElementImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGFEPointLightElementImpl.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8C32D89093D8BFA000B9CAC /* xlinkattrs.in */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = text; path = xlinkattrs.in; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8C32D96093D8EA4000B9CAC /* XLinkNamesWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XLinkNamesWrapper.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               A8DF3FC6097FA0FB0052981B /* HTMLFormCollectionImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTMLFormCollectionImpl.h; sourceTree = "<group>"; };
+               A8DF3FC7097FA0FB0052981B /* HTMLFormCollectionImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLFormCollectionImpl.cpp; sourceTree = "<group>"; };
+               A8DF3FC8097FA0FB0052981B /* HTMLCollectionImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTMLCollectionImpl.h; sourceTree = "<group>"; };
+               A8DF3FC9097FA0FB0052981B /* HTMLCollectionImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLCollectionImpl.cpp; sourceTree = "<group>"; };
+               A8DF3FCA097FA0FB0052981B /* HTMLBaseFontElementImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTMLBaseFontElementImpl.h; sourceTree = "<group>"; };
+               A8DF3FCB097FA0FB0052981B /* HTMLBaseFontElementImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLBaseFontElementImpl.cpp; sourceTree = "<group>"; };
+               A8DF3FCC097FA0FB0052981B /* HTMLNameCollectionImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTMLNameCollectionImpl.h; sourceTree = "<group>"; };
+               A8DF3FCD097FA0FB0052981B /* HTMLNameCollectionImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLNameCollectionImpl.cpp; sourceTree = "<group>"; };
                A8FEFB080979F472005839FD /* RenderForeignObject.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderForeignObject.h; sourceTree = "<group>"; };
                A8FEFB090979F472005839FD /* RenderForeignObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderForeignObject.cpp; sourceTree = "<group>"; };
                A8FEFB2F0979F4F6005839FD /* SVGForeignObjectElementImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGForeignObjectElementImpl.cpp; sourceTree = "<group>"; };
                F523D23A02DE4396018635CA /* html_blockimpl.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = html_blockimpl.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F523D23B02DE4396018635CA /* html_documentimpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = html_documentimpl.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F523D23C02DE4396018635CA /* html_documentimpl.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = html_documentimpl.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               F523D23E02DE4396018635CA /* html_elementimpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = html_elementimpl.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               F523D23F02DE4396018635CA /* html_elementimpl.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = html_elementimpl.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               F523D23E02DE4396018635CA /* HTMLElementImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLElementImpl.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+               F523D23F02DE4396018635CA /* HTMLElementImpl.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = HTMLElementImpl.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F523D24202DE4396018635CA /* html_headimpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = html_headimpl.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F523D24302DE4396018635CA /* html_headimpl.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = html_headimpl.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F523D24402DE4396018635CA /* html_imageimpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = html_imageimpl.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F523D24702DE4396018635CA /* html_inlineimpl.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = html_inlineimpl.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F523D24802DE4396018635CA /* html_listimpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = html_listimpl.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F523D24902DE4396018635CA /* html_listimpl.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = html_listimpl.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               F523D24A02DE4396018635CA /* html_miscimpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = html_miscimpl.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               F523D24B02DE4396018635CA /* html_miscimpl.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = html_miscimpl.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F523D24C02DE4396018635CA /* html_objectimpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = html_objectimpl.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F523D24D02DE4396018635CA /* html_objectimpl.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = html_objectimpl.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F523D24E02DE4396018635CA /* html_tableimpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = html_tableimpl.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                                51F6A3D60663BF04004D2919 /* html_canvasimpl.h */,
                                F523D23B02DE4396018635CA /* html_documentimpl.cpp */,
                                F523D23C02DE4396018635CA /* html_documentimpl.h */,
-                               F523D23E02DE4396018635CA /* html_elementimpl.cpp */,
-                               F523D23F02DE4396018635CA /* html_elementimpl.h */,
+                               F523D23E02DE4396018635CA /* HTMLElementImpl.cpp */,
+                               F523D23F02DE4396018635CA /* HTMLElementImpl.h */,
                                F523D24202DE4396018635CA /* html_headimpl.cpp */,
                                F523D24302DE4396018635CA /* html_headimpl.h */,
                                F523D24402DE4396018635CA /* html_imageimpl.cpp */,
                                F523D24702DE4396018635CA /* html_inlineimpl.h */,
                                F523D24802DE4396018635CA /* html_listimpl.cpp */,
                                F523D24902DE4396018635CA /* html_listimpl.h */,
-                               F523D24A02DE4396018635CA /* html_miscimpl.cpp */,
-                               F523D24B02DE4396018635CA /* html_miscimpl.h */,
                                F523D24C02DE4396018635CA /* html_objectimpl.cpp */,
                                F523D24D02DE4396018635CA /* html_objectimpl.h */,
                                F523D24E02DE4396018635CA /* html_tableimpl.cpp */,
                                A81369C9097374F600D74463 /* HTMLKeygenElementImpl.cpp */,
                                A8136D360973A8E700D74463 /* FormDataList.h */,
                                A8136D370973A8E700D74463 /* FormDataList.cpp */,
+                               A8DF3FC6097FA0FB0052981B /* HTMLFormCollectionImpl.h */,
+                               A8DF3FC7097FA0FB0052981B /* HTMLFormCollectionImpl.cpp */,
+                               A8DF3FC8097FA0FB0052981B /* HTMLCollectionImpl.h */,
+                               A8DF3FC9097FA0FB0052981B /* HTMLCollectionImpl.cpp */,
+                               A8DF3FCA097FA0FB0052981B /* HTMLBaseFontElementImpl.h */,
+                               A8DF3FCB097FA0FB0052981B /* HTMLBaseFontElementImpl.cpp */,
+                               A8DF3FCC097FA0FB0052981B /* HTMLNameCollectionImpl.h */,
+                               A8DF3FCD097FA0FB0052981B /* HTMLNameCollectionImpl.cpp */,
                        );
                        path = html;
                        sourceTree = "<group>";
                                93F198E308245E59001E9ABC /* html_baseimpl.h in Headers */,
                                93F198E408245E59001E9ABC /* html_blockimpl.h in Headers */,
                                93F198E508245E59001E9ABC /* html_documentimpl.h in Headers */,
-                               93F198E608245E59001E9ABC /* html_elementimpl.h in Headers */,
+                               93F198E608245E59001E9ABC /* HTMLElementImpl.h in Headers */,
                                93F198E808245E59001E9ABC /* html_headimpl.h in Headers */,
                                93F198E908245E59001E9ABC /* html_imageimpl.h in Headers */,
                                93F198EA08245E59001E9ABC /* html_inlineimpl.h in Headers */,
                                93F198EB08245E59001E9ABC /* html_listimpl.h in Headers */,
-                               93F198EC08245E59001E9ABC /* html_miscimpl.h in Headers */,
                                93F198ED08245E59001E9ABC /* html_objectimpl.h in Headers */,
                                93F198EE08245E59001E9ABC /* html_tableimpl.h in Headers */,
                                93F198EF08245E59001E9ABC /* htmlparser.h in Headers */,
                                BCEA4944097F0F5C0094C9E4 /* BrowserExtension.h in Headers */,
                                BCEA4947097F0F770094C9E4 /* BrowserExtensionMac.h in Headers */,
                                AB67D1A9097F3AE300F9392E /* RenderTextField.h in Headers */,
+                               A8DF3FCE097FA0FC0052981B /* HTMLFormCollectionImpl.h in Headers */,
+                               A8DF3FD0097FA0FC0052981B /* HTMLCollectionImpl.h in Headers */,
+                               A8DF3FD2097FA0FC0052981B /* HTMLBaseFontElementImpl.h in Headers */,
+                               A8DF3FD4097FA0FC0052981B /* HTMLNameCollectionImpl.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                A88AD1310952480A001DD196 /* html_baseimpl.h in Headers */,
                                A88AD1320952480A001DD196 /* html_blockimpl.h in Headers */,
                                A88AD1330952480A001DD196 /* html_documentimpl.h in Headers */,
-                               A88AD1340952480A001DD196 /* html_elementimpl.h in Headers */,
+                               A88AD1340952480A001DD196 /* HTMLElementImpl.h in Headers */,
                                A88AD1360952480A001DD196 /* html_headimpl.h in Headers */,
                                A88AD1370952480A001DD196 /* html_imageimpl.h in Headers */,
                                A88AD1380952480A001DD196 /* html_inlineimpl.h in Headers */,
                                A88AD1390952480A001DD196 /* html_listimpl.h in Headers */,
-                               A88AD13A0952480A001DD196 /* html_miscimpl.h in Headers */,
                                A88AD13B0952480A001DD196 /* html_objectimpl.h in Headers */,
                                A88AD13C0952480A001DD196 /* html_tableimpl.h in Headers */,
                                A88AD13D0952480A001DD196 /* htmlparser.h in Headers */,
                                BCEA48CD097D93020094C9E4 /* RenderTextFragment.h in Headers */,
                                BCEA48CF097D93020094C9E4 /* table_layout.h in Headers */,
                                AB67D1AB097F3AE300F9392E /* RenderTextField.h in Headers */,
+                               A8DF3FD6097FA0FC0052981B /* HTMLFormCollectionImpl.h in Headers */,
+                               A8DF3FD8097FA0FC0052981B /* HTMLCollectionImpl.h in Headers */,
+                               A8DF3FDA097FA0FC0052981B /* HTMLBaseFontElementImpl.h in Headers */,
+                               A8DF3FDC097FA0FC0052981B /* HTMLNameCollectionImpl.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                93F19A8F08245E59001E9ABC /* html_baseimpl.cpp in Sources */,
                                93F19A9008245E59001E9ABC /* html_blockimpl.cpp in Sources */,
                                93F19A9108245E59001E9ABC /* html_documentimpl.cpp in Sources */,
-                               93F19A9208245E59001E9ABC /* html_elementimpl.cpp in Sources */,
+                               93F19A9208245E59001E9ABC /* HTMLElementImpl.cpp in Sources */,
                                93F19A9408245E59001E9ABC /* html_headimpl.cpp in Sources */,
                                93F19A9508245E59001E9ABC /* html_imageimpl.cpp in Sources */,
                                93F19A9608245E59001E9ABC /* html_inlineimpl.cpp in Sources */,
                                93F19A9708245E59001E9ABC /* html_listimpl.cpp in Sources */,
-                               93F19A9808245E59001E9ABC /* html_miscimpl.cpp in Sources */,
                                93F19A9908245E59001E9ABC /* html_objectimpl.cpp in Sources */,
                                93F19A9A08245E59001E9ABC /* html_tableimpl.cpp in Sources */,
                                93F19A9B08245E59001E9ABC /* htmlparser.cpp in Sources */,
                                937A36A7097E2E3200E4EE2F /* UserAgentStyleSheets.cpp in Sources */,
                                BCEA4948097F0F770094C9E4 /* BrowserExtensionMac.mm in Sources */,
                                AB67D1A8097F3AE300F9392E /* RenderTextField.cpp in Sources */,
+                               A8DF3FCF097FA0FC0052981B /* HTMLFormCollectionImpl.cpp in Sources */,
+                               A8DF3FD1097FA0FC0052981B /* HTMLCollectionImpl.cpp in Sources */,
+                               A8DF3FD3097FA0FC0052981B /* HTMLBaseFontElementImpl.cpp in Sources */,
+                               A8DF3FD5097FA0FC0052981B /* HTMLNameCollectionImpl.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                A88AD2D20952480A001DD196 /* html_baseimpl.cpp in Sources */,
                                A88AD2D30952480A001DD196 /* html_blockimpl.cpp in Sources */,
                                A88AD2D40952480A001DD196 /* html_documentimpl.cpp in Sources */,
-                               A88AD2D50952480A001DD196 /* html_elementimpl.cpp in Sources */,
+                               A88AD2D50952480A001DD196 /* HTMLElementImpl.cpp in Sources */,
                                A88AD2D70952480A001DD196 /* html_headimpl.cpp in Sources */,
                                A88AD2D80952480A001DD196 /* html_imageimpl.cpp in Sources */,
                                A88AD2D90952480A001DD196 /* html_inlineimpl.cpp in Sources */,
                                A88AD2DA0952480A001DD196 /* html_listimpl.cpp in Sources */,
-                               A88AD2DB0952480A001DD196 /* html_miscimpl.cpp in Sources */,
                                A88AD2DC0952480A001DD196 /* html_objectimpl.cpp in Sources */,
                                A88AD2DD0952480A001DD196 /* html_tableimpl.cpp in Sources */,
                                A88AD2DE0952480A001DD196 /* htmlparser.cpp in Sources */,
                                BCEA48CE097D93020094C9E4 /* table_layout.cpp in Sources */,
                                937A36A8097E2E3200E4EE2F /* UserAgentStyleSheets.cpp in Sources */,
                                AB67D1AA097F3AE300F9392E /* RenderTextField.cpp in Sources */,
+                               A8DF3FD7097FA0FC0052981B /* HTMLFormCollectionImpl.cpp in Sources */,
+                               A8DF3FD9097FA0FC0052981B /* HTMLCollectionImpl.cpp in Sources */,
+                               A8DF3FDB097FA0FC0052981B /* HTMLBaseFontElementImpl.cpp in Sources */,
+                               A8DF3FDD097FA0FC0052981B /* HTMLNameCollectionImpl.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index df35d83..c648bfd 100644 (file)
@@ -51,7 +51,8 @@
 #import "dom_stringimpl.h"
 #import "dom_textimpl.h"
 #import "dom_xmlimpl.h"
-#import "html_elementimpl.h"
+#import "HTMLElementImpl.h"
+#import "htmlnames.h"
 #import "render_object.h"
 #import <JavaScriptCore/WebScriptObjectPrivate.h>
 #import <kxmlcore/Assertions.h>
index 69c4999..0de31ee 100644 (file)
@@ -30,7 +30,7 @@
 #import "html_baseimpl.h"
 #import "html_blockimpl.h"
 #import "html_documentimpl.h"
-#import "html_elementimpl.h"
+#import "HTMLElementImpl.h"
 #import "HTMLOptionsCollectionImpl.h"
 #import "HTMLFormElementImpl.h"
 #import "HTMLInputElementImpl.h"
@@ -47,7 +47,8 @@
 #import "html_imageimpl.h"
 #import "html_inlineimpl.h"
 #import "html_listimpl.h"
-#import "html_miscimpl.h"
+#import "HTMLFormCollectionImpl.h"
+#import "HTMLBaseFontElementImpl.h"
 #import "html_objectimpl.h"
 #import "html_tableimpl.h"
 #import "dom_elementimpl.h"
index 7fbefde..15bab33 100644 (file)
@@ -47,7 +47,6 @@
 #import "KWQTextCodec.h"
 #import "KWQView.h"
 #import "MacFrame.h"
-#import "MacFrame.h"
 #import "NodeImpl.h"
 #import "SelectionController.h"
 #import "WebCoreFrameNamespaces.h"
@@ -74,7 +73,6 @@
 #import "render_canvas.h"
 #import "render_frames.h"
 #import "render_image.h"
-#import "render_object.h"
 #import "render_replaced.h"
 #import "render_style.h"
 #import "replace_selection_command.h"
@@ -83,6 +81,7 @@
 #import "visible_text.h"
 #import "visible_units.h"
 #import "xml_tokenizer.h"
+#import "htmlnames.h"
 #import <JavaScriptCore/interpreter.h>
 #import <JavaScriptCore/jni_jsobject.h>
 #import <JavaScriptCore/npruntime.h>
index 3999fcf..7c0fb29 100644 (file)
@@ -37,7 +37,7 @@
 #include "dom/css_value.h"
 #include "dom/dom_exception.h"
 #include "dom/dom_string.h"
-#include "html/html_elementimpl.h"
+#include "HTMLElementImpl.h"
 #include "misc/helper.h"
 #include "rendering/font.h"
 #include "rendering/render_style.h"
index 9477178..c1183d0 100644 (file)
 #include "csshelper.h"
 #include "cssproperties.h"
 #include "cssvalues.h"
-#include "dom_elementimpl.h"
 #include "font.h"
 #include "helper.h"
 #include "html_documentimpl.h"
-#include "html_elementimpl.h"
+#include "HTMLElementImpl.h"
 #include "khtml_factory.h"
 #include "khtml_settings.h"
 #include "khtmllayout.h"
@@ -49,7 +48,6 @@
 #include "render_style.h"
 #include "render_theme.h"
 #include <assert.h>
-#include <kdebug.h>
 #include <kurl.h>
 #include <kxmlcore/HashMap.h>
 #include <qdatetime.h>
@@ -57,6 +55,7 @@
 #include <qstring.h>
 #include <qvaluelist.h>
 #include <stdlib.h>
+#include "htmlnames.h"
 
 namespace WebCore {
 
@@ -1903,8 +1902,6 @@ void CSSStyleSelector::applyProperty( int id, CSSValueImpl *value )
             d = EDisplay(primitiveValue->getIdent() - CSS_VAL_INLINE);
 
         style->setDisplay(d);
-        //kdDebug( 6080 ) << "setting display to " << d << endl;
-
         break;
     }
 
@@ -2368,7 +2365,6 @@ void CSSStyleSelector::applyProperty( int id, CSSValueImpl *value )
             col = getColorFromPrimitiveValue(primitiveValue);
         }
 
-        //kdDebug( 6080 ) << "applying color " << col.isValid() << endl;
         switch(id)
         {
         case CSS_PROP_BACKGROUND_COLOR:
@@ -2402,7 +2398,6 @@ void CSSStyleSelector::applyProperty( int id, CSSValueImpl *value )
         if (!primitiveValue) return;
         style->setListStyleImage(static_cast<CSSImageValueImpl *>(primitiveValue)
                                  ->image(element->getDocument()->docLoader()));
-        //kdDebug( 6080 ) << "setting image in list to " << image->image() << endl;
         break;
     }
 
@@ -2616,12 +2611,8 @@ void CSSStyleSelector::applyProperty( int id, CSSValueImpl *value )
                 apply = true;
             }
         }
-        if (id != CSS_PROP_MAX_WIDTH && primitiveValue &&
-           primitiveValue->getIdent() == CSS_VAL_AUTO)
-        {
-            //kdDebug( 6080 ) << "found value=auto" << endl;
+        if (id != CSS_PROP_MAX_WIDTH && primitiveValue && primitiveValue->getIdent() == CSS_VAL_AUTO)
             apply = true;
-        }
     case CSS_PROP_PADDING_TOP:
     case CSS_PROP_PADDING_RIGHT:
     case CSS_PROP_PADDING_BOTTOM:
@@ -2887,9 +2878,8 @@ void CSSStyleSelector::applyProperty( int id, CSSValueImpl *value )
                 return;
         }
 
-        if (size <= 0) return;
-
-        //kdDebug( 6080 ) << "computed raw font size: " << size << endl;
+        if (size <= 0)
+            return;
 
         setFontSize(fontDef, size);
         if (style->setFontDef( fontDef ))
@@ -3012,10 +3002,6 @@ void CSSStyleSelector::applyProperty( int id, CSSValueImpl *value )
         } else if ( primitiveValue->getIdent() != CSS_VAL_AUTO ) {
             break;
         }
-//     qDebug("setting clip top to %d", top.value );
-//     qDebug("setting clip right to %d", right.value );
-//     qDebug("setting clip bottom to %d", bottom.value );
-//     qDebug("setting clip left to %d", left.value );
         style->setClip(top, right, bottom, left);
         style->setHasClip(hasClip);
     
index 3bfd497..9a0630e 100644 (file)
@@ -186,8 +186,8 @@ void KCanvasItemQuartz::drawMarkersIfNeeded(const FloatRect& rect, const KCanvas
 void KCanvasItemQuartz::paint(PaintInfo &paintInfo, int parentX, int parentY)
 {
     // No one should be transforming us via these.
-    ASSERT(parentX == 0);
-    ASSERT(parentY == 0);
+    //ASSERT(parentX == 0);
+    //ASSERT(parentY == 0);
 
     if (paintInfo.p->paintingDisabled() || (paintInfo.phase != WebCore::PaintActionForeground) || style()->visibility() == khtml::HIDDEN)
         return;
index 5d1b482..e515d58 100644 (file)
@@ -72,8 +72,8 @@ void KCanvasContainerQuartz::paint(PaintInfo &paintInfo, int parentX, int parent
         return;
     
     // No one should be transforming us via these.
-    ASSERT(m_x == 0);
-    ASSERT(m_y == 0);
+    //ASSERT(m_x == 0);
+    //ASSERT(m_y == 0);
         
     if (shouldPaintBackgroundOrBorder() && paintInfo.phase != WebCore::PaintActionOutline) 
         paintBoxDecorations(paintInfo, parentX, parentY);
index cf8a02a..2ca06da 100644 (file)
 #include "dom/dom_exception.h"
 
 #include "html_objectimpl.h"
+#include "htmlnames.h"
 
 #if __APPLE__
 #include <JavaScriptCore/runtime_object.h>
 #endif
 
-using namespace DOM;
-using namespace DOM::HTMLNames;
-using namespace DOM::EventNames;
-using namespace khtml;
+using namespace WebCore;
+using namespace HTMLNames;
+using namespace EventNames;
 
 #include "kjs_dom.lut.h"
 
index 3ced942..d0e9265 100644 (file)
@@ -52,6 +52,7 @@
 #include "HTMLFieldSetElementImpl.h"
 #include "HTMLOptionElementImpl.h"
 #include "HTMLOptionsCollectionImpl.h"
+#include "HTMLBaseFontElementImpl.h"
 
 #include "Frame.h"
 #include "FrameView.h"
index 26ec5c2..6daa50a 100644 (file)
@@ -35,7 +35,7 @@
 #include "dom2_rangeimpl.h"
 #include "dom_string.h"
 #include "dom_textimpl.h"
-#include "html_elementimpl.h"
+#include "HTMLElementImpl.h"
 #include "html_interchange.h"
 #include "htmlediting.h"
 #include "htmlnames.h"
index 63555ed..6da2bc2 100644 (file)
@@ -32,7 +32,7 @@
 #include "css/css_valueimpl.h"
 #include "editing/visible_position.h"
 #include "editing/visible_units.h"
-#include "html/html_elementimpl.h"
+#include "HTMLElementImpl.h"
 #include "xml/dom_position.h"
 #include "xml/dom_xmlimpl.h"
 #include "xml/dom2_rangeimpl.h"
index 8edc3f3..aed8abd 100644 (file)
@@ -36,7 +36,7 @@
 #include "dom2_rangeimpl.h"
 #include "dom_position.h"
 #include "dom_textimpl.h"
-#include "html_elementimpl.h"
+#include "HTMLElementImpl.h"
 #include "html_interchange.h"
 #include "htmlediting.h"
 #include "htmlnames.h"
diff --git a/WebCore/khtml/html/HTMLBaseFontElementImpl.cpp b/WebCore/khtml/html/HTMLBaseFontElementImpl.cpp
new file mode 100644 (file)
index 0000000..1f47663
--- /dev/null
@@ -0,0 +1,67 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
+ *           (C) 1999 Antti Koivisto (koivisto@kde.org)
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+#include "config.h"
+#include "HTMLBaseFontElementImpl.h"
+#include "htmlnames.h"
+
+namespace WebCore {
+
+using namespace HTMLNames;
+
+HTMLBaseFontElementImpl::HTMLBaseFontElementImpl(DocumentImpl *doc)
+    : HTMLElementImpl(basefontTag, doc)
+{
+}
+
+DOMString HTMLBaseFontElementImpl::color() const
+{
+    return getAttribute(colorAttr);
+}
+
+void HTMLBaseFontElementImpl::setColor(const DOMString &value)
+{
+    setAttribute(colorAttr, value);
+}
+
+DOMString HTMLBaseFontElementImpl::face() const
+{
+    return getAttribute(faceAttr);
+}
+
+void HTMLBaseFontElementImpl::setFace(const DOMString &value)
+{
+    setAttribute(faceAttr, value);
+}
+
+DOMString HTMLBaseFontElementImpl::size() const
+{
+    return getAttribute(sizeAttr);
+}
+
+void HTMLBaseFontElementImpl::setSize(const DOMString &value)
+{
+    setAttribute(sizeAttr, value);
+}
+
+}
diff --git a/WebCore/khtml/html/HTMLBaseFontElementImpl.h b/WebCore/khtml/html/HTMLBaseFontElementImpl.h
new file mode 100644 (file)
index 0000000..23d2f1e
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
+ *           (C) 1999 Antti Koivisto (koivisto@kde.org)
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+#ifndef HTMLBaseFontElementImpl_H
+#define HTMLBaseFontElementImpl_H
+
+#include "HTMLElementImpl.h"
+
+namespace WebCore {
+
+class HTMLBaseFontElementImpl : public HTMLElementImpl
+{
+public:
+    HTMLBaseFontElementImpl(DocumentImpl *doc);
+
+    virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
+    virtual int tagPriority() const { return 0; }
+
+    DOMString color() const;
+    void setColor(const DOMString &);
+
+    DOMString face() const;
+    void setFace(const DOMString &);
+
+    DOMString size() const;
+    void setSize(const DOMString &);
+};
+
+} //namespace
+
+#endif
index 80e05e0..99fc6ec 100644 (file)
 #include "render_button.h"
 
 #include "EventNames.h"
+#include "htmlnames.h"
 
-using namespace khtml;
-
-namespace DOM {
+namespace WebCore {
 
 using namespace EventNames;
 using namespace HTMLNames;
similarity index 51%
rename from WebCore/khtml/html/html_miscimpl.cpp
rename to WebCore/khtml/html/HTMLCollectionImpl.cpp
index 134b51e..c1ba819 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
  *           (C) 1999 Antti Koivisto (koivisto@kde.org)
- * Copyright (C) 2003 Apple Computer, Inc.
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
  * Boston, MA 02111-1307, USA.
  *
  */
-// -------------------------------------------------------------------------
 #include "config.h"
-#include "html/html_miscimpl.h"
-#include "html/html_imageimpl.h"
-#include "html/html_documentimpl.h"
-#include "html/html_objectimpl.h"
-#include "HTMLFormElementImpl.h"
-#include "HTMLGenericFormElementImpl.h"
+#include "HTMLCollectionImpl.h"
+#include "html_documentimpl.h"
+#include "HTMLElementImpl.h"
+#include <qptrvector.h>
+#include "htmlnames.h"
 
-#include "dom/dom_node.h"
-
-#include <kdebug.h>
-#include <kxmlcore/HashSet.h>
-
-namespace DOM {
+namespace WebCore {
 
 using namespace HTMLNames;
 
-HTMLBaseFontElementImpl::HTMLBaseFontElementImpl(DocumentImpl *doc)
-    : HTMLElementImpl(basefontTag, doc)
-{
-}
-
-DOMString HTMLBaseFontElementImpl::color() const
-{
-    return getAttribute(colorAttr);
-}
-
-void HTMLBaseFontElementImpl::setColor(const DOMString &value)
-{
-    setAttribute(colorAttr, value);
-}
-
-DOMString HTMLBaseFontElementImpl::face() const
-{
-    return getAttribute(faceAttr);
-}
-
-void HTMLBaseFontElementImpl::setFace(const DOMString &value)
-{
-    setAttribute(faceAttr, value);
-}
-
-DOMString HTMLBaseFontElementImpl::size() const
-{
-    return getAttribute(sizeAttr);
-}
-
-void HTMLBaseFontElementImpl::setSize(const DOMString &value)
-{
-    setAttribute(sizeAttr, value);
-}
-
-// -------------------------------------------------------------------------
-
 HTMLCollectionImpl::HTMLCollectionImpl(NodeImpl *_base, int _type)
     : m_base(_base),
       type(_type),
@@ -217,7 +173,7 @@ NodeImpl *HTMLCollectionImpl::traverseNextItem(NodeImpl *current) const
                 deep = false;
                 break;
             default:
-                kdDebug( 6030 ) << "Error in HTMLCollection, wrong tagId!" << endl;
+                break;
             }
 
             if (found)
@@ -364,61 +320,6 @@ NodeImpl *HTMLCollectionImpl::namedItem(const DOMString &name, bool caseSensitiv
     return info->current;
 }
 
-HTMLNameCollectionImpl::HTMLNameCollectionImpl(DocumentImpl* _base, int _type, DOMString &name)
-    : HTMLCollectionImpl(_base, _type),
-      m_name(name)
-{
-}
-    
-NodeImpl *HTMLNameCollectionImpl::traverseNextItem(NodeImpl *current) const
-{
-    assert(current);
-
-    current = current->traverseNextNode(m_base.get());
-
-    while (current) {
-        if (current->isElementNode()) {
-            bool found = false;
-            ElementImpl *e = static_cast<ElementImpl *>(current);
-            switch(type) {
-            case WINDOW_NAMED_ITEMS:
-                // find only images, forms, applets, embeds and objects by name, 
-                // but anything by id
-                if (e->hasTagName(imgTag) ||
-                    e->hasTagName(formTag) ||
-                    e->hasTagName(appletTag) ||
-                    e->hasTagName(embedTag) ||
-                    e->hasTagName(objectTag))
-                    found = e->getAttribute(nameAttr) == m_name;
-                found |= e->getAttribute(idAttr) == m_name;
-                break;
-            case DOCUMENT_NAMED_ITEMS:
-                // find images, forms, applets, embeds, objects and iframes by name, 
-                // but only applets and object by id (this strange rule matches IE)
-                if (e->hasTagName(imgTag) ||
-                    e->hasTagName(formTag) ||
-                    e->hasTagName(embedTag) ||
-                    e->hasTagName(iframeTag))
-                    found = e->getAttribute(nameAttr) == m_name;
-                else if (e->hasTagName(appletTag))
-                    found = e->getAttribute(nameAttr) == m_name ||
-                        e->getAttribute(idAttr) == m_name;
-                else if (e->hasTagName(objectTag))
-                    found = (e->getAttribute(nameAttr) == m_name || e->getAttribute(idAttr) == m_name) &&
-                        static_cast<HTMLObjectElementImpl *>(e)->isDocNamedItem();
-                break;
-            default:
-                assert(0);
-            }
-
-            if (found)
-                return current;
-        }
-        current = current->traverseNextNode(m_base.get());
-    }
-    return 0;
-}
-
 template<class T> static void appendToVector(QPtrVector<T> *vec, T *item)
 {
     unsigned size = vec->size();
@@ -518,253 +419,4 @@ NodeImpl *HTMLCollectionImpl::nextNamedItem(const DOMString &name) const
     return 0;
 }
 
-// -----------------------------------------------------------------------------
-
-HTMLFormCollectionImpl::HTMLFormCollectionImpl(NodeImpl* _base)
-    : HTMLCollectionImpl(_base, 0)
-{
-    HTMLFormElementImpl *formBase = static_cast<HTMLFormElementImpl*>(m_base.get());
-    if (!formBase->collectionInfo) {
-        formBase->collectionInfo = new CollectionInfo();
-    }
-    info = formBase->collectionInfo;
-}
-
-HTMLFormCollectionImpl::~HTMLFormCollectionImpl()
-{
-}
-
-unsigned HTMLFormCollectionImpl::calcLength() const
-{
-    QPtrVector<HTMLGenericFormElementImpl> &l = static_cast<HTMLFormElementImpl*>(m_base.get())->formElements;
-
-    int len = 0;
-    for ( unsigned i = 0; i < l.count(); i++ )
-        if ( l.at( i )->isEnumeratable() )
-            ++len;
-
-    return len;
-}
-
-NodeImpl *HTMLFormCollectionImpl::item(unsigned index) const
-{
-    resetCollectionInfo();
-
-    if (info->current && info->position == index) {
-        return info->current;
-    }
-    if (info->haslength && info->length <= index) {
-        return 0;
-    }
-    if (!info->current || info->position > index) {
-        info->current = 0;
-        info->position = 0;
-        info->elementsArrayPosition = 0;
-    }
-
-    QPtrVector<HTMLGenericFormElementImpl> &l = static_cast<HTMLFormElementImpl*>(m_base.get())->formElements;
-    unsigned currentIndex = info->position;
-    
-    for (unsigned i = info->elementsArrayPosition; i < l.count(); i++) {
-        if (l[i]->isEnumeratable() ) {
-            if (index == currentIndex) {
-                info->position = index;
-                info->current = l[i];
-                info->elementsArrayPosition = i;
-                return l[i];
-            }
-
-            currentIndex++;
-        }
-    }
-
-    return 0;
-}
-
-NodeImpl* HTMLFormCollectionImpl::getNamedItem(NodeImpl*, const QualifiedName& attrName, const DOMString& name, bool caseSensitive) const
-{
-    info->position = 0;
-    return getNamedFormItem(attrName, name, 0, caseSensitive);
-}
-
-NodeImpl* HTMLFormCollectionImpl::getNamedFormItem(const QualifiedName& attrName, const DOMString& name, int duplicateNumber, bool caseSensitive) const
-{
-    if (m_base->isElementNode()) {
-        HTMLElementImpl* baseElement = static_cast<HTMLElementImpl*>(m_base.get());
-        bool foundInputElements = false;
-        if (baseElement->hasLocalName(formTag)) {
-            HTMLFormElementImpl* f = static_cast<HTMLFormElementImpl*>(baseElement);
-            for (unsigned i = 0; i < f->formElements.count(); ++i) {
-                HTMLGenericFormElementImpl* e = f->formElements[i];
-                if (e->isEnumeratable()) {
-                    bool found;
-                    if (caseSensitive)
-                        found = e->getAttribute(attrName) == name;
-                    else
-                        found = e->getAttribute(attrName).domString().lower() == name.lower();
-                    if (found) {
-                        foundInputElements = true;
-                        if (!duplicateNumber)
-                            return e;
-                        --duplicateNumber;
-                    }
-                }
-            }
-        }
-
-        if (!foundInputElements) {
-            HTMLFormElementImpl* f = static_cast<HTMLFormElementImpl*>(baseElement);
-
-            for(unsigned i = 0; i < f->imgElements.count(); ++i)
-            {
-                HTMLImageElementImpl* e = f->imgElements[i];
-                bool found;
-                if (caseSensitive)
-                    found = e->getAttribute(attrName) == name;
-                else
-                    found = e->getAttribute(attrName).domString().lower() == name.lower();
-                if (found) {
-                    if (!duplicateNumber)
-                        return e;
-                    --duplicateNumber;
-                }
-            }
-        }
-    }
-    return 0;
-}
-
-NodeImpl * HTMLFormCollectionImpl::firstItem() const
-{
-    return item(0);
-}
-
-NodeImpl * HTMLFormCollectionImpl::nextItem() const
-{
-    return item(info->position + 1);
-}
-
-NodeImpl * HTMLFormCollectionImpl::nextNamedItemInternal(const DOMString &name) const
-{
-    NodeImpl *retval = getNamedFormItem( idsDone ? nameAttr : idAttr, name, ++info->position, true );
-    if (retval)
-        return retval;
-    if (idsDone) // we're done
-        return 0;
-    // After doing id, do name
-    idsDone = true;
-    return getNamedItem(m_base->firstChild(), nameAttr, name, true);
-}
-
-NodeImpl *HTMLFormCollectionImpl::namedItem( const DOMString &name, bool caseSensitive ) const
-{
-    // http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/nameditem.asp
-    // This method first searches for an object with a matching id
-    // attribute. If a match is not found, the method then searches for an
-    // object with a matching name attribute, but only on those elements
-    // that are allowed a name attribute.
-    resetCollectionInfo();
-    idsDone = false;
-    info->current = getNamedItem(m_base->firstChild(), idAttr, name, true);
-    if(info->current)
-        return info->current;
-    idsDone = true;
-    info->current = getNamedItem(m_base->firstChild(), nameAttr, name, true);
-    return info->current;
-}
-
-
-NodeImpl *HTMLFormCollectionImpl::nextNamedItem( const DOMString &name ) const
-{
-    // nextNamedItemInternal can return an item that has both id=<name> and name=<name>
-    // Here, we have to filter out such cases.
-    NodeImpl *impl = nextNamedItemInternal( name );
-    if (!idsDone) // looking for id=<name> -> no filtering
-        return impl;
-    // looking for name=<name> -> filter out if id=<name>
-    bool ok = false;
-    while (impl && !ok)
-    {
-        if(impl->isElementNode())
-        {
-            HTMLElementImpl *e = static_cast<HTMLElementImpl *>(impl);
-            ok = (e->getAttribute(idAttr) != name);
-            if (!ok)
-                impl = nextNamedItemInternal( name );
-        } else // can't happen
-            ok = true;
-    }
-    return impl;
-}
-
-void HTMLFormCollectionImpl::updateNameCache() const
-{
-    if (info->hasNameCache)
-        return;
-
-    HashSet<DOMStringImpl*, PointerHash<DOMStringImpl*> > foundInputElements;
-
-    if (!m_base->hasTagName(formTag)) {
-        info->hasNameCache = true;
-        return;
-    }
-
-    HTMLElementImpl* baseElement = static_cast<HTMLElementImpl*>(m_base.get());
-
-    HTMLFormElementImpl* f = static_cast<HTMLFormElementImpl*>(baseElement);
-    for (unsigned i = 0; i < f->formElements.count(); ++i) {
-        HTMLGenericFormElementImpl* e = f->formElements[i];
-        if (e->isEnumeratable()) {
-            const AtomicString& idAttrVal = e->getAttribute(idAttr);
-            const AtomicString& nameAttrVal = e->getAttribute(nameAttr);
-            if (!idAttrVal.isEmpty()) {
-                // add to id cache
-                QPtrVector<NodeImpl> *idVector = info->idCache.get(idAttrVal.impl());
-                if (!idVector) {
-                    idVector = new QPtrVector<NodeImpl>;
-                    info->idCache.add(idAttrVal.impl(), idVector);
-                }
-                appendToVector(idVector, static_cast<NodeImpl *>(e));
-                foundInputElements.insert(idAttrVal.impl());
-            }
-            if (!nameAttrVal.isEmpty() && idAttrVal != nameAttrVal) {
-                // add to name cache
-                QPtrVector<NodeImpl> *nameVector = info->nameCache.get(nameAttrVal.impl());
-                if (!nameVector) {
-                    nameVector = new QPtrVector<NodeImpl>;
-                    info->nameCache.add(nameAttrVal.impl(), nameVector);
-                }
-                appendToVector(nameVector, static_cast<NodeImpl *>(e));
-                foundInputElements.insert(nameAttrVal.impl());
-            }
-        }
-    }
-
-    for (unsigned i = 0; i < f->imgElements.count(); ++i) {
-        HTMLImageElementImpl* e = f->imgElements[i];
-        const AtomicString& idAttrVal = e->getAttribute(idAttr);
-        const AtomicString& nameAttrVal = e->getAttribute(nameAttr);
-        if (!idAttrVal.isEmpty() && !foundInputElements.contains(idAttrVal.impl())) {
-            // add to id cache
-            QPtrVector<NodeImpl> *idVector = info->idCache.get(idAttrVal.impl());
-            if (!idVector) {
-                idVector = new QPtrVector<NodeImpl>;
-                info->idCache.add(idAttrVal.impl(), idVector);
-            }
-            appendToVector(idVector, static_cast<NodeImpl *>(e));
-        }
-        if (!nameAttrVal.isEmpty() && idAttrVal != nameAttrVal && !foundInputElements.contains(nameAttrVal.impl())) {
-            // add to name cache
-            QPtrVector<NodeImpl> *nameVector = info->nameCache.get(nameAttrVal.impl());
-            if (!nameVector) {
-                nameVector = new QPtrVector<NodeImpl>;
-                info->nameCache.add(nameAttrVal.impl(), nameVector);
-            }
-            appendToVector(nameVector, static_cast<NodeImpl *>(e));
-        }
-    }
-
-    info->hasNameCache = true;
-}
-
 }
similarity index 64%
rename from WebCore/khtml/html/html_miscimpl.h
rename to WebCore/khtml/html/HTMLCollectionImpl.h
index 9dcfcbc..d4a9676 100644 (file)
@@ -3,6 +3,7 @@
  *
  * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
  *           (C) 1999 Antti Koivisto (koivisto@kde.org)
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
  * Boston, MA 02111-1307, USA.
  *
  */
-#ifndef HTML_MISCIMPL_H
-#define HTML_MISCIMPL_H
+#ifndef HTMLCollectionImpl_H
+#define HTMLCollectionImpl_H
 
-#include "html_elementimpl.h"
 #include "Shared.h"
-#include <qptrvector.h>
 #include <kxmlcore/HashMap.h>
 
-namespace DOM {
+template <typename T> class QPtrVector;
+template <typename T> class QValueList;
 
-class Node;
-class DOMString;
-class HTMLCollection;
-
-class HTMLBaseFontElementImpl : public HTMLElementImpl
-{
-public:
-    HTMLBaseFontElementImpl(DocumentImpl *doc);
+namespace WebCore {
 
-    virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; }
-    virtual int tagPriority() const { return 0; }
-
-    DOMString color() const;
-    void setColor(const DOMString &);
-
-    DOMString face() const;
-    void setFace(const DOMString &);
-
-    DOMString size() const;
-    void setSize(const DOMString &);
-};
-
-// -------------------------------------------------------------------------
+class NodeImpl;
+class DOMString;
+class DOMStringImpl;
+class AtomicString;
 
 class HTMLCollectionImpl : public Shared<HTMLCollectionImpl>
 {
-    friend class DOM::HTMLCollection;
 public:
     enum Type {
         // from HTMLDocument
@@ -137,44 +119,6 @@ protected:
     mutable bool m_ownsInfo;
 };
 
-class HTMLNameCollectionImpl : public HTMLCollectionImpl
-{
-public:
-    HTMLNameCollectionImpl(DocumentImpl* _base, int _type, DOMString &name);
-    
-    virtual NodeImpl *traverseNextItem(NodeImpl *start) const;
- private:
-    DOMString m_name;
-};
-
-// this whole class is just a big hack to find form elements even in
-// malformed HTML elements
-// the famous <table><tr><form><td> problem
-class HTMLFormCollectionImpl : public HTMLCollectionImpl
-{
-public:
-    // base must inherit HTMLGenericFormElementImpl or this won't work
-    HTMLFormCollectionImpl(NodeImpl* _base);
-    ~HTMLFormCollectionImpl();
-
-    virtual NodeImpl *item ( unsigned index ) const;
-    virtual NodeImpl *firstItem() const;
-    virtual NodeImpl *nextItem() const;
-
-    virtual NodeImpl *namedItem ( const DOMString &name, bool caseSensitive = true ) const;
-    virtual NodeImpl *nextNamedItem( const DOMString &name ) const;
-
-protected:
-    virtual void updateNameCache() const;
-    virtual unsigned calcLength() const;
-    virtual NodeImpl *getNamedItem(NodeImpl* current, const QualifiedName& attrName, const DOMString& name, bool caseSensitive) const;
-    virtual NodeImpl *nextNamedItemInternal( const DOMString &name ) const;
-private:
-    NodeImpl* getNamedFormItem(const QualifiedName& attrName, const DOMString& name, int duplicateNumber, bool caseSensitive) const;
-    mutable int currentPos;
-};
-
-
-}; //namespace
+} //namespace
 
 #endif
similarity index 98%
rename from WebCore/khtml/html/html_elementimpl.cpp
rename to WebCore/khtml/html/HTMLElementImpl.cpp
index 0a3f39e..846bd45 100644 (file)
  * Boston, MA 02111-1307, USA.
  *
  */
-// -------------------------------------------------------------------------
-//#define DEBUG
-//#define DEBUG_LAYOUT
-//#define PAR_DEBUG
-//#define EVENT_DEBUG
-//#define UNSUPPORTED_ATTR
 
 #include "config.h"
-#include "html/html_elementimpl.h"
+#include "HTMLElementImpl.h"
 #include "html/html_documentimpl.h"
 #include "html/htmltokenizer.h"
 #include "htmlfactory.h"
@@ -40,7 +34,6 @@
 #include "Frame.h"
 
 #include "dom/dom_exception.h"
-#include "rendering/render_object.h"
 #include "rendering/render_replaced.h"
 #include "css/css_valueimpl.h"
 #include "css/css_stylesheetimpl.h"
 #include "xml/dom2_eventsimpl.h"
 #include "xml/EventNames.h"
 #include "editing/markup.h"
+#include "htmlnames.h"
 
-#include <kdebug.h>
+namespace WebCore {
 
-using namespace DOM;
-using namespace DOM::EventNames;
+using namespace EventNames;
 using namespace HTMLNames;
-using namespace khtml;
-
-// ------------------------------------------------------------------
 
 HTMLElementImpl::HTMLElementImpl(const QualifiedName& tagName, DocumentImpl *doc)
     : StyledElementImpl(tagName, doc)
@@ -820,3 +810,5 @@ void HTMLElementImpl::setHTMLEventListener(const AtomicString& eventType, Attrib
 {
     ElementImpl::setHTMLEventListener(eventType, getDocument()->createHTMLEventListener(attr->value(), this));
 }
+
+}
similarity index 97%
rename from WebCore/khtml/html/html_elementimpl.h
rename to WebCore/khtml/html/HTMLElementImpl.h
index a93d0ca..a3d4ea4 100644 (file)
  * Boston, MA 02111-1307, USA.
  *
  */
-#ifndef HTML_ELEMENTIMPL_H
-#define HTML_ELEMENTIMPL_H
+#ifndef HTMLElementImpl_H
+#define HTMLElementImpl_H
 
 #include "xml/dom_elementimpl.h"
-#include "htmlnames.h"
 
-namespace DOM {
+namespace WebCore {
 
 class DocumentFragmentImpl;
 class DOMString;
index e27af6e..6373988 100644 (file)
 #include "HTMLFieldSetElementImpl.h"
 
 #include "rendering/render_form.h"
+#include "htmlnames.h"
 
-using namespace khtml;
-
-namespace DOM {
+namespace WebCore {
 
 using namespace HTMLNames;
 
diff --git a/WebCore/khtml/html/HTMLFormCollectionImpl.cpp b/WebCore/khtml/html/HTMLFormCollectionImpl.cpp
new file mode 100644 (file)
index 0000000..d6a08b1
--- /dev/null
@@ -0,0 +1,294 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
+ *           (C) 1999 Antti Koivisto (koivisto@kde.org)
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+#include "config.h"
+#include "HTMLFormCollectionImpl.h"
+#include "HTMLGenericFormElementImpl.h"
+#include "HTMLFormElementImpl.h"
+#include "html_imageimpl.h"
+#include "htmlnames.h"
+#include <qptrvector.h>
+
+namespace WebCore {
+
+using namespace HTMLNames;
+
+// since the collections are to be "live", we have to do the
+// calculation every time if anything has changed
+
+template<class T> static void appendToVector(QPtrVector<T> *vec, T *item)
+{
+    unsigned size = vec->size();
+    unsigned count = vec->count();
+    if (size == count)
+        vec->resize(size == 0 ? 8 : (int)(size * 1.5));
+    vec->insert(count, item);
+}
+
+HTMLFormCollectionImpl::HTMLFormCollectionImpl(NodeImpl* _base)
+    : HTMLCollectionImpl(_base, 0)
+{
+    HTMLFormElementImpl *formBase = static_cast<HTMLFormElementImpl*>(m_base.get());
+    if (!formBase->collectionInfo) {
+        formBase->collectionInfo = new CollectionInfo();
+    }
+    info = formBase->collectionInfo;
+}
+
+HTMLFormCollectionImpl::~HTMLFormCollectionImpl()
+{
+}
+
+unsigned HTMLFormCollectionImpl::calcLength() const
+{
+    QPtrVector<HTMLGenericFormElementImpl> &l = static_cast<HTMLFormElementImpl*>(m_base.get())->formElements;
+
+    int len = 0;
+    for ( unsigned i = 0; i < l.count(); i++ )
+        if ( l.at( i )->isEnumeratable() )
+            ++len;
+
+    return len;
+}
+
+NodeImpl *HTMLFormCollectionImpl::item(unsigned index) const
+{
+    resetCollectionInfo();
+
+    if (info->current && info->position == index) {
+        return info->current;
+    }
+    if (info->haslength && info->length <= index) {
+        return 0;
+    }
+    if (!info->current || info->position > index) {
+        info->current = 0;
+        info->position = 0;
+        info->elementsArrayPosition = 0;
+    }
+
+    QPtrVector<HTMLGenericFormElementImpl> &l = static_cast<HTMLFormElementImpl*>(m_base.get())->formElements;
+    unsigned currentIndex = info->position;
+    
+    for (unsigned i = info->elementsArrayPosition; i < l.count(); i++) {
+        if (l[i]->isEnumeratable() ) {
+            if (index == currentIndex) {
+                info->position = index;
+                info->current = l[i];
+                info->elementsArrayPosition = i;
+                return l[i];
+            }
+
+            currentIndex++;
+        }
+    }
+
+    return 0;
+}
+
+NodeImpl* HTMLFormCollectionImpl::getNamedItem(NodeImpl*, const QualifiedName& attrName, const DOMString& name, bool caseSensitive) const
+{
+    info->position = 0;
+    return getNamedFormItem(attrName, name, 0, caseSensitive);
+}
+
+NodeImpl* HTMLFormCollectionImpl::getNamedFormItem(const QualifiedName& attrName, const DOMString& name, int duplicateNumber, bool caseSensitive) const
+{
+    if (m_base->isElementNode()) {
+        HTMLElementImpl* baseElement = static_cast<HTMLElementImpl*>(m_base.get());
+        bool foundInputElements = false;
+        if (baseElement->hasLocalName(formTag)) {
+            HTMLFormElementImpl* f = static_cast<HTMLFormElementImpl*>(baseElement);
+            for (unsigned i = 0; i < f->formElements.count(); ++i) {
+                HTMLGenericFormElementImpl* e = f->formElements[i];
+                if (e->isEnumeratable()) {
+                    bool found;
+                    if (caseSensitive)
+                        found = e->getAttribute(attrName) == name;
+                    else
+                        found = e->getAttribute(attrName).domString().lower() == name.lower();
+                    if (found) {
+                        foundInputElements = true;
+                        if (!duplicateNumber)
+                            return e;
+                        --duplicateNumber;
+                    }
+                }
+            }
+        }
+
+        if (!foundInputElements) {
+            HTMLFormElementImpl* f = static_cast<HTMLFormElementImpl*>(baseElement);
+
+            for(unsigned i = 0; i < f->imgElements.count(); ++i)
+            {
+                HTMLImageElementImpl* e = f->imgElements[i];
+                bool found;
+                if (caseSensitive)
+                    found = e->getAttribute(attrName) == name;
+                else
+                    found = e->getAttribute(attrName).domString().lower() == name.lower();
+                if (found) {
+                    if (!duplicateNumber)
+                        return e;
+                    --duplicateNumber;
+                }
+            }
+        }
+    }
+    return 0;
+}
+
+NodeImpl * HTMLFormCollectionImpl::firstItem() const
+{
+    return item(0);
+}
+
+NodeImpl * HTMLFormCollectionImpl::nextItem() const
+{
+    return item(info->position + 1);
+}
+
+NodeImpl * HTMLFormCollectionImpl::nextNamedItemInternal(const DOMString &name) const
+{
+    NodeImpl *retval = getNamedFormItem( idsDone ? nameAttr : idAttr, name, ++info->position, true );
+    if (retval)
+        return retval;
+    if (idsDone) // we're done
+        return 0;
+    // After doing id, do name
+    idsDone = true;
+    return getNamedItem(m_base->firstChild(), nameAttr, name, true);
+}
+
+NodeImpl *HTMLFormCollectionImpl::namedItem( const DOMString &name, bool caseSensitive ) const
+{
+    // http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/nameditem.asp
+    // This method first searches for an object with a matching id
+    // attribute. If a match is not found, the method then searches for an
+    // object with a matching name attribute, but only on those elements
+    // that are allowed a name attribute.
+    resetCollectionInfo();
+    idsDone = false;
+    info->current = getNamedItem(m_base->firstChild(), idAttr, name, true);
+    if(info->current)
+        return info->current;
+    idsDone = true;
+    info->current = getNamedItem(m_base->firstChild(), nameAttr, name, true);
+    return info->current;
+}
+
+NodeImpl *HTMLFormCollectionImpl::nextNamedItem( const DOMString &name ) const
+{
+    // nextNamedItemInternal can return an item that has both id=<name> and name=<name>
+    // Here, we have to filter out such cases.
+    NodeImpl *impl = nextNamedItemInternal( name );
+    if (!idsDone) // looking for id=<name> -> no filtering
+        return impl;
+    // looking for name=<name> -> filter out if id=<name>
+    bool ok = false;
+    while (impl && !ok)
+    {
+        if(impl->isElementNode())
+        {
+            HTMLElementImpl *e = static_cast<HTMLElementImpl *>(impl);
+            ok = (e->getAttribute(idAttr) != name);
+            if (!ok)
+                impl = nextNamedItemInternal( name );
+        } else // can't happen
+            ok = true;
+    }
+    return impl;
+}
+
+void HTMLFormCollectionImpl::updateNameCache() const
+{
+    if (info->hasNameCache)
+        return;
+
+    HashSet<DOMStringImpl*, PointerHash<DOMStringImpl*> > foundInputElements;
+
+    if (!m_base->hasTagName(formTag)) {
+        info->hasNameCache = true;
+        return;
+    }
+
+    HTMLElementImpl* baseElement = static_cast<HTMLElementImpl*>(m_base.get());
+
+    HTMLFormElementImpl* f = static_cast<HTMLFormElementImpl*>(baseElement);
+    for (unsigned i = 0; i < f->formElements.count(); ++i) {
+        HTMLGenericFormElementImpl* e = f->formElements[i];
+        if (e->isEnumeratable()) {
+            const AtomicString& idAttrVal = e->getAttribute(idAttr);
+            const AtomicString& nameAttrVal = e->getAttribute(nameAttr);
+            if (!idAttrVal.isEmpty()) {
+                // add to id cache
+                QPtrVector<NodeImpl> *idVector = info->idCache.get(idAttrVal.impl());
+                if (!idVector) {
+                    idVector = new QPtrVector<NodeImpl>;
+                    info->idCache.add(idAttrVal.impl(), idVector);
+                }
+                appendToVector(idVector, static_cast<NodeImpl *>(e));
+                foundInputElements.insert(idAttrVal.impl());
+            }
+            if (!nameAttrVal.isEmpty() && idAttrVal != nameAttrVal) {
+                // add to name cache
+                QPtrVector<NodeImpl> *nameVector = info->nameCache.get(nameAttrVal.impl());
+                if (!nameVector) {
+                    nameVector = new QPtrVector<NodeImpl>;
+                    info->nameCache.add(nameAttrVal.impl(), nameVector);
+                }
+                appendToVector(nameVector, static_cast<NodeImpl *>(e));
+                foundInputElements.insert(nameAttrVal.impl());
+            }
+        }
+    }
+
+    for (unsigned i = 0; i < f->imgElements.count(); ++i) {
+        HTMLImageElementImpl* e = f->imgElements[i];
+        const AtomicString& idAttrVal = e->getAttribute(idAttr);
+        const AtomicString& nameAttrVal = e->getAttribute(nameAttr);
+        if (!idAttrVal.isEmpty() && !foundInputElements.contains(idAttrVal.impl())) {
+            // add to id cache
+            QPtrVector<NodeImpl> *idVector = info->idCache.get(idAttrVal.impl());
+            if (!idVector) {
+                idVector = new QPtrVector<NodeImpl>;
+                info->idCache.add(idAttrVal.impl(), idVector);
+            }
+            appendToVector(idVector, static_cast<NodeImpl *>(e));
+        }
+        if (!nameAttrVal.isEmpty() && idAttrVal != nameAttrVal && !foundInputElements.contains(nameAttrVal.impl())) {
+            // add to name cache
+            QPtrVector<NodeImpl> *nameVector = info->nameCache.get(nameAttrVal.impl());
+            if (!nameVector) {
+                nameVector = new QPtrVector<NodeImpl>;
+                info->nameCache.add(nameAttrVal.impl(), nameVector);
+            }
+            appendToVector(nameVector, static_cast<NodeImpl *>(e));
+        }
+    }
+
+    info->hasNameCache = true;
+}
+
+}
diff --git a/WebCore/khtml/html/HTMLFormCollectionImpl.h b/WebCore/khtml/html/HTMLFormCollectionImpl.h
new file mode 100644 (file)
index 0000000..70b5c3b
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
+ *           (C) 1999 Antti Koivisto (koivisto@kde.org)
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+#ifndef HTMLFormCollectionImpl_H
+#define HTMLFormCollectionImpl_H
+
+#include "HTMLCollectionImpl.h"
+
+namespace WebCore {
+
+class QualifiedName;
+
+// this whole class is just a big hack to find form elements even in
+// malformed HTML elements
+// the famous <table><tr><form><td> problem
+class HTMLFormCollectionImpl : public HTMLCollectionImpl
+{
+public:
+    // base must inherit HTMLGenericFormElementImpl or this won't work
+    HTMLFormCollectionImpl(NodeImpl* _base);
+    ~HTMLFormCollectionImpl();
+
+    virtual NodeImpl *item ( unsigned index ) const;
+    virtual NodeImpl *firstItem() const;
+    virtual NodeImpl *nextItem() const;
+
+    virtual NodeImpl *namedItem ( const DOMString &name, bool caseSensitive = true ) const;
+    virtual NodeImpl *nextNamedItem( const DOMString &name ) const;
+
+protected:
+    virtual void updateNameCache() const;
+    virtual unsigned calcLength() const;
+    virtual NodeImpl *getNamedItem(NodeImpl* current, const QualifiedName& attrName, const DOMString& name, bool caseSensitive) const;
+    virtual NodeImpl *nextNamedItemInternal( const DOMString &name ) const;
+private:
+    NodeImpl* getNamedFormItem(const QualifiedName& attrName, const DOMString& name, int duplicateNumber, bool caseSensitive) const;
+    mutable int currentPos;
+};
+
+} //namespace
+
+#endif
index 9f70b64..8f5ee2a 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "config.h"
 #include "HTMLFormElementImpl.h"
+#include "HTMLFormCollectionImpl.h"
 #include "html_imageimpl.h"
 #include "html_documentimpl.h"
 #include "csshelper.h" // For kthml::parseURL
 #include "Frame.h"
 
 #include <qtextcodec.h>
+#include "htmlnames.h"
 
-using namespace khtml;
-
-namespace DOM {
+namespace WebCore {
 
 using namespace EventNames;
 using namespace HTMLNames;
index 9819e44..a2025ea 100644 (file)
@@ -25,8 +25,8 @@
 #ifndef HTML_HTMLFormElementImpl_H
 #define HTML_HTMLFormElementImpl_H
 
-#include "html/html_elementimpl.h"
-#include "html/html_miscimpl.h" // for CollectionInfo
+#include "HTMLElementImpl.h"
+#include "HTMLCollectionImpl.h" 
 
 #include <qptrvector.h>
 
@@ -38,6 +38,7 @@ namespace DOM {
 
 class HTMLGenericFormElementImpl;
 class HTMLImageElementImpl;
+class HTMLFormCollectionImpl;
 
 class HTMLFormElementImpl : public HTMLElementImpl
 {
index 81674a2..67bd650 100644 (file)
@@ -33,6 +33,7 @@
 #include "HTMLFormElementImpl.h"
 #include "render_replaced.h"
 #include "render_theme.h"
+#include "htmlnames.h"
 
 namespace WebCore {
 
index 50008db..929a12d 100644 (file)
@@ -25,7 +25,7 @@
 #ifndef HTML_HTMLGenericFormElementImpl_h
 #define HTML_HTMLGenericFormElementImpl_h
 
-#include "html/html_elementimpl.h"
+#include "HTMLElementImpl.h"
 
 namespace khtml {
     class RenderFormElement;
index 6997cc9..0709f48 100644 (file)
 #include <klocale.h>
 
 #include "EventNames.h"
+#include "htmlnames.h"
 
-using namespace khtml;
-using khtml::ControlState;
+using WebCore::ControlState;
 
-namespace DOM {
+namespace WebCore {
 
 using namespace EventNames;
 using namespace HTMLNames;
index a6cfe00..be57d40 100644 (file)
 
 #include "config.h"
 #include "HTMLIsIndexElementImpl.h"
+#include "htmlnames.h"
 
-using namespace khtml;
-
-namespace DOM {
+namespace WebCore {
 
 using namespace HTMLNames;
 
index fd1da03..b83708b 100644 (file)
@@ -25,7 +25,7 @@
 #ifndef HTML_HTMLLabelElementImpl_h
 #define HTML_HTMLLabelElementImpl_h
 
-#include "html/html_elementimpl.h"
+#include "HTMLElementImpl.h"
 
 namespace DOM {
 
index c76b55c..8f28b23 100644 (file)
 #include "HTMLLegendElementImpl.h"
 
 #include "rendering/render_form.h"
+#include "htmlnames.h"
 
-using namespace khtml;
-
-namespace DOM {
+namespace WebCore {
 
 using namespace HTMLNames;
 
diff --git a/WebCore/khtml/html/HTMLNameCollectionImpl.cpp b/WebCore/khtml/html/HTMLNameCollectionImpl.cpp
new file mode 100644 (file)
index 0000000..8e77c95
--- /dev/null
@@ -0,0 +1,89 @@
+/**
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
+ *           (C) 1999 Antti Koivisto (koivisto@kde.org)
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+#include "config.h"
+#include "HTMLNameCollectionImpl.h"
+#include "htmlnames.h"
+#include "html_objectimpl.h"
+#include "DocumentImpl.h"
+
+namespace WebCore {
+
+using namespace HTMLNames;
+
+HTMLNameCollectionImpl::HTMLNameCollectionImpl(DocumentImpl* _base, int _type, DOMString &name)
+    : HTMLCollectionImpl(_base, _type),
+      m_name(name)
+{
+}
+
+NodeImpl *HTMLNameCollectionImpl::traverseNextItem(NodeImpl *current) const
+{
+    assert(current);
+
+    current = current->traverseNextNode(m_base.get());
+
+    while (current) {
+        if (current->isElementNode()) {
+            bool found = false;
+            ElementImpl *e = static_cast<ElementImpl *>(current);
+            switch(type) {
+            case WINDOW_NAMED_ITEMS:
+                // find only images, forms, applets, embeds and objects by name, 
+                // but anything by id
+                if (e->hasTagName(imgTag) ||
+                    e->hasTagName(formTag) ||
+                    e->hasTagName(appletTag) ||
+                    e->hasTagName(embedTag) ||
+                    e->hasTagName(objectTag))
+                    found = e->getAttribute(nameAttr) == m_name;
+                found |= e->getAttribute(idAttr) == m_name;
+                break;
+            case DOCUMENT_NAMED_ITEMS:
+                // find images, forms, applets, embeds, objects and iframes by name, 
+                // but only applets and object by id (this strange rule matches IE)
+                if (e->hasTagName(imgTag) ||
+                    e->hasTagName(formTag) ||
+                    e->hasTagName(embedTag) ||
+                    e->hasTagName(iframeTag))
+                    found = e->getAttribute(nameAttr) == m_name;
+                else if (e->hasTagName(appletTag))
+                    found = e->getAttribute(nameAttr) == m_name ||
+                        e->getAttribute(idAttr) == m_name;
+                else if (e->hasTagName(objectTag))
+                    found = (e->getAttribute(nameAttr) == m_name || e->getAttribute(idAttr) == m_name) &&
+                        static_cast<HTMLObjectElementImpl *>(e)->isDocNamedItem();
+                break;
+            default:
+                assert(0);
+            }
+
+            if (found)
+                return current;
+        }
+        current = current->traverseNextNode(m_base.get());
+    }
+    return 0;
+}
+
+}
diff --git a/WebCore/khtml/html/HTMLNameCollectionImpl.h b/WebCore/khtml/html/HTMLNameCollectionImpl.h
new file mode 100644 (file)
index 0000000..254052a
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * This file is part of the DOM implementation for KDE.
+ *
+ * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
+ *           (C) 1999 Antti Koivisto (koivisto@kde.org)
+ * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+#ifndef HTMLNameCollectionImpl_H
+#define HTMLNameCollectionImpl_H
+
+#include "HTMLCollectionImpl.h"
+#include "dom_string.h"
+
+namespace WebCore {
+
+class DocumentImpl;
+
+class HTMLNameCollectionImpl : public HTMLCollectionImpl
+{
+public:
+    HTMLNameCollectionImpl(DocumentImpl* _base, int _type, DOMString &name);
+    
+    virtual NodeImpl *traverseNextItem(NodeImpl *start) const;
+ private:
+    DOMString m_name;
+};
+
+}; //namespace
+
+#endif
index 077820f..08a7958 100644 (file)
 #include "HTMLSelectElementImpl.h"
 
 #include "rendering/render_form.h"
+#include "htmlnames.h"
 
-using namespace khtml;
-
-namespace DOM {
+namespace WebCore {
 
 using namespace HTMLNames;
 
index 217ddfc..f3c1513 100644 (file)
@@ -26,6 +26,7 @@
 #define HTML_HTMLOptGroupElementImpl_H
 
 #include "HTMLGenericFormElementImpl.h"
+#include "htmlnames.h"
 
 namespace DOM {
 
index ab44d9f..96a944a 100644 (file)
@@ -26,6 +26,7 @@
 #define HTML_HTMLOptionElementImpl_H
 
 #include "HTMLGenericFormElementImpl.h"
+#include "htmlnames.h"
 
 namespace khtml {
     class RenderSelect;
index e777f90..d659efe 100644 (file)
@@ -29,7 +29,7 @@
 #include "HTMLOptionsCollectionImpl.h"
 #include "HTMLOptionElementImpl.h"
 #include "HTMLFormElementImpl.h"
-#include "html_miscimpl.h" // for HTMLCollectionImpl
+#include "HTMLCollectionImpl.h"
 #include "dom2_eventsimpl.h"
 #include "FormDataList.h"
 #include "DocumentImpl.h"
index a7230a3..c4a0168 100644 (file)
 #include "DocumentImpl.h"
 
 #include "EventNames.h"
+#include "htmlnames.h"
 
-using namespace khtml;
-
-namespace DOM {
+namespace WebCore {
 
 using namespace EventNames;
 using namespace HTMLNames;
index 484600b..015a08f 100644 (file)
 #include "cssvalues.h"
 #include "css/csshelper.h"
 #include "loader.h"
-#include "dom/dom_string.h"
-#include "xml/dom2_eventsimpl.h"
-#include "xml/EventNames.h"
+#include "dom_string.h"
+#include "dom2_eventsimpl.h"
+#include "EventNames.h"
+#include "htmlnames.h"
 
 #include <kurl.h>
 #include <kdebug.h>
 
-using namespace DOM;
-using namespace DOM::EventNames;
-using namespace khtml;
+namespace WebCore {
+using namespace EventNames;
 using namespace HTMLNames;
 
 HTMLBodyElementImpl::HTMLBodyElementImpl(DocumentImpl *doc)
@@ -1004,3 +1004,5 @@ void HTMLIFrameElementImpl::setWidth(const DOMString &value)
 {
     setAttribute(widthAttr, value);
 }
+
+}
index 281dba8..68825b1 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef HTML_BASEIMPL_H
 #define HTML_BASEIMPL_H
 
-#include "html/html_elementimpl.h"
+#include "HTMLElementImpl.h"
 #include "khtmllayout.h"
 
 #include <qscrollview.h>
index 27c88ba..5f650b3 100644 (file)
@@ -21,8 +21,7 @@
  * Boston, MA 02111-1307, USA.
  *
  */
-// -------------------------------------------------------------------------
-//#define DEBUG
+
 #include "config.h"
 #include "html_blockimpl.h"
 #include "html_documentimpl.h"
 
 #include "cssproperties.h"
 #include "cssvalues.h"
+#include "htmlnames.h"
 
-#include <kdebug.h>
+namespace WebCore {
 
-using namespace khtml;
-using namespace DOM;
 using namespace HTMLNames;
 
 HTMLBlockquoteElementImpl::HTMLBlockquoteElementImpl(DocumentImpl *doc)
@@ -410,3 +408,5 @@ void HTMLMarqueeElementImpl::parseMappedAttribute(MappedAttributeImpl *attr)
     } else
         HTMLElementImpl::parseMappedAttribute(attr);
 }
+
+}
index 72c3f0c..d20813c 100644 (file)
@@ -25,7 +25,7 @@
 #ifndef HTML_BLOCKIMPL_H
 #define HTML_BLOCKIMPL_H
 
-#include "html_elementimpl.h"
+#include "HTMLElementImpl.h"
 
 namespace DOM {
 
index 08ed153..6b2575d 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "config.h"
 #include "html/html_canvasimpl.h"
+#include "htmlnames.h"
 
 #include "render_canvasimage.h"
 
index 5f91126..4c6d7f2 100644 (file)
@@ -58,9 +58,9 @@
 #include "html/html_headimpl.h"
 #include "html/html_baseimpl.h"
 #include "html/htmltokenizer.h"
-#include "html/html_miscimpl.h"
 #include "html/html_imageimpl.h"
 #include "htmlfactory.h"
+#include "htmlnames.h"
 
 #include "Frame.h"
 #include "khtml_settings.h"
@@ -91,9 +91,7 @@
 
 template class QPtrStack<DOM::NodeImpl>;
 
-using namespace khtml;
-
-namespace DOM {
+namespace WebCore {
 
 using namespace HTMLNames;
 
index d6fec6f..4be57d8 100644 (file)
 
 #include "DocumentImpl.h"
 #include "CachedObjectClient.h"
-#include "html/html_miscimpl.h"
+#include "HTMLCollectionImpl.h"
 #include <kxmlcore/HashMap.h>
 
 class FrameView;
 class QString;
 
-namespace DOM {
+namespace WebCore {
 
 class HTMLElementImpl;
 
index 65803f5..211bfb1 100644 (file)
 #include "css/cssstyleselector.h"
 #include "css/css_stylesheetimpl.h"
 #include "css/csshelper.h"
+#include "htmlnames.h"
 
 #include <kurl.h>
-#include <kdebug.h>
 
-using namespace DOM;
+namespace WebCore {
+
 using namespace HTMLNames;
 using namespace EventNames;
-using namespace khtml;
 
 HTMLBaseElementImpl::HTMLBaseElementImpl(DocumentImpl *doc)
     : HTMLElementImpl(baseTag, doc)
@@ -274,13 +274,9 @@ void HTMLLinkElementImpl::removedFromDocument()
 
 void HTMLLinkElementImpl::setStyleSheet(const DOM::DOMString &url, const DOM::DOMString &sheetStr)
 {
-//    kdDebug( 6030 ) << "HTMLLinkElement::setStyleSheet()" << endl;
-//    kdDebug( 6030 ) << "**** current medium: " << m_media << endl;
-
     if (m_sheet)
         m_sheet->deref();
     m_sheet = new CSSStyleSheetImpl(this, url);
-    kdDebug( 6030 ) << "style sheet parse mode strict = " << ( !getDocument()->inCompatMode() ) << endl;
     m_sheet->ref();
     m_sheet->parseString( sheetStr, !getDocument()->inCompatMode() );
 
@@ -296,10 +292,8 @@ void HTMLLinkElementImpl::setStyleSheet(const DOM::DOMString &url, const DOM::DO
 
 bool HTMLLinkElementImpl::isLoading() const
 {
-//    kdDebug( 6030 ) << "link: checking if loading!" << endl;
     if(m_loading) return true;
     if(!m_sheet) return false;
-    //if(!m_sheet->isCSSStyleSheet()) return false;
     return static_cast<CSSStyleSheetImpl *>(m_sheet)->isLoading();
 }
 
@@ -887,3 +881,5 @@ void HTMLTitleElementImpl::setText(const DOMString &value)
         appendChild(getDocument()->createTextNode(value.impl()), exceptioncode);
     }
 }
+
+}
index 2c5398d..1d69baa 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef HTML_HEADIMPL_H
 #define HTML_HEADIMPL_H
 
-#include "html/html_elementimpl.h"
+#include "HTMLElementImpl.h"
 #include "CachedObjectClient.h"
 #include "css/css_stylesheetimpl.h"
 
index 379251b..d6a843f 100644 (file)
@@ -33,8 +33,7 @@
 #include "cssvalues.h"
 #include "html_documentimpl.h"
 #include "render_image.h"
-
-// #define INSTRUMENT_LAYOUT_SCHEDULING 1
+#include "htmlnames.h"
 
 namespace WebCore {
 
index a1fe5a8..ae5645f 100644 (file)
 #include "rendering/render_image.h"
 #include "xml/EventNames.h"
 #include "xml/dom2_eventsimpl.h"
-#include <kdebug.h>
+#include "htmlnames.h"
 
-using namespace khtml;
-
-namespace DOM {
+namespace WebCore {
 
 using namespace EventNames;
 using namespace HTMLNames;
index 689dcac..bee7b77 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef HTML_INLINEIMPL_H
 #define HTML_INLINEIMPL_H
 
-#include "html_elementimpl.h"
+#include "HTMLElementImpl.h"
 
 namespace DOM {
 
index ebb7a57..6adaa08 100644 (file)
  * we ignore the deprecated compact attribute. Netscape does so too...
  */
 
-#include "html_elementimpl.h"
+#include "HTMLElementImpl.h"
+#include "htmlnames.h"
 
-namespace DOM
+namespace WebCore
 {
 
 class HTMLUListElementImpl : public HTMLElementImpl
index 9a78681..fdffa1d 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "config.h"
-#include "html/html_objectimpl.h"
+#include "html_objectimpl.h"
 
 #include "EventNames.h"
 #include "Frame.h"
@@ -41,6 +41,7 @@
 #include "render_image.h"
 #include <java/kjavaappletwidget.h>
 #include <qstring.h>
+#include "htmlnames.h"
 
 namespace WebCore {
 
index e5b8f6c..0ba72ff 100644 (file)
  * Boston, MA 02111-1307, USA.
  *
  */
-#ifndef HTML_TABLEIMPL_H
-#define HTML_TABLEIMPL_H
+#ifndef HTMLTableElementImpl_H
+#define HTMLTableElementImpl_H
 
-#include "html/html_elementimpl.h"
+#include "HTMLElementImpl.h"
+#include "htmlnames.h"
 
-namespace DOM {
+namespace WebCore {
 
 class HTMLCollectionImpl;
 class HTMLTableSectionElementImpl;
index 741109c..20a5d44 100644 (file)
 #include "config.h"
 #include "htmlfactory.h"
 
-#include "html/html_baseimpl.h"
-#include "html/html_blockimpl.h"
-#include "html/html_canvasimpl.h"
-#include "html/html_documentimpl.h"
-#include "html/html_headimpl.h"
-#include "html/html_imageimpl.h"
-#include "html/html_listimpl.h"
-#include "html/html_miscimpl.h"
-#include "html/html_tableimpl.h"
-#include "html/html_objectimpl.h"
-
+#include "html_baseimpl.h"
+#include "html_blockimpl.h"
+#include "html_canvasimpl.h"
+#include "html_documentimpl.h"
+#include "html_headimpl.h"
+#include "html_imageimpl.h"
+#include "html_listimpl.h"
+#include "html_tableimpl.h"
+#include "html_objectimpl.h"
+
+#include "HTMLCollectionImpl.h"
 #include "HTMLFormElementImpl.h"
 #include "HTMLInputElementImpl.h"
 #include "HTMLIsIndexElementImpl.h"
@@ -45,6 +45,7 @@
 #include "HTMLOptGroupElementImpl.h"
 #include "HTMLSelectElementImpl.h"
 #include "HTMLTextAreaElementImpl.h"
+#include "HTMLBaseFontElementImpl.h"
 
 #include <kxmlcore/HashMap.h>
 
index 951771d..85925b8 100644 (file)
 #include "html/html_blockimpl.h"
 #include "html/html_canvasimpl.h"
 #include "html/html_documentimpl.h"
-#include "html/html_elementimpl.h"
 #include "html/html_headimpl.h"
 #include "html/html_imageimpl.h"
 #include "html/html_inlineimpl.h"
 #include "html/html_listimpl.h"
-#include "html/html_miscimpl.h"
 #include "html/html_tableimpl.h"
 #include "html/html_objectimpl.h"
 #include "HTMLFormElementImpl.h"
index 0dd5e0e..8f636e7 100644 (file)
     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.
 */
-//----------------------------------------------------------------------------
-//
-// KDE HTML Widget - Tokenizers
-
-//#define TOKEN_DEBUG 1
-//#define TOKEN_DEBUG 2
 
 #include "config.h"
-#include "html/htmltokenizer.h"
+#include "htmltokenizer.h"
 
 #include "CachedScript.h"
 #include "DocLoader.h"
 #include "DocumentFragmentImpl.h"
-#include "DocumentImpl.h"
 #include "EventNames.h"
 #include "Frame.h"
 #include "FrameView.h"
 #include "csshelper.h"
 #include "html_documentimpl.h"
+#include "HTMLElementImpl.h"
 #include "htmlparser.h"
 #include "kjs_proxy.h"
 #include <assert.h>
 #include <ctype.h>
-#include <kdebug.h>
 #include <qvariant.h>
 #include <stdlib.h>
+#include "htmlnames.h"
 
 // turn off inlining to allow proper linking on newer gcc (xmltokenizer.cpp also uses findEntity())
 #undef __inline
@@ -402,9 +396,6 @@ HTMLTokenizer::State HTMLTokenizer::scriptHandler(State state)
     currentPrependingSrc = &prependingSrc;
     if (!parser->skipMode() && !followingFrameset) {
         if (cs) {
-             //kdDebug( 6036 ) << "cachedscript extern!" << endl;
-             //kdDebug( 6036 ) << "src: *" << QString( src.current(), src.length() ).latin1() << "*" << endl;
-             //kdDebug( 6036 ) << "pending: *" << pendingSrc.latin1() << "*" << endl;
            if (savedPrependingSrc) {
                savedPrependingSrc->append(src);
            } else {
@@ -432,7 +423,6 @@ HTMLTokenizer::State HTMLTokenizer::scriptHandler(State state)
             //QTime dt;
             //dt.start();
             state = scriptExecution(exScript, state, QString::null, scriptStartLineno);
-           //kdDebug( 6036 ) << "script execution time:" << dt.elapsed() << endl;
         }
     }
 
@@ -440,7 +430,6 @@ HTMLTokenizer::State HTMLTokenizer::scriptHandler(State state)
     scriptCodeSize = scriptCodeResync = 0;
 
     if (!m_executingScript && !state.loadingExtScript()) {
-       // kdDebug( 6036 ) << "adding pending Output to parsed string" << endl;
        src.append(pendingSrc);
        pendingSrc.clear();
     } else if (!prependingSrc.isEmpty()) {
@@ -507,7 +496,6 @@ HTMLTokenizer::State HTMLTokenizer::scriptExecution(const QString& str, State st
     state.setInScript(oldscript);
 
     if (!m_executingScript && !state.loadingExtScript()) {
-       // kdDebug( 6036 ) << "adding pending Output to parsed string" << endl;
        src.append(pendingSrc);
        pendingSrc.clear();
     } else if (!prependingSrc.isEmpty()) {
index ea98fa5..a759ebd 100644 (file)
@@ -63,6 +63,7 @@
 #include <qpaintdevicemetrics.h>
 #include <qptrstack.h>
 #include <qregexp.h>
+#include "HTMLNameCollectionImpl.h"
 
 // FIXME: We want to cut the remaining HTML dependencies so that we don't need to include these files.
 #include "HTMLInputElementImpl.h"
@@ -71,6 +72,7 @@
 #include "html/html_headimpl.h"
 #include "html/html_imageimpl.h"
 #include "htmlfactory.h"
+#include "htmlnames.h"
 
 #ifdef KHTML_XSLT
 #include "xsl_stylesheetimpl.h"
index b782eb3..c9ca05a 100644 (file)
@@ -30,7 +30,7 @@
 #include "dom/dom_exception.h"
 #include "dom_textimpl.h"
 #include "dom_xmlimpl.h"
-#include "html/html_elementimpl.h"
+#include "HTMLElementImpl.h"
 #include "editing/markup.h"
 #include "editing/visible_position.h"
 #include "editing/visible_units.h"
index 6e59366..2ad4e32 100644 (file)
@@ -39,6 +39,7 @@
 #include "htmlparser.h"
 #include "render_canvas.h"
 #include <qtextstream.h>
+#include "htmlnames.h"
 
 namespace WebCore {
 
index 5a080f7..abceaeb 100644 (file)
@@ -40,9 +40,8 @@
 #import "WebCoreViewFactory.h"
 
 #import "DocumentImpl.h"
-#import "dom_elementimpl.h"
-#import "html_elementimpl.h"
 #import "HTMLInputElementImpl.h"
+#import "HTMLCollectionImpl.h"
 #import "html_inlineimpl.h"
 #import "html_imageimpl.h"
 #import "dom_string.h"
 #import "visible_position.h"
 #import "visible_text.h"
 #import "visible_units.h"
-#import "html_miscimpl.h"
 #import "qptrstack.h"
 #import "DOMInternal.h"
 #import "EventNames.h"
+#import "htmlnames.h"
 
-using namespace DOM::EventNames;
-using namespace DOM::HTMLNames;
-
-using DOM::DocumentImpl;
-using DOM::DOMString;
-using DOM::ElementImpl;
-using DOM::HTMLAnchorElementImpl;
-using DOM::HTMLAreaElementImpl;
-using DOM::HTMLCollection;
-using DOM::HTMLCollectionImpl;
-using DOM::HTMLElementImpl;
-using DOM::HTMLInputElementImpl;
-using DOM::HTMLMapElementImpl;
-using DOM::Node;
-using DOM::NodeImpl;
-using DOM::Position;
-
-using khtml::theme;
-using khtml::EAffinity;
-using khtml::EVerticalAlign;
-using khtml::plainText;
-using khtml::RenderBlock;
-using khtml::RenderCanvas;
-using khtml::RenderImage;
-using khtml::RenderListMarker;
-using khtml::RenderObject;
-using khtml::RenderStyle;
-using khtml::RenderText;
-using khtml::RenderWidget;
-using khtml::SelectionController;
-using khtml::TextIterator;
-using khtml::VisiblePosition;
+using namespace WebCore;
+using namespace EventNames;
+using namespace HTMLNames;
 
 // FIXME: This will eventually need to really localize.
 #define UI_STRING(string, comment) ((NSString *)[NSString stringWithUTF8String:(string)])
index 1007242..d157f0b 100644 (file)
 #import "KWQFoundationExtras.h"
 #import "MacFrame.h"
 
-using namespace DOM;
-
-using namespace khtml;
-
+using namespace WebCore;
 using namespace KJS;
 
 @implementation KWQPageState
 
-- initWithDocument:(DocumentImpl *)doc URL:(const KURL &)u windowProperties:(SavedProperties *)wp locationProperties:(SavedProperties *)lp interpreterBuiltins:(SavedBuiltins *)ib pausedTimeouts:(PausedTimeouts *)pt
+- (id)initWithDocument:(DocumentImpl *)doc URL:(const KURL &)u windowProperties:(SavedProperties *)wp locationProperties:(SavedProperties *)lp interpreterBuiltins:(SavedBuiltins *)ib pausedTimeouts:(PausedTimeouts *)pt
 {
     [super init];
 
index eca3d0c..4a94986 100644 (file)
@@ -40,6 +40,7 @@
 #include <kio/job.h>
 #include <kio/jobclasses.h>
 #include <kxmlcore/Assertions.h>
+#include <qptrvector.h>
 
 namespace WebCore {
 
index 20d511a..74767d9 100644 (file)
@@ -51,8 +51,9 @@
 #include "dom_string.h"
 #include "html_baseimpl.h"
 #include "html_documentimpl.h"
+#include "htmlnames.h"
 #include "html_imageimpl.h"
-#include "html_miscimpl.h"
+#include "HTMLCollectionImpl.h"
 #include "html_objectimpl.h"
 #include "htmlediting.h"
 #include "khtml_events.h"
@@ -72,7 +73,6 @@
 #include "xmlhttprequest.h"
 #include <assert.h>
 #include <kcursor.h>
-#include <kdebug.h>
 #include <kio/global.h>
 #include <kio/job.h>
 #include <klocale.h>
@@ -212,7 +212,6 @@ bool Frame::restoreURL( const KURL &url )
    * method gets called from restoreState() in case of a full frameset
    * restoral, and restoreState() calls closeURL() before restoring
    * anyway.
-  kdDebug( 6050 ) << "closing old URL" << endl;
   closeURL();
   */
 
@@ -356,9 +355,7 @@ void Frame::stopLoading(bool sendUnload)
   d->m_bLoadEventEmitted = true; // don't want that one either
   d->m_cachePolicy = KIO::CC_Verify; // Why here?
 
-  if ( d->m_doc && d->m_doc->parsing() )
-  {
-    kdDebug( 6050 ) << " was still parsing... calling end " << endl;
+  if (d->m_doc && d->m_doc->parsing()) {
     slotFinishedParsing();
     d->m_doc->setParsing(false);
   }
@@ -665,9 +662,7 @@ void Frame::receivedFirstData()
 
     // Support for http-refresh
     qData = d->m_job->queryMetaData("http-refresh");
-    if( !qData.isEmpty() && d->m_metaRefreshEnabled )
-    {
-      kdDebug(6050) << "HTTP Refresh Request: " << qData << endl;
+    if(!qData.isEmpty() && d->m_metaRefreshEnabled) {
       double delay;
       int pos = qData.find( ';' );
       if ( pos == -1 )
@@ -1260,10 +1255,8 @@ bool Frame::gotoAnchor( const QString &name )
   d->m_doc->setCSSTarget(n); // Setting to null will clear the current target.
   
   // Implement the rule that "" and "top" both mean top of page as in other browsers.
-  if (!n && !(name.isEmpty() || name.lower() == "top")) {
-    kdDebug(6050) << "Frame::gotoAnchor node '" << name << "' not found" << endl;
-    return false;
-  }
+  if (!n && !(name.isEmpty() || name.lower() == "top"))
+      return false;
 
   // We need to update the layout before scrolling, otherwise we could
   // really mess things up if an anchor scroll comes at a bad moment.
@@ -1617,11 +1610,9 @@ bool Frame::requestObject( RenderPart *frame, const QString &url, const QString
 
 bool Frame::requestObject( ChildFrame *child, const KURL &url, const URLArgs &_args )
 {
-  if ( child->m_bPreloaded )
-  {
-    // kdDebug(6005) << "Frame::requestObject preload" << endl;
-    if ( child->m_renderer && child->m_frame && child->m_renderer->widget() )
-      child->m_renderer->setWidget( child->m_renderer->widget() );
+  if (child->m_bPreloaded) {
+    if (child->m_renderer && child->m_frame && child->m_renderer->widget())
+      child->m_renderer->setWidget( child->m_renderer->widget());
 
     child->m_bPreloaded = false;
     return true;
@@ -1649,8 +1640,6 @@ bool Frame::requestObject( ChildFrame *child, const KURL &url, const URLArgs &_a
 
 bool Frame::processObjectRequest( ChildFrame *child, const KURL &_url, const QString &mimetype )
 {
-  //kdDebug( 6050 ) << "Frame::processObjectRequest trying to create part for " << mimetype << endl;
-
   // IMPORTANT: create a copy of the url here, because it is just a reference, which was likely to be given
   // by an emitting frame part (emit openURLRequest( blahurl, ... ) . A few lines below we delete the part
   // though -> the reference becomes invalid -> crash is likely
@@ -1769,7 +1758,6 @@ void Frame::submitFormAgain()
 
 void Frame::submitForm( const char *action, const QString &url, const FormData &formData, const QString &_target, const QString& contentType, const QString& boundary )
 {
-  kdDebug(6000) << this << ": Frame::submitForm target=" << _target << " url=" << url << endl;
   KURL u = completeURL( url );
 
   if (!u.isValid())
@@ -1848,10 +1836,8 @@ void Frame::submitForm( const char *action, const QString &url, const FormData &
   }
 
   if ( d->m_doc->parsing() || d->m_runningScripts > 0 ) {
-    if( d->m_submitForm ) {
-      kdDebug(6000) << "Frame::submitForm ABORTING!" << endl;
-      return;
-    }
+    if(d->m_submitForm)
+        return;
     d->m_submitForm = new FramePrivate::SubmitForm;
     d->m_submitForm->submitAction = action;
     d->m_submitForm->submitUrl = url;
@@ -1868,11 +1854,8 @@ void Frame::submitForm( const char *action, const QString &url, const FormData &
 
 void Frame::slotParentCompleted()
 {
-  if ( d->m_scheduledRedirection != noRedirectionScheduled && !d->m_redirectionTimer.isActive() )
-  {
-    // kdDebug(6050) << this << ": Child redirection -> " << d->m_redirectURL << endl;
-    d->m_redirectionTimer.start( (int)(1000 * d->m_delayRedirect), true );
-  }
+if (d->m_scheduledRedirection != noRedirectionScheduled && !d->m_redirectionTimer.isActive())
+    d->m_redirectionTimer.start( (int)(1000 * d->m_delayRedirect), true);
 }
 
 void Frame::slotChildStarted( KIO::Job *job )
@@ -1933,25 +1916,16 @@ ChildFrame *Frame::childFrame( const QObject *obj )
 
 Frame *Frame::findFrame( const QString &f )
 {
-
   // ### http://www.w3.org/TR/html4/appendix/notes.html#notes-frames
   ConstFrameIt it = d->m_frames.find( f );
-  if ( it == d->m_frames.end() )
-  {
-    //kdDebug() << "Frame::findFrame frame " << f << " not found" << endl;
+  if (it == d->m_frames.end())
     return 0L;
-  }
   else {
     ObjectContents *p = (*it).m_frame;
-    if ( p && p->inherits( "Frame" ))
-    {
-      //kdDebug() << "Frame::findFrame frame " << f << " is a Frame, ok" << endl;
+    if (p && p->inherits("Frame"))
       return (Frame*)p;
-    }
     else
-    {
       return 0L;
-    }
   }
 }
 
@@ -2540,9 +2514,6 @@ void Frame::clearTypingStyle()
 
 QVariant Frame::executeScript(QString filename, int baseLine, NodeImpl *n, const QString &script)
 {
-#ifdef KJS_VERBOSE
-  kdDebug(6070) << "executeScript: filename=" << filename << " baseLine=" << baseLine << " script=" << script << endl;
-#endif
   KJSProxyImpl *proxy = jScript();
 
   if (!proxy)
index ac4f305..7e07dc1 100644 (file)
@@ -32,7 +32,6 @@
 #include "html/html_inlineimpl.h"
 #include "HTMLInputElementImpl.h"
 #include "rendering/render_arena.h"
-#include "rendering/render_object.h"
 #include "rendering/render_canvas.h"
 #include "rendering/render_style.h"
 #include "rendering/render_replaced.h"
@@ -43,7 +42,7 @@
 #include "css/cssstyleselector.h"
 #include "helper.h"
 #include "khtml_settings.h"
-#include "Frame.h"
+#include "htmlnames.h"
 
 #include <kcursor.h>
 
@@ -52,7 +51,6 @@
 #include <qvariant.h>
 
 #include <assert.h>
-#include <kdebug.h>
 
 #include "KWQAccObjectCache.h"
 
 #include "MacFrame.h"
 #endif
 
-// #define INSTRUMENT_LAYOUT_SCHEDULING 1
-
-using namespace DOM;
+using namespace WebCore;
 using namespace EventNames;
 using namespace HTMLNames;
-using namespace khtml;
 
 class FrameViewPrivate {
 public:
@@ -997,7 +992,6 @@ QString FrameView::mediaType() const
 
 void FrameView::useSlowRepaints()
 {
-    kdDebug(0) << "slow repaints requested" << endl;
     d->useSlowRepaints = true;
     setStaticBackground(true);
 }
index 282694c..45deafe 100644 (file)
@@ -30,6 +30,7 @@
 #include "java/kjavaappletwidget.h"
 #include "render_canvas.h"
 #include <klocale.h>
+#include "htmlnames.h"
 
 namespace WebCore {
 
index e2bfa8b..77b8fe3 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef render_applet_h
 #define render_applet_h
 
-#include "html_elementimpl.h"
+#include "HTMLElementImpl.h"
 #include "render_replaced.h"
 
 namespace WebCore {
index a11cbd0..d5fe448 100644 (file)
@@ -40,7 +40,7 @@
 #include "render_theme.h"
 
 #include "DocumentImpl.h"
-#include "html/html_elementimpl.h"
+#include "HTMLElementImpl.h"
 #include "CachedImage.h"
 
 #include "render_line.h"
 #include <FrameView.h>
 #include <kdebug.h>
 #include <assert.h>
+#include "htmlnames.h"
 
+namespace WebCore {
 
-using namespace DOM;
 using namespace HTMLNames;
-using namespace khtml;
 
 #define TABLECELLMARGIN -0x4000
 
@@ -164,7 +164,6 @@ int RenderBox::contentWidth() const
     if (includeScrollbarSize())
         w -= m_layer->verticalScrollbarWidth();
     
-    //kdDebug( 6040 ) << "RenderBox::contentWidth(2) = " << w << endl;
     return w;
 }
 
@@ -280,7 +279,6 @@ void RenderBox::paint(PaintInfo& i, int _tx, int _ty)
 
 void RenderBox::paintRootBoxDecorations(PaintInfo& i, int _tx, int _ty)
 {
-    //kdDebug( 6040 ) << renderName() << "::paintBoxDecorations()" << _tx << "/" << _ty << endl;
     const BackgroundLayer* bgLayer = style()->backgroundLayers();
     QColor bgColor = style()->backgroundColor();
     if (document()->isHTMLDocument() && !style()->hasBackground()) {
@@ -299,8 +297,6 @@ void RenderBox::paintRootBoxDecorations(PaintInfo& i, int _tx, int _ty)
     int w = width();
     int h = height();
 
-    //    kdDebug(0) << "width = " << w <<endl;
-
     int rw, rh;
     if (canvas()->view()) {
         rw = canvas()->view()->contentsWidth();
@@ -311,8 +307,6 @@ void RenderBox::paintRootBoxDecorations(PaintInfo& i, int _tx, int _ty)
         rh = canvas()->height();
     }
     
-    //    kdDebug(0) << "rw = " << rw <<endl;
-
     int bx = _tx - marginLeft();
     int by = _ty - marginTop();
     int bw = kMax(w + marginLeft() + marginRight() + borderLeft() + borderRight(), rw);
@@ -335,7 +329,6 @@ void RenderBox::paintBoxDecorations(PaintInfo& i, int _tx, int _ty)
     if (!shouldPaintWithinRoot(i))
         return;
 
-    //kdDebug( 6040 ) << renderName() << "::paintDecorations()" << endl;
     if (isRoot())
         return paintRootBoxDecorations(i, _tx, _ty);
     
@@ -655,7 +648,6 @@ IntRect RenderBox::getClipRect(int tx, int ty)
         int h = style()->clipBottom().width(m_height);
         cliph -= m_height - h;
     }
-    //kdDebug( 6040 ) << "setting clip("<<clipx<<","<<clipy<<","<<clipw<<","<<cliph<<")"<<endl;
 
     IntRect cr(clipx,clipy,clipw,cliph);
     return cr;
@@ -848,13 +840,8 @@ void RenderBox::relativePositionOffset(int &tx, int &ty)
 
 void RenderBox::calcWidth()
 {
-#ifdef DEBUG_LAYOUT
-    kdDebug( 6040 ) << "RenderBox("<<renderName()<<")::calcWidth()" << endl;
-#endif
     if (isPositioned())
-    {
         calcAbsoluteHorizontal();
-    }
     else
     {
         // The parent box is flexing us, so it has increased or decreased our width.  Use the width
@@ -936,11 +923,6 @@ void RenderBox::calcWidth()
                 m_marginLeft = cw - m_width - m_marginRight;
         }
     }
-
-#ifdef DEBUG_LAYOUT
-    kdDebug( 6040 ) << "RenderBox::calcWidth(): m_width=" << m_width << " containingBlockWidth()=" << containingBlockWidth() << endl;
-    kdDebug( 6040 ) << "m_marginLeft=" << m_marginLeft << " m_marginRight=" << m_marginRight << endl;
-#endif
 }
 
 int RenderBox::calcWidthUsing(WidthType widthType, int cw, LengthType& lengthType)
@@ -1045,11 +1027,6 @@ void RenderBox::calcHorizontalMargins(const Length& ml, const Length& mr, int cw
 
 void RenderBox::calcHeight()
 {
-
-#ifdef DEBUG_LAYOUT
-    kdDebug( 6040 ) << "RenderBox::calcHeight()" << endl;
-#endif
-
     // Cell height is managed by the table and inline non-replaced elements do not support a height property.
     if (isTableCell() || (isInline() && !isReplaced()))
         return;
@@ -1780,4 +1757,4 @@ int RenderBox::leftmostPosition(bool includeOverflowInterior, bool includeSelf)
     return includeSelf ? 0 : m_width;
 }
 
-#undef DEBUG_LAYOUT
+}
index 127be80..89d9186 100644 (file)
 
 #include "DocumentImpl.h"
 #include "html_canvasimpl.h"
+#include "htmlnames.h"
 
 namespace WebCore {
 
 using namespace HTMLNames;
-using namespace khtml;
-
-// -------------------------------------------------------------------------
 
 RenderCanvasImage::RenderCanvasImage(NodeImpl *_node)
     : RenderImage(_node), _drawingContext(0), _drawingContextData(0), _drawnImage(0), _needsImageUpdate(0)
index 725fd2f..20fc573 100644 (file)
@@ -28,7 +28,7 @@
 
 #if __APPLE__
 
-#include "html_elementimpl.h"
+#include "HTMLElementImpl.h"
 #include "render_image.h"
 
 // FIXME: Mac-specific parts need to move to the platform directory.
index b849df7..818d952 100644 (file)
 #include <klocale.h>
 #include <qpainter.h>
 #include <qtimer.h>
+#include "htmlnames.h"
+
+namespace WebCore {
 
-using namespace DOM;
 using namespace EventNames;
 using namespace HTMLNames;
 
-//#define DEBUG_LAYOUT
-
-namespace khtml {
-
 RenderFrameSet::RenderFrameSet( HTMLFrameSetElementImpl *frameSet)
     : RenderContainer(frameSet)
 {
index dcbbbf5..f2bd55e 100644 (file)
 #include "render_canvas.h"
 #include <qpainter.h>
 #include <qpen.h>
+#include "htmlnames.h"
 
 namespace WebCore {
 
 using namespace HTMLNames;
 
-// -------------------------------------------------------------------------
-
 RenderImage::RenderImage(NodeImpl *_node)
     : RenderReplaced(_node)
 {
index 7b7e34f..14c90eb 100644 (file)
@@ -25,7 +25,7 @@
 #ifndef RENDER_IMAGE_H
 #define RENDER_IMAGE_H
 
-#include "html_elementimpl.h"
+#include "HTMLElementImpl.h"
 #include "render_replaced.h"
 #include "dom_string.h"
 #include <qpixmap.h>
index 8a9aa1c..8fdc35d 100644 (file)
@@ -54,6 +54,7 @@
 #include "xml/dom2_eventsimpl.h"
 #include "xml/EventNames.h"
 #include "html/html_blockimpl.h"
+#include "htmlnames.h"
 
 #if SVG_SUPPORT
 #include "SVGNames.h"
 
 #define MIN_INTERSECT_FOR_REVEAL 32
 
-using namespace DOM;
-using namespace DOM::EventNames;
-using namespace HTMLNames;
+namespace WebCore {
 
-namespace khtml {
+using namespace EventNames;
+using namespace HTMLNames;
 
 QScrollBar* RenderLayer::gScrollBar = 0;