Commit 9a925fa1 authored by darin@apple.com's avatar darin@apple.com

WebCore:

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: http://svn.webkit.org/repository/webkit/trunk@43187 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 530e98ae
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.
......@@ -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 \
......
......@@ -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 \
......
......@@ -9795,6 +9795,26 @@
RelativePath="..\html\CanvasStyle.h"
>
</File>
<File
RelativePath="..\html\CollectionCache.cpp"
>
<FileConfiguration
Name="Release_PGO|Win32"
>
<Tool
Name="VCCLCompilerTool"
WholeProgramOptimization="true"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\html\CollectionCache.h"
>
</File>
<File
RelativePath="..\html\CollectionType.h"
>
</File>
<File
RelativePath="..\html\File.cpp"
>
......
......@@ -2028,6 +2028,9 @@
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, ); }; };
......@@ -6949,6 +6952,9 @@
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>"; };
......@@ -11563,6 +11569,9 @@
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 */,
......@@ -16860,6 +16869,8 @@
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 */,
......@@ -18878,6 +18889,7 @@
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 */,
......@@ -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
......
......@@ -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"
......
......@@ -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;
......
......@@ -27,6 +27,7 @@
#include "JSHTMLFrameSetElement.h"
#include "Document.h"
#include "HTMLCollection.h"
#include "HTMLFrameElement.h"
#include "HTMLFrameSetElement.h"
#include "HTMLNames.h"
......
......@@ -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"
......@@ -209,7 +210,7 @@
Class kitClass(WebCore::HTMLCollection* collection)
{
if (collection->type() == WebCore::HTMLCollection::SelectOptions)
if (collection->type() == WebCore::SelectOptions)
return [DOMHTMLOptionsCollection class];
return [DOMHTMLCollection class];
}
......@@ -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"
......
......@@ -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;
}
......
......@@ -26,12 +26,13 @@
#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;
......
......@@ -27,6 +27,7 @@
#include "Element.h"
#include "AXObjectCache.h"
#include "Attr.h"
#include "CSSStyleSelector.h"
#include "CString.h"
#include "ClientRect.h"
......@@ -46,13 +47,14 @@
#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;
......
......@@ -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"
......
......@@ -25,6 +25,7 @@
#include "config.h"
#include "NamedNodeMap.h"
#include "Attr.h"
#include "Document.h"
#include "Element.h"
#include "ExceptionCode.h"
......
......@@ -27,6 +27,7 @@
#include "Document.h"
#include "Element.h"
#include "MappedAttribute.h"
namespace WebCore {
......
......@@ -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 {
......
......@@ -24,6 +24,7 @@
#include "config.h"
#include "Node.h"
#include "Attr.h"
#include "CSSParser.h"
#include "CSSRule.h"
#include "CSSRuleList.h"
......
......@@ -29,6 +29,7 @@
#include "CSSValueKeywords.h"
#include "Document.h"
#include "HTMLNames.h"
#include "MappedAttribute.h"
#include <wtf/HashFunctions.h>
using namespace std;
......
......@@ -25,12 +25,15 @@
#ifndef StyledElement_h
#define StyledElement_h
#include "CSSPrimitiveValue.h"
#include "Element.h"
#include "MappedAttributeEntry.h"