mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 08:42:13 +00:00
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:
parent
3e3e025558
commit
5e519a6ad8
@ -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:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user