<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[202877] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/202877">202877</a></dd>
<dt>Author</dt> <dd>ryanhaddad@apple.com</dd>
<dt>Date</dt> <dd>2016-07-06 14:10:28 -0700 (Wed, 06 Jul 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/202867">r202867</a>.
https://bugs.webkit.org/show_bug.cgi?id=159491

This change caused an existing LayoutTest to crash on ios-
simulator (Requested by ryanhaddad on #webkit).

Reverted changeset:

&quot;&lt;img&gt; with a wide gamut PDF does not display using a wide
gamut color space&quot;
https://bugs.webkit.org/show_bug.cgi?id=158983
http://trac.webkit.org/changeset/202867

Patch by Commit Queue &lt;commit-queue@webkit.org&gt; on 2016-07-06</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp">trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGradientImagecpp">trunk/Source/WebCore/platform/graphics/GradientImage.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsImageBuffercpp">trunk/Source/WebCore/platform/graphics/ImageBuffer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsImageBufferh">trunk/Source/WebCore/platform/graphics/ImageBuffer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsNamedImageGeneratedImagecpp">trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscairoImageBufferCairocpp">trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscgIOSurfacePoolcpp">trunk/Source/WebCore/platform/graphics/cg/IOSurfacePool.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscgIOSurfacePoolh">trunk/Source/WebCore/platform/graphics/cg/IOSurfacePool.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscgImageBufferCGcpp">trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaIOSurfaceh">trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscocoaIOSurfacemm">trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmacThemeMacmm">trunk/Source/WebCore/platform/mac/ThemeMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformspicgCoreGraphicsSPIh">trunk/Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxModelObjectcpp">trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeMacmm">trunk/Source/WebCore/rendering/RenderThemeMac.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgSVGRenderingContextcpp">trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp</a></li>
<li><a href="#trunkSourceWebCoresvggraphicsSVGImagecpp">trunk/Source/WebCore/svg/graphics/SVGImage.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedmacRemoteLayerBackingStoremm">trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebCore/ChangeLog        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2016-07-06  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r202867.
+        https://bugs.webkit.org/show_bug.cgi?id=159491
+
+        This change caused an existing LayoutTest to crash on ios-
+        simulator (Requested by ryanhaddad on #webkit).
+
+        Reverted changeset:
+
+        &quot;&lt;img&gt; with a wide gamut PDF does not display using a wide
+        gamut color space&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=158983
+        http://trac.webkit.org/changeset/202867
+
</ins><span class="cx"> 2016-07-06  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [ShadowDOM] assignedSlot property should be on Text, not CharacterData
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -2457,7 +2457,7 @@
</span><span class="cx">             fontProxy.drawBidiText(*c, textRun, location + offset, FontCascade::UseFallbackIfFontNotReady);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        auto maskImage = ImageBuffer::createCompatibleBuffer(maskRect.size(), ColorSpaceSRGB, *c);
</del><ins>+        auto maskImage = ImageBuffer::createCompatibleBuffer(maskRect.size(), *c);
</ins><span class="cx">         if (!maskImage)
</span><span class="cx">             return;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGradientImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GradientImage.cpp (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GradientImage.cpp        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebCore/platform/graphics/GradientImage.cpp        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx">     unsigned generatorHash = m_gradient-&gt;hash();
</span><span class="cx"> 
</span><span class="cx">     if (!m_cachedImageBuffer || m_cachedGeneratorHash != generatorHash || m_cachedAdjustedSize != adjustedSize || !m_cachedImageBuffer-&gt;isCompatibleWithContext(destContext)) {
</span><del>-        m_cachedImageBuffer = ImageBuffer::createCompatibleBuffer(adjustedSize, ColorSpaceSRGB, destContext);
</del><ins>+        m_cachedImageBuffer = ImageBuffer::createCompatibleBuffer(adjustedSize, destContext, m_gradient-&gt;hasAlpha());
</ins><span class="cx">         if (!m_cachedImageBuffer)
</span><span class="cx">             return;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsImageBuffercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ImageBuffer.cpp (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ImageBuffer.cpp        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebCore/platform/graphics/ImageBuffer.cpp        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -164,7 +164,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-std::unique_ptr&lt;ImageBuffer&gt; ImageBuffer::createCompatibleBuffer(const FloatSize&amp; size, ColorSpace colorSpace, const GraphicsContext&amp; context)
</del><ins>+std::unique_ptr&lt;ImageBuffer&gt; ImageBuffer::createCompatibleBuffer(const FloatSize&amp; size, const GraphicsContext&amp; context, bool hasAlpha)
</ins><span class="cx"> {
</span><span class="cx">     if (size.isEmpty())
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -171,7 +171,7 @@
</span><span class="cx"> 
</span><span class="cx">     IntSize scaledSize = ImageBuffer::compatibleBufferSize(size, context);
</span><span class="cx"> 
</span><del>-    auto buffer = ImageBuffer::createCompatibleBuffer(scaledSize, 1, colorSpace, context);
</del><ins>+    auto buffer = ImageBuffer::createCompatibleBuffer(scaledSize, 1, ColorSpaceSRGB, context, hasAlpha);
</ins><span class="cx">     if (!buffer)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="lines">@@ -180,7 +180,7 @@
</span><span class="cx">     return buffer;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::unique_ptr&lt;ImageBuffer&gt; ImageBuffer::createCompatibleBuffer(const FloatSize&amp; size, float resolutionScale, ColorSpace colorSpace, const GraphicsContext&amp; context)
</del><ins>+std::unique_ptr&lt;ImageBuffer&gt; ImageBuffer::createCompatibleBuffer(const FloatSize&amp; size, float resolutionScale, ColorSpace colorSpace, const GraphicsContext&amp; context, bool)
</ins><span class="cx"> {
</span><span class="cx">     return create(size, context.renderingMode(), resolutionScale, colorSpace);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsImageBufferh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ImageBuffer.h (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ImageBuffer.h        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebCore/platform/graphics/ImageBuffer.h        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -80,9 +80,8 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Create an image buffer compatible with the context, with suitable resolution for drawing into the buffer and then into this context.
</span><del>-    static std::unique_ptr&lt;ImageBuffer&gt; createCompatibleBuffer(const FloatSize&amp;, const GraphicsContext&amp;);
-    static std::unique_ptr&lt;ImageBuffer&gt; createCompatibleBuffer(const FloatSize&amp;, ColorSpace, const GraphicsContext&amp;);
-    static std::unique_ptr&lt;ImageBuffer&gt; createCompatibleBuffer(const FloatSize&amp;, float resolutionScale, ColorSpace, const GraphicsContext&amp;);
</del><ins>+    static std::unique_ptr&lt;ImageBuffer&gt; createCompatibleBuffer(const FloatSize&amp;, const GraphicsContext&amp;, bool hasAlpha = true);
+    static std::unique_ptr&lt;ImageBuffer&gt; createCompatibleBuffer(const FloatSize&amp;, float resolutionScale, ColorSpace, const GraphicsContext&amp;, bool hasAlpha);
</ins><span class="cx"> 
</span><span class="cx">     static IntSize compatibleBufferSize(const FloatSize&amp;, const GraphicsContext&amp;);
</span><span class="cx">     bool isCompatibleWithContext(const GraphicsContext&amp;) const;
</span><span class="lines">@@ -173,9 +172,6 @@
</span><span class="cx">     // This constructor will place its success into the given out-variable
</span><span class="cx">     // so that create() knows when it should return failure.
</span><span class="cx">     WEBCORE_EXPORT ImageBuffer(const FloatSize&amp;, float resolutionScale, ColorSpace, RenderingMode, bool&amp; success);
</span><del>-#if USE(CG)
-    ImageBuffer(const FloatSize&amp;, float resolutionScale, CGColorSpaceRef, RenderingMode, bool&amp; success);
-#endif
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> #if USE(CG)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsNamedImageGeneratedImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.cpp (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.cpp        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.cpp        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx"> void NamedImageGeneratedImage::drawPattern(GraphicsContext&amp; context, const FloatRect&amp; srcRect, const AffineTransform&amp; patternTransform, const FloatPoint&amp; phase, const FloatSize&amp; spacing, CompositeOperator compositeOp, const FloatRect&amp; dstRect, BlendMode blendMode)
</span><span class="cx"> {
</span><span class="cx"> #if USE(NEW_THEME)
</span><del>-    auto imageBuffer = ImageBuffer::createCompatibleBuffer(size(), context);
</del><ins>+    auto imageBuffer = ImageBuffer::createCompatibleBuffer(size(), context, true);
</ins><span class="cx">     if (!imageBuffer)
</span><span class="cx">         return;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscairoImageBufferCairocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -232,11 +232,6 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::unique_ptr&lt;ImageBuffer&gt; ImageBuffer::createCompatibleBuffer(const FloatSize&amp; size, const GraphicsContext&amp; context)
-{
-    return createCompatibleBuffer(size, ColorSpaceSRGB, context);
-}
-
</del><span class="cx"> GraphicsContext&amp; ImageBuffer::context() const
</span><span class="cx"> {
</span><span class="cx">     return *m_data.m_context;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscgIOSurfacePoolcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cg/IOSurfacePool.cpp (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cg/IOSurfacePool.cpp        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebCore/platform/graphics/cg/IOSurfacePool.cpp        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx">     return pool;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool surfaceMatchesParameters(IOSurface&amp; surface, IntSize requestedSize, CGColorSpaceRef colorSpace, IOSurface::Format format)
</del><ins>+static bool surfaceMatchesParameters(IOSurface&amp; surface, IntSize requestedSize, ColorSpace colorSpace, IOSurface::Format format)
</ins><span class="cx"> {
</span><span class="cx">     if (format != surface.format())
</span><span class="cx">         return false;
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx">     m_sizesInPruneOrder.append(size);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::unique_ptr&lt;IOSurface&gt; IOSurfacePool::takeSurface(IntSize size, CGColorSpaceRef colorSpace, IOSurface::Format format)
</del><ins>+std::unique_ptr&lt;IOSurface&gt; IOSurfacePool::takeSurface(IntSize size, ColorSpace colorSpace, IOSurface::Format format)
</ins><span class="cx"> {
</span><span class="cx">     CachedSurfaceMap::iterator mapIter = m_cachedSurfaces.find(size);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscgIOSurfacePoolh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cg/IOSurfacePool.h (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cg/IOSurfacePool.h        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebCore/platform/graphics/cg/IOSurfacePool.h        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if USE(IOSURFACE)
</span><span class="cx"> 
</span><ins>+#include &quot;ColorSpace.h&quot;
</ins><span class="cx"> #include &quot;IOSurface.h&quot;
</span><span class="cx"> #include &quot;IntSize.h&quot;
</span><span class="cx"> #include &quot;IntSizeHash.h&quot;
</span><span class="lines">@@ -47,7 +48,7 @@
</span><span class="cx"> public:
</span><span class="cx">     WEBCORE_EXPORT static IOSurfacePool&amp; sharedPool();
</span><span class="cx"> 
</span><del>-    std::unique_ptr&lt;IOSurface&gt; takeSurface(IntSize, CGColorSpaceRef, IOSurface::Format);
</del><ins>+    std::unique_ptr&lt;IOSurface&gt; takeSurface(IntSize, ColorSpace, IOSurface::Format);
</ins><span class="cx">     WEBCORE_EXPORT void addSurface(std::unique_ptr&lt;IOSurface&gt;);
</span><span class="cx"> 
</span><span class="cx">     void discardAllSurfaces();
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscgImageBufferCGcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -70,32 +70,7 @@
</span><span class="cx">     return FloatSize(logicalSize.width() * xMagnification, logicalSize.height() * yMagnification);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::unique_ptr&lt;ImageBuffer&gt; ImageBuffer::createCompatibleBuffer(const FloatSize&amp; size, const GraphicsContext&amp; context)
-{
-    if (size.isEmpty())
-        return nullptr;
-
-    IntSize scaledSize = ImageBuffer::compatibleBufferSize(size, context);
-    float resolutionScale = context.scaleFactor().width();
-    RetainPtr&lt;CGColorSpaceRef&gt; colorSpace;
-#if PLATFORM(COCOA)
-    colorSpace = adoptCF(CGContextCopyDeviceColorSpace(context.platformContext()));
-#else
-    colorSpace = sRGBColorSpaceRef();
-#endif
-    RenderingMode renderingMode = context.renderingMode();
-    bool success = false;
-    std::unique_ptr&lt;ImageBuffer&gt; buffer(new ImageBuffer(scaledSize, resolutionScale, colorSpace.get(), renderingMode, success));
-
-    if (!success)
-        return nullptr;
-
-    // Set up a corresponding scale factor on the graphics context.
-    buffer-&gt;context().scale(FloatSize(scaledSize.width() / size.width(), scaledSize.height() / size.height()));
-    return buffer;
-}
-
-ImageBuffer::ImageBuffer(const FloatSize&amp; size, float resolutionScale, CGColorSpaceRef colorSpace, RenderingMode renderingMode, bool&amp; success)
</del><ins>+ImageBuffer::ImageBuffer(const FloatSize&amp; size, float resolutionScale, ColorSpace imageColorSpace, RenderingMode renderingMode, bool&amp; success)
</ins><span class="cx">     : m_logicalSize(size)
</span><span class="cx">     , m_resolutionScale(resolutionScale)
</span><span class="cx"> {
</span><span class="lines">@@ -133,13 +108,13 @@
</span><span class="cx">     ASSERT(renderingMode == Unaccelerated);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    m_data.colorSpace = colorSpace;
</del><ins>+    m_data.colorSpace = cachedCGColorSpace(imageColorSpace);
</ins><span class="cx"> 
</span><span class="cx">     RetainPtr&lt;CGContextRef&gt; cgContext;
</span><span class="cx">     if (accelerateRendering) {
</span><span class="cx"> #if USE(IOSURFACE_CANVAS_BACKING_STORE)
</span><span class="cx">         FloatSize userBounds = sizeForDestinationSize(FloatSize(width.unsafeGet(), height.unsafeGet()));
</span><del>-        m_data.surface = IOSurface::create(m_data.backingStoreSize, IntSize(userBounds), colorSpace);
</del><ins>+        m_data.surface = IOSurface::create(m_data.backingStoreSize, IntSize(userBounds), imageColorSpace);
</ins><span class="cx">         cgContext = m_data.surface-&gt;ensurePlatformContext();
</span><span class="cx">         if (cgContext)
</span><span class="cx">             CGContextClearRect(cgContext.get(), FloatRect(FloatPoint(), userBounds));
</span><span class="lines">@@ -176,11 +151,6 @@
</span><span class="cx">     success = true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ImageBuffer::ImageBuffer(const FloatSize&amp; size, float resolutionScale, ColorSpace imageColorSpace, RenderingMode renderingMode, bool&amp; success)
-    : ImageBuffer(size, resolutionScale, cachedCGColorSpace(imageColorSpace), renderingMode, success)
-{
-}
-
</del><span class="cx"> ImageBuffer::~ImageBuffer()
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaIOSurfaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.h (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.h        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.h        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -45,10 +45,10 @@
</span><span class="cx">         RGB10A8,
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    WEBCORE_EXPORT static std::unique_ptr&lt;IOSurface&gt; create(IntSize, CGColorSpaceRef, Format = Format::RGBA);
-    WEBCORE_EXPORT static std::unique_ptr&lt;IOSurface&gt; create(IntSize, IntSize contextSize, CGColorSpaceRef, Format = Format::RGBA);
-    WEBCORE_EXPORT static std::unique_ptr&lt;IOSurface&gt; createFromSendRight(const MachSendRight&amp;, CGColorSpaceRef);
-    static std::unique_ptr&lt;IOSurface&gt; createFromSurface(IOSurfaceRef, CGColorSpaceRef);
</del><ins>+    WEBCORE_EXPORT static std::unique_ptr&lt;IOSurface&gt; create(IntSize, ColorSpace, Format = Format::RGBA);
+    WEBCORE_EXPORT static std::unique_ptr&lt;IOSurface&gt; create(IntSize, IntSize contextSize, ColorSpace, Format = Format::RGBA);
+    WEBCORE_EXPORT static std::unique_ptr&lt;IOSurface&gt; createFromSendRight(const MachSendRight&amp;, ColorSpace);
+    static std::unique_ptr&lt;IOSurface&gt; createFromSurface(IOSurfaceRef, ColorSpace);
</ins><span class="cx">     WEBCORE_EXPORT static std::unique_ptr&lt;IOSurface&gt; createFromImage(CGImageRef);
</span><span class="cx">     
</span><span class="cx">     static std::unique_ptr&lt;IOSurface&gt; createFromImageBuffer(std::unique_ptr&lt;ImageBuffer&gt;);
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> 
</span><span class="cx">     IntSize size() const { return m_size; }
</span><span class="cx">     size_t totalBytes() const { return m_totalBytes; }
</span><del>-    CGColorSpaceRef colorSpace() const { return m_colorSpace.get(); }
</del><ins>+    ColorSpace colorSpace() const { return m_colorSpace; }
</ins><span class="cx">     WEBCORE_EXPORT Format format() const;
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT bool isInUse() const;
</span><span class="lines">@@ -100,15 +100,15 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    IOSurface(IntSize, CGColorSpaceRef, Format);
-    IOSurface(IntSize, IntSize contextSize, CGColorSpaceRef, Format);
-    IOSurface(IOSurfaceRef, CGColorSpaceRef);
</del><ins>+    IOSurface(IntSize, ColorSpace, Format);
+    IOSurface(IntSize, IntSize contextSize, ColorSpace, Format);
+    IOSurface(IOSurfaceRef, ColorSpace);
</ins><span class="cx"> 
</span><del>-    static std::unique_ptr&lt;IOSurface&gt; surfaceFromPool(IntSize, IntSize contextSize, CGColorSpaceRef, Format);
</del><ins>+    static std::unique_ptr&lt;IOSurface&gt; surfaceFromPool(IntSize, IntSize contextSize, ColorSpace, Format);
</ins><span class="cx">     IntSize contextSize() const { return m_contextSize; }
</span><span class="cx">     void setContextSize(IntSize);
</span><span class="cx"> 
</span><del>-    RetainPtr&lt;CGColorSpaceRef&gt; m_colorSpace;
</del><ins>+    ColorSpace m_colorSpace;
</ins><span class="cx">     IntSize m_size;
</span><span class="cx">     IntSize m_contextSize;
</span><span class="cx">     size_t m_totalBytes;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscocoaIOSurfacemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> 
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> 
</span><del>-inline std::unique_ptr&lt;WebCore::IOSurface&gt; WebCore::IOSurface::surfaceFromPool(IntSize size, IntSize contextSize, CGColorSpaceRef colorSpace, Format pixelFormat)
</del><ins>+inline std::unique_ptr&lt;WebCore::IOSurface&gt; WebCore::IOSurface::surfaceFromPool(IntSize size, IntSize contextSize, ColorSpace colorSpace, Format pixelFormat)
</ins><span class="cx"> {
</span><span class="cx">     auto cachedSurface = IOSurfacePool::sharedPool().takeSurface(size, colorSpace, pixelFormat);
</span><span class="cx">     if (!cachedSurface)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">     return cachedSurface;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::unique_ptr&lt;WebCore::IOSurface&gt; WebCore::IOSurface::create(IntSize size, CGColorSpaceRef colorSpace, Format pixelFormat)
</del><ins>+std::unique_ptr&lt;WebCore::IOSurface&gt; WebCore::IOSurface::create(IntSize size, ColorSpace colorSpace, Format pixelFormat)
</ins><span class="cx"> {
</span><span class="cx">     if (auto cachedSurface = surfaceFromPool(size, size, colorSpace, pixelFormat))
</span><span class="cx">         return cachedSurface;
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx">     return std::unique_ptr&lt;IOSurface&gt;(new IOSurface(size, colorSpace, pixelFormat));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::unique_ptr&lt;WebCore::IOSurface&gt; WebCore::IOSurface::create(IntSize size, IntSize contextSize, CGColorSpaceRef colorSpace, Format pixelFormat)
</del><ins>+std::unique_ptr&lt;WebCore::IOSurface&gt; WebCore::IOSurface::create(IntSize size, IntSize contextSize, ColorSpace colorSpace, Format pixelFormat)
</ins><span class="cx"> {
</span><span class="cx">     if (auto cachedSurface = surfaceFromPool(size, contextSize, colorSpace, pixelFormat))
</span><span class="cx">         return cachedSurface;
</span><span class="lines">@@ -70,13 +70,13 @@
</span><span class="cx">     return std::unique_ptr&lt;IOSurface&gt;(new IOSurface(size, contextSize, colorSpace, pixelFormat));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::unique_ptr&lt;WebCore::IOSurface&gt; WebCore::IOSurface::createFromSendRight(const MachSendRight&amp; sendRight, CGColorSpaceRef colorSpace)
</del><ins>+std::unique_ptr&lt;WebCore::IOSurface&gt; WebCore::IOSurface::createFromSendRight(const MachSendRight&amp; sendRight, ColorSpace colorSpace)
</ins><span class="cx"> {
</span><span class="cx">     auto surface = adoptCF(IOSurfaceLookupFromMachPort(sendRight.sendRight()));
</span><span class="cx">     return IOSurface::createFromSurface(surface.get(), colorSpace);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::unique_ptr&lt;WebCore::IOSurface&gt; WebCore::IOSurface::createFromSurface(IOSurfaceRef surface, CGColorSpaceRef colorSpace)
</del><ins>+std::unique_ptr&lt;WebCore::IOSurface&gt; WebCore::IOSurface::createFromSurface(IOSurfaceRef surface, ColorSpace colorSpace)
</ins><span class="cx"> {
</span><span class="cx">     return std::unique_ptr&lt;IOSurface&gt;(new IOSurface(surface, colorSpace));
</span><span class="cx"> }
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx">     size_t width = CGImageGetWidth(image);
</span><span class="cx">     size_t height = CGImageGetHeight(image);
</span><span class="cx"> 
</span><del>-    auto surface = IOSurface::create(IntSize(width, height), sRGBColorSpaceRef());
</del><ins>+    auto surface = IOSurface::create(IntSize(width, height), ColorSpaceSRGB);
</ins><span class="cx">     auto surfaceContext = surface-&gt;ensurePlatformContext();
</span><span class="cx">     CGContextDrawImage(surfaceContext, CGRectMake(0, 0, width, height), image);
</span><span class="cx">     CGContextFlush(surfaceContext);
</span><span class="lines">@@ -179,7 +179,7 @@
</span><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebCore::IOSurface::IOSurface(IntSize size, CGColorSpaceRef colorSpace, Format format)
</del><ins>+WebCore::IOSurface::IOSurface(IntSize size, ColorSpace colorSpace, Format format)
</ins><span class="cx">     : m_colorSpace(colorSpace)
</span><span class="cx">     , m_size(size)
</span><span class="cx">     , m_contextSize(size)
</span><span class="lines">@@ -207,7 +207,7 @@
</span><span class="cx">         NSLog(@&quot;Surface creation failed for options %@&quot;, options);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebCore::IOSurface::IOSurface(IntSize size, IntSize contextSize, CGColorSpaceRef colorSpace, Format pixelFormat)
</del><ins>+WebCore::IOSurface::IOSurface(IntSize size, IntSize contextSize, ColorSpace colorSpace, Format pixelFormat)
</ins><span class="cx">     : IOSurface(size, colorSpace, pixelFormat)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(contextSize.width() &lt;= size.width());
</span><span class="lines">@@ -215,7 +215,7 @@
</span><span class="cx">     m_contextSize = contextSize;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebCore::IOSurface::IOSurface(IOSurfaceRef surface, CGColorSpaceRef colorSpace)
</del><ins>+WebCore::IOSurface::IOSurface(IOSurfaceRef surface, ColorSpace colorSpace)
</ins><span class="cx">     : m_colorSpace(colorSpace)
</span><span class="cx">     , m_surface(surface)
</span><span class="cx"> {
</span><span class="lines">@@ -297,7 +297,7 @@
</span><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    m_cgContext = adoptCF(CGIOSurfaceContextCreate(m_surface.get(), m_contextSize.width(), m_contextSize.height(), bitsPerComponent, bitsPerPixel, m_colorSpace.get(), bitmapInfo));
</del><ins>+    m_cgContext = adoptCF(CGIOSurfaceContextCreate(m_surface.get(), m_contextSize.width(), m_contextSize.height(), bitsPerComponent, bitsPerPixel, cachedCGColorSpace(m_colorSpace), bitmapInfo));
</ins><span class="cx"> 
</span><span class="cx">     return m_cgContext.get();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacThemeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/ThemeMac.mm (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/ThemeMac.mm        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebCore/platform/mac/ThemeMac.mm        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -679,7 +679,7 @@
</span><span class="cx">     bool needsRepaint = false;
</span><span class="cx">     if (useImageBuffer) {
</span><span class="cx">         NSRect imageBufferDrawRect = NSRect(FloatRect(buttonFocusRectOutlineWidth, buttonFocusRectOutlineWidth, rect.width(), rect.height()));
</span><del>-        auto imageBuffer = ImageBuffer::createCompatibleBuffer(rect.size() + 2 * FloatSize(buttonFocusRectOutlineWidth, buttonFocusRectOutlineWidth), deviceScaleFactor, ColorSpaceSRGB, context);
</del><ins>+        auto imageBuffer = ImageBuffer::createCompatibleBuffer(rect.size() + 2 * FloatSize(buttonFocusRectOutlineWidth, buttonFocusRectOutlineWidth), deviceScaleFactor, ColorSpaceSRGB, context, false);
</ins><span class="cx">         if (!imageBuffer)
</span><span class="cx">             return needsRepaint;
</span><span class="cx">         {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformspicgCoreGraphicsSPIh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -188,7 +188,6 @@
</span><span class="cx"> CGSRegionEnumeratorObj CGSRegionEnumerator(CGRegionRef);
</span><span class="cx"> CGRect* CGSNextRect(const CGSRegionEnumeratorObj);
</span><span class="cx"> CGError CGSReleaseRegionEnumerator(const CGSRegionEnumeratorObj);
</span><del>-CGColorSpaceRef CGContextCopyDeviceColorSpace(CGContextRef);
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(WIN)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxModelObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -756,7 +756,7 @@
</span><span class="cx">         maskRect.intersect(snappedIntRect(paintInfo.rect));
</span><span class="cx"> 
</span><span class="cx">         // Now create the mask.
</span><del>-        maskImage = ImageBuffer::createCompatibleBuffer(maskRect.size(), ColorSpaceSRGB, context);
</del><ins>+        maskImage = ImageBuffer::createCompatibleBuffer(maskRect.size(), context);
</ins><span class="cx">         if (!maskImage)
</span><span class="cx">             return;
</span><span class="cx">         paintMaskForTextFillBox(maskImage.get(), maskRect, box, scrolledPaintRect);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeMac.mm        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -1144,7 +1144,7 @@
</span><span class="cx">     trackInfo.reserved = 0;
</span><span class="cx">     trackInfo.filler1 = 0;
</span><span class="cx"> 
</span><del>-    std::unique_ptr&lt;ImageBuffer&gt; imageBuffer = ImageBuffer::createCompatibleBuffer(inflatedRect.size(), deviceScaleFactor, ColorSpaceSRGB, paintInfo.context());
</del><ins>+    std::unique_ptr&lt;ImageBuffer&gt; imageBuffer = ImageBuffer::createCompatibleBuffer(inflatedRect.size(), deviceScaleFactor, ColorSpaceSRGB, paintInfo.context(), true);
</ins><span class="cx">     if (!imageBuffer)
</span><span class="cx">         return true;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgSVGRenderingContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -351,7 +351,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Create a new buffer and paint the foreground into it.
</span><span class="cx">     if (!imageBuffer) {
</span><del>-        if ((imageBuffer = ImageBuffer::createCompatibleBuffer(expandedIntSize(boundingBox.size()), ColorSpaceSRGB, m_paintInfo-&gt;context()))) {
</del><ins>+        if ((imageBuffer = ImageBuffer::createCompatibleBuffer(expandedIntSize(boundingBox.size()), m_paintInfo-&gt;context(), true))) {
</ins><span class="cx">             GraphicsContext&amp; bufferedRenderingContext = imageBuffer-&gt;context();
</span><span class="cx">             bufferedRenderingContext.translate(-boundingBox.x(), -boundingBox.y());
</span><span class="cx">             PaintInfo bufferedInfo(*m_paintInfo);
</span></span></pre></div>
<a id="trunkSourceWebCoresvggraphicsSVGImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/graphics/SVGImage.cpp (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/graphics/SVGImage.cpp        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebCore/svg/graphics/SVGImage.cpp        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -219,7 +219,7 @@
</span><span class="cx">     FloatRect imageBufferSize = zoomedContainerRect;
</span><span class="cx">     imageBufferSize.scale(imageBufferScale.width(), imageBufferScale.height());
</span><span class="cx"> 
</span><del>-    std::unique_ptr&lt;ImageBuffer&gt; buffer = ImageBuffer::createCompatibleBuffer(expandedIntSize(imageBufferSize.size()), 1, ColorSpaceSRGB, context);
</del><ins>+    std::unique_ptr&lt;ImageBuffer&gt; buffer = ImageBuffer::createCompatibleBuffer(expandedIntSize(imageBufferSize.size()), 1, ColorSpaceSRGB, context, true);
</ins><span class="cx">     if (!buffer) // Failed to allocate buffer.
</span><span class="cx">         return;
</span><span class="cx">     drawForContainer(buffer-&gt;context(), containerSize, zoom, imageBufferSize, zoomedContainerRect, CompositeSourceOver, BlendModeNormal);
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebKit2/ChangeLog        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2016-07-06  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r202867.
+        https://bugs.webkit.org/show_bug.cgi?id=159491
+
+        This change caused an existing LayoutTest to crash on ios-
+        simulator (Requested by ryanhaddad on #webkit).
+
+        Reverted changeset:
+
+        &quot;&lt;img&gt; with a wide gamut PDF does not display using a wide
+        gamut color space&quot;
+        https://bugs.webkit.org/show_bug.cgi?id=158983
+        http://trac.webkit.org/changeset/202867
+
</ins><span class="cx"> 2016-07-06  Enrica Casucci  &lt;enrica@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Limit touch distance for two finger tap.
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacRemoteLayerBackingStoremm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -150,7 +150,7 @@
</span><span class="cx">         MachSendRight sendRight;
</span><span class="cx">         if (!decoder.decode(sendRight))
</span><span class="cx">             return false;
</span><del>-        result.m_frontBuffer.surface = WebCore::IOSurface::createFromSendRight(sendRight, sRGBColorSpaceRef());
</del><ins>+        result.m_frontBuffer.surface = WebCore::IOSurface::createFromSendRight(sendRight, ColorSpaceSRGB);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="lines">@@ -210,7 +210,7 @@
</span><span class="cx">         std::swap(m_frontBuffer, m_backBuffer);
</span><span class="cx"> 
</span><span class="cx">         if (!m_frontBuffer.surface)
</span><del>-            m_frontBuffer.surface = WebCore::IOSurface::create(expandedScaledSize, sRGBColorSpaceRef(), bufferFormat(m_isOpaque));
</del><ins>+            m_frontBuffer.surface = WebCore::IOSurface::create(expandedScaledSize, ColorSpaceSRGB, bufferFormat(m_isOpaque));
</ins><span class="cx"> 
</span><span class="cx">         setBufferVolatility(BufferType::Front, false);
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (202876 => 202877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-07-06 20:23:36 UTC (rev 202876)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-07-06 21:10:28 UTC (rev 202877)
</span><span class="lines">@@ -82,7 +82,6 @@
</span><span class="cx"> #import &quot;_WKRemoteObjectRegistryInternal.h&quot;
</span><span class="cx"> #import &quot;_WKSessionStateInternal.h&quot;
</span><span class="cx"> #import &quot;_WKVisitedLinkStoreInternal.h&quot;
</span><del>-#import &lt;WebCore/GraphicsContextCG.h&gt;
</del><span class="cx"> #import &lt;WebCore/IOSurface.h&gt;
</span><span class="cx"> #import &lt;WebCore/JSDOMBinding.h&gt;
</span><span class="cx"> #import &lt;WebCore/NSTextFinderSPI.h&gt;
</span><span class="lines">@@ -1392,7 +1391,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if USE(IOSURFACE)
</span><span class="cx">     WebCore::IOSurface::Format snapshotFormat = WebCore::screenSupportsExtendedColor() ? WebCore::IOSurface::Format::RGB10 : WebCore::IOSurface::Format::RGBA;
</span><del>-    auto surface = WebCore::IOSurface::create(WebCore::expandedIntSize(snapshotSize), WebCore::sRGBColorSpaceRef(), snapshotFormat);
</del><ins>+    auto surface = WebCore::IOSurface::create(WebCore::expandedIntSize(snapshotSize), WebCore::ColorSpaceSRGB, snapshotFormat);
</ins><span class="cx">     CARenderServerRenderLayerWithTransform(MACH_PORT_NULL, self.layer.context.contextId, reinterpret_cast&lt;uint64_t&gt;(self.layer), surface-&gt;surface(), 0, 0, &amp;transform);
</span><span class="cx"> 
</span><span class="cx">     WebCore::IOSurface::Format compressedFormat = WebCore::IOSurface::Format::YUV422;
</span><span class="lines">@@ -4229,7 +4228,7 @@
</span><span class="cx"> #if USE(IOSURFACE)
</span><span class="cx">     // If we are parented and thus won't incur a significant penalty from paging in tiles, snapshot the view hierarchy directly.
</span><span class="cx">     if (CADisplay *display = self.window.screen._display) {
</span><del>-        auto surface = WebCore::IOSurface::create(WebCore::expandedIntSize(WebCore::FloatSize(imageSize)), WebCore::sRGBColorSpaceRef());
</del><ins>+        auto surface = WebCore::IOSurface::create(WebCore::expandedIntSize(WebCore::FloatSize(imageSize)), WebCore::ColorSpaceSRGB);
</ins><span class="cx">         CGFloat imageScaleInViewCoordinates = imageWidth / rectInViewCoordinates.size.width;
</span><span class="cx">         CATransform3D transform = CATransform3DMakeScale(imageScaleInViewCoordinates, imageScaleInViewCoordinates, 1);
</span><span class="cx">         transform = CATransform3DTranslate(transform, -rectInViewCoordinates.origin.x, -rectInViewCoordinates.origin.y, 0);
</span></span></pre>
</div>
</div>

</body>
</html>