Closed Bug 1709864 Opened 3 years ago Closed 3 years ago

Prevent nsWindow::OnPaint() flooding on Windows

Categories

(Core :: Widget: Win32, enhancement)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1710533

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: nobody → sotaro.ikeda.g
Blocks: 1701451
Attachment #9220615 - Attachment description: WIP: Bug 1709864 - Fix nsWindow::Resize() on Windows → Bug 1709864 - Fix nsWindow::Resize() on Windows
Whiteboard: [proton-onboarding]

I or Miko can review this.

Close this bug by preferring Bug 1709998.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
Attachment #9220615 - Attachment is obsolete: true

(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.

Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Summary: Fix nsWindow::Resize() on Windows → Prevent nsWindow::OnPaint() flooding on Windows

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.

Error situation could be checked by gfxCriticalNoteOnce by Bug 1710335.

Attachment #9220615 - Attachment is obsolete: false
See Also: → 1710533
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → DUPLICATE
Attachment #9220615 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: