playwright/browser_patches/webkit/embedder/Playwright
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
..
Configurations chore: export juggler as a standalone folder for browser build (#2432) 2020-06-02 16:51:13 -07:00
mac browser(webkit): postpone creation of the first page (#4769) 2020-12-29 13:49:39 -08:00
Playwright.xcodeproj chore: export juggler as a standalone folder for browser build (#2432) 2020-06-02 16:51:13 -07:00
win browser(webkit): do not create unique page groups for pages (#4456) 2020-11-16 14:31:50 -08:00
Makefile chore: export juggler as a standalone folder for browser build (#2432) 2020-06-02 16:51:13 -07:00
MBToolbarItem.h chore: export juggler as a standalone folder for browser build (#2432) 2020-06-02 16:51:13 -07:00
MBToolbarItem.m chore: export juggler as a standalone folder for browser build (#2432) 2020-06-02 16:51:13 -07:00