2009-08-18 Kent Tamura <tkent@chromium.org>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Aug 2009 07:16:12 +0000 (07:16 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Aug 2009 07:16:12 +0000 (07:16 +0000)
        Reviewed by Eric Seidel.

        Add --enable-datalist option.

        * configure.ac:

2009-08-18  Kent Tamura  <tkent@chromium.org>

        Reviewed by Eric Seidel.

        Tests for <datalist> element.
        https://bugs.webkit.org/show_bug.cgi?id=26915

        * fast/forms/datalist-expected.txt: Added.
        * fast/forms/datalist-nonoption-child-expected.txt: Added.
        * fast/forms/datalist-nonoption-child.html: Added.
        * fast/forms/datalist.html: Added.

2009-08-18  Kent Tamura  <tkent@chromium.org>

        Reviewed by Eric Seidel.

        Support for parsing <datalist> element and generating HTMLDataListElement nodes.
        https://bugs.webkit.org/show_bug.cgi?id=26915

        Tests: fast/forms/datalist-nonoption-child.html
               fast/forms/datalist.html

        * WebCore.gypi:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.vcproj/WebCoreCommon.vsprops:
        * WebCore.vcproj/build-generated-files.sh:
        * WebCore.xcodeproj/project.pbxproj:
        * WebCoreSources.bkl:
        * css/html.css:
        * html/CollectionType.h:
        (WebCore::):
        * html/HTMLCollection.cpp:
        (WebCore::HTMLCollection::itemAfter):
        * html/HTMLDataListElement.cpp: Added.
        (WebCore::HTMLDataListElement::HTMLDataListElement):
        (WebCore::HTMLDataListElement::~HTMLDataListElement):
        (WebCore::HTMLDataListElement::checkDTD):
        (WebCore::HTMLDataListElement::options):
        * html/HTMLDataListElement.h: Added.
        * html/HTMLDataListElement.idl: Added.
        * html/HTMLElement.cpp:
        (WebCore::inlineTagList):
        * html/HTMLParser.cpp:
        (WebCore::HTMLParser::isAffectedByResidualStyle):
        * html/HTMLTagNames.in:

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

28 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/fast/forms/datalist-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/datalist-nonoption-child-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/datalist-nonoption-child.html [new file with mode: 0644]
LayoutTests/fast/forms/datalist.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/Configurations/FeatureDefines.xcconfig
WebCore/DerivedSources.cpp
WebCore/DerivedSources.make
WebCore/GNUmakefile.am
WebCore/WebCore.gypi
WebCore/WebCore.pro
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.vcproj/WebCoreCommon.vsprops
WebCore/WebCore.vcproj/build-generated-files.sh
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/WebCoreSources.bkl
WebCore/css/html.css
WebCore/html/CollectionType.h
WebCore/html/HTMLCollection.cpp
WebCore/html/HTMLDataListElement.cpp [new file with mode: 0644]
WebCore/html/HTMLDataListElement.h [new file with mode: 0644]
WebCore/html/HTMLDataListElement.idl [new file with mode: 0644]
WebCore/html/HTMLElement.cpp
WebCore/html/HTMLParser.cpp
WebCore/html/HTMLTagNames.in
configure.ac

index 81c3b3b..374fb6b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-08-18  Kent Tamura  <tkent@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Add --enable-datalist option.
+
+        * configure.ac:
+
 2009-08-14  Adam Bergkvist  <adam.bergkvist@ericsson.com>
 
         Reviewed by Sam Weinig.
index 28905d2..cb10936 100644 (file)
@@ -1,3 +1,15 @@
+2009-08-18  Kent Tamura  <tkent@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Tests for <datalist> element.
+        https://bugs.webkit.org/show_bug.cgi?id=26915
+
+        * fast/forms/datalist-expected.txt: Added.
+        * fast/forms/datalist-nonoption-child-expected.txt: Added.
+        * fast/forms/datalist-nonoption-child.html: Added.
+        * fast/forms/datalist.html: Added.
+
 2009-08-17  Shinichiro Hamaji  <hamaji@chromium.org>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/fast/forms/datalist-expected.txt b/LayoutTests/fast/forms/datalist-expected.txt
new file mode 100644 (file)
index 0000000..4609489
--- /dev/null
@@ -0,0 +1,11 @@
+Test for the datalist element.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS datalist.options.length is 4
+PASS datalist.options.length is 3
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/forms/datalist-nonoption-child-expected.txt b/LayoutTests/fast/forms/datalist-nonoption-child-expected.txt
new file mode 100644 (file)
index 0000000..8921671
--- /dev/null
@@ -0,0 +1,12 @@
+Test for child elements of a datalist element.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS datalist.firstChild.nodeName is "#text"
+PASS datalist.firstChild.nodeName is "B"
+PASS datalist.firstChild.nodeName is "#text"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/forms/datalist-nonoption-child.html b/LayoutTests/fast/forms/datalist-nonoption-child.html
new file mode 100644 (file)
index 0000000..c1539f1
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+
+<datalist id="dl1">Text is ok.</datalist>
+<datalist id="dl2"><b>An inline element is ok.</b></datalist>
+<datalist id="dl3"><div>A block element is not ok.</div></datalist>
+
+<script>
+description('Test for child elements of a datalist element.');
+
+var datalist = document.getElementById('dl1');
+shouldBe('datalist.firstChild.nodeName', '"#text"');
+
+datalist = document.getElementById('dl2');
+shouldBe('datalist.firstChild.nodeName', '"B"');
+
+datalist = document.getElementById('dl3');
+// <div> tag should be ignored.
+shouldBe('datalist.firstChild.nodeName', '"#text"');
+
+var successfullyParsed = true;
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/forms/datalist.html b/LayoutTests/fast/forms/datalist.html
new file mode 100644 (file)
index 0000000..0114972
--- /dev/null
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+
+<datalist id="dl1">
+ The choices are
+ <option>value1</option>, 
+ <option value="value2">label2</option>,
+ <option label="label3">value3</option>, and
+ <option id="o4">value4</option>.
+ <option></option>
+</datalist>
+
+<script>
+description('Test for the datalist element.');
+
+var datalist = document.getElementById('dl1');
+// An option element with empty value is not included.
+shouldBe('datalist.options.length', '4');
+
+document.getElementById('o4').disabled = true;
+// A disabled option element is not included.
+shouldBe('datalist.options.length', '3');
+
+var successfullyParsed = true;
+// The expected text should not contain the text in the datalist element.
+</script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
index 0e6041f..5175089 100644 (file)
@@ -1,3 +1,38 @@
+2009-08-18  Kent Tamura  <tkent@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Support for parsing <datalist> element and generating HTMLDataListElement nodes.
+        https://bugs.webkit.org/show_bug.cgi?id=26915
+
+        Tests: fast/forms/datalist-nonoption-child.html
+               fast/forms/datalist.html
+
+        * WebCore.gypi:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.vcproj/WebCoreCommon.vsprops:
+        * WebCore.vcproj/build-generated-files.sh:
+        * WebCore.xcodeproj/project.pbxproj:
+        * WebCoreSources.bkl:
+        * css/html.css:
+        * html/CollectionType.h:
+        (WebCore::):
+        * html/HTMLCollection.cpp:
+        (WebCore::HTMLCollection::itemAfter):
+        * html/HTMLDataListElement.cpp: Added.
+        (WebCore::HTMLDataListElement::HTMLDataListElement):
+        (WebCore::HTMLDataListElement::~HTMLDataListElement):
+        (WebCore::HTMLDataListElement::checkDTD):
+        (WebCore::HTMLDataListElement::options):
+        * html/HTMLDataListElement.h: Added.
+        * html/HTMLDataListElement.idl: Added.
+        * html/HTMLElement.cpp:
+        (WebCore::inlineTagList):
+        * html/HTMLParser.cpp:
+        (WebCore::HTMLParser::isAffectedByResidualStyle):
+        * html/HTMLTagNames.in:
+
 2009-08-17  Shinichiro Hamaji  <hamaji@chromium.org>
 
         Reviewed by Eric Seidel.
index f5e6c3e..2369253 100644 (file)
@@ -37,6 +37,7 @@ ENABLE_3D_RENDERING_1060 = ENABLE_3D_RENDERING;
 ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
 ENABLE_DATABASE = ENABLE_DATABASE;
 ENABLE_DATAGRID = ENABLE_DATAGRID;
+ENABLE_DATALIST = ENABLE_DATALIST;
 ENABLE_DOM_STORAGE = ENABLE_DOM_STORAGE;
 ENABLE_EVENTSOURCE = ENABLE_EVENTSOURCE;
 ENABLE_FILTERS = ;
@@ -61,4 +62,4 @@ ENABLE_WORKERS = ENABLE_WORKERS;
 ENABLE_XPATH = ENABLE_XPATH;
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_RUBY) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XPATH) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_RUBY) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XPATH) $(ENABLE_XSLT);
index 763615b..d127c48 100644 (file)
@@ -93,6 +93,7 @@
 #include "JSHTMLDataGridCellElement.cpp"
 #include "JSHTMLDataGridColElement.cpp"
 #include "JSHTMLDataGridRowElement.cpp"
