fix(screenshot): neutralize page ::backdrop styles on mask overlay#41524
fix(screenshot): neutralize page ::backdrop styles on mask overlay#41524Skn0tt wants to merge 1 commit into
Conversation
The mask overlay (x-pw-glass) is shown via the popover API, which places it in the top layer and gives it a ::backdrop pseudo-element. A broad page rule targeting ::backdrop bled onto it and tinted the whole viewport during masked screenshots (regression since 1.59). Neutralize it from a document-level stylesheet, since the host ::backdrop is unreachable from the glass pane shadow root. Fixes: microsoft#41504
Test results for "MCP"3 failed 7458 passed, 1132 skipped Merge workflow run. |
Test results for "tests 1"2 failed 4 flaky49175 passed, 1163 skipped Merge workflow run. |
Summary
x-pw-glass) is shown via the popover API, putting it in the top layer with a::backdroppseudo-element. A broad page rule targeting::backdropbled onto it and tinted masked screenshots (regression since 1.59).::backdropfrom a document-level stylesheet (the host::backdropis unreachable from the shadow root), installed ininstall()and removed inuninstall(). Falls back to a<style>element for Firefox during screenshots.Alternative to #41505.
Fixes #41504