Conversation
`place_hoisted_fixed` joins an ancestor stacking context that is already built, so an incremental resolve that re-flushes the same node reached it again and pushed a second entry for one child. Two entries paint the same box twice. The visible symptom was a pill menu whose shadow darkened every time the pointer crossed it, roughly 11.8k pixels per pass, with the DOM and the layout still flat because the duplication only ever existed in this paint list. Frames also slowed enough to miss timing budgets in nearby checks. `correct_hoisted_fixed_positions` already loops over every entry matching a node id rather than finding one, which is the same duplication seen from the other side. Find and replace the existing entry, append only when absent.
Publishes the hoisted paint child fix. `blitz-net` carries its own version since 0.4.10 (see the cookie provider work), so the workspace bump does not collide with it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
place_hoisted_fixedjoins an ancestor stacking context that is already built, which its own doc comment says outright:It then pushed unconditionally. An incremental resolve that re-flushes the same node reaches that list again and appends a second entry for the same child, so the box paints twice.
Every other push site is safe: they build a fresh context for the node being flushed, and
paint_childrenisclear()ed first. Only this cross-context join writes into a list that already exists.Corroborating evidence already in the tree:
correct_hoisted_fixed_positionsiterates every entry matching anode_idrather than finding one. It was written for duplicates that were already reachable.The symptom
A pill menu whose shadow darkened each time the pointer crossed it, ~11.8k changed pixels per pass. The DOM and layout stayed flat, because the duplication only ever existed in the paint list. Nearby frames also slowed enough to miss timing budgets.
Any
position: fixedelement in a nested stacking context is affected, not just menus.The fix
Find and replace the existing entry; append only when absent.
Testing
Reproduced and verified in AgencyZero's ps-qa suite, which has a dedicated check for exactly this (
pillmenu-effort-shadow-does-not-stack,expect: PixelsHold).Trigger was toggling glass blur or opacity first, then hovering the menu:
theme-glass-blurtheme-glass-opacitytheme-glass-blur-restoresThe fix also cleared two
themetimeout failures, which were duplicate paint entries making those frames slow. One defect, surfacing differently depending on timing, which is why it read as flaky.