Repository navigation
fix: drop a passage's hit-test pieces when its thread moves onto an element - #7584
Merged
Merged
Conversation
…lement When a script gives a marked phrase a second copy, placement re-places the thread on its section, and the anchor paint's `replace` handed that thread to a whole repaint before removing its old pieces from the hit-test index. The repaint runs later, so a press in the same task still found the phrase's mark and opened the thread's card. Before #7563 the next margin render closed that card again; since #7563 the card follows the thread to its new row, so it stayed open and test_a_press_in_the_task_a_script_repeats_a_marked_phrase_opens_nothing failed. The index now drops the pieces before the repaint is asked for, so the press finds no mark there, as the test expects. Closes #7581
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.
A press on a marked phrase, in the same task in which a script gave the phrase a second copy, opened the thread's card. Placement had already moved the thread onto its section, since the quote no longer picks out one copy. But the anchor paint's
replace(browser/runtime/annotations/anchor-paint.ts) asked for a whole repaint for a thread that now stands on an element, and returned before it removed the passage's pieces from the hit-test index. The repaint runs later, somarkHitstill found the old mark under the press.This defect is older than #7563. At #7563's parent
b67c5abf7the press also opened a card, as a probe that counted cards right after the click showed, but the next margin render closed it because its row was gone. Since #7563,followCardThreadmoves the card to the thread's new row, as that PR meant it to, so the card stayed open andtest_a_press_in_the_task_a_script_repeats_a_marked_phrase_opens_nothingfailed. Nowreplacedrops the old pieces before it asks for the repaint, so the press finds no mark and opens nothing, which is what the test protects. #7563's card-following behavior is unchanged.Verification: the test failed in
[browser]and[firefox_browser]onmain(9e2e64d34) and passes in both with this change. The press, script and quote tests intest_render_anchors.py(35),tests/browser/threads/test_resolving.pywithtests/browser/margin/test_opening_threads.py(64), andpnpm run test:runtimeall pass.Closes #7581 — automated triage