Add Invalidate method to NativeWindow and add Mac implementation

This commit is contained in:
Gary Wilber 2017-02-13 19:41:24 -08:00
parent 11e1f6b56c
commit f19924bcb0
6 changed files with 16 additions and 6 deletions

View file

@ -1496,12 +1496,8 @@ void WebContents::Invalidate() {
osr_rwhv->Invalidate();
} else {
const auto ownerWindow = owner_window();
const auto nativeWindow = ownerWindow ? ownerWindow->GetNativeWindow() :
nullptr;
if (nativeWindow) {
const gfx::Rect& bounds = nativeWindow->bounds();
nativeWindow->SchedulePaintInRect(
gfx::Rect(0, 0, bounds.width(), bounds.height()));
if (ownerWindow) {
ownerWindow->Invalidate();
}
}
}