2011-01-19 Dominic Cooney <dominicc@google.com>
authortkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Jan 2011 06:35:31 +0000 (06:35 +0000)
committertkent@chromium.org <tkent@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Jan 2011 06:35:31 +0000 (06:35 +0000)
        Reviewed by Kent Tamura.

        Make <keygen> no longer appear to be a <select> element to script.
        https://bugs.webkit.org/show_bug.cgi?id=52557

        The intent is to put <keygen> options into shadow DOM. This change
        takes the first step by hiding the <select> element from
        JavaScript.

        Test: fast/dom/HTMLKeygenElement/keygen.html

        * CMakeLists.txt: Adds new IDL-derived wrapper.
        * DerivedSources.cpp:
        * DerivedSources.make:
        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.pri:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/gobject/GNUmakefile.am:
        * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp:
        (WebKit::createKeygenWrapper):
        (WebKit::createHTMLElementWrapper):
        * bindings/objc/DOM.mm:
        (WebCore::createElementClassMap): Keygen no longer DOMHTMLSelectElement
        * html/HTMLKeygenElement.h:
        (WebCore::HTMLKeygenElement::willValidate): Now public.
        * html/HTMLKeygenElement.idl: Added.
        * html/HTMLTagNames.in: Keygen's wrapper is HTMLKeygenElement.
        * page/DOMWindow.idl: Add HTMLKeygenElement constructor.

2011-01-19  Dominic Cooney  <dominicc@google.com>

        Reviewed by Kent Tamura.

        Make <keygen> no longer appear to be a <select> element to script.

        https://bugs.webkit.org/show_bug.cgi?id=52557

        * fast/dom/HTMLKeygenElement/keygen-expected.txt: Added.
        * fast/dom/HTMLKeygenElement/keygen-option-select-expected.txt: Removed.
        * fast/dom/HTMLKeygenElement/keygen-option-select.html: Removed.
        * fast/dom/HTMLKeygenElement/keygen.html: Added.
        * fast/dom/Window/window-properties-expected.txt:
        * fast/dom/Window/window-property-descriptors-expected.txt:
        * fast/dom/prototype-inheritance-2-expected.txt:
        * fast/dom/prototype-inheritance-expected.txt:
        * fast/dom/wrapper-classes-expected.txt:
        * fast/dom/wrapper-classes.html:
        * fast/js/global-constructors-expected.txt:
        * platform/mac/fast/dom/wrapper-classes-objc-expected.txt:
        * platform/mac/fast/dom/wrapper-classes-objc.html:

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

30 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/HTMLKeygenElement/keygen-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select-expected.txt [deleted file]
LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select.html [deleted file]
LayoutTests/fast/dom/HTMLKeygenElement/keygen.html [new file with mode: 0644]
LayoutTests/fast/dom/Window/window-properties-expected.txt
LayoutTests/fast/dom/Window/window-property-descriptors-expected.txt
LayoutTests/fast/dom/prototype-inheritance-2-expected.txt
LayoutTests/fast/dom/prototype-inheritance-expected.txt
LayoutTests/fast/dom/wrapper-classes-expected.txt
LayoutTests/fast/dom/wrapper-classes.html
LayoutTests/fast/js/global-constructors-expected.txt
LayoutTests/platform/mac/fast/dom/wrapper-classes-objc-expected.txt
LayoutTests/platform/mac/fast/dom/wrapper-classes-objc.html
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/GNUmakefile.am
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.pri
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/gobject/GNUmakefile.am
Source/WebCore/bindings/gobject/WebKitHTMLElementWrapperFactory.cpp
Source/WebCore/bindings/objc/DOM.mm
Source/WebCore/html/HTMLKeygenElement.h
Source/WebCore/html/HTMLKeygenElement.idl [new file with mode: 0644]
Source/WebCore/html/HTMLTagNames.in
Source/WebCore/page/DOMWindow.idl

index 1f6f4eb..543861f 100644 (file)
@@ -1,3 +1,25 @@
+2011-01-19  Dominic Cooney  <dominicc@google.com>
+
+        Reviewed by Kent Tamura.
+
+        Make <keygen> no longer appear to be a <select> element to script.
+
+        https://bugs.webkit.org/show_bug.cgi?id=52557
+
+        * fast/dom/HTMLKeygenElement/keygen-expected.txt: Added.
+        * fast/dom/HTMLKeygenElement/keygen-option-select-expected.txt: Removed.
+        * fast/dom/HTMLKeygenElement/keygen-option-select.html: Removed.
+        * fast/dom/HTMLKeygenElement/keygen.html: Added.
+        * fast/dom/Window/window-properties-expected.txt:
+        * fast/dom/Window/window-property-descriptors-expected.txt:
+        * fast/dom/prototype-inheritance-2-expected.txt:
+        * fast/dom/prototype-inheritance-expected.txt:
+        * fast/dom/wrapper-classes-expected.txt:
+        * fast/dom/wrapper-classes.html:
+        * fast/js/global-constructors-expected.txt:
+        * platform/mac/fast/dom/wrapper-classes-objc-expected.txt:
+        * platform/mac/fast/dom/wrapper-classes-objc.html:
+
 2011-01-19  Helder Correia  <helder@sencha.com>
 
         Reviewed by Andreas Kling.
diff --git a/LayoutTests/fast/dom/HTMLKeygenElement/keygen-expected.txt b/LayoutTests/fast/dom/HTMLKeygenElement/keygen-expected.txt
new file mode 100644 (file)
index 0000000..4d7e1f0
--- /dev/null
@@ -0,0 +1,8 @@
+
+Tests the keygen element.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.getElementById("keys").options is undefined
+
diff --git a/LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select-expected.txt b/LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select-expected.txt
deleted file mode 100644 (file)
index a6f14fb..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-
-This test verifies that list-box-style select form control for keygen works properly when selecting from option element.
-
-You should see the word "SUCCESS" below
-
-SUCCESS
diff --git a/LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select.html b/LayoutTests/fast/dom/HTMLKeygenElement/keygen-option-select.html
deleted file mode 100644 (file)
index 2667715..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<html><head>
-</head><body>
-<keygen id="keys" />
-
-<p>This test verifies that list-box-style select form control for keygen works properly when selecting from option element.
-</p><p>You should see the word "SUCCESS" below</p>
-
-<div id="result">FAILED</div>
-
-<script>
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
-
-function test(elementId)
-{
-    var testKeygenElement = document.getElementById(elementId);
-
-    // Add two option elements here in case the webkit port used doesn't implement the WebCore::getSupportedKeySizes() function
-
-    var testOption1 = document.createElement("option");
-    var testOption1Text = document.createTextNode("foo1");
-    testOption1.appendChild(testOption1Text);
-    testKeygenElement.appendChild(testOption1);
-
-    var testOption2 = document.createElement("option");
-    var testOption2Text = document.createTextNode("foo2");
-    testOption2.appendChild(testOption2Text);
-    testKeygenElement.appendChild(testOption2);
-
-    if (testKeygenElement.options[1].index == 1)
-    {
-        var result = document.getElementById("result");
-        result.innerHTML = "SUCCESS";
-    }
-}
-test("keys");
-</script>
-
-
-</body></html>
diff --git a/LayoutTests/fast/dom/HTMLKeygenElement/keygen.html b/LayoutTests/fast/dom/HTMLKeygenElement/keygen.html
new file mode 100644 (file)
index 0000000..59196ac
--- /dev/null
@@ -0,0 +1,27 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<keygen id="keys" />
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+
+function test(elementId)
+{
+    description('Tests the keygen element.');
+
+    shouldBe('document.getElementById("keys").options', 'undefined');    
+}
+
+test("keys");
+</script>
+
+</body>
+</html>
index 9448f30..6827550 100644 (file)
@@ -1004,6 +1004,8 @@ window.HTMLInputElement [object HTMLInputElementConstructor]
 window.HTMLInputElement.prototype [printed above as window.Element.prototype]
 window.HTMLIsIndexElement [object HTMLIsIndexElementConstructor]
 window.HTMLIsIndexElement.prototype [printed above as window.Element.prototype]
+window.HTMLKeygenElement [object HTMLKeygenElementConstructor]
+window.HTMLKeygenElement.prototype [printed above as window.Element.prototype]
 window.HTMLLIElement [object HTMLLIElementConstructor]
 window.HTMLLIElement.prototype [printed above as window.Element.prototype]
 window.HTMLLabelElement [object HTMLLabelElementConstructor]
