Title: [186878] trunk/Source
- Revision
- 186878
- Author
- [email protected]
- Date
- 2015-07-15 18:00:22 -0700 (Wed, 15 Jul 2015)
Log Message
Color match plug-ins
<rdar://problem/21758722>
https://bugs.webkit.org/show_bug.cgi?id=146987
Reviewed by Dean Jackson.
Source/WebCore:
* platform/spi/cocoa/QuartzCoreSPI.h:
Add colorMatchUntaggedContent property.
Source/WebKit2:
* Platform/mac/LayerHostingContext.h:
* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::setColorMatchUntaggedContent):
(WebKit::LayerHostingContext::colorMatchUntaggedContent):
Add setter/getter for color matching untagged content.
* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::updateLayerHostingContext):
Have plug-ins CAContext's color match untagged colors into sRGB.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (186877 => 186878)
--- trunk/Source/WebCore/ChangeLog 2015-07-16 00:33:33 UTC (rev 186877)
+++ trunk/Source/WebCore/ChangeLog 2015-07-16 01:00:22 UTC (rev 186878)
@@ -1,3 +1,14 @@
+2015-07-15 Sam Weinig <[email protected]>
+
+ Color match plug-ins
+ <rdar://problem/21758722>
+ https://bugs.webkit.org/show_bug.cgi?id=146987
+
+ Reviewed by Dean Jackson.
+
+ * platform/spi/cocoa/QuartzCoreSPI.h:
+ Add colorMatchUntaggedContent property.
+
2015-07-15 Brent Fulgham <[email protected]>
[Win] Another build fix after r186858.
Modified: trunk/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h (186877 => 186878)
--- trunk/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h 2015-07-16 00:33:33 UTC (rev 186877)
+++ trunk/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h 2015-07-16 01:00:22 UTC (rev 186878)
@@ -70,6 +70,9 @@
- (void)setFencePort:(mach_port_t)port;
- (void)setFencePort:(mach_port_t)port commitHandler:(void(^)(void))block;
#endif
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100
+@property BOOL colorMatchUntaggedContent;
+#endif
@property (readonly) uint32_t contextId;
@property (strong) CALayer *layer;
@property CGColorSpaceRef colorSpace;
Modified: trunk/Source/WebKit2/ChangeLog (186877 => 186878)
--- trunk/Source/WebKit2/ChangeLog 2015-07-16 00:33:33 UTC (rev 186877)
+++ trunk/Source/WebKit2/ChangeLog 2015-07-16 01:00:22 UTC (rev 186878)
@@ -1,3 +1,21 @@
+2015-07-15 Sam Weinig <[email protected]>
+
+ Color match plug-ins
+ <rdar://problem/21758722>
+ https://bugs.webkit.org/show_bug.cgi?id=146987
+
+ Reviewed by Dean Jackson.
+
+ * Platform/mac/LayerHostingContext.h:
+ * Platform/mac/LayerHostingContext.mm:
+ (WebKit::LayerHostingContext::setColorMatchUntaggedContent):
+ (WebKit::LayerHostingContext::colorMatchUntaggedContent):
+ Add setter/getter for color matching untagged content.
+
+ * PluginProcess/mac/PluginControllerProxyMac.mm:
+ (WebKit::PluginControllerProxy::updateLayerHostingContext):
+ Have plug-ins CAContext's color match untagged colors into sRGB.
+
2015-07-15 Michael Catanzaro <[email protected]>
[GTK] Rename PACKAGE_LOCALE_DIR to LOCALEDIR
Modified: trunk/Source/WebKit2/Platform/mac/LayerHostingContext.h (186877 => 186878)
--- trunk/Source/WebKit2/Platform/mac/LayerHostingContext.h 2015-07-16 00:33:33 UTC (rev 186877)
+++ trunk/Source/WebKit2/Platform/mac/LayerHostingContext.h 2015-07-16 01:00:22 UTC (rev 186878)
@@ -62,6 +62,11 @@
void setColorSpace(CGColorSpaceRef);
CGColorSpaceRef colorSpace() const;
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100
+ void setColorMatchUntaggedContent(bool);
+ bool colorMatchUntaggedContent() const;
+#endif
+
// Fences only work on iOS and OS 10.10+.
void setFencePort(mach_port_t);
Modified: trunk/Source/WebKit2/Platform/mac/LayerHostingContext.mm (186877 => 186878)
--- trunk/Source/WebKit2/Platform/mac/LayerHostingContext.mm 2015-07-16 00:33:33 UTC (rev 186877)
+++ trunk/Source/WebKit2/Platform/mac/LayerHostingContext.mm 2015-07-16 01:00:22 UTC (rev 186878)
@@ -102,6 +102,21 @@
return [m_context colorSpace];
}
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100
+void LayerHostingContext::setColorMatchUntaggedContent(bool colorMatchUntaggedContent)
+{
+ if ([m_context respondsToSelector:@selector(setColorMatchUntaggedContent:)])
+ [m_context setColorMatchUntaggedContent:colorMatchUntaggedContent];
+}
+
+bool LayerHostingContext::colorMatchUntaggedContent() const
+{
+ if ([m_context respondsToSelector:@selector(colorMatchUntaggedContent)])
+ return [m_context colorMatchUntaggedContent];
+ return false;
+}
+#endif
+
#if HAVE(COREANIMATION_FENCES)
void LayerHostingContext::setFencePort(mach_port_t fencePort)
{
Modified: trunk/Source/WebKit2/PluginProcess/mac/PluginControllerProxyMac.mm (186877 => 186878)
--- trunk/Source/WebKit2/PluginProcess/mac/PluginControllerProxyMac.mm 2015-07-16 00:33:33 UTC (rev 186877)
+++ trunk/Source/WebKit2/PluginProcess/mac/PluginControllerProxyMac.mm 2015-07-16 01:00:22 UTC (rev 186878)
@@ -35,6 +35,7 @@
#import "PluginProxyMessages.h"
#import "WebProcessConnection.h"
#import <QuartzCore/QuartzCore.h>
+#import <WebCore/GraphicsContextCG.h>
using namespace WebCore;
@@ -139,6 +140,11 @@
#endif
}
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100
+ m_layerHostingContext->setColorSpace(sRGBColorSpaceRef());
+ m_layerHostingContext->setColorMatchUntaggedContent(true);
+#endif
+
m_layerHostingContext->setRootLayer(platformLayer);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes