[Webkit-unassigned] [Bug 257253] New: Redraw not happening when host classes updated and element in shadow DOM now matches css selector

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 24 02:31:01 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=257253

            Bug ID: 257253
           Summary: Redraw not happening when host classes updated and
                    element in shadow DOM now matches css selector
           Product: WebKit
           Version: Safari 16
          Hardware: Mac (Intel)
                OS: macOS 13
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: james.reed01 at bbc.co.uk

Created attachment 466478

  --> https://bugs.webkit.org/attachment.cgi?id=466478&action=review

A demonstration of the bug

See attached example bug.html

The example contains a custom element my-element which contains a div with a background colour of red. This div has the following css selector 

:host(.makeGreen) div 

applied to it so when the custom element gets the makeGreen class, the div background turns from red to green.

Click on the custom my-element in bug.html. This applies the makeGreen class to the custom element and therefore the background colour of the div inside the custom element should change from red to green. However, the background colour of the div inside the custom element remains red.

It looks like the correct styling is being applied in the inspector but a redraw has not happened. Forcing a redraw, that is, uncommenting the code commented out in the bug.html results in the correct functionality.

This bug is also observed not just with background-color but other properties such as object-fit.

Observed on:

Safari Version 16.5 (18615.2.9.11.4) on macOS Ventura 13.4
Safari Version 16.4 (18615.1.26.110.1) on macOS Ventura 13.3.1 (a)
Safari Version 16.4.1 (16615.26.101.10 16615) on macOs Big Sur

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230524/79591f95/attachment.htm>


More information about the webkit-unassigned mailing list