Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 43fea4339cb5accd4672689841ea9dd0c852fe75
      
https://github.com/WebKit/WebKit/commit/43fea4339cb5accd4672689841ea9dd0c852fe75
  Author: Alexsander Borges Damaceno <[email protected]>
  Date:   2026-01-21 (Wed, 21 Jan 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/background-clip/clip-text-background-table-cell-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/background-clip/clip-text-background-table-cell-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/background-clip/clip-text-background-table-cell.html
    M Source/WebCore/rendering/RenderTableCell.cpp

  Log Message:
  -----------
  `background-clip: text` does not work correctly when used on table cell
https://bugs.webkit.org/show_bug.cgi?id=285846

Reviewed by Elika Etemad.

When `background-clip: text` is applied to a table cell, the background
was being painted for the entire cell instead of only the text.

This was caused by `RenderTableCell::paintBackgroundsBehindCell`
overriding the clip mode to `FillBox::BorderBox` regardless of the
specified `background-clip` as introduced by commit 7dcecb, so Background 
painter never execute the code path for `FillBox::Text`.

This patch set the clip mode to `FillBox::Text` when `background-clip: text` is 
present
so that the background painter applies the background only to the text.

* Source/WebCore/rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintBackgroundsBehindCell):
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/background-clip/clip-text-background-table-cell-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/background-clip/clip-text-background-table-cell-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/background-clip/clip-text-background-table-cell.html:
 Added.

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



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

Reply via email to