:read-write pseudo-class should not be applied on <input type="text" disabled>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Sep 2013 12:21:41 +0000 (12:21 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Sep 2013 12:21:41 +0000 (12:21 +0000)
commit80b150292b195933a3270f58dd469d11a4bf2500
tree87d1dd1ac7061c390d3f3dd6a4cf6354f33f8d26
parente807f737cb748f3b156526862930dd22a76287cc
:read-write pseudo-class should not be applied on <input type="text" disabled>
https://bugs.webkit.org/show_bug.cgi?id=118236

Patch by Gurpreet Kaur <k.gurpreet@samsung.com> on 2013-09-25
Reviewed by Darin Adler.

Source/WebCore:

The :read-write pseudo-class must match any element falling into one
of the following categories i.e
input elements to which the readonly attribute applies, and that are mutable
(i.e. that do not have the readonly attribute specified and that are not disabled)
textarea elements that do not have a readonly attribute, and that are not disabled
elements that are editing hosts or editable and are neither input elements nor
textarea elements.

Test: fast/css/readwrite-pseudoclass-input.html

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::matchesReadWritePseudoClass):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::matchesReadWritePseudoClass):
Checking for both readonly and disabled attribute on input ane textarea element.

LayoutTests:

* fast/css/readwrite-pseudoclass-input-expected.txt: Added.
* fast/css/readwrite-pseudoclass-input.html: Added.
Added test case to verify that :read-write pseudo-class properties are
are not applied to disabled input and textarea elements.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css/readwrite-pseudoclass-input-expected.txt [new file with mode: 0755]
LayoutTests/fast/css/readwrite-pseudoclass-input.html [new file with mode: 0755]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLTextAreaElement.cpp