Bug 1919165 - Notify attached listener for paint like in other platforms.
This should fix browser_startup_content_mainthreadio.js because it's not getting the widget-first-paint notification. MANUAL PUSH: Orange fix CLOSED TREE
This commit is contained in:
@@ -475,6 +475,10 @@ class nsCocoaWindow final : public nsBaseWidget {
|
||||
void CocoaSendToplevelActivateEvents();
|
||||
void CocoaSendToplevelDeactivateEvents();
|
||||
|
||||
nsIWidgetListener* GetPaintListener() const {
|
||||
return mAttachedWidgetListener ? mAttachedWidgetListener : mWidgetListener;
|
||||
}
|
||||
|
||||
enum class TransitionType {
|
||||
Windowed,
|
||||
Fullscreen,
|
||||
|
||||
@@ -753,20 +753,20 @@ void nsCocoaWindow::Invalidate(const LayoutDeviceIntRect& aRect) {
|
||||
#pragma mark -
|
||||
|
||||
void nsCocoaWindow::WillPaintWindow() {
|
||||
if (nsIWidgetListener* listener = GetWidgetListener()) {
|
||||
if (nsIWidgetListener* listener = GetPaintListener()) {
|
||||
listener->WillPaintWindow(this);
|
||||
}
|
||||
}
|
||||
|
||||
bool nsCocoaWindow::PaintWindow(LayoutDeviceIntRegion aRegion) {
|
||||
nsIWidgetListener* listener = GetWidgetListener();
|
||||
nsIWidgetListener* listener = GetPaintListener();
|
||||
if (!listener) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool returnValue = listener->PaintWindow(this, aRegion);
|
||||
|
||||
listener = GetWidgetListener();
|
||||
listener = GetPaintListener();
|
||||
if (listener) {
|
||||
listener->DidPaintWindow();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user