Synchronize edge-scroll cursor geometry after relayout

Refresh edge-scroll fractions from laid-out scroll positions and repaint when
they differ from the values used by the frame. Preserve the repaint when a
deferred settings refresh has already changed the model.

Cover DPR changes, viewport clamping, detached scroll axes and restoration
with the actual video and cursor widgets in Original and Custom modes.

Verified 87 native Flutter cursor tests on each of macOS and Linux, plus
17 Chrome Web cursor tests.
This commit is contained in:
fufesou
2026-09-13 13:27:46 +08:00
parent d2d7c83602
commit b630f14483
3 changed files with 116 additions and 11 deletions

View File

@@ -2702,6 +2702,14 @@ class CanvasModel with ChangeNotifier {
notifyListeners();
}
void updateEdgeScrollAfterLayout((double, double) renderedScroll) {
updateScrollPercent();
// A delayed refresh may already have changed the model without repainting.
if (renderedScroll != (_scrollX, _scrollY)) {
notifyListeners();
}
}
panX(double dx) {
_x += dx;
if (isMobile) {