+#include "JSHTMLDataListElement.cpp"
 #include "JSHTMLDirectoryElement.cpp"
 #include "JSHTMLDivElement.cpp"
 #include "JSHTMLDListElement.cpp"
index 44f0dc5..4cdde30 100644 (file)
@@ -122,6 +122,7 @@ DOM_CLASSES = \
     HTMLDataGridCellElement \
     HTMLDataGridColElement \
     HTMLDataGridRowElement \
+    HTMLDataListElement \
     HTMLDListElement \
     HTMLDirectoryElement \
     HTMLDivElement \
@@ -558,6 +559,10 @@ UserAgentStyleSheets.h : css/make-css-file-arrays.pl $(USER_AGENT_STYLE_SHEETS)
 
 # HTML tag and attribute names
 
+ifeq ($(findstring ENABLE_DATALIST,$(FEATURE_DEFINES)), ENABLE_DATALIST)
+    HTML_FLAGS := $(HTML_FLAGS) ENABLE_DATALIST=1
+endif
+
 ifeq ($(findstring ENABLE_VIDEO,$(FEATURE_DEFINES)), ENABLE_VIDEO)
     HTML_FLAGS := $(HTML_FLAGS) ENABLE_VIDEO=1
 endif
index 8e448a5..e2240f7 100644 (file)
@@ -176,6 +176,7 @@ IDL_BINDINGS += \
        WebCore/html/HTMLDataGridCellElement.idl \
        WebCore/html/HTMLDataGridColElement.idl \
        WebCore/html/HTMLDataGridRowElement.idl \
+       WebCore/html/HTMLDataListElement.idl \
        WebCore/html/HTMLDListElement.idl \
        WebCore/html/HTMLDirectoryElement.idl \
        WebCore/html/HTMLDivElement.idl \
@@ -966,6 +967,8 @@ webcore_sources += \
        WebCore/html/HTMLDataGridColElement.h \
        WebCore/html/HTMLDataGridRowElement.cpp \
        WebCore/html/HTMLDataGridRowElement.h \
+       WebCore/html/HTMLDataListElement.cpp \
+       WebCore/html/HTMLDataListElement.h \
        WebCore/html/HTMLDListElement.cpp \
        WebCore/html/HTMLDListElement.h \
        WebCore/html/HTMLDirectoryElement.cpp \
@@ -2131,6 +2134,16 @@ webcore_cppflags += -DENABLE_DATABASE=0
 endif # END ENABLE_DATABASE
 
 # ----
+# HTML5 datalist Support
+# ----
+if ENABLE_DATALIST
+
+HTML_FEATURES += ENABLE_DATALIST=1
+webcore_cppflags += -DENABLE_DATALIST=1
+
+endif # END ENABLE_DATALIST
+
+# ----
 # HTML5 server-sent events
 # ----
 if !ENABLE_EVENTSOURCE
index d9c54a4..1d7fa6c 100644 (file)
             'html/HTMLDataGridColElement.idl',
             'html/HTMLDataGridElement.idl',
             'html/HTMLDataGridRowElement.idl',
+            'html/HTMLDataListElement.idl',
             'html/HTMLDirectoryElement.idl',
             'html/HTMLDivElement.idl',
             'html/HTMLDocument.idl',
             'html/HTMLDataGridElement.h',
             'html/HTMLDataGridRowElement.cpp',
             'html/HTMLDataGridRowElement.h',
+            'html/HTMLDataListElement.cpp',
+            'html/HTMLDataListElement.h',
             'html/HTMLDirectoryElement.cpp',
             'html/HTMLDirectoryElement.h',
             'html/HTMLDivElement.cpp',
index f5b0189..5eeadb7 100644 (file)
@@ -156,6 +156,9 @@ contains(DEFINES, ENABLE_SINGLE_THREADED=1) {
     else:DEFINES += ENABLE_VIDEO=0
 }
 
