[Problem/Bug]: -webkit-app-region: drag causes severe window resize blocking when layout animations exist

Aperta
#5,798 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
web-dev
Ambito
desktop

Direzione di ricerca

Start by reproducing the reported resize stall in a WebView2 window with -webkit-app-region: drag and layout animations, then compare with the host-side drag implementation described in the issue. The payload names no repository files or tests, so the first step is to identify the WebView2 component responsible for drag-region geometry updates. Done means live resizing no longer blocks on each intermediate drag-region recalculation.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

When using -webkit-app-region: drag together with CSS layout animations / transitions in WebView2, live window resizing (dragging window border) suffers from heavy blocking: window size stops updating for a while, then jumps to catch up with mouse. This is not ordinary frame drop; it blocks the native window sizing pipeline.

Reproduction steps
  1. Create a WebView2 window with custom titlebar.
  2. Mark titlebar element with style="-webkit-app-region: drag".
  3. Add layout animations / transform / expand-collapse transitions inside the page.
  4. Drag the window border continuously to resize.
Observed behavior
  • Window geometry update stalls during resize.
  • In our real test, the maximum blocking time of a single resize update reached ~453 ms.
  • The freeze happens only when -webkit-app-region: drag is active on animated elements.
  • After switching to our native window drag implementation (outside WebView CSS), the worst-case latency dropped to ~9.6 ms.
Expected behavior

The native window resize pipeline should not be blocked by internal web layout / animation work of drag regions.

Suggestion

Defer the layout calculation of -webkit-app-region: drag areas during live resizing.
Do not recalculate / recompute drag-region geometry on every intermediate resize tick.
Only update the drag region bounds after the resize operation finishes (on resize end).

Additional context

This issue blocks custom titlebar frameworks built on WebView2. For our project JadeView, we are forced to abandon -webkit-app-region: drag entirely and implement our own drag hit-test in host code to avoid this blocking bug.

Environment: Windows 11, latest WebView2 156.0.4314.42.

Lingua principale
PowerShell
Stelle
526
Fork
70
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di MicrosoftEdge/WebView2Feedback

Tutte le issue di MicrosoftEdge/WebView2Feedback

Issue simili

Altre issue su Desktop Dev

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.