Repository navigation
test: read runtime paint from page-paint.js when the aim sweep compares page markup - #7413
Merged
Merged
Conversation
…es page markup The aim sweep's PAGE_MARKUP kept its own list of the runtime's paint attributes, and that list missed `data-lf-beside-marker`. readMarkRoom writes it on a list item while the composer's pending mark stands there, and leaves it once the mark goes, where it decides nothing. Since #7304 the seeded 👍 on ship-review draws no mark at rest, so the stamp first appears during the sweep's ⌥-click, and the comparison read it as a widget the press had reached. The reading now strips every RUNTIME_PAINT_ATTRIBUTE, imported from the runtime, plus the element marks' attributes. A new kind of paint joins page-paint.js and the sweep gets it with no edit here. The sweep still catches what it protects: a stray pick or tab switch changes authored attributes, and a stray decision shows in the log. Closes #7405
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 aim sweep's
PAGE_MARKUPkept its own hand-written list of the runtime's paint attributes, and that list was missingdata-lf-beside-marker.readMarkRoom(browser/runtime/dom/geometry.js) writes that attribute on a list item while the composer's pending mark stands on it, and leaves it there after the mark goes. A leftover stamp decides nothing, sinceelement-marks.cssapplies it only while a mark is showing. Before #7304, the seeded 👍 onship-reviewdrew a mark at rest, so the stamp was already in the "before" reading. Now the reaction draws as a thread with no mark, so the stamp first appears during the sweep's ⌥-click. The comparison then counted it as a widget reached by the press. Nothing in #7304's intent is at stake: the only difference was this one presentation attribute.PAGE_MARKUPnow importsRUNTIME_PAINT_ATTRIBUTEfrom/runtime/base/page-paint.jsand strips every attribute in it, as source snapshots already do, plus the element marks'data-lf-markanddata-lf-projected-mark. That list has been widened by hand four times (git log -L). A new kind of paint now joinspage-paint.jsand reaches the sweep with no edit to the test. The sweep still catches what it protects: a stray pick or tab switch changes authored attributes, and a stray decision shows up in the log assertion that follows.tests/journeys/test_render_aim.py::test_an_aimed_press_does_only_what_the_outline_promised[ship-review]fails onmainat 6a95224 with thedata-lf-beside-marker="left"diff. With this change all three parametrizations pass, and so doestests/browser/test_render_aim.py::test_design_mode_comments_on_what_a_press_lands_on_and_nothing_else, the only other caller ofPAGE_MARKUP.Closes #7405 — automated triage