Changeset 272983 in webkit
- Timestamp:
- Feb 16, 2021 9:54:15 PM (17 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 32 edited
- 1 copied
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-in-focus-event-001-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-in-focusin-event-001-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-001-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-002-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-003-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-004-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-005-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-006-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-007-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-009-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-010-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-012-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-015-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-016-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-017-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-018-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/selectors/parsing/parse-focus-visible-expected.txt (modified) (1 diff)
-
LayoutTests/platform/ios/TestExpectations (modified) (1 diff)
-
LayoutTests/platform/mac/imported/w3c/web-platform-tests/css/selectors (added)
-
LayoutTests/platform/mac/imported/w3c/web-platform-tests/css/selectors/focus-visible-009-expected.txt (copied) (copied from trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-009-expected.txt) (1 diff)
-
Source/WTF/ChangeLog (modified) (1 diff)
-
Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/CSSSelector.cpp (modified) (1 diff)
-
Source/WebCore/css/CSSSelector.h (modified) (1 diff)
-
Source/WebCore/css/SelectorChecker.cpp (modified) (1 diff)
-
Source/WebCore/css/SelectorCheckerTestFunctions.h (modified) (1 diff)
-
Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in (modified) (1 diff)
-
Source/WebCore/css/parser/CSSParserContext.cpp (modified) (2 diffs)
-
Source/WebCore/css/parser/CSSParserContext.h (modified) (1 diff)
-
Source/WebCore/css/parser/CSSSelectorParser.cpp (modified) (2 diffs)
-
Source/WebCore/cssjit/SelectorCompiler.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r272981 r272983 1 2021-02-16 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [selectors] :focus-visible parsing and experimental flag 4 https://bugs.webkit.org/show_bug.cgi?id=221895 5 6 Reviewed by Darin Adler. 7 8 * platform/ios/TestExpectations: Skip test that timeouts in iOS platform. 9 * platform/mac/imported/w3c/web-platform-tests/css/selectors/focus-visible-009-expected.txt: 10 Slightly different rebaseline due to default outline color on Mac. 11 1 12 2021-02-16 Jonathan Bedard <JonWBedard@gmail.com> 2 13 -
trunk/LayoutTests/imported/w3c/ChangeLog
r272911 r272983 1 2021-02-16 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [selectors] :focus-visible parsing and experimental flag 4 https://bugs.webkit.org/show_bug.cgi?id=221895 5 6 Reviewed by Darin Adler. 7 8 Update expectations as now :focus-visible is a valid selector. 9 10 * web-platform-tests/css/selectors/focus-in-focus-event-001-expected.txt: 11 * web-platform-tests/css/selectors/focus-in-focusin-event-001-expected.txt: 12 * web-platform-tests/css/selectors/focus-visible-001-expected.txt: 13 * web-platform-tests/css/selectors/focus-visible-002-expected.txt: 14 * web-platform-tests/css/selectors/focus-visible-003-expected.txt: 15 * web-platform-tests/css/selectors/focus-visible-004-expected.txt: 16 * web-platform-tests/css/selectors/focus-visible-005-expected.txt: 17 * web-platform-tests/css/selectors/focus-visible-006-expected.txt: 18 * web-platform-tests/css/selectors/focus-visible-007-expected.txt: 19 * web-platform-tests/css/selectors/focus-visible-009-expected.txt: 20 * web-platform-tests/css/selectors/focus-visible-010-expected.txt: 21 * web-platform-tests/css/selectors/focus-visible-012-expected.txt: 22 * web-platform-tests/css/selectors/focus-visible-015-expected.txt: 23 * web-platform-tests/css/selectors/focus-visible-016-expected.txt: 24 * web-platform-tests/css/selectors/focus-visible-017-expected.txt: 25 * web-platform-tests/css/selectors/focus-visible-018-expected.txt: 26 * web-platform-tests/css/selectors/parsing/parse-focus-visible-expected.txt: 27 1 28 2021-02-16 Youenn Fablet <youenn@apple.com> 2 29 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-in-focus-event-001-expected.txt
r271395 r272983 2 2 3 3 PASS Checks that ':focus' pseudo-class matches inside 'focus' event handler 4 FAIL Checks that ':focus-visible' pseudo-class matches inside 'focus' event handler assert_unreached: ':focus-visible' is an invalid selector. SyntaxError: SyntaxError: The string did not match the expected pattern.Reached unreachable code4 FAIL Checks that ':focus-visible' pseudo-class matches inside 'focus' event handler assert_unreached: ':focus-visible' is an invalid selector. SyntaxError: Error: assert_equals: ':focus-visible' matches event.target expected null but got Element node <input type="text"></input> Reached unreachable code 5 5 PASS Checks that ':focus-within' pseudo-class matches inside 'focus' event handler 6 6 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-in-focusin-event-001-expected.txt
r271395 r272983 2 2 3 3 PASS Checks that ':focus' pseudo-class matches inside 'focusin' event handler 4 FAIL Checks that ':focus-visible' pseudo-class matches inside 'focusin' event handler assert_unreached: ':focus-visible' is an invalid selector. SyntaxError: SyntaxError: The string did not match the expected pattern.Reached unreachable code4 FAIL Checks that ':focus-visible' pseudo-class matches inside 'focusin' event handler assert_unreached: ':focus-visible' is an invalid selector. SyntaxError: Error: assert_equals: ':focus-visible' matches event.target expected null but got Element node <input type="text"></input> Reached unreachable code 5 5 PASS Checks that ':focus-within' pseudo-class matches inside 'focusin' event handler 6 6 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-001-expected.txt
r271395 r272983 6 6 Focus me. 7 7 8 FAIL Keyboard focus should match :focus-visible assert_equals: outlineColor for DIV#el should be green expected "rgb(0, 128, 0)" but got "rgb( 255, 0, 0)"8 FAIL Keyboard focus should match :focus-visible assert_equals: outlineColor for DIV#el should be green expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" 9 9 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-002-expected.txt
r272847 r272983 19 19 20 20 21 FAIL Focus element INPUT#input1 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input1 should be green expected "rgb(0, 128, 0)" but got "rgb( 255, 0, 0)"22 FAIL Focus element INPUT#input2 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input2 should be green expected "rgb(0, 128, 0)" but got "rgb( 255, 0, 0)"23 FAIL Focus element INPUT#input3 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input3 should be green expected "rgb(0, 128, 0)" but got "rgb( 255, 0, 0)"24 FAIL Focus element INPUT#input4 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input4 should be green expected "rgb(0, 128, 0)" but got "rgb( 255, 0, 0)"25 FAIL Focus element INPUT#input5 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input5 should be green expected "rgb(0, 128, 0)" but got "rgb( 255, 0, 0)"26 FAIL Focus element INPUT#input6 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input6 should be green expected "rgb(0, 128, 0)" but got "rgb( 255, 0, 0)"27 FAIL Focus element INPUT#input7 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input7 should be green expected "rgb(0, 128, 0)" but got "rgb( 255, 0, 0)"28 FAIL Focus element INPUT#input8 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input8 should be green expected "rgb(0, 128, 0)" but got "rgb( 255, 0, 0)"29 FAIL Focus element INPUT#input9 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input9 should be green expected "rgb(0, 128, 0)" but got "rgb( 255, 0, 0)"30 FAIL Focus element INPUT#input10 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input10 should be green expected "rgb(0, 128, 0)" but got "rgb( 255, 0, 0)"31 FAIL Focus element INPUT#input11 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input11 should be green expected "rgb(0, 128, 0)" but got "rgb( 255, 0, 0)"32 FAIL Focus element INPUT#input12 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input12 should be green expected "rgb(0, 128, 0)" but got "rgb( 255, 0, 0)"33 FAIL Focus element INPUT#input13 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input13 should be green expected "rgb(0, 128, 0)" but got "rgb( 255, 0, 0)"34 FAIL Focus element TEXTAREA#input14 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for TEXTAREA#input14 should be green expected "rgb(0, 128, 0)" but got "rgb( 255, 0, 0)"21 FAIL Focus element INPUT#input1 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input1 should be green expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" 22 FAIL Focus element INPUT#input2 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input2 should be green expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" 23 FAIL Focus element INPUT#input3 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input3 should be green expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" 24 FAIL Focus element INPUT#input4 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input4 should be green expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" 25 FAIL Focus element INPUT#input5 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input5 should be green expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" 26 FAIL Focus element INPUT#input6 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input6 should be green expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" 27 FAIL Focus element INPUT#input7 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input7 should be green expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" 28 FAIL Focus element INPUT#input8 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input8 should be green expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" 29 FAIL Focus element INPUT#input9 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input9 should be green expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" 30 FAIL Focus element INPUT#input10 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input10 should be green expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" 31 FAIL Focus element INPUT#input11 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input11 should be green expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" 32 FAIL Focus element INPUT#input12 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input12 should be green expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" 33 FAIL Focus element INPUT#input13 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for INPUT#input13 should be green expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" 34 FAIL Focus element TEXTAREA#input14 via mouse should match :focus-visible as it supports keyboard input assert_equals: outlineColor for TEXTAREA#input14 should be green expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" 35 35 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-003-expected.txt
r271395 r272983 18 18 Focus me. 19 19 20 FAIL Focus element SPAN#el-1 via mouse should NOT match :focus-visible as it does NOT support keyboard input assert_equals: backgroundColor for SPAN#el-1 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)" 21 FAIL Focus element SPAN#el-2 via mouse should NOT match :focus-visible as it does NOT support keyboard input assert_equals: backgroundColor for SPAN#el-2 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)" 22 FAIL Focus element SPAN#el-3 via mouse should NOT match :focus-visible as it does NOT support keyboard input assert_equals: backgroundColor for SPAN#el-3 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)" 23 FAIL Focus element BUTTON#el-4 via mouse should NOT match :focus-visible as it does NOT support keyboard input assert_equals: backgroundColor for BUTTON#el-4 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)" 24 FAIL Focus element INPUT#el-5 via mouse should NOT match :focus-visible as it does NOT support keyboard input assert_equals: backgroundColor for INPUT#el-5 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)" 25 FAIL Focus element INPUT#el-6 via mouse should NOT match :focus-visible as it does NOT support keyboard input assert_equals: backgroundColor for INPUT#el-6 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)" 26 FAIL Focus element INPUT#el-7 via mouse should NOT match :focus-visible as it does NOT support keyboard input assert_equals: backgroundColor for INPUT#el-7 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)" 27 FAIL Focus element INPUT#el-8 via mouse should NOT match :focus-visible as it does NOT support keyboard input assert_equals: backgroundColor for INPUT#el-8 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)" 28 FAIL Focus element INPUT#el-9 via mouse should NOT match :focus-visible as it does NOT support keyboard input assert_equals: backgroundColor for INPUT#el-9 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)" 29 FAIL Focus element INPUT#el-10 via mouse should NOT match :focus-visible as it does NOT support keyboard input assert_equals: backgroundColor for INPUT#el-10 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)" 30 FAIL Focus element INPUT#el-12 via mouse should NOT match :focus-visible as it does NOT support keyboard input assert_equals: backgroundColor for INPUT#el-12 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)" 31 FAIL Focus element INPUT#el-13 via mouse should NOT match :focus-visible as it does NOT support keyboard input assert_equals: backgroundColor for INPUT#el-13 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)" 20 PASS Focus element SPAN#el-1 via mouse should NOT match :focus-visible as it does NOT support keyboard input 21 PASS Focus element SPAN#el-2 via mouse should NOT match :focus-visible as it does NOT support keyboard input 22 PASS Focus element SPAN#el-3 via mouse should NOT match :focus-visible as it does NOT support keyboard input 23 PASS Focus element BUTTON#el-4 via mouse should NOT match :focus-visible as it does NOT support keyboard input 24 PASS Focus element INPUT#el-5 via mouse should NOT match :focus-visible as it does NOT support keyboard input 25 PASS Focus element INPUT#el-6 via mouse should NOT match :focus-visible as it does NOT support keyboard input 26 PASS Focus element INPUT#el-7 via mouse should NOT match :focus-visible as it does NOT support keyboard input 27 PASS Focus element INPUT#el-8 via mouse should NOT match :focus-visible as it does NOT support keyboard input 28 PASS Focus element INPUT#el-9 via mouse should NOT match :focus-visible as it does NOT support keyboard input 29 PASS Focus element INPUT#el-10 via mouse should NOT match :focus-visible as it does NOT support keyboard input 30 PASS Focus element INPUT#el-12 via mouse should NOT match :focus-visible as it does NOT support keyboard input 31 PASS Focus element INPUT#el-13 via mouse should NOT match :focus-visible as it does NOT support keyboard input 32 32 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-004-expected.txt
r271395 r272983 16 16 Focus me. 17 17 18 FAIL Focus element SPAN#el-1 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" assert_equals: backgroundColor for SPAN#el-1 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)"19 FAIL Focus element SPAN#el-2 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" assert_equals: backgroundColor for SPAN#el-2 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)"20 FAIL Focus element SPAN#el-3 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" assert_equals: backgroundColor for SPAN#el-3 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)"21 FAIL Focus element BUTTON#el-4 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" assert_equals: backgroundColor for BUTTON#el-4 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)"22 FAIL Focus element INPUT#el-5 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" assert_equals: backgroundColor for INPUT#el-5 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)"23 FAIL Focus element INPUT#el-6 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" assert_equals: backgroundColor for INPUT#el-6 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)"24 FAIL Focus element INPUT#el-7 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" assert_equals: backgroundColor for INPUT#el-7 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)"25 FAIL Focus element INPUT#el-8 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" assert_equals: backgroundColor for INPUT#el-8 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)"26 FAIL Focus element INPUT#el-10 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" assert_equals: backgroundColor for INPUT#el-10 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)"27 FAIL Focus element INPUT#el-11 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" assert_equals: backgroundColor for INPUT#el-11 should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)"18 PASS Focus element SPAN#el-1 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" 19 PASS Focus element SPAN#el-2 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" 20 PASS Focus element SPAN#el-3 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" 21 PASS Focus element BUTTON#el-4 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" 22 PASS Focus element INPUT#el-5 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" 23 PASS Focus element INPUT#el-6 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" 24 PASS Focus element INPUT#el-7 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" 25 PASS Focus element INPUT#el-8 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" 26 PASS Focus element INPUT#el-10 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" 27 PASS Focus element INPUT#el-11 via mouse should NOT match :focus-visible as it does NOT support keyboard input - not affected by "appearance: none" 28 28 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-005-expected.txt
r271395 r272983 7 7 I will be focused programmatically. 8 8 9 FAIL Programmatic focus after click should not match :focus-visible assert_equals: backgroundColor for DIV#el should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)" 9 PASS Programmatic focus after click should not match :focus-visible 10 10 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-006-expected.txt
r271395 r272983 6 6 Focus me 7 7 8 FAIL Focus should always match :focus-visible on content editable divs assert_equals: outlineColor for SPAN#el should be green expected "rgb(0, 128, 0)" but got "rgb( 255, 0, 0)"8 FAIL Focus should always match :focus-visible on content editable divs assert_equals: outlineColor for SPAN#el should be green expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" 9 9 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-007-expected.txt
r272007 r272983 7 7 Click me. 8 8 9 FAIL Using keyboard while element is focused should trigger :focus-visible; using mouse without moving focus should not cancel it; moving focus using mouse should cancel it. assert_equals: expected "rgb(0, 255, 0)" but got "rgba(0,0, 0, 0)"9 FAIL Using keyboard while element is focused should trigger :focus-visible; using mouse without moving focus should not cancel it; moving focus using mouse should cancel it. assert_equals: expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" 10 10 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-009-expected.txt
r271395 r272983 4 4 I will be focused automatically. 5 5 6 FAIL Autofocus should match :focus-visible assert_equals: outlineColor for BUTTON#button should be green expected "rgb(0, 128, 0)" but got "rgb( 255, 0, 0)"6 FAIL Autofocus should match :focus-visible assert_equals: outlineColor for BUTTON#button should be green expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" 7 7 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-010-expected.txt
r271395 r272983 4 4 I will be focused automatically. 5 5 6 FAIL Programmatic focus on page load should match :focus-visible assert_equals: outlineColor for DIV#el should be green expected "rgb(0, 128, 0)" but got "rgb( 255, 0, 0)"6 FAIL Programmatic focus on page load should match :focus-visible assert_equals: outlineColor for DIV#el should be green expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" 7 7 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-012-expected.txt
r271395 r272983 7 7 Click me, then use a keyboard shortcut. 8 8 9 FAIL Keyboard focus should match :focus-visible assert_equals: outlineColor for DIV#el should be green expected "rgb(0, 128, 0)" but got "rgb(255, 0, 0)" 9 PASS Keyboard focus should match :focus-visible 10 10 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-015-expected.txt
r271395 r272983 2 2 Target 3 3 4 FAIL :focus-visible does not match after script focus move assert_equals: backgroundColor for DIV#initial should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)" 4 PASS :focus-visible does not match after script focus move 5 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-016-expected.txt
r271395 r272983 2 2 3 3 4 FAIL :focus-visible always match on text inputs assert_equals: backgroundColor for DIV#initialshould be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)"4 FAIL :focus-visible always match on text inputs assert_equals: backgroundColor for INPUT#target should be lime expected "rgb(0, 255, 0)" but got "rgb(255, 0, 0)" 5 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-017-expected.txt
r272007 r272983 1 1 This test checks that by default, if using JavaScript to focus an element triggers :focus-visible matching, then the element should show a focus ring with outline-style: auto. 2 2 3 Your user-agent does not support :focus-visible pseudo-class, please SKIP this test. 4 3 If the element below that says "Target" show a focus ring with outline-style: auto, then the test result is SUCCESS. 5 4 Target 6 5 7 FAIL ":focus-visible" should be a valid selector The string did not match the expected pattern. 6 PASS ":focus-visible" should be a valid selector 8 7 PASS By default initial programatic focus matches ':focus-visible', so the element shows a focus ring with 'outline-style: auto' 9 8 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/focus-visible-018-expected.txt
r272007 r272983 1 1 This test checks that by default, using the mouse to focus a generic element does not show a focus ring (because it does not trigger :focus-visible matching). 2 2 3 Your user-agent does not support :focus-visible pseudo-class, please SKIP this test. 4 3 Click on the element below that says "Click me." 4 If the element does not have a focus ring, then the test result is SUCCESS. 5 5 Click me. 6 6 7 FAIL ":focus-visible" should be a valid selector The string did not match the expected pattern. 7 PASS ":focus-visible" should be a valid selector 8 8 FAIL Mouse focus does not show a focus ring by default assert_equals: outline-style for DIV#target should be none expected "none" but got "auto" 9 9 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/selectors/parsing/parse-focus-visible-expected.txt
r271395 r272983 1 1 2 FAIL ":focus-visible" should be a valid selector The string did not match the expected pattern. 3 FAIL "a:focus-visible" should be a valid selector The string did not match the expected pattern. 4 FAIL ":focus:not(:focus-visible)" should be a valid selector The string did not match the expected pattern. 2 PASS ":focus-visible" should be a valid selector 3 PASS "a:focus-visible" should be a valid selector 4 PASS ":focus:not(:focus-visible)" should be a valid selector 5 5 -
trunk/LayoutTests/platform/ios/TestExpectations
r272720 r272983 3395 3395 webkit.org/b/209734 imported/w3c/web-platform-tests/css/selectors/focus-visible-007.html [ Skip ] 3396 3396 webkit.org/b/209734 imported/w3c/web-platform-tests/css/selectors/focus-visible-009.html [ Skip ] 3397 webkit.org/b/209734 imported/w3c/web-platform-tests/css/selectors/focus-visible-012.html [ Skip ] 3397 3398 webkit.org/b/209734 imported/w3c/web-platform-tests/css/selectors/focus-visible-013.html [ Skip ] 3398 3399 webkit.org/b/209734 imported/w3c/web-platform-tests/css/selectors/hover-002.html [ Skip ] -
trunk/LayoutTests/platform/mac/imported/w3c/web-platform-tests/css/selectors/focus-visible-009-expected.txt
r272982 r272983 4 4 I will be focused automatically. 5 5 6 FAIL Autofocus should match :focus-visible assert_equals: outlineColor for BUTTON#button should be green expected "rgb(0, 128, 0)" but got "rgb (255, 0, 0)"6 FAIL Autofocus should match :focus-visible assert_equals: outlineColor for BUTTON#button should be green expected "rgb(0, 128, 0)" but got "rgba(0, 0, 0, 0.847)" 7 7 -
trunk/Source/WTF/ChangeLog
r272922 r272983 1 2021-02-16 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [selectors] :focus-visible parsing and experimental flag 4 https://bugs.webkit.org/show_bug.cgi?id=221895 5 6 Reviewed by Darin Adler. 7 8 * Scripts/Preferences/WebPreferencesExperimental.yaml: Add experimental feature flag. 9 1 10 2021-02-16 Yusuke Suzuki <ysuzuki@apple.com> 2 11 -
trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml
r272858 r272983 283 283 default: true 284 284 285 FocusVisibleEnabled: 286 type: bool 287 humanReadableName: ":focus-visible pseudo-class" 288 humanReadableDescription: "Enable the focus-indicated pseudo-class :focus-visible" 289 defaultValue: 290 WebKitLegacy: 291 default: false 292 WebKit: 293 default: false 294 WebCore: 295 default: false 296 285 297 # FIXME: This is on by default in WebKit2. Perhaps we should consider turning it on for WebKitLegacy as well. 286 298 GenericCueAPIEnabled: -
trunk/Source/WebCore/ChangeLog
r272982 r272983 1 2021-02-16 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [selectors] :focus-visible parsing and experimental flag 4 https://bugs.webkit.org/show_bug.cgi?id=221895 5 6 Reviewed by Darin Adler. 7 8 Add parsing for :focus-visible pseudo class, it'll only be enabled if the experimental feature flag is enabled. 9 10 Test: imported/w3c/web-platform-tests/css/selectors/parsing/parse-focus-visible.html 11 12 * css/CSSSelector.cpp: 13 (WebCore::CSSSelector::selectorText const): 14 * css/CSSSelector.h: 15 * css/SelectorChecker.cpp: 16 (WebCore::SelectorChecker::checkOne const): 17 * css/SelectorCheckerTestFunctions.h: 18 (WebCore::matchesFocusVisiblePseudoClass): 19 * css/SelectorPseudoClassAndCompatibilityElementMap.in: 20 * css/parser/CSSParserContext.cpp: 21 (WebCore::CSSParserContext::CSSParserContext): 22 (WebCore::operator==): 23 * css/parser/CSSParserContext.h: 24 * css/parser/CSSSelectorParser.cpp: 25 (WebCore::isUserActionPseudoClass): 26 (WebCore::CSSSelectorParser::consumePseudo): 27 * cssjit/SelectorCompiler.cpp: 28 (WebCore::SelectorCompiler::JSC_DEFINE_JIT_OPERATION): 29 (WebCore::SelectorCompiler::addPseudoClassType): 30 1 31 2021-02-16 Tyler Wilcock <twilco.o@protonmail.com> 2 32 -
trunk/Source/WebCore/css/CSSSelector.cpp
r270784 r272983 505 505 builder.appendLiteral(":focus"); 506 506 break; 507 case CSSSelector::PseudoClassFocusVisible: 508 builder.appendLiteral(":focus-visible"); 509 break; 507 510 case CSSSelector::PseudoClassFocusWithin: 508 511 builder.appendLiteral(":focus-within"); -
trunk/Source/WebCore/css/CSSSelector.h
r262695 r272983 115 115 PseudoClassDrag, 116 116 PseudoClassFocus, 117 PseudoClassFocusVisible, 117 118 PseudoClassFocusWithin, 118 119 PseudoClassActive, -
trunk/Source/WebCore/css/SelectorChecker.cpp
r271451 r272983 959 959 case CSSSelector::PseudoClassFocus: 960 960 return matchesFocusPseudoClass(element); 961 case CSSSelector::PseudoClassFocusVisible: 962 return matchesFocusVisiblePseudoClass(element); 961 963 case CSSSelector::PseudoClassFocusWithin: 962 964 return element.hasFocusWithin(); -
trunk/Source/WebCore/css/SelectorCheckerTestFunctions.h
r267783 r272983 473 473 } 474 474 475 ALWAYS_INLINE bool matchesFocusVisiblePseudoClass(const Element& element) 476 { 477 return InspectorInstrumentation::forcePseudoState(element, CSSSelector::PseudoClassFocusVisible); 478 } 479 475 480 } // namespace WebCore -
trunk/Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in
r262695 r272983 30 30 first-of-type 31 31 focus 32 focus-visible 32 33 focus-within 33 34 #if ENABLE(ATTACHMENT_ELEMENT) -
trunk/Source/WebCore/css/parser/CSSParserContext.cpp
r272870 r272983 84 84 #endif 85 85 , useLegacyBackgroundSizeShorthandBehavior { document.settings().useLegacyBackgroundSizeShorthandBehavior() } 86 , focusVisibleEnabled { document.settings().focusVisibleEnabled() } 86 87 #if ENABLE(ATTACHMENT_ELEMENT) 87 88 , attachmentEnabled { RuntimeEnabledFeatures::sharedFeatures().attachmentElementEnabled() } … … 116 117 #endif 117 118 && a.useLegacyBackgroundSizeShorthandBehavior == b.useLegacyBackgroundSizeShorthandBehavior 119 && a.focusVisibleEnabled == b.focusVisibleEnabled 118 120 #if ENABLE(ATTACHMENT_ELEMENT) 119 121 && a.attachmentEnabled == b.attachmentEnabled -
trunk/Source/WebCore/css/parser/CSSParserContext.h
r272870 r272983 74 74 #endif 75 75 bool useLegacyBackgroundSizeShorthandBehavior { false }; 76 bool focusVisibleEnabled { false }; 76 77 77 78 // RuntimeEnabledFeatures. -
trunk/Source/WebCore/css/parser/CSSSelectorParser.cpp
r270955 r272983 277 277 case CSSSelector::PseudoClassFocus: 278 278 case CSSSelector::PseudoClassActive: 279 case CSSSelector::PseudoClassFocusVisible: 279 280 case CSSSelector::PseudoClassFocusWithin: 280 281 return true; … … 581 582 if (selector->match() == CSSSelector::PseudoClass) { 582 583 if (m_context.mode != UASheetMode && selector->pseudoClassType() == CSSSelector::PseudoClassDirectFocus) 584 return nullptr; 585 if (!m_context.focusVisibleEnabled && selector->pseudoClassType() == CSSSelector::PseudoClassFocusVisible) 583 586 return nullptr; 584 587 #if ENABLE(ATTACHMENT_ELEMENT) -
trunk/Source/WebCore/cssjit/SelectorCompiler.cpp
r270967 r272983 86 86 static JSC_DECLARE_JIT_OPERATION_WITHOUT_WTF_INTERNAL(operationMatchesDirectFocusPseudoClass, bool, (const Element&)); 87 87 static JSC_DECLARE_JIT_OPERATION_WITHOUT_WTF_INTERNAL(operationMatchesFocusPseudoClass, bool, (const Element&)); 88 static JSC_DECLARE_JIT_OPERATION_WITHOUT_WTF_INTERNAL(operationMatchesFocusVisiblePseudoClass, bool, (const Element&)); 88 89 static JSC_DECLARE_JIT_OPERATION_WITHOUT_WTF_INTERNAL(operationIsMediaDocument, bool, (const Element&)); 89 90 static JSC_DECLARE_JIT_OPERATION_WITHOUT_WTF_INTERNAL(operationIsInRange, bool, (const Element&)); … … 632 633 } 633 634 635 JSC_DEFINE_JIT_OPERATION(operationMatchesFocusVisiblePseudoClass, bool, (const Element& element)) 636 { 637 return matchesFocusVisiblePseudoClass(element); 638 } 639 634 640 JSC_DEFINE_JIT_OPERATION(operationIsMediaDocument, bool, (const Element& element)) 635 641 { … … 779 785 case CSSSelector::PseudoClassFocus: 780 786 fragment.unoptimizedPseudoClasses.append(JSC::FunctionPtr<JSC::OperationPtrTag>(operationMatchesFocusPseudoClass)); 787 return FunctionType::SimpleSelectorChecker; 788 case CSSSelector::PseudoClassFocusVisible: 789 fragment.unoptimizedPseudoClasses.append(JSC::FunctionPtr<JSC::OperationPtrTag>(operationMatchesFocusVisiblePseudoClass)); 781 790 return FunctionType::SimpleSelectorChecker; 782 791 case CSSSelector::PseudoClassFullPageMedia:
Note: See TracChangeset
for help on using the changeset viewer.