Repository navigation
fix: read an important all rollback as important in the shift watch - #5298
Merged
Merged
Conversation
Chrome's CSSOM reports a longhand set only by `all: … !important` with an
empty priority and keeps the importance on `all`. The shift watch read
`#tip {all:revert-layer!important}` as a normal declaration, so the
important tier held only `left:anchor(left)!important`, and it credited the
control's independent 130px margin move to the anchor's equal travel.
The native-anchor test's `lower` and `wins` guards were added by restyling
the surface after it presented. That restyle moved the control on Linux,
spending the watch's one report for it before the fault, so Linux passed
on the setup move while macOS, where that move fell in the presentation
window, exposed the miss. The guards now stand in the document, and the
test asserts the watch reported nothing before the fault.
Closes #4916
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 shift watch missed
button#control's 130px margin move intest_native_anchor_follows_owned_translation_but_not_an_independent_offset[lower-True]. It read the important rollback#tip {all:revert-layer!important}as a normal declaration, because Chrome's CSSOM leaves a longhand set only by an importantallwith an emptygetPropertyPriorityand keeps the importance onall. That leftleft:anchor(left)!importantalone in the important tier, so the watch treated the surface as natively anchored and credited the control's independent move to the anchor's equal 130px travel. The watch now takes a declaration's priority fromallwhen the longhand reports none. It reads priority this way in all four places: rule tiers, important-only filtering, and both inline checks.The test setup also hid the miss on Linux. The guard styles were added after the page presented, and that restyle moved the control (by
[0, -21]inlower,[-350, -100]inwins). The watch reports each moved node once per page, so on Linux that setup report satisfiednames_move(errors, "button#control")before the fault ran. On macOS the setup move fell inside the presentation window, so only the real miss was left. That is why this case has failed in every scheduled macOS run since #4503 added it, including after #4976. The guards now sit in the document's own<style>, and the test asserts the watch reported nothing before the fault.Verification on Linux, Chrome 156:
lower-Truefails with the same finding the macOS runs show: onlyp#triggeris named. It passes with the fix.--cpu-throttle 10.The macOS job runs only on schedule or dispatch, so the next scheduled
test-macosrun is what confirms it there. The change touches only test instrumentation; Leaf's runtime and interface are unchanged.Closes #4916 — automated triage