Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

browser(webkit): add app icon on Mac (#7315)

Pavel Feldmanb963dbbe3c41
diff --git a/browser_patches/webkit/BUILD_NUMBER b/browser_patches/webkit/BUILD_NUMBER
index cac42cb8e5..bac0401e60 100644
--- a/browser_patches/webkit/BUILD_NUMBER
+++ b/browser_patches/webkit/BUILD_NUMBER
@@ -1,2 +1,2 @@
-1504
-Changed: [email protected] Thu 24 Jun 2021 10:00:07 PM PDT
+1505
+Changed: [email protected] Thu Jun 24 22:39:26 PDT 2021
diff --git a/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/Contents.json b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000000..fef0f943e0
--- /dev/null
+++ b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,68 @@
+{
+ "images" : [
+ {
+ "filename" : "logo-16.png",
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "16x16"
+ },
+ {
+ "filename" : "logo-32.png",
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "16x16"
+ },
+ {
+ "filename" : "logo-33.png",
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "32x32"
+ },
+ {
+ "filename" : "logo-64.png",
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "32x32"
+ },
+ {
+ "filename" : "logo-128.png",
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "128x128"
+ },
+ {
+ "filename" : "logo-256.png",
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "128x128"
+ },
+ {
+ "filename" : "logo-257.png",
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "256x256"
+ },
+ {
+ "filename" : "logo-512.png",
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "256x256"
+ },
+ {
+ "filename" : "logo-513.png",
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "512x512"
+ },
+ {
+ "filename" : "logo-1024.png",
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "512x512"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-1024.png b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-1024.png
new file mode 100644
index 0000000000..0e884921a3
Binary files /dev/null and b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-1024.png differ
diff --git a/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-128.png b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-128.png
new file mode 100644
index 0000000000..eb8d8edb9a
Binary files /dev/null and b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-128.png differ
diff --git a/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-16.png b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-16.png
new file mode 100644
index 0000000000..ec35525155
Binary files /dev/null and b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-16.png differ
diff --git a/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-256.png b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-256.png
new file mode 100644
index 0000000000..292b1b69da
Binary files /dev/null and b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-256.png differ
diff --git a/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-257.png b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-257.png
new file mode 100644
index 0000000000..292b1b69da
Binary files /dev/null and b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-257.png differ
diff --git a/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-32.png b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-32.png
new file mode 100644
index 0000000000..0765afdab9
Binary files /dev/null and b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-32.png differ
diff --git a/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-33.png b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-33.png
new file mode 100644
index 0000000000..0765afdab9
Binary files /dev/null and b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-33.png differ
diff --git a/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-512.png b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-512.png
new file mode 100644
index 0000000000..81910918b6
Binary files /dev/null and b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-512.png differ
diff --git a/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-513.png b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-513.png
new file mode 100644
index 0000000000..81910918b6
Binary files /dev/null and b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-513.png differ
diff --git a/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-64.png b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-64.png
new file mode 100644
index 0000000000..d66de39a74
Binary files /dev/null and b/browser_patches/webkit/embedder/Playwright/Images.xcassets/AppIcon.appiconset/logo-64.png differ
diff --git a/browser_patches/webkit/embedder/Playwright/Images.xcassets/Contents.json b/browser_patches/webkit/embedder/Playwright/Images.xcassets/Contents.json
new file mode 100644
index 0000000000..73c00596a7
--- /dev/null
+++ b/browser_patches/webkit/embedder/Playwright/Images.xcassets/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/browser_patches/webkit/embedder/Playwright/Playwright.xcodeproj/project.pbxproj b/browser_patches/webkit/embedder/Playwright/Playwright.xcodeproj/project.pbxproj
index 913b63c812..c150ce3753 100644
--- a/browser_patches/webkit/embedder/Playwright/Playwright.xcodeproj/project.pbxproj
+++ b/browser_patches/webkit/embedder/Playwright/Playwright.xcodeproj/project.pbxproj
@@ -10,6 +10,7 @@
256AC3DA0F4B6AC300CF336A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF336A /* AppDelegate.m */; };
51E244FA11EFCE07008228D2 /* MBToolbarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 51E244F911EFCE07008228D2 /* MBToolbarItem.m */; };
5C9332AF24C1349C0036DECF /* SecurityInterface.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C9332AE24C1349C0036DECF /* SecurityInterface.framework */; };
+ 7A8E843E26858D80008EC0B1 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7A8E843D26858D80008EC0B1 /* Images.xcassets */; };
BC329487116A92E2008635D1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BC329486116A92E2008635D1 /* main.m */; };
BC329498116A941B008635D1 /* BrowserWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC329497116A941B008635D1 /* BrowserWindowController.m */; };
BC72B89511E57E07001EB4EB /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58150DA1D0A300B3202A /* MainMenu.xib */; };
@@ -29,6 +30,7 @@
51E244F811EFCE07008228D2 /* MBToolbarItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBToolbarItem.h; sourceTree = "<group>"; };
51E244F911EFCE07008228D2 /* MBToolbarItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MBToolbarItem.m; sourceTree = "<group>"; };
5C9332AE24C1349C0036DECF /* SecurityInterface.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SecurityInterface.framework; path = System/Library/Frameworks/SecurityInterface.framework; sourceTree = SDKROOT; };
+ 7A8E843D26858D80008EC0B1 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Images.xcassets; sourceTree = "<group>"; };
8D1107320486CEB800E47091 /* Playwright.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Playwright.app; sourceTree = BUILT_PRODUCTS_DIR; };
A1B89B95221E027A00EB4CEB /* SDKVariant.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = SDKVariant.xcconfig; sourceTree = "<group>"; };
BC329486116A92E2008635D1 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = mac/main.m; sourceTree = "<group>"; };
@@ -65,6 +67,7 @@
37BAF90620218053000EA87A /* Playwright.entitlements */,
BC329496116A941B008635D1 /* BrowserWindowController.h */,
BC329497116A941B008635D1 /* BrowserWindowController.m */,
+ 7A8E843D26858D80008EC0B1 /* Images.xcassets */,
);
name = Playwright;
sourceTree = "<group>";
@@ -190,6 +193,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 7A8E843E26858D80008EC0B1 /* Images.xcassets in Resources */,
BC72B89611E57E0F001EB4EB /* BrowserWindow.xib in Resources */,
BC72B89511E57E07001EB4EB /* MainMenu.xib in Resources */,
);
@@ -216,6 +220,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = BCA8CBDF11E578A000812FB8 /* Playwright.xcconfig */;
buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
};
name = Debug;
};
@@ -223,6 +228,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = BCA8CBDF11E578A000812FB8 /* Playwright.xcconfig */;
buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
};
name = Release;
};
diff --git a/browser_patches/webkit/embedder/Playwright/mac/BrowserWindowController.m b/browser_patches/webkit/embedder/Playwright/mac/BrowserWindowController.m
index 4846caf4c1..11a7415fd9 100644
--- a/browser_patches/webkit/embedder/Playwright/mac/BrowserWindowController.m
+++ b/browser_patches/webkit/embedder/Playwright/mac/BrowserWindowController.m
@@ -532,7 +532,7 @@ static BOOL areEssentiallyEqual(double a, double b)
title = url.lastPathComponent ?: url._web_userVisibleString;
}
- self.window.title = title;
+ self.window.title = [NSString stringWithFormat:@"🎭 Playwright: %@", title];
}
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
diff --git a/browser_patches/webkit/embedder/Playwright/mac/Info.plist b/browser_patches/webkit/embedder/Playwright/mac/Info.plist
index 4ed50c40f2..77e666e5f2 100644
--- a/browser_patches/webkit/embedder/Playwright/mac/Info.plist
+++ b/browser_patches/webkit/embedder/Playwright/mac/Info.plist
@@ -4,10 +4,25 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>html</string>
+ </array>
+ <key>CFBundleTypeMIMETypes</key>
+ <array>
+ <string>text/html</string>
+ </array>
+ <key>CFBundleTypeName</key>
+ <string>HTML</string>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ </dict>
+ </array>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIconFile</key>
- <string>WebKit Browser</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
@@ -16,41 +31,24 @@
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
- <key>CFBundleSignature</key>
- <string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
- <key>LSMinimumSystemVersion</key>
- <string>${MACOSX_DEPLOYMENT_TARGET}</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
- <key>NSMainNibFile</key>
- <string>MainMenu</string>
- <key>NSPrincipalClass</key>
- <string>NSApplication</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
- <key>CFBundleDocumentTypes</key>
- <array>
- <dict>
- <key>CFBundleTypeExtensions</key>
- <array>
- <string>html</string>
- </array>
- <key>CFBundleTypeMIMETypes</key>
- <array>
- <string>text/html</string>
- </array>
- <key>CFBundleTypeName</key>
- <string>HTML</string>
- <key>CFBundleTypeRole</key>
- <string>Editor</string>
- </dict>
- </array>
</dict>
</plist>