Changing pseudoClass (:disabled) should cause distribution.
authorshinyak@chromium.org <shinyak@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Nov 2012 07:41:33 +0000 (07:41 +0000)
committershinyak@chromium.org <shinyak@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Nov 2012 07:41:33 +0000 (07:41 +0000)
commita580caaa0095f4b75666dd7fd00d67dbbb15052a
tree71c14cf9307eedca7fbc6107968d1894ed5dc9ea
parentb115c477dc6fd525fe8042308b760ce17a927c8d
Changing pseudoClass (:disabled) should cause distribution.
https://bugs.webkit.org/show_bug.cgi?id=101901

Reviewed by Hajime Morita.

Source/WebCore:

We have to invalidate distribution when pseudo-class (:disabled) is changed.

According to the HTML5 spec, :disabled will match button, input, select, textarea, optgroup,
option, command, li, and fieldset. However, command is not implemented yet, we skip li and command. li might
have 'disabled' state, but we need a command element to make it 'disabled' state.

Tests: fast/dom/shadow/pseudoclass-update-disabled-button.html
       fast/dom/shadow/pseudoclass-update-disabled-fieldset.html
       fast/dom/shadow/pseudoclass-update-disabled-input.html
       fast/dom/shadow/pseudoclass-update-disabled-optgroup.html
       fast/dom/shadow/pseudoclass-update-disabled-option.html
       fast/dom/shadow/pseudoclass-update-disabled-select.html
       fast/dom/shadow/pseudoclass-update-disabled-textarea.html

* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::disabledAttributeChanged):
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::parseAttribute):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::parseAttribute):

LayoutTests:

* fast/dom/shadow/pseudoclass-update-disabled-button-expected.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-button.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-fieldset-expected.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-fieldset.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-input-expected.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-input.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-optgroup-expected.txt: Added.
* fast/dom/shadow/pseudoclass-update-disabled-optgroup.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-option-expected.txt: Added.
* fast/dom/shadow/pseudoclass-update-disabled-option.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-select-expected.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-select.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-textarea-expected.html: Added.
* fast/dom/shadow/pseudoclass-update-disabled-textarea.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@134748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-button-expected.html [new file with mode: 0644]
LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-button.html [new file with mode: 0644]
LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-fieldset-expected.html [new file with mode: 0644]
LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-fieldset.html [new file with mode: 0644]
LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-input-expected.html [new file with mode: 0644]
LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-input.html [new file with mode: 0644]
LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-optgroup-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-optgroup.html [new file with mode: 0644]
LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-option-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-option.html [new file with mode: 0644]
LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-select-expected.html [new file with mode: 0644]
LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-select.html [new file with mode: 0644]
LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-textarea-expected.html [new file with mode: 0644]
LayoutTests/fast/dom/shadow/pseudoclass-update-disabled-textarea.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLFormControlElement.cpp
Source/WebCore/html/HTMLOptGroupElement.cpp
Source/WebCore/html/HTMLOptionElement.cpp