WebCore:
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 May 2009 18:00:34 +0000 (18:00 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 May 2009 18:00:34 +0000 (18:00 +0000)
2009-05-04  Darin Adler  <darin@apple.com>

        Reviewed by Eric Seidel.

        Bug 24924: remove Document.h include of Attr.h and HTMLCollection.h,
        and NamedMappedAttrMap.h include of MappedAttribute.h
        https://bugs.webkit.org/show_bug.cgi?id=24924

        Make compiles faster, and debugging info smaller.

        * GNUmakefile.am: Added new source files.
        * WebCore.pro: Ditto.
        * WebCore.scons: Ditto.
        * WebCore.vcproj/WebCore.vcproj: Ditto.
        * WebCore.xcodeproj/project.pbxproj: Ditto.
        * WebCoreSources.bkl: Ditto.

        * bindings/js/JSHTMLCollectionCustom.cpp:
        (WebCore::toJS): Updated for new collection type names.

        * dom/Document.cpp:
        (WebCore::Document::createAttribute): Added. No longer inline.
        (WebCore::Document::images): Updated for new collection type names.
        (WebCore::Document::applets): Ditto.
        (WebCore::Document::embeds): Ditto.
        (WebCore::Document::plugins): Ditto.
        (WebCore::Document::objects): Ditto.
        (WebCore::Document::scripts): Ditto.
        (WebCore::Document::links): Ditto.
        (WebCore::Document::forms): Ditto.
        (WebCore::Document::anchors): Ditto.
        (WebCore::Document::all): Ditto.
        (WebCore::Document::windowNamedItems): Ditto.
        (WebCore::Document::documentNamedItems): Ditto.
        (WebCore::Document::nameCollectionInfo): Ditto.

        * dom/Document.h: Changed around includes and forward declarations.
        Updated for changes to collection types.

        * dom/NamedMappedAttrMap.h: Removed include of MappedAttribute.h.

        * html/CollectionCache.cpp: Copied from WebCore/html/HTMLCollection.cpp.
        Contains the class that used to be HTMLCollection::CollectionInfo.
        * html/CollectionCache.h: Copied from WebCore/html/HTMLCollection.h.
        Ditto.

        * html/CollectionType.h: Copied from WebCore/html/HTMLCollection.h.
        Has the enum that used to be HTMLCollection::Type.

        * html/HTMLCollection.cpp:
        (WebCore::HTMLCollection::HTMLCollection): Update for collection type change.
        (WebCore::HTMLCollection::create): Ditto.
        (WebCore::HTMLCollection::resetCollectionInfo): Ditto.
        (WebCore::HTMLCollection::itemAfter): Ditto.
        * html/HTMLCollection.h: Ditto.

        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::children): Updated for new collection type names.
        * html/HTMLFormCollection.cpp:
        (WebCore::HTMLFormCollection::formCollectionInfo): Ditto.
        (WebCore::HTMLFormCollection::HTMLFormCollection): Ditto.
        * html/HTMLFormCollection.h: Ditto.
        * html/HTMLFormElement.h: Ditto.
        * html/HTMLMapElement.cpp:
        (WebCore::HTMLMapElement::areas): Ditto.
        * html/HTMLNameCollection.cpp:
        (WebCore::HTMLNameCollection::HTMLNameCollection): Ditto.
        * html/HTMLNameCollection.h:
        (WebCore::HTMLNameCollection::create): Ditto.
        * html/HTMLSelectElement.h:
        (WebCore::HTMLSelectElement::collectionInfo): Ditto.
        * html/HTMLTableElement.cpp:
        (WebCore::HTMLTableElement::tBodies):Ditto.
        * html/HTMLTableRowElement.cpp:
        (WebCore::HTMLTableRowElement::cells):Ditto.
        * html/HTMLTableRowsCollection.cpp:
        (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): Ditto.
        * html/HTMLTableSectionElement.cpp:
        (WebCore::HTMLTableSectionElement::rows): Ditto.

        * bindings/js/JSDOMWindowBase.cpp: Added newly-needed includes.
        * bindings/js/JSHTMLFrameSetElementCustom.cpp: Ditto.
        * css/CSSStyleSelector.cpp: Ditto.
        * dom/Element.cpp: Ditto.
        * dom/InputElement.cpp: Ditto.
        * dom/NamedAttrMap.cpp: Ditto.
        * dom/NamedMappedAttrMap.cpp: Ditto.
        * dom/Node.cpp: Ditto.
        * dom/StyledElement.cpp: Ditto.
        * dom/StyledElement.h: Ditto.
        * editing/ApplyStyleCommand.cpp: Ditto.
        * editing/DeleteSelectionCommand.cpp: Ditto.
        * editing/Editor.cpp: Ditto.
        * editing/EditorCommand.cpp: Ditto.
        * editing/InsertParagraphSeparatorCommand.cpp: Ditto.
        * editing/ReplaceSelectionCommand.cpp: Ditto.
        * editing/markup.cpp: Ditto.
        * html/CanvasRenderingContext2D.cpp: Ditto.
        * html/HTMLAnchorElement.cpp: Ditto.
        * html/HTMLAppletElement.cpp: Ditto.
        * html/HTMLAreaElement.cpp: Ditto.
        * html/HTMLBRElement.cpp: Ditto.
        * html/HTMLBaseElement.cpp: Ditto.
        * html/HTMLBodyElement.cpp: Ditto.
        * html/HTMLButtonElement.cpp: Ditto.
        * html/HTMLCanvasElement.cpp: Ditto.
        * html/HTMLDivElement.cpp: Ditto.
        * html/HTMLEmbedElement.cpp: Ditto.
        * html/HTMLFontElement.cpp: Ditto.
        * html/HTMLFormControlElement.cpp: Ditto.
        * html/HTMLFormElement.cpp: Ditto.
        * html/HTMLFrameElement.cpp: Ditto.
        * html/HTMLFrameElementBase.cpp: Ditto.
        * html/HTMLFrameSetElement.cpp: Ditto.
        * html/HTMLHRElement.cpp: Ditto.
        * html/HTMLIFrameElement.cpp: Ditto.
        * html/HTMLImageElement.cpp: Ditto.
        * html/HTMLInputElement.cpp: Ditto.
        * html/HTMLIsIndexElement.cpp: Ditto.
        * html/HTMLKeygenElement.cpp: Ditto.
        * html/HTMLLIElement.cpp: Ditto.
        * html/HTMLLinkElement.cpp: Ditto.
        * html/HTMLMarqueeElement.cpp: Ditto.
        * html/HTMLMetaElement.cpp: Ditto.
        * html/HTMLOListElement.cpp: Ditto.
        * html/HTMLObjectElement.cpp: Ditto.
        * html/HTMLOptionElement.cpp: Ditto.
        * html/HTMLParagraphElement.cpp: Ditto.
        * html/HTMLParamElement.cpp: Ditto.
        * html/HTMLPlugInElement.cpp: Ditto.
        * html/HTMLPreElement.cpp: Ditto.
        * html/HTMLScriptElement.cpp: Ditto.
        * html/HTMLSelectElement.cpp: Ditto.
        * html/HTMLStyleElement.cpp: Ditto.
        * html/HTMLTableCaptionElement.cpp: Ditto.
        * html/HTMLTableCellElement.cpp: Ditto.
        * html/HTMLTableColElement.cpp: Ditto.
        * html/HTMLTablePartElement.cpp: Ditto.
        * html/HTMLTextAreaElement.cpp: Ditto.
        * html/HTMLTokenizer.cpp: Ditto.
        * html/HTMLUListElement.cpp: Ditto.
        * html/HTMLVideoElement.cpp: Ditto.
        * html/HTMLViewSourceDocument.cpp: Ditto.
        * loader/ImageDocument.cpp: Ditto.
        * page/Frame.cpp: Ditto.
        * rendering/RenderTreeAsText.cpp: Ditto.
        * svg/SVGAElement.cpp: Ditto.
        * svg/SVGAnimateMotionElement.cpp: Ditto.
        * svg/SVGAnimateTransformElement.cpp: Ditto.
        * svg/SVGAnimationElement.cpp: Ditto.
        * svg/SVGCircleElement.cpp: Ditto.
        * svg/SVGClipPathElement.cpp: Ditto.
        * svg/SVGCursorElement.cpp: Ditto.
        * svg/SVGElement.cpp: Ditto.
        * svg/SVGEllipseElement.cpp: Ditto.
        * svg/SVGExternalResourcesRequired.cpp: Ditto.
        * svg/SVGFitToViewBox.cpp: Ditto.
        * svg/SVGFontFaceElement.cpp: Ditto.
        * svg/SVGFontFaceUriElement.cpp: Ditto.
        * svg/SVGForeignObjectElement.cpp: Ditto.
        * svg/SVGGlyphElement.cpp: Ditto.
        * svg/SVGGradientElement.cpp: Ditto.
        * svg/SVGImageElement.cpp: Ditto.
        * svg/SVGLangSpace.cpp: Ditto.
        * svg/SVGLineElement.cpp: Ditto.
        * svg/SVGLinearGradientElement.cpp: Ditto.
        * svg/SVGMarkerElement.cpp: Ditto.
        * svg/SVGMaskElement.cpp: Ditto.
        * svg/SVGPathElement.cpp: Ditto.
        * svg/SVGPatternElement.cpp: Ditto.
        * svg/SVGPolyElement.cpp: Ditto.
        * svg/SVGRadialGradientElement.cpp: Ditto.
        * svg/SVGRectElement.cpp: Ditto.
        * svg/SVGSVGElement.cpp: Ditto.
        * svg/SVGScriptElement.cpp: Ditto.
        * svg/SVGStopElement.cpp: Ditto.
        * svg/SVGStyleElement.cpp: Ditto.
        * svg/SVGStyledElement.cpp: Ditto.
        * svg/SVGStyledTransformableElement.cpp: Ditto.
        * svg/SVGTests.cpp: Ditto.
        * svg/SVGTextContentElement.cpp: Ditto.
        * svg/SVGTextElement.cpp: Ditto.
        * svg/SVGTextPathElement.cpp: Ditto.
        * svg/SVGTextPositioningElement.cpp: Ditto.
        * svg/SVGURIReference.cpp: Ditto.
        * svg/SVGUseElement.cpp: Ditto.
        * svg/SVGViewElement.cpp: Ditto.
        * svg/animation/SVGSMILElement.cpp: Ditto.
        * xml/XPathStep.cpp: Ditto.

WebKit/mac:

2009-05-04  Darin Adler  <darin@apple.com>

        Reviewed by Eric Seidel.

        Bug 24924: remove Document.h include of Attr.h and HTMLCollection.h,
        and NamedMappedAttrMap.h include of MappedAttribute.h
        https://bugs.webkit.org/show_bug.cgi?id=24924

        * WebView/WebFrame.mm: Added include of CSSMutableStyleDeclaration.h
        and ScriptValue.h.

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

