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