2006-05-17 Rob Buis <buis@kde.org>
authoreseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 May 2006 21:55:45 +0000 (21:55 +0000)
committereseidel <eseidel@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 May 2006 21:55:45 +0000 (21:55 +0000)
        Reviewed by darin.  Landed by eseidel.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=5889
        HTMLNames.* should be generated using make_names.pl

        Use a patched make_names.pl to autogenerate HTMLNames.*

        * DerivedSources.make:
        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLNames.cpp: Removed.
        * html/HTMLNames.h: Removed.
        * html/HTMLTagNames.in: Added.
        * html/HTMLAttributeNames.in: Added.
        * ksvg2/scripts/make_names.pl:

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

WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/WebCore/html/HTMLAttributeNames.in [new file with mode: 0644]
WebCore/WebCore/html/HTMLTagNames.in [new file with mode: 0644]
WebCore/html/HTMLAttributeNames.in [new file with mode: 0644]
WebCore/html/HTMLNameCollection.cpp
WebCore/html/HTMLNames.cpp [deleted file]
WebCore/html/HTMLNames.h [deleted file]
WebCore/html/HTMLTagNames.in [new file with mode: 0644]
WebCore/ksvg2/scripts/make_names.pl

index dc5a89a..8482af3 100644 (file)
@@ -1,3 +1,20 @@
+2006-05-17  Rob Buis  <buis@kde.org>
+
+        Reviewed by darin.  Landed by eseidel.
+
+        http://bugzilla.opendarwin.org/show_bug.cgi?id=5889
+        HTMLNames.* should be generated using make_names.pl
+
+        Use a patched make_names.pl to autogenerate HTMLNames.*
+
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        * html/HTMLNames.cpp: Removed.
+        * html/HTMLNames.h: Removed.
+        * html/HTMLTagNames.in: Added.
+        * html/HTMLAttributeNames.in: Added.
+        * ksvg2/scripts/make_names.pl:
+
 2006-05-23  Eric Seidel  <eric@eseidel.com>
 
         Reviewed by andersca.
index cd1f398..2715f19 100644 (file)
@@ -129,6 +129,7 @@ all : \
     JSXMLSerializer.lut.h \
     JSXSLTProcessor.lut.h \
     SVGNames.cpp \
+    HTMLNames.cpp \
     UserAgentStyleSheets.h \
     XLinkNames.cpp \
     XPathGrammar.cpp \
@@ -215,6 +216,12 @@ CharsetData.cpp : platform/make-charset-table.pl platform/character-sets.txt $(E
 %Table.cpp: %.cpp $(CREATE_HASH_TABLE)
        $(CREATE_HASH_TABLE) $< > $@
 
+# HTML tag and attribute names
+
+HTMLNames.cpp : ksvg2/scripts/make_names.pl html/HTMLTagNames.in html/HTMLAttributeNames.in
+       $< --tags $(WebCore)/html/HTMLTagNames.in --attrs $(WebCore)/html/HTMLAttributeNames.in \
+            --namespace HTML --namespacePrefix xhtml --cppNamespace WebCore --namespaceURI "http://www.w3.org/1999/xhtml" --attrsNullNamespace --output .
+
 ifeq ($(findstring SVG_SUPPORT,$(FEATURE_DEFINES)), SVG_SUPPORT)
 
 # SVG tag and attribute names
index 897fd70..961be07 100644 (file)
                1AE2AEE70A1D2A7500B42B25 /* JSHTMLBlockquoteElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE2AEE50A1D2A7500B42B25 /* JSHTMLBlockquoteElement.h */; };
                550A0BC9085F6039007353D6 /* QualifiedName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 550A0BC7085F6039007353D6 /* QualifiedName.cpp */; };
                550A0BCA085F6039007353D6 /* QualifiedName.h in Headers */ = {isa = PBXBuildFile; fileRef = 550A0BC8085F6039007353D6 /* QualifiedName.h */; };
