fieldset:disabled > legend:first-child legend input should not be disabled
https://bugs.webkit.org/show_bug.cgi?id=129068
Reviewed by Andreas Kling.
Source/WebCore:
An input element inside a disabled fieldset element is ordinarily disabled unless it's inside
a legend element that is the first of its kind to appear in the fieldset's child node list.
Prior to this patch, an input element inside such a legend element was erroneously disabled if
we had another legend element between the two as in <fieldset disabled><legend><legend><input>.
Fixed the bug by correcting the algorithm in updateAncestorDisabledState.
Test: fast/forms/fieldset/fieldset-disabled-2.html
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::updateAncestorDisabledState):
LayoutTests:
Added a new regression test.
* fast/forms/fieldset/fieldset-disabled-2-expected.txt: Added.
* fast/forms/fieldset/fieldset-disabled-2.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164403
268f45cc-cd09-0410-ab3c-
d52691b4dbfc