Commit 8c57bf5d authored by tkent@chromium.org's avatar tkent@chromium.org
Browse files

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  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
parent d95c3038
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.
......
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
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
<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>
<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>
......@@ -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]
......
......@@ -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'
......
......@@ -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
......
......@@ -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
......
......@@ -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'
......
......@@ -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");
......
......@@ -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]'
......
......@@ -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'
......
......@@ -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");
......
......@@ -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
......
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.
......@@ -167,6 +167,7 @@
#include "JSHTMLImageElement.cpp"
#include "JSHTMLInputElement.cpp"
#include "JSHTMLIsIndexElement.cpp"
#include "JSHTMLKeygenElement.cpp"
#include "JSHTMLLabelElement.cpp"
#include "JSHTMLLegendElement.cpp"
#include "JSHTMLLIElement.cpp"
......
......@@ -234,6 +234,7 @@ DOM_CLASSES = \
HTMLImageElement \
HTMLInputElement \
HTMLIsIndexElement \
HTMLKeygenElement \
HTMLLIElement \
HTMLLabelElement \
HTMLLegendElement \
......
......@@ -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 \
......
......@@ -160,6 +160,7 @@
'html/HTMLImageElement.idl',
'html/HTMLInputElement.idl',
'html/HTMLIsIndexElement.idl',
'html/HTMLKeygenElement.idl',
'html/HTMLLIElement.idl',
'html/HTMLLabelElement.idl',
'html/HTMLLegendElement.idl',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment