WebKit Bugzilla
Attachment 370013 Details for
Bug 197935
: AX: screenHasInvertedColors should use AppKit method, not CG
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197935-20190515175749.patch (text/plain), 2.35 KB, created by
Greg Hughes
on 2019-05-15 17:57:49 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Greg Hughes
Created:
2019-05-15 17:57:49 PDT
Size:
2.35 KB
patch
obsolete
>Subversion Revision: 245344 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 44c0affc708075e1efa314cb4ed6acedc45cad55..e0e05b2ff5b80231e73e45adf025da74ffba109d 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,15 @@ >+2019-05-15 Greg Hughes <ghughes@apple.com> >+ >+ Updated screenHasInvertedColors to use AppKit when available >+ https://bugs.webkit.org/show_bug.cgi?id=197935 >+ <rdar://problem/50834405> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/mac/PlatformScreenMac.mm: >+ (WebCore::collectScreenProperties): >+ (WebCore::screenHasInvertedColors): >+ > 2019-05-15 Youenn Fablet <youenn@apple.com> > > Mark beacon and ping loads as low priority >diff --git a/Source/WebCore/platform/mac/PlatformScreenMac.mm b/Source/WebCore/platform/mac/PlatformScreenMac.mm >index 0402319023bc480cef2845395cc5c3ad5b3db588..7c3d96090fe1e74acf4659268dd08afe6446b7eb 100644 >--- a/Source/WebCore/platform/mac/PlatformScreenMac.mm >+++ b/Source/WebCore/platform/mac/PlatformScreenMac.mm >@@ -112,6 +112,7 @@ ScreenProperties collectScreenProperties() > ASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer)); > > ScreenProperties screenProperties; >+ bool screenHasInvertedColors = [[NSWorkspace sharedWorkspace] accessibilityDisplayShouldInvertColors]; > > for (NSScreen *screen in [NSScreen screens]) { > auto displayID = WebCore::displayID(screen); >@@ -124,7 +125,6 @@ ScreenProperties collectScreenProperties() > int screenDepth = NSBitsPerPixelFromDepth(screen.depth); > int screenDepthPerComponent = NSBitsPerSampleFromDepth(screen.depth); > bool screenSupportsExtendedColor = [screen canRepresentDisplayGamut:NSDisplayGamutP3]; >- bool screenHasInvertedColors = CGDisplayUsesInvertedPolarity(); > bool screenIsMonochrome = CGDisplayUsesForceToGray(); > uint32_t displayMask = CGDisplayIDToOpenGLDisplayMask(displayID); > IORegistryGPUID gpuID = 0; >@@ -256,7 +256,7 @@ bool screenHasInvertedColors() > > // This is a system-wide accessibility setting, same on all screens. > ASSERT(hasProcessPrivilege(ProcessPrivilege::CanCommunicateWithWindowServer)); >- return CGDisplayUsesInvertedPolarity(); >+ return [[NSWorkspace sharedWorkspace] accessibilityDisplayShouldInvertColors]; > } > > int screenDepth(Widget* widget)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197935
:
370012
| 370013