index e507839..65144f6 100644 (file)
@@ -88,6 +88,7 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLIFrameElement') is 'obj
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLImageElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLInputElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLIsIndexElement') is 'object'
+PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLKeygenElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLLIElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLLabelElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLLegendElement') is 'object'
index 2e7e853..ae3b6be 100644 (file)
@@ -252,6 +252,7 @@ Never found HTMLHeadingElement
 Never found HTMLIFrameElement
 Never found HTMLImageElement
 Never found HTMLIsIndexElement
+Never found HTMLKeygenElement
 Never found HTMLLIElement
 Never found HTMLLabelElement
 Never found HTMLLegendElement
index 8c903b4..9d452b3 100644 (file)
@@ -173,6 +173,8 @@ PASS inner.HTMLInputElement.isInner is true
 PASS inner.HTMLInputElement.constructor.isInner is true
 PASS inner.HTMLIsIndexElement.isInner is true
 PASS inner.HTMLIsIndexElement.constructor.isInner is true
+PASS inner.HTMLKeygenElement.isInner is true
+PASS inner.HTMLKeygenElement.constructor.isInner is true
 PASS inner.HTMLLIElement.isInner is true
 PASS inner.HTMLLIElement.constructor.isInner is true
 PASS inner.HTMLLabelElement.isInner is true
index 70958f4..f10d294 100644 (file)
@@ -323,9 +323,9 @@ PASS tagJSWrapperConstructorClass('isindex') is 'HTMLIsIndexElementConstructor'
 PASS tagJSWrapperClass('kbd') is 'HTMLElement'
 PASS tagJSWrapperPrototypeClass('kbd') is 'HTMLElementPrototype'
 PASS tagJSWrapperConstructorClass('kbd') is 'HTMLElementConstructor'
-PASS tagJSWrapperClass('keygen') is 'HTMLSelectElement'
-PASS tagJSWrapperPrototypeClass('keygen') is 'HTMLSelectElementPrototype'
-PASS tagJSWrapperConstructorClass('keygen') is 'HTMLSelectElementConstructor'
+PASS tagJSWrapperClass('keygen') is 'HTMLKeygenElement'
+PASS tagJSWrapperPrototypeClass('keygen') is 'HTMLKeygenElementPrototype'
+PASS tagJSWrapperConstructorClass('keygen') is 'HTMLKeygenElementConstructor'
 PASS tagJSWrapperClass('label') is 'HTMLLabelElement'
 PASS tagJSWrapperPrototypeClass('label') is 'HTMLLabelElementPrototype'
 PASS tagJSWrapperConstructorClass('label') is 'HTMLLabelElementConstructor'
index 16228de..e6c5a72 100644 (file)
@@ -210,7 +210,7 @@ function runTest()
     testTag("ins", "HTMLModElement");
     testTag("isindex", "HTMLIsIndexElement");
     testTag("kbd", "HTMLElement");
-    testTag("keygen", "HTMLSelectElement");
+    testTag("keygen", "HTMLKeygenElement");
     testTag("label", "HTMLLabelElement");
     testTag("layer", "HTMLElement");
     testTag("legend", "HTMLLegendElement");
index be61348..e8daff9 100644 (file)
@@ -82,6 +82,7 @@ PASS HTMLIFrameElement.toString() is '[object HTMLIFrameElementConstructor]'
 PASS HTMLImageElement.toString() is '[object HTMLImageElementConstructor]'
 PASS HTMLInputElement.toString() is '[object HTMLInputElementConstructor]'
 PASS HTMLIsIndexElement.toString() is '[object HTMLIsIndexElementConstructor]'
+PASS HTMLKeygenElement.toString() is '[object HTMLKeygenElementConstructor]'
 PASS HTMLLIElement.toString() is '[object HTMLLIElementConstructor]'
 PASS HTMLLabelElement.toString() is '[object HTMLLabelElementConstructor]'
 PASS HTMLLegendElement.toString() is '[object HTMLLegendElementConstructor]'
index 7820552..c79942e 100644 (file)
@@ -121,7 +121,7 @@ PASS tagObjCWrapperClass('input') is 'DOMHTMLInputElement'
 PASS tagObjCWrapperClass('ins') is 'DOMHTMLModElement'
 PASS tagObjCWrapperClass('isindex') is 'DOMHTMLIsIndexElement'
 PASS tagObjCWrapperClass('kbd') is 'DOMHTMLElement'
-PASS tagObjCWrapperClass('keygen') is 'DOMHTMLSelectElement'
+PASS tagObjCWrapperClass('keygen') is 'DOMHTMLElement'
 PASS tagObjCWrapperClass('label') is 'DOMHTMLLabelElement'
 PASS tagObjCWrapperClass('layer') is 'DOMHTMLElement'
 PASS tagObjCWrapperClass('legend') is 'DOMHTMLLegendElement'
index 0cdb755..2238708 100644 (file)
@@ -212,7 +212,7 @@ function runTest()
     testTag("ins", "HTMLModElement");
     testTag("isindex", "HTMLIsIndexElement");
     testTag("kbd", "HTMLElement");
-    testTag("keygen", "HTMLSelectElement");
+    testTag("keygen", "HTMLElement");
     testTag("label", "HTMLLabelElement");
     testTag("layer", "HTMLElement");
     testTag("legend", "HTMLLegendElement");
index a9e9fab..138c847 100644 (file)
@@ -237,6 +237,7 @@ SET(WebCore_IDL_FILES
     html/HTMLImageElement.idl
     html/HTMLInputElement.idl
     html/HTMLIsIndexElement.idl
+    html/HTMLKeygenElement.idl
     html/HTMLLabelElement.idl
     html/HTMLLegendElement.idl
     html/HTMLLIElement.idl
index c2702a9..56d24b3 100644 (file)
@@ -1,3 +1,36 @@
+2011-01-19  Dominic Cooney  <dominicc@google.com>
+
+        Reviewed by Kent Tamura.
+
+        Make <keygen> no longer appear to be a <select> element to script.
+        https://bugs.webkit.org/show_bug.cgi?id=52557
+
+        The intent is to put <keygen> options into shadow DOM. This change
+        takes the first step by hiding the <select> element from
+        JavaScript.
+
+        Test: fast/dom/HTMLKeygenElement/keygen.html
+
+        * CMakeLists.txt: Adds new IDL-derived wrapper.
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * GNUmakefile.am:
+        * WebCore.gypi:
+        * WebCore.pri:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/gobject/GNUmakefile.am:
+        * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp:
+        (WebKit::createKeygenWrapper):
+        (WebKit::createHTMLElementWrapper):
+        * bindings/objc/DOM.mm:
+        (WebCore::createElementClassMap): Keygen no longer DOMHTMLSelectElement
+        * html/HTMLKeygenElement.h:
+        (WebCore::HTMLKeygenElement::willValidate): Now public.
+        * html/HTMLKeygenElement.idl: Added.
+        * html/HTMLTagNames.in: Keygen's wrapper is HTMLKeygenElement.
+        * page/DOMWindow.idl: Add HTMLKeygenElement constructor.
+
 2011-01-19  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r76203.
index 1be63f3..21271ea 100644 (file)
 #include "JSHTMLImageElement.cpp"
 #include "JSHTMLInputElement.cpp"
 #include "JSHTMLIsIndexElement.cpp"
+#include "JSHTMLKeygenElement.cpp"
 #include "JSHTMLLabelElement.cpp"
 #include "JSHTMLLegendElement.cpp"
 #include "JSHTMLLIElement.cpp"
index e1b4db4..c14647c 100644 (file)
@@ -234,6 +234,7 @@ DOM_CLASSES = \
     HTMLImageElement \
     HTMLInputElement \
     HTMLIsIndexElement \
+    HTMLKeygenElement \
     HTMLLIElement \
     HTMLLabelElement \
     HTMLLegendElement \
index 935f77e..2d65532 100644 (file)
@@ -354,6 +354,8 @@ webcore_built_sources += \
        DerivedSources/WebCore/JSHTMLInputElement.h \
        DerivedSources/WebCore/JSHTMLIsIndexElement.cpp \
        DerivedSources/WebCore/JSHTMLIsIndexElement.h \
+       DerivedSources/WebCore/JSHTMLKeygenElement.cpp \
+       DerivedSources/WebCore/JSHTMLKeygenElement.h \
        DerivedSources/WebCore/JSHTMLLabelElement.cpp \
        DerivedSources/WebCore/JSHTMLLabelElement.h \
        DerivedSources/WebCore/JSHTMLLegendElement.cpp \
index d293614..5e2eee1 100644 (file)
             'html/HTMLImageElement.idl',
             'html/HTMLInputElement.idl',
             'html/HTMLIsIndexElement.idl',
+            'html/HTMLKeygenElement.idl',
             'html/HTMLLIElement.idl',
             'html/HTMLLabelElement.idl',
             'html/HTMLLegendElement.idl',
index 2f3a1fb..235d1b4 100644 (file)
@@ -253,6 +253,7 @@ IDL_BINDINGS += \
     html/HTMLImageElement.idl \
     html/HTMLInputElement.idl \
     html/HTMLIsIndexElement.idl \
+    html/HTMLKeygenElement.idl \
     html/HTMLLabelElement.idl \
     html/HTMLLegendElement.idl \
     html/HTMLLIElement.idl \
index 436e0fb..3daf5b9 100755 (executable)
                                >
                        </File>
                        <File
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSHTMLKeygenElement.cpp"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug_Cairo_CFLite|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release_Cairo_CFLite|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug_All|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release_LTCG|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSHTMLKeygenElement.h"
+                               >
+                       </File>
+                       <File
                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSHTMLLabelElement.cpp"
                                >
                                <FileConfiguration
index a6ec711..689c4d2 100644 (file)
                A59E3C1F11580F510072928E /* KeyEventIPhone.mm in Sources */ = {isa = PBXBuildFile; fileRef = A59E3C1D11580F510072928E /* KeyEventIPhone.mm */; };
                A5AFB34F115151A700B045CB /* StepRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5AFB34D115151A700B045CB /* StepRange.cpp */; };
                A5AFB350115151A700B045CB /* StepRange.h in Headers */ = {isa = PBXBuildFile; fileRef = A5AFB34E115151A700B045CB /* StepRange.h */; };
