[Webkit-unassigned] [Bug 47813] [HTML5] "form" attribute support for form control elements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 11 23:43:01 PST 2010


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





--- Comment #13 from Kenichi Ishibashi <bashi at google.com>  2010-11-11 23:43:01 PST ---
(From update of attachment 73367)
View in context: https://bugs.webkit.org/attachment.cgi?id=73367&action=review

Kent-san,

Thank you for the review and suggestions. I've updated the patch and I'll post it soon.
I've implemented some algorithms for elements which have form attribute, that are binary search algorithm and comparing the position of two elements, to find the right place to be inserted into m_associatedElements of HTMLFormElement. I hope that the patch would be more efficient than the old one.

Regards,

>> LayoutTests/fast/forms/script-tests/form-attribute-elements-order.js:5
>> +container.innerHTML = '<input name="victim" id="before1" form="owner" />' +
> 
> nit: You don't need double-quotes surrounding attribute values in many cases.

Thank you for letting me know that. I've removed these double-quotes.

>> LayoutTests/fast/forms/script-tests/form-attribute.js:34
>> +    '</form>';
> 
> How about the following similar case?
> 
> <form id=owner>
>  <form id=shouldNotBeOwner>
>   <input id=inputElement name=victime form=owner>
>  </form>
> </form>

I've added the case. BTW, it seems that Webkit ignores nested inner form elements so I just added test which ensures each form attribute points the out-most form element. I'm not sure that is correct, so please let me know if I was done something wrong.

>> WebCore/html/HTMLFormElement.cpp:406
>> +unsigned HTMLFormElement::formElementIndexWithFormAttribute(HTMLFormControlElement* element)
> 
> Does this work if the element is inside of the form?
> 
> <form id=owner>
>   <input>
>   <input form=owner>
>   <input>
> </form>
> 
> or
> 
> 
> <form id=owner>
>   <form>
>    <input>
>    <input form=owner>
>    <input>
>   </form>
> </form>

Added some test cases like that.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list