[webkit-changes] [295372] trunk/Source

2022-06-07 Thread said
Title: [295372] trunk/Source








Revision 295372
Author s...@apple.com
Date 2022-06-07 20:48:18 -0700 (Tue, 07 Jun 2022)


Log Message
[GPU Process] [Filters] Make FilterImage allocate shared memory if it is created in GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=240810


Reviewed by Kimmo Kinnunen.

PixelBuffer will be sub-classed to a new class named 'ShareablePixelBuffer'. This
class will be backed by SharedMemory for the pixels.

ImageBufferShareableAllocator will call ShareablePixelBuffer::tryCreate() to
allocate PixelBuffe for software filters when they are applied in GPUProcess.

The plan is to attribute the handle of the underlying SharedMemory to WebProcess.

* Source/WebKit/GPUProcess/graphics/ImageBufferShareableAllocator.cpp:
(WebKit::ImageBufferShareableAllocator::createPixelBuffer const):
* Source/WebKit/GPUProcess/graphics/ShareablePixelBuffer.cpp: Copied from Source/WebKit/GPUProcess/graphics/ImageBufferShareableAllocator.cpp.
(WebKit::ShareablePixelBuffer::tryCreate):
(WebKit::ShareablePixelBuffer::ShareablePixelBuffer):
(WebKit::ShareablePixelBuffer::createScratchPixelBuffer const):
* Source/WebKit/GPUProcess/graphics/ShareablePixelBuffer.h: Added.
(WebKit::ShareablePixelBuffer::data const):
(WebKit::ShareablePixelBuffer::takeData):
* Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:
* Source/WebKit/Sources.txt:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/251380@main

Modified Paths

trunk/Source/WebCore/html/ImageData.cpp
trunk/Source/WebCore/platform/graphics/ByteArrayPixelBuffer.cpp
trunk/Source/WebCore/platform/graphics/ByteArrayPixelBuffer.h
trunk/Source/WebKit/GPUProcess/graphics/ImageBufferShareableAllocator.cpp
trunk/Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp
trunk/Source/WebKit/Sources.txt
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj


Added Paths

trunk/Source/WebKit/GPUProcess/graphics/ShareablePixelBuffer.cpp
trunk/Source/WebKit/GPUProcess/graphics/ShareablePixelBuffer.h




Diff

Modified: trunk/Source/WebCore/html/ImageData.cpp (295371 => 295372)

--- trunk/Source/WebCore/html/ImageData.cpp	2022-06-08 00:38:02 UTC (rev 295371)
+++ trunk/Source/WebCore/html/ImageData.cpp	2022-06-08 03:48:18 UTC (rev 295372)
@@ -53,7 +53,7 @@
 Ref ImageData::create(Ref&& pixelBuffer)
 {
 auto colorSpace = toPredefinedColorSpace(pixelBuffer->format().colorSpace);
-return adoptRef(*new ImageData(pixelBuffer->size(), pixelBuffer->takeData(), *colorSpace));
+return adoptRef(*new ImageData(pixelBuffer->size(), ByteArrayPixelBuffer::data(WTFMove(pixelBuffer)), *colorSpace));
 }
 
 RefPtr ImageData::create(RefPtr&& pixelBuffer)


Modified: trunk/Source/WebCore/platform/graphics/ByteArrayPixelBuffer.cpp (295371 => 295372)

--- trunk/Source/WebCore/platform/graphics/ByteArrayPixelBuffer.cpp	2022-06-08 00:38:02 UTC (rev 295371)
+++ trunk/Source/WebCore/platform/graphics/ByteArrayPixelBuffer.cpp	2022-06-08 03:48:18 UTC (rev 295372)
@@ -87,6 +87,13 @@
 {
 }
 
+Ref ByteArrayPixelBuffer::data(Ref pixelBuffer)
+{
+if (pixelBuffer->hasOneRef())
+return WTFMove(pixelBuffer->m_data);
+return pixelBuffer->m_data;
+}
+
 RefPtr ByteArrayPixelBuffer::createScratchPixelBuffer(const IntSize& size) const
 {
 return ByteArrayPixelBuffer::tryCreate(m_format, size);


Modified: trunk/Source/WebCore/platform/graphics/ByteArrayPixelBuffer.h (295371 => 295372)

--- trunk/Source/WebCore/platform/graphics/ByteArrayPixelBuffer.h	2022-06-08 00:38:02 UTC (rev 295371)
+++ trunk/Source/WebCore/platform/graphics/ByteArrayPixelBuffer.h	2022-06-08 03:48:18 UTC (rev 295372)
@@ -38,7 +38,7 @@
 WEBCORE_EXPORT static RefPtr tryCreate(const PixelBufferFormat&, const IntSize&, Ref&&);
 
 JSC::Uint8ClampedArray& data() const { return m_data.get(); }
-Ref&& takeData() { return WTFMove(m_data); }
+static Ref data(Ref);
 
 RefPtr createScratchPixelBuffer(const IntSize&) const override;
 


Modified: trunk/Source/WebKit/GPUProcess/graphics/ImageBufferShareableAllocator.cpp (295371 => 295372)

--- trunk/Source/WebKit/GPUProcess/graphics/ImageBufferShareableAllocator.cpp	2022-06-08 00:38:02 UTC (rev 295371)
+++ trunk/Source/WebKit/GPUProcess/graphics/ImageBufferShareableAllocator.cpp	2022-06-08 03:48:18 UTC (rev 295372)
@@ -27,6 +27,7 @@
 #include "ImageBufferShareableAllocator.h"
 
 #include "ImageBufferShareableBitmapBackend.h"
+#include "ShareablePixelBuffer.h"
 #include 
 
 #if ENABLE(GPU_PROCESS)
@@ -61,8 +62,16 @@
 
 RefPtr ImageBufferShareableAllocator::createPixelBuffer(const PixelBufferFormat& format, const IntSize& size) const
 {
-// FIXME: Create a shareable PixelBuffer and transfer the ownership of its memory to WebProcess.
-return ImageBufferAllocator::createPixelBuffer(format, size);
+auto pixelBuffer = ShareablePixelBuffer::tryCreate(format, size);
+if (!pixelBuffer)
+return nullptr;
+
+SharedMemory::Handle handle;
+if (!pixelBuffer->data().

[webkit-changes] [295402] trunk/Source/WebCore

2022-06-08 Thread said
Title: [295402] trunk/Source/WebCore








Revision 295402
Author s...@apple.com
Date 2022-06-08 17:18:27 -0700 (Wed, 08 Jun 2022)


Log Message
REGRESSION(r295372): [Win, WinCairo] 30 tests crash when creating ImageData
https://bugs.webkit.org/show_bug.cgi?id=241429

Reviewed by Simon Fraser.

It looks the move construct is different on Windows when we pass an xvalue
(such as WTFMove(pixelBuffer)) to a function which takes an lvalue
(such as Ref data(Ref)). Or it
might be a compiler bug.

So revert the change which converted ByteArrayPixelBuffer::takeData() to
ByteArrayPixelBuffer::data() since it is not related to the fix of bug 240810.

* Source/WebCore/html/ImageData.cpp:
(WebCore::ImageData::create):
* Source/WebCore/platform/graphics/ByteArrayPixelBuffer.cpp:
(WebCore::ByteArrayPixelBuffer::data): Deleted.
* Source/WebCore/platform/graphics/ByteArrayPixelBuffer.h:
(WebCore::ByteArrayPixelBuffer::takeData):

Canonical link: https://commits.webkit.org/251408@main

Modified Paths

trunk/Source/WebCore/html/ImageData.cpp
trunk/Source/WebCore/platform/graphics/ByteArrayPixelBuffer.cpp
trunk/Source/WebCore/platform/graphics/ByteArrayPixelBuffer.h




Diff

Modified: trunk/Source/WebCore/html/ImageData.cpp (295401 => 295402)

--- trunk/Source/WebCore/html/ImageData.cpp	2022-06-08 23:50:03 UTC (rev 295401)
+++ trunk/Source/WebCore/html/ImageData.cpp	2022-06-09 00:18:27 UTC (rev 295402)
@@ -53,7 +53,7 @@
 Ref ImageData::create(Ref&& pixelBuffer)
 {
 auto colorSpace = toPredefinedColorSpace(pixelBuffer->format().colorSpace);
-return adoptRef(*new ImageData(pixelBuffer->size(), ByteArrayPixelBuffer::data(WTFMove(pixelBuffer)), *colorSpace));
+return adoptRef(*new ImageData(pixelBuffer->size(), pixelBuffer->takeData(), *colorSpace));
 }
 
 RefPtr ImageData::create(RefPtr&& pixelBuffer)


Modified: trunk/Source/WebCore/platform/graphics/ByteArrayPixelBuffer.cpp (295401 => 295402)

--- trunk/Source/WebCore/platform/graphics/ByteArrayPixelBuffer.cpp	2022-06-08 23:50:03 UTC (rev 295401)
+++ trunk/Source/WebCore/platform/graphics/ByteArrayPixelBuffer.cpp	2022-06-09 00:18:27 UTC (rev 295402)
@@ -87,13 +87,6 @@
 {
 }
 
-Ref ByteArrayPixelBuffer::data(Ref pixelBuffer)
-{
-if (pixelBuffer->hasOneRef())
-return WTFMove(pixelBuffer->m_data);
-return pixelBuffer->m_data;
-}
-
 RefPtr ByteArrayPixelBuffer::createScratchPixelBuffer(const IntSize& size) const
 {
 return ByteArrayPixelBuffer::tryCreate(m_format, size);


Modified: trunk/Source/WebCore/platform/graphics/ByteArrayPixelBuffer.h (295401 => 295402)

--- trunk/Source/WebCore/platform/graphics/ByteArrayPixelBuffer.h	2022-06-08 23:50:03 UTC (rev 295401)
+++ trunk/Source/WebCore/platform/graphics/ByteArrayPixelBuffer.h	2022-06-09 00:18:27 UTC (rev 295402)
@@ -38,7 +38,7 @@
 WEBCORE_EXPORT static RefPtr tryCreate(const PixelBufferFormat&, const IntSize&, Ref&&);
 
 JSC::Uint8ClampedArray& data() const { return m_data.get(); }
-static Ref data(Ref);
+Ref&& takeData() { return WTFMove(m_data); }
 
 RefPtr createScratchPixelBuffer(const IntSize&) const override;
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295433] trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm

2022-06-09 Thread said
Title: [295433] trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm








Revision 295433
Author s...@apple.com
Date 2022-06-09 13:42:38 -0700 (Thu, 09 Jun 2022)


Log Message
REGRESSION(r292365): [ iOS ] TestWebKitAPI.GPUProcess.CanvasBasicCrashHandling is a constant failure on iOS
https://bugs.webkit.org/show_bug.cgi?id=239303


Reviewed by Simon Fraser.

The test has been passing when running it locally. This should be fixed by other
changes so re-enable this api-test.

* Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:
(TEST):

Canonical link: https://commits.webkit.org/251439@main

Modified Paths

trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm




Diff

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm (295432 => 295433)

--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm	2022-06-09 20:30:57 UTC (rev 295432)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm	2022-06-09 20:42:38 UTC (rev 295433)
@@ -456,8 +456,7 @@
 " \n"
 "";
 
-// FIXME: https://bugs.webkit.org/show_bug.cgi?id=239303
-TEST(GPUProcess, DISABLED_CanvasBasicCrashHandling)
+TEST(GPUProcess, CanvasBasicCrashHandling)
 {
 auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
 WKPreferencesSetBoolValueForKeyForTesting((__bridge WKPreferencesRef)[configuration preferences], true, WKStringCreateWithUTF8CString("UseGPUProcessForCanvasRenderingEnabled"));






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [295481] trunk

2022-06-12 Thread said
Title: [295481] trunk








Revision 295481
Author s...@apple.com
Date 2022-06-12 21:26:54 -0700 (Sun, 12 Jun 2022)


Log Message
[Filters] LightSource should keep its points in  units
https://bugs.webkit.org/show_bug.cgi?id=241535


Reviewed by Cameron McCormack.

PointLightSource and SpotLightSource are created with points in user space coordinates.
See SVGFEPointLightElement::lightSource() and SVGFESpotLightElement::lightSource().
But this requires knowing the filter targetBoundingBox and the primitiveUnits at
the LightSource creation time.

When dynamically updating these points through SVGFEDiffuseLightingElement::
setFilterEffectAttribute() or SVGFESpecularLightingElement::setFilterEffectAttribute()
the SVGFilter is not available and these points are stored as 
coordinates. This means if the primitiveUnits is SVG_UNIT_TYPE_OBJECTBOUNDINGBOX,
fractions of the targetBoundingBox will be treated as lengths in user space.

The fix is to store the LightSources points in  units and to
resolve them to user space coordinates in initPaintingData().

* LayoutTests/svg/filters/feDiffuseLighting-feSpotLight-dynamic-update-expected.svg: Added.
* LayoutTests/svg/filters/feDiffuseLighting-feSpotLight-dynamic-update.svg: Added.
* LayoutTests/svg/filters/feSpecularLighting-fePointLight-dynamic-update-expected.svg: Added.
* LayoutTests/svg/filters/feSpecularLighting-fePointLight-dynamic-update.svg: Added.
* Source/WebCore/platform/graphics/filters/Filter.h:
(WebCore::Filter::resolvedPoint3D const):
* Source/WebCore/platform/graphics/filters/PointLightSource.cpp:
(WebCore::PointLightSource::PointLightSource):
(WebCore::PointLightSource::initPaintingData const):
(WebCore::PointLightSource::setX):
(WebCore::PointLightSource::setY):
(WebCore::PointLightSource::setZ):
* Source/WebCore/platform/graphics/filters/PointLightSource.h:
(WebCore::PointLightSource::position const):
(WebCore::PointLightSource::encode const):
* Source/WebCore/platform/graphics/filters/SpotLightSource.cpp:
(WebCore::SpotLightSource::SpotLightSource):
(WebCore::SpotLightSource::initPaintingData const):
(WebCore::SpotLightSource::setX):
(WebCore::SpotLightSource::setY):
(WebCore::SpotLightSource::setZ):
(WebCore::SpotLightSource::setPointsAtX):
(WebCore::SpotLightSource::setPointsAtY):
(WebCore::SpotLightSource::setPointsAtZ):
* Source/WebCore/platform/graphics/filters/SpotLightSource.h:
(WebCore::SpotLightSource::position const):
(WebCore::SpotLightSource::direction const):
(WebCore::SpotLightSource::encode const):
* Source/WebCore/svg/SVGFEBlendElement.cpp:
(WebCore::SVGFEBlendElement::filterEffect const):
* Source/WebCore/svg/SVGFEBlendElement.h:
* Source/WebCore/svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::filterEffect const):
* Source/WebCore/svg/SVGFEColorMatrixElement.h:
* Source/WebCore/svg/SVGFEComponentTransferElement.cpp:
(WebCore::SVGFEComponentTransferElement::filterEffect const):
* Source/WebCore/svg/SVGFEComponentTransferElement.h:
* Source/WebCore/svg/SVGFECompositeElement.cpp:
(WebCore::SVGFECompositeElement::filterEffect const):
* Source/WebCore/svg/SVGFECompositeElement.h:
* Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::filterEffect const):
* Source/WebCore/svg/SVGFEConvolveMatrixElement.h:
* Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::filterEffect const):
* Source/WebCore/svg/SVGFEDiffuseLightingElement.h:
* Source/WebCore/svg/SVGFEDisplacementMapElement.cpp:
(WebCore::SVGFEDisplacementMapElement::filterEffect const):
* Source/WebCore/svg/SVGFEDisplacementMapElement.h:
* Source/WebCore/svg/SVGFEDistantLightElement.cpp:
(WebCore::SVGFEDistantLightElement::lightSource const):
* Source/WebCore/svg/SVGFEDistantLightElement.h:
* Source/WebCore/svg/SVGFEDropShadowElement.cpp:
(WebCore::SVGFEDropShadowElement::filterEffect const):
* Source/WebCore/svg/SVGFEDropShadowElement.h:
* Source/WebCore/svg/SVGFEFloodElement.cpp:
(WebCore::SVGFEFloodElement::filterEffect const):
* Source/WebCore/svg/SVGFEFloodElement.h:
* Source/WebCore/svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::filterEffect const):
* Source/WebCore/svg/SVGFEGaussianBlurElement.h:
* Source/WebCore/svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::filterEffect const):
* Source/WebCore/svg/SVGFEImageElement.h:
* Source/WebCore/svg/SVGFELightElement.h:
* Source/WebCore/svg/SVGFEMergeElement.cpp:
(WebCore::SVGFEMergeElement::filterEffect const):
* Source/WebCore/svg/SVGFEMergeElement.h:
* Source/WebCore/svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::filterEffect const):
* Source/WebCore/svg/SVGFEMorphologyElement.h:
* Source/WebCore/svg/SVGFEOffsetElement.cpp:
(WebCore::SVGFEOffsetElement::filterEffect const):
* Source/WebCore/svg/SVGFEOffsetElement.h:
* Source/WebCore/svg/SVGFEPointLightElement.cpp:
(WebCore::SVGFEPointLightElement::lightSource const):
* Source/WebCore/svg/SVGFEPointLightElement.h:
* Source/WebCore/svg/SVG

[webkit-changes] [295498] trunk/Source/WebCore

2022-06-13 Thread said
Title: [295498] trunk/Source/WebCore








Revision 295498
Author s...@apple.com
Date 2022-06-13 12:52:35 -0700 (Mon, 13 Jun 2022)


Log Message
[GPU Process] [Filters] Simplify the dynamic update of the SVG filter elements
https://bugs.webkit.org/show_bug.cgi?id=232842
rdar://85426197

Reviewed by Simon Fraser.

Consider this SVG as an example:









The renderers of the  and the  elements ask the renderer of the
 element, i.e. RenderSVGResourceFilter to applyResource(). In this
function a new SVGFilter is created for each target renderer. A new entry
{ target_renderer, FilterData } is added to
RenderSVGResourceFilter::m_rendererFilterDataMap.

While building the SVGFilter, a new FilterEffect is created for every target
renderer and an entry { primitive_renderer, effect } is added to
SVGFilterBuilder::m_effectRenderer.

Suppose 'stdDeviation' of  has been changed, this is the
current workflow:

SVGFEGaussianBlurElement::svgAttributeChanged() will call
SVGFilterPrimitiveStandardAttributes::primitiveAttributeChanged() which
will call RenderSVGResourceFilterPrimitive::primitiveAttributeChanged().
The last one will call RenderSVGResourceFilter::primitiveAttributeChanged()
and pass itself as an argument.

RenderSVGResourceFilter::primitiveAttributeChanged() will loop through
all the entries in m_rendererFilterDataMap and get the FilterData. And
then it gets the effect given the key primitive renderer from
FilterData::SVGFilterBuilder::m_effectRenderer. Having this effect, its
setFilterEffectAttribute() will be called.

This workflow is cumbersome since it was mainly done this way because the result
FilterImage was stored with the FilterEffect. But since the  result FilterImage
was moved out of the FilterEffect, we do not need to create a new FilterEffect
for every target renderer. The same FilterEffect can be shared among all the
target renderers.

This is the new workflow for dynamically updating the FilterEffect attributes:

No need to create a separate FilterEffect for every SVGFilter (or target
renderer). A shared FilterEffect can be used instead. This will be
SVGFilterPrimitiveStandardAttributes::m_effect.

SVGFEGaussianBlurElement::svgAttributeChanged() will call
SVGFilterPrimitiveStandardAttributes::primitiveAttributeChanged() which
will call SVGFEGaussianBlurElement::setFilterEffectAttribute() if m_effect
is not null. setFilterEffectAttribute() will return true if it needs to
be repainted. RenderSVGResourceFilterPrimitive::markFilterEffectForRepaint()
will be called then.

RenderSVGResourceFilterPrimitive::markFilterForInvalidation() will call
RenderSVGResourceFilter::markFilterForRepaint() if effect is not null which
will clear the result FilterImage of this effect and all other FilterImages
which takes the result FilterImage of this effect as an input.

If svgAttributeChanged() finds out it needs to rebuild the entire SVGFilter,
it will call SVGFilterPrimitiveStandardAttributes::markFilterEffectForRebuild()
which will call RenderSVGResourceFilterPrimitive::markFilterEffectForRebuild()
and sets SVGFilterPrimitiveStandardAttributes::m_effect to nullptr.
RenderSVGResourceFilterPrimitive::markFilterEffectForRebuild() will call
RenderSVGResourceFilter::markFilterForRebuild() which will clear
RenderSVGResourceFilter::m_rendererFilterDataMap. This will force rebuilding
the SVGFilter for all renderers.

* Source/WebCore/platform/graphics/filters/FEDropShadow.cpp:
(WebCore::FEDropShadow::setStdDeviationX):
(WebCore::FEDropShadow::setStdDeviationY):
(WebCore::FEDropShadow::setDx):
(WebCore::FEDropShadow::setDy):
(WebCore::FEDropShadow::setShadowColor):
(WebCore::FEDropShadow::setShadowOpacity):
* Source/WebCore/platform/graphics/filters/FEDropShadow.h:
(WebCore::FEDropShadow::setStdDeviationX): Deleted.
(WebCore::FEDropShadow::setStdDeviationY): Deleted.
(WebCore::FEDropShadow::setDx): Deleted.
(WebCore::FEDropShadow::setDy): Deleted.
(WebCore::FEDropShadow::setShadowColor): Deleted.
(WebCore::FEDropShadow::setShadowOpacity): Deleted.
* Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::setStdDeviationX):
(WebCore::FEGaussianBlur::setStdDeviationY):
(WebCore::FEGaussianBlur::setEdgeMode):
* Source/WebCore/platform/graphics/filters/FEGaussianBlur.h:
* Source/WebCore/platform/graphics/filters/FEOffset.cpp:
(WebCore::FEOffset::setDx):
(WebCore::FEOffset::setDy):
* Source/WebCore/platform/graphics/filters/FEOffset.h:
* Source/WebCore/rendering/CSSFilter.cpp:
(WebCore::createReferenceFilter):
* Source/WebCore/rendering/svg/RenderSVGResourceContainer.h:
* Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::applyResource):
(WebCore::RenderSVGResourceFilter::markFilterForRepaint):
(WebCore::RenderSVGResourceFilter::markFilterForRebuild):
(WebCore::RenderSVGResourceFilter::primitiveAttributeCh

[webkit-changes] [295517] trunk/Source/WebCore

2022-06-13 Thread said
Title: [295517] trunk/Source/WebCore








Revision 295517
Author s...@apple.com
Date 2022-06-13 23:33:01 -0700 (Mon, 13 Jun 2022)


Log Message
[GPU Process] [Filters] Remove SVGFilterBuilder
https://bugs.webkit.org/show_bug.cgi?id=241577


Reviewed by Simon Fraser.

After r295498, all the methods of SVGFilterBuilder became static. So this patch
removes it and moves its methods to SVGFilter.

-- colorInterpolationForElement() will be moved to SVGElement::colorInterpolation().
-- effectGeometryFlagsForElement() will be moved to
   SVGFilterPrimitiveStandardAttributes::effectGeometryFlags().
-- FilterData::boundaries is removed. It is set in RenderSVGResourceFilter::
   applyResource() and used only in RenderSVGResourceFilter::postApplyResource()
   where we check '!isEmpty()'. This check can be replaced by checking if filter
   is not nullptr.
-- FilterData::scale is removed since it is not used.
-- FilterData::sourceGraphicBuffer and FilterData::drawingRegion are renamed
   sourceImage and sourceImageRect respectively to match the named of the inputs
   of GraphicsContext::drawFilteredImageBuffer().

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/rendering/CSSFilter.cpp:
(WebCore::calculateReferenceFilterOutsets):
* Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::applyResource):
(WebCore::RenderSVGResourceFilter::postApplyResource):
(WebCore::RenderSVGResourceFilter::drawingRegion const):
* Source/WebCore/rendering/svg/RenderSVGResourceFilter.h:
* Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGResourceContainer):
* Source/WebCore/svg/SVGElement.cpp:
(WebCore::SVGElement::colorInterpolation const):
* Source/WebCore/svg/SVGElement.h:
* Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::effectGeometryFlags const):
* Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h:
* Source/WebCore/svg/graphics/filters/SVGFilter.cpp:
(WebCore::SVGFilter::create):
(WebCore::buildFilterEffectsGraph):
(WebCore::SVGFilter::buildExpression):
(WebCore::buildFilterPrimitivesGraph):
(WebCore::SVGFilter::calculateOutsets):
* Source/WebCore/svg/graphics/filters/SVGFilter.h:
* Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp: Removed.
* Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h: Removed.

Canonical link: https://commits.webkit.org/251522@main

Modified Paths

trunk/Source/WebCore/Sources.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/rendering/CSSFilter.cpp
trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp
trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.h
trunk/Source/WebCore/svg/SVGElement.cpp
trunk/Source/WebCore/svg/SVGElement.h
trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
trunk/Source/WebCore/svg/graphics/filters/SVGFilter.cpp
trunk/Source/WebCore/svg/graphics/filters/SVGFilter.h


Removed Paths

trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp
trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h




Diff

Modified: trunk/Source/WebCore/Sources.txt (295516 => 295517)

--- trunk/Source/WebCore/Sources.txt	2022-06-14 06:30:59 UTC (rev 295516)
+++ trunk/Source/WebCore/Sources.txt	2022-06-14 06:33:01 UTC (rev 295517)
@@ -2760,7 +2760,6 @@
 svg/graphics/SVGImageCache.cpp
 svg/graphics/SVGImageForContainer.cpp
 svg/graphics/filters/SVGFilter.cpp
-svg/graphics/filters/SVGFilterBuilder.cpp
 svg/properties/SVGAnimatedProperty.cpp
 svg/properties/SVGAnimationAdditiveValueFunctionImpl.cpp
 svg/properties/SVGAttributeAnimator.cpp


Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (295516 => 295517)

--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2022-06-14 06:30:59 UTC (rev 295516)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2022-06-14 06:33:01 UTC (rev 295517)
@@ -239,7 +239,6 @@
 		081668D4125603BF006F25DE /* SVGTextChunkBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 081668D2125603BF006F25DE /* SVGTextChunkBuilder.h */; };
 		081668DA125603D5006F25DE /* SVGTextLayoutEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 081668D8125603D5006F25DE /* SVGTextLayoutEngine.h */; };
 		081AA8DA237E002AB06E /* SVGElementRareData.h in Headers */ = {isa = PBXBuildFile; fileRef = 081AA8D9237E002AB06E /* SVGElementRareData.h */; };
-		081EBF3B0FD34F4100DA7559 /* SVGFilterBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 081EBF390FD34F4100DA7559 /* SVGFilterBuilder.h */; };
 		083DAEA70F01A7FB00342754 /* RenderTextControlMultiLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 083DAEA30F01A7FB00342754 /* RenderTextControlMultiLine.h */; };
 		083DAEA90F01A7FB00342754 /* RenderTextControlSingleLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 083DAEA50F01A7FB00342754 /* RenderTextControlSingleLine.h */; };
 		084

[webkit-changes] [228256] trunk/LayoutTests

2018-02-07 Thread said
Title: [228256] trunk/LayoutTests








Revision 228256
Author s...@apple.com
Date 2018-02-07 18:32:38 -0800 (Wed, 07 Feb 2018)


Log Message
[iOS] Skip webgl/webgl-texture-image-buffer-reuse.html
https://bugs.webkit.org/show_bug.cgi?id=182592

Unreviewed test gardening.

* platform/ios/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (228255 => 228256)

--- trunk/LayoutTests/ChangeLog	2018-02-08 02:29:57 UTC (rev 228255)
+++ trunk/LayoutTests/ChangeLog	2018-02-08 02:32:38 UTC (rev 228256)
@@ -1,3 +1,12 @@
+2018-02-07  Said Abou-Hallawa  
+
+[iOS] Skip webgl/webgl-texture-image-buffer-reuse.html
+https://bugs.webkit.org/show_bug.cgi?id=182592
+
+Unreviewed test gardening.
+
+* platform/ios/TestExpectations:
+
 2018-02-07  Youenn Fablet  
 
 Remove www1/www2 URLs from service worker tests


Modified: trunk/LayoutTests/platform/ios/TestExpectations (228255 => 228256)

--- trunk/LayoutTests/platform/ios/TestExpectations	2018-02-08 02:29:57 UTC (rev 228255)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2018-02-08 02:32:38 UTC (rev 228256)
@@ -3284,3 +3284,5 @@
 webkit.org/b/181838 js/slow-stress/Int32Array-alloc-huge-long-lived.html [ Slow ]
 
 webkit.org/b/182422 imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html [ Skip ]
+
+webkit.org/b/182592 webgl/webgl-texture-image-buffer-reuse.html [ Skip ]






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [240949] trunk

2019-02-04 Thread said
Title: [240949] trunk








Revision 240949
Author s...@apple.com
Date 2019-02-04 16:47:17 -0800 (Mon, 04 Feb 2019)


Log Message
[CG] Enable setAdditionalSupportedImageTypes for WK1
https://bugs.webkit.org/show_bug.cgi?id=194190

Reviewed by Tim Horton.

Source/WebCore:

Move the function webCoreStringVectorFromNSStringArray from WebKit to
WebCore so it can be used by both WebKit and WebKitLegacy.

* platform/mac/StringUtilities.h:
* platform/mac/StringUtilities.mm:
(WebCore::webCoreStringVectorFromNSStringArray):

Source/WebKit:

Move the function webCoreStringVectorFromNSStringArray from WebKit to
WebCore so it can be used by both WebKit and WebKitLegacy.

* Platform/mac/StringUtilities.h:
* Platform/mac/StringUtilities.mm:
(WebKit::webCoreStringVectorFromNSStringArray): Deleted.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):

Source/WebKitLegacy/mac:

1. Define the preferences key AdditionalSupportedImageTypes.
2. Add additionalSupportedImageTypes as a private preference property.
3. Define the setter and the getter of the property.
4. Add function to convert from an id to an array of strings.
5. Call WebCore::setAdditionalSupportedImageTypes when preferences change.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(-[WebPreferences _stringArrayValueForKey:]):
(-[WebPreferences _setStringArrayValueForKey:forKey:]):
(-[WebPreferences setAdditionalSupportedImageTypes:]):
(-[WebPreferences additionalSupportedImageTypes]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Tools:

Add a test similar to the one under WebKit Cocoa but make it create a
WebView instead of a WKWebView.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/100x100-red.tga: Added.
* TestWebKitAPI/Tests/mac/AdditionalSupportedImageTypes.html: Added.
* TestWebKitAPI/Tests/mac/AdditionalSupportedImageTypes.mm: Added.
(-[AdditionalSupportedImageTypesTest webView:didFinishLoadForFrame:]):
(TestWebKitAPI::runTest):
(TestWebKitAPI::TEST):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/mac/StringUtilities.h
trunk/Source/WebCore/platform/mac/StringUtilities.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Platform/mac/StringUtilities.h
trunk/Source/WebKit/Platform/mac/StringUtilities.mm
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
trunk/Source/WebKitLegacy/mac/ChangeLog
trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h
trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm
trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
trunk/Source/WebKitLegacy/mac/WebView/WebView.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Tools/TestWebKitAPI/Tests/mac/100x100-red.tga
trunk/Tools/TestWebKitAPI/Tests/mac/AdditionalSupportedImageTypes.html
trunk/Tools/TestWebKitAPI/Tests/mac/AdditionalSupportedImageTypes.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (240948 => 240949)

--- trunk/Source/WebCore/ChangeLog	2019-02-05 00:28:24 UTC (rev 240948)
+++ trunk/Source/WebCore/ChangeLog	2019-02-05 00:47:17 UTC (rev 240949)
@@ -1,3 +1,17 @@
+2019-02-04  Said Abou-Hallawa  
+
+[CG] Enable setAdditionalSupportedImageTypes for WK1
+https://bugs.webkit.org/show_bug.cgi?id=194190
+
+Reviewed by Tim Horton.
+
+Move the function webCoreStringVectorFromNSStringArray from WebKit to
+WebCore so it can be used by both WebKit and WebKitLegacy.
+
+* platform/mac/StringUtilities.h:
+* platform/mac/StringUtilities.mm:
+(WebCore::webCoreStringVectorFromNSStringArray):
+
 2019-02-04  Justin Fan  
 
 [Web GPU] Code clean-up for RenderPipeline backend


Modified: trunk/Source/WebCore/platform/mac/StringUtilities.h (240948 => 240949)

--- trunk/Source/WebCore/platform/mac/StringUtilities.h	2019-02-05 00:28:24 UTC (rev 240948)
+++ trunk/Source/WebCore/platform/mac/StringUtilities.h	2019-02-05 00:47:17 UTC (rev 240949)
@@ -29,5 +29,11 @@
 #import 
 
 namespace WebCore {
+
 WEBCORE_EXPORT bool stringMatchesWildcardString(const String& stringToBeMatched, const String& wildcardString);
+
+#ifdef __OBJC__
+WEBCORE_EXPORT Vector webCoreStringVectorFromNSStringArray(NSArray *);
+#endif // defined(__OBJC__)
+
 }


Modified: trunk/Source/WebCore/platform/mac/StringUtilities.mm (240948 => 240949)

--- trunk/Source/WebCore/platform/mac/StringUtilities.mm	2019-02-05 00:28:24 UTC (rev 240948)
+++ trunk/Source/WebCore/platform/mac/StringUtilities.mm	2019-02-05 00:47:17 UTC (rev 240949)
@@ -59,4 +59,15 @@
 return JSC::Yarr::RegularExpression(wildcardRegexPatternString(wildcardString), JSC::Yarr::TextCaseInsensitive).match(string) != -1;
 }
 
+Vector webCoreStringVectorFromNSStringArray(NSArray *nsStringArray)
+{
+Vector stringVector;
+stringVector.reserveInitialCapacity([nsStringArray count]);
+
+for (NSString *nsString

[webkit-changes] [225586] trunk/Source/WebCore/ChangeLog

2017-12-06 Thread said
Title: [225586] trunk/Source/WebCore/ChangeLog








Revision 225586
Author s...@apple.com
Date 2017-12-06 11:56:13 -0800 (Wed, 06 Dec 2017)


Log Message
Storage Access API: Make document.hasStorageAccess a function and always allow access for same-origin iframes
https://bugs.webkit.org/show_bug.cgi?id=176944


Patch by John Wilander  on 2017-12-06
Reviewed by Brent Fulgham.

Test: http/tests/storageAccess/request-storage-access-cross-origin-sandboxed-iframe-without-user-gesture.html

This change introduces document.hasStorageAccess() as a function which
returns a promise instead of being a property. Since cookie access can
be due to both a granted request and recent user interaction as first
party, the WebKit::WebResourceLoadStatisticsStore needs to be consulted.

* dom/Document.cpp:
(WebCore::Document::hasStorageAccess):
(WebCore::Document::requestStorageAccess):
Removed check of the previous m_hasStorageAccess member.
Same-origin check done earlier. This was a request/suggestion
from Mozilla.
* dom/Document.h:
(WebCore::Document::hasStorageAccess const): Deleted.
Now uses a promise.
* dom/Document.idl:
* page/ChromeClient.h:

Modified Paths

trunk/Source/WebCore/ChangeLog




Diff

Modified: trunk/Source/WebCore/ChangeLog (225585 => 225586)

--- trunk/Source/WebCore/ChangeLog	2017-12-06 19:45:55 UTC (rev 225585)
+++ trunk/Source/WebCore/ChangeLog	2017-12-06 19:56:13 UTC (rev 225586)
@@ -86,7 +86,9 @@
 
 Disable using CGContextDrawPathDirect() for macOS High Sierra or earlier.
 This API has a bug when drawing a path with a shadow on Retina display.
+This bug is tracked internally by .
 
+
 * platform/graphics/cg/GraphicsContextCG.cpp:
 
 2017-12-06  Youenn Fablet  






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [239873] trunk/Source/WTF

2019-01-11 Thread said
Title: [239873] trunk/Source/WTF








Revision 239873
Author s...@apple.com
Date 2019-01-11 14:01:07 -0800 (Fri, 11 Jan 2019)


Log Message
WorkQueue::concurrentApply() passes a raw pointer to a temporary String to Thread::create().
https://bugs.webkit.org/show_bug.cgi?id=191350

Reviewed by Brent Fulgham.

The non COCOA version of WorkQueue::concurrentApply() creates a temporary
String for the threadName and passes the raw pointer of this String to
Thread::create(). After freeing this String, Thread::entryPoint() uses
the raw char pointer to internally initialize the thread.

The fix is to use a single literal string for all the threads' names since
they are created for a thread-pool.

* wtf/WorkQueue.cpp:
(WTF::WorkQueue::concurrentApply):

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/WorkQueue.cpp




Diff

Modified: trunk/Source/WTF/ChangeLog (239872 => 239873)

--- trunk/Source/WTF/ChangeLog	2019-01-11 21:57:46 UTC (rev 239872)
+++ trunk/Source/WTF/ChangeLog	2019-01-11 22:01:07 UTC (rev 239873)
@@ -1,3 +1,21 @@
+2019-01-11  Said Abou-Hallawa  
+
+WorkQueue::concurrentApply() passes a raw pointer to a temporary String to Thread::create().
+https://bugs.webkit.org/show_bug.cgi?id=191350
+
+Reviewed by Brent Fulgham.
+
+The non COCOA version of WorkQueue::concurrentApply() creates a temporary
+String for the threadName and passes the raw pointer of this String to
+Thread::create(). After freeing this String, Thread::entryPoint() uses
+the raw char pointer to internally initialize the thread.
+
+The fix is to use a single literal string for all the threads' names since
+they are created for a thread-pool.
+
+* wtf/WorkQueue.cpp:
+(WTF::WorkQueue::concurrentApply):
+
 2019-01-11  Dominik Infuehr  
 
 Enable DFG on ARM/Linux again


Modified: trunk/Source/WTF/wtf/WorkQueue.cpp (239872 => 239873)

--- trunk/Source/WTF/wtf/WorkQueue.cpp	2019-01-11 21:57:46 UTC (rev 239872)
+++ trunk/Source/WTF/wtf/WorkQueue.cpp	2019-01-11 22:01:07 UTC (rev 239873)
@@ -75,7 +75,7 @@
 
 m_workers.reserveInitialCapacity(threadCount);
 for (unsigned i = 0; i < threadCount; ++i) {
-m_workers.append(Thread::create(String::format("ThreadPool Worker %u", i).utf8().data(), [this] {
+m_workers.append(Thread::crea

[webkit-changes] [236991] trunk

2018-10-09 Thread said
Title: [236991] trunk








Revision 236991
Author s...@apple.com
Date 2018-10-09 16:59:52 -0700 (Tue, 09 Oct 2018)


Log Message
REGRESSION(r234620): SVGLangSpace::svgAttributeChanged() should invalidate the renderer of the SVGGeometryElement descendant only
https://bugs.webkit.org/show_bug.cgi?id=190411

Reviewed by Simon Fraser.

Source/WebCore:

Test: svg/dynamic-updates/SVGStopElement-dom-xml-lang-attrr.html

When changing the attributes of the SVGLangSpace, we should invalidate
the renderer of the SVGGeometryElement descendant only. Renderer of other
elements, like SVGStopElement, should not be invalidated because they do
not have geometry and they can be used as resources for drawing another
SVGGeometryElement.

* svg/SVGElement.h:
(WebCore::SVGElement::isSVGGeometryElement const):
* svg/SVGGeometryElement.h:
(isType):
* svg/SVGLangSpace.cpp:
(WebCore::SVGLangSpace::svgAttributeChanged):

LayoutTests:

* svg/dynamic-updates/SVGStopElement-dom-xml-lang-attrr-expected.txt: Added.
* svg/dynamic-updates/SVGStopElement-dom-xml-lang-attrr.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/svg/SVGElement.h
trunk/Source/WebCore/svg/SVGGeometryElement.h
trunk/Source/WebCore/svg/SVGLangSpace.cpp


Added Paths

trunk/LayoutTests/svg/dynamic-updates/SVGStopElement-dom-xml-lang-attrr-expected.txt
trunk/LayoutTests/svg/dynamic-updates/SVGStopElement-dom-xml-lang-attrr.html




Diff

Modified: trunk/LayoutTests/ChangeLog (236990 => 236991)

--- trunk/LayoutTests/ChangeLog	2018-10-09 23:46:12 UTC (rev 236990)
+++ trunk/LayoutTests/ChangeLog	2018-10-09 23:59:52 UTC (rev 236991)
@@ -1,3 +1,13 @@
+2018-10-09  Said Abou-Hallawa  
+
+REGRESSION(r234620): SVGLangSpace::svgAttributeChanged() should invalidate the renderer of the SVGGeometryElement descendant only
+https://bugs.webkit.org/show_bug.cgi?id=190411
+
+Reviewed by Simon Fraser.
+
+* svg/dynamic-updates/SVGStopElement-dom-xml-lang-attrr-expected.txt: Added.
+* svg/dynamic-updates/SVGStopElement-dom-xml-lang-attrr.html: Added.
+
 2018-10-09  Chris Dumez  
 
 Anchor target should be ignored on activation when the download attribute is set


Added: trunk/LayoutTests/svg/dynamic-updates/SVGStopElement-dom-xml-lang-attrr-expected.txt (0 => 236991)

--- trunk/LayoutTests/svg/dynamic-updates/SVGStopElement-dom-xml-lang-attrr-expected.txt	(rev 0)
+++ trunk/LayoutTests/svg/dynamic-updates/SVGStopElement-dom-xml-lang-attrr-expected.txt	2018-10-09 23:59:52 UTC (rev 236991)
@@ -0,0 +1,3 @@
+Passes if no crash happens.
+
+


Added: trunk/LayoutTests/svg/dynamic-updates/SVGStopElement-dom-xml-lang-attrr.html (0 => 236991)

--- trunk/LayoutTests/svg/dynamic-updates/SVGStopElement-dom-xml-lang-attrr.html	(rev 0)
+++ trunk/LayoutTests/svg/dynamic-updates/SVGStopElement-dom-xml-lang-attrr.html	2018-10-09 23:59:52 UTC (rev 236991)
@@ -0,0 +1,21 @@
+
+Passes if no crash happens.
+
+
+
+
+
+
+
+
+if (window.testRunner) {
+testRunner.dumpAsText();
+testRunner.waitUntilDone();
+}
+setTimeout(function(){ 
+stop1.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:lang", "jw");
+if (window.testRunner)
+testRunner.notifyDone();
+}, 0);
+
+


Modified: trunk/Source/WebCore/ChangeLog (236990 => 236991)

--- trunk/Source/WebCore/ChangeLog	2018-10-09 23:46:12 UTC (rev 236990)
+++ trunk/Source/WebCore/ChangeLog	2018-10-09 23:59:52 UTC (rev 236991)
@@ -1,3 +1,25 @@
+2018-10-09  Said Abou-Hallawa  
+
+REGRESSION(r234620): SVGLangSpace::svgAttributeChanged() should invalidate the renderer of the SVGGeometryElement descendant only
+https://bugs.webkit.org/show_bug.cgi?id=190411
+
+Reviewed by Simon Fraser.
+
+Test: svg/dynamic-updates/SVGStopElement-dom-xml-lang-attrr.html
+
+When changing the attributes of the SVGLangSpace, we should invalidate
+the renderer of the SVGGeometryElement descendant only. Renderer of other
+elements, like SVGStopElement, should not be invalidated because they do
+not have geometry and they can be used as resources for drawing another
+SVGGeometryElement.
+
+* svg/SVGElement.h:
+(WebCore::SVGElement::isSVGGeometryElement const):
+* svg/SVGGeometryElement.h:
+(isType):
+* svg/SVGLangSpace.cpp:
+(WebCore::SVGLangSpace::svgAttributeChanged):
+
 2018-10-09  Chris Dumez  
 
 Anchor target should be ignored on activation when the download attribute is set


Modified: trunk/Source/WebCore/svg/SVGElement.h (236990 => 236991)

--- trunk/Source/WebCore/svg/SVGElement.h	2018-10-09 23:46:12 UTC (rev 236990)
+++ trunk/Source/WebCore/svg/SVGElement.h	2018-10-09 23:59:52 UTC (rev 236991)
@

[webkit-changes] [206635] trunk

2016-09-30 Thread said
Title: [206635] trunk








Revision 206635
Author s...@apple.com
Date 2016-09-30 09:01:36 -0700 (Fri, 30 Sep 2016)


Log Message
Change the MemoryCache and CachedResource adjustSize functions to take a long argument
https://bugs.webkit.org/show_bug.cgi?id=162708


Reviewed by Brent Fulgham.

Source/WebCore:

Because the MemoryCache stores the size of the cached memory in unsigned,
two problems my happen when reporting a change in the size of the memory:

1. Signed integer overflow -- which can happen because MemoryCache::adjustSize()
   takes a signed integer argument. If the allocated or the freed memory size is
   larger than the maximum of a signed integer, an overflow will happen.
   For the image caching code, this can be seen where the unsigned decodedSize
   is casted to an integer before passing it to ImageObserver::decodedSizeChanged().

2. Unsigned integer overflow -- which can happen if the new allocated memory
   size plus the currentSize exceeds the maximum of unsigned.
   This can be seen in MemoryCache::adjustSize() where we add delta to m_liveSize
   or m_deadSize without checking whether this addition will overflow or not. We
   do not assert for overflow although we assert for underflow.
   
The fix for these two problems can be the following:

1. Make all the adjustSize functions all the way till MemoryCache::adjustSize()
   take a signed long integer argument.
   
2. Do not create a NativeImagePtr for an ImageFrame if its frameBytes plus the
   ImageFrameCache::decodedSize() will exceed the maximum of an unsigned integer.

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::decodedSizeChanged): Change the argument to be long. No overflow will happen when casting the argument from unsigned to long.
* loader/cache/CachedImage.h:
* loader/cache/CachedResource.cpp: 
(WebCore::CachedResource::setDecodedSize): Use long integer casting when calling MemoryCache::adjustSize().
(WebCore::CachedResource::setEncodedSize): Ditto.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::MemoryCache): Add as static assert to ensure sizeof(long long) can hold any unsigned or its negation.
(WebCore::MemoryCache::revalidationSucceeded): Use long integer casting when calling MemoryCache::adjustSize().
(WebCore::MemoryCache::remove): Ditto.
(WebCore::MemoryCache::adjustSize): Change the function argument to long integer. No overflow will happen when casting the argument from unsigned to long.
* loader/cache/MemoryCache.h:
* platform/graphics/ImageFrameCache.cpp:
(WebCore::ImageFrameCache::destroyIncompleteDecodedData): Call a function with its new name.
(WebCore::ImageFrameCache::decodedSizeChanged): Change the function argument to long integer. No overflow will happen when casting the argument from unsigned to long.
(WebCore::ImageFrameCache::decodedSizeIncreased): Use long integer casting when calling decodedSizeChanged().
(WebCore::ImageFrameCache::decodedSizeDecreased): Ditto.
(WebCore::ImageFrameCache::decodedSizeReset): Ditto.
(WebCore::ImageFrameCache::didDecodeProperties): Ditto.
(WebCore::ImageFrameCache::frameAtIndex): Do not create the NativeImage if adding its frameByes to the MemoryCache will cause numerical overflow.
(WebCore::ImageFrameCache::decodedSizeIncremented): Deleted. This function is renamed decodedSizeIncreased().
(WebCore::ImageFrameCache::decodedSizeDecremented): Deleted. This function is renamed decodedSizeDecreased().
* platform/graphics/ImageFrameCache.h:
* platform/graphics/ImageObserver.h:
* platform/graphics/IntSize.h:
(WebCore::IntSize::unclampedArea): Returns the area of an IntSize in size_t.
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::decodedSizeChanged): Use long integer casting when calling ImageObserver::decodedSizeChanged().

LayoutTests:

* TestExpectations: Remove failed tests.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/cache/CachedImage.cpp
trunk/Source/WebCore/loader/cache/CachedImage.h
trunk/Source/WebCore/loader/cache/CachedResource.cpp
trunk/Source/WebCore/loader/cache/MemoryCache.cpp
trunk/Source/WebCore/loader/cache/MemoryCache.h
trunk/Source/WebCore/platform/graphics/ImageFrameCache.cpp
trunk/Source/WebCore/platform/graphics/ImageFrameCache.h
trunk/Source/WebCore/platform/graphics/ImageObserver.h
trunk/Source/WebCore/platform/graphics/IntSize.h
trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (206634 => 206635)

--- trunk/LayoutTests/ChangeLog	2016-09-30 14:20:25 UTC (rev 206634)
+++ trunk/LayoutTests/ChangeLog	2016-09-30 16:01:36 UTC (rev 206635)
@@ -1,3 +1,13 @@
+2016-09-30  Said Abou-Hallawa  
+
+Change the MemoryCache and CachedResource adjustSize functions to take a long argument
+https://bugs.webkit.org/show_bug.cgi?id=162708
+
+
+Reviewed by Brent Fulgham.
+
+* TestExpectations: Rem

[webkit-changes] [206637] trunk/Source/WebCore

2016-09-30 Thread said
Title: [206637] trunk/Source/WebCore








Revision 206637
Author s...@apple.com
Date 2016-09-30 09:18:25 -0700 (Fri, 30 Sep 2016)


Log Message
Unreviewed, fix 32-bit build.

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::decodedSizeChanged):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/cache/CachedImage.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (206636 => 206637)

--- trunk/Source/WebCore/ChangeLog	2016-09-30 16:08:30 UTC (rev 206636)
+++ trunk/Source/WebCore/ChangeLog	2016-09-30 16:18:25 UTC (rev 206637)
@@ -1,3 +1,10 @@
+2016-09-30  Said Abou-Hallawa  
+
+Unreviewed, fix 32-bit build.
+
+* loader/cache/CachedImage.cpp:
+(WebCore::CachedImage::decodedSizeChanged):
+
 2016-09-30  Youenn Fablet  
 
 FetchBody should use UTF8Encoding to encode text data


Modified: trunk/Source/WebCore/loader/cache/CachedImage.cpp (206636 => 206637)

--- trunk/Source/WebCore/loader/cache/CachedImage.cpp	2016-09-30 16:08:30 UTC (rev 206636)
+++ trunk/Source/WebCore/loader/cache/CachedImage.cpp	2016-09-30 16:18:25 UTC (rev 206637)
@@ -456,7 +456,7 @@
 return;
 
 ASSERT(delta >= 0 || decodedSize() + delta >= 0);
-setDecodedSize(decodedSize() + delta);
+setDecodedSize(static_cast(decodedSize() + delta));
 }
 
 void CachedImage::didDraw(const Image* image)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [207216] trunk/Source/WebCore

2016-10-12 Thread said
Title: [207216] trunk/Source/WebCore








Revision 207216
Author s...@apple.com
Date 2016-10-12 09:24:55 -0700 (Wed, 12 Oct 2016)


Log Message
Unreviewed, fix Windows build break after r207182.

* platform/graphics/cg/ImageDecoderCG.cpp:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (207215 => 207216)

--- trunk/Source/WebCore/ChangeLog	2016-10-12 16:23:00 UTC (rev 207215)
+++ trunk/Source/WebCore/ChangeLog	2016-10-12 16:24:55 UTC (rev 207216)
@@ -1,3 +1,9 @@
+2016-10-12  Said Abou-Hallawa  
+
+Unreviewed, fix Windows build break after r207182.
+
+* platform/graphics/cg/ImageDecoderCG.cpp:
+
 2016-10-12  Chris Dumez  
 
 Update remaining DOM events to stop using legacy [ConstructorTemplate=Event]


Modified: trunk/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp (207215 => 207216)

--- trunk/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp	2016-10-12 16:23:00 UTC (rev 207215)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp	2016-10-12 16:24:55 UTC (rev 207216)
@@ -46,6 +46,7 @@
 #import 
 #else
 const CFStringRef kCGImageSourceSubsampleFactor = CFSTR("kCGImageSourceSubsampleFactor");
+const CFStringRef kCGImageSourceShouldCacheImmediately = CFSTR("kCGImageSourceShouldCacheImmediately");
 #endif
 
 namespace WebCore {






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [196669] trunk

2016-02-16 Thread said
Title: [196669] trunk








Revision 196669
Author s...@apple.com
Date 2016-02-16 15:59:25 -0800 (Tue, 16 Feb 2016)


Log Message
REGRESSION (r190430): WTFCrashWithSecurityImplication in:void SVGRootInlineBox::layoutCharactersInTextBoxes()
https://bugs.webkit.org/show_bug.cgi?id=154185

Reviewed by Ryosuke Niwa.
Source/WebCore:


This is a regression caused by adding support for HTMLSlotElement. The
crash happens when adding an HTMLSlotElement to anther element which should
not have it as a child like SVGTextElement for example. In this case, we
were creating a RenderText which should not be happen inside an SVG document.
The RenderText::createTextBox() was creating InlineTextBox for the slot's
text and attach it to the SVGRootInlineBox. In layoutCharactersInTextBoxes(),
the assumption is the inline box is either SVGInlineTextBox or SVGInlineFlowBox.
But since we have an InlineTextBox instead, the crash happens when casting
the InlineTextBox to SVGInlineFlowBox.

The fix is for createRenderTreeForSlotAssignees() to not create a renderer
when the parent element should not have a renderer for the this element.
This is the same thing we do for createRenderer() which handles the non
HTMLSlotElement case and which is called also from createRenderTreeRecursively().

Test: fast/shadow-dom/text-slot-child-crash.svg

* style/StyleTreeResolver.cpp:
(WebCore::Style::moveToFlowThreadIfNeeded):
(WebCore::Style::TreeResolver::createRenderer): Delete the check for
shouldCreateRenderer() and handling the case when resolvedStyle is null
since these are handled by the caller createRenderTreeRecursively().

(WebCore::Style::TreeResolver::createRenderTreeForSlotAssignees):
Assert shouldCreateRenderer() is true for this element.

(WebCore::Style::TreeResolver::createRenderTreeRecursively): Don't create
the renderer if shouldCreateRenderer() returns false. Also handle the case
when resolvedStyle is null and pass the new style to createRenderer().

* style/StyleTreeResolver.h:

LayoutTests:


Ensure that adding an HTMLSlotElement with text to an SVGTextElement will
not create a renderer and we won't crash.

* fast/shadow-dom/text-slot-child-crash-expected.txt: Added.
* fast/shadow-dom/text-slot-child-crash.svg: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/style/StyleTreeResolver.cpp
trunk/Source/WebCore/style/StyleTreeResolver.h


Added Paths

trunk/LayoutTests/fast/shadow-dom/text-slot-child-crash-expected.txt
trunk/LayoutTests/fast/shadow-dom/text-slot-child-crash.svg




Diff

Modified: trunk/LayoutTests/ChangeLog (196668 => 196669)

--- trunk/LayoutTests/ChangeLog	2016-02-16 23:47:06 UTC (rev 196668)
+++ trunk/LayoutTests/ChangeLog	2016-02-16 23:59:25 UTC (rev 196669)
@@ -1,3 +1,16 @@
+2016-02-16  Said Abou-Hallawa  
+
+REGRESSION (r190430): WTFCrashWithSecurityImplication in:void SVGRootInlineBox::layoutCharactersInTextBoxes()
+https://bugs.webkit.org/show_bug.cgi?id=154185
+
+Reviewed by Ryosuke Niwa.
+
+Ensure that adding an HTMLSlotElement with text to an SVGTextElement will
+not create a renderer and we won't crash.
+
+* fast/shadow-dom/text-slot-child-crash-expected.txt: Added.
+* fast/shadow-dom/text-slot-child-crash.svg: Added.
+
 2016-02-16  Simon Fraser  
 
 Add tests for iframe and overflow scrollability after navigating back


Added: trunk/LayoutTests/fast/shadow-dom/text-slot-child-crash-expected.txt (0 => 196669)

--- trunk/LayoutTests/fast/shadow-dom/text-slot-child-crash-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/text-slot-child-crash-expected.txt	2016-02-16 23:59:25 UTC (rev 196669)
@@ -0,0 +1 @@
+PASS


Added: trunk/LayoutTests/fast/shadow-dom/text-slot-child-crash.svg (0 => 196669)

--- trunk/LayoutTests/fast/shadow-dom/text-slot-child-crash.svg	(rev 0)
+++ trunk/LayoutTests/fast/shadow-dom/text-slot-child-crash.svg	2016-02-16 23:59:25 UTC (rev 196669)
@@ -0,0 +1,13 @@
+
+
+PASS
+
+
+if (window.testRunner)
+testRunner.dumpAsText();
+var slotElement = document.createElementNS("http://www.w3.org/1999/xhtml", "slot");
+slotElement.innerHTML = "Some text";
+var parent = document.getElementById("text");
+parent.appendChild(slotElement);
+
+


Modified: trunk/Source/WebCore/ChangeLog (196668 => 196669)

--- trunk/Source/WebCore/ChangeLog	2016-02-16 23:47:06 UTC (rev 196668)
+++ trunk/Source/WebCore/ChangeLog	2016-02-16 23:59:25 UTC (rev 196669)
@@ -1,3 +1,42 @@
+2016-02-16  Said Abou-Hallawa  
+
+REGRESSION (r190430): WTFCrashWithSecurityImplication in:void SVGRootInlineBox::layoutCharactersInTextBoxes()
+https://bugs.webkit.org/show_bug.cgi?id=154185
+
+Reviewed by Ryosuke Niwa.
+
+This is a reg

[webkit-changes] [196670] trunk/Source/WebCore

2016-02-16 Thread said
Title: [196670] trunk/Source/WebCore








Revision 196670
Author s...@apple.com
Date 2016-02-16 16:00:54 -0800 (Tue, 16 Feb 2016)


Log Message
REGRESSION(r196268): WTFCrashWithSecurityImplication on SVG path animation tests
https://bugs.webkit.org/show_bug.cgi?id=154221

Reviewed by Brent Fulgham.

In r196268, a destructor was added to SVGListPropertyTearOff that notifies
its wrapper (the SVGAnimatedListPropertyTearoff) about its deletion. This
allows the wrapper to nullify any references to the wrapped content.

We needed to do the same thing for SVGPathSegListPropertyTearOff. Both
SVGPathSegListPropertyTearOff and SVGListPropertyTearOff inherit from
SVGListProperty and both hold pointers to SVGAnimatedListPropertyTearOff
which needs to be notified.

Tests: exiting svg path animation tests should not crash.

* svg/properties/SVGPathSegListPropertyTearOff.h:
(WebCore::SVGPathSegListPropertyTearOff::~SVGPathSegListPropertyTearOff):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/svg/properties/SVGPathSegListPropertyTearOff.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (196669 => 196670)

--- trunk/Source/WebCore/ChangeLog	2016-02-16 23:59:25 UTC (rev 196669)
+++ trunk/Source/WebCore/ChangeLog	2016-02-17 00:00:54 UTC (rev 196670)
@@ -1,5 +1,26 @@
 2016-02-16  Said Abou-Hallawa  
 
+REGRESSION(r196268): WTFCrashWithSecurityImplication on SVG path animation tests
+https://bugs.webkit.org/show_bug.cgi?id=154221
+
+Reviewed by Brent Fulgham.
+
+In r196268, a destructor was added to SVGListPropertyTearOff that notifies
+its wrapper (the SVGAnimatedListPropertyTearoff) about its deletion. This
+allows the wrapper to nullify any references to the wrapped content.
+
+We needed to do the same thing for SVGPathSegListPropertyTearOff. Both
+SVGPathSegListPropertyTearOff and SVGListPropertyTearOff inherit from
+SVGListProperty and both hold pointers to SVGAnimatedListPropertyTearOff
+which needs to be notified.
+
+Tests: exiting svg path animation tests should not crash.
+
+* svg/properties/SVGPathSegListPropertyTearOff.h:
+(WebCore::SVGPathSegListPropertyTearOff::~SVGPathSegListPropertyTearOff):
+
+2016-02-16  Said Abou-Hallawa  
+
 REGRESSION (r190430): WTFCrashWithSecurityImplication in:void SVGRootInlineBox::layoutCharactersInTextBoxes()
 https://bugs.webkit.org/show_bug.cgi?id=154185
 


Modified: trunk/Source/WebCore/svg/properties/SVGPathSegListPropertyTearOff.h (196669 => 196670)

--- trunk/Source/WebCore/svg/properties/SVGPathSegListPropertyTearOff.h	2016-02-16 23:59:25 UTC (rev 196669)
+++ trunk/Source/WebCore/svg/properties/SVGPathSegListPropertyTearOff.h	2016-02-17 00:00:54 UTC (rev 196670)
@@ -115,6 +115,12 @@
 {
 }
 
+virtual ~SVGPathSegListPropertyTearOff()
+{
+if (m_animatedProperty)
+m_animatedProperty->propertyWillBeDeleted(*this);
+}
+
 SVGPathElement* contextElement() const;
 
 void clearContextAndRoles();






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [197125] trunk/Source/WebCore

2016-02-25 Thread said
Title: [197125] trunk/Source/WebCore








Revision 197125
Author s...@apple.com
Date 2016-02-25 11:55:55 -0800 (Thu, 25 Feb 2016)


Log Message
REGRESSION (r196268): Many assertion failures and crashes on SVG path animation tests when JS garbage collection happens quickly
https://bugs.webkit.org/show_bug.cgi?id=154331

Reviewed by Darin Adler.

This is not an actual regression. The bug did exist before r196268 but
the whole document was leaking once an SVGAnimatedProperty was created
so there was no way to produce this bug. After fixing the leak, one crash
and one assert got uncovered. Both of them happen because of the fact:
"if an SVGAnimatedProperty is not referenced it will be deleted."

* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::lookupOrCreateDWrapper):
The code in this function was assuming that the wrapper will be created
only once which happens when SVGAnimatedProperty::lookupOrCreateWrapper()
is called. Before making this single call, lookupOrCreateDWrapper() was
building an initial SVGPathSegList from byte stream. But now
SVGAnimatedProperty::lookupWrapper() can return false even after creating
the SVGAnimatedProperty because it was deleted later. Calling
buildSVGPathSegListFromByteStream() more than once was causing
SVGAnimatedListPropertyTearOff::animationStarted() to fire the assertion
ASSERT(m_values.size() == m_wrappers.size()) because the path segments were
appended twice to m_values which is in fact SVGPathElement::m_pathSegList.value.
The fix is to build the initial SVGPathSegList only once which should happen
when m_pathSegList.value.isEmpty().

(WebCore::SVGPathElement::animatedPropertyWillBeDeleted):
* svg/SVGPathElement.h:
* svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
(WebCore::SVGAnimatedPathSegListPropertyTearOff::~SVGAnimatedPathSegListPropertyTearOff):
SVGPathElement is assuming the following equivalence relation:
m_pathSegList.shouldSynchronize ~ SVGAnimatedProperty_is_created_and_not_null.
SVGPathElement::animatedPathSegList() and animatedNormalizedPathSegList()
set m_pathSegList.shouldSynchronize to true when SVGAnimatedProperty is
created but nothing sets m_pathSegList.shouldSynchronize back to false.
This was not a problem when the SVGAnimatedProperty was leaking but after
ensuring it is deleted when it is not referenced this equivalence relation
becomes untrue sometimes. This caused SVGPathElement::svgAttributeChanged()
to crash when we check m_pathSegList.shouldSynchronize and if it is true we
assume that SVGAnimatedProperty::lookupWrapper() will return a non-null pointer
and therefore we deference this pointer and call SVGAnimatedProperty::isAnimating().
To fix this crash we need to set m_pathSegList.shouldSynchronize back to false
when the associated SVGAnimatedProperty is deleted.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/svg/SVGPathElement.cpp
trunk/Source/WebCore/svg/SVGPathElement.h
trunk/Source/WebCore/svg/properties/SVGAnimatedPathSegListPropertyTearOff.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (197124 => 197125)

--- trunk/Source/WebCore/ChangeLog	2016-02-25 19:36:52 UTC (rev 197124)
+++ trunk/Source/WebCore/ChangeLog	2016-02-25 19:55:55 UTC (rev 197125)
@@ -1,3 +1,49 @@
+2016-02-25  Said Abou-Hallawa  
+
+REGRESSION (r196268): Many assertion failures and crashes on SVG path animation tests when JS garbage collection happens quickly
+https://bugs.webkit.org/show_bug.cgi?id=154331
+
+Reviewed by Darin Adler.
+
+This is not an actual regression. The bug did exist before r196268 but
+the whole document was leaking once an SVGAnimatedProperty was created
+so there was no way to produce this bug. After fixing the leak, one crash
+and one assert got uncovered. Both of them happen because of the fact:
+"if an SVGAnimatedProperty is not referenced it will be deleted."
+
+* svg/SVGPathElement.cpp:
+(WebCore::SVGPathElement::lookupOrCreateDWrapper):
+The code in this function was assuming that the wrapper will be created
+only once which happens when SVGAnimatedProperty::lookupOrCreateWrapper()
+is called. Before making this single call, lookupOrCreateDWrapper() was
+building an initial SVGPathSegList from byte stream. But now
+SVGAnimatedProperty::lookupWrapper() can return false even after creating
+the SVGAnimatedProperty because it was deleted later. Calling
+buildSVGPathSegListFromByteStream() more than once was causing
+SVGAnimatedListPropertyTearOff::animationStarted() to fire the assertion
+ASSERT(m_values.size() == m_wrappers.size()) because the path segments were
+appended twice to m_values which is in fact SVGPathElement::m_pathSegList.value.
+The fix is to build the initial SVGPathSegList only once which should happen
+when m_pathSegList.value.isEmpty().
+
+(

[webkit-changes] [222304] trunk

2017-09-20 Thread said
Title: [222304] trunk








Revision 222304
Author s...@apple.com
Date 2017-09-20 17:35:41 -0700 (Wed, 20 Sep 2017)


Log Message
REGRESSION(r191731): SVGPatternElement can only reference another SVGPatternElement in the same SVG document
https://bugs.webkit.org/show_bug.cgi?id=176221

Reviewed by Tim Horton.

Source/WebCore:

According to the specs:

https://www.w3.org/TR/SVG11/filters.html#FilterElementHrefAttribute
https://www.w3.org/TR/SVG11/pservers.html#LinearGradientElementHrefAttribute
https://www.w3.org/TR/SVG11/pservers.html#RadialGradientElementHrefAttribute
https://www.w3.org/TR/SVG11/pservers.html#PatternElementHrefAttribute

The xlink:href attribute of the SVG filter, gradient and pattern elements
must reference another element within the current SVG of the same type.

In r191731, the code of SVGPatternElement::collectPatternAttributes() was
removed and replaced by RenderSVGResourcePattern::collectPatternAttributes()
to avoid cyclic reference in the pattern element. The problem is the old
code used to check whether the referenced element is
before casting it. This code was not copied to the new function. So we
now allow the SVGPatternElement to reference any SVG resource element.

To fix this issue, we need to prevent SVGResources from chaining an incorrect
type of element to the SVG filter, gradient and pattern elements.

We also need to use the SVGResources for getting the referenced element
when collecting the attributes for the gradient elements. SVGResources solves
the cyclic referencing issue so there is no need to repeat the same code
in many places. Also, from now on the SVGResources will have valid linked
resource only. So casting the referenced element should always be valid.

Tests: svg/custom/pattern-invalid-content-inheritance.svg

* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::collectPatternAttributes const): Asserts
the linkedResource is of type RenderSVGResourcePattern.
* rendering/svg/SVGResources.cpp:
(WebCore::SVGResources::SVGResources):
(WebCore::isChainableResource): Ensure that an SVG resource can reference
only an SVG resource with the valid type.
(WebCore::SVGResources::buildCachedResources):
* rendering/svg/SVGResources.h:

LayoutTests:

* svg/custom/pattern-invalid-content-inheritance-expected.svg: Added.
* svg/custom/pattern-invalid-content-inheritance.svg: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp
trunk/Source/WebCore/rendering/svg/SVGResources.cpp
trunk/Source/WebCore/rendering/svg/SVGResources.h


Added Paths

trunk/LayoutTests/svg/custom/pattern-invalid-content-inheritance-expected.svg
trunk/LayoutTests/svg/custom/pattern-invalid-content-inheritance.svg




Diff

Modified: trunk/LayoutTests/ChangeLog (222303 => 222304)

--- trunk/LayoutTests/ChangeLog	2017-09-21 00:30:17 UTC (rev 222303)
+++ trunk/LayoutTests/ChangeLog	2017-09-21 00:35:41 UTC (rev 222304)
@@ -1,3 +1,13 @@
+2017-09-20  Said Abou-Hallawa  
+
+REGRESSION(r191731): SVGPatternElement can only reference another SVGPatternElement in the same SVG document
+https://bugs.webkit.org/show_bug.cgi?id=176221
+
+Reviewed by Tim Horton.
+
+* svg/custom/pattern-invalid-content-inheritance-expected.svg: Added.
+* svg/custom/pattern-invalid-content-inheritance.svg: Added.
+
 2017-09-20  Per Arne Vollan  
 
 Mark transitions/transition-display-property.html as flaky on Windows.


Added: trunk/LayoutTests/svg/custom/pattern-invalid-content-inheritance-expected.svg (0 => 222304)

--- trunk/LayoutTests/svg/custom/pattern-invalid-content-inheritance-expected.svg	(rev 0)
+++ trunk/LayoutTests/svg/custom/pattern-invalid-content-inheritance-expected.svg	2017-09-21 00:35:41 UTC (rev 222304)
@@ -0,0 +1,3 @@
+
+
+


Added: trunk/LayoutTests/svg/custom/pattern-invalid-content-inheritance.svg (0 => 222304)

--- trunk/LayoutTests/svg/custom/pattern-invalid-content-inheritance.svg	(rev 0)
+++ trunk/LayoutTests/svg/custom/pattern-invalid-content-inheritance.svg	2017-09-21 00:35:41 UTC (rev 222304)
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+


Modified: trunk/Source/WebCore/ChangeLog (222303 => 222304)

--- trunk/Source/WebCore/ChangeLog	2017-09-21 00:30:17 UTC (rev 222303)
+++ trunk/Source/WebCore/ChangeLog	2017-09-21 00:35:41 UTC (rev 222304)
@@ -1,3 +1,48 @@
+2017-09-20  Said Abou-Hallawa  
+
+REGRESSION(r191731): SVGPatternElement can only reference another SVGPatternElement in the same SVG document
+https://bugs.webkit.org/show_bug.cgi?id=176221
+
+Reviewed by Tim Horton.
+
+According to the specs:
+
+https://www.w3.org/TR/SVG11/filters.html#FilterElementHrefAttribute
+https://www.w3.org/TR/SVG11/pservers.html#LinearGradientElementHrefAttribute
+https://www.w3.org/TR/SVG11/pservers.html#RadialGradientElementH

[webkit-changes] [219125] trunk/Source/WebCore

2017-07-04 Thread said
Title: [219125] trunk/Source/WebCore








Revision 219125
Author s...@apple.com
Date 2017-07-04 21:44:26 -0700 (Tue, 04 Jul 2017)


Log Message
Unreviewed, review follow-up after r218961

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::updateFromSettings):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/BitmapImage.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (219124 => 219125)

--- trunk/Source/WebCore/ChangeLog	2017-07-05 00:59:11 UTC (rev 219124)
+++ trunk/Source/WebCore/ChangeLog	2017-07-05 04:44:26 UTC (rev 219125)
@@ -1,3 +1,10 @@
+2017-07-04  Said Abou-Hallawa  
+
+Unreviewed, review follow-up after r218961
+
+* platform/graphics/BitmapImage.cpp:
+(WebCore::BitmapImage::updateFromSettings):
+
 2017-07-04  Antti Koivisto  
 
 RenderThemeCocoa::mediaControlsFormattedStringForDuration is leaking NSDateComponentsFormatters


Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.cpp (219124 => 219125)

--- trunk/Source/WebCore/platform/graphics/BitmapImage.cpp	2017-07-05 00:59:11 UTC (rev 219124)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.cpp	2017-07-05 04:44:26 UTC (rev 219125)
@@ -70,7 +70,9 @@
 {
 m_allowSubsampling = settings.imageSubsamplingEnabled();
 #if PLATFORM(IOS)
-if (!IOSApplication::isIBooks())
+if (IOSApplication::isIBooks())
+m_allowLargeImageAsyncDecoding = false;
+else
 #endif
 m_allowLargeImageAsyncDecoding = settings.largeImageAsyncDecodingEnabled();
 m_allowAnimatedImageAsyncDecoding = settings.animatedImageAsyncDecodingEnabled();






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [197967] trunk/Source/WebCore

2016-03-10 Thread said
Title: [197967] trunk/Source/WebCore








Revision 197967
Author s...@apple.com
Date 2016-03-10 16:32:51 -0800 (Thu, 10 Mar 2016)


Log Message
REGRESSION: GuardMallloc crash in SVGListPropertyTearOff::processIncomingListItemWrapper
https://bugs.webkit.org/show_bug.cgi?id=154969

Patch by Said Abou-Hallawa  on 2016-03-10
Reviewed by Darin Adler.

The life cycle of the SVGAnimatedPropertyTearOff::m_baseVal and m_animVal
was not correct. Like what was done in SVGAnimatedListPropertyTearOff,
m_baseVal and m_animVal have to be raw RefCounted pointers. When requested
through, SVGAnimatedPropertyTearOff::baseVal() and animVal() they are
encapsulated in a RefPtr to ensure they existence as long as they are
referenced. When the animated property object (which is stored in either
m_baseVal or m_animVal) is not referenced by anyone, it is going to be
deleted. In the destructor of their class, SVGAnimatedPropertyTearOff
will be notified of this deletion through propertyWillBeDeleted() to clean
its member m_baseVal or m_animVal.

* bindings/scripts/CodeGeneratorJS.pm:
(NativeToJSValue): Now all the SVG animated property return RefPtrs. In
addition to that, SVGViewSpec.transform also returns
RefPtr.

* svg/properties/SVGAnimatedListPropertyTearOff.h:
(WebCore::SVGAnimatedListPropertyTearOff::animVal):
(WebCore::SVGAnimatedListPropertyTearOff::currentAnimatedValue):
(WebCore::SVGAnimatedListPropertyTearOff::animationStarted):
(WebCore::SVGAnimatedListPropertyTearOff::animationEnded):
(WebCore::SVGAnimatedListPropertyTearOff::synchronizeWrappersIfNeeded):
(WebCore::SVGAnimatedListPropertyTearOff::isAnimating):
(WebCore::SVGAnimatedListPropertyTearOff::propertyWillBeDeleted):
Change propertyWillBeDeleted() to be virtual and make it takes an SVGProperty*.
Rename m_animatingAnimVal to be m_animatedProperty. Add isAnimating() which
returns true if m_animatedProperty is not null. Use isAnimating() instead of
m_isAnimating because it's deleted from the base class.

* svg/properties/SVGAnimatedProperty.cpp:
(WebCore::SVGAnimatedProperty::SVGAnimatedProperty):
(WebCore::SVGAnimatedProperty::~SVGAnimatedProperty):
* svg/properties/SVGAnimatedProperty.h:
(WebCore::SVGAnimatedProperty::isAnimating):
(WebCore::SVGAnimatedProperty::propertyWillBeDeleted):
Delete m_isAnimating since its value can be deduced from the value of
m_animatedProperty in the derived class. Add propertyWillBeDeleted() and
isAnimating() as virtual functions with the default behavior.

* svg/properties/SVGAnimatedPropertyTearOff.h:
(WebCore::SVGAnimatedPropertyTearOff::baseVal):
(WebCore::SVGAnimatedPropertyTearOff::animVal):
Like SVGAnimatedListPropertyTearOff::baseVal() and animVal() create the
value if it does not exist. Keep a raw RefCounted pointer but return a
RefPtr.

(WebCore::SVGAnimatedPropertyTearOff::isAnimating):
(WebCore::SVGAnimatedPropertyTearOff::propertyWillBeDeleted):
Override virtual functions.

(WebCore::SVGAnimatedPropertyTearOff::currentAnimatedValue):
(WebCore::SVGAnimatedPropertyTearOff::animationStarted):
(WebCore::SVGAnimatedPropertyTearOff::animationEnded):
(WebCore::SVGAnimatedPropertyTearOff::animValWillChange):
(WebCore::SVGAnimatedPropertyTearOff::animValDidChange):
Replace m_isAnimating with isAnimating(). Ensure that we get a new animated
property through animVal() and store it in a RefPtr to ensure it will not
go away while animating.

* svg/properties/SVGAnimatedStaticPropertyTearOff.h:
(WebCore::SVGAnimatedStaticPropertyTearOff::isAnimating):
(WebCore::SVGAnimatedStaticPropertyTearOff::currentAnimatedValue):
(WebCore::SVGAnimatedStaticPropertyTearOff::animationStarted):
(WebCore::SVGAnimatedStaticPropertyTearOff::animationEnded):
(WebCore::SVGAnimatedStaticPropertyTearOff::animValWillChange):
(WebCore::SVGAnimatedStaticPropertyTearOff::animValDidChange):
Add isAnimating() and replace all the instances of m_isAnimating with calls
to isAnimating().

* svg/properties/SVGPropertyTearOff.h:
(WebCore::SVGPropertyTearOff::animatedProperty):
(WebCore::SVGPropertyTearOff::setAnimatedProperty):
(WebCore::SVGPropertyTearOff::contextElement):
(WebCore::SVGPropertyTearOff::SVGPropertyTearOff):
(WebCore::SVGPropertyTearOff::~SVGPropertyTearOff):
SVGPropertyTearOff is what SVGAnimatedPropertyTearOff creates for its
baseVal() and animVal() values. These values can be null anytime once
they are not referenced. The SVGAnimatedPropertyTearOff holds only raw
RefCounted pointer for them. So (1) SVGPropertyTearOff needs to hold a
RefPtr for its SVGAnimatedProperty and (2) it needs to notify its
SVGAnimatedProperty when it's deleted by calling propertyWillBeDeleted()
from the destructor. Also there is no need to get the contextElement()
and save it in class member, m_contextElement since it can be always be
retrieved from SVGAnimatedProperty::contextElement().

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
trunk/Source/WebCore/svg/properties/SVGAnimatedListPropertyTearOff.h
tr

[webkit-changes] [199243] trunk/Source/WebCore

2016-04-08 Thread said
Title: [199243] trunk/Source/WebCore








Revision 199243
Author s...@apple.com
Date 2016-04-08 13:07:51 -0700 (Fri, 08 Apr 2016)


Log Message
Timing attack on SVG feComposite filter circumvents same-origin policy
https://bugs.webkit.org/show_bug.cgi?id=154338

Patch by Said Abou-Hallawa  on 2016-04-08
Reviewed by Oliver Hunt.

Ensure the FEComposite arithmetic filter is clamping the resulted color
components in a constant time.

* platform/graphics/filters/FEComposite.cpp:
(WebCore::clampByte):
(WebCore::computeArithmeticPixels):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/filters/FEComposite.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (199242 => 199243)

--- trunk/Source/WebCore/ChangeLog	2016-04-08 19:59:25 UTC (rev 199242)
+++ trunk/Source/WebCore/ChangeLog	2016-04-08 20:07:51 UTC (rev 199243)
@@ -1,3 +1,17 @@
+2016-04-08  Said Abou-Hallawa  
+
+Timing attack on SVG feComposite filter circumvents same-origin policy
+https://bugs.webkit.org/show_bug.cgi?id=154338
+
+Reviewed by Oliver Hunt.
+
+Ensure the FEComposite arithmetic filter is clamping the resulted color
+components in a constant time.
+
+* platform/graphics/filters/FEComposite.cpp:
+(WebCore::clampByte):
+(WebCore::computeArithmeticPixels):
+
 2016-04-08  Brian Burg  
 
 Web Inspector: get rid of InspectorBasicValue and InspectorString subclasses


Modified: trunk/Source/WebCore/platform/graphics/filters/FEComposite.cpp (199242 => 199243)

--- trunk/Source/WebCore/platform/graphics/filters/FEComposite.cpp	2016-04-08 19:59:25 UTC (rev 199242)
+++ trunk/Source/WebCore/platform/graphics/filters/FEComposite.cpp	2016-04-08 20:07:51 UTC (rev 199243)
@@ -120,6 +120,13 @@
 
 forceValidPreMultipliedPixels();
 }
+
+static unsigned char clampByte(int c)
+{
+unsigned char buff[] = { static_cast(c), 255, 0 };
+unsigned uc = static_cast(c);
+return buff[!!(uc & ~0xff) + !!(uc & ~(~0u >> 1))];
+}
 
 template 
 static inline void computeArithmeticPixels(unsigned char* source, unsigned char* destination, int pixelArrayLength,
@@ -141,12 +148,7 @@
 if (b4)
 result += scaledK4;
 
-if (result <= 0)
-*destination = 0;
-else if (result >= 255)
-*destination = 255;
-else
-*destination = result;
+*destination = clampByte(result);
 ++source;
 ++destination;
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [207471] trunk

2016-10-18 Thread said
Title: [207471] trunk








Revision 207471
Author s...@apple.com
Date 2016-10-18 10:41:14 -0700 (Tue, 18 Oct 2016)


Log Message
SVGCSSParser: m_implicitShorthand value is not reset after adding the shorthand property
https://bugs.webkit.org/show_bug.cgi?id=116470

Reviewed by Simon Fraser.

Source/WebCore:

When we encounter a shorthand css property, we set m_implicitShorthand
to true to tell addProperty() later that the individual properties are
all set through a short hand one. We need to make sure that setting 
m_implicitShorthand to true will not be leaked after finishing parsing
the short hand property.

Test: fast/css/implicit-property-restore.html

* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFillShorthand):
(WebCore::CSSParser::parseShorthand):
(WebCore::CSSParser::parse4Values):
(WebCore::CSSParser::parseBorderRadius):
(WTF::ImplicitScope::ImplicitScope): Deleted.
(WTF::ImplicitScope::~ImplicitScope): Deleted.
Get rid of ImplicitScope and replace its calls by TemporaryChange.

* css/parser/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGValue):
Restore m_implicitShorthand value after setting it temporarily to true.

Source/WTF:

* wtf/TemporaryChange.h:
(WTF::TemporaryChange::TemporaryChange):
Add a new constructor to make TemporaryChange work as a restorer. The
temporary change will happen after we construct the object.

LayoutTests:

* fast/css/implicit-property-restore-expected.txt: Added.
* fast/css/implicit-property-restore.html: Added.

* fast/css/remove-shorthand-expected.txt:
Rebase-line the test expected results because of fixing the leak of
m_implicitShorthand. The bug was happening because "background: ..." property
comes immediately before the "list-style: " property.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/css/remove-shorthand-expected.txt
trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/TemporaryChange.h
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/parser/CSSParser.cpp
trunk/Source/WebCore/css/parser/SVGCSSParser.cpp


Added Paths

trunk/LayoutTests/fast/css/implicit-property-restore-expected.txt
trunk/LayoutTests/fast/css/implicit-property-restore.html




Diff

Modified: trunk/LayoutTests/ChangeLog (207470 => 207471)

--- trunk/LayoutTests/ChangeLog	2016-10-18 17:39:47 UTC (rev 207470)
+++ trunk/LayoutTests/ChangeLog	2016-10-18 17:41:14 UTC (rev 207471)
@@ -1,3 +1,18 @@
+2016-10-18  Said Abou-Hallawa  
+
+SVGCSSParser: m_implicitShorthand value is not reset after adding the shorthand property
+https://bugs.webkit.org/show_bug.cgi?id=116470
+
+Reviewed by Simon Fraser.
+
+* fast/css/implicit-property-restore-expected.txt: Added.
+* fast/css/implicit-property-restore.html: Added.
+
+* fast/css/remove-shorthand-expected.txt:
+Rebase-line the test expected results because of fixing the leak of
+m_implicitShorthand. The bug was happening because "background: ..." property
+comes immediately before the "list-style: " property.
+
 2016-10-18  Ryan Haddad  
 
 Marking inspector/debugger/breakpoint-action-eval.html as a flaky timeout on mac-wk2.


Added: trunk/LayoutTests/fast/css/implicit-property-restore-expected.txt (0 => 207471)

--- trunk/LayoutTests/fast/css/implicit-property-restore-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/css/implicit-property-restore-expected.txt	2016-10-18 17:41:14 UTC (rev 207471)
@@ -0,0 +1,12 @@
+This test verifies the property implicit flag is reset after adding any css property.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS element1.style.isPropertyImplicit('padding-top') is false
+PASS removedProperties.length is 1
+PASS removedProperties[0] is "list-style"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/fast/css/implicit-property-restore.html (0 => 207471)

--- trunk/LayoutTests/fast/css/implicit-property-restore.html	(rev 0)
+++ trunk/LayoutTests/fast/css/implicit-property-restore.html	2016-10-18 17:41:14 UTC (rev 207471)
@@ -0,0 +1,33 @@
+
+
+
+
+<body>
+<div id="element-1" style="background:url() 100% 100% repeat-y; padding-top: 0px;"></div>
+<div id="element-2" style="background:url() 100% 100% repeat-y; list-style:square outside url();"></div>
+<script>
+description("This test verifies the property implicit flag is reset after adding any css property.");
+
+var element1 = document.getElementById("element-1");
+var element2 = document.getElementById("element-2");
+
+shouldBe("element1.style.isPropertyImplicit('padding-top')", "false");
+
+va

[webkit-changes] [208156] trunk/Tools

2016-10-31 Thread said
Title: [208156] trunk/Tools








Revision 208156
Author s...@apple.com
Date 2016-10-31 10:07:39 -0700 (Mon, 31 Oct 2016)


Log Message
Unreviewed, change my status to be a WebKit reviewer

* Scripts/webkitpy/common/config/contributors.json:

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitpy/common/config/contributors.json




Diff

Modified: trunk/Tools/ChangeLog (208155 => 208156)

--- trunk/Tools/ChangeLog	2016-10-31 16:58:47 UTC (rev 208155)
+++ trunk/Tools/ChangeLog	2016-10-31 17:07:39 UTC (rev 208156)
@@ -1,3 +1,9 @@
+2016-10-31  Said Abou-Hallawa  
+
+Unreviewed, change my status to be a WebKit reviewer
+
+* Scripts/webkitpy/common/config/contributors.json:
+
 2016-10-31  Carlos Garcia Campos  
 
 NetworkSession: Network process crash when converting main resource to download


Modified: trunk/Tools/Scripts/webkitpy/common/config/contributors.json (208155 => 208156)

--- trunk/Tools/Scripts/webkitpy/common/config/contributors.json	2016-10-31 16:58:47 UTC (rev 208155)
+++ trunk/Tools/Scripts/webkitpy/common/config/contributors.json	2016-10-31 17:07:39 UTC (rev 208156)
@@ -4779,10 +4779,11 @@
  "sabouhall...@apple.com",
  "s...@apple.com"
   ],
+  "expertise" : "SVG/Graphics, Image Decoders",
   "nicks" : [
  "sabouhallawa"
   ],
-  "status" : "committer"
+  "status" : "reviewer"
},
"Sam Weinig" : {
   "emails" : [






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [215804] trunk/Source/WebCore

2017-04-26 Thread said
Title: [215804] trunk/Source/WebCore








Revision 215804
Author s...@apple.com
Date 2017-04-26 09:24:34 -0700 (Wed, 26 Apr 2017)


Log Message
Attempt to fix a PLT regression.

Unreviewed.

Disable async decoding for large images till the flickering bug wk170640
is fixed.

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::shouldUseAsyncDecodingForLargeImages):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/BitmapImage.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (215803 => 215804)

--- trunk/Source/WebCore/ChangeLog	2017-04-26 16:13:02 UTC (rev 215803)
+++ trunk/Source/WebCore/ChangeLog	2017-04-26 16:24:34 UTC (rev 215804)
@@ -1,3 +1,15 @@
+2017-04-26  Said Abou-Hallawa  
+
+Attempt to fix a PLT regression.
+
+Unreviewed.
+
+Disable async decoding for large images till the flickering bug wk170640
+is fixed.
+
+* platform/graphics/BitmapImage.cpp:
+(WebCore::BitmapImage::shouldUseAsyncDecodingForLargeImages):
+
 2017-04-26  Ryan Haddad  
 
 Unreviewed, rolling out r215767.


Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.cpp (215803 => 215804)

--- trunk/Source/WebCore/platform/graphics/BitmapImage.cpp	2017-04-26 16:13:02 UTC (rev 215803)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.cpp	2017-04-26 16:24:34 UTC (rev 215804)
@@ -273,7 +273,9 @@
 
 bool BitmapImage::shouldUseAsyncDecodingForLargeImages()
 {
-return !canAnimate() && allowLargeImageAsyncDecoding() && m_source.shouldUseAsyncDecoding();
+// FIXME: enable async image decoding after the flickering bug wk170640 is fixed.
+// return !canAnimate() && allowLargeImageAsyncDecoding() && m_source.shouldUseAsyncDecoding();
+return false;
 }
 
 bool BitmapImage::shouldUseAsyncDecodingForAnimatedImages()






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [215851] trunk/Source/WebCore

2017-04-26 Thread said
Title: [215851] trunk/Source/WebCore








Revision 215851
Author s...@apple.com
Date 2017-04-26 18:26:08 -0700 (Wed, 26 Apr 2017)


Log Message
Attempt to fix a PLT regression.


Unreviewed.

Disable passing the TypeIdentifierHint to CGImageSourceCreateIncremental()
on iOS for now.

* platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::ImageDecoder::ImageDecoder):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (215850 => 215851)

--- trunk/Source/WebCore/ChangeLog	2017-04-27 01:17:01 UTC (rev 215850)
+++ trunk/Source/WebCore/ChangeLog	2017-04-27 01:26:08 UTC (rev 215851)
@@ -1,3 +1,16 @@
+2017-04-26  Said Abou-Hallawa  
+
+Attempt to fix a PLT regression.
+
+
+Unreviewed.
+
+Disable passing the TypeIdentifierHint to CGImageSourceCreateIncremental()
+on iOS for now.
+
+* platform/graphics/cg/ImageDecoderCG.cpp:
+(WebCore::ImageDecoder::ImageDecoder):
+
 2017-04-26  Joanmarie Diggs  
 
 [ATK] ARIA buttons which have a popup should be ATK_ROLE_PUSH_BUTTON; not ATK_ROLE_COMBO_BOX
@@ -492,7 +505,8 @@
 
 2017-04-26  Said Abou-Hallawa  
 
-Attempt to fix a PLT regression.
+Attempt to fix a JetStream regression.
+
 
 Unreviewed.
 


Modified: trunk/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp (215850 => 215851)

--- trunk/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp	2017-04-27 01:17:01 UTC (rev 215850)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp	2017-04-27 01:26:08 UTC (rev 215851)
@@ -154,7 +154,7 @@
 
 ImageDecoder::ImageDecoder(const URL& sourceURL, AlphaOption, GammaAndColorProfileOption)
 {
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 11)
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300)
 RetainPtr url = ""
 RetainPtr utiHint = adoptCF(CGImageSourceGetTypeWithURL(url.get(), nullptr));
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [215905] trunk/Source/WebCore

2017-04-27 Thread said
Title: [215905] trunk/Source/WebCore








Revision 215905
Author s...@apple.com
Date 2017-04-27 16:36:45 -0700 (Thu, 27 Apr 2017)


Log Message
Attempt to fix a PLT regression on Mac


Unreviewed.

Disable passing the TypeIdentifierHint to CGImageSourceCreateIncremental()
on Mac for now.

* platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::ImageDecoder::ImageDecoder):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (215904 => 215905)

--- trunk/Source/WebCore/ChangeLog	2017-04-27 23:24:58 UTC (rev 215904)
+++ trunk/Source/WebCore/ChangeLog	2017-04-27 23:36:45 UTC (rev 215905)
@@ -1,3 +1,16 @@
+2017-04-27  Said Abou-Hallawa  
+
+Attempt to fix a PLT regression on Mac
+
+
+Unreviewed.
+
+Disable passing the TypeIdentifierHint to CGImageSourceCreateIncremental()
+on Mac for now.
+
+* platform/graphics/cg/ImageDecoderCG.cpp:
+(WebCore::ImageDecoder::ImageDecoder):
+
 2017-04-27  Daniel Bates  
 
 Rename callerDOMWindow()/CallerDocument to incumbentDOMWindow()/IncumbentDocument


Modified: trunk/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp (215904 => 215905)

--- trunk/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp	2017-04-27 23:24:58 UTC (rev 215904)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp	2017-04-27 23:36:45 UTC (rev 215905)
@@ -154,7 +154,7 @@
 
 ImageDecoder::ImageDecoder(const URL& sourceURL, AlphaOption, GammaAndColorProfileOption)
 {
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300)
+#if 0
 RetainPtr url = ""
 RetainPtr utiHint = adoptCF(CGImageSourceGetTypeWithURL(url.get(), nullptr));
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [216192] trunk/LayoutTests

2017-05-04 Thread said
Title: [216192] trunk/LayoutTests








Revision 216192
Author s...@apple.com
Date 2017-05-04 10:44:44 -0700 (Thu, 04 May 2017)


Log Message
Unreviewed: Replace Windows line ending (CRLF) by Unix line ending (CR).

* compositing/video/video-with-invalid-source.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/compositing/video/video-with-invalid-source.html




Diff

Modified: trunk/LayoutTests/ChangeLog (216191 => 216192)

--- trunk/LayoutTests/ChangeLog	2017-05-04 17:19:24 UTC (rev 216191)
+++ trunk/LayoutTests/ChangeLog	2017-05-04 17:44:44 UTC (rev 216192)
@@ -1,3 +1,9 @@
+2017-05-04  Said Abou-Hallawa  
+
+Unreviewed: Replace Windows line ending (CRLF) by Unix line ending (CR).
+
+* compositing/video/video-with-invalid-source.html:
+
 2017-05-04  Ryan Haddad  
 
 Skip media/modern-media-controls/pip-support/pip-support-click.html on mac-wk1.


Modified: trunk/LayoutTests/compositing/video/video-with-invalid-source.html (216191 => 216192)

--- trunk/LayoutTests/compositing/video/video-with-invalid-source.html	2017-05-04 17:19:24 UTC (rev 216191)
+++ trunk/LayoutTests/compositing/video/video-with-invalid-source.html	2017-05-04 17:44:44 UTC (rev 216192)
@@ -1,25 +1,25 @@
-
-
-if (window.testRunner) {
-testRunner.waitUntilDone();
-testRunner.dumpAsText();
-}
-
-function test() {
-var v = document.createElement("video");
-document.body.appendChild(v);
-var src = ""
-src.src = ""
-v.appendChild(src);
-src.addEventListener("error", function() {
-   if (window.testRunner) {
-testRunner.display();
-// If we didn't crash here, yay!  Test is a success
-document.body.appendChild(document.createTextNode("PASS"));
-testRunner.notifyDone();
-}
-}, false);
-}
-
-
-
+
+
+if (window.testRunner) {
+testRunner.waitUntilDone();
+testRunner.dumpAsText();
+}
+
+function test() {
+var v = document.createElement("video");
+document.body.appendChild(v);
+var src = ""
+src.src = ""
+v.appendChild(src);
+src.addEventListener("error", function() {
+if (window.testRunner) {
+testRunner.display();
+// If we didn't crash here, yay!  Test is a success
+document.body.appendChild(document.createTextNode("PASS"));
+testRunner.notifyDone();
+}
+}, false);
+}
+
+
+






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [216194] trunk/LayoutTests

2017-05-04 Thread said
Title: [216194] trunk/LayoutTests








Revision 216194
Author s...@apple.com
Date 2017-05-04 11:02:46 -0700 (Thu, 04 May 2017)


Log Message
Unreviewed: Replace Windows line ending (CRLF) by Unix line ending (CR).

* plugins/windowless_plugin_paint_test.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/plugins/windowless_plugin_paint_test.html




Diff

Modified: trunk/LayoutTests/ChangeLog (216193 => 216194)

--- trunk/LayoutTests/ChangeLog	2017-05-04 17:46:59 UTC (rev 216193)
+++ trunk/LayoutTests/ChangeLog	2017-05-04 18:02:46 UTC (rev 216194)
@@ -2,6 +2,12 @@
 
 Unreviewed: Replace Windows line ending (CRLF) by Unix line ending (CR).
 
+* plugins/windowless_plugin_paint_test.html:
+
+2017-05-04  Said Abou-Hallawa  
+
+Unreviewed: Replace Windows line ending (CRLF) by Unix line ending (CR).
+
 * compositing/video/video-with-invalid-source.html:
 
 2017-05-04  Ryan Haddad  


Modified: trunk/LayoutTests/plugins/windowless_plugin_paint_test.html (216193 => 216194)

--- trunk/LayoutTests/plugins/windowless_plugin_paint_test.html	2017-05-04 17:46:59 UTC (rev 216193)
+++ trunk/LayoutTests/plugins/windowless_plugin_paint_test.html	2017-05-04 18:02:46 UTC (rev 216194)
@@ -1,41 +1,40 @@
 
-
 
-
-  
-if (window.testRunner) {
-testRunner.dumpAsText();
-testRunner.waitUntilDone();
-}
</del><ins>+<head>
+<script>
+if (window.testRunner) {
+testRunner.dumpAsText();
+testRunner.waitUntilDone();
+}
</ins><span class="cx"> 
</span><del>-var paintCount = 0;
-
-function onLoad() {
-var pluginDiv = document.getElementById("pluginDiv");
-// Create the plugin in the middle of the page.
-pluginDiv.innerHTML = "<embed id=\"testPlugin\" type=\"application/x-webkit-test-netscape\" width=\"200\" height=\"200\" _onpaintevent_=\"didPaint()\" windowedPlugin=\"false\"></embed>";
-if (window.internals)
-internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
-testRunner.displayInvalidatedRegion();
-  }
-
-function notifyDone() {
-document.getElementById('result').innerHTML = "SUCCESS";
-testRunner.notifyDone();
-}
-  
-function didPaint() {
-paintCount++;
-setTimeout("notifyDone();", 50);
-}
-  
-
-
-  This tests that dynamically added windowless plugins receive paint events on creation.
+var paintCount = 0;
 
-  FAILURE
+function onLoad() {
+var pluginDiv = document.getElementById("pluginDiv");
+// Create the plugin in the middle of the page.
+pluginDiv.innerHTML = "";
+if (window.internals)
+internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
+testRunner.displayInvalidatedRegion();
+}
 
-  
-  
-
+function notifyDone() {
+document.getElementById('result').innerHTML = "SUCCESS";
+testRunner.notifyDone();
+}
+
+function didPaint() {
+paintCount++;
+setTimeout("notifyDone();", 50);
+}
+
+
+
+This tests that dynamically added windowless plugins receive paint events on creation.
+
+FAILURE
+
+
+
+
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [216273] trunk/Source/WebCore

2017-05-05 Thread said
Title: [216273] trunk/Source/WebCore








Revision 216273
Author s...@apple.com
Date 2017-05-05 14:35:54 -0700 (Fri, 05 May 2017)


Log Message
Crash in ImageFrameCache::decodedSizeChanged() after image load cancellation
https://bugs.webkit.org/show_bug.cgi?id=171736

Reviewed by Tim Horton.

Tests: Covered by run-webkit-tests fast/images/image-formats-support.html
--guard-malloc.

Because an image format is not supported, the ImageObserver of the Image
is deleted then the Image itself is deleted. In BitmapImage destructor,
we make a call which ends up accessing the deleted ImageObserver.

To fix this, we need to setImageObsever of the Image to-be-deleted to 
nullptr. So the Image can avoid accessing its ImageObserver, while it is
being deleted. Also we can change the BitImage destructor to avoid calling 
ImageFrameCache::decodedSizeChanged() since it is not really needed.

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::clearImage):
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::~BitmapImage):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/cache/CachedImage.cpp
trunk/Source/WebCore/platform/graphics/BitmapImage.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (216272 => 216273)

--- trunk/Source/WebCore/ChangeLog	2017-05-05 21:15:51 UTC (rev 216272)
+++ trunk/Source/WebCore/ChangeLog	2017-05-05 21:35:54 UTC (rev 216273)
@@ -1,3 +1,27 @@
+2017-05-05  Said Abou-Hallawa  
+
+Crash in ImageFrameCache::decodedSizeChanged() after image load cancellation
+https://bugs.webkit.org/show_bug.cgi?id=171736
+
+Reviewed by Tim Horton.
+
+Tests: Covered by run-webkit-tests fast/images/image-formats-support.html
+--guard-malloc.
+
+Because an image format is not supported, the ImageObserver of the Image
+is deleted then the Image itself is deleted. In BitmapImage destructor,
+we make a call which ends up accessing the deleted ImageObserver.
+
+To fix this, we need to setImageObsever of the Image to-be-deleted to 
+nullptr. So the Image can avoid accessing its ImageObserver, while it is
+being deleted. Also we can change the BitImage destructor to avoid calling 
+ImageFrameCache::decodedSizeChanged() since it is not really needed.
+
+* loader/cache/CachedImage.cpp:
+(WebCore::CachedImage::clearImage):
+* platform/graphics/BitmapImage.cpp:
+(WebCore::BitmapImage::~BitmapImage):
+
 2017-05-05  Brian Burg  
 
 CrashTracer: [USER] com.apple.WebKit.WebContent.Development at com.apple.WebCore: WebCore::commonVMSlow + 57


Modified: trunk/Source/WebCore/loader/cache/CachedImage.cpp (216272 => 216273)

--- trunk/Source/WebCore/loader/cache/CachedImage.cpp	2017-05-05 21:15:51 UTC (rev 216272)
+++ trunk/Source/WebCore/loader/cache/CachedImage.cpp	2017-05-05 21:35:54 UTC (rev 216273)
@@ -360,7 +360,10 @@
 m_imageObserver->remove(*this);
 m_imageObserver = nullptr;
 }
-m_image = nullptr;
+if (m_image) {
+m_image->setImageObserver(nullptr);
+m_image = nullptr;
+}
 }
 
 void CachedImage::addIncrementalDataBuffer(SharedBuffer& data)


Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.cpp (216272 => 216273)

--- trunk/Source/WebCore/platform/graphics/BitmapImage.cpp	2017-05-05 21:15:51 UTC (rev 216272)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.cpp	2017-05-05 21:35:54 UTC (rev 216273)
@@ -61,7 +61,8 @@
 BitmapImage::~BitmapImage()
 {
 invalidatePlatformData();
-stopAnimation();
+clearTimer();
+m_source.stopAsyncDecodingQueue();
 }
 
 void BitmapImage::updateFromSettings(const Settings& settings)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [216305] trunk/Source/WebCore

2017-05-05 Thread said
Title: [216305] trunk/Source/WebCore








Revision 216305
Author s...@apple.com
Date 2017-05-05 20:27:16 -0700 (Fri, 05 May 2017)


Log Message
Crash in ImageFrameCache::decodedSizeChanged() after image load cancellation
https://bugs.webkit.org/show_bug.cgi?id=171736

Reviewed by Tim Horton.

Tests: Covered by run-webkit-tests fast/images/image-formats-support.html
--guard-malloc.

Because an image format is not supported, the ImageObserver of the Image
is deleted then the Image itself is deleted. In BitmapImage destructor,
we make a call which ends up accessing the deleted ImageObserver.

To fix this, we need to change the BitImage destructor to avoid calling 
ImageFrameCache::decodedSizeChanged() since it is not really needed.

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::~BitmapImage):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/BitmapImage.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (216304 => 216305)

--- trunk/Source/WebCore/ChangeLog	2017-05-06 01:59:14 UTC (rev 216304)
+++ trunk/Source/WebCore/ChangeLog	2017-05-06 03:27:16 UTC (rev 216305)
@@ -1,3 +1,23 @@
+2017-05-05  Said Abou-Hallawa  
+
+Crash in ImageFrameCache::decodedSizeChanged() after image load cancellation
+https://bugs.webkit.org/show_bug.cgi?id=171736
+
+Reviewed by Tim Horton.
+
+Tests: Covered by run-webkit-tests fast/images/image-formats-support.html
+--guard-malloc.
+
+Because an image format is not supported, the ImageObserver of the Image
+is deleted then the Image itself is deleted. In BitmapImage destructor,
+we make a call which ends up accessing the deleted ImageObserver.
+
+To fix this, we need to change the BitImage destructor to avoid calling 
+ImageFrameCache::decodedSizeChanged() since it is not really needed.
+
+* platform/graphics/BitmapImage.cpp:
+(WebCore::BitmapImage::~BitmapImage):
+
 2017-05-05  Timothy Horton  
 
 [Mac] Adjust cursor position for dragged link (and stop it from moving based on how fast you are dragging)


Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.cpp (216304 => 216305)

--- trunk/Source/WebCore/platform/graphics/BitmapImage.cpp	2017-05-06 01:59:14 UTC (rev 216304)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.cpp	2017-05-06 03:27:16 UTC (rev 216305)
@@ -61,7 +61,8 @@
 BitmapImage::~BitmapImage()
 {
 invalidatePlatformData();
-stopAnimation();
+clearTimer();
+m_source.stopAsyncDecodingQueue();
 }
 
 void BitmapImage::updateFromSettings(const Settings& settings)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [196381] trunk/PerformanceTests

2016-02-10 Thread said
d)
+this.element.style.mixBlendMode = Stage.randomStyleMixBlendMode();
+
+// Some browsers have not un-prefixed the css filter yet.
+if (stage.filter)
+Utilities.setElementPrefixedProperty(this.element, "filter", Stage.randomStyleFilter());
+
 this._move();
 }, {
 


Modified: trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-particles.js (196380 => 196381)

--- trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-particles.js	2016-02-10 20:33:20 UTC (rev 196380)
+++ trunk/PerformanceTests/Animometer/tests/bouncing-particles/resources/bouncing-particles.js	2016-02-10 20:45:01 UTC (rev 196381)
@@ -84,6 +84,8 @@
 this.shape = options["shape"] || "circle";
 this.fill = options["fill"] || "solid";
 this.clip = options["clip"] || "";
+this.blend = options["blend"] || false;
+this.filter = options["filter"] || false;
 },
 
 animate: function(timeDelta)


Modified: trunk/PerformanceTests/Animometer/tests/resources/main.js (196380 => 196381)

--- trunk/PerformanceTests/Animometer/tests/resources/main.js	2016-02-10 20:33:20 UTC (rev 196380)
+++ trunk/PerformanceTests/Animometer/tests/resources/main.js	2016-02-10 20:45:01 UTC (rev 196381)
@@ -766,6 +766,48 @@
 + this.randomInt(min, max).toString(16);
 },
 
+randomStyleMixBlendMode: function()
+{
+var mixBlendModeList = [
+  'normal',
+  'multiply',
+  'screen',
+  'overlay',
+  'darken',
+  'lighten',
+  'color-dodge',
+  'color-burn',
+  'hard-light',
+  'soft-light',
+  'difference',
+  'exclusion',
+  'hue',
+  'saturation',
+  'color',
+  'luminosity'
+];
+
+return mixBlendModeList[this.randomInt(0, mixBlendModeList.length)];
+},
+
+randomStyleFilter: function()
+{
+var filterList = [
+'grayscale(50%)',
+'sepia(50%)',
+'saturate(50%)',
+'hue-rotate(180)',
+'invert(50%)',
+'opacity(50%)',
+'brightness(50%)',
+'contrast(50%)',
+'blur(10px)',
+'drop-shadow(10px 10px 10px gray)'
+];
+
+return filterList[this.randomInt(0, filterList.length)];
+},
+
 rotatingColor: function(cycleLengthMs, saturation, lightness)
 {
 return "hsl("


Modified: trunk/PerformanceTests/ChangeLog (196380 => 196381)

--- trunk/PerformanceTests/ChangeLog	2016-02-10 20:33:20 UTC (rev 196380)
+++ trunk/PerformanceTests/ChangeLog	2016-02-10 20:45:01 UTC (rev 196381)
@@ -1,3 +1,30 @@
+2016-02-09  Said Abou-Hallawa  
+
+Add internal benchmark tests for CSS mix-blend-modes and filters
+https://bugs.webkit.org/show_bug.cgi?id=154058
+
+Provisionally reviewed by Jon Lee.
+
+* Animometer/resources/debug-runner/tests.js: Include the new tests in the
+"HTML suite" of the debug runner.
+
+* Animometer/resources/extensions.js:
+(Utilities.browserPrefix):
+(Utilities.setElementPrefixedProperty): Utility functions to allow setting
+prefixed style properties.
+
+* Animometer/tests/bouncing-particles/resources/bouncing-css-shapes.js:
+Set the mix-blend-mode and the filter to some random values if the options
+of the test requested that.
+
+* Animometer/tests/bouncing-particles/resources/bouncing-particles.js:
+(parseShapeParameters): Parse the url options "blend" and "filter" and set
+the corresponding flags.
+
+* Animometer/tests/resources/main.js:
+(randomStyleMixBlendMode):
+(randomStyleFilter): Return random mix-blend-mode and filter.
+
 2016-02-08  Jon Lee  
 
 Add a ramp controller






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [256192] trunk

2020-02-10 Thread said
Title: [256192] trunk








Revision 256192
Author s...@apple.com
Date 2020-02-10 10:21:56 -0800 (Mon, 10 Feb 2020)


Log Message
Unreachable code hit in WebCore::Shape::createShape
https://bugs.webkit.org/show_bug.cgi?id=207399

Reviewed by Darin Adler.

Source/WebCore:

CSS parser should not consume the 'shape-outside' property with type 'path' 
since it has not been implemented yet. This will prevent an assertion in
the debug build and null dref in the release build.

Test: css3/shapes/shape-outside-path-no-crash.html

* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeBasicShape):
(WebCore::consumeShapeOutside):

LayoutTests:

* css3/shapes/shape-outside-path-no-crash-expected.txt: Added.
* css3/shapes/shape-outside-path-no-crash.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp


Added Paths

trunk/LayoutTests/css3/shapes/shape-outside-path-no-crash-expected.txt
trunk/LayoutTests/css3/shapes/shape-outside-path-no-crash.html




Diff

Modified: trunk/LayoutTests/ChangeLog (256191 => 256192)

--- trunk/LayoutTests/ChangeLog	2020-02-10 18:16:49 UTC (rev 256191)
+++ trunk/LayoutTests/ChangeLog	2020-02-10 18:21:56 UTC (rev 256192)
@@ -1,3 +1,13 @@
+2020-02-10  Said Abou-Hallawa  
+
+Unreachable code hit in WebCore::Shape::createShape
+https://bugs.webkit.org/show_bug.cgi?id=207399
+
+Reviewed by Darin Adler.
+
+* css3/shapes/shape-outside-path-no-crash-expected.txt: Added.
+* css3/shapes/shape-outside-path-no-crash.html: Added.
+
 2020-02-10  Daniel Bates  
 
 Disallow setting base URL to a data or _javascript_ URL


Added: trunk/LayoutTests/css3/shapes/shape-outside-path-no-crash-expected.txt (0 => 256192)

--- trunk/LayoutTests/css3/shapes/shape-outside-path-no-crash-expected.txt	(rev 0)
+++ trunk/LayoutTests/css3/shapes/shape-outside-path-no-crash-expected.txt	2020-02-10 18:21:56 UTC (rev 256192)
@@ -0,0 +1 @@
+Pass if there is no crash or assert.


Added: trunk/LayoutTests/css3/shapes/shape-outside-path-no-crash.html (0 => 256192)

--- trunk/LayoutTests/css3/shapes/shape-outside-path-no-crash.html	(rev 0)
+++ trunk/LayoutTests/css3/shapes/shape-outside-path-no-crash.html	2020-02-10 18:21:56 UTC (rev 256192)
@@ -0,0 +1,13 @@
+
+.box { 
+shape-outside: path("M 0 0 L 200 200 0 200 z");
+float: left;
+}
+
+
+Pass if there is no crash or assert.
+
+if (window.testRunner)
+testRunner.dumpAsText();
+
+


Modified: trunk/Source/WebCore/ChangeLog (256191 => 256192)

--- trunk/Source/WebCore/ChangeLog	2020-02-10 18:16:49 UTC (rev 256191)
+++ trunk/Source/WebCore/ChangeLog	2020-02-10 18:21:56 UTC (rev 256192)
@@ -1,3 +1,20 @@
+2020-02-10  Said Abou-Hallawa  
+
+Unreachable code hit in WebCore::Shape::createShape
+https://bugs.webkit.org/show_bug.cgi?id=207399
+
+Reviewed by Darin Adler.
+
+CSS parser should not consume the 'shape-outside' property with type 'path' 
+since it has not been implemented yet. This will prevent an assertion in
+the debug build and null dref in the release build.
+
+Test: css3/shapes/shape-outside-path-no-crash.html
+
+* css/parser/CSSPropertyParser.cpp:
+(WebCore::consumeBasicShape):
+(WebCore::consumeShapeOutside):
+
 2020-02-10  Daniel Bates  
 
 Disallow setting base URL to a data or _javascript_ URL


Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (256191 => 256192)

--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2020-02-10 18:16:49 UTC (rev 256191)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2020-02-10 18:21:56 UTC (rev 256192)
@@ -2544,9 +2544,8 @@
 return shape;
 }
 
-static RefPtr consumeBasicShape(CSSParserTokenRange& range, const CSSParserContext& context)
+static RefPtr consumeBasicShape(CSSParserTokenRange& range, const CSSParserContext& context)
 {
-RefPtr result;
 if (range.peek().type() != FunctionToken)
 return nullptr;
 CSSValueID id = range.peek().functionId();
@@ -2616,7 +2615,9 @@
 RefPtr list = CSSValueList::createSpaceSeparated();
 if (RefPtr boxValue = consumeIdent(range))
 list->append(boxValue.releaseNonNull());
-if (RefPtr shapeValue = consumeBasicShape(range, context)) {
+if (RefPtr shapeValue = consumeBasicShape(range, context)) {
+if (shapeValue->shapeValue()->type() == CSSBasicShapeCircle::CSSBasicShapePathType)
+return nullptr;
 list->append(shapeValue.releaseNonNull());
 if (list->length() < 2) {
 if (RefPtr boxValue = consumeIdent(range))






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [256463] trunk

2020-02-12 Thread said
Title: [256463] trunk








Revision 256463
Author s...@apple.com
Date 2020-02-12 11:31:11 -0800 (Wed, 12 Feb 2020)


Log Message
REGRESSION (r255158): http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=206839

Reviewed by Simon Fraser.

Source/WebCore:

Remove the setting 'RenderingUpdateThrottling'. We will disable the
RenderingUpdateThrottling till the first layout happens. Then it will be
enabled for the rest of the page's life. This ensures VisuallyIdle won't
throttle the RenderingUpdate steps before the first paint.

* page/Page.cpp:
(WebCore::Page::renderingUpdateThrottlingEnabled const):
(WebCore::Page::addLayoutMilestones):
(WebCore::Page::renderingUpdateThrottlingEnabledChanged): Deleted.
* page/Page.h:
* page/Settings.yaml:
* page/SettingsBase.cpp:
(WebCore::SettingsBase::renderingUpdateThrottlingEnabledChanged): Deleted.
* page/SettingsBase.h:

Source/WebKit:

Remove the WKPreference key 'RenderingUpdateThrottlingEnabled'.

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetRenderingUpdateThrottlingEnabled): Deleted.
(WKPreferencesGetRenderingUpdateThrottlingEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:

Source/WebKitLegacy/mac:

Remove the WKPreference key 'RenderingUpdateThrottlingEnabled'.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences renderingUpdateThrottlingEnabled]): Deleted.
(-[WebPreferences setRenderingUpdateThrottlingEnabled:]): Deleted.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKitLegacy/win:

Remove the WKPreference key 'RenderingUpdateThrottlingEnabled'.

* Interfaces/IWebPreferencesPrivate.idl:
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::renderingUpdateThrottlingEnabled): Deleted.
(WebPreferences::setRenderingUpdateThrottlingEnabled): Deleted.
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Tools:

Remove the WKPreference key 'RenderingUpdateThrottlingEnabled'.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* DumpRenderTree/win/DumpRenderTree.cpp:
(enableExperimentalFeatures):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

LayoutTests:

Remove the setting 'RenderingUpdateThrottling'.

* fast/animation/css-animation-throttling-lowPowerMode.html:
* fast/animation/request-animation-frame-throttle-subframe.html:
* fast/animation/request-animation-frame-throttling-detached-iframe.html:
* fast/animation/request-animation-frame-throttling-lowPowerMode.html:
* fast/animation/request-animation-frame-throttling-outside-viewport.html:
* http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html:
* platform/mac-wk2/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/animation/css-animation-throttling-lowPowerMode.html
trunk/LayoutTests/fast/animation/request-animation-frame-throttle-subframe.html
trunk/LayoutTests/fast/animation/request-animation-frame-throttling-detached-iframe.html
trunk/LayoutTests/fast/animation/request-animation-frame-throttling-lowPowerMode.html
trunk/LayoutTests/fast/animation/request-animation-frame-throttling-outside-viewport.html
trunk/LayoutTests/http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html
trunk/LayoutTests/platform/mac-wk2/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/Page.cpp
trunk/Source/WebCore/page/Page.h
trunk/Source/WebCore/page/Settings.yaml
trunk/Source/WebCore/page/SettingsBase.cpp
trunk/Source/WebCore/page/SettingsBase.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/WebPreferences.yaml
trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp
trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h
trunk/Source/WebKitLegacy/mac/ChangeLog
trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h
trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm
trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
trunk/Source/WebKitLegacy/mac/WebView/WebView.mm
trunk/Source/WebKitLegacy/win/ChangeLog
trunk/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl
trunk/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h
trunk/Source/WebKitLegacy/win/WebPreferences.cpp
trunk/Source/WebKitLegacy/win/WebPreferences.h
trunk/Source/WebKitLegacy/win/WebView.cpp
trunk/Tools/ChangeLog
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp
trunk/Tools/WebKitTestRunner/TestController.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (256462 => 256463)

--- trunk/LayoutTests/ChangeLog	2020-02-12 19:27:04 UTC (rev 256462)
+++ trunk/LayoutTests/ChangeLog	2020-02-12 19:31:11 UTC (rev 256463

[webkit-changes] [256512] trunk

2020-02-13 Thread said
Title: [256512] trunk








Revision 256512
Author s...@apple.com
Date 2020-02-13 09:11:28 -0800 (Thu, 13 Feb 2020)


Log Message
Unreviewed, rolling out r255158, 255405 and r255486

Caused test flakiness and PLT regression.

Patch by Said Abou-Hallawa  on 2020-02-13

Source/WebCore:

* Headers.cmake:
* WebCore.xcodeproj/project.pbxproj:
* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::updateThrottlingState):
(WebCore::DocumentTimeline::animationInterval const):
* animation/DocumentTimeline.h:
* dom/Document.cpp:
(WebCore::Document::requestAnimationFrame):
(WebCore::Document::updateLastHandledUserGestureTimestamp):
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::throttlingReasonToString):
(WebCore::throttlingReasonsToString):
(WebCore::ScriptedAnimationController::addThrottlingReason):
(WebCore::ScriptedAnimationController::removeThrottlingReason):
(WebCore::ScriptedAnimationController::isThrottled const):
(WebCore::ScriptedAnimationController::registerCallback):
(WebCore::ScriptedAnimationController::cancelCallback):
(WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks):
(WebCore::ScriptedAnimationController::interval const):
(WebCore::ScriptedAnimationController::page const):
(WebCore::ScriptedAnimationController::scheduleAnimation):
(WebCore::ScriptedAnimationController::animationTimerFired):
(WebCore::ScriptedAnimationController::preferredScriptedAnimationInterval const): Deleted.
(WebCore::ScriptedAnimationController::isThrottledRelativeToPage const): Deleted.
(WebCore::ScriptedAnimationController::shouldRescheduleRequestAnimationFrame const): Deleted.
* dom/ScriptedAnimationController.h:
(WebCore::ScriptedAnimationController::addThrottlingReason): Deleted.
(WebCore::ScriptedAnimationController::removeThrottlingReason): Deleted.
* page/FrameView.cpp:
(WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState):
* page/Page.cpp:
(WebCore::m_deviceOrientationUpdateProvider):
(WebCore::Page::isLowPowerModeEnabled const):
(WebCore::Page::setLowPowerModeEnabledOverrideForTesting):
(WebCore::updateScriptedAnimationsThrottlingReason):
(WebCore::Page::setIsVisuallyIdleInternal):
(WebCore::Page::handleLowModePowerChange):
(WebCore::Page::renderingUpdateThrottlingEnabled const): Deleted.
(WebCore::Page::renderingUpdateThrottlingEnabledChanged): Deleted.
(WebCore::Page::isRenderingUpdateThrottled const): Deleted.
(WebCore::Page::preferredRenderingUpdateInterval const): Deleted.
* page/Page.h:
(WebCore::Page::isLowPowerModeEnabled const): Deleted.
(WebCore::Page::canUpdateThrottlingReason const): Deleted.
* page/RenderingUpdateScheduler.cpp:
(WebCore::RenderingUpdateScheduler::scheduleTimedRenderingUpdate):
(WebCore::RenderingUpdateScheduler::startTimer):
(WebCore::RenderingUpdateScheduler::adjustFramesPerSecond): Deleted.
(WebCore::RenderingUpdateScheduler::adjustRenderingUpdateFrequency): Deleted.
* page/RenderingUpdateScheduler.h:
* page/Settings.yaml:
* page/SettingsBase.cpp:
(WebCore::SettingsBase::renderingUpdateThrottlingEnabledChanged): Deleted.
* page/SettingsBase.h:
* platform/graphics/AnimationFrameRate.h: Removed.
* platform/graphics/DisplayRefreshMonitor.h:
(WebCore::DisplayRefreshMonitor::setPreferredFramesPerSecond): Deleted.
* platform/graphics/DisplayRefreshMonitorManager.cpp:
(WebCore::DisplayRefreshMonitorManager::createMonitorForClient):
(WebCore::DisplayRefreshMonitorManager::registerClient):
(WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
(WebCore::DisplayRefreshMonitorManager::windowScreenDidChange):
(WebCore::DisplayRefreshMonitorManager::monitorForClient): Deleted.
(WebCore::DisplayRefreshMonitorManager::setPreferredFramesPerSecond): Deleted.
* platform/graphics/DisplayRefreshMonitorManager.h:
(WebCore::DisplayRefreshMonitorManager::DisplayRefreshMonitorManager):
* platform/graphics/GraphicsLayerUpdater.cpp:
(WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
* platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
(-[WebDisplayLinkHandler setPreferredFramesPerSecond:]): Deleted.

Source/WebKit:

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetRenderingUpdateThrottlingEnabled): Deleted.
(WKPreferencesGetRenderingUpdateThrottlingEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.messages.in:
* UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(-[WKOneShotDisplayLinkHandler setPreferredFramesPerSecond:]): Deleted.
(WebKit::RemoteLayerTreeDrawingAreaProxy::setPreferredFramesPerSecond): Deleted.
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.h:
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.mm:
(WebKit::RemoteLayerTreeDisplayRefreshMonitor::setPreferredFramesPerSecond): Deleted.
* WebProcess/WebPage/RemoteLayerTree

[webkit-changes] [256526] trunk/LayoutTests

2020-02-13 Thread said
Title: [256526] trunk/LayoutTests








Revision 256526
Author s...@apple.com
Date 2020-02-13 11:16:41 -0800 (Thu, 13 Feb 2020)


Log Message
WebP image format is not supported
https://bugs.webkit.org/show_bug.cgi?id=192672

Unreviewed test gardening

* platform/mac/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/mac/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (256525 => 256526)

--- trunk/LayoutTests/ChangeLog	2020-02-13 19:10:27 UTC (rev 256525)
+++ trunk/LayoutTests/ChangeLog	2020-02-13 19:16:41 UTC (rev 256526)
@@ -1,3 +1,12 @@
+2020-02-13  Said Abou-Hallawa  
+
+WebP image format is not supported
+https://bugs.webkit.org/show_bug.cgi?id=192672
+
+Unreviewed test gardening
+
+* platform/mac/TestExpectations:
+
 2020-02-13  Jacob Uphoff  
 
 [ iOS ] imported/w3c/IndexedDB-private-browsing/close-in-upgradeneeded.html is flaky timing out


Modified: trunk/LayoutTests/platform/mac/TestExpectations (256525 => 256526)

--- trunk/LayoutTests/platform/mac/TestExpectations	2020-02-13 19:10:27 UTC (rev 256525)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2020-02-13 19:16:41 UTC (rev 256526)
@@ -1789,13 +1789,6 @@
 [ Catalina+ ] fast/images/animated-heics-draw.html [ Pass ]
 [ Catalina+ ] fast/images/animated-heics-verify.html [ Pass ]
 
-# 
-[ Catalina+ ] fast/images/webp-as-image.html [ Pass ]
-[ Catalina+ ] fast/images/animated-webp-as-image.html [ Pass ]
-
-# 
-[ Catalina+ ] fast/images/animated-webp.html [ ImageOnlyFailure ]
-
 # 
 [ Catalina+ ] fast/text/font-collection.html [ ImageOnlyFailure ]
 [ Catalina+ ] fast/text/woff2.html [ ImageOnlyFailure ]






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [242515] trunk

2019-03-05 Thread said
Title: [242515] trunk








Revision 242515
Author s...@apple.com
Date 2019-03-05 15:12:51 -0800 (Tue, 05 Mar 2019)


Log Message
SVGPathSegList.insertItemBefore() should fail if the newItem belongs to an animating animPathSegList
https://bugs.webkit.org/show_bug.cgi?id=195333


Reviewed by Simon Fraser.

Source/WebCore:

Because the SVG1.1 specs states that the newItem should be removed from
its original list before adding it to another list,
SVGPathSegList.insertItemBefore() should fail if the new item belongs to
an animating animPathSegList since it is read-only.

Test: svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg

* svg/SVGPathSegList.cpp:
(WebCore::SVGPathSegList::processIncomingListItemValue):

LayoutTests:

* svg/dom/SVGPathSegList-insert-from-animating-animPathSegList-expected.txt: Added.
* svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/svg/SVGPathSegList.cpp


Added Paths

trunk/LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList-expected.txt
trunk/LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg




Diff

Modified: trunk/LayoutTests/ChangeLog (242514 => 242515)

--- trunk/LayoutTests/ChangeLog	2019-03-05 22:19:59 UTC (rev 242514)
+++ trunk/LayoutTests/ChangeLog	2019-03-05 23:12:51 UTC (rev 242515)
@@ -1,3 +1,14 @@
+2019-03-05  Said Abou-Hallawa  
+
+SVGPathSegList.insertItemBefore() should fail if the newItem belongs to an animating animPathSegList
+https://bugs.webkit.org/show_bug.cgi?id=195333
+
+
+Reviewed by Simon Fraser.
+
+* svg/dom/SVGPathSegList-insert-from-animating-animPathSegList-expected.txt: Added.
+* svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg: Added.
+
 2019-03-05  Ryan Haddad  
 
 Unreviewed, rolling out r242403.


Added: trunk/LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList-expected.txt (0 => 242515)

--- trunk/LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList-expected.txt	(rev 0)
+++ trunk/LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList-expected.txt	2019-03-05 23:12:51 UTC (rev 242515)
@@ -0,0 +1 @@
+PASS: did not assert in debug.


Added: trunk/LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg (0 => 242515)

--- trunk/LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg	(rev 0)
+++ trunk/LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg	2019-03-05 23:12:51 UTC (rev 242515)
@@ -0,0 +1,29 @@
+
+
+
+
+
+PASS: did not assert in debug.
+
+if (window.testRunner) {
+testRunner.dumpAsText();
+testRunner.waitUntilDone();
+}
+
+var animate = document.getElementById("animate");
+animate.addEventListener('beginEvent' , function () {
+var path1 = document.getElementById("path1");
+var path2 = document.getElementById("path2");
+
+var path1_pathSegList = path1.pathSegList;
+var path2_animPathSegList = path2.animatedPathSegList;  
+
+document.documentElement.setCurrentTime(1);
+
+var pathseg = path2_animPathSegList.getItem(0); 
+path1_pathSegList.insertItemBefore(pathseg, 0);
+if (window.testRunner)
+testRunner.notifyDone();
+}, { once: true});
+
+


Modified: trunk/Source/WebCore/ChangeLog (242514 => 242515)

--- trunk/Source/WebCore/ChangeLog	2019-03-05 22:19:59 UTC (rev 242514)
+++ trunk/Source/WebCore/ChangeLog	2019-03-05 23:12:51 UTC (rev 242515)
@@ -1,3 +1,21 @@
+2019-03-05  Said Abou-Hallawa  
+
+SVGPathSegList.insertItemBefore() should fail if the newItem belongs to an animating animPathSegList
+https://bugs.webkit.org/show_bug.cgi?id=195333
+
+
+Reviewed by Simon Fraser.
+
+Because the SVG1.1 specs states that the newItem should be removed from
+its original list before adding it to another list,
+SVGPathSegList.insertItemBefore() should fail if the new item belongs to
+an animating animPathSegList since it is read-only.
+
+Test: svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg
+
+* svg/SVGPathSegList.cpp:
+(WebCore::SVGPathSegList::processIncomingListItemValue):
+
 2019-03-05  Zalan Bujtas  
 
 [ContentChangeObserver] Send content change notification through adjustObservedState


Modified: trunk/Source/WebCore/svg/SVGPathSegList.cpp (242514 => 242515)

--- trunk/Source/WebCore/svg/SVGPathSegList.cpp	2019-03-05 22:19:59 UTC (rev 242514)
+++ trunk/Source/WebCore/svg/SVGPathSegList.cpp	2019-03-05 23:12:51 UTC (rev 242515)
@@ -85,8 +85,15

[webkit-changes] [287710] trunk

2022-01-06 Thread said
Title: [287710] trunk








Revision 287710
Author s...@apple.com
Date 2022-01-06 12:04:41 -0800 (Thu, 06 Jan 2022)


Log Message
REGRESSION(r285618):A crash may happen when calculating the color-interpolation of a referenced SVG filter
https://bugs.webkit.org/show_bug.cgi?id=234918
rdar://86928631

Reviewed by Simon Fraser.

Source/WebCore:

When building a referenced SVGFilter, the color-interpolation property
of the effect element is needed. If the effect element does not have a
renderer, we fallback to the computed style property value. And if the
SVG filter is inside an  which has media queries, a Document::
updateLayout() will be forced. Building the SVGFilter should not invoke
an updateLayout() since this may not be safe and out of order.

Test: css3/filters/reference-filter-color-interpolation-update-layout.html

* svg/graphics/filters/SVGFilterBuilder.cpp:
(WebCore::colorInterpolationForElement):

LayoutTests:

* css3/filters/reference-filter-color-interpolation-update-layout-expected.txt: Added.
* css3/filters/reference-filter-color-interpolation-update-layout.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp


Added Paths

trunk/LayoutTests/css3/filters/reference-filter-color-interpolation-update-layout-expected.txt
trunk/LayoutTests/css3/filters/reference-filter-color-interpolation-update-layout.html




Diff

Modified: trunk/LayoutTests/ChangeLog (287709 => 287710)

--- trunk/LayoutTests/ChangeLog	2022-01-06 20:01:46 UTC (rev 287709)
+++ trunk/LayoutTests/ChangeLog	2022-01-06 20:04:41 UTC (rev 287710)
@@ -1,3 +1,14 @@
+2022-01-06  Said Abou-Hallawa  
+
+REGRESSION(r285618):A crash may happen when calculating the color-interpolation of a referenced SVG filter
+https://bugs.webkit.org/show_bug.cgi?id=234918
+rdar://86928631
+
+Reviewed by Simon Fraser.
+
+* css3/filters/reference-filter-color-interpolation-update-layout-expected.txt: Added.
+* css3/filters/reference-filter-color-interpolation-update-layout.html: Added.
+
 2022-01-06  Alan Bujtas  
 
 Tighten test expectation for imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-transform.html


Added: trunk/LayoutTests/css3/filters/reference-filter-color-interpolation-update-layout-expected.txt (0 => 287710)

--- trunk/LayoutTests/css3/filters/reference-filter-color-interpolation-update-layout-expected.txt	(rev 0)
+++ trunk/LayoutTests/css3/filters/reference-filter-color-interpolation-update-layout-expected.txt	2022-01-06 20:04:41 UTC (rev 287710)
@@ -0,0 +1,3 @@
+This test passes if it does not crash.
+
+


Added: trunk/LayoutTests/css3/filters/reference-filter-color-interpolation-update-layout.html (0 => 287710)

--- trunk/LayoutTests/css3/filters/reference-filter-color-interpolation-update-layout.html	(rev 0)
+++ trunk/LayoutTests/css3/filters/reference-filter-color-interpolation-update-layout.html	2022-01-06 20:04:41 UTC (rev 287710)
@@ -0,0 +1,33 @@
+
+This test passes if it does not crash.
+
+
+
+if (window.testRunner)
+window.testRunner.dumpAsText(true);
+
+


Modified: trunk/Source/WebCore/ChangeLog (287709 => 287710)

--- trunk/Source/WebCore/ChangeLog	2022-01-06 20:01:46 UTC (rev 287709)
+++ trunk/Source/WebCore/ChangeLog	2022-01-06 20:04:41 UTC (rev 287710)
@@ -1,3 +1,23 @@
+2022-01-06  Said Abou-Hallawa  
+
+REGRESSION(r285618):A crash may happen when calculating the color-interpolation of a referenced SVG filter
+https://bugs.webkit.org/show_bug.cgi?id=234918
+rdar://86928631
+
+Reviewed by Simon Fraser.
+
+When building a referenced SVGFilter, the color-interpolation property
+of the effect element is needed. If the effect element does not have a
+renderer, we fallback to the computed style property value. And if the
+SVG filter is inside an  which has media queries, a Document::
+updateLayout() will be forced. Building the SVGFilter should not invoke
+an updateLayout() since this may not be safe and out of order.
+
+Test: css3/filters/reference-filter-color-interpolation-update-layout.html
+
+* svg/graphics/filters/SVGFilterBuilder.cpp:
+(WebCore::colorInterpolationForElement):
+
 2022-01-06  Antoine Quint  
 
 Remove Animation::operator=


Modified: trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp (287709 => 287710)

--- trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp	2022-01-06 20:01:46 UTC (rev 287709)
+++ trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp	2022-01-06 20:04:41 UTC (rev 287710)
@@ -70,7 +70,7 @@
 return renderer->style().svgStyle().colorInterpolationFilters();
 
 // Try to determine the property value from the computed style.
-

[webkit-changes] [287782] trunk/Source

2022-01-07 Thread said
graphics/filters/SVGFilter.cpp
trunk/Source/WebCore/svg/graphics/filters/SVGFilter.h
trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp
trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp


Added Paths

trunk/Source/WebCore/platform/graphics/filters/FilterResults.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (287781 => 287782)

--- trunk/Source/WebCore/ChangeLog	2022-01-07 21:52:15 UTC (rev 287781)
+++ trunk/Source/WebCore/ChangeLog	2022-01-07 22:21:03 UTC (rev 287782)
@@ -1,3 +1,86 @@
+2022-01-07  Said Abou-Hallawa  
+
+[GPU Process] Remove the result FilterImage from FilterEffect
+https://bugs.webkit.org/show_bug.cgi?id=232840
+rdar://85425842
+
+Reviewed by Darin Adler.
+
+Removing the result FilterImage from FilterEffect will allow reusing the
+same FilterEffect for all the renderers that reference it. The results 
+will now be stored in the new class 'FilterResults'.
+
+-- FilterData still keeps the results of applying the Filter to its
+   renderer in a new member of type FilterResults.
+
+-- RenderLayerFilters will not need to clear its CSSFilter intermediate
+   results because this will happen once the temporary FilterResults goes
+   out of scope.
+
+FilterResults will have two maps:
+
+1. FilterEffect -> FilterImage: The value is the result FilterImage of 
+   applying the FilterEffect.
+2. FilterImage -> FilterEffectSet: The value is a list of FilterEffects,
+   whose FilterImages depend on the key FilterImage.
+
+* Headers.cmake:
+* WebCore.xcodeproj/project.pbxproj:
+* platform/graphics/ConcreteImageBuffer.h:
+* platform/graphics/GraphicsContext.cpp:
+(WebCore::GraphicsContext::drawFilteredImageBuffer):
+* platform/graphics/GraphicsContext.h:
+* platform/graphics/displaylists/DisplayListItems.cpp:
+(WebCore::DisplayList::DrawFilteredImageBuffer::apply):
+* platform/graphics/displaylists/DisplayListItems.h:
+* platform/graphics/displaylists/DisplayListRecorder.cpp:
+(WebCore::DisplayList::Recorder::drawFilteredImageBuffer):
+* platform/graphics/displaylists/DisplayListRecorder.h:
+* platform/graphics/filters/Filter.cpp:
+(WebCore::Filter::apply):
+* platform/graphics/filters/Filter.h:
+* platform/graphics/filters/FilterEffect.cpp:
+(WebCore::FilterEffect::apply):
+(WebCore::FilterEffect::clearResult): Deleted.
+(WebCore::FilterEffect::clearResultsRecursive): Deleted.
+* platform/graphics/filters/FilterEffect.h:
+(WebCore::FilterEffect::hasResult const): Deleted.
+(WebCore::FilterEffect::filterImage const): Deleted.
+* platform/graphics/filters/FilterFunction.h:
+(WebCore::FilterFunction::apply):
+(WebCore::FilterFunction::outsets const):
+(WebCore::FilterFunction::clearResult): Deleted.
+* platform/graphics/filters/FilterResults.h: Added.
+(WebCore::FilterResults::effectResult const):
+(WebCore::FilterResults::setEffectResult):
+(WebCore::FilterResults::clearEffectResult):
+* platform/network/SynchronousLoaderClient.cpp:
+* rendering/CSSFilter.cpp:
+(WebCore::CSSFilter::apply):
+(WebCore::CSSFilter::clearIntermediateResults): Deleted.
+* rendering/CSSFilter.h:
+* rendering/RenderLayerFilters.cpp:
+(WebCore::RenderLayerFilters::applyFilterEffect):
+* rendering/svg/RenderSVGResourceFilter.cpp:
+(WebCore::RenderSVGResourceFilter::postApplyResource):
+(WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
+* rendering/svg/RenderSVGResourceFilter.h:
+* svg/graphics/filters/SVGFilter.cpp:
+(WebCore::SVGFilter::apply):
+(WebCore::SVGFilter::clearResult): Deleted.
+* svg/graphics/filters/SVGFilter.h:
+* svg/graphics/filters/SVGFilterBuilder.cpp:
+(WebCore::SVGFilterBuilder::setupBuiltinEffects):
+(WebCore::SVGFilterBuilder::buildFilterEffects):
+(WebCore::SVGFilterBuilder::appendEffectToEffectRenderer):
+(WebCore::SVGFilterBuilder::appendEffectToEffectReferences): Deleted.
+(WebCore::SVGFilterBuilder::clearEffects): Deleted.
+(WebCore::SVGFilterBuilder::clearResultsRecursive): Deleted.
+* svg/graphics/filters/SVGFilterBuilder.h:
+(WebCore::SVGFilterBuilder::lastEffect const): Deleted.
+(WebCore::SVGFilterBuilder::effectReferences): Deleted.
+(WebCore::SVGFilterBuilder::addBuiltinEffects): Deleted.
+
 2022-01-07  Patrick Angle  
 
 [Cocoa] Web Driver: WebSocket over TLS failing over WebDriver with acceptInsecureCerts on Big Sur


Modified: trunk/Source/WebCore/Headers.cmake (

[webkit-changes] [287892] trunk/Source/WebCore

2022-01-11 Thread said
/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::filterEffect const):
(WebCore::SVGFESpecularLightingElement::build const): Deleted.
* svg/SVGFESpecularLightingElement.h:
* svg/SVGFESpotLightElement.cpp:
(WebCore::SVGFESpotLightElement::lightSource const):
* svg/SVGFESpotLightElement.h:
* svg/SVGFETileElement.cpp:
(WebCore::SVGFETileElement::filterEffect const):
(WebCore::SVGFETileElement::build const): Deleted.
* svg/SVGFETileElement.h:
* svg/SVGFETurbulenceElement.cpp:
(WebCore::SVGFETurbulenceElement::filterEffect const):
(WebCore::SVGFETurbulenceElement::build const): Deleted.
* svg/SVGFETurbulenceElement.h:
* svg/SVGFilterPrimitiveStandardAttributes.h:
(WebCore::SVGFilterPrimitiveStandardAttributes::filterEffectInputsNames const):
* svg/graphics/filters/SVGFilter.cpp:
(WebCore::SVGFilter::create):
* svg/graphics/filters/SVGFilter.h:
* svg/graphics/filters/SVGFilterBuilder.cpp:
(WebCore::SVGFilterBuilder::setupBuiltinEffects):
(WebCore::SVGFilterBuilder::buildFilterEffects):
(WebCore::SVGFilterBuilder::sourceGraphic const):
(WebCore::SVGFilterBuilder::sourceAlpha const):
(WebCore::SVGFilterBuilder::addNamedEffect):
(WebCore::SVGFilterBuilder::namedEffect const):
(WebCore::SVGFilterBuilder::namedEffects const):
(WebCore::SVGFilterBuilder::setEffectInputs):
(WebCore::SVGFilterBuilder::buildEffectExpression const):
(WebCore::SVGFilterBuilder::add): Deleted.
(WebCore::SVGFilterBuilder::getEffectById const): Deleted.
* svg/graphics/filters/SVGFilterBuilder.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/filters/FilterEffect.cpp
trunk/Source/WebCore/platform/graphics/filters/FilterEffect.h
trunk/Source/WebCore/platform/graphics/filters/SourceAlpha.cpp
trunk/Source/WebCore/platform/graphics/filters/SourceAlpha.h
trunk/Source/WebCore/rendering/CSSFilter.cpp
trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp
trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp
trunk/Source/WebCore/svg/SVGFEBlendElement.cpp
trunk/Source/WebCore/svg/SVGFEBlendElement.h
trunk/Source/WebCore/svg/SVGFEColorMatrixElement.cpp
trunk/Source/WebCore/svg/SVGFEColorMatrixElement.h
trunk/Source/WebCore/svg/SVGFEComponentTransferElement.cpp
trunk/Source/WebCore/svg/SVGFEComponentTransferElement.h
trunk/Source/WebCore/svg/SVGFECompositeElement.cpp
trunk/Source/WebCore/svg/SVGFECompositeElement.h
trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp
trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.h
trunk/Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp
trunk/Source/WebCore/svg/SVGFEDiffuseLightingElement.h
trunk/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp
trunk/Source/WebCore/svg/SVGFEDisplacementMapElement.h
trunk/Source/WebCore/svg/SVGFEDistantLightElement.cpp
trunk/Source/WebCore/svg/SVGFEDistantLightElement.h
trunk/Source/WebCore/svg/SVGFEDropShadowElement.cpp
trunk/Source/WebCore/svg/SVGFEDropShadowElement.h
trunk/Source/WebCore/svg/SVGFEFloodElement.cpp
trunk/Source/WebCore/svg/SVGFEFloodElement.h
trunk/Source/WebCore/svg/SVGFEGaussianBlurElement.cpp
trunk/Source/WebCore/svg/SVGFEGaussianBlurElement.h
trunk/Source/WebCore/svg/SVGFEImageElement.cpp
trunk/Source/WebCore/svg/SVGFEImageElement.h
trunk/Source/WebCore/svg/SVGFELightElement.h
trunk/Source/WebCore/svg/SVGFEMergeElement.cpp
trunk/Source/WebCore/svg/SVGFEMergeElement.h
trunk/Source/WebCore/svg/SVGFEMorphologyElement.cpp
trunk/Source/WebCore/svg/SVGFEMorphologyElement.h
trunk/Source/WebCore/svg/SVGFEOffsetElement.cpp
trunk/Source/WebCore/svg/SVGFEOffsetElement.h
trunk/Source/WebCore/svg/SVGFEPointLightElement.cpp
trunk/Source/WebCore/svg/SVGFEPointLightElement.h
trunk/Source/WebCore/svg/SVGFESpecularLightingElement.cpp
trunk/Source/WebCore/svg/SVGFESpecularLightingElement.h
trunk/Source/WebCore/svg/SVGFESpotLightElement.cpp
trunk/Source/WebCore/svg/SVGFESpotLightElement.h
trunk/Source/WebCore/svg/SVGFETileElement.cpp
trunk/Source/WebCore/svg/SVGFETileElement.h
trunk/Source/WebCore/svg/SVGFETurbulenceElement.cpp
trunk/Source/WebCore/svg/SVGFETurbulenceElement.h
trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
trunk/Source/WebCore/svg/graphics/filters/SVGFilter.cpp
trunk/Source/WebCore/svg/graphics/filters/SVGFilter.h
trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp
trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (287891 => 287892)

--- trunk/Source/WebCore/ChangeLog	2022-01-11 18:53:40 UTC (rev 287891)
+++ trunk/Source/WebCore/ChangeLog	2022-01-11 20:30:16 UTC (rev 287892)
@@ -1,3 +1,146 @@
+2022-01-11  Said Abou-Hallawa  
+
+[GPU Process] Remove the dependency from FilterEffect to its inputs
+https://bugs.webkit.org/show_bug.cgi?id=232841
+rdar://85425930
+
+Reviewed by Darin Adler.
+
+This is the last clean-up in the FilterEffect code. It will make the 
+FilterEffect objects in the GPUProcess resemble exactly their counterpart
+ones in the WebProcess from now

[webkit-changes] [287911] trunk

2022-01-11 Thread said
Title: [287911] trunk








Revision 287911
Author s...@apple.com
Date 2022-01-11 23:49:25 -0800 (Tue, 11 Jan 2022)


Log Message
[GPU Process] Make SVG resources create remote ImageBuffers for their drawing
https://bugs.webkit.org/show_bug.cgi?id=235073
rdar://87402419

Reviewed by Darin Adler.

Source/WebCore:

Pass a hostWindow when calling SVGRenderingContext::createImageBuffer().

* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyClippingToContext):
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::createMaskAndSwapContextForTextGradient):
(WebCore::clipToTextMask):
(WebCore::RenderSVGResourceGradient::applyResource):
(WebCore::RenderSVGResourceGradient::postApplyResource):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applyResource):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::createTileImage const):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::createImageBuffer):
* rendering/svg/SVGRenderingContext.h:
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::imageBufferForEffect const):

Source/WebKit:

* GPUProcess/graphics/QualifiedResourceHeap.h:
(WebKit::QualifiedResourceHeap::get const):
Do not assert here if the entry of the HashMap does not hold a variant
of the required type. We already return nullptr without assertion if there
is no entry for the required renderingResourceIdentifier. We should let
the caller decides what to do in the case of error.

LayoutTests:

* gpu-process/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/gpu-process/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp
trunk/Source/WebCore/rendering/svg/RenderSVGResourceGradient.cpp
trunk/Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp
trunk/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp
trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp
trunk/Source/WebCore/rendering/svg/SVGRenderingContext.h
trunk/Source/WebCore/svg/SVGFEImageElement.cpp
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/GPUProcess/graphics/QualifiedResourceHeap.h




Diff

Modified: trunk/LayoutTests/ChangeLog (287910 => 287911)

--- trunk/LayoutTests/ChangeLog	2022-01-12 07:17:33 UTC (rev 287910)
+++ trunk/LayoutTests/ChangeLog	2022-01-12 07:49:25 UTC (rev 287911)
@@ -1,3 +1,13 @@
+2022-01-11  Said Abou-Hallawa  
+
+[GPU Process] Make SVG resources create remote ImageBuffers for their drawing
+https://bugs.webkit.org/show_bug.cgi?id=235073
+rdar://87402419
+
+Reviewed by Darin Adler.
+
+* gpu-process/TestExpectations:
+
 2022-01-11  Diego Pino Garcia  
 
 [GLIB] Unreviewed test gardening, emit baseline for WPT test websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-getting.html


Modified: trunk/LayoutTests/gpu-process/TestExpectations (287910 => 287911)

--- trunk/LayoutTests/gpu-process/TestExpectations	2022-01-12 07:17:33 UTC (rev 287910)
+++ trunk/LayoutTests/gpu-process/TestExpectations	2022-01-12 07:49:25 UTC (rev 287911)
@@ -120,7 +120,6 @@
 imported/blink/svg/as-image/svg-as-image-object-fit-contain.html
 imported/blink/svg/as-image/svg-as-image-object-fit-cover.html
 imported/blink/svg/as-image/svgview-references.html
-imported/blink/svg/custom/fill-fallback-currentcolor-1.svg
 imported/blink/svg/text/obb-paintserver.html
 imported/mozilla/svg/as-image/background-resize-3.html
 imported/mozilla/svg/as-image/background-resize-4.html
@@ -128,25 +127,9 @@
 imported/mozilla/svg/as-image/img-simple-3.html
 imported/mozilla/svg/as-image/img-simple-5.html
 imported/mozilla/svg/as-image/img-simple-7.html
-imported/mozilla/svg/blend-color-burn.svg
-imported/mozilla/svg/blend-saturation.svg
-imported/mozilla/svg/filters/feComposite-2.svg
-imported/mozilla/svg/filters/feFlood-1.svg
-imported/mozilla/svg/filters/feFlood-2.svg
-imported/mozilla/svg/filters/feImage-1.svg
 imported/mozilla/svg/linearGradient-basic-03.svg
-imported/mozilla/svg/mask-basic-02.svg
-imported/mozilla/svg/mask-basic-03.svg
-imported/mozilla/svg/mask-type-01.svg
-imported/mozilla/svg/objectBoundingBox-and-mask.svg
-imported/mozilla/svg/opacity-and-gradient-02.svg
-imported/mozilla/svg/path-02.svg
-imported/mozilla/svg/svg-integration/clipPath-html-03.xhtml
+imported/mozilla/svg/pattern-transformed-01.svg
 imported/mozilla/svg/text-gradient-01.svg
-imported/mozilla/svg/text/clipPath-content.svg
-imported/mozilla/svg/text/mask-applied.svg
-imported/mozilla/svg/text/mask-content-2.svg
-imported/mozilla/svg/text/mask-content.svg
 imported/w3c/web-platform-tests/compat/webkit-background-origin-text.html
 imported/w3c/web-platform-tests/compat/webkit-linear-gradient-line-bottom.html
 imported/w3c/web-platform-tests/compat/webkit-linear-gradient-line-left.html
@@ -516,72 +499,14 @@
 imported/w3c/web-platform-tests/svg/extensibility/foreignObject/masked.html
 

[webkit-changes] [287982] trunk

2022-01-13 Thread said
Title: [287982] trunk








Revision 287982
Author s...@apple.com
Date 2022-01-13 10:58:47 -0800 (Thu, 13 Jan 2022)


Log Message
Referenced SVG filter uses always sRGB color space for its result
https://bugs.webkit.org/show_bug.cgi?id=235159

Reviewed by Simon Fraser.

Source/WebCore:

Do not setOperatingColorSpace() of the lastEffect() of the referenced
SVGFilter to DestinationColorSpace::SRGB(). This will have the pixels
of the result FilterImage of the lastEffect() in the color space which
is defined by the color-interpolation style of the effect SVGElement.

Test: css3/filters/reference-filter-color-space.html

* platform/graphics/filters/Filter.h:
* rendering/CSSFilter.cpp:
(WebCore::CSSFilter::create):
Move checking the CoreImage support to this function.

(WebCore::CSSFilter::buildFilterFunctions):
Remove resetting m_functions and m_outsets from this function since it
is now called only once from CSSFilter::create().

(WebCore::CSSFilter::lastEffect const): Deleted.
* rendering/CSSFilter.h:
* svg/graphics/filters/SVGFilter.h:

LayoutTests:

The new test defines a  effect with linear component
functions. The values of these functions make the lookup tables have zeros
in the first 65 elements. The test applies the filter to a  with green
background.

-- With sRGB color-space, the green channel value is 0x80. So the value
   in the lookup table is not zero. So the result filter image in this
   case is a some green square.

-- With linearRGB color-space , the green channel value is 0x37. So the
   value in the lookup table is zero. So the result filter image in this
   case is a black square.

Because the color-space will be linearRGB, the expected test case should
have black squares.

* css3/filters/reference-filter-color-space-expected.html: Added.
* css3/filters/reference-filter-color-space.html: Added.

* css3/filters/reference-filter-set-filter-regions.html:
* fast/gradients/conic-gradient-alpha-unpremultiplied.html:
* fast/gradients/conic-gradient-extended-stops.html:
* fast/gradients/conic-gradient.html:
* fast/gradients/conic-repeating-last-stop.html:
* fast/hidpi/filters-turbulence.html:
Add color-interpolation-filters="sRGB" to get the old result so they match
the expected pages.

* platform/win/TestExpectations:
LinearSRGB color space is not supported on Windows.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/css3/filters/reference-filter-set-filter-regions.html
trunk/LayoutTests/fast/gradients/conic-gradient-alpha-unpremultiplied.html
trunk/LayoutTests/fast/gradients/conic-gradient-extended-stops.html
trunk/LayoutTests/fast/gradients/conic-gradient.html
trunk/LayoutTests/fast/gradients/conic-repeating-last-stop.html
trunk/LayoutTests/fast/hidpi/filters-turbulence.html
trunk/LayoutTests/platform/win/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/filters/Filter.h
trunk/Source/WebCore/rendering/CSSFilter.cpp
trunk/Source/WebCore/rendering/CSSFilter.h
trunk/Source/WebCore/svg/graphics/filters/SVGFilter.h


Added Paths

trunk/LayoutTests/css3/filters/reference-filter-color-space-expected.html
trunk/LayoutTests/css3/filters/reference-filter-color-space.html




Diff

Modified: trunk/LayoutTests/ChangeLog (287981 => 287982)

--- trunk/LayoutTests/ChangeLog	2022-01-13 18:21:34 UTC (rev 287981)
+++ trunk/LayoutTests/ChangeLog	2022-01-13 18:58:47 UTC (rev 287982)
@@ -1,3 +1,41 @@
+2022-01-13  Said Abou-Hallawa  
+
+Referenced SVG filter uses always sRGB color space for its result
+https://bugs.webkit.org/show_bug.cgi?id=235159
+
+Reviewed by Simon Fraser.
+
+The new test defines a  effect with linear component
+functions. The values of these functions make the lookup tables have zeros
+in the first 65 elements. The test applies the filter to a  with green
+background. 
+
+-- With sRGB color-space, the green channel value is 0x80. So the value
+   in the lookup table is not zero. So the result filter image in this 
+   case is a some green square.
+
+-- With linearRGB color-space , the green channel value is 0x37. So the
+   value in the lookup table is zero. So the result filter image in this
+   case is a black square. 
+
+Because the color-space will be linearRGB, the expected test case should
+have black squares.
+
+* css3/filters/reference-filter-color-space-expected.html: Added.
+* css3/filters/reference-filter-color-space.html: Added.
+
+* css3/filters/reference-filter-set-filter-regions.html:
+* fast/gradients/conic-gradient-alpha-unpremultiplied.html:
+* fast/gradients/conic-gradient-extended-stops.html:
+* fast/gradients/conic-gradient.html:
+* fast/gradients/conic-repeating-last-stop.html:
+* fast/hidpi/filters-turbulence.html:
+Add color-interpolation-filters="sRGB" to get the old result so they match
+   

[webkit-changes] [288183] trunk

2022-01-19 Thread said
Title: [288183] trunk








Revision 288183
Author s...@apple.com
Date 2022-01-19 00:37:08 -0800 (Wed, 19 Jan 2022)


Log Message
filterRegion and outsets of referenced SVG filter are calculated incorrectly
https://bugs.webkit.org/show_bug.cgi?id=235338

Reviewed by Darin Adler.

Source/WebCore:

Calculate the filterRegion of the referenced SVGFilter by calling
SVGLengthContext::resolveRectangle() given the targetBoundingBox of the
CSSFilter.

There is no need to set the filterRegion of the referenced SVG filter
from CSSFilter::setFilterRegion() since its filterRegion is the union
of the filterRegions all its referenced SVGFilters.

Calculate the outsets of the SVGFilter by looping through its _expression_
of FilterEffects.

Test: css3/filters/reference-filter-outsets.html

* platform/graphics/filters/FEDropShadow.cpp:
(WebCore::FEDropShadow::outsets const):
* platform/graphics/filters/FEDropShadow.h:
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::outsets const):
* platform/graphics/filters/FEGaussianBlur.h:
* platform/graphics/filters/FEOffset.cpp:
(WebCore::FEOffset::outsets const):
* platform/graphics/filters/FEOffset.h:
* platform/graphics/filters/Filter.h:
* platform/graphics/filters/FilterFunction.h:
(WebCore::FilterFunction::outsets const):
* rendering/CSSFilter.cpp:
(WebCore::createSVGFilter):
(WebCore::CSSFilter::setFilterRegion):
(WebCore::CSSFilter::outsets const):
* rendering/CSSFilter.h:
* rendering/RenderLayerFilters.cpp:
(WebCore::RenderLayerFilters::beginFilterEffect):
* svg/graphics/filters/SVGFilter.cpp:
(WebCore::SVGFilter::create):
(WebCore::SVGFilter::outsets const):
(WebCore::SVGFilter::lastEffect const): Deleted.
* svg/graphics/filters/SVGFilter.h:

LayoutTests:

* css3/filters/reference-filter-outsets-expected.html: Added.
* css3/filters/reference-filter-outsets.html: Added.

* css3/filters/reference-filter-set-filter-regions-expected.html:
* css3/filters/reference-filter-set-filter-regions.html:
The original expected page is wrong. To test the referenced SVG filter
correctly, the  element needs to move such that all its outsets are
not truncated.

* platform/win/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/css3/filters/reference-filter-set-filter-regions-expected.html
trunk/LayoutTests/css3/filters/reference-filter-set-filter-regions.html
trunk/LayoutTests/platform/win/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/filters/FEDropShadow.cpp
trunk/Source/WebCore/platform/graphics/filters/FEDropShadow.h
trunk/Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp
trunk/Source/WebCore/platform/graphics/filters/FEGaussianBlur.h
trunk/Source/WebCore/platform/graphics/filters/FEOffset.cpp
trunk/Source/WebCore/platform/graphics/filters/FEOffset.h
trunk/Source/WebCore/platform/graphics/filters/Filter.h
trunk/Source/WebCore/platform/graphics/filters/FilterFunction.h
trunk/Source/WebCore/rendering/CSSFilter.cpp
trunk/Source/WebCore/rendering/CSSFilter.h
trunk/Source/WebCore/rendering/RenderLayerFilters.cpp
trunk/Source/WebCore/svg/graphics/filters/SVGFilter.cpp
trunk/Source/WebCore/svg/graphics/filters/SVGFilter.h


Added Paths

trunk/LayoutTests/css3/filters/reference-filter-outsets-expected.html
trunk/LayoutTests/css3/filters/reference-filter-outsets.html




Diff

Modified: trunk/LayoutTests/ChangeLog (288182 => 288183)

--- trunk/LayoutTests/ChangeLog	2022-01-19 07:51:32 UTC (rev 288182)
+++ trunk/LayoutTests/ChangeLog	2022-01-19 08:37:08 UTC (rev 288183)
@@ -1,3 +1,21 @@
+2022-01-19  Said Abou-Hallawa  
+
+filterRegion and outsets of referenced SVG filter are calculated incorrectly
+https://bugs.webkit.org/show_bug.cgi?id=235338
+
+Reviewed by Darin Adler.
+
+* css3/filters/reference-filter-outsets-expected.html: Added.
+* css3/filters/reference-filter-outsets.html: Added.
+
+* css3/filters/reference-filter-set-filter-regions-expected.html:
+* css3/filters/reference-filter-set-filter-regions.html:
+The original expected page is wrong. To test the referenced SVG filter
+correctly, the  element needs to move such that all its outsets are
+not truncated.
+
+* platform/win/TestExpectations:
+
 2022-01-18  Jon Lee  
 
 Unreviewed gardening of GPU Process bot tests.


Added: trunk/LayoutTests/css3/filters/reference-filter-outsets-expected.html (0 => 288183)

--- trunk/LayoutTests/css3/filters/reference-filter-outsets-expected.html	(rev 0)
+++ trunk/LayoutTests/css3/filters/reference-filter-outsets-expected.html	2022-01-19 08:37:08 UTC (rev 288183)
@@ -0,0 +1,35 @@
+
+.container {
+width: 90px;
+height: 90px;
+display: inline-block;
+background-color: black;
+margin: 10px;
+}
+.box {
+width: 100px;
+height: 100px;
+display: inline-block;
+background-color:

[webkit-changes] [288240] trunk/Source

2022-01-19 Thread said
Title: [288240] trunk/Source








Revision 288240
Author s...@apple.com
Date 2022-01-19 13:38:24 -0800 (Wed, 19 Jan 2022)


Log Message
[GPU Process] ImageBuffer::convertToLuminanceMask() and transformToColorSpace() should not access the backend in WebProcess
https://bugs.webkit.org/show_bug.cgi?id=235305
rdar://83437815

Reviewed by Sam Weinig.

Source/WebCore:

When DOM rendering is handled in GPU Process, no backend access will be
allowed. So all the operations that require access to the backend should
be handled in GPU Process. The WebProcess will stream messages for these
operations to GPUProcess.

* platform/graphics/displaylists/DisplayListRecorder.h:
* platform/graphics/displaylists/DisplayListRecorderImpl.h:

Source/WebKit:

* GPUProcess/graphics/RemoteDisplayListRecorder.cpp:
(WebKit::RemoteDisplayListRecorder::convertToLuminanceMask):
(WebKit::RemoteDisplayListRecorder::transformToColorSpace):
* GPUProcess/graphics/RemoteDisplayListRecorder.h:
* GPUProcess/graphics/RemoteDisplayListRecorder.messages.in:
* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::convertToLuminanceMask):
(WebKit::RemoteDisplayListRecorderProxy::transformToColorSpace):
* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
* WebProcess/GPU/graphics/RemoteImageBufferProxy.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp
trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h
trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (288239 => 288240)

--- trunk/Source/WebCore/ChangeLog	2022-01-19 21:35:02 UTC (rev 288239)
+++ trunk/Source/WebCore/ChangeLog	2022-01-19 21:38:24 UTC (rev 288240)
@@ -1,3 +1,19 @@
+2022-01-19  Said Abou-Hallawa  
+
+[GPU Process] ImageBuffer::convertToLuminanceMask() and transformToColorSpace() should not access the backend in WebProcess
+https://bugs.webkit.org/show_bug.cgi?id=235305
+rdar://83437815
+
+Reviewed by Sam Weinig.
+
+When DOM rendering is handled in GPU Process, no backend access will be 
+allowed. So all the operations that require access to the backend should
+be handled in GPU Process. The WebProcess will stream messages for these
+operations to GPUProcess.
+
+* platform/graphics/displaylists/DisplayListRecorder.h:
+* platform/graphics/displaylists/DisplayListRecorderImpl.h:
+
 2022-01-19  Yusuke Suzuki  
 
 Do not use pas utils outside of libpas


Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h (288239 => 288240)

--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h	2022-01-19 21:35:02 UTC (rev 288239)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h	2022-01-19 21:38:24 UTC (rev 288240)
@@ -60,6 +60,8 @@
 
 virtual void getPixelBuffer(const PixelBufferFormat& outputFormat, const IntRect& sourceRect) = 0;
 virtual void putPixelBuffer(const PixelBuffer&, const IntRect& srcRect, const IntPoint& destPoint, AlphaPremultiplication destFormat) = 0;
+virtual void convertToLuminanceMask() = 0;
+virtual void transformToColorSpace(const DestinationColorSpace&) = 0;
 virtual void flushContext(GraphicsContextFlushIdentifier) = 0;
 
 protected:


Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h (288239 => 288240)

--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h	2022-01-19 21:35:02 UTC (rev 288239)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h	2022-01-19 21:38:24 UTC (rev 288240)
@@ -54,8 +54,10 @@
 virtual RenderingMode renderingMode() const { return RenderingMode::Unaccelerated; }
 };
 
-WEBCORE_EXPORT void getPixelBuffer(const PixelBufferFormat& outputFormat, const IntRect& sourceRect) final;
-WEBCORE_EXPORT void putPixelBuffer(const PixelBuffer&, const IntRect& srcRect, const IntPoint& destPoint, AlphaPremultiplication destFormat) final;
+void getPixelBuffer(const PixelBufferFormat& outputFormat, const IntRect& sourceRect) final;
+void putPixelBuffer(const PixelBuffer&, const IntRect& srcRect, const IntPoint& destPoint, AlphaPremultiplication destFormat) final;
+void convertToLuminanceMask() final { }
+void transformToColorSpace(const DestinationColorSpace&) fina

[webkit-changes] [288249] trunk/LayoutTests

2022-01-19 Thread said
Title: [288249] trunk/LayoutTests








Revision 288249
Author s...@apple.com
Date 2022-01-19 16:10:43 -0800 (Wed, 19 Jan 2022)


Log Message
Unreviewed test gardening after after r288183

* platform/win/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/win/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (288248 => 288249)

--- trunk/LayoutTests/ChangeLog	2022-01-19 23:53:50 UTC (rev 288248)
+++ trunk/LayoutTests/ChangeLog	2022-01-20 00:10:43 UTC (rev 288249)
@@ -1,3 +1,9 @@
+2022-01-19  Said Abou-Hallawa  
+
+Unreviewed test gardening after after r288183
+
+* platform/win/TestExpectations:
+
 2022-01-19  Chris Dumez  
 
 [ iOS EWS ] imported/w3c/web-platform-tests/dom/events/focus-event-document-move.html is a constant text failure


Modified: trunk/LayoutTests/platform/win/TestExpectations (288248 => 288249)

--- trunk/LayoutTests/platform/win/TestExpectations	2022-01-19 23:53:50 UTC (rev 288248)
+++ trunk/LayoutTests/platform/win/TestExpectations	2022-01-20 00:10:43 UTC (rev 288249)
@@ -128,6 +128,7 @@
 webkit.org/b/74716 css3/masking/clip-path-filter.html [ Skip ]
 webkit.org/b/74716 css3/filters/backdrop [ Skip ]
 webkit.org/b/74716 css3/filters/reference-filter-set-filter-regions.html [ Skip ]
+webkit.org/b/74716 css3/filters/reference-filter-outsets.html [ Skip ]
 
 # platformLayerTreeAsText is only implemented for Cocoa ports.
 fast/harness/platform-layer-tree-as-text.html [ Skip ]






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [288352] trunk/Source

2022-01-20 Thread said
hic.cpp
trunk/Source/WebCore/platform/graphics/filters/SourceGraphic.h
trunk/Source/WebCore/rendering/CSSFilter.cpp
trunk/Source/WebCore/rendering/CSSFilter.h
trunk/Source/WebCore/rendering/RenderLayer.cpp
trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp
trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp
trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.h
trunk/Source/WebCore/svg/graphics/filters/SVGFilter.cpp
trunk/Source/WebCore/svg/graphics/filters/SVGFilter.h




Diff

Modified: trunk/Source/WTF/ChangeLog (288351 => 288352)

--- trunk/Source/WTF/ChangeLog	2022-01-21 04:54:27 UTC (rev 288351)
+++ trunk/Source/WTF/ChangeLog	2022-01-21 06:15:14 UTC (rev 288352)
@@ -1,3 +1,19 @@
+2022-01-20  Said Abou-Hallawa  
+
+[Cocoa] Accelerated filters are enabled by the wrong setting
+https://bugs.webkit.org/show_bug.cgi?id=235376
+
+Reviewed by Simon Fraser.
+
+Delete ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER and use USE_CORE_IMAGE
+instead since CoreImage is only used for filters right now. Besides 
+CoreImage filters will be enabled by the internal feature control flag
+AcceleratedFiltersEnabled.
+
+* Scripts/Preferences/WebPreferencesExperimental.yaml:
+* Scripts/Preferences/WebPreferencesInternal.yaml:
+* wtf/PlatformEnableCocoa.h:
+
 2022-01-19  Yusuke Suzuki  
 
 [JSC] Implement Temporal.Now.instant()


Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml (288351 => 288352)

--- trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml	2022-01-21 04:54:27 UTC (rev 288351)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml	2022-01-21 06:15:14 UTC (rev 288352)
@@ -409,20 +409,6 @@
 WebCore:
   default: false
 
-CoreImageAcceleratedFilterRenderEnabled:
-  type: bool
-  webcoreOnChange: setNeedsRelayoutAllFrames
-  humanReadableName: "CoreImage-Accelerated Filter Rendering"
-  humanReadableDescription: "Accelerated CSS and SVG filter rendering using CoreImage"
-  condition: ENABLE(CORE_IMAGE_ACCELERATED_FILTER_RENDER)
-  defaultValue:
-WebKitLegacy:
-  default: false
-WebKit:
-  default: false
-WebCore:
-  default: false
-
 CoreMathMLEnabled:
   type: bool
   webcoreOnChange: setNeedsRecalcStyleInAllFrames


Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml (288351 => 288352)

--- trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml	2022-01-21 04:54:27 UTC (rev 288351)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml	2022-01-21 06:15:14 UTC (rev 288352)
@@ -26,6 +26,20 @@
 # They must include a humanReadableName and humanReadableDescription. This is
 #   the text exposed to the user from the WebKit client.
 
+AcceleratedFiltersEnabled:
+  type: bool
+  webcoreOnChange: setNeedsRelayoutAllFrames
+  humanReadableName: "Accelerated Filter Rendering"
+  humanReadableDescription: "Accelerated CSS and SVG filter rendering"
+  condition: USE(CORE_IMAGE)
+  defaultValue:
+WebKitLegacy:
+  default: false
+WebKit:
+  default: false
+WebCore:
+  default: false
+
 # FIXME: This is not relevent for WebKitLegacy, so should be excluded from WebKitLegacy entirely.
 AllowViewportShrinkToFitContent:
   type: bool


Modified: trunk/Source/WTF/wtf/PlatformEnableCocoa.h (288351 => 288352)

--- trunk/Source/WTF/wtf/PlatformEnableCocoa.h	2022-01-21 04:54:27 UTC (rev 288351)
+++ trunk/Source/WTF/wtf/PlatformEnableCocoa.h	2022-01-21 06:15:14 UTC (rev 288352)
@@ -171,10 +171,6 @@
 #define ENABLE_CONTEXT_MENU_EVENT 0
 #endif
 
-#if !defined(ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER)
-#define ENABLE_CORE_IMAGE_ACCELERATED_FILTER_RENDER 1
-#endif
-
 #if !defined(ENABLE_CSS_COMPOSITING)
 #define ENABLE_CSS_COMPOSITING 1
 #endif


Modified: trunk/Source/WebCore/ChangeLog (288351 => 288352)

--- trunk/Source/WebCore/ChangeLog	2022-01-21 04:54:27 UTC (rev 288351)
+++ trunk/Source/WebCore/ChangeLog	2022-01-21 06:15:14 UTC (rev 288352)
@@ -1,3 +1,141 @@
+2022-01-20  Said Abou-Hallawa  
+
+[Cocoa] Accelerated filters are enabled by the wrong setting
+https://bugs.webkit.org/show_bug.cgi?id=235376
+
+Reviewed by Simon Fraser.
+
+This patch does the following:
+
+1. Delete the setting AcceleratedFiltersEnabled since it has not been
+   enabled by any port.
+2. Delete CoreImageAcceleratedFilterRenderEnabled from the experimental
+   features list because CoreImage filters are not ready to be run in
+   the layout tests.
+3. Add AcceleratedFiltersEnabled as an internal feature and use it to
+   enable CoreImage filters for Cocoa ports.
+   and SourceGraphic::createApplier().
+4. Use "Accelerated" instead of using "CoreImage" in the methods of 
+   Filter and FilterEffect. The imp

[webkit-changes] [288412] trunk/Source

2022-01-22 Thread said
Title: [288412] trunk/Source








Revision 288412
Author s...@apple.com
Date 2022-01-22 17:03:39 -0800 (Sat, 22 Jan 2022)


Log Message
[GPU Process] Add the class 'SourceImage' to represent variants of image
https://bugs.webkit.org/show_bug.cgi?id=235467

Reviewed by Cameron McCormack.

Source/WebCore:

Before the existence of GPUProcess we used to do some drawing on an
ImageBuffer, get a NativeImage from the ImageBuffer and then use this
NativeImage. With GPUProces, this will require bouncing the NativeImage
between WebProcess and GPUProcess at least two times. To make this scenario
efficient, a new class called 'SourceImage' will be introduced. The purpose
of this class is to provide a new level of abstraction for the images
such that no conversion is needed before the actual use.

Replace FEImage::SourceImage with a new class named 'SourceImage'. Let
the new class handle the encoding and decoding and the conversion from
NativeImage to ImageBuffer and vice versa.

Make Recorder::recordResourceUse() returns a boolean which indicates
whether the resource can be cached for later replay or not.

* Headers.cmake:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/Image.h:
(WebCore::Image::nativeImageForCurrentFrame):
(WebCore::Image::preTransformedNativeImageForCurrentFrame):
* platform/graphics/SourceImage.cpp: Added.
(WebCore::SourceImage::SourceImage):
(WebCore::SourceImage::nativeImageIfExists const):
(WebCore::SourceImage::nativeImage):
(WebCore::SourceImage::imageBufferIfExists const):
(WebCore::SourceImage::imageBuffer):
(WebCore::SourceImage::imageIdentifier const):
* platform/graphics/SourceImage.h: Added.
(WebCore::SourceImage::encode const):
(WebCore::SourceImage::decode):
* platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::drawFilteredImageBuffer):
(WebCore::DisplayList::Recorder::drawImageBuffer):
* platform/graphics/displaylists/DisplayListRecorder.h:
* platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
(WebCore::DisplayList::RecorderImpl::recordResourceUse):
* platform/graphics/displaylists/DisplayListRecorderImpl.h:
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::filterEffect const):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::nativeImageForCurrentFrame): Deleted.
* svg/graphics/SVGImage.h:
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::calculateImageRect const):
(WebCore::FEImageSoftwareApplier::apply const):
* svg/graphics/filters/SVGFEImage.h:
(WebCore::FEImage::encode const):
(WebCore::FEImage::decode):

Source/WebKit:

Provide a new recordResourceUse() for the SourceImage.

* GPUProcess/graphics/RemoteDisplayListRecorder.cpp:
(WebKit::RemoteDisplayListRecorder::drawFilteredImageBuffer):
* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::recordResourceUse):
* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Headers.cmake
trunk/Source/WebCore/Sources.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/platform/graphics/Image.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h
trunk/Source/WebCore/svg/SVGFEImageElement.cpp
trunk/Source/WebCore/svg/graphics/SVGImage.cpp
trunk/Source/WebCore/svg/graphics/SVGImage.h
trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp
trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h


Added Paths

trunk/Source/WebCore/platform/graphics/SourceImage.cpp
trunk/Source/WebCore/platform/graphics/SourceImage.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (288411 => 288412)

--- trunk/Source/WebCore/ChangeLog	2022-01-23 00:00:38 UTC (rev 288411)
+++ trunk/Source/WebCore/ChangeLog	2022-01-23 01:03:39 UTC (rev 288412)
@@ -1,3 +1,60 @@
+2022-01-22  Said Abou-Hallawa  
+
+[GPU Process] Add the class 'SourceImage' to represent variants of image
+https://bugs.webkit.org/show_bug.cgi?id=235467
+
+Reviewed by Cameron McCormack.
+
+Before the existence of GPUProcess we used to do some drawing on an 
+ImageBuffer, get a NativeImage from the ImageBuffer and then use this
+NativeImage. With GPUProces, this will require bouncing the NativeImage 
+between WebProcess and GPUProcess at least two times. To make this scenario 
+efficient, a new class called 'SourceImage' will be introduced. The pur

[webkit-changes] [288432] trunk/Source

2022-01-24 Thread said
rce/WebCore/platform/graphics/filters/software/FEColorMatrixSoftwareApplier.h
trunk/Source/WebCore/platform/graphics/filters/software/FEComponentTransferSoftwareApplier.h
trunk/Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareApplier.h
trunk/Source/WebCore/platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.h
trunk/Source/WebCore/platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.h
trunk/Source/WebCore/platform/graphics/filters/software/FEDropShadowSoftwareApplier.h
trunk/Source/WebCore/platform/graphics/filters/software/FEFloodSoftwareApplier.h
trunk/Source/WebCore/platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.h
trunk/Source/WebCore/platform/graphics/filters/software/FELightingSoftwareApplier.h
trunk/Source/WebCore/platform/graphics/filters/software/FEMergeSoftwareApplier.h
trunk/Source/WebCore/platform/graphics/filters/software/FEMorphologySoftwareApplier.h
trunk/Source/WebCore/platform/graphics/filters/software/FEOffsetSoftwareApplier.h
trunk/Source/WebCore/platform/graphics/filters/software/FETileSoftwareApplier.h
trunk/Source/WebCore/platform/graphics/filters/software/FETurbulenceSoftwareApplier.h
trunk/Source/WebCore/platform/graphics/filters/software/SourceAlphaSoftwareApplier.h
trunk/Source/WebCore/platform/graphics/filters/software/SourceGraphicSoftwareApplier.h
trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilterPrimitive.cpp
trunk/Source/WebCore/svg/SVGFEImageElement.cpp
trunk/Source/WebCore/svg/SVGFEImageElement.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Platform/IPC/FilterReference.h


Added Paths

trunk/Source/WebCore/platform/graphics/filters/FEImage.cpp
trunk/Source/WebCore/platform/graphics/filters/FEImage.h
trunk/Source/WebCore/platform/graphics/filters/software/FEImageSoftwareApplier.cpp
trunk/Source/WebCore/platform/graphics/filters/software/FEImageSoftwareApplier.h


Removed Paths

trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp
trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (288431 => 288432)

--- trunk/Source/WebCore/ChangeLog	2022-01-24 07:32:16 UTC (rev 288431)
+++ trunk/Source/WebCore/ChangeLog	2022-01-24 08:58:48 UTC (rev 288432)
@@ -1,3 +1,76 @@
+2022-01-24  Said Abou-Hallawa  
+
+[GPU Process] [Filters] Move FEImage to the 'platform' directory
+https://bugs.webkit.org/show_bug.cgi?id=234109
+rdar://86608573
+
+Reviewed by Darin Adler.
+
+Move FEImageSoftwareApplier to separate source and header files. Make all
+the filter applier concrete classes be final and make their overridden 
+'apply()' method be private and final.
+
+* Headers.cmake:
+* Sources.txt:
+* WebCore.xcodeproj/project.pbxproj:
+* platform/graphics/coreimage/FEColorMatrixCoreImageApplier.h:
+* platform/graphics/coreimage/FEComponentTransferCoreImageApplier.h:
+* platform/graphics/coreimage/SourceGraphicCoreImageApplier.h:
+* platform/graphics/displaylists/DisplayListRecorder.cpp:
+* platform/graphics/filters/FEImage.cpp: Renamed from Source/WebCore/svg/graphics/filters/SVGFEImage.cpp.
+(WebCore::FEImage::create):
+(WebCore::FEImage::FEImage):
+(WebCore::FEImage::calculateImageRect const):
+(WebCore::FEImage::createSoftwareApplier const):
+(WebCore::FEImage::externalRepresentation const):
+* platform/graphics/filters/FEImage.h: Renamed from Source/WebCore/svg/graphics/filters/SVGFEImage.h.
+(WebCore::FEImage::encode const):
+(WebCore::FEImage::decode):
+* platform/graphics/filters/software/FEBlendSoftwareApplier.h:
+* platform/graphics/filters/software/FEColorMatrixSoftwareApplier.h:
+* platform/graphics/filters/software/FEComponentTransferSoftwareApplier.h:
+* platform/graphics/filters/software/FECompositeSoftwareApplier.h:
+* platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.h:
+* platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.h:
+(WebCore::FEDisplacementMapSoftwareApplier::byteOffsetOfPixel): Deleted.
+* platform/graphics/filters/software/FEDropShadowSoftwareApplier.h:
+* platform/graphics/filters/software/FEFloodSoftwareApplier.h:
+* platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.h:
+* platform/graphics/filters/software/FEImageSoftwareApplier.cpp: Added.
+(WebCore::FEImageSoftwareApplier::apply const):
+* platform/graphics/filters/software/FEImageSoftwareApplier.h: Copied from Source/WebCore/platform/graphics/coreimage/SourceGraphicCoreImageApplier.h.
+* platform/graphics/filters/software/FELightingSoftwareApplier.h:
+(WebCore::FELightingSoftwareApplier::AlphaWindow::topLeft const): Deleted.
+(WebCore::FELightingSoftwareApplier::AlphaWindow::left const): Deleted.
+(WebC

[webkit-changes] [288847] trunk/Source/WebKit

2022-01-31 Thread said
Title: [288847] trunk/Source/WebKit








Revision 288847
Author s...@apple.com
Date 2022-01-31 14:52:12 -0800 (Mon, 31 Jan 2022)


Log Message
[GPU Process] Remove the resource use counters from the remote resource cache
https://bugs.webkit.org/show_bug.cgi?id=235636

Reviewed by Simon Fraser.

The display list items and the resource management messages are both
communicated from the WebProcess and the GPUProcess through the stream
connection. The resources will be sent to the GPUProcess, consumed by
the display items and then released in the right order. So there is no
need anymore for the resource use counters.

* GPUProcess/graphics/RemoteDisplayListRecorder.cpp:
(WebKit::RemoteDisplayListRecorder::setStateWithQualifiedIdentifiers):
(WebKit::RemoteDisplayListRecorder::clipToImageBufferWithQualifiedIdentifier):
(WebKit::RemoteDisplayListRecorder::drawGlyphsWithQualifiedIdentifier):
(WebKit::RemoteDisplayListRecorder::drawImageBufferWithQualifiedIdentifier):
(WebKit::RemoteDisplayListRecorder::drawNativeImageWithQualifiedIdentifier):
(WebKit::RemoteDisplayListRecorder::drawPatternWithQualifiedIdentifier):
* GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::releaseRemoteResource):
(WebKit::RemoteRenderingBackend::releaseRemoteResourceWithQualifiedIdentifier):
* GPUProcess/graphics/RemoteRenderingBackend.h:
* GPUProcess/graphics/RemoteRenderingBackend.messages.in:
* GPUProcess/graphics/RemoteResourceCache.cpp:
(WebKit::RemoteResourceCache::cacheImageBuffer):
(WebKit::RemoteResourceCache::cacheNativeImage):
(WebKit::RemoteResourceCache::cacheFont):
(WebKit::RemoteResourceCache::releaseRemoteResource):
(WebKit::RemoteResourceCache::ensureResourceUseCounter): Deleted.
(WebKit::RemoteResourceCache::maybeRemoveResource): Deleted.
(WebKit::RemoteResourceCache::recordResourceUse): Deleted.
(WebKit::RemoteResourceCache::updateHasActiveDrawables): Deleted.
* GPUProcess/graphics/RemoteResourceCache.h:
(WebKit::RemoteResourceCache::hasActiveDrawables const):
(): Deleted.
* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::recordResourceUse):
* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::releaseRemoteResource):
(WebKit::RemoteRenderingBackendProxy::recordNativeImageUse): Deleted.
(WebKit::RemoteRenderingBackendProxy::recordFontUse): Deleted.
(WebKit::RemoteRenderingBackendProxy::recordImageBufferUse): Deleted.
* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
* WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp:
(WebKit::RemoteResourceCacheProxy::cacheImageBuffer):
(WebKit::RemoteResourceCacheProxy::cachedImageBuffer const):
(WebKit::RemoteResourceCacheProxy::releaseImageBuffer):
(WebKit::RemoteResourceCacheProxy::recordImageBufferUse):
(WebKit::RemoteResourceCacheProxy::recordNativeImageUse):
(WebKit::RemoteResourceCacheProxy::recordFontUse):
(WebKit::RemoteResourceCacheProxy::releaseNativeImage):
(WebKit::RemoteResourceCacheProxy::clearNativeImageMap):
(WebKit::RemoteResourceCacheProxy::releaseAllRemoteFonts):
(WebKit::RemoteResourceCacheProxy::finalizeRenderingUpdateForFonts):
(WebKit::RemoteResourceCacheProxy::remoteResourceCacheWasDestroyed):
* WebProcess/GPU/graphics/RemoteResourceCacheProxy.h:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp
trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp
trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.h
trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.messages.in
trunk/Source/WebKit/GPUProcess/graphics/RemoteResourceCache.cpp
trunk/Source/WebKit/GPUProcess/graphics/RemoteResourceCache.h
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.h




Diff

Modified: trunk/Source/WebKit/ChangeLog (288846 => 288847)

--- trunk/Source/WebKit/ChangeLog	2022-01-31 22:36:14 UTC (rev 288846)
+++ trunk/Source/WebKit/ChangeLog	2022-01-31 22:52:12 UTC (rev 288847)
@@ -1,3 +1,62 @@
+2022-01-31  Said Abou-Hallawa  
+
+[GPU Process] Remove the resource use counters from the remote resource cache
+https://bugs.webkit.org/show_bug.cgi?id=235636
+
+Reviewed by Simon Fraser.
+
+The display list items and the resource management messages are both
+communicated from the WebProcess and the GPUProcess through the stream
+connection. The resources will be sent to the GPUProcess, consumed by
+the display items and then released in the right order. So there is no
+need anymore for the resource use counters.
+
+* GPUProcess/graphics/RemoteDisplayListRecorder.

[webkit-changes] [288865] trunk

2022-01-31 Thread said
ource/WebCore/platform/graphics/SourceImage.h
trunk/Source/WebCore/platform/graphics/cairo/PatternCairo.cpp
trunk/Source/WebCore/platform/graphics/cg/PatternCG.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListResourceHeap.h
trunk/Source/WebCore/platform/graphics/filters/software/FETileSoftwareApplier.cpp
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
trunk/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/GPUProcess/graphics/QualifiedResourceHeap.h
trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp
trunk/Source/WebKit/GPUProcess/graphics/RemoteResourceCache.cpp
trunk/Source/WebKit/GPUProcess/graphics/RemoteResourceCache.h




Diff

Modified: trunk/LayoutTests/ChangeLog (288864 => 288865)

--- trunk/LayoutTests/ChangeLog	2022-02-01 02:43:09 UTC (rev 288864)
+++ trunk/LayoutTests/ChangeLog	2022-02-01 02:57:22 UTC (rev 288865)
@@ -1,3 +1,15 @@
+2022-01-31  Said Abou-Hallawa  
+
+[GPU Process] Pattern should hold SourceImage which can be converted to a NativeImage only when needed
+https://bugs.webkit.org/show_bug.cgi?id=232411
+
+
+Reviewed by Darin Adler.
+
+Unskip layout tests for gpu process because they are fixed by this change.
+
+* gpu-process/TestExpectations:
+
 2022-01-31  Robert Jenner  
 
 REGRESSION(288052?): editing/execCommand/paste-as-quotation-disconnected-paragraph-ancestor-crash.html makes subsequent test fail, as DumpRenderTree compares to wrong expected result


Modified: trunk/LayoutTests/gpu-process/TestExpectations (288864 => 288865)

--- trunk/LayoutTests/gpu-process/TestExpectations	2022-02-01 02:43:09 UTC (rev 288864)
+++ trunk/LayoutTests/gpu-process/TestExpectations	2022-02-01 02:57:22 UTC (rev 288865)
@@ -245,8 +245,6 @@
 imported/blink/svg/as-image/svg-as-image-object-fit-cover.html
 imported/blink/svg/as-image/svgview-references.html
 imported/blink/svg/custom/fill-fallback-currentcolor-1.svg
-imported/blink/svg/custom/transformed-text-pattern.html [ Crash ]
-imported/blink/svg/custom/viewport-resource-inval.svg [ Crash ]
 imported/blink/svg/text/obb-paintserver.html
 imported/mozilla/svg/as-image/background-resize-3.html
 imported/mozilla/svg/as-image/background-resize-4.html
@@ -261,9 +259,6 @@
 imported/mozilla/svg/blend-saturation.svg
 imported/mozilla/svg/conditions-08.svg [ Crash ]
 imported/mozilla/svg/dynamic-pattern-01.svg [ Crash ]
-imported/mozilla/svg/dynamic-pattern-02.svg [ Crash ]
-imported/mozilla/svg/dynamic-pattern-contents-01.svg [ Crash ]
-imported/mozilla/svg/dynamic-pattern-contents-02.svg [ Crash ]
 imported/mozilla/svg/filters/feComposite-2.svg
 imported/mozilla/svg/filters/feFlood-1.svg
 imported/mozilla/svg/filters/feFlood-2.svg
@@ -270,30 +265,13 @@
 imported/mozilla/svg/filters/feImage-1.svg
 imported/mozilla/svg/linearGradient-basic-03.svg
 imported/mozilla/svg/mask-type-01.svg
-imported/mozilla/svg/objectBoundingBox-and-pattern-01a.svg [ Crash ]
-imported/mozilla/svg/objectBoundingBox-and-pattern-01b.svg [ Crash ]
-imported/mozilla/svg/objectBoundingBox-and-pattern-01c.svg [ Crash ]
-imported/mozilla/svg/objectBoundingBox-and-pattern-02.svg [ Crash ]
-imported/mozilla/svg/objectBoundingBox-and-pattern-03.svg [ Crash ]
 imported/mozilla/svg/opacity-and-gradient-02.svg
 imported/mozilla/svg/paint-order-01.svg
 imported/mozilla/svg/path-02.svg
-imported/mozilla/svg/pattern-basic-01.svg [ Crash ]
-imported/mozilla/svg/pattern-live-01a.svg [ Crash ]
-imported/mozilla/svg/pattern-live-01b.svg [ Crash ]
-imported/mozilla/svg/pattern-scale-01a.svg [ Crash ]
-imported/mozilla/svg/pattern-scale-01b.svg [ Crash ]
-imported/mozilla/svg/pattern-scale-01c.svg [ Crash ]
-imported/mozilla/svg/pattern-transform-presence-01.svg [ Crash ]
 imported/mozilla/svg/pattern-transformed-01.svg
 imported/mozilla/svg/text-gradient-01.svg
 imported/mozilla/svg/text-scale-02.svg
-imported/mozilla/svg/text/mask-content-2.svg [ Crash ]
 imported/mozilla/svg/text/simple-fill-gradient.svg
-imported/mozilla/svg/userSpaceOnUse-and-pattern-01.svg [ Crash ]
-imported/mozilla/svg/viewBox-and-pattern-01.svg [ Crash ]
-imported/mozilla/svg/viewBox-and-pattern-02.svg [ Crash ]
-imported/mozilla/svg/viewBox-and-pattern-03.svg [ Crash ]
 imported/w3c/i18n/bidi/bidi-plaintext-011.html [ Pass ]
 imported/w3c/web-platform-tests/compat/webkit-background-origin-text.html
 imported/w3c/web-platform-tests/compat/webkit-linear-gradient-line-bottom.html
@@ -910,24 +888,7 @@
 imported/w3c/web-platform-tests/mimesniff/mime-types/charset-parameter.window.html
 imported/w3c/web-platform-tests/selection/selection-select-all-move-input-crash.html
 imported/w3c/web-platform-tests/service-workers/service-worker/fe

[webkit-changes] [288977] trunk

2022-02-02 Thread said
Title: [288977] trunk








Revision 288977
Author s...@apple.com
Date 2022-02-02 12:06:00 -0800 (Wed, 02 Feb 2022)


Log Message
REGRESSION(r288865): SourceImage should never sink its ImageBuffer to a NativeImage
https://bugs.webkit.org/show_bug.cgi?id=236005

Reviewed by Simon Fraser.

Source/WebCore:

The r288865 changes SourceImage::nativeImage() such that if the image
variant has an ImageBuffer, it will sink this ImageBuffer into a NativeImage
and return this NativeImage to the caller. This was incorrect change
because this would invalidate the ImageBufferBackend of the SourceImage.

The fix is to copy the ImageBuffer to a NativeImage (DontCopyBackingStore)
and store it into another image variant. This will keep the ImageBuffer
valid and will prevent subsequent conversion if this function is called
multiple times.

Similar changes should be applied to SourceImage::imageBuffer().

Test: svg/custom/pattern-multiple-referencing.html

* platform/graphics/SourceImage.cpp:
(WebCore::nativeImageOf):
(WebCore::SourceImage::nativeImageIfExists const):
(WebCore::SourceImage::nativeImage const):
(WebCore::imageBufferOf):
(WebCore::SourceImage::imageBufferIfExists const):
(WebCore::SourceImage::imageBuffer const):
* platform/graphics/SourceImage.h:

LayoutTests:

* svg/custom/pattern-multiple-referencing-expected.txt: Added.
* svg/custom/pattern-multiple-referencing.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/SourceImage.cpp
trunk/Source/WebCore/platform/graphics/SourceImage.h


Added Paths

trunk/LayoutTests/svg/custom/pattern-multiple-referencing-expected.txt
trunk/LayoutTests/svg/custom/pattern-multiple-referencing.html




Diff

Modified: trunk/LayoutTests/ChangeLog (288976 => 288977)

--- trunk/LayoutTests/ChangeLog	2022-02-02 19:58:13 UTC (rev 288976)
+++ trunk/LayoutTests/ChangeLog	2022-02-02 20:06:00 UTC (rev 288977)
@@ -1,3 +1,13 @@
+2022-02-02  Said Abou-Hallawa  
+
+REGRESSION(r288865): SourceImage should never sink its ImageBuffer to a NativeImage
+https://bugs.webkit.org/show_bug.cgi?id=236005
+
+Reviewed by Simon Fraser.
+
+* svg/custom/pattern-multiple-referencing-expected.txt: Added.
+* svg/custom/pattern-multiple-referencing.html: Added.
+
 2022-02-02  Patrick Griffis  
 
 WPT: Import WebAssembly CSP tests


Added: trunk/LayoutTests/svg/custom/pattern-multiple-referencing-expected.txt (0 => 288977)

--- trunk/LayoutTests/svg/custom/pattern-multiple-referencing-expected.txt	(rev 0)
+++ trunk/LayoutTests/svg/custom/pattern-multiple-referencing-expected.txt	2022-02-02 20:06:00 UTC (rev 288977)
@@ -0,0 +1,3 @@
+This test passes if it doesn't crash.
+
+


Added: trunk/LayoutTests/svg/custom/pattern-multiple-referencing.html (0 => 288977)

--- trunk/LayoutTests/svg/custom/pattern-multiple-referencing.html	(rev 0)
+++ trunk/LayoutTests/svg/custom/pattern-multiple-referencing.html	2022-02-02 20:06:00 UTC (rev 288977)
@@ -0,0 +1,17 @@
+
+This test passes if it doesn't crash.
+
+
+
+
+
+
+
+
+
+
+
+if (window.testRunner)
+testRunner.dumpAsText()
+
+


Modified: trunk/Source/WebCore/ChangeLog (288976 => 288977)

--- trunk/Source/WebCore/ChangeLog	2022-02-02 19:58:13 UTC (rev 288976)
+++ trunk/Source/WebCore/ChangeLog	2022-02-02 20:06:00 UTC (rev 288977)
@@ -1,3 +1,33 @@
+2022-02-02  Said Abou-Hallawa  
+
+REGRESSION(r288865): SourceImage should never sink its ImageBuffer to a NativeImage
+https://bugs.webkit.org/show_bug.cgi?id=236005
+
+Reviewed by Simon Fraser.
+
+The r288865 changes SourceImage::nativeImage() such that if the image
+variant has an ImageBuffer, it will sink this ImageBuffer into a NativeImage
+and return this NativeImage to the caller. This was incorrect change 
+because this would invalidate the ImageBufferBackend of the SourceImage.
+
+The fix is to copy the ImageBuffer to a NativeImage (DontCopyBackingStore) 
+and store it into another image variant. This will keep the ImageBuffer
+valid and will prevent subsequent conversion if this function is called
+multiple times.
+
+Similar changes should be applied to SourceImage::imageBuffer().
+
+Test: svg/custom/pattern-multiple-referencing.html
+
+* platform/graphics/SourceImage.cpp:
+(WebCore::nativeImageOf):
+(WebCore::SourceImage::nativeImageIfExists const):
+(WebCore::SourceImage::nativeImage const):
+(WebCore::imageBufferOf):
+(WebCore::SourceImage::imageBufferIfExists const):
+(WebCore::SourceImage::imageBuffer const):
+* platform/graphics/SourceImage.h:
+
 2022-02-02  Chris Dumez  
 
 Move SharedWorkerThread & SharedWorkerProxy

[webkit-changes] [288991] trunk

2022-02-02 Thread said
Title: [288991] trunk








Revision 288991
Author s...@apple.com
Date 2022-02-02 13:08:41 -0800 (Wed, 02 Feb 2022)


Log Message
[GPU Process] Remove DisplayList::Replayer::Delegate and DisplayList::RecorderImpl::Delegate
https://bugs.webkit.org/show_bug.cgi?id=235939

Reviewed by Wenson Hsieh.

Source/WebCore:

These classes are abstract classes and they are not overridden by any
client right now. These unused classes should be removed after the display
list stream connection refactoring.

* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::displayListForTextRun const):
* platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::changeDestinationImageBuffer): Deleted.
(WebCore::ImageBuffer::prepareToAppendDisplayListItems): Deleted.
* platform/graphics/displaylists/DisplayListDrawingContext.cpp:
(WebCore::DisplayList::DrawingContext::DrawingContext):
* platform/graphics/displaylists/DisplayListDrawingContext.h:
(WebCore::DisplayList::DrawingContext::DrawingContext):
* platform/graphics/displaylists/DisplayListImageBuffer.h:
(WebCore::DisplayList::ImageBuffer::ImageBuffer):
* platform/graphics/displaylists/DisplayListRecorder.h:
* platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
(WebCore::DisplayList::RecorderImpl::RecorderImpl):
(WebCore::DisplayList::RecorderImpl::recordResourceUse):
(WebCore::DisplayList::RecorderImpl::canAppendItemOfType const): Deleted.
(WebCore::DisplayList::RecorderImpl::canDrawImageBuffer const): Deleted.
(WebCore::DisplayList::RecorderImpl::renderingMode const): Deleted.
* platform/graphics/displaylists/DisplayListRecorderImpl.h:
(WebCore::DisplayList::RecorderImpl::append):
(WebCore::DisplayList::RecorderImpl::Delegate::~Delegate): Deleted.
(WebCore::DisplayList::RecorderImpl::Delegate::canAppendItemOfType): Deleted.
(WebCore::DisplayList::RecorderImpl::Delegate::recordNativeImageUse): Deleted.
(WebCore::DisplayList::RecorderImpl::Delegate::isCachedImageBuffer const): Deleted.
(WebCore::DisplayList::RecorderImpl::Delegate::recordFontUse): Deleted.
(WebCore::DisplayList::RecorderImpl::Delegate::recordImageBufferUse): Deleted.
(WebCore::DisplayList::RecorderImpl::Delegate::renderingMode const): Deleted.
* platform/graphics/displaylists/DisplayListReplayer.cpp:
(WebCore::DisplayList::Replayer::Replayer):
(WebCore::DisplayList::applyImageBufferItem):
(WebCore::DisplayList::applyNativeImageItem):
(WebCore::DisplayList::applySetStateItem):
(WebCore::DisplayList::applyFontItem):
(WebCore::DisplayList::Replayer::applyItem):
* platform/graphics/displaylists/DisplayListReplayer.h:
(WebCore::DisplayList::Replayer::Delegate::~Delegate): Deleted.
(WebCore::DisplayList::Replayer::Delegate::apply): Deleted.
(WebCore::DisplayList::Replayer::Delegate::didCreateMaskImageBuffer): Deleted.
(WebCore::DisplayList::Replayer::Delegate::didResetMaskImageBuffer): Deleted.
(WebCore::DisplayList::Replayer::Delegate::recordResourceUse): Deleted.

Source/WebKit:

* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::recordResourceUse):
(WebKit::RemoteDisplayListRecorderProxy::canDrawImageBuffer const): Deleted.
* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

Tools:

* TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:
(TestWebKitAPI::TEST):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/FontCascade.cpp
trunk/Source/WebCore/platform/graphics/ImageBuffer.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListImageBuffer.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (288990 => 288991)

--- trunk/Source/WebCore/ChangeLog	2022-02-02 20:54:14 UTC (rev 288990)
+++ trunk/Source/WebCore/ChangeLog	2022-02-02 21:08:41 UTC (rev 288991)
@@ -1,3 +1,55 @@
+2022-02-02  Said Abou-Hallawa  
+
+[GPU Process] Remove DisplayList::Replayer::Delegate and DisplayList::RecorderImpl::Delegate
+https://bugs.webkit.org/show_bug.cgi?id=235939
+
+Reviewed by Wenson Hsieh.
+
+These classes are abstract classes and they are not overridden by any
+client right now. These unused classes should be removed after the display
+list stream connect

[webkit-changes] [289518] trunk/Source

2022-02-09 Thread said
::drawCellOrFocusRingWithViewIntoContext):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupFilters):
* rendering/RenderLayerBacking.cpp:
(WebCore::patternForDescription):
* rendering/RenderLayerFilters.cpp:
(WebCore::RenderLayerFilters::allocateBackingStoreIfNeeded):
(WebCore::RenderLayerFilters::beginFilterEffect):
* rendering/RenderLayerFilters.h:
* rendering/RenderThemeCocoa.mm:
(WebCore::RenderThemeCocoa::paintApplePayButton):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintListButtonForInput):
(WebCore::RenderThemeMac::paintProgressBar):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyClippingToContext):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::applyResource):
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::createMaskAndSwapContextForTextGradient):
(WebCore::clipToTextMask):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applyResource):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::buildPattern):
(WebCore::RenderSVGResourcePattern::createTileImage const):
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::clipToImageBuffer):
(WebCore::SVGRenderingContext::bufferForeground):
(WebCore::SVGRenderingContext::createImageBuffer): Deleted.
(WebCore::SVGRenderingContext::clear2DRotation): Deleted.
* rendering/svg/SVGRenderingContext.h:
* svg/SVGFEImageElement.cpp:
(WebCore::scaledImageBufferRect):
(WebCore::clampingScaleForImageBufferSize):
(WebCore::createImageBuffer):
(WebCore::SVGFEImageElement::imageBufferForEffect const):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::drawPatternForContainer):

Source/WebKit:

* GPUProcess/graphics/RemoteDisplayListRecorder.cpp:
(WebKit::RemoteDisplayListRecorder::beginClipToDrawingCommands):
* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::createImageBuffer const):
(WebKit::RemoteDisplayListRecorderProxy::createCompatibleImageBuffer const):
* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/CustomPaintCanvas.cpp
trunk/Source/WebCore/html/CustomPaintImage.cpp
trunk/Source/WebCore/html/OffscreenCanvas.cpp
trunk/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp
trunk/Source/WebCore/platform/cocoa/ThemeCocoa.mm
trunk/Source/WebCore/platform/graphics/BitmapImage.cpp
trunk/Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp
trunk/Source/WebCore/platform/graphics/GradientImage.cpp
trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp
trunk/Source/WebCore/platform/graphics/GraphicsContext.h
trunk/Source/WebCore/platform/graphics/ImageBuffer.cpp
trunk/Source/WebCore/platform/graphics/ImageBuffer.h
trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.cpp
trunk/Source/WebCore/platform/graphics/RenderingMode.h
trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp
trunk/Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.cpp
trunk/Source/WebCore/platform/mac/ThemeMac.mm
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
trunk/Source/WebCore/rendering/RenderLayer.cpp
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
trunk/Source/WebCore/rendering/RenderLayerFilters.cpp
trunk/Source/WebCore/rendering/RenderLayerFilters.h
trunk/Source/WebCore/rendering/RenderThemeCocoa.mm
trunk/Source/WebCore/rendering/RenderThemeMac.mm
trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp
trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp
trunk/Source/WebCore/rendering/svg/RenderSVGResourceGradient.cpp
trunk/Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp
trunk/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp
trunk/Source/WebCore/rendering/svg/RenderSVGResourcePattern.h
trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp
trunk/Source/WebCore/rendering/svg/SVGRenderingContext.h
trunk/Source/WebCore/svg/SVGFEImageElement.cpp
trunk/Source/WebCore/svg/graphics/SVGImage.cpp
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (289517 => 289518)

--- trunk/Source/WebCore/ChangeLog	2022-02-10 04:11:48 UTC (rev 289517)
+++ trunk/Source/WebCore/ChangeLog	2022-02-10 05:18:02 UTC (rev 289518)
@@ -1,3 +1,149 @@
+2022-02-09  Said Abou-Hallawa 

[webkit-changes] [289594] trunk/Source

2022-02-10 Thread said
aphics/displaylists/DisplayListRecorder.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.h
trunk/Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp
trunk/Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp
trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h
trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (289593 => 289594)

--- trunk/Source/WebCore/ChangeLog	2022-02-11 00:24:05 UTC (rev 289593)
+++ trunk/Source/WebCore/ChangeLog	2022-02-11 00:27:14 UTC (rev 289594)
@@ -1,3 +1,65 @@
+2022-02-10  Said Abou-Hallawa  
+
+[GPU Process] Delete GraphicsContext::clipToDrawingCommands()
+https://bugs.webkit.org/show_bug.cgi?id=225959
+rdar://78495380
+
+Reviewed by Darin Adler.
+
+This function was added in r267742 as a workaround for a GPUProcess case
+which was happening because ImageBuffer::createCompatibleBuffer() used
+to return in-process ImageBuffer. clipToDrawingCommands() was a way to
+record the clipper mask image into a temporary remote ImageBuffer.
+
+If GraphicsContext::createCompatibleImageBuffer() can create an
+ImageBuffer similar to the underlying ImageBuffer of the GraphicsContext,
+then GraphicsContext::clipToDrawingCommands() is not needed.
+
+* html/canvas/CanvasRenderingContext2DBase.cpp:
+(WebCore::CanvasRenderingContext2DBase::drawTextUnchecked):
+* platform/graphics/GraphicsContext.cpp:
+(WebCore::GraphicsContext::clipToDrawingCommands): Deleted.
+* platform/graphics/GraphicsContext.h:
+* platform/graphics/NullGraphicsContext.h:
+* platform/graphics/displaylists/DisplayList.cpp:
+(WebCore::DisplayList::DisplayList::append):
+* platform/graphics/displaylists/DisplayListItemBuffer.cpp:
+(WebCore::DisplayList::ItemHandle::apply):
+(WebCore::DisplayList::ItemHandle::destroy):
+(WebCore::DisplayList::ItemHandle::safeCopy const):
+* platform/graphics/displaylists/DisplayListItemType.cpp:
+(WebCore::DisplayList::sizeOfItemInBytes):
+(WebCore::DisplayList::isDrawingItem):
+(WebCore::DisplayList::isInlineItem):
+* platform/graphics/displaylists/DisplayListItemType.h:
+* platform/graphics/displaylists/DisplayListItems.cpp:
+(WebCore::DisplayList::operator<<):
+* platform/graphics/displaylists/DisplayListItems.h:
+(WebCore::DisplayList::BeginClipToDrawingCommands::BeginClipToDrawingCommands): Deleted.
+(WebCore::DisplayList::BeginClipToDrawingCommands::~BeginClipToDrawingCommands): Deleted.
+(WebCore::DisplayList::BeginClipToDrawingCommands::destination const): Deleted.
+(WebCore::DisplayList::BeginClipToDrawingCommands::colorSpace const): Deleted.
+(WebCore::DisplayList::BeginClipToDrawingCommands::encode const): Deleted.
+(WebCore::DisplayList::BeginClipToDrawingCommands::decode): Deleted.
+(WebCore::DisplayList::EndClipToDrawingCommands::EndClipToDrawingCommands): Deleted.
+(WebCore::DisplayList::EndClipToDrawingCommands::destination const): Deleted.
+* platform/graphics/displaylists/DisplayListRecorder.cpp:
+(WebCore::DisplayList::Recorder::clipToDrawingCommands): Deleted.
+* platform/graphics/displaylists/DisplayListRecorder.h:
+* platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
+(WebCore::DisplayList::RecorderImpl::~RecorderImpl):
+(WebCore::DisplayList::RecorderImpl::createNestedContext): Deleted.
+(WebCore::DisplayList::RecorderImpl::recordBeginClipToDrawingCommands): Deleted.
+(WebCore::DisplayList::RecorderImpl::recordEndClipToDrawingCommands): Deleted.
+* platform/graphics/displaylists/DisplayListRecorderImpl.h:
+* platform/graphics/displaylists/DisplayListReplayer.cpp:
+(WebCore::DisplayList::Replayer::applyItem):
+(WebCore::DisplayList::Replayer::context const): Deleted.
+* platform/graphics/displaylists/DisplayListReplayer.h:
+* platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
+(Nicosia::CairoOperationRecorder::clipToDrawingCommands): Deleted.
+* platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
+
 2022-02-10  Commit Queue  
 
 Unreviewed, re

[webkit-changes] [289680] trunk/Source/WebKit

2022-02-11 Thread said
Title: [289680] trunk/Source/WebKit








Revision 289680
Author s...@apple.com
Date 2022-02-11 16:42:00 -0800 (Fri, 11 Feb 2022)


Log Message
[GPU Process] [CG] Add an ArgumentCoder for CFCharacterSetRef
https://bugs.webkit.org/show_bug.cgi?id=236507

Reviewed by Sam Weinig.

CFCharacterSetRef is used for encoding and decoding the system fonts.

* Shared/cf/ArgumentCodersCF.cpp:
(IPC::typeFromCFTypeRef):
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder>::decode):
(IPC::ArgumentCoder::encode):
(IPC::ArgumentCoder>::decode):
* Shared/cf/ArgumentCodersCF.h:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp
trunk/Source/WebKit/Shared/cf/ArgumentCodersCF.h




Diff

Modified: trunk/Source/WebKit/ChangeLog (289679 => 289680)

--- trunk/Source/WebKit/ChangeLog	2022-02-11 23:54:39 UTC (rev 289679)
+++ trunk/Source/WebKit/ChangeLog	2022-02-12 00:42:00 UTC (rev 289680)
@@ -1,3 +1,20 @@
+2022-02-11  Said Abou-Hallawa  
+
+[GPU Process] [CG] Add an ArgumentCoder for CFCharacterSetRef
+https://bugs.webkit.org/show_bug.cgi?id=236507
+
+Reviewed by Sam Weinig.
+
+CFCharacterSetRef is used for encoding and decoding the system fonts.
+
+* Shared/cf/ArgumentCodersCF.cpp:
+(IPC::typeFromCFTypeRef):
+(IPC::ArgumentCoder::encode):
+(IPC::ArgumentCoder>::decode):
+(IPC::ArgumentCoder::encode):
+(IPC::ArgumentCoder>::decode):
+* Shared/cf/ArgumentCodersCF.h:
+
 2022-02-11  Megan Gardner  
 
 Enable grammar checking on Mac Catalyst.


Modified: trunk/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp (289679 => 289680)

--- trunk/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp	2022-02-11 23:54:39 UTC (rev 289679)
+++ trunk/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp	2022-02-12 00:42:00 UTC (rev 289680)
@@ -59,6 +59,7 @@
 enum class CFType : uint8_t {
 CFArray,
 CFBoolean,
+CFCharacterSet,
 CFData,
 CFDate,
 CFDictionary,
@@ -93,6 +94,8 @@
 return CFType::CFArray;
 if (typeID == CFBooleanGetTypeID())
 return CFType::CFBoolean;
+if (typeID == CFCharacterSetGetTypeID())
+return CFType::CFCharacterSet;
 if (typeID == CFDataGetTypeID())
 return CFType::CFData;
 if (typeID == CFDateGetTypeID())
@@ -142,6 +145,9 @@
 case CFType::CFBoolean:
 encoder << static_cast(typeRef);
 return;
+case CFType::CFCharacterSet:
+encoder << static_cast(typeRef);
+return;
 case CFType::CFData:
 encoder << static_cast(typeRef);
 return;
@@ -217,6 +223,13 @@
 return std::nullopt;
 return WTFMove(*boolean);
 }
+case CFType::CFCharacterSet: {
+std::optional> characterSet;
+decoder >> characterSet;
+if (!characterSet)
+return std::nullopt;
+return WTFMove(*characterSet);
+}
 case CFType::CFData: {
 std::optional> data;
 decoder >> data;
@@ -399,6 +412,43 @@
 }
 
 template
+void ArgumentCoder::encode(Encoder& encoder, CFCharacterSetRef characterSet)
+{
+auto data = "" characterSet));
+if (!data) {
+encoder << false;
+return;
+}
+
+encoder << true << data;
+}
+
+template void ArgumentCoder::encode(Encoder&, CFCharacterSetRef);
+template void ArgumentCoder::encode(StreamConnectionEncoder&, CFCharacterSetRef);
+
+std::optional> ArgumentCoder>::decode(Decoder& decoder)
+{
+std::optional hasData;
+decoder >> hasData;
+if (!hasData)
+return std::nullopt;
+
+if (!*hasData)
+return { nullptr };
+
+std::optional> data;
+decoder >> data;
+if (!data)
+return std::nullopt;
+
+auto characterSet = adoptCF(CFCharacterSetCreateWithBitmapRepresentation(nullptr, data->get()));
+if (!characterSet)
+return std::nullopt;
+
+return WTFMove(characterSet);
+}
+
+template
 void ArgumentCoder::encode(Encoder& encoder, CFDataRef data)
 {
 encoder << IPC::DataReference(CFDataGetBytePtr(data), CFDataGetLength(data));
@@ -877,6 +927,7 @@
 IPC::CFType,
 IPC::CFType::CFArray,
 IPC::CFType::CFBoolean,
+IPC::CFType::CFCharacterSet,
 IPC::CFType::CFData,
 IPC::CFType::CFDate,
 IPC::CFType::CFDictionary,


Modified: trunk/Source/WebKit/Shared/cf/ArgumentCodersCF.h (289679 => 289680)

--- trunk/Source/WebKit/Shared/cf/ArgumentCodersCF.h	2022-02-11 23:54:39 UTC (rev 289679)
+++ trunk/Source/WebKit/Shared/cf/ArgumentCodersCF.h	2022-02-12 00:42:00 UTC (rev 289680)
@@ -73,6 +73,13 @@
 static std::optional> decode(Decoder&);
 };
 
+template<> struct ArgumentCoder {
+template static void encode(Encoder&, CFCharacterSetRef);
+};
+template<> struct ArgumentCoder> : CFRe

[webkit-changes] [289766] trunk/Source/WebKit

2022-02-14 Thread said
Title: [289766] trunk/Source/WebKit








Revision 289766
Author s...@apple.com
Date 2022-02-14 14:46:48 -0800 (Mon, 14 Feb 2022)


Log Message
[GPU Process] RemoteImageBufferProxy should not sink itself to an Image or a NativeImage though its backend
https://bugs.webkit.org/show_bug.cgi?id=236484

Reviewed by Simon Fraser.

The purpose of sinkIntoImage() and sinkIntoNativeImage() is to reuse the
pixels of an ImageBuffer to be a NativeImage or an Image which encapsulates
a NativeImage.

But for RemoteImageBufferProxy these functions are meaningless because
the pixels (or the backend) can't be accessed in WebProcess.

So to keep the code in WebCore untouched, these two functions will be
overridden by RemoteImageBufferProxy to call the 'copy' methods. The
'copy' methods use the IPC messages to get a NativeImage from GPUProcess.

* WebProcess/GPU/graphics/RemoteImageBufferProxy.h:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h




Diff

Modified: trunk/Source/WebKit/ChangeLog (289765 => 289766)

--- trunk/Source/WebKit/ChangeLog	2022-02-14 22:22:42 UTC (rev 289765)
+++ trunk/Source/WebKit/ChangeLog	2022-02-14 22:46:48 UTC (rev 289766)
@@ -1,3 +1,23 @@
+2022-02-14  Said Abou-Hallawa  
+
+[GPU Process] RemoteImageBufferProxy should not sink itself to an Image or a NativeImage though its backend
+https://bugs.webkit.org/show_bug.cgi?id=236484
+
+Reviewed by Simon Fraser.
+
+The purpose of sinkIntoImage() and sinkIntoNativeImage() is to reuse the
+pixels of an ImageBuffer to be a NativeImage or an Image which encapsulates
+a NativeImage.
+
+But for RemoteImageBufferProxy these functions are meaningless because
+the pixels (or the backend) can't be accessed in WebProcess.
+
+So to keep the code in WebCore untouched, these two functions will be 
+overridden by RemoteImageBufferProxy to call the 'copy' methods. The
+'copy' methods use the IPC messages to get a NativeImage from GPUProcess.
+
+* WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
+
 2022-02-14  Wenson Hsieh  
 
 [Live Text] Plumb platform image analysis objects to the web process


Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h (289765 => 289766)

--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h	2022-02-14 22:22:42 UTC (rev 289765)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h	2022-02-14 22:46:48 UTC (rev 289766)
@@ -198,8 +198,18 @@
 return bitmap->createImage();
 }
 
-RefPtr filteredImage(WebCore::Filter& filter) override
+RefPtr sinkIntoNativeImage() final
 {
+return copyNativeImage();
+}
+
+RefPtr sinkIntoImage(WebCore::PreserveResolution preserveResolution = WebCore::PreserveResolution::No) final
+{
+return copyImage(WebCore::BackingStoreCopy::CopyBackingStore, preserveResolution);
+}
+
+RefPtr filteredImage(WebCore::Filter& filter) final
+{
 if (UNLIKELY(!m_remoteRenderingBackendProxy))
 return { };
 flushDrawingContext();






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [289767] trunk/Source/WebCore

2022-02-14 Thread said
Title: [289767] trunk/Source/WebCore








Revision 289767
Author s...@apple.com
Date 2022-02-14 14:48:41 -0800 (Mon, 14 Feb 2022)


Log Message
[GPU Process] Implement GraphicsContext::drawLineForText() in terms of GraphicsContext::drawLinesForText()
https://bugs.webkit.org/show_bug.cgi?id=236464

Reviewed by Simon Fraser.

Make GraphicsContext::drawLineForText() non virtual and delete all the
super classes' implementations for this function since it calls the virtual
function drawLinesForText().

* platform/graphics/GraphicsContext.h:
* platform/graphics/NullGraphicsContext.h:
* platform/graphics/displaylists/DisplayListRecorder.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/GraphicsContext.h
trunk/Source/WebCore/platform/graphics/NullGraphicsContext.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (289766 => 289767)

--- trunk/Source/WebCore/ChangeLog	2022-02-14 22:46:48 UTC (rev 289766)
+++ trunk/Source/WebCore/ChangeLog	2022-02-14 22:48:41 UTC (rev 289767)
@@ -1,3 +1,18 @@
+2022-02-14  Said Abou-Hallawa  
+
+[GPU Process] Implement GraphicsContext::drawLineForText() in terms of GraphicsContext::drawLinesForText()
+https://bugs.webkit.org/show_bug.cgi?id=236464
+
+Reviewed by Simon Fraser.
+
+Make GraphicsContext::drawLineForText() non virtual and delete all the
+super classes' implementations for this function since it calls the virtual
+function drawLinesForText().
+
+* platform/graphics/GraphicsContext.h:
+* platform/graphics/NullGraphicsContext.h:
+* platform/graphics/displaylists/DisplayListRecorder.h:
+
 2022-02-14  Wenson Hsieh  
 
 [Live Text] Plumb platform image analysis objects to the web process


Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (289766 => 289767)

--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2022-02-14 22:46:48 UTC (rev 289766)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2022-02-14 22:48:41 UTC (rev 289767)
@@ -476,7 +476,7 @@
 }
 
 WEBCORE_EXPORT FloatRect computeUnderlineBoundsForText(const FloatRect&, bool printing);
-WEBCORE_EXPORT virtual void drawLineForText(const FloatRect&, bool printing, bool doubleLines = false, StrokeStyle = SolidStroke);
+WEBCORE_EXPORT void drawLineForText(const FloatRect&, bool printing, bool doubleLines = false, StrokeStyle = SolidStroke);
 virtual void drawLinesForText(const FloatPoint&, float thickness, const DashArray& widths, bool printing, bool doubleLines = false, StrokeStyle = SolidStroke) = 0;
 virtual void drawDotsForDocumentMarker(const FloatRect&, DocumentMarkerLineStyle) = 0;
 


Modified: trunk/Source/WebCore/platform/graphics/NullGraphicsContext.h (289766 => 289767)

--- trunk/Source/WebCore/platform/graphics/NullGraphicsContext.h	2022-02-14 22:46:48 UTC (rev 289766)
+++ trunk/Source/WebCore/platform/graphics/NullGraphicsContext.h	2022-02-14 22:48:41 UTC (rev 289767)
@@ -84,7 +84,6 @@
 void strokeRect(const FloatRect&, float) final { }
 void clipPath(const Path&, WindRule = WindRule::EvenOdd) final { }
 FloatRect roundToDevicePixels(const FloatRect& rect, RoundingMode = RoundAllSides) final { return rect; }
-void drawLineForText(const FloatRect&, bool, bool = false, StrokeStyle = SolidStroke) final { }
 void drawLinesForText(const FloatPoint&, float, const DashArray&, bool, bool = false, StrokeStyle = SolidStroke) final { }
 void setLineCap(LineCap) final { }
 void setLineDash(const DashArray&, float) final { }


Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h (289766 => 289767)

--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h	2022-02-14 22:46:48 UTC (rev 289766)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h	2022-02-14 22:48:41 UTC (rev 289767)
@@ -187,7 +187,6 @@
 #endif
 
 void fillRoundedRectImpl(const FloatRoundedRect&, const Color&) final { ASSERT_NOT_REACHED(); }
-void drawLineForText(const FloatRect&, bool, bool, StrokeStyle) final { ASSERT_NOT_REACHED(); }
 
 WEBCORE_EXPORT const GraphicsContextState& state() const final;
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293659] trunk/Source

2022-05-01 Thread said
Title: [293659] trunk/Source








Revision 293659
Author s...@apple.com
Date 2022-05-01 22:46:18 -0700 (Sun, 01 May 2022)


Log Message
REGRESSION(r282117): RemoteRenderingBackend::willDestroyImageBuffer() can crash if the RemoteRenderingBackend has already been destroyed
https://bugs.webkit.org/show_bug.cgi?id=239107
rdar://91608298

Reviewed by Darin Adler.

Source/WebCore:

-- IOSurfacePool will be RefCounted.

-- ImageBufferIOSurfaceBackend::create() will pass the surfacePool
   of the CreationContext to ImageBufferIOSurfaceBackend constructor.

-- ImageBufferIOSurfaceBackend will hold a RefPtr.

-- ImageBufferIOSurfaceBackend destructor will call IOSurface::moveToPool()
   to return its surface to the IOSurfacePool if it was set.

* platform/graphics/ConcreteImageBuffer.h:
* platform/graphics/ImageBuffer.h:
* platform/graphics/ImageBufferBackend.h:
(WebCore::ImageBufferBackend::releaseGraphicsContext):
(WebCore::ImageBufferBackend::releaseBufferToPool): Deleted.
* platform/graphics/cg/IOSurfacePool.cpp:
(WebCore::IOSurfacePool::create):
* platform/graphics/cg/IOSurfacePool.h:
* platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:
(WebCore::ImageBufferIOSurfaceBackend::create):
(WebCore::ImageBufferIOSurfaceBackend::ImageBufferIOSurfaceBackend):
(WebCore::ImageBufferIOSurfaceBackend::~ImageBufferIOSurfaceBackend):
(WebCore::ImageBufferIOSurfaceBackend::releaseBufferToPool): Deleted.
* platform/graphics/cg/ImageBufferIOSurfaceBackend.h:

Source/WebKit:

After r282117, the assumption that RemoteRenderingBackend will outlive
all its RemoteImageBuffers became wrong. The RemoteRenderingBackend can
get destroyed under GPUConnectionToWebProcess::didClose() before the
callOnMainThread() of the ThreadSafeRefcounted image buffers have run.

This solution is to make the ImageBufferIOSurfaceBackend be responsible
of returning its IOSurface to the IOSurfacePool. So no need to call
willDestroyImageBuffer() from the RemoteImageBuffer destructor.

* GPUProcess/graphics/RemoteGraphicsContextGL.h:
* GPUProcess/graphics/RemoteImageBuffer.h:
(WebKit::RemoteImageBuffer::RemoteImageBuffer):
(WebKit::RemoteImageBuffer::m_renderingResourcesRequest):
(WebKit::RemoteImageBuffer::~RemoteImageBuffer):
* GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::willDestroyImageBuffer): Deleted.
* GPUProcess/graphics/RemoteRenderingBackend.h:
(WebKit::RemoteRenderingBackend::ioSurfacePool const):
* Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::Buffer::discard):
* WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.cpp:
(WebKit::ImageBufferShareableMappedIOSurfaceBackend::create):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/ConcreteImageBuffer.h
trunk/Source/WebCore/platform/graphics/ImageBuffer.h
trunk/Source/WebCore/platform/graphics/ImageBufferBackend.h
trunk/Source/WebCore/platform/graphics/cg/IOSurfacePool.cpp
trunk/Source/WebCore/platform/graphics/cg/IOSurfacePool.h
trunk/Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp
trunk/Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h
trunk/Source/WebKit/GPUProcess/graphics/RemoteImageBuffer.h
trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp
trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.h
trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm
trunk/Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (293658 => 293659)

--- trunk/Source/WebCore/ChangeLog	2022-05-02 01:48:01 UTC (rev 293658)
+++ trunk/Source/WebCore/ChangeLog	2022-05-02 05:46:18 UTC (rev 293659)
@@ -1,3 +1,36 @@
+2022-05-01  Said Abou-Hallawa  
+
+REGRESSION(r282117): RemoteRenderingBackend::willDestroyImageBuffer() can crash if the RemoteRenderingBackend has already been destroyed
+https://bugs.webkit.org/show_bug.cgi?id=239107
+rdar://91608298
+
+Reviewed by Darin Adler.
+
+-- IOSurfacePool will be RefCounted. 
+
+-- ImageBufferIOSurfaceBackend::create() will pass the surfacePool
+   of the CreationContext to ImageBufferIOSurfaceBackend constructor.
+
+-- ImageBufferIOSurfaceBackend will hold a RefPtr.
+
+-- ImageBufferIOSurfaceBackend destructor will call IOSurface::moveToPool()
+   to return its surface to the IOSurfacePool if it was set.
+
+* platform/graphics/ConcreteImageBuffer.h:
+* platform/graphics/ImageBuffer.h:
+* platform/graphics/ImageBufferBackend.h:
+(WebCore::ImageBufferBackend::releaseGraphicsContext):
+(WebCore::ImageBufferBackend::releaseBufferToPool): Deleted.
+* platform/graphics/cg/IOSurfacePool.cpp:
+(WebCore::IOSurfacePool::create):
+* platform/graphics

[webkit-changes] [293825] trunk/Source/WebCore

2022-05-05 Thread said
Title: [293825] trunk/Source/WebCore








Revision 293825
Author s...@apple.com
Date 2022-05-05 01:19:13 -0700 (Thu, 05 May 2022)


Log Message
[GPU Process] [iOS] REGRESSION(r293570): Snapshot rendering is not scaled with the device scale factor
https://bugs.webkit.org/show_bug.cgi?id=240100
rdar://92635752

Reviewed by Simon Fraser.

The scaling factor is not set in the GraphicsContext of the
ImageBufferShareableBitmapBackend.

To fix this bug is to make snapshotFrameRectWithClip() handle the scaling
outside the ImageBuffer creation. This is similar to what we do in
GraphicsContext::createAlignedImageBuffer() where we scale the size and
create the ImageBuffer with scaleFactor = 1.

* page/FrameSnapshotting.cpp:
(WebCore::snapshotFrameRectWithClip):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/FrameSnapshotting.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (293824 => 293825)

--- trunk/Source/WebCore/ChangeLog	2022-05-05 07:38:15 UTC (rev 293824)
+++ trunk/Source/WebCore/ChangeLog	2022-05-05 08:19:13 UTC (rev 293825)
@@ -1,3 +1,22 @@
+2022-05-05  Said Abou-Hallawa  
+
+[GPU Process] [iOS] REGRESSION(r293570): Snapshot rendering is not scaled with the device scale factor
+https://bugs.webkit.org/show_bug.cgi?id=240100
+rdar://92635752
+
+Reviewed by Simon Fraser.
+
+The scaling factor is not set in the GraphicsContext of the
+ImageBufferShareableBitmapBackend.
+
+To fix this bug is to make snapshotFrameRectWithClip() handle the scaling
+outside the ImageBuffer creation. This is similar to what we do in
+GraphicsContext::createAlignedImageBuffer() where we scale the size and
+create the ImageBuffer with scaleFactor = 1.
+
+* page/FrameSnapshotting.cpp:
+(WebCore::snapshotFrameRectWithClip):
+
 2022-05-05  Youenn Fablet  
 
 SWOriginStore is no longer needed


Modified: trunk/Source/WebCore/page/FrameSnapshotting.cpp (293824 => 293825)

--- trunk/Source/WebCore/page/FrameSnapshotting.cpp	2022-05-05 07:38:15 UTC (rev 293824)
+++ trunk/Source/WebCore/page/FrameSnapshotting.cpp	2022-05-05 08:19:13 UTC (rev 293825)
@@ -115,19 +115,23 @@
 if (options.flags.contains(SnapshotFlags::PaintWithIntegralScaleFactor))
 scaleFactor = ceilf(scaleFactor);
 
+auto scaledImageRect = imageRect;
+scaledImageRect.scale(scaleFactor);
+
 auto purpose = options.flags.contains(SnapshotFlags::Shareable) ? RenderingPurpose::ShareableSnapshot : RenderingPurpose::Snapshot;
 auto hostWindow = (document->view() && document->view()->root()) ? document->view()->root()->hostWindow() : nullptr;
 
-auto buffer = ImageBuffer::create(imageRect.size(), purpose, scaleFactor, options.colorSpace, options.pixelFormat, { }, { hostWindow });
+auto buffer = ImageBuffer::create(scaledImageRect.size(), purpose, 1, options.colorSpace, options.pixelFormat, { }, { hostWindow });
 if (!buffer)
 return nullptr;
 
-buffer->context().translate(-imageRect.x(), -imageRect.y());
+buffer->context().translate(-scaledImageRect.location());
+buffer->context().scale(scaleFactor);
 
 if (!clipRects.isEmpty()) {
 Path clipPath;
 for (auto& rect : clipRects)
-clipPath.addRect(encloseRectToDevicePixels(rect, scaleFactor));
+clipPath.addRect(rect);
 buffer->context().clipPath(clipPath);
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [293846] trunk/Source

2022-05-05 Thread said
Title: [293846] trunk/Source








Revision 293846
Author s...@apple.com
Date 2022-05-05 11:00:15 -0700 (Thu, 05 May 2022)


Log Message
[GPU Process] NativeImage should share the ShareableBitmap data when it's sent to GPU Process
https://bugs.webkit.org/show_bug.cgi?id=239874
rdar://92031359

Reviewed by Simon Fraser.

Source/WebCore:

* Headers.cmake:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/BackingStoreCopy.h: Added.
* platform/graphics/ImageBufferBackend.h:
(): Deleted.

Source/WebKit:

Instead of allocating a new memory buffer in GPUProcess and copying the
ShareableBitmap data to it, we can create a PlatformImage that directly
references this data. This will make all the NativeImages data be attributed
to WebProcess.

* GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::cacheNativeImageWithQualifiedIdentifier):
* Shared/ShareableBitmap.h:
(WebKit::ShareableBitmap::createPlatformImage):
* Shared/cg/ShareableBitmapCG.cpp:
(WebKit::ShareableBitmap::makeCGImage):
(WebKit::ShareableBitmap::createPlatformImage):
(WebKit::ShareableBitmap::createCGImage const):
(WebKit::ShareableBitmap::releaseDataProviderData): Deleted.
* WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp:
(WebKit::ImageBufferShareableBitmapBackend::copyNativeImage const):
* WebProcess/GPU/graphics/RemoteImageBufferProxy.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Headers.cmake
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/platform/graphics/ImageBufferBackend.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp
trunk/Source/WebKit/Shared/ShareableBitmap.h
trunk/Source/WebKit/Shared/cg/ShareableBitmapCG.cpp
trunk/Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h


Added Paths

trunk/Source/WebCore/platform/graphics/CopyImageOptions.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (293845 => 293846)

--- trunk/Source/WebCore/ChangeLog	2022-05-05 17:27:25 UTC (rev 293845)
+++ trunk/Source/WebCore/ChangeLog	2022-05-05 18:00:15 UTC (rev 293846)
@@ -1,3 +1,17 @@
+2022-05-05  Said Abou-Hallawa  
+
+[GPU Process] NativeImage should share the ShareableBitmap data when it's sent to GPU Process
+https://bugs.webkit.org/show_bug.cgi?id=239874
+rdar://92031359
+
+Reviewed by Simon Fraser.
+
+* Headers.cmake:
+* WebCore.xcodeproj/project.pbxproj:
+* platform/graphics/BackingStoreCopy.h: Added.
+* platform/graphics/ImageBufferBackend.h:
+(): Deleted.
+
 2022-05-05  Jer Noble  
 
 [WK2][Cocoa] Remove use of CVPixelBufferConformer from WebContent process in MediaPlayerPrivateRemote::nativeImageForCurrentTime()


Modified: trunk/Source/WebCore/Headers.cmake (293845 => 293846)

--- trunk/Source/WebCore/Headers.cmake	2022-05-05 17:27:25 UTC (rev 293845)
+++ trunk/Source/WebCore/Headers.cmake	2022-05-05 18:00:15 UTC (rev 293846)
@@ -1439,6 +1439,7 @@
 platform/graphics/AnimationFrameRate.h
 platform/graphics/AudioTrackPrivate.h
 platform/graphics/AudioTrackPrivateClient.h
+platform/graphics/CopyImageOptions.h
 platform/graphics/BifurcatedGraphicsContext.h
 platform/graphics/BitmapImage.h
 platform/graphics/Color.h


Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (293845 => 293846)

--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2022-05-05 17:27:25 UTC (rev 293845)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2022-05-05 18:00:15 UTC (rev 293846)
@@ -2370,6 +2370,7 @@
 		72B8B0362753441400F752AA /* FilterImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 72435EF4273D07670005E7EE /* FilterImage.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		72BAC3AE23E1F0B0008D741C /* ImageBufferBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = 72BAC3A523E17328008D741C /* ImageBufferBackend.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		72D73644278461A000398663 /* FilterResults.h in Headers */ = {isa = PBXBuildFile; fileRef = 7211B5D6276536820076FEF8 /* FilterResults.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		72E5768B281B2B5500A75432 /* CopyImageOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 72E5768A281B292600A75432 /* CopyImageOptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		72F667E1260C26AC00EE36AD /* DiagnosticLoggingDomain.h in Headers */ = {isa = PBXBuildFile; fileRef = 72F667DF260C264400EE36AD /* DiagnosticLoggingDomain.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		72F7E746279B8F7500D82D2D /* SourceImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 72F7E744279B8F7400D82D2D /* SourceImage.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		72FD30AC27E3217B0023CDAC /* SourceBrush.h in Headers */ = {isa = PBXBuildFile; fileRef = 72FD30AA27E3217B0023CDAC /* SourceBrush.h */; set

[webkit-changes] [293968] trunk/Source

2022-05-08 Thread said
Title: [293968] trunk/Source








Revision 293968
Author s...@apple.com
Date 2022-05-08 23:28:36 -0700 (Sun, 08 May 2022)


Log Message
[macOS] REGRESSION (r293825): Find highlight snapshots are incorrectly scaled
https://bugs.webkit.org/show_bug.cgi?id=240203
rdar://92892014

Reviewed by Tim Horton.

Source/WebCore:

takeSnapshots() depends on the snapshot ImageBuffer::resolutionScale() to
set the size of the TextIndicatorData image. r293825 scaled the size of
the ImageBuffer before creation and moved the scaling to the GraphicsContext.
So we have correct scaled pixels but the resolutionScale is 1. So we get
enlarged incorrect image.

The fix is to revert r293825 and fix the iOS snapshot without having to
change snapshotFrameRectWithClip().

* page/FrameSnapshotting.cpp:
(WebCore::snapshotFrameRectWithClip):

Source/WebKit:

In getShareableBitmapForImageBufferWithQualifiedIdentifier(), we used to
pass the backendSize as the srcRect and the backendSize as the destRect
to GraphicsContext::drawImageBuffer(). The backendSize is the logicalSize
scaled by the resolutionScale. But in ImageBufferCGBackend::draw() we
scale the srcRect by the resolutionScale one more time. This double-
scaled srcRect draws a srcRect whose size = backendSize * resolutionScale
to a destRect whose size = backendSize. And this results in shrinking the
desired snapshot image by 1 / resolutionScale.

* GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::getShareableBitmapForImageBufferWithQualifiedIdentifier):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/FrameSnapshotting.cpp
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (293967 => 293968)

--- trunk/Source/WebCore/ChangeLog	2022-05-09 06:14:33 UTC (rev 293967)
+++ trunk/Source/WebCore/ChangeLog	2022-05-09 06:28:36 UTC (rev 293968)
@@ -1,3 +1,23 @@
+2022-05-08  Said Abou-Hallawa  
+
+[macOS] REGRESSION (r293825): Find highlight snapshots are incorrectly scaled
+https://bugs.webkit.org/show_bug.cgi?id=240203
+rdar://92892014
+
+Reviewed by Tim Horton.
+
+takeSnapshots() depends on the snapshot ImageBuffer::resolutionScale() to
+set the size of the TextIndicatorData image. r293825 scaled the size of 
+the ImageBuffer before creation and moved the scaling to the GraphicsContext.
+So we have correct scaled pixels but the resolutionScale is 1. So we get
+enlarged incorrect image.
+
+The fix is to revert r293825 and fix the iOS snapshot without having to
+change snapshotFrameRectWithClip().
+
+* page/FrameSnapshotting.cpp:
+(WebCore::snapshotFrameRectWithClip):
+
 2022-05-07  Yusuke Suzuki  
 
 Introduce EventTrackingRegions::Event enum


Modified: trunk/Source/WebCore/page/FrameSnapshotting.cpp (293967 => 293968)

--- trunk/Source/WebCore/page/FrameSnapshotting.cpp	2022-05-09 06:14:33 UTC (rev 293967)
+++ trunk/Source/WebCore/page/FrameSnapshotting.cpp	2022-05-09 06:28:36 UTC (rev 293968)
@@ -115,23 +115,19 @@
 if (options.flags.contains(SnapshotFlags::PaintWithIntegralScaleFactor))
 scaleFactor = ceilf(scaleFactor);
 
-auto scaledImageRect = imageRect;
-scaledImageRect.scale(scaleFactor);
-
 auto purpose = options.flags.contains(SnapshotFlags::Shareable) ? RenderingPurpose::ShareableSnapshot : RenderingPurpose::Snapshot;
 auto hostWindow = (document->view() && document->view()->root()) ? document->view()->root()->hostWindow() : nullptr;
 
-auto buffer = ImageBuffer::create(scaledImageRect.size(), purpose, 1, options.colorSpace, options.pixelFormat, { }, { hostWindow });
+auto buffer = ImageBuffer::create(imageRect.size(), purpose, scaleFactor, options.colorSpace, options.pixelFormat, { }, { hostWindow });
 if (!buffer)
 return nullptr;
 
-buffer->context().translate(-scaledImageRect.location());
-buffer->context().scale(scaleFactor);
+buffer->context().translate(-imageRect.location());
 
 if (!clipRects.isEmpty()) {
 Path clipPath;
 for (auto& rect : clipRects)
-clipPath.addRect(rect);
+clipPath.addRect(encloseRectToDevicePixels(rect, scaleFactor));
 buffer->context().clipPath(clipPath);
 }
 


Modified: trunk/Source/WebKit/ChangeLog (293967 => 293968)

--- trunk/Source/WebKit/ChangeLog	2022-05-09 06:14:33 UTC (rev 293967)
+++ trunk/Source/WebKit/ChangeLog	2022-05-09 06:28:36 UTC (rev 293968)
@@ -1,3 +1,23 @@
+2022-05-08  Said Abou-Hallawa  
+
+[macOS] REGRESSION (r293825): Find highlight snapshots are incorrectly scaled
+https://bugs.webkit.org/show_bug.cgi?id=240203
+rdar://92892014
+
+Reviewed by Tim Horton.
+
+In getShareableBitmapForImageBufferWithQualifiedIdentifier(), we used to
+pass the backendSize

[webkit-changes] [294015] trunk/Source/WebCore

2022-05-10 Thread said
Title: [294015] trunk/Source/WebCore








Revision 294015
Author s...@apple.com
Date 2022-05-10 13:52:34 -0700 (Tue, 10 May 2022)


Log Message
[GPU Process] [Filters] FilterImages can be leaked
https://bugs.webkit.org/show_bug.cgi?id=240274

Reviewed by Simon Fraser.

When a FilterEffect is dynamically updated we clear its result FilterImage.
We also need to clear all the result FilterImages of all the FilterEffects
recursively which takes this changing FilterEffect as an input.

Clearing the result FilterImage of the changing FilterEffect happens by
removing the entry from FilterResults::m_results.

Clearing the FilterImages of the dependent FilterEffects happens by using
FilterResults::m_resultReferences.

What is missing is removing the FilterImage entry itself from
FilterResults::m_resultReferences.

* platform/graphics/filters/FilterResults.h:
(WebCore::FilterResults::clearEffectResult):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/filters/FilterResults.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (294014 => 294015)

--- trunk/Source/WebCore/ChangeLog	2022-05-10 20:22:36 UTC (rev 294014)
+++ trunk/Source/WebCore/ChangeLog	2022-05-10 20:52:34 UTC (rev 294015)
@@ -1,3 +1,26 @@
+2022-05-10  Said Abou-Hallawa  
+
+[GPU Process] [Filters] FilterImages can be leaked
+https://bugs.webkit.org/show_bug.cgi?id=240274
+
+Reviewed by Simon Fraser.
+
+When a FilterEffect is dynamically updated we clear its result FilterImage.
+We also need to clear all the result FilterImages of all the FilterEffects
+recursively which takes this changing FilterEffect as an input.
+
+Clearing the result FilterImage of the changing FilterEffect happens by
+removing the entry from FilterResults::m_results.
+
+Clearing the FilterImages of the dependent FilterEffects happens by using 
+FilterResults::m_resultReferences.
+
+What is missing is removing the FilterImage entry itself from
+FilterResults::m_resultReferences.
+
+* platform/graphics/filters/FilterResults.h:
+(WebCore::FilterResults::clearEffectResult):
+
 2022-05-10  Tim Nguyen  
 
 Fix inertness of pseudo-elements


Modified: trunk/Source/WebCore/platform/graphics/filters/FilterResults.h (294014 => 294015)

--- trunk/Source/WebCore/platform/graphics/filters/FilterResults.h	2022-05-10 20:22:36 UTC (rev 294014)
+++ trunk/Source/WebCore/platform/graphics/filters/FilterResults.h	2022-05-10 20:52:34 UTC (rev 294015)
@@ -63,6 +63,8 @@
 
 for (auto& reference : m_resultReferences.get(result))
 clearEffectResult(reference);
+
+m_resultReferences.remove(result);
 }
 
 private:






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [294280] trunk/Source

2022-05-16 Thread said
Title: [294280] trunk/Source








Revision 294280
Author s...@apple.com
Date 2022-05-16 16:44:54 -0700 (Mon, 16 May 2022)


Log Message
REGRESSION(r249162): CanvasRenderingContext2DBase::drawImage() crashes if the image is animated and the first frame cannot be decoded
https://bugs.webkit.org/show_bug.cgi?id=239113
rdar://87980543

Reviewed by Simon Fraser.

Source/WebCore:

CanvasRenderingContext2DBase::drawImage() needs to ensure the first frame
of the animated image can be decoded correctly before creating the temporary
static image. If the first frame can't be decoded, this function should return
immediately. This matches the behavior of this function before r249162.

The animated image decodes its frames asynchronously in a work queue. But
the first frame has to be decoded synchronously in the main run loop. So
to avoid running the image decoder in two different threads we are going
to keep the first and the current frame cached when we receive a memory
pressure warning. This should not increase the memory allocation of the
animated image because the numbers of cached frames increases quickly and
we keep all of them till a memory warning is received. But the memory
pressure warning will be received a little bit more often. This depends
on the memory size of the first frame.

To make the code more robust, make ImageSource take a Ref
instead of taking a RefPtr.

* html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::drawImage):
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::BitmapImage):
(WebCore::BitmapImage::destroyDecodedData):
* platform/graphics/BitmapImage.h:
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::ImageSource):
(WebCore::ImageSource::destroyDecodedData):
(WebCore::ImageSource::setNativeImage):
* platform/graphics/ImageSource.h:
(WebCore::ImageSource::create):
(WebCore::ImageSource::isDecoderAvailable const):
(WebCore::ImageSource::destroyAllDecodedData): Deleted.
(WebCore::ImageSource::destroyAllDecodedDataExcludeFrame): Deleted.
(WebCore::ImageSource::destroyDecodedDataBeforeFrame): Deleted.

Source/WebKit:

* GPUProcess/graphics/RemoteDisplayListRecorder.cpp:
(WebKit::RemoteDisplayListRecorder::drawSystemImage):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp
trunk/Source/WebCore/platform/graphics/BitmapImage.cpp
trunk/Source/WebCore/platform/graphics/BitmapImage.h
trunk/Source/WebCore/platform/graphics/ImageSource.cpp
trunk/Source/WebCore/platform/graphics/ImageSource.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (294279 => 294280)

--- trunk/Source/WebCore/ChangeLog	2022-05-16 23:40:16 UTC (rev 294279)
+++ trunk/Source/WebCore/ChangeLog	2022-05-16 23:44:54 UTC (rev 294280)
@@ -1,3 +1,46 @@
+2022-05-16  Said Abou-Hallawa  
+
+REGRESSION(r249162): CanvasRenderingContext2DBase::drawImage() crashes if the image is animated and the first frame cannot be decoded
+https://bugs.webkit.org/show_bug.cgi?id=239113
+rdar://87980543
+
+Reviewed by Simon Fraser.
+
+CanvasRenderingContext2DBase::drawImage() needs to ensure the first frame
+of the animated image can be decoded correctly before creating the temporary
+static image. If the first frame can't be decoded, this function should return
+immediately. This matches the behavior of this function before r249162.
+
+The animated image decodes its frames asynchronously in a work queue. But
+the first frame has to be decoded synchronously in the main run loop. So
+to avoid running the image decoder in two different threads we are going
+to keep the first and the current frame cached when we receive a memory
+pressure warning. This should not increase the memory allocation of the
+animated image because the numbers of cached frames increases quickly and
+we keep all of them till a memory warning is received. But the memory
+pressure warning will be received a little bit more often. This depends
+on the memory size of the first frame.
+
+To make the code more robust, make ImageSource take a Ref
+instead of taking a RefPtr.
+
+* html/canvas/CanvasRenderingContext2DBase.cpp:
+(WebCore::CanvasRenderingContext2DBase::drawImage):
+* platform/graphics/BitmapImage.cpp:
+(WebCore::BitmapImage::BitmapImage):
+(WebCore::BitmapImage::destroyDecodedData):
+* platform/graphics/BitmapImage.h:
+* platform/graphics/ImageSource.cpp:
+(WebCore::ImageSource::ImageSource):
+(WebCore::ImageSource::destroyDecodedData):
+(WebCore::ImageSource::setNativeImage):
+* platform/graphics/ImageSource.h:
+(WebCore::ImageSource::create):
+(WebCore::ImageSource::isDecoderAv

[webkit-changes] [294536] trunk/Source

2022-05-20 Thread said
Title: [294536] trunk/Source








Revision 294536
Author s...@apple.com
Date 2022-05-20 00:17:02 -0700 (Fri, 20 May 2022)


Log Message
Drawing the PDF snapshot should take place in WebProcess
https://bugs.webkit.org/show_bug.cgi?id=240368
rdar://91660159

Reviewed by Simon Fraser.

The ImageBufferBackends should act like a drawing surface only. It has
a GraphicsContext. It can get and set pixels. And it can get a NativeImage
out of the pixels. But it should never draw itself to a GraphicsContext.
The ImageBuffer can act like an image. It can draw itself as an image or
as a pattern into a GraphicsContext.

So draw(), drawPattern() and drawConsuming() will be removed from the
ImageBufferBackend super classes and the implementation will be unified
for all platforms and moved to ConcreteImageBuffer.

By doing that, a canvas can be drawn to the PDF context in WebProcess
even if the GPUProcess for DOM rendering is enabled.

Canonical link: https://commits.webkit.org/250791@main

Modified Paths

trunk/Source/WebCore/platform/graphics/ConcreteImageBuffer.h
trunk/Source/WebCore/platform/graphics/ImageBufferBackend.cpp
trunk/Source/WebCore/platform/graphics/ImageBufferBackend.h
trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairoBackend.cpp
trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairoBackend.h
trunk/Source/WebCore/platform/graphics/cg/ImageBufferCGBackend.cpp
trunk/Source/WebCore/platform/graphics/cg/ImageBufferCGBackend.h
trunk/Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp
trunk/Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.h
trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.h
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h
trunk/Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferRemoteIOSurfaceBackend.cpp
trunk/Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferRemoteIOSurfaceBackend.h
trunk/Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.cpp
trunk/Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.h




Diff

Modified: trunk/Source/WebCore/platform/graphics/ConcreteImageBuffer.h (294535 => 294536)

--- trunk/Source/WebCore/platform/graphics/ConcreteImageBuffer.h	2022-05-20 07:14:48 UTC (rev 294535)
+++ trunk/Source/WebCore/platform/graphics/ConcreteImageBuffer.h	2022-05-20 07:17:02 UTC (rev 294536)
@@ -28,6 +28,7 @@
 #include "Filter.h"
 #include "FilterImage.h"
 #include "FilterResults.h"
+#include "GraphicsContext.h"
 #include "ImageBuffer.h"
 #include "PixelBuffer.h"
 
@@ -169,17 +170,24 @@
 
 void draw(GraphicsContext& destContext, const FloatRect& destRect, const FloatRect& srcRect, const ImagePaintingOptions& options) override
 {
+FloatRect srcRectScaled = srcRect;
+srcRectScaled.scale(resolutionScale());
+
 if (auto* backend = ensureBackendCreated()) {
-flushDrawingContext();
-backend->draw(destContext, destRect, srcRect, options);
+if (auto image = copyNativeImage(&destContext == &context() ? CopyBackingStore : DontCopyBackingStore))
+destContext.drawNativeImage(*image, backendSize(), destRect, srcRectScaled, options);
+backend->finalizeDrawIntoContext(destContext);
 }
 }
 
 void drawPattern(GraphicsContext& destContext, const FloatRect& destRect, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, const FloatSize& spacing, const ImagePaintingOptions& options) override
 {
+FloatRect adjustedSrcRect = srcRect;
+adjustedSrcRect.scale(resolutionScale());
+
 if (auto* backend = ensureBackendCreated()) {
-flushDrawingContext();
-backend->drawPattern(destContext, destRect, srcRect, patternTransform, phase, spacing, options);
+if (auto image = copyImage(&destContext == &context() ? CopyBackingStore : DontCopyBackingStore))
+image->drawPattern(destContext, destRect, adjustedSrcRect, patternTransform, phase, spacing, options);
 }
 }
 
@@ -203,13 +211,17 @@
 
 void drawConsuming(GraphicsContext& destContext, const FloatRect& destRect, const FloatRect& srcRect, const ImagePaintingOptions& options) override
 {
+FloatRect adjustedSrcRect = srcRect;
+adjustedSrcRect.scale(resolutionScale());
+
 ASSERT(&destContext != &context());
 if (auto* backend = ensureBackendCreated()) {
-flushDrawingContext();
-backend->drawConsuming(destContext, destRect, srcRect, options);
+auto backendSize = backend->backendSize();
+if (auto image = sinkIntoNativeImage())
+destContext.drawNativeImage(*image, backendSize, destRect, adjustedSrcRect, options);
 }
 }
-
+
 void clipToMask(GraphicsContext& destContext, const FloatRect& destRect) override
 {
 if (auto* backend = ensureBackendCreated())

[webkit-changes] [294703] trunk/metadata/contributors.json

2022-05-23 Thread said
Title: [294703] trunk/metadata/contributors.json








Revision 294703
Author s...@apple.com
Date 2022-05-23 17:33:44 -0700 (Mon, 23 May 2022)


Log Message
Add Said Abou-Hallawa's GitHub to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=240840

Unreviewed.

* metadata/contributors.json:

Canonical link: https://commits.webkit.org/250900@main

Modified Paths

trunk/metadata/contributors.json




Diff

Modified: trunk/metadata/contributors.json (294702 => 294703)

--- trunk/metadata/contributors.json	2022-05-24 00:27:42 UTC (rev 294702)
+++ trunk/metadata/contributors.json	2022-05-24 00:33:44 UTC (rev 294703)
@@ -5952,6 +5952,7 @@
  "s...@apple.com"
   ],
   "expertise" : "SVG/Graphics, Image Decoders",
+  "github" : "shallawa",
   "name" : "Said Abou-Hallawa",
   "nicks" : [
  "sabouhallawa"






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [294928] trunk

2022-05-26 Thread said
Title: [294928] trunk








Revision 294928
Author s...@apple.com
Date 2022-05-26 20:55:15 -0700 (Thu, 26 May 2022)


Log Message
REGRESSION(r289580): Canvas: putImageData sometimes draws nothing
https://bugs.webkit.org/show_bug.cgi?id=240802
rdar://93801722

Reviewed by Simon Fraser.

RemoteImageBufferProxy::putPixelBuffer() needs to setNeedsFlush(true) once the
request to change the backend is sent to GPUProcess. If WebProcess has access to
the ImageBufferBackend, flushDrawingContext() will be called from copyNativeImage().
This call has to wait all DisplayList items and PutPixelBuffer messages to be
flushed to the backend before copyNativeImage() copies the pixels of the backend
to a NativeImage.

* Source/WebCore/platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::setNeedsFlush):
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
(WebKit::RemoteDisplayListRecorderProxy::send):
(WebKit::RemoteDisplayListRecorderProxy::resetNeedsFlush): Deleted.
(WebKit::RemoteDisplayListRecorderProxy::needsFlush const): Deleted.
(): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
(WebKit::RemoteImageBufferProxy::~RemoteImageBufferProxy):

Canonical link: https://commits.webkit.org/251039@main

Modified Paths

trunk/LayoutTests/platform/mac-wk2/TestExpectations
trunk/Source/WebCore/platform/graphics/ImageBuffer.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h


Added Paths

trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw-expected.html
trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw.html




Diff

Added: trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw-expected.html (0 => 294928)

--- trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw-expected.html	(rev 0)
+++ trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw-expected.html	2022-05-27 03:55:15 UTC (rev 294928)
@@ -0,0 +1,13 @@
+
+
+
+const targetCanvas = document.getElementById('target');
+const target = targetCanvas.getContext('2d');
+
+const canvasWidth = targetCanvas.width;
+const canvasHeight = targetCanvas.height
+
+target.fillStyle = 'green';
+target.fillRect(0, 0, canvasWidth, canvasHeight);
+
+


Added: trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw.html (0 => 294928)

--- trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw.html	(rev 0)
+++ trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw.html	2022-05-27 03:55:15 UTC (rev 294928)
@@ -0,0 +1,50 @@
+
+
+
+const targetCanvas = document.getElementById('target');
+const target = targetCanvas.getContext('2d');
+
+const canvasWidth = targetCanvas.width;
+const canvasHeight = targetCanvas.height
+
+var sourceCanvas = document.createElement('canvas');
+sourceCanvas.width  = canvasWidth;
+sourceCanvas.height = canvasHeight;
+
+const source = sourceCanvas.getContext('2d');
+
+let progressX = 0;
+let progressY = 0;
+const paintSize = 100;
+
+source.fillStyle = 'green';
+source.fillRect(0, 0, canvasWidth, canvasHeight);
+const imagedata = source.getImageData(0, 0, canvasWidth, canvasHeight);
+
+function drawLoop() {
+target.putImageData(imagedata, 0, 0, progressX, progressY, paintSize, paintSize);
+
+progressX += paintSize;
+
+if (progressX + paintSize <= canvasWidth) {
+requestAnimationFrame(drawLoop);
+return;
+}
+
+if (progressY + paintSize > canvasHeight) {
+if (window.testRunner)
+testRunner.notifyDone();
+return;
+}
+
+progressX = 0;
+progressY += paintSize;
+requestAnimationFrame(drawLoop);
+}
+
+if (window.testRunner)
+testRunner.waitUntilDone();
+
+requestAnimationFrame(drawLoop);
+
+


Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (294927 => 294928)

--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2022-05-27 03:51:05 UTC (rev 294927)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2022-05-27 03:55:15 UTC (rev 294928)
@@ -1712,27 +1712,6 @@
 
 webkit.org/b/240670 imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-move-into-script-disabled-iframe.html [ Pass Crash ]
 
-webkit.org/b/240735 [ Release ] webgl/2.0.0/conformance/textures/image_bitmap_from_image_bitmap/tex-2d-rgb-rgb-unsigned_short_5_6_5.html [ Pass Failure ]
-

[webkit-changes] [295113] trunk/Source

2022-06-01 Thread said
Title: [295113] trunk/Source








Revision 295113
Author s...@apple.com
Date 2022-06-01 18:07:19 -0700 (Wed, 01 Jun 2022)


Log Message
[GPU Process] [Filters] Make PixelBuffer a RefCounted class
https://bugs.webkit.org/show_bug.cgi?id=240807
rdar://94040771

Reviewed by Simon Fraser.

The plan is to hide the underlying memory of PixelBuffer. GPUProcess needs to
allocate shared memory and attribute it to the WebProcess.

Currently the PixelBuffer is created as std::optional which does
not allow sub-classing it. We need to create PixelBuffer as a pointer.

The patch follows these simple replacement rules:

1. std::optional will be replaced by RefPtr
2. PixelBuffer will be replaced by Ref and Ref&&
3. PixelBuffer&& will be replaced by Ref&&

A new IPC class named PixelBufferReference will be added to allow sending and
receiving a Ref through IPC.

* Source/WebCore/html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::toVideoFrame):
* Source/WebCore/html/ImageData.cpp:
(WebCore::ImageData::create):
(WebCore::ImageData::pixelBuffer const):
* Source/WebCore/html/ImageData.h:
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::getImageData const):
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::paintRenderingResultsToPixelBuffer):
* Source/WebCore/html/canvas/WebGLRenderingContextBase.h:
* Source/WebCore/platform/graphics/ConcreteImageBuffer.h:
* Source/WebCore/platform/graphics/GraphicsContextGL.h:
* Source/WebCore/platform/graphics/ImageBuffer.h:
* Source/WebCore/platform/graphics/ImageBufferBackend.cpp:
(WebCore::ImageBufferBackend::getPixelBuffer const):
* Source/WebCore/platform/graphics/ImageBufferBackend.h:
* Source/WebCore/platform/graphics/PixelBuffer.cpp:
(WebCore::PixelBuffer::tryCreateForDecoding):
(WebCore::PixelBuffer::tryCreate):
(WebCore::PixelBuffer::create):
(WebCore::PixelBuffer::createScratchPixelBuffer const):
(WebCore::PixelBuffer::deepClone const): Deleted.
* Source/WebCore/platform/graphics/PixelBuffer.h:
(WebCore::PixelBuffer::decode):
* Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::readPixelsForPaintResults):
(WebCore::GraphicsContextGLANGLE::readRenderingResults):
(WebCore::GraphicsContextGLANGLE::paintRenderingResultsToCanvas):
(WebCore::GraphicsContextGLANGLE::paintCompositedResultsToCanvas):
(WebCore::GraphicsContextGLANGLE::paintRenderingResultsToPixelBuffer):
(WebCore::GraphicsContextGLANGLE::readRenderingResultsForPainting):
(WebCore::GraphicsContextGLANGLE::readCompositedResultsForPainting):
* Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h:
* Source/WebCore/platform/graphics/cg/GraphicsContextGLCG.cpp:
(WebCore::GraphicsContextGL::paintToCanvas):
* Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.cpp:
(WebCore::ImageBufferCGBitmapBackend::getPixelBuffer const):
* Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.h:
* Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:
(WebCore::ImageBufferIOSurfaceBackend::getPixelBuffer const):
* Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.h:
* Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm:
(WebCore::GraphicsContextGLANGLE::readCompositedResults):
* Source/WebCore/platform/graphics/cv/VideoFrameCV.h:
* Source/WebCore/platform/graphics/cv/VideoFrameCV.mm:
(WebCore::VideoFrameCV::createFromPixelBuffer):
* Source/WebCore/platform/graphics/filters/FilterImage.cpp:
(WebCore::getConvertedPixelBuffer):
(WebCore::FilterImage::pixelBufferSlot):
(WebCore::FilterImage::pixelBuffer):
(WebCore::FilterImage::getPixelBuffer):
(WebCore::FilterImage::copyPixelBuffer):
* Source/WebCore/platform/graphics/filters/FilterImage.h:
* Source/WebCore/platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.cpp:
(WebCore::FEGaussianBlurSoftwareApplier::applyPlatform):
* Source/WebCore/platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.h:
* Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:
(WebCore::GraphicsContextGLOpenGL::readCompositedResults):
(WebCore::GraphicsContextGLOpenGL::readRenderingResults):
(WebCore::GraphicsContextGLOpenGL::paintRenderingResultsToPixelBuffer):
(WebCore::GraphicsContextGLOpenGL::readRenderingResultsForPainting):
(WebCore::GraphicsContextGLOpenGL::readCompositedResultsForPainting):
* Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h:
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp:
(WebKit::RemoteGraphicsContextGL::paintPixelBufferToImageBuffer):
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h:
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h:
(paintRenderingResultsToPixelBuffer):
* Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::putPixelBufferForImageB

[webkit-changes] [295132] trunk

2022-06-02 Thread said
Title: [295132] trunk








Revision 295132
Author s...@apple.com
Date 2022-06-02 11:13:50 -0700 (Thu, 02 Jun 2022)


Log Message
REGRESSION(r289580): Canvas: putImageData sometimes draws nothing
https://bugs.webkit.org/show_bug.cgi?id=240802
rdar://93801722

Reviewed by Simon Fraser.

RemoteImageBufferProxy::putPixelBuffer() needs to setNeedsFlush(true) once the
request to change the backend is sent to GPUProcess. If WebProcess has access to
the ImageBufferBackend, flushDrawingContext() will be called from copyNativeImage().
This call has to wait for all DisplayList items and PutPixelBuffer messages to be
flushed to the backend before copyNativeImage() copies the pixels of the backend
to a NativeImage.

* LayoutTests/fast/canvas/canvas-put-image-data-no-draw-expected.html: Added.
* LayoutTests/fast/canvas/canvas-put-image-data-no-draw.html: Added.
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp:
(WebCore::Layout::FlexFormattingContext::convertFlexItemsToLogicalSpace):
* Source/WebCore/platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::setNeedsFlush):
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
(WebKit::RemoteDisplayListRecorderProxy::send):
(WebKit::RemoteDisplayListRecorderProxy::resetNeedsFlush): Deleted.
(WebKit::RemoteDisplayListRecorderProxy::needsFlush const): Deleted.
(): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
(WebKit::RemoteImageBufferProxy::~RemoteImageBufferProxy):

Canonical link: https://commits.webkit.org/251223@main

Modified Paths

trunk/LayoutTests/platform/mac-wk2/TestExpectations
trunk/Source/WebCore/platform/graphics/ImageBuffer.h
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h


Added Paths

trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw-expected.html
trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw.html




Diff

Added: trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw-expected.html (0 => 295132)

--- trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw-expected.html	(rev 0)
+++ trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw-expected.html	2022-06-02 18:13:50 UTC (rev 295132)
@@ -0,0 +1,13 @@
+
+
+
+const targetCanvas = document.getElementById('target');
+const target = targetCanvas.getContext('2d');
+
+const canvasWidth = targetCanvas.width;
+const canvasHeight = targetCanvas.height
+
+target.fillStyle = 'green';
+target.fillRect(0, 0, canvasWidth, canvasHeight);
+
+


Added: trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw.html (0 => 295132)

--- trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw.html	(rev 0)
+++ trunk/LayoutTests/fast/canvas/canvas-put-image-data-no-draw.html	2022-06-02 18:13:50 UTC (rev 295132)
@@ -0,0 +1,50 @@
+
+
+
+const targetCanvas = document.getElementById('target');
+const target = targetCanvas.getContext('2d');
+
+const canvasWidth = targetCanvas.width;
+const canvasHeight = targetCanvas.height
+
+var sourceCanvas = document.createElement('canvas');
+sourceCanvas.width  = canvasWidth;
+sourceCanvas.height = canvasHeight;
+
+const source = sourceCanvas.getContext('2d');
+
+let progressX = 0;
+let progressY = 0;
+const paintSize = 100;
+
+source.fillStyle = 'green';
+source.fillRect(0, 0, canvasWidth, canvasHeight);
+const imagedata = source.getImageData(0, 0, canvasWidth, canvasHeight);
+
+function drawLoop() {
+target.putImageData(imagedata, 0, 0, progressX, progressY, paintSize, paintSize);
+
+progressX += paintSize;
+ 
+if (progressX + paintSize <= canvasWidth) {
+requestAnimationFrame(drawLoop);
+return;
+}
+
+if (progressY + paintSize > canvasHeight) {
+if (window.testRunner)
+testRunner.notifyDone();
+return;
+}
+
+progressX = 0;
+progressY += paintSize;
+requestAnimationFrame(drawLoop);
+}
+
+if (window.testRunner)
+testRunner.waitUntilDone();
+
+requestAnimationFrame(drawLoop);
+
+


Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (295131 => 295132)

--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2022-06-02 17:41:13 UTC (rev 295131)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2022-06-02 18:13:50 UTC (rev 295132)
@@ -1708,27 +1708,6 @@
 
 webkit.org/b/240670 imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-move-into-script-disabled-iframe.html [ Pass Crash ]
 
-webkit.org/b/240735 [ Release ] we

[webkit-changes] [295149] trunk/Source

2022-06-02 Thread said
Title: [295149] trunk/Source








Revision 295149
Author s...@apple.com
Date 2022-06-02 15:12:04 -0700 (Thu, 02 Jun 2022)


Log Message
[GPU Process] [Filters] Make ImageBufferAllocator control the creation of the FilterImage buffers
https://bugs.webkit.org/show_bug.cgi?id=240808


Reviewed by Simon Fraser.

Route all the allocations of the ImageBuffers and the PixelBuffers, which are made
by filter effects to a new class named ImageBufferAllocator. Because some filter
effects may call ImageBuffer::getPixelBuffer() from their FilterImages, we need
to pass an ImageBufferAllocator to this method as well.

The goal is to be able to attribute all the filter intermediate result FilterImage
to WebPorcess from one class. This will be a super class of ImageBufferAllocator
named ImageBufferShareableAllocator.

In a future patch, this class will be able to create shareable PixelBuffer and
will be able to attribute all its allocated memory to WebProcess.

* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/ConcreteImageBuffer.h:
* Source/WebCore/platform/graphics/ImageBuffer.h:
* Source/WebCore/platform/graphics/ImageBufferAllocator.cpp: Copied from Source/WebCore/platform/graphics/filters/FilterResults.h.
(WebCore::ImageBufferAllocator::createImageBuffer const):
(WebCore::ImageBufferAllocator::createPixelBuffer const):
* Source/WebCore/platform/graphics/ImageBufferAllocator.h: Copied from Source/WebCore/platform/graphics/filters/FilterResults.h.
* Source/WebCore/platform/graphics/ImageBufferBackend.cpp:
(WebCore::ImageBufferBackend::getPixelBuffer const):
* Source/WebCore/platform/graphics/ImageBufferBackend.h:
* Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.cpp:
(WebCore::ImageBufferCGBitmapBackend::getPixelBuffer const):
* Source/WebCore/platform/graphics/cg/ImageBufferCGBitmapBackend.h:
* Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:
(WebCore::ImageBufferIOSurfaceBackend::getPixelBuffer const):
* Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.h:
* Source/WebCore/platform/graphics/filters/Filter.cpp:
(WebCore::Filter::apply):
* Source/WebCore/platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::apply):
* Source/WebCore/platform/graphics/filters/FilterImage.cpp:
(WebCore::FilterImage::create):
(WebCore::FilterImage::FilterImage):
(WebCore::FilterImage::imageBufferFromPixelBuffer):
(WebCore::getConvertedPixelBuffer):
(WebCore::FilterImage::pixelBuffer):
(WebCore::FilterImage::getPixelBuffer):
(WebCore::FilterImage::copyPixelBuffer):
* Source/WebCore/platform/graphics/filters/FilterImage.h:
* Source/WebCore/platform/graphics/filters/FilterResults.cpp: Copied from Source/WebCore/platform/graphics/filters/FilterResults.h.
(WebCore::FilterResults::FilterResults):
(WebCore::FilterResults::effectResult const):
(WebCore::FilterResults::setEffectResult):
(WebCore::FilterResults::clearEffectResult):
* Source/WebCore/platform/graphics/filters/FilterResults.h:
(WebCore::FilterResults::allocator const):
(WebCore::FilterResults::effectResult const): Deleted.
(WebCore::FilterResults::setEffectResult): Deleted.
(WebCore::FilterResults::clearEffectResult): Deleted.
* Source/WebKit/GPUProcess/graphics/ImageBufferShareableAllocator.cpp: Added.
(WebKit::ImageBufferShareableAllocator::createImageBuffer const):
(WebKit::ImageBufferShareableAllocator::createPixelBuffer const):
(WebKit::ImageBufferShareableAllocator::transferMemoryOwnership):
* Source/WebKit/GPUProcess/graphics/ImageBufferShareableAllocator.h: Copied from Source/WebCore/platform/graphics/filters/FilterResults.h.
* Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp:
(WebKit::RemoteDisplayListRecorder::drawFilteredImageBuffer):
* Source/WebKit/GPUProcess/media/RemoteVideoFrameObjectHeap.cpp:
* Source/WebKit/Shared/ShareableBitmap.h:
(WebKit::ShareableBitmap::Handle::handle):
(WebKit::ShareableBitmap::sizeInBytes const):
* Source/WebKit/Sources.txt:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp:
(WebKit::ImageBufferShareableBitmapBackend::getPixelBuffer const):
* Source/WebKit/WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
* Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferRemoteIOSurfaceBackend.cpp:
(WebKit::ImageBufferRemoteIOSurfaceBackend::getPixelBuffer const):
* Source/WebKit/WebProcess/GPU/graphics/cocoa/ImageBufferRemoteIOSurfaceBackend.h:

Canonical link: https://commits.webkit.org/251238@main

Modified Paths

trunk/Source/WebCore/Headers.cmake
trunk/Source/WebCore/Sources.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/platform/graphics/ConcreteImageBuffer.h
trunk/Source/WebCore/platform/graphics/ImageBuffer.h
trunk/Source/WebCore/platform/graphics/ImageBufferBackend.cpp
trunk/Source/Web

[webkit-changes] [295227] trunk

2022-06-03 Thread said
Title: [295227] trunk








Revision 295227
Author s...@apple.com
Date 2022-06-03 13:52:52 -0700 (Fri, 03 Jun 2022)


Log Message
[GPU Process] [Filters] Make PixelBuffer an abstract class
https://bugs.webkit.org/show_bug.cgi?id=240809


Reviewed by Simon Fraser.

Hide the current underlying memory of PixelBuffer which is 'Uint8ClampedArray'
and move it to a new subclass named ByteArrayPixelBuffer.

All clients should use the virtual methods 'bytes()' and 'sizeInBytes()' to have
access to the pixel bytes. All calls to 'PixelBuffer::tryCreate()' should be
replaced with 'ByteArrayPixelBuffer::tryCreate()'.

In future patches and when GPUProcess applies software filters, we are going to
create new subclass of PixelBuffer for the result FilterImages. This new sub-
class will use SharedMemory as its underlying pixel data and it will attribute
this SharedMemory to WebProcess.

* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::dumpImageBitmap):
(WebCore::CloneDeserializer::readImageBitmap):
* Source/WebCore/html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getImageData):
* Source/WebCore/html/ImageData.cpp:
(WebCore::ImageData::create):
(WebCore::ImageData::pixelBuffer const):
* Source/WebCore/html/ImageData.h:
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::getImageData const):
* Source/WebCore/page/PageColorSampler.cpp:
(WebCore::sampleColor):
* Source/WebCore/platform/graphics/GraphicsContextGL.cpp:
(WebCore::GraphicsContextGL::extractPixelBuffer):
* Source/WebCore/platform/graphics/ImageBufferAllocator.cpp:
(WebCore::ImageBufferAllocator::createPixelBuffer const):
* Source/WebCore/platform/graphics/ImageBufferBackend.cpp:
(WebCore::ImageBufferBackend::convertToLuminanceMask):
(WebCore::ImageBufferBackend::getPixelBuffer const):
(WebCore::ImageBufferBackend::putPixelBuffer):
* Source/WebCore/platform/graphics/PixelBuffer.cpp:
(WebCore::PixelBuffer::supportedPixelFormat):
(WebCore::PixelBuffer::PixelBuffer):
(WebCore::PixelBuffer::tryCreateForDecoding): Deleted.
(WebCore::PixelBuffer::tryCreate): Deleted.
(WebCore::PixelBuffer::create): Deleted.
(WebCore::PixelBuffer::bytes const): Deleted.
(WebCore::PixelBuffer::sizeInBytes const): Deleted.
(WebCore::PixelBuffer::createScratchPixelBuffer const): Deleted.
(WebCore::operator<<): Deleted.
* Source/WebCore/platform/graphics/PixelBuffer.h:
(WebCore::PixelBuffer::size const):
(WebCore::PixelBuffer::isByteArrayPixelBuffer const):
(WebCore::PixelBuffer::data const): Deleted.
(WebCore::PixelBuffer::takeData): Deleted.
(WebCore::PixelBuffer::encode const): Deleted.
(WebCore::PixelBuffer::decode): Deleted.
* Source/WebCore/platform/graphics/ShadowBlur.cpp:
(WebCore::ShadowBlur::blurShadowBuffer):
* Source/WebCore/platform/graphics/ByteArrayPixelBuffer.cpp: Added.
(WebCore::ByteArrayPixelBuffer::create):
(WebCore::ByteArrayPixelBuffer::tryCreate):
(WebCore::ByteArrayPixelBuffer::tryCreateForDecoding):
(WebCore::ByteArrayPixelBuffer::ByteArrayPixelBuffer):
(WebCore::ByteArrayPixelBuffer::bytes const):
(WebCore::ByteArrayPixelBuffer::sizeInBytes const):
(WebCore::ByteArrayPixelBuffer::createScratchPixelBuffer const):
* Source/WebCore/platform/graphics/ByteArrayPixelBuffer.h: Added.
(WebCore::ByteArrayPixelBuffer::data const):
(WebCore::ByteArrayPixelBuffer::takeData):
(WebCore::ByteArrayPixelBuffer::encode const):
(WebCore::ByteArrayPixelBuffer::decode):
(isType):
* Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::readPixelsForPaintResults):
(WebCore::GraphicsContextGLANGLE::paintRenderingResultsToPixelBuffer):
* Source/WebCore/platform/graphics/cg/GraphicsContextGLCG.cpp:
(WebCore::GraphicsContextGL::paintToCanvas):
* Source/WebCore/platform/graphics/cg/ImageBufferCGBackend.cpp:
(WebCore::ImageBufferCGBackend::copyCGImageForEncoding const):
* Source/WebCore/platform/graphics/cg/ImageBufferUtilitiesCG.cpp:
(WebCore::encode):
* Source/WebCore/platform/graphics/cv/VideoFrameCV.mm:
(WebCore::VideoFrameCV::createFromPixelBuffer):
* Source/WebCore/platform/graphics/filters/FilterImage.cpp:
(WebCore::copyImageBytes):
* Source/WebCore/rendering/shapes/Shape.cpp:
(WebCore::Shape::createRasterShape):
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp:
(WebKit::RemoteGraphicsContextGL::paintPixelBufferToImageBuffer):
* Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::getPixelBufferForImageBuffer):
* Source/WebKit/Platform/IPC/PixelBufferReference.h:
(IPC::PixelBufferReference::encode const):
(IPC::PixelBufferReference::decode):
* Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
* Tools/TestWebKitAPI/Tests/WebCore/ImageBufferTests.cpp:
(TestWebKitAPI::imageBufferPixelIs):

Canonical link: https://commits.webkit.org/251282@main

Modified Paths

trunk/Sour

[webkit-changes] [291364] trunk/Source/WebCore

2022-03-16 Thread said
re/ChangeLog
trunk/Source/WebCore/Headers.cmake
trunk/Source/WebCore/PlatformAppleWin.cmake
trunk/Source/WebCore/PlatformMac.cmake
trunk/Source/WebCore/Sources.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp
trunk/Source/WebCore/platform/graphics/GraphicsContext.h
trunk/Source/WebCore/platform/graphics/GraphicsTypes.h
trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.h


Added Paths

trunk/Source/WebCore/platform/graphics/GraphicsContextState.cpp
trunk/Source/WebCore/platform/graphics/GraphicsContextState.h
trunk/Source/WebCore/platform/graphics/GraphicsContextStateSaver.h
trunk/Source/WebCore/platform/graphics/PlatformGraphicsContext.h
trunk/Source/WebCore/platform/graphics/TextBoxIterator.h
trunk/Source/WebCore/platform/graphics/cg/CGContextStateSaver.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (291363 => 291364)

--- trunk/Source/WebCore/ChangeLog	2022-03-16 20:50:30 UTC (rev 291363)
+++ trunk/Source/WebCore/ChangeLog	2022-03-16 20:52:19 UTC (rev 291364)
@@ -1,3 +1,99 @@
+2022-03-16  Said Abou-Hallawa  
+
+[GPU Process] Move other classes out of GraphicsContext.h
+https://bugs.webkit.org/show_bug.cgi?id=237944
+
+Reviewed by Simon Fraser.
+
+This is a step towards making GraphicsContextState a class and move
+more functionalities to it.
+
+* Headers.cmake:
+* PlatformAppleWin.cmake:
+* PlatformMac.cmake:
+* Sources.txt:
+* WebCore.xcodeproj/project.pbxproj:
+* platform/graphics/GraphicsContext.cpp:
+(WebCore::TextBoxIterator::TextBoxIterator): Deleted.
+(WebCore::TextBoxIterator::offset const): Deleted.
+(WebCore::TextBoxIterator::increment): Deleted.
+(WebCore::TextBoxIterator::atEnd const): Deleted.
+(WebCore::TextBoxIterator::current const): Deleted.
+(WebCore::TextBoxIterator::direction const): Deleted.
+(WebCore::TextBoxIterator::operator== const): Deleted.
+(WebCore::TextBoxIterator::operator!= const): Deleted.
+(WebCore::GraphicsContextState::GraphicsContextState): Deleted.
+(WebCore::GraphicsContextState::mergeChanges): Deleted.
+(WebCore::GraphicsContextStateChange::changesFromState const): Deleted.
+(WebCore::GraphicsContextStateChange::accumulate): Deleted.
+(WebCore::GraphicsContextStateChange::apply const): Deleted.
+(WebCore::GraphicsContextStateChange::dump const): Deleted.
+(WebCore::operator<<): Deleted.
+* platform/graphics/GraphicsContext.h:
+(WebCore::DocumentMarkerLineStyle::encode const): Deleted.
+(WebCore::DocumentMarkerLineStyle::decode): Deleted.
+(WebCore::GraphicsContextStateChange::GraphicsContextStateChange): Deleted.
+(WebCore::GraphicsContextStateSaver::GraphicsContextStateSaver): Deleted.
+(WebCore::GraphicsContextStateSaver::~GraphicsContextStateSaver): Deleted.
+(WebCore::GraphicsContextStateSaver::save): Deleted.
+(WebCore::GraphicsContextStateSaver::restore): Deleted.
+(WebCore::GraphicsContextStateSaver::context const): Deleted.
+(WebCore::TransparencyLayerScope::TransparencyLayerScope): Deleted.
+(WebCore::TransparencyLayerScope::beginLayer): Deleted.
+(WebCore::TransparencyLayerScope::~TransparencyLayerScope): Deleted.
+(WebCore::GraphicsContextStateStackChecker::GraphicsContextStateStackChecker): Deleted.
+(WebCore::GraphicsContextStateStackChecker::~GraphicsContextStateStackChecker): Deleted.
+(WebCore::InterpolationQualityMaintainer::InterpolationQualityMaintainer): Deleted.
+(WebCore::InterpolationQualityMaintainer::~InterpolationQualityMaintainer): Deleted.
+* platform/graphics/GraphicsContextState.cpp: Added.
+(WebCore::GraphicsContextState::GraphicsContextState):
+(WebCore::GraphicsContextState::mergeChanges):
+(WebCore::GraphicsContextStateChange::changesFromState const):
+(WebCore::GraphicsContextStateChange::accumulate):
+(WebCore::GraphicsContextStateChange::apply const):
+(WebCore::GraphicsContextStateChange::dump const):
+(WebCore::operator<<):
+* platform/graphics/GraphicsContextState.h: Added.
+(WebCore::GraphicsContextStateChange::GraphicsContextStateChange):
+* platform/graphics/GraphicsContextStateSaver.h: Added.
+(WebCore::GraphicsContextStateSaver::GraphicsContextStateSaver):
+(WebCore::GraphicsContextStateSaver::~GraphicsContextStateSaver):
+(WebCore::GraphicsContextStateSaver::save):
+(WebCore::GraphicsContextStateSaver::restore):
+(WebCore::GraphicsContextStateSaver::context const):
+(WebCore::TransparencyLayerScope::TransparencyLayerScope):
+(WebCore::TransparencyLayerScope::beginLayer):
+(WebCore::TransparencyLayerScope::~TransparencyLay

[webkit-changes] [291696] trunk/Source

2022-03-22 Thread said
):
(WebCore::GraphicsContextCairo::drawGlyphs):
* platform/graphics/cairo/ImageBufferCairoBackend.cpp:
(WebCore::ImageBufferCairoBackend::draw):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::coreInterpolationQuality):
(WebCore::GraphicsContextCG::GraphicsContextCG):
(WebCore::GraphicsContextCG::didUpdateState):
(WebCore::GraphicsContextCG::strokeRect):
(WebCore::GraphicsContextCG::canUseShadowBlur const):
* platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:
(WebCore::DrawGlyphsRecorder::populateInternalState):
(WebCore::DrawGlyphsRecorder::populateInternalContext):
* platform/graphics/displaylists/DisplayList.cpp:
(WebCore::DisplayList::DisplayList::shouldDumpForFlags):
* platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::endTransparencyLayer):
* platform/graphics/displaylists/DisplayListReplayer.cpp:
(WebCore::DisplayList::applySetStateItem):
* platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
(Nicosia::CairoOperationRecorder::didUpdateState):
(Nicosia::CairoOperationRecorder::fillRect):
(Nicosia::CairoOperationRecorder::fillRoundedRect):
(Nicosia::CairoOperationRecorder::drawGlyphs):
(Nicosia::CairoOperationRecorder::drawNativeImage):
(Nicosia::CairoOperationRecorder::drawRect):
(Nicosia::CairoOperationRecorder::drawLine):
(Nicosia::CairoOperationRecorder::drawLinesForText):
(Nicosia::CairoOperationRecorder::drawEllipse):

Source/WebKit:

* GPUProcess/graphics/RemoteDisplayListRecorder.cpp:
(WebKit::RemoteDisplayListRecorder::setState):
* Shared/cairo/ShareableBitmapCairo.cpp:
(WebKit::ShareableBitmap::paint):
* WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
(WebKit::convertCairoSurfaceToShareableBitmap):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp
trunk/Source/WebCore/platform/graphics/GraphicsContext.h
trunk/Source/WebCore/platform/graphics/GraphicsContextState.cpp
trunk/Source/WebCore/platform/graphics/GraphicsContextState.h
trunk/Source/WebCore/platform/graphics/cairo/CairoOperations.cpp
trunk/Source/WebCore/platform/graphics/cairo/FontCairo.cpp
trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairoBackend.cpp
trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
trunk/Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayList.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.cpp
trunk/Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp
trunk/Source/WebKit/Shared/cairo/ShareableBitmapCairo.cpp
trunk/Source/WebKit/WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (291695 => 291696)

--- trunk/Source/WebCore/ChangeLog	2022-03-22 20:33:50 UTC (rev 291695)
+++ trunk/Source/WebCore/ChangeLog	2022-03-22 20:37:51 UTC (rev 291696)
@@ -1,3 +1,132 @@
+2022-03-22  Said Abou-Hallawa  
+
+[GPU Process] Make GraphicsContextState a class
+https://bugs.webkit.org/show_bug.cgi?id=238192
+
+Reviewed by Simon Fraser.
+
+This will make the members be private so we have to provide getters for
+all of them. This change will prevent changing the members without going
+through the setters.
+
+* platform/graphics/GraphicsContext.cpp:
+(WebCore::GraphicsContext::GraphicsContext):
+* platform/graphics/GraphicsContext.h:
+(WebCore::GraphicsContext::GraphicsContext):
+(WebCore::GraphicsContext::fillBrush const):
+(WebCore::GraphicsContext::fillColor const):
+(WebCore::GraphicsContext::fillGradient const):
+(WebCore::GraphicsContext::fillGradientSpaceTransform const):
+(WebCore::GraphicsContext::fillPattern const):
+(WebCore::GraphicsContext::fillRule const):
+(WebCore::GraphicsContext::strokeBrush const):
+(WebCore::GraphicsContext::strokeColor const):
+(WebCore::GraphicsContext::strokeGradient const):
+(WebCore::GraphicsContext::strokeGradientSpaceTransform const):
+(WebCore::GraphicsContext::strokePattern const):
+(WebCore::GraphicsContext::strokeThickness const):
+(WebCore::GraphicsContext::strokeStyle const):
+(WebCore::GraphicsContext::dropShadow const):
+(WebCore::GraphicsContext::compositeMode const):
+(WebCore::GraphicsContext::alpha const):
+(WebCore::GraphicsContext::textDrawingMode const):
+(WebCore::GraphicsContext::imageInterpolationQuality const):
+(WebCore::GraphicsContext::shouldAntialias const):
+(WebCore::GraphicsContext::shouldSmoothFonts const):
+(WebCore::GraphicsCont

[webkit-changes] [291771] trunk/Source/WebCore

2022-03-23 Thread said
Title: [291771] trunk/Source/WebCore








Revision 291771
Author s...@apple.com
Date 2022-03-23 15:50:35 -0700 (Wed, 23 Mar 2022)


Log Message
[GPU Process] Ensure DisplayList::Recorder and its base class are initialized with the same GraphicsContextState
https://bugs.webkit.org/show_bug.cgi?id=238278
rdar://84602660

Reviewed by Simon Fraser.

DisplayList::RecorderImpl passes the initial GraphicsContextState to its
base class DisplayList::Recorder which pushes it on its stack. But
DisplayList::Recorder does not pass this initial GraphicsContextState to
its base class which is GraphicsContext. So DisplayList::Recorder ends up
having the initial state but the GraphicsContext ends up having the default
state.

DisplayList::Recorder::drawGlyphs() calls DrawGlyphsRecorder::drawGlyphs()
which stores the original fillBrush, strokeBrush and dropShadow. It uses
these original values to restore the owner GraphicsContext when it finishes.
The problem is DrawGlyphsRecorder::drawGlyphs() stores the values in the
state of the GraphicsContext which are the default. So in some cases we
may restore the default state to the drawing GraphicsContext.

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::GraphicsContext):
* platform/graphics/GraphicsContext.h:
* platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::Recorder):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp
trunk/Source/WebCore/platform/graphics/GraphicsContext.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (291770 => 291771)

--- trunk/Source/WebCore/ChangeLog	2022-03-23 22:07:06 UTC (rev 291770)
+++ trunk/Source/WebCore/ChangeLog	2022-03-23 22:50:35 UTC (rev 291771)
@@ -1,3 +1,31 @@
+2022-03-23  Said Abou-Hallawa  
+
+[GPU Process] Ensure DisplayList::Recorder and its base class are initialized with the same GraphicsContextState
+https://bugs.webkit.org/show_bug.cgi?id=238278
+rdar://84602660
+
+Reviewed by Simon Fraser.
+
+DisplayList::RecorderImpl passes the initial GraphicsContextState to its
+base class DisplayList::Recorder which pushes it on its stack. But 
+DisplayList::Recorder does not pass this initial GraphicsContextState to
+its base class which is GraphicsContext. So DisplayList::Recorder ends up
+having the initial state but the GraphicsContext ends up having the default
+state.
+
+DisplayList::Recorder::drawGlyphs() calls DrawGlyphsRecorder::drawGlyphs()
+which stores the original fillBrush, strokeBrush and dropShadow. It uses
+these original values to restore the owner GraphicsContext when it finishes.
+The problem is DrawGlyphsRecorder::drawGlyphs() stores the values in the
+state of the GraphicsContext which are the default. So in some cases we
+may restore the default state to the drawing GraphicsContext.
+
+* platform/graphics/GraphicsContext.cpp:
+(WebCore::GraphicsContext::GraphicsContext):
+* platform/graphics/GraphicsContext.h:
+* platform/graphics/displaylists/DisplayListRecorder.cpp:
+(WebCore::DisplayList::Recorder::Recorder):
+
 2022-03-23  Andres Gonzalez  
 
 ITM: Lazy caching of HelpText property that results in a call to textUnderElement().


Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp (291770 => 291771)

--- trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp	2022-03-23 22:07:06 UTC (rev 291770)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp	2022-03-23 22:50:35 UTC (rev 291771)
@@ -48,6 +48,11 @@
 {
 }
 
+GraphicsContext::GraphicsContext(const GraphicsContextState& state)
+: m_state(state)
+{
+}
+
 GraphicsContext::~GraphicsContext()
 {
 ASSERT(m_stack.isEmpty());


Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (291770 => 291771)

--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2022-03-23 22:07:06 UTC (rev 291770)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2022-03-23 22:50:35 UTC (rev 291771)
@@ -66,6 +66,7 @@
 WTF_MAKE_NONCOPYABLE(GraphicsContext); WTF_MAKE_FAST_ALLOCATED;
 public:
 WEBCORE_EXPORT GraphicsContext(const GraphicsContextState::ChangeFlags& = { }, InterpolationQuality = InterpolationQuality::Default);
+WEBCORE_EXPORT GraphicsContext(const GraphicsContextState&);
 WEBCORE_EXPORT virtual ~GraphicsContext();
 
 virtual bool hasPlatformContext() const { return false; }


Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp (291770 => 291771)

--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp	2022-03-23 22:07:06 UTC (rev 291770)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp	2022-03-23 22:50:35 UTC (re

[webkit-changes] [291881] trunk/Source/WebKit

2022-03-25 Thread said
Title: [291881] trunk/Source/WebKit








Revision 291881
Author s...@apple.com
Date 2022-03-25 13:07:32 -0700 (Fri, 25 Mar 2022)


Log Message
[GPU Process] RemoteRenderingBackend::stopListeningForIPC() should not change the RemoteResourceCache on the main thread
https://bugs.webkit.org/show_bug.cgi?id=238298
rdar://90731372

Reviewed by Simon Fraser.

To release the RemoteResourceCache and the rendering resource request on
the WorkQueue thread, RemoteRenderingBackend::stopListeningForIPC() dispatches
an empty lambda to its WorkQueue but m_renderingResourcesRequest and
m_remoteResourceCache are captured by-move to initializers to this lambda.

But this means m_remoteResourceCache is changed on the main thread while
the WorkQueue thread may be accessing it to get a cached remote resource.
The EWS crashes showed that, RemoteRenderingBackend::stopListeningForIPC()
on the main thread is waiting its WorkQueue to stop and complete all its
work including the dispatched empty lambda. And the WorkQueue thread is
getting wrong resource counters from the RemoteResourceCache. This would
happen if the HashMaps of RemoteResourceCache were emptied on the main
thread while the counters had outdated values.

To fix this thread safety issue, the RemoteResourceCache should not ever
be changed on the main thread. Since capturing by-move is kind of change,
we will capture m_renderingResourcesRequest and m_remoteResourceCache by
reference and we let the dispatched lambda explicitly releases them on
the WorkQueue thread.

* GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::stopListeningForIPC):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (291880 => 291881)

--- trunk/Source/WebKit/ChangeLog	2022-03-25 19:34:19 UTC (rev 291880)
+++ trunk/Source/WebKit/ChangeLog	2022-03-25 20:07:32 UTC (rev 291881)
@@ -1,3 +1,34 @@
+2022-03-25  Said Abou-Hallawa  
+
+[GPU Process] RemoteRenderingBackend::stopListeningForIPC() should not change the RemoteResourceCache on the main thread 
+https://bugs.webkit.org/show_bug.cgi?id=238298
+rdar://90731372
+
+Reviewed by Simon Fraser.
+
+To release the RemoteResourceCache and the rendering resource request on
+the WorkQueue thread, RemoteRenderingBackend::stopListeningForIPC() dispatches
+an empty lambda to its WorkQueue but m_renderingResourcesRequest and
+m_remoteResourceCache are captured by-move to initializers to this lambda.
+
+But this means m_remoteResourceCache is changed on the main thread while
+the WorkQueue thread may be accessing it to get a cached remote resource.
+The EWS crashes showed that, RemoteRenderingBackend::stopListeningForIPC()
+on the main thread is waiting its WorkQueue to stop and complete all its
+work including the dispatched empty lambda. And the WorkQueue thread is
+getting wrong resource counters from the RemoteResourceCache. This would
+happen if the HashMaps of RemoteResourceCache were emptied on the main
+thread while the counters had outdated values.
+
+To fix this thread safety issue, the RemoteResourceCache should not ever
+be changed on the main thread. Since capturing by-move is kind of change,
+we will capture m_renderingResourcesRequest and m_remoteResourceCache by
+reference and we let the dispatched lambda explicitly releases them on
+the WorkQueue thread.
+
+* GPUProcess/graphics/RemoteRenderingBackend.cpp:
+(WebKit::RemoteRenderingBackend::stopListeningForIPC):
+
 2022-03-25  Per Arne Vollan  
 
 [macOS][WP] Remove unused sandbox extension rule


Modified: trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp (291880 => 291881)

--- trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp	2022-03-25 19:34:19 UTC (rev 291880)
+++ trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp	2022-03-25 20:07:32 UTC (rev 291881)
@@ -114,9 +114,14 @@
 void RemoteRenderingBackend::stopListeningForIPC()
 {
 ASSERT(RunLoop::isMain());
-// Make sure we destroy the ResourceCache on the WorkQueue since it gets populated on the WorkQueue.
-// Make sure rendering resource request is released after destroying the cache.
-m_workQueue->dispatch([renderingResourcesRequest = WTFMove(m_renderingResourcesRequest), remoteResourceCache = WTFMove(m_remoteResourceCache)] { });
+
+// This item is dispatched to the WorkQueue before calling stopAndWaitForCompletion() such that it will process it last, after any existing work.
+m_workQueue->dispatch([&] {
+// Make sure we destroy the ResourceCache on the WorkQueue since it gets populated on the WorkQueue.
+// Make sure rendering resource request is released after destroying the cache.
+m_rem

[webkit-changes] [291907] trunk/Source/WebKit

2022-03-25 Thread said
Title: [291907] trunk/Source/WebKit








Revision 291907
Author s...@apple.com
Date 2022-03-25 17:53:45 -0700 (Fri, 25 Mar 2022)


Log Message
[GPU Process] [iOS] Enable GPU Process for DOM rendering on iOS
https://bugs.webkit.org/show_bug.cgi?id=236508
rdar://83437844

Reviewed by Jon Lee.

* FeatureFlags/WebKit-appletvos.plist:
* FeatureFlags/WebKit-ios.plist:
* FeatureFlags/WebKit-watchos.plist:
* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultUseGPUProcessForDOMRenderingEnabled):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/FeatureFlags/WebKit-appletvos.plist
trunk/Source/WebKit/FeatureFlags/WebKit-ios.plist
trunk/Source/WebKit/FeatureFlags/WebKit-watchos.plist
trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (291906 => 291907)

--- trunk/Source/WebKit/ChangeLog	2022-03-26 00:02:24 UTC (rev 291906)
+++ trunk/Source/WebKit/ChangeLog	2022-03-26 00:53:45 UTC (rev 291907)
@@ -1,3 +1,17 @@
+2022-03-25  Said Abou-Hallawa  
+
+[GPU Process] [iOS] Enable GPU Process for DOM rendering on iOS
+https://bugs.webkit.org/show_bug.cgi?id=236508
+rdar://83437844
+
+Reviewed by Jon Lee.
+
+* FeatureFlags/WebKit-appletvos.plist:
+* FeatureFlags/WebKit-ios.plist:
+* FeatureFlags/WebKit-watchos.plist:
+* Shared/WebPreferencesDefaultValues.cpp:
+(WebKit::defaultUseGPUProcessForDOMRenderingEnabled):
+
 2022-03-25  Chris Dumez  
 
 Use StringView::split() instead of String::split() in more places


Modified: trunk/Source/WebKit/FeatureFlags/WebKit-appletvos.plist (291906 => 291907)

--- trunk/Source/WebKit/FeatureFlags/WebKit-appletvos.plist	2022-03-26 00:02:24 UTC (rev 291906)
+++ trunk/Source/WebKit/FeatureFlags/WebKit-appletvos.plist	2022-03-26 00:53:45 UTC (rev 291907)
@@ -20,7 +20,7 @@
 	gpu_process_dom_rendering
 	
 		Enabled
-		
+		
 	
 	gpu_process_media
 	


Modified: trunk/Source/WebKit/FeatureFlags/WebKit-ios.plist (291906 => 291907)

--- trunk/Source/WebKit/FeatureFlags/WebKit-ios.plist	2022-03-26 00:02:24 UTC (rev 291906)
+++ trunk/Source/WebKit/FeatureFlags/WebKit-ios.plist	2022-03-26 00:53:45 UTC (rev 291907)
@@ -20,7 +20,7 @@
 	gpu_process_dom_rendering
 	
 		Enabled
-		
+		
 	
 	gpu_process_media
 	


Modified: trunk/Source/WebKit/FeatureFlags/WebKit-watchos.plist (291906 => 291907)

--- trunk/Source/WebKit/FeatureFlags/WebKit-watchos.plist	2022-03-26 00:02:24 UTC (rev 291906)
+++ trunk/Source/WebKit/FeatureFlags/WebKit-watchos.plist	2022-03-26 00:53:45 UTC (rev 291907)
@@ -20,7 +20,7 @@
 	gpu_process_dom_rendering
 	
 		Enabled
-		
+		
 	
 	gpu_process_media
 	


Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (291906 => 291907)

--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2022-03-26 00:02:24 UTC (rev 291906)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2022-03-26 00:53:45 UTC (rev 291907)
@@ -175,8 +175,14 @@
 #if HAVE(UIKIT_WEBKIT_INTERNALS)
 return false;
 #else
-return isFeatureFlagEnabled("gpu_process_dom_rendering", false);
+#if ENABLE(GPU_PROCESS_BY_DEFAULT) && PLATFORM(IOS_FAMILY)
+bool defaultValue = true;
+#else
+bool defaultValue = false;
 #endif
+
+return isFeatureFlagEnabled("gpu_process_dom_rendering", defaultValue);
+#endif
 }
 
 bool defaultUseGPUProcessForMediaEnabled()






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [292026] trunk/Source/WebCore

2022-03-29 Thread said
Title: [292026] trunk/Source/WebCore








Revision 292026
Author s...@apple.com
Date 2022-03-29 02:43:07 -0700 (Tue, 29 Mar 2022)


Log Message
REGRESSION(r291771): [ iOS ] Text sometimes draw with incorrect color
https://bugs.webkit.org/show_bug.cgi?id=238466
rdar://90941790

Reviewed by Simon Fraser.

r291771 uncovers this bug: TextBoxPainter::paintForeground() records the
glyphs to a DisplayList before settings the destination GraphicsContext.

The fix is to apply all the changes to the GraphicsContext before calling
TextPainter::setGlyphDisplayListIfNeeded().

Delete TextPainter::paint() because it is not used.

Initialize TextPainter with a reference to FontCascade.

* rendering/TextBoxPainter.cpp:
(WebCore::TextBoxPainter::paintForeground):
* rendering/TextPainter.cpp:
(WebCore::TextPainter::TextPainter):
(WebCore::TextPainter::paintTextAndEmphasisMarksIfNeeded):
(WebCore::TextPainter::paintRange):
(WebCore::TextPainter::paint): Deleted.
* rendering/TextPainter.h:
(WebCore::TextPainter::setShadowColorFilter):
(WebCore::TextPainter::setGlyphDisplayListIfNeeded):
(WebCore::TextPainter::setFont): Deleted.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/TextBoxPainter.cpp
trunk/Source/WebCore/rendering/TextPainter.cpp
trunk/Source/WebCore/rendering/TextPainter.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (292025 => 292026)

--- trunk/Source/WebCore/ChangeLog	2022-03-29 07:59:35 UTC (rev 292025)
+++ trunk/Source/WebCore/ChangeLog	2022-03-29 09:43:07 UTC (rev 292026)
@@ -1,3 +1,33 @@
+2022-03-29  Said Abou-Hallawa  
+
+REGRESSION(r291771): [ iOS ] Text sometimes draw with incorrect color
+https://bugs.webkit.org/show_bug.cgi?id=238466
+rdar://90941790
+
+Reviewed by Simon Fraser.
+
+r291771 uncovers this bug: TextBoxPainter::paintForeground() records the
+glyphs to a DisplayList before settings the destination GraphicsContext.
+
+The fix is to apply all the changes to the GraphicsContext before calling
+TextPainter::setGlyphDisplayListIfNeeded().
+
+Delete TextPainter::paint() because it is not used.
+
+Initialize TextPainter with a reference to FontCascade.
+
+* rendering/TextBoxPainter.cpp:
+(WebCore::TextBoxPainter::paintForeground):
+* rendering/TextPainter.cpp:
+(WebCore::TextPainter::TextPainter):
+(WebCore::TextPainter::paintTextAndEmphasisMarksIfNeeded):
+(WebCore::TextPainter::paintRange):
+(WebCore::TextPainter::paint): Deleted.
+* rendering/TextPainter.h:
+(WebCore::TextPainter::setShadowColorFilter):
+(WebCore::TextPainter::setGlyphDisplayListIfNeeded):
+(WebCore::TextPainter::setFont): Deleted.
+
 2022-03-29  Zan Dobersek  
 
 [GTK][WPE] Use GBMBufferSwapchain in GraphicsContextGLTextureMapperANGLE


Modified: trunk/Source/WebCore/rendering/TextBoxPainter.cpp (292025 => 292026)

--- trunk/Source/WebCore/rendering/TextBoxPainter.cpp	2022-03-29 07:59:35 UTC (rev 292025)
+++ trunk/Source/WebCore/rendering/TextBoxPainter.cpp	2022-03-29 09:43:07 UTC (rev 292026)
@@ -324,8 +324,7 @@
 if (!emphasisMark.isEmpty())
 emphasisMarkOffset = *m_emphasisMarkExistsAndIsAbove ? -font.metricsOfPrimaryFont().ascent() - font.emphasisMarkDescent(emphasisMark) : font.metricsOfPrimaryFont().descent() + font.emphasisMarkAscent(emphasisMark);
 
-TextPainter textPainter { context };
-textPainter.setFont(font);
+TextPainter textPainter { context, font };
 textPainter.setStyle(markedText.style.textStyles);
 textPainter.setIsHorizontal(textBox().isHorizontal());
 if (markedText.style.textShadow) {
@@ -337,18 +336,18 @@
 if (auto* debugShadow = debugTextShadow())
 textPainter.setShadow(debugShadow);
 
+GraphicsContextStateSaver stateSaver(context, markedText.style.textStyles.strokeWidth > 0 || markedText.type == MarkedText::DraggedContent);
+if (markedText.type == MarkedText::DraggedContent)
+context.setAlpha(markedText.style.alpha);
+updateGraphicsContext(context, markedText.style.textStyles);
+
 if (auto* legacyInlineBox = textBox().legacyInlineBox())
-textPainter.setGlyphDisplayListIfNeeded(*legacyInlineBox, m_paintInfo, font, context, m_paintTextRun);
+textPainter.setGlyphDisplayListIfNeeded(*legacyInlineBox, m_paintInfo, m_paintTextRun);
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
 else
-textPainter.setGlyphDisplayListIfNeeded(*textBox().inlineBox(), m_paintInfo, font, context, m_paintTextRun);
+textPainter.setGlyphDisplayListIfNeeded(*textBox().inlineBox(), m_paintInfo, m_paintTextRun);
 #endif
 
-GraphicsContextStateSaver stateSaver { context, false };
-if (markedText.type == MarkedText::DraggedContent) {
-stateSaver.save();
-context.setAlpha(markedText.style.alpha);
-}
 // TextPainter wants the box rectangle and text origin of the entire

[webkit-changes] [292190] trunk

2022-03-31 Thread said
Title: [292190] trunk








Revision 292190
Author s...@apple.com
Date 2022-03-31 17:28:42 -0700 (Thu, 31 Mar 2022)


Log Message
[GPU Process] [iOS] Text decoration is always drawn with solid stroke style
https://bugs.webkit.org/show_bug.cgi?id=236909
rdar://89196615

Reviewed by Simon Fraser.

Source/WebCore:

Pass the missing StrokeStyle parameter to the DrawLinesForText item and
to the recorder methods: drawLinesForText() and recordDrawLinesForText().

* platform/graphics/GraphicsTypes.h:
* platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::DrawLinesForText::DrawLinesForText):
(WebCore::DisplayList::DrawLinesForText::apply const):
* platform/graphics/displaylists/DisplayListItems.h:
(WebCore::DisplayList::DrawLinesForText::style const):
(WebCore::DisplayList::DrawLinesForText::encode const):
(WebCore::DisplayList::DrawLinesForText::decode):
* platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::drawLinesForText):
* platform/graphics/displaylists/DisplayListRecorder.h:
* platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
(WebCore::DisplayList::RecorderImpl::recordDrawLinesForText):
* platform/graphics/displaylists/DisplayListRecorderImpl.h:

Source/WebKit:

* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::recordDrawLinesForText):
* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

LayoutTests:

Unskip failed text decoration layout tests.

* platform/ios-wk2/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios-wk2/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/GraphicsTypes.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h




Diff

Modified: trunk/LayoutTests/ChangeLog (292189 => 292190)

--- trunk/LayoutTests/ChangeLog	2022-04-01 00:22:51 UTC (rev 292189)
+++ trunk/LayoutTests/ChangeLog	2022-04-01 00:28:42 UTC (rev 292190)
@@ -1,3 +1,15 @@
+2022-03-31  Said Abou-Hallawa  
+
+[GPU Process] [iOS] Text decoration is always drawn with solid stroke style
+https://bugs.webkit.org/show_bug.cgi?id=236909
+rdar://89196615
+
+Reviewed by Simon Fraser.
+
+Unskip failed text decoration layout tests.
+
+* platform/ios-wk2/TestExpectations:
+
 2022-03-31  Jon Lee  
 
 Unreviewed test gardening.


Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (292189 => 292190)

--- trunk/LayoutTests/platform/ios-wk2/TestExpectations	2022-04-01 00:22:51 UTC (rev 292189)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations	2022-04-01 00:28:42 UTC (rev 292190)
@@ -2215,12 +2215,6 @@
 webkit.org/b/236908 fast/text/multiple-codeunit-vertical-upright-2.html [ ImageOnlyFailure ]
 webkit.org/b/236908 fast/text/multiple-codeunit-vertical-upright.html [ ImageOnlyFailure ]
 
-# Text decoration failures
-webkit.org/b/236909 fast/css3-text/css3-text-decoration/text-decoration-dashed.html [ ImageOnlyFailure ]
-webkit.org/b/236909 fast/css3-text/css3-text-decoration/text-decoration-dotted-dashed.html [ ImageOnlyFailure ]
-webkit.org/b/236909 fast/css3-text/css3-text-decoration/text-decoration-dotted.html [ ImageOnlyFailure ]
-webkit.org/b/236909 fast/css3-text/css3-text-decoration/text-underline-style.html [ ImageOnlyFailure ]
-
 # Red text pokes out
 webkit.org/b/236911 fast/text/international/synthesized-italic-vertical.html [ ImageOnlyFailure ]
 


Modified: trunk/Source/WebCore/ChangeLog (292189 => 292190)

--- trunk/Source/WebCore/ChangeLog	2022-04-01 00:22:51 UTC (rev 292189)
+++ trunk/Source/WebCore/ChangeLog	2022-04-01 00:28:42 UTC (rev 292190)
@@ -1,3 +1,29 @@
+2022-03-31  Said Abou-Hallawa  
+
+[GPU Process] [iOS] Text decoration is always drawn with solid stroke style
+https://bugs.webkit.org/show_bug.cgi?id=236909
+rdar://89196615
+
+Reviewed by Simon Fraser.
+
+Pass the missing StrokeStyle parameter to the DrawLinesForText item and
+to the recorder methods: drawLinesForText() and recordDrawLinesForText().
+
+* platform/graphics/GraphicsTypes.h:
+* platform/graphics/displaylists/DisplayListItems.cpp:
+(WebCore::DisplayList::DrawLinesForText::DrawLinesForText):
+(WebCore::DisplayList::DrawLinesForText::apply const):
+* platform/graphics/displaylists/DisplayLi

[webkit-changes] [292198] trunk

2022-03-31 Thread said
Title: [292198] trunk








Revision 292198
Author s...@apple.com
Date 2022-03-31 20:39:53 -0700 (Thu, 31 Mar 2022)


Log Message
[GPU Process] [iOS] Vertical text is incorrectly displaced
https://bugs.webkit.org/show_bug.cgi?id=232917
rdar://85483031

Reviewed by Myles C. Maxfield.

Source/WebCore:

DrawGlyphsRecorder calls FontCascade::drawGlyphs() which calls CoreText
to draw the vertical text to its internal context. This internal context
is setup to be called back for every single run. When CoreText calls
DrawGlyphsRecorder::recordDrawGlyphs(), it records drawing the glyph runs
into the owner recorder. The problem is CoreText passes the transformed
positions to recordDrawGlyphs(). To call drawGlyphsAndCacheFont() in the
recorder we have to pass the un-transformed anchor point. To get this anchor
point, we have to apply the inverse of fillVectorWithVerticalGlyphPositions()
to the first transformed position.

* platform/graphics/GraphicsContext.h:
* platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:
(WebCore::DrawGlyphsRecorder::recordDrawGlyphs):

LayoutTests:

Unskip failed vertical text layout tests.

* platform/ios-wk2/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios-wk2/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/GraphicsContext.h
trunk/Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (292197 => 292198)

--- trunk/LayoutTests/ChangeLog	2022-04-01 02:49:53 UTC (rev 292197)
+++ trunk/LayoutTests/ChangeLog	2022-04-01 03:39:53 UTC (rev 292198)
@@ -1,3 +1,15 @@
+2022-03-31  Said Abou-Hallawa  
+
+[GPU Process] [iOS] Vertical text is incorrectly displaced
+https://bugs.webkit.org/show_bug.cgi?id=232917
+rdar://85483031
+
+Reviewed by Myles C. Maxfield.
+
+Unskip failed vertical text layout tests.
+
+* platform/ios-wk2/TestExpectations:
+
 2022-03-31  Fujii Hironori  
 
 [WinCairo] Unreviewed test gardening


Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (292197 => 292198)

--- trunk/LayoutTests/platform/ios-wk2/TestExpectations	2022-04-01 02:49:53 UTC (rev 292197)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations	2022-04-01 03:39:53 UTC (rev 292198)
@@ -2207,17 +2207,6 @@
 # Test failures from turning GPU Process on by default
 webkit.org/b/234536 webxr/high-performance.html [ Failure ]
 
-# There is text in/near the box
-webkit.org/b/236907 imported/w3c/web-platform-tests/css/css-flexbox/css-flexbox-test1.html [ ImageOnlyFailure ]
-
-# Misplaced text
-webkit.org/b/236908 fast/text/cjk-multi-codepoint-cluster-vertical.html [ ImageOnlyFailure ]
-webkit.org/b/236908 fast/text/multiple-codeunit-vertical-upright-2.html [ ImageOnlyFailure ]
-webkit.org/b/236908 fast/text/multiple-codeunit-vertical-upright.html [ ImageOnlyFailure ]
-
-# Red text pokes out
-webkit.org/b/236911 fast/text/international/synthesized-italic-vertical.html [ ImageOnlyFailure ]
-
 # Not sure if the orange line diff is negligible or important
 webkit.org/b/236912 http/wpt/css/css-highlight-api/highlight-text-decorations.html [ ImageOnlyFailure ]
 
@@ -2225,27 +2214,6 @@
 webkit.org/b/236913 fast/css/variables/test-suite/005.html [ ImageOnlyFailure Pass ]
 webkit.org/b/236913 imported/blink/fast/multicol/vertical-lr/float-content-break.html [ ImageOnlyFailure ]
 
-# There are small rectangles or characters below main character
-webkit.org/b/236916 imported/w3c/web-platform-tests/css/css-values/ch-unit-011.html [ ImageOnlyFailure ]
-webkit.org/b/236916 imported/w3c/web-platform-tests/css/css-values/ic-unit-002.html [ ImageOnlyFailure ]
-webkit.org/b/236916 imported/w3c/web-platform-tests/css/css-values/ic-unit-003.html [ ImageOnlyFailure ]
-webkit.org/b/236916 imported/w3c/web-platform-tests/css/css-values/ic-unit-009.html [ ImageOnlyFailure ]
-webkit.org/b/236916 imported/w3c/web-platform-tests/css/css-values/ic-unit-010.html [ ImageOnlyFailure ]
-webkit.org/b/236916 imported/w3c/web-platform-tests/css/css-values/ic-unit-011.html [ ImageOnlyFailure ]
-webkit.org/b/236916 imported/w3c/web-platform-tests/css/css-values/ic-unit-012.html [ ImageOnlyFailure ]
-
-# Writing mode failures
-webkit.org/b/236921 imported/w3c/web-platform-tests/css/css-writing-modes/central-baseline-alignment-002.xht [ ImageOnlyFailure ]
-webkit.org/b/236921 imported/w3c/web-platform-tests/css/css-writing-modes/inline-block-alignment-004.xht [ ImageOnlyFailure ]
-webkit.org/b/236921 imported/w3c/web-platform-tests/css/css-writing-modes/inline-block-alignment-orthogonal-vlr-005.xht [ ImageOnlyFailure ]
-webkit.org/b/236921 imported/w3c/web-platform-tests/css/css-writing-modes/inline-block-alignment-orthogonal-vrl-004.xht [ ImageOnlyFailure ]
-webkit.org/b/236921 imported/w3c/web-platform-tests/css/css-writing-modes/inline-table-alignment-004.xht [ ImageOnlyFailure ]
-webkit.org/b/236921 imported/w3c/web-platform-tes

[webkit-changes] [292294] trunk

2022-04-04 Thread said
Title: [292294] trunk








Revision 292294
Author s...@apple.com
Date 2022-04-04 10:20:49 -0700 (Mon, 04 Apr 2022)


Log Message
[GPU Process] [iOS] Sometimes the text drop shadow is not drawn
https://bugs.webkit.org/show_bug.cgi?id=236923
rdar://89196794

Reviewed by Simon Fraser.

Source/WebCore:

The baseCTM of internal context of DrawGlyphsRecorder has to match the
baseCTM of the owner DisplayList::Recorder.

When recording the glyph runs, DrawGlyphsRecorder::recordDrawGlyphs()
updates the shadow of the recorder such that ShadowsIgnoreTransforms is
set to "false". That means no shadow transformation will be applied to
the offset or the blur radius in GPUP.

* platform/graphics/DrawGlyphsRecorder.h:
* platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:
(WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder):
(WebCore::DrawGlyphsRecorder::populateInternalState):
* platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::Recorder):
* platform/graphics/harfbuzz/DrawGlyphsRecorderHarfBuzz.cpp:
(WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder):
* platform/graphics/win/DrawGlyphsRecorderWin.cpp:
(WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder):
* rendering/RenderThemeIOS.mm:
(WebCore::paintAttachmentText):

LayoutTests:

Unskip failed the text drop shadow layout test.

* platform/ios-wk2/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios-wk2/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/DrawGlyphsRecorder.h
trunk/Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
trunk/Source/WebCore/platform/graphics/harfbuzz/DrawGlyphsRecorderHarfBuzz.cpp
trunk/Source/WebCore/platform/graphics/win/DrawGlyphsRecorderWin.cpp
trunk/Source/WebCore/rendering/RenderThemeIOS.mm




Diff

Modified: trunk/LayoutTests/ChangeLog (292293 => 292294)

--- trunk/LayoutTests/ChangeLog	2022-04-04 17:07:24 UTC (rev 292293)
+++ trunk/LayoutTests/ChangeLog	2022-04-04 17:20:49 UTC (rev 292294)
@@ -1,3 +1,15 @@
+2022-04-04  Said Abou-Hallawa  
+
+[GPU Process] [iOS] Sometimes the text drop shadow is not drawn
+https://bugs.webkit.org/show_bug.cgi?id=236923
+rdar://89196794
+
+Reviewed by Simon Fraser.
+
+Unskip failed the text drop shadow layout test.
+
+* platform/ios-wk2/TestExpectations:
+
 2022-04-04  Cathie Chen  
 
 REGRESSION(r291797): [wk1] 5 contain-intrinsic-size* tests are constant text failures


Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (292293 => 292294)

--- trunk/LayoutTests/platform/ios-wk2/TestExpectations	2022-04-04 17:07:24 UTC (rev 292293)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations	2022-04-04 17:20:49 UTC (rev 292294)
@@ -2210,12 +2210,9 @@
 # Wrong text color
 webkit.org/b/236913 imported/blink/fast/multicol/vertical-lr/float-content-break.html [ ImageOnlyFailure ]
 
-# No/bad colored boxes
-webkit.org/b/236923 fast/css/paint-order-shadow.html [ ImageOnlyFailure ]
-webkit.org/b/236923 imported/blink/svg/text/obb-paintserver.html [ ImageOnlyFailure ]
-
 # No/bad gradient/pattern
 webkit.org/b/236924 svg/transforms/transformed-text-fill-pattern.html [ ImageOnlyFailure ]
+webkit.org/b/236924 imported/blink/svg/text/obb-paintserver.html [ ImageOnlyFailure ]
 
 # Media failures
 webkit.org/b/237295 fast/mediastream/video-rotation-gpu-process-crash.html [ Timeout Crash Pass ]


Modified: trunk/Source/WebCore/ChangeLog (292293 => 292294)

--- trunk/Source/WebCore/ChangeLog	2022-04-04 17:07:24 UTC (rev 292293)
+++ trunk/Source/WebCore/ChangeLog	2022-04-04 17:20:49 UTC (rev 292294)
@@ -1,3 +1,32 @@
+2022-04-04  Said Abou-Hallawa  
+
+[GPU Process] [iOS] Sometimes the text drop shadow is not drawn
+https://bugs.webkit.org/show_bug.cgi?id=236923
+rdar://89196794
+
+Reviewed by Simon Fraser.
+
+The baseCTM of internal context of DrawGlyphsRecorder has to match the
+baseCTM of the owner DisplayList::Recorder.
+
+When recording the glyph runs, DrawGlyphsRecorder::recordDrawGlyphs()
+updates the shadow of the recorder such that ShadowsIgnoreTransforms is
+set to "false". That means no shadow transformation will be applied to
+the offset or the blur radius in GPUP.
+
+* platform/graphics/DrawGlyphsRecorder.h:
+* platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:
+(WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder):
+(WebCore::DrawGlyphsRecorder::populateInternalState):
+* platform/graphics/displaylists/DisplayListRecorder.cpp:
+(WebCore::DisplayList::Recorder::Recorder):
+* platform/graphics/harfbuzz/DrawGlyphsRecorderHarfBuzz.cpp:
+(WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder):
+* platform/graphics/win/DrawGlyphsRecorderWin.cpp:
+   

[webkit-changes] [292364] trunk/Source/WebCore

2022-04-04 Thread said
::buildEffectExpression const): Deleted.
(WebCore::SVGFilterBuilder::buildExpression const): Deleted.
* svg/graphics/filters/SVGFilterBuilder.h:
(WebCore::SVGFilterBuilder::targetBoundingBox const):
(WebCore::SVGFilterBuilder::primitiveUnits const):
(WebCore::SVGFilterBuilder::effectByRenderer):
(WebCore::SVGFilterBuilder::setTargetBoundingBox): Deleted.
(WebCore::SVGFilterBuilder::setPrimitiveUnits): Deleted.
* svg/graphics/filters/SVGFilterExpression.h:
* svg/graphics/filters/SVGFilterGraph.h: Added.
(WebCore::SVGFilterGraph::SVGFilterGraph):
(WebCore::SVGFilterGraph::sourceGraphic const):
(WebCore::SVGFilterGraph::sourceAlpha const):
(WebCore::SVGFilterGraph::addNamedNode):
(WebCore::SVGFilterGraph::getNamedNode const):
(WebCore::SVGFilterGraph::getNamedNodes const):
(WebCore::SVGFilterGraph::setNodeInputs):
(WebCore::SVGFilterGraph::getNodeInputs const):
(WebCore::SVGFilterGraph::lastNode const):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/platform/graphics/filters/FEDropShadow.cpp
trunk/Source/WebCore/platform/graphics/filters/FEDropShadow.h
trunk/Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp
trunk/Source/WebCore/platform/graphics/filters/FEGaussianBlur.h
trunk/Source/WebCore/platform/graphics/filters/FEOffset.cpp
trunk/Source/WebCore/platform/graphics/filters/FEOffset.h
trunk/Source/WebCore/platform/graphics/filters/Filter.h
trunk/Source/WebCore/platform/graphics/filters/FilterFunction.h
trunk/Source/WebCore/rendering/CSSFilter.cpp
trunk/Source/WebCore/rendering/CSSFilter.h
trunk/Source/WebCore/rendering/RenderLayer.cpp
trunk/Source/WebCore/rendering/RenderLayerFilters.cpp
trunk/Source/WebCore/rendering/RenderLayerFilters.h
trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp
trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp
trunk/Source/WebCore/svg/SVGFEDropShadowElement.cpp
trunk/Source/WebCore/svg/SVGFEDropShadowElement.h
trunk/Source/WebCore/svg/SVGFEGaussianBlurElement.cpp
trunk/Source/WebCore/svg/SVGFEGaussianBlurElement.h
trunk/Source/WebCore/svg/SVGFEOffsetElement.cpp
trunk/Source/WebCore/svg/SVGFEOffsetElement.h
trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
trunk/Source/WebCore/svg/graphics/filters/SVGFilter.cpp
trunk/Source/WebCore/svg/graphics/filters/SVGFilter.h
trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp
trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h
trunk/Source/WebCore/svg/graphics/filters/SVGFilterExpression.h


Added Paths

trunk/Source/WebCore/svg/graphics/filters/SVGFilterGraph.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (292363 => 292364)

--- trunk/Source/WebCore/ChangeLog	2022-04-05 02:03:13 UTC (rev 292363)
+++ trunk/Source/WebCore/ChangeLog	2022-04-05 02:06:26 UTC (rev 292364)
@@ -1,3 +1,132 @@
+2022-04-04  Said Abou-Hallawa  
+
+[GPU Process] CSSFilter should be created only at the painting time
+https://bugs.webkit.org/show_bug.cgi?id=236574
+rdar://89210004
+
+Reviewed by Simon Fraser.
+
+Instead of building the whole filter chain to get the filter outsets at 
+the layout time, we can use the SVGFilterPrimitiveStandardAttributes and
+the FilterOperation super classes to get their outsets without having to
+build the FilterEffects.
+
+CSSFilter::calculateOutsets() is a static method which will loop through
+the FilterOperations and will add up the outsets of the blur, the drop-
+shadow and the reference FilterOperation.
+
+SVGFilterBuilder::calculateFilterOutsets() will loop through the primitives
+of the filter element and will call the new virtual method outsets() which
+will call a static method in the corresponding FilterEffect.
+
+FEDropShadow, FEGaussianBlur and FEOffset will be provide static methods
+for calculating the effect outsets. These static methods will be called 
+from CSSFilter::calculateOutsets() and from the SVGFExxxElements.
+
+To remove the duplication of the code from SVGFilterBuilder::
+buildFilterEffects() and calculateFilterOutsets(), a new template class
+named SVGFilterGraph will be introduced. It represents the graph of the
+SVGFilter. The nodes of  this graph will be of type FilterEffecct when
+it is used to build the SVGFilterExpression. The nodes will be of type
+SVGFilterPrimitiveStandardAttributes when it is used to calculate the
+filter outsets.
+
+* WebCore.xcodeproj/project.pbxproj:
+* platform/graphics/filters/FEDropShadow.cpp:
+(WebCore::FEDropShadow::calculateOutsets):
+(WebCore::FEDropShadow::outsets const): Deleted.
+* platform/graphics/filters/FEDropShadow.h:
+* platform/graphics/filters/FEGaussianBlur.cpp:
+(WebCore::FEGaussianBlur::calculateOutsets):
+(WebCore::FEGaussianBlur::outsets const): Deleted.
+* platform/graph

[webkit-changes] [292478] trunk

2022-04-06 Thread said
Title: [292478] trunk








Revision 292478
Author s...@apple.com
Date 2022-04-06 10:57:35 -0700 (Wed, 06 Apr 2022)


Log Message
[GPU Process] Text filled with pattern sometimes draw with incorrect color
https://bugs.webkit.org/show_bug.cgi?id=236924
rdar://89196811

Reviewed by Myles C. Maxfield.

Source/WebCore:

applyFillPattern() and applyStrokePattern() have to explicitly called
for the GraphicsContext or the DisplayList::Recorder before drawing
with the pattern. But this is not happening for the DrawGlyphsRecorder
internalContext. When CoreText calls DrawGlyphsRecorder::recordDrawGlyphs()
back, it applies the CGGState fill color to the DisplayList::Recorder so
it overrides what applyFillPattern() did before recording the glyphs.

* platform/graphics/DrawGlyphsRecorder.h:
* platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:
(WebCore::DrawGlyphsRecorder::populateInternalContext):
(WebCore::DrawGlyphsRecorder::updateFillColor):
(WebCore::DrawGlyphsRecorder::updateStrokeColor):
(WebCore::DrawGlyphsRecorder::recordDrawGlyphs):

LayoutTests:

* platform/ios-wk2/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios-wk2/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/DrawGlyphsRecorder.h
trunk/Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (292477 => 292478)

--- trunk/LayoutTests/ChangeLog	2022-04-06 17:48:44 UTC (rev 292477)
+++ trunk/LayoutTests/ChangeLog	2022-04-06 17:57:35 UTC (rev 292478)
@@ -1,3 +1,13 @@
+2022-04-06  Said Abou-Hallawa  
+
+[GPU Process] Text filled with pattern sometimes draw with incorrect color
+https://bugs.webkit.org/show_bug.cgi?id=236924
+rdar://89196811
+
+Reviewed by Myles C. Maxfield.
+
+* platform/ios-wk2/TestExpectations:
+
 2022-04-06  Oriol Brufau  
 
 [css] Turn -webkit-border-image into a shorthand


Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (292477 => 292478)

--- trunk/LayoutTests/platform/ios-wk2/TestExpectations	2022-04-06 17:48:44 UTC (rev 292477)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations	2022-04-06 17:57:35 UTC (rev 292478)
@@ -2208,10 +2208,6 @@
 # Wrong text color
 webkit.org/b/236913 imported/blink/fast/multicol/vertical-lr/float-content-break.html [ ImageOnlyFailure ]
 
-# No/bad gradient/pattern
-webkit.org/b/236924 svg/transforms/transformed-text-fill-pattern.html [ ImageOnlyFailure ]
-webkit.org/b/236924 imported/blink/svg/text/obb-paintserver.html [ ImageOnlyFailure ]
-
 # Media failures
 webkit.org/b/237295 fast/mediastream/video-rotation-gpu-process-crash.html [ Timeout Crash Pass ]
 webkit.org/b/236926 webrtc/vp8-then-h264-gpu-process-crash.html [ Timeout Pass ]


Modified: trunk/Source/WebCore/ChangeLog (292477 => 292478)

--- trunk/Source/WebCore/ChangeLog	2022-04-06 17:48:44 UTC (rev 292477)
+++ trunk/Source/WebCore/ChangeLog	2022-04-06 17:57:35 UTC (rev 292478)
@@ -1,3 +1,25 @@
+2022-04-06  Said Abou-Hallawa  
+
+[GPU Process] Text filled with pattern sometimes draw with incorrect color
+https://bugs.webkit.org/show_bug.cgi?id=236924
+rdar://89196811
+
+Reviewed by Myles C. Maxfield.
+
+applyFillPattern() and applyStrokePattern() have to explicitly called
+for the GraphicsContext or the DisplayList::Recorder before drawing 
+with the pattern. But this is not happening for the DrawGlyphsRecorder 
+internalContext. When CoreText calls DrawGlyphsRecorder::recordDrawGlyphs()
+back, it applies the CGGState fill color to the DisplayList::Recorder so
+it overrides what applyFillPattern() did before recording the glyphs.
+
+* platform/graphics/DrawGlyphsRecorder.h:
+* platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:
+(WebCore::DrawGlyphsRecorder::populateInternalContext):
+(WebCore::DrawGlyphsRecorder::updateFillColor):
+(WebCore::DrawGlyphsRecorder::updateStrokeColor):
+(WebCore::DrawGlyphsRecorder::recordDrawGlyphs):
+
 2022-04-06  Chris Dumez  
 
 Reduce number of conversions from StringView to String


Modified: trunk/Source/WebCore/platform/graphics/DrawGlyphsRecorder.h (292477 => 292478)

--- trunk/Source/WebCore/platform/graphics/DrawGlyphsRecorder.h	2022-04-06 17:48:44 UTC (rev 292477)
+++ trunk/Source/WebCore/platform/graphics/DrawGlyphsRecorder.h	2022-04-06 17:57:35 UTC (rev 292478)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2020-2021 Apple Inc. All rights reserved.
+ * Copyright (C) 2020-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -95,6 +95,8 @@
 void updateShadow(const DropShadow&, ShadowsIgnoreTransforms);
 
 #if USE(CORE_TEXT) && !PLATFORM(WIN)
+void updateFillColor(CGColorRef);
+  

[webkit-changes] [292512] trunk/Source/WebCore

2022-04-06 Thread said
):
(WebCore::SVGFilterBuilder::calculateFilterOutsets):
(WebCore::SVGFilterBuilder::SVGFilterBuilder): Deleted.
* svg/graphics/filters/SVGFilterBuilder.h:
(WebCore::SVGFilterBuilder::targetBoundingBox const): Deleted.
(WebCore::SVGFilterBuilder::primitiveUnits const): Deleted.
(): Deleted.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSFilterImageValue.cpp
trunk/Source/WebCore/page/FrameView.cpp
trunk/Source/WebCore/platform/graphics/NullGraphicsContext.h
trunk/Source/WebCore/rendering/CSSFilter.cpp
trunk/Source/WebCore/rendering/CSSFilter.h
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
trunk/Source/WebCore/rendering/RenderLayerFilters.cpp
trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp
trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp
trunk/Source/WebCore/svg/SVGFEBlendElement.cpp
trunk/Source/WebCore/svg/SVGFEBlendElement.h
trunk/Source/WebCore/svg/SVGFEColorMatrixElement.cpp
trunk/Source/WebCore/svg/SVGFEColorMatrixElement.h
trunk/Source/WebCore/svg/SVGFEComponentTransferElement.cpp
trunk/Source/WebCore/svg/SVGFEComponentTransferElement.h
trunk/Source/WebCore/svg/SVGFECompositeElement.cpp
trunk/Source/WebCore/svg/SVGFECompositeElement.h
trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp
trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.h
trunk/Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp
trunk/Source/WebCore/svg/SVGFEDiffuseLightingElement.h
trunk/Source/WebCore/svg/SVGFEDisplacementMapElement.cpp
trunk/Source/WebCore/svg/SVGFEDisplacementMapElement.h
trunk/Source/WebCore/svg/SVGFEDistantLightElement.cpp
trunk/Source/WebCore/svg/SVGFEDistantLightElement.h
trunk/Source/WebCore/svg/SVGFEDropShadowElement.cpp
trunk/Source/WebCore/svg/SVGFEDropShadowElement.h
trunk/Source/WebCore/svg/SVGFEFloodElement.cpp
trunk/Source/WebCore/svg/SVGFEFloodElement.h
trunk/Source/WebCore/svg/SVGFEGaussianBlurElement.cpp
trunk/Source/WebCore/svg/SVGFEGaussianBlurElement.h
trunk/Source/WebCore/svg/SVGFEImageElement.cpp
trunk/Source/WebCore/svg/SVGFEImageElement.h
trunk/Source/WebCore/svg/SVGFELightElement.h
trunk/Source/WebCore/svg/SVGFEMergeElement.cpp
trunk/Source/WebCore/svg/SVGFEMergeElement.h
trunk/Source/WebCore/svg/SVGFEMorphologyElement.cpp
trunk/Source/WebCore/svg/SVGFEMorphologyElement.h
trunk/Source/WebCore/svg/SVGFEOffsetElement.cpp
trunk/Source/WebCore/svg/SVGFEOffsetElement.h
trunk/Source/WebCore/svg/SVGFEPointLightElement.cpp
trunk/Source/WebCore/svg/SVGFEPointLightElement.h
trunk/Source/WebCore/svg/SVGFESpecularLightingElement.cpp
trunk/Source/WebCore/svg/SVGFESpecularLightingElement.h
trunk/Source/WebCore/svg/SVGFESpotLightElement.cpp
trunk/Source/WebCore/svg/SVGFESpotLightElement.h
trunk/Source/WebCore/svg/SVGFETileElement.cpp
trunk/Source/WebCore/svg/SVGFETileElement.h
trunk/Source/WebCore/svg/SVGFETurbulenceElement.cpp
trunk/Source/WebCore/svg/SVGFETurbulenceElement.h
trunk/Source/WebCore/svg/SVGFilterElement.cpp
trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
trunk/Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
trunk/Source/WebCore/svg/graphics/filters/SVGFilter.cpp
trunk/Source/WebCore/svg/graphics/filters/SVGFilter.h
trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp
trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (292511 => 292512)

--- trunk/Source/WebCore/ChangeLog	2022-04-06 22:21:41 UTC (rev 292511)
+++ trunk/Source/WebCore/ChangeLog	2022-04-06 22:41:39 UTC (rev 292512)
@@ -1,3 +1,128 @@
+2022-04-06  Said Abou-Hallawa  
+
+[GPU Process] Make SVGFEImageElement::filterEffect() create an ImageBuffer compatible with the destination GraphicsContext
+https://bugs.webkit.org/show_bug.cgi?id=236573
+rdar://89209695
+
+Reviewed by Simon Fraser.
+
+Pass a GraphicsContext to CSSFilter::create() and SVGFilter::create().
+If there is no GraphicsContext available, like the call we make in
+CSSFilterImageValue::image(), pass a NullGraphicsContext(). This will 
+create a local ImageBuffer. And this is exactly what we want.
+
+The GraphicsContext will be passed from SVGFilter::buildFilterExpression()
+to all the overridden filterEffect(). SVGFEImageElement::filterEffect()
+is the only one that is going to use it. It calls GraphicsContext::
+createImageBuffer() to create an ImageBuffer for drawing the SVGElement.
+
+In preparation to remove SVGFilterBuilder:
+
+-- Pass an SVGFilter instead of SVGFilterBuilder to all the overridden
+   filterEffect() and all the overridden lightSource().
+-- Make SVGFilterBuilder::calculateFilterOutsets() a static method.
+-- Remove the members: SVGFilterBuilder::m_tragetBoundingBox and
+   SVGFilterBuilder::m_primitiveUnits since they exist in SVGFilter.
+
+* css/CSSFilterImageValue.cpp:
+(WebCore::CSSFilterImageValue::image):
+* page/FrameView.

[webkit-changes] [292961] trunk/Source/WebKit

2022-04-18 Thread said
Title: [292961] trunk/Source/WebKit








Revision 292961
Author s...@apple.com
Date 2022-04-18 11:30:14 -0700 (Mon, 18 Apr 2022)


Log Message
REGRESSION(r288847): GPU Process crash under GPUProcess::canExitUnderMemoryPressure()
https://bugs.webkit.org/show_bug.cgi?id=238558
rdar://91052033

Reviewed by Kimmo Kinnunen.

Use the rendering resources request count to keep the GPU process alive.

RemoteRenderingBackend updates it when active image buffers change.
RemoteGraphicsContextGL updates it on creation and destruction.
RemoteMediaPlayerProxy updates it on creation and destruction.

Remove RemoterRenderingBackend::updateRenderingResourceRequest(), the
count is now counted by RemoteImageBuffer creation, destruction.

Remove RemoterRenderingBackend::allowsExitUnderMemoryPressure(), it was
crashing due to race between the function and the work queue cleanup task.

Remove RemoteMediaPlayerManagerProxy::allowsExitUnderMemoryPressure(),
the count is already counted by RemoteMediaPlayerProxy creation, destruction.

Based on the initial patch by Kimmo Kinnunen.

* GPUProcess/GPUConnectionToWebProcess.cpp:
(WebKit::GPUConnectionToWebProcess::allowsExitUnderMemoryPressure const):
* GPUProcess/graphics/QualifiedResourceHeap.h:
(WebKit::QualifiedResourceHeap::hasImageBuffer const): Deleted.
(WebKit::QualifiedResourceHeap::hasNativeImage const): Deleted.
(WebKit::QualifiedResourceHeap::hasFont const): Deleted.
* GPUProcess/graphics/RemoteImageBuffer.h:
(WebKit::RemoteImageBuffer::m_renderingResourcesRequest):
* GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::createImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::releaseRemoteResourceWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::updateRenderingResourceRequest): Deleted.
(WebKit::RemoteRenderingBackend::allowsExitUnderMemoryPressure const): Deleted.
* GPUProcess/graphics/RemoteRenderingBackend.h:
* GPUProcess/graphics/RemoteResourceCache.h:
(WebKit::RemoteResourceCache::resourceHeap const): Deleted.
(WebKit::RemoteResourceCache::hasActiveDrawables const): Deleted.
* GPUProcess/graphics/ScopedRenderingResourcesRequest.h:
(WebKit::hasOutstandingRenderingResourceUsage):
* GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:
(WebKit::RemoteMediaPlayerManagerProxy::deleteMediaPlayer):
(WebKit::RemoteMediaPlayerManagerProxy::allowsExitUnderMemoryPressure const): Deleted.
* GPUProcess/media/RemoteMediaPlayerManagerProxy.h:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp
trunk/Source/WebKit/GPUProcess/graphics/QualifiedResourceHeap.h
trunk/Source/WebKit/GPUProcess/graphics/RemoteImageBuffer.h
trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp
trunk/Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.h
trunk/Source/WebKit/GPUProcess/graphics/RemoteResourceCache.h
trunk/Source/WebKit/GPUProcess/graphics/ScopedRenderingResourcesRequest.h
trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp
trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerManagerProxy.h




Diff

Modified: trunk/Source/WebKit/ChangeLog (292960 => 292961)

--- trunk/Source/WebKit/ChangeLog	2022-04-18 17:56:11 UTC (rev 292960)
+++ trunk/Source/WebKit/ChangeLog	2022-04-18 18:30:14 UTC (rev 292961)
@@ -1,3 +1,52 @@
+2022-04-18  Said Abou-Hallawa  
+
+REGRESSION(r288847): GPU Process crash under GPUProcess::canExitUnderMemoryPressure()
+https://bugs.webkit.org/show_bug.cgi?id=238558
+rdar://91052033
+
+Reviewed by Kimmo Kinnunen.
+
+Use the rendering resources request count to keep the GPU process alive.
+
+RemoteRenderingBackend updates it when active image buffers change.
+RemoteGraphicsContextGL updates it on creation and destruction.
+RemoteMediaPlayerProxy updates it on creation and destruction.
+
+Remove RemoterRenderingBackend::updateRenderingResourceRequest(), the
+count is now counted by RemoteImageBuffer creation, destruction.
+
+Remove RemoterRenderingBackend::allowsExitUnderMemoryPressure(), it was
+crashing due to race between the function and the work queue cleanup task.
+
+Remove RemoteMediaPlayerManagerProxy::allowsExitUnderMemoryPressure(),
+the count is already counted by RemoteMediaPlayerProxy creation, destruction.
+
+Based on the initial patch by Kimmo Kinnunen.
+
+* GPUProcess/GPUConnectionToWebProcess.cpp:
+(WebKit::GPUConnectionToWebProcess::allowsExitUnderMemoryPressure const):
+* GPUProcess/graphics/QualifiedResourceHeap.h:
+(WebKit::QualifiedResourceHeap::hasImageBuffer const): Deleted.
+(WebKit::QualifiedResourceHeap::hasNativeImage const): Deleted.
+(WebKit::QualifiedResourceHeap::hasFont const): Deleted.
+* GPUProcess/graphics/RemoteImageBuffer.h:
+(WebKit::RemoteImageBuffer::m_renderingResourcesRequest):
+* GPUProcess/graph

[webkit-changes] [289976] trunk/Source

2022-02-16 Thread said
splaylists/DisplayListRecorder.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.cpp
trunk/Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp
trunk/Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp
trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h
trunk/Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (289975 => 289976)

--- trunk/Source/WebCore/ChangeLog	2022-02-16 23:35:12 UTC (rev 289975)
+++ trunk/Source/WebCore/ChangeLog	2022-02-16 23:45:09 UTC (rev 289976)
@@ -1,3 +1,71 @@
+2022-02-16  Said Abou-Hallawa  
+
+[GPU Process] Route the call to ImageBuffer::drawPattern() through GraphicsContext
+https://bugs.webkit.org/show_bug.cgi?id=236638
+
+Reviewed by Simon Fraser.
+
+This will allow recording ImageBuffer::drawPattern() via the super classes
+DisplayList::RecorderImpl and RemoteDisplayListRecorderProxy. So another
+version of GraphicsContext::drawPattern() will be added which takes
+ImageBuffer as an argument.
+
+To make the display list item DrawPattern be suitable for recording both
+versions of drawPattern(), we need to remove the argument 'imageSize'
+from GraphicsContext::drawPattern() since this function is only called from
+Image::drawPattern() and it passes imageSize = Image::size(). So imageSize
+can be calculated from the NativeImage::size().
+
+The DisplayList::Replayer and RemoteDisplayListRecorder have to consider 
+the RenderingResourceIdentifier of the DrawPattern can be the identifier
+of a NativeImage or an ImageBuffer. DrawPattern::apply() needs to take a
+SourceImage and it can make the decision whether to call the NativeImage
+version or the ImageBuffer version of GraphicsContext::drawPattern().
+
+* html/CustomPaintImage.cpp:
+(WebCore::CustomPaintImage::drawPattern):
+* platform/graphics/BifurcatedGraphicsContext.cpp:
+(WebCore::BifurcatedGraphicsContext::drawPattern):
+* platform/graphics/BifurcatedGraphicsContext.h:
+* platform/graphics/CrossfadeGeneratedImage.cpp:
+(WebCore::CrossfadeGeneratedImage::drawPattern):
+* platform/graphics/GraphicsContext.cpp:
+(WebCore::GraphicsContext::drawPattern):
+* platform/graphics/GraphicsContext.h:
+(WebCore::GraphicsContext::drawPattern):
+* platform/graphics/Image.cpp:
+(WebCore::Image::drawPattern):
+* platform/graphics/NamedImageGeneratedImage.cpp:
+(WebCore::NamedImageGeneratedImage::drawPattern):
+* platform/graphics/NullGraphicsContext.h:
+* platform/graphics/cairo/GraphicsContextCairo.cpp:
+(WebCore::GraphicsContextCairo::drawPattern):
+* platform/graphics/cairo/GraphicsContextCairo.h:
+* platform/graphics/cg/GraphicsContextCG.cpp:
+(WebCore::GraphicsContextCG::drawPattern):
+* platform/graphics/cg/GraphicsContextCG.h:
+* platform/graphics/displaylists/DisplayListItems.cpp:
+(WebCore::DisplayList::DrawPattern::DrawPattern):
+(WebCore::DisplayList::DrawPattern::apply const):
+* platform/graphics/displaylists/DisplayListItems.h:
+(WebCore::DisplayList::DrawPattern::DrawPattern):
+(WebCore::DisplayList::DrawPattern::imageIdentifier const):
+(WebCore::DisplayList::DrawPattern::imageSize const): Deleted.
+* platform/graphics/displaylists/DisplayListRecorder.cpp:
+(WebCore::DisplayList::Recorder::drawPattern):
+* platform/graphics/displaylists/DisplayListRecorder.h:
+(WebCore::DisplayList::Recorder::recordDrawPattern):
+* platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
+(WebCore::DisplayList::RecorderImpl::recordDrawPattern):
+* platform/graphics/displaylists/DisplayListRecorderImpl.h:
+(WebCore::DisplayList::RecorderImpl::recordDrawPattern):
+* platform/graphics/displaylists/DisplayListReplayer.cpp:
+(WebCore::DisplayList::applySourceImageItem):
+(WebCore::DisplayList::Replayer::applyItem):
+* platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
+(Nicosia::CairoOperationRecorder::drawPattern):
+* platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
+
 

[webkit-changes] [289981] trunk

2022-02-16 Thread said
Title: [289981] trunk








Revision 289981
Author s...@apple.com
Date 2022-02-16 16:11:38 -0800 (Wed, 16 Feb 2022)


Log Message
[GPU Process] Enable drawing the SVGImage in the GPU Process
https://bugs.webkit.org/show_bug.cgi?id=227748
rdar://80582699

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

This sub-test was originally failing and this is why the bug
https://bugs.webkit.org/show_bug.cgi?id=231001 was filed.

After https://trac.webkit.org/changeset/279722/webkit, it got fixed because
SVGImage was rendered to a NativeImage and the NativeImage is rendered
to the destination GraphicsContext. GraphicsContext::drawNativeImage()
handles the image orientation properly.

Because this change will be reverted, the result of this test has to be
rebaselined with the failure message.

* web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY-expected.txt:

Source/WebCore:

This patch reverts the revisions r279722, r284740 and r283531. So it will
enable drawing the SVGImage in GPU Process if GPU Process for "canvas" or
for "DOM rendering" is enabled

We fix the scratch ImageBuffer in SVGImage::nativeImage() to be accelerated
if acceleratedDrawingEnabled() is true. We also create a remote one if
GPUProcess for DOM rendering is enabled.

We also allow passing a ColorSpace to SVGImage::nativeImage() to control
the colorSpace of the resulted NativeImage. Because this function overrides
the base class method Image::nativeImage() we have to pass a ColorSpace
to BitmapImage also. A FIXME comment is added to BitmapImage::nativeImage()
to handle this argument in a future patch.

* html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::drawImage):
(WebCore::drawImageToContext):
(WebCore::CanvasRenderingContext2DBase::fullCanvasCompositedDrawImage):
* platform/graphics/BifurcatedGraphicsContext.cpp:
(WebCore::BifurcatedGraphicsContext::drawImageForCanvas): Deleted.
* platform/graphics/BifurcatedGraphicsContext.h:
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::nativeImage):
* platform/graphics/BitmapImage.h:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawImageForCanvas): Deleted.
* platform/graphics/GraphicsContext.h:
* platform/graphics/Image.cpp:
(WebCore::Image::drawForCanvas): Deleted.
* platform/graphics/Image.h:
(WebCore::Image::nativeImage):
(WebCore::Image::draw):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::drawForContainer):
(WebCore::SVGImage::nativeImage):
(WebCore::SVGImage::draw):
(WebCore::SVGImage::drawForCanvasForContainer): Deleted.
(WebCore::SVGImage::drawForContainerInternal): Deleted.
(WebCore::SVGImage::drawForCanvas): Deleted.
(WebCore::SVGImage::drawInternal): Deleted.
(WebCore::SVGImage::drawAsNativeImage): Deleted.
* svg/graphics/SVGImage.h:
* svg/graphics/SVGImageForContainer.cpp:
(WebCore::SVGImageForContainer::drawForCanvas): Deleted.
* svg/graphics/SVGImageForContainer.h:

Modified Paths

trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/imagebitmap/createImageBitmap-flipY-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp
trunk/Source/WebCore/platform/graphics/BifurcatedGraphicsContext.cpp
trunk/Source/WebCore/platform/graphics/BifurcatedGraphicsContext.h
trunk/Source/WebCore/platform/graphics/BitmapImage.cpp
trunk/Source/WebCore/platform/graphics/BitmapImage.h
trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp
trunk/Source/WebCore/platform/graphics/GraphicsContext.h
trunk/Source/WebCore/platform/graphics/Image.cpp
trunk/Source/WebCore/platform/graphics/Image.h
trunk/Source/WebCore/svg/graphics/SVGImage.cpp
trunk/Source/WebCore/svg/graphics/SVGImage.h
trunk/Source/WebCore/svg/graphics/SVGImageForContainer.cpp
trunk/Source/WebCore/svg/graphics/SVGImageForContainer.h




Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (289980 => 289981)

--- trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-17 00:10:58 UTC (rev 289980)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2022-02-17 00:11:38 UTC (rev 289981)
@@ -1,3 +1,24 @@
+2022-02-16  Said Abou-Hallawa  
+
+[GPU Process] Enable drawing the SVGImage in the GPU Process
+https://bugs.webkit.org/show_bug.cgi?id=227748
+rdar://80582699
+
+Reviewed by Simon Fraser.
+
+This sub-test was originally failing and this is why the bug
+https://bugs.webkit.org/show_bug.cgi?id=231001 was filed.
+
+After https://trac.webkit.org/changeset/279722/webkit, it got fixed because
+SVGImage was rendered to a NativeImage and the NativeImage is rendered
+to the destination GraphicsContext. GraphicsContext::drawNativeImage()
+handles the image orientation properly.
+
+Because this change will be reverted, the result of this test has to be
+rebaselined with the failure message.
+
+* web-platform-tests/htm

[webkit-changes] [290542] trunk/Source

2022-02-25 Thread said
Title: [290542] trunk/Source








Revision 290542
Author s...@apple.com
Date 2022-02-25 21:05:55 -0800 (Fri, 25 Feb 2022)


Log Message
[GPU Process] Implement RemoteImageBufferProxy::drawConsuming()
https://bugs.webkit.org/show_bug.cgi?id=236685
rdar://89007426

Reviewed by Simon Fraser.

Source/WebCore:

Assert ImageBuffer::drawConsuming() does not draw into its backend before
it is destroyed.

* platform/graphics/ConcreteImageBuffer.h:

Source/WebKit:

RemoteImageBufferProxy::drawConsuming() should call drawImageBuffer() of
the destination GraphicsContext. No recursion will happen and the expected
behavior will be achieved by this change.

This is the sequence of calls when the Destination GraphicsContext is
local and when it is remote:

-- Destination GraphicsContext is local:
   In this case, the backend of the RemoteImageBufferProxy can be mapped
   in WebProcess; i.e. we do have access to its memory.
   ConcreteImageBuffer::draw() will be called eventually. This function
   will call its backend->draw() which will get a NativeImage by calling
   backend->copyNativeImage(). There is no difference between draw() and
   drawConsuming() in this case because the backend is still owned by
   GPUProcess. So it will not be released immediately. We do not copy the
   pixels since we have to pass DontCopyBackingStore to copyNativeImage().

-- Destination GraphicsContext is remote:
   In this case, Recorder::drawImageBuffer() will be called which will
   call RemoteDisplayListRecorderProxy::recordDrawImageBuffer(). This
   will send a message to GPUProcess and hence all the drawing will
   happen in GPUProcess. Similar to the case of the local GraphicsContext,
   no pixels will be copied from the RemoteImageBuffer backend to the
   NativeImage in all cases. The assumption is the backend will be destroyed
   automatically after calling drawConsuming().

* WebProcess/GPU/graphics/RemoteImageBufferProxy.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/ConcreteImageBuffer.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (290541 => 290542)

--- trunk/Source/WebCore/ChangeLog	2022-02-26 03:59:24 UTC (rev 290541)
+++ trunk/Source/WebCore/ChangeLog	2022-02-26 05:05:55 UTC (rev 290542)
@@ -1,3 +1,16 @@
+2022-02-25  Said Abou-Hallawa  
+
+[GPU Process] Implement RemoteImageBufferProxy::drawConsuming()
+https://bugs.webkit.org/show_bug.cgi?id=236685
+rdar://89007426
+
+Reviewed by Simon Fraser.
+
+Assert ImageBuffer::drawConsuming() does not draw into its backend before
+it is destroyed.
+
+* platform/graphics/ConcreteImageBuffer.h:
+
 2022-02-25  Alejandro G. Castro   and Fujii Hironori 
 
 [GTK][WPE][WC] Move ANGLE context initialisation to GraphicsContextGLTextureMapper::initialize


Modified: trunk/Source/WebCore/platform/graphics/ConcreteImageBuffer.h (290541 => 290542)

--- trunk/Source/WebCore/platform/graphics/ConcreteImageBuffer.h	2022-02-26 03:59:24 UTC (rev 290541)
+++ trunk/Source/WebCore/platform/graphics/ConcreteImageBuffer.h	2022-02-26 05:05:55 UTC (rev 290542)
@@ -196,6 +196,7 @@
 
 void drawConsuming(GraphicsContext& destContext, const FloatRect& destRect, const FloatRect& srcRect, const ImagePaintingOptions& options) override
 {
+ASSERT(&destContext != &context());
 if (auto* backend = ensureBackendCreated()) {
 flushDrawingContext();
 backend->drawConsuming(destContext, destRect, srcRect, options);


Modified: trunk/Source/WebKit/ChangeLog (290541 => 290542)

--- trunk/Source/WebKit/ChangeLog	2022-02-26 03:59:24 UTC (rev 290541)
+++ trunk/Source/WebKit/ChangeLog	2022-02-26 05:05:55 UTC (rev 290542)
@@ -1,3 +1,39 @@
+2022-02-25  Said Abou-Hallawa  
+
+[GPU Process] Implement RemoteImageBufferProxy::drawConsuming()
+https://bugs.webkit.org/show_bug.cgi?id=236685
+rdar://89007426
+
+Reviewed by Simon Fraser.
+
+RemoteImageBufferProxy::drawConsuming() should call drawImageBuffer() of
+the destination GraphicsContext. No recursion will happen and the expected
+behavior will be achieved by this change. 
+
+This is the sequence of calls when the Destination GraphicsContext is
+local and when it is remote:
+
+-- Destination GraphicsContext is local:
+   In this case, the backend of the RemoteImageBufferProxy can be mapped
+   in WebProcess; i.e. we do have access to its memory.
+   ConcreteImageBuffer::draw() will be called eventually. This function
+   will call its backend->draw() which will get a NativeImage by calling
+   backend->copyNativeImage(). There is no difference between draw() and
+   drawConsuming() in this case because the backend is still owned by
+   GPUPro

[webkit-changes] [290581] trunk/Source

2022-02-27 Thread said
Title: [290581] trunk/Source








Revision 290581
Author s...@apple.com
Date 2022-02-27 20:17:48 -0800 (Sun, 27 Feb 2022)


Log Message
[GPU Process] Deleted unneeded constructors from DisplayList::Recorder classes
https://bugs.webkit.org/show_bug.cgi?id=237261

Reviewed by Wenson Hsieh.

Source/WebCore:

This should have been done in r289594.

* platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::Recorder):
* platform/graphics/displaylists/DisplayListRecorder.h:

Source/WebKit:

* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (290580 => 290581)

--- trunk/Source/WebCore/ChangeLog	2022-02-28 04:01:56 UTC (rev 290580)
+++ trunk/Source/WebCore/ChangeLog	2022-02-28 04:17:48 UTC (rev 290581)
@@ -1,3 +1,16 @@
+2022-02-27  Said Abou-Hallawa  
+
+[GPU Process] Deleted unneeded constructors from DisplayList::Recorder classes
+https://bugs.webkit.org/show_bug.cgi?id=237261
+
+Reviewed by Wenson Hsieh.
+
+This should have been done in r289594.
+
+* platform/graphics/displaylists/DisplayListRecorder.cpp:
+(WebCore::DisplayList::Recorder::Recorder):
+* platform/graphics/displaylists/DisplayListRecorder.h:
+
 2022-02-27  Commit Queue  
 
 Unreviewed, reverting r290577.


Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp (290580 => 290581)

--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp	2022-02-28 04:01:56 UTC (rev 290580)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp	2022-02-28 04:17:48 UTC (rev 290581)
@@ -48,12 +48,6 @@
 m_stateStack.append({ state, initialCTM, initialCTM.mapRect(initialClip) });
 }
 
-Recorder::Recorder(Recorder& parent, const GraphicsContextState& state, const FloatRect& initialClip, const AffineTransform& initialCTM)
-: m_drawGlyphsRecorder(*this, parent.m_drawGlyphsRecorder.deconstructDrawGlyphs())
-{
-m_stateStack.append({ state, initialCTM, initialCTM.mapRect(initialClip) });
-}
-
 Recorder::~Recorder()
 {
 ASSERT(m_stateStack.size() == 1); // If this fires, it indicates mismatched save/restore.


Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h (290580 => 290581)

--- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h	2022-02-28 04:01:56 UTC (rev 290580)
+++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h	2022-02-28 04:17:48 UTC (rev 290581)
@@ -59,8 +59,6 @@
 virtual void flushContext(GraphicsContextFlushIdentifier) = 0;
 
 protected:
-WEBCORE_EXPORT Recorder(Recorder& parent, const GraphicsContextState&, const FloatRect& initialClip, const AffineTransform& initialCTM);
-
 virtual void recordSave() = 0;
 virtual void recordRestore() = 0;
 virtual void recordTranslate(float x, float y) = 0;


Modified: trunk/Source/WebKit/ChangeLog (290580 => 290581)

--- trunk/Source/WebKit/ChangeLog	2022-02-28 04:01:56 UTC (rev 290580)
+++ trunk/Source/WebKit/ChangeLog	2022-02-28 04:17:48 UTC (rev 290581)
@@ -1,3 +1,13 @@
+2022-02-27  Said Abou-Hallawa  
+
+[GPU Process] Deleted unneeded constructors from DisplayList::Recorder classes
+https://bugs.webkit.org/show_bug.cgi?id=237261
+
+Reviewed by Wenson Hsieh.
+
+* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
+* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
+
 2022-02-27  Wenson Hsieh  
 
 Invoking "Markup Image" should preserve the existing selection range


Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp (290580 => 290581)

--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp	2022-02-28 04:01:56 UTC (rev 290580)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp	2022-02-28 04:17:48 UTC (rev 290581)
@@ -52,14 +52,6 @@
 {
 }
 
-RemoteDisplayListRecorderProxy::RemoteDisplayListRecorderProxy(RemoteDisplayListRecorderProxy& parent, const FloatRect& initialClip, const AffineTransform& initialCTM)
-: DisplayList::Recorder(parent, { }, initialClip, initialCTM)
-, m_destinationBufferIdentifier(parent.m_destinationBufferIdentifier)
-, m_imageBuffer(parent.m_imageBuffer)
-, m_renderingBackend(parent.m_renderingBackend)
-{
-}
-
 void RemoteDisplayListRecorderProxy::conv

[webkit-changes] [290679] trunk

2022-03-01 Thread said
 rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintListButtonForInput):
(WebCore::RenderThemeMac::paintProgressBar):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyClippingToContext):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::applyResource):
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::createMaskAndSwapContextForTextGradient):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applyResource):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::createTileImage const):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::bufferForeground):

Source/WebKit:
[macOS][REGRESSION] (rr289518): Form controls are scaled twice on Retina display
https://bugs.webkit.org/show_bug.cgi?id=237128
rdar://89064642

Reviewed by Darin Adler.

* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::createImageBuffer const):
(WebKit::RemoteDisplayListRecorderProxy::createAlignedImageBuffer const):
(WebKit::RemoteDisplayListRecorderProxy::createCompatibleImageBuffer const): Deleted.
* WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

LayoutTests:
[macOS][REGRESSION] (rr289518): Form controls are scaled twice on Retina display
https://bugs.webkit.org/show_bug.cgi?id=237128
rdar://89064642

Reviewed by Darin Adler.

* fast/hidpi/hidpi-form-controls-drawing-size-expected.html: Added.
* fast/hidpi/hidpi-form-controls-drawing-size.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/CustomPaintCanvas.cpp
trunk/Source/WebCore/html/CustomPaintImage.cpp
trunk/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp
trunk/Source/WebCore/platform/cocoa/ThemeCocoa.mm
trunk/Source/WebCore/platform/graphics/BitmapImage.cpp
trunk/Source/WebCore/platform/graphics/GradientImage.cpp
trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp
trunk/Source/WebCore/platform/graphics/GraphicsContext.h
trunk/Source/WebCore/platform/graphics/ImageBuffer.cpp
trunk/Source/WebCore/platform/graphics/NamedImageGeneratedImage.cpp
trunk/Source/WebCore/platform/graphics/RenderingMode.h
trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp
trunk/Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
trunk/Source/WebCore/platform/mac/ThemeMac.mm
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
trunk/Source/WebCore/rendering/RenderLayerFilters.cpp
trunk/Source/WebCore/rendering/RenderThemeCocoa.mm
trunk/Source/WebCore/rendering/RenderThemeMac.mm
trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp
trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp
trunk/Source/WebCore/rendering/svg/RenderSVGResourceGradient.cpp
trunk/Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp
trunk/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp
trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h


Added Paths

trunk/LayoutTests/fast/hidpi/hidpi-form-controls-drawing-size-expected.html
trunk/LayoutTests/fast/hidpi/hidpi-form-controls-drawing-size.html




Diff

Modified: trunk/LayoutTests/ChangeLog (290678 => 290679)

--- trunk/LayoutTests/ChangeLog	2022-03-01 23:07:20 UTC (rev 290678)
+++ trunk/LayoutTests/ChangeLog	2022-03-01 23:16:43 UTC (rev 290679)
@@ -1,3 +1,14 @@
+2022-03-01  Said Abou-Hallawa  
+
+[macOS][REGRESSION] (rr289518): Form controls are scaled twice on Retina display
+https://bugs.webkit.org/show_bug.cgi?id=237128
+rdar://89064642
+
+Reviewed by Darin Adler.
+
+* fast/hidpi/hidpi-form-controls-drawing-size-expected.html: Added.
+* fast/hidpi/hidpi-form-controls-drawing-size.html: Added.
+
 2022-03-01  Robert Jenner  
 
 [ Win ] 4X imported/mozilla/svg/blend(layout-tests) are constant Image Only Failures


Added: trunk/LayoutTests/fast/hidpi/hidpi-form-controls-drawing-size-expected.html (0 => 290679)

--- trunk/LayoutTests/fast/hidpi/hidpi-form-controls-drawing-size-expected.html	(rev 0)
+++ trunk/LayoutTests/fast/hidpi/hidpi-form-controls-drawing-size-expected.html	2022-03-01 23:16:43 UTC (rev 290679)
@@ -0,0 +1,12 @@
+
+.box {
+position: absolute;
+width: 100px;
+height: 100px;
+}
+
+

[webkit-changes] [290839] trunk

2022-03-04 Thread said
Title: [290839] trunk








Revision 290839
Author s...@apple.com
Date 2022-03-04 11:40:31 -0800 (Fri, 04 Mar 2022)


Log Message
[GPU Process] Canvas compositing buffer should be created through its GraphicsContext
https://bugs.webkit.org/show_bug.cgi?id=237260
rdar://89196918

Reviewed by Simon Fraser.

Source/WebCore:

If the backend of the underlying ImageBuffer of the canvas is remote the
compositing ImageBuffer will also be remote. This will transfer the whole
compositing operation to GPUProcess.

The layout test fast/canvas/canvas-composite-canvas.html crashes because
of this bug on the GPUP layout bots.

* html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::fullCanvasCompositedDrawImage):
(WebCore::CanvasRenderingContext2DBase::createCompositingBuffer): Deleted.
* html/canvas/CanvasRenderingContext2DBase.h:

LayoutTests:

* gpu-process/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/gpu-process/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp
trunk/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.h




Diff

Modified: trunk/LayoutTests/ChangeLog (290838 => 290839)

--- trunk/LayoutTests/ChangeLog	2022-03-04 19:15:51 UTC (rev 290838)
+++ trunk/LayoutTests/ChangeLog	2022-03-04 19:40:31 UTC (rev 290839)
@@ -1,3 +1,13 @@
+2022-03-04  Said Abou-Hallawa  
+
+[GPU Process] Canvas compositing buffer should be created through its GraphicsContext
+https://bugs.webkit.org/show_bug.cgi?id=237260
+rdar://89196918
+
+Reviewed by Simon Fraser.
+
+* gpu-process/TestExpectations:
+
 2022-03-04  Kate Cheney  
 
 CSP report does not get sent to the document in the case of a detached element


Modified: trunk/LayoutTests/gpu-process/TestExpectations (290838 => 290839)

--- trunk/LayoutTests/gpu-process/TestExpectations	2022-03-04 19:15:51 UTC (rev 290838)
+++ trunk/LayoutTests/gpu-process/TestExpectations	2022-03-04 19:40:31 UTC (rev 290839)
@@ -324,9 +324,6 @@
 webkit.org/b/236927 fast/forms/autofocus-readonly-attribute.html [ Failure Pass ]
 webkit.org/b/236927 fast/forms/input-text-autofocus.html [ Pass Failure ]
 
-# Crashes
-webkit.org/b/236929 fast/canvas/canvas-composite-canvas.html [ Crash ]
-
 # Flaky timeout
 webkit.org/b/236931 editing/pasteboard/dom-paste/dom-paste-same-origin.html [ Timeout Pass ]
 


Modified: trunk/Source/WebCore/ChangeLog (290838 => 290839)

--- trunk/Source/WebCore/ChangeLog	2022-03-04 19:15:51 UTC (rev 290838)
+++ trunk/Source/WebCore/ChangeLog	2022-03-04 19:40:31 UTC (rev 290839)
@@ -1,3 +1,23 @@
+2022-03-04  Said Abou-Hallawa  
+
+[GPU Process] Canvas compositing buffer should be created through its GraphicsContext
+https://bugs.webkit.org/show_bug.cgi?id=237260
+rdar://89196918
+
+Reviewed by Simon Fraser.
+
+If the backend of the underlying ImageBuffer of the canvas is remote the
+compositing ImageBuffer will also be remote. This will transfer the whole
+compositing operation to GPUProcess.
+
+The layout test fast/canvas/canvas-composite-canvas.html crashes because
+of this bug on the GPUP layout bots.
+
+* html/canvas/CanvasRenderingContext2DBase.cpp:
+(WebCore::CanvasRenderingContext2DBase::fullCanvasCompositedDrawImage):
+(WebCore::CanvasRenderingContext2DBase::createCompositingBuffer): Deleted.
+* html/canvas/CanvasRenderingContext2DBase.h:
+
 2022-03-04  Dan Glastonbury  
 
 "OffscreenCanvas" in IDLs doesn't seem to be able to be compiled


Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp (290838 => 290839)

--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp	2022-03-04 19:15:51 UTC (rev 290838)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp	2022-03-04 19:40:31 UTC (rev 290839)
@@ -1782,11 +1782,6 @@
 return bufferRect;
 }
 
-RefPtr CanvasRenderingContext2DBase::createCompositingBuffer(const IntRect& bufferRect)
-{
-return ImageBuffer::create(bufferRect.size(), isAccelerated() ? RenderingMode::Accelerated : RenderingMode::Unaccelerated, 1, colorSpace(), pixelFormat());
-}
-
 void CanvasRenderingContext2DBase::compositeBuffer(ImageBuffer& buffer, const IntRect& bufferRect, CompositeOperator op)
 {
 IntRect canvasRect(0, 0, canvasBase().width(), canvasBase().height());
@@ -1829,14 +1824,14 @@
 return;
 }
 
-auto buffer = createCompositingBuffer(bufferRect);
-if (!buffer)
-return;
-
 auto* c = drawingContext();
 if (!c)
 return;
 
+auto buffer = c->createImageBuffer(bufferRect.size());
+if (!buffer)
+return;
+
 FloatRect adjustedDest = dest;
 adjustedDest.setLocation(FloatPoint(0, 0));
 AffineTransform effectiveTransform = c->getCTM();


Modified: trunk/Source/WebCore/html/canvas/Can

[webkit-changes] [245292] trunk/LayoutTests

2019-05-14 Thread said
Title: [245292] trunk/LayoutTests








Revision 245292
Author s...@apple.com
Date 2019-05-14 11:27:14 -0700 (Tue, 14 May 2019)


Log Message
Unreviewed: fix test failures after r245280.

* platform/mac-wk2/TestExpectations:
Animating HEICS images is supported only on post macOS Mojave. So these
tests should be skipped in WebKit for now.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/mac-wk2/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (245291 => 245292)

--- trunk/LayoutTests/ChangeLog	2019-05-14 18:11:38 UTC (rev 245291)
+++ trunk/LayoutTests/ChangeLog	2019-05-14 18:27:14 UTC (rev 245292)
@@ -1,3 +1,11 @@
+2019-05-14  Said Abou-Hallawa  
+
+Unreviewed: fix test failures after r245280.
+
+* platform/mac-wk2/TestExpectations:
+Animating HEICS images is supported only on post macOS Mojave. So these
+tests should be skipped in WebKit for now.
+
 2019-05-14  Youenn Fablet  
 
 Video frame resizing should be using Trim


Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (245291 => 245292)

--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2019-05-14 18:11:38 UTC (rev 245291)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2019-05-14 18:27:14 UTC (rev 245292)
@@ -83,9 +83,6 @@
 
 fast/animation/request-animation-frame-in-two-pages.html [ Pass ]
 
-[ Mojave+ ] fast/images/animated-heics-draw.html [ Pass ]
-[ Mojave+ ] fast/images/animated-heics-verify.html [ Pass ]
-
 #//
 # End platform-specific directories.
 #//






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [245469] trunk

2019-05-17 Thread said
Title: [245469] trunk








Revision 245469
Author s...@apple.com
Date 2019-05-17 10:26:05 -0700 (Fri, 17 May 2019)


Log Message
SVGElement should detach itself from all its properties before it is deleted
https://bugs.webkit.org/show_bug.cgi?id=197954

Reviewed by Simon Fraser.

Source/WebCore:

Before deleting the SVGElement node, SVGElement::detachAllProperties()
needs to be called. This will make the properties be detached objects
which means no change will be committed unless these properties are
attached to another owner.

Test: svg/dom/svg-properties-detach-change.html

* dom/Node.cpp:
(WebCore::Node::removedLastRef):
* svg/SVGElement.h:
(WebCore::SVGElement::detachAllProperties):

LayoutTests:

* svg/dom/svg-properties-detach-change-expected.txt: Added.
* svg/dom/svg-properties-detach-change.html : Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/Node.cpp
trunk/Source/WebCore/svg/SVGElement.h


Added Paths

trunk/LayoutTests/svg/dom/svg-properties-detach-change-expected.txt
trunk/LayoutTests/svg/dom/svg-properties-detach-change.html




Diff

Modified: trunk/LayoutTests/ChangeLog (245468 => 245469)

--- trunk/LayoutTests/ChangeLog	2019-05-17 17:22:40 UTC (rev 245468)
+++ trunk/LayoutTests/ChangeLog	2019-05-17 17:26:05 UTC (rev 245469)
@@ -1,3 +1,13 @@
+2019-05-16  Said Abou-Hallawa  
+
+SVGElement should detach itself from all its properties before it is deleted
+https://bugs.webkit.org/show_bug.cgi?id=197954
+
+Reviewed by Simon Fraser.
+
+* svg/dom/svg-properties-detach-change-expected.txt: Added.
+* svg/dom/svg-properties-detach-change.html : Added.
+
 2019-05-17  Eric Carlson  
 
 Allow sequential playback of media files when initial playback started with a user gesture


Added: trunk/LayoutTests/svg/dom/svg-properties-detach-change-expected.txt (0 => 245469)

--- trunk/LayoutTests/svg/dom/svg-properties-detach-change-expected.txt	(rev 0)
+++ trunk/LayoutTests/svg/dom/svg-properties-detach-change-expected.txt	2019-05-17 17:26:05 UTC (rev 245469)
@@ -0,0 +1,38 @@
+This test verifying changing the values of detached properties - utilizing the properties of SVGRectElement and SVGTextElement
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Check the SVGLength properties
+PASS x.value is 10
+PASS y.value is 20
+PASS width.value is 100
+PASS height.value is 200
+
+Check the items of the SVGLengthList properties
+PASS xList.getItem(0).value is 10
+PASS yList.getItem(0).value is 20
+PASS dxList.getItem(0).value is 100
+PASS dyList.getItem(0).value is 200
+
+Check the items of the SVGLengthList properties of the SVGTextElement
+PASS text.x.baseVal.getItem(0).value is 100
+PASS text.y.baseVal.getItem(0).value is 200
+PASS text.dx.baseVal.getItem(0).value is 1000
+PASS text.dy.baseVal.getItem(0).value is 2000
+
+Check the SVGLength properties after removing the SVGTextElement
+PASS x.value is 100
+PASS y.value is 200
+PASS width.value is 1000
+PASS height.value is 2000
+
+Check the SVGLength properties after resetting their values
+PASS x.value is 10
+PASS y.value is 20
+PASS width.value is 100
+PASS height.value is 200
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/svg/dom/svg-properties-detach-change.html (0 => 245469)

--- trunk/LayoutTests/svg/dom/svg-properties-detach-change.html	(rev 0)
+++ trunk/LayoutTests/svg/dom/svg-properties-detach-change.html	2019-05-17 17:26:05 UTC (rev 245469)
@@ -0,0 +1,94 @@
+
+
+
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description("This test verifying changing the values of detached properties - utilizing the properties of SVGRectElement and SVGTextElement");
+
+var x = document.createElementNS("http://www.w3.org/2000/svg", "rect").x.baseVal;
+var y = document.createElementNS("http://www.w3.org/2000/svg", "rect").y.baseVal;
+var width = document.createElementNS("http://www.w3.org/2000/svg", "rect").width.baseVal;
+var height = document.createElementNS("http://www.w3.org/2000/svg", "rect").height.baseVal;
+
+var xList = document.createElementNS("http://www.w3.org/2000/svg", "text").x.baseVal;
+var yList = document.createElementNS("http://www.w3.org/2000/svg", "text").y.baseVal;
+var dxList = document.createElementNS("http://www.w3.org/2000/svg", "text").dx.baseVal;
+var dyList = document.createElementNS("http://www.w3.org/2000/svg", "text").dy.baseVal;
+
+var text = document.createElementNS("http://www.w3.org/2000/svg", "text");
+
+x.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_NUMBER, 10);
+y.newValueSpecifiedUnits(

[webkit-changes] [246170] trunk

2019-06-06 Thread said
Title: [246170] trunk








Revision 246170
Author s...@apple.com
Date 2019-06-06 14:56:55 -0700 (Thu, 06 Jun 2019)


Log Message
REGRESSION (r243121): Load event should not be fired while animating the 'externalResourcesRequired' attribute 
https://bugs.webkit.org/show_bug.cgi?id=198576

Reviewed by Simon Fraser.

Source/WebCore:

Firing the load event should only happen when dynamic update changes the
attribute 'externalResourcesRequired'. Animating this attribute should
not fire the load event.

When stopping the animations, applyAnimatedPropertyChange() should be
called first then stopAnimation() is called second. The target element
should know that its svgAttributeChanged() is called because of animating
the attribute. So it can differentiate this case from the dynamic update.

Test: svg/animations/animate-externalResourcesRequired-no-load-event.html

* svg/SVGExternalResourcesRequired.cpp:
(WebCore::SVGExternalResourcesRequired::svgAttributeChanged):
* svg/properties/SVGAnimatedPropertyAnimator.h:

LayoutTests:

* svg/animations/animate-externalResourcesRequired-no-load-event-expected.txt: Added.
* svg/animations/animate-externalResourcesRequired-no-load-event.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/svg/SVGExternalResourcesRequired.cpp
trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAnimator.h


Added Paths

trunk/LayoutTests/svg/animations/animate-externalResourcesRequired-no-load-event-expected.txt
trunk/LayoutTests/svg/animations/animate-externalResourcesRequired-no-load-event.html




Diff

Modified: trunk/LayoutTests/ChangeLog (246169 => 246170)

--- trunk/LayoutTests/ChangeLog	2019-06-06 20:23:51 UTC (rev 246169)
+++ trunk/LayoutTests/ChangeLog	2019-06-06 21:56:55 UTC (rev 246170)
@@ -1,3 +1,14 @@
+2019-06-05  Said Abou-Hallawa  
+
+REGRESSION (r243121): Load event should not be fired while animating the 'externalResourcesRequired' attribute 
+https://bugs.webkit.org/show_bug.cgi?id=198576
+
+Reviewed by Simon Fraser.
+
+* svg/animations/animate-externalResourcesRequired-no-load-event-expected.txt: Added.
+* svg/animations/animate-externalResourcesRequired-no-load-event.html: Added.
+
+2019-06-04  Takashi Komori  
 2019-06-06  Antoine Quint  
 
 Restrict fast clicks everywhere to desktop content mode


Added: trunk/LayoutTests/svg/animations/animate-externalResourcesRequired-no-load-event-expected.txt (0 => 246170)

--- trunk/LayoutTests/svg/animations/animate-externalResourcesRequired-no-load-event-expected.txt	(rev 0)
+++ trunk/LayoutTests/svg/animations/animate-externalResourcesRequired-no-load-event-expected.txt	2019-06-06 21:56:55 UTC (rev 246170)
@@ -0,0 +1,3 @@
+Test passes if it does not assert in debug builds.
+
+


Added: trunk/LayoutTests/svg/animations/animate-externalResourcesRequired-no-load-event.html (0 => 246170)

--- trunk/LayoutTests/svg/animations/animate-externalResourcesRequired-no-load-event.html	(rev 0)
+++ trunk/LayoutTests/svg/animations/animate-externalResourcesRequired-no-load-event.html	2019-06-06 21:56:55 UTC (rev 246170)
@@ -0,0 +1,24 @@
+
+Test passes if it does not assert in debug builds.
+
+
+
+
+
+
+
+if (window.testRunner) {
+testRunner.dumpAsText();
+testRunner.waitUntilDone();
+}
+
+svg.addEventListener("load", () => {
+select.add(option);
+});
+
+set.addEventListener("endEvent", () => {
+if (window.testRunner)
+testRunner.notifyDone();
+});
+
+


Modified: trunk/Source/WebCore/ChangeLog (246169 => 246170)

--- trunk/Source/WebCore/ChangeLog	2019-06-06 20:23:51 UTC (rev 246169)
+++ trunk/Source/WebCore/ChangeLog	2019-06-06 21:56:55 UTC (rev 246170)
@@ -1,3 +1,26 @@
+2019-06-05  Said Abou-Hallawa  
+
+REGRESSION (r243121): Load event should not be fired while animating the 'externalResourcesRequired' attribute 
+https://bugs.webkit.org/show_bug.cgi?id=198576
+
+Reviewed by Simon Fraser.
+
+Firing the load event should only happen when dynamic update changes the
+attribute 'externalResourcesRequired'. Animating this attribute should
+not fire the load event.
+
+When stopping the animations, applyAnimatedPropertyChange() should be
+called first then stopAnimation() is called second. The target element
+should know that its svgAttributeChanged() is called because of animating
+the attribute. So it can differentiate this case from the dynamic update.
+
+Test: svg/animations/animate-externalResourcesRequired-no-load-event.html
+
+* svg/SVGExternalResourcesRequired.cpp:
+(WebCore::SVGExternalResourcesRequired::svgAttributeChanged):
+

[webkit-changes] [251957] trunk

2019-11-01 Thread said
Title: [251957] trunk








Revision 251957
Author s...@apple.com
Date 2019-11-01 17:14:40 -0700 (Fri, 01 Nov 2019)


Log Message
SVG pair properties must be detached from their owner before it's deleted
https://bugs.webkit.org/show_bug.cgi?id=203545

Reviewed by Simon Fraser.

Source/WebCore:

SVGAnimatedPropertyPairAccessor needs to override its detach() method so
each of its pair properties detaches itself from the owner.
SVGPointerMemberAccessor does the same thing but for a single property
which covers all the list properties as well.

Test: svg/custom/pair-properties-detach.html

* svg/properties/SVGAnimatedPropertyPairAccessor.h:

LayoutTests:

* svg/custom/pair-properties-detach-expected.txt: Added.
* svg/custom/pair-properties-detach.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAccessor.h


Added Paths

trunk/LayoutTests/svg/custom/pair-properties-detach-expected.txt
trunk/LayoutTests/svg/custom/pair-properties-detach.html




Diff

Modified: trunk/LayoutTests/ChangeLog (251956 => 251957)

--- trunk/LayoutTests/ChangeLog	2019-11-02 00:13:04 UTC (rev 251956)
+++ trunk/LayoutTests/ChangeLog	2019-11-02 00:14:40 UTC (rev 251957)
@@ -1,3 +1,13 @@
+2019-11-01  Said Abou-Hallawa  
+
+SVG pair properties must be detached from their owner before it's deleted
+https://bugs.webkit.org/show_bug.cgi?id=203545
+
+Reviewed by Simon Fraser.
+
+* svg/custom/pair-properties-detach-expected.txt: Added.
+* svg/custom/pair-properties-detach.html: Added.
+
 2019-11-01  Eric Carlson  
 
 Add experimental TextTrackCue API


Added: trunk/LayoutTests/svg/custom/pair-properties-detach-expected.txt (0 => 251957)

--- trunk/LayoutTests/svg/custom/pair-properties-detach-expected.txt	(rev 0)
+++ trunk/LayoutTests/svg/custom/pair-properties-detach-expected.txt	2019-11-02 00:14:40 UTC (rev 251957)
@@ -0,0 +1,13 @@
+This test checks detaching the SVG pair properties from the owner element.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS angle.baseVal.value = 100 is 100
+PASS type.baseVal = SVGMarkerElement.SVG_MARKER_ORIENT_AUTO is SVGMarkerElement.SVG_MARKER_ORIENT_AUTO
+PASS radiusX.baseVal = 100 is 100
+PASS orderX.baseVal = 100 is 100
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/svg/custom/pair-properties-detach.html (0 => 251957)

--- trunk/LayoutTests/svg/custom/pair-properties-detach.html	(rev 0)
+++ trunk/LayoutTests/svg/custom/pair-properties-detach.html	2019-11-02 00:14:40 UTC (rev 251957)
@@ -0,0 +1,33 @@
+
+
+
+
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description("This test checks detaching the SVG pair properties from the owner element.");
+
+if (window.testRunner) {
+gc = function() { window.GCController.collect() };
+} else if (!window.gc)
+gc = function() { };
+
+var angle = document.createElementNS("http://www.w3.org/2000/svg", "marker").orientAngle;
+var type = document.createElementNS("http://www.w3.org/2000/svg", "marker").orientType;
+var radiusX = document.createElementNS("http://www.w3.org/2000/svg", "feMorphology").radiusX;
+var orderX = document.createElementNS("http://www.w3.org/2000/svg", "feConvolveMatrix").orderX;
+
+gc();
+
+shouldBe("angle.baseVal.value = 100", "100");
+shouldBe("type.baseVal = SVGMarkerElement.SVG_MARKER_ORIENT_AUTO", "SVGMarkerElement.SVG_MARKER_ORIENT_AUTO");
+shouldBe("radiusX.baseVal = 100", "100");
+shouldBe("orderX.baseVal = 100", "100");
+
+successfullyParsed = true;
+
+

[webkit-changes] [251994] trunk/LayoutTests

2019-11-04 Thread said
Title: [251994] trunk/LayoutTests








Revision 251994
Author s...@apple.com
Date 2019-11-04 09:23:44 -0800 (Mon, 04 Nov 2019)


Log Message
Flaky Test: imported/w3c/web-platform-tests/svg/text/visualtests/text-inline-size-003-visual.svg
https://bugs.webkit.org/show_bug.cgi?id=203172

Unreviewed Test Gardening.

* TestExpectations:
Mark the test as flaky.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (251993 => 251994)

--- trunk/LayoutTests/ChangeLog	2019-11-04 16:51:22 UTC (rev 251993)
+++ trunk/LayoutTests/ChangeLog	2019-11-04 17:23:44 UTC (rev 251994)
@@ -1,3 +1,13 @@
+2019-11-04  Said Abou-Hallawa  
+
+Flaky Test: imported/w3c/web-platform-tests/svg/text/visualtests/text-inline-size-003-visual.svg
+https://bugs.webkit.org/show_bug.cgi?id=203172
+
+Unreviewed Test Gardening.
+
+* TestExpectations:
+Mark the test as flaky.
+
 2019-11-04  Chris Dumez  
 
 MediaKeySession / WebKitMediaKeySession should not prevent entering the back/forward cache


Modified: trunk/LayoutTests/TestExpectations (251993 => 251994)

--- trunk/LayoutTests/TestExpectations	2019-11-04 16:51:22 UTC (rev 251993)
+++ trunk/LayoutTests/TestExpectations	2019-11-04 17:23:44 UTC (rev 251994)
@@ -1538,6 +1538,8 @@
 webkit.org/b/173154 imported/w3c/web-platform-tests/svg/linking/reftests/use-keyframes.html [ Skip ]
 webkit.org/b/201992 imported/w3c/web-platform-tests/svg/linking/reftests/href-filter-element.html [ Skip ]
 
+webkit.org/b/203172 imported/w3c/web-platform-tests/svg/text/visualtests/text-inline-size-003-visual.svg [ Pass Timeout ]
+
 webkit.org/b/139595 http/tests/xmlhttprequest/workers/abort-exception-assert.html [ Pass Failure Timeout ]
 
 # Debug assertions are tracked as .






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [249026] trunk

2019-08-22 Thread said
Title: [249026] trunk








Revision 249026
Author s...@apple.com
Date 2019-08-22 14:13:38 -0700 (Thu, 22 Aug 2019)


Log Message
Crash may happen when an SVG  element references the root  element
https://bugs.webkit.org/show_bug.cgi?id=201014

Reviewed by Ryosuke Niwa.

Source/WebCore:

When an  references an  element as its target image but
this  element is also one of the ancestors of the , the
parent  should not be applied.

Test: svg/filters/filter-image-ref-root.html

* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::build const):

LayoutTests:

Ensure the cyclic reference between the  renderer and its
ancestor  root renderer is broken.

* svg/filters/filter-image-ref-root-expected.txt: Added.
* svg/filters/filter-image-ref-root.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/svg/SVGFEImageElement.cpp


Added Paths

trunk/LayoutTests/svg/filters/filter-image-ref-root-expected.txt
trunk/LayoutTests/svg/filters/filter-image-ref-root.html




Diff

Modified: trunk/LayoutTests/ChangeLog (249025 => 249026)

--- trunk/LayoutTests/ChangeLog	2019-08-22 19:25:48 UTC (rev 249025)
+++ trunk/LayoutTests/ChangeLog	2019-08-22 21:13:38 UTC (rev 249026)
@@ -1,3 +1,16 @@
+2019-08-22  Said Abou-Hallawa  
+
+Crash may happen when an SVG  element references the root  element
+https://bugs.webkit.org/show_bug.cgi?id=201014
+
+Reviewed by Ryosuke Niwa.
+
+Ensure the cyclic reference between the  renderer and its
+ancestor  root renderer is broken.
+
+* svg/filters/filter-image-ref-root-expected.txt: Added.
+* svg/filters/filter-image-ref-root.html: Added.
+
 2019-08-22  Tim Horton  
 
 Rebaseline some editing tests after r248974


Added: trunk/LayoutTests/svg/filters/filter-image-ref-root-expected.txt (0 => 249026)

--- trunk/LayoutTests/svg/filters/filter-image-ref-root-expected.txt	(rev 0)
+++ trunk/LayoutTests/svg/filters/filter-image-ref-root-expected.txt	2019-08-22 21:13:38 UTC (rev 249026)
@@ -0,0 +1,2 @@
+This test passes if it does not crash.
+


Added: trunk/LayoutTests/svg/filters/filter-image-ref-root.html (0 => 249026)

--- trunk/LayoutTests/svg/filters/filter-image-ref-root.html	(rev 0)
+++ trunk/LayoutTests/svg/filters/filter-image-ref-root.html	2019-08-22 21:13:38 UTC (rev 249026)
@@ -0,0 +1,21 @@
+
+
+::selection {
+background-color: lime;
+}
+
+
+
+
+
+This test passes if it does not crash.
+
+
+if (window.testRunner)
+testRunner.dumpAsText(true);
+window.addEventListener('load', (event) => {
+document.getSelection().setBaseAndExtent(text, 0, text, 1);
+});
+
+


Modified: trunk/Source/WebCore/ChangeLog (249025 => 249026)

--- trunk/Source/WebCore/ChangeLog	2019-08-22 19:25:48 UTC (rev 249025)
+++ trunk/Source/WebCore/ChangeLog	2019-08-22 21:13:38 UTC (rev 249026)
@@ -1,3 +1,19 @@
+2019-08-22  Said Abou-Hallawa  
+
+Crash may happen when an SVG  element references the root  element
+https://bugs.webkit.org/show_bug.cgi?id=201014
+
+Reviewed by Ryosuke Niwa.
+
+When an  references an  element as its target image but
+this  element is also one of the ancestors of the , the
+parent  should not be applied.
+
+Test: svg/filters/filter-image-ref-root.html
+
+* svg/SVGFEImageElement.cpp:
+(WebCore::SVGFEImageElement::build const):
+
 2019-08-22  Ryosuke Niwa  
 
 Make ImageBuffer and SVG's FilterData isoheap'ed


Modified: trunk/Source/WebCore/svg/SVGFEImageElement.cpp (249025 => 249026)

--- trunk/Source/WebCore/svg/SVGFEImageElement.cpp	2019-08-22 19:25:48 UTC (rev 249025)
+++ trunk/Source/WebCore/svg/SVGFEImageElement.cpp	2019-08-22 21:13:38 UTC (rev 249026)
@@ -185,6 +185,11 @@
 {
 if (m_cachedImage)
 return FEImage::createWithImage(filter, m_cachedImage->imageForRenderer(renderer()), preserveAspectRatio());
+
+auto target = SVGURIReference::targetElementFromIRIString(href(), treeScope());
+if (isDescendantOrShadowDescendantOf(target.element.get()))
+return nullptr;
+
 return FEImage::createWithIRIReference(filter, treeScope(), href(), preserveAspectRatio());
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [249187] trunk/Source/WebCore

2019-08-27 Thread said
Title: [249187] trunk/Source/WebCore








Revision 249187
Author s...@apple.com
Date 2019-08-27 18:22:37 -0700 (Tue, 27 Aug 2019)


Log Message
Unreviewed. Build fix after r249175.

Fix the condition which generates the declaration of vm in
GenerateGetOwnPropertySlotByIndex.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotByIndex):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm




Diff

Modified: trunk/Source/WebCore/ChangeLog (249186 => 249187)

--- trunk/Source/WebCore/ChangeLog	2019-08-28 00:53:07 UTC (rev 249186)
+++ trunk/Source/WebCore/ChangeLog	2019-08-28 01:22:37 UTC (rev 249187)
@@ -1,3 +1,13 @@
+2019-08-27  Said Abou-Hallawa  
+
+Unreviewed. Build fix after r249175.
+
+Fix the condition which generates the declaration of vm in
+GenerateGetOwnPropertySlotByIndex.
+
+* bindings/scripts/CodeGeneratorJS.pm:
+(GenerateGetOwnPropertySlotByIndex):
+
 2019-08-27  Justin Fan  
 
 [WebGPU] Implement GPUErrors for and relax GPUBuffer validation rules


Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (249186 => 249187)

--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2019-08-28 00:53:07 UTC (rev 249186)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2019-08-28 01:22:37 UTC (rev 249187)
@@ -736,7 +736,7 @@
 
 push(@$outputArray, "bool ${className}::getOwnPropertySlotByIndex(JSObject* object, ExecState* state, unsigned index, PropertySlot& slot)\n");
 push(@$outputArray, "{\n");
-if ($namedGetterOperation || $interface->extendedAttributes->{Plugin}) {
+if ($namedGetterOperation || $interface->extendedAttributes->{Plugin} || ($indexedGetterOperation && $indexedGetterOperation->extendedAttributes->{MayThrowException})) {
 push(@$outputArray, "VM& vm = state->vm();\n");
 }
 push(@$outputArray, "auto* thisObject = jsCast<${className}*>(object);\n");






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [249579] trunk/LayoutTests

2019-09-06 Thread said
Title: [249579] trunk/LayoutTests








Revision 249579
Author s...@apple.com
Date 2019-09-06 10:16:27 -0700 (Fri, 06 Sep 2019)


Log Message
Unreviewed, fix typo in r249216

Also change the  element to be  element so the purpose of 
the test is visible once it is opened.

* svg/custom/href-svg-namespace-animate-target-expected.svg:
* svg/custom/href-svg-namespace-animate-target.svg:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/svg/custom/href-svg-namespace-animate-target-expected.svg
trunk/LayoutTests/svg/custom/href-svg-namespace-animate-target.svg




Diff

Modified: trunk/LayoutTests/ChangeLog (249578 => 249579)

--- trunk/LayoutTests/ChangeLog	2019-09-06 17:04:13 UTC (rev 249578)
+++ trunk/LayoutTests/ChangeLog	2019-09-06 17:16:27 UTC (rev 249579)
@@ -1,3 +1,13 @@
+2019-09-06  Said Abou-Hallawa  
+
+Unreviewed, fix typo in r249216
+
+Also change the  element to be  element so the purpose of 
+the test is visible once it is opened.
+
+* svg/custom/href-svg-namespace-animate-target-expected.svg:
+* svg/custom/href-svg-namespace-animate-target.svg:
+
 2019-09-06  Ryan Haddad  
 
 Unreviewed, rolling out r249566.


Modified: trunk/LayoutTests/svg/custom/href-svg-namespace-animate-target-expected.svg (249578 => 249579)

--- trunk/LayoutTests/svg/custom/href-svg-namespace-animate-target-expected.svg	2019-09-06 17:04:13 UTC (rev 249578)
+++ trunk/LayoutTests/svg/custom/href-svg-namespace-animate-target-expected.svg	2019-09-06 17:16:27 UTC (rev 249579)
@@ -1,4 +1,5 @@
 
-
-
+Verify the XLinkNames namespace is not required before the 'href' attribute of the SVG animate elements.	
+
+
 


Modified: trunk/LayoutTests/svg/custom/href-svg-namespace-animate-target.svg (249578 => 249579)

--- trunk/LayoutTests/svg/custom/href-svg-namespace-animate-target.svg	2019-09-06 17:04:13 UTC (rev 249578)
+++ trunk/LayoutTests/svg/custom/href-svg-namespace-animate-target.svg	2019-09-06 17:16:27 UTC (rev 249579)
@@ -1,7 +1,7 @@
 
-Verify the XLinkNames namespace is not requried before the 'href' attribute of the SVG animate elements.
-
+Verify the XLinkNames namespace is not required before the 'href' attribute of the SVG animate elements.
+
  
-
+
  
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [250488] trunk

2019-09-28 Thread said
Title: [250488] trunk








Revision 250488
Author s...@apple.com
Date 2019-09-28 22:16:58 -0700 (Sat, 28 Sep 2019)


Log Message
Crash when removing the target element while animating its attributes
https://bugs.webkit.org/show_bug.cgi?id=202247

Reviewed by Darin Adler.

Source/WebCore:

If SMIL is animating a CSS attribute, there is a chance the animation is
ended while it is being started or progressed. For that reason, the member
SVGAnimateElementBase::m_animator has to be made RefPtr and it has to be
be protected in resetAnimatedType() and calculateAnimatedValue().

While SMILTimeContainer::updateAnimations() is calling progress() for the
scheduled animation elements, SMILTimeContainer::unschedule() might get
called if processing an animation causes events to be dispatched. For that
reason we need to copy the scheduled animations Vector before processing
them so we avoid changing the Vector while looping through its items.

Remove the guard SMILTimeContainer::m_preventScheduledAnimationsChanges
which was added in r129670 for debugging purposes. In some situations, 
the scheduled animations map could be modified out from under some of the
functions of SMILTimeContainer.

Test: svg/animations/animate-and-remove-target-element.html

* svg/SVGAnimateElementBase.cpp:
(WebCore::SVGAnimateElementBase::resetAnimatedType):
(WebCore::SVGAnimateElementBase::calculateAnimatedValue):
* svg/SVGAnimateElementBase.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::createAnimator):
* svg/SVGElement.h:
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::schedule):
(WebCore::SMILTimeContainer::unschedule):
(WebCore::SMILTimeContainer::setElapsed):
(WebCore::SMILTimeContainer::sortByPriority):
(WebCore::SMILTimeContainer::processAnimations):
(WebCore::SMILTimeContainer::processScheduledAnimations):
(WebCore::SMILTimeContainer::updateAnimations):
(WebCore::SMILTimeContainer::~SMILTimeContainer): Deleted.
* svg/animation/SMILTimeContainer.h:
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::calculateNextProgressTime const):
* svg/properties/SVGAnimatedPropertyAccessorImpl.h:
* svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
* svg/properties/SVGAnimatedPropertyPairAccessorImpl.h:
* svg/properties/SVGAnimatedPropertyPairAnimator.h:
* svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h:
* svg/properties/SVGAttributeAnimator.h:
* svg/properties/SVGMemberAccessor.h:
(WebCore::SVGMemberAccessor::createAnimator const):
* svg/properties/SVGPrimitivePropertyAnimator.h:
(WebCore::SVGPrimitivePropertyAnimator::create):
* svg/properties/SVGPropertyAnimatorFactory.h:
(WebCore::SVGPropertyAnimatorFactory::createAnimator):
* svg/properties/SVGPropertyOwnerRegistry.h:
* svg/properties/SVGPropertyRegistry.h:
* svg/properties/SVGValuePropertyAnimatorImpl.h:
* svg/properties/SVGValuePropertyListAnimatorImpl.h:

LayoutTests:

* svg/animations/animate-and-remove-target-element-expected.txt: Added.
* svg/animations/animate-and-remove-target-element.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/svg/SVGAnimateElementBase.cpp
trunk/Source/WebCore/svg/SVGAnimateElementBase.h
trunk/Source/WebCore/svg/SVGElement.cpp
trunk/Source/WebCore/svg/SVGElement.h
trunk/Source/WebCore/svg/animation/SMILTimeContainer.cpp
trunk/Source/WebCore/svg/animation/SMILTimeContainer.h
trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp
trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAccessorImpl.h
trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAnimatorImpl.h
trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAccessorImpl.h
trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAnimator.h
trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h
trunk/Source/WebCore/svg/properties/SVGAttributeAnimator.h
trunk/Source/WebCore/svg/properties/SVGMemberAccessor.h
trunk/Source/WebCore/svg/properties/SVGPrimitivePropertyAnimator.h
trunk/Source/WebCore/svg/properties/SVGPropertyAnimatorFactory.h
trunk/Source/WebCore/svg/properties/SVGPropertyOwnerRegistry.h
trunk/Source/WebCore/svg/properties/SVGPropertyRegistry.h
trunk/Source/WebCore/svg/properties/SVGValuePropertyAnimatorImpl.h
trunk/Source/WebCore/svg/properties/SVGValuePropertyListAnimatorImpl.h


Added Paths

trunk/LayoutTests/svg/animations/animate-and-remove-target-element-expected.txt
trunk/LayoutTests/svg/animations/animate-and-remove-target-element.html




Diff

Modified: trunk/LayoutTests/ChangeLog (250487 => 250488)

--- trunk/LayoutTests/ChangeLog	2019-09-29 01:59:27 UTC (rev 250487)
+++ trunk/LayoutTests/ChangeLog	2019-09-29 05:16:58 UTC (rev 250488)
@@ -1,3 +1,13 @@
+2019-09-28  Said Abou-Hallawa  
+
+Crash when removing the target element while animating its attributes
+https://bugs.webkit.org/show_bug.cgi?id=202247
+
+Reviewed by Darin Adler.
+
+* svg/animations/animate-and-remove-target-element-expected.txt: Added.
+* svg/animati

[webkit-changes] [247121] trunk/Source/WebCore

2019-07-03 Thread said
Title: [247121] trunk/Source/WebCore








Revision 247121
Author s...@apple.com
Date 2019-07-03 17:49:01 -0700 (Wed, 03 Jul 2019)


Log Message
The destructor of CSSAnimationControllerPrivate must explicitly clear the composite animations
https://bugs.webkit.org/show_bug.cgi?id=199415

Reviewed by Simon Fraser.

After the destructor of CSSAnimationControllerPrivate exists, the non
static members are deleted. When the HashMap m_compositeAnimations is
deleted, its entries are deleted. The destructor of CompositeAnimation
calls the method CSSAnimationControllerPrivate::animationWillBeRemoved()
back through its back reference m_animationController. The non static
members of CSSAnimationControllerPrivate are being deleted and it is
incorrect to try to use any of these members after exiting the destructor.

We need to explicitly clear the composite animations before exiting the 
destructor of CSSAnimationControllerPrivate.

* page/animation/CSSAnimationController.cpp:
(WebCore::CSSAnimationControllerPrivate::~CSSAnimationControllerPrivate):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/animation/CSSAnimationController.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (247120 => 247121)

--- trunk/Source/WebCore/ChangeLog	2019-07-04 00:42:30 UTC (rev 247120)
+++ trunk/Source/WebCore/ChangeLog	2019-07-04 00:49:01 UTC (rev 247121)
@@ -1,3 +1,24 @@
+2019-07-03  Said Abou-Hallawa  
+
+The destructor of CSSAnimationControllerPrivate must explicitly clear the composite animations
+https://bugs.webkit.org/show_bug.cgi?id=199415
+
+Reviewed by Simon Fraser.
+
+After the destructor of CSSAnimationControllerPrivate exists, the non
+static members are deleted. When the HashMap m_compositeAnimations is
+deleted, its entries are deleted. The destructor of CompositeAnimation
+calls the method CSSAnimationControllerPrivate::animationWillBeRemoved()
+back through its back reference m_animationController. The non static
+members of CSSAnimationControllerPrivate are being deleted and it is
+incorrect to try to use any of these members after exiting the destructor.
+
+We need to explicitly clear the composite animations before exiting the 
+destructor of CSSAnimationControllerPrivate.
+
+* page/animation/CSSAnimationController.cpp:
+(WebCore::CSSAnimationControllerPrivate::~CSSAnimationControllerPrivate):
+
 2019-07-03  Jer Noble  
 
 HTMLMediaElement can hold onto display sleep assertion while process is suspended.


Modified: trunk/Source/WebCore/page/animation/CSSAnimationController.cpp (247120 => 247121)

--- trunk/Source/WebCore/page/animation/CSSAnimationController.cpp	2019-07-04 00:42:30 UTC (rev 247120)
+++ trunk/Source/WebCore/page/animation/CSSAnimationController.cpp	2019-07-04 00:49:01 UTC (rev 247121)
@@ -78,7 +78,12 @@
 {
 }
 
-CSSAnimationControllerPrivate::~CSSAnimationControllerPrivate() = default;
+CSSAnimationControllerPrivate::~CSSAnimationControllerPrivate()
+{
+// We need to explicitly clear the composite animations here because the
+// destructor of CompositeAnimation will call members of this class back.
+m_compositeAnimations.clear();
+}
 
 CompositeAnimation& CSSAnimationControllerPrivate::ensureCompositeAnimation(Element& element)
 {






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [230063] trunk/Source/WebCore

2018-03-28 Thread said
Title: [230063] trunk/Source/WebCore








Revision 230063
Author s...@apple.com
Date 2018-03-28 18:10:13 -0700 (Wed, 28 Mar 2018)


Log Message
The SVGAnimatedProperty wrappers have to be detached from the referenced values before the SVGAnimatedType is deleted
https://bugs.webkit.org/show_bug.cgi?id=183972

Reviewed by Daniel Bates.

If the SVGAnimatedType is a list type, e.g. SVGLengthListValues, the wrappers
of the animated properties have to be detached from the items in the list
before it's deleted.

* svg/SVGAnimateElementBase.cpp:
(WebCore::SVGAnimateElementBase::clearAnimatedType):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/svg/SVGAnimateElementBase.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (230062 => 230063)

--- trunk/Source/WebCore/ChangeLog	2018-03-29 00:47:57 UTC (rev 230062)
+++ trunk/Source/WebCore/ChangeLog	2018-03-29 01:10:13 UTC (rev 230063)
@@ -1,3 +1,17 @@
+2018-03-28  Said Abou-Hallawa  
+
+The SVGAnimatedProperty wrappers have to be detached from the referenced values before the SVGAnimatedType is deleted
+https://bugs.webkit.org/show_bug.cgi?id=183972
+
+Reviewed by Daniel Bates.
+
+If the SVGAnimatedType is a list type, e.g. SVGLengthListValues, the wrappers
+of the animated properties have to be detached from the items in the list
+before it's deleted.
+
+* svg/SVGAnimateElementBase.cpp:
+(WebCore::SVGAnimateElementBase::clearAnimatedType):
+
 2018-03-28  Ross Kirsling  
 
 MSVC __forceinline slows down JSC release build fivefold after r229391


Modified: trunk/Source/WebCore/svg/SVGAnimateElementBase.cpp (230062 => 230063)

--- trunk/Source/WebCore/svg/SVGAnimateElementBase.cpp	2018-03-29 00:47:57 UTC (rev 230062)
+++ trunk/Source/WebCore/svg/SVGAnimateElementBase.cpp	2018-03-29 01:10:13 UTC (rev 230063)
@@ -303,6 +303,11 @@
 if (!m_animatedType)
 return;
 
+// If the SVGAnimatedType is a list type, e.g. SVGLengthListValues, the wrappers of the
+// animated properties have to be detached from the items in the list before it's deleted.
+if (!m_animatedProperties.isEmpty())
+m_animator->animValWillChange(m_animatedProperties);
+
 if (!targetElement) {
 m_animatedType = nullptr;
 return;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [230172] trunk/LayoutTests

2018-04-02 Thread said
Title: [230172] trunk/LayoutTests








Revision 230172
Author s...@apple.com
Date 2018-04-02 12:42:18 -0700 (Mon, 02 Apr 2018)


Log Message
Followup(r230063): Add test a layout test for https://bugs.webkit.org/show_bug.cgi?id=183972
https://bugs.webkit.org/show_bug.cgi?id=184162

Reviewed by Daniel Bates.

Without r230063, running run-webkit-tests -g for this test will crash.

* svg/dom/animated-tearoff-list-remove-target-expected.txt: Added.
* svg/dom/animated-tearoff-list-remove-target.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog


Added Paths

trunk/LayoutTests/svg/dom/animated-tearoff-list-remove-target-expected.txt
trunk/LayoutTests/svg/dom/animated-tearoff-list-remove-target.html




Diff

Modified: trunk/LayoutTests/ChangeLog (230171 => 230172)

--- trunk/LayoutTests/ChangeLog	2018-04-02 19:06:44 UTC (rev 230171)
+++ trunk/LayoutTests/ChangeLog	2018-04-02 19:42:18 UTC (rev 230172)
@@ -1,3 +1,15 @@
+2018-04-02  Said Abou-Hallawa  
+
+Followup(r230063): Add test a layout test for https://bugs.webkit.org/show_bug.cgi?id=183972
+https://bugs.webkit.org/show_bug.cgi?id=184162
+
+Reviewed by Daniel Bates.
+
+Without r230063, running run-webkit-tests -g for this test will crash.
+
+* svg/dom/animated-tearoff-list-remove-target-expected.txt: Added.
+* svg/dom/animated-tearoff-list-remove-target.html: Added.
+
 2018-04-02  Jer Noble  
 
 AudioBufferSourceNode start method causes OfflineAudioContext to start running


Added: trunk/LayoutTests/svg/dom/animated-tearoff-list-remove-target-expected.txt (0 => 230172)

--- trunk/LayoutTests/svg/dom/animated-tearoff-list-remove-target-expected.txt	(rev 0)
+++ trunk/LayoutTests/svg/dom/animated-tearoff-list-remove-target-expected.txt	2018-04-02 19:42:18 UTC (rev 230172)
@@ -0,0 +1,4 @@
+Removing the target of an animate element should detach the wrappers of the attributes from their animated properties.
+
+PASS.
+


Added: trunk/LayoutTests/svg/dom/animated-tearoff-list-remove-target.html (0 => 230172)

--- trunk/LayoutTests/svg/dom/animated-tearoff-list-remove-target.html	(rev 0)
+++ trunk/LayoutTests/svg/dom/animated-tearoff-list-remove-target.html	2018-04-02 19:42:18 UTC (rev 230172)
@@ -0,0 +1,54 @@
+
+
+Removing the target of an animate element should detach the wrappers of the attributes from their animated properties.
+
+
+First tspan. 
+
+
+Second tspan 
+
+
+
+
+function gc() {
+if (window.GCController)
+return GCController.collect();
+
+// Force garbage collection.
+for (var i = 0; i < 1; i++)
+var s = new String("abc");
+}
+
+(function() {
+if (window.testRunner)  {
+testRunner.dumpAsText();
+testRunner.waitUntilDone();
+}
+
+setTimeout(() => {
+// The target of the <animate> element is the "first-tspan".
+var tspanElement = document.getElementById("first-tspan");
+
+// animItem is a reference (not a copy) to the first item in the x animated list.
+var animList = tspanElement.x.animVal;
+var animItem = animList.getItem(0);
+
+// Now change the target of the <animate> element to be the "second-tspan".
+var animateElement = document.getElementById("animate");
+animateElement.setAttributeNS("http://www.w3.org/1999/xlink", "href", "second-tspan");
+
+// By now animItem should be detached from the animated animList and has its own copy
+// of an SVGLength. animItem should not be affected if garbage collection is forced.
+gc();
+if (animItem.valueAsString == "0") {
+document.querySelector("div").innerHTML += "<br><br>PASS."
+document.querySelector("svg").remove();
+}
+
+if (window.testRunner)
+testRunner.notifyDone();
+}, 0);
+})();
+
+






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


  1   2   3   4   5   >