+# HTML5 datalist support
+!contains(DEFINES, ENABLE_DATALIST=.): DEFINES += ENABLE_DATALIST=1
+
 # Nescape plugins support (NPAPI)
 !contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=.) {
     unix|win32-*:!embedded:!wince*:!symbian {
@@ -376,6 +379,7 @@ IDL_BINDINGS += \
     html/HTMLDataGridCellElement.idl \
     html/HTMLDataGridColElement.idl \
     html/HTMLDataGridRowElement.idl \
+    html/HTMLDataListElement.idl \
     html/HTMLDirectoryElement.idl \
     html/HTMLDivElement.idl \
     html/HTMLDListElement.idl \
@@ -961,6 +965,7 @@ SOURCES += \
     html/HTMLDataGridCellElement.cpp \
     html/HTMLDataGridColElement.cpp \
     html/HTMLDataGridRowElement.cpp \
+    html/HTMLDataListElement.cpp \
     html/HTMLDirectoryElement.cpp \
     html/HTMLDivElement.cpp \
     html/HTMLDListElement.cpp \
index 79e8162..9d08b56 100644 (file)
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHTMLDataListElement.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHTMLDataListElement.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHTMLDirectoryElement.cpp"\r
                                >\r
                                <FileConfiguration\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\html\HTMLDataListElement.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\html\HTMLDataListElement.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\html\HTMLDirectoryElement.cpp"\r
                                >\r
                                <FileConfiguration\r
index 0582e16..cbf71e1 100644 (file)
@@ -8,7 +8,7 @@
        <Tool
                Name="VCCLCompilerTool"
                AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..&quot;;&quot;$(ProjectDir)..\accessibility&quot;;&quot;$(ProjectDir)..\accessibility\win&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridge\c&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&quot;$(ProjectDir)..\rendering&quot;;&quot;$(ProjectDir)..\rendering\style&quot;;&quot;$(ProjectDir)..\bindings\js&quot;;&quot;$(ProjectDir)..\dom&quot;;&quot;$(ProjectDir)..\dom\default&quot;;&quot;$(ProjectDir)..\history&quot;;&quot;$(ProjectDir)..\html&quot;;&quot;$(ProjectDir)..\html\canvas&quot;;&quot;$(ProjectDir)..\inspector&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir)..\loader\appcache&quot;;&quot;$(ProjectDir)..\loader\archive&quot;;&quot;$(ProjectDir)..\loader\archive\cf&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\notifications&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\page\animation&quot;;&quot;$(ProjectDir)..\page\win&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\animation&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir)..\platform\graphics\opentype&quot;;&quot;$(ProjectDir)..\platform\graphics\transforms&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\platform\graphics\win&quot;;&quot;$(ProjectDir)..\xml&quot;;&quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;;&quot;$(ProjectDir)..\plugins&quot;;&quot;$(ProjectDir)..\plugins\win&quot;;&quot;$(ProjectDir)..\svg\graphics&quot;;&quot;$(ProjectDir)..\svg\graphics\filters&quot;;&quot;$(ProjectDir)..\svg&quot;;&quot;$(ProjectDir)..\wml&quot;;&quot;$(ProjectDir)..\storage&quot;;&quot;$(ProjectDir)..\workers&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\private&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(WebKitOutputDir)\include\private\JavaScriptCore&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\icu&quot;;&quot;$(WebKitLibrariesDir)\include\iconv&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(ProjectDir)..\svg\animation&quot;"
-               PreprocessorDefinitions="__WIN32__;WEBCORE_CONTEXT_MENUS;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_EVENTSOURCE;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_RUBY;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
+               PreprocessorDefinitions="__WIN32__;WEBCORE_CONTEXT_MENUS;ENABLE_CHANNEL_MESSAGING;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DATALIST;ENABLE_DOM_STORAGE;ENABLE_EVENTSOURCE;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_RUBY;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_WEB_SOCKETS;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
                UsePrecompiledHeader="2"
                PrecompiledHeaderThrough="WebCorePrefix.h"
                ForcedIncludeFiles="WebCorePrefix.h"
index 818ed8e..46b8c7b 100644 (file)
@@ -71,5 +71,5 @@ mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources"
 cd "${BUILT_PRODUCTS_DIR}/DerivedSources"
 
 export WebCore="${XSRCROOT}"
-export FEATURE_DEFINES="ENABLE_CHANNEL_MESSAGING ENABLE_DATABASE ENABLE_DATAGRID ENABLE_DOM_STORAGE ENABLE_EVENTSOURCE ENABLE_ICONDATABASE ENABLE_JAVASCRIPT_DEBUGGER ENABLE_OFFLINE_WEB_APPLICATIONS ENABLE_RUBY ENABLE_SVG ENABLE_SVG_ANIMATION ENABLE_SVG_AS_IMAGE ENABLE_SVG_FONTS ENABLE_SVG_FOREIGN_OBJECT ENABLE_SVG_USE ENABLE_VIDEO ENABLE_WEB_SOCKETS ENABLE_WORKERS ENABLE_XPATH ENABLE_XSLT"
+export FEATURE_DEFINES="ENABLE_CHANNEL_MESSAGING ENABLE_DATABASE ENABLE_DATAGRID ENABLE_DATALIST ENABLE_DOM_STORAGE ENABLE_EVENTSOURCE ENABLE_ICONDATABASE ENABLE_JAVASCRIPT_DEBUGGER ENABLE_OFFLINE_WEB_APPLICATIONS ENABLE_RUBY ENABLE_SVG ENABLE_SVG_ANIMATION ENABLE_SVG_AS_IMAGE ENABLE_SVG_FONTS ENABLE_SVG_FOREIGN_OBJECT ENABLE_SVG_USE ENABLE_VIDEO ENABLE_WEB_SOCKETS ENABLE_WORKERS ENABLE_XPATH ENABLE_XSLT"
 make -f "$WebCore/DerivedSources.make" -j ${NUMCPUS} || exit 1
