Changeset 203903 in webkit


Ignore:
Timestamp:
Jul 29, 2016 10:38:47 AM (8 years ago)
Author:
dino@apple.com
Message:

color-gamut media query returns incorrect results
https://bugs.webkit.org/show_bug.cgi?id=160166
<rdar://problem/27537577>

Reviewed by Darin Adler.

While I was unable to reproduce the originator's issue,
we communicated via email and it might have been related
to a customized color space calibration on an external
display.

Anyway, I took this opportunity to update to use the
more appropriate API for detection on macOS Sierra.

Covered by the existing fast/media/mq-color-gamut.html test.

  • platform/mac/PlatformScreenMac.mm:

(WebCore::screenSupportsExtendedColor): Use NSScreen canRepresentDisplayGamut.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r203901 r203903  
     12016-07-28  Dean Jackson  <dino@apple.com>
     2
     3        color-gamut media query returns incorrect results
     4        https://bugs.webkit.org/show_bug.cgi?id=160166
     5        <rdar://problem/27537577>
     6
     7        Reviewed by Darin Adler.
     8
     9        While I was unable to reproduce the originator's issue,
     10        we communicated via email and it might have been related
     11        to a customized color space calibration on an external
     12        display.
     13
     14        Anyway, I took this opportunity to update to use the
     15        more appropriate API for detection on macOS Sierra.
     16
     17        Covered by the existing fast/media/mq-color-gamut.html test.
     18
     19        * platform/mac/PlatformScreenMac.mm:
     20        (WebCore::screenSupportsExtendedColor): Use NSScreen canRepresentDisplayGamut.
     21
    1222016-07-29  George Ruan  <gruan@apple.com>
    223
  • trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm

    r201441 r203903  
    144144        return false;
    145145
     146#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
     147    return [screen(widget) canRepresentDisplayGamut:NSDisplayGamutP3];
     148#else
    146149    auto colorSpace = screen(widget).colorSpace.CGColorSpace;
    147 
    148 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
    149     return CGColorSpaceIsWideGamutRGB(colorSpace);
    150 #else
    151150    auto iccData = adoptCF(CGColorSpaceCopyICCProfile(colorSpace));
    152151    auto profile = adoptCF(ColorSyncProfileCreate(iccData.get(), nullptr));
Note: See TracChangeset for help on using the changeset viewer.