140 files changed:
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/WebCore.pro
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/WebCoreSources.bkl
WebCore/bindings/js/JSDOMWindowBase.cpp
WebCore/bindings/js/JSHTMLCollectionCustom.cpp
WebCore/bindings/js/JSHTMLFrameSetElementCustom.cpp
WebCore/bindings/objc/DOMHTML.mm
WebCore/css/CSSStyleSelector.cpp
WebCore/dom/Document.cpp
WebCore/dom/Document.h
WebCore/dom/Element.cpp
WebCore/dom/InputElement.cpp
WebCore/dom/NamedAttrMap.cpp
WebCore/dom/NamedMappedAttrMap.cpp
WebCore/dom/NamedMappedAttrMap.h
WebCore/dom/Node.cpp
WebCore/dom/StyledElement.cpp
WebCore/dom/StyledElement.h
WebCore/editing/ApplyStyleCommand.cpp
WebCore/editing/DeleteSelectionCommand.cpp
WebCore/editing/Editor.cpp
WebCore/editing/EditorCommand.cpp
WebCore/editing/InsertParagraphSeparatorCommand.cpp
WebCore/editing/ReplaceSelectionCommand.cpp
WebCore/editing/markup.cpp
WebCore/html/CanvasRenderingContext2D.cpp
WebCore/html/CollectionCache.cpp [new file with mode: 0644]
WebCore/html/CollectionCache.h [new file with mode: 0644]
WebCore/html/CollectionType.h [new file with mode: 0644]
WebCore/html/HTMLAnchorElement.cpp
WebCore/html/HTMLAppletElement.cpp
WebCore/html/HTMLAreaElement.cpp
WebCore/html/HTMLBRElement.cpp
WebCore/html/HTMLBaseElement.cpp
WebCore/html/HTMLBodyElement.cpp
WebCore/html/HTMLButtonElement.cpp
WebCore/html/HTMLCanvasElement.cpp
WebCore/html/HTMLCollection.cpp
WebCore/html/HTMLCollection.h
WebCore/html/HTMLDivElement.cpp
WebCore/html/HTMLElement.cpp
WebCore/html/HTMLEmbedElement.cpp
WebCore/html/HTMLFontElement.cpp
WebCore/html/HTMLFormCollection.cpp
WebCore/html/HTMLFormCollection.h
WebCore/html/HTMLFormControlElement.cpp
WebCore/html/HTMLFormElement.cpp
WebCore/html/HTMLFormElement.h
WebCore/html/HTMLFrameElement.cpp
WebCore/html/HTMLFrameElementBase.cpp
WebCore/html/HTMLFrameSetElement.cpp
WebCore/html/HTMLHRElement.cpp
WebCore/html/HTMLIFrameElement.cpp
WebCore/html/HTMLImageElement.cpp
WebCore/html/HTMLInputElement.cpp
WebCore/html/HTMLIsIndexElement.cpp
WebCore/html/HTMLKeygenElement.cpp
WebCore/html/HTMLLIElement.cpp
WebCore/html/HTMLLinkElement.cpp
WebCore/html/HTMLMapElement.cpp
WebCore/html/HTMLMarqueeElement.cpp
WebCore/html/HTMLMediaElement.cpp
WebCore/html/HTMLMetaElement.cpp
WebCore/html/HTMLNameCollection.cpp
WebCore/html/HTMLNameCollection.h
WebCore/html/HTMLOListElement.cpp
WebCore/html/HTMLObjectElement.cpp
WebCore/html/HTMLOptionElement.cpp
WebCore/html/HTMLParagraphElement.cpp
WebCore/html/HTMLParamElement.cpp
WebCore/html/HTMLPlugInElement.cpp
WebCore/html/HTMLPreElement.cpp
WebCore/html/HTMLScriptElement.cpp
WebCore/html/HTMLSelectElement.cpp
WebCore/html/HTMLSelectElement.h
WebCore/html/HTMLStyleElement.cpp
WebCore/html/HTMLTableCaptionElement.cpp
WebCore/html/HTMLTableCellElement.cpp
WebCore/html/HTMLTableColElement.cpp
WebCore/html/HTMLTableElement.cpp
WebCore/html/HTMLTablePartElement.cpp
WebCore/html/HTMLTableRowElement.cpp
WebCore/html/HTMLTableRowsCollection.cpp
WebCore/html/HTMLTableSectionElement.cpp
WebCore/html/HTMLTextAreaElement.cpp
WebCore/html/HTMLTokenizer.cpp
WebCore/html/HTMLUListElement.cpp
WebCore/html/HTMLVideoElement.cpp
WebCore/html/HTMLViewSourceDocument.cpp
WebCore/loader/ImageDocument.cpp
WebCore/page/Frame.cpp
WebCore/rendering/RenderTreeAsText.cpp
WebCore/svg/SVGAElement.cpp
WebCore/svg/SVGAnimateMotionElement.cpp
WebCore/svg/SVGAnimateTransformElement.cpp
WebCore/svg/SVGAnimationElement.cpp
WebCore/svg/SVGCircleElement.cpp
WebCore/svg/SVGClipPathElement.cpp
WebCore/svg/SVGCursorElement.cpp
WebCore/svg/SVGElement.cpp
WebCore/svg/SVGEllipseElement.cpp
WebCore/svg/SVGExternalResourcesRequired.cpp
WebCore/svg/SVGFitToViewBox.cpp
WebCore/svg/SVGFontFaceElement.cpp
WebCore/svg/SVGFontFaceUriElement.cpp
WebCore/svg/SVGForeignObjectElement.cpp
WebCore/svg/SVGGlyphElement.cpp
WebCore/svg/SVGGradientElement.cpp
WebCore/svg/SVGImageElement.cpp
WebCore/svg/SVGLangSpace.cpp
WebCore/svg/SVGLineElement.cpp
WebCore/svg/SVGLinearGradientElement.cpp
WebCore/svg/SVGMarkerElement.cpp
WebCore/svg/SVGMaskElement.cpp
WebCore/svg/SVGPathElement.cpp
WebCore/svg/SVGPatternElement.cpp
WebCore/svg/SVGPolyElement.cpp
WebCore/svg/SVGRadialGradientElement.cpp
WebCore/svg/SVGRectElement.cpp
WebCore/svg/SVGSVGElement.cpp
WebCore/svg/SVGScriptElement.cpp
WebCore/svg/SVGStopElement.cpp
WebCore/svg/SVGStyleElement.cpp
WebCore/svg/SVGStyledElement.cpp
WebCore/svg/SVGStyledTransformableElement.cpp
WebCore/svg/SVGTests.cpp
WebCore/svg/SVGTextContentElement.cpp
WebCore/svg/SVGTextElement.cpp
WebCore/svg/SVGTextPathElement.cpp
WebCore/svg/SVGTextPositioningElement.cpp
WebCore/svg/SVGURIReference.cpp
WebCore/svg/SVGUseElement.cpp
WebCore/svg/SVGViewElement.cpp
WebCore/svg/animation/SVGSMILElement.cpp
WebCore/xml/XPathStep.cpp
WebKit/mac/ChangeLog
WebKit/mac/WebView/WebFrame.mm

index fd6595e..1e3016e 100644 (file)
@@ -1,3 +1,193 @@
+2009-05-04  Darin Adler  <darin@apple.com>
+
+        Reviewed by Eric Seidel.
+
+        Bug 24924: remove Document.h include of Attr.h and HTMLCollection.h,
+        and NamedMappedAttrMap.h include of MappedAttribute.h
+        https://bugs.webkit.org/show_bug.cgi?id=24924
+
+        Make compiles faster, and debugging info smaller.
+
+        * GNUmakefile.am: Added new source files.
+        * WebCore.pro: Ditto.
+        * WebCore.scons: Ditto.
+        * WebCore.vcproj/WebCore.vcproj: Ditto.
+        * WebCore.xcodeproj/project.pbxproj: Ditto.
+        * WebCoreSources.bkl: Ditto.
+
+        * bindings/js/JSHTMLCollectionCustom.cpp:
+        (WebCore::toJS): Updated for new collection type names.
+
+        * dom/Document.cpp:
+        (WebCore::Document::createAttribute): Added. No longer inline.
+        (WebCore::Document::images): Updated for new collection type names.
+        (WebCore::Document::applets): Ditto.
+        (WebCore::Document::embeds): Ditto.
+        (WebCore::Document::plugins): Ditto.
+        (WebCore::Document::objects): Ditto.
+        (WebCore::Document::scripts): Ditto.
+        (WebCore::Document::links): Ditto.
+        (WebCore::Document::forms): Ditto.
+        (WebCore::Document::anchors): Ditto.
+        (WebCore::Document::all): Ditto.
+        (WebCore::Document::windowNamedItems): Ditto.
+        (WebCore::Document::documentNamedItems): Ditto.
+        (WebCore::Document::nameCollectionInfo): Ditto.
+
+        * dom/Document.h: Changed around includes and forward declarations.
+        Updated for changes to collection types.
+
+        * dom/NamedMappedAttrMap.h: Removed include of MappedAttribute.h.
+
+        * html/CollectionCache.cpp: Copied from WebCore/html/HTMLCollection.cpp.
+        Contains the class that used to be HTMLCollection::CollectionInfo.
+        * html/CollectionCache.h: Copied from WebCore/html/HTMLCollection.h.
+        Ditto.
+
+        * html/CollectionType.h: Copied from WebCore/html/HTMLCollection.h.
+        Has the enum that used to be HTMLCollection::Type.
+
+        * html/HTMLCollection.cpp:
+        (WebCore::HTMLCollection::HTMLCollection): Update for collection type change.
+        (WebCore::HTMLCollection::create): Ditto.
+        (WebCore::HTMLCollection::resetCollectionInfo): Ditto.
+        (WebCore::HTMLCollection::itemAfter): Ditto.
+        * html/HTMLCollection.h: Ditto.
+
+        * html/HTMLElement.cpp:
+        (WebCore::HTMLElement::children): Updated for new collection type names.
+        * html/HTMLFormCollection.cpp:
+        (WebCore::HTMLFormCollection::formCollectionInfo): Ditto.
+        (WebCore::HTMLFormCollection::HTMLFormCollection): Ditto.
+        * html/HTMLFormCollection.h: Ditto.
+        * html/HTMLFormElement.h: Ditto.
+        * html/HTMLMapElement.cpp:
+        (WebCore::HTMLMapElement::areas): Ditto.
+        * html/HTMLNameCollection.cpp:
+        (WebCore::HTMLNameCollection::HTMLNameCollection): Ditto.
+        * html/HTMLNameCollection.h:
+        (WebCore::HTMLNameCollection::create): Ditto.
+        * html/HTMLSelectElement.h:
+        (WebCore::HTMLSelectElement::collectionInfo): Ditto.
+        * html/HTMLTableElement.cpp:
+        (WebCore::HTMLTableElement::tBodies):Ditto.
+        * html/HTMLTableRowElement.cpp:
+        (WebCore::HTMLTableRowElement::cells):Ditto.
+        * html/HTMLTableRowsCollection.cpp:
+        (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection): Ditto.
+        * html/HTMLTableSectionElement.cpp:
+        (WebCore::HTMLTableSectionElement::rows): Ditto.
+
+        * bindings/js/JSDOMWindowBase.cpp: Added newly-needed includes.
+        * bindings/js/JSHTMLFrameSetElementCustom.cpp: Ditto.
+        * css/CSSStyleSelector.cpp: Ditto.
+        * dom/Element.cpp: Ditto.
+        * dom/InputElement.cpp: Ditto.
+        * dom/NamedAttrMap.cpp: Ditto.
+        * dom/NamedMappedAttrMap.cpp: Ditto.
+        * dom/Node.cpp: Ditto.
+        * dom/StyledElement.cpp: Ditto.
+        * dom/StyledElement.h: Ditto.
+        * editing/ApplyStyleCommand.cpp: Ditto.
+        * editing/DeleteSelectionCommand.cpp: Ditto.
+        * editing/Editor.cpp: Ditto.
+        * editing/EditorCommand.cpp: Ditto.
+        * editing/InsertParagraphSeparatorCommand.cpp: Ditto.
+        * editing/ReplaceSelectionCommand.cpp: Ditto.
+        * editing/markup.cpp: Ditto.
+        * html/CanvasRenderingContext2D.cpp: Ditto.
+        * html/HTMLAnchorElement.cpp: Ditto.
+        * html/HTMLAppletElement.cpp: Ditto.
+        * html/HTMLAreaElement.cpp: Ditto.
+        * html/HTMLBRElement.cpp: Ditto.
+        * html/HTMLBaseElement.cpp: Ditto.
+        * html/HTMLBodyElement.cpp: Ditto.
+        * html/HTMLButtonElement.cpp: Ditto.
+        * html/HTMLCanvasElement.cpp: Ditto.
+        * html/HTMLDivElement.cpp: Ditto.
+        * html/HTMLEmbedElement.cpp: Ditto.
+        * html/HTMLFontElement.cpp: Ditto.
+        * html/HTMLFormControlElement.cpp: Ditto.
+        * html/HTMLFormElement.cpp: Ditto.
+        * html/HTMLFrameElement.cpp: Ditto.
+        * html/HTMLFrameElementBase.cpp: Ditto.
+        * html/HTMLFrameSetElement.cpp: Ditto.
+        * html/HTMLHRElement.cpp: Ditto.
+        * html/HTMLIFrameElement.cpp: Ditto.
+        * html/HTMLImageElement.cpp: Ditto.
+        * html/HTMLInputElement.cpp: Ditto.
+        * html/HTMLIsIndexElement.cpp: Ditto.
+        * html/HTMLKeygenElement.cpp: Ditto.
+        * html/HTMLLIElement.cpp: Ditto.
+        * html/HTMLLinkElement.cpp: Ditto.
+        * html/HTMLMarqueeElement.cpp: Ditto.
+        * html/HTMLMetaElement.cpp: Ditto.
+        * html/HTMLOListElement.cpp: Ditto.
+        * html/HTMLObjectElement.cpp: Ditto.
+        * html/HTMLOptionElement.cpp: Ditto.
+        * html/HTMLParagraphElement.cpp: Ditto.
+        * html/HTMLParamElement.cpp: Ditto.
+        * html/HTMLPlugInElement.cpp: Ditto.
+        * html/HTMLPreElement.cpp: Ditto.
+        * html/HTMLScriptElement.cpp: Ditto.
+        * html/HTMLSelectElement.cpp: Ditto.
+        * html/HTMLStyleElement.cpp: Ditto.
+        * html/HTMLTableCaptionElement.cpp: Ditto.
+        * html/HTMLTableCellElement.cpp: Ditto.
+        * html/HTMLTableColElement.cpp: Ditto.
+        * html/HTMLTablePartElement.cpp: Ditto.
+        * html/HTMLTextAreaElement.cpp: Ditto.
+        * html/HTMLTokenizer.cpp: Ditto.
+        * html/HTMLUListElement.cpp: Ditto.
+        * html/HTMLVideoElement.cpp: Ditto.
+        * html/HTMLViewSourceDocument.cpp: Ditto.
+        * loader/ImageDocument.cpp: Ditto.
+        * page/Frame.cpp: Ditto.
+        * rendering/RenderTreeAsText.cpp: Ditto.
+        * svg/SVGAElement.cpp: Ditto.
+        * svg/SVGAnimateMotionElement.cpp: Ditto.
+        * svg/SVGAnimateTransformElement.cpp: Ditto.
+        * svg/SVGAnimationElement.cpp: Ditto.
+        * svg/SVGCircleElement.cpp: Ditto.
+        * svg/SVGClipPathElement.cpp: Ditto.
+        * svg/SVGCursorElement.cpp: Ditto.
+        * svg/SVGElement.cpp: Ditto.
+        * svg/SVGEllipseElement.cpp: Ditto.
+        * svg/SVGExternalResourcesRequired.cpp: Ditto.
+        * svg/SVGFitToViewBox.cpp: Ditto.
+        * svg/SVGFontFaceElement.cpp: Ditto.
+        * svg/SVGFontFaceUriElement.cpp: Ditto.
+        * svg/SVGForeignObjectElement.cpp: Ditto.
+        * svg/SVGGlyphElement.cpp: Ditto.
+        * svg/SVGGradientElement.cpp: Ditto.
+        * svg/SVGImageElement.cpp: Ditto.
+        * svg/SVGLangSpace.cpp: Ditto.
+        * svg/SVGLineElement.cpp: Ditto.
+        * svg/SVGLinearGradientElement.cpp: Ditto.
+        * svg/SVGMarkerElement.cpp: Ditto.
+        * svg/SVGMaskElement.cpp: Ditto.
+        * svg/SVGPathElement.cpp: Ditto.
+        * svg/SVGPatternElement.cpp: Ditto.
+        * svg/SVGPolyElement.cpp: Ditto.
+        * svg/SVGRadialGradientElement.cpp: Ditto.
+        * svg/SVGRectElement.cpp: Ditto.
+        * svg/SVGSVGElement.cpp: Ditto.
+        * svg/SVGScriptElement.cpp: Ditto.
+        * svg/SVGStopElement.cpp: Ditto.
+        * svg/SVGStyleElement.cpp: Ditto.
+        * svg/SVGStyledElement.cpp: Ditto.
+        * svg/SVGStyledTransformableElement.cpp: Ditto.
+        * svg/SVGTests.cpp: Ditto.
+        * svg/SVGTextContentElement.cpp: Ditto.
+        * svg/SVGTextElement.cpp: Ditto.
+        * svg/SVGTextPathElement.cpp: Ditto.
+        * svg/SVGTextPositioningElement.cpp: Ditto.
+        * svg/SVGURIReference.cpp: Ditto.
+        * svg/SVGUseElement.cpp: Ditto.
+        * svg/SVGViewElement.cpp: Ditto.
+        * svg/animation/SVGSMILElement.cpp: Ditto.
+        * xml/XPathStep.cpp: Ditto.
+
 2009-05-04  Pavel Feldman  <pfeldman@chromium.org>
 
         Reviewed by Timothy Hatcher.
