Prevent nsWindow::OnPaint() flooding on Windows
Categories
(Core :: Widget: Win32, enhancement)
Tracking
()
People
(Reporter: sotaro, Assigned: sotaro)
References
Details
(Whiteboard: [proton-onboarding])
Attachments
(1 obsolete file)
Crated from Bug 1701451 comment 20.
nsWindow::Resize() does not update window size when size was negative like (447.0, -912.0). It caused a lot of nsWindow::OnPaint() calls as in Bug 1701451 comment 19.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Comment 2•3 years ago
|
||
I or Miko can review this.
Assignee | ||
Comment 3•3 years ago
|
||
Close this bug by preferring Bug 1709998.
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #3)
Close this bug by preferring Bug 1709998.
I changed my mind. It seems better to add handling for avoiding onPaint() flood. Bug 1709998 prevent to trigger onPaint() flooding. But if onPaint() flooding happens, it still could cause the hang.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 5•3 years ago
|
||
On nsWindow::OnPaint() triggers, next OnPaint via nsWindow::Invalidate(). nsWindow::Invalidate() was called in nsWindow::Resize() when requested height was negative.
widget->ResizeClient() was always called in nsView::DoResetWidgetBounds(), since nsWindow::Resize() did not update widget size.
ConstrainSize(&width, &height) prevented to update widget size.
Assignee | ||
Comment 6•3 years ago
|
||
Error situation could be checked by gfxCriticalNoteOnce by Bug 1710335.
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Description
•