fieldset:disabled fieldset > legend:first-child input should be disabled
https://bugs.webkit.org/show_bug.cgi?id=129077
Reviewed by Antti Koivisto.
Source/WebCore:
Similar to r164403. When a fieldset inside a disabled fieldset, input elements inside
the inner fieldset's first legend element child should be disabled.
Test: fast/forms/fieldset/fieldset-disabled-2.html
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::legend): Fixed the bug where it was returning the first
legend element descendent. It should be the first legend element _child_.
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::updateAncestorDisabledState): Fixed the algorithm
to look for any ancestor fieldset that has been disabled instead of the first fieldset
ancestor and checking its disabledness.
LayoutTests:
Added a test case.o
* fast/forms/fieldset/fieldset-disabled-2-expected.txt:
* fast/forms/fieldset/fieldset-disabled-2.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164407
268f45cc-cd09-0410-ab3c-
d52691b4dbfc