summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2018-03-06 19:34:25 -0800
committerMinh Nguyễn <mxn@1ec5.org>2018-03-06 19:34:25 -0800
commit6c3e8efa3a35c9934dc3b852c4db9d51aaa13a05 (patch)
tree2173e834fc12407cd467fb98c62f4b5c2d6b066b
parent22a7d54e68fac2a9cac031dafda3de4420637ea7 (diff)
downloadqtlocation-mapboxgl-6c3e8efa3a35c9934dc3b852c4db9d51aaa13a05.tar.gz
[macos] Only convert non-sRGB color space when parsing attribution HTML
-rw-r--r--platform/darwin/src/MGLAttributionInfo.mm4
1 files changed, 1 insertions, 3 deletions
diff --git a/platform/darwin/src/MGLAttributionInfo.mm b/platform/darwin/src/MGLAttributionInfo.mm
index 07d10e852b..955a9ac5a2 100644
--- a/platform/darwin/src/MGLAttributionInfo.mm
+++ b/platform/darwin/src/MGLAttributionInfo.mm
@@ -50,9 +50,7 @@
CGFloat alpha;
#if !TARGET_OS_IPHONE
// CSS uses the sRGB color space.
- if ([NSColor redColor].colorSpaceName == NSCalibratedRGBColorSpace) {
- linkColor = [linkColor colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
- } else {
+ if (linkColor.colorSpaceName != NSCalibratedRGBColorSpace) {
linkColor = [linkColor colorUsingColorSpace:[NSColorSpace sRGBColorSpace]];
}
#endif