Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 762b3509edb3672d4aad07a8d09add9ad36fec0d
      
https://github.com/WebKit/WebKit/commit/762b3509edb3672d4aad07a8d09add9ad36fec0d
  Author: Megan Gardner <[email protected]>
  Date:   2026-07-17 (Fri, 17 Jul 2026)

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

  Log Message:
  -----------
  [Custom Highlight] ::highlight() decoration replaces the originating 
element's decoration instead of layering over it.
https://bugs.webkit.org/show_bug.cgi?id=319675
rdar://182523249

Reviewed by Jessica Cheung.

When a highlight's text-decoration covered text that was a direct child of its 
block, WebKit painted only the highlight's decoration and dropped the 
originating
element's own — the root-inline-box shortcut in 
collectDecoratingBoxesForBackgroundPainting/...ForegroundPainting appended just 
the highlight's override and
returned, never adding the box's own decoration (the non-root path already 
layers ancestor decorations beneath). Append the originating box's own 
decoration as a
layer beneath the highlight's in that shortcut, guarded so it only kicks in 
when a highlight actually changed the decoration.

imported/w3c/web-platform-tests/css/css-highlight-api/painting/custom-highlight-painting-019.html

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

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



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

Reply via email to