[Mac][WK2] Multiple font tests fail is there is a global setting for font antialiasin...
[WebKit-https.git] / Tools / WebKitTestRunner / InjectedBundle / mac / InjectedBundleMac.mm
index e3e1f16..e6fc1bb 100644 (file)
@@ -61,6 +61,10 @@ void InjectedBundle::platformInitialize(WKTypeRef)
 
     [[NSUserDefaults standardUserDefaults] setVolatileDomain:dict forName:NSArgumentDomain];
 
+    // Underlying frameworks have already read AppleAntiAliasingThreshold default before we changed it.
+    // A distributed notification is delivered to all applications, but it should be harmless, and it's the only way to update all underlying frameworks anyway.
+    [[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"AppleAquaAntiAliasingChanged" object:nil userInfo:nil deliverImmediately:YES];
+
     [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:@"localhost"];
     [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:@"127.0.0.1"];