This code in DRT has actually no effect for the scrollbars drawn by WebKit as it uses HI toolbox which reads the default _only_ from kCFPreferencesAnyApplication / kCFPreferencesCurrentUser / kCFPreferencesAnyHost. [defaults setObject:@"DoubleMax" forKey:@"AppleScrollBarVariant"]; This makes pixel tests fail for test cases that display scrollbars if the user has chosen to place scroll arrows at top and bottom in system preferences.
Here's a test case that fails for instance: LayoutTests/svg/custom/invisible-text-after-scrolling.xhtml But actually, for this one, the scrollbars do not appear to be drawn by HIToolbox.
> But actually, for this one, the scrollbars do not appear to be drawn by > HIToolbox. Ignore this comment as it is incorrect: HIToolbox is indeed drawing these scrollbars!
Created attachment 24874 [details] Tentative patch
Comment on attachment 24874 [details] Tentative patch > + CFTypeRef oldValue = CFPreferencesCopyValue(CFSTR("AppleScrollBarVariant"), kCFPreferencesAnyApplication, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); You can use a RetainPtr for that and create create a local variable to hold CFSTR("AppleScrollBarVariant"). It would also be nice to move this closer to where you set the default in NSUserDefaults. r=me
Created attachment 24877 [details] Second revision
Comment on attachment 24877 [details] Second revision r=me
Fixed in <http://trac.webkit.org/changeset/38082>.