Summary: | [mac] 1x emulation on Retina hardware shouldn't use SPI | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tim Horton <thorton> | ||||
Component: | Tools / Tests | Assignee: | Tim Horton <thorton> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | andersca, ap, rniwa, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 122006 | ||||||
Attachments: |
|
Description
Tim Horton
2013-10-01 03:37:38 PDT
Will using it break the few HiDPI tests we have? (In reply to comment #2) > Will using it break the few HiDPI tests we have? It shouldn't; they change the deviceScaleFactor at a purely WebKit level. Created attachment 213102 [details]
patch
Comment on attachment 213102 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=213102&action=review > Tools/DumpRenderTree/mac/DumpRenderTree.mm:954 > + NSDictionary *defaults = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"AppleMagnifiedMode", nil]; @{@"AppleMagnifiedMode": @YES} > Tools/DumpRenderTree/mac/DumpRenderTree.mm:955 > + [[NSUserDefaults standardUserDefaults] registerDefaults:defaults]; Registering defaults is not what we need here. A persistent preference stuck somewhere would override a registered default, and it's inconsistent with what we do in resetDefaultsToConsistentValues(). We just use regular setBool:forKey:. Is it important to set this default before entering NSApplication? Otherwise, you could just add this to resetDefaultsToConsistentValues(). > Tools/WebKitTestRunner/mac/main.mm:38 > + NSDictionary *defaults = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"AppleMagnifiedMode", nil]; > + [[NSUserDefaults standardUserDefaults] registerDefaults:defaults]; > + [defaults release]; Same comment about registerDefaults:. We already had two styles of setting defaults in this function, which was one more than we should have. Do we only want AppleMagnifiedMode set in UI process? (In reply to comment #6) > (From update of attachment 213102 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=213102&action=review > > > Tools/DumpRenderTree/mac/DumpRenderTree.mm:954 > > + NSDictionary *defaults = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"AppleMagnifiedMode", nil]; > > @{@"AppleMagnifiedMode": @YES} I wasn't sure if I could use this here, but Anders said yes, so I will switch it up. > > Tools/DumpRenderTree/mac/DumpRenderTree.mm:955 > > + [[NSUserDefaults standardUserDefaults] registerDefaults:defaults]; > > Registering defaults is not what we need here. A persistent preference stuck somewhere would override a registered default, and it's inconsistent with what we do in resetDefaultsToConsistentValues(). We just use regular setBool:forKey:. > > Is it important to set this default before entering NSApplication? Otherwise, you could just add this to resetDefaultsToConsistentValues(). > > > Tools/WebKitTestRunner/mac/main.mm:38 > > + NSDictionary *defaults = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"AppleMagnifiedMode", nil]; > > + [[NSUserDefaults standardUserDefaults] registerDefaults:defaults]; > > + [defaults release]; > > Same comment about registerDefaults:. We already had two styles of setting defaults in this function, which was one more than we should have. Yeah, Dan pointed this out. Apparently setVolatileDomain is the way to go for temporary defaults that override ones up the chain, though I didn't know this at the time. Is there any reason to actually use setBool:forKey: instead of that? > Do we only want AppleMagnifiedMode set in UI process? We only need it set in the UI process. > Is there any reason to actually use setBool:forKey: instead of that?
You can only set any volatile domain once, I think (I assume that repeated calls will replace its content).
In fact, I'm not sure if what we are doing between tests in WebKitTestRunner is right.
|