index 4b08dce..917bee9 100644 (file)
                ED501DC60B249F2900AE18D9 /* EditorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED501DC50B249F2900AE18D9 /* EditorMac.mm */; };
                EDE3A5000C7A430600956A37 /* ColorMac.h in Headers */ = {isa = PBXBuildFile; fileRef = EDE3A4FF0C7A430600956A37 /* ColorMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
                EDEC98030AED7E170059137F /* WebCorePrefix.h in Headers */ = {isa = PBXBuildFile; fileRef = EDEC98020AED7E170059137F /* WebCorePrefix.h */; };
+               F5C041DA0FFCA7CE00839D4A /* HTMLDataListElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5C041D70FFCA7CE00839D4A /* HTMLDataListElement.cpp */; };
+               F5C041DB0FFCA7CE00839D4A /* HTMLDataListElement.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C041D80FFCA7CE00839D4A /* HTMLDataListElement.h */; };
+               F5C041E30FFCA96D00839D4A /* DOMHTMLDataListElement.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C041DE0FFCA96D00839D4A /* DOMHTMLDataListElement.h */; };
+               F5C041E40FFCA96D00839D4A /* DOMHTMLDataListElement.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5C041DF0FFCA96D00839D4A /* DOMHTMLDataListElement.mm */; };
+               F5C041E50FFCA96D00839D4A /* DOMHTMLDataListElementInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C041E00FFCA96D00839D4A /* DOMHTMLDataListElementInternal.h */; };
+               F5C041E60FFCA96D00839D4A /* JSHTMLDataListElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5C041E10FFCA96D00839D4A /* JSHTMLDataListElement.cpp */; };
+               F5C041E70FFCA96D00839D4A /* JSHTMLDataListElement.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C041E20FFCA96D00839D4A /* JSHTMLDataListElement.h */; };
                F916C48D0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F916C48B0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.cpp */; };
                F916C48E0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = F916C48C0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.h */; };
                F9F0ED7A0DB50CA200D16DB9 /* XMLHttpRequestProgressEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = F9F0ED770DB50CA200D16DB9 /* XMLHttpRequestProgressEvent.h */; };
                F587868402DE3B8601EA4122 /* Cursor.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = Cursor.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F587869902DE3B8601EA4122 /* DeprecatedPtrList.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = DeprecatedPtrList.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F58EF58E02DFDFB7018635CA /* WebCore.base.exp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.exports; path = WebCore.base.exp; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
+               F5C041D70FFCA7CE00839D4A /* HTMLDataListElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLDataListElement.cpp; sourceTree = "<group>"; };
+               F5C041D80FFCA7CE00839D4A /* HTMLDataListElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLDataListElement.h; sourceTree = "<group>"; };
+               F5C041D90FFCA7CE00839D4A /* HTMLDataListElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLDataListElement.idl; sourceTree = "<group>"; };
+               F5C041DE0FFCA96D00839D4A /* DOMHTMLDataListElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMHTMLDataListElement.h; sourceTree = "<group>"; };
+               F5C041DF0FFCA96D00839D4A /* DOMHTMLDataListElement.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMHTMLDataListElement.mm; sourceTree = "<group>"; };
+               F5C041E00FFCA96D00839D4A /* DOMHTMLDataListElementInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMHTMLDataListElementInternal.h; sourceTree = "<group>"; };
+               F5C041E10FFCA96D00839D4A /* JSHTMLDataListElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLDataListElement.cpp; sourceTree = "<group>"; };
+               F5C041E20FFCA96D00839D4A /* JSHTMLDataListElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLDataListElement.h; sourceTree = "<group>"; };
                F5C2869302846DCD018635CA /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
                F5C2869402846DCD018635CA /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
                F5C2869502846DCD018635CA /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
                                93F9B6540BA0F35E00854064 /* DOMHTMLCanvasElement.mm */,
                                85DF2F8C0AA3C88100AD64C5 /* DOMHTMLCollection.h */,
                                85DF2F8D0AA3C88100AD64C5 /* DOMHTMLCollection.mm */,
+                               F5C041DE0FFCA96D00839D4A /* DOMHTMLDataListElement.h */,
+                               F5C041DF0FFCA96D00839D4A /* DOMHTMLDataListElement.mm */,
                                85BA4CFD0AA688680088052D /* DOMHTMLDirectoryElement.h */,
                                85BA4CFE0AA688680088052D /* DOMHTMLDirectoryElement.mm */,
                                85BA4CFF0AA688680088052D /* DOMHTMLDivElement.h */,
                                85E711520AC5D5340053270F /* DOMHTMLButtonElementInternal.h */,
                                93F9B6550BA0F35E00854064 /* DOMHTMLCanvasElementInternal.h */,
                                85E711530AC5D5340053270F /* DOMHTMLCollectionInternal.h */,
+                               F5C041E00FFCA96D00839D4A /* DOMHTMLDataListElementInternal.h */,
                                85E711540AC5D5340053270F /* DOMHTMLDirectoryElementInternal.h */,
                                85E711550AC5D5340053270F /* DOMHTMLDivElementInternal.h */,
                                85E711560AC5D5340053270F /* DOMHTMLDListElementInternal.h */,
                                BC77CD410FEFE0C40070887B /* HTMLDataGridRowElement.cpp */,
                                BC77CCED0FEFDE6C0070887B /* HTMLDataGridRowElement.h */,
                                BC77CC6B0FEC3D5F0070887B /* HTMLDataGridRowElement.idl */,