-               550A0BCD085F604D007353D6 /* HTMLNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 550A0BCB085F604D007353D6 /* HTMLNames.cpp */; };
-               550A0BCE085F604D007353D6 /* HTMLNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 550A0BCC085F604D007353D6 /* HTMLNames.h */; };
                650F53DC09D15DDA00C9B0C8 /* CSSGrammar.h in Headers */ = {isa = PBXBuildFile; fileRef = 650F53DB09D15DDA00C9B0C8 /* CSSGrammar.h */; };
                650F53DD09D15DDF00C9B0C8 /* CSSGrammar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6565814409D13043000E61D7 /* CSSGrammar.cpp */; };
                651B4D8509AC83370029F1EF /* DeprecatedStringList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 651B4D8309AC83370029F1EF /* DeprecatedStringList.cpp */; };
                A8D0651D0A23C1FE005E7203 /* CSSRuleList.idl in Resources */ = {isa = PBXBuildFile; fileRef = A8D0651B0A23C1FE005E7203 /* CSSRuleList.idl */; };
                A8D0651E0A23C1FE005E7203 /* CSSValueList.idl in Resources */ = {isa = PBXBuildFile; fileRef = A8D0651C0A23C1FE005E7203 /* CSSValueList.idl */; };
                A8D065AE0A2446CD005E7203 /* JSHTMLFormElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8D065AD0A2446CD005E7203 /* JSHTMLFormElementCustom.cpp */; };
+               A8D06B390A265DCD005E7203 /* HTMLNames.h in Headers */ = {isa = PBXBuildFile; fileRef = A8D06B370A265DCD005E7203 /* HTMLNames.h */; };
+               A8D06B3A0A265DCD005E7203 /* HTMLNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8D06B380A265DCD005E7203 /* HTMLNames.cpp */; };
                A8DF3FCE097FA0FC0052981B /* HTMLFormCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = A8DF3FC6097FA0FB0052981B /* HTMLFormCollection.h */; };
                A8DF3FCF097FA0FC0052981B /* HTMLFormCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8DF3FC7097FA0FB0052981B /* HTMLFormCollection.cpp */; };
                A8DF3FD0097FA0FC0052981B /* HTMLCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = A8DF3FC8097FA0FB0052981B /* HTMLCollection.h */; };
                51F6A3D60663BF04004D2919 /* HTMLCanvasElement.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = HTMLCanvasElement.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                550A0BC7085F6039007353D6 /* QualifiedName.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = QualifiedName.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                550A0BC8085F6039007353D6 /* QualifiedName.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = QualifiedName.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               550A0BCB085F604D007353D6 /* HTMLNames.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLNames.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               550A0BCC085F604D007353D6 /* HTMLNames.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = HTMLNames.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                55998A5A052B59CC0017A6C1 /* WebCoreAXObject.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreAXObject.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                55998A5B052B59CC0017A6C1 /* WebCoreAXObject.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreAXObject.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                55998A5C052B59CC0017A6C1 /* AccessibilityObjectCache.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityObjectCache.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                A8D0651B0A23C1FE005E7203 /* CSSRuleList.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSRuleList.idl; sourceTree = "<group>"; };
                A8D0651C0A23C1FE005E7203 /* CSSValueList.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSValueList.idl; sourceTree = "<group>"; };
                A8D065AD0A2446CD005E7203 /* JSHTMLFormElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLFormElementCustom.cpp; sourceTree = "<group>"; };
+               A8D06B370A265DCD005E7203 /* HTMLNames.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTMLNames.h; sourceTree = "<group>"; };
+               A8D06B380A265DCD005E7203 /* HTMLNames.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLNames.cpp; sourceTree = "<group>"; };
                A8DF3FC6097FA0FB0052981B /* HTMLFormCollection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTMLFormCollection.h; sourceTree = "<group>"; };
                A8DF3FC7097FA0FB0052981B /* HTMLFormCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLFormCollection.cpp; sourceTree = "<group>"; };
                A8DF3FC8097FA0FB0052981B /* HTMLCollection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTMLCollection.h; sourceTree = "<group>"; };
                                6565814A09D13043000E61D7 /* CSSValueKeywords.strip */,
                                6565811C09D12DB2000E61D7 /* DocTypeStrings.cpp */,
                                6565814B09D13043000E61D7 /* HTMLEntityNames.c */,
