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 CocoaSendToplevelActivateEvents();
|
||||||
void CocoaSendToplevelDeactivateEvents();
|
void CocoaSendToplevelDeactivateEvents();
|
||||||
|
|
||||||
|
nsIWidgetListener* GetPaintListener() const {
|
||||||
|
return mAttachedWidgetListener ? mAttachedWidgetListener : mWidgetListener;
|
||||||
|
}
|
||||||
|
|
||||||
enum class TransitionType {
|
enum class TransitionType {
|
||||||
Windowed,
|
Windowed,
|
||||||
Fullscreen,
|
Fullscreen,
|
||||||
|
|||||||
@@ -753,20 +753,20 @@ void nsCocoaWindow::Invalidate(const LayoutDeviceIntRect& aRect) {
|
|||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
|
||||||
void nsCocoaWindow::WillPaintWindow() {
|
void nsCocoaWindow::WillPaintWindow() {
|
||||||
if (nsIWidgetListener* listener = GetWidgetListener()) {
|
if (nsIWidgetListener* listener = GetPaintListener()) {
|
||||||
listener->WillPaintWindow(this);
|
listener->WillPaintWindow(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool nsCocoaWindow::PaintWindow(LayoutDeviceIntRegion aRegion) {
|
bool nsCocoaWindow::PaintWindow(LayoutDeviceIntRegion aRegion) {
|
||||||
nsIWidgetListener* listener = GetWidgetListener();
|
nsIWidgetListener* listener = GetPaintListener();
|
||||||
if (!listener) {
|
if (!listener) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool returnValue = listener->PaintWindow(this, aRegion);
|
bool returnValue = listener->PaintWindow(this, aRegion);
|
||||||
|
|
||||||
listener = GetWidgetListener();
|
listener = GetPaintListener();
|
||||||
if (listener) {
|
if (listener) {
|
||||||
listener->DidPaintWindow();
|
listener->DidPaintWindow();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user