+                               F5C041D70FFCA7CE00839D4A /* HTMLDataListElement.cpp */,
+                               F5C041D80FFCA7CE00839D4A /* HTMLDataListElement.h */,
+                               F5C041D90FFCA7CE00839D4A /* HTMLDataListElement.idl */,
                                A8EA79ED0A1916DF00A8EF5F /* HTMLDirectoryElement.cpp */,
                                A8EA79EE0A1916DF00A8EF5F /* HTMLDirectoryElement.h */,
                                1A85B1D90A1B23A400D8C87C /* HTMLDirectoryElement.idl */,
                                BC212A400FE83A1800EC3708 /* JSHTMLDataGridElement.h */,
                                BC77CD4C0FEFE1610070887B /* JSHTMLDataGridRowElement.cpp */,
                                BC77CD4D0FEFE1610070887B /* JSHTMLDataGridRowElement.h */,
+                               F5C041E10FFCA96D00839D4A /* JSHTMLDataListElement.cpp */,
+                               F5C041E20FFCA96D00839D4A /* JSHTMLDataListElement.h */,
                                1A85B1E00A1B240500D8C87C /* JSHTMLDirectoryElement.cpp */,
                                1A85B1E10A1B240500D8C87C /* JSHTMLDirectoryElement.h */,
                                1A85B2B40A1B2AC700D8C87C /* JSHTMLDivElement.cpp */,
                                93F9B6580BA0F35E00854064 /* DOMHTMLCanvasElementInternal.h in Headers */,
                                85DF2F8E0AA3C88100AD64C5 /* DOMHTMLCollection.h in Headers */,
                                85E711A20AC5D5350053270F /* DOMHTMLCollectionInternal.h in Headers */,
+                               F5C041E30FFCA96D00839D4A /* DOMHTMLDataListElement.h in Headers */,
+                               F5C041E50FFCA96D00839D4A /* DOMHTMLDataListElementInternal.h in Headers */,
                                85BA4D0B0AA688680088052D /* DOMHTMLDirectoryElement.h in Headers */,
                                85E711A30AC5D5350053270F /* DOMHTMLDirectoryElementInternal.h in Headers */,
                                85BA4D0D0AA688680088052D /* DOMHTMLDivElement.h in Headers */,
                                BC77CB870FEBF5AF0070887B /* HTMLDataGridColElement.h in Headers */,
                                BC212A1F0FE8333200EC3708 /* HTMLDataGridElement.h in Headers */,
                                BC77CCEE0FEFDE6C0070887B /* HTMLDataGridRowElement.h in Headers */,
+                               F5C041DB0FFCA7CE00839D4A /* HTMLDataListElement.h in Headers */,
                                A8EA79FA0A1916DF00A8EF5F /* HTMLDirectoryElement.h in Headers */,
                                A8EA7CB70A192B9C00A8EF5F /* HTMLDivElement.h in Headers */,
                                A8EA79F70A1916DF00A8EF5F /* HTMLDListElement.h in Headers */,
                                BC77CBD40FEBF8310070887B /* JSHTMLDataGridColElement.h in Headers */,
                                BC212A420FE83A1800EC3708 /* JSHTMLDataGridElement.h in Headers */,
                                BC77CD4F0FEFE1610070887B /* JSHTMLDataGridRowElement.h in Headers */,
+                               F5C041E70FFCA96D00839D4A /* JSHTMLDataListElement.h in Headers */,
                                1A85B1E70A1B240500D8C87C /* JSHTMLDirectoryElement.h in Headers */,
                                1A85B2B70A1B2AC700D8C87C /* JSHTMLDivElement.h in Headers */,
                                1A85B1E90A1B240500D8C87C /* JSHTMLDListElement.h in Headers */,
                                85BA4CDE0AA6861B0088052D /* DOMHTMLButtonElement.mm in Sources */,
                                93F9B6570BA0F35E00854064 /* DOMHTMLCanvasElement.mm in Sources */,
                                85DF2F8F0AA3C88100AD64C5 /* DOMHTMLCollection.mm in Sources */,
+                               F5C041E40FFCA96D00839D4A /* DOMHTMLDataListElement.mm in Sources */,
                                85BA4D0C0AA688680088052D /* DOMHTMLDirectoryElement.mm in Sources */,
                                85BA4D0E0AA688680088052D /* DOMHTMLDivElement.mm in Sources */,
                                85BA4D100AA688680088052D /* DOMHTMLDListElement.mm in Sources */,
                                BC77CBAA0FEBF6C90070887B /* HTMLDataGridColElement.cpp in Sources */,
                                BCF524600FEBEE5D0095BF26 /* HTMLDataGridElement.cpp in Sources */,
                                BC77CD420FEFE0C40070887B /* HTMLDataGridRowElement.cpp in Sources */,
