Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9aec53920a161fa725028326b5fa0b456585c02c
      
https://github.com/WebKit/WebKit/commit/9aec53920a161fa725028326b5fa0b456585c02c
  Author: Megan Gardner <[email protected]>
  Date:   2026-07-20 (Mon, 20 Jul 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    M Source/WebCore/rendering/TextBoxPainter.cpp

  Log Message:
  -----------
  [Selection] Paint the selection background as a separate overlay instead of 
merging it with other highlight backgrounds.
https://bugs.webkit.org/show_bug.cgi?id=319848
rdar://182745407

Reviewed by Abrar Rahman Protyasha and Wenson Hsieh.

TextBoxPainter::paintBackgroundFill added the selection to the same marked-text 
set as document markers and custom highlights,
so the selection background was coalesced and pre-blended with them in software 
rather than composited on top. Paint the
marker/highlight backgrounds first and the selection as a separate overlay fill 
(selection is the topmost highlight overlay),
so its color composites correctly.

imported/w3c/web-platform-tests/css/css-pseudo/active-selection-011.html
imported/w3c/web-platform-tests/css/css-pseudo/active-selection-016.html
imported/w3c/web-platform-tests/css/css-pseudo/highlight-cascade/highlight-currentcolor-painting-text-shadow-001.html

* LayoutTests/TestExpectations:
* Source/WebCore/rendering/TextBoxPainter.cpp:
(WebCore::TextBoxPainter::paintBackgroundFill):

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



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

Reply via email to