playwright/browser_patches/webkit/embedder/Playwright/mac
Dmitry Gozman ded2bc2396
browser(webkit): postpone creation of the first page (#4769)
When we create the first page in the default context in headless mode on mac,
it gets NSWindow that is "not visible". Although we call [window setIsVisible:YES],
later on window.isVisible still returns NO.

We create our offscreen "headless" NSWindow directly from applicationDidFinishLaunching:.
Experiments show that delaying this by 100ms makes everything work. As a symptom,
we get applicationDidUnhide: notification that does not happen when we create the window
immediately.

Perhaps, we create the window too early, and there is some essential initialization
that happens after applicationDidFinishLaunching:. However, if we call
[NSApp activateIgnoringOtherApps:YES] like we do in headful mode, everything works.

The only solution that worked so far is creating the first page after a timeout.
2020-12-29 13:49:39 -08:00
..
AppDelegate.h browser(webkit): build fix, switch to the new download API (#4621) 2020-12-07 10:10:32 -08:00
AppDelegate.m browser(webkit): postpone creation of the first page (#4769) 2020-12-29 13:49:39 -08:00
BrowserWindow.xib chore: export juggler as a standalone folder for browser build (#2432) 2020-06-02 16:51:13 -07:00
BrowserWindowController.h chore: export juggler as a standalone folder for browser build (#2432) 2020-06-02 16:51:13 -07:00
BrowserWindowController.m browser(webkit): mac build fix after roll to 12-15 (#4733) 2020-12-15 23:07:34 -08:00
CMakeLists.txt chore: export juggler as a standalone folder for browser build (#2432) 2020-06-02 16:51:13 -07:00
Info.plist chore: export juggler as a standalone folder for browser build (#2432) 2020-06-02 16:51:13 -07:00
main.m chore: export juggler as a standalone folder for browser build (#2432) 2020-06-02 16:51:13 -07:00
MainMenu.xib chore: export juggler as a standalone folder for browser build (#2432) 2020-06-02 16:51:13 -07:00
Playwright_Prefix.pch chore: export juggler as a standalone folder for browser build (#2432) 2020-06-02 16:51:13 -07:00