Bug 1368882 - Prevent ClientSize becomes minus value r=jrmuizel

This commit is contained in:
sotaro 2017-06-12 12:44:49 +09:00
Родитель 6f04204c36
Коммит 4929035c77
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -5242,6 +5242,10 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
NSToIntRound((mHorResizeMargin - mNonClientOffset.right) * scale); NSToIntRound((mHorResizeMargin - mNonClientOffset.right) * scale);
clientRect->bottom -= clientRect->bottom -=
NSToIntRound((mVertResizeMargin - mNonClientOffset.bottom) * scale); NSToIntRound((mVertResizeMargin - mNonClientOffset.bottom) * scale);
// Make client rect's width and height more than 0 to
// avoid problems of webrender and angle.
clientRect->right = std::max(clientRect->right, clientRect->left + 1);
clientRect->bottom = std::max(clientRect->bottom, clientRect->top + 1);
result = true; result = true;
*aRetValue = 0; *aRetValue = 0;