[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

yael.aharon at nokia.com yael.aharon at nokia.com
Wed Dec 22 16:39:13 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit a229ccb489ed4228552edd74fe90015edeea1a9d
Author: yael.aharon at nokia.com <yael.aharon at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 29 22:44:37 2010 +0000

    HTMLFormElement.elements doesn't include fieldsets
    https://bugs.webkit.org/show_bug.cgi?id=48193
    
    Reviewed by Darin Adler.
    
    WebCore:
    
    Add fieldset and keygen to the list of form collection elements, by making them enumeratable.
    This patch does not add object element to the list. A separate bug will do that.
    
    Test: fast/forms/form-collection-elements.html
    
    * html/HTMLFieldSetElement.h:
    (WebCore::HTMLFieldSetElement::isEnumeratable):
    * html/HTMLKeygenElement.h:
    (WebCore::HTMLKeygenElement::isEnumeratable):
    
    LayoutTests:
    
    * fast/forms/form-collection-elements-expected.txt: Added.
    * fast/forms/form-collection-elements.html: Added.
    * fast/forms/script-tests/form-collection-elements.js: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72835 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 94de420..a80e306 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-29  Yael Aharon  <yael.aharon at nokia.com>
+
+        Reviewed by Darin Adler.
+
+        HTMLFormElement.elements doesn't include fieldsets
+        https://bugs.webkit.org/show_bug.cgi?id=48193
+
+        * fast/forms/form-collection-elements-expected.txt: Added.
+        * fast/forms/form-collection-elements.html: Added.
+        * fast/forms/script-tests/form-collection-elements.js: Added.
+
 2010-11-29  Alexey Proskuryakov  <ap at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/fast/forms/form-collection-elements-expected.txt b/LayoutTests/fast/forms/form-collection-elements-expected.txt
new file mode 100644
index 0000000..9577a44
--- /dev/null
+++ b/LayoutTests/fast/forms/form-collection-elements-expected.txt
@@ -0,0 +1,34 @@
+This test lists all the elements of a form per http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#category-listed.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+This test does not add object element as a listed element. Separate test will cover that.
+PASS owner.elements.length is 22
+PASS owner.elements[0].id is 'button1'
+PASS owner.elements[1].id is 'fieldset1'
+PASS owner.elements[2].id is 'inputhidden'
+PASS owner.elements[3].id is 'inputtext'
+PASS owner.elements[4].id is 'inputsearch'
+PASS owner.elements[5].id is 'inputurl'
+PASS owner.elements[6].id is 'inputemail'
+PASS owner.elements[7].id is 'inputpassword'
+PASS owner.elements[8].id is 'inputdate'
+PASS owner.elements[9].id is 'inputnumber'
+PASS owner.elements[10].id is 'inputrange'
+PASS owner.elements[11].id is 'inputcolor'
+PASS owner.elements[12].id is 'inputcheckbox'
+PASS owner.elements[13].id is 'inputradio'
+PASS owner.elements[14].id is 'inputfile'
+PASS owner.elements[15].id is 'inputsubmit'
+PASS owner.elements[16].id is 'inputreset'
+PASS owner.elements[17].id is 'inputbutton'
+PASS owner.elements[18].id is 'keygen1'
+PASS owner.elements[19].id is 'output1'
+PASS owner.elements[20].id is 'select1'
+PASS owner.elements[21].id is 'textarea1'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
diff --git a/LayoutTests/fast/forms/form-collection-elements.html b/LayoutTests/fast/forms/form-collection-elements.html
new file mode 100644
index 0000000..7adcc84
--- /dev/null
+++ b/LayoutTests/fast/forms/form-collection-elements.html
@@ -0,0 +1,13 @@
+<!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>
+<script src="script-tests/form-collection-elements.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/forms/script-tests/form-collection-elements.js b/LayoutTests/fast/forms/script-tests/form-collection-elements.js
new file mode 100644
index 0000000..3b7eb69
--- /dev/null
+++ b/LayoutTests/fast/forms/script-tests/form-collection-elements.js
@@ -0,0 +1,66 @@
+description("This test lists all the elements of a form per http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#category-listed.");
+debug("This test does not add object element as a listed element. Separate test will cover that.");
+
+var container = document.createElement('div');
+document.body.appendChild(container);
+
+container.innerHTML = '<form id="form1">' +
+    '<button id=button1></button>' +
+    '<fieldset id=fieldset1><legend id=legend1></legend></fieldset>' +
+    '<input id=inputhidden type=hidden>' +
+    '<input id=inputtext type=text>' +
+    '<input id=inputsearch type=search>' +
+    '<input id=inputurl type=url>' +
+    '<input id=inputemail type=email>' +
+    '<input id=inputpassword type=password>' +
+    '<input id=inputdate type=date>' +
+    '<input id=inputnumber type=number>' +
+    '<input id=inputrange type=range>' +
+    '<input id=inputcolor type=color>' +
+    '<input id=inputcheckbox type=checkbox>' +
+    '<input id=inputradio type=radio>' +
+    '<input id=inputfile type=file>' +
+    '<input id=inputsubmit type=submit>' +
+    '<input id=inputimage type=image>' +
+    '<input id=inputreset type=reset>' +
+    '<input id=inputbutton type=button>' +
+    '<keygen id=keygen1></keygen>' +
+    '<label id=label1></label>' +
+    '<meter id=meter1></meter>' +
+    '<output id=output1></output>' +
+    '<progress id=progress1></progress>' +
+    '<select id=select1>' +
+    '    <optgroup id=optgroup1>group1</optgroup>' +
+    '    <option id=option1>option1</option>' +
+    '</select>' +
+    '<textarea id=textarea1></textarea>' +
+    '</form>';
+
+var owner = document.getElementById('form1');
+
+shouldBe('owner.elements.length', '22');
+shouldBe('owner.elements[0].id', "'button1'");
+shouldBe('owner.elements[1].id', "'fieldset1'");
+shouldBe('owner.elements[2].id', "'inputhidden'");
+shouldBe('owner.elements[3].id', "'inputtext'");
+shouldBe('owner.elements[4].id', "'inputsearch'");
+shouldBe('owner.elements[5].id', "'inputurl'");
+shouldBe('owner.elements[6].id', "'inputemail'");
+shouldBe('owner.elements[7].id', "'inputpassword'");
+shouldBe('owner.elements[8].id', "'inputdate'");
+shouldBe('owner.elements[9].id', "'inputnumber'");
+shouldBe('owner.elements[10].id', "'inputrange'");
+shouldBe('owner.elements[11].id', "'inputcolor'");
+shouldBe('owner.elements[12].id', "'inputcheckbox'");
+shouldBe('owner.elements[13].id', "'inputradio'");
+shouldBe('owner.elements[14].id', "'inputfile'");
+shouldBe('owner.elements[15].id', "'inputsubmit'");
+shouldBe('owner.elements[16].id', "'inputreset'");
+shouldBe('owner.elements[17].id', "'inputbutton'");
+shouldBe('owner.elements[18].id', "'keygen1'");
+shouldBe('owner.elements[19].id', "'output1'");
+shouldBe('owner.elements[20].id', "'select1'");
+shouldBe('owner.elements[21].id', "'textarea1'");
+
+
+var successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2aeb20f..ded20b2 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-11-29  Yael Aharon  <yael.aharon at nokia.com>
+
+        Reviewed by Darin Adler.
+
+        HTMLFormElement.elements doesn't include fieldsets
+        https://bugs.webkit.org/show_bug.cgi?id=48193
+
+        Add fieldset and keygen to the list of form collection elements, by making them enumeratable.
+        This patch does not add object element to the list. A separate bug will do that.
+
+        Test: fast/forms/form-collection-elements.html
+
+        * html/HTMLFieldSetElement.h:
+        (WebCore::HTMLFieldSetElement::isEnumeratable):
+        * html/HTMLKeygenElement.h:
+        (WebCore::HTMLKeygenElement::isEnumeratable):
+
 2010-11-29  Xan Lopez  <xlopez at igalia.com>
 
         Reviewed by Martin Robinson.
diff --git a/WebCore/html/HTMLFieldSetElement.h b/WebCore/html/HTMLFieldSetElement.h
index db99a89..dcc8d0c 100644
--- a/WebCore/html/HTMLFieldSetElement.h
+++ b/WebCore/html/HTMLFieldSetElement.h
@@ -35,6 +35,7 @@ public:
 private:
     HTMLFieldSetElement(const QualifiedName&, Document*, HTMLFormElement*);
 
+    virtual bool isEnumeratable() const { return true; }
     virtual bool supportsFocus() const;
     virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
     virtual const AtomicString& formControlType() const;
diff --git a/WebCore/html/HTMLKeygenElement.h b/WebCore/html/HTMLKeygenElement.h
index 4c08014..f722e5b 100644
--- a/WebCore/html/HTMLKeygenElement.h
+++ b/WebCore/html/HTMLKeygenElement.h
@@ -36,7 +36,6 @@ private:
     HTMLKeygenElement(const QualifiedName&, Document*, HTMLFormElement*);
 
     virtual const AtomicString& formControlType() const;
-    virtual bool isEnumeratable() const { return false; }
     virtual void parseMappedAttribute(Attribute*);
     virtual bool appendFormData(FormDataList&, bool);
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list