-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove disabled condition from :active matching
We are changing this behavior because other browsers don't have disabled conditioning for :active and because it will become more consistent with other pseudo classes: whatwg/html#6635 (comment) Fixed: 1287171 Change-Id: Idab2abbbc94cc73fac70e34ef391c5d63518d569 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3453424 Commit-Queue: Joey Arhar <jarhar@chromium.org> Reviewed-by: Mason Freed <masonf@chromium.org> Cr-Commit-Position: refs/heads/main@{#970008} NOKEYCHECK=True GitOrigin-RevId: ed8595a55c008ac96404f2d95408f59c9a3833b6
- Loading branch information
1 parent
f157cce
commit 59bf7f7
Showing
4 changed files
with
87 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
blink/web_tests/external/wpt/html/semantics/selectors/pseudo-classes/active-disabled.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<!DOCTYPE html> | ||
<link rel=author href="mailto:jarhar@chromium.org"> | ||
<link rel=help href="https://github.com/whatwg/html/pull/7465"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-actions.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
|
||
<label id=buttonlabel for=disabledbutton>label for disabled button</label> | ||
<button id=disabledbutton disabled>disabled</button> | ||
|
||
<button id=buttonparent disabled> | ||
<div id=buttonchild>child of disabled</div> | ||
</button> | ||
|
||
<input id=disabledinput disabled> | ||
|
||
<textarea id=disabledtextarea disabled>disabled textarea</textarea> | ||
|
||
<script> | ||
promise_test(async () => { | ||
await (new test_driver.Actions() | ||
.pointerMove(2, 2, {origin: disabledbutton}) | ||
.pointerDown()) | ||
.send(); | ||
|
||
assert_true(disabledbutton.matches(':active')); | ||
|
||
await (new test_driver.Actions() | ||
.pointerUp()) | ||
.send(); | ||
}, 'Clicking on a disabled button should make it get the :active selector.'); | ||
|
||
promise_test(async () => { | ||
await (new test_driver.Actions() | ||
.pointerMove(2, 2, {origin: buttonlabel}) | ||
.pointerDown()) | ||
.send(); | ||
|
||
assert_true(disabledbutton.matches(':active')); | ||
|
||
await (new test_driver.Actions() | ||
.pointerUp()) | ||
.send(); | ||
}, 'Clicking the label for a disabled button should make the button get the :active selector.'); | ||
|
||
promise_test(async () => { | ||
await (new test_driver.Actions() | ||
.pointerMove(2, 2, {origin: buttonchild}) | ||
.pointerDown()) | ||
.send(); | ||
|
||
assert_true(buttonparent.matches(':active')); | ||
|
||
await (new test_driver.Actions() | ||
.pointerUp()) | ||
.send(); | ||
}, 'Clicking on a child of a disabled button should make the button get the :active selector.'); | ||
|
||
promise_test(async () => { | ||
await (new test_driver.Actions() | ||
.pointerMove(2, 2, {origin: disabledinput}) | ||
.pointerDown()) | ||
.send(); | ||
|
||
assert_true(disabledinput.matches(':active')); | ||
|
||
await (new test_driver.Actions() | ||
.pointerUp()) | ||
.send(); | ||
}, 'Clicking on a disabled input should make it get the :active selector.'); | ||
|
||
promise_test(async () => { | ||
await (new test_driver.Actions() | ||
.pointerMove(2, 2, {origin: disabledtextarea}) | ||
.pointerDown()) | ||
.send(); | ||
|
||
assert_true(disabledtextarea.matches(':active')); | ||
|
||
await (new test_driver.Actions() | ||
.pointerUp()) | ||
.send(); | ||
}, 'Clicking on a disabled textarea should make it get the :active selector.'); | ||
</script> |
10 changes: 0 additions & 10 deletions
10
blink/web_tests/fast/css/disabled-form-control-elements-should-not-be-active-expected.txt
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
blink/web_tests/fast/css/disabled-form-control-elements-should-not-be-active.html
This file was deleted.
Oops, something went wrong.