[mac] 1x emulation on Retina hardware shouldn't use SPI

https://bugs.webkit.org/show_bug.cgi?id=122152
<rdar://problem/15119384>

Reviewed by Anders Carlsson.

* DumpRenderTree/mac/DumpRenderTree.mm:
(createWebViewAndOffscreenWindow):
(main):
* DumpRenderTree/mac/DumpRenderTreeWindow.h:
* DumpRenderTree/mac/DumpRenderTreeWindow.mm:
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::PlatformWebView):
* WebKitTestRunner/mac/main.mm:
(main):
Register for AppleMagnifiedMode instead of using _setWindowResolution:displayIfChanged:.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156724 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3937f523
2013-10-01 Tim Horton <timothy_horton@apple.com>
[mac] 1x emulation on Retina hardware shouldn't use SPI
https://bugs.webkit.org/show_bug.cgi?id=122152
<rdar://problem/15119384>
Reviewed by Anders Carlsson.
* DumpRenderTree/mac/DumpRenderTree.mm:
(createWebViewAndOffscreenWindow):
(main):
* DumpRenderTree/mac/DumpRenderTreeWindow.h:
* DumpRenderTree/mac/DumpRenderTreeWindow.mm:
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::PlatformWebView):
* WebKitTestRunner/mac/main.mm:
(main):
Register for AppleMagnifiedMode instead of using _setWindowResolution:displayIfChanged:.
2013-09-30 Sam Weinig <sam@webkit.org>
check-webkit-style should not warn about use of C++11 “>>” instead of “> >"
......
......@@ -573,7 +573,6 @@ WebView *createWebViewAndOffscreenWindow()
[[window contentView] addSubview:webView];
[window orderBack:nil];
[window setAutodisplay:NO];
[window _setWindowResolution:1 displayIfChanged:YES];
[window startListeningForAcceleratedCompositingChanges];
......@@ -951,6 +950,11 @@ int main(int argc, const char *argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[DumpRenderTreeApplication sharedApplication]; // Force AppKit to init itself
NSDictionary *defaults = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"AppleMagnifiedMode", nil];
[[NSUserDefaults standardUserDefaults] registerDefaults:defaults];
[defaults release];
dumpRenderTree(argc, argv);
[WebCoreStatistics garbageCollectJavaScriptObjects];
[WebCoreStatistics emptyCache]; // Otherwise SVGImages trigger false positives for Frame/Node counts
......
......@@ -32,12 +32,6 @@
@class WebView;
@interface NSWindow (Details)
- (void)_setWindowResolution:(CGFloat)resolution displayIfChanged:(BOOL)displayIfChanged;
@end
@interface DumpRenderTreeWindow : NSWindow
{
}
......
......@@ -120,9 +120,4 @@ static CFArrayCallBacks NonRetainingArrayCallbacks = {
[self setAutodisplay:YES];
}
- (CGFloat)backingScaleFactor
{
return 1;
}
@end
......@@ -111,17 +111,6 @@ using namespace WTR;
return NSMakeRect(_fakeOrigin.x, _fakeOrigin.y, currentFrame.size.width, currentFrame.size.height);
}
- (CGFloat)backingScaleFactor
{
return 1;
}
@end
@interface NSWindow (Details)
- (void)_setWindowResolution:(CGFloat)resolution displayIfChanged:(BOOL)displayIfChanged;
@end
namespace WTR {
......@@ -150,7 +139,6 @@ PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGro
[[m_window contentView] addSubview:m_view];
[m_window orderBack:nil];
[m_window setReleasedWhenClosed:NO];
[m_window _setWindowResolution:1 displayIfChanged:YES];
}
void PlatformWebView::resizeTo(unsigned width, unsigned height)
......
......@@ -32,6 +32,10 @@ int main(int argc, const char* argv[])
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[NSApplication sharedApplication];
[[NSUserDefaults standardUserDefaults] setVolatileDomain:[NSDictionary dictionaryWithObject:[NSNumber numberWithBool:NO] forKey:@"WebKitKerningAndLigaturesEnabledByDefault"] forName:NSArgumentDomain];
NSDictionary *defaults = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"AppleMagnifiedMode", nil];
[[NSUserDefaults standardUserDefaults] registerDefaults:defaults];
[defaults release];
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"WebAutomaticQuoteSubstitutionEnabled"];
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"WebAutomaticDashSubstitutionEnabled"];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment