You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_a_wheel_return_attaches_the_comment_box_in_the_first_visible_frame: a pointed target's box misses the first returned frame since Playwright 1.65.2 (Chrome 159) #6539
Two cases of tests/browser/test_render_send_placement.py::test_a_wheel_return_attaches_the_comment_box_in_the_first_visible_frame fail on main, starting with run 44579262848 on b7ac350f1: [document-target] and [code-target]. Its other cases, [pane-selection], [combined-selection] and [content-selection], still pass.
The deciding assertion is the first returned frame's attachment (assert (None is not None) at first_box is not None). On the wheel back, the first compositor frame that shows the passage again has no comment box. The box appears attached one frame later:
Each pair reads (passage top, box top) from Chrome's trace screenshots.
Cause: #6530's Playwright bump from 1.65.0 to 1.65.2. It moves the headless shell from build 1254 (Chrome 158.0.8127.18) to 1255 (Chrome for Testing 159.0.8154.6). Between this run and the last one where the test passed (d193863da), every other commit changes only tests. I ran all five cases locally:
Both failing cases are the Alt-click target route, and the selection routes pass. Under the new Chrome, the returning box therefore misses the first visible frame only when it is attached to a pointed target. It is not yet established whether this is a Leaf regression that users on Chrome 159 would see, or a change in what the trace's screenshot frames capture. The failed run's wheel-return-* evidence directories hold the compositor trace, frames and mutation history, and they reproduce locally under .tmp/test-results/.
This is a Chromium 159 regression, not a Leaf one. A plain HTML page with no Leaf code shows the same dropped frame: a position: fixed box anchored to a paragraph (position-anchor, position-visibility: always) is missing from the first compositor frame that shows the paragraph again after a wheel away and back. The same page passes on headless shell 1254 (Chrome 158) and fails on 1255 (Chrome 159), in the same trace-screenshot reading the Leaf test uses. Leaf has no fix to make, so whether this test's red ends on our side is a call for @max-sixty, and I've assigned it.
The issue body needs two corrections:
The failure follows the region, not the route. With the parameters swapped locally, document-selection fails the same way and pane-target passes. Today's matrix pairs target with exactly the two failing regions (document and code), which is why it looked like a route effect.
The box isn't detached. It is missing from that frame. In the first returning frame of document-target, the field's caret and send arrow are drawn exactly where the next frame draws them, but the box's surface, words and outline aren't. With an unfiltered MutationObserver, nothing in the DOM changes during the return. The box is placed purely by CSS anchoring, so no Leaf script runs in that window.
Things I tried that don't change the result: hiding the target paint stand, will-change: transform on the box, and a shorter (700 px) or longer (1600 px) wheel.
Still unknown: whether headed Chrome 159, which users run, drops the frame too. I could only check the headless shell, because full Chromium 1255 won't launch in the CI sandbox.
Decision needed (none of these is applied):
Keep the test red until Chromium fixes it, and file the reduction below at crbug.com. I can't file there from this account.
Pin Playwright back to 1.65.0 (headless shell 1254) until a fixed Chrome ships. CI goes green, but the next Playwright bump reintroduces the failure.
Mark the two failing cases xfail(strict=True) on headless-shell builds ≥ 1255, linking the upstream bug. They then flip back to failing once Chrome fixes it.
Reduction (no Leaf code)
The SUBJECT_MARK and FOLLOWER_MARK colours, compositor_trace, frame_image, marked_tops and scroll_settled are the helpers in tests/browser/render_harness.py.
<style>body{margin:0;font:16px sans-serif;}#t{background: SUBJECT_MARK;anchor-name:--a;margin:020px;}#box{position: fixed;position-anchor:--a;position-visibility: always;left:anchor(left);bottom:calc(anchor(top)+16px);width:400px;height:80px;background: white;outline:8px solid FOLLOWER_MARK;}</style><h1>Plain</h1><divstyle="height:650px"></div><pid="t">The export keeps each tenant in an archive.</p><divstyle="height:1800px"></div><divid="box"><textarea>Keep these words</textarea></div>
Viewport 900×600, with the paragraph scrolled to y≈400. Under a benchmark compositor trace, wheel +1500, settle, then wheel -1500, settle. Each reading is (paragraph top, box top):
Closing without filing a Chromium report. #6571 marks the wheel-return cases a strict xfail on Chrome ≥ 159 (tests/browser/test_render_send_placement.py), so they fail, as an unexpected pass, once Chrome draws the box in the first returned frame again.
The regression is Chrome's. In a plain-HTML page with no Leaf code, a position: fixed box anchored to a paragraph is missing from the first frame that shows the paragraph again after a wheel return, and appears one frame later. Chromium 159 drops it in 3 of 3 runs, full and headless shell alike, and 157 and 158 in none. With position: absolute in place of fixed, 159 draws the box in every frame. Leaf's comment box, margin cards and previews are fixed and anchored, so each can be missing for that one frame.
Reduction, for anyone who files it
Open at 900×600 and scroll so the red paragraph's top is at y≈400. Wheel down 1500 px, let the scroll settle, then wheel up 1500 px, recording a DevTools trace with screenshots (disabled-by-default-devtools.screenshot).
<!doctype html><style>body{margin:0;font:16px sans-serif;}#t{background:#ff0044;anchor-name:--a;margin:020px;}#box{position: fixed;position-anchor:--a;position-visibility: always;left:anchor(left);bottom:calc(anchor(top)+16px);width:400px;height:80px;background: white;outline:8px solid #00cc44;}</style><h1>Plain</h1><divstyle="height:650px"></div><pid="t">The export keeps each tenant in an archive.</p><divstyle="height:1800px"></div><divid="box"><textarea>Keep these words</textarea></div>
Readings, as (paragraph top, box top) per screenshot frame of the return:
Activity
leaf-agent commentedon Nov 19, 2026
This is a Chromium 159 regression, not a Leaf one. A plain HTML page with no Leaf code shows the same dropped frame: a
position: fixedbox anchored to a paragraph (position-anchor,position-visibility: always) is missing from the first compositor frame that shows the paragraph again after a wheel away and back. The same page passes on headless shell 1254 (Chrome 158) and fails on 1255 (Chrome 159), in the same trace-screenshot reading the Leaf test uses. Leaf has no fix to make, so whether this test's red ends on our side is a call for @max-sixty, and I've assigned it.The issue body needs two corrections:
document-selectionfails the same way andpane-targetpasses. Today's matrix pairstargetwith exactly the two failing regions (document and code), which is why it looked like a route effect.document-target, the field's caret and send arrow are drawn exactly where the next frame draws them, but the box's surface, words and outline aren't. With an unfiltered MutationObserver, nothing in the DOM changes during the return. The box is placed purely by CSS anchoring, so no Leaf script runs in that window.Things I tried that don't change the result: hiding the target paint stand,
will-change: transformon the box, and a shorter (700 px) or longer (1600 px) wheel.Still unknown: whether headed Chrome 159, which users run, drops the frame too. I could only check the headless shell, because full Chromium 1255 won't launch in the CI sandbox.
Decision needed (none of these is applied):
xfail(strict=True)on headless-shell builds ≥ 1255, linking the upstream bug. They then flip back to failing once Chrome fixes it.Reduction (no Leaf code)
The
SUBJECT_MARKandFOLLOWER_MARKcolours,compositor_trace,frame_image,marked_topsandscroll_settledare the helpers intests/browser/render_harness.py.Viewport 900×600, with the paragraph scrolled to y≈400. Under a
benchmarkcompositor trace, wheel+1500, settle, then wheel-1500, settle. Each reading is(paragraph top, box top):This holds with and without the textarea focused.
test: expect Chrome 159 to drop the anchored box from the wheel retur…
max-sixty commentedon Nov 23, 2026
Closing without filing a Chromium report. #6571 marks the wheel-return cases a strict
xfailon Chrome ≥ 159 (tests/browser/test_render_send_placement.py), so they fail, as an unexpected pass, once Chrome draws the box in the first returned frame again.The regression is Chrome's. In a plain-HTML page with no Leaf code, a
position: fixedbox anchored to a paragraph is missing from the first frame that shows the paragraph again after a wheel return, and appears one frame later. Chromium 159 drops it in 3 of 3 runs, full and headless shell alike, and 157 and 158 in none. Withposition: absolutein place offixed, 159 draws the box in every frame. Leaf's comment box, margin cards and previews are fixed and anchored, so each can be missing for that one frame.Reduction, for anyone who files it
Open at 900×600 and scroll so the red paragraph's top is at y≈400. Wheel down 1500 px, let the scroll settle, then wheel up 1500 px, recording a DevTools trace with screenshots (
disabled-by-default-devtools.screenshot).Readings, as (paragraph top, box top) per screenshot frame of the return:
Removing
position-visibility, or usinganchors-visible, doesn't change the result.