Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8bdea3050d839cea58c0c51722b524572780fd01
      
https://github.com/WebKit/WebKit/commit/8bdea3050d839cea58c0c51722b524572780fd01
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-06-30 (Tue, 30 Jun 2026)

  Changed paths:
    A 
LayoutTests/fast/css/highlight-pseudo-fill-applies-color-filter-expected.html
    A LayoutTests/fast/css/highlight-pseudo-fill-applies-color-filter.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/highlight-fill-color-ignores-stroke-color-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/highlight-fill-color-ignores-stroke-color-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/highlight-fill-color-ignores-stroke-color.html
    M Source/WebCore/rendering/StyledMarkedText.cpp

  Log Message:
  -----------
  Marked-text highlight pseudo-element fill color is taken from the stroke color
https://bugs.webkit.org/show_bug.cgi?id=318073
rdar://180871490

Reviewed by Antti Koivisto.

This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.

computeStyleForPseudoElementStyle() set the text fill color from
usedStrokeColor() — a copy/paste from the strokeColor line below it. As a
result, marked text styled via a highlight pseudo-element (::highlight(),
::target-text, ::spelling-error, ::grammar-error) rendered its glyph fill
using the stroke color rather than the text/fill color, and ignored any
applied color filter.

Set fillColor from visitedDependentTextFillColorApplyingColorFilter(),
matching how the fill color is resolved in TextPaintStyle.cpp.

Tests: fast/css/highlight-pseudo-fill-applies-color-filter.html
       
imported/w3c/web-platform-tests/css/css-pseudo/highlight-fill-color-ignores-stroke-color-ref.html
       
imported/w3c/web-platform-tests/css/css-pseudo/highlight-fill-color-ignores-stroke-color.html

* 
LayoutTests/fast/css/highlight-pseudo-fill-applies-color-filter-expected.html: 
Added.
* LayoutTests/fast/css/highlight-pseudo-fill-applies-color-filter.html: Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/highlight-fill-color-ignores-stroke-color-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/highlight-fill-color-ignores-stroke-color-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo/highlight-fill-color-ignores-stroke-color.html:
 Added.
* Source/WebCore/rendering/StyledMarkedText.cpp:
(WebCore::computeStyleForPseudoElementStyle):

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



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

Reply via email to