Changeset 269452 in webkit
- Timestamp:
- Nov 5, 2020 11:12:23 AM (21 months ago)
- Location:
- trunk
- Files:
-
- 4 added
- 7 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/dom/HTMLInputElement/disabled-checkbox-click-expected.txt (added)
-
LayoutTests/fast/dom/HTMLInputElement/disabled-checkbox-click.html (added)
-
LayoutTests/fast/dom/HTMLInputElement/disabled-radio-click-expected.txt (added)
-
LayoutTests/fast/dom/HTMLInputElement/disabled-radio-click.html (added)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-click-expected.txt (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/radio-input-cancel-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/dom/Node.cpp (modified) (1 diff)
-
Source/WebCore/html/RadioInputType.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r269451 r269452 1 2020-11-05 Chris Dumez <cdumez@apple.com> 2 3 <input disabled> does not fire click events after dispatchEvent 4 https://bugs.webkit.org/show_bug.cgi?id=215461 5 <rdar://problem/67030950> 6 7 Reviewed by Darin Adler. 8 9 Extend layout test coverage. 10 11 * fast/dom/HTMLInputElement/disabled-checkbox-click-expected.txt: Added. 12 * fast/dom/HTMLInputElement/disabled-checkbox-click.html: Added. 13 * fast/dom/HTMLInputElement/disabled-radio-click-expected.txt: Added. 14 * fast/dom/HTMLInputElement/disabled-radio-click.html: Added. 15 1 16 2020-11-05 Chris Dumez <cdumez@apple.com> 2 17 -
trunk/LayoutTests/imported/w3c/ChangeLog
r269451 r269452 1 2020-11-05 Chris Dumez <cdumez@apple.com> 2 3 <input disabled> does not fire click events after dispatchEvent 4 https://bugs.webkit.org/show_bug.cgi?id=215461 5 <rdar://problem/67030950> 6 7 Reviewed by Darin Adler. 8 9 Rebaseline WPT tests that are now passing. 10 11 * web-platform-tests/dom/events/Event-dispatch-click-expected.txt: 12 * web-platform-tests/html/semantics/forms/the-input-element/radio-input-cancel-expected.txt: 13 1 14 2020-11-05 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-click-expected.txt
r269400 r269452 1 2 Harness Error (TIMEOUT), message = null3 1 4 2 PASS basic with click() … … 19 17 PASS disabled checkbox should be checked from dispatchEvent(new MouseEvent("click")) 20 18 PASS disabled radio should be checked from dispatchEvent(new MouseEvent("click")) 21 TIMEOUT disabled checkbox should fire onclick Test timed out 22 TIMEOUT disabled radio should fire onclick Test timed out 23 TIMEOUT disabled checkbox should get legacy-canceled-activation behavior Test timed out 24 TIMEOUT disabled radio should get legacy-canceled-activation behavior Test timed out 19 PASS disabled checkbox should fire onclick 20 PASS disabled radio should fire onclick 21 PASS disabled checkbox should get legacy-canceled-activation behavior 22 PASS disabled radio should get legacy-canceled-activation behavior 25 23 PASS disabled checkbox should get legacy-canceled-activation behavior 2 26 FAIL disabled radio should get legacy-canceled-activation behavior 2 assert_false: expected false got true 24 PASS disabled radio should get legacy-canceled-activation behavior 2 27 25 PASS disconnected form should not submit 28 26 PASS disabled submit button should not activate -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/radio-input-cancel-expected.txt
r217225 r269452 1 1 2 2 3 FAIL radio input cancel behavior reverts state assert_false: expected false got true3 PASS radio input cancel behavior reverts state 4 4 -
trunk/Source/WebCore/ChangeLog
r269450 r269452 1 2020-11-05 Chris Dumez <cdumez@apple.com> 2 3 <input disabled> does not fire click events after dispatchEvent 4 https://bugs.webkit.org/show_bug.cgi?id=215461 5 <rdar://problem/67030950> 6 7 Reviewed by Darin Adler. 8 9 We should allow mouse events from JS to get dispatched on disabled form controls. Only mouse events from the 10 user and calling input.click() should not cause an event to get dispatched on disabled form controls. 11 12 Tests: fast/dom/HTMLInputElement/disabled-checkbox-click.html 13 fast/dom/HTMLInputElement/disabled-radio-click.html 14 15 * dom/Node.cpp: 16 (WebCore::Node::handleLocalEvents): 17 Allow mouse events from JS to get dispatched on disabled form controls. Trusted mouse events (events from 18 the user-agent) are still not dispatched on disabled form controls. 19 20 * html/RadioInputType.cpp: 21 (WebCore::RadioInputType::didDispatchClick): 22 Fix post activation behavior for radio input elements so that we set the elements' checkedness to false 23 if the activation was cancelled and we are not restoring the checkedness of the previously checked element 24 in the group. 25 - https://html.spec.whatwg.org/#the-input-element:legacy-canceled-activation-behavior (Step 2) 26 1 27 2020-11-05 Antoine Quint <graouts@webkit.org> 2 28 -
trunk/Source/WebCore/dom/Node.cpp
r269442 r269452 2372 2372 2373 2373 // FIXME: Should we deliver wheel events to disabled form controls or not? 2374 if (is<Element>(*this) && downcast<Element>(*this).isDisabledFormControl() && event.is MouseEvent() && !event.isWheelEvent())2374 if (is<Element>(*this) && downcast<Element>(*this).isDisabledFormControl() && event.isTrusted() && event.isMouseEvent() && !event.isWheelEvent()) 2375 2375 return; 2376 2376 -
trunk/Source/WebCore/html/RadioInputType.cpp
r246490 r269452 172 172 if (button && button->isRadioButton() && button->form() == element()->form() && button->name() == element()->name()) 173 173 button->setChecked(true); 174 else 175 element()->setChecked(false); 174 176 } else if (state.checked != element()->checked()) 175 177 fireInputAndChangeEvents();
Note: See TracChangeset
for help on using the changeset viewer.