+                               F5C041DA0FFCA7CE00839D4A /* HTMLDataListElement.cpp in Sources */,
                                A8EA79F90A1916DF00A8EF5F /* HTMLDirectoryElement.cpp in Sources */,
                                A8EA7CB10A192B9C00A8EF5F /* HTMLDivElement.cpp in Sources */,
                                A8EA79F50A1916DF00A8EF5F /* HTMLDListElement.cpp in Sources */,
                                BC212A410FE83A1800EC3708 /* JSHTMLDataGridElement.cpp in Sources */,
                                BCBCAE540FF1A29E000762AE /* JSHTMLDataGridElementCustom.cpp in Sources */,
                                BC77CD4E0FEFE1610070887B /* JSHTMLDataGridRowElement.cpp in Sources */,
+                               F5C041E60FFCA96D00839D4A /* JSHTMLDataListElement.cpp in Sources */,
                                1A85B1E60A1B240500D8C87C /* JSHTMLDirectoryElement.cpp in Sources */,
                                1A85B2B60A1B2AC700D8C87C /* JSHTMLDivElement.cpp in Sources */,
                                1A85B1E80A1B240500D8C87C /* JSHTMLDListElement.cpp in Sources */,
index bd94a65..a40c2b1 100644 (file)
@@ -308,6 +308,7 @@ This file contains the list of files needed to build WebCore.
         DerivedSources/WebCore/JSHTMLDataGridCellElement.cpp
         DerivedSources/WebCore/JSHTMLDataGridColElement.cpp
         DerivedSources/WebCore/JSHTMLDataGridRowElement.cpp
+        DerivedSources/WebCore/JSHTMLDataListElement.cpp
         DerivedSources/WebCore/JSHTMLDListElement.cpp
         DerivedSources/WebCore/JSHTMLDirectoryElement.cpp
         DerivedSources/WebCore/JSHTMLDivElement.cpp
@@ -597,6 +598,7 @@ This file contains the list of files needed to build WebCore.
         html/HTMLDataGridCellElement.cpp
         html/HTMLDataGridColElement.cpp
         html/HTMLDataGridRowElement.cpp
+        html/HTMLDataListElement.cpp
         html/HTMLDListElement.cpp
         html/HTMLDirectoryElement.cpp
         html/HTMLDivElement.cpp
index 6b03390..3d0b667 100644 (file)
@@ -483,6 +483,10 @@ select[size="1"] {
     white-space: pre;
 }
 
+datalist {
+    display: none;
+}
+
 optgroup {
     font-weight: bolder;
 }
