Bug 539356 - Part 17 - Don't paint widgets that an invisible or empty bounds. r=roc

* * *
Bug 539356 - Part 13 - Only repaint widgets that have had changes since the last paint
This commit is contained in:
Matt Woodrow 2012-06-30 15:06:12 +12:00
parent 3e3e025558
commit 5e519a6ad8

View File

@ -1576,7 +1576,17 @@ class nsIWidget : public nsISupports {
if (!mNeedsPaint) {
return false;
}
return true;
bool visible;
nsresult rv = IsVisible(visible);
NS_ENSURE_SUCCESS(rv, false);
if (!visible) {
return false;
}
nsIntRect bounds;
rv = GetBounds(bounds);
NS_ENSURE_SUCCESS(rv, false);
return !bounds.IsEmpty();
}
protected: