зеркало из https://github.com/mozilla/pjs.git
Don't use nsRect's operator== for comparisons where different sized empty rects
should be treated as different. But 301411, r+sr=roc
This commit is contained in:
Родитель
2fba00fbd9
Коммит
324f672979
|
@ -450,7 +450,11 @@ void nsView::SetDimensions(const nsRect& aRect, PRBool aPaint, PRBool aResizeWid
|
|||
nsRect dims = aRect;
|
||||
dims.MoveBy(mPosX, mPosY);
|
||||
|
||||
if (mDimBounds == dims) {
|
||||
// Don't use nsRect's operator== here, since it returns true when
|
||||
// both rects are empty even if they have different widths and we
|
||||
// have cases where that sort of thing matters to us.
|
||||
if (mDimBounds.TopLeft() == dims.TopLeft() &&
|
||||
mDimBounds.Size() == dims.Size()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -2870,7 +2870,11 @@ NS_IMETHODIMP nsViewManager::ResizeView(nsIView *aView, const nsRect &aRect, PRB
|
|||
nsRect oldDimensions;
|
||||
|
||||
view->GetDimensions(oldDimensions);
|
||||
if (oldDimensions != aRect) {
|
||||
// Don't use nsRect's operator== here, since it returns true when
|
||||
// both rects are empty even if they have different widths and we
|
||||
// have cases where that sort of thing matters to us.
|
||||
if (oldDimensions.TopLeft() != aRect.TopLeft() ||
|
||||
oldDimensions.Size() != aRect.Size()) {
|
||||
nsView* parentView = view->GetParent();
|
||||
if (parentView == nsnull)
|
||||
parentView = view;
|
||||
|
|
Загрузка…
Ссылка в новой задаче