Skip to content

empty-cells: hide treats image-only cells as empty for painting #3772

Description

@dajiaohuang

With empty-cells: hide, an image-only table cell appears to be treated as empty for cell painting.

Minimal input:

<style>
  table { border-collapse: separate; empty-cells: hide; }
  td { background: red; border: 2px solid black; }
</style>
<table><tr><td><img src=data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs= width=10 height=10></td></tr></table>

Expected: because the cell contains an image, its background and border are painted. Actual code path: Renderer/TableCell::render() returns at the
odeValue emptiness check before drawing the cell background and border. An image-only cell has no text
odeValue despite containing a replaced element. The image itself may still be visited separately by the renderer.

This report is based on static source inspection; I have not executed the example locally. The likely fix is to determine cell emptiness from its DOM content rather than text value alone, with a regression case for replaced content.

Activity

added theissue type on Oct 2, 2026
added this to the 3.1.7 milestone on Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions