Bug 783449 - Move android specific NeedsPaint checks into the android widget implementation. r=roc

This commit is contained in:
Matt Woodrow 2012-08-20 22:00:50 +12:00
parent e820e6dcd5
commit aefb4e4803
2 changed files with 6 additions and 9 deletions

View File

@ -2310,7 +2310,10 @@ nsWindow::NeedsPaint()
if (sCompositorPaused || FindTopLevel() != nsWindow::TopWindow()) {
return false;
}
return nsIWidget::NeedsPaint();
nsIntRect bounds;
nsresult rv = GetBounds(bounds);
NS_ENSURE_SUCCESS(rv, false);
return !bounds.IsEmpty();
}
#endif

View File

@ -1577,14 +1577,8 @@ class nsIWidget : public nsISupports {
*/
virtual bool WidgetPaintsBackground() { return false; }
virtual bool NeedsPaint() {
if (!IsVisible()) {
return false;
}
nsIntRect bounds;
nsresult rv = GetBounds(bounds);
NS_ENSURE_SUCCESS(rv, false);
return !bounds.IsEmpty();
virtual bool NeedsPaint() {
return true;
}
/**
* Get the natural bounds of this widget. This method is only