index 896baf9..e15f060 100644 (file)
@@ -845,6 +845,9 @@ webcore_sources += \
        WebCore/html/CanvasRenderingContext2D.h \
        WebCore/html/CanvasStyle.cpp \
        WebCore/html/CanvasStyle.h \
+       WebCore/html/CollectionCache.cpp \
+       WebCore/html/CollectionCache.h \
+       WebCore/html/CollectionType.h \
        WebCore/html/File.cpp \
        WebCore/html/File.h \
        WebCore/html/FileList.cpp \
index 9f11131..1718305 100644 (file)
@@ -712,6 +712,7 @@ SOURCES += \
     html/CanvasPixelArray.cpp \
     html/CanvasRenderingContext2D.cpp \
     html/CanvasStyle.cpp \
+    html/CollectionCache.cpp \
     html/File.cpp \
     html/FileList.cpp \
     html/FormDataList.cpp \
index 25e31bf..250401b 100644 (file)
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\html\CollectionCache.cpp"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Release_PGO|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               WholeProgramOptimization="true"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\html\CollectionCache.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\html\CollectionType.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\html\File.cpp"\r
                                >\r
                        </File>\r
index 3150fdc..01c3a2a 100644 (file)
                93C09A7F0B064EEF005ABD4D /* EventHandlerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93C09A7E0B064EEF005ABD4D /* EventHandlerMac.mm */; };
                93C09A810B064F00005ABD4D /* EventHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93C09A800B064F00005ABD4D /* EventHandler.cpp */; };
                93C09C860B0657AA005ABD4D /* ScrollTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C09C850B0657AA005ABD4D /* ScrollTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               93C441EF0F813A1A00C1A634 /* CollectionCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93C441ED0F813A1A00C1A634 /* CollectionCache.cpp */; };
+               93C441F00F813A1A00C1A634 /* CollectionCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C441EE0F813A1A00C1A634 /* CollectionCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               93C442000F813AE100C1A634 /* CollectionType.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C441FF0F813AE100C1A634 /* CollectionType.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93C841F809CE855C00DFF5E5 /* DOMImplementationFront.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C841F709CE855C00DFF5E5 /* DOMImplementationFront.h */; };
                93C841FF09CE858300DFF5E5 /* DOMImplementationFront.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93C841FE09CE858300DFF5E5 /* DOMImplementationFront.cpp */; };
                93CCF0270AF6C52900018E89 /* NavigationAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CCF0260AF6C52900018E89 /* NavigationAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
                93C09A7E0B064EEF005ABD4D /* EventHandlerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EventHandlerMac.mm; sourceTree = "<group>"; };
                93C09A800B064F00005ABD4D /* EventHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventHandler.cpp; sourceTree = "<group>"; };
                93C09C850B0657AA005ABD4D /* ScrollTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollTypes.h; sourceTree = "<group>"; };
+               93C441ED0F813A1A00C1A634 /* CollectionCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CollectionCache.cpp; sourceTree = "<group>"; };
+               93C441EE0F813A1A00C1A634 /* CollectionCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectionCache.h; sourceTree = "<group>"; };
+               93C441FF0F813AE100C1A634 /* CollectionType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectionType.h; sourceTree = "<group>"; };
                93C841F709CE855C00DFF5E5 /* DOMImplementationFront.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMImplementationFront.h; sourceTree = "<group>"; };
                93C841FE09CE858300DFF5E5 /* DOMImplementationFront.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMImplementationFront.cpp; sourceTree = "<group>"; };
                93CA4C9909DF93FA00DF8677 /* html4.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = html4.css; sourceTree = "<group>"; };
                                930CAAD609C495B600229C04 /* CanvasRenderingContext2D.idl */,
                                93EEC27009C3218800C515D1 /* CanvasStyle.cpp */,
                                93EEC1EF09C2877700C515D1 /* CanvasStyle.h */,
+                               93C441ED0F813A1A00C1A634 /* CollectionCache.cpp */,
+                               93C441EE0F813A1A00C1A634 /* CollectionCache.h */,
+                               93C441FF0F813AE100C1A634 /* CollectionType.h */,
                                BCDBB8CC0E08958400C60FF6 /* File.cpp */,
                                BCDBB8CB0E08958400C60FF6 /* File.h */,
                                BC1881D90E08C4ED00048C13 /* File.idl */,
                                1C63A2480F71646600C09D5A /* RunLoopTimer.h in Headers */,
                                935F45430F7C3B5F00D7C1FB /* JSLazyEventListener.h in Headers */,
                                93F925430F7EF5B8007E37C9 /* CheckedRadioButtons.h in Headers */,
+                               93C441F00F813A1A00C1A634 /* CollectionCache.h in Headers */,
+                               93C442000F813AE100C1A634 /* CollectionType.h in Headers */,
                                938192050F87E1EC00D5352A /* BinaryPropertyList.h in Headers */,
                                9363B62D0F8E8FE000803810 /* HistoryPropertyList.h in Headers */,
                                415E3EF60F8D67FE007EEB50 /* MessagePortProxy.h in Headers */,
                                1C63A2490F71646600C09D5A /* RunLoopTimerCF.cpp in Sources */,
                                935F45420F7C3B5F00D7C1FB /* JSLazyEventListener.cpp in Sources */,
                                93F925440F7EF5B8007E37C9 /* CheckedRadioButtons.cpp in Sources */,
+                               93C441EF0F813A1A00C1A634 /* CollectionCache.cpp in Sources */,
                                938192030F87E1E600D5352A /* BinaryPropertyList.cpp in Sources */,
                                9363B62C0F8E8FE000803810 /* HistoryPropertyList.cpp in Sources */,
                                FE700DD10F92D81A008E2BFE /* JSCoordinatesCustom.cpp in Sources */,
index 02ac5ac..f26c16f 100644 (file)
@@ -543,6 +543,7 @@ This file contains the list of files needed to build WebCore.
         html/CanvasPixelArray.cpp
         html/CanvasRenderingContext2D.cpp
         html/CanvasStyle.cpp
+        html/CollectionCache.cpp
         html/File.cpp
         html/FileList.cpp
         html/FormDataList.cpp
index 57a8ab1..7a87d2e 100644 (file)
@@ -29,6 +29,7 @@
 #include "DOMWindow.h"
 #include "Element.h"
 #include "Frame.h"
+#include "HTMLCollection.h"
 #include "HTMLDocument.h"
 #include "InspectorController.h"
 #include "JSDOMWindowCustom.h"
index 33602f3..fa26289 100644 (file)
@@ -133,10 +133,10 @@ JSValue toJS(ExecState* exec, HTMLCollection* collection)
         return wrapper;
 
     switch (collection->type()) {
-        case HTMLCollection::SelectOptions:
+        case SelectOptions:
             wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, HTMLOptionsCollection, collection);
             break;
-        case HTMLCollection::DocAll:
+        case DocAll:
             typedef HTMLCollection HTMLAllCollection;
             wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, HTMLAllCollection, collection);
             break;
index b4f37a2..05972e6 100644 (file)
@@ -27,6 +27,7 @@
 #include "JSHTMLFrameSetElement.h"
 
 #include "Document.h"
+#include "HTMLCollection.h"
 #include "HTMLFrameElement.h"
 #include "HTMLFrameSetElement.h"
 #include "HTMLNames.h"
index 600e286..6473b65 100644 (file)
@@ -37,6 +37,7 @@
 #import "DOMPrivate.h"
 #import "DocumentFragment.h"
 #import "FrameView.h"
+#import "HTMLCollection.h"
 #import "HTMLDocument.h"
 #import "HTMLInputElement.h"
 #import "HTMLSelectElement.h"
 
 Class kitClass(WebCore::HTMLCollection* collection)
 {
-    if (collection->type() == WebCore::HTMLCollection::SelectOptions)
+    if (collection->type() == WebCore::SelectOptions)
         return [DOMHTMLOptionsCollection class];
     return [DOMHTMLCollection class];
 }
index 3f00f4c..1e72685 100644 (file)
@@ -62,6 +62,7 @@
 #include "HTMLNames.h"
 #include "HTMLTextAreaElement.h"
 #include "LinkHash.h"
+#include "MappedAttribute.h"
 #include "MatrixTransformOperation.h"
 #include "Matrix3DTransformOperation.h"
 #include "MediaList.h"
index a5c11ed..8becc2a 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "AXObjectCache.h"
 #include "AnimationController.h"
+#include "Attr.h"
 #include "CDATASection.h"
 #include "CSSHelper.h"
 #include "CSSStyleSelector.h"
@@ -60,6 +61,7 @@
 #include "HTMLAnchorElement.h"
 #include "HTMLBodyElement.h"
 #include "HTMLCanvasElement.h"
+#include "HTMLCollection.h"
 #include "HTMLDocument.h"
 #include "HTMLElementFactory.h"
 #include "HTMLFrameOwnerElement.h"
@@ -81,6 +83,7 @@
 #include "ScriptEventListener.h"
 #include "KeyboardEvent.h"
 #include "Logging.h"
+#include "MappedAttribute.h"
 #include "MessageEvent.h"
 #include "MouseEvent.h"
 #include "MouseEventWithHitTestResults.h"
@@ -3721,6 +3724,11 @@ Document *Document::topDocument() const
     return doc;
 }
 
+PassRefPtr<Attr> Document::createAttribute(const String& name, ExceptionCode& ec)
+{
+    return createAttributeNS(String(), name, ec, true);
+}
+
 PassRefPtr<Attr> Document::createAttributeNS(const String& namespaceURI, const String& qualifiedName, ExceptionCode& ec, bool shouldIgnoreNamespaceChecks)
 {
     String prefix, localName;
@@ -3760,75 +3768,75 @@ SVGDocumentExtensions* Document::accessSVGExtensions()
 
 PassRefPtr<HTMLCollection> Document::images()
 {
-    return HTMLCollection::create(this, HTMLCollection::DocImages);
+    return HTMLCollection::create(this, DocImages);
 }
 
 PassRefPtr<HTMLCollection> Document::applets()
 {
-    return HTMLCollection::create(this, HTMLCollection::DocApplets);
+    return HTMLCollection::create(this, DocApplets);
 }
 
 PassRefPtr<HTMLCollection> Document::embeds()
 {
-    return HTMLCollection::create(this, HTMLCollection::DocEmbeds);
+    return HTMLCollection::create(this, DocEmbeds);
 }
 
 PassRefPtr<HTMLCollection> Document::plugins()
 {
     // This is an alias for embeds() required for the JS DOM bindings.
-    return HTMLCollection::create(this, HTMLCollection::DocEmbeds);
+    return HTMLCollection::create(this, DocEmbeds);
 }
 
 PassRefPtr<HTMLCollection> Document::objects()
 {
-    return HTMLCollection::create(this, HTMLCollection::DocObjects);
+    return HTMLCollection::create(this, DocObjects);
 }
 
 PassRefPtr<HTMLCollection> Document::scripts()
 {
-    return HTMLCollection::create(this, HTMLCollection::DocScripts);
+    return HTMLCollection::create(this, DocScripts);
 }
 
 PassRefPtr<HTMLCollection> Document::links()
 {
-    return HTMLCollection::create(this, HTMLCollection::DocLinks);
+    return HTMLCollection::create(this, DocLinks);
 }
 
 PassRefPtr<HTMLCollection> Document::forms()
 {
-    return HTMLCollection::create(this, HTMLCollection::DocForms);
+    return HTMLCollection::create(this, DocForms);
 }
 
 PassRefPtr<HTMLCollection> Document::anchors()
 {
-    return HTMLCollection::create(this, HTMLCollection::DocAnchors);
+    return HTMLCollection::create(this, DocAnchors);
 }
 
 PassRefPtr<HTMLCollection> Document::all()
 {
-    return HTMLCollection::create(this, HTMLCollection::DocAll);
+    return HTMLCollection::create(this, DocAll);
 }
 
 PassRefPtr<HTMLCollection> Document::windowNamedItems(const String &name)
 {
-    return HTMLNameCollection::create(this, HTMLCollection::WindowNamedItems, name);
+    return HTMLNameCollection::create(this, WindowNamedItems, name);
 }
 
 PassRefPtr<HTMLCollection> Document::documentNamedItems(const String &name)
 {
-    return HTMLNameCollection::create(this, HTMLCollection::DocumentNamedItems, name);
+    return HTMLNameCollection::create(this, DocumentNamedItems, name);
 }
 
-HTMLCollection::CollectionInfo* Document::nameCollectionInfo(HTMLCollection::Type type, const AtomicString& name)
+CollectionCache* Document::nameCollectionInfo(CollectionType type, const AtomicString& name)
 {
-    ASSERT(type >= HTMLCollection::FirstNamedDocumentCachedType);
-    unsigned index = type - HTMLCollection::FirstNamedDocumentCachedType;
-    ASSERT(index < HTMLCollection::NumNamedDocumentCachedTypes);
+    ASSERT(type >= FirstNamedDocumentCachedType);
+    unsigned index = type - FirstNamedDocumentCachedType;
+    ASSERT(index < NumNamedDocumentCachedTypes);
 
     NamedCollectionMap& map = m_nameCollectionInfo[index];
     NamedCollectionMap::iterator iter = map.find(name.impl());
     if (iter == map.end())
-        iter = map.add(name.impl(), new HTMLCollection::CollectionInfo).first;
+        iter = map.add(name.impl(), new CollectionCache).first;
     return iter->second;
 }
 
index 00ae866..a08ace4 100644 (file)
 #ifndef Document_h
 #define Document_h
 
-#include "Attr.h"
 #include "CachedResourceHandle.h"
 #include "CheckedRadioButtons.h"
+#include "ContainerNode.h"
+#include "CollectionCache.h"
+#include "CollectionType.h"
 #include "Color.h"
 #include "DocumentMarker.h"
-#include "HTMLCollection.h"
 #include "ScriptExecutionContext.h"
 #include "Timer.h"
 #include <wtf/HashCountedSet.h>
@@ -47,6 +48,7 @@
 
 namespace WebCore {
 
+    class Attr;
     class AXObjectCache;
     class CDATASection;
     class CachedCSSStyleSheet;
@@ -75,6 +77,7 @@ namespace WebCore {
     class FrameView;
     class HitTestRequest;
     class HTMLCanvasElement;
+    class HTMLCollection;
     class HTMLDocument;
     class HTMLElement;
     class HTMLFormElement;
@@ -227,7 +230,7 @@ public:
     PassRefPtr<Comment> createComment(const String& data);
     PassRefPtr<CDATASection> createCDATASection(const String& data, ExceptionCode&);
     PassRefPtr<ProcessingInstruction> createProcessingInstruction(const String& target, const String& data, ExceptionCode&);
-    PassRefPtr<Attr> createAttribute(const String& name, ExceptionCode& ec) { return createAttributeNS(String(), name, ec, true); }
+    PassRefPtr<Attr> createAttribute(const String& name, ExceptionCode&);
     PassRefPtr<Attr> createAttributeNS(const String& namespaceURI, const String& qualifiedName, ExceptionCode&, bool shouldIgnoreNamespaceChecks = false);
     PassRefPtr<EntityReference> createEntityReference(const String& name, ExceptionCode&);
     PassRefPtr<Node> importNode(Node* importedNode, bool deep, ExceptionCode&);
@@ -287,15 +290,15 @@ public:
     // quirks mode for historical compatibility reasons.
     Element* findAnchor(const String& name);
 
-    HTMLCollection::CollectionInfo* collectionInfo(HTMLCollection::Type type)
+    CollectionCache* collectionInfo(CollectionType type)
     {
-        ASSERT(type >= HTMLCollection::FirstUnnamedDocumentCachedType);
-        unsigned index = type - HTMLCollection::FirstUnnamedDocumentCachedType;
-        ASSERT(index < HTMLCollection::NumUnnamedDocumentCachedTypes);
+        ASSERT(type >= FirstUnnamedDocumentCachedType);
+        unsigned index = type - FirstUnnamedDocumentCachedType;
+        ASSERT(index < NumUnnamedDocumentCachedTypes);
         return &m_collectionInfo[index]; 
     }
 
-    HTMLCollection::CollectionInfo* nameCollectionInfo(HTMLCollection::Type, const AtomicString& name);
+    CollectionCache* nameCollectionInfo(CollectionType, const AtomicString& name);
 
     // DOM methods overridden from  parent classes
 
@@ -1049,9 +1052,9 @@ private:
 
     CheckedRadioButtons m_checkedRadioButtons;
 
-    typedef HashMap<AtomicStringImpl*, HTMLCollection::CollectionInfo*> NamedCollectionMap;
-    HTMLCollection::CollectionInfo m_collectionInfo[HTMLCollection::NumUnnamedDocumentCachedTypes];
-    NamedCollectionMap m_nameCollectionInfo[HTMLCollection::NumNamedDocumentCachedTypes];
+    typedef HashMap<AtomicStringImpl*, CollectionCache*> NamedCollectionMap;
+    CollectionCache m_collectionInfo[NumUnnamedDocumentCachedTypes];
+    NamedCollectionMap m_nameCollectionInfo[NumNamedDocumentCachedTypes];
 
 #if ENABLE(XPATH)
     RefPtr<XPathEvaluator> m_xpathEvaluator;
index 1fd796d..b4e871d 100644 (file)
@@ -27,6 +27,7 @@
 #include "Element.h"
 
 #include "AXObjectCache.h"
+#include "Attr.h"
 #include "CSSStyleSelector.h"
 #include "CString.h"
 #include "ClientRect.h"
 #include "Page.h"
 #include "PlatformString.h"
 #include "RenderBlock.h"
-#if ENABLE(SVG)
-#include "SVGNames.h"
-#endif
 #include "SelectionController.h"
 #include "TextIterator.h"
 #include "XMLNames.h"
 
+#if ENABLE(SVG)
+#include "SVGNames.h"
+#endif
+
 namespace WebCore {
 
 using namespace HTMLNames;
index 90be540..ab84a86 100644 (file)
@@ -30,6 +30,7 @@
 #include "Frame.h"
 #include "HTMLInputElement.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 #include "Page.h"
 #include "RenderTextControlSingleLine.h"
 #include "SelectionController.h"
index c776c6f..f3e9bb2 100644 (file)
@@ -25,6 +25,7 @@
 #include "config.h"
 #include "NamedNodeMap.h"
 
+#include "Attr.h"
 #include "Document.h"
 #include "Element.h"
 #include "ExceptionCode.h"
index 08c05c8..d8e3c80 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "Document.h"
 #include "Element.h"
+#include "MappedAttribute.h"
 
 namespace WebCore {
 
index c5d04a0..0afa278 100644 (file)
@@ -27,7 +27,6 @@
 #define NamedMappedAttrMap_h
 
 #include "ClassNames.h"
-#include "MappedAttribute.h" // This header is not required for the NamedMappedAttrMap definition. Should remove it.
 #include "NamedNodeMap.h"
 
 namespace WebCore {
index 7132a60..c27e24d 100644 (file)
@@ -24,6 +24,7 @@
 #include "config.h"
 #include "Node.h"
 
+#include "Attr.h"
 #include "CSSParser.h"
 #include "CSSRule.h"
 #include "CSSRuleList.h"
index f55ce9a..8ddfd31 100644 (file)
@@ -29,6 +29,7 @@
 #include "CSSValueKeywords.h"
 #include "Document.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 #include <wtf/HashFunctions.h>
 
 using namespace std;
index 996584a..158992e 100644 (file)
 #ifndef StyledElement_h
 #define StyledElement_h
 
+#include "CSSPrimitiveValue.h"
 #include "Element.h"
+#include "MappedAttributeEntry.h"
 #include "NamedMappedAttrMap.h"
 
 namespace WebCore {
 
 class CSSMappedAttributeDeclaration;
+class CSSMutableStyleDeclaration;
 class MappedAttribute;
 
 class StyledElement : public Element {
index ce53cdf..0b869fd 100644 (file)
@@ -27,6 +27,7 @@
 #include "ApplyStyleCommand.h"
 
 #include "CSSComputedStyleDeclaration.h"
+#include "CSSMutableStyleDeclaration.h"
 #include "CSSParser.h"
 #include "CSSProperty.h"
 #include "CSSPropertyNames.h"
index a86f632..b7be56e 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "DeleteSelectionCommand.h"
 
+#include "CSSMutableStyleDeclaration.h"
 #include "Document.h"
 #include "DocumentFragment.h"
 #include "Editor.h"
index a575d21..513ab28 100644 (file)
@@ -31,6 +31,7 @@
 #include "ApplyStyleCommand.h"
 #include "CreateLinkCommand.h"
 #include "CSSComputedStyleDeclaration.h"
+#include "CSSMutableStyleDeclaration.h"
 #include "CSSProperty.h"
 #include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
index 0090df7..5a189d4 100644 (file)
@@ -27,6 +27,7 @@
 #include "config.h"
 
 #include "AtomicString.h"
+#include "CSSMutableStyleDeclaration.h"
 #include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
 #include "CreateLinkCommand.h"
index 4d5c3d1..e1837cf 100644 (file)
 #include "config.h"
 #include "InsertParagraphSeparatorCommand.h"
 
-#include "Document.h"
-#include "Logging.h"
 #include "CSSComputedStyleDeclaration.h"
+#include "CSSMutableStyleDeclaration.h"
 #include "CSSPropertyNames.h"
-#include "Text.h"
-#include "htmlediting.h"
+#include "Document.h"
 #include "HTMLElement.h"
 #include "HTMLNames.h"
 #include "InsertLineBreakCommand.h"
+#include "Logging.h"
 #include "RenderObject.h"
+#include "Text.h"
+#include "htmlediting.h"
 #include "visible_units.h"
 
 namespace WebCore {
index 6ed6a44..c6da864 100644 (file)
 
 #include "ApplyStyleCommand.h"
 #include "BeforeTextInsertedEvent.h"
-#include "BreakBlockquoteCommand.h" 
+#include "BreakBlockquoteCommand.h"
 #include "CSSComputedStyleDeclaration.h"
+#include "CSSMutableStyleDeclaration.h"
 #include "CSSProperty.h"
 #include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
 #include "Document.h"
 #include "DocumentFragment.h"
 #include "EditingText.h"
-#include "EventNames.h"
 #include "Element.h"
+#include "EventNames.h"
 #include "Frame.h"
 #include "HTMLElement.h"
-#include "HTMLInterchange.h"
 #include "HTMLInputElement.h"
+#include "HTMLInterchange.h"
 #include "HTMLNames.h"
 #include "SelectionController.h"
 #include "SmartReplace.h"
index 76521ce..bb6efb0 100644 (file)
@@ -30,6 +30,7 @@
 #include "CharacterNames.h"
 #include "Comment.h"
 #include "CSSComputedStyleDeclaration.h"
+#include "CSSMutableStyleDeclaration.h"
 #include "CSSPrimitiveValue.h"
 #include "CSSProperty.h"
 #include "CSSPropertyNames.h"
index 432cc23..8ec7321 100644 (file)
@@ -36,6 +36,7 @@
 #include "CanvasGradient.h"
 #include "CanvasPattern.h"
 #include "CanvasStyle.h"
+#include "CSSMutableStyleDeclaration.h"
 #include "CSSPropertyNames.h"
 #include "CSSStyleSelector.h"
 #include "Document.h"
diff --git a/WebCore/html/CollectionCache.cpp b/WebCore/html/CollectionCache.cpp
new file mode 100644 (file)
index 0000000..feecd96
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "config.h"
+#include "CollectionCache.h"
+
+namespace WebCore {
+
+CollectionCache::CollectionCache()
+    : version(0)
+{
+    reset();
+}
+
+inline void CollectionCache::copyCacheMap(NodeCacheMap& dest, const NodeCacheMap& src)
+{
+    ASSERT(dest.isEmpty());
+    NodeCacheMap::const_iterator end = src.end();
+    for (NodeCacheMap::const_iterator it = src.begin(); it != end; ++it)
+        dest.add(it->first, new Vector<Element*>(*it->second));
+}
+
+CollectionCache::CollectionCache(const CollectionCache& other)
+    : version(other.version)
+    , current(other.current)
+    , position(other.position)
+    , length(other.length)
+    , elementsArrayPosition(other.elementsArrayPosition)
+    , hasLength(other.hasLength)
+    , hasNameCache(other.hasNameCache)
+{
+    copyCacheMap(idCache, other.idCache);
+    copyCacheMap(nameCache, other.nameCache);
+}
+
+void CollectionCache::swap(CollectionCache& other)
+{
+    std::swap(version, other.version);
+    std::swap(current, other.current);
+    std::swap(position, other.position);
+    std::swap(length, other.length);
+    std::swap(elementsArrayPosition, other.elementsArrayPosition);
+
+    idCache.swap(other.idCache);
+    nameCache.swap(other.nameCache);
+    
+    std::swap(hasLength, other.hasLength);
+    std::swap(hasNameCache, other.hasNameCache);
+}
+
+CollectionCache::~CollectionCache()
+{
+    deleteAllValues(idCache);
+    deleteAllValues(nameCache);
+}
+
+void CollectionCache::reset()
+{
+    current = 0;
+    position = 0;
+    length = 0;
+    hasLength = false;
+    elementsArrayPosition = 0;
+    deleteAllValues(idCache);
+    idCache.clear();
+    deleteAllValues(nameCache);
+    nameCache.clear();
+    hasNameCache = false;
+}
+
+} // namespace WebCore
diff --git a/WebCore/html/CollectionCache.h b/WebCore/html/CollectionCache.h
new file mode 100644 (file)
index 0000000..7cdcdd5
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CollectionCache_h
+#define CollectionCache_h
+
+#include <wtf/HashMap.h>
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+class AtomicStringImpl;
+class Element;
+
+struct CollectionCache {
+    CollectionCache();
+    CollectionCache(const CollectionCache&);
+    CollectionCache& operator=(const CollectionCache& other)
+    {
+        CollectionCache tmp(other);    
+        swap(tmp);
+        return *this;
+    }
+    ~CollectionCache();
+
+    void reset();
+    void swap(CollectionCache&);
+
+    typedef HashMap<AtomicStringImpl*, Vector<Element*>*> NodeCacheMap;
+
+    unsigned version;
+    Element* current;
+    unsigned position;
+    unsigned length;
+    int elementsArrayPosition;
+    NodeCacheMap idCache;
+    NodeCacheMap nameCache;
+    bool hasLength;
+    bool hasNameCache;
+
+private:
+    static void copyCacheMap(NodeCacheMap&, const NodeCacheMap&);
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/html/CollectionType.h b/WebCore/html/CollectionType.h
new file mode 100644 (file)
index 0000000..e5973a3
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
+ *           (C) 1999 Antti Koivisto (koivisto@kde.org)
+ * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CollectionType_h
+#define CollectionType_h
+
+namespace WebCore {
+
+enum CollectionType {
+    // unnamed collection types cached in the document
+
+    DocImages,    // all <img> elements in the document
+    DocApplets,   // all <object> and <applet> elements
+    DocEmbeds,    // all <embed> elements
+    DocObjects,   // all <object> elements
+    DocForms,     // all <form> elements
+    DocLinks,     // all <a> _and_ <area> elements with a value for href
+    DocAnchors,   // all <a> elements with a value for name
+    DocScripts,   // all <script> elements
+
+    DocAll,       // "all" elements (IE)
+    NodeChildren, // first-level children (IE)
+
+    // named collection types cached in the document
+
+    WindowNamedItems,
+    DocumentNamedItems,
+
+    // types not cached in the document; these are types that can't be used on a document
+
+    TableTBodies, // all <tbody> elements in this table
+    TSectionRows, // all row elements in this table section
+    TRCells,      // all cells in this row
+    SelectOptions,
+    MapAreas,
+
+    OtherCollection
+};
+
+static const CollectionType FirstUnnamedDocumentCachedType = DocImages;
+static const unsigned NumUnnamedDocumentCachedTypes = NodeChildren - DocImages + 1;
+
+static const CollectionType FirstNamedDocumentCachedType = WindowNamedItems;
+static const unsigned NumNamedDocumentCachedTypes = DocumentNamedItems - WindowNamedItems + 1;
+
+} // namespace
+
+#endif
index 9ccfcd7..d9f6de0 100644 (file)
@@ -36,6 +36,7 @@
 #include "HTMLImageElement.h"
 #include "HTMLNames.h"
 #include "KeyboardEvent.h"
+#include "MappedAttribute.h"
 #include "MouseEvent.h"
 #include "MutationEvent.h"
 #include "Page.h"
index de8e1cf..7be1ffd 100644 (file)
@@ -27,6 +27,7 @@
 #include "Frame.h"
 #include "HTMLDocument.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 #include "RenderApplet.h"
 #include "RenderInline.h"
 #include "Settings.h"
index 9db50b7..2f7c1a5 100644 (file)
@@ -27,6 +27,7 @@
 #include "HTMLNames.h"
 #include "HitTestResult.h"
 #include "Length.h"
+#include "MappedAttribute.h"
 #include "Path.h"
 #include "RenderObject.h"
 
index e98f8d1..6f86e6a 100644 (file)
  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301, USA.
  */
+
 #include "config.h"
 #include "HTMLBRElement.h"
 
 #include "CSSPropertyNames.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 #include "RenderBR.h"
 
 namespace WebCore {
index dd4f7b3..a278908 100644 (file)
@@ -29,6 +29,7 @@
 #include "FrameLoader.h"
 #include "HTMLNames.h"
 #include "KURL.h"
+#include "MappedAttribute.h"
 
 namespace WebCore {
 
index df137a9..885d332 100644 (file)
@@ -36,6 +36,7 @@
 #include "FrameView.h"
 #include "HTMLFrameElementBase.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 #include "ScriptEventListener.h"
 
 namespace WebCore {
index f8a8958..8a207bf 100644 (file)
@@ -32,6 +32,7 @@
 #include "HTMLNames.h"
 #include "ScriptEventListener.h"
 #include "KeyboardEvent.h"
+#include "MappedAttribute.h"
 #include "RenderButton.h"
 #include <wtf/StdLibExtras.h>
 
index 485df9c..f94dcd1 100644 (file)
@@ -39,6 +39,7 @@
 #include "HTMLNames.h"
 #include "ImageBuffer.h"
 #include "MIMETypeRegistry.h"
+#include "MappedAttribute.h"
 #include "Page.h"
 #include "RenderHTMLCanvas.h"
 #include "Settings.h"
index 78c9c3c..9dca48f 100644 (file)
@@ -35,7 +35,7 @@ namespace WebCore {
 
 using namespace HTMLNames;
 
-HTMLCollection::HTMLCollection(PassRefPtr<Node> base, Type type)
+HTMLCollection::HTMLCollection(PassRefPtr<Node> base, CollectionType type)
     : m_idsDone(false)
     , m_base(base)
     , m_type(type)
@@ -44,7 +44,7 @@ HTMLCollection::HTMLCollection(PassRefPtr<Node> base, Type type)
 {
 }
 
-HTMLCollection::HTMLCollection(PassRefPtr<Node> base, Type type, CollectionInfo* info)
+HTMLCollection::HTMLCollection(PassRefPtr<Node> base, CollectionType type, CollectionCache* info)
     : m_idsDone(false)
     , m_base(base)
     , m_type(type)
@@ -53,7 +53,7 @@ HTMLCollection::HTMLCollection(PassRefPtr<Node> base, Type type, CollectionInfo*
 {
 }
 
-PassRefPtr<HTMLCollection> HTMLCollection::create(PassRefPtr<Node> base, Type type)
+PassRefPtr<HTMLCollection> HTMLCollection::create(PassRefPtr<Node> base, CollectionType type)
 {
     return adoptRef(new HTMLCollection(base, type));
 }
@@ -64,74 +64,12 @@ HTMLCollection::~HTMLCollection()
         delete m_info;
 }
 
-HTMLCollection::CollectionInfo::CollectionInfo()
-    : version(0)
-{
-    reset();
-}
-
-inline void HTMLCollection::CollectionInfo::copyCacheMap(NodeCacheMap& dest, const NodeCacheMap& src)
-{
-    ASSERT(dest.isEmpty());
-    NodeCacheMap::const_iterator end = src.end();
-    for (NodeCacheMap::const_iterator it = src.begin(); it != end; ++it)
-        dest.add(it->first, new Vector<Element*>(*it->second));
-}
-
-HTMLCollection::CollectionInfo::CollectionInfo(const CollectionInfo& other)
-    : version(other.version)
-    , current(other.current)
-    , position(other.position)
-    , length(other.length)
-    , elementsArrayPosition(other.elementsArrayPosition)
-    , hasLength(other.hasLength)
-    , hasNameCache(other.hasNameCache)
-{
-    copyCacheMap(idCache, other.idCache);
-    copyCacheMap(nameCache, other.nameCache);
-}
-
-void HTMLCollection::CollectionInfo::swap(CollectionInfo& other)
-{
-    std::swap(version, other.version);
-    std::swap(current, other.current);
-    std::swap(position, other.position);
-    std::swap(length, other.length);
-    std::swap(elementsArrayPosition, other.elementsArrayPosition);
-
-    idCache.swap(other.idCache);
-    nameCache.swap(other.nameCache);
-    
-    std::swap(hasLength, other.hasLength);
-    std::swap(hasNameCache, other.hasNameCache);
-}
-
-HTMLCollection::CollectionInfo::~CollectionInfo()
-{
-    deleteAllValues(idCache);
-    deleteAllValues(nameCache);
-}
-
-void HTMLCollection::CollectionInfo::reset()
-{
-    current = 0;
-    position = 0;
-    length = 0;
-    hasLength = false;
-    elementsArrayPosition = 0;
-    deleteAllValues(idCache);
-    idCache.clear();
-    deleteAllValues(nameCache);
-    nameCache.clear();
-    hasNameCache = false;
-}
-
 void HTMLCollection::resetCollectionInfo() const
 {
     unsigned docversion = static_cast<HTMLDocument*>(m_base->document())->domTreeVersion();
 
     if (!m_info) {
-        m_info = new CollectionInfo;
+        m_info = new CollectionCache;
         m_ownsInfo = true;
         m_info->version = docversion;
         return;
@@ -164,7 +102,7 @@ Element* HTMLCollection::itemAfter(Element* previous) const
         case DocScripts:
         case DocumentNamedItems:
         case MapAreas:
-        case Other:
+        case OtherCollection:
         case SelectOptions:
         case WindowNamedItems:
             break;
@@ -245,7 +183,7 @@ Element* HTMLCollection::itemAfter(Element* previous) const
             case NodeChildren:
                 return e;
             case DocumentNamedItems:
-            case Other:
+            case OtherCollection:
             case WindowNamedItems:
                 ASSERT_NOT_REACHED();
                 break;
index 083ec05..b690520 100644 (file)
@@ -23,6 +23,7 @@
 #ifndef HTMLCollection_h
 #define HTMLCollection_h
 
+#include "CollectionType.h"
 #include <wtf/RefCounted.h>
 #include <wtf/Forward.h>
 #include <wtf/HashMap.h>
@@ -32,6 +33,7 @@ namespace WebCore {
 
 class AtomicString;
 class AtomicStringImpl;
+class CollectionCache;
 class Element;
 class Node;
 class NodeList;
@@ -39,44 +41,7 @@ class String;
 
 class HTMLCollection : public RefCounted<HTMLCollection> {
 public:
-    enum Type {
-        // unnamed collection types cached in the document
-
-        DocImages,    // all <img> elements in the document
-        DocApplets,   // all <object> and <applet> elements
-        DocEmbeds,    // all <embed> elements
-        DocObjects,   // all <object> elements
-        DocForms,     // all <form> elements
-        DocLinks,     // all <a> _and_ <area> elements with a value for href
-        DocAnchors,   // all <a> elements with a value for name
-        DocScripts,   // all <script> elements
-
-        DocAll,       // "all" elements (IE)
-        NodeChildren, // first-level children (IE)
-
-        // named collection types cached in the document
-
-        WindowNamedItems,
-        DocumentNamedItems,
-
-        // types not cached in the document; these are types that can't be used on a document
-
-        TableTBodies, // all <tbody> elements in this table
-        TSectionRows, // all row elements in this table section
-        TRCells,      // all cells in this row
-        SelectOptions,
-        MapAreas,
-
-        Other
-    };
-
-    static const Type FirstUnnamedDocumentCachedType = DocImages;
-    static const unsigned NumUnnamedDocumentCachedTypes = NodeChildren - DocImages + 1;
-
-    static const Type FirstNamedDocumentCachedType = WindowNamedItems;
-    static const unsigned NumNamedDocumentCachedTypes = DocumentNamedItems - WindowNamedItems + 1;
-
-    static PassRefPtr<HTMLCollection> create(PassRefPtr<Node> base, Type);
+    static PassRefPtr<HTMLCollection> create(PassRefPtr<Node> base, CollectionType);
     virtual ~HTMLCollection();
     
     unsigned length() const;
@@ -94,52 +59,18 @@ public:
     PassRefPtr<NodeList> tags(const String&);
 
     Node* base() const { return m_base.get(); }
-    Type type() const { return m_type; }
-
-    // FIXME: This class name is a bad in two ways. First, "info" is much too vague,
-    // and doesn't convey the job of this class (caching collection state).
-    // Second, since this is a member of HTMLCollection, it doesn't need "collection"
-    // in its name.
-    struct CollectionInfo {
-        CollectionInfo();
-        CollectionInfo(const CollectionInfo&);
-        CollectionInfo& operator=(const CollectionInfo& other)
-        {
-            CollectionInfo tmp(other);    
-            swap(tmp);
-            return *this;
-        }
-        ~CollectionInfo();
-
-        void reset();
-        void swap(CollectionInfo&);
-
-        typedef HashMap<AtomicStringImpl*, Vector<Element*>*> NodeCacheMap;
-
-        unsigned version;
-        Element* current;
-        unsigned position;
-        unsigned length;
-        int elementsArrayPosition;
-        NodeCacheMap idCache;
-        NodeCacheMap nameCache;
-        bool hasLength;
-        bool hasNameCache;
-
-    private:
-        static void copyCacheMap(NodeCacheMap&, const NodeCacheMap&);
-    };
+    CollectionType type() const { return m_type; }
 
 protected:
-    HTMLCollection(PassRefPtr<Node> base, Type, CollectionInfo*);
+    HTMLCollection(PassRefPtr<Node> base, CollectionType, CollectionCache*);
 
-    CollectionInfo* info() const { return m_info; }
-    virtual void resetCollectionInfo() const;
+    CollectionCache* info() const { return m_info; }
+    void resetCollectionInfo() const;
 
     mutable bool m_idsDone; // for nextNamedItem()
 
 private:
-    HTMLCollection(PassRefPtr<Node> base, Type);
+    HTMLCollection(PassRefPtr<Node> base, CollectionType);
 
     virtual Element* itemAfter(Element*) const;
     virtual unsigned calcLength() const;
@@ -148,9 +79,9 @@ private:
     bool checkForNameMatch(Element*, bool checkName, const AtomicString& name) const;
 
     RefPtr<Node> m_base;
-    Type m_type;
+    CollectionType m_type;
 
-    mutable CollectionInfo* m_info;
+    mutable CollectionCache* m_info;
     mutable bool m_ownsInfo;
 };
 
index 7ffccd7..bd7195e 100644 (file)
  * Boston, MA 02110-1301, USA.
  *
  */
+
 #include "config.h"
 #include "HTMLDivElement.h"
 
 #include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 
 namespace WebCore {
 
index 9a34742..20edc11 100644 (file)
 #include "ExceptionCode.h"
 #include "Frame.h"
 #include "HTMLBRElement.h"
+#include "HTMLCollection.h"
 #include "HTMLDocument.h"
 #include "HTMLElementFactory.h"
 #include "HTMLFormElement.h"
 #include "HTMLNames.h"
 #include "HTMLTokenizer.h"
-#include "ScriptEventListener.h"
+#include "MappedAttribute.h"
 #include "RenderWordBreak.h"
+#include "ScriptEventListener.h"
 #include "Settings.h"
 #include "Text.h"
 #include "TextIterator.h"
@@ -768,7 +770,7 @@ void HTMLElement::setTabIndex(int value)
 
 PassRefPtr<HTMLCollection> HTMLElement::children()
 {
-    return HTMLCollection::create(this, HTMLCollection::NodeChildren);
+    return HTMLCollection::create(this, NodeChildren);
 }
 
 // DOM Section 1.1.1
index 9751432..2500dd6 100644 (file)
@@ -31,6 +31,7 @@
 #include "HTMLImageLoader.h"
 #include "HTMLNames.h"
 #include "HTMLObjectElement.h"
+#include "MappedAttribute.h"
 #include "RenderImage.h"
 #include "RenderPartObject.h"
 #include "RenderWidget.h"
index 91b6448..d19032a 100644 (file)
@@ -26,6 +26,7 @@
 #include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 
 using namespace WTF;
 
index 03796d6..812d98a 100644 (file)
@@ -23,6 +23,7 @@
 #include "config.h"
 #include "HTMLFormCollection.h"
 
+#include "CollectionCache.h"
 #include "HTMLFormControlElement.h"
 #include "HTMLFormElement.h"
 #include "HTMLImageElement.h"
@@ -35,15 +36,15 @@ using namespace HTMLNames;
 // Since the collections are to be "live", we have to do the
 // calculation every time if anything has changed.
 
-inline HTMLCollection::CollectionInfo* HTMLFormCollection::formCollectionInfo(HTMLFormElement* form)
+inline CollectionCache* HTMLFormCollection::formCollectionInfo(HTMLFormElement* form)
 {
     if (!form->collectionInfo)
-        form->collectionInfo = new CollectionInfo;
+        form->collectionInfo = new CollectionCache;
     return form->collectionInfo;
 }
 
 HTMLFormCollection::HTMLFormCollection(PassRefPtr<HTMLFormElement> form)
-    : HTMLCollection(form.get(), Other, formCollectionInfo(form.get()))
+    : HTMLCollection(form.get(), OtherCollection, formCollectionInfo(form.get()))
 {
 }
 
index 524a59b..a204446 100644 (file)
@@ -51,7 +51,7 @@ private:
     virtual void updateNameCache() const;
     virtual unsigned calcLength() const;
 
-    static CollectionInfo* formCollectionInfo(HTMLFormElement*);
+    static CollectionCache* formCollectionInfo(HTMLFormElement*);
 
     Element* getNamedItem(const QualifiedName& attrName, const AtomicString& name) const;
     Element* nextNamedItemInternal(const String& name) const;
index d723cae..f22a6ad 100644 (file)
@@ -34,6 +34,7 @@
 #include "HTMLNames.h"
 #include "HTMLParser.h"
 #include "HTMLTokenizer.h"
+#include "MappedAttribute.h"
 #include "RenderBox.h"
 #include "RenderTheme.h"
 
index 676918a..bad1550 100644 (file)
@@ -44,6 +44,7 @@
 #include "HTMLNames.h"
 #include "ScriptEventListener.h"
 #include "MIMETypeRegistry.h"
+#include "MappedAttribute.h"
 #include "Page.h"
 #include "RenderTextControl.h"
 #include <limits>
 #include <wx/filename.h>
 #endif
 
-#if PLATFORM(WIN_OS)
-#include <shlwapi.h>
-#endif
-
 using namespace std;
 
 namespace WebCore {
index 82c4b6a..d4ac085 100644 (file)
 
 #include "CheckedRadioButtons.h"
 #include "FormDataBuilder.h"
-#include "HTMLCollection.h" 
 #include "HTMLElement.h"
-
 #include <wtf/OwnPtr.h>
 
 namespace WebCore {
 
+class CollectionCache;
 class Event;
 class FormData;
 class HTMLFormControlElement;
@@ -134,7 +133,7 @@ private:
 
     FormDataBuilder m_formDataBuilder;
     AliasMap* m_elementAliases;
-    HTMLCollection::CollectionInfo* collectionInfo;
+    CollectionCache* collectionInfo;
 
     CheckedRadioButtons m_checkedRadioButtons;
     
index 6f8f256..adc3ff1 100644 (file)
@@ -27,6 +27,7 @@
 #include "Frame.h"
 #include "HTMLFrameSetElement.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 #include "RenderFrame.h"
 
 namespace WebCore {
index 2e24af9..1e09595 100644 (file)
@@ -36,6 +36,7 @@
 #include "HTMLNames.h"
 #include "ScriptEventListener.h"
 #include "KURL.h"
+#include "MappedAttribute.h"
 #include "Page.h"
 #include "RenderFrame.h"
 #include "Settings.h"
index 8547828..61f9f71 100644 (file)
@@ -31,7 +31,7 @@
 #include "HTMLNames.h"
 #include "ScriptEventListener.h"
 #include "Length.h"
-#include "Length.h"
+#include "MappedAttribute.h"
 #include "MouseEvent.h"
 #include "RenderFrameSet.h"
 #include "Text.h"
index 8be23fd..d6cc58e 100644 (file)
  * Boston, MA 02110-1301, USA.
  *
  */
+
 #include "config.h"
 #include "HTMLHRElement.h"
 
 #include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 
 namespace WebCore {
 
index f8aecd2..a190bca 100644 (file)
@@ -28,6 +28,7 @@
 #include "Frame.h"
 #include "HTMLDocument.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 #include "RenderPartObject.h"
 
 namespace WebCore {
index 5735901..c4bf5dc 100644 (file)
@@ -30,8 +30,9 @@
 #include "HTMLDocument.h"
 #include "HTMLFormElement.h"
 #include "HTMLNames.h"
-#include "ScriptEventListener.h"
+#include "MappedAttribute.h"
 #include "RenderImage.h"
+#include "ScriptEventListener.h"
 
 using namespace std;
 
index f34c6e6..8d04d6c 100644 (file)
@@ -44,6 +44,7 @@
 #include "ScriptEventListener.h"
 #include "KeyboardEvent.h"
 #include "LocalizedStrings.h"
+#include "MappedAttribute.h"
 #include "MouseEvent.h"
 #include "Page.h"
 #include "RenderButton.h"
index 7bc98b6..ebdf752 100644 (file)
@@ -24,7 +24,9 @@
 
 #include "config.h"
 #include "HTMLIsIndexElement.h"
+
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 
 namespace WebCore {
 
index 563ad3c..bc9778c 100644 (file)
@@ -29,6 +29,7 @@
 #include "FormDataList.h"
 #include "HTMLNames.h"
 #include "HTMLOptionElement.h"
+#include "MappedAttribute.h"
 #include "SSLKeyGenerator.h"
 #include "Text.h"
 #include <wtf/StdLibExtras.h>
index 2d5518e..044b93c 100644 (file)
@@ -26,6 +26,7 @@
 #include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 #include "RenderListItem.h"
 
 namespace WebCore {
index 28bf2fa..16bb302 100644 (file)
@@ -33,6 +33,7 @@
 #include "FrameLoaderClient.h"
 #include "FrameTree.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 #include "MediaList.h"
 #include "MediaQueryEvaluator.h"
 #include "Page.h"
index d7109c9..90204e0 100644 (file)
@@ -18,6 +18,7 @@
  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301, USA.
  */
+
 #include "config.h"
 #include "HTMLMapElement.h"
 
@@ -25,8 +26,9 @@
 #include "HTMLAreaElement.h"
 #include "HTMLCollection.h"
 #include "HTMLNames.h"
-#include "IntSize.h"
 #include "HitTestResult.h"
+#include "IntSize.h"
+#include "MappedAttribute.h"
 
 using namespace std;
 
@@ -96,7 +98,7 @@ void HTMLMapElement::parseMappedAttribute(MappedAttribute* attr)
 
 PassRefPtr<HTMLCollection> HTMLMapElement::areas()
 {
-    return HTMLCollection::create(this, HTMLCollection::MapAreas);
+    return HTMLCollection::create(this, MapAreas);
 }
 
 String HTMLMapElement::name() const
index fc097b1..d62eaab 100644 (file)
  * Boston, MA 02110-1301, USA.
  *
  */
+
 #include "config.h"
 #include "HTMLMarqueeElement.h"
 
 #include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 #include "RenderLayer.h"
 #include "RenderMarquee.h"
 
index 81702a2..fad5186 100644 (file)
 #if ENABLE(VIDEO)
 #include "HTMLMediaElement.h"
 
-#include "ContentType.h"
 #include "CSSHelper.h"
 #include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
+#include "ContentType.h"
 #include "DocLoader.h"
 #include "Event.h"
 #include "EventNames.h"
 #include "HTMLNames.h"
 #include "HTMLSourceElement.h"
 #include "HTMLVideoElement.h"
-#include <limits>
+#include "MIMETypeRegistry.h"
+#include "MappedAttribute.h"
 #include "MediaDocument.h"
 #include "MediaError.h"
 #include "MediaList.h"
-#include "MediaQueryEvaluator.h"
-#include "MIMETypeRegistry.h"
 #include "MediaPlayer.h"
+#include "MediaQueryEvaluator.h"
 #include "Page.h"
 #include "ProgressEvent.h"
 #include "RenderVideo.h"
-#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
-#include "RenderPartObject.h"
-#endif
 #include "TimeRanges.h"
+#include <limits>
+#include <limits>
+#include <wtf/CurrentTime.h>
+#include <wtf/MathExtras.h>
+
 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+#include "RenderPartObject.h"
 #include "Widget.h"
 #endif
-#include <wtf/CurrentTime.h>
-#include <wtf/MathExtras.h>
-#include <limits>
 
 using namespace std;
 
index c2fb199..cf667ca 100644 (file)
  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301, USA.
  */
+
 #include "config.h"
 #include "HTMLMetaElement.h"
 
 #include "Document.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 
 namespace WebCore {
 
index fdebe78..d5657da 100644 (file)
@@ -32,7 +32,7 @@ namespace WebCore {
 
 using namespace HTMLNames;
 
-HTMLNameCollection::HTMLNameCollection(PassRefPtr<Document> document, Type type, const String& name)
+HTMLNameCollection::HTMLNameCollection(PassRefPtr<Document> document, CollectionType type, const String& name)
     : HTMLCollection(document.get(), type, document->nameCollectionInfo(type, name))
     , m_name(name)
 {
index 9add926..3e990d7 100644 (file)
@@ -32,13 +32,13 @@ class Document;
 
 class HTMLNameCollection : public HTMLCollection {
 public:
-    static PassRefPtr<HTMLNameCollection> create(PassRefPtr<Document> document, Type type, const String& name)
+    static PassRefPtr<HTMLNameCollection> create(PassRefPtr<Document> document, CollectionType type, const String& name)
     {
         return adoptRef(new HTMLNameCollection(document, type, name));
     }
     
 private:
-    HTMLNameCollection(PassRefPtr<Document>, Type, const String& name);
+    HTMLNameCollection(PassRefPtr<Document>, CollectionType, const String& name);
 
     virtual Element* itemAfter(Element*) const;
 
index c1e0d7c..63fd437 100644 (file)
  * Boston, MA 02110-1301, USA.
  *
  */
+
 #include "config.h"
 #include "HTMLOListElement.h"
 
 #include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 #include "RenderListItem.h"
 
 namespace WebCore {
index 6973852..6be41c9 100644 (file)
@@ -34,6 +34,7 @@
 #include "HTMLNames.h"
 #include "ScriptEventListener.h"
 #include "MIMETypeRegistry.h"
+#include "MappedAttribute.h"
 #include "RenderImage.h"
 #include "RenderPartObject.h"
 #include "RenderWidget.h"
index 982f578..efeab29 100644 (file)
 #include "ExceptionCode.h"
 #include "HTMLNames.h"
 #include "HTMLSelectElement.h"
+#include "MappedAttribute.h"
+#include "NodeRenderStyle.h"
 #include "RenderMenuList.h"
 #include "Text.h"
-#include "NodeRenderStyle.h"
 #include <wtf/StdLibExtras.h>
 #include <wtf/Vector.h>
 
index 44eaecc..a8deb10 100644 (file)
@@ -19,6 +19,7 @@
  * Boston, MA 02110-1301, USA.
  *
  */
+
 #include "config.h"
 #include "HTMLParagraphElement.h"
 
@@ -26,6 +27,7 @@
 #include "CSSValueKeywords.h"
 #include "Document.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 
 namespace WebCore {
 
index 6e1197b..d5fc6e7 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "Document.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 
 namespace WebCore {
 
index 3702490..d950d9d 100644 (file)
@@ -21,6 +21,7 @@
  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301, USA.
  */
+
 #include "config.h"
 #include "HTMLPlugInElement.h"
 
@@ -30,6 +31,7 @@
 #include "FrameLoader.h"
 #include "FrameTree.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 #include "Page.h"
 #include "RenderWidget.h"
 #include "ScriptController.h"
index 23ecaaa..f340ae3 100644 (file)
  * Boston, MA 02110-1301, USA.
  *
  */
+
 #include "config.h"
 #include "HTMLPreElement.h"
 
 #include "CSSPropertyNames.h"
 #include "CSSValueKeywords.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 
 namespace WebCore {
 
index cd2915e..86cc3a2 100644 (file)
@@ -26,6 +26,7 @@
 #include "Document.h"
 #include "EventNames.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 #include "ScriptEventListener.h"
 #include "Text.h"
 
index 1f1bc4f..c84b7b6 100644 (file)
@@ -22,6 +22,7 @@
  *
  */
  
+
 #include "config.h"
 #include "HTMLSelectElement.h"
 
@@ -44,6 +45,7 @@
 #include "HTMLOptionsCollection.h"
 #include "ScriptEventListener.h"
 #include "KeyboardEvent.h"
+#include "MappedAttribute.h"
 #include "MouseEvent.h"
 #include "Page.h"
 #include "RenderListBox.h"
index 600f096..5d7bff2 100644 (file)
@@ -24,8 +24,8 @@
 #ifndef HTMLSelectElement_h
 #define HTMLSelectElement_h
 
+#include "CollectionCache.h"
 #include "Event.h"
-#include "HTMLCollection.h"
 #include "HTMLFormControlElement.h"
 #include <wtf/Vector.h>
 
@@ -119,7 +119,7 @@ public:
     Node* namedItem(const AtomicString& name);
     Node* item(unsigned index);
 
-    HTMLCollection::CollectionInfo* collectionInfo() { return &m_collectionInfo; }
+    CollectionCache* collectionInfo() { return &m_collectionInfo; }
     
     void setActiveSelectionAnchorIndex(int index);
     void setActiveSelectionEndIndex(int index) { m_activeSelectionEndIndex = index; }
@@ -165,7 +165,7 @@ private:
     DOMTimeStamp m_lastCharTime;
     String m_typedString;
 
-    HTMLCollection::CollectionInfo m_collectionInfo;
+    CollectionCache m_collectionInfo;
 };
 
 #ifdef NDEBUG
index bed1cdc..f6b5924 100644 (file)
  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301, USA.
  */
+
 #include "config.h"
 #include "HTMLStyleElement.h"
 
 #include "Document.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 
 namespace WebCore {
 
index 35cf8a1..2c94727 100644 (file)
  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301, USA.
  */
+
 #include "config.h"
 #include "HTMLTableCaptionElement.h"
 
 #include "CSSPropertyNames.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 
 namespace WebCore {
 
index 01af2ad..878549d 100644 (file)
@@ -23,6 +23,7 @@
  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301, USA.
  */
+
 #include "config.h"
 #include "HTMLTableCellElement.h"
 
@@ -30,6 +31,7 @@
 #include "CSSValueKeywords.h"
 #include "HTMLNames.h"
 #include "HTMLTableElement.h"
+#include "MappedAttribute.h"
 #include "RenderTableCell.h"
 
 using std::max;
index 11f6df6..ae18ab1 100644 (file)
  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301, USA.
  */
+
 #include "config.h"
 #include "HTMLTableColElement.h"
 
 #include "CSSPropertyNames.h"
 #include "HTMLNames.h"
-#include "RenderTableCol.h"
 #include "HTMLTableElement.h"
+#include "MappedAttribute.h"
+#include "RenderTableCol.h"
 #include "Text.h"
 
 namespace WebCore {
index dc4f369..e37c171 100644 (file)
 #include "ExceptionCode.h"
 #include "HTMLNames.h"
 #include "HTMLTableCaptionElement.h"
-#include "HTMLTableRowsCollection.h"
 #include "HTMLTableRowElement.h"
+#include "HTMLTableRowsCollection.h"
 #include "HTMLTableSectionElement.h"
+#include "MappedAttribute.h"
 #include "RenderTable.h"
 #include "Text.h"
 
@@ -655,7 +656,7 @@ PassRefPtr<HTMLCollection> HTMLTableElement::rows()
 
 PassRefPtr<HTMLCollection> HTMLTableElement::tBodies()
 {
-    return HTMLCollection::create(this, HTMLCollection::TableTBodies);
+    return HTMLCollection::create(this, TableTBodies);
 }
 
 String HTMLTableElement::align() const
index 6341197..19babf6 100644 (file)
@@ -23,6 +23,7 @@
  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301, USA.
  */
+
 #include "config.h"
 #include "HTMLTablePartElement.h"
 
@@ -31,6 +32,7 @@
 #include "CSSValueKeywords.h"
 #include "Document.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 
 namespace WebCore {
 
index 98d928a..94be02e 100644 (file)
@@ -168,7 +168,7 @@ void HTMLTableRowElement::deleteCell(int index, ExceptionCode& ec)
 
 PassRefPtr<HTMLCollection> HTMLTableRowElement::cells()
 {
-    return HTMLCollection::create(this, HTMLCollection::TRCells);
+    return HTMLCollection::create(this, TRCells);
 }
 
 void HTMLTableRowElement::setCells(HTMLCollection *, ExceptionCode& ec)
index 7047576..b38c271 100644 (file)
@@ -149,7 +149,7 @@ HTMLTableRowElement* HTMLTableRowsCollection::lastRow(HTMLTableElement* table)
 }
 
 HTMLTableRowsCollection::HTMLTableRowsCollection(PassRefPtr<HTMLTableElement> table)
-    : HTMLCollection(table, Other, 0)
+    : HTMLCollection(table, OtherCollection, 0)
 {
 }
 
index 900976c..e91a96a 100644 (file)
@@ -167,7 +167,7 @@ void HTMLTableSectionElement::setVAlign(const String &value)
 
 PassRefPtr<HTMLCollection> HTMLTableSectionElement::rows()
 {
-    return HTMLCollection::create(this, HTMLCollection::TSectionRows);
+    return HTMLCollection::create(this, TSectionRows);
 }
 
 }
index 64e81a1..6d241f5 100644 (file)
 #include "FormDataList.h"
 #include "Frame.h"
 #include "HTMLNames.h"
-#include "ScriptEventListener.h"
+#include "MappedAttribute.h"
 #include "Page.h"
 #include "RenderStyle.h"
 #include "RenderTextControlMultiLine.h"
-#include "VisibleSelection.h"
+#include "ScriptEventListener.h"
 #include "Text.h"
+#include "VisibleSelection.h"
 #include <wtf/StdLibExtras.h>
 
 namespace WebCore {
index fa32b86..2ed72f2 100644 (file)
@@ -41,6 +41,7 @@
 #include "HTMLParser.h"
 #include "HTMLScriptElement.h"
 #include "HTMLViewSourceDocument.h"
+#include "MappedAttribute.h"
 #include "Page.h"
 #include "PreloadScanner.h"
 #include "ScriptController.h"
index c1a7644..f36cb57 100644 (file)
  * Boston, MA 02110-1301, USA.
  *
  */
+
 #include "config.h"
 #include "HTMLUListElement.h"
 
 #include "CSSPropertyNames.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 
 namespace WebCore {
 
index b0aac3c..d465b73 100644 (file)
@@ -33,6 +33,7 @@
 #include "Document.h"
 #include "HTMLImageLoader.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 #include "RenderImage.h"
 #include "RenderVideo.h"
 
index 596f16e..431f2fa 100644 (file)
 #include "HTMLViewSourceDocument.h"
 
 #include "DOMImplementation.h"
-#include "HTMLTokenizer.h"
-#include "HTMLHtmlElement.h"
 #include "HTMLAnchorElement.h"
 #include "HTMLBodyElement.h"
 #include "HTMLDivElement.h"
-#include "HTMLTableElement.h"
+#include "HTMLHtmlElement.h"
+#include "HTMLNames.h"
 #include "HTMLTableCellElement.h"
+#include "HTMLTableElement.h"
 #include "HTMLTableRowElement.h"
 #include "HTMLTableSectionElement.h"
+#include "HTMLTokenizer.h"
+#include "MappedAttribute.h"
 #include "Text.h"
 #include "TextDocument.h"
-#include "HTMLNames.h"
 
 namespace WebCore {
 
index 0f82efd..08f2e9a 100644 (file)
@@ -25,6 +25,7 @@
 #include "config.h"
 #include "ImageDocument.h"
 
+#include "CSSStyleDeclaration.h"
 #include "CachedImage.h"
 #include "DocumentLoader.h"
 #include "Element.h"
index 97d53ac..c16ff99 100644 (file)
@@ -32,6 +32,7 @@
 #include "ApplyStyleCommand.h"
 #include "BeforeUnloadEvent.h"
 #include "CSSComputedStyleDeclaration.h"
+#include "CSSMutableStyleDeclaration.h"
 #include "CSSProperty.h"
 #include "CSSPropertyNames.h"
 #include "CachedCSSStyleSheet.h"
index accd790..79d1724 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "RenderTreeAsText.h"
 
+#include "CSSMutableStyleDeclaration.h"
 #include "CharacterNames.h"
 #include "Document.h"
 #include "Frame.h"
 
 #if ENABLE(SVG)
 #include "RenderPath.h"
-#include "RenderSVGRoot.h"
 #include "RenderSVGContainer.h"
 #include "RenderSVGImage.h"
 #include "RenderSVGInlineText.h"
+#include "RenderSVGRoot.h"
 #include "RenderSVGText.h"
 #include "SVGRenderTreeAsText.h"
 #endif
index d172de3..6fd0274 100644 (file)
 #include "Frame.h"
 #include "FrameLoader.h"
 #include "KeyboardEvent.h"
+#include "MappedAttribute.h"
 #include "MouseEvent.h"
 #include "PlatformMouseEvent.h"
-#include "RenderSVGTransformableContainer.h"
 #include "RenderSVGInline.h"
+#include "RenderSVGTransformableContainer.h"
 #include "ResourceRequest.h"
-#include "SVGSMILElement.h"
 #include "SVGNames.h"
+#include "SVGSMILElement.h"
 #include "XLinkNames.h"
 
 namespace WebCore {
index 861f353..44bf5fb 100644 (file)
 */
 
 #include "config.h"
+
 #if ENABLE(SVG) && ENABLE(SVG_ANIMATION)
 #include "SVGAnimateMotionElement.h"
 
+#include "MappedAttribute.h"
 #include "RenderObject.h"
 #include "SVGElementInstance.h"
 #include "SVGMPathElement.h"
index 99e4c42..3ebba06 100644 (file)
 */
 
 #include "config.h"
+
 #if ENABLE(SVG) && ENABLE(SVG_ANIMATION)
 #include "SVGAnimateTransformElement.h"
 
-#include "TransformationMatrix.h"
+#include "MappedAttribute.h"
 #include "RenderObject.h"
 #include "SVGAngle.h"
 #include "SVGElementInstance.h"
@@ -37,7 +38,7 @@
 #include "SVGTransform.h"
 #include "SVGTransformList.h"
 #include "SVGUseElement.h"
-
+#include "TransformationMatrix.h"
 #include <math.h>
 #include <wtf/MathExtras.h>
 
index d77c43c..b817ad8 100644 (file)
@@ -23,6 +23,7 @@
 */
 
 #include "config.h"
+
 #if ENABLE(SVG_ANIMATION)
 #include "SVGAnimationElement.h"
 
@@ -34,6 +35,7 @@
 #include "EventListener.h"
 #include "FloatConversion.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 #include "SVGElementInstance.h"
 #include "SVGNames.h"
 #include "SVGURIReference.h"
index 8817506..0c48f51 100644 (file)
@@ -26,6 +26,7 @@
 #include "SVGCircleElement.h"
 
 #include "FloatPoint.h"
+#include "MappedAttribute.h"
 #include "RenderPath.h"
 #include "SVGLength.h"
 #include "SVGNames.h"
index a41bb45..691e4d5 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "CSSStyleSelector.h"
 #include "Document.h"
+#include "MappedAttribute.h"
 #include "SVGNames.h"
 #include "SVGTransformList.h"
 #include "SVGUnitTypes.h"
index 1ad8b1f..12e9e5d 100644 (file)
@@ -27,8 +27,9 @@
 
 #include "Attr.h"
 #include "Document.h"
-#include "SVGNames.h"
+#include "MappedAttribute.h"
 #include "SVGLength.h"
+#include "SVGNames.h"
 
 namespace WebCore {
 
index c216116..3a7d3d4 100644 (file)
@@ -33,8 +33,7 @@
 #include "EventNames.h"
 #include "FrameView.h"
 #include "HTMLNames.h"
-#include "ScriptEventListener.h"
-#include "PlatformString.h"
+#include "MappedAttribute.h"
 #include "RegisteredEventListener.h"
 #include "RenderObject.h"
 #include "SVGCursorElement.h"
@@ -45,6 +44,7 @@
 #include "SVGSVGElement.h"
 #include "SVGURIReference.h"
 #include "SVGUseElement.h"
+#include "ScriptEventListener.h"
 #include "XMLNames.h"
 
 namespace WebCore {
index a07a9a7..6d56ff8 100644 (file)
@@ -26,6 +26,7 @@
 #include "SVGEllipseElement.h"
 
 #include "FloatPoint.h"
+#include "MappedAttribute.h"
 #include "RenderPath.h"
 #include "SVGLength.h"
 #include "SVGNames.h"
index d087f64..640f92e 100644 (file)
@@ -26,8 +26,9 @@
 #include "SVGExternalResourcesRequired.h"
 
 #include "Attr.h"
-#include "SVGNames.h"
+#include "MappedAttribute.h"
 #include "SVGElement.h"
+#include "SVGNames.h"
 
 namespace WebCore {
 
index 13e4c03..847038c 100644 (file)
 #if ENABLE(SVG)
 #include "SVGFitToViewBox.h"
 
-#include "TransformationMatrix.h"
 #include "Document.h"
 #include "FloatRect.h"
+#include "MappedAttribute.h"
 #include "SVGNames.h"
 #include "SVGParserUtilities.h"
 #include "SVGPreserveAspectRatio.h"
 #include "StringImpl.h"
+#include "TransformationMatrix.h"
 
 namespace WebCore {
 
index 973e890..1e5a0fe 100644 (file)
@@ -23,6 +23,7 @@
 
 #if ENABLE(SVG_FONTS)
 #include "SVGFontFaceElement.h"
+
 #include "CString.h"
 #include "CSSFontFaceRule.h"
 #include "CSSFontFaceSrcValue.h"
 #include "CSSValueList.h"
 #include "Document.h"
 #include "Font.h"
+#include "MappedAttribute.h"
 #include "SVGDefinitionSrcElement.h"
 #include "SVGFontElement.h"
 #include "SVGFontFaceSrcElement.h"
 #include "SVGGlyphElement.h"
 #include "SVGNames.h"
-
 #include <math.h>
 
 namespace WebCore {
index 3509691..096f0c2 100644 (file)
@@ -27,6 +27,7 @@
 #include "CachedFont.h"
 #include "DocLoader.h"
 #include "Document.h"
+#include "MappedAttribute.h"
 #include "SVGFontFaceElement.h"
 #include "SVGNames.h"
 #include "XLinkNames.h"
index 32748df..5cfca8a 100644 (file)
 #include "SVGForeignObjectElement.h"
 
 #include "CSSPropertyNames.h"
+#include "MappedAttribute.h"
 #include "RenderForeignObject.h"
-#include "SVGNames.h"
 #include "SVGLength.h"
-
+#include "SVGNames.h"
 #include <wtf/Assertions.h>
 
 namespace WebCore {
index ebf5dd0..7be0181 100644 (file)
 #if ENABLE(SVG_FONTS)
 #include "SVGGlyphElement.h"
 
+#include "MappedAttribute.h"
+#include "SVGFontData.h"
 #include "SVGFontElement.h"
 #include "SVGFontFaceElement.h"
-#include "SVGFontData.h"
 #include "SVGNames.h"
 #include "SVGParserUtilities.h"
 #include "SimpleFontData.h"
index e4e3213..8034286 100644 (file)
@@ -26,6 +26,7 @@
 #include "SVGGradientElement.h"
 
 #include "CSSStyleSelector.h"
+#include "MappedAttribute.h"
 #include "RenderPath.h"
 #include "RenderSVGHiddenContainer.h"
 #include "SVGNames.h"
index c827c89..9aff93d 100644 (file)
@@ -27,6 +27,7 @@
 #include "SVGImageElement.h"
 
 #include "CSSPropertyNames.h"
+#include "MappedAttribute.h"
 #include "RenderSVGImage.h"
 #include "SVGDocument.h"
 #include "SVGLength.h"
index 099934d..d49e09a 100644 (file)
@@ -25,6 +25,7 @@
 #if ENABLE(SVG)
 #include "SVGLangSpace.h"
 
+#include "MappedAttribute.h"
 #include "SVGElement.h"
 #include "XMLNames.h"
 #include <wtf/StdLibExtras.h>
index 12f54e3..17c110c 100644 (file)
@@ -26,6 +26,7 @@
 #include "SVGLineElement.h"
 
 #include "FloatPoint.h"
+#include "MappedAttribute.h"
 #include "RenderPath.h"
 #include "SVGLength.h"
 #include "SVGNames.h"
index d2d1798..9927a50 100644 (file)
@@ -28,6 +28,7 @@
 #include "Document.h"
 #include "FloatPoint.h"
 #include "LinearGradientAttributes.h"
+#include "MappedAttribute.h"
 #include "SVGLength.h"
 #include "SVGNames.h"
 #include "SVGPaintServerLinearGradient.h"
index a89c478..5580993 100644 (file)
@@ -23,6 +23,7 @@
 #if ENABLE(SVG)
 #include "SVGMarkerElement.h"
 
+#include "MappedAttribute.h"
 #include "PlatformString.h"
 #include "RenderSVGViewportContainer.h"
 #include "SVGAngle.h"
index 9f9ae34..d2679fa 100644 (file)
@@ -29,6 +29,7 @@
 #include "CSSStyleSelector.h"
 #include "GraphicsContext.h"
 #include "ImageBuffer.h"
+#include "MappedAttribute.h"
 #include "RenderSVGContainer.h"
 #include "SVGLength.h"
 #include "SVGNames.h"
index bdd60e5..172cac1 100644 (file)
@@ -25,6 +25,7 @@
 #if ENABLE(SVG)
 #include "SVGPathElement.h"
 
+#include "MappedAttribute.h"
 #include "RenderPath.h"
 #include "SVGNames.h"
 #include "SVGParserUtilities.h"
index a52a1a1..bfc9c4a 100644 (file)
 #if ENABLE(SVG)
 #include "SVGPatternElement.h"
 
-#include "TransformationMatrix.h"
 #include "Document.h"
 #include "FloatConversion.h"
 #include "GraphicsContext.h"
 #include "ImageBuffer.h"
+#include "MappedAttribute.h"
 #include "PatternAttributes.h"
 #include "RenderSVGContainer.h"
 #include "SVGLength.h"
 #include "SVGNames.h"
 #include "SVGPaintServerPattern.h"
 #include "SVGRenderSupport.h"
-#include "SVGStyledTransformableElement.h"
 #include "SVGSVGElement.h"
+#include "SVGStyledTransformableElement.h"
 #include "SVGTransformList.h"
 #include "SVGTransformable.h"
 #include "SVGUnitTypes.h"
-
+#include "TransformationMatrix.h"
 #include <math.h>
-#include <wtf/OwnPtr.h>
 #include <wtf/MathExtras.h>
+#include <wtf/OwnPtr.h>
 
 using namespace std;
 
index 3d15a43..db39c52 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "Document.h"
 #include "FloatPoint.h"
+#include "MappedAttribute.h"
 #include "RenderPath.h"
 #include "SVGAnimatedProperty.h"
 #include "SVGNames.h"
index abc11fb..23a8579 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "FloatConversion.h"
 #include "FloatPoint.h"
+#include "MappedAttribute.h"
 #include "RadialGradientAttributes.h"
 #include "RenderObject.h"
 #include "SVGLength.h"
index 367e12e..bfb6205 100644 (file)
@@ -25,6 +25,7 @@
 #if ENABLE(SVG)
 #include "SVGRectElement.h"
 
+#include "MappedAttribute.h"
 #include "RenderPath.h"
 #include "SVGLength.h"
 #include "SVGNames.h"
index f44a54e..fcecd8c 100644 (file)
@@ -24,7 +24,6 @@
 #if ENABLE(SVG)
 #include "SVGSVGElement.h"
 
-#include "TransformationMatrix.h"
 #include "CSSHelper.h"
 #include "CSSPropertyNames.h"
 #include "Document.h"
 #include "FloatRect.h"
 #include "Frame.h"
 #include "HTMLNames.h"
-#include "ScriptEventListener.h"
-#include "RenderSVGViewportContainer.h"
+#include "MappedAttribute.h"
 #include "RenderSVGRoot.h"
+#include "RenderSVGViewportContainer.h"
+#include "SMILTimeContainer.h"
 #include "SVGAngle.h"
 #include "SVGLength.h"
 #include "SVGNames.h"
@@ -46,8 +46,9 @@
 #include "SVGViewElement.h"
 #include "SVGViewSpec.h"
 #include "SVGZoomEvent.h"
+#include "ScriptEventListener.h"
 #include "SelectionController.h"
-#include "SMILTimeContainer.h"
+#include "TransformationMatrix.h"
 #include <wtf/StdLibExtras.h>
 
 namespace WebCore {
index c9bb986..2ecf912 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "Document.h"
 #include "EventNames.h"
+#include "MappedAttribute.h"
 #include "SVGNames.h"
 
 namespace WebCore {
index f06c693..51582d7 100644 (file)
@@ -26,6 +26,7 @@
 #include "SVGStopElement.h"
 
 #include "Document.h"
+#include "MappedAttribute.h"
 #include "RenderSVGGradientStop.h"
 #include "SVGGradientElement.h"
 #include "SVGNames.h"
index 2f59680..72f70e6 100644 (file)
@@ -22,6 +22,7 @@
 */
 
 #include "config.h"
+
 #if ENABLE(SVG)
 #include "SVGStyleElement.h"
 
@@ -29,6 +30,7 @@
 #include "Document.h"
 #include "ExceptionCode.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 #include "XMLNames.h"
 #include <wtf/StdLibExtras.h>
 
index add39f1..e938818 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "config.h"
+
 #if ENABLE(SVG)
 #include "SVGStyledElement.h"
 
 #include "CString.h"
 #include "Document.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 #include "PlatformString.h"
+#include "RenderObject.h"
 #include "SVGElement.h"
 #include "SVGElementInstance.h"
 #include "SVGNames.h"
-#include "RenderObject.h"
 #include "SVGRenderStyle.h"
 #include "SVGResource.h"
 #include "SVGSVGElement.h"
index 901ab0f..b7cf979 100644 (file)
 #include "SVGStyledTransformableElement.h"
 
 #include "Attr.h"
+#include "MappedAttribute.h"
 #include "RenderPath.h"
 #include "SVGDocument.h"
-#include "TransformationMatrix.h"
 #include "SVGStyledElement.h"
 #include "SVGTransformList.h"
+#include "TransformationMatrix.h"
 
 namespace WebCore {
 
index 06a81f2..258c12c 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "DOMImplementation.h"
 #include "Language.h"
+#include "MappedAttribute.h"
 #include "SVGElement.h"
 #include "SVGNames.h"
 #include "SVGStringList.h"
index 6fad8e8..067f35f 100644 (file)
 #include "FloatPoint.h"
 #include "FloatRect.h"
 #include "Frame.h"
+#include "MappedAttribute.h"
 #include "Position.h"
 #include "RenderSVGText.h"
-#include "SelectionController.h"
 #include "SVGCharacterLayoutInfo.h"
-#include "SVGRootInlineBox.h"
-#include "SVGLength.h"
 #include "SVGInlineTextBox.h"
+#include "SVGLength.h"
 #include "SVGNames.h"
+#include "SVGRootInlineBox.h"
+#include "SelectionController.h"
 #include "XMLNames.h"
 #include <wtf/StdLibExtras.h>
 
index b2ee798..b8c7331 100644 (file)
 #if ENABLE(SVG)
 #include "SVGTextElement.h"
 
-#include "TransformationMatrix.h"
 #include "FloatRect.h"
+#include "MappedAttribute.h"
 #include "RenderSVGText.h"
 #include "SVGLengthList.h"
 #include "SVGRenderStyle.h"
 #include "SVGTSpanElement.h"
 #include "SVGTransformList.h"
+#include "TransformationMatrix.h"
 
 namespace WebCore {
 
index f7f974b..0d8560a 100644 (file)
 #if ENABLE(SVG)
 #include "SVGTextPathElement.h"
 
-#include "TransformationMatrix.h"
 #include "FloatRect.h"
+#include "MappedAttribute.h"
 #include "RenderSVGTextPath.h"
 #include "SVGLengthList.h"
 #include "SVGPathElement.h"
 #include "SVGRenderStyle.h"
-#include "SVGTextPathElement.h"
 #include "SVGTransformList.h"
+#include "TransformationMatrix.h"
 
 namespace WebCore {
 
index e9ceaa1..32d9dc0 100644 (file)
@@ -25,6 +25,7 @@
 #if ENABLE(SVG)
 #include "SVGTextPositioningElement.h"
 
+#include "MappedAttribute.h"
 #include "SVGLengthList.h"
 #include "SVGNames.h"
 #include "SVGNumberList.h"
index d18e49a..8871229 100644 (file)
@@ -23,6 +23,8 @@
 #if ENABLE(SVG)
 #include "SVGURIReference.h"
 
+#include "MappedAttribute.h"
+
 namespace WebCore {
 
 char SVGURIReferenceIdentifier[] = "SVGURIReference";
index bab9082..32019f2 100644 (file)
 
 #include "config.h"
 
-// Dump SVGElementInstance object tree - useful to debug instanceRoot problems
-// #define DUMP_INSTANCE_TREE
-
-// Dump the deep-expanded shadow tree (where the renderes are built from)
-// #define DUMP_SHADOW_TREE
-
 #if ENABLE(SVG)
 #include "SVGUseElement.h"
 
@@ -37,6 +31,7 @@
 #include "Event.h"
 #include "EventListener.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
 #include "NodeRenderStyle.h"
 #include "RegisteredEventListener.h"
 #include "RenderSVGTransformableContainer.h"
 #include "XLinkNames.h"
 #include "XMLSerializer.h"
 
+// Dump SVGElementInstance object tree - useful to debug instanceRoot problems
+// #define DUMP_INSTANCE_TREE
+
+// Dump the deep-expanded shadow tree (where the renderers are built from)
+// #define DUMP_SHADOW_TREE
+
 namespace WebCore {
 
 SVGUseElement::SVGUseElement(const QualifiedName& tagName, Document* doc)
index cb16b62..61cb397 100644 (file)
@@ -26,6 +26,7 @@
 #include "SVGViewElement.h"
 
 #include "Attr.h"
+#include "MappedAttribute.h"
 #include "PlatformString.h"
 #include "SVGFitToViewBox.h"
 #include "SVGNames.h"
index a2e2b0e..63a0d82 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 #include "config.h"
+
 #if ENABLE(SVG_ANIMATION)
 #include "SVGSMILElement.h"
 
 #include "FloatConversion.h"
 #include "FrameView.h"
 #include "HTMLNames.h"
+#include "MappedAttribute.h"
+#include "SMILTimeContainer.h"
 #include "SVGNames.h"
 #include "SVGParserUtilities.h"
 #include "SVGSVGElement.h"
 #include "SVGURIReference.h"
-#include "SMILTimeContainer.h"
 #include "XLinkNames.h"
 #include <math.h>
 #include <wtf/MathExtras.h>
index 5098223..bf06e7c 100644 (file)
@@ -30,6 +30,7 @@
 
 #if ENABLE(XPATH)
 
+#include "Attr.h"
 #include "Document.h"
 #include "Element.h"
 #include "NamedNodeMap.h"
index cc02b6d..820adaa 100644 (file)
@@ -1,3 +1,14 @@
+2009-05-04  Darin Adler  <darin@apple.com>
+
+        Reviewed by Eric Seidel.
+
+        Bug 24924: remove Document.h include of Attr.h and HTMLCollection.h,
+        and NamedMappedAttrMap.h include of MappedAttribute.h
+        https://bugs.webkit.org/show_bug.cgi?id=24924
+
+        * WebView/WebFrame.mm: Added include of CSSMutableStyleDeclaration.h
+        and ScriptValue.h.
+
 2009-05-02  Geoffrey Garen  <ggaren@apple.com>
 
         Reviewed by Sam Weinig.
index f9e1c62..e93284a 100644 (file)
 #import "WebScriptDebugger.h"
 #import "WebViewInternal.h"
 #import <JavaScriptCore/APICast.h>
+#import <WebCore/AXObjectCache.h>
 #import <WebCore/AccessibilityObject.h>
 #import <WebCore/AnimationController.h>
-#import <WebCore/AXObjectCache.h>
+#import <WebCore/CSSMutableStyleDeclaration.h>
 #import <WebCore/ColorMac.h>
 #import <WebCore/DOMImplementation.h>
 #import <WebCore/DocLoader.h>
 #import <WebCore/LegacyWebArchive.h>
 #import <WebCore/Page.h>
 #import <WebCore/PluginData.h>
+#import <WebCore/RenderLayer.h>
 #import <WebCore/RenderPart.h>
 #import <WebCore/RenderView.h>
-#import <WebCore/RenderLayer.h>
 #import <WebCore/ReplaceSelectionCommand.h>
 #import <WebCore/RuntimeApplicationChecks.h>
+#import <WebCore/ScriptValue.h>
 #import <WebCore/SmartReplace.h>
 #import <WebCore/TextIterator.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/TypingCommand.h>
 #import <WebCore/htmlediting.h>
-#import <WebCore/ScriptController.h>
-#import <WebCore/ScriptValue.h>
 #import <WebCore/markup.h>
 #import <WebCore/visible_units.h>
 #import <runtime/JSLock.h>
 #import <runtime/JSValue.h>
-#include <wtf/CurrentTime.h>
+#import <wtf/CurrentTime.h>
 
 using namespace std;
 using namespace WebCore;