[webkit-changes] [295120] trunk
Title: [295120] trunk Revision 295120 Author n...@apple.com Date 2022-06-01 22:05:28 -0700 (Wed, 01 Jun 2022) Log Message text-align: match-parent on root handles direction incorrectly https://bugs.webkit.org/show_bug.cgi?id=241164 Reviewed by Myles C. Maxfield. The spec says the initial containing block's direction should be used when the element has no parent. Regarding the computed value, Chrome & Firefox computes to `start` for this case. This may change in https://github.com/w3c/csswg-drafts/issues/6542 to `left`/`right`. Test: imported/w3c/web-platform-tests/css/css-text/text-align/text-align-match-parent-root-rtl.html * LayoutTests/TestExpectations: * Source/WebCore/style/StyleBuilderConverter.h: (WebCore::Style::BuilderConverter::convertTextAlign): Canonical link: https://commits.webkit.org/251211@main Modified Paths trunk/LayoutTests/TestExpectations trunk/Source/WebCore/style/StyleBuilderConverter.h Diff Modified: trunk/LayoutTests/TestExpectations (295119 => 295120) --- trunk/LayoutTests/TestExpectations 2022-06-02 04:05:22 UTC (rev 295119) +++ trunk/LayoutTests/TestExpectations 2022-06-02 05:05:28 UTC (rev 295120) @@ -2645,7 +2645,6 @@ webkit.org/b/183258 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-last-010.html [ ImageOnlyFailure ] webkit.org/b/183258 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-last-011.html [ ImageOnlyFailure ] webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-last-wins-001.html [ ImageOnlyFailure ] -webkit.org/b/241164 imported/w3c/web-platform-tests/css/css-text/text-align/text-align-match-parent-root-rtl.html [ ImageOnlyFailure ] webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/text-encoding/shaping-join-003.html [ ImageOnlyFailure ] webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/text-encoding/shaping-tatweel-002.html [ ImageOnlyFailure ] webkit.org/b/214290 imported/w3c/web-platform-tests/css/css-text/text-encoding/shaping-tatweel-003.html [ ImageOnlyFailure ] Modified: trunk/Source/WebCore/style/StyleBuilderConverter.h (295119 => 295120) --- trunk/Source/WebCore/style/StyleBuilderConverter.h 2022-06-02 04:05:22 UTC (rev 295119) +++ trunk/Source/WebCore/style/StyleBuilderConverter.h 2022-06-02 05:05:28 UTC (rev 295120) @@ -614,6 +614,10 @@ if (primitiveValue.valueID() != CSSValueWebkitMatchParent && primitiveValue.valueID() != CSSValueMatchParent) return primitiveValue; +auto* element = builderState.element(); +if (element && element == builderState.document().documentElement()) +return TextAlignMode::Start; + auto& parentStyle = builderState.parentStyle(); if (parentStyle.textAlign() == TextAlignMode::Start) return parentStyle.isLeftToRightDirection() ? TextAlignMode::Left : TextAlignMode::Right; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295119] trunk/Source/WebCore/svg/SVGGeometryElement.cpp
Title: [295119] trunk/Source/WebCore/svg/SVGGeometryElement.cpp Revision 295119 Author achristen...@apple.com Date 2022-06-01 21:05:22 -0700 (Wed, 01 Jun 2022) Log Message Clamp distance earlier in SVGGeometryElement::getPointAtLength https://bugs.webkit.org/show_bug.cgi?id=241212 Reviewed by Chris Dumez. * LayoutTests/fast/svg/get-point-at-length-layout-expected.txt: Added. * LayoutTests/fast/svg/get-point-at-length-layout.html: Added. * Source/WebCore/svg/SVGGeometryElement.cpp: (WebCore::SVGGeometryElement::getPointAtLength const): Canonical link: https://commits.webkit.org/251210@main Modified Paths trunk/Source/WebCore/svg/SVGGeometryElement.cpp Diff Modified: trunk/Source/WebCore/svg/SVGGeometryElement.cpp (295118 => 295119) --- trunk/Source/WebCore/svg/SVGGeometryElement.cpp 2022-06-02 04:02:10 UTC (rev 295118) +++ trunk/Source/WebCore/svg/SVGGeometryElement.cpp 2022-06-02 04:05:22 UTC (rev 295119) @@ -69,6 +69,9 @@ { document().updateLayoutIgnorePendingStylesheets(); +// Spec: Clamp distance to [0, length]. +distance = clampTo(distance, 0, getTotalLength()); + auto* renderer = this->renderer(); // Spec: If current element is a non-rendered element, throw an InvalidStateError. @@ -75,9 +78,6 @@ if (!renderer) return Exception { InvalidStateError }; -// Spec: Clamp distance to [0, length]. -distance = clampTo(distance, 0, getTotalLength()); - // Spec: Return a newly created, detached SVGPoint object. if (is(renderer)) return SVGPoint::create(downcast(renderer)->getPointAtLength(distance)); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295118] trunk/Source/WebCore/bindings/js/DOMPromiseProxy.h
Title: [295118] trunk/Source/WebCore/bindings/js/DOMPromiseProxy.h Revision 295118 Author cdu...@apple.com Date 2022-06-01 21:02:10 -0700 (Wed, 01 Jun 2022) Log Message DOMPromiseProxyWithResolveCallback::promise() should not use |this| after calling resolve() / reject() https://bugs.webkit.org/show_bug.cgi?id=241195 Reviewed by Alex Christensen. * Source/WebCore/bindings/js/DOMPromiseProxy.h: (WebCore::DOMPromiseProxyWithResolveCallback::promise): Canonical link: https://commits.webkit.org/251209@main Modified Paths trunk/Source/WebCore/bindings/js/DOMPromiseProxy.h Diff Modified: trunk/Source/WebCore/bindings/js/DOMPromiseProxy.h (295117 => 295118) --- trunk/Source/WebCore/bindings/js/DOMPromiseProxy.h 2022-06-02 03:56:23 UTC (rev 295117) +++ trunk/Source/WebCore/bindings/js/DOMPromiseProxy.h 2022-06-02 04:02:10 UTC (rev 295118) @@ -127,7 +127,10 @@ if (!deferredPromise) return JSC::jsUndefined(); +m_deferredPromises.append(*deferredPromise); + if (m_valueOrException) { +// Calls to reject() / resolvePromiseCallback() may destroy |this|. if (m_valueOrException->hasException()) deferredPromise->reject(m_valueOrException->exception()); else @@ -134,9 +137,7 @@ resolvePromiseCallback(*deferredPromise); } -auto result = deferredPromise->promise(); -m_deferredPromises.append(deferredPromise.releaseNonNull()); -return result; +return deferredPromise->promise(); } template @@ -224,7 +225,10 @@ if (!deferredPromise) return JSC::jsUndefined(); +m_deferredPromises.append(*deferredPromise); + if (m_valueOrException) { +// Calls to reject() / resolve() may destroy |this|. if (m_valueOrException->hasException()) deferredPromise->reject(m_valueOrException->exception()); else @@ -231,9 +235,7 @@ deferredPromise->resolve(); } -auto result = deferredPromise->promise(); -m_deferredPromises.append(deferredPromise.releaseNonNull()); -return result; +return deferredPromise->promise(); } inline void DOMPromiseProxy::clear() @@ -292,7 +294,10 @@ if (!deferredPromise) return JSC::jsUndefined(); +m_deferredPromises.append(*deferredPromise); + if (m_valueOrException) { +// Calls to reject() / resolve() may destroy |this|. if (m_valueOrException->hasException()) deferredPromise->reject(m_valueOrException->exception()); else @@ -299,9 +304,7 @@ deferredPromise->template resolve(m_resolveCallback()); } -auto result = deferredPromise->promise(); -m_deferredPromises.append(deferredPromise.releaseNonNull()); -return result; +return deferredPromise->promise(); } template ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295115] trunk/Source/WebKit/WebProcess/Plugins/PluginView.cpp
Title: [295115] trunk/Source/WebKit/WebProcess/Plugins/PluginView.cpp Revision 295115 Author achristen...@apple.com Date 2022-06-01 20:22:21 -0700 (Wed, 01 Jun 2022) Log Message Set PluginView::Stream::m_loader before calling NetscapePlugInStreamLoader::cancel https://bugs.webkit.org/show_bug.cgi?id=241210 Reviewed by Chris Dumez. * ../../Source/WebKit/WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::Stream::cancel): Canonical link: https://commits.webkit.org/251206@main Modified Paths trunk/Source/WebKit/WebProcess/Plugins/PluginView.cpp Diff Modified: trunk/Source/WebKit/WebProcess/Plugins/PluginView.cpp (295114 => 295115) --- trunk/Source/WebKit/WebProcess/Plugins/PluginView.cpp 2022-06-02 01:24:18 UTC (rev 295114) +++ trunk/Source/WebKit/WebProcess/Plugins/PluginView.cpp 2022-06-02 03:22:21 UTC (rev 295115) @@ -141,8 +141,9 @@ ASSERT(m_loader); m_streamWasCancelled = true; -m_loader->cancel(m_loader->cancelledError()); -m_loader = nullptr; + +auto loader = std::exchange(m_loader, nullptr); +loader->cancel(loader->cancelledError()); } void PluginView::Stream::continueLoad() ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295113] trunk/Source
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-changes] [295112] tags/WebKit-7614.1.14.10.10/
Title: [295112] tags/WebKit-7614.1.14.10.10/ Revision 295112 Author alanc...@apple.com Date 2022-06-01 17:39:13 -0700 (Wed, 01 Jun 2022) Log Message Tag WebKit-7614.1.14.10.10. Added Paths tags/WebKit-7614.1.14.10.10/ Diff ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295111] branches/safari-7614.1.14.10-branch/Source
Title: [295111] branches/safari-7614.1.14.10-branch/Source Revision 295111 Author alanc...@apple.com Date 2022-06-01 17:36:53 -0700 (Wed, 01 Jun 2022) Log Message Versioning. WebKit-7614.1.14.10.10 Modified Paths branches/safari-7614.1.14.10-branch/Source/_javascript_Core/Configurations/Version.xcconfig branches/safari-7614.1.14.10-branch/Source/ThirdParty/ANGLE/Configurations/Version.xcconfig branches/safari-7614.1.14.10-branch/Source/ThirdParty/libwebrtc/Configurations/Version.xcconfig branches/safari-7614.1.14.10-branch/Source/WebCore/Configurations/Version.xcconfig branches/safari-7614.1.14.10-branch/Source/WebCore/PAL/Configurations/Version.xcconfig branches/safari-7614.1.14.10-branch/Source/WebGPU/Configurations/Version.xcconfig branches/safari-7614.1.14.10-branch/Source/WebInspectorUI/Configurations/Version.xcconfig branches/safari-7614.1.14.10-branch/Source/WebKit/Configurations/Version.xcconfig branches/safari-7614.1.14.10-branch/Source/WebKitLegacy/mac/Configurations/Version.xcconfig Diff Modified: branches/safari-7614.1.14.10-branch/Source/_javascript_Core/Configurations/Version.xcconfig (295110 => 295111) --- branches/safari-7614.1.14.10-branch/Source/_javascript_Core/Configurations/Version.xcconfig 2022-06-02 00:17:14 UTC (rev 295110) +++ branches/safari-7614.1.14.10-branch/Source/_javascript_Core/Configurations/Version.xcconfig 2022-06-02 00:36:53 UTC (rev 295111) @@ -25,7 +25,7 @@ MINOR_VERSION = 1; TINY_VERSION = 14; MICRO_VERSION = 10; -NANO_VERSION = 9; +NANO_VERSION = 10; FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION).$(NANO_VERSION); // The bundle version and short version string are set based on the current build configuration, see below. Modified: branches/safari-7614.1.14.10-branch/Source/ThirdParty/ANGLE/Configurations/Version.xcconfig (295110 => 295111) --- branches/safari-7614.1.14.10-branch/Source/ThirdParty/ANGLE/Configurations/Version.xcconfig 2022-06-02 00:17:14 UTC (rev 295110) +++ branches/safari-7614.1.14.10-branch/Source/ThirdParty/ANGLE/Configurations/Version.xcconfig 2022-06-02 00:36:53 UTC (rev 295111) @@ -25,7 +25,7 @@ MINOR_VERSION = 1; TINY_VERSION = 14; MICRO_VERSION = 10; -NANO_VERSION = 9; +NANO_VERSION = 10; FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION).$(NANO_VERSION); // The bundle version and short version string are set based on the current build configuration, see below. Modified: branches/safari-7614.1.14.10-branch/Source/ThirdParty/libwebrtc/Configurations/Version.xcconfig (295110 => 295111) --- branches/safari-7614.1.14.10-branch/Source/ThirdParty/libwebrtc/Configurations/Version.xcconfig 2022-06-02 00:17:14 UTC (rev 295110) +++ branches/safari-7614.1.14.10-branch/Source/ThirdParty/libwebrtc/Configurations/Version.xcconfig 2022-06-02 00:36:53 UTC (rev 295111) @@ -25,7 +25,7 @@ MINOR_VERSION = 1; TINY_VERSION = 14; MICRO_VERSION = 10; -NANO_VERSION = 9; +NANO_VERSION = 10; FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION).$(NANO_VERSION); // The bundle version and short version string are set based on the current build configuration, see below. Modified: branches/safari-7614.1.14.10-branch/Source/WebCore/Configurations/Version.xcconfig (295110 => 295111) --- branches/safari-7614.1.14.10-branch/Source/WebCore/Configurations/Version.xcconfig 2022-06-02 00:17:14 UTC (rev 295110) +++ branches/safari-7614.1.14.10-branch/Source/WebCore/Configurations/Version.xcconfig 2022-06-02 00:36:53 UTC (rev 295111) @@ -25,7 +25,7 @@ MINOR_VERSION = 1; TINY_VERSION = 14; MICRO_VERSION = 10; -NANO_VERSION = 9; +NANO_VERSION = 10; FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION).$(NANO_VERSION); // The bundle version and short version string are set based on the current build configuration, see below. Modified: branches/safari-7614.1.14.10-branch/Source/WebCore/PAL/Configurations/Version.xcconfig (295110 => 295111) --- branches/safari-7614.1.14.10-branch/Source/WebCore/PAL/Configurations/Version.xcconfig 2022-06-02 00:17:14 UTC (rev 295110) +++ branches/safari-7614.1.14.10-branch/Source/WebCore/PAL/Configurations/Version.xcconfig 2022-06-02 00:36:53 UTC (rev 295111) @@ -25,7 +25,7 @@ MINOR_VERSION = 1; TINY_VERSION = 14; MICRO_VERSION = 10; -NANO_VERSION = 9; +NANO_VERSION = 10; FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION).$(NANO_VERSION); // The bundle version and short version string are set based on the current build configuration, see below. Modified: branches/safari-7614.1.14.10-branch/Source/WebGPU/Configurations/Version.xcconfig (295110 => 295111) --- branches/safari-7614.1.14.10-branch/Source/WebGPU/Configurations/Version.xcconfig 2022-06-02 00:17:14 UTC (rev 295110) +++ branches/safari-7614.1.14.10-branch/Source/WebGPU/Configurations/Version.xcconfig 2022-06-02 00:36:53 UTC (rev 295111) @@ -25,7 +25,7 @@ MINOR_VERSION = 1;
[webkit-changes] [295110] trunk/Source/JavaScriptCore/dfg/DFGJITCode.h
Title: [295110] trunk/Source/_javascript_Core/dfg/DFGJITCode.h Revision 295110 Author mark@apple.com Date 2022-06-01 17:17:14 -0700 (Wed, 01 Jun 2022) Log Message Speculative build fix for Mac Catalyst. https://bugs.webkit.org/show_bug.cgi?id=241206 Unreviewed. * Source/_javascript_Core/dfg/DFGJITCode.h: Canonical link: https://commits.webkit.org/251203@main Modified Paths trunk/Source/_javascript_Core/dfg/DFGJITCode.h Diff Modified: trunk/Source/_javascript_Core/dfg/DFGJITCode.h (295109 => 295110) --- trunk/Source/_javascript_Core/dfg/DFGJITCode.h 2022-06-02 00:15:58 UTC (rev 295109) +++ trunk/Source/_javascript_Core/dfg/DFGJITCode.h 2022-06-02 00:17:14 UTC (rev 295110) @@ -36,6 +36,7 @@ #include "DFGVariableEventStream.h" #include "ExecutionCounter.h" #include "JITCode.h" +#include #include namespace JSC { ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295109] trunk/Source/WebCore
Title: [295109] trunk/Source/WebCore Revision 295109 Author commit-qu...@webkit.org Date 2022-06-01 17:15:58 -0700 (Wed, 01 Jun 2022) Log Message WebGL extensions code cleanup https://bugs.webkit.org/show_bug.cgi?id=241185 Patch by Alexey Knyazev <3479527+lexaknya...@users.noreply.github.com> on 2022-06-01 Reviewed by Kenneth Russell. Sorted extensions in the same order everywhere, added new macros. Drive-by fixes: * WebGLRenderingContextBase::extensionIsEnabled for EXT_texture_filter_anisotropic * WebGLRenderingContextBase::extensionIsEnabled for WEBGL_compressed_texture_pvrtc * WebGLRenderingContextBase::loseExtensions for WEBGL_compressed_texture_s3tc_srgb * WebGLRenderingContextBase::loseExtensions for WEBGL_multi_draw * Source/WebCore/bindings/js/JSDOMConvertWebGL.cpp: (WebCore::convertToJSValue): * Source/WebCore/html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::getExtension): (WebCore::WebGL2RenderingContext::getSupportedExtensions): * Source/WebCore/html/canvas/WebGLExtension.h: * Source/WebCore/html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getExtension): (WebCore::WebGLRenderingContext::getSupportedExtensions): * Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::extensionIsEnabled): (WebCore::WebGLRenderingContextBase::loseExtensions): * Source/WebCore/html/canvas/WebGLRenderingContextBase.h: Canonical link: https://commits.webkit.org/251202@main Modified Paths trunk/Source/WebCore/bindings/js/JSDOMConvertWebGL.cpp trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp trunk/Source/WebCore/html/canvas/WebGLExtension.h trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h Diff Modified: trunk/Source/WebCore/bindings/js/JSDOMConvertWebGL.cpp (295108 => 295109) --- trunk/Source/WebCore/bindings/js/JSDOMConvertWebGL.cpp 2022-06-01 22:30:34 UTC (rev 295108) +++ trunk/Source/WebCore/bindings/js/JSDOMConvertWebGL.cpp 2022-06-02 00:15:58 UTC (rev 295109) @@ -161,77 +161,46 @@ JSValue convertToJSValue(JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, WebGLExtension& extension) { +#define TO_JS(EXT) \ +case WebGLExtension::EXT ## Name: \ +return toJS(, , static_cast(extension)); + switch (extension.getName()) { -case WebGLExtension::WebGLLoseContextName: -return toJS(, , static_cast(extension)); -case WebGLExtension::EXTShaderTextureLODName: -return toJS(, , static_cast(extension)); -case WebGLExtension::EXTTextureCompressionBPTCName: -return toJS(, , static_cast(extension)); -case WebGLExtension::EXTTextureCompressionRGTCName: -return toJS(, , static_cast(extension)); -case WebGLExtension::EXTTextureFilterAnisotropicName: -return toJS(, , static_cast(extension)); -case WebGLExtension::EXTTextureNorm16Name: -return toJS(, , static_cast(extension)); -case WebGLExtension::EXTsRGBName: -return toJS(, , static_cast(extension)); -case WebGLExtension::EXTFragDepthName: -return toJS(, , static_cast(extension)); -case WebGLExtension::EXTBlendMinMaxName: -return toJS(, , static_cast(extension)); -case WebGLExtension::KHRParallelShaderCompileName: -return toJS(, , static_cast(extension)); -case WebGLExtension::OESStandardDerivativesName: -return toJS(, , static_cast(extension)); -case WebGLExtension::OESTextureFloatName: -return toJS(, , static_cast(extension)); -case WebGLExtension::OESTextureFloatLinearName: -return toJS(, , static_cast(extension)); -case WebGLExtension::OESTextureHalfFloatName: -return toJS(, , static_cast(extension)); -case WebGLExtension::OESTextureHalfFloatLinearName: -return toJS(, , static_cast(extension)); -case WebGLExtension::OESVertexArrayObjectName: -return toJS(, , static_cast(extension)); -case WebGLExtension::OESElementIndexUintName: -return toJS(, , static_cast(extension)); -case WebGLExtension::OESFBORenderMipmapName: -return toJS(, , static_cast(extension)); -case WebGLExtension::WebGLDebugRendererInfoName: -return toJS(, , static_cast(extension)); -case WebGLExtension::WebGLDebugShadersName: -return toJS(, , static_cast(extension)); -case WebGLExtension::WebGLCompressedTextureATCName: -return toJS(, , static_cast(extension)); -case WebGLExtension::WebGLCompressedTextureETCName: -return toJS(, , static_cast(extension)); -case WebGLExtension::WebGLCompressedTextureETC1Name: -return toJS(, , static_cast(extension)); -case WebGLExtension::WebGLCompressedTexturePVRTCName: -return toJS(, , static_cast(extension)); -case WebGLExtension::WebGLCompressedTextureS3TCName: -return toJS(, ,
[webkit-changes] [295108] tags/WebKit-7614.1.15/
Title: [295108] tags/WebKit-7614.1.15/ Revision 295108 Author alanc...@apple.com Date 2022-06-01 15:30:34 -0700 (Wed, 01 Jun 2022) Log Message Tag WebKit-7614.1.15. Added Paths tags/WebKit-7614.1.15/ Diff ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295107] trunk/Websites/webkit.org/wp-content/themes/webkit/header.php
Title: [295107] trunk/Websites/webkit.org/wp-content/themes/webkit/header.php Revision 295107 Author j...@apple.com Date 2022-06-01 15:21:38 -0700 (Wed, 01 Jun 2022) Log Message Add privacy-friendly usage statistics reporting for webkit.org https://bugs.webkit.org/show_bug.cgi?id=241200 Reviewed by Devin Rousso. * Websites/webkit.org/wp-content/themes/webkit/header.php: Canonical link: https://commits.webkit.org/251201@main Modified Paths trunk/Websites/webkit.org/wp-content/themes/webkit/header.php Diff Modified: trunk/Websites/webkit.org/wp-content/themes/webkit/header.php (295106 => 295107) --- trunk/Websites/webkit.org/wp-content/themes/webkit/header.php 2022-06-01 21:59:41 UTC (rev 295106) +++ trunk/Websites/webkit.org/wp-content/themes/webkit/header.php 2022-06-01 22:21:38 UTC (rev 295107) @@ -16,6 +16,11 @@ + + +
[webkit-changes] [295106] branches/safari-613-branch/Source/WebCore/dom/Document.cpp
Title: [295106] branches/safari-613-branch/Source/WebCore/dom/Document.cpp Revision 295106 Author repst...@apple.com Date 2022-06-01 14:59:41 -0700 (Wed, 01 Jun 2022) Log Message Unreviewed build fix. error: no member named 'isResolvingContainerQueries' in 'WebCore::Document' Modified Paths branches/safari-613-branch/Source/WebCore/dom/Document.cpp Diff Modified: branches/safari-613-branch/Source/WebCore/dom/Document.cpp (295105 => 295106) --- branches/safari-613-branch/Source/WebCore/dom/Document.cpp 2022-06-01 21:42:09 UTC (rev 295105) +++ branches/safari-613-branch/Source/WebCore/dom/Document.cpp 2022-06-01 21:59:41 UTC (rev 295106) @@ -2148,8 +2148,6 @@ bool Document::updateStyleIfNeeded() { -if (topDocument().isResolvingContainerQueries()) -return false; RefPtr frameView = view(); { ScriptDisallowedScope::InMainThread scriptDisallowedScope; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295105] trunk
Title: [295105] trunk Revision 295105 Author wenson_hs...@apple.com Date 2022-06-01 14:42:09 -0700 (Wed, 01 Jun 2022) Log Message [macOS] Only allow the active, visible tab to trigger `-_focusWebView:` https://bugs.webkit.org/show_bug.cgi?id=241108 rdar://93973632 Reviewed by Chris Dumez. To address , Safari removed their implementation of the UI delegate method `-_focusWebView:`, which is invoked when a webpage uses `window.open()` with a target, and which Safari previously handled by making the web view the active tab. However, this breaks a valid use case in which a webpage uses `window.open()` to open itself in a new tab, and later use it again to return to the original tab. To address this, we'll restore Safari's implementation of the `WKWebView` focus delegate method, but will change WebKit to only allow this method call to bubble up into the client layer in the case where the page that's calling `window.open()` is already active and visible. * Source/WebCore/loader/FrameLoader.cpp: (WebCore::isInVisibleAndActivePage): (WebCore::FrameLoader::loadFrameRequest): (WebCore::createWindow): * Source/WebCore/page/DOMWindow.cpp: (WebCore::DOMWindow::focus): Check that the opener (or source) frame that's triggering the call to `open()` is in a page that's visible and active. * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * Tools/TestWebKitAPI/Tests/mac/FocusWebView.mm: Added. (TestWebKitAPI::TEST): Add an API test to verify that `-_focusWebView:` is not called when opening a window once the web page containing the frame that's calling `window.open()` is unparented from its window. * Tools/TestWebKitAPI/Tests/mac/open-in-new-tab.html: Added. * Tools/TestWebKitAPI/cocoa/TestUIDelegate.h: * Tools/TestWebKitAPI/cocoa/TestUIDelegate.mm: (-[TestUIDelegate _focusWebView:]): Canonical link: https://commits.webkit.org/251200@main Modified Paths trunk/Source/WebCore/loader/FrameLoader.cpp trunk/Source/WebCore/page/DOMWindow.cpp trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj trunk/Tools/TestWebKitAPI/cocoa/TestUIDelegate.h trunk/Tools/TestWebKitAPI/cocoa/TestUIDelegate.mm Added Paths trunk/Tools/TestWebKitAPI/Tests/mac/FocusWebView.mm trunk/Tools/TestWebKitAPI/Tests/mac/open-in-new-tab.html Diff Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (295104 => 295105) --- trunk/Source/WebCore/loader/FrameLoader.cpp 2022-06-01 20:36:56 UTC (rev 295104) +++ trunk/Source/WebCore/loader/FrameLoader.cpp 2022-06-01 21:42:09 UTC (rev 295105) @@ -214,6 +214,12 @@ return frame.document() && frame.document()->isSandboxed(mask); } +static bool isInVisibleAndActivePage(const Frame& frame) +{ +auto* page = frame.page(); +return page && page->isVisibleAndActive(); +} + class PageLevelForbidScope { protected: explicit PageLevelForbidScope(Page* page) @@ -1277,7 +1283,7 @@ sourceFrame = _frame; Frame* targetFrame = sourceFrame->loader().findFrameForNavigation(frameName); if (targetFrame && targetFrame != sourceFrame) { -if (Page* page = targetFrame->page()) +if (auto* page = targetFrame->page(); page && isInVisibleAndActivePage(*sourceFrame)) page->chrome().focus(); } }; @@ -4127,7 +4133,7 @@ if (!request.frameName().isEmpty() && !isBlankTargetFrameName(request.frameName())) { if (RefPtr frame = lookupFrame.loader().findFrameForNavigation(request.frameName(), openerFrame.document())) { if (!isSelfTargetFrameName(request.frameName())) { -if (Page* page = frame->page()) +if (auto* page = frame->page(); page && isInVisibleAndActivePage(openerFrame)) page->chrome().focus(); } return frame; Modified: trunk/Source/WebCore/page/DOMWindow.cpp (295104 => 295105) --- trunk/Source/WebCore/page/DOMWindow.cpp 2022-06-01 20:36:56 UTC (rev 295104) +++ trunk/Source/WebCore/page/DOMWindow.cpp 2022-06-01 21:42:09 UTC (rev 295105) @@ -998,7 +998,13 @@ { RefPtr frame = this->frame(); RefPtr openerFrame = frame ? frame->loader().opener() : nullptr; -focus(openerFrame && openerFrame != frame && incumbentWindow.frame() == openerFrame); +focus([&] { +if (!openerFrame || openerFrame == frame || incumbentWindow.frame() != openerFrame) +return false; + +auto* page = openerFrame->page(); +return page && page->isVisibleAndActive(); +}()); } void DOMWindow::focus(bool allowFocus) Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (295104 => 295105) --- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2022-06-01 20:36:56 UTC (rev 295104) +++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2022-06-01 21:42:09 UTC (rev 295105) @@ -,6 +,8 @@ F491DBAE281DE0E80081705F /* image-controls.html in Copy Resources */ = {isa = PBXBuildFile; fileRef =
[webkit-changes] [295104] trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
Title: [295104] trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm Revision 295104 Author d...@apple.com Date 2022-06-01 13:36:56 -0700 (Wed, 01 Jun 2022) Log Message Relax the assertions for min/max unobscured size https://bugs.webkit.org/show_bug.cgi?id=241083 Reviewed by Tim Horton. The assertions in _setMinimumUnobscuredSizeOverride and _setMaximumUnobscuredSizeOverride often trigger when the current bounds are 0. This is handled acceptably, and the assertion is not necessary in that case. * Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm: (-[WKWebView _setMinimumUnobscuredSizeOverride:]): (-[WKWebView _setMaximumUnobscuredSizeOverride:]): Canonical link: https://commits.webkit.org/251199@main Modified Paths trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm Diff Modified: trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm (295103 => 295104) --- trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm 2022-06-01 20:17:33 UTC (rev 295103) +++ trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm 2022-06-01 20:36:56 UTC (rev 295104) @@ -2865,7 +2865,7 @@ - (void)_setMinimumUnobscuredSizeOverride:(CGSize)size { -ASSERT(size.width <= self.bounds.size.width && size.height <= self.bounds.size.height); +ASSERT((!self.bounds.size.width || size.width <= self.bounds.size.width) && (!self.bounds.size.height || size.height <= self.bounds.size.height)); _minimumUnobscuredSizeOverride = size; if (_dynamicViewportUpdateMode == WebKit::DynamicViewportUpdateMode::NotResizing) @@ -2881,7 +2881,7 @@ - (void)_setMaximumUnobscuredSizeOverride:(CGSize)size { -ASSERT(size.width <= self.bounds.size.width && size.height <= self.bounds.size.height); +ASSERT((!self.bounds.size.width || size.width <= self.bounds.size.width) && (!self.bounds.size.height || size.height <= self.bounds.size.height)); _maximumUnobscuredSizeOverride = size; if (_dynamicViewportUpdateMode == WebKit::DynamicViewportUpdateMode::NotResizing) { ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295103] trunk/Source/WebKit
Title: [295103] trunk/Source/WebKit Revision 295103 Author wenson_hs...@apple.com Date 2022-06-01 13:17:33 -0700 (Wed, 01 Jun 2022) Log Message Avoid triggering image analysis when the user has disabled Live Text https://bugs.webkit.org/show_bug.cgi?id=241193 Reviewed by Aditya Keerthi. * Source/WebKit/Platform/cocoa/ImageAnalysisUtilities.h: * Source/WebKit/Platform/cocoa/ImageAnalysisUtilities.mm: (WebKit::canStartImageAnalysis): * Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _startImageAnalysis:target:]): Canonical link: https://commits.webkit.org/251198@main Modified Paths trunk/Source/WebKit/Platform/cocoa/ImageAnalysisUtilities.h trunk/Source/WebKit/Platform/cocoa/ImageAnalysisUtilities.mm trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm Diff Modified: trunk/Source/WebKit/Platform/cocoa/ImageAnalysisUtilities.h (295102 => 295103) --- trunk/Source/WebKit/Platform/cocoa/ImageAnalysisUtilities.h 2022-06-01 20:15:53 UTC (rev 295102) +++ trunk/Source/WebKit/Platform/cocoa/ImageAnalysisUtilities.h 2022-06-01 20:17:33 UTC (rev 295103) @@ -53,6 +53,7 @@ bool textRecognitionEnhancementsSystemFeatureEnabled(); bool imageAnalysisQueueSystemFeatureEnabled(); bool isImageAnalysisMarkupSystemFeatureEnabled(); +bool canStartImageAnalysis(NSString *); WebCore::TextRecognitionResult makeTextRecognitionResult(CocoaImageAnalysis *); Modified: trunk/Source/WebKit/Platform/cocoa/ImageAnalysisUtilities.mm (295102 => 295103) --- trunk/Source/WebKit/Platform/cocoa/ImageAnalysisUtilities.mm 2022-06-01 20:15:53 UTC (rev 295102) +++ trunk/Source/WebKit/Platform/cocoa/ImageAnalysisUtilities.mm 2022-06-01 20:17:33 UTC (rev 295103) @@ -145,6 +145,11 @@ #include #else +bool canStartImageAnalysis(NSString *) +{ +return true; +} + bool textRecognitionEnhancementsSystemFeatureEnabled() { #if ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS) Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (295102 => 295103) --- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2022-06-01 20:15:53 UTC (rev 295102) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2022-06-01 20:17:33 UTC (rev 295103) @@ -39,6 +39,7 @@ #import "FullscreenClient.h" #import "GlobalFindInPageState.h" #import "IconLoadingDelegate.h" +#import "ImageAnalysisUtilities.h" #import "LegacySessionStateCoding.h" #import "Logging.h" #import "MediaUtilities.h" @@ -2328,7 +2329,7 @@ #if ENABLE(IMAGE_ANALYSIS) THROW_IF_SUSPENDED; -if (!_page || !_page->preferences().imageAnalysisQueueEnabled()) +if (!_page || !_page->preferences().imageAnalysisQueueEnabled() || !WebKit::canStartImageAnalysis(source)) return; _page->startImageAnalysis(source, target); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295102] trunk/Source/bmalloc/libpas/Documentation.md
Title: [295102] trunk/Source/bmalloc/libpas/Documentation.md Revision 295102 Author jbed...@apple.com Date 2022-06-01 13:15:53 -0700 (Wed, 01 Jun 2022) Log Message [libpas] add documentation (Follow-up) https://bugs.webkit.org/show_bug.cgi?id=236385 Reviewed by Mark Lam. * Source/bmalloc/libpas/Documentation.md: Convert hashes and revisions to identifiers. Canonical link: https://commits.webkit.org/251196@main Modified Paths trunk/Source/bmalloc/libpas/Documentation.md Diff Modified: trunk/Source/bmalloc/libpas/Documentation.md (295101 => 295102) --- trunk/Source/bmalloc/libpas/Documentation.md 2022-06-01 20:15:16 UTC (rev 295101) +++ trunk/Source/bmalloc/libpas/Documentation.md 2022-06-01 20:15:53 UTC (rev 295102) @@ -30,18 +30,18 @@ # Introduction -This document describes how libpas works as of a361efa96ca4b2ff6bdfc28bc7eb1a678cde75be, so a bit ahead of -where WebKit was as of r289146. Libpas is a fast and memory-efficient memory allocation toolkit capable of -supporting many heaps at once, engineered with the hopes that someday it'll be used for comprehensive isoheaping -of all malloc/new callsites in C/C++ programs. +This document describes how libpas works as of [247029@main](https://commits.webkit.org/247029@main), so a bit ahead of +where WebKit was as of [246842@main](https://commits.webkit.org/246842@main). Libpas is a fast and memory-efficient +memory allocation toolkit capable of supporting many heaps at once, engineered with the hopes that someday it'll be used +for comprehensive isoheaping of all malloc/new callsites in C/C++ programs. -Since WebKit r213753, we've been steadily enabling libpas as a replacement for WebKit's bmalloc and -MetaAllocator. This has so far added up to a ~2% Speedometer2 speed-up and a ~8% memory improvement (on multiple -memory benchmarks). Half of the speed-up comes from replacing the MetaAllocator, which was _javascript_Core's old -way of managing executable memory. Now, JSC uses libpas's jit_heap to manage executable memory. The other half -of the speed-up comes from replacing everything that bmalloc provided -- the fastMalloc API, the Gigacage API, -and the IsoHeap<> API. All of the memory improvement comes from replacing bmalloc (the MetaAllocator was already -fairly memory-efficient). +Since WebKit [186504@main](https://commits.webkit.org/186504@main), we've been steadily enabling libpas as a +replacement for WebKit's bmalloc and MetaAllocator. This has so far added up to a ~2% Speedometer2 speed-up and +a ~8% memory improvement (on multiple memory benchmarks). Half of the speed-up comes from replacing the MetaAllocator, +which was _javascript_Core's old way of managing executable memory. Now, JSC uses libpas's jit_heap to manage executable +memory. The other half of the speed-up comes from replacing everything that bmalloc provided -- the fastMalloc API, the +Gigacage API, and the IsoHeap<> API. All of the memory improvement comes from replacing bmalloc (the MetaAllocator was +already fairly memory-efficient). This document is structured as follows. First I describe the goals of libpas; these are the things that a malloc-like API created out of libpas should be able to expose as fast and memory-efficient functions. Then I @@ -427,7 +427,7 @@ daemons). But when used for many heaps, these overheads are substantial. Given thousands or tens of thousands of heaps, TLCs account for as much as 1% of memory. So, TLCs support partial decommit. Those pages that only have allocators that are inactive get decommitted. Note that TLC decommit has landed in the libpas.git repo -as of a361efa96ca4b2ff6bdfc28bc7eb1a678cde75be, but hasn't yet been merged into WebKit. +as of [247029@main](https://commits.webkit.org/247029@main), but hasn't yet been merged into WebKit. The TLC deallocation log flush algorithm is designed to achieve two performance optimizations: ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295101] trunk
Title: [295101] trunk Revision 295101 Author achristen...@apple.com Date 2022-06-01 13:15:16 -0700 (Wed, 01 Jun 2022) Log Message Allow decidePolicyForNavigation* decisionHandlers to be called on non-main runloops https://bugs.webkit.org/show_bug.cgi?id=241157 Reviewed by Brady Eidson. Wouldn't it be nice if all apps used your APIs exactly how you want them to? This is not the case. People call decision handlers on non-main threads. When this happens, just hop to the main thread to avoid threading issues. * Source/WebKit/UIProcess/Cocoa/NavigationState.mm: (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction): (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse): Canonical link: https://commits.webkit.org/251196@main Modified Paths trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/NavigationAction.mm Diff Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm (295100 => 295101) --- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm 2022-06-01 18:52:36 UTC (rev 295100) +++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm 2022-06-01 20:15:16 UTC (rev 295101) @@ -537,41 +537,39 @@ [NSException raise:NSInvalidArgumentException format:@"WKWebpagePreferences._customNavigatorPlatform must be nil for subframe navigations."]; } -switch (actionPolicy) { -case WKNavigationActionPolicyAllow: -case _WKNavigationActionPolicyAllowInNewProcess: -tryInterceptNavigation(WTFMove(navigationAction), webPageProxy, [actionPolicy, localListener = WTFMove(localListener), websitePolicies = WTFMove(apiWebsitePolicies)](bool interceptedNavigation) mutable { -if (interceptedNavigation) { -localListener->ignore(); -return; -} +ensureOnMainRunLoop([navigationAction = WTFMove(navigationAction), webPageProxy = WTFMove(webPageProxy), actionPolicy, localListener = WTFMove(localListener), apiWebsitePolicies = WTFMove(apiWebsitePolicies)] () mutable { +switch (actionPolicy) { +case WKNavigationActionPolicyAllow: +case _WKNavigationActionPolicyAllowInNewProcess: +tryInterceptNavigation(WTFMove(navigationAction), webPageProxy, [actionPolicy, localListener = WTFMove(localListener), websitePolicies = WTFMove(apiWebsitePolicies)](bool interceptedNavigation) mutable { +if (interceptedNavigation) { +localListener->ignore(); +return; +} -localListener->use(websitePolicies.get(), actionPolicy == _WKNavigationActionPolicyAllowInNewProcess ? ProcessSwapRequestedByClient::Yes : ProcessSwapRequestedByClient::No); -}); - -break; +localListener->use(websitePolicies.get(), actionPolicy == _WKNavigationActionPolicyAllowInNewProcess ? ProcessSwapRequestedByClient::Yes : ProcessSwapRequestedByClient::No); +}); +break; -case WKNavigationActionPolicyCancel: -localListener->ignore(); -break; +case WKNavigationActionPolicyCancel: +localListener->ignore(); +break; -ALLOW_DEPRECATED_DECLARATIONS_BEGIN -case _WKNavigationActionPolicyDownload: -ALLOW_DEPRECATED_DECLARATIONS_END -localListener->download(); -break; +case WKNavigationActionPolicyDownload: +localListener->download(); +break; -case _WKNavigationActionPolicyAllowWithoutTryingAppLink: -trySOAuthorization(WTFMove(navigationAction), webPageProxy, [localListener = WTFMove(localListener), websitePolicies = WTFMove(apiWebsitePolicies)] (bool optimizedLoad) { -if (optimizedLoad) { -localListener->ignore(); -return; -} +case _WKNavigationActionPolicyAllowWithoutTryingAppLink: +trySOAuthorization(WTFMove(navigationAction), webPageProxy, [localListener = WTFMove(localListener), websitePolicies = WTFMove(apiWebsitePolicies)] (bool optimizedLoad) { +if (optimizedLoad) { +localListener->ignore(); +return; +} -localListener->use(websitePolicies.get()); -}); -break; -} +localListener->use(websitePolicies.get()); +}); +break; +}}); }; if (delegateHasWebpagePreferences) { @@ -578,7 +576,7 @@ if (m_navigationState->m_navigationDelegateMethods.webViewDecidePolicyForNavigationActionWithPreferencesDecisionHandler) [navigationDelegate webView:m_navigationState->m_webView
[webkit-changes] [295100] trunk
Title: [295100] trunk Revision 295100 Author pan...@apple.com Date 2022-06-01 11:52:36 -0700 (Wed, 01 Jun 2022) Log Message Web Inspector: Even after r293565, button/select elements created after Web Inspector is open are considered Flexbox containers https://bugs.webkit.org/show_bug.cgi?id=241054 rdar://94063718 Reviewed by Devin Rousso. r293565 updated the logic for determining the layout type for RenderObjects, but that fix did not account for the fact that `InspectorCSSAgent::nodeLayoutContextTypeChanged` is called during the creation of `RenderFlexibleBox`, at which point the creation of subclass-specific bits, including overrides will not have occurred, including `isFlexibleBoxImpl` which we use to determine if the flexbox container is a "real" flexbox container, or an internal implementation detail. We should instead determine the layout context type later just before we send the event to the frontend (it is already delayed specifically because `nodeLayoutContextTypeChanged` can be called in destructors, which can be the result of garbage collection). This doesn't change when the frontend receives any information, only adjust when we resolve the layout context type. * LayoutTests/inspector/css/nodeLayoutContextTypeChanged-expected.txt: * LayoutTests/inspector/css/nodeLayoutContextTypeChanged.html: * Source/WebCore/inspector/agents/InspectorCSSAgent.cpp: * Source/WebCore/inspector/agents/InspectorCSSAgent.h: Canonical link: https://commits.webkit.org/251195@main Modified Paths trunk/LayoutTests/inspector/css/nodeLayoutContextTypeChanged-expected.txt trunk/LayoutTests/inspector/css/nodeLayoutContextTypeChanged.html trunk/Source/WebCore/inspector/agents/InspectorCSSAgent.cpp trunk/Source/WebCore/inspector/agents/InspectorCSSAgent.h Diff Modified: trunk/LayoutTests/inspector/css/nodeLayoutContextTypeChanged-expected.txt (295099 => 295100) --- trunk/LayoutTests/inspector/css/nodeLayoutContextTypeChanged-expected.txt 2022-06-01 18:51:03 UTC (rev 295099) +++ trunk/LayoutTests/inspector/css/nodeLayoutContextTypeChanged-expected.txt 2022-06-01 18:52:36 UTC (rev 295100) @@ -32,3 +32,7 @@ -- Running test case: CSS.nodeLayoutContextTypeChanged.NotFlex.Button PASS: Layout context should be `null`. +-- Running test setup. +-- Running test case: CSS.nodeLayoutContextTypeChanged.NotFlex.DynamicallyAddedButton +PASS: Layout context should be `null`. + Modified: trunk/LayoutTests/inspector/css/nodeLayoutContextTypeChanged.html (295099 => 295100) --- trunk/LayoutTests/inspector/css/nodeLayoutContextTypeChanged.html 2022-06-01 18:51:03 UTC (rev 295099) +++ trunk/LayoutTests/inspector/css/nodeLayoutContextTypeChanged.html 2022-06-01 18:52:36 UTC (rev 295100) @@ -8,6 +8,13 @@ document.getElementById(id).style.display = value; } +function appendElementToBody(tag, id) +{ +let element = document.createElement(tag); +element.id = id; +document.body.appendChild(element); +} + function test() { let documentNode; @@ -14,11 +21,12 @@ let suite = InspectorTest.createAsyncSuite("CSS.nodeLayoutContextTypeChanged"); -function addTestCase({name, description, selector, domNodeHandler}) +function addTestCase({name, description, selector, setup, domNodeHandler}) { suite.addTestCase({ name, description, +setup, async test() { let nodeId = await documentNode.querySelector(selector); let domNode = WI.domManager.nodeForId(nodeId); @@ -33,6 +41,11 @@ await InspectorTest.evaluateInPage(`changeElementDisplayValue("${id}", "${value}")`); } +async function appendElementToBody(tag, id) +{ +await InspectorTest.evaluateInPage(`appendElementToBody("${tag}", "${id}")`); +} + addTestCase({ name: "CSS.nodeLayoutContextTypeChanged.GridToNonGrid", description: "Change a `grid` to a non-grid.", @@ -113,9 +126,9 @@ } }); -function addEnsureLayoutContextTypeTestCase({name, description, selector, expectedLayoutContextType}) +function addEnsureLayoutContextTypeTestCase({name, description, selector, expectedLayoutContextType, setup}) { -addTestCase({name, description, selector, async domNodeHandler(domNode) { +addTestCase({name, description, selector, setup, async domNodeHandler(domNode) { InspectorTest.expectEqual(domNode.layoutContextType, expectedLayoutContextType, `Layout context should be \`${expectedLayoutContextType}\`.`); } }); @@ -142,6 +155,16 @@ expectedLayoutContextType: null, }); +addEnsureLayoutContextTypeTestCase({ +name: "CSS.nodeLayoutContextTypeChanged.NotFlex.DynamicallyAddedButton", +description: "Make sure a `button` that is added dynamically is not considered a flex container.", +selector: "#dynamicallyAddedFlexButton", +expectedLayoutContextType: null, +async setup() {
[webkit-changes] [295098] trunk
Title: [295098] trunk Revision 295098 Author akeer...@apple.com Date 2022-06-01 11:32:53 -0700 (Wed, 01 Jun 2022) Log Message [iOS] WKWebViews can get into a state with multiple find overlays https://bugs.webkit.org/show_bug.cgi?id=241163 rdar://93904570 Reviewed by Devin Rousso. When `-[WKWebView didEndTextSearchOperation]` and `-[WKWebView didBeginTextSearchOperation]` are called in quick succession, the web view can get into a state with multiple find overlays. This state occurs because `didBeginTextSearchOperation` nulls out the find overlay before the fade out animation has finished. `didBeginTextSearchOperation` then observes that there is no find overlay, and adds another overlay. To fix, the page overlay member should be nulled out at the right time. * Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp: (WebKit::WebFoundTextRangeController::didBeginTextSearchOperation): If there is already a find overlay, cancel its removal if it is being uninstalled. This ensures that calling end/begin in quick succession will preserve the overlay. (WebKit::WebFoundTextRangeController::didEndTextSearchOperation): Do not null out the page overlay immediately when uninstalling. Nulling out the member is handled in `willMoveToPage`, which is called after the animation is finished. * Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm: (traverseLayerTree): (overlayCount): (TestWebKitAPI::TEST): Added an API test to ensure at most one find overlay is in the layer tree at any time. Canonical link: https://commits.webkit.org/251193@main Modified Paths trunk/Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm Diff Modified: trunk/Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp (295097 => 295098) --- trunk/Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp 2022-06-01 17:50:03 UTC (rev 295097) +++ trunk/Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp 2022-06-01 18:32:53 UTC (rev 295098) @@ -177,7 +177,9 @@ void WebFoundTextRangeController::didBeginTextSearchOperation() { -if (!m_findPageOverlay) { +if (m_findPageOverlay) +m_findPageOverlay->stopFadeOutAnimation(); +else { m_findPageOverlay = WebCore::PageOverlay::create(*this, WebCore::PageOverlay::OverlayType::Document); m_webPage->corePage()->pageOverlayController().installPageOverlay(*m_findPageOverlay, WebCore::PageOverlay::FadeMode::Fade); } @@ -189,8 +191,6 @@ { if (m_findPageOverlay) m_webPage->corePage()->pageOverlayController().uninstallPageOverlay(*m_findPageOverlay, WebCore::PageOverlay::FadeMode::Fade); - -m_findPageOverlay = nullptr; } void WebFoundTextRangeController::requestRectForFoundTextRange(const WebFoundTextRange& range, CompletionHandler&& completionHandler) Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm (295097 => 295098) --- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm 2022-06-01 17:50:03 UTC (rev 295097) +++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm 2022-06-01 18:32:53 UTC (rev 295098) @@ -421,6 +421,23 @@ @end +static void traverseLayerTree(CALayer *layer, void(^block)(CALayer *)) +{ +for (CALayer *child in layer.sublayers) +traverseLayerTree(child, block); +block(layer); +} + +static size_t overlayCount(WKWebView *webView) +{ +__block size_t count = 0; +traverseLayerTree([webView layer], ^(CALayer *layer) { +if ([layer.name containsString:@"Overlay content"]) +count++; +}); +return count; +} + static void testPerformTextSearchWithQueryStringInWebView(WKWebView *webView, NSString *query, TestTextSearchOptions *searchOptions, NSUInteger expectedMatches) { __block bool finishedSearching = false; @@ -645,4 +662,32 @@ TestWebKitAPI::Util::run(>_finishedScrolling); } +TEST(WebKit, CannotHaveMultipleFindOverlays) +{ +auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)]); + +NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"lots-of-text" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]; +[webView loadRequest:request]; +[webView _test_waitForDidFinishNavigation]; + +EXPECT_EQ(overlayCount(webView.get()), 0U); + +[webView didBeginTextSearchOperation]; + +// Wait for two presentation updates, as the document overlay root layer is +// created lazily. +[webView waitForNextPresentationUpdate]; +[webView waitForNextPresentationUpdate]; + +EXPECT_EQ(overlayCount(webView.get()), 1U); + +[webView didEndTextSearchOperation]; +[webView didBeginTextSearchOperation]; + +[webView waitForNextPresentationUpdate]; +[webView waitForNextPresentationUpdate]; + +EXPECT_EQ(overlayCount(webView.get()), 1U); +} + #endif // HAVE(UIFINDINTERACTION)
[webkit-changes] [295097] trunk/LayoutTests/platform/mac-wk2/TestExpectations
Title: [295097] trunk/LayoutTests/platform/mac-wk2/TestExpectations Revision 295097 Author rack...@apple.com Date 2022-06-01 10:50:03 -0700 (Wed, 01 Jun 2022) Log Message [Gardening]: REGRESSION (250044@main?): [ Monterey Debug wk2 ] webgl/1.0.3/conformance/attribs/gl-vertexattribpointer-offsets.html is an almost consistent timeout https://bugs.webkit.org/show_bug.cgi?id=241191 Unreviewed test gardening. * LayoutTests/platform/mac-wk2/TestExpectations: Canonical link: https://commits.webkit.org/251192@main Modified Paths trunk/LayoutTests/platform/mac-wk2/TestExpectations Diff Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (295096 => 295097) --- trunk/LayoutTests/platform/mac-wk2/TestExpectations 2022-06-01 17:41:12 UTC (rev 295096) +++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2022-06-01 17:50:03 UTC (rev 295097) @@ -1741,3 +1741,6 @@ webkit.org/b/241048 imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html [ Pass Failure ] webkit.org/b/241048 imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html [ Pass Failure ] + +webkit.org/b/241191 [ Monterey Debug ] webgl/1.0.3/conformance/attribs/gl-vertexattribpointer-offsets.html [ Pass Timeout ] + ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295096] trunk/Tools/Scripts/libraries/webkitscmpy
Title: [295096] trunk/Tools/Scripts/libraries/webkitscmpy Revision 295096 Author jbed...@apple.com Date 2022-06-01 10:41:12 -0700 (Wed, 01 Jun 2022) Log Message [git-webkit] Append -- to `git log` commands https://bugs.webkit.org/show_bug.cgi?id=241161 Reviewed by Alexey Proskuryakov. * Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version. * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto. * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py: (Git.Cache.populate): Append -- to `git log` command. (Git.commit): Ditto. (Git.commits): Ditto. (Git.checkout): Append -- to `git checkout` command. Canonical link: https://commits.webkit.org/251191@main Modified Paths trunk/Tools/Scripts/libraries/webkitscmpy/setup.py trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py Diff Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (295095 => 295096) --- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py 2022-06-01 17:32:05 UTC (rev 295095) +++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py 2022-06-01 17:41:12 UTC (rev 295096) @@ -29,7 +29,7 @@ setup( name='webkitscmpy', -version='4.15.1', +version='4.15.2', description='Library designed to interact with git and svn repositories.', long_description=readme(), classifiers=[ Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (295095 => 295096) --- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py 2022-06-01 17:32:05 UTC (rev 295095) +++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py 2022-06-01 17:41:12 UTC (rev 295096) @@ -46,7 +46,7 @@ "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url `" ) -version = Version(4, 15, 1) +version = Version(4, 15, 2) AutoInstall.register(Package('fasteners', Version(0, 15, 0))) AutoInstall.register(Package('jinja2', Version(2, 11, 3))) Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py (295095 => 295096) --- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py 2022-06-01 17:32:05 UTC (rev 295095) +++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py 2022-06-01 17:41:12 UTC (rev 295096) @@ -129,7 +129,7 @@ kwargs = dict(encoding='utf-8') self._last_populated[branch] = time.time() log = subprocess.Popen( -[self.repo.executable(), 'log', branch, '--no-decorate', '--date=unix'], +[self.repo.executable(), 'log', branch, '--no-decorate', '--date=unix', '--'], cwd=self.repo.root_path, stdout=subprocess.PIPE, stderr=subprocess.PIPE, @@ -592,7 +592,7 @@ # If the cache managed to convert the identifier to a hash, we can skip some computation if hash: log = run( -[self.executable(), 'log', hash] + log_format, +[self.executable(), 'log', hash] + log_format + ['--'], cwd=self.root_path, capture_output=True, encoding='utf-8', @@ -615,7 +615,7 @@ if identifier > base_count: raise self.Exception('Identifier {} cannot be found on the specified branch in the current checkout'.format(identifier)) log = run( -[self.executable(), 'log', '{}~{}'.format(branch or 'HEAD', base_count - identifier)] + log_format, +[self.executable(), 'log', '{}~{}'.format(branch or 'HEAD', base_count - identifier)] + log_format + ['--'], cwd=self.root_path, capture_output=True, encoding='utf-8', @@ -636,7 +636,7 @@ if branch and tag: raise ValueError('Cannot define both tag and branch') -log = run([self.executable(), 'log', branch or tag] + log_format, cwd=self.root_path, capture_output=True, encoding='utf-8') +log = run([self.executable(), 'log', branch or tag] + log_format + ['--'], cwd=self.root_path, capture_output=True, encoding='utf-8') if log.returncode: raise self.Exception("Failed to retrieve commit information for '{}'".format(branch or tag)) @@ -643,7 +643,7 @@ # Determine the `git log` output for a given hash else: hash = Commit._parse_hash(hash, do_assert=True) -log = run([self.executable(), 'log', hash or 'HEAD'] + log_format, cwd=self.root_path, capture_output=True, encoding='utf-8') +log = run([self.executable(), 'log', hash or 'HEAD'] + log_format + ['--'], cwd=self.root_path, capture_output=True, encoding='utf-8') if log.returncode: raise self.Exception("Failed to retrieve commit information for
[webkit-changes] [295095] trunk
Title: [295095] trunk Revision 295095 Author ryanhad...@apple.com Date 2022-06-01 10:32:05 -0700 (Wed, 01 Jun 2022) Log Message Revert "Allow decidePolicyForNavigation* decisionHandlers to be called on non-main runloops" Unreviewed, this reverts commit 251175@main. Canonical link: https://commits.webkit.org/251190@main Modified Paths trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/NavigationAction.mm Diff Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm (295094 => 295095) --- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm 2022-06-01 17:26:14 UTC (rev 295094) +++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm 2022-06-01 17:32:05 UTC (rev 295095) @@ -575,20 +575,13 @@ }; if (delegateHasWebpagePreferences) { -auto decisionHandler = [decisionHandlerWithPreferencesOrPolicies = WTFMove(decisionHandlerWithPreferencesOrPolicies)] (WKNavigationActionPolicy actionPolicy, WKWebpagePreferences *preferences) mutable { -ensureOnMainRunLoop([decisionHandlerWithPreferencesOrPolicies = WTFMove(decisionHandlerWithPreferencesOrPolicies), actionPolicy, retainedPreferences = RetainPtr { preferences }] () mutable { -decisionHandlerWithPreferencesOrPolicies(actionPolicy, retainedPreferences.get()); -}); -}; if (m_navigationState->m_navigationDelegateMethods.webViewDecidePolicyForNavigationActionWithPreferencesDecisionHandler) -[navigationDelegate webView:m_navigationState->m_webView decidePolicyForNavigationAction:wrapper(navigationAction) preferences:wrapper(defaultWebsitePolicies) decisionHandler:makeBlockPtr(WTFMove(decisionHandler)).get()]; +[navigationDelegate webView:m_navigationState->m_webView decidePolicyForNavigationAction:wrapper(navigationAction) preferences:wrapper(defaultWebsitePolicies) decisionHandler:makeBlockPtr(WTFMove(decisionHandlerWithPreferencesOrPolicies)).get()]; else -[(id)navigationDelegate _webView:m_navigationState->m_webView decidePolicyForNavigationAction:wrapper(navigationAction) preferences:wrapper(defaultWebsitePolicies) userInfo:userInfo ? static_cast>(userInfo->wrapper()) : nil decisionHandler:makeBlockPtr(WTFMove(decisionHandler)).get()]; +[(id )navigationDelegate _webView:m_navigationState->m_webView decidePolicyForNavigationAction:wrapper(navigationAction) preferences:wrapper(defaultWebsitePolicies) userInfo:userInfo ? static_cast>(userInfo->wrapper()) : nil decisionHandler:makeBlockPtr(WTFMove(decisionHandlerWithPreferencesOrPolicies)).get()]; } else { auto decisionHandler = [decisionHandlerWithPreferencesOrPolicies = WTFMove(decisionHandlerWithPreferencesOrPolicies)] (WKNavigationActionPolicy actionPolicy) mutable { -ensureOnMainRunLoop([decisionHandlerWithPreferencesOrPolicies = WTFMove(decisionHandlerWithPreferencesOrPolicies), actionPolicy] () mutable { -decisionHandlerWithPreferencesOrPolicies(actionPolicy, nil); -}); +decisionHandlerWithPreferencesOrPolicies(actionPolicy, nil); }; [navigationDelegate webView:m_navigationState->m_webView decidePolicyForNavigationAction:wrapper(navigationAction) decisionHandler:makeBlockPtr(WTFMove(decisionHandler)).get()]; } @@ -661,26 +654,24 @@ return; auto checker = CompletionHandlerCallChecker::create(navigationDelegate.get(), @selector(webView:decidePolicyForNavigationResponse:decisionHandler:)); -[navigationDelegate webView:m_navigationState->m_webView decidePolicyForNavigationResponse:wrapper(navigationResponse) decisionHandler:makeBlockPtr([localListener = WTFMove(listener), checker = WTFMove(checker)](WKNavigationResponsePolicy responsePolicy) mutable { -ensureOnMainRunLoop([responsePolicy, checker = WTFMove(checker), localListener = WTFMove(localListener)] { -if (checker->completionHandlerHasBeenCalled()) -return; -checker->didCallCompletionHandler(); +[navigationDelegate webView:m_navigationState->m_webView decidePolicyForNavigationResponse:wrapper(navigationResponse) decisionHandler:makeBlockPtr([localListener = WTFMove(listener), checker = WTFMove(checker)](WKNavigationResponsePolicy responsePolicy) { +if (checker->completionHandlerHasBeenCalled()) +return; +checker->didCallCompletionHandler(); -switch (responsePolicy) { -case WKNavigationResponsePolicyAllow: -localListener->use(); -break; +switch (responsePolicy) { +case WKNavigationResponsePolicyAllow: +localListener->use(); +break; -case WKNavigationResponsePolicyCancel: -localListener->ignore(); -break; +case WKNavigationResponsePolicyCancel: +localListener->ignore(); +break; -
[webkit-changes] [295094] trunk
Title: [295094] trunk Revision 295094 Author za...@apple.com Date 2022-06-01 10:26:14 -0700 (Wed, 01 Jun 2022) Log Message Spacing after some posts is too large on Dead by Daylight forums https://bugs.webkit.org/show_bug.cgi?id=241104 Reviewed by Antti Koivisto. Do not cross containing block boundary while resolving fill-available. If the containing block does not specify the constraint value for the fill-available descendant, we should just return "can't resolve" instead of climbing the containing block tree and potentially hit the ICB as the first container with fixed height(width). * LayoutTests/fast/block/fill-available-with-no-specified-containing-block-height-expected.html: Added. * LayoutTests/fast/block/fill-available-with-no-specified-containing-block-height.html: Added. * Source/WebCore/rendering/RenderBox.cpp: (WebCore::isOrthogonal): (WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing const): Canonical link: https://commits.webkit.org/251189@main Modified Paths trunk/Source/WebCore/rendering/RenderBox.cpp Added Paths trunk/LayoutTests/fast/block/fill-available-with-no-specified-containing-block-height-expected.html trunk/LayoutTests/fast/block/fill-available-with-no-specified-containing-block-height.html Diff Added: trunk/LayoutTests/fast/block/fill-available-with-no-specified-containing-block-height-expected.html (0 => 295094) --- trunk/LayoutTests/fast/block/fill-available-with-no-specified-containing-block-height-expected.html (rev 0) +++ trunk/LayoutTests/fast/block/fill-available-with-no-specified-containing-block-height-expected.html 2022-06-01 17:26:14 UTC (rev 295094) @@ -0,0 +1,8 @@ + +div { + width: 100px; + height: 100px; + background-color: green; +} + + Added: trunk/LayoutTests/fast/block/fill-available-with-no-specified-containing-block-height.html (0 => 295094) --- trunk/LayoutTests/fast/block/fill-available-with-no-specified-containing-block-height.html (rev 0) +++ trunk/LayoutTests/fast/block/fill-available-with-no-specified-containing-block-height.html 2022-06-01 17:26:14 UTC (rev 295094) @@ -0,0 +1,21 @@ + +.container { + width: 100px; + background-color: red; +} + +.fill { + height: -webkit-fill-available; +} + +.overflow-sibling { + width: 100px; + height: 100px; + background-color: green; +} + + + + + + Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (295093 => 295094) --- trunk/Source/WebCore/rendering/RenderBox.cpp 2022-06-01 17:04:02 UTC (rev 295093) +++ trunk/Source/WebCore/rendering/RenderBox.cpp 2022-06-01 17:26:14 UTC (rev 295094) @@ -3259,6 +3259,11 @@ return std::nullopt; } +static inline bool isOrthogonal(const RenderBox& renderer, const RenderElement& ancestor) +{ +return renderer.isHorizontalWritingMode() != ancestor.isHorizontalWritingMode(); +} + std::optional RenderBox::computeIntrinsicLogicalContentHeightUsing(Length logicalHeightLength, std::optional intrinsicContentHeight, LayoutUnit borderAndPadding) const { // FIXME: The CSS sizing spec is considering changing what min-content/max-content should resolve to. @@ -3266,10 +3271,33 @@ if (logicalHeightLength.isMinContent() || logicalHeightLength.isMaxContent() || logicalHeightLength.isFitContent() || logicalHeightLength.isLegacyIntrinsic()) { if (intrinsicContentHeight) return adjustIntrinsicLogicalHeightForBoxSizing(intrinsicContentHeight.value()); -return std::nullopt; +return { }; } -if (logicalHeightLength.isFillAvailable()) -return containingBlock()->availableLogicalHeight(ExcludeMarginBorderPadding) - borderAndPadding; +if (logicalHeightLength.isFillAvailable()) { +auto* containingBlock = this->containingBlock(); + +auto canResolveAvailableSpace = [&] { +// FIXME: We need to find a way to say: yes, the constraint value is set and we can resolve height against it. +// Until then, this is mostly just guesswork. +if (!containingBlock) +return false; +auto containingBlockHasSpecifiedSpace = [&] { +auto isOrthogonal = WebCore::isOrthogonal(*this, *containingBlock); +auto& style = containingBlock->style(); +if ((!isOrthogonal && style.height().isSpecified()) || (isOrthogonal && style.width().isSpecified())) +return true; +if (containingBlock->isOutOfFlowPositioned()) { +if ((!isOrthogonal && !style.top().isAuto() && !style.bottom().isAuto()) || (isOrthogonal && !style.left().isAuto() && !style.right().isAuto())) +return true; +} +return false; +}; +return containingBlockHasSpecifiedSpace() || containingBlock->hasOverridingLogicalHeight(); +}; +if (canResolveAvailableSpace()) +return
[webkit-changes] [295093] trunk/Source
Title: [295093] trunk/Source Revision 295093 Author ryanhad...@apple.com Date 2022-06-01 10:04:02 -0700 (Wed, 01 Jun 2022) Log Message Revert "[Xcode] Prevent STP and other self-contained builds from overwriting content in the macOS SDK" Unreviewed, this reverts commit 251168@main to fix internal builds. Canonical link: https://commits.webkit.org/251188@main Modified Paths trunk/Source/_javascript_Core/Configurations/Base.xcconfig trunk/Source/_javascript_Core/Configurations/_javascript_Core.xcconfig trunk/Source/_javascript_Core/DerivedSources.make trunk/Source/_javascript_Core/Scripts/generate-unified-sources.sh trunk/Source/_javascript_Core/offlineasm/config.rb trunk/Source/_javascript_Core/offlineasm/parser.rb trunk/Source/ThirdParty/ANGLE/Configurations/ANGLE-dynamic.xcconfig trunk/Source/ThirdParty/ANGLE/Configurations/AngleMetalLib.xcconfig trunk/Source/ThirdParty/ANGLE/Configurations/Base.xcconfig trunk/Source/ThirdParty/libwebrtc/Configurations/Base.xcconfig trunk/Source/ThirdParty/libwebrtc/Configurations/boringssl.xcconfig trunk/Source/ThirdParty/libwebrtc/Configurations/libabsl.xcconfig trunk/Source/ThirdParty/libwebrtc/Configurations/libsrtp.xcconfig trunk/Source/ThirdParty/libwebrtc/Configurations/libvpx.xcconfig trunk/Source/ThirdParty/libwebrtc/Configurations/libwebm.xcconfig trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig trunk/Source/ThirdParty/libwebrtc/Configurations/libyuv.xcconfig trunk/Source/ThirdParty/libwebrtc/Configurations/opus.xcconfig trunk/Source/ThirdParty/libwebrtc/Configurations/usrsctp.xcconfig trunk/Source/ThirdParty/libwebrtc/Configurations/yasm.xcconfig trunk/Source/WTF/Configurations/Base.xcconfig trunk/Source/WTF/Configurations/WTF.xcconfig trunk/Source/WTF/Configurations/icu.xcconfig trunk/Source/WebCore/Configurations/Base.xcconfig trunk/Source/WebCore/Configurations/WebCore.xcconfig trunk/Source/WebCore/Configurations/WebCoreTestSupport.xcconfig trunk/Source/WebCore/DerivedSources.make trunk/Source/WebCore/PAL/Configurations/PAL.xcconfig trunk/Source/WebCore/Scripts/generate-unified-sources.sh trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebGPU/Configurations/Base.xcconfig trunk/Source/WebGPU/Configurations/WGSL.xcconfig trunk/Source/WebGPU/Configurations/WGSLUnitTests.xcconfig trunk/Source/WebGPU/Configurations/WebGPU.xcconfig trunk/Source/WebKit/Configurations/Base.xcconfig trunk/Source/WebKit/Configurations/BaseTarget.xcconfig trunk/Source/WebKit/Configurations/SandboxProfiles.xcconfig trunk/Source/WebKit/Scripts/generate-unified-sources.sh trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj trunk/Source/WebKitLegacy/mac/Configurations/Base.xcconfig trunk/Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig trunk/Source/WebKitLegacy/scripts/generate-unified-sources.sh trunk/Source/bmalloc/Configurations/Base.xcconfig trunk/Source/bmalloc/Configurations/bmalloc.xcconfig trunk/Source/bmalloc/Configurations/mbmalloc.xcconfig Diff Modified: trunk/Source/_javascript_Core/Configurations/Base.xcconfig (295092 => 295093) --- trunk/Source/_javascript_Core/Configurations/Base.xcconfig 2022-06-01 16:58:41 UTC (rev 295092) +++ trunk/Source/_javascript_Core/Configurations/Base.xcconfig 2022-06-01 17:04:02 UTC (rev 295093) @@ -108,17 +108,8 @@ PREBINDING = NO; WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wliteral-conversion -Wthread-safety -Wno-profile-instr-out-of-date -Wno-profile-instr-unprofiled; -HEADER_SEARCH_PATHS = . "$(BUILT_PRODUCTS_DIR)$(WK_LIBRARY_HEADERS_FOLDER_PATH)" $(HEADER_SEARCH_PATHS); -LIBRARY_SEARCH_PATHS = $(SDK_DIR)$(WK_LIBRARY_INSTALL_PATH) $(inherited); -SYSTEM_HEADER_SEARCH_PATHS = $(SDK_DIR)$(WK_LIBRARY_HEADERS_FOLDER_PATH) $(inherited); +HEADER_SEARCH_PATHS = . "${BUILT_PRODUCTS_DIR}/usr/local/include" $(HEADER_SEARCH_PATHS); -WK_LIBRARY_HEADERS_FOLDER_PATH = $(WK_LIBRARY_HEADERS_FOLDER_PATH_OVERRIDE_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR)); -WK_LIBRARY_HEADERS_FOLDER_PATH_OVERRIDE_NO = /usr/local/include; -WK_LIBRARY_HEADERS_FOLDER_PATH_OVERRIDE_YES = /usr/local/include/safari-sdk; -WK_LIBRARY_INSTALL_PATH = $(WK_LIBRARY_INSTALL_PATH_OVERRIDE_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR)); -WK_LIBRARY_INSTALL_PATH_OVERRIDE_NO = /usr/local/lib; -WK_LIBRARY_INSTALL_PATH_OVERRIDE_YES = /usr/local/lib/safari-sdk; - TARGET_MACOS_LEGACY_VERSION_IDENTIFIER = $(TARGET_MACOS_LEGACY_VERSION_IDENTIFIER_$(MACOSX_DEPLOYMENT_TARGET:base)) TARGET_MACOS_LEGACY_VERSION_IDENTIFIER_10 = 10$(MACOSX_DEPLOYMENT_TARGET:suffix:identifier) Modified: trunk/Source/_javascript_Core/Configurations/_javascript_Core.xcconfig (295092 => 295093) --- trunk/Source/_javascript_Core/Configurations/_javascript_Core.xcconfig
[webkit-changes] [295092] trunk
Title: [295092] trunk Revision 295092 Author cdu...@apple.com Date 2022-06-01 09:58:41 -0700 (Wed, 01 Jun 2022) Log Message WeakHashMap::ensure() may crash if the map contains null references https://bugs.webkit.org/show_bug.cgi?id=241162 Reviewed by Geoffrey Garen. WeakHashMap::ensure() may crash if the map contains null references, because the WeakHashMap iterator destructor can clear null references and the AddResult constructor copies and destroys the input iterator. I find it very error-prone that destroying an iterator would modify the hash map and thus invalidate other iterators (or even itself if the iterator was merely copied). As a result, I removed this logic from the WeakHashMapIteratorBase destructor. Instead, I now increase WeakHashMap::m_operationCountSinceLastCleanup whenever the iterator gets incremented so that null references will be removed the next time the hash map is modified. I also updated other read-only operations (such as get() / find() / contains()) to just increment m_operationCountSinceLastCleanup without actually clearing null references for the same reason as above. Having such read-only operations invalidate existing iterators is just too error-prone. Finally, I updated the AddResult constructor to avoid copying the WeakHashMapIterator it is passed, given that the WeakHashMapIterator constructor and destructor do some work. * Source/WTF/wtf/WeakHashMap.h: * Source/WebCore/dom/Element.cpp: (WebCore::Element::identifier const): * Tools/TestWebKitAPI/Tests/WTF/WeakPtr.cpp: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/251187@main Modified Paths trunk/Source/WTF/wtf/WeakHashMap.h trunk/Source/WebCore/dom/Element.cpp trunk/Tools/TestWebKitAPI/Tests/WTF/WeakPtr.cpp Diff Modified: trunk/Source/WTF/wtf/WeakHashMap.h (295091 => 295092) --- trunk/Source/WTF/wtf/WeakHashMap.h 2022-06-01 16:55:02 UTC (rev 295091) +++ trunk/Source/WTF/wtf/WeakHashMap.h 2022-06-01 16:58:41 UTC (rev 295092) @@ -89,13 +89,7 @@ skipEmptyBuckets(); } -~WeakHashMapIteratorBase() -{ -if (m_emptyBucketCount > m_weakHashMap.m_map.size() / 8) -const_cast(m_weakHashMap).removeNullReferences(); -else -m_weakHashMap.amortizedCleanupIfNeeded(m_advanceCount + m_emptyBucketCount); -} +~WeakHashMapIteratorBase() = default; ALWAYS_INLINE IteratorPeekType makePeek() { @@ -117,14 +111,13 @@ ++m_position; ++m_advanceCount; skipEmptyBuckets(); +m_weakHashMap.increaseOperationCountSinceLastCleanup(); } void skipEmptyBuckets() { -while (m_position != m_endPosition && !m_position->key.get()) { +while (m_position != m_endPosition && !m_position->key.get()) ++m_position; -++m_emptyBucketCount; -} } const MapType& m_weakHashMap; @@ -131,7 +124,6 @@ IteratorType m_position; IteratorType m_endPosition; unsigned m_advanceCount { 0 }; -unsigned m_emptyBucketCount { 0 }; }; class WeakHashMapIterator : public WeakHashMapIteratorBase { @@ -186,7 +178,10 @@ struct AddResult { AddResult() : isNewEntry(false) { } -AddResult(WeakHashMapIterator it, bool isNewEntry) : iterator(it), isNewEntry(isNewEntry) { } +AddResult(WeakHashMapIterator&& it, bool isNewEntry) +: iterator(WTFMove(it)) +, isNewEntry(isNewEntry) +{ } WeakHashMapIterator iterator; bool isNewEntry; @@ -226,7 +221,7 @@ iterator find(const KeyType& key) { -amortizedCleanupIfNeeded(); +increaseOperationCountSinceLastCleanup(); auto* keyImpl = keyImplIfExists(key); if (!keyImpl) return end(); @@ -235,7 +230,7 @@ const_iterator find(const KeyType& key) const { -amortizedCleanupIfNeeded(); +increaseOperationCountSinceLastCleanup(); auto* keyImpl = keyImplIfExists(key); if (!keyImpl) return end(); @@ -244,7 +239,7 @@ bool contains(const KeyType& key) const { -amortizedCleanupIfNeeded(); +increaseOperationCountSinceLastCleanup(); auto* keyImpl = keyImplIfExists(key); if (!keyImpl) return false; @@ -262,7 +257,7 @@ typename ValueTraits::PeekType get(const KeyType& key) { -amortizedCleanupIfNeeded(); +increaseOperationCountSinceLastCleanup(); auto* keyImpl = keyImplIfExists(key); if (!keyImpl) return ValueTraits::peek(ValueTraits::emptyValue()); @@ -347,10 +342,16 @@ #endif private: +ALWAYS_INLINE unsigned increaseOperationCountSinceLastCleanup(unsigned operationsPerformed = 1) const +{ +unsigned currentCount = m_operationCountSinceLastCleanup; +
[webkit-changes] [295091] trunk
Title: [295091] trunk Revision 295091 Author commit-qu...@webkit.org Date 2022-06-01 09:55:02 -0700 (Wed, 01 Jun 2022) Log Message Fix Wasm referenced function calculation for globals https://bugs.webkit.org/show_bug.cgi?id=239588 Patch by Asumu Takikawa on 2022-06-01 Reviewed by Keith Miller. JSTests: * wasm/regress/239588.js: Added. (module): Source/_javascript_Core: * wasm/WasmSectionParser.cpp: (JSC::Wasm::SectionParser::parseInitExpr): Canonical link: https://commits.webkit.org/251186@main Modified Paths trunk/Source/_javascript_Core/wasm/WasmSectionParser.cpp Added Paths trunk/JSTests/wasm/regress/239588.js Diff Added: trunk/JSTests/wasm/regress/239588.js (0 => 295091) --- trunk/JSTests/wasm/regress/239588.js (rev 0) +++ trunk/JSTests/wasm/regress/239588.js 2022-06-01 16:55:02 UTC (rev 295091) @@ -0,0 +1,16 @@ +function module(bytes, valid = true) { + let buffer = new ArrayBuffer(bytes.length); + let view = new Uint8Array(buffer); + for (let i = 0; i < bytes.length; ++i) { +view[i] = bytes.charCodeAt(i); + } + return new WebAssembly.Module(buffer); +} + +/* + * (module + *(type (func)) + *(global funcref (ref.func 0)) + *(func (type 0))) + */ +new WebAssembly.Instance(module("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x06\x06\x01\x70\x00\xd2\x00\x0b\x0a\x04\x01\x02\x00\x0b")); Modified: trunk/Source/_javascript_Core/wasm/WasmSectionParser.cpp (295090 => 295091) --- trunk/Source/_javascript_Core/wasm/WasmSectionParser.cpp 2022-06-01 16:20:48 UTC (rev 295090) +++ trunk/Source/_javascript_Core/wasm/WasmSectionParser.cpp 2022-06-01 16:55:02 UTC (rev 295091) @@ -628,6 +628,7 @@ uint32_t index; WASM_PARSER_FAIL_IF(!parseVarUInt32(index), "can't get ref.func index"); WASM_PARSER_FAIL_IF(index >= m_info->functions.size(), "ref.func index", index, " exceeds the number of functions ", m_info->functions.size()); +m_info->addReferencedFunction(index); if (Options::useWebAssemblyTypedFunctionReferences()) { TypeIndex typeIndex = m_info->typeIndexFromFunctionIndexSpace(index); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295090] trunk
Title: [295090] trunk Revision 295090 Author tyle...@apple.com Date 2022-06-01 09:20:48 -0700 (Wed, 01 Jun 2022) Log Message AX: inert attribute doesn't cause display:contents element to be ignored https://bugs.webkit.org/show_bug.cgi?id=241022 Reviewed by Chris Fleizach. Prior to this patch, the inert attribute didn't cause node-only objects (like those with display:contents) to be ignored. This was because AccessibilityObject::defaultObjectInclusion only checked `effectiveInert` for elements with renderers, even though you only need an element to have style (not a renderer). This patch fixes this by adding a new AccessibilityObject::style() method which uses AccessibilityObject::element() to get Element::computedStyle() and checking effectiveInert on that, which works for both renderer and renderer-less objects. * LayoutTests/accessibility/node-only-inert-object-expected.txt: Added. * LayoutTests/accessibility/node-only-inert-object.html: Added. * LayoutTests/platform/ios/TestExpectations: Enable new test. * LayoutTests/platform/mac-wk1/TestExpectations: Skip new test. * Source/WebCore/accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::style const): Added. (WebCore::AccessibilityObject::defaultObjectInclusion const): * Source/WebCore/accessibility/AccessibilityObject.h: Canonical link: https://commits.webkit.org/251185@main Modified Paths trunk/LayoutTests/platform/ios/TestExpectations trunk/LayoutTests/platform/mac-wk1/TestExpectations trunk/LayoutTests/platform/win/TestExpectations trunk/Source/WebCore/accessibility/AccessibilityObject.cpp trunk/Source/WebCore/accessibility/AccessibilityObject.h Added Paths trunk/LayoutTests/accessibility/node-only-inert-object-expected.txt trunk/LayoutTests/accessibility/node-only-inert-object.html Diff Added: trunk/LayoutTests/accessibility/node-only-inert-object-expected.txt (0 => 295090) --- trunk/LayoutTests/accessibility/node-only-inert-object-expected.txt (rev 0) +++ trunk/LayoutTests/accessibility/node-only-inert-object-expected.txt 2022-06-01 16:20:48 UTC (rev 295090) @@ -0,0 +1,11 @@ +This test ensures that a node-only object (e.g. one with display:contents) that is inert is ignored. + +PASS: accessibilityController.accessibleElementById('button') === null + +Removing inert from #button +PASS: accessibilityController.accessibleElementById('button').role.includes('Button') === true + +PASS successfullyParsed is true + +TEST COMPLETE +Click me Added: trunk/LayoutTests/accessibility/node-only-inert-object.html (0 => 295090) --- trunk/LayoutTests/accessibility/node-only-inert-object.html (rev 0) +++ trunk/LayoutTests/accessibility/node-only-inert-object.html 2022-06-01 16:20:48 UTC (rev 295090) @@ -0,0 +1,31 @@ + + + + + + + + +