+                               A8D06B380A265DCD005E7203 /* HTMLNames.cpp */,
+                               A8D06B370A265DCD005E7203 /* HTMLNames.h */,
                                65DF31D809D1C122000BE325 /* JSAttr.cpp */,
                                65DF31D909D1C123000BE325 /* JSAttr.h */,
                                65DF323309D1DE65000BE325 /* JSCanvasGradient.cpp */,
                                1AE2AB070A1CE5CF00B42B25 /* HTMLModElement.idl */,
                                A8DF3FCD097FA0FB0052981B /* HTMLNameCollection.cpp */,
                                A8DF3FCC097FA0FB0052981B /* HTMLNameCollection.h */,
-                               550A0BCB085F604D007353D6 /* HTMLNames.cpp */,
-                               550A0BCC085F604D007353D6 /* HTMLNames.h */,
                                A871D4510A127CBC00B12A68 /* HTMLObjectElement.cpp */,
                                A871D4500A127CBC00B12A68 /* HTMLObjectElement.h */,
                                A8EA79EF0A1916DF00A8EF5F /* HTMLOListElement.cpp */,
                                93F199F008245E59001E9ABC /* WebCoreView.h in Headers */,
                                93F199F108245E59001E9ABC /* WebDashboardRegion.h in Headers */,
                                550A0BCA085F6039007353D6 /* QualifiedName.h in Headers */,
-                               550A0BCE085F604D007353D6 /* HTMLNames.h in Headers */,
                                BCEF3435087B563E00BBF833 /* HTMLElementFactory.h in Headers */,
                                A8FD8B87087CB45700DC3707 /* KWQWMatrix.h in Headers */,
                                7E6FEED80898582300C44C3F /* WebCoreScriptDebugger.h in Headers */,
                                A8D05FAC0A23B30F005E7203 /* JSCSSValueList.h in Headers */,
                                A8D064FC0A23C0CC005E7203 /* JSHTMLFormElement.h in Headers */,
                                DD7CDF250A23CF9800069928 /* CSSUnknownRule.h in Headers */,
+                               A8D06B390A265DCD005E7203 /* HTMLNames.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                93F19B0708245E59001E9ABC /* WebCoreView.m in Sources */,
                                93F19B0808245E59001E9ABC /* WebDashboardRegion.m in Sources */,
                                550A0BC9085F6039007353D6 /* QualifiedName.cpp in Sources */,
-                               550A0BCD085F604D007353D6 /* HTMLNames.cpp in Sources */,
                                BCEF3434087B563E00BBF833 /* HTMLElementFactory.cpp in Sources */,
                                A8FD8B86087CB44C00DC3707 /* KWQWMatrix.cpp in Sources */,
                                7E6FEED90898582300C44C3F /* WebCoreScriptDebugger.mm in Sources */,
                                A8D05FAB0A23B30F005E7203 /* JSCSSValueList.cpp in Sources */,
                                A8D064FB0A23C0CC005E7203 /* JSHTMLFormElement.cpp in Sources */,
                                A8D065AE0A2446CD005E7203 /* JSHTMLFormElementCustom.cpp in Sources */,
+                               A8D06B3A0A265DCD005E7203 /* HTMLNames.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
diff --git a/WebCore/WebCore/html/HTMLAttributeNames.in b/WebCore/WebCore/html/HTMLAttributeNames.in
new file mode 100644 (file)
index 0000000..43664d2
--- /dev/null
@@ -0,0 +1,177 @@
+abbr
+accept_charset
+accept
+accesskey
+action
+align
+alink
+alt
+archive
+autocomplete
+autosave
+axis
+background
+behavior
+bgcolor
+bgproperties
+border
+bordercolor
+cellpadding
+cellspacing
+char
+challenge
+charoff
+charset
+checked
+cellborder
+cite
+class
+classid
+clear
+code
+codebase
+codetype
+color
+cols
+colspan
+compact
+composite
+content
+contenteditable
+coords
+data
+datetime
+declare
+defer
+dir
+direction
+disabled
+enctype
+face
+for
+frame
+frameborder
+headers
+height
+hidden
+href
+hreflang
+hspace
+http_equiv
+id
+incremental
+ismap
+keytype
+label
+lang
+language
+left
+leftmargin
+link
+longdesc
+loop
+marginheight
+marginwidth
+max
+maxlength
+mayscript
+media
+method
+min
+multiple
+name
+nohref
+noresize
+noshade
+nowrap
+object
+onabort
+onbeforecopy
+onbeforecut
+onbeforepaste
+onbeforeunload
+onblur
+onchange
+onclick
+oncontextmenu
+oncopy
+oncut
+ondblclick
+ondrag
+ondragend
+ondragenter
+ondragleave
+ondragover
+ondragstart
+ondrop
+onerror
+onfocus
+oninput
+onkeydown
+onkeypress
+onkeyup
+onload
+onmousedown
+onmousemove
+onmouseout
+onmouseover
+onmouseup
+onmousewheel
+onpaste
+onreset
+onresize
+onscroll
+onsearch
+onselect
+onselectstart
+onsubmit
+onunload
+pagex
+pagey
+placeholder
+plain
+pluginpage
+pluginspage
+pluginurl
+precision
+profile
+prompt
+readonly
+rel
+results
+rev
+rows
+rowspan
+rules
+scheme
+scope
+scrollamount
+scrolldelay
+scrolling
+selected
+shape
+size
+span
+src
+standby
+start
+style
+summary
+tabindex
+tableborder
+target
+text
+title
+top
+topmargin
+truespeed
+type
+usemap
+valign
+value
+valuetype
+version
+vlink
+vspace
+width
+wrap
diff --git a/WebCore/WebCore/html/HTMLTagNames.in b/WebCore/WebCore/html/HTMLTagNames.in
new file mode 100644 (file)
index 0000000..1894f53
--- /dev/null
@@ -0,0 +1,104 @@
+a
+abbr
+acronym
+address
+applet
+area
+b
+base
+basefont
+bdo
+big
+blockquote
+body
+br
+button
+canvas
+caption
+center
+cite
+code
+col
+colgroup
+dd
+del
+dfn
+dir
+div
+dl
+dt
+em
+embed
+fieldset
+font
+form
+frame
+frameset
+head
+h1
+h2
+h3
+h4
+h5
+h6
+hr
+html
+i
+iframe
+image
+img
+input
+ins
+isindex
+kbd
+keygen
+label
+layer
+legend
+li
+link
+listing
+map
+marquee
+menu
+meta
+nobr
+noembed
+noframes
+nolayer
+noscript
+object
+ol
+optgroup
+option
+p
+param
+plaintext
+pre
+q
+s
+samp
+script
+select
+small
+span
+strike
+strong
+style
+sub
+sup
+table
+tbody
+td
+textarea
+tfoot
+th
+thead
+title
+tr
+tt
+u
+ul
+var
+wbr
+xmp
diff --git a/WebCore/html/HTMLAttributeNames.in b/WebCore/html/HTMLAttributeNames.in
new file mode 100644 (file)
index 0000000..43664d2
--- /dev/null
@@ -0,0 +1,177 @@
+abbr
+accept_charset
+accept
+accesskey
+action
+align
+alink
+alt
+archive
+autocomplete
+autosave
+axis
+background
+behavior
+bgcolor
+bgproperties
+border
+bordercolor
+cellpadding
+cellspacing
+char
+challenge
+charoff
+charset
+checked
+cellborder
+cite
+class
+classid
+clear
+code
+codebase
+codetype
+color
+cols
+colspan
+compact
+composite
+content
+contenteditable
+coords
+data
+datetime
+declare
+defer
+dir
+direction
+disabled
+enctype
+face
+for
+frame
+frameborder
+headers
+height
+hidden
+href
+hreflang
+hspace
+http_equiv
+id
+incremental
+ismap
+keytype
+label
+lang
+language
+left
+leftmargin
+link
+longdesc
+loop
+marginheight
+marginwidth
+max
+maxlength
+mayscript
+media
+method
+min
+multiple
+name
+nohref
+noresize
+noshade
+nowrap
+object
+onabort
+onbeforecopy
+onbeforecut
+onbeforepaste
+onbeforeunload
+onblur
+onchange
+onclick
+oncontextmenu
+oncopy
+oncut
+ondblclick
+ondrag
+ondragend
+ondragenter
+ondragleave
+ondragover
+ondragstart
+ondrop
+onerror
+onfocus
+oninput
+onkeydown
+onkeypress
+onkeyup
+onload
+onmousedown
+onmousemove
+onmouseout
+onmouseover
+onmouseup
+onmousewheel
+onpaste
+onreset
+onresize
+onscroll
+onsearch
+onselect
+onselectstart
+onsubmit
+onunload
+pagex
+pagey
+placeholder
+plain
+pluginpage
+pluginspage
+pluginurl
+precision
+profile
+prompt
+readonly
+rel
+results
+rev
+rows
+rowspan
+rules
+scheme
+scope
+scrollamount
+scrolldelay
+scrolling
+selected
+shape
+size
+span
+src
+standby
+start
+style
+summary
+tabindex
+tableborder
+target
+text
+title
+top
+topmargin
+truespeed
+type
+usemap
+valign
+value
+valuetype
+version
+vlink
+vspace
+width
+wrap
index c223e90..ca73641 100644 (file)
@@ -35,7 +35,8 @@ namespace WebCore {
 using namespace HTMLNames;
 
 HTMLNameCollection::HTMLNameCollection(Document* base, int type, const String& name)
-    : HTMLCollection(base, type), m_name(name)
+    : HTMLCollection(base, type)
+    , m_name(name)
 {
 }
 
diff --git a/WebCore/html/HTMLNames.cpp b/WebCore/html/HTMLNames.cpp
deleted file mode 100644 (file)
index c653bcf..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * This file is part of the HTML DOM implementation for KDE.
- *
- * Copyright (C) 2005 Apple Computer, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-
-#include "config.h"
-
-#if AVOID_STATIC_CONSTRUCTORS
-#define DOM_HTMLNAMES_HIDE_GLOBALS 1
-#else
-#define QNAME_DEFAULT_CONSTRUCTOR 1
-#endif
-
-#include "HTMLNames.h"
-#include "StaticConstructors.h"
-
-namespace WebCore { namespace HTMLNames {
-
-DEFINE_GLOBAL(AtomicString, xhtmlNamespaceURI, "http://www.w3.org/1999/xhtml")
-
-#define DEFINE_TAG_GLOBAL(name) \
-    DEFINE_GLOBAL(QualifiedName, name##Tag, nullAtom, #name, xhtmlNamespaceURI)
-DOM_HTMLNAMES_FOR_EACH_TAG(DEFINE_TAG_GLOBAL)
-
-#define DEFINE_ATTR_GLOBAL(name) \
-    DEFINE_GLOBAL(QualifiedName, name##Attr, nullAtom, #name, nullAtom)
-DOM_HTMLNAMES_FOR_EACH_ATTR(DEFINE_ATTR_GLOBAL)
-
-void init()
-{
-    static bool initialized;
-    if (!initialized) {
-        // Use placement new to initialize the globals.
-
-        AtomicString::init();
-        AtomicString xhtmlNS("http://www.w3.org/1999/xhtml");
-
-        // Namespace
-        new ((void*)&xhtmlNamespaceURI) AtomicString(xhtmlNS);
-
-        // Tags
-        #define INITIALIZE_TAG_GLOBAL(name) new ((void*)&name##Tag) QualifiedName(nullAtom, #name, xhtmlNS);
-        DOM_HTMLNAMES_FOR_EACH_TAG(INITIALIZE_TAG_GLOBAL)
-
-        // Attributes
-        // Need a little trick to handle accept_charset and http_equiv, which need "-" characters.
-        #define DEFINE_ATTR_STRING(name) const char *name##AttrString = #name;
-        DOM_HTMLNAMES_FOR_EACH_ATTR(DEFINE_ATTR_STRING)
-        accept_charsetAttrString = "accept-charset";
-        http_equivAttrString = "http-equiv";
-        #define INITIALIZE_ATTR_GLOBAL(name) new ((void*)&name##Attr) QualifiedName(nullAtom, name##AttrString, nullAtom);
-        DOM_HTMLNAMES_FOR_EACH_ATTR(INITIALIZE_ATTR_GLOBAL)
-        initialized = true;
-    }
-}
-
-} }
diff --git a/WebCore/html/HTMLNames.h b/WebCore/html/HTMLNames.h
deleted file mode 100644 (file)
index b6f0388..0000000
+++ /dev/null
@@ -1,334 +0,0 @@
-/*
- * This file is part of the HTML DOM implementation for KDE.
- *
- * Copyright (C) 2005 Apple Computer, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- */
-#ifndef HTMLNAMES_H
-#define HTMLNAMES_H
-
-#include "QualifiedName.h"
-
-namespace WebCore { namespace HTMLNames {
-
-#define DOM_HTMLNAMES_FOR_EACH_TAG(macro) \
-    macro(a) \
-    macro(abbr) \
-    macro(acronym) \
-    macro(address) \
-    macro(applet) \
-    macro(area) \
-    macro(b) \
-    macro(base) \
-    macro(basefont) \
-    macro(bdo) \
-    macro(big) \
-    macro(blockquote) \
-    macro(body) \
-    macro(br) \
-    macro(button) \
-    macro(canvas) \
-    macro(caption) \
-    macro(center) \
-    macro(cite) \
-    macro(code) \
-    macro(col) \
-    macro(colgroup) \
-    macro(dd) \
-    macro(del) \
-    macro(dfn) \
-    macro(dir) \
-    macro(div) \
-    macro(dl) \
-    macro(dt) \
-    macro(em) \
-    macro(embed) \
-    macro(fieldset) \
-    macro(font) \
-    macro(form) \
-    macro(frame) \
-    macro(frameset) \
-    macro(head) \
-    macro(h1) \
-    macro(h2) \
-    macro(h3) \
-    macro(h4) \
-    macro(h5) \
-    macro(h6) \
-    macro(hr) \
-    macro(html) \
-    macro(i) \
-    macro(iframe) \
-    macro(image) \
-    macro(img) \
-    macro(input) \
-    macro(ins) \
-    macro(isindex) \
-    macro(kbd) \
-    macro(keygen) \
-    macro(label) \
-    macro(layer) \
-    macro(legend) \
-    macro(li) \
-    macro(link) \
-    macro(listing) \
-    macro(map) \
-    macro(marquee) \
-    macro(menu) \
-    macro(meta) \
-    macro(nobr) \
-    macro(noembed) \
-    macro(noframes) \
-    macro(nolayer) \
-    macro(noscript) \
-    macro(object) \
-    macro(ol) \
-    macro(optgroup) \
-    macro(option) \
-    macro(p) \
-    macro(param) \
-    macro(plaintext) \
-    macro(pre) \
-    macro(q) \
-    macro(s) \
-    macro(samp) \
-    macro(script) \
-    macro(select) \
-    macro(small) \
-    macro(span) \
-    macro(strike) \
-    macro(strong) \
-    macro(style) \
-    macro(sub) \
-    macro(sup) \
-    macro(table) \
-    macro(tbody) \
-    macro(td) \
-    macro(textarea) \
-    macro(tfoot) \
-    macro(th) \
-    macro(thead) \
-    macro(title) \
-    macro(tr) \
-    macro(tt) \
-    macro(u) \
-    macro(ul) \
-    macro(var) \
-    macro(wbr) \
-    macro(xmp) \
-// end of macro
-
-#define DOM_HTMLNAMES_FOR_EACH_ATTR(macro) \
-    macro(abbr) \
-    macro(accept_charset) \
-    macro(accept) \
-    macro(accesskey) \
-    macro(action) \
-    macro(align) \
-    macro(alink) \
-    macro(alt) \
-    macro(archive) \
-    macro(autocomplete) \
-    macro(autosave) \
-    macro(axis) \
-    macro(background) \
-    macro(behavior) \
-    macro(bgcolor) \
-    macro(bgproperties) \
-    macro(border) \
-    macro(bordercolor) \
-    macro(cellpadding) \
-    macro(cellspacing) \
-    macro(char) \
-    macro(challenge) \
-    macro(charoff) \
-    macro(charset) \
-    macro(checked) \
-    macro(cellborder) \
-    macro(cite) \
-    macro(class) \
-    macro(classid) \
-    macro(clear) \
-    macro(code) \
-    macro(codebase) \
-    macro(codetype) \
-    macro(color) \
-    macro(cols) \
-    macro(colspan) \
-    macro(compact) \
-    macro(composite) \
-    macro(content) \
-    macro(contenteditable) \
-    macro(coords) \
-    macro(data) \
-    macro(datetime) \
-    macro(declare) \
-    macro(defer) \
-    macro(dir) \
-    macro(direction) \
-    macro(disabled) \
-    macro(enctype) \
-    macro(face) \
-    macro(for) \
-    macro(frame) \
-    macro(frameborder) \
-    macro(headers) \
-    macro(height) \
-    macro(hidden) \
-    macro(href) \
-    macro(hreflang) \
-    macro(hspace) \
-    macro(http_equiv) \
-    macro(id) \
-    macro(incremental) \
-    macro(ismap) \
-    macro(keytype) \
-    macro(label) \
-    macro(lang) \
-    macro(language) \
-    macro(left) \
-    macro(leftmargin) \
-    macro(link) \
-    macro(longdesc) \
-    macro(loop) \
-    macro(marginheight) \
-    macro(marginwidth) \
-    macro(max) \
-    macro(maxlength) \
-    macro(mayscript) \
-    macro(media) \
-    macro(method) \
-    macro(min) \
-    macro(multiple) \
-    macro(name) \
-    macro(nohref) \
-    macro(noresize) \
-    macro(noshade) \
-    macro(nowrap) \
-    macro(object) \
-    macro(onabort) \
-    macro(onbeforecopy) \
-    macro(onbeforecut) \
-    macro(onbeforepaste) \
-    macro(onbeforeunload) \
-    macro(onblur) \
-    macro(onchange) \
-    macro(onclick) \
-    macro(oncontextmenu) \
-    macro(oncopy) \
-    macro(oncut) \
-    macro(ondblclick) \
-    macro(ondrag) \
-    macro(ondragend) \
-    macro(ondragenter) \
-    macro(ondragleave) \
-    macro(ondragover) \
-    macro(ondragstart) \
-    macro(ondrop) \
-    macro(onerror) \
-    macro(onfocus) \
-    macro(oninput) \
-    macro(onkeydown) \
-    macro(onkeypress) \
-    macro(onkeyup) \
-    macro(onload) \
-    macro(onmousedown) \
-    macro(onmousemove) \
-    macro(onmouseout) \
-    macro(onmouseover) \
-    macro(onmouseup) \
-    macro(onmousewheel) \
-    macro(onpaste) \
-    macro(onreset) \
-    macro(onresize) \
-    macro(onscroll) \
-    macro(onsearch) \
-    macro(onselect) \
-    macro(onselectstart) \
-    macro(onsubmit) \
-    macro(onunload) \
-    macro(pagex) \
-    macro(pagey) \
-    macro(placeholder) \
-    macro(plain) \
-    macro(pluginpage) \
-    macro(pluginspage) \
-    macro(pluginurl) \
-    macro(precision) \
-    macro(profile) \
-    macro(prompt) \
-    macro(readonly) \
-    macro(rel) \
-    macro(results) \
-    macro(rev) \
-    macro(rows) \
-    macro(rowspan) \
-    macro(rules) \
-    macro(scheme) \
-    macro(scope) \
-    macro(scrollamount) \
-    macro(scrolldelay) \
-    macro(scrolling) \
-    macro(selected) \
-    macro(shape) \
-    macro(size) \
-    macro(span) \
-    macro(src) \
-    macro(standby) \
-    macro(start) \
-    macro(style) \
-    macro(summary) \
-    macro(tabindex) \
-    macro(tableborder) \
-    macro(target) \
-    macro(text) \
-    macro(title) \
-    macro(top) \
-    macro(topmargin) \
-    macro(truespeed) \
-    macro(type) \
-    macro(usemap) \
-    macro(valign) \
-    macro(value) \
-    macro(valuetype) \
-    macro(version) \
-    macro(vlink) \
-    macro(vspace) \
-    macro(width) \
-    macro(wrap) \
-// end of macro
-
-#if !DOM_HTMLNAMES_HIDE_GLOBALS
-    // Namespace
-    extern const AtomicString xhtmlNamespaceURI;
-
-    // Tags
-    #define DOM_HTMLNAMES_DEFINE_TAG_GLOBAL(name) extern const QualifiedName name##Tag;
-    DOM_HTMLNAMES_FOR_EACH_TAG(DOM_HTMLNAMES_DEFINE_TAG_GLOBAL)
-    #undef DOM_HTMLNAMES_DEFINE_TAG_GLOBAL
-
-    // Attributes
-    #define DOM_HTMLNAMES_DEFINE_ATTR_GLOBAL(name) extern const QualifiedName name##Attr;
-    DOM_HTMLNAMES_FOR_EACH_ATTR(DOM_HTMLNAMES_DEFINE_ATTR_GLOBAL)
-    #undef DOM_HTMLNAMES_DEFINE_ATTR_GLOBAL
-#endif
-
-    void init();
-} }
-
-#endif
diff --git a/WebCore/html/HTMLTagNames.in b/WebCore/html/HTMLTagNames.in
new file mode 100644 (file)
index 0000000..1894f53
--- /dev/null
@@ -0,0 +1,104 @@
+a
+abbr
+acronym
+address
+applet
+area
+b
+base
+basefont
+bdo
+big
+blockquote
+body
+br
+button
+canvas
+caption
+center
+cite
+code
+col
+colgroup
+dd
+del
+dfn
+dir
+div
+dl
+dt
+em
+embed
+fieldset
+font
+form
+frame
+frameset
+head
+h1
+h2
+h3
+h4
+h5
+h6
+hr
+html
+i
+iframe
+image
+img
+input
+ins
+isindex
+kbd
+keygen
+label
+layer
+legend
+li
+link
+listing
+map
+marquee
+menu
+meta
+nobr
+noembed
+noframes
+nolayer
+noscript
+object
+ol
+optgroup
+option
+p
+param
+plaintext
+pre
+q
+s
+samp
+script
+select
+small
+span
+strike
+strong
+style
+sub
+sup
+table
+tbody
+td
+textarea
+tfoot
+th
+thead
+title
+tr
+tt
+u
+ul
+var
+wbr
+xmp
index 8f36992..fb95373 100755 (executable)
@@ -33,6 +33,7 @@ use File::Path;
 my $printFactory = 0;
 my $cppNamespace = "";
 my $namespace = "";
+my $namespacePrefix = "";
 my $namespaceURI = "";
 my $tagsFile = "";
 my $attrsFile = "";
@@ -46,6 +47,7 @@ GetOptions('tags=s' => \$tagsFile,
     'attrs=s' => \$attrsFile,
     'outputDir=s' => \$outputDir,
     'namespace=s' => \$namespace,
+    'namespacePrefix=s' => \$namespacePrefix,
     'namespaceURI=s' => \$namespaceURI,
     'cppNamespace=s' => \$cppNamespace,
     'factory' => \$printFactory,
@@ -57,6 +59,8 @@ die "You must specify a namespaceURI (e.g. http://www.w3.org/2000/svg)" unless $
 die "You must specify a cppNamespace (e.g. DOM) used for <cppNamespace>::<namespace>Names::fooTag" unless $cppNamespace;
 die "You must specify at least one of --tags <file> or --attrs <file>" unless (length($tagsFile) || length($attrsFile));
 
+$namespacePrefix = $namespace unless $namespacePrefix;
+
 @tags = readNames($tagsFile) if length($tagsFile);
 @attrs = readNames($attrsFile) if length($attrsFile);
 
@@ -209,7 +213,7 @@ sub printNamesHeaderFile
                print "// end of macro\n\n";
        }
        
-       my $lowerNamespace = lc($namespace);
+       my $lowerNamespace = lc($namespacePrefix);
        print "#if !DOM_${namespace}NAMES_HIDE_GLOBALS\n";
     print "// Namespace\n";
     print "extern const WebCore::AtomicString ${lowerNamespace}NamespaceURI;\n\n";
@@ -242,7 +246,7 @@ sub printNamesCppFile
        
        printLicenseHeader();
        
-       my $lowerNamespace = lc($namespace);
+       my $lowerNamespace = lc($namespacePrefix);
 
 print "#define DOM_${namespace}NAMES_HIDE_GLOBALS 1\n\n";