+               A6148A6212E41D3A0044A784 /* DOMHTMLKeygenElementInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = A6148A6112E41D3A0044A784 /* DOMHTMLKeygenElementInternal.h */; };
+               A6148A6712E41D940044A784 /* DOMHTMLKeygenElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A6148A6512E41D940044A784 /* DOMHTMLKeygenElement.h */; };
+               A6148A6812E41D940044A784 /* DOMHTMLKeygenElement.mm in Sources */ = {isa = PBXBuildFile; fileRef = A6148A6612E41D940044A784 /* DOMHTMLKeygenElement.mm */; };
+               A6148A7812E41E3B0044A784 /* JSHTMLKeygenElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A6148A7612E41E3B0044A784 /* JSHTMLKeygenElement.cpp */; };
+               A6148A7912E41E3B0044A784 /* JSHTMLKeygenElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A6148A7712E41E3B0044A784 /* JSHTMLKeygenElement.h */; };
                A622A8FB122C44A600A785B3 /* BindingSecurity.h in Headers */ = {isa = PBXBuildFile; fileRef = A622A8F5122C44A600A785B3 /* BindingSecurity.h */; };
                A622A8FC122C44A600A785B3 /* BindingSecurityBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A622A8F6122C44A600A785B3 /* BindingSecurityBase.cpp */; };
                A622A8FD122C44A600A785B3 /* BindingSecurityBase.h in Headers */ = {isa = PBXBuildFile; fileRef = A622A8F7122C44A600A785B3 /* BindingSecurityBase.h */; };
                A5AFB34E115151A700B045CB /* StepRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StepRange.h; sourceTree = "<group>"; };
                A5C974CF11485FF10066F2AB /* KeyEventCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KeyEventCocoa.h; path = cocoa/KeyEventCocoa.h; sourceTree = "<group>"; };
                A5C974D011485FF10066F2AB /* KeyEventCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = KeyEventCocoa.mm; path = cocoa/KeyEventCocoa.mm; sourceTree = "<group>"; };
+               A6148A6112E41D3A0044A784 /* DOMHTMLKeygenElementInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DOMHTMLKeygenElementInternal.h; path = DOMHTMLKeygenElementInternal.h; sourceTree = "<group>"; };
+               A6148A6512E41D940044A784 /* DOMHTMLKeygenElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DOMHTMLKeygenElement.h; path = DOMHTMLKeygenElement.h; sourceTree = "<group>"; };
+               A6148A6612E41D940044A784 /* DOMHTMLKeygenElement.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DOMHTMLKeygenElement.mm; path = DOMHTMLKeygenElement.mm; sourceTree = "<group>"; };
+               A6148A7612E41E3B0044A784 /* JSHTMLKeygenElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSHTMLKeygenElement.cpp; path = JSHTMLKeygenElement.cpp; sourceTree = "<group>"; };
+               A6148A7712E41E3B0044A784 /* JSHTMLKeygenElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSHTMLKeygenElement.h; path = JSHTMLKeygenElement.h; sourceTree = "<group>"; };
+               A6148A7F12E41ED10044A784 /* HTMLKeygenElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLKeygenElement.idl; sourceTree = "<group>"; };
                A622A8F5122C44A600A785B3 /* BindingSecurity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BindingSecurity.h; path = generic/BindingSecurity.h; sourceTree = "<group>"; };
                A622A8F6122C44A600A785B3 /* BindingSecurityBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BindingSecurityBase.cpp; path = generic/BindingSecurityBase.cpp; sourceTree = "<group>"; };
                A622A8F7122C44A600A785B3 /* BindingSecurityBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BindingSecurityBase.h; path = generic/BindingSecurityBase.h; sourceTree = "<group>"; };
                                1CCA732110ADD43E00FD440D /* DOMHTMLInputElementPrivate.h */,
                                859A9C410AA5E3BD00B694B2 /* DOMHTMLIsIndexElement.h */,
                                859A9C420AA5E3BD00B694B2 /* DOMHTMLIsIndexElement.mm */,
+                               A6148A6512E41D940044A784 /* DOMHTMLKeygenElement.h */,
+                               A6148A6612E41D940044A784 /* DOMHTMLKeygenElement.mm */,
                                85BA4CD90AA6861B0088052D /* DOMHTMLLabelElement.h */,
                                85BA4CDA0AA6861B0088052D /* DOMHTMLLabelElement.mm */,
                                85BA4CDB0AA6861B0088052D /* DOMHTMLLegendElement.h */,
                                85E711630AC5D5350053270F /* DOMHTMLImageElementInternal.h */,
                                85E711640AC5D5350053270F /* DOMHTMLInputElementInternal.h */,
                                85E711650AC5D5350053270F /* DOMHTMLIsIndexElementInternal.h */,
+                               A6148A6112E41D3A0044A784 /* DOMHTMLKeygenElementInternal.h */,
                                85E711660AC5D5350053270F /* DOMHTMLLabelElementInternal.h */,
                                85E711670AC5D5350053270F /* DOMHTMLLegendElementInternal.h */,
                                85E711680AC5D5350053270F /* DOMHTMLLIElementInternal.h */,
                                1AE2AA850A1CDCCE00B42B25 /* HTMLIsIndexElement.idl */,
                                A81369C9097374F600D74463 /* HTMLKeygenElement.cpp */,
                                A81369C8097374F500D74463 /* HTMLKeygenElement.h */,
+                               A6148A7F12E41ED10044A784 /* HTMLKeygenElement.idl */,
                                A81369C7097374F500D74463 /* HTMLLabelElement.cpp */,
                                A81369C6097374F500D74463 /* HTMLLabelElement.h */,
                                1AE2AABE0A1CDD8300B42B25 /* HTMLLabelElement.idl */,
                                A80E7E8D0A1A83E3007FB8C5 /* JSHTMLInputElement.h */,
                                1AE2AA950A1CDD2D00B42B25 /* JSHTMLIsIndexElement.cpp */,
                                1AE2AA960A1CDD2D00B42B25 /* JSHTMLIsIndexElement.h */,
+                               A6148A7612E41E3B0044A784 /* JSHTMLKeygenElement.cpp */,
+                               A6148A7712E41E3B0044A784 /* JSHTMLKeygenElement.h */,
                                1AE2AB170A1CE63B00B42B25 /* JSHTMLLabelElement.cpp */,
                                1AE2AB180A1CE63B00B42B25 /* JSHTMLLabelElement.h */,
                                1AE2AB190A1CE63B00B42B25 /* JSHTMLLegendElement.cpp */,
                                7A5640C012DF9E5E00F4536D /* InspectorSettings.h in Headers */,
                                F3D4C47912E07663003DA150 /* InspectorBrowserDebuggerAgent.h in Headers */,
                                7AF11A5A12E727490061F23C /* InspectorRuntimeAgent.h in Headers */,
