Repository navigation
Conversation
Compare eventful and silent geometry by stable element identity. This prevents style-only callbacks and DOM insertion from forcing eventful pose reads.
This branch has not been deployed
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.
What
Make the eventful and silent motion-blur discovery passes compare geometry by stable DOM element identity. Style-only callbacks and earlier-sibling insertion no longer make independent movers appear callback-dependent.
The change is intentionally limited to the event-dependency decision. It does not implement the broader scan caching or tier-handoff work discussed in #6867.
Why
On untouched upstream, deterministic regressions produced four failures with 139 passing tests:
readEvents=trueeven though the callback did not move either element.readEvents=truebecause the mover changed snapshot-local array index.The synthetic discovery workload performed 31 eventful callback invocations and 62 seeks in total, found the same single mover, and ended at the same 300 px geometry. The scan work remains 62 seeks after this change, but unnecessary per-frame callback replays fall from 5 to 0.
Related work
Refs #6867.
This preserves the eventful-first scan, callback landing behavior, animated-ancestor coverage, and root-last restoration established by #6865.
How
HTMLElement.Real callback-controlled movement still produces
readEvents=true. No public API, dependency, capture tier, filter tier, or seek ordering changes.Test plan
Automated results:
@hyperframes/coresuite: 5,650 passedA real Chrome/GSAP probe confirmed
readEvents=falsefor opacity-only and insertion cases, while genuine callback-driven movement remainsreadEvents=true. All three cases retained the expected mover and final geometry.AI assistance disclosure: OpenAI Codex assisted with investigation, implementation, and test execution. I reviewed the complete diff and verification results.