<input type=color readonly> doesn't act per spec
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Feb 2017 00:46:27 +0000 (00:46 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Feb 2017 00:46:27 +0000 (00:46 +0000)
commit05677fe75e93eaa9f8a1afe28cf2a8c66babf74e
tree0d616f85277be269d269739e349ee8da246111fc
parent102ce84cc01a42be77a5924a75d27d0929699111
<input type=color readonly> doesn't act per spec
https://bugs.webkit.org/show_bug.cgi?id=168421
<rdar://problem/30593185>

Reviewed by Ryosuke Niwa.

Source/WebCore:

The 'readonly' attribute should not apply to <input type=color> as per the
HTML specification:
- https://html.spec.whatwg.org/#the-input-element:attr-input-readonly-3

Chrome / Firefox and Edge already behave as per the specification.

Tests: fast/forms/color/input-color-disabled.html
       fast/forms/color/input-color-readonly.html

* html/ColorInputType.cpp:
(WebCore::ColorInputType::handleDOMActivateEvent):
(WebCore::ColorInputType::didChooseColor):

LayoutTests:

Add layout test coverage.

* fast/forms/color/input-color-disabled-expected.txt: Added.
* fast/forms/color/input-color-disabled.html: Added.
* fast/forms/color/input-color-readonly-expected.txt: Added.
* fast/forms/color/input-color-readonly.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/color/input-color-disabled-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/color/input-color-disabled.html [new file with mode: 0644]
LayoutTests/fast/forms/color/input-color-readonly-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/color/input-color-readonly.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/TestExpectations
LayoutTests/platform/mac-wk1/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/html/ColorInputType.cpp