index e5973a3..9d7bb54 100644 (file)
@@ -51,6 +51,7 @@ enum CollectionType {
     TSectionRows, // all row elements in this table section
     TRCells,      // all cells in this row
     SelectOptions,
+    DataListOptions,
     MapAreas,
 
     OtherCollection
index 9dca48f..44e1104 100644 (file)
@@ -27,6 +27,7 @@
 #include "HTMLElement.h"
 #include "HTMLNames.h"
 #include "HTMLObjectElement.h"
+#include "HTMLOptionElement.h"
 #include "NodeList.h"
 
 #include <utility>
@@ -104,6 +105,7 @@ Element* HTMLCollection::itemAfter(Element* previous) const
         case MapAreas:
         case OtherCollection:
         case SelectOptions:
+        case DataListOptions:
         case WindowNamedItems:
             break;
         case NodeChildren:
@@ -153,6 +155,13 @@ Element* HTMLCollection::itemAfter(Element* previous) const
                 if (e->hasLocalName(optionTag))
                     return e;
                 break;
+            case DataListOptions:
+                if (e->hasLocalName(optionTag)) {
+                    HTMLOptionElement* option = static_cast<HTMLOptionElement*>(e);
+                    if (!option->disabled() && !option->value().isEmpty())
+                        return e;
+                }
+                break;
             case MapAreas:
                 if (e->hasLocalName(areaTag))
                     return e;
diff --git a/WebCore/html/HTMLDataListElement.cpp b/WebCore/html/HTMLDataListElement.cpp
new file mode 100644 (file)
index 0000000..a6ca525
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2009, Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#if ENABLE(DATALIST)
+#include "HTMLDataListElement.h"
+
+#include "HTMLNames.h"
+
+namespace WebCore {
+
+HTMLDataListElement::HTMLDataListElement(const QualifiedName& tagName, Document *doc)
+    : HTMLElement(tagName, doc)
+{
+}
+
+HTMLDataListElement::~HTMLDataListElement()
+{
+}
+
+bool HTMLDataListElement::checkDTD(const Node* newChild)
+{
+    return newChild->hasTagName(HTMLNames::optionTag) || HTMLElement::inInlineTagList(newChild);
+}
+
+PassRefPtr<HTMLCollection> HTMLDataListElement::options()
+{
+    return HTMLCollection::create(this, DataListOptions);
+}
+
+}  // namespace WebCore
+
+#endif  // ENABLE(DATALIST)
diff --git a/WebCore/html/HTMLDataListElement.h b/WebCore/html/HTMLDataListElement.h
new file mode 100644 (file)
index 0000000..8c4cfbc
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2009, Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef HTMLDataListElement_h
+#define HTMLDataListElement_h
+
+#if ENABLE(DATALIST)
+
+#include "HTMLCollection.h"
+#include "HTMLElement.h"
+
+namespace WebCore {
+
+    class HTMLDataListElement : public HTMLElement {
+    public:
+        HTMLDataListElement(const QualifiedName&, Document*);
+        virtual ~HTMLDataListElement();
+        PassRefPtr<HTMLCollection> options();
+
+    private:
+        virtual bool checkDTD(const Node*);
+    };
+
+}  // namespace WebCore
+
+#endif  // ENABLE(DATALIST)
+
+#endif  // HTMLDataListElement_h
diff --git a/WebCore/html/HTMLDataListElement.idl b/WebCore/html/HTMLDataListElement.idl
new file mode 100644 (file)
index 0000000..916c0a1
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2009, Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module html {
+    interface [
+        GenerateConstructor,
+        Conditional=DATALIST
+    ] HTMLDataListElement : HTMLElement {
+        readonly attribute HTMLCollection options;
+    };
+}
index f271009..cd86982 100644 (file)
@@ -839,6 +839,7 @@ static HashSet<AtomicStringImpl*>* inlineTagList()
         tagList.add(textareaTag.localName().impl());
         tagList.add(labelTag.localName().impl());
         tagList.add(buttonTag.localName().impl());
+        tagList.add(datalistTag.localName().impl());
         tagList.add(insTag.localName().impl());
         tagList.add(delTag.localName().impl());
         tagList.add(nobrTag.localName().impl());
index 873481f..b12c09b 100644 (file)
@@ -1093,6 +1093,7 @@ bool HTMLParser::isAffectedByResidualStyle(const AtomicString& tagName)
         unaffectedTags.add(selectTag.localName().impl());
         unaffectedTags.add(objectTag.localName().impl());
         unaffectedTags.add(datagridTag.localName().impl());
+        unaffectedTags.add(datalistTag.localName().impl());
     }
     
     return !unaffectedTags.contains(tagName.impl());
index c066e3c..ed75652 100644 (file)
@@ -26,6 +26,7 @@ code interfaceName=HTMLElement
 col interfaceName=HTMLTableColElement
 colgroup interfaceName=HTMLTableColElement
 datagrid interfaceName=HTMLDataGridElement,conditional=DATAGRID
+datalist interfaceName=HTMLDataListElement,conditional=DATALIST
 dcell interfaceName=HTMLDataGridCellElement,conditional=DATAGRID
 dcol interfaceName=HTMLDataGridColElement,conditional=DATAGRID
 drow interfaceName=HTMLDataGridRowElement,conditional=DATAGRID
index e115a3d..8942089 100644 (file)
@@ -363,6 +363,14 @@ AC_ARG_ENABLE(icon_database,
               [],[enable_icon_database="yes"])
 AC_MSG_RESULT([$enable_icon_database])
 
+# check whether to enable HTML5 datalist support
+AC_MSG_CHECKING([whether to enable HTML5 datalist support])
+AC_ARG_ENABLE(datalist,
+              AC_HELP_STRING([--enable-datalist],
+                             [enable HTML5 datalist support [default=yes]]),
+              [],[enable_datalist="yes"])
+AC_MSG_RESULT([$enable_datalist])
+
 # check whether to enable HTML5 ruby support
 AC_MSG_CHECKING([whether to enable HTML5 ruby support])
 AC_ARG_ENABLE(ruby,
@@ -691,6 +699,7 @@ AM_CONDITIONAL([ENABLE_JAVASCRIPT_DEBUGGER],[test "$enable_javascript_debugger"
 AM_CONDITIONAL([ENABLE_OFFLINE_WEB_APPLICATIONS],[test "$enable_offline_web_applications" = "yes"])
 AM_CONDITIONAL([ENABLE_DOM_STORAGE],[test "$enable_dom_storage" = "yes"])
 AM_CONDITIONAL([ENABLE_DATABASE],[test "$enable_database" = "yes"])
+AM_CONDITIONAL([ENABLE_DATALIST],[test "$enable_datalist" = "yes"])
 AM_CONDITIONAL([ENABLE_EVENTSOURCE],[test "$enable_eventsource" = "yes"])
 AM_CONDITIONAL([ENABLE_ICONDATABASE],[test "$enable_icon_database" = "yes"])
 AM_CONDITIONAL([ENABLE_XPATH],[test "$enable_xpath" = "yes"])