Changeset 245392 in webkit
- Timestamp:
- May 16, 2019 2:22:22 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r245375 r245392 1 2019-05-16 Greg Hughes <ghughes@apple.com> 2 3 Updated screenHasInvertedColors to use AppKit when available 4 https://bugs.webkit.org/show_bug.cgi?id=197935 5 <rdar://problem/50834405> 6 7 Reviewed by Chris Fleizach. 8 9 * platform/mac/PlatformScreenMac.mm: 10 (WebCore::collectScreenProperties): 11 (WebCore::screenHasInvertedColors): 12 1 13 2019-05-15 Simon Fraser <simon.fraser@apple.com> 2 14 -
trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm
r236148 r245392 113 113 114 114 ScreenProperties screenProperties; 115 bool screenHasInvertedColors = [[NSWorkspace sharedWorkspace] accessibilityDisplayShouldInvertColors]; 115 116 116 117 for (NSScreen *screen in [NSScreen screens]) { … … 125 126 int screenDepthPerComponent = NSBitsPerSampleFromDepth(screen.depth); 126 127 bool screenSupportsExtendedColor = [screen canRepresentDisplayGamut:NSDisplayGamutP3]; 127 bool screenHasInvertedColors = CGDisplayUsesInvertedPolarity();128 128 bool screenIsMonochrome = CGDisplayUsesForceToGray(); 129 129 uint32_t displayMask = CGDisplayIDToOpenGLDisplayMask(displayID); … … 257 257 // This is a system-wide accessibility setting, same on all screens. 258 258 ASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer)); 259 return CGDisplayUsesInvertedPolarity();259 return [[NSWorkspace sharedWorkspace] accessibilityDisplayShouldInvertColors]; 260 260 } 261 261
Note: See TracChangeset
for help on using the changeset viewer.