[webkit-changes] [WebKit/WebKit] be4588: [GPU Process] Focus outline is off on <select> on ...

Aditya Keerthi noreply at github.com
Mon Mar 27 16:58:37 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: be4588f1fb254d36603c59d981fa0dfc44143020
      https://github.com/WebKit/WebKit/commit/be4588f1fb254d36603c59d981fa0dfc44143020
  Author: Aditya Keerthi <akeerthi at apple.com>
  Date:   2023-03-27 (Mon, 27 Mar 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/mac/controls/ControlMac.mm

  Log Message:
  -----------
  [GPU Process] Focus outline is off on <select> on wpt.fyi/interop-2023
https://bugs.webkit.org/show_bug.cgi?id=254472
rdar://107165828

Reviewed by Simon Fraser.

WebKit uses a flipped context to draw `NSCell`s. However, when cells are drawn
without a control view (as is the case with GPU Process enabled), AppKit does
not check the flippedness of the context, and unconditionally assumes an
unflipped context.

A workaround for this behavior was applied for cell drawing in 261085 at main, but
was not extended to cell focus ring drawing. Note that support for viewless cell
focus ring drawing was only added by AppKit in rdar://105249508.

To fix, bring the same logic from 261085 at main over to cell focus ring drawing.

* Source/WebCore/platform/graphics/mac/controls/ControlMac.mm:
(WebCore::performDrawingWithUnflippedContext):

Add a helper method to draw with an unflipped context.

(WebCore::drawSliderCell):
(WebCore::drawViewlessCell):
(WebCore::drawViewlessCellFocusRing):
(WebCore::drawCellFocusRingInView):
(WebCore::ControlMac::drawCellFocusRingInternal):

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




More information about the webkit-changes mailing list