+                               A6148A6212E41D3A0044A784 /* DOMHTMLKeygenElementInternal.h in Headers */,
+                               A6148A6712E41D940044A784 /* DOMHTMLKeygenElement.h in Headers */,
+                               A6148A7912E41E3B0044A784 /* JSHTMLKeygenElement.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                7A5640BF12DF9E5E00F4536D /* InspectorSettings.cpp in Sources */,
                                F3D4C47812E07663003DA150 /* InspectorBrowserDebuggerAgent.cpp in Sources */,
                                7AA365EE12E7265400DCA242 /* InspectorRuntimeAgent.cpp in Sources */,
+                               A6148A6812E41D940044A784 /* DOMHTMLKeygenElement.mm in Sources */,
+                               A6148A7812E41E3B0044A784 /* JSHTMLKeygenElement.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index b4f98d1..4067dbc 100644 (file)
@@ -130,6 +130,8 @@ webkitgtk_gdom_built_sources += \
        DerivedSources/webkit/WebKitDOMHTMLInputElementPrivate.h \
        DerivedSources/webkit/WebKitDOMHTMLIsIndexElement.cpp \
        DerivedSources/webkit/WebKitDOMHTMLIsIndexElementPrivate.h \
+       DerivedSources/webkit/WebKitDOMHTMLKeygenElement.cpp \
+       DerivedSources/webkit/WebKitDOMHTMLKeygenElementPrivate.h \
        DerivedSources/webkit/WebKitDOMHTMLLabelElement.cpp \
        DerivedSources/webkit/WebKitDOMHTMLLabelElementPrivate.h \
        DerivedSources/webkit/WebKitDOMHTMLLegendElement.cpp \
@@ -323,6 +325,7 @@ webkitgtk_built_h_api += \
        DerivedSources/webkit/WebKitDOMHTMLImageElement.h \
        DerivedSources/webkit/WebKitDOMHTMLInputElement.h \
        DerivedSources/webkit/WebKitDOMHTMLIsIndexElement.h \
+       DerivedSources/webkit/WebKitDOMHTMLKeygenElement.h \
        DerivedSources/webkit/WebKitDOMHTMLLabelElement.h \
        DerivedSources/webkit/WebKitDOMHTMLLegendElement.h \
        DerivedSources/webkit/WebKitDOMHTMLLIElement.h \
index da420ae..3ac13d1 100644 (file)
@@ -62,6 +62,7 @@
 #include "HTMLImageElement.h"
 #include "HTMLInputElement.h"
 #include "HTMLIsIndexElement.h"
+#include "HTMLKeygenElement.h"
 #include "HTMLLIElement.h"
 #include "HTMLLabelElement.h"
 #include "HTMLLegendElement.h"
 #include "webkit/WebKitDOMHTMLImageElementPrivate.h"
 #include "webkit/WebKitDOMHTMLInputElementPrivate.h"
 #include "webkit/WebKitDOMHTMLIsIndexElementPrivate.h"
+#include "webkit/WebKitDOMHTMLKeygenElementPrivate.h"
 #include "webkit/WebKitDOMHTMLLIElementPrivate.h"
 #include "webkit/WebKitDOMHTMLLabelElementPrivate.h"
 #include "webkit/WebKitDOMHTMLLegendElementPrivate.h"
@@ -322,6 +324,11 @@ static gpointer createIsIndexWrapper(PassRefPtr<HTMLElement> element)
     return wrapHTMLIsIndexElement(static_cast<HTMLIsIndexElement*>(element.get()));
 }
 
+static gpointer createKeygenWrapper(PassRefPtr<HTMLElement> element)
+{
+    return wrapHTMLKeygenElement(static_cast<HTMLKeygenElement*>(element.get()));
+}
+
 static gpointer createLabelWrapper(PassRefPtr<HTMLElement> element)
 {
     return wrapHTMLLabelElement(static_cast<HTMLLabelElement*>(element.get()));
@@ -523,7 +530,7 @@ gpointer createHTMLElementWrapper(PassRefPtr<WebCore::HTMLElement> element)
        map.set(h6Tag.localName().impl(), createHeadingWrapper);
        map.set(imageTag.localName().impl(), createImageWrapper);
        map.set(insTag.localName().impl(), createModWrapper);
-       map.set(keygenTag.localName().impl(), createSelectWrapper);
+       map.set(keygenTag.localName().impl(), createKeygenWrapper);
        map.set(listingTag.localName().impl(), createPreWrapper);
        map.set(tfootTag.localName().impl(), createTableSectionWrapper);
        map.set(thTag.localName().impl(), createTableCellWrapper);
index 44bd653..1c24de6 100644 (file)
@@ -131,7 +131,6 @@ static void createElementClassMap()
     addElementClass(HTMLNames::preTag, [DOMHTMLPreElement class]);
     addElementClass(HTMLNames::qTag, [DOMHTMLQuoteElement class]);
     addElementClass(HTMLNames::scriptTag, [DOMHTMLScriptElement class]);
-    addElementClass(HTMLNames::keygenTag, [DOMHTMLSelectElement class]);
     addElementClass(HTMLNames::selectTag, [DOMHTMLSelectElement class]);
     addElementClass(HTMLNames::styleTag, [DOMHTMLStyleElement class]);
     addElementClass(HTMLNames::tableTag, [DOMHTMLTableElement class]);
index b8b144f..3dc4ad2 100644 (file)
@@ -32,6 +32,8 @@ class HTMLKeygenElement : public HTMLSelectElement {
 public:
     static PassRefPtr<HTMLKeygenElement> create(const QualifiedName&, Document*, HTMLFormElement*);
 
+    virtual bool willValidate() const { return false; }
+
 private:
     HTMLKeygenElement(const QualifiedName&, Document*, HTMLFormElement*);
 
@@ -40,8 +42,6 @@ private:
     virtual const AtomicString& formControlType() const;
     virtual void parseMappedAttribute(Attribute*);
     virtual bool appendFormData(FormDataList&, bool);
-
-    virtual bool willValidate() const { return false; }
     virtual bool isOptionalFormControl() const { return false; }
 
     AtomicString m_challenge;
diff --git a/Source/WebCore/html/HTMLKeygenElement.idl b/Source/WebCore/html/HTMLKeygenElement.idl
new file mode 100644 (file)
index 0000000..c34a925
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2011 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 HTMLKeygenElement : HTMLElement {
+        attribute [Reflect] boolean autofocus;
+        attribute [Reflect] DOMString challenge;
+        attribute [Reflect] boolean disabled;
+        readonly attribute HTMLFormElement form;
+        attribute [Reflect] DOMString keytype;
+        attribute DOMString name;
+
+        readonly attribute DOMString type;
+
+        readonly attribute boolean willValidate;
+        readonly attribute ValidityState validity;
+        readonly attribute DOMString validationMessage;
+        boolean checkValidity();
+        void setCustomValidity(in [ConvertUndefinedOrNullToNullString] DOMString error);
+
+        readonly attribute NodeList labels;
+    };
+
+}
index 4153f5c..f5ff077 100644 (file)
@@ -71,7 +71,7 @@ input constructorNeedsFormElement
 ins interfaceName=HTMLModElement
 isindex interfaceName=HTMLIsIndexElement, constructorNeedsFormElement
 kbd interfaceName=HTMLElement
-keygen JSInterfaceName=HTMLSelectElement, constructorNeedsFormElement
+keygen constructorNeedsFormElement
 label
 layer interfaceName=HTMLElement
 legend constructorNeedsFormElement
index 9b71cce..8bc9a2e 100644 (file)
@@ -438,6 +438,7 @@ module window {
         attribute HTMLImageElementConstructor HTMLImageElement;
         attribute HTMLInputElementConstructor HTMLInputElement;
         attribute HTMLIsIndexElementConstructor HTMLIsIndexElement;
+        attribute HTMLKeygenElementConstructor HTMLKeygenElement;
         attribute HTMLLIElementConstructor HTMLLIElement;
         attribute HTMLLabelElementConstructor HTMLLabelElement;
         attribute HTMLLegendElementConstructor HTMLLegendElement;