Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 70f3146b713f4f5768c0c5be4694094441f02a3c
      
https://github.com/WebKit/WebKit/commit/70f3146b713f4f5768c0c5be4694094441f02a3c
  Author: Ahmad Saleem <[email protected]>
  Date:   2025-11-29 (Sat, 29 Nov 2025)

  Changed paths:
    A LayoutTests/fast/events/click-focus-anchor-has-no-ring-expected.html
    A LayoutTests/fast/events/click-focus-anchor-has-no-ring.html
    A LayoutTests/fast/events/resources/focus-anchor-by-mouse.js
    M Source/WebCore/css/html.css

  Log Message:
  -----------
  Change default UA style sheet to use `:focus-visble`
https://bugs.webkit.org/show_bug.cgi?id=269138
rdar://123155364

Reviewed by Antti Koivisto.

Merge: 
https://source.chromium.org/chromium/chromium/src/+/c3102c24006870f7f08444133209998b5b74aa54

This patch changes from :focus to :focus-visible in the UA style sheet
when :focus was used to set outline properties. This aligns with [1]:

[1] https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo

"User agents should also use :focus-visible to specify the default focus style,
so that authors using :focus-visible will not also need to disable the default
:focus style."

The relevant performance optimizations are already landed in 303633@main.

Test: fast/events/click-focus-anchor-has-no-ring.html
* LayoutTests/fast/events/click-focus-anchor-has-no-ring.html: Added.
* LayoutTests/fast/events/click-focus-anchor-has-no-ring-expected.html: Added.
* LayoutTests/fast/events/resources/focus-anchor-by-mouse.js: Added.
(window.onload):
* Source/WebCore/css/html.css:
(html:focus-visible, body:focus-visible, input[readonly]:focus, 
embed:focus-visible, iframe:focus-visible, object:focus-visible):
(#if !defined(WTF_PLATFORM_IOS_FAMILY) || !WTF_PLATFORM_IOS_FAMILY):
(#endif):
(html:focus, body:focus, input[readonly]:focus, embed:focus, iframe:focus, 
object:focus): Deleted.

Canonical link: https://commits.webkit.org/303643@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to