source: webkit/trunk/Source/WebCore/ChangeLog@ 286775

Last change on this file since 286775 was 286775, checked in by Antti Koivisto, 3 years ago

[selectors] Use :focus-visible in the user agent style sheet
https://bugs.webkit.org/show_bug.cgi?id=221925
<rdar://problem/74613552>

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/focus-visible-018-2-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-018-expected.txt:

Source/WebCore:

Replace :-internal-direct-focus with :focus-visible for the default focus outline styling in the user agent style sheet.

When enabled, this will change focus drawing behavior in two cases:

  • <div tabindex> (or any element with 'tabindex' attribute that is not focusable otherwise) will not show focus indicator when focused via click/tap/script.
  • <details> will not show focus indicator when focused via click/tap/script.

Both still show focus indicator when focused via keyboard (tab) navigation.

With the feature disabled UA sheet :focus-visible behaves like :-internal-direct-focus.

This patch does not enable the feature yet.

  • css/SelectorCheckerTestFunctions.h:

(WebCore::matchesFocusVisiblePseudoClass):

Check the feature flag. If it is not enabled :focus-visible matches like :-internal-direct-focus.

  • css/html.css:

(:focus-visible):
(:-internal-direct-focus): Deleted.

Replace :-internal-direct-focus.

  • css/parser/CSSParserContext.cpp:

(WebCore::CSSParserContext::CSSParserContext):

Always allow :focus-visible when parsing UA sheet.

  • Property svn:eol-style set to native
File size: 5.9 MB

HTML preview not available, since the file size exceeds 1.0 MB.Try downloading the file instead.

Note: See TracBrowser for help on using the repository browser.