Timeline



Feb 14, 2022:

11:34 PM Changeset in webkit [289790] by commit-queue@webkit.org
  • 87 edits
    3 deletes in trunk

ExtensionsGL is not useful class, it should be removed
https://bugs.webkit.org/show_bug.cgi?id=236490

Source/WebCore:

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-14
Reviewed by Dean Jackson.

Remove ExtensionsGL. It is not a useful class, it does not abstract anything.
It has similar functions to GraphicsContextGL subclass, and needs and uses GraphicsContextGL subclass
underneath.
It is a problematic class as it is obtained through a virtual function, but that
virtual function override is being called during construction of the GraphicsContextGL subclass
instance.
Also the ExtensionsGL will neccessarily call back to GraphicsContextGL subclass instance being
constructed.
Current getExtensions() virtual function override calls are expected to go
where the C++ defines them going during construction.
Current calls back to the GraphicsContextGL subclass instance during construction *should*
access state that is already initialized, but it is quite error-prone and hard to
analyze.

Move ExtensionsGL functions to GraphicsContextGL. Make call-sites call the context instead of the
extension helper. Rename the functions with pattern "isSupported" -> "isExtensionSupported".
Remove GraphicsContextGL::getExtensions() virtual function call.

For legacy contexts GraphicsContextGLOpenGL, GraphicsContextGLOpenGLES preserve their
ExtensionGLCommon subclasses. Accessing it happens from a normal function from legacy call sites
that know that they're calling GraphicsContextGLOpenGL.

For GraphicsContextGLANGLE, move context initialization code to GraphicsContextGLANGLE::initialize()
instead of the constructor. This way the initialization code can call virtual functions and the calls
are delivered normally to the last overrider.

RemoteGraphicsContextGLProxyBase can now be removed, as it is unneeded anyway and its added virtual
functions would cause inconvenient naming duplication.

No new tests, a refactor.

  • CMakeLists.txt:
  • Headers.cmake:
  • Modules/webxr/WebXROpaqueFramebuffer.cpp:

(WebCore::WebXROpaqueFramebuffer::startFrame):
(WebCore::WebXROpaqueFramebuffer::setupFramebuffer):

  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • html/canvas/ANGLEInstancedArrays.cpp:

(WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
(WebCore::ANGLEInstancedArrays::supported):

  • html/canvas/ANGLEInstancedArrays.h:
  • html/canvas/EXTColorBufferFloat.cpp:

(WebCore::EXTColorBufferFloat::EXTColorBufferFloat):
(WebCore::EXTColorBufferFloat::supported):

  • html/canvas/EXTColorBufferFloat.h:
  • html/canvas/EXTColorBufferHalfFloat.cpp:

(WebCore::EXTColorBufferHalfFloat::EXTColorBufferHalfFloat):
(WebCore::EXTColorBufferHalfFloat::supported):

  • html/canvas/EXTColorBufferHalfFloat.h:
  • html/canvas/EXTFloatBlend.cpp:

(WebCore::EXTFloatBlend::EXTFloatBlend):
(WebCore::EXTFloatBlend::supported):

  • html/canvas/EXTFloatBlend.h:
  • html/canvas/EXTTextureCompressionRGTC.cpp:

(WebCore::EXTTextureCompressionRGTC::EXTTextureCompressionRGTC):

  • html/canvas/KHRParallelShaderCompile.cpp:

(WebCore::KHRParallelShaderCompile::KHRParallelShaderCompile):
(WebCore::KHRParallelShaderCompile::supported):

  • html/canvas/KHRParallelShaderCompile.h:
  • html/canvas/OESFBORenderMipmap.cpp:

(WebCore::OESFBORenderMipmap::OESFBORenderMipmap):
(WebCore::OESFBORenderMipmap::supported):

  • html/canvas/OESFBORenderMipmap.h:
  • html/canvas/OESTextureFloat.cpp:

(WebCore::OESTextureFloat::OESTextureFloat):
(WebCore::OESTextureFloat::supported):

  • html/canvas/OESTextureFloat.h:
  • html/canvas/OESTextureHalfFloat.cpp:

(WebCore::OESTextureHalfFloat::OESTextureHalfFloat):
(WebCore::OESTextureHalfFloat::supported):

  • html/canvas/OESTextureHalfFloat.h:
  • html/canvas/OESVertexArrayObject.cpp:
  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::initializeShaderExtensions):
(WebCore::WebGL2RenderingContext::getExtension):
(WebCore::WebGL2RenderingContext::getSupportedExtensions):

  • html/canvas/WebGLColorBufferFloat.cpp:

(WebCore::WebGLColorBufferFloat::WebGLColorBufferFloat):
(WebCore::WebGLColorBufferFloat::supported):

  • html/canvas/WebGLColorBufferFloat.h:
  • html/canvas/WebGLCompressedTextureASTC.cpp:

(WebCore::WebGLCompressedTextureASTC::WebGLCompressedTextureASTC):
(WebCore::WebGLCompressedTextureASTC::supported):

  • html/canvas/WebGLCompressedTextureASTC.h:
  • html/canvas/WebGLCompressedTextureATC.cpp:

(WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC):
(WebCore::WebGLCompressedTextureATC::supported):

  • html/canvas/WebGLCompressedTextureATC.h:
  • html/canvas/WebGLCompressedTextureETC.cpp:

(WebCore::WebGLCompressedTextureETC::WebGLCompressedTextureETC):
(WebCore::WebGLCompressedTextureETC::supported):

  • html/canvas/WebGLCompressedTextureETC.h:
  • html/canvas/WebGLCompressedTextureETC1.cpp:

(WebCore::WebGLCompressedTextureETC1::WebGLCompressedTextureETC1):
(WebCore::WebGLCompressedTextureETC1::supported):

  • html/canvas/WebGLCompressedTextureETC1.h:
  • html/canvas/WebGLCompressedTexturePVRTC.cpp:

(WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
(WebCore::WebGLCompressedTexturePVRTC::supported):

  • html/canvas/WebGLCompressedTexturePVRTC.h:
  • html/canvas/WebGLCompressedTextureS3TC.cpp:

(WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC):
(WebCore::WebGLCompressedTextureS3TC::supported):

  • html/canvas/WebGLCompressedTextureS3TC.h:
  • html/canvas/WebGLCompressedTextureS3TCsRGB.cpp:

(WebCore::WebGLCompressedTextureS3TCsRGB::WebGLCompressedTextureS3TCsRGB):
(WebCore::WebGLCompressedTextureS3TCsRGB::supported):

  • html/canvas/WebGLCompressedTextureS3TCsRGB.h:
  • html/canvas/WebGLDebugShaders.cpp:

(WebCore::WebGLDebugShaders::WebGLDebugShaders):
(WebCore::WebGLDebugShaders::getTranslatedShaderSource):

  • html/canvas/WebGLDepthTexture.cpp:

(WebCore::WebGLDepthTexture::WebGLDepthTexture):
(WebCore::WebGLDepthTexture::supported):

  • html/canvas/WebGLDrawBuffers.cpp:

(WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
(WebCore::WebGLDrawBuffers::supported):
(WebCore::WebGLDrawBuffers::drawBuffersWEBGL):
(WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):

  • html/canvas/WebGLFramebuffer.cpp:

(WebCore::getClearBitsByAttachmentType):
(WebCore::getClearBitsByFormat):
(WebCore::WebGLFramebuffer::checkStatus const):
(WebCore::WebGLFramebuffer::drawBuffersIfNecessary):
(WebCore::WebGLFramebuffer::getDrawBuffer):

  • html/canvas/WebGLMultiDraw.cpp:

(WebCore::WebGLMultiDraw::WebGLMultiDraw):
(WebCore::WebGLMultiDraw::supported):

  • html/canvas/WebGLMultiDraw.h:
  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getSupportedExtensions):
(WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
(WebCore::WebGLRenderingContext::getMaxDrawBuffers):
(WebCore::WebGLRenderingContext::getMaxColorAttachments):
(WebCore::WebGLRenderingContext::validateBlendEquation):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::getChannelBitsByFormat):
(WebCore::possibleFormatAndTypeForInternalFormat):
(WebCore::WebGLRenderingContextBase::setupFlags):
(WebCore::WebGLRenderingContextBase::getParameter):
(WebCore::WebGLRenderingContextBase::getProgramParameter):
(WebCore::WebGLRenderingContextBase::getShaderParameter):
(WebCore::WebGLRenderingContextBase::getTexParameter):
(WebCore::WebGLRenderingContextBase::getUniform):
(WebCore::WebGLRenderingContextBase::hint):
(WebCore::WebGLRenderingContextBase::readPixels):
(WebCore::WebGLRenderingContextBase::renderbufferStorageImpl):
(WebCore::WebGLRenderingContextBase::validateTexFuncFormatAndType):
(WebCore::WebGLRenderingContextBase::texParameter):
(WebCore::WebGLRenderingContextBase::loseContextImpl):
(WebCore::WebGLRenderingContextBase::validateCompressedTexFuncData):
(WebCore::WebGLRenderingContextBase::validateCompressedTexDimensions):
(WebCore::WebGLRenderingContextBase::validateCompressedTexSubDimensions):
(WebCore::WebGLRenderingContextBase::maybeRestoreContext):
(WebCore::WebGLRenderingContextBase::getMaxDrawBuffers):
(WebCore::WebGLRenderingContextBase::getMaxColorAttachments):
(WebCore::WebGLRenderingContextBase::enableSupportedExtension):

  • html/canvas/WebGLVertexArrayObjectOES.cpp:
  • loader/FrameLoaderClient.h:
  • platform/graphics/ExtensionsGL.h: Removed.
  • platform/graphics/GraphicsContextGL.cpp:

(WebCore::GraphicsContextGL::computeFormatAndTypeParameters):

  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/RemoteGraphicsContextGLProxyBase.cpp:
  • platform/graphics/RemoteGraphicsContextGLProxyBase.h:
  • platform/graphics/angle/ExtensionsGLANGLE.cpp: Removed.
  • platform/graphics/angle/ExtensionsGLANGLE.h: Removed.
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::initialize):
(WebCore::GraphicsContextGLANGLE::platformInitializeContext):
(WebCore::GraphicsContextGLANGLE::platformInitialize):
(WebCore::GraphicsContextGLANGLE::texImage2D):
(WebCore::GraphicsContextGLANGLE::validateDepthStencil):
(WebCore::GraphicsContextGLANGLE::supportsExtension):
(WebCore::GraphicsContextGLANGLE::ensureExtensionEnabled):
(WebCore::GraphicsContextGLANGLE::isExtensionEnabled):
(WebCore::GraphicsContextGLANGLE::getGraphicsResetStatusARB):
(WebCore::GraphicsContextGLANGLE::getTranslatedShaderSourceANGLE):
(WebCore::GraphicsContextGLANGLE::drawBuffersEXT):
(WebCore::GraphicsContextGLANGLE::adjustWebGL1TextureInternalFormat):

  • platform/graphics/angle/GraphicsContextGLANGLE.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.h:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm:

(WebCore::GraphicsContextGLCocoa::create):
(WebCore::GraphicsContextGLCocoa::GraphicsContextGLCocoa):
(WebCore::GraphicsContextGLANGLE::GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLCocoa::platformInitializeContext):
(WebCore::GraphicsContextGLCocoa::platformInitialize):
(WebCore::GraphicsContextGLCocoa::reshapeDisplayBufferBacking):
(WebCore::GraphicsContextGLCocoa::allocateAndBindDisplayBufferBacking):
(WebCore::GraphicsContextGLCocoa::bindDisplayBufferBacking):
(WebCore::GraphicsContextGLCocoa::prepareForDisplay):

  • platform/graphics/cocoa/WebProcessGraphicsContextGLCocoa.mm:

(WebCore::createWebProcessGraphicsContextGL):

  • platform/graphics/opengl/ExtensionsGLOpenGL.cpp:

(WebCore::ExtensionsGLOpenGL::platformSupportsExtension):

  • platform/graphics/opengl/ExtensionsGLOpenGL.h:
  • platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp:

(WebCore::ExtensionsGLOpenGLCommon::supports):
(WebCore::ExtensionsGLOpenGLCommon::ensureEnabled):

  • platform/graphics/opengl/ExtensionsGLOpenGLCommon.h:
  • platform/graphics/opengl/ExtensionsGLOpenGLES.cpp:

(WebCore::ExtensionsGLOpenGLES::isEnabled):
(WebCore::ExtensionsGLOpenGLES::getGraphicsResetStatusARB):
(WebCore::ExtensionsGLOpenGLES::platformSupportsExtension):

  • platform/graphics/opengl/ExtensionsGLOpenGLES.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:

(WebCore::GraphicsContextGLOpenGL::getExtensions):
(WebCore::GraphicsContextGLOpenGL::validateDepthStencil):
(WebCore::GraphicsContextGLOpenGL::supportsExtension):
(WebCore::GraphicsContextGLOpenGL::ensureExtensionEnabled):
(WebCore::GraphicsContextGLOpenGL::isExtensionEnabled):
(WebCore::GraphicsContextGLOpenGL::getGraphicsResetStatusARB):
(WebCore::GraphicsContextGLOpenGL::drawBuffersEXT):
(WebCore::GraphicsContextGLOpenGL::getTranslatedShaderSourceANGLE):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp:

(WebCore::GraphicsContextGLOpenGL::texImage2D):
(WebCore::GraphicsContextGLOpenGL::getExtensions):

  • platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp:

(WebCore::GraphicsContextGLOpenGL::reshapeFBOs):
(WebCore::GraphicsContextGLOpenGL::validateAttributes):
(WebCore::GraphicsContextGLOpenGL::getExtensions):

  • platform/graphics/texmap/BitmapTextureGL.cpp:
  • platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:

(WebCore::GraphicsContextGLTextureMapper::create):
(WebCore::createWebProcessGraphicsContextGL):

  • platform/graphics/texmap/GraphicsContextGLTextureMapper.h:
  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLTextureMapper::prepareForDisplay):
(WebCore::GraphicsContextGLTextureMapper::reshapeDisplayBufferBacking):

  • platform/graphics/texmap/TextureMapperGL.cpp:

Source/WebKit:

Move the RemoteGraphicsContextGLProxyBase functions to
RemoteGraphicsContextGL. The ..Base can now be removed
as ExtensionGL is removed.

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-14
Reviewed by Dean Jackson.

  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::RemoteGraphicsContextGL::workQueueInitialize):
(WebKit::RemoteGraphicsContextGL::ensureExtensionEnabled):
(WebKit::RemoteGraphicsContextGL::markContextChanged):

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:
  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h:

(getGraphicsResetStatusARB):
(getTranslatedShaderSourceANGLE):
(drawBuffersEXT):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::RemoteGraphicsContextGLProxy):
(WebKit::RemoteGraphicsContextGLProxy::setContextVisibility):
(WebKit::RemoteGraphicsContextGLProxy::isGLES2Compliant const):
(WebKit::RemoteGraphicsContextGLProxy::markContextChanged):
(WebKit::RemoteGraphicsContextGLProxy::supportsExtension):
(WebKit::RemoteGraphicsContextGLProxy::ensureExtensionEnabled):
(WebKit::RemoteGraphicsContextGLProxy::isExtensionEnabled):
(WebKit::RemoteGraphicsContextGLProxy::initialize):
(WebKit::RemoteGraphicsContextGLProxy::reshape):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:

Tools:

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-14
Reviewed by Dean Jackson.

Update manually implemented functions.

  • Scripts/generate-gpup-webgl:
  • TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLCocoa.mm:
10:29 PM Changeset in webkit [289789] by Antti Koivisto
  • 8 edits in trunk

[CSS Container Queries] Support range operators in size queries
https://bugs.webkit.org/show_bug.cgi?id=236600

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/container-queries/size-feature-evaluation-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/unsupported-axis-expected.txt:

Source/WebCore:

Support (width > 100px) and similar.

  • css/ContainerQueryParser.cpp:

(WebCore::ContainerQueryParser::consumeSizeQuery):
(WebCore::ContainerQueryParser::consumeSizeFeature):

Factor into a function.
Add operator support. No reverse (100px < width) or full range (10px < width < 100px) yet.
The evaluator supports these already.

  • css/ContainerQueryParser.h:

LayoutTests:

7:55 PM Changeset in webkit [289788] by ysuzuki@apple.com
  • 3 edits in trunk/Source/bmalloc

[libpas] compact pointers should load payload via memcpy
https://bugs.webkit.org/show_bug.cgi?id=236621

Reviewed by Mark Lam.

ASan found that we are loading 8 bytes which can potentially be overflowed.
For example, we load this from a pointer to stack variable, which means that
we could cause stack overflow. Instead we should use memcpy.
Currently, we only support little endian code, but it is OK since libpas is not
enabled in non little endian architectures.

  • libpas/src/libpas/pas_compact_ptr.h:
  • libpas/src/libpas/pas_compact_tagged_ptr.h:
6:16 PM Changeset in webkit [289787] by rniwa@webkit.org
  • 2 edits in trunk/LayoutTests

REGRESSION (r288804): fast/forms/visual-hebrew-text-field.html is failing
https://bugs.webkit.org/show_bug.cgi?id=236325

Reviewed by Dean Jackson.

The test failure is caused by pre-existing inter-test dependencies.
Workaround whatever the underlying cause for the test failure by forcing
the use of ephemeral session for now.

  • fast/forms/visual-hebrew-text-field.html:
5:47 PM Changeset in webkit [289786] by jonlee@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed gardening.

Expand pixel range.

  • css3/color-filters/color-filter-color-text-decorations.html:
5:34 PM Changeset in webkit [289785] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Direct touches don't trigger other gesture recognizers if WKMouseGestureRecognizer sees them first
https://bugs.webkit.org/show_bug.cgi?id=236617

Reviewed by Wenson Hsieh.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView gestureRecognizer:shouldReceiveTouch:]):
WKMouseGestureRecognizer should only completely steal touches of type
UITouchTypeIndirectPointer. Other touch types (e.g. synthetic direct touches)
still need to trigger other WKContentViewInteraction gesture recognizers
(like long-press and double-tap) despite WKMouseGestureRecognizer
seeing their touches. So, check the touch type before early-returning.

5:05 PM Changeset in webkit [289784] by Jonathan Bedard
  • 2 edits in trunk/Tools

[EWS] Support PRs when sending build failure emails
https://bugs.webkit.org/show_bug.cgi?id=235926
<rdar://problem/88302122>

Reviewed by Aakash Jain.

  • Tools/CISupport/ews-build/steps.py:

(GitHub.email_for_owners): Convert list of owners to an email address.
(GitHubMixin.should_send_email_for_pr): Check if the tested sha is outdated.
(BugzillaMixin.should_send_email_for_patch): Renamed from should_send_email.
(BugzillaMixin.should_send_email): Renamed to should_send_email_for_patch.
(AnalyzeCompileWebKitResults.send_email_for_new_build_failure): Draft different
email for failed patch than failed pull request build.
(AnalyzeLayoutTestsResults.send_email_for_new_test_failures):

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

5:00 PM Changeset in webkit [289783] by Kocsen Chung
  • 1 copy in tags/Safari-613.1.17.0.2

Tag Safari-613.1.17.0.2.

4:59 PM Changeset in webkit [289782] by Kocsen Chung
  • 1 copy in tags/Safari-613.1.17.1.2

Tag Safari-613.1.17.1.2.

4:14 PM Changeset in webkit [289781] by Russell Epstein
  • 6 edits in branches/safari-614.1.3-branch/Source

Cherry-pick r289592. rdar://problem/88323950

tryReserveUncommittedAligned should explicitly take the alignment requested
https://bugs.webkit.org/show_bug.cgi?id=236460

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

When reducing the size of VA space reserved for Structures, we
didn't take care to ensure the alignment matched the required
alignment for our bit mask. To fix this we need to pass the
original alignment to the allocator as a new parameter.

  • heap/StructureAlignedMemoryAllocator.cpp: (JSC::StructureMemoryManager::StructureMemoryManager):

Source/WTF:

This patch adds a new ifdef for Unix flavors that support the
MAP_ALIGNED macro/parameter to mmap.

Also, fix a bug where on windows we wouldn't request enough
space to guarantee that allocation is aligned.

  • wtf/OSAllocator.h:
  • wtf/posix/OSAllocatorPOSIX.cpp: (WTF::OSAllocator::tryReserveUncommittedAligned):
  • wtf/win/OSAllocatorWin.cpp: (WTF::OSAllocator::tryReserveUncommittedAligned):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289592 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:14 PM Changeset in webkit [289780] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

Array#{ groupBy, groupByToMap } should throw a TypeError when this is null or undefined
https://bugs.webkit.org/show_bug.cgi?id=236541

Reviewed by Alexey Shvayka.

JSTests:

  • stress/array-group-by-null-or-undefined.js: Added.

(shouldThrow):

Source/JavaScriptCore:

While we are correctly using @toObject, these functions missed "use strict", which enforces a function
to change a non object |this| to an object (in this case, global object). This patch adds "use strict",
to make these function strict code.

  • builtins/ArrayPrototype.js:

(groupBy):
(groupByToMap):

4:09 PM Changeset in webkit [289779] by don.olmstead@sony.com
  • 4 edits in trunk/Source/JavaScriptCore

[CMake] Remove uses of add_definitions in JavaScriptCore build
https://bugs.webkit.org/show_bug.cgi?id=236605

Reviewed by Michael Catanzaro.

Use target specific definitions when building JavaScriptCore. In the current cases the
definitions don't need to propagate to targets using JavaScriptCore so
JavaScriptCore_PRIVATE_DEFINITIONS is used.

  • PlatformGTK.cmake:
  • PlatformPlayStation.cmake:
  • PlatformWPE.cmake:
4:05 PM Changeset in webkit [289778] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Move PDFDocument.cpp/h in correct position in WebCore.xcodeproj
https://bugs.webkit.org/show_bug.cgi?id=236529

Patch by Dan Glastonbury <djg@apple.com> on 2022-02-14
Reviewed by Tim Nguyen.

  • WebCore.xcodeproj/project.pbxproj:
3:59 PM Changeset in webkit [289777] by Cameron McCormack
  • 2 edits in trunk/Source/WebCore

Consistenly use hasTagName instead of is<> in HTMLStackItem testing functions
https://bugs.webkit.org/show_bug.cgi?id=236571

Reviewed by Sam Weinig.

No reason to use is<> for a couple of element names but hasTagName for
all others.

  • html/parser/HTMLElementStack.cpp:

(WebCore::HTMLNames::isScopeMarker):
(WebCore::HTMLNames::isTableScopeMarker):
(WebCore::HTMLNames::isSelectScopeMarker):

3:33 PM Changeset in webkit [289776] by Simon Fraser
  • 3 edits
    2 adds in trunk

Fix crash with deeply nested async overflow scroll
https://bugs.webkit.org/show_bug.cgi?id=236599
Source/WebCore:

rdar://88656665

Reviewed by Alan Bujtas.

mergeClippingScopesRecursive() already does the append of the rects; doing so
before calling recursing triggers double appends, hence exponentially growing
rect lists.

Test: compositing/layer-creation/clipping-scope/deeply-nested-overflow.html

  • rendering/LayerOverlapMap.cpp:

(WebCore::OverlapMapContainer::mergeClippingScopesRecursive):

LayoutTests:

Reviewed by Alan Bujtas.

  • compositing/layer-creation/clipping-scope/deeply-nested-overflow-expected.txt: Added.
  • compositing/layer-creation/clipping-scope/deeply-nested-overflow.html: Added.
3:33 PM Changeset in webkit [289775] by Adrian Perez de Castro
  • 3 edits in releases/WebKitGTK/webkit-2.34/Source/WebCore

Merge r288539 - Expand RefPtr / Ref use in FrameLoader
https://bugs.webkit.org/show_bug.cgi?id=235551
rdar://87986840

Reviewed by Mark Lam.

Apply Ref / RefPtr instead of taking SerializedScriptValue*.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadInSameDocument):
(WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):

  • loader/FrameLoader.h:
3:26 PM Changeset in webkit [289774] by Russell Epstein
  • 1 copy in tags/Safari-614.1.2.2

Tag Safari-614.1.2.2.

3:19 PM Changeset in webkit [289773] by Dewei Zhu
  • 17 edits in trunk/Tools/Scripts

Update shebang for run-benchmark scripts.

Reviewed by Jonathan Bedard.

Use python3 in shebang for run-benchmark.
Remove shebang from modules in benchmark_runner.

  • Tools/Scripts/run-benchmark:
  • Tools/Scripts/webkitpy/benchmark_runner/benchmark_builder.py:
  • Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
  • Tools/Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py:
  • Tools/Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver_factory.py:
  • Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py:
  • Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py:
  • Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:
  • Tools/Scripts/webkitpy/benchmark_runner/generic_factory.py:
  • Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:
  • Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver.py:
  • Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver_factory.py:
  • Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:
  • Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py:
  • Tools/Scripts/webkitpy/benchmark_runner/utils.py:
  • Tools/Scripts/webkitpy/benchmark_runner/webdriver_benchmark_runner.py:
  • Tools/Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py:

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

3:13 PM Changeset in webkit [289772] by Russell Epstein
  • 6 edits in branches/safari-614.1.2-branch/Source

Cherry-pick r289592. rdar://problem/88323950

tryReserveUncommittedAligned should explicitly take the alignment requested
https://bugs.webkit.org/show_bug.cgi?id=236460

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

When reducing the size of VA space reserved for Structures, we
didn't take care to ensure the alignment matched the required
alignment for our bit mask. To fix this we need to pass the
original alignment to the allocator as a new parameter.

  • heap/StructureAlignedMemoryAllocator.cpp: (JSC::StructureMemoryManager::StructureMemoryManager):

Source/WTF:

This patch adds a new ifdef for Unix flavors that support the
MAP_ALIGNED macro/parameter to mmap.

Also, fix a bug where on windows we wouldn't request enough
space to guarantee that allocation is aligned.

  • wtf/OSAllocator.h:
  • wtf/posix/OSAllocatorPOSIX.cpp: (WTF::OSAllocator::tryReserveUncommittedAligned):
  • wtf/win/OSAllocatorWin.cpp: (WTF::OSAllocator::tryReserveUncommittedAligned):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289592 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3:12 PM Changeset in webkit [289771] by Russell Epstein
  • 9 edits in branches/safari-614.1.2-branch/Source

Versioning.

WebKit-7614.1.2.2

2:59 PM Changeset in webkit [289770] by jonlee@apple.com
  • 4 edits in trunk

Enable accelerated drawing in the iOS simulator
https://bugs.webkit.org/show_bug.cgi?id=231828
rdar://problem/84315491

Reviewed by Simon Fraser.

Tools:

  • WebKitTestRunner/TestOptions.cpp:

(WTR::TestOptions::defaults):

LayoutTests:

  • platform/ios/compositing/canvas/accelerated-canvas-compositing-size-limit-expected.txt:
2:59 PM Changeset in webkit [289769] by Patrick Angle
  • 6 edits
    2 adds in trunk/Source/WebCore

Web Inspector: Element tooltips in overlays should use same encodable/decodable Label type as grid overlays
https://bugs.webkit.org/show_bug.cgi?id=235422

Reviewed by Devin Rousso.

The tooltip for elements previously used its own slightly different labels from those used for grid overlays,
which are implemented in such a way to support being sent to the UI process for iOS overlay support. This patch
adds support for the setting different colors for different runs of text along with multi-line labels to allow
the same label to be used for both Grid overlays as well as element tooltips.

The existing WebCore::InspectorOverlay::Highlight::GridHighlightOverlay::Label was moved to
WebCore::InspectorOverlayLabel as it is no longer exclusively used for grids.

With that support, we can now use InspectorOverlayLabel for element tooltips without needing duplicated layout
and drawing code. Additionally, the font used in the tooltip is now consistent with grid labels, where as
previously we used different font families for the grid and element labels.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::drawElementTitle):
(WebCore::InspectorOverlay::drawGridOverlay):
(WebCore::InspectorOverlay::buildGridOverlay):
(WebCore::fontForLayoutLabel): Moved to InspectorOverlayLabel.cpp as systemFont.
(WebCore::backgroundPathForLayoutLabel): Moved to InspectorOverlayLabel.cpp as backgroundPath.
(WebCore::expectedSizeForLayoutLabel): Moved to InspectorOverlayLabel.cpp as expectedSize.
(WebCore::drawLayoutLabel): Moved to InspectorOverlayLabel.cpp as draw.
(WebCore::buildLabel): Deleted.

  • inspector/InspectorOverlay.h:

(WebCore::InspectorOverlay::Highlight::GridHighlightOverlay::Label::encode const): Deleted.
(WebCore::InspectorOverlay::Highlight::GridHighlightOverlay::Label::decode): Deleted.

  • inspector/InspectorOverlayLabel.cpp: Added.

(WebCore::InspectorOverlayLabel::InspectorOverlayLabel):
(WebCore::systemFont):
(WebCore::backgroundPath):
(WebCore::InspectorOverlayLabel::draw):

  • Updated logic to handle multiple strings, including strings containing newlines. Strings are now each

converted to a TextRun, or multiple text runs for multi-line text, each of which is measured to determine the
overall height and width of the label, as well as to later in the drawing code give us the information necessary
to actually draw these strings in the proper locations.

  • Use the width of the longest line for drawing the background of the label.
  • Iterate through the computed TextRuns and draw the moving to the next line for each index that we had

previously computed to be the start of a new line.
(WebCore::InspectorOverlayLabel::expectedSize):

  • Similar to InspectorOverlayLabel::draw we need to take in to account multi-line strings, but do not need to

keep the computed TextRuns or their widths, only the width of the longest line and the total number of lines, to
compute the expected size of the contents in a label.

  • inspector/InspectorOverlayLabel.h: Added.

(WebCore::InspectorOverlayLabel::Arrow::Arrow):
(WebCore::InspectorOverlayLabel::encode const):
(WebCore::InspectorOverlayLabel::decode):
(WebCore::InspectorOverlayLabel::Arrow::encode const):
(WebCore::InspectorOverlayLabel::Arrow::decode):
(WebCore::InspectorOverlayLabel::Content::encode const):
(WebCore::InspectorOverlayLabel::Content::decode):

2:56 PM Changeset in webkit [289768] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[macOS] Check feature flag before using screen/window picker
https://bugs.webkit.org/show_bug.cgi?id=236596
<rdar://problem/88909015>

Reviewed by Jer Noble.

Tested manually.

  • platform/mediastream/mac/ScreenCaptureKitSharingSessionManager.mm:

(WebCore::screenCaptureKitPickerFeatureEnabled): Check feature flag.
(WebCore::ScreenCaptureKitSharingSessionManager::isAvailable):

2:48 PM Changeset in webkit [289767] by Said Abou-Hallawa
  • 4 edits in trunk/Source/WebCore

[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:
2:46 PM Changeset in webkit [289766] by Said Abou-Hallawa
  • 2 edits in trunk/Source/WebKit

[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:
2:22 PM Changeset in webkit [289765] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Mark imported/w3c/web-platform-tests/xhr/send-timeout-events.htm as failing on iOS aftet the changes in r289540
https://bugs.webkit.org/show_bug.cgi?id=231337

Unreviewed test gardening.

  • platform/ios/TestExpectations:
2:22 PM WebKitGTK/2.34.x edited by Gustavo Noronha Silva
Propose 16k pages for the stable branch (diff)
2:18 PM Changeset in webkit [289764] by Russell Epstein
  • 9 edits in trunk/Source

Versioning.

WebKit-7614.1.5

2:15 PM Changeset in webkit [289763] by Wenson Hsieh
  • 12 edits
    1 copy in trunk/Source

[Live Text] Plumb platform image analysis objects to the web process
https://bugs.webkit.org/show_bug.cgi?id=236535
rdar://88845367

Reviewed by Devin Rousso.

Source/WebCore:

Add a platformData member to TextRecognitionResult, which (when ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS) is
enabled) contains a pointer to VKCImageAnalysis. See WebKit/ChangeLog for more details.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/TextRecognitionResult.h:

Also add new WebKitAdditions extension points around TextRecognitionResult.

(WebCore::TextRecognitionResult::encode const):
(WebCore::TextRecognitionResult::decode):

  • platform/cocoa/TextRecognitionResultCocoa.mm:

Source/WebCore/PAL:

Add soft-linking support for VKCImageAnalysis. See WebCore and WebKit ChangeLogs for more detail.

  • pal/cocoa/AVFoundationSoftLink.h:

Avoid a build error after shifting around Cocoa unified sources, by removing an unused definition of
AVOutputContextOutputDevicesDidChangeNotification. This definition causes the unified build to break downstream,
when other media-related source files end up importing AVKit headers that try to reference this symbol
(AVOutputContextOutputDevicesDidChangeNotification) but end up expanding the WebKit soft-linking macro instead.

  • pal/cocoa/VisionKitCoreSoftLink.h:
  • pal/cocoa/VisionKitCoreSoftLink.mm:

Source/WebKit:

Plumb the platform text recognition results object (VKCImageAnalysis) through TextRecognitionResults to the
web process when computing text recognition results for Live Text, and add a few new WebKitAdditions extension
points. In a subsequent patch, we'll use this VKCImageAnalysis on TextRecognitionResults to refactor how we
write Live Text to the system pasteboard when copying.

  • Platform/cocoa/TextRecognitionUtilities.mm:

(WebKit::makeTextRecognitionResult):

Set platformData.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<RetainPtr<VKCImageAnalysis>>::encode):
(IPC::ArgumentCoder<RetainPtr<VKCImageAnalysis>>::decode):

  • Shared/WebCoreArgumentCoders.h:
1:51 PM Changeset in webkit [289762] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

REGRESSION(r286560): MediaElement's getStartDate returning an incorrect time
https://bugs.webkit.org/show_bug.cgi?id=236360
<rdar://problem/88786989>

Reviewed by Eric Carlson.

r286560 changed IDL Date to use WallTime instead of a raw double, meaning that
HTMLMediaElement::getStartDate now did extra processing of the MediaTime returned by
MediaPlayer::getStartDate.

Unfortunately, MediaPlayerPrivateAVFoundationObjC::getStartDate returned a MediaTime
represented in milliseconds (due to two * 1000), even though MediaTime is supposed to be
seconds-based.

As a result, the changes in r286560 inadvertently caused two * 1000 on the same time value.

Covered by existing test (LayoutTests/http/tests/media/hls/video-controller-getStartDate.html).
Note that the test was marked as [Pass Failure] before r286560.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::getStartDate const):

1:12 PM Changeset in webkit [289761] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

[Linux/aarch64] Move page size ceiling to 16k
https://bugs.webkit.org/show_bug.cgi?id=236564

Patch by Gustavo Noronha Silva <gustavo@noronha.dev.br> on 2022-02-14
Reviewed by Yusuke Suzuki.

On Apple Silicon, Linux needs to use 16k pages to be as fast as possible. This change has no
visible impact on binary size for release builds, so apply it to all of aarch64 Linux.

  • wtf/PageBlock.h:
1:10 PM Changeset in webkit [289760] by J Pascoe
  • 7 edits in trunk

[WebAuthn] Access group not set in add query for importLocalAuthenticatorCredential
https://bugs.webkit.org/show_bug.cgi?id=236469
rdar://problem/88783447

Reviewed by Brent Fulgham.

Source/WebKit:

In Bug 236311 we added support setting accessGroup, but did not properly set it
on the addQuery. This patch fixes that.

Updated API test to use non-standard accessGroup.

  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:

(+[_WKWebAuthenticationPanel importLocalAuthenticatorWithAccessGroup:credential:error:]):

Tools:

Updated API test to use non-standard access group.

  • TestWebKitAPI/Configurations/TestWebKitAPI-iOS.entitlements:
  • TestWebKitAPI/Configurations/TestWebKitAPI-macOS-internal.entitlements:
  • TestWebKitAPI/Configurations/TestWebKitAPI-macOS.entitlements:
  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST):

1:09 PM Changeset in webkit [289759] by Russell Epstein
  • 9 edits in branches/safari-614.1.3-branch/Source

Versioning.

WebKit-7614.1.3.1

1:09 PM Changeset in webkit [289758] by commit-queue@webkit.org
  • 4 edits
    3 copies
    1 move
    8 adds
    1 delete in trunk/LayoutTests

[GLIB] Update test expectations and baselines. Unreviewed test gardening.
https://bugs.webkit.org/show_bug.cgi?id=236597

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2022-02-14

  • platform/glib/TestExpectations:
  • platform/glib/imported/w3c/web-platform-tests/css/css-contain/container-queries/counters-flex-circular-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/css/filter-effects/feimage-circular-reference-foreign-object-crash-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/css/filter-effects/feimage-reference-foreign-object-crash-expected.txt: Added.
  • platform/gtk/TestExpectations:
  • platform/gtk/fast/text/international/bidi-layout-across-linebreak-expected.txt: Copied from LayoutTests/platform/glib/fast/text/international/bidi-layout-across-linebreak-expected.txt.
  • platform/gtk/fast/text/international/bidi-override-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: Copied from LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt.
  • platform/wpe/fast/text/international/bidi-layout-across-linebreak-expected.txt: Renamed from LayoutTests/platform/glib/fast/text/international/bidi-layout-across-linebreak-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt: Renamed from LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt.
1:05 PM Changeset in webkit [289757] by Razvan Caliman
  • 5 edits
    1 copy
    2 moves
    1 add in trunk/Source/WebInspectorUI

Web Inspector: [Flexbox] List flex containers in Layout sidebar
https://bugs.webkit.org/show_bug.cgi?id=235647
<rdar://87886241>

Reviewed by Patrick Angle.

The representation in the Layout details sidebar of the list of flex containers on the page is very similar to the one for grid containers:
a list of nodes identified by selector, with adjacent checkboxes that synchronize state with the visibility of a page overlay, interactive
color swatches to decorate the corresponding overlay, and a button to jump to the node in the DOM Tree view.

Therefore, it makes sense to generalize the code for CSS Grid and reuse it for Flexbox.

This patch extracts a generic WI.NodeOverlayListSection from WI.CSSGridNodeOverlayListSection.
This is subclassed by WI.CSSGridNodeOverlayListSection and WI.CSSFlexboxSection.
The two rely on the abstract implementations to show/hide overlays, get/set overlay colors, interrogate overlay visibility, and listen to generic overlay show events.

Which particular type of overlay is the target of each panel is determined in WI.OverlayManager
by the value of WI.DomNode.layoutContextType, either "flex" or "grid". A node cannot have more than one layout context type.

Where the subclasses differ:

  • each section has its own label (obviously).
  • the layout for WI.CSSGridNodeOverlayListSection includes a section with settings for the CSS Grid overlay.
  • Localizations/en.lproj/localizedStrings.js:

We've received feedback that the latter is more common in web developers' vocabulary when
refering to CSS grids. Adopted the same for the flexbox section empty message.

  • UserInterface/Main.html:
  • UserInterface/Views/CSSFlexNodeOverlayListSection.js: Added.

(WI.CSSFlexNodeOverlayListSection.prototype.get sectionLabel):
(WI.CSSFlexNodeOverlayListSection):

  • UserInterface/Views/CSSGridNodeOverlayListSection.js: Renamed from Source/WebInspectorUI/UserInterface/Views/CSSGridSection.js.

(WI.CSSGridNodeOverlayListSection.prototype.get sectionLabel):
(WI.CSSGridNodeOverlayListSection.prototype.initialLayout):
(WI.CSSGridNodeOverlayListSection):
The layout of WI.CSSFlexNodeOverlayListSection includes a set of options to configure the CSS Grid overlay.

  • UserInterface/Views/LayoutDetailsSidebarPanel.css:

(.details-section:is(.layout-css-flexbox, .layout-css-grid):not(.collapsed) > .content,):
(.details-section.layout-css-grid > .content > .group > .row > .css-grid-section): Deleted.
(.details-section.layout-css-grid:not(.collapsed) > .content,): Deleted.

  • UserInterface/Views/LayoutDetailsSidebarPanel.js:

(WI.LayoutDetailsSidebarPanel):
(WI.LayoutDetailsSidebarPanel.prototype.attached):
(WI.LayoutDetailsSidebarPanel.prototype.initialLayout):
(WI.LayoutDetailsSidebarPanel.prototype.layout):
(WI.LayoutDetailsSidebarPanel.prototype._handleLayoutContextTypeChanged):
(WI.LayoutDetailsSidebarPanel.prototype._refreshNodeSets):
(WI.LayoutDetailsSidebarPanel.prototype._refreshGridNodeSet): Deleted.
Added Flexbox section to Layout details sidebar.

  • UserInterface/Views/NodeOverlayListSection.css: Renamed from Source/WebInspectorUI/UserInterface/Views/CSSGridSection.css.

(.node-overlay-list-section):
(.node-overlay-list-section > .node-overlay-list):
(.node-overlay-list-section > .node-overlay-list > li > .node-overlay-list-item-container):
(.node-overlay-list-section > .node-overlay-list > li > .node-overlay-list-item-container > label):
(.node-overlay-list-section > .node-overlay-list > li > .node-overlay-list-item-container > label > .node-display-name):
(.node-overlay-list-section > .node-overlay-list > li > .node-overlay-list-item-container > :is(.go-to-arrow, .inline-swatch)):
(.node-overlay-list-section > .node-overlay-list > li > .node-overlay-list-item-container:not(:hover) > .go-to-arrow):
(.node-overlay-list-section > .heading,):
(.node-overlay-list-section > .heading > label > .toggle-all):
(.node-overlay-list-section :is(.setting-editor, .node-overlay-list-item-container, .heading) input[type="checkbox"]):
A full-on replacement of .css-grid-section with .node-overlay-list-section since the two sections share the same styles.

  • UserInterface/Views/NodeOverlayListSection.js: Copied from Source/WebInspectorUI/UserInterface/Views/CSSGridSection.js.

(WI.NodeOverlayListSection):
(WI.NodeOverlayListSection.prototype.set nodeSet):
(WI.NodeOverlayListSection.prototype.get sectionLabel):
(WI.NodeOverlayListSection.prototype.attached):
(WI.NodeOverlayListSection.prototype.detached):
(WI.NodeOverlayListSection.prototype.initialLayout):
(WI.NodeOverlayListSection.prototype.layout):
(WI.NodeOverlayListSection.prototype._handleOverlayStateChanged):
(WI.NodeOverlayListSection.prototype._handleToggleAllCheckboxChanged):
(WI.NodeOverlayListSection.prototype._updateToggleAllCheckbox):
Removed all the specific implementations for CSS Grid after generalizing them into WI.NodeOverlayListSection.

12:57 PM Changeset in webkit [289756] by Jonathan Bedard
  • 3 edits in trunk/Tools

[EWS] Rebase PRs on tip of branch (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=236389
<rdar://problem/88705147>

Reviewed by Aakash Jain.

  • Tools/CISupport/ews-build/steps.py:

(CleanGitRepo.run): Squash git rebase --abort errors.

  • CISupport/ews-build/steps_unittest.py:

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

12:49 PM Changeset in webkit [289755] by Russell Epstein
  • 4 edits
    2 adds in branches/safari-613-branch

Cherry-pick r289686. rdar://problem/88689388

contain:content breaks fullscreen
https://bugs.webkit.org/show_bug.cgi?id=236470
<rdar://88689388>

Reviewed by Simon Fraser.

Source/WebCore:

Paint/layout containment forms a containing block for fixed positioned block boxes. It makes all fixed
positioned descendants anchored (contained) to this layout container.
This patch enables fullscreen boxes break out of this non-ICB based layout scope (this is similar to what we
do for other, "layout scope changing" properties, see canContainFixedPositionObjects).

Test: fullscreen/fullscreen-prevented-by-containment.html

  • css/fullscreen.css: (:-webkit-full-screen-ancestor:not(iframe)):
  • css/parser/CSSParserContext.cpp: (WebCore::CSSParserContext::CSSParserContext):

LayoutTests:

  • fullscreen/fullscreen-prevented-by-containment-expected.txt: Added.
  • fullscreen/fullscreen-prevented-by-containment.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289686 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12:49 PM Changeset in webkit [289754] by Russell Epstein
  • 5 edits
    4 deletes in branches/safari-613-branch

Cherry-pick r289682. rdar://problem/88843567

Unreviewed, reverting r289498.
https://bugs.webkit.org/show_bug.cgi?id=236534

Speedometer2 2% regression

Reverted changeset:

"Dialog element only animates once"
https://bugs.webkit.org/show_bug.cgi?id=236274
https://commits.webkit.org/r289498

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289682 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12:49 PM Changeset in webkit [289753] by Russell Epstein
  • 5 edits in branches/safari-613-branch/Source

Cherry-pick r289658. rdar://problem/88678598

Regression(r287684) Microsoft teams meeting URLs fail to open the app
https://bugs.webkit.org/show_bug.cgi?id=236516
<rdar://88678598>

Reviewed by Geoffrey Garen.

Add a quirk for Microsoft teams.

Source/WebCore:

  • page/Quirks.cpp: (WebCore::Quirks::shouldAllowNavigationToCustomProtocolWithoutUserGesture):
  • page/Quirks.h:

Source/WebKit:

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::decidePolicyForNavigationAction):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289658 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12:29 PM Changeset in webkit [289752] by Fujii Hironori
  • 2 edits in trunk/Tools

run-jsc-stress-tests reports "in `<module:URI>': uninitialized class variable @@schemes in URI (NameError)" with Ruby 3.1
https://bugs.webkit.org/show_bug.cgi?id=236281

Reviewed by Yusuke Suzuki.

Ruby 3.1.0 removed @@schemes and added URI.register_scheme.

  • Scripts/run-jsc-stress-tests: Added register_scheme class

method if not exists. Use the register_scheme method for ssh.

12:12 PM Changeset in webkit [289751] by Peng Liu
  • 2 edits in trunk/Source/WebCore

Add a centerControlsBar in InlineMediaControls
https://bugs.webkit.org/show_bug.cgi?id=236575

Reviewed by Jer Noble.

When a subclass of InlineMediaControls implements _centerContainerButtons()
to return a list of elements, a control bar will be added as a child of the
media-controls element.

No behavior change so far.

  • Modules/modern-media-controls/controls/inline-media-controls.js:

(InlineMediaControls):
(InlineMediaControls.prototype.layout):
(InlineMediaControls.prototype._centerContainerButtons):

11:57 AM Changeset in webkit [289750] by Russell Epstein
  • 5 edits
    4 deletes in branches/safari-613.1.17.1-branch

Cherry-pick r289682. rdar://problem/88843567

Unreviewed, reverting r289498.
https://bugs.webkit.org/show_bug.cgi?id=236534

Speedometer2 2% regression

Reverted changeset:

"Dialog element only animates once"
https://bugs.webkit.org/show_bug.cgi?id=236274
https://commits.webkit.org/r289498

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289682 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:57 AM Changeset in webkit [289749] by Russell Epstein
  • 4 edits
    2 adds in branches/safari-613.1.17.1-branch

Cherry-pick r289686. rdar://problem/88689388

contain:content breaks fullscreen
https://bugs.webkit.org/show_bug.cgi?id=236470
<rdar://88689388>

Reviewed by Simon Fraser.

Source/WebCore:

Paint/layout containment forms a containing block for fixed positioned block boxes. It makes all fixed
positioned descendants anchored (contained) to this layout container.
This patch enables fullscreen boxes break out of this non-ICB based layout scope (this is similar to what we
do for other, "layout scope changing" properties, see canContainFixedPositionObjects).

Test: fullscreen/fullscreen-prevented-by-containment.html

  • css/fullscreen.css: (:-webkit-full-screen-ancestor:not(iframe)):
  • css/parser/CSSParserContext.cpp: (WebCore::CSSParserContext::CSSParserContext):

LayoutTests:

  • fullscreen/fullscreen-prevented-by-containment-expected.txt: Added.
  • fullscreen/fullscreen-prevented-by-containment.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289686 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:57 AM Changeset in webkit [289748] by Russell Epstein
  • 5 edits
    4 deletes in branches/safari-613.1.17.0-branch

Cherry-pick r289682. rdar://problem/88843567

Unreviewed, reverting r289498.
https://bugs.webkit.org/show_bug.cgi?id=236534

Speedometer2 2% regression

Reverted changeset:

"Dialog element only animates once"
https://bugs.webkit.org/show_bug.cgi?id=236274
https://commits.webkit.org/r289498

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289682 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:57 AM Changeset in webkit [289747] by Russell Epstein
  • 5 edits in branches/safari-613.1.17.1-branch/Source

Cherry-pick r289658. rdar://problem/88678598

Regression(r287684) Microsoft teams meeting URLs fail to open the app
https://bugs.webkit.org/show_bug.cgi?id=236516
<rdar://88678598>

Reviewed by Geoffrey Garen.

Add a quirk for Microsoft teams.

Source/WebCore:

  • page/Quirks.cpp: (WebCore::Quirks::shouldAllowNavigationToCustomProtocolWithoutUserGesture):
  • page/Quirks.h:

Source/WebKit:

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::decidePolicyForNavigationAction):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289658 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:57 AM Changeset in webkit [289746] by Russell Epstein
  • 4 edits
    2 adds in branches/safari-613.1.17.0-branch

Cherry-pick r289686. rdar://problem/88689388

contain:content breaks fullscreen
https://bugs.webkit.org/show_bug.cgi?id=236470
<rdar://88689388>

Reviewed by Simon Fraser.

Source/WebCore:

Paint/layout containment forms a containing block for fixed positioned block boxes. It makes all fixed
positioned descendants anchored (contained) to this layout container.
This patch enables fullscreen boxes break out of this non-ICB based layout scope (this is similar to what we
do for other, "layout scope changing" properties, see canContainFixedPositionObjects).

Test: fullscreen/fullscreen-prevented-by-containment.html

  • css/fullscreen.css: (:-webkit-full-screen-ancestor:not(iframe)):
  • css/parser/CSSParserContext.cpp: (WebCore::CSSParserContext::CSSParserContext):

LayoutTests:

  • fullscreen/fullscreen-prevented-by-containment-expected.txt: Added.
  • fullscreen/fullscreen-prevented-by-containment.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289686 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:57 AM Changeset in webkit [289745] by Russell Epstein
  • 5 edits in branches/safari-613.1.17.0-branch/Source

Cherry-pick r289658. rdar://problem/88678598

Regression(r287684) Microsoft teams meeting URLs fail to open the app
https://bugs.webkit.org/show_bug.cgi?id=236516
<rdar://88678598>

Reviewed by Geoffrey Garen.

Add a quirk for Microsoft teams.

Source/WebCore:

  • page/Quirks.cpp: (WebCore::Quirks::shouldAllowNavigationToCustomProtocolWithoutUserGesture):
  • page/Quirks.h:

Source/WebKit:

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::decidePolicyForNavigationAction):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289658 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:48 AM Changeset in webkit [289744] by Russell Epstein
  • 9 edits in branches/safari-613.1.17.1-branch/Source

Versioning.

WebKit-7613.1.17.1.2

11:29 AM Changeset in webkit [289743] by Russell Epstein
  • 9 edits in branches/safari-613.1.17.0-branch/Source

Versioning.

WebKit-7613.1.17.0.2

11:05 AM Changeset in webkit [289742] by Antti Koivisto
  • 16 edits
    1 copy
    1 add in trunk

[CSS Container Queries] Implement full query parser and evaluator
https://bugs.webkit.org/show_bug.cgi?id=236580

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/container-queries/at-container-parsing-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-for-shadow-dom.tentative-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-type-invalidation-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/query-evaluation-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/size-feature-evaluation-expected.txt:

Source/WebCore:

So far we have been using the media query parser to parse container queries.
It does not support nesting and other necessary features. Also the produced data
structures are awkward to evaluate.

https://drafts.csswg.org/css-contain-3/#container-rule

This patch supports size queries but not style queries. It supports both the current spec
size query syntax "size(foo)" (used in WPTs), and the non-function POR syntax from
https://github.com/w3c/csswg-drafts/issues/6870#issuecomment-1022430911.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/ContainerQuery.h:
  • css/ContainerQueryParser.cpp: Added.

(WebCore::ContainerQueryParser::parse):
(WebCore::ContainerQueryParser::consumeContainerQuery):
(WebCore::ContainerQueryParser::consumeCondition):
(WebCore::ContainerQueryParser::consumeSizeQuery):

No support for range operators ('<' etc) yet.

  • css/ContainerQueryParser.h: Copied from Source/WebCore/css/ContainerQuery.h.

(WebCore::ContainerQueryParser::ContainerQueryParser):

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::consumeContainerRule):

  • style/ContainerQueryEvaluator.cpp:

(WebCore::Style::computeSize):
(WebCore::Style::ContainerQueryEvaluator::evaluate const):
(WebCore::Style::ContainerQueryEvaluator::evaluateQuery const):
(WebCore::Style::ContainerQueryEvaluator::evaluateCondition const):
(WebCore::Style::ContainerQueryEvaluator::evaluateSizeFeature const):

Just 'width' and 'height' for now, no new size features yet.

  • style/ContainerQueryEvaluator.h:

LayoutTests:

10:47 AM Changeset in webkit [289741] by Russell Epstein
  • 1 copy in branches/safari-614.1.4-branch

New branch.

10:39 AM Changeset in webkit [289740] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

CallLinkInfo::emitFastPathImpl() should avoid external scratch register use on RISCV64
https://bugs.webkit.org/show_bug.cgi?id=236064

Patch by Zan Dobersek <zdobersek@igalia.com> on 2022-02-14
Reviewed by Yusuke Suzuki.

Avoid external scratch register usage in CallLinkInfo::emitFastPathImpl()
for RISCV64 since the scratch register ends up having to be used in the
branchTestPtr implementation of RISCV64's MacroAssembler.

The RISCV64-specific alternative is to suffer resolving and loading from
the callee address for both branching operations. Other platforms
continue to operate with the external scratch register as they either
use a wider set of scratch registers or don't even have to use scratch
registers for the load and branching operations used here.

  • assembler/CPU.h: Add isRISCV64(). Also impose a more sensible order.

(JSC::isMIPS):
(JSC::isRISCV64):

  • bytecode/CallLinkInfo.cpp:

(JSC::CallLinkInfo::emitFastPathImpl):

9:58 AM Changeset in webkit [289739] by J Pascoe
  • 7 edits in trunk/Source

[WebAuthn] Modify _WKWebAuthenticationAssertionResponse according to internal needs
https://bugs.webkit.org/show_bug.cgi?id=236369
rdar://88585811

Reviewed by Brent Fulgham.

Source/WebCore:

This patch modifies AuthenticatorAssertionResponse with additional
fields and populates them according to internal needs.

  • Modules/webauthn/AuthenticatorAssertionResponse.h:

(WebCore::AuthenticatorAssertionResponse::group const):
(WebCore::AuthenticatorAssertionResponse::synchronizable const):
(WebCore::AuthenticatorAssertionResponse::setGroup):
(WebCore::AuthenticatorAssertionResponse::setSynchronizable):

Source/WebKit:

This patch modifies the _WKWebAuthenticationAssertionResponse API object with additional
fields and populates them according to internal needs.

  • UIProcess/API/APIWebAuthenticationAssertionResponse.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponse.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponse.mm:

(-[_WKWebAuthenticationAssertionResponse synchronizable]):
(-[_WKWebAuthenticationAssertionResponse group]):

  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:

(groupForAttributes):
(WebKit::LocalAuthenticatorInternal::getExistingCredentials):

9:07 AM Changeset in webkit [289738] by ntim@apple.com
  • 7 edits in trunk

Don't perform layout in WKBundlePagePostSynchronousMessageForTesting
https://bugs.webkit.org/show_bug.cgi?id=236579

Reviewed by Brady Eidson.

This turned out to be a problem for bug 22722, which introduced the WithLayout::No workaround.

r188793 introduced this layoutIfNeeded call specifically for UI event messages, so only perform the
layout in that specific case. Also remove the workaround introduced in bug 22722.

Source/WebKit:

  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:

(WKBundlePagePostSynchronousMessageForTesting):
(WKBundlePageLayoutIfNeeded):
(WKBundlePagePostSynchronousMessageForTestingWithoutLayout): Deleted.

  • WebProcess/InjectedBundle/API/c/WKBundlePage.h:

Tools:

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.h:

(WTR::postSynchronousPageMessage):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::postSynchronousPageMessageWithReturnValue):
(WTR::TestRunner::grantWebNotificationPermission):
(WTR::TestRunner::denyWebNotificationPermission):

7:28 AM Changeset in webkit [289737] by Jonathan Bedard
  • 3 edits in trunk/Tools

[EWS] Re-enable build retry for PRs
https://bugs.webkit.org/show_bug.cgi?id=236300
<rdar://problem/88628832>

Reviewed by Aakash Jain.

  • Tools/CISupport/ews-build/steps.py:

(AnalyzeCompileWebKitResults.analyzeResults): Enable retry for PRs with failing builds.
(CleanGitRepo.run): Abort any failed rebases.

  • Tools/CISupport/ews-build/steps_unittest.py:

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

7:19 AM Changeset in webkit [289736] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Nullptr crash in CompositeEditCommand::splitTreeToNode via InsertParagraphSeparatorCommand::doApply
https://bugs.webkit.org/show_bug.cgi?id=229283

Patch by Frédéric Wang <fwang@igalia.com> on 2022-02-14
Reviewed by Ryosuke Niwa.

Source/WebCore:

Position::upstream handles edge cases like tables specially which can lead to
InsertParagraphSeparatorCommand::doApply incorrectly expecting a next sibling after a text
node at last position in order to perform a split. This patch works around that by ignoring
the split in that case.

Test: editing/inserting/insert-paragraph-separator-with-inline-table-bold-crash.html

  • editing/InsertParagraphSeparatorCommand.cpp:

(WebCore::InsertParagraphSeparatorCommand::doApply): Only try and remove remaining nodes if
splitTo is not null. moveRemainingSiblingsToNewParent will be a no-op when n is null. Also
switch from raw pointers to RefPtr<Node>.

LayoutTests:

Add regression test.

  • editing/inserting/insert-paragraph-separator-with-inline-table-bold-crash-expected.txt: Added.
  • editing/inserting/insert-paragraph-separator-with-inline-table-bold-crash.html: Added.
6:42 AM Changeset in webkit [289735] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Fix fast/inline/hidpi-outline-auto-with-border-radius-vertical-rtl.html
https://bugs.webkit.org/show_bug.cgi?id=236572

Reviewed by Antti Koivisto.

adjustVisualGeometryForDisplayBox needs the line's logical top (which is turned into visual inside
at (lineBoxLogicalTop + logicalRect.top())).

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h:
6:37 AM Changeset in webkit [289734] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Fix fast/block/float/float-with-fractional-height-vertical-lr.html
https://bugs.webkit.org/show_bug.cgi?id=236576

Reviewed by Antti Koivisto.

Let's translate the incoming float boxes' visual coordinates to logical for line layout.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::prepareFloatingState):

6:06 AM Changeset in webkit [289733] by graouts@webkit.org
  • 4 edits
    2 adds in trunk/LayoutTests

[model] refactor model document tests to use a shared testing function
https://bugs.webkit.org/show_bug.cgi?id=236578

Reviewed by Dean Jackson.

Add a new model_document_test function that both model document tests can use
to get the document loaded inside the iframe.

  • http/tests/model/model-document-interactive-expected.txt:
  • http/tests/model/model-document-interactive.html:
  • http/tests/model/model-document.html:
  • http/tests/model/resources/model-document.js: Added.

(const.model_document_test):

6:03 AM Changeset in webkit [289732] by Martin Robinson
  • 13 edits in trunk

Animation from "scale()" to "scale() translate()" does not yield the expected result
https://bugs.webkit.org/show_bug.cgi?id=222595
<rdar://problem/74926700>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-transforms/animation/list-interpolation-expected.txt: Mark tests as passing.
  • web-platform-tests/css/css-transforms/animation/transform-interpolation-001-expected.txt:
  • web-platform-tests/css/css-transforms/animation/transform-interpolation-003-expected.txt:

Source/WebCore:

No new tests. This is covered by existing WPT tests.

When blending two transform lists, where one list is longer than the other, extending the
shorter list with identity transform functions. This is the behavior specified in the
CSS Transforms Module Level 2 specification.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::checkForMatchingTransformFunctionLists): Instead of checking each frame
against the first keyframe, collect a list of shared transform primitives and check that each
list has the same number of compatible primitives or a prefix of compatible primitives and is
shorter.

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::getSharedPrimitivesForTransformKeyframes): When the transform operation
lists have different sizes, don't always return false. Instead check that the parts that do exist
have matching primitives.

  • platform/graphics/transforms/TransformOperations.cpp:

(WebCore::TransformOperations::operationsMatch const): Only check the transformations in
the shared list size.
(WebCore::TransformOperations::blendByMatchingOperations const): Properly handle when one of the
two operations is null instead of just the toOperation.

LayoutTests:

  • compositing/layer-creation/multiple-keyframes-animation-overlap-expected.txt:
  • compositing/layer-creation/translate-scale-animation-overlap-expected.txt:
5:04 AM Changeset in webkit [289731] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[GTK][WPE] Avoid mapping attributes when the vector is empty in createImage
https://bugs.webkit.org/show_bug.cgi?id=236521

Patch by Alejandro G. Castro <alex@igalia.com> on 2022-02-14
Reviewed by Žan Doberšek.

We are just refactoring the function to avoid calling the map of
the original vector in case it is empty. Also we changed a double
negative in the isEmpty condition to make it clearer.

No new tests, there are tests checking this code.

  • platform/graphics/egl/GLContextEGL.cpp:

(WebCore::GLContextEGL::createImage const):

4:20 AM Changeset in webkit [289730] by eocanha@igalia.com
  • 2 edits in trunk/Source/WebCore

Don't throw exception when controls are removed
https://bugs.webkit.org/show_bug.cgi?id=236456

Reviewed by Xabier Rodriguez-Calvar.

In mediaControlsBase.js, when media controls are removed, calling controlsAreHidden() can cause
an exception because the panel has no parentElement.

This patch is authored by Eugene Mutavchi <Ievgen_Mutavchi@comcast.com>
See: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/775

  • Modules/mediacontrols/mediaControlsBase.js: Return false if there's no parent.
3:29 AM Changeset in webkit [289729] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

[GTK] [WPE] Fix problem when the buffer object is released before we try to send it to the compositor
https://bugs.webkit.org/show_bug.cgi?id=236520

Patch by Alejandro G. Castro <alex@igalia.com> on 2022-02-14
Reviewed by Žan Doberšek.

There is a layout test failing because the buffer object was
released before the swap buffers method was called and we were
calling the construction of the TextureMapperPlatformLayerDmabuf
with wrong data.

Fixes webgl/1.0.3/conformance/context/context-release-with-workers.html.

  • platform/graphics/angle/GraphicsContextGLANGLE.h: Add the

isReleased function to the EGLImageBacking class.

  • platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp: Ditto.

(Nicosia::GCGLANGLELayer::swapBuffersIfNeeded):

  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::EGLImageBacking::isReleased):
Bail out when the image backing was released.

3:20 AM Changeset in webkit [289728] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebCore

[ATSPI] Reduce the size of dbus objects Vectors
https://bugs.webkit.org/show_bug.cgi?id=236581

Reviewed by Adrian Perez de Castro.

Use 3 for root, 1 for hyperlink and 7 for object.

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::registerObject):

  • accessibility/atspi/AccessibilityAtspi.h:

Feb 13, 2022:

11:30 PM Changeset in webkit [289727] by Fujii Hironori
  • 5 edits
    2 deletes in trunk/LayoutTests

Delete fast/animation/request-animation-frame-disabled.html after RequestAnimationFrameEnabled setting is deleted
https://bugs.webkit.org/show_bug.cgi?id=236569

Reviewed by Ryosuke Niwa.

r288797 (Bug 235866) deleted RequestAnimationFrameEnabled setting.
We no longer need fast/animation/request-animation-frame-disabled.html
which tests disabling the setting.

  • fast/animation/request-animation-frame-disabled-expected.txt: Removed.
  • fast/animation/request-animation-frame-disabled.html: Removed.
  • platform/gtk/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
10:22 PM Changeset in webkit [289726] by Lauro Moura
  • 9 edits in trunk/Source

Unreviewed, non-unified build fixes
https://bugs.webkit.org/show_bug.cgi?id=236577

Source/JavaScriptCore:

  • heap/StructureAlignedMemoryAllocator.cpp: Add missing include.

Source/WebCore:

  • Modules/notifications/NotificationEvent.cpp: Missing include.
  • platform/graphics/ContentTypeUtilities.cpp: Namespace function.

(WebCore::contentTypeMeetsContainerAndCodecTypeRequirements):

  • workers/service/ServiceWorkerGlobalScope.cpp: Missing include.

Source/WebKit:

  • UIProcess/Notifications/ServiceWorkerNotificationHandler.h: Forward

declare.

  • UIProcess/WebProcessProxy.cpp: Missing include.
9:22 PM Changeset in webkit [289725] by ysuzuki@apple.com
  • 2 edits in trunk/Source/bmalloc

Unreviewed, fix Linux build of libpas part 2
https://bugs.webkit.org/show_bug.cgi?id=235347

  • libpas/src/libpas/pas_thread_local_cache.c:

(stop_allocator):

9:14 PM Changeset in webkit [289724] by ysuzuki@apple.com
  • 7 edits in trunk/Source/bmalloc

Unreviewed, fix Linux build of libpas
https://bugs.webkit.org/show_bug.cgi?id=235347

  • libpas/src/libpas/pas_committed_pages_vector.c:

(pas_committed_pages_vector_construct):

  • libpas/src/libpas/pas_committed_pages_vector.h:

(pas_committed_pages_vector_is_committed):

  • libpas/src/libpas/pas_local_view_cache.h:

(pas_local_view_cache_prepare_to_pop):

  • libpas/src/libpas/pas_segregated_heap.c:

(pas_segregated_heap_ensure_allocator_index):

  • libpas/src/libpas/pas_thread_local_cache.c:

(stop_allocator):

  • libpas/src/libpas/pas_try_allocate_primitive.h:

(pas_try_allocate_primitive_impl_casual_case):

7:49 PM Changeset in webkit [289723] by Andres Gonzalez
  • 4 edits in trunk/Source/WebCore

Decouple AXObjectCache handleChildrenChanged and postNotification.
https://bugs.webkit.org/show_bug.cgi?id=234059
<rdar://problem/86247404>

Reviewed by Chris Fleizach.

This fixes ~7 accessibility tests in isolated tree mode.
Also fixes flakiness in accessibility/dialog-showModal.html.

AXObjectCache::handleChildrenChanged was posting an AXChildrenChanged
notification (postNotification), which causes a double deferral of these
notifications, instead of actually handling the notification.
ChildrenChanged notifications should be handled before many other
notifications of property changes since they are DOM mutations, objects
added or removed, before properties in the resulting objects may be
updated. This patch fixes this problem by making handleChildrenChanged
to actually handle the notifications and update the isolated tree.
In addition, handling of the "open" attribute for <dialog> elements now
updates children, which fixes the flakiness observed in the
dialog-showModal.html test.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::handleChildrenChanged):
(WebCore::AXObjectCache::notificationPostTimerFired):
(WebCore::AXObjectCache::deferModalChange):
(WebCore::AXObjectCache::handleAttributeChange):
(WebCore::AXObjectCache::performCacheUpdateTimerFired):

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::collectNodeChangesForSubtree):
Removed alternative fix where we were processing the pending
ChildrenChanged Notifications before updating the isolated tree.

  • accessibility/isolatedtree/AXIsolatedTree.h:
5:52 PM Changeset in webkit [289722] by commit-queue@webkit.org
  • 25 edits
    4 adds
    2 deletes in trunk

Add support for parsing 'subgrid' in grid-template-columns/row
https://bugs.webkit.org/show_bug.cgi?id=236054

Patch by Matt Woodrow <Matt Woodrow> on 2022-02-13
Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Imported lastest subgrid tests.

  • web-platform-tests/css/css-grid/subgrid/grid-template-computed-nogrid-expected.txt:
  • web-platform-tests/css/css-grid/subgrid/grid-template-computed-nogrid.html:
  • web-platform-tests/css/css-grid/subgrid/grid-template-invalid-expected.txt: Added.
  • web-platform-tests/css/css-grid/subgrid/grid-template-invalid.html:
  • web-platform-tests/css/css-grid/subgrid/grid-template-valid-expected.txt: Added.
  • web-platform-tests/css/css-grid/subgrid/grid-template-valid.html:

Source/WebCore:

Adds support for parsing the 'subgrid' keyword followed by a list of line names for
grid-template-columns/rows.
Adds a new CSSSubgridValue wrapper around CSSValueList to represent this.
Also adds support for converting this into style data in StyleBuilderConverter, and serializing
the specified value for computed value (used when the element specified subgrid but doesn't
have an appropriate grid parent).

Tests: imported/w3c/web-platform-tests/css/css-grid/subgrid/grid-template-invalid.html

imported/w3c/web-platform-tests/css/css-grid/subgrid/grid-template-valid.html

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::OrderedNamedLinesCollector::namedGridLineCount const):
(WebCore::addValuesForNamedGridLinesAtIndex):
(WebCore::populateSubgridLineNameList):
(WebCore::valueForGridTrackList):

  • css/CSSSubgridValue.cpp: Added.

(WebCore::CSSSubgridValue::customCSSText const):
(WebCore::CSSSubgridValue::CSSSubgridValue):

  • css/CSSSubgridValue.h: Added.
  • css/CSSValue.cpp:

(WebCore::CSSValue::equals const):
(WebCore::CSSValue::cssText const):
(WebCore::CSSValue::destroy):

  • css/CSSValue.h:

(WebCore::CSSValue::isSubgridValue const):

  • css/CSSValueKeywords.in:
  • css/parser/CSSParserContext.cpp:

(WebCore::operator==):
(WebCore::add):

  • css/parser/CSSParserContext.h:
  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeGridLineNames):
(WebCore::consumeSubgridNameRepeatFunction):
(WebCore::consumeGridTrackList):
(WebCore::consumeGridTemplatesRowsOrColumns):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::consumeGridTemplateRowsAndAreasAndColumns):
(WebCore::CSSPropertyParser::consumeGridTemplateShorthand):
(WebCore::CSSPropertyParser::consumeGridShorthand):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::gridSubgridRows const):
(WebCore::RenderStyle::gridSubgridColumns const):
(WebCore::RenderStyle::setGridSubgridRows):
(WebCore::RenderStyle::setGridSubgridColumns):

  • rendering/style/StyleGridData.cpp:

(WebCore::StyleGridData::StyleGridData):

  • rendering/style/StyleGridData.h:

(WebCore::StyleGridData::operator== const):

  • style/StyleBuilderConverter.h:

(WebCore::Style::createGridLineNamesList):
(WebCore::Style::BuilderConverter::createGridTrackList):

  • style/StyleBuilderCustom.h:

Source/WTF:

Adds a new experimental preference for subgrid support, disabled by default.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

LayoutTests:

Updated TestExpectations to list all the subgrid tests individually, now that we pass a few.

  • TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/css/css-grid/subgrid/grid-template-computed-nogrid-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-grid/subgrid/grid-template-computed-nogrid-expected.txt: Removed.
5:09 PM Changeset in webkit [289721] by beidson@apple.com
  • 72 edits
    1 copy
    6 adds in trunk

Implement ServiceWorkerRegistration.showNotification()
https://bugs.webkit.org/show_bug.cgi?id=22722

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/notifications/idlharness.https.any-expected.txt:
  • web-platform-tests/notifications/idlharness.https.any.serviceworker-expected.txt:

Source/WebCore:

Tests: http/tests/workers/service/shownotification-allowed.html

http/tests/workers/service/shownotification-denied.html

Previously ServiceWorkerRegistration.showNotification(), NotificationEvent, and onnotificationclicked/closed were stubbed out.
This patch hooks them up.

It's largely a plumbing patch, doing the following:

  • Making sure calls to-and-from NotificationClient happen on the correct threads
  • Making sure Notification related classes now understand how to cope with not having an associated WebPage(Proxy)
  • Making sure all of the relevant IPC machinery is in place to handle pageless notifications
  • Adds super useful logging
  • Modules/notifications/Notification.cpp:

(WebCore::Notification::show):
(WebCore::Notification::dispatchShowEvent):
(WebCore::Notification::dispatchClickEvent):
(WebCore::Notification::dispatchCloseEvent):

  • Modules/notifications/NotificationEvent.cpp:

(WebCore::NotificationEvent::create):
(WebCore::NotificationEvent::NotificationEvent):

  • Modules/notifications/NotificationEvent.h:
  • dom/EmptyScriptExecutionContext.h:
  • dom/ScriptExecutionContext.h:
  • page/RuntimeEnabledFeatures.h:
  • workers/WorkerOrWorkletGlobalScope.h:
  • workers/WorkerThread.h:
  • workers/service/ServiceWorkerGlobalScope.cpp:

(WebCore::ServiceWorkerGlobalScope::~ServiceWorkerGlobalScope):
(WebCore::ServiceWorkerGlobalScope::postTaskToFireNotificationEvent):

  • workers/service/ServiceWorkerGlobalScope.h:
  • workers/service/ServiceWorkerRegistration.cpp:

(WebCore::ServiceWorkerRegistration::showNotification):
(WebCore::ServiceWorkerRegistration::getNotifications):

  • workers/service/context/SWContextManager.h:
  • workers/service/context/ServiceWorkerThread.cpp:

(WebCore::ServiceWorkerThread::start):

  • workers/service/context/ServiceWorkerThreadProxy.h:
  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::registrationStoreDatabaseFailedToOpen):
(WebCore::SWServer::addRegistrationFromStore):
(WebCore::SWServer::addRegistration):
(WebCore::SWServer::processPushMessage):

Source/WebKit:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::getPendingPushMessages):
(WebKit::NetworkProcess::processPushMessage):

  • NetworkProcess/Notifications/NetworkNotificationManager.cpp:

(WebKit::NetworkNotificationManager::getPendingPushMessages):
(WebKit::NetworkNotificationManager::showNotification):

  • NetworkProcess/Notifications/NetworkNotificationManager.h:
  • Platform/Logging.h:
  • Shared/Notifications/NotificationManagerMessageHandler.h:
  • Shared/Notifications/NotificationManagerMessageHandler.messages.in:
  • Sources.txt:
  • UIProcess/API/APINotificationProvider.h:

(API::NotificationProvider::show):

  • UIProcess/API/C/WKNotificationManager.cpp:

(WKNotificationManagerGetSharedServiceWorkerNotificationManager):

  • UIProcess/API/C/WKNotificationManager.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(+[WKWebsiteDataStore _sharedServiceWorkerNotificationManager]):
(-[WKWebsiteDataStore _getPendingPushMessages:]):
(-[WKWebsiteDataStore _processPushMessage:completionHandler:]):

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/API/glib/WebKitNotificationProvider.cpp:

(WebKitNotificationProvider::show):

  • UIProcess/API/glib/WebKitNotificationProvider.h:
  • UIProcess/Notifications/ServiceWorkerNotificationHandler.cpp: Added.

(WebKit::ServiceWorkerNotificationHandler::singleton):
(WebKit::ServiceWorkerNotificationHandler::ServiceWorkerNotificationHandler):
(WebKit::ServiceWorkerNotificationHandler::requestSystemNotificationPermission):
(WebKit::ServiceWorkerNotificationHandler::dataStoreForNotificationID):
(WebKit::ServiceWorkerNotificationHandler::showNotification):
(WebKit::ServiceWorkerNotificationHandler::cancelNotification):
(WebKit::ServiceWorkerNotificationHandler::clearNotifications):
(WebKit::ServiceWorkerNotificationHandler::didDestroyNotification):

  • UIProcess/Notifications/ServiceWorkerNotificationHandler.h: Copied from Source/WebKit/UIProcess/Notifications/WebNotificationManagerMessageHandler.h.
  • UIProcess/Notifications/WebNotification.cpp:

(WebKit::WebNotification::WebNotification):

  • UIProcess/Notifications/WebNotification.h:

(WebKit::WebNotification::create):
(WebKit::WebNotification::sourceConnection const):

  • UIProcess/Notifications/WebNotificationManagerMessageHandler.cpp:

(WebKit::WebNotificationManagerMessageHandler::showNotification):

  • UIProcess/Notifications/WebNotificationManagerMessageHandler.h:
  • UIProcess/Notifications/WebNotificationManagerProxy.cpp:

(WebKit::WebNotificationManagerProxy::sharedServiceWorkerManager):
(WebKit::identifierForPagePointer):
(WebKit::WebNotificationManagerProxy::show):
(WebKit::WebNotificationManagerProxy::cancel):
(WebKit::WebNotificationManagerProxy::didDestroyNotification):
(WebKit::WebNotificationManagerProxy::clearNotifications):
(WebKit::WebNotificationManagerProxy::providerDidShowNotification):
(WebKit::dispatchDidClickNotification):
(WebKit::WebNotificationManagerProxy::providerDidClickNotification):
(WebKit::WebNotificationManagerProxy::providerDidCloseNotifications):
(WebKit::WebNotificationManagerProxy::providerDidUpdateNotificationPolicy):
(WebKit::WebNotificationManagerProxy::providerDidRemoveNotificationPolicies):
(WebKit::pageIDsMatch): Deleted.
(WebKit::pageAndNotificationIDsMatch): Deleted.

  • UIProcess/Notifications/WebNotificationManagerProxy.h:
  • UIProcess/Notifications/WebNotificationProvider.cpp:

(WebKit::WebNotificationProvider::show):

  • UIProcess/Notifications/WebNotificationProvider.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::showNotification):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::establishServiceWorkerContextConnectionToNetworkProcess):

  • UIProcess/WebProcessPool.h:

(WebKit::WebProcessPool::sendToAllRemoteWorkerProcesses):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::disableRemoteWorkers):
(WebKit::WebProcessProxy::enableRemoteWorkers):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::showServiceWorkerNotification):
(WebKit::WebsiteDataStore::cancelServiceWorkerNotification):
(WebKit::WebsiteDataStore::clearServiceWorkerNotification):
(WebKit::WebsiteDataStore::didDestroyServiceWorkerNotification):

  • UIProcess/WebsiteData/WebsiteDataStore.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Notifications/WebNotificationManager.cpp:

(WebKit::WebNotificationManager::sendNotificationMessage):
(WebKit::WebNotificationManager::show):
(WebKit::WebNotificationManager::cancel):
(WebKit::WebNotificationManager::didDestroyNotification):
(WebKit::WebNotificationManager::didShowNotification):
(WebKit::WebNotificationManager::didClickNotification):
(WebKit::WebNotificationManager::didCloseNotifications):
(WebKit::sendNotificationMessage): Deleted.

  • WebProcess/Notifications/WebNotificationManager.h:
  • WebProcess/Storage/WebSWContextManagerConnection.h:
  • WebProcess/WebCoreSupport/WebNotificationClient.cpp:

(WebKit::WebNotificationClient::WebNotificationClient):
(WebKit::WebNotificationClient::~WebNotificationClient):
(WebKit::WebNotificationClient::show):
(WebKit::WebNotificationClient::cancel):
(WebKit::WebNotificationClient::notificationObjectDestroyed):
(WebKit::WebNotificationClient::notificationControllerDestroyed):
(WebKit::WebNotificationClient::requestPermission):
(WebKit::WebNotificationClient::checkPermission):

Source/WTF:

  • Scripts/Preferences/WebPreferencesInternal.yaml:

Tools:

To reliably support testing ServiceWorker notifications, TestRunner needed to actually grant/deny permissions in the UI process
like a proper NotificationProvider would.

It also has to understand showing a notification without an associated WKPage.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::postSimulateWebNotificationClickForServiceWorkerNotifications):

  • WebKitTestRunner/InjectedBundle/InjectedBundle.h:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::grantWebNotificationPermission):
(WTR::TestRunner::denyWebNotificationPermission):
(WTR::TestRunner::simulateWebNotificationClickForServiceWorkerNotifications):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::generatePageConfiguration):
(WTR::TestController::grantNotificationPermission):
(WTR::TestController::denyNotificationPermission):
(WTR::TestController::simulateWebNotificationClickForServiceWorkerNotifications):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

  • WebKitTestRunner/WebNotificationProvider.cpp:

(WTR::WebNotificationProvider::WebNotificationProvider):
(WTR::notificationManagerForPage):
(WTR::WebNotificationProvider::showWebNotification):
(WTR::WebNotificationProvider::addNotificationManager):
(WTR::WebNotificationProvider::notificationPermissions):
(WTR::WebNotificationProvider::setPermission):
(WTR::WebNotificationProvider::simulateWebNotificationClickForServiceWorkerNotifications):
(WTR::WebNotificationProvider::reset):

  • WebKitTestRunner/WebNotificationProvider.h:

LayoutTests:

Test a ServiceWorker showing a notification both when it's allowed and when it's denied.

  • http/tests/workers/service/resources/shownotification-worker.js: Added.

(async const):
(let.messageClients):
(async event):

  • http/tests/workers/service/shownotification-allowed-expected.txt: Added.
  • http/tests/workers/service/shownotification-allowed.html: Added.
  • http/tests/workers/service/shownotification-denied-expected.txt: Added.
  • http/tests/workers/service/shownotification-denied.html: Added.
1:07 PM Changeset in webkit [289720] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix the internal macOS build

Add some missing WebCore namespaces (which are presumably now necessary due to changes in unified source
groupings).

  • UIProcess/mac/DisplayCaptureSessionManager.mm:

(WebKit::alertForWindowSelection):
(WebKit::DisplayCaptureSessionManager::deviceSelectedForTesting):
(WebKit::DisplayCaptureSessionManager::showWindowPicker):
(WebKit::DisplayCaptureSessionManager::showScreenPicker):
(WebKit::DisplayCaptureSessionManager::isAvailable):

12:48 PM Changeset in webkit [289719] by Andres Gonzalez
  • 5 edits in trunk/LayoutTests

Fix for accessibility/image-map1.html in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=236565
<rdar://problem/88874467>

Reviewed by Darin Adler.

Don't use focus manipulation just to retrieve an accessible element,
instead use accessibilityElementById. Updated the outdated code in this
test.

  • accessibility/image-map1-expected.txt:
  • accessibility/image-map1.html:
  • platform/glib/accessibility/image-map1-expected.txt:
  • platform/win/accessibility/image-map1-expected.txt:
12:26 PM Changeset in webkit [289718] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Add comment on how StructureMemoryManager grows the free list when there are no free blocks.
https://bugs.webkit.org/show_bug.cgi?id=236568

Reviewed by Saam Barati.

Also, use uint8_t* rather than rely on the fact that sizeof(MarkedBlock) == 1.

  • heap/StructureAlignedMemoryAllocator.cpp:

(JSC::StructureMemoryManager::tryMallocStructureBlock):

12:22 PM Changeset in webkit [289717] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Make StructureMemoryManager alignment assert a RELEASE_ASSERT
https://bugs.webkit.org/show_bug.cgi?id=236567

Reviewed by Saam Barati.

Also, check the structure base pointer is non-zero.

  • heap/StructureAlignedMemoryAllocator.cpp:

(JSC::StructureMemoryManager::StructureMemoryManager):

10:06 AM Changeset in webkit [289716] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Not all atomic inline level boxes need ideographic baseline when in vertical writing mode
https://bugs.webkit.org/show_bug.cgi?id=236556

Reviewed by Antti Koivisto.

Replaced boxes and orthogonal inline-block containers should use ideographic type of baseline.
(e.g. can't sync baselines coming from orthogonal inline-blocks.)

  • layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:

(WebCore::Layout::LineBoxBuilder::adjustIdeographicBaselineIfApplicable):

9:53 AM Changeset in webkit [289715] by Lauro Moura
  • 2 edits in trunk/Source/WebCore

Unreviewed, gtk buildfix after r289706
https://bugs.webkit.org/show_bug.cgi?id=236563

  • Headers.cmake:
9:41 AM Changeset in webkit [289714] by Alan Bujtas
  • 5 edits in trunk

[LFC][IFC] Take writing direction into account when setting up the root geometry
https://bugs.webkit.org/show_bug.cgi?id=236548

Reviewed by Antti Koivisto.

Source/WebCore:

This fixes cases when the root block container itself is in a vertical writing context.
<div style="writing-mode: vertical-rl">

<div style="display: inline-block; padding: 10px">vertical content</div>

</div>

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::updateFormattingRootGeometryAndInvalidate):

LayoutTests:

  • platform/mac/fast/text/international/bidi-layout-across-linebreak-expected.txt: Progressions.
  • platform/mac/fast/text/international/bidi-override-expected.txt:
8:00 AM Changeset in webkit [289713] by Andres Gonzalez
  • 6 edits
    2 adds in trunk

Expose the correct role, subrole and role description properties for the <dialog> element.
https://bugs.webkit.org/show_bug.cgi?id=236359

Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/dialog-properties.html

Elements with role="dialog" are exposed to accessibility clients with
role AXGroup, subrole AXApplicationDialog and role description
"web dialog". This patch implements this behavior for the <dialog>
element.

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::determineAccessibilityRoleFromNode const):

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::defaultObjectInclusion const):

LayoutTests:

Tests that these AX properties have the expected values both when the
dialog is shown modal or modeless.

  • accessibility/dialog-properties-expected.txt: Added.
  • accessibility/dialog-properties.html: Added.
6:56 AM Changeset in webkit [289712] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][Integration] Introduce Box::ElementType::IntegrationInlineBlock
https://bugs.webkit.org/show_bug.cgi?id=236554

Reviewed by Antti Koivisto.

This is in preparation for adding vertical baseline support for inline-block boxes with alphabetic baseline.
The integration tree builder constructs Replaced layout boxes for both inline-block and replaced types.
In LineBoxBuilder we need to be able to tell whether a particular inline level box is really a replaced
box or just an inline-block in order to assign the correct type of baseline (alphabetic/ideographic).

  • layout/integration/LayoutIntegrationBoxTree.cpp:

(WebCore::LayoutIntegration::BoxTree::BoxTree):
(WebCore::LayoutIntegration::BoxTree::buildTree):

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::Box): Let's use the ElementType for the integration root too.

  • layout/layouttree/LayoutBox.h:

(WebCore::Layout::Box::isIntegrationBlockContainer const):
(WebCore::Layout::Box::isIntegrationInlineBlock const):
(WebCore::Layout::Box::setIsAnonymous):
(WebCore::Layout::Box::setIsIntegrationBlockContainer): Deleted.

6:55 AM Changeset in webkit [289711] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Pass in the correct LineDirectionMode value to RenderBoxModelObject::baselinePosition
https://bugs.webkit.org/show_bug.cgi?id=236552

Reviewed by Antti Koivisto.

This is when setting up the BoxGeometry for the atomic inline level boxes.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::updateLayoutBoxDimensions):

6:53 AM Changeset in webkit [289710] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Add missing bidi vertical adjustment when writing mode is not horizontal
https://bugs.webkit.org/show_bug.cgi?id=236551

Reviewed by Antti Koivisto.

Last 2 missing vertical adjustments.

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

6:48 AM Changeset in webkit [289709] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Baseline value is always logical
https://bugs.webkit.org/show_bug.cgi?id=236549

Reviewed by Antti Koivisto.

Callers expect the baseline value to be always logical.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::firstLineBaseline const):
(WebCore::LayoutIntegration::LineLayout::lastLineBaseline const):

6:39 AM Changeset in webkit [289708] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix build when ATSPI is disabled

  • platform/graphics/PlatformDisplay.cpp: The ATK code also makes use of GUniqueOutPtr, so

include the corresponding header.

6:38 AM Changeset in webkit [289707] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Take writing mode value into account setting vertical margin
https://bugs.webkit.org/show_bug.cgi?id=236538

Reviewed by Antti Koivisto.

Line layout works with logical values.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::horizontalLogicalMargin):
(WebCore::LayoutIntegration::verticalLogicalMargin):
(WebCore::LayoutIntegration::LineLayout::updateLayoutBoxDimensions):
(WebCore::LayoutIntegration::LineLayout::updateInlineBoxDimensions):
(WebCore::LayoutIntegration::logicalMargin): Deleted.

4:21 AM Changeset in webkit [289706] by Antti Koivisto
  • 10 edits
    1 add in trunk/Source/WebCore

[CSS Container Queries] Add separate ContainerQuery and FilteredContainerQuery types
https://bugs.webkit.org/show_bug.cgi?id=236515

Reviewed by Alan Bujtas.

ContainerQuery is just a type alias to MediaQuerySet for now.
FilteredContainerQuery is a ContainerQuery plus name filter (type filter coming later).

  • WebCore.xcodeproj/project.pbxproj:
  • css/ContainerQuery.h: Added.

Move to a file of its own.

  • css/StyleRule.cpp:

(WebCore::StyleRuleContainer::StyleRuleContainer):
(WebCore::StyleRuleContainer::create):

  • css/StyleRule.h:
  • style/ContainerQueryEvaluator.cpp:

(WebCore::Style::ContainerQueryEvaluator::evaluate const):

  • style/ContainerQueryEvaluator.h:
  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::containerQueryMatches):

  • style/ElementRuleCollector.h:
  • style/RuleSet.h:

(WebCore::Style::RuleSet::containerQueryFor const):

  • style/RuleSetBuilder.cpp:

(WebCore::Style::RuleSetBuilder::addChildRules):

Feb 12, 2022:

11:11 PM Changeset in webkit [289705] by ntim@apple.com
  • 2 edits in trunk/LayoutTests

Skip imported/w3c/web-platform-tests/url/toascii.window.html on Catalina/Big Sur

Unreviewed test gardening.

  • platform/mac/TestExpectations:
9:42 PM Changeset in webkit [289704] by commit-queue@webkit.org
  • 2 edits in trunk/Source/bmalloc

Fix typos in libpas docs
https://bugs.webkit.org/show_bug.cgi?id=236550

Patch by Brandon Stewart <Brandon> on 2022-02-12
Reviewed by Yusuke Suzuki.

Fix several typos in libpas documentation.

  • libpas/Documentation.md:
5:18 PM Changeset in webkit [289703] by Jonathan Bedard
  • 2 edits in trunk/Tools

[run-webkit-tests] Do not try and read from /dev/null
https://bugs.webkit.org/show_bug.cgi?id=236528
<rdar://problem/88836868>

Reviewed by Alexey Proskuryakov.

While writing to /dev/null is well defined, reading from it is not. Do not
read from /dev/null.

  • Scripts/webkitpy/layout_tests/servers/websocket_server.py:

(PyWebSocket.init): Delete _wsin.
(PyWebSocket._prepare_config): Ditto.
(PyWebSocket._spawn_process): Use executive.PIPE instead of os.devnull.
(PyWebSocket._stop_running_server): Delete _wsin.

5:05 PM Changeset in webkit [289702] by commit-queue@webkit.org
  • 10 edits
    3 adds in trunk/Source/WebKit

Update preference location used for CaptivePortalMode.
https://bugs.webkit.org/show_bug.cgi?id=236135
<rdar://problem/88486544>

Patch by Gavin Phillips <gavin.p@apple.com> on 2022-02-12
Reviewed by Geoffrey Garen.

  • PlatformMac.cmake:
  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/_WKSystemPreferences.h: Added.
  • UIProcess/API/Cocoa/_WKSystemPreferences.mm: Added.

(+[_WKSystemPreferences isCaptivePortalModeEnabled]):
(+[_WKSystemPreferences setCaptivePortalModeEnabled:]):
(+[_WKSystemPreferences isCaptivePortalModeIgnored:]):
(+[_WKSystemPreferences setCaptivePortalModeIgnored:ignore:]):

  • UIProcess/API/Cocoa/_WKSystemPreferencesInternal.h: Added.
  • UIProcess/Cocoa/PreferenceObserver.mm:

(-[WKUserDefaults findPreferenceChangesAndNotifyForKeys:toValuesForKeys:]):

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::captivePortalModeConfigUpdateCallback):
(WebKit::WebProcessPool::registerNotificationObservers):
(WebKit::WebProcessPool::unregisterNotificationObservers):
(WebKit::isCaptivePortalModeEnabledBySystemIgnoringCaching):
(WebKit::WebProcessPool::notifyPreferencesChanged):

  • UIProcess/WebProcessPool.h:
  • UIProcess/mac/DisplayCaptureSessionManager.h:
  • UIProcess/mac/DisplayCaptureSessionManager.mm:

(WebKit::DisplayCaptureSessionManager::promptForGetDisplayMedia):

  • WebKit.xcodeproj/project.pbxproj:
2:57 PM Changeset in webkit [289701] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[macOS] Use system window and screen picker when available
https://bugs.webkit.org/show_bug.cgi?id=236531
rdar://87111816

Unreviewed build fix.

  • platform/mediastream/mac/ScreenCaptureKitSharingSessionManager.mm:

(WebCore::ScreenCaptureKitSharingSessionManager::takeSharingSessionForFilter):

2:44 PM Changeset in webkit [289700] by ysuzuki@apple.com
  • 4 edits
    2 adds in trunk

WebGL2 AllowShared TypedArray should be accepted
https://bugs.webkit.org/show_bug.cgi?id=232662

Reviewed by Dean Jackson.

Source/WebCore:

Test: webgl/webgl-allow-shared-typed-array.html

TypedArray with [AllowShared] annotation is not handled properly, which results in handling it as Sequence<T>,
invoking iteration protocol to copy them. This patch adds that as the same to [AllowShared] ArrayBuffer / ArrayBufferView.

  • bindings/IDLTypes.h:
  • bindings/js/JSDOMConvertUnion.h:

LayoutTests:

  • webgl/webgl-allow-shared-typed-array-expected.txt: Added.
  • webgl/webgl-allow-shared-typed-array.html: Added.
1:33 PM Changeset in webkit [289699] by ntim@apple.com
  • 4 edits
    1 delete in trunk/LayoutTests

Unreviewed test gardening: imported/w3c/web-platform-tests/url/toascii.window.html

LayoutTests/imported/w3c:

  • web-platform-tests/url/toascii.window-expected.txt:

LayoutTests:

  • platform/gtk/imported/w3c/web-platform-tests/url/toascii.window-expected.txt: Removed.
  • platform/mac/TestExpectations:
11:25 AM Changeset in webkit [289698] by Patrick Angle
  • 11 edits in trunk/Source/WebCore

Web Inspector: [Flexbox] Show item bounds, gaps, and free space in flex overlays
https://bugs.webkit.org/show_bug.cgi?id=236410

Reviewed by Devin Rousso.

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::flexibleBoxRendererBeganLayoutImpl):
(WebCore::InspectorInstrumentation::flexibleBoxRendererWrappedToNextLineImpl):
(WebCore::InspectorInstrumentation::instrumentingAgents):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::flexibleBoxRendererBeganLayout):
(WebCore::InspectorInstrumentation::flexibleBoxRendererWrappedToNextLine):

  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorDOMAgent::reset):
(WebCore::InspectorDOMAgent::flexibleBoxRendererBeganLayout):
(WebCore::InspectorDOMAgent::flexibleBoxRendererWrappedToNextLine):
(WebCore::InspectorDOMAgent::flexibleBoxRendererCachedItemsAtStartOfLine):

  • inspector/agents/InspectorDOMAgent.h:
  • Add instrumentation points specifically for flexbox renderers to keep track of which items start a new line

inside flex containers. The start of the first line is not recorded because it will always be zero.

(WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):

  • Force a layout of the document to ensure that our collection of flexbox line starts is correctly populated

when attaching an inspector, since without an inspector this information is not kept beyond layout.

  • inspector/InspectorOverlay.cpp:

(WebCore::drawLayoutPattern):

  • Generalize drawLayoutHatching to support different line styles in order to support the new stippling fill.
  • In order to support "flipping" the pattern we now use a rectangle encompassing the provided quad as the edges

we follow for filling the pattern (the existing clipping ensures that the final product is still within the
quad). This also resolves an issue that could occur in transformed containers (non-rectangular) where the
spacing was inconsistent at different rotations/perspectives.

(WebCore::drawLayoutStippling):

  • A new dot-pattern effect similar to hatching, but using small dots to fill the space instead.

(WebCore::drawLayoutHatching):

  • Updated to use the new generic drawLayoutPattern helper.

(WebCore::InspectorOverlay::drawFlexOverlay):
(WebCore::InspectorOverlay::buildFlexOverlay):

  • Handle iterating through the flex children to show their bounds as well as the spacing/gaps between them.

Almost all this work is done in relative terms, like leading/trailing/cross-axis/main-axis to make it easier to
reason about what should happen for different writing modes, text direction, flex direction, and flex wrapping.
To accomplish this coordinates of children are read through special corrected* helper functions that take in
to account the determined direction, main-axis reversal, and cross axis-reversal from all of the relevant
properties. This means there are only 8 (23) actual permutations of flex layout (since the layout inside each
individual child is irrelevant here). Throughout we are working with flex children frames that are relative to
their parent, which saves us from having to deal with transforms until after we have constructed most of our
overlay representation, only needing to be passed through childQuadToRootQuad before being added to the
appropriate part of the highlight object.

  • inspector/InspectorOverlay.h:

(WebCore::InspectorOverlay::Highlight::FlexHighlightOverlay::encode const):
(WebCore::InspectorOverlay::Highlight::FlexHighlightOverlay::decode):

  • rendering/RenderBox.h:

(WebCore::RenderBox::marginBox const):

  • Add a way to get the entire margin box instead of its individual components.
  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::layoutFlexItems):

  • rendering/RenderFlexibleBox.h:
  • Make getting the computed inter-item and inter-line gap public so we can use them in the overlay.
  • Add instrumentation calls to keep track of the indexes of items that start a new line during layout when an

Inspector is attached.

  • platform/LayoutUnit.h:

(WebCore::operator!=):

10:16 AM Changeset in webkit [289697] by jer.noble@apple.com
  • 33 edits
    11 adds in trunk

Add settings to restrict media containers and codecs when in Captive Portal mode
https://bugs.webkit.org/show_bug.cgi?id=236245

Reviewed by Eric Carlson.

Source/WebCore:

Tests: media/media-allowed-codecs.html

media/media-allowed-containers.html
media/media-source/media-source-allowed-codecs.html
media/media-source/media-source-allowed-containers.html

Add settings at the WebCore level to optionally declare a list of container types,
video codecs, audio codecs, and caption formats to allow when loading media through
HTMLMediaElement and MediaSource.

There are some cases where the codec ID, typically a four-character-code embedded
in the container itself, does not match the RFC4281 codec string. Notably, this is the case
with "mp4a.40" and 'aac '. So the settings must include both the codec ID and the codec
type in string form.

Query these lists in HTMLMediaElement::canPlayType() and MediaSource::isTypeSupported()
and reject ContentTypes which do not conform to the allowed types.

Query these lists in MediaSource::changeType() to disallow switching to an unsupported
ContentType.

If these lists are set, pass them into AVURLAsset as creation options.

When a new AVAssetTrack is loaded, query these lists and if the track's type does not
conform to the allowed types, synthesize an error and block further loading.

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::isTypeSupported):

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::changeType):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::canPlayType const):
(WebCore::HTMLMediaElement::allowedMediaContainerTypes const):
(WebCore::HTMLMediaElement::allowedMediaCodecTypes const):
(WebCore::HTMLMediaElement::allowedMediaVideoCodecTypes const):
(WebCore::HTMLMediaElement::allowedMediaAudioCodecTypes const):
(WebCore::HTMLMediaElement::allowedMediaCaptionFormatTypes const):

  • html/HTMLMediaElement.h:
  • page/SettingsBase.cpp:

(WebCore::SettingsBase::setAllowedMediaContainerTypes):
(WebCore::SettingsBase::setAllowedMediaVideoCodecTypes):
(WebCore::SettingsBase::setAllowedMediaAudioCodecTypes):
(WebCore::SettingsBase::setAllowedMediaCaptionFormatTypes):

  • page/SettingsBase.h:

(WebCore::SettingsBase::setAllowedMediaContainerTypes):
(WebCore::SettingsBase::allowedMediaContainerTypes const):
(WebCore::SettingsBase::setAllowedMediaVideoCodecTypes):
(WebCore::SettingsBase::allowedMediaVideoCodecTypes const):
(WebCore::SettingsBase::setAllowedMediaAudioCodecTypes):
(WebCore::SettingsBase::allowedMediaAudioCodecTypes const):
(WebCore::SettingsBase::setAllowedMediaCaptionFormatTypes):
(WebCore::SettingsBase::allowedMediaCaptionFormatTypes const):

  • platform/graphics/ContentTypeUtilities.cpp: Added.

(WebCore::contentTypesToCodecs):
(WebCore::contentTypeMeetsContainerAndCodecTypeRequirements):

  • platform/graphics/ContentTypeUtilities.h: Added.
  • platform/graphics/FourCC.h:

(WebCore::FourCC::encode const):
(WebCore::FourCC::decode):

  • platform/graphics/MediaPlayer.cpp:

(WebCore::nullOptionalStringVector):
(WebCore::nullOptionalFourCCVector):
(WebCore::MediaPlayer::nextBestMediaEngine):
(WebCore::MediaPlayer::allowedMediaContainerTypes const):
(WebCore::MediaPlayer::allowedMediaVideoCodecTypes const):
(WebCore::MediaPlayer::allowedMediaAudioCodecTypes const):
(WebCore::MediaPlayer::allowedMediaCaptionFormatTypes const):

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaEngineSupportParameters::encode const):
(WebCore::MediaEngineSupportParameters::decode):

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:

(WebCore::MediaPlayerPrivateAVFoundation::loadingMetadata const):

  • platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm:

(WebCore::contentTypesToCodecs): Deleted.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
(WebCore::MediaPlayerPrivateAVFoundationObjC::allTracksArePlayable const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::trackIsPlayable const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::assetStatus const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsTypeAndCodecs):
(WebCore::assetTrackMetadataKeyNames):

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::setAllowedMediaContainerTypes):
(WebCore::InternalSettings::setAllowedMediaVideoCodecTypes):
(WebCore::InternalSettings::setAllowedMediaAudioCodecTypes):
(WebCore::InternalSettings::setAllowedMediaCaptionFormatTypes):

  • testing/InternalSettings.h:
  • testing/InternalSettings.idl:

Source/WebCore/PAL:

  • pal/cocoa/AVFoundationSoftLink.h:
  • pal/cocoa/AVFoundationSoftLink.mm:

Source/WebKit:

RemoteMediaPlayerManager caches the results of supportsTypeAndCodecs() calls, which
is problematic when those results can change due to a change in settings. So enforce
the allowed codec and containers settings at the RemoteMediaPlayerManager level. Also,
pass those settings across the GPU process boundary via RemoteMediaPlayerProxyConfiguration.

Drive-by fix: refactor RemoteMediaPlayerProxyConfiguration::decode() so as not to require
re-declaring the types of every ivar, and greatly simplify the implementation.

  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h:

(WebKit::RemoteMediaPlayerProxyConfiguration::encode const):
(WebKit::RemoteMediaPlayerProxyConfiguration::decode):

  • WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:

(WebKit::RemoteMediaPlayerManager::createRemoteMediaPlayer):
(WebKit::RemoteMediaPlayerManager::supportsTypeAndCodecs):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Source/WTF:

  • Scripts/Preferences/WebPreferences.yaml:

LayoutTests:

  • media/media-allowed-codecs-expected.txt: Added.
  • media/media-allowed-codecs.html: Added.
  • media/media-allowed-containers-expected.txt: Added.
  • media/media-allowed-containers.html: Added.
  • media/media-source/media-source-allowed-codecs-expected.txt: Added.
  • media/media-source/media-source-allowed-codecs.html: Added.
  • media/media-source/media-source-allowed-containers-expected.txt: Added.
  • media/media-source/media-source-allowed-containers.html: Added.
8:08 AM Changeset in webkit [289696] by eric.carlson@apple.com
  • 17 edits
    3 adds in trunk/Source

[macOS] Use system window and screen picker when available
https://bugs.webkit.org/show_bug.cgi?id=236531
rdar://87111816

Reviewed by Jer Noble.

Source/WebCore:

Tested manually.

  • SourcesCocoa.txt: Add new files.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • en.lproj/Localizable.strings: Update prompts.
  • platform/mediastream/cocoa/DisplayCaptureSourceCocoa.cpp:

(WebCore::DisplayCaptureSourceCocoa::capturerConfigurationChanged): Allow a capturer
to notify the source of a configuration change.

  • platform/mediastream/cocoa/DisplayCaptureSourceCocoa.h:

(WebCore::CapturerObserver::capturerConfigurationChanged):

  • platform/mediastream/mac/ScreenCaptureKitCaptureSource.h:
  • platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:

(-[WebCoreScreenCaptureKitHelper stream:didStopWithError:]): Forward delegate callbacks
to the capture source.
(-[WebCoreScreenCaptureKitHelper sessionDidEnd:]): Ditto.
(-[WebCoreScreenCaptureKitHelper sessionDidChangeContent:]): Ditto.
(-[WebCoreScreenCaptureKitHelper pickerCanceledForSession:]): Ditto.
(WebCore::ScreenCaptureKitCaptureSource::sessionDidChangeContent): React to a
reconfiguration.
(WebCore::ScreenCaptureKitCaptureSource::sessionDidEnd):
(WebCore::ScreenCaptureKitCaptureSource::startContentStream): Use the sharing
session manager when available.
(WebCore::ScreenCaptureKitCaptureSource::intrinsicSize const): Get the size from
the content when possible.

  • platform/mediastream/mac/ScreenCaptureKitSharingSessionManager.h: Added.

(WebCore::ScreenCaptureKitSharingSessionManager::SharingSessionObserver::operator== const):

  • platform/mediastream/mac/ScreenCaptureKitSharingSessionManager.mm: Added.

(-[WebDisplayMediaPromptHelper initWithCallback:]):
(-[WebDisplayMediaPromptHelper disconnect]):
(-[WebDisplayMediaPromptHelper startObservingSession:]):
(-[WebDisplayMediaPromptHelper stopObservingSession:]):
(-[WebDisplayMediaPromptHelper sessionDidEnd:]):
(-[WebDisplayMediaPromptHelper sessionDidChangeContent:]):
(-[WebDisplayMediaPromptHelper pickerCanceledForSession:]):
(WebCore::ScreenCaptureKitSharingSessionManager::isAvailable):
(WebCore::ScreenCaptureKitSharingSessionManager::singleton):
(WebCore::ScreenCaptureKitSharingSessionManager::ScreenCaptureKitSharingSessionManager):
(WebCore::ScreenCaptureKitSharingSessionManager::~ScreenCaptureKitSharingSessionManager):
(WebCore::ScreenCaptureKitSharingSessionManager::pickerCanceledForSession):
(WebCore::ScreenCaptureKitSharingSessionManager::sessionDidEnd):
(WebCore::ScreenCaptureKitSharingSessionManager::sessionDidChangeContent):
(WebCore::ScreenCaptureKitSharingSessionManager::showWindowPicker):
(WebCore::ScreenCaptureKitSharingSessionManager::showScreenPicker):
(WebCore::ScreenCaptureKitSharingSessionManager::promptForGetDisplayMedia):
(WebCore::ScreenCaptureKitSharingSessionManager::takeSharingSessionForFilter):

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/mac/ScreenCaptureKitSoftLink.h:
  • pal/mac/ScreenCaptureKitSoftLink.mm:
  • pal/spi/mac/ScreenCaptureKitSPI.h: Added.

Source/WebKit:

  • Platform/spi/Cocoa/SafeBrowsingSPI.h:
  • UIProcess/mac/DisplayCaptureSessionManager.mm:

(WebKit::DisplayCaptureSessionManager::alertForGetDisplayMedia): Update prompt strings.
(WebKit::DisplayCaptureSessionManager::showWindowPicker): Use capture session
manager when available.
(WebKit::DisplayCaptureSessionManager::showScreenPicker): Ditto.

Source/WTF:

  • wtf/PlatformHave.h: Define HAVE_SC_CONTENT_SHARING_SESSION.
7:48 AM Changeset in webkit [289695] by Adrian Perez de Castro
  • 2 edits in trunk/Source/JavaScriptCore

[CMake] REGRESSION(r289611): Debug builds fail linking binaries with ld.lld
https://bugs.webkit.org/show_bug.cgi?id=236506

Reviewed by Yusuke Suzuki.

  • jit/ThunkGenerators.cpp: Use .previous in inline assembler for thunks in order to ensure

that mixed emission of assembler code and variable definitions correctly puts each of them
in their rightful sections in the output object code.

7:42 AM Changeset in webkit [289694] by commit-queue@webkit.org
  • 10 edits in trunk

Invoke mouse hover delegate callback on iOS
https://bugs.webkit.org/show_bug.cgi?id=233018

Patch by Kevin Turner <kevin_turner@apple.com> on 2022-02-12
Reviewed by Tim Horton.

Source/WebKit:

Allow mouseDidMoveOverElement: callbacks on iOS with pointer support.

Test: iOSMouseSupport.MouseDidMoveOverElement

  • Shared/API/Cocoa/_WKHitTestResult.h:
  • Shared/API/Cocoa/_WKHitTestResult.mm:
  • Shared/API/Cocoa/_WKHitTestResultInternal.h:
  • Shared/Cocoa/APIObject.mm:

(API::Object::newObject):

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::mouseDidMoveOverElement):
Convert the modifier flags from the hover event to UIKeyModifierFlags if not on macOS.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/iOSMouseSupport.mm:

(-[MouseSupportUIDelegate _webView:mouseDidMoveOverElement:withFlags:userInfo:]):
(-[MouseSupportUIDelegate setMouseDidMoveOverElementHandler:]):
(TEST):

7:34 AM Changeset in webkit [289693] by commit-queue@webkit.org
  • 7 edits
    2 adds in trunk

Suppress style invalidation when matching :checked
https://bugs.webkit.org/show_bug.cgi?id=235910

Patch by Rob Buis <rbuis@igalia.com> on 2022-02-12
Reviewed by Antti Koivisto.

Source/WebCore:

Suppress style invalidation when matching :checked for option elements.

Test: fast/selectors/has-select-option-crash.html

  • css/SelectorCheckerTestFunctions.h:

(WebCore::isChecked):

  • html/HTMLOptionElement.cpp:

(WebCore::HTMLOptionElement::selected const):
(WebCore::HTMLOptionElement::setSelectedState):

  • html/HTMLOptionElement.h:
  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::updateListItemSelectedStates):
(WebCore::HTMLSelectElement::recalcListItems const):

  • html/HTMLSelectElement.h:

LayoutTests:

  • fast/selectors/has-select-option-crash-expected.txt: Added.
  • fast/selectors/has-select-option-crash.html: Added.
7:29 AM Changeset in webkit [289692] by Cameron McCormack
  • 3 edits in trunk/Source/WebCore

Make WidgetHierarchyUpdatesSuspensionScope cheaper if it has nothing to do
https://bugs.webkit.org/show_bug.cgi?id=236486

Reviewed by Simon Fraser.

With content that does a lot of DOM manipulation, we can create and
destroy a WidgetHierarchyUpdatesSuspensionScope on the stack many times.
When this object has nothing to do, it calls an out of line function.
This patch pulls out the check for whether it needs to call
moveWidgets() into the inline destructor.

This is a 1% saving on the jQuery-TodoMVC subtest of Speedometer 2,
though the effect on the top line score is minimal.

  • rendering/RenderWidget.cpp:

(WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):

  • rendering/RenderWidget.h:

(WebCore::WidgetHierarchyUpdatesSuspensionScope::~WidgetHierarchyUpdatesSuspensionScope):
(WebCore::WidgetHierarchyUpdatesSuspensionScope::scheduleWidgetToMove):

7:08 AM Changeset in webkit [289691] by Cameron McCormack
  • 2 edits in trunk/Source/WebCore

Look up InputTypeFactoryMap with an ASCII lowercase string instead of using a ASCIICaseInsensitiveHash
https://bugs.webkit.org/show_bug.cgi?id=236532

Reviewed by Myles C. Maxfield.

InputType::create looks up the InputTypeFactoryMap based on the
AtomString value of the <input type> attribute. The HashMap uses an
ASCIICaseInsensitiveHash, but the AtomStrings stored in the map are all
ASCII lowercase to begin with. This means that we spend time doing an
ASCII case insensitive hash computation on the query string. Most
content already supplies an ASCII lowercase type value, so it's less
work to ASCII lowercase the type value and then look up the HashMap
using the regular hash for AtomStrings (i.e., pulling the hash out of
AtomString).

Doing this is a 0.5% improvement on a couple of Speedometer 2 subtests,
and a 0.1% improvement to the overall score.

  • html/InputType.cpp:

(WebCore::InputType::create):

6:20 AM Changeset in webkit [289690] by aakash_jain@apple.com
  • 12 edits in trunk/Tools

Unreviewed, reverting r289687.
https://bugs.webkit.org/show_bug.cgi?id=236539

broke commit queue

Reverted changeset:

"git-webkit setup should allow changing the credentials"
https://bugs.webkit.org/show_bug.cgi?id=235297
https://commits.webkit.org/r289687

Patch by Commit Queue <commit-queue@webkit.org> on 2022-02-12

Feb 11, 2022:

6:29 PM Changeset in webkit [289689] by don.olmstead@sony.com
  • 3 edits in trunk/Source/JavaScriptCore

Allow structureHeapAddressSize to be set during build
https://bugs.webkit.org/show_bug.cgi?id=236527

Reviewed by Yusuke Suzuki.

Add STRUCTURE_HEAP_ADDRESS_SIZE_IN_MB as a way to set the size of
structureHeapAddressSize at build time. Set a default for the PlayStation port.

  • PlatformPlayStation.cmake:
  • runtime/JSCConfig.h:
6:04 PM Changeset in webkit [289688] by Kocsen Chung
  • 1 copy in tags/Safari-614.1.3

Tag Safari-614.1.3.

6:04 PM Changeset in webkit [289687] by Jonathan Bedard
  • 12 edits in trunk/Tools

git-webkit setup should allow changing the credentials
https://bugs.webkit.org/show_bug.cgi?id=235297
<rdar://problem/87988794>

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/webkitbugspy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py:

(Tracker.credentials): Pass validater into webkitscmpy.credentials if caller requests validation.

  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py:

(Tracker.credentials): Pass validater into webkitscmpy.credentials if caller requests validation.

  • Tools/Scripts/libraries/webkitcorepy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py:

(credentials): Allow caller to provide a callback which will validate credentials to ensure
they work, re-prompt user if credentials fail validation.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:

(Setup.git): Request validation of GitHub credentials.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:

(GitHub.credentials): Pass validation flag.

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

5:52 PM Changeset in webkit [289686] by Alan Bujtas
  • 4 edits
    2 adds in trunk

contain:content breaks fullscreen
https://bugs.webkit.org/show_bug.cgi?id=236470
<rdar://88689388>

Reviewed by Simon Fraser.

Source/WebCore:

Paint/layout containment forms a containing block for fixed positioned block boxes. It makes all fixed
positioned descendants anchored (contained) to this layout container.
This patch enables fullscreen boxes break out of this non-ICB based layout scope (this is similar to what we
do for other, "layout scope changing" properties, see canContainFixedPositionObjects).

Test: fullscreen/fullscreen-prevented-by-containment.html

  • css/fullscreen.css:

(:-webkit-full-screen-ancestor:not(iframe)):

  • css/parser/CSSParserContext.cpp:

(WebCore::CSSParserContext::CSSParserContext):

LayoutTests:

  • fullscreen/fullscreen-prevented-by-containment-expected.txt: Added.
  • fullscreen/fullscreen-prevented-by-containment.html: Added.
5:46 PM Changeset in webkit [289685] by Megan Gardner
  • 14 edits
    2 copies in trunk/Source/WebKit

Implement Reveal methods
https://bugs.webkit.org/show_bug.cgi?id=236478

Reviewed by Wenson Hsieh.

Respond to protocol methods that request RVItems for selection.

  • Platform/IPC/ArgumentCoder.h:
  • Platform/IPC/DataReference.h:
  • Shared/Cocoa/SandboxExtensionCocoa.mm:
  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:
  • SourcesCocoa.txt:
  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView requestRVItemInSelectedRangeWithCompletionHandler:]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::requestRVItemInCurrentSelectedRange):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::requestRVItemInCurrentSelectedRange):

5:45 PM Changeset in webkit [289684] by Jonathan Bedard
  • 5 edits in trunk/Tools

[git-webkit] Link issue to pull requests
https://bugs.webkit.org/show_bug.cgi?id=236339
<rdar://problem/88657772>

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:

(PullRequest.main): Add link to pull request in issue comments, assign issue to
pull request author.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:

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

5:35 PM Changeset in webkit [289683] by Nikos Mouchtaris
  • 2 edits in trunk/Source/WTF

Turn overscroll-behavior on by default
https://bugs.webkit.org/show_bug.cgi?id=236060

Reviewed by Tim Nguyen.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
5:15 PM Changeset in webkit [289682] by commit-queue@webkit.org
  • 5 edits
    4 deletes in trunk

Unreviewed, reverting r289498.
https://bugs.webkit.org/show_bug.cgi?id=236534

Speedometer2 2% regression

Reverted changeset:

"Dialog element only animates once"
https://bugs.webkit.org/show_bug.cgi?id=236274
https://commits.webkit.org/r289498

5:12 PM Changeset in webkit [289681] by Wenson Hsieh
  • 18 edits
    1 add in trunk/Source

[iOS] Add a "Copy Cropped Image" context menu item when long pressing images
https://bugs.webkit.org/show_bug.cgi?id=236511
rdar://88817219

Reviewed by Devin Rousso.

Source/WebKit:

Add support for a new context menu item on iOS that allows the user to copy a cropped version of the source
image, after invoking markup UI. See below for more details.

  • Configurations/WebKit.xcconfig:

Link against UniformTypeIdentifiers on macOS 11+, rather than macOS 12+.

  • Platform/cocoa/CocoaImage.h:
  • Platform/cocoa/CocoaImage.mm:

(WebKit::transcode):
(WebKit::transcodeWithPreferredMIMEType):

Move a helper function that transcodes an image to a given UTI into CocoaImage.h, as a standalone function.
Also, add a separate helper function here that transcodes an image to a given MIME type (with a fallback UTI, in
case the MIME type cannot be mapped to a suitable UTI that conforms to any image UTI). The new call sites of
this function are in WKContentViewInteraction.mm.

  • Platform/cocoa/TextRecognitionUtilities.mm:
  • Shared/ios/InteractionInformationAtPosition.h:
  • Shared/ios/InteractionInformationAtPosition.mm:

(WebKit::InteractionInformationAtPosition::encode const):
(WebKit::InteractionInformationAtPosition::decode):

Add a new imageMIMEType member to represent the MIME type of the source image used to generate the bitmap
image data in image.

  • SourcesCocoa.txt: Add CocoaImage.mm.
  • UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:

(-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:userInfo:]):
(-[_WKActivatedElementInfo _initWithType:URL:imageURL:location:title:ID:rect:image:imageMIMEType:]):
(-[_WKActivatedElementInfo _initWithType:URL:imageURL:location:title:ID:rect:image:imageMIMEType:userInfo:]):
(-[_WKActivatedElementInfo imageMIMEType]):

Add plumbing for imageMIMEType from InteractionInformationAtPosition (position information) into
_WKActivatedElementInfo, as an internal method. We use this information below, to transcode the resulting image
back to the source image format after applying markup, when invoking the new "Copy Cropped Image" item.

(-[_WKActivatedElementInfo _initWithType:URL:imageURL:location:title:ID:rect:image:]): Deleted.
(-[_WKActivatedElementInfo _initWithType:URL:imageURL:location:title:ID:rect:image:userInfo:]): Deleted.

  • UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h:
  • UIProcess/API/Cocoa/_WKElementAction.h:
  • UIProcess/API/Cocoa/_WKElementAction.mm:

(+[_WKElementAction _elementActionWithType:customTitle:assistant:]):
(+[_WKElementAction imageForElementActionType:]):

Add support for the new "Copy Cropped Image" item tag (_WKElementActionTypeCopyCroppedImage).

(elementActionTypeToUIActionIdentifier):
(uiActionIdentifierToElementActionType):

  • UIProcess/ios/WKActionSheetAssistant.h:
  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
(-[WKActionSheetAssistant defaultActionsForImageSheet:]):
(-[WKActionSheetAssistant showLinkSheet]):
(-[WKActionSheetAssistant handleElementActionWithType:element:needsInteraction:]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _showAttachmentSheet]):
(-[WKContentView performImageAnalysisMarkup:]):

Use the new transcodeWithPreferredMIMEType helper method here.

(-[WKContentView doAfterComputingImageAnalysisResultsForMarkup:]):

Remove the TIFF transcoding workaround from this method (see associated changes in Radar for more information).

(-[WKContentView actionSheetAssistant:copyCroppedImage:sourceMIMEType:]):

Handle the new action by calling into VisionKit to adjust the source image as needed, and then transcode the
resulting CGImageRef back to a format that matches the source image; finally, write this transcoded
representation to the general pasteboard.

(-[WKContentView _dataForPreviewItemController:atPosition:type:]):
(-[WKContentView _presentedViewControllerForPreviewItemController:]):

Pass imageMIMEType from position information into the activated element info initializer in several places.

(WebKit::transcode): Deleted.

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::imagePositionInformation):
(WebKit::elementPositionInformation):

Populate imageMIMEType in position information.

Source/WTF:

Add a compile-time flag to guard availability of the UniformTypeIdentifiers framework. See WebKit/ChangeLog for
more information.

  • wtf/PlatformHave.h:
4:42 PM Changeset in webkit [289680] by Said Abou-Hallawa
  • 3 edits in trunk/Source/WebKit

[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<CFTypeRef>::encode):
(IPC::ArgumentCoder<RetainPtr<CFTypeRef>>::decode):
(IPC::ArgumentCoder<CFCharacterSetRef>::encode):
(IPC::ArgumentCoder<RetainPtr<CFCharacterSetRef>>::decode):

  • Shared/cf/ArgumentCodersCF.h:
3:54 PM Changeset in webkit [289679] by Alan Coon
  • 1 copy in tags/Safari-613.1.17.0.1

Tag Safari-613.1.17.0.1.

3:53 PM Changeset in webkit [289678] by Russell Epstein
  • 1 copy in tags/Safari-613.1.17.1.1

Tag Safari-613.1.17.1.1.

3:35 PM Changeset in webkit [289677] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Marking expectations for compositing/iframes/border-radius-composited-frame.html as it is failing on EWS
rdar://80333071

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:26 PM Changeset in webkit [289676] by Jonathan Bedard
  • 4 edits in trunk/Tools

[EWS] Rebase PRs on tip of branch
https://bugs.webkit.org/show_bug.cgi?id=236389
<rdar://problem/88705147>

Reviewed by Aakash Jain.

  • Tools/CISupport/ews-build/master.cfg: Add github.base.ref to properties.
  • Tools/CISupport/ews-build/steps.py:

(CheckOutSource.run): Set branch from github properties, if available.
(ShowIdentifier.start): Use 'got_revision' instead of github properties.
(CheckOutPullRequest.run): Rebase PRs if we have enough information to. To support
rebasing, we need to handle conflicts in changelogs.
(RevertPullRequestChanges.run): Revert to whatever revision we rebased on.
(Trigger.propertiesToPassToTriggers): Pass github.base.ref to triggered build.

  • Tools/CISupport/ews-build/steps_unittest.py:

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

3:23 PM Changeset in webkit [289675] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[ Mac wk1 ] fast/text/otsvg-canvas.html failing constantly
https://bugs.webkit.org/show_bug.cgi?id=236530

Unreviewed test gardening

  • platform/mac-wk1/TestExpectations:
3:10 PM Changeset in webkit [289674] by Truitt Savell
  • 2 edits in trunk/LayoutTests

update expectations for webrtc/h264-baseline.html and webrtc/h264-high.html
webkit.org/b/223043

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:03 PM Changeset in webkit [289673] by Megan Gardner
  • 6 edits in trunk/Source

Enable grammar checking on Mac Catalyst.
https://bugs.webkit.org/show_bug.cgi?id=236479

Reviewed by Devin Rousso.

Source/WebCore:

  • editing/Editor.cpp:

(WebCore::Editor::markMisspellingsAfterTypingToWord):

  • platform/graphics/cocoa/GraphicsContextCocoa.mm:

(WebCore::grammarColor):
(WebCore::colorForMarkerLineStyle):

Source/WebKit:

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/TextCheckerIOS.mm:

(WebKit::mutableState):
(WebKit::TextChecker::setGrammarCheckingEnabled):
(WebKit::TextChecker::checkTextOfParagraph):

2:57 PM Changeset in webkit [289672] by Chris Dumez
  • 24 edits
    2 adds in trunk

Fix MIME type check for classic worker script fetches
https://bugs.webkit.org/show_bug.cgi?id=236411

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/workers/Worker_script_mimetype-expected.txt:
  • web-platform-tests/workers/importscripts_mime.any.sharedworker-expected.txt:
  • web-platform-tests/workers/importscripts_mime.any.worker-expected.txt:

Rebaseline WPT tests now that more checks are passing.

  • web-platform-tests/workers/constructors/SharedWorker/Infinity.headers: Added.
  • web-platform-tests/workers/constructors/SharedWorker/NaN.headers: Added.

Merge upstream fix from https://github.com/web-platform-tests/wpt/pull/32782.

Source/WebCore:

Fix MIME type check for classic worker script fetches and classic worker script imports, so that we are
now aligned with the specification:

This was causing us to fail some Web Platform Tests.

No new tests, rebaselined existing tests.

  • bindings/js/WorkerModuleScriptLoader.cpp:

(WebCore::WorkerModuleScriptLoader::load):

  • loader/FetchOptions.h:

(WebCore::isScriptLikeDestination):

  • workers/Worker.cpp:

(WebCore::Worker::create):

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::importScripts):

  • workers/WorkerScriptLoader.cpp:

(WebCore::WorkerScriptLoader::loadSynchronously):
(WebCore::WorkerScriptLoader::loadAsynchronously):
(WebCore::constructJavaScriptMIMETypeError):
(WebCore::WorkerScriptLoader::validateWorkerResponse):
(WebCore::WorkerScriptLoader::didReceiveResponse):

  • workers/WorkerScriptLoader.h:
  • workers/service/ServiceWorkerJob.cpp:

(WebCore::ServiceWorkerJob::fetchScriptWithContext):

  • workers/shared/SharedWorkerScriptLoader.cpp:

(WebCore::SharedWorkerScriptLoader::load):

Source/WebKit:

  • NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp:

(WebKit::ServiceWorkerSoftUpdateLoader::processResponse):

LayoutTests:

Fix existing layout tests to make sure that worker scripts are served with a JavaScript mime type.

  • http/tests/resourceLoadStatistics/resources/script-revealing-cookies.py:
  • http/tests/security/contentSecurityPolicy/resources/worker-importScript-redirect-cross-origin-allowed.py:
  • http/tests/security/contentSecurityPolicy/resources/worker-importScript-redirect-cross-origin-blocked.py:
  • http/tests/security/contentSecurityPolicy/resources/worker-xhr-allowed.py:
  • http/tests/security/contentSecurityPolicy/resources/worker-xhr-redirect-cross-origin-allowed.py:
  • http/tests/security/contentSecurityPolicy/resources/worker-xhr-redirect-cross-origin-blocked.py:
  • http/tests/security/contentSecurityPolicy/resources/worker.py:
  • http/tests/workers/resources/subworker-encoded.py:
2:46 PM Changeset in webkit [289671] by don.olmstead@sony.com
  • 4 edits in trunk

[CMake] Check for MAP_ALIGNED support
https://bugs.webkit.org/show_bug.cgi?id=236522

Reviewed by Keith Miller.

.:

Add a symbol check for MAP_ALIGNED in the CMake.

  • Source/cmake/OptionsCommon.cmake:

Source/WTF:

Use the HAVE(MAP_ALIGNED) check in tryReserveUncommittedAligned. Mark unused parameters in
the function. Also define MAP_NORESERVE if its undefined which seems to be the case in
FreeBSD.

  • wtf/posix/OSAllocatorPOSIX.cpp:

(WTF::OSAllocator::tryReserveUncommittedAligned):

1:48 PM Changeset in webkit [289670] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Sources: double clicking a breakpoint icon should show the edit popover
https://bugs.webkit.org/show_bug.cgi?id=236524

Reviewed by Patrick Angle.

This is a more convenient way to access(/discover) the breakpoint's configuration details.

  • UserInterface/Views/BreakpointTreeElement.js:

(WI.BreakpointTreeElement):
(WI.BreakpointTreeElement.prototype._handleStatusImageElementDoubleClicked): Added.

  • UserInterface/Views/BreakpointPopover.js:

(WI.BreakpointPopover.show): Added.
(WI.BreakpointPopover.appendContextMenuItems):
Add a convenience method to create a WI.BreakpointPopover (or subclass) for the given
breakpoint and show it over the given target element.

1:46 PM Changeset in webkit [289669] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: click to re-enable breakpoint clears automatic continue
https://bugs.webkit.org/show_bug.cgi?id=236465

Reviewed by Patrick Angle.

This is not very convenient for developers as it means that they have to click more than
once when re-enabling an auto-continue breakpoint (i.e. once to enable it (which currently
disables auto-continue), and once to re-enable auto-continue). Separating these behaviors is
preferable because it's unlikely that a developer would want to disable auto-continue when
re-enabling a breakpoint if they've taken the time to previously configure auto-continue.

  • UserInterface/Views/BreakpointTreeElement.js:

(WI.BreakpointTreeElement.prototype.onenter):
(WI.BreakpointTreeElement.prototype.onspace):
(WI.BreakpointTreeElement.prototype._statusImageElementClicked):

  • UserInterface/Views/SourceCodeTextEditor.js:

(WI.SourceCodeTextEditor.prototype.textEditorBreakpointClicked):
Replace cycleToNextNode with disabled = !disabled.

  • UserInterface/Models/Breakpoint.js:

(WI.Breakpoint.prototype.cycleToNextMode): Deleted.
Remove this method now that it's no longer used.

1:43 PM Changeset in webkit [289668] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests

[model] rewrite http/tests/model/model-document.html using testharness.js
https://bugs.webkit.org/show_bug.cgi?id=236494

Reviewed by Dean Jackson.

  • http/tests/model/model-document-expected.txt:
  • http/tests/model/model-document.html:
1:39 PM Changeset in webkit [289667] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

css/css-writing-modes/direction-propagation-body-contain-root.html asserts
https://bugs.webkit.org/show_bug.cgi?id=234763
<rdar://problem/87243336>

Unreviewed gardening.

1:16 PM WebKitGTK/2.34.x edited by Adrian Perez de Castro
(diff)
1:12 PM Changeset in webkit [289666] by graouts@webkit.org
  • 3 edits
    2 adds in trunk

[model] standalone model documents should be interactive
https://bugs.webkit.org/show_bug.cgi?id=236493

Reviewed by Dean Jackson.

Source/WebCore:

We made <model> elements not be interactive by default in bug 227621,
so we need to opt into interactivity for standalone <model> documents.
All this requires is setting the "interactive" attribute, which we set
instead of the "controls" attribute which does not exist for <model>.

Test: http/tests/model/model-document-interactive.html

  • html/ModelDocument.cpp:

(WebCore::ModelDocumentParser::createDocumentStructure):

LayoutTests:

Add a test that checks that the <model> element created for standalone
documents has the "interactive" attribute.

  • http/tests/model/model-document-interactive-expected.txt: Added.
  • http/tests/model/model-document-interactive.html: Added.
1:09 PM Changeset in webkit [289665] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix the Apple TV build

Don't try to import AVKitSPI.h on Apple TV.

  • UIProcess/ios/WKContentViewInteraction.mm:
1:00 PM Changeset in webkit [289664] by Kyle Piddington
  • 3 edits in trunk/Source/ThirdParty/ANGLE

Cocoa2d-HTLM5 game apepars to use wrong vertex buffer data
https://bugs.webkit.org/show_bug.cgi?id=236427
<rdar://problem/87136345>

Reviewed by Kimmo Kinnunen.

Render encoder appears to carry stale state when a vertex array's element
buffer is updated, but no other parts of the buffer are updated. Reassign
vertex buffer bindings in this case, which clears up corruption
(Squished rendering elements, incorrect UV's)

  • src/libANGLE/renderer/metal/VertexArrayMtl.h:
  • src/libANGLE/renderer/metal/VertexArrayMtl.mm:

(rx::VertexArrayMtl::syncState):
(rx::VertexArrayMtl::setupDraw):

12:35 PM Changeset in webkit [289663] by Russell Epstein
  • 4 edits in branches/safari-613.1.17.1-branch/Source/WebCore

Cherry-pick r289493. rdar://problem/88321921

Register strings in CSSTokenizer created from preprocessing
https://bugs.webkit.org/show_bug.cgi?id=236309

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2022-02-09
Reviewed by Michael Saboff.

Register strings in CSSTokenizer created from preprocessing. This will align with
what is currently done for strings with escapes in CSSTokenizer::consumeName().

  • css/parser/CSSTokenizer.cpp: (WebCore::CSSTokenizer::preprocessString): (WebCore::CSSTokenizer::tryCreate): (WebCore::CSSTokenizer::CSSTokenizer): (WebCore::preprocessString): Deleted.
  • css/parser/CSSTokenizer.h:
  • css/parser/CSSTokenizerInputStream.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289493 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12:35 PM Changeset in webkit [289662] by Russell Epstein
  • 4 edits in branches/safari-613.1.17.0-branch/Source/WebCore

Cherry-pick r289493. rdar://problem/88321921

Register strings in CSSTokenizer created from preprocessing
https://bugs.webkit.org/show_bug.cgi?id=236309

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2022-02-09
Reviewed by Michael Saboff.

Register strings in CSSTokenizer created from preprocessing. This will align with
what is currently done for strings with escapes in CSSTokenizer::consumeName().

  • css/parser/CSSTokenizer.cpp: (WebCore::CSSTokenizer::preprocessString): (WebCore::CSSTokenizer::tryCreate): (WebCore::CSSTokenizer::CSSTokenizer): (WebCore::preprocessString): Deleted.
  • css/parser/CSSTokenizer.h:
  • css/parser/CSSTokenizerInputStream.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289493 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12:31 PM Changeset in webkit [289661] by Russell Epstein
  • 14 edits
    2 adds in branches/safari-613.1.17.1-branch

Cherry-pick r289462. rdar://problem/88580935

Don't return an empty value from AbortController.signal.reason and make it harder to return empty values from JSValueInWrappedObject
https://bugs.webkit.org/show_bug.cgi?id=236318
<rdar://88580935>

Reviewed by Mark Lam.

Source/WebCore:

This patch makes it so we might not accidentally return the empty value to
JavaScript code from JSValueInWrappedObject. Previously, JSValueInWrappedObject
had an "operator JSValue()" method. This patch removes that, adds a new
conversion method for converting between JSValueInWrappedObject and JSValue,
and makes JSValueInWrappedObject return undefined inside this method
when it used to return the empty value. This fixes a crash where we'd return
the empty value to JS JIT code, and crash dereferencing a nullptr. It's never
valid for a JS function call (or getter, etc) to return the empty value.

Test: fast/dom/AbortSignal-reason-crash-2.html

  • Modules/webaudio/AudioBuffer.cpp: (WebCore::AudioBuffer::getChannelData):
  • Modules/webaudio/AudioWorkletProcessor.cpp: (WebCore::toJSArray): (WebCore::toJSObject): (WebCore::AudioWorkletProcessor::buildJSArguments):
  • bindings/js/JSCustomEventCustom.cpp: (WebCore::JSCustomEvent::detail const):
  • bindings/js/JSDOMConvertAny.h: (WebCore::JSConverter<IDLAny>::convert):
  • bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data const):
  • bindings/js/JSPaymentMethodChangeEventCustom.cpp: (WebCore::JSPaymentMethodChangeEvent::methodDetails const):
  • bindings/js/JSPopStateEventCustom.cpp: (WebCore::JSPopStateEvent::state const):
  • bindings/js/JSValueInWrappedObject.h: (WebCore::JSValueInWrappedObject::getValue const): (WebCore::JSValueInWrappedObject::operator bool const): (WebCore::cachedPropertyValue): (WebCore::JSValueInWrappedObject::operator JSC::JSValue const): Deleted.
  • dom/AbortSignal.cpp: (WebCore::AbortSignal::signalFollow): (WebCore::AbortSignal::throwIfAborted):
  • dom/ErrorEvent.cpp: (WebCore::ErrorEvent::error): (WebCore::ErrorEvent::trySerializeError):
  • dom/PopStateEvent.cpp: (WebCore::PopStateEvent::trySerializeState):
  • page/History.cpp: (WebCore::History::cachedState):

LayoutTests:

  • fast/dom/AbortSignal-reason-crash-2-expected.txt: Added.
  • fast/dom/AbortSignal-reason-crash-2.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289462 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12:31 PM Changeset in webkit [289660] by Russell Epstein
  • 14 edits
    2 adds in branches/safari-613.1.17.0-branch

Cherry-pick r289462. rdar://problem/88580935

Don't return an empty value from AbortController.signal.reason and make it harder to return empty values from JSValueInWrappedObject
https://bugs.webkit.org/show_bug.cgi?id=236318
<rdar://88580935>

Reviewed by Mark Lam.

Source/WebCore:

This patch makes it so we might not accidentally return the empty value to
JavaScript code from JSValueInWrappedObject. Previously, JSValueInWrappedObject
had an "operator JSValue()" method. This patch removes that, adds a new
conversion method for converting between JSValueInWrappedObject and JSValue,
and makes JSValueInWrappedObject return undefined inside this method
when it used to return the empty value. This fixes a crash where we'd return
the empty value to JS JIT code, and crash dereferencing a nullptr. It's never
valid for a JS function call (or getter, etc) to return the empty value.

Test: fast/dom/AbortSignal-reason-crash-2.html

  • Modules/webaudio/AudioBuffer.cpp: (WebCore::AudioBuffer::getChannelData):
  • Modules/webaudio/AudioWorkletProcessor.cpp: (WebCore::toJSArray): (WebCore::toJSObject): (WebCore::AudioWorkletProcessor::buildJSArguments):
  • bindings/js/JSCustomEventCustom.cpp: (WebCore::JSCustomEvent::detail const):
  • bindings/js/JSDOMConvertAny.h: (WebCore::JSConverter<IDLAny>::convert):
  • bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data const):
  • bindings/js/JSPaymentMethodChangeEventCustom.cpp: (WebCore::JSPaymentMethodChangeEvent::methodDetails const):
  • bindings/js/JSPopStateEventCustom.cpp: (WebCore::JSPopStateEvent::state const):
  • bindings/js/JSValueInWrappedObject.h: (WebCore::JSValueInWrappedObject::getValue const): (WebCore::JSValueInWrappedObject::operator bool const): (WebCore::cachedPropertyValue): (WebCore::JSValueInWrappedObject::operator JSC::JSValue const): Deleted.
  • dom/AbortSignal.cpp: (WebCore::AbortSignal::signalFollow): (WebCore::AbortSignal::throwIfAborted):
  • dom/ErrorEvent.cpp: (WebCore::ErrorEvent::error): (WebCore::ErrorEvent::trySerializeError):
  • dom/PopStateEvent.cpp: (WebCore::PopStateEvent::trySerializeState):
  • page/History.cpp: (WebCore::History::cachedState):

LayoutTests:

  • fast/dom/AbortSignal-reason-crash-2-expected.txt: Added.
  • fast/dom/AbortSignal-reason-crash-2.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289462 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12:25 PM Changeset in webkit [289659] by Jonathan Bedard
  • 6 edits in trunk/Tools

[git-webkit] Handle local commit on production branch
https://bugs.webkit.org/show_bug.cgi?id=235974
<rdar://problem/88346615>

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Handle moving

branches to remote reference.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:

(PullRequest.main): Move local branch ref to remote reference.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:

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

12:19 PM Changeset in webkit [289658] by Chris Dumez
  • 5 edits in trunk/Source

Regression(r287684) Microsoft teams meeting URLs fail to open the app
https://bugs.webkit.org/show_bug.cgi?id=236516
<rdar://88678598>

Reviewed by Geoffrey Garen.

Add a quirk for Microsoft teams.

Source/WebCore:

  • page/Quirks.cpp:

(WebCore::Quirks::shouldAllowNavigationToCustomProtocolWithoutUserGesture):

  • page/Quirks.h:

Source/WebKit:

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForNavigationAction):

12:10 PM Changeset in webkit [289657] by Russell Epstein
  • 3 edits in branches/safari-613.1.17.1-branch/Source/ThirdParty/ANGLE

Apply patch. rdar://problem/87136345

12:07 PM Changeset in webkit [289656] by Jonathan Bedard
  • 2 edits in trunk/Tools

Git commit message hook should allow source = 'template' case
https://bugs.webkit.org/show_bug.cgi?id=236504
<rdar://problem/88787806>

Reviewed by Tim Horton.

  • Scripts/hooks/prepare-commit-msg: 'template' should be handled like 'commit'
12:05 PM Changeset in webkit [289655] by Russell Epstein
  • 6 edits
    2 adds in branches/safari-613.1.17.1-branch

Cherry-pick r289526. rdar://problem/87061239

[:has() pseudo-class] Nullptr crash with non-function :has
https://bugs.webkit.org/show_bug.cgi?id=236431
rdar://87061239

Reviewed by Cameron McCormack.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/parsing/parse-has-expected.txt:
  • web-platform-tests/css/selectors/parsing/parse-has.html:

Source/WebCore:

Test: fast/selectors/malformed-has.html

  • css/parser/CSSSelectorParser.cpp: (WebCore::isOnlyPseudoClassFunction):

:has() is legal, plain :has is not.

LayoutTests:

  • fast/selectors/malformed-has-expected.txt: Added.
  • fast/selectors/malformed-has.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289526 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12:04 PM Changeset in webkit [289654] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-613.1.17.1-branch

Cherry-pick r289443. rdar://problem/88593617

REGRESSION (15.4): Angular virtual scrollers no longer work (because of contain:strict)
https://bugs.webkit.org/show_bug.cgi?id=236260

Patch by Rob Buis <rbuis@igalia.com> on 2022-02-08
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/contain-paint-049-expected.txt: Added.
  • web-platform-tests/css/css-contain/contain-paint-049.html: Added.

Source/WebCore:

Paint containment did not allow collecting scrollable overflow, breaking scrolling
of the container contents, this patch fixes that.

Test: imported/w3c/web-platform-tests/css/css-contain/contain-paint-049.html

  • rendering/RenderBox.cpp: (WebCore::RenderBox::addOverflowFromChild):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289443 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12:04 PM Changeset in webkit [289653] by Russell Epstein
  • 2 edits in branches/safari-613.1.17.1-branch/Source/WebKit

Cherry-pick r289380. rdar://problem/86904276

Reduce allocations and increase thread safety of constructedPath
https://bugs.webkit.org/show_bug.cgi?id=236286
<rdar://86904276>

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-08
Reviewed by Chris Dumez.

  • UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289380 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12:04 PM Changeset in webkit [289652] by Russell Epstein
  • 6 edits in branches/safari-613.1.17.1-branch

Cherry-pick r289377. rdar://problem/88178304

Return 'none' for the computed style of mask when there are no mask images
https://bugs.webkit.org/show_bug.cgi?id=236265
<rdar://88178304>

Patch by Matt Woodrow <Matt Woodrow> on 2022-02-08
Reviewed by Dean Jackson.

Source/WebCore:

Rather than returning all the longhand properties, return 'none' if there are no
mask images. This no longer matches the behaviour of the 'background' property, but
better matches what other UAs do.

Ideally we'd return the smallest possible canonical representation of the non-initial
property values, but this is a much simpler change to fix a compat regression.

Test: fast/masking/parsing-mask.html
Updates expected results to match new behavior.

  • css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::getLayerCount): (WebCore::ComputedStyleExtractor::getFillLayerPropertyShorthandValue): (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue): (WebCore::ComputedStyleExtractor::getMaskShorthandValue):
  • css/CSSComputedStyleDeclaration.h:

LayoutTests:

  • fast/masking/parsing-mask-expected.txt:
  • fast/masking/parsing-mask.html:

Updated expected results to expect 'none' for all cases where there isn't an actual mask
image.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289377 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:58 AM Changeset in webkit [289651] by Russell Epstein
  • 3 edits in branches/safari-613.1.17.0-branch/Source/ThirdParty/ANGLE

Apply patch. rdar://problem/87136345

11:58 AM Changeset in webkit [289650] by Russell Epstein
  • 6 edits
    2 adds in branches/safari-613.1.17.0-branch

Cherry-pick r289526. rdar://problem/87061239

[:has() pseudo-class] Nullptr crash with non-function :has
https://bugs.webkit.org/show_bug.cgi?id=236431
rdar://87061239

Reviewed by Cameron McCormack.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/parsing/parse-has-expected.txt:
  • web-platform-tests/css/selectors/parsing/parse-has.html:

Source/WebCore:

Test: fast/selectors/malformed-has.html

  • css/parser/CSSSelectorParser.cpp: (WebCore::isOnlyPseudoClassFunction):

:has() is legal, plain :has is not.

LayoutTests:

  • fast/selectors/malformed-has-expected.txt: Added.
  • fast/selectors/malformed-has.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289526 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:58 AM Changeset in webkit [289649] by Russell Epstein
  • 4 edits in branches/safari-613.1.17.0-branch

Cherry-pick r289502. rdar://problem/88528286

WKWebView: WKURLSchemeHandler “request to the end of the resource” produces an invalid header
https://bugs.webkit.org/show_bug.cgi?id=236401
rdar://88528286

Reviewed by Brent Fulgham.

Source/WebCore:

https://webkit.org/b/203302 added support for Range requests to AVAssetResourceLoadingDataRequest,
but it incorrectly used '*' instead of for "last-byte-pos:" for a request to the end of the resource.

API test URLSchemeHandler.Ranges was updated.

  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: (WebCore::WebCoreAVFResourceLoader::startLoading):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289502 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:58 AM Changeset in webkit [289648] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-613.1.17.0-branch

Cherry-pick r289443. rdar://problem/88593617

REGRESSION (15.4): Angular virtual scrollers no longer work (because of contain:strict)
https://bugs.webkit.org/show_bug.cgi?id=236260

Patch by Rob Buis <rbuis@igalia.com> on 2022-02-08
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/contain-paint-049-expected.txt: Added.
  • web-platform-tests/css/css-contain/contain-paint-049.html: Added.

Source/WebCore:

Paint containment did not allow collecting scrollable overflow, breaking scrolling
of the container contents, this patch fixes that.

Test: imported/w3c/web-platform-tests/css/css-contain/contain-paint-049.html

  • rendering/RenderBox.cpp: (WebCore::RenderBox::addOverflowFromChild):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289443 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:58 AM Changeset in webkit [289647] by Russell Epstein
  • 2 edits in branches/safari-613.1.17.0-branch/Source/WebKit

Cherry-pick r289380. rdar://problem/86904276

Reduce allocations and increase thread safety of constructedPath
https://bugs.webkit.org/show_bug.cgi?id=236286
<rdar://86904276>

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-08
Reviewed by Chris Dumez.

  • UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289380 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:58 AM Changeset in webkit [289646] by Russell Epstein
  • 6 edits in branches/safari-613.1.17.0-branch

Cherry-pick r289377. rdar://problem/88178304

Return 'none' for the computed style of mask when there are no mask images
https://bugs.webkit.org/show_bug.cgi?id=236265
<rdar://88178304>

Patch by Matt Woodrow <Matt Woodrow> on 2022-02-08
Reviewed by Dean Jackson.

Source/WebCore:

Rather than returning all the longhand properties, return 'none' if there are no
mask images. This no longer matches the behaviour of the 'background' property, but
better matches what other UAs do.

Ideally we'd return the smallest possible canonical representation of the non-initial
property values, but this is a much simpler change to fix a compat regression.

Test: fast/masking/parsing-mask.html
Updates expected results to match new behavior.

  • css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::getLayerCount): (WebCore::ComputedStyleExtractor::getFillLayerPropertyShorthandValue): (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue): (WebCore::ComputedStyleExtractor::getMaskShorthandValue):
  • css/CSSComputedStyleDeclaration.h:

LayoutTests:

  • fast/masking/parsing-mask-expected.txt:
  • fast/masking/parsing-mask.html:

Updated expected results to expect 'none' for all cases where there isn't an actual mask
image.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289377 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:57 AM Changeset in webkit [289645] by Russell Epstein
  • 9 edits in branches/safari-613.1.17.1-branch/Source

Versioning.

WebKit-7613.1.17.1.1

11:55 AM Changeset in webkit [289644] by Elliott Williams
  • 3 edits
    1 delete in trunk/Source/WTF

Fix headers in install builds and add untracked headers
https://bugs.webkit.org/show_bug.cgi?id=235744

Reviewed by Alexey Proskuryakov.
Relands native Xcode build phases for "Copy WTF Headers", again.

Adds a slash prefix, so that PRIVATE_HEADERS_FOLDER_PATH is always an absolute path.
Otherwise, when WTF_INSTALL_PATH_PREFIX is not set, it's relative and incorrectoly copied
into the INSTALL_PATH (/usr/local/lib).

Uses separate path variables for Copy Files phases that create header subdirectories. Unlike
the native "Headers" phase, copying to "/usr/local/include" is not automatically relative to
the SYMROOT or DSTROOT, respective of build action type.

Adds SignedPtr.h to WTF's Headers phase. It was added recently and missed integration in
r289256.

Sets INSTALLHDRS_COPY_PHASE so that nested header directories are copied during installhdrs.

  • Configurations/WTF.xcconfig:
  • WTF.xcodeproj/project.pbxproj:
11:54 AM Changeset in webkit [289643] by Jonathan Bedard
  • 4 edits in trunk/Tools

[git-webkit] Reset target branch when landing fails
https://bugs.webkit.org/show_bug.cgi?id=236110
<rdar://problem/88463164>

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/land.py:

(Land.revert_branch): Move branch to specified remote's representation of the branch.
(Land.main): If we fail to land a change after moving a branch's local ref to include that
change, we should return that local ref to what the branch's remote reports.

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

11:47 AM Changeset in webkit [289642] by Simon Fraser
  • 9 edits
    2 adds in trunk/Source/WebKit

Introduce a RemoteLayerBackingStoreCollection subclass for GPU Process-based rendering
https://bugs.webkit.org/show_bug.cgi?id=236468

Reviewed by Tim Horton.

Add RemoteLayerWithRemoteRenderingBackingStoreCollection, a subclass of RemoteLayerBackingStoreCollection
which is instantiated by RemoteLayerTreeContext when DOM rendering in GPU process is enabled.

Delegate buffer allocation to this now polymorphic class; RemoteLayerBackingStore no longer
consults shouldUseRemoteRenderingFor().

RemoteLayerWithRemoteRenderingBackingStoreCollection needs a back pointer to RemoteLayerTreeContext
to get to the RemoteRenderingBackendProxy.

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::backingStoreCollection const):
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):

  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h:

(WebKit::RemoteLayerBackingStoreCollection::layerTreeContext const):

  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:

(WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
(WebKit::RemoteLayerBackingStoreCollection::allocateBufferForBackingStore):

  • Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.h: Added.
  • Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.mm: Added.

(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::RemoteLayerWithRemoteRenderingBackingStoreCollection):
(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::remoteRenderingBackendProxy):
(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::allocateBufferForBackingStore):

  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.h:

(WebKit::RemoteLayerTreeContext::backingStoreCollection):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:

(WebKit::RemoteLayerTreeContext::RemoteLayerTreeContext):

11:45 AM Changeset in webkit [289641] by Russell Epstein
  • 9 edits in branches/safari-613.1.17.0-branch/Source

Versioning.

WebKit-7613.1.17.0.1

11:36 AM Changeset in webkit [289640] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Keep promise in scope when calling DeferredPromise::reject
https://bugs.webkit.org/show_bug.cgi?id=236454

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2022-02-11
Reviewed by Youenn Fablet.

Keep promise in scope when calling DeferredPromise::reject, as createDOMException
could go through a path that invokes GC on its owner and the promise.

  • bindings/js/JSDOMPromiseDeferred.cpp:

(WebCore::DeferredPromise::reject):

11:34 AM Changeset in webkit [289639] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

The GPU process should not check in with Launch Services
https://bugs.webkit.org/show_bug.cgi?id=236457

Reviewed by Geoffrey Garen.

Since the GPU process is not an application in the normal sense, there is no need to call _LSApplicationCheckIn.
The function _CSCheckFixDisable should still be called.

  • GPUProcess/mac/GPUProcessMac.mm:

(WebKit::GPUProcess::initializeProcess):

11:10 AM Changeset in webkit [289638] by Jonathan Bedard
  • 2 edits in trunk/Tools

[EWS] Enable WPE and WinCairo queues for PRs
https://bugs.webkit.org/show_bug.cgi?id=236517
<rdar://problem/88823117>

Reviewed by Aakash Jain.

  • Tools/CISupport/ews-build/config.json:

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

10:24 AM Changeset in webkit [289637] by ntim@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix: revert r289616

  • WebCore.xcodeproj/project.pbxproj:
10:12 AM Changeset in webkit [289636] by Russell Epstein
  • 1 copy in tags/Safari-614.1.2.1

Tag Safari-614.1.2.1.

10:10 AM Changeset in webkit [289635] by Russell Epstein
  • 1 copy in branches/safari-613.1.17.3-branch

New branch.

10:10 AM Changeset in webkit [289634] by Russell Epstein
  • 1 copy in branches/safari-613.1.17.2-branch

New branch.

10:10 AM Changeset in webkit [289633] by Russell Epstein
  • 1 copy in branches/safari-613.1.17.1-branch

New branch.

10:10 AM Changeset in webkit [289632] by Russell Epstein
  • 1 copy in branches/safari-613.1.17.0-branch

New branch.

9:55 AM Changeset in webkit [289631] by jonlee@apple.com
  • 5 edits in trunk/LayoutTests

Unreviewed gardening.

Update fuzzy data based on EWS results to support b231828.
LayoutTests/imported/w3c:

  • web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-1.html:

LayoutTests:

  • css3/color-filters/color-filter-text-decoration-shadow.html:
  • fast/text/system-font-fallback.html:
9:53 AM Changeset in webkit [289630] by ntim@apple.com
  • 3 edits in trunk/Source/WebCore

Unreviewed followup: address Youenn's feedback for PDFDocument.

  • html/PDFDocument.cpp:

(WebCore::PDFDocumentEventListener::handleEvent):
(WebCore::PDFDocument::createDocumentStructure):
(WebCore::PDFDocument::updateDuringParsing):
(WebCore::PDFDocument::finishedParsing):
(WebCore::PDFDocument::injectContentScript):

  • html/PDFDocument.h:
9:47 AM Changeset in webkit [289629] by jonlee@apple.com
  • 5 edits in trunk/LayoutTests

Unreviewed gardening.

Update fuzzy data based on EWS results to support b231828.

  • css3/blending/background-blend-mode-body-transparent-color-and-image.html:
  • css3/calc/border-radius.html:
  • svg/gradients/spreadMethodDiagonal3.svg:
  • svg/gradients/spreadMethodDiagonal4.svg:
9:40 AM Changeset in webkit [289628] by youenn@apple.com
  • 75 edits
    3 copies
    2 adds in trunk

Support remote video frames in WebRTC video pipeline
https://bugs.webkit.org/show_bug.cgi?id=236356

Reviewed by Kimmo Kinnunen.

Source/ThirdParty/libwebrtc:

Introduce a way for ObjCFrameBuffer to not directly own a CVPixelBufferRef but a pointer
that can be used to get a CVPixelBufferRef. This is used to allow remote frames to be sent over to libwebrtc.

  • Configurations/libwebrtc.iOS.exp:
  • Configurations/libwebrtc.iOSsim.exp:
  • Configurations/libwebrtc.mac.exp:
  • Source/webrtc/sdk/WebKit/WebKitDecoder.h:
  • Source/webrtc/sdk/WebKit/WebKitDecoder.mm:
  • Source/webrtc/sdk/WebKit/WebKitUtilities.h:
  • Source/webrtc/sdk/WebKit/WebKitUtilities.mm:
  • Source/webrtc/sdk/objc/native/src/objc_frame_buffer.h:
  • Source/webrtc/sdk/objc/native/src/objc_frame_buffer.mm:

Source/WebCore:

Allow to receive/send remote frames as webrtc VideoFrame buffers.
We are not yet optimizing remove video frame sending as this requires moving remote video frame to WebCore.
This will be done as a follow-up.

Covered by existing tests and updated tests to enable the experimental flag.

  • platform/MediaSample.h:
  • platform/VideoFrame.cpp:
  • platform/VideoFrame.h:
  • platform/graphics/RemoteVideoSample.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
  • platform/mediastream/RealtimeVideoSource.cpp:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.h:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:

Source/WebKit:

Allow receiving remote samples from camera or HW decoders.
In that case, we create remote video frames and allow piping them to our existing pipeline.
We update MediaRecorder and LibWebRTC HW encoders to deal with this.
Since we have a code path that requires getting access to the raw pixels, we introduce RemoteVideoFrameObjectHeapProxy
to allow getting that data through shared memory asynchronously.
RemoteVideoFrameProxy will then use a semaphore to block on the async IPC result.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • GPUProcess/GPUConnectionToWebProcess.cpp:
  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.cpp:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.h:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.messages.in:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.h:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.messages.in:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:
  • GPUProcess/webrtc/RemoteMediaRecorder.h:
  • GPUProcess/webrtc/RemoteMediaRecorder.messages.in:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:
  • Shared/ThreadSafeObjectHeap.h:
  • Sources.txt:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/GPUProcessConnection.cpp:
  • WebProcess/GPU/GPUProcessConnection.h:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
  • WebProcess/GPU/media/RemoteVideoFrameIdentifier.h:
  • WebProcess/GPU/media/RemoteVideoFrameProxy.cpp:
  • WebProcess/GPU/media/RemoteVideoFrameProxy.h:
  • WebProcess/GPU/media/RemoteVideoFrameProxyIdentifier.h: Added.
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.messages.in:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:
  • WebProcess/GPU/webrtc/RemoteVideoFrameObjectHeapProxy.h: Added.
  • WebProcess/GPU/webrtc/RemoteVideoFrameObjectHeapProxyProcessor.cpp: Added.
  • WebProcess/GPU/webrtc/RemoteVideoFrameObjectHeapProxyProcessor.h: Added.
  • WebProcess/GPU/webrtc/RemoteVideoFrameObjectHeapProxyProcessor.messages.in: Added.
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:
  • WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:
  • WebProcess/cocoa/RemoteCaptureSampleManager.h:
  • WebProcess/cocoa/RemoteCaptureSampleManager.messages.in:
  • WebProcess/cocoa/RemoteRealtimeMediaSourceProxy.cpp:
  • WebProcess/cocoa/RemoteRealtimeMediaSourceProxy.h:
  • WebProcess/cocoa/RemoteRealtimeVideoSource.cpp:
  • WebProcess/cocoa/UserMediaCaptureManager.cpp:
  • WebProcess/cocoa/UserMediaCaptureManager.h:

Source/WTF:

Introduce an experimental flag to make use of remote frames in WebRTC code paths.

  • Scripts/Preferences/WebPreferencesInternal.yaml:

Tools:

Allow switching on the new remote video frame flag.

  • WebKitTestRunner/TestOptions.cpp:

LayoutTests:

Enabling remote video frames for below tests.

  • webrtc/video-mute-vp8.html:
  • webrtc/video-mute.html:
  • webrtc/video-rotation.html:
  • webrtc/video.html:
9:30 AM Changeset in webkit [289627] by ntim@apple.com
  • 5 edits
    1 copy
    5 adds in trunk/Source/WebCore

Inject custom styles into PDF.js to make it look like PDFKit
https://bugs.webkit.org/show_bug.cgi?id=236510

Reviewed by Tim Horton.

This introduces a pdfjs-extras directory that is copied in the pdfjs/extras resource subdirectory at build-time.

In that directory contains a content-script.js file that is executed when the PDFJS iframe loads. Currently, that
content script only injects the PDFKit styling, but it may be used for other types of interaction in the future
(e.g. loading a blob, hooking with find-in-page messages, etc.).

In PDFDocument, we add m_iframe, a ref to the PDFDocument iframe, that we can re-use when the iframe loads,
to inject the content script.

PDFDocumentEventListener handles the iframe load event listener.

m_viewerRendered which was set once the <iframe> was added to the document, is now no longer needed, since we can
check for m_iframe directly.

(const.PDFJSContentScript.injectStyle):
(const.PDFJSContentScript.init):

(body):
(@keyframes fade-out):
(to):
(#loadingBar):
(#toolbarContainer):
(#toolbarViewer):
(#toolbarViewer:hover):
(#toolbarViewerMiddle,):
(#toolbarViewerLeft,):
(#toolbarViewer .toolbarButton):
(#toolbarViewer .toolbarButton:active):
(#toolbarViewer .toolbarButton::before):
(#zoomOut):
(#zoomIn):
(#zoomOut + .splitToolbarButtonSeparator):
(#download):
(#viewerContainer):
(#findbar):
(#findbar:not(.hidden) ~ #viewerContainer):
(#findbar::before,):
(#findbarOptionsTwoContainer):
(#findResultsCount,):
(#findbar .splitToolbarButton > .toolbarButton::before):
(#findInput:focus):
(#findInput[data-status="notFound"]):

  • WebCore.xcodeproj/project.pbxproj:
  • dom/EventListener.h:
  • html/PDFDocument.cpp:

(WebCore::PDFDocumentEventListener::handleEvent):
(WebCore::PDFDocumentEventListener::operator== const):
(WebCore::PDFDocument::PDFDocument):
(WebCore::PDFDocument::createDocumentStructure):
(WebCore::PDFDocument::updateDuringParsing):
(WebCore::PDFDocument::finishedParsing):
(WebCore::PDFDocument::injectContentScript):
(WebCore::m_viewerRendered): Deleted.

  • html/PDFDocument.h:
9:24 AM Changeset in webkit [289626] by Russell Epstein
  • 9 edits in branches/safari-614.1.2-branch/Source

Versioning.

WebKit-7614.1.2.1

9:23 AM Changeset in webkit [289625] by Jonathan Bedard
  • 3 edits in trunk/Tools

[EWS] Support PRs in UploadTestResults and ExtractTestResults
https://bugs.webkit.org/show_bug.cgi?id=236446
<rdar://problem/88756592>

Reviewed by Aakash Jain.

  • CISupport/ews-build/steps.py:

(ConfigureBuild.add_pr_details): Shorten hash to 8 characters.
(UploadTestResults.init): Use change_id instead of patch_id.
(ExtractTestResults.init): Ditto.

  • CISupport/ews-build/steps_unittest.py:

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

9:11 AM Changeset in webkit [289624] by Wenson Hsieh
  • 3 edits in trunk/Source/WebKit

Unreviewed, non-unified build fixes in WKPaymentAuthorizationDelegate

Include several missing headers.

  • Platform/cocoa/WKPaymentAuthorizationDelegate.h:
  • Platform/cocoa/WKPaymentAuthorizationDelegate.mm:
9:01 AM Changeset in webkit [289623] by Wenson Hsieh
  • 17 edits in trunk/Source

[iOS] Add support for a "markup image" item in the callout bar when selecting a single image
https://bugs.webkit.org/show_bug.cgi?id=236415
rdar://88714333

Reviewed by Aditya Keerthi.

Source/WebCore:

Export a couple of functions; see WebKit/ChangeLog for more details.

  • platform/graphics/Image.h:
  • platform/graphics/cg/UTIRegistry.h:

Source/WebKit:

This patch introduces support for a new "Markup Image" callout menu item, which is only shown when the user has
selected exactly one image. If the image is suitable for "Markup Image" (that is, the relevant VisionKit API
returns a non-null image), then we show a new item in the callout bar which, when activated, replaces the
current selection with the image returned by the aforementioned VisionKit API.

See below for more details.

  • Platform/cocoa/TextRecognitionUtilities.h:
  • Platform/cocoa/TextRecognitionUtilities.mm:

(WebKit::isImageAnalysisMarkupSystemFeatureEnabled):

Add a new helper method to return whether or not the corresponding system feature flag is enabled.

  • Shared/EditorState.cpp:

(WebKit::EditorState::PostLayoutData::encode const):
(WebKit::EditorState::PostLayoutData::decode):

  • Shared/EditorState.h:

Add an optional ElementContext that's populated only if the user's selection spans a single HTMLImageElement.

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView didMoveToWindow]):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::requestImageBitmap):

Add a new async IPC message that allows the UI process to grab a ShareableBitmap handle (along with the MIME
type of the source image) given an ElementContext that identifies an image element.

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WKContentViewInteraction.h:

Cache the last result from requesting "Image Markup" data from VisionKit in _imageAnalysisMarkupResults, and
use this information when invoking the new selector, -performImageAnalysisMarkup:.

  • UIProcess/ios/WKContentViewInteraction.mm:

(WebKit::transcode):

Add a helper method that takes a CGImageRef, transcodes it to the given uniform type identifier, and finally
returns a blob of image data. Used by the two new call sites for Image Markup below, as well as an existing call
site for Visual Look Up in -provideDataForItem:

(-[WKContentView targetForAction:withSender:]):

Add a check for the new Image Markup action selector.

(-[WKContentView requestRectsToEvadeForSelectionCommandsWithCompletionHandler:]):

Use this existing UIKit delegate hook to defer callout bar presentation only in the case where a single image
element is selected, such that we only show the callout bar in this scenario once VisionKit has determined
whether or not the "Image Markup" action is suitable for the data of the selected image.

The initial purpose of this delegate hook was to allow WebKit to defer callout bar presentation for a short,
hard-coded delay to wait for the web page to layout out or add clickable items that might underlap the callout
bar; as such, we still perform this logic with a hard-coded delay of 250 ms (including whatever time was taken
during image analysis).

(-[WKContentView updateImageAnalysisMarkupMenuItems:]):

Append the new menu item only if the system feature flag is enabled, and we've selected an editable image. Note
that this intentionally does not consult _imageAnalysisMarkupResults to ensure that the state of additional
menu items in the shared menu controller is consistent between Markup Image and Quick Note, and updated in the
same lifecycle as editor state updates.

(-[WKContentView canPerformImageAnalysisMarkup]):

This is consulted when we're actually about to show the callout bar action for "Image Markup" (importantly,
after callout bar presentation deferral), and depends on the state of _imageAnalysisMarkupResults.

(-[WKContentView performImageAnalysisMarkup:]):

Add logic to handle the new action by calling into WebPageProxy to (basically) paste the modified image data
after transcoding it to match the image element's original source type. After #236406, this codepath is now
available on all Cocoa platforms (as opposed to macOS-only).

(-[WKContentView doAfterComputingImageAnalysisResultsForMarkup:]):

Use the new requestImageBitmap IPC message to grab a bitmap for the currently selected image, call out to
VisionKit to perform image analysis, and then cache the resulting image. After all of this is done, we proceed
with showing the callout bar.

In a followup, we should enforce some (reasonable) upper bound on the amount of time by which the callout bar
can be delayed.

(-[WKContentView _selectionChanged]):
(-[WKContentView setUpAdditionalMenuControllerActions]):

Refactor existing logic for supplying additional callout bar menu items, such that we update items as needed for
both Quick Note as well as Image Markup. Note that we need to preserve any existing menu items in the shared
UIMenuController, since the WebKit client (e.g. Mail) may have already supplied custom menu items. This
currently doees not affect Quick Note since the only internal client that enables Quick Note is Safari, which
does not attempt to add any of its own items; however, "Markup Image" needs to be available in Mail on iOS as
well, which does use custom menu items.

(findMenuItemWithAction):
(-[WKContentView updateAppHighlightMenuItems:]):

Make this adjust the given mutable array of UIMenuItems, which are then combined with any markup menu items
when setting custom items on the shared menu controller.

(-[WKContentView provideDataForItem:]):

Adjust this to use the new transcode helper function, declared above.

(-[WKContentView _setUpImageAnalysis]):
(-[WKContentView _tearDownImageAnalysis]):
(-[WKContentView setUpAppHighlightMenusIfNeeded]): Deleted.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::requestImageBitmap):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getPlatformEditorState const):

Compute and populate the new selectedEditableImage element context; to achieve this, we use TextIterator to
scan for an image element, and bail immediately if we either find anything that is not an image, or find more
than one image.

8:08 AM Changeset in webkit [289622] by commit-queue@webkit.org
  • 45 edits
    3 copies
    7 adds in trunk

Introduce a RemoteMediaSampleProxy to represent captured video frames used in Media Streams and present in GPUP
https://bugs.webkit.org/show_bug.cgi?id=236099

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-11
Reviewed by Youenn Fablet.

Source/WebCore:

Add VideoFrame : public MediaStream, base class for Media Stream video frames.
Currently inherits from MediaSample, but later will remove the MediaSample.

The WebCore::VideoFrame is intended to be used in various entry-points that
currently are currently typed as:

void videoSampleAvailable(MediaSample&, VideoSampleMetadata, ...).

The new class WebKit::RemoteVideoFrameProxy : public VideoFrame can be passed to these APIs.
The API entrypoints are not yet changed in order to partially roll the changes in.
Later on, the entrypoints will be similar to:

void videoSampleAvailable(VideoFrame&, VideoSampleMetadata, ...).

Removes MediaSample::setTrackID as that is not used.
Changes MediaSample::platformSample() to const, so that it can be called from
const context.

No new tests, refactor.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/MediaSample.h:
  • platform/VideoFrame.cpp: Added.

(WebCore::VideoFrame::decodeTime const):
(WebCore::VideoFrame::duration const):
(WebCore::VideoFrame::trackID const):
(WebCore::VideoFrame::sizeInBytes const):
(WebCore::VideoFrame::presentationSize const):
(WebCore::VideoFrame::offsetTimestampsBy):
(WebCore::VideoFrame::setTimestamps):
(WebCore::VideoFrame::isDivisable const):
(WebCore::VideoFrame::divide):
(WebCore::VideoFrame::createNonDisplayingCopy const):
(WebCore::VideoFrame::flags const):
(WebCore::VideoFrame::byteRange const):
(WebCore::VideoFrame::dump const):

  • platform/VideoFrame.h: Added.
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:

(WebCore::LocalSampleBufferDisplayLayer::enqueueSampleBuffer):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateCurrentFrameImage):

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:

(isType):

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:

(WebCore::MediaSampleAVFObjC::platformSample const):

  • platform/graphics/gstreamer/MediaSampleGStreamer.cpp:

(WebCore::MediaSampleGStreamer::platformSample const):

  • platform/graphics/gstreamer/MediaSampleGStreamer.h:
  • platform/mock/mediasource/MockSourceBufferPrivate.cpp:

(WebCore::MockMediaSample::platformSample const):

Source/WebKit:

Changes after revert:

  • For now, create the RemoteVideoFrame in GPUP using synchronous message. This way RemoteVideoFrameProxy does not need to receive messages. It cannot easily do that, as it is referenced in multiple threads and thus we cannot remove the message destination for the instance from GPUProcess instance, as that operation is main thread only. The type cannot be DestructionThread::Main, as we do not (yet) control the base class (MediaSample).

WebContent process:
Add WebKit::RemoteVideoFrameProxy, WebContent process side proxy object that
WebCore::MediaPlayerPrivateMediaStreamAVFObjC can use.

RemoteVideoFrameProxy can be sent to the GPUP and the the SampleBufferDisplayLayer. So
the captured content shows in compositing through video element.

At the moment MediaPlayerPrivateMediaStreamAVFObjC cannot paint RemoteVideoFrameProxy to the
document CSS painted content, Context2D or WebGL canvas.

GPUP:
RemoteVideoFrameObjectHeap is a mapping
RemoteVideoFrameIdentifier -> MediaSample. Currently all objects
map to normal MediaSampleAVFObjC.

Add an example implementation where a remote MediaSample is returned by IPC:
RemoteGraphicsContextGL::paintCompositedResultsToMediaSample().

The GPUP object pointed by RemoteVideoFrameIdentifier is:

  • created in RemoteGraphicsContextGL::paintCompositedResultsToMediaSample() in RemoteGraphicsContextGL thread
  • consumed in RemoteSampleBufferDisplayLayer::enqueueSample in RemoteSampleBufferDisplayLayerManager thread
  • released in RemoteVideoFrameObjectHeap::releaseVideoFrame in GPUP main thread

All of these messages are asynchronous and can arrive to their destination in any order.
For example, request to release the video frame can happen before the message to create the video frame has been
received.

To solve the ordering issue, introduce readers-writers reference counting method via following classes:

  • ObjectIdentifierReadReference
  • ObjectIdentifierWriteReference
  • ObjectIdentifierReferenceTracker

ObjectIdentifier identifies the object.
ObjectIdentifierWriteReference identifies a new version of the content pointed by the identifier.
Pseudocode examples:

WriteReference { identifier = 1, pendingReads = 0, version = 0 } means:

"End the life-time of identifier 1, version 0. Create version = 1"
This is how initial object is assigned to the reference.

WriteReference { identifier = 1, pendingReads = 77, version = 32 } means

"End the life-time of identifier 1, version 32 when all 77 reads have completed. Create version = 33"

ObjectIdentifierReadReference declares a read dependency to a specific version of the content pointed by the identifier.
Pseudocode examples:

ReadReference { identifier = 1, version = 32 } means
"Complete one read of identifier 1, version 32".

Creates, updates and destructions are WriteReferences.
Reads are ReadReferences.

The ObjectIdentifierReferenceTracker creates write and read references in the Proxy -using process (WebContent process).

The added ThreadSafeObjectHeap resolves the read and write references in the real object process (GPUP in this case).
Reads and writes are blocking the requesting thread appropriately:

  • Read of unknown version of the identifier blocks until the write creates the version
  • Write of new version of the identifier blocks until the reads have retired, or creates parallel, new version of the content in case of copy-on-write schemes.

In this commit objects pointed by RemoteVideoFrameIdentifier are immutable until destroyed, so there is no update or
copy-on-write scheme here.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::GPUConnectionToWebProcess):
(WebKit::GPUConnectionToWebProcess::didClose):
(WebKit::GPUConnectionToWebProcess::videoFrameObjectHeap const):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::RemoteGraphicsContextGL::RemoteGraphicsContextGL):
(WebKit::RemoteGraphicsContextGL::paintCompositedResultsToMediaSample):

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:
  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.cpp: Added.

(WebKit::RemoteVideoFrameObjectHeap::create):
(WebKit::RemoteVideoFrameObjectHeap::RemoteVideoFrameObjectHeap):
(WebKit::RemoteVideoFrameObjectHeap::~RemoteVideoFrameObjectHeap):
(WebKit::RemoteVideoFrameObjectHeap::stopListeningForIPC):
(WebKit::RemoteVideoFrameObjectHeap::releaseVideoFrame):

  • GPUProcess/media/RemoteVideoFrameObjectHeap.h: Copied from Source/WebKit/Shared/IPCTester.h.
  • GPUProcess/media/RemoteVideoFrameObjectHeap.messages.in: Copied from Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in.
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:

(WebKit::RemoteSampleBufferDisplayLayer::create):
(WebKit::RemoteSampleBufferDisplayLayer::RemoteSampleBufferDisplayLayer):
(WebKit::RemoteSampleBufferDisplayLayer::enqueueSample):
(WebKit::RemoteSampleBufferDisplayLayer::enqueueSampleCV):

  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp:

(WebKit::RemoteSampleBufferDisplayLayerManager::createLayer):

  • Scripts/webkit/messages.py:

(types_that_cannot_be_forward_declared):
(headers_for_type):

  • Shared/IPCTester.cpp:

(WebKit::IPCTester::startMessageTesting):
(WebKit::isTestingIPC):

  • Shared/IPCTester.h:

(WebKit::isTestingIPC):

  • Shared/ObjectIdentifierReferenceTracker.h: Added.

(WebKit::ObjectIdentifierReference::ObjectIdentifierReference):
(WebKit::ObjectIdentifierReference::identifier const):
(WebKit::ObjectIdentifierReference::version const):
(WebKit::ObjectIdentifierReference::operator== const):
(WebKit::ObjectIdentifierReference::isHashTableDeletedValue const):
(WebKit::ObjectIdentifierReference::encode const):
(WebKit::ObjectIdentifierReference::decode):
(WebKit::ObjectIdentifierReadReference::ObjectIdentifierReadReference):
(WebKit::ObjectIdentifierReadReference::identifier const):
(WebKit::ObjectIdentifierReadReference::version const):
(WebKit::ObjectIdentifierReadReference::reference const):
(WebKit::ObjectIdentifierReadReference::encode const):
(WebKit::ObjectIdentifierReadReference::decode):
(WebKit::ObjectIdentifierWriteReference::generateForAdd):
(WebKit::ObjectIdentifierWriteReference::ObjectIdentifierWriteReference):
(WebKit::ObjectIdentifierWriteReference::identifier const):
(WebKit::ObjectIdentifierWriteReference::version const):
(WebKit::ObjectIdentifierWriteReference::pendingReads const):
(WebKit::ObjectIdentifierWriteReference::reference const):
(WebKit::ObjectIdentifierWriteReference::retiredReference const):
(WebKit::ObjectIdentifierWriteReference::encode const):
(WebKit::ObjectIdentifierWriteReference::decode):
(WebKit::ObjectIdentifierReferenceTracker::ObjectIdentifierReferenceTracker):
(WebKit::ObjectIdentifierReferenceTracker::read const):
(WebKit::ObjectIdentifierReferenceTracker::write const):
(WebKit::ObjectIdentifierReferenceTracker::identifier const):
(WebKit::add):
(WebKit::operator<<):
(WTF::DefaultHash<WebKit::ObjectIdentifierReference<T>>::hash):
(WTF::DefaultHash<WebKit::ObjectIdentifierReference<T>>::equal):

  • Shared/ThreadSafeObjectHeap.h: Added.

(WebKit::ThreadSafeObjectHeap::ReferenceState::ReferenceState):
(WebKit::HeldType>::retire):
(WebKit::HeldType>::retireRemove):
(WebKit::HeldType>::clear):

  • Shared/mac/MediaFormatReader/MediaSampleByteRange.cpp:

(WebKit::MediaSampleByteRange::platformSample const):

  • Shared/mac/MediaFormatReader/MediaSampleByteRange.h:
  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::dispatchMessage):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::paintCompositedResultsToMediaSample):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
  • WebProcess/GPU/graphics/cocoa/RemoteGraphicsContextGLProxyCocoa.mm:
  • WebProcess/GPU/media/RemoteVideoFrameIdentifier.h: Copied from Source/WebKit/Shared/IPCTester.h.
  • WebProcess/GPU/media/RemoteVideoFrameProxy.cpp: Added.

(WebKit::RemoteVideoFrameProxy::properties):
(WebKit::RemoteVideoFrameProxy::create):
(WebKit::RemoteVideoFrameProxy::releaseUnused):
(WebKit::RemoteVideoFrameProxy::RemoteVideoFrameProxy):
(WebKit::RemoteVideoFrameProxy::~RemoteVideoFrameProxy):
(WebKit::RemoteVideoFrameProxy::identifier const):
(WebKit::RemoteVideoFrameProxy::write const):
(WebKit::RemoteVideoFrameProxy::read const):
(WebKit::RemoteVideoFrameProxy::presentationTime const):
(WebKit::RemoteVideoFrameProxy::platformSample const):
(WebKit::RemoteVideoFrameProxy::videoRotation const):
(WebKit::RemoteVideoFrameProxy::videoMirrored const):
(WebKit::RemoteVideoFrameProxy::videoPixelFormat const):
(WebKit::RemoteVideoFrameProxy::videoFrame const):
(WebKit::RemoteVideoFrameProxy::release):

  • WebProcess/GPU/media/RemoteVideoFrameProxy.h: Added.

(WebKit::RemoteVideoFrameProxy::Properties::encode const):
(WebKit::RemoteVideoFrameProxy::Properties::decode):
(isType):

  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:

(WebKit::SampleBufferDisplayLayer::SampleBufferDisplayLayer):
(WebKit::SampleBufferDisplayLayer::~SampleBufferDisplayLayer):
(WebKit::SampleBufferDisplayLayer::enqueueSample):
(WebKit::SampleBufferDisplayLayer::gpuProcessConnectionDidClose):
(WebKit::SampleBufferDisplayLayer::disconnectGPUProcessConnectionIfNeeded):

  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h:

Tools:

  • Scripts/generate-gpup-webgl:
  • TestWebKitAPI/Tests/WebCore/SampleMap.cpp:

LayoutTests:

Captured WebGL to another context2d or WebGL not implemented yet, mark few tests as timing out.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
7:53 AM Changeset in webkit [289621] by Chris Dumez
  • 2 edits in trunk/Source/WebKitLegacy/mac

Unreviewed, fix build with the latest iOS SDK.

  • Plugins/WebBasePluginPackage.mm:

(-[WebBasePluginPackage isNativeLibraryData:]):

7:09 AM WebKitGTK/2.34.x edited by Michael Catanzaro
(diff)
6:53 AM Changeset in webkit [289620] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[GTK] WebKit browser scrollbars not always correctly displayed if overlay scrollbars are disabled
https://bugs.webkit.org/show_bug.cgi?id=234874

Patch by Michael Catanzaro <Michael Catanzaro> on 2022-02-11
Reviewed by Carlos Garcia Campos.

If overlay scrollbars are disabled, and there is not enough content for the page to be
scrollable, and scrollbars are forced using overflow:scroll, then we currently fail to
paint the scrollbars properly. At minimum, we need to paint the scrollbar background, which
is what the macOS port does. Do so.

In the future, we might want to additionally paint the rest of the scrollbars, similar to
the GTK_POLICY_ALWAYS scrollbar policy type, but this would require more work.

  • platform/adwaita/ScrollbarThemeAdwaita.cpp:

(WebCore::ScrollbarThemeAdwaita::paint):

  • platform/gtk/ScrollbarThemeGtk.cpp:

(WebCore::ScrollbarThemeGtk::paint):

5:30 AM Changeset in webkit [289619] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[SOUP] Fix memory leak in WebKitDirectoryInputStream
https://bugs.webkit.org/show_bug.cgi?id=236498

Reviewed by Adrian Perez de Castro.

  • NetworkProcess/soup/WebKitDirectoryInputStream.cpp:

(webkitDirectoryInputStreamRead): Use adoptGRef() for g_bytes_new_from_bytes().

5:02 AM Changeset in webkit [289618] by commit-queue@webkit.org
  • 2 edits in trunk/Tools/buildstream

[Flatpak SDK] Enable GStreamer webrtcdsp support
https://bugs.webkit.org/show_bug.cgi?id=236175

Patch by Philippe Normand <pnormand@igalia.com> on 2022-02-11
Reviewed by Martin Robinson.

  • elements/sdk/gst-plugins-bad.bst: Enable webrtcdsp, needed for VAD handling.
4:47 AM Changeset in webkit [289617] by Antti Koivisto
  • 5 edits in trunk

[CSS Container Queries] Implement container name matching
https://bugs.webkit.org/show_bug.cgi?id=236495

Reviewed by Tim Nguyen.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/container-queries/container-name-invalidation-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-selection-expected.txt:

Source/WebCore:

Find the right container to evaluate against.

  • style/ContainerQueryEvaluator.cpp:

(WebCore::Style::ContainerQueryEvaluator::evaluate const):

4:05 AM Changeset in webkit [289616] by ntim@apple.com
  • 2 edits in trunk/Source/WebCore

Add build phase to copy PDF.js resources to WebCore.framework resources
https://bugs.webkit.org/show_bug.cgi?id=235981

Reviewed by Youenn Fablet.

This adds a new "Run Script" phase that simply copies Source/ThirdParty/pdfjs to
WebCore.framework/Resources/pdfjs, it excludes .svn and .DS_Store files too.

  • WebCore.xcodeproj/project.pbxproj:
2:52 AM Changeset in webkit [289615] by commit-queue@webkit.org
  • 5 edits in trunk

Clicking on an <input type="image"> will submit the form with null submitter
https://bugs.webkit.org/show_bug.cgi?id=236324

LayoutTests/imported/w3c:

Add a test to make sure that when the form is submitted through an <input type="image">
control, the submitter field of the submit event is that control.

Patch by Andreu Botella <andreu@andreubotella.com> on 2022-02-11
Reviewed by Carlos Garcia Campos.

  • web-platform-tests/html/semantics/forms/form-submission-0/form-submission-algorithm-expected.txt:
  • web-platform-tests/html/semantics/forms/form-submission-0/form-submission-algorithm.html:

Source/WebCore:

Patch by Andreu Botella <andreu@andreubotella.com> on 2022-02-11
Reviewed by Carlos Garcia Campos.

If you submit a form by clicking on an <input type="image"> control, the control will be in
the form's entry list, but the submitter field in the submit event will be null. This is
wrong per the spec, and caused because the call to HTMLFormElement::submitIfPossible() in
ImageInputType::handleDOMActivateEvent() calls it with one argument, rather than passing
the element as the submitter.

Tests: imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/form-submission-algorithm.html

  • html/ImageInputType.cpp:

(WebCore::ImageInputType::handleDOMActivateEvent):

2:14 AM Changeset in webkit [289614] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.34/Source/WebKit

Merge r289608 - [WPE][GTK] BubblewrapLauncher leaks D-Bus proxy sockets
https://bugs.webkit.org/show_bug.cgi?id=201771

Reviewed by Michael Catanzaro.

xdg-dbus-proxy removes the socket when the sync fd is closed by the application. In most of the cases the
xdg-dbus-proxy process is killed before the sync fd is closed and the socket file is leaked. We should
explicitly close the sync fd.

  • UIProcess/Launcher/glib/XDGDBusProxy.cpp:

(WebKit::XDGDBusProxy::XDGDBusProxy): Save the sync fd.
(WebKit::XDGDBusProxy::~XDGDBusProxy): Close the sync fd is needed.
(WebKit::XDGDBusProxy::launch const): Return the sync fd.

  • UIProcess/Launcher/glib/XDGDBusProxy.h:
2:14 AM Changeset in webkit [289613] by Carlos Garcia Campos
  • 5 edits
    1 copy
    1 add in releases/WebKitGTK/webkit-2.34/Source/WebKit

Merge r289528 - [GTK][WPE] Refactor the XDGDBusProxy launcher to simplify it and fix some issues
https://bugs.webkit.org/show_bug.cgi?id=236437

Reviewed by Adrian Perez de Castro.

Source/WebKit:

This patch moves the XDGDBusProxy launcher implementation to its own file and fixes the following issues:

  • r289369 introduced an issue with old versions of bwrap that fails to mount over an existing file, so we need to ensure we only bind the original socket for the a11y socket and not the session bus one.
  • bindA11y is GTK specific for some reason, which means WPE doesn't have a11y under the sandbox.
  • The names of the socket paths for a11y and session bus use the same pattern dbus-proxy-XXXXXX, it helps to use a different one.
  • The code to get the a11y DBus address is now duplicated in PlatformDisplay, we can just use the PlatformDisplay to get the address.
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::argumentsToFileDescriptor):
(WebKit::bindDBusSession):
(WebKit::bindA11y):
(WebKit::bubblewrapSpawn):
(WebKit::argsToFd): Deleted.
(WebKit::XDGDBusProxyLauncher::setAddress): Deleted.
(WebKit::XDGDBusProxyLauncher::isRunning const): Deleted.
(WebKit::XDGDBusProxyLauncher::path const): Deleted.
(WebKit::XDGDBusProxyLauncher::proxyPath const): Deleted.
(WebKit::XDGDBusProxyLauncher::setPermissions): Deleted.
(WebKit::XDGDBusProxyLauncher::launch): Deleted.
(WebKit::XDGDBusProxyLauncher::makeProxyPath): Deleted.
(WebKit::XDGDBusProxyLauncher::dbusAddressToPath): Deleted.
(): Deleted.

  • UIProcess/Launcher/glib/BubblewrapLauncher.h:
  • UIProcess/Launcher/glib/XDGDBusProxy.cpp: Added.

(WebKit::XDGDBusProxy::XDGDBusProxy):
(WebKit::XDGDBusProxy::makeProxy const):
(WebKit::XDGDBusProxy::launch const):

  • UIProcess/Launcher/glib/XDGDBusProxy.h: Added.

(WebKit::XDGDBusProxy::proxyPath const):
(WebKit::XDGDBusProxy::path const):

1:49 AM Changeset in webkit [289612] by youenn@apple.com
  • 33 edits
    3 copies
    1 add in trunk

Add support to query camera and microphone permissions
https://bugs.webkit.org/show_bug.cgi?id=236138

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/permissions/nfc-permission-expected.txt:
  • web-platform-tests/permissions/test-background-fetch-permission-expected.txt:

Source/WebCore:

Update queryPermission to be async as it may require to check to UIProcess.
Covered by API test.

  • Modules/permissions/PermissionController.h:
  • Modules/permissions/Permissions.cpp:

Source/WebKit:

Add new SPI to query for permission (without requesting anything to user).
Use this to implement camera/microphone permission.
In case of permisssion persistently denied, only expose it if web page already called getUserMedia.
In case of permission not persistently set, compute the permission state according past getUserMedia requests.
Also add geolocation mapping as applications might want to support it and it makes existing WPT tests happy.
Add C API as well so that WTR can control permission querying.

Covered by API test.

  • Headers.cmake:
  • Shared/API/APIObject.h:
  • Shared/API/c/WKBase.h:
  • Sources.txt:
  • UIProcess/API/APIUIClient.h:
  • UIProcess/API/C/WKAPICast.h:
  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageUIClient):

  • UIProcess/API/C/WKPageUIClient.h:
  • UIProcess/API/C/WKSpeechRecognitionPermissionCallback.h:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:
  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebPermissionController.cpp:
  • WebProcess/WebCoreSupport/WebPermissionController.h:

Tools:

  • TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.mm:

(-[UserMediaCaptureUIDelegate _webView:queryPermission:forOrigin:completionHandler:]):

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
  • TestWebKitAPI/Tests/WebKit/getUserMediaPermission.html: Added.
  • TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.h:
  • TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.mm:
  • WebKitTestRunner/TestController.cpp:

(WTR::queryPermission):
(WTR::TestController::createWebViewWithOptions):

1:16 AM Changeset in webkit [289611] by Adrian Perez de Castro
  • 2 edits in trunk

[CMake] Use ld.lld by default for development builds where available
https://bugs.webkit.org/show_bug.cgi?id=235979

Reviewed by Michael Catanzaro.

  • Source/cmake/OptionsCommon.cmake: Enable USE_LD_LLD by default for developers builds

when ld.lld is available. While at it, improve the match on LD_VERSION to be more robust.

12:44 AM Changeset in webkit [289610] by Nikita Vasilyev
  • 7 edits in trunk/Source/WebInspectorUI

Web Inspector: [Flexbox] Show flex badge next to flex containers in DOM Tree
https://bugs.webkit.org/show_bug.cgi?id=235924

Reviewed by Patrick Angle.

Elements with display: flex and display: inline-flex should include a "flex" badge.
Clicking the badge should toggle the overlay for the corresponding element.

  • UserInterface/Controllers/GridOverlayConfigurationDiagnosticEventRecorder.js:

(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype.setup):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype.teardown):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleGridOverlayShown):

  • UserInterface/Controllers/GridOverlayDiagnosticEventRecorder.js:

(WI.GridOverlayDiagnosticEventRecorder.prototype.setup):
(WI.GridOverlayDiagnosticEventRecorder.prototype.teardown):
(WI.GridOverlayDiagnosticEventRecorder.prototype._handleGridOverlayShown):
(WI.GridOverlayDiagnosticEventRecorder):

  • UserInterface/Controllers/OverlayManager.js:

(WI.OverlayManager):
(WI.OverlayManager.prototype.showOverlay):
(WI.OverlayManager.prototype.hideOverlay):
(WI.OverlayManager.prototype.hasVisibleGridOverlays):
(WI.OverlayManager.prototype.hasVisibleOverlay):
(WI.OverlayManager.prototype.toggleOverlay):
(WI.OverlayManager.prototype.getColorForNode):
(WI.OverlayManager.prototype.setColorForNode):
(WI.OverlayManager.prototype._handleLayoutContextTypeChanged):
(WI.OverlayManager.prototype._handleGridSettingChanged):
(WI.OverlayManager.prototype._handleMainResourceDidChange):
(WI.OverlayManager.prototype.showGridOverlay): Deleted.
(WI.OverlayManager.prototype.hideGridOverlay): Deleted.
(WI.OverlayManager.prototype.isGridOverlayVisible): Deleted.
(WI.OverlayManager.prototype.toggleGridOverlay): Deleted.
(WI.OverlayManager.prototype.getGridColorForNode): Deleted.
(WI.OverlayManager.prototype.setGridColorForNode): Deleted.
Remove grid-specific methods (such as showGridOverlay) and introduce methods that work with
both Grid and Flexbox (such as showOverlay).

  • UserInterface/Views/CSSGridSection.js:

(WI.CSSGridSection.prototype.attached):
(WI.CSSGridSection.prototype.detached):
(WI.CSSGridSection.prototype._handleToggleAllCheckboxChanged):
(WI.CSSGridSection.prototype.layout):
(WI.CSSGridSection.prototype._handleGridOverlayStateChanged):
(WI.CSSGridSection.prototype._updateToggleAllCheckbox):
(WI.CSSGridSection):

  • UserInterface/Views/DOMTreeElement.css:

(.tree-outline.dom .layout-badge):
(.tree-outline.dom .layout-badge.activated):
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.selected .layout-badge):
(@media (prefers-color-scheme: dark) .tree-outline.dom .layout-badge):
(.tree-outline.dom .badge-css-grid): Deleted.
(.tree-outline.dom .badge-css-grid.activated): Deleted.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.selected .badge-css-grid): Deleted.
(@media (prefers-color-scheme: dark) .tree-outline.dom .badge-css-grid): Deleted.

  • UserInterface/Views/DOMTreeElement.js:

(WI.DOMTreeElement):
(WI.DOMTreeElement.prototype.onattach):
(WI.DOMTreeElement.prototype.ondetach):
(WI.DOMTreeElement.prototype.updateTitle):
(WI.DOMTreeElement.prototype._updateLayoutBadge):
(WI.DOMTreeElement.prototype._layoutBadgeClicked):
(WI.DOMTreeElement.prototype._updateLayoutBadgeStatus):
(WI.DOMTreeElement.prototype._handleLayoutContextTypeChanged):
(WI.DOMTreeElement.prototype._updateGridBadge): Deleted.
(WI.DOMTreeElement.prototype._gridBadgeClicked): Deleted.
(WI.DOMTreeElement.prototype._gridBadgeDoubleClicked): Deleted.
(WI.DOMTreeElement.prototype._updateGridBadgeStatus): Deleted.
Renamed _gridBadgeElement to _layoutBadgeElement. We can't have both "flex" and "grid" badge on the same element,
so I called it "layoutBadge". I didn't call it simply "badge" because we may have other badges in the future.

12:40 AM Changeset in webkit [289609] by mmaxfield@apple.com
  • 14 edits
    6 adds in trunk

Tab characters and ch units do not obey synthetic bold width adjustments correctly
https://bugs.webkit.org/show_bug.cgi?id=236172

Reviewed by Alan Bujtas.

Source/WebCore:

It turns out we have a lot of places where code wants to know the synthetic-bold-expanded
width of characters. One place is 'tab-width: <integer>' and another is the 'ch' unit.
However, WidthIterator and ComplexTextController don't want the synthetic-bold-expanded
widths, because they explicitly apply synthetic bold after shaping.

This patch adds a 2-value enum argument to the Font::widthForGlyph() function, so callers
can pass in which behavior they want. The function has a default value to include the
synthetic bold expansion.

I then audited every call site of this function, and passed in the correct enum value.
Doing this led me to discover two bugs where the wrong behavior was being used, and this
patch fixes them and adds tests for them.

Tests: fast/text/ch-unit-synthetic-bold.html

fast/text/tab-width-synthetic-bold-complex.html
fast/text/tab-width-synthetic-bold.html

  • layout/formattingContexts/inline/text/TextUtil.cpp:

(WebCore::Layout::fallbackFontsForRunWithIterator):

  • platform/graphics/ComplexTextController.cpp:

(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):

  • platform/graphics/Font.cpp:

(WebCore::Font::platformGlyphInit):

  • platform/graphics/Font.h:

(WebCore::Font::spaceWidth const):
(WebCore::Font::widthForGlyph const):

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::widthForSimpleText const):

  • platform/graphics/FontCascade.h:

(WebCore::FontCascade::tabWidth const):

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::advanceInternal):
(WebCore::WidthIterator::calculateAdditionalWidth const):

LayoutTests:

3 new tests. Also, the changes in ignored-properties-001-expected.txt are a revert of the rebaseline in
r281687. That rebaseline was wrong, so this undoes it.

  • fast/text/ch-unit-synthetic-bold-expected.html: Added.
  • fast/text/ch-unit-synthetic-bold.html: Added.
  • fast/text/tab-width-synthetic-bold-complex-expected.html: Added.
  • fast/text/tab-width-synthetic-bold-complex.html: Added.
  • fast/text/tab-width-synthetic-bold-expected.html: Added.
  • fast/text/tab-width-synthetic-bold.html: Added.
  • platform/ios/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
  • platform/mac-catalina/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
  • platform/mac-mojave/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
  • platform/mac/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
12:32 AM Changeset in webkit [289608] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit

[WPE][GTK] BubblewrapLauncher leaks D-Bus proxy sockets
https://bugs.webkit.org/show_bug.cgi?id=201771

Reviewed by Michael Catanzaro.

xdg-dbus-proxy removes the socket when the sync fd is closed by the application. In most of the cases the
xdg-dbus-proxy process is killed before the sync fd is closed and the socket file is leaked. We should
explicitly close the sync fd.

  • UIProcess/Launcher/glib/XDGDBusProxy.cpp:

(WebKit::XDGDBusProxy::XDGDBusProxy): Save the sync fd.
(WebKit::XDGDBusProxy::~XDGDBusProxy): Close the sync fd is needed.
(WebKit::XDGDBusProxy::launch const): Return the sync fd.

  • UIProcess/Launcher/glib/XDGDBusProxy.h:
12:25 AM Changeset in webkit [289607] by Diego Pino Garcia
  • 5 edits
    32 deletes in trunk/LayoutTests

LayoutTests/imported/w3c:
[WPE] Several WPT offscreen canvas tests are failing after r287846
https://bugs.webkit.org/show_bug.cgi?id=236474

Reviewed by Carlos Alberto Lopez Perez.

  • web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.coordinatespace.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.coordinatespace.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.missingargs.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.missingargs.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.voidreturn.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.voidreturn.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.measure.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.measure.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.combined.3d.transforms.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.combined.3d.transforms.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.x.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.x.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.y.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.y.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.z.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.z.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotateAxis.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotateAxis.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.3d.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.3d.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.3d.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.3d.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.3d.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.3d.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.3d.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.3d.worker.html: Removed.

LayoutTests:
[GTK] Remove several stale WPT offscreen canvas tests
https://bugs.webkit.org/show_bug.cgi?id=236474

Reviewed by Carlos Alberto Lopez Perez.

r287846 re-sync WPT html/ tests, including offscreen canvas tests.
Some already imported offscreen canvas tests are no longer part of WPT tests.
These tests were marked as Failure but should have actually be removed
instead. Two of these tests needed to update their baseline.

  • platform/gtk/TestExpectations:
12:04 AM Changeset in webkit [289606] by Nikolas Zimmermann
  • 13 edits in trunk/Source/WebCore

[LBSE] Begin stub implementation of transform support for SVG layers
https://bugs.webkit.org/show_bug.cgi?id=236185

Reviewed by Rob Buis.

RenderLayer / RenderLayerBacking use RenderStyle::applyTransform()
to compute a TransformationMatrix from the CSS Transform properties.

To hook in SVG transform support, which goes beyond pure CSS properties
that influence the "effective transform" for a certain SVG element,
RenderStyle is not the right place to place the applyTransform()
implementation for SVG specific requirements.

Therefore introduce a virtual RenderLayerModelObject::applyTransform()
function, that is implemented in RenderBox / RenderSVGModelObject.
In this patch RenderSVGModelObject::applyTransform() stays a stub
and RenderBox::applyTransform() simply forwards to RenderStyle,
preserving the current behavior.

This allows SVG to add additional transformations to the transformation
stack, which is useful to implement 'viewBox' support among other things.

Covered by existing tests, no change in behaviour.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::applyTransform const):

  • rendering/RenderBox.h:
  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::applyTransform const):

  • rendering/RenderBoxModelObject.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateTransform):
(WebCore::RenderLayer::currentTransform const):
(WebCore::RenderLayer::perspectiveTransform const):
(WebCore::RenderLayer::perspectiveOrigin const):

  • rendering/RenderLayer.h:

(WebCore::RenderLayer::rendererBorderBoxRect const):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateTransform):
(WebCore::RenderLayerBacking::updateChildrenTransformAndAnchorPoint):
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::startAnimation):
(WebCore::RenderLayerBacking::transformMatrixForProperty const):
(WebCore::rendererBorderBoxRect): Deleted.

  • rendering/RenderLayerModelObject.h:
  • rendering/svg/RenderSVGModelObject.cpp:

(WebCore::RenderSVGModelObject::applyTransform const):

  • rendering/svg/RenderSVGModelObject.h:
  • rendering/svg/RenderSVGRoot.cpp:

(WebCore::RenderSVGRoot::applyTransform const):

  • rendering/svg/RenderSVGRoot.h:

Feb 10, 2022:

10:55 PM Changeset in webkit [289605] by graouts@webkit.org
  • 4 edits in trunk/LayoutTests

[web-animations] additive animations should prevent other animations from running accelerated
https://bugs.webkit.org/show_bug.cgi?id=236447

Unreviewed gardening, the patch for this bug was cq'd before I could fix test expectations for
GTK and Windows and remove an incorrect comment in the newly added test.

  • platform/glib/TestExpectations:
  • platform/win/TestExpectations:
  • webanimations/accelerated-animations-and-composite.html:
9:40 PM Changeset in webkit [289604] by Simon Fraser
  • 9 edits in trunk/Source

Separate out setVolatile() from setNonVolatile() on IOSurface-backed buffers
https://bugs.webkit.org/show_bug.cgi?id=236475

Reviewed by Tim Horton.

setVolatile(true) and setVolatile(false) are quite different in their needs, so
separate them out into separate functions.

setVolatile(true) can be done asynchronously (as a future patch will). The
return value tells if you succeeded in making the surfaced volatile, i.e. if it
was not in-use.

setVolatile(false) has to be synchronous, and the return value tells you whether
you need to repaint the entire surface.

Source/WebCore:

  • platform/graphics/ConcreteImageBuffer.h:
  • platform/graphics/ImageBuffer.h:
  • platform/graphics/ImageBufferBackend.h:

(WebCore::ImageBufferBackend::releaseGraphicsContext):
(WebCore::ImageBufferBackend::setVolatile):
(WebCore::ImageBufferBackend::setNonVolatile):

  • platform/graphics/cg/ImageBufferIOSurfaceBackend.cpp:

(WebCore::ImageBufferIOSurfaceBackend::setVolatile):
(WebCore::ImageBufferIOSurfaceBackend::setNonVolatile):

  • platform/graphics/cg/ImageBufferIOSurfaceBackend.h:

Source/WebKit:

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::setBufferVolatility):

9:36 PM Changeset in webkit [289603] by Simon Fraser
  • 5 edits in trunk/Source/WebKit

Have RemoteLayerBackingStore talk to RemoteLayerBackingStoreCollection directly
https://bugs.webkit.org/show_bug.cgi?id=236463

Reviewed by Tim Horton.

There doesn't seem to be any benefit to going via RemoteLayerTreeContext.

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
(WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore):
(WebKit::RemoteLayerBackingStore::backingStoreCollection const):
(WebKit::RemoteLayerBackingStore::display):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:

(WebKit::RemoteLayerTreeContext::backingStoreWasCreated): Deleted.
(WebKit::RemoteLayerTreeContext::backingStoreWillBeDestroyed): Deleted.
(WebKit::RemoteLayerTreeContext::backingStoreWillBeDisplayed): Deleted.

9:17 PM Changeset in webkit [289602] by ddkilzer@apple.com
  • 3 edits in trunk/Source/WTF

[WTF] Fix clang tidy bugprone-move-forwarding-reference static analyzer warnings from WebCore/WebKit
<https://webkit.org/b/236459>
<rdar://problem/88772313>

Reviewed by Darin Adler.

  • wtf/IteratorAdaptors.h:

(WTF::makeTransformIterator):

  • wtf/WeakHashMap.h:

(WTF::WeakHashMap::set):

  • Replace WTFMove() with std::forward<>().
7:58 PM Changeset in webkit [289601] by fpizlo@apple.com
  • 2 edits in trunk

Unreviewed, add an alternate email address.

  • metadata/contributors.json:
7:58 PM Changeset in webkit [289600] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Non-content runs (e.g. inline box start/end) do not need "within the line" flip
https://bugs.webkit.org/show_bug.cgi?id=236426

Reviewed by Antti Koivisto.

This is the same what we already do for the bidi case.

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::processNonBidiContent):

6:27 PM Changeset in webkit [289599] by Nikos Mouchtaris
  • 15 edits in trunk

Web animations- Composite operation accumulation support for transform properties
https://bugs.webkit.org/show_bug.cgi?id=236116

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-transforms/animation/transform-matrix-composition-expected.txt:
  • web-platform-tests/css/css-transforms/animation/transform-rotate-composition-expected.txt:
  • web-platform-tests/css/css-transforms/animation/transform-skew-composition-expected.txt:
  • web-platform-tests/css/css-transforms/animation/transform-translate-composition-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
  • web-platform-tests/web-animations/animation-model/combining-effects/effect-composition-expected.txt:

Source/WebCore:

This patch brings further support for accumulation on transform properties. The main aspect being addressed
is handling accumulation of TransformationMatrices. This involves accumulating on the decomposed functions,
which occurs in blendFloat() and accumulateQuaternion(). Since we need to perform accumulation for one-based
values on certain decomposed functions, (scale, diagonals of matrices, etc), we set the operation to accumulate
only for these cases.

A couple of bugs introduced by this additional support are also addressed. For a property with a
different transform operation than the keyframes given, transformFunctionListsMatch() would return
true when it shouldn't. Addressed by checking in blendByMatchingOperations and falling back on matrix
interpolation. Another bug is that we need to pass the composite operation to TransformationMatrix blend().
Another bug is that we should to use Replace behavior if either of the transform matrices are
non-invertible.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):

  • platform/graphics/transforms/Matrix3DTransformOperation.cpp:

(WebCore::createOperation):

  • platform/graphics/transforms/MatrixTransformOperation.cpp:

(WebCore::MatrixTransformOperation::blend):

  • platform/graphics/transforms/RotateTransformOperation.cpp:

(WebCore::RotateTransformOperation::blend):

  • platform/graphics/transforms/TransformOperations.cpp:

(WebCore::TransformOperations::blendByMatchingOperations const):
(WebCore::TransformOperations::blendByUsingMatrixInterpolation const):
(WebCore::TransformOperations::blend const):

  • platform/graphics/transforms/TransformOperations.h:

(WebCore::TransformOperations::isInvertible const):

  • platform/graphics/transforms/TransformationMatrix.cpp:

(WebCore::blendFloat):
(WebCore::TransformationMatrix::blend2):
(WebCore::accumulateQuaternion):
(WebCore::TransformationMatrix::blend4):
(WebCore::TransformationMatrix::blend):

6:03 PM Changeset in webkit [289598] by graouts@webkit.org
  • 7 edits
    2 adds in trunk

[web-animations] accelerated animations should not run accelerated
https://bugs.webkit.org/show_bug.cgi?id=236447
<rdar://problem/88756985>

Reviewed by Dean Jackson.

Source/WebCore:

Until we can tackle the complex task of supporting accelerated additive animations
(bug 232081), we need to run animations targeting properties that we would otherwise
known how to accelerate in software if it is additive or if another effect in the
effect stack is itself additive.

We add two new boolean flags on KeyframeEffect that will help us determine whether
that effect can run accelerated.

The first flag, m_hasKeyframeComposingAcceleratedProperty, indicates whether any of
the keyframes targeting a property that supports acceleration uses additivity or
accumulation.

With the help of this flag, we can make KeyframeEffect::canBeAccelerated() return false
not only if the effect has effect-wide additivity or accumulation, but also if one of
its keyframes does.

The second flag, m_hasImplicitKeyframeForAcceleratedProperty, indicates whether any
of the properties found in one of the keyframes is absent from either the 0% or 100%
keyframes. This is important because if an effect uses an implicit value for an
acclerated property, then that effect automatically depends on other effects lower
down the effect stack it belongs to being able to use an accelerated animation to
itself run accelerated.

With the help of this second flag, we can accurately determine when trying to start
an accelerated animation in the startAnimation() lambda within applyPendingAcceleratedActions()
whether the keyframe effect stack contains another effect that will fail to run
accelerated, and prevent this effect from running accelerated itself. Unless if
it does not rely on implicit keyframes, in which case effects lower down the stack
should not be accounted for, as we wouldn't have gone this far if this effect was
using additivity or accumulation, per the canBeAccelerated() improvements.

To allow the effect stack to determine whether any of its effects could be accelerated,
but fails to actually run accelerated, we've added a new KeyframeEffect::canBeAccelerated()
method that the new KeyframeEffectStack::containsEffectThatPreventsAccelerationOfEffect()
calls to determine if any effect other than the one provided should prevent acceleration.

Test: webanimations/accelerated-animations-and-composite.html

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::setBlendingKeyframes):
(WebCore::KeyframeEffect::canBeAccelerated const):
(WebCore::KeyframeEffect::preventsAcceleration const):
(WebCore::KeyframeEffect::applyPendingAcceleratedActions):
(WebCore::KeyframeEffect::computeHasImplicitKeyframeForAcceleratedProperty):
(WebCore::KeyframeEffect::computeHasKeyframeComposingAcceleratedProperty):

  • animation/KeyframeEffect.h:
  • animation/KeyframeEffectStack.cpp:

(WebCore::KeyframeEffectStack::containsEffectThatPreventsAccelerationOfEffect):

  • animation/KeyframeEffectStack.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

LayoutTests:

Add a new test which runs through all the various scenarios where additivity
should or should not prevent other animations from running accelerated.

  • webanimations/accelerated-animations-and-composite-expected.txt: Added.
  • webanimations/accelerated-animations-and-composite.html: Added.
5:47 PM Changeset in webkit [289597] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Check bidiLevels are valid before reordering
https://bugs.webkit.org/show_bug.cgi?id=236378

Patch by Brandon Stewart <Brandon> on 2022-02-10
Reviewed by Alan Bujtas.

We were trusting that the bidiLevel was valid before calling the reorder.
If the bidiLevel ends up being greater than the MAX + 1 we end up in a situation where
the reordering will fail. The function returns void, so there is not a good way to check
for an error.

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::layoutInlineContent):

4:45 PM Changeset in webkit [289596] by commit-queue@webkit.org
  • 3 edits
    1 copy in trunk/Source/WTF

Unreviewed, reverting r289583 and r289591.
https://bugs.webkit.org/show_bug.cgi?id=236472

Still breaking builds

Reverted changesets:

"Reland native Xcode build phases for "Copy WTF Headers",
again"
https://bugs.webkit.org/show_bug.cgi?id=235744
https://commits.webkit.org/r289583

"Copy SignedPtr.h in WTF.xcodeproj"
https://bugs.webkit.org/show_bug.cgi?id=236466
https://commits.webkit.org/r289591

4:30 PM Changeset in webkit [289595] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WTF

Don't prefer text selection in images if it is not available
https://bugs.webkit.org/show_bug.cgi?id=236462
<rdar://problem/88407336>

Reviewed by Wenson Hsieh.

  • Scripts/Preferences/WebPreferencesInternal.yaml:
4:27 PM Changeset in webkit [289594] by Said Abou-Hallawa
  • 25 edits in trunk/Source

[GPU Process] Delete GraphicsContext::clipToDrawingCommands()
https://bugs.webkit.org/show_bug.cgi?id=225959
rdar://78495380

Reviewed by Darin Adler.

Source/WebCore:

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:

Source/WebKit:

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::drawingContext):
(WebKit::RemoteDisplayListRecorder::beginClipToDrawingCommands): Deleted.
(WebKit::RemoteDisplayListRecorder::endClipToDrawingCommands): Deleted.

  • GPUProcess/graphics/RemoteDisplayListRecorder.h:
  • GPUProcess/graphics/RemoteDisplayListRecorder.messages.in:
  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:

(WebKit::RemoteDisplayListRecorderProxy::recordBeginClipToDrawingCommands): Deleted.
(WebKit::RemoteDisplayListRecorderProxy::recordEndClipToDrawingCommands): Deleted.
(WebKit::RemoteDisplayListRecorderProxy::createNestedContext): Deleted.

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
4:24 PM Changeset in webkit [289593] by commit-queue@webkit.org
  • 42 edits
    11 deletes in trunk

Unreviewed, reverting r289525.
https://bugs.webkit.org/show_bug.cgi?id=236467

Introduced layout test crashes

Reverted changeset:

"Introduce a RemoteMediaSampleProxy to represent captured
video frames used in Media Streams and present in GPUP"
https://bugs.webkit.org/show_bug.cgi?id=236099
https://commits.webkit.org/r289525

4:20 PM Changeset in webkit [289592] by keith_miller@apple.com
  • 6 edits in trunk/Source

tryReserveUncommittedAligned should explicitly take the alignment requested
https://bugs.webkit.org/show_bug.cgi?id=236460

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

When reducing the size of VA space reserved for Structures, we
didn't take care to ensure the alignment matched the required
alignment for our bit mask. To fix this we need to pass the
original alignment to the allocator as a new parameter.

  • heap/StructureAlignedMemoryAllocator.cpp:

(JSC::StructureMemoryManager::StructureMemoryManager):

Source/WTF:

This patch adds a new ifdef for Unix flavors that support the
MAP_ALIGNED macro/parameter to mmap.

Also, fix a bug where on windows we wouldn't request enough
space to guarantee that allocation is aligned.

  • wtf/OSAllocator.h:
  • wtf/posix/OSAllocatorPOSIX.cpp:

(WTF::OSAllocator::tryReserveUncommittedAligned):

  • wtf/win/OSAllocatorWin.cpp:

(WTF::OSAllocator::tryReserveUncommittedAligned):

3:57 PM Changeset in webkit [289591] by Elliott Williams
  • 2 edits in trunk/Source/WTF

Copy SignedPtr.h in WTF.xcodeproj
https://bugs.webkit.org/show_bug.cgi?id=236466

Reviewed by Alexey Proskuryakov.

SignedPtr.h was recently added and needs to be part of WTF's Copy Headers phase.

  • WTF.xcodeproj/project.pbxproj:
3:49 PM Changeset in webkit [289590] by fpizlo@apple.com
  • 24 edits
    1 add in trunk/Source

[libpas] jit_heap should support the segregated heap
https://bugs.webkit.org/show_bug.cgi?id=235497

Reviewed by Yusuke Suzuki.

Source/bmalloc:

One of the things that libpas provides is a fast implementation of executable memory allocation, which
libpas calls "jit_heap". The initial implementation of this only used libpas's bitfit and large
algorithms. Bitfit was used for smaller objects and large was used for larger objects. The libpas
segregated heap was disabled in jit_heap. This made sense because:

  • Bitfit and large support the shrink() call, where we shrink an allocation in-place. Executable allocation supports this to aid branch compaction (we compact code after we copy it into its final resting place, which is after we allocate the memory - so after we finish compaction, we can only shrink the allocation in-place or not at all).
  • Segregated heaps have some virtual address space overheads, and memory overheads, that the bitfit and large heaps don't have. This happens because segreated heaps will dedicate each page to objects of exactly one size forever.

However, segregated heaps are substantially faster than bitfit heaps. They are faster under serial
allocation thanks to the fact that no locks need to be acquired for a typical allocation or
deallocation. They are even more faster under parallel allocation thanks to thread-local caching.

This patch enables segregated heaps for the smallest jit_heap allocations (<=2000 bytes). The cutoff
threshold is runtime configurable, so it's possible to disable segregated heaps at runtime by setting
the cutoff to 0.

With the 2000 threshold, this appears to be a 0.3% Speedometer2 speed-up.

While there is a theoretical possibility of memory overhead, I haven't seen it. If we are using jump
islands then the virtual memory overhead of segregated heaps will just mean that we use jump islands
more frequently, which would manifest as a performance regression -- but I've not seen any such
regression. So, this disables the segregated heap if the JIT pool size is too small (see changes to
ExecutableAllocator.cpp in JSC).

  • libpas/libpas.xcodeproj/project.pbxproj:
  • libpas/src/libpas/jit_heap.c:

(jit_heap_shrink):

  • libpas/src/libpas/jit_heap_config.c:

(jit_small_segregated_allocate_page):
(jit_small_segregated_create_page_header):
(jit_small_destroy_page_header):
(jit_small_segregated_shared_page_directory_selector):
(jit_small_bitfit_allocate_page):
(jit_small_bitfit_create_page_header):
(jit_medium_bitfit_create_page_header):
(jit_medium_destroy_page_header):
(jit_prepare_to_enumerate):
(jit_small_bitfit_destroy_page_header): Deleted.
(jit_medium_bitfit_destroy_page_header): Deleted.

  • libpas/src/libpas/jit_heap_config.h:

(jit_small_page_header_for_boundary):
(jit_small_boundary_for_page_header):
(jit_medium_page_header_for_boundary):
(jit_medium_boundary_for_page_header):
(jit_heap_config_page_header):
(jit_small_bitfit_page_header_for_boundary): Deleted.
(jit_small_bitfit_boundary_for_page_header): Deleted.
(jit_medium_bitfit_page_header_for_boundary): Deleted.
(jit_medium_bitfit_boundary_for_page_header): Deleted.

  • libpas/src/libpas/jit_heap_config_root_data.h:
  • libpas/src/libpas/pas_bitfit_heap.c:

(pas_bitfit_heap_select_variant):
(pas_bitfit_heap_construct_and_insert_size_class):

  • libpas/src/libpas/pas_bitfit_heap.h:
  • libpas/src/libpas/pas_bitfit_page_config.h:

(pas_bitfit_page_config_is_enabled):

  • libpas/src/libpas/pas_heap_config.h:

(pas_heap_config_segregated_heap_min_align_shift):
(pas_heap_config_segregated_heap_min_align):

  • libpas/src/libpas/pas_segregated_heap.c:

(min_align_for_heap):
(min_object_size_for_heap):
(max_segregated_object_size_for_heap):
(max_bitfit_object_size_for_heap):
(max_object_size_for_heap):
(pas_segregated_heap_ensure_allocator_index):
(pas_segregated_heap_ensure_size_directory_for_size):
(min_object_size_for_heap_config): Deleted.
(max_segregated_object_size_for_heap_config): Deleted.
(max_bitfit_object_size_for_heap_config): Deleted.
(max_object_size_for_heap_config): Deleted.

  • libpas/src/libpas/pas_segregated_heap.h:

(pas_segregated_heap_index_for_size):
(pas_segregated_heap_size_for_index):

  • libpas/src/libpas/pas_segregated_page.c:

(pas_segregated_page_construct):

  • libpas/src/libpas/pas_segregated_page_config.h:

(pas_segregated_page_config_is_enabled):

  • libpas/src/libpas/pas_segregated_page_config_kind.def:
  • libpas/src/libpas/pas_segregated_page_config_kind_and_role.h:
  • libpas/src/libpas/pas_segregated_size_directory.c:

(pas_segregated_size_directory_create):

  • libpas/src/test/IsoHeapChaosTests.cpp:

(std::addAllTests):

  • libpas/src/test/JITHeapTests.cpp:

(std::testAllocationSize):
(addJITHeapTests):

  • libpas/src/test/TestHarness.cpp:

(main):

  • libpas/src/test/ViewCacheTests.cpp: Added.

(std::setupConfig):
(std::testDisableViewCacheUsingBoundForNoViewCache):
(std::testEnableViewCacheAtSomeBoundForNoViewCache):
(addViewCacheTests):

Source/JavaScriptCore:

Disable the jit_heap segregated heap if the executable pool size is too small.

  • jit/ExecutableAllocator.cpp:

(JSC::initializeJITPageReservation):

3:42 PM Changeset in webkit [289589] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Adjust asserts in InlineDisplayContentBuilder::processBidiContent to support vertical writing mode
https://bugs.webkit.org/show_bug.cgi?id=236418

Reviewed by Antti Koivisto.

This is in preparation for adding vertical writing mode support.

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

3:36 PM Changeset in webkit [289588] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Use Ref<> for getBackground/MaskShorthandValue
https://bugs.webkit.org/show_bug.cgi?id=236408

Patch by Matt Woodrow <Matt Woodrow> on 2022-02-10
Reviewed by Tim Nguyen.

Simple cleanup to make it clearer that these can't return nullptr, no tests needed.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::getFillLayerPropertyShorthandValue):
(WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
(WebCore::ComputedStyleExtractor::getMaskShorthandValue):

  • css/CSSComputedStyleDeclaration.h:
3:22 PM Changeset in webkit [289587] by Elliott Williams
  • 2 edits in trunk

[Xcode] Perform a full build when analyzing
https://bugs.webkit.org/show_bug.cgi?id=236421

Reviewed by Alexey Proskuryakov.

xcodebuild analyze does just enough work to run the analyzer on each target, and doesn't
appear to run build phases that only impact consumers of the target. In particular, it
doesn't copy framework headers.

Fix by telling xcodebuild to build _and_ analyze at once. AFAICT, this is exactly what
Xcode's Product > Analyze command does.

  • Makefile.shared: s/analyze/build analyze
3:11 PM Changeset in webkit [289586] by Russell Epstein
  • 1 copy in tags/Safari-613.1.17

Tag Safari-613.1.17.

3:09 PM Changeset in webkit [289585] by Russell Epstein
  • 2 edits in branches/safari-613-branch

Cherry-pick r288434. rdar://problem/56436745

texImage2d fails to set same video frame to multiple textures
https://bugs.webkit.org/show_bug.cgi?id=203148
<rdar://problem/56436745>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-01-24
Reviewed by Darin Adler.

Source/WebCore:

WebGL optimizes repeated video uploads to same texture, due to this being
usual practice among pages. Reason is that there are no API to know when the
video frame updates.
The algorithm was:

  • If the IOSurface is the same as in the last call
  • If the texture contents has not changed since we last modified this texture then skip the upload.

However, this logic skips errorneously if the "last call" updates some other texture.
Fix and test the above.

There are other issues for the current algorithm. This patch fixes some other theoretical ones:

  • If the texture is deleted and new one gets assigned the same texture id and the content seed would clash
  • Video was uploaded to a different level

The previous implementation was keeping per-texture seed value map in the context
(GraphicsContextGLANGLE) and per-teture seed value map in the texture upload helper
(GraphicsContextGLCVCocoa) and last uploaded IOSurface seed in the upload helper (not per
texture).

The implementation in this patch keeps per-texture known content description in the texture
upload helper and invalidates this when each texture changes. The known content description
is the parameter list of the texture upload call.

Test: webgl/pending/conformance/textures/misc/tex-image-video-repeated.html

  • platform/graphics/GraphicsContextGLState.h: (WebCore::GraphicsContextGLState::setBoundTexture):
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLANGLE::texImage2D): (WebCore::GraphicsContextGLANGLE::texSubImage2D): (WebCore::GraphicsContextGLANGLE::compressedTexImage2D): (WebCore::GraphicsContextGLANGLE::compressedTexSubImage2D): (WebCore::GraphicsContextGLANGLE::texStorage2D): (WebCore::GraphicsContextGLANGLE::texStorage3D): (WebCore::GraphicsContextGLANGLE::texImage2DDirect): (WebCore::GraphicsContextGLANGLE::framebufferTexture2D): (WebCore::GraphicsContextGLANGLE::createTexture): (WebCore::GraphicsContextGLANGLE::deleteTexture): (WebCore::GraphicsContextGLANGLE::invalidateKnownTextureContent): (WebCore::GraphicsContextGLANGLE::textureSeed): Deleted.
  • platform/graphics/angle/GraphicsContextGLANGLE.h:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.h:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm: (WebCore::GraphicsContextGLCocoa::invalidateKnownTextureContent):
  • platform/graphics/cv/GraphicsContextGLCVCocoa.cpp: (WebCore::GraphicsContextGLCVCocoa::TextureContent::operator== const): (WebCore::GraphicsContextGLCVCocoa::copyVideoSampleToTexture): (WebCore::GraphicsContextGLCVCocoa::invalidateKnownTextureContent):
  • platform/graphics/cv/GraphicsContextGLCVCocoa.h:

LayoutTests:

Add a test for testing the bug in which some video texture uploads
were skipped errorneously.

  • webgl/pending/conformance/textures/misc/tex-image-video-repeated.html: Added.
  • webgl/pending/conformance/textures/misc/tex-image-video-repeated-expected.txt: Added.
  • webgl/pending/resources/webgl_test_files/conformance/textures/misc/tex-image-video-repeated.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288434 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3:07 PM Changeset in webkit [289584] by Elliott Williams
  • 4 edits in trunk

Use of unversioned 'python' in Mac builds causing failures in 12.3
https://bugs.webkit.org/show_bug.cgi?id=236327

Reviewed by Jonathan Bedard.

  • WebKit.xcodeproj/project.pbxproj: python -> python3 in "Replace WebKitAdditions in

Framework Headers" phase.

3:02 PM Changeset in webkit [289583] by Elliott Williams
  • 3 edits
    1 delete in trunk/Source/WTF

Reland native Xcode build phases for "Copy WTF Headers", again
https://bugs.webkit.org/show_bug.cgi?id=235744

Reviewed by Alexey Proskuryakov.

Changes since revert of r289490:

Some WTF headers were never tracked in WTF.xcodeproj, causing builds to fail (but only after
a build directory was cleaned and stale headers removed).

  • WTF.xcodeproj/project.pbxproj: Add file references for missing headers.
2:56 PM Changeset in webkit [289582] by Russell Epstein
  • 1 copy in tags/Safari-613.1.16.1.6

Tag Safari-613.1.16.1.6.

2:55 PM Changeset in webkit [289581] by Russell Epstein
  • 1 copy in tags/Safari-613.1.16.0.6

Tag Safari-613.1.16.0.6.

2:48 PM Changeset in webkit [289580] by commit-queue@webkit.org
  • 22 edits in trunk/Source

ImageBuffer::get/putPixelBuffer should not go through DisplayList
https://bugs.webkit.org/show_bug.cgi?id=236305

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-10
Reviewed by Geoffrey Garen.

Source/WebCore:

Remove GetPixelBuffer / PutPixelBuffer from display list implementation.
Display lists are about GraphicsContext commands.
GetPixelBuffer and PutPixelBuffer are ImageBuffer operations.
Especially GetPixelBuffer does not make sense as a display list item,
and in its current form it does not have parameters to propagate the information
other than to a global variables, like the WebKit side GPUP implementation does.
It is undefined what would two GetPixelBuffer commands one after another mean
in a display list.

The operations in the wrong layer make the correct implementation harder than
neccessary. In this case, GetPixelBuffer is a read operation, but in current
implementation it was invoked by Flush, e.g. GetPixelBuffer would be inside
a section of commands being flushed. Flush is a write operation. As such
it would create a get of unflushed content.

  • 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:
  • platform/graphics/displaylists/DisplayListRecorder.h:
  • platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
  • platform/graphics/displaylists/DisplayListRecorderImpl.h:

Source/WebKit:

Move code that carries out RemoteImageBufferProxy GetPixelBuffer, PutPixelBuffer
from the display list playback to RemoteImageBuffer implementation
in RemoteRenderingBackend, the same place that hosts other
RemoteImageBuffer function invocations.

This makes it possible in the future to mark GetPixelBuffer as a read operation
depending on the previous write operations. Previously GetPixelBuffer was recorded
to the display list before the display list was flushed, which is semantically wrong
and in practice would cause inverted references.

Simplify the protocol to implement the GetPixelBuffer. Previously it was:

  • If GPUP does not have the semaphore and the shm, ask for GPUP to send them, sync
  • Else if GPUP does not have the semaphore, ask for GPUP to send it, sync
  • Else if GPUP does not have the shm send, ask for GPUP to send it, sync
  • Send the GetPixelBuffer message via stream async
  • Wait for the semaphore

After it is:

  • If GPUP does not have the shm send GetPixelBuffer with the shm, sync
  • Else send the GetPixelBuffer via stream sync

There's no point in sending a semaphore, the stream sync message is
just a wait on the stream semaphore. Also, since semaphores
might have spurious wakeups, it is not enough of a protocol to wait a
plain semaphore.

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:
  • GPUProcess/graphics/RemoteDisplayListRecorder.h:
  • GPUProcess/graphics/RemoteDisplayListRecorder.messages.in:
  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::getPixelBufferForImageBuffer):
(WebKit::RemoteRenderingBackend::getPixelBufferForImageBufferWithNewMemory):
(WebKit::RemoteRenderingBackend::putPixelBufferForImageBuffer):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/graphics/RemoteRenderingBackend.messages.in:
  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::gpuProcessConnectionDidClose):
(WebKit::RemoteRenderingBackendProxy::getPixelBufferForImageBuffer):
(WebKit::RemoteRenderingBackendProxy::putPixelBufferForImageBuffer):
(WebKit::RemoteRenderingBackendProxy::updateSharedMemoryForGetPixelBuffer):
(WebKit::RemoteRenderingBackendProxy::destroyGetPixelBufferSharedMemory):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
2:34 PM Changeset in webkit [289579] by fpizlo@apple.com
  • 79 edits
    10 adds in trunk/Source/bmalloc

[libpas] it should be possible to decommit unused parts of a thread_local_cache (update to 78508e79fa2797680344d43b94841ae2e903b15b)
https://bugs.webkit.org/show_bug.cgi?id=235347

Reviewed by Yusuke Suzuki.

Libpas uses TLCs (thread_local_caches) for allocation and deallocation. Each size class in each heap
gets a local allocator and possibly a local view cache. Both local allocators and local view caches
can get quite large (100s of bytes). So, if you try to support full isoheaps (bug 231938), you end up
with ginormous TLCs and that accounts for a lot of the memory overhead of full isoheaps.

This change takes a big bite out of that overhead by enabling decommit of TLC pages:

  • Any page within a TLC that has nothing but stopped allocators (or view caches; I'll just say "allocators" to mean both "local allocators" and "local view caches", as I do in the code) can get decommitted by the scavenger.
  • TLC page decommit just requires holding the TLC's scavenger_lock (formerly known as the log_flush_lock) and the heap_lock. You don't have to suspend the thread (but suspension could have been used to stop the allocator, as before).
  • Attempts to allocate using an allocator in a decommitted page are guaranteed to go down a slow path that commits the page and rematerializes the allocator.
  • This doesn't require any page alignment of allocators. Allocators can straddle pages.

This seems to be perf-neutral on trunk. It offers a ~1.5% memory improvement for bug 231938.

  • CMakeLists.txt:
  • bmalloc.xcodeproj/project.pbxproj:
  • libpas/libpas.xcodeproj/project.pbxproj:
  • libpas/src/libpas/bmalloc_heap.c:

(bmalloc_flex_heap_ref_get_heap):
(bmalloc_auxiliary_heap_ref_get_heap):
(bmalloc_get_heap):

  • libpas/src/libpas/bmalloc_heap.h:
  • libpas/src/libpas/bmalloc_heap_config.h:
  • libpas/src/libpas/jit_heap_config.c:

(jit_aligned_allocator):

  • libpas/src/libpas/jit_heap_config.h:
  • libpas/src/libpas/minalign32_heap_config.h:
  • libpas/src/libpas/pas_bitfit_allocator.c:

(pas_bitfit_allocator_construct):
(pas_bitfit_allocator_stop):
(pas_bitfit_allocator_commit_view):
(pas_bitfit_allocator_finish_failing):

  • libpas/src/libpas/pas_bitfit_allocator.h:
  • libpas/src/libpas/pas_bitfit_allocator_inlines.h:

(pas_bitfit_allocator_try_allocate):

  • libpas/src/libpas/pas_bitfit_directory.c:

(pas_bitfit_directory_take_last_empty):

  • libpas/src/libpas/pas_bitfit_page_config.h:
  • libpas/src/libpas/pas_bitfit_page_config_inlines.h:
  • libpas/src/libpas/pas_bitfit_page_inlines.h:

(pas_bitfit_page_allocation_commit_granules_or_reloop):

  • libpas/src/libpas/pas_commit_span.c:

(pas_commit_span_construct):
(commit):
(pas_commit_span_add_unchanged_and_commit):
(decommit):

  • libpas/src/libpas/pas_commit_span.h:
  • libpas/src/libpas/pas_committed_pages_vector.c: Added.

(pas_committed_pages_vector_construct):
(pas_committed_pages_vector_destruct):
(pas_committed_pages_vector_count_committed):
(pas_count_committed_pages):

  • libpas/src/libpas/pas_committed_pages_vector.h: Added.

(pas_committed_pages_vector_is_committed):

  • libpas/src/libpas/pas_compact_tagged_ptr.h:
  • libpas/src/libpas/pas_compact_thread_local_cache_layout_node.h: Added.
  • libpas/src/libpas/pas_decommit_exclusion_range.h: Added.

(pas_decommit_exclusion_range_is_empty):
(pas_decommit_exclusion_range_is_contiguous):
(pas_decommit_exclusion_range_is_inverted):
(pas_decommit_exclusion_range_create_inverted):

  • libpas/src/libpas/pas_deferred_decommit_log.c:

(decommit_all):

  • libpas/src/libpas/pas_expendable_memory.c:

(pas_expendable_memory_state_version_next):
(pas_expendable_memory_construct):
(pas_expendable_memory_commit_if_necessary):
(scavenge_impl):
(pas_expendable_memory_scavenge):

  • libpas/src/libpas/pas_expendable_memory.h:
  • libpas/src/libpas/pas_free_granules.c:

(pas_free_granules_decommit_after_locking_range):

  • libpas/src/libpas/pas_heap.c:

(pas_heap_get_type_size):
(pas_heap_get_type_alignment):

  • libpas/src/libpas/pas_heap.h:
  • libpas/src/libpas/pas_heap_config.h:
  • libpas/src/libpas/pas_heap_config_utils.c:

(pas_heap_config_utils_allocate_aligned):

  • libpas/src/libpas/pas_heap_config_utils.h:
  • libpas/src/libpas/pas_heap_ref.c:

(pas_ensure_heap_slow):

  • libpas/src/libpas/pas_internal_config.h:
  • libpas/src/libpas/pas_large_free_heap_deferred_commit_log.c:

(pas_large_free_heap_deferred_commit_log_construct):
(pas_large_free_heap_deferred_commit_log_destruct):
(pas_large_free_heap_deferred_commit_log_add):
(commit):
(commit_all):

  • libpas/src/libpas/pas_large_free_heap_deferred_commit_log.h:
  • libpas/src/libpas/pas_large_free_heap_helpers.c:

(large_utility_aligned_allocator):
(pas_large_free_heap_helpers_try_allocate_with_alignment):
(pas_large_free_heap_helpers_deallocate):

  • libpas/src/libpas/pas_large_heap.c:

(allocate_impl):
(pas_large_heap_try_deallocate):
(pas_large_heap_try_shrink):

  • libpas/src/libpas/pas_large_heap_physical_page_sharing_cache.c:

(large_aligned_allocator):
(pas_large_heap_physical_page_sharing_cache_try_allocate_with_alignment):

  • libpas/src/libpas/pas_large_heap_physical_page_sharing_cache.h:
  • libpas/src/libpas/pas_large_sharing_pool.c:

(create_node):
(create_and_insert):
(boot_tree):
(states_match):
(split_node_and_get_right_impl):
(try_splat_impl):
(try_splat):
(splat):
(pas_large_sharing_pool_boot_free):
(pas_large_sharing_pool_free):
(pas_large_sharing_pool_allocate_and_commit):
(pas_large_sharing_pool_decommit_least_recently_used):

  • libpas/src/libpas/pas_large_sharing_pool.h:
  • libpas/src/libpas/pas_large_virtual_range.h: Added.

(pas_large_virtual_range_create):
(pas_large_virtual_range_create_empty):
(pas_large_virtual_range_get_range):
(pas_large_virtual_range_is_empty):
(pas_large_virtual_range_size):
(pas_large_virtual_range_overlaps):

  • libpas/src/libpas/pas_large_virtual_range_min_heap.h: Added.

(pas_large_virtual_range_compare_begin):
(pas_large_virtual_range_get_index):
(pas_large_virtual_range_set_index):

  • libpas/src/libpas/pas_local_allocator.c:

(pas_local_allocator_construct):
(pas_local_allocator_move):
(stop_impl):
(pas_local_allocator_stop):

  • libpas/src/libpas/pas_local_allocator_inlines.h:

(pas_local_allocator_commit_if_necessary_impl):
(pas_local_allocator_commit_if_necessary):
(pas_local_allocator_bless_primordial_partial_view_before_stopping):
(pas_local_allocator_refill_with_known_config):
(pas_local_allocator_try_allocate_small_segregated_slow_impl):
(pas_local_allocator_try_allocate_out_of_line_cases):
(pas_local_allocator_try_allocate_slow_impl):

  • libpas/src/libpas/pas_local_allocator_kind.h:

(pas_local_allocator_kind_get_string):
(pas_local_allocator_kind_is_stopped):

  • libpas/src/libpas/pas_local_allocator_scavenger_data.c:

(pas_local_allocator_scavenger_data_is_stopped):
(pas_local_allocator_scavenger_data_commit_if_necessary_slow):
(pas_local_allocator_scavenger_data_stop):
(pas_local_allocator_scavenger_data_prepare_to_decommit):
(pas_local_allocator_scavenger_data_is_active): Deleted.

  • libpas/src/libpas/pas_local_allocator_scavenger_data.h:
  • libpas/src/libpas/pas_local_view_cache.c:

(pas_local_view_cache_construct):
(pas_local_view_cache_move):
(pas_local_view_cache_stop):
(pas_local_view_cache_did_restart):

  • libpas/src/libpas/pas_local_view_cache.h:

(pas_local_view_cache_get_state):
(pas_local_view_cache_set_state):
(pas_local_view_cache_is_full):
(pas_local_view_cache_can_push):
(pas_local_view_cache_is_empty):
(pas_local_view_cache_prepare_to_pop):
(pas_local_view_cache_prepare_to_push):
(pas_local_view_cache_pop):
(pas_local_view_cache_push):

  • libpas/src/libpas/pas_lock.h:
  • libpas/src/libpas/pas_mmap_capability.h: Added.

(pas_mmap_capability_get_string):

  • libpas/src/libpas/pas_page_malloc.c:

(pas_page_malloc_alignment_slow):
(pas_page_malloc_alignment_shift_slow):
(pas_page_malloc_zero_fill):
(commit_impl):
(pas_page_malloc_commit):
(pas_page_malloc_commit_without_mprotect):
(decommit_impl):
(pas_page_malloc_decommit):
(pas_page_malloc_decommit_without_mprotect):
(pas_page_malloc_decommit_asymmetric): Deleted.

  • libpas/src/libpas/pas_page_malloc.h:
  • libpas/src/libpas/pas_scavenger.c:

(handle_expendable_memory):
(scavenger_thread_main):
(pas_scavenger_decommit_expendable_memory):
(pas_scavenger_fake_decommit_expendable_memory):

  • libpas/src/libpas/pas_scavenger.h:
  • libpas/src/libpas/pas_segregated_exclusive_view.c:

(pas_segregated_exclusive_view_create):

  • libpas/src/libpas/pas_segregated_exclusive_view.h:
  • libpas/src/libpas/pas_segregated_exclusive_view_inlines.h:

(pas_segregated_exclusive_view_note_eligibility):

  • libpas/src/libpas/pas_segregated_heap.c:

(medium_directory_tuple_for_index_impl):
(pas_segregated_heap_medium_directory_tuple_for_index):
(pas_segregated_heap_medium_allocator_index_for_index):
(recompute_size_lookup):
(rematerialize_size_lookup_set_medium_directory_tuple):
(pas_segregated_heap_ensure_allocator_index):
(check_size_lookup_recomputation_set_medium_directory_tuple):
(check_size_lookup_recomputation_dump_directory):
(check_size_lookup_recomputation):
(check_size_lookup_recomputation_if_appropriate):
(pas_segregated_heap_ensure_size_directory_for_size):

  • libpas/src/libpas/pas_segregated_heap.h:
  • libpas/src/libpas/pas_segregated_heap_inlines.h:

(pas_segregated_heap_touch_lookup_tables):

  • libpas/src/libpas/pas_segregated_page.c:

(pas_segregated_page_take_physically):
(pas_segregated_page_commit_fully):

  • libpas/src/libpas/pas_segregated_page_inlines.h:

(pas_segregated_page_log_or_deallocate):

  • libpas/src/libpas/pas_segregated_partial_view.c:

(pas_segregated_partial_view_create):
(compute_summary):

  • libpas/src/libpas/pas_segregated_partial_view.h:
  • libpas/src/libpas/pas_segregated_shared_page_directory.c:

(take_last_empty_consider_view):

  • libpas/src/libpas/pas_segregated_shared_view.c:

(pas_segregated_shared_view_create):
(pas_segregated_shared_view_commit_page):
(compute_summary):

  • libpas/src/libpas/pas_segregated_shared_view.h:
  • libpas/src/libpas/pas_segregated_size_directory.c:

(take_last_empty_consider_view):

  • libpas/src/libpas/pas_segregated_size_directory.h:

(pas_segregated_size_directory_get_tlc_allocator_index):

  • libpas/src/libpas/pas_segregated_view_allocator_inlines.h:

(pas_segregated_view_will_start_allocating):

  • libpas/src/libpas/pas_status_reporter.c:

(dump_large_sharing_pool_node_callback):
(pas_status_reporter_dump_view_stats):
(allocator_state):
(dump_allocator_state):
(dump_scavenger_data_state):
(pas_status_reporter_dump_baseline_allocators):
(pas_status_reporter_dump_thread_local_caches):
(pas_status_reporter_dump_everything):

  • libpas/src/libpas/pas_status_reporter.h:
  • libpas/src/libpas/pas_thread_local_cache.c:

(pas_thread_local_cache_size_for_allocator_index_capacity):
(num_pages):
(compute_page_indices):
(pages_committed_size):
(deallocate):
(allocate_cache):
(pas_thread_local_cache_create):
(pas_thread_local_cache_destroy):
(pas_thread_local_cache_get_local_allocator_slow):
(pas_thread_local_cache_is_committed):
(pas_thread_local_cache_compute_decommit_exclusion_range):
(pas_thread_local_cache_ensure_committed):
(pas_thread_local_cache_allocator_index_for_allocator):
(pas_thread_local_cache_stop_local_allocators):
(flush_deallocation_log_without_resetting):
(flush_deallocation_log_for_scavenger):
(flush_deallocation_log_with_mode):
(pas_thread_local_cache_flush_deallocation_log):
(pas_thread_local_cache_flush_deallocation_log_direct):
(suspend):
(resume):
(decommit_allocator_range):
(stop_allocator):
(pas_thread_local_cache_for_all):
(pas_thread_local_cache_shrink):
(flush_deallocation_log): Deleted.

  • libpas/src/libpas/pas_thread_local_cache.h:

(pas_thread_local_cache_offset_of_allocator):

  • libpas/src/libpas/pas_thread_local_cache_layout.c:

(pas_thread_local_cache_layout_add_node):
(pas_thread_local_cache_layout_get_node_for_index):

  • libpas/src/libpas/pas_thread_local_cache_layout.h:
  • libpas/src/libpas/pas_thread_local_cache_layout_entry.h: Added.

(pas_thread_local_cache_layout_entry_create_empty):
(pas_thread_local_cache_layout_entry_create_deleted):
(pas_thread_local_cache_layout_entry_is_empty_or_deleted):
(pas_thread_local_cache_layout_entry_is_empty):
(pas_thread_local_cache_layout_entry_is_deleted):
(pas_thread_local_cache_layout_entry_get_key):
(pas_thread_local_cache_layout_key_get_hash):
(pas_thread_local_cache_layout_key_is_equal):

  • libpas/src/libpas/pas_thread_local_cache_layout_node.c:

(pas_thread_local_cache_layout_node_num_allocator_indices):
(pas_thread_local_cache_layout_node_commit_and_construct):
(pas_thread_local_cache_layout_node_move):
(pas_thread_local_cache_layout_node_is_committed):
(pas_thread_local_cache_layout_node_ensure_committed):
(pas_thread_local_cache_layout_node_prepare_to_decommit):
(pas_thread_local_cache_layout_num_allocator_indices): Deleted.
(pas_thread_local_cache_layout_node_construct): Deleted.

  • libpas/src/libpas/pas_thread_local_cache_layout_node.h:
  • libpas/src/libpas/pas_thread_local_cache_node.c:

(pas_thread_local_cache_node_allocate):

  • libpas/src/libpas/pas_thread_local_cache_node.h:
  • libpas/src/libpas/pas_try_allocate_intrinsic.h:

(pas_try_allocate_intrinsic_impl_casual_case):
(pas_try_allocate_intrinsic_impl_inline_only):

  • libpas/src/libpas/pas_try_allocate_primitive.h:

(pas_try_allocate_primitive_impl_casual_case):
(pas_try_allocate_primitive_impl_inline_only):

  • libpas/src/libpas/pas_utility_heap_config.h:
  • libpas/src/libpas/pas_utils.h:
  • libpas/src/libpas/pas_virtual_range.h:

(pas_virtual_range_create):
(pas_virtual_range_create_empty):

  • libpas/src/test/ExpendableMemoryTests.cpp:

(std::testRage):
(std::testRematerializeAfterSearchOfDecommitted):
(std::testBasicSizeClass):
(addExpendableMemoryTests):

  • libpas/src/test/LargeSharingPoolTests.cpp:

(std::testGoodCoalesceEpochUpdate):

  • libpas/src/test/MemalignTests.cpp: Added.

(addMemalignTests):

  • libpas/src/test/TLCDecommitTests.cpp: Added.

(std::numCommittedPagesInTLC):
(std::testTLCDecommit):
(std::testChaosThenDecommit):
(std::testTLCDecommitThenDestroyImpl):
(std::testTLCDecommitThenDestroy):
(std::testTLCDecommitThenDestroyInThread):
(std::testTLCDecommitThenFlush):
(std::testTLCDecommitThenDeallocate):
(addTLCDecommitTests):

  • libpas/src/test/TestHarness.cpp:

(RuntimeConfigTestScope::RuntimeConfigTestScope):
(DecommitZeroFill::DecommitZeroFill):
(main):

  • libpas/src/test/TestHarness.h:

(operator<<):

  • libpas/src/test/ThingyAndUtilityHeapAllocationTests.cpp:

(std::addAllTests):

2:23 PM Changeset in webkit [289578] by Devin Rousso
  • 39 edits
    1 delete in trunk

Permit simultaneous Apple Pay and script injection
https://bugs.webkit.org/show_bug.cgi?id=236254
<rdar://problem/87736727>

Reviewed by Kate Cheney.

Source/WebCore:

Tests: ApplePay.ApplePayAvailableByDefault

ApplePay.ApplePayAvailableInFrame
ApplePay.UserScriptAtDocumentStartDoesNotDisableApplePay
ApplePay.UserScriptAtDocumentEndDoesNotDisableApplePay
ApplePay.UserAgentScriptEvaluationDoesNotDisableApplePay
ApplePay.UserAgentScriptEvaluationDoesNotDisableApplePayInExistingObjects
ApplePay.CanMakePaymentsDoesNotBlockUserAgentScripts
ApplePay.CanMakePaymentsWithActiveCardDoesNotBlockUserAgentScripts
ApplePay.CanMakePaymentDoesNotBlockUserAgentScripts

  • dom/Document.h:
  • dom/Document.cpp:

(WebCore::Document::ensurePlugInsInjectedScript):
(WebCore::Document::hasEvaluatedUserAgentScripts const): Deleted.
(WebCore::Document::setHasEvaluatedUserAgentScripts): Deleted.
(WebCore::Document::isApplePayActive const): Deleted.
(WebCore::Document::setApplePayIsActive): Deleted.
Remove logic that tracks script injection activity.

  • bindings/js/ScriptController.h:
  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::executeUserAgentScriptInWorld):
(WebCore::ScriptController::executeAsynchronousUserAgentScriptInWorld):
(WebCore::ScriptController::executeUserAgentScriptInWorldInternal): Deleted.
(WebCore::ScriptController::shouldAllowUserAgentScripts const): Deleted.

  • loader/EmptyClients.cpp:

(WebCore::EmptyPaymentCoordinatorClient::supportsUnrestrictedApplePay): Deleted.

  • page/Frame.cpp:

(WebCore::Frame::injectUserScriptImmediately):
Remove logic that disables script injection after an Apple Pay session is started.

  • Modules/applepay/PaymentCoordinator.h:
  • Modules/applepay/PaymentCoordinator.cpp:

(WebCore::PaymentCoordinator::canMakePayments):
(WebCore::PaymentCoordinator::canMakePaymentsWithActiveCard):
(WebCore::PaymentCoordinator::beginPaymentSession):
(WebCore::PaymentCoordinator::shouldEnableApplePayAPIs const): Deleted.
(WebCore::PaymentCoordinator::setApplePayIsActiveIfAllowed const): Deleted.
(WebCore::PaymentCoordinator::shouldAllowUserAgentScripts const): Deleted.

  • Modules/applepay/PaymentCoordinatorClient.h:

(WebCore::PaymentCoordinatorClient::userAgentScriptsBlockedErrorMessage const): Deleted.
Remove logic that tracks Apple Pay activity.

  • Modules/applepay/ApplePaySession.idl:
  • Modules/applepay/PaymentSession.h:
  • Modules/applepay/PaymentSession.cpp:

(WebCore::PaymentSession::enabledForContext): Deleted.

  • Modules/paymentrequest/PaymentHandler.cpp:

(WebCore::PaymentHandler::enabledForContext): Deleted.

  • Modules/paymentrequest/PaymentRequest.idl:
  • Modules/paymentrequest/PaymentRequest.h:
  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::PaymentRequest::enabledForContext): Deleted.
Remove logic that disables ApplePaySession/PaymentRequest after script injection.

  • testing/Internals.idl:
  • testing/Internals.h:
  • testing/Internals.cpp:

(WebCore::Internals::setApplePayIsActive): Deleted.

  • testing/MockPaymentCoordinator.idl:
  • testing/MockPaymentCoordinator.h:

(WebCore::MockPaymentCoordinator::supportsUnrestrictedApplePay): Deleted.
(WebCore::MockPaymentCoordinator::setSupportsUnrestrictedApplePay): Deleted.
Remove testing support since all uses of these have been removed (above).

Source/WebKit:

  • WebProcess/ApplePay/WebPaymentCoordinator.h:
  • WebProcess/ApplePay/WebPaymentCoordinator.cpp:

(WebKit::WebPaymentCoordinator::supportsUnrestrictedApplePay const): Deleted.
(WebKit::WebPaymentCoordinator::userAgentScriptsBlockedErrorMessage const): Deleted.
Remove logic that tracks Apple Pay activity.

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebPaymentCoordinatorClient.h:
  • WebCoreSupport/WebPaymentCoordinatorClient.mm:

(WebPaymentCoordinatorClient::supportsUnrestrictedApplePay const): Deleted.
Remove logic that tracks Apple Pay activity.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ApplePay.mm:

(TestWebKitAPI::TEST.ApplePay.ApplePayAvailableByDefault):
(TestWebKitAPI::TEST.ApplePay.ApplePayAvailableInFrame): Renamed from ApplePay.ApplePayAvailableInUnrestrictedClients.
(TestWebKitAPI::TEST.ApplePay.UserScriptAtDocumentStartDoesNotDisableApplePay): Renamed from ApplePay.UserScriptAtDocumentStartDisablesApplePay.
(TestWebKitAPI::TEST.ApplePay.UserScriptAtDocumentEndDoesNotDisableApplePay): Renamed from ApplePay.UserScriptAtDocumentEndDisablesApplePay.
(TestWebKitAPI::TEST.ApplePay.UserAgentScriptEvaluationDoesNotDisableApplePay): Renamed from ApplePay.UserAgentScriptEvaluationDisablesApplePay.
(TestWebKitAPI::TEST.ApplePay.UserAgentScriptEvaluationDoesNotDisableApplePayInExistingObjects): Renamed from ApplePay.UserAgentScriptEvaluationDisablesApplePayInExistingObjects.
(TestWebKitAPI::TEST.ApplePay.CanMakePaymentsDoesNotBlockUserAgentScripts): Renamed from ApplePay.CanMakePaymentsBlocksUserAgentScripts.
(TestWebKitAPI::TEST.ApplePay.CanMakePaymentsWithActiveCardDoesNotBlockUserAgentScripts): Renamed from ApplePay.CanMakePaymentsWithActiveCardBlocksUserAgentScripts.
(TestWebKitAPI::TEST.ApplePay.CanMakePaymentDoesNotBlockUserAgentScripts): Renamed from ApplePay.CanMakePaymentBlocksUserAgentScripts.
(TestWebKitAPI::TEST.ApplePay.ActiveSessionBlocksUserAgentScripts): Deleted.

  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-active-session.html: Removed.
  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-availability.html:
  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-availability-existing-object.html:
  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-availability-in-iframe.html:
  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-can-make-payment.html:
  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-can-make-payments.html:
  • TestWebKitAPI/Tests/WebKitCocoa/apple-pay-can-make-payments-with-active-card.html:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2:21 PM Changeset in webkit [289577] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Fix linker errors when CG_DISPLAY_LIST_BACKED_IMAGE_BUFFER is enabled
https://bugs.webkit.org/show_bug.cgi?id=236455

Patch by Ada Chan <ada.chan@apple.com> on 2022-02-10
Reviewed by Tim Horton.

WebCore::GraphicsContext::createImageBuffer() and WebCore::GraphicsContext::createCompatibleImageBuffer()
are used in WebKit::GraphicsContextCGDisplayList and need to be exported

  • platform/graphics/GraphicsContext.h:
2:19 PM Changeset in webkit [289576] by aakash_jain@apple.com
  • 1 edit
    474 adds in trunk/Source/ThirdParty

Import PDF.js v2.12.313 to the WebKit repo
https://bugs.webkit.org/show_bug.cgi?id=236452

Patch by Tim Nguyen <ntim@apple.com> on 2022-02-10
Reviewed by Brent Fulgham.

Add bundle from https://mozilla.github.io/pdf.js/getting_started/#download (Modern browsers version)

Delete the following:

  • Sourcemaps (.js.map files)
  • Example PDF file (compressed.tracemonkey-pldi-09.pdf)
  • pdfjs/LICENSE: Added.
  • pdfjs/build/pdf.js: Added.

(webpackUniversalModuleDefinition):
(return.):
(return):

  • pdfjs/build/pdf.sandbox.js: Added.

(webpackUniversalModuleDefinition):
(return.):

  • pdfjs/build/pdf.worker.js: Added.

(webpackUniversalModuleDefinition):
(return.):
(return):

  • pdfjs/web/cmaps/78-EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/78-EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/78-H.bcmap: Added.
  • pdfjs/web/cmaps/78-RKSJ-H.bcmap: Added.
  • pdfjs/web/cmaps/78-RKSJ-V.bcmap: Added.
  • pdfjs/web/cmaps/78-V.bcmap: Added.
  • pdfjs/web/cmaps/78ms-RKSJ-H.bcmap: Added.
  • pdfjs/web/cmaps/78ms-RKSJ-V.bcmap: Added.
  • pdfjs/web/cmaps/83pv-RKSJ-H.bcmap: Added.
  • pdfjs/web/cmaps/90ms-RKSJ-H.bcmap: Added.
  • pdfjs/web/cmaps/90ms-RKSJ-V.bcmap: Added.
  • pdfjs/web/cmaps/90msp-RKSJ-H.bcmap: Added.
  • pdfjs/web/cmaps/90msp-RKSJ-V.bcmap: Added.
  • pdfjs/web/cmaps/90pv-RKSJ-H.bcmap: Added.
  • pdfjs/web/cmaps/90pv-RKSJ-V.bcmap: Added.
  • pdfjs/web/cmaps/Add-H.bcmap: Added.
  • pdfjs/web/cmaps/Add-RKSJ-H.bcmap: Added.
  • pdfjs/web/cmaps/Add-RKSJ-V.bcmap: Added.
  • pdfjs/web/cmaps/Add-V.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-CNS1-0.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-CNS1-1.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-CNS1-2.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-CNS1-3.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-CNS1-4.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-CNS1-5.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-CNS1-6.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-CNS1-UCS2.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-GB1-0.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-GB1-1.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-GB1-2.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-GB1-3.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-GB1-4.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-GB1-5.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-GB1-UCS2.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Japan1-0.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Japan1-1.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Japan1-2.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Japan1-3.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Japan1-4.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Japan1-5.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Japan1-6.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Japan1-UCS2.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Korea1-0.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Korea1-1.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Korea1-2.bcmap: Added.
  • pdfjs/web/cmaps/Adobe-Korea1-UCS2.bcmap: Added.
  • pdfjs/web/cmaps/B5-H.bcmap: Added.
  • pdfjs/web/cmaps/B5-V.bcmap: Added.
  • pdfjs/web/cmaps/B5pc-H.bcmap: Added.
  • pdfjs/web/cmaps/B5pc-V.bcmap: Added.
  • pdfjs/web/cmaps/CNS-EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/CNS-EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/CNS1-H.bcmap: Added.
  • pdfjs/web/cmaps/CNS1-V.bcmap: Added.
  • pdfjs/web/cmaps/CNS2-H.bcmap: Added.
  • pdfjs/web/cmaps/CNS2-V.bcmap: Added.
  • pdfjs/web/cmaps/ETHK-B5-H.bcmap: Added.
  • pdfjs/web/cmaps/ETHK-B5-V.bcmap: Added.
  • pdfjs/web/cmaps/ETen-B5-H.bcmap: Added.
  • pdfjs/web/cmaps/ETen-B5-V.bcmap: Added.
  • pdfjs/web/cmaps/ETenms-B5-H.bcmap: Added.
  • pdfjs/web/cmaps/ETenms-B5-V.bcmap: Added.
  • pdfjs/web/cmaps/EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/Ext-H.bcmap: Added.
  • pdfjs/web/cmaps/Ext-RKSJ-H.bcmap: Added.
  • pdfjs/web/cmaps/Ext-RKSJ-V.bcmap: Added.
  • pdfjs/web/cmaps/Ext-V.bcmap: Added.
  • pdfjs/web/cmaps/GB-EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/GB-EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/GB-H.bcmap: Added.
  • pdfjs/web/cmaps/GB-V.bcmap: Added.
  • pdfjs/web/cmaps/GBK-EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/GBK-EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/GBK2K-H.bcmap: Added.
  • pdfjs/web/cmaps/GBK2K-V.bcmap: Added.
  • pdfjs/web/cmaps/GBKp-EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/GBKp-EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/GBT-EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/GBT-EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/GBT-H.bcmap: Added.
  • pdfjs/web/cmaps/GBT-V.bcmap: Added.
  • pdfjs/web/cmaps/GBTpc-EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/GBTpc-EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/GBpc-EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/GBpc-EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/H.bcmap: Added.
  • pdfjs/web/cmaps/HKdla-B5-H.bcmap: Added.
  • pdfjs/web/cmaps/HKdla-B5-V.bcmap: Added.
  • pdfjs/web/cmaps/HKdlb-B5-H.bcmap: Added.
  • pdfjs/web/cmaps/HKdlb-B5-V.bcmap: Added.
  • pdfjs/web/cmaps/HKgccs-B5-H.bcmap: Added.
  • pdfjs/web/cmaps/HKgccs-B5-V.bcmap: Added.
  • pdfjs/web/cmaps/HKm314-B5-H.bcmap: Added.
  • pdfjs/web/cmaps/HKm314-B5-V.bcmap: Added.
  • pdfjs/web/cmaps/HKm471-B5-H.bcmap: Added.
  • pdfjs/web/cmaps/HKm471-B5-V.bcmap: Added.
  • pdfjs/web/cmaps/HKscs-B5-H.bcmap: Added.
  • pdfjs/web/cmaps/HKscs-B5-V.bcmap: Added.
  • pdfjs/web/cmaps/Hankaku.bcmap: Added.
  • pdfjs/web/cmaps/Hiragana.bcmap: Added.
  • pdfjs/web/cmaps/KSC-EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/KSC-EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/KSC-H.bcmap: Added.
  • pdfjs/web/cmaps/KSC-Johab-H.bcmap: Added.
  • pdfjs/web/cmaps/KSC-Johab-V.bcmap: Added.
  • pdfjs/web/cmaps/KSC-V.bcmap: Added.
  • pdfjs/web/cmaps/KSCms-UHC-H.bcmap: Added.
  • pdfjs/web/cmaps/KSCms-UHC-HW-H.bcmap: Added.
  • pdfjs/web/cmaps/KSCms-UHC-HW-V.bcmap: Added.
  • pdfjs/web/cmaps/KSCms-UHC-V.bcmap: Added.
  • pdfjs/web/cmaps/KSCpc-EUC-H.bcmap: Added.
  • pdfjs/web/cmaps/KSCpc-EUC-V.bcmap: Added.
  • pdfjs/web/cmaps/Katakana.bcmap: Added.
  • pdfjs/web/cmaps/LICENSE: Added.
  • pdfjs/web/cmaps/NWP-H.bcmap: Added.
  • pdfjs/web/cmaps/NWP-V.bcmap: Added.
  • pdfjs/web/cmaps/RKSJ-H.bcmap: Added.
  • pdfjs/web/cmaps/RKSJ-V.bcmap: Added.
  • pdfjs/web/cmaps/Roman.bcmap: Added.
  • pdfjs/web/cmaps/UniCNS-UCS2-H.bcmap: Added.
  • pdfjs/web/cmaps/UniCNS-UCS2-V.bcmap: Added.
  • pdfjs/web/cmaps/UniCNS-UTF16-H.bcmap: Added.
  • pdfjs/web/cmaps/UniCNS-UTF16-V.bcmap: Added.
  • pdfjs/web/cmaps/UniCNS-UTF32-H.bcmap: Added.
  • pdfjs/web/cmaps/UniCNS-UTF32-V.bcmap: Added.
  • pdfjs/web/cmaps/UniCNS-UTF8-H.bcmap: Added.
  • pdfjs/web/cmaps/UniCNS-UTF8-V.bcmap: Added.
  • pdfjs/web/cmaps/UniGB-UCS2-H.bcmap: Added.
  • pdfjs/web/cmaps/UniGB-UCS2-V.bcmap: Added.
  • pdfjs/web/cmaps/UniGB-UTF16-H.bcmap: Added.
  • pdfjs/web/cmaps/UniGB-UTF16-V.bcmap: Added.
  • pdfjs/web/cmaps/UniGB-UTF32-H.bcmap: Added.
  • pdfjs/web/cmaps/UniGB-UTF32-V.bcmap: Added.
  • pdfjs/web/cmaps/UniGB-UTF8-H.bcmap: Added.
  • pdfjs/web/cmaps/UniGB-UTF8-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS-UCS2-H.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS-UCS2-HW-H.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS-UCS2-HW-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS-UCS2-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS-UTF16-H.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS-UTF16-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS-UTF32-H.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS-UTF32-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS-UTF8-H.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS-UTF8-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS2004-UTF16-H.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS2004-UTF16-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS2004-UTF32-H.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS2004-UTF32-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS2004-UTF8-H.bcmap: Added.
  • pdfjs/web/cmaps/UniJIS2004-UTF8-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJISPro-UCS2-HW-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJISPro-UCS2-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJISPro-UTF8-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJISX0213-UTF32-H.bcmap: Added.
  • pdfjs/web/cmaps/UniJISX0213-UTF32-V.bcmap: Added.
  • pdfjs/web/cmaps/UniJISX02132004-UTF32-H.bcmap: Added.
  • pdfjs/web/cmaps/UniJISX02132004-UTF32-V.bcmap: Added.
  • pdfjs/web/cmaps/UniKS-UCS2-H.bcmap: Added.
  • pdfjs/web/cmaps/UniKS-UCS2-V.bcmap: Added.
  • pdfjs/web/cmaps/UniKS-UTF16-H.bcmap: Added.
  • pdfjs/web/cmaps/UniKS-UTF16-V.bcmap: Added.
  • pdfjs/web/cmaps/UniKS-UTF32-H.bcmap: Added.
  • pdfjs/web/cmaps/UniKS-UTF32-V.bcmap: Added.
  • pdfjs/web/cmaps/UniKS-UTF8-H.bcmap: Added.
  • pdfjs/web/cmaps/UniKS-UTF8-V.bcmap: Added.
  • pdfjs/web/cmaps/V.bcmap: Added.
  • pdfjs/web/cmaps/WP-Symbol.bcmap: Added.
  • pdfjs/web/debugger.js: Added.

(FontInspector.FontInspectorClosure.removeSelection):
(FontInspector.FontInspectorClosure.resetSelection):
(FontInspector.FontInspectorClosure.selectFont):
(FontInspector.FontInspectorClosure.textLayerClick):
(FontInspector.FontInspectorClosure.return.init):
(FontInspector.FontInspectorClosure.return.cleanup):
(FontInspector.FontInspectorClosure.return.get active):
(FontInspector.FontInspectorClosure.return.set active):
(FontInspector.FontInspectorClosure.return.properties):
(FontInspector.FontInspectorClosure.return.fontAdded):
(FontInspector):
(StepperManager.StepperManagerClosure.return.init):
(StepperManager.StepperManagerClosure.return.cleanup):
(StepperManager.StepperManagerClosure.return.create):
(StepperManager.StepperManagerClosure.return.selectStepper):
(StepperManager.StepperManagerClosure.return.saveBreakPoints):
(StepperManager):
(const.Stepper.StepperClosure.c):
(const.Stepper.StepperClosure.simplifyArgs):
(const.Stepper.StepperClosure.Stepper):
(const.Stepper.StepperClosure.Stepper.prototype.init):
(const.Stepper.StepperClosure.Stepper.prototype.updateOperatorList.cboxOnClick):
(const.Stepper.StepperClosure.Stepper.prototype.updateOperatorList):
(const.Stepper.StepperClosure.Stepper.prototype.getNextBreakPoint):
(const.Stepper.StepperClosure.Stepper.prototype.breakIt):
(const.Stepper.StepperClosure.Stepper.prototype.goTo):
(const.Stepper):
(Stats.Stats):
(Stats.Stats.getStatIndex):
(Stats):
(window.PDFBug):

  • pdfjs/web/images/annotation-check.svg: Added.
  • pdfjs/web/images/annotation-comment.svg: Added.
  • pdfjs/web/images/annotation-help.svg: Added.
  • pdfjs/web/images/annotation-insert.svg: Added.
  • pdfjs/web/images/annotation-key.svg: Added.
  • pdfjs/web/images/annotation-newparagraph.svg: Added.
  • pdfjs/web/images/annotation-noicon.svg: Added.
  • pdfjs/web/images/annotation-note.svg: Added.
  • pdfjs/web/images/annotation-paragraph.svg: Added.
  • pdfjs/web/images/findbarButton-next.svg: Added.
  • pdfjs/web/images/findbarButton-previous.svg: Added.
  • pdfjs/web/images/grab.cur: Added.
  • pdfjs/web/images/grabbing.cur: Added.
  • pdfjs/web/images/loading-dark.svg: Added.
  • pdfjs/web/images/loading-icon.gif: Added.
  • pdfjs/web/images/loading.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-documentProperties.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-firstPage.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-handTool.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-lastPage.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-rotateCcw.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-rotateCw.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-scrollHorizontal.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-scrollPage.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-scrollVertical.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-scrollWrapped.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-selectTool.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-spreadEven.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-spreadNone.svg: Added.
  • pdfjs/web/images/secondaryToolbarButton-spreadOdd.svg: Added.
  • pdfjs/web/images/shadow.png: Added.
  • pdfjs/web/images/toolbarButton-bookmark.svg: Added.
  • pdfjs/web/images/toolbarButton-currentOutlineItem.svg: Added.
  • pdfjs/web/images/toolbarButton-download.svg: Added.
  • pdfjs/web/images/toolbarButton-menuArrow.svg: Added.
  • pdfjs/web/images/toolbarButton-openFile.svg: Added.
  • pdfjs/web/images/toolbarButton-pageDown.svg: Added.
  • pdfjs/web/images/toolbarButton-pageUp.svg: Added.
  • pdfjs/web/images/toolbarButton-presentationMode.svg: Added.
  • pdfjs/web/images/toolbarButton-print.svg: Added.
  • pdfjs/web/images/toolbarButton-search.svg: Added.
  • pdfjs/web/images/toolbarButton-secondaryToolbarToggle.svg: Added.
  • pdfjs/web/images/toolbarButton-sidebarToggle.svg: Added.
  • pdfjs/web/images/toolbarButton-viewAttachments.svg: Added.
  • pdfjs/web/images/toolbarButton-viewLayers.svg: Added.
  • pdfjs/web/images/toolbarButton-viewOutline.svg: Added.
  • pdfjs/web/images/toolbarButton-viewThumbnail.svg: Added.
  • pdfjs/web/images/toolbarButton-zoomIn.svg: Added.
  • pdfjs/web/images/toolbarButton-zoomOut.svg: Added.
  • pdfjs/web/images/treeitem-collapsed.svg: Added.
  • pdfjs/web/images/treeitem-expanded.svg: Added.
  • pdfjs/web/locale/ach/viewer.properties: Added.
  • pdfjs/web/locale/af/viewer.properties: Added.
  • pdfjs/web/locale/an/viewer.properties: Added.
  • pdfjs/web/locale/ar/viewer.properties: Added.
  • pdfjs/web/locale/ast/viewer.properties: Added.
  • pdfjs/web/locale/az/viewer.properties: Added.
  • pdfjs/web/locale/be/viewer.properties: Added.
  • pdfjs/web/locale/bg/viewer.properties: Added.
  • pdfjs/web/locale/bn/viewer.properties: Added.
  • pdfjs/web/locale/bo/viewer.properties: Added.
  • pdfjs/web/locale/br/viewer.properties: Added.
  • pdfjs/web/locale/brx/viewer.properties: Added.
  • pdfjs/web/locale/bs/viewer.properties: Added.
  • pdfjs/web/locale/ca/viewer.properties: Added.
  • pdfjs/web/locale/cak/viewer.properties: Added.
  • pdfjs/web/locale/ckb/viewer.properties: Added.
  • pdfjs/web/locale/cs/viewer.properties: Added.
  • pdfjs/web/locale/cy/viewer.properties: Added.
  • pdfjs/web/locale/da/viewer.properties: Added.
  • pdfjs/web/locale/de/viewer.properties: Added.
  • pdfjs/web/locale/dsb/viewer.properties: Added.
  • pdfjs/web/locale/el/viewer.properties: Added.
  • pdfjs/web/locale/en-CA/viewer.properties: Added.
  • pdfjs/web/locale/en-GB/viewer.properties: Added.
  • pdfjs/web/locale/en-US/viewer.properties: Added.
  • pdfjs/web/locale/eo/viewer.properties: Added.
  • pdfjs/web/locale/es-AR/viewer.properties: Added.
  • pdfjs/web/locale/es-CL/viewer.properties: Added.
  • pdfjs/web/locale/es-ES/viewer.properties: Added.
  • pdfjs/web/locale/es-MX/viewer.properties: Added.
  • pdfjs/web/locale/et/viewer.properties: Added.
  • pdfjs/web/locale/eu/viewer.properties: Added.
  • pdfjs/web/locale/fa/viewer.properties: Added.
  • pdfjs/web/locale/ff/viewer.properties: Added.
  • pdfjs/web/locale/fi/viewer.properties: Added.
  • pdfjs/web/locale/fr/viewer.properties: Added.
  • pdfjs/web/locale/fy-NL/viewer.properties: Added.
  • pdfjs/web/locale/ga-IE/viewer.properties: Added.
  • pdfjs/web/locale/gd/viewer.properties: Added.
  • pdfjs/web/locale/gl/viewer.properties: Added.
  • pdfjs/web/locale/gn/viewer.properties: Added.
  • pdfjs/web/locale/gu-IN/viewer.properties: Added.
  • pdfjs/web/locale/he/viewer.properties: Added.
  • pdfjs/web/locale/hi-IN/viewer.properties: Added.
  • pdfjs/web/locale/hr/viewer.properties: Added.
  • pdfjs/web/locale/hsb/viewer.properties: Added.
  • pdfjs/web/locale/hu/viewer.properties: Added.
  • pdfjs/web/locale/hy-AM/viewer.properties: Added.
  • pdfjs/web/locale/hye/viewer.properties: Added.
  • pdfjs/web/locale/ia/viewer.properties: Added.
  • pdfjs/web/locale/id/viewer.properties: Added.
  • pdfjs/web/locale/is/viewer.properties: Added.
  • pdfjs/web/locale/it/viewer.properties: Added.
  • pdfjs/web/locale/ja/viewer.properties: Added.
  • pdfjs/web/locale/ka/viewer.properties: Added.
  • pdfjs/web/locale/kab/viewer.properties: Added.
  • pdfjs/web/locale/kk/viewer.properties: Added.
  • pdfjs/web/locale/km/viewer.properties: Added.
  • pdfjs/web/locale/kn/viewer.properties: Added.
  • pdfjs/web/locale/ko/viewer.properties: Added.
  • pdfjs/web/locale/lij/viewer.properties: Added.
  • pdfjs/web/locale/lo/viewer.properties: Added.
  • pdfjs/web/locale/locale.properties: Added.
  • pdfjs/web/locale/lt/viewer.properties: Added.
  • pdfjs/web/locale/ltg/viewer.properties: Added.
  • pdfjs/web/locale/lv/viewer.properties: Added.
  • pdfjs/web/locale/meh/viewer.properties: Added.
  • pdfjs/web/locale/mk/viewer.properties: Added.
  • pdfjs/web/locale/mr/viewer.properties: Added.
  • pdfjs/web/locale/ms/viewer.properties: Added.
  • pdfjs/web/locale/my/viewer.properties: Added.
  • pdfjs/web/locale/nb-NO/viewer.properties: Added.
  • pdfjs/web/locale/ne-NP/viewer.properties: Added.
  • pdfjs/web/locale/nl/viewer.properties: Added.
  • pdfjs/web/locale/nn-NO/viewer.properties: Added.
  • pdfjs/web/locale/oc/viewer.properties: Added.
  • pdfjs/web/locale/pa-IN/viewer.properties: Added.
  • pdfjs/web/locale/pl/viewer.properties: Added.
  • pdfjs/web/locale/pt-BR/viewer.properties: Added.
  • pdfjs/web/locale/pt-PT/viewer.properties: Added.
  • pdfjs/web/locale/rm/viewer.properties: Added.
  • pdfjs/web/locale/ro/viewer.properties: Added.
  • pdfjs/web/locale/ru/viewer.properties: Added.
  • pdfjs/web/locale/sat/viewer.properties: Added.
  • pdfjs/web/locale/sc/viewer.properties: Added.
  • pdfjs/web/locale/scn/viewer.properties: Added.
  • pdfjs/web/locale/sco/viewer.properties: Added.
  • pdfjs/web/locale/si/viewer.properties: Added.
  • pdfjs/web/locale/sk/viewer.properties: Added.
  • pdfjs/web/locale/sl/viewer.properties: Added.
  • pdfjs/web/locale/son/viewer.properties: Added.
  • pdfjs/web/locale/sq/viewer.properties: Added.
  • pdfjs/web/locale/sr/viewer.properties: Added.
  • pdfjs/web/locale/sv-SE/viewer.properties: Added.
  • pdfjs/web/locale/szl/viewer.properties: Added.
  • pdfjs/web/locale/ta/viewer.properties: Added.
  • pdfjs/web/locale/te/viewer.properties: Added.
  • pdfjs/web/locale/tg/viewer.properties: Added.
  • pdfjs/web/locale/th/viewer.properties: Added.
  • pdfjs/web/locale/tl/viewer.properties: Added.
  • pdfjs/web/locale/tr/viewer.properties: Added.
  • pdfjs/web/locale/trs/viewer.properties: Added.
  • pdfjs/web/locale/uk/viewer.properties: Added.
  • pdfjs/web/locale/ur/viewer.properties: Added.
  • pdfjs/web/locale/uz/viewer.properties: Added.
  • pdfjs/web/locale/vi/viewer.properties: Added.
  • pdfjs/web/locale/wo/viewer.properties: Added.
  • pdfjs/web/locale/xh/viewer.properties: Added.
  • pdfjs/web/locale/zh-CN/viewer.properties: Added.
  • pdfjs/web/locale/zh-TW/viewer.properties: Added.
  • pdfjs/web/standard_fonts/FoxitDingbats.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitFixed.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitFixedBold.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitFixedBoldItalic.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitFixedItalic.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitSans.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitSansBold.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitSansBoldItalic.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitSansItalic.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitSerif.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitSerifBold.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitSerifBoldItalic.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitSerifItalic.pfb: Added.
  • pdfjs/web/standard_fonts/FoxitSymbol.pfb: Added.
  • pdfjs/web/standard_fonts/LICENSE_FOXIT: Added.
  • pdfjs/web/standard_fonts/LICENSE_LIBERATION: Added.
  • pdfjs/web/standard_fonts/LiberationSans-Bold.ttf: Added.
  • pdfjs/web/standard_fonts/LiberationSans-BoldItalic.ttf: Added.
  • pdfjs/web/standard_fonts/LiberationSans-Italic.ttf: Added.
  • pdfjs/web/standard_fonts/LiberationSans-Regular.ttf: Added.
  • pdfjs/web/viewer.css: Added.

(.textLayer):
(.textLayer span,):
(.textLayer span.markedContent):
(.textLayer .highlight):
(.textLayer .highlight.appended):
(.textLayer .highlight.begin):
(.textLayer .highlight.end):
(.textLayer .highlight.middle):
(.textLayer .highlight.selected):
(.textLayer ::-moz-selection):
(.textLayer ::selection):
(.textLayer br::-moz-selection):
(.textLayer br::selection):
(.textLayer .endOfContent):
(.textLayer .endOfContent.active):
(:root):
(.annotationLayer section):
(.annotationLayer .linkAnnotation > a,):
(.annotationLayer .buttonWidgetAnnotation.pushButton > canvas):
(.annotationLayer .linkAnnotation > a:hover,):
(.annotationLayer .textAnnotation img):
(.annotationLayer .textWidgetAnnotation input,):
(.annotationLayer .choiceWidgetAnnotation select option):
(.annotationLayer .buttonWidgetAnnotation.radioButton input):
(.annotationLayer .textWidgetAnnotation textarea):
(.annotationLayer .textWidgetAnnotation input[disabled],):
(.annotationLayer .textWidgetAnnotation input:hover,):
(.annotationLayer .textWidgetAnnotation input:focus,):
(.annotationLayer .textWidgetAnnotation input :focus,):
(.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,):
(.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before):
(.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after):
(.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before):
(.annotationLayer .textWidgetAnnotation input.comb):
(.annotationLayer .textWidgetAnnotation input.comb:focus):
(.annotationLayer .buttonWidgetAnnotation.checkBox input,):
(.annotationLayer .popupWrapper):
(.annotationLayer .popup):
(.annotationLayer .popup > *):
(.annotationLayer .popup h1):
(.annotationLayer .popupDate):
(.annotationLayer .popupContent):
(.annotationLayer .richText > *):
(.annotationLayer .highlightAnnotation,):
(.xfaLayer .highlight):
(.xfaLayer .highlight.appended):
(.xfaLayer .highlight.begin):
(.xfaLayer .highlight.end):
(.xfaLayer .highlight.middle):
(.xfaLayer .highlight.selected):
(.xfaLayer ::-moz-selection):
(.xfaLayer ::selection):
(.xfaPage):
(.xfaContentarea):
(.xfaPrintOnly):
(.xfaLayer):
(.xfaLayer *):
(.xfaLayer div):
(.xfaLayer svg):
(.xfaLayer svg *):
(.xfaLayer a):
(.xfaRich li):
(.xfaFont):
(.xfaCaption):
(.xfaCaptionForCheckButton):
(.xfaLabel):
(.xfaLeft):
(.xfaRight):
(.xfaLeft > .xfaCaption,):
(.xfaTop):
(.xfaBottom):
(.xfaTop > .xfaCaption,):
(.xfaBorder):
(.xfaWrapped):
(.xfaTextfield:focus,):
(.xfaCheckbox:focus,):
(.xfaTextfield,):
(.xfaTop > .xfaTextfield,):
(.xfaButton):
(.xfaLink):
(.xfaCheckbox,):
(.xfaRich):
(.xfaImage):
(.xfaLrTb,):
(.xfaLr):
(.xfaRl):
(.xfaTb > div):
(.xfaPosition):
(.xfaArea):
(.xfaValignMiddle):
(.xfaTable):
(.xfaTable .xfaRow):
(.xfaTable .xfaRlRow):
(.xfaTable .xfaRlRow > div):
(.xfaNonInteractive input,):
(@media print .xfaTextfield,):
(@media print .xfaSelect):
(@media screen and (forced-colors: active) :root):
(.pdfViewer):
(.pdfViewer .canvasWrapper):
(.pdfViewer .page):
(.pdfViewer .dummyPage):
(.pdfViewer.removePageBorders .page):
(.pdfViewer.singlePageView):
(.pdfViewer.singlePageView .page):
(.pdfViewer.scrollHorizontal,):
(.pdfViewer.removePageBorders,):
(.spread .page,):
(.pdfViewer.removePageBorders .spread .page,):
(.pdfViewer .page canvas):
(.pdfViewer .page canvas[hidden]):
(.pdfViewer .page .loadingIcon):
(.pdfViewer .page .loadingIcon.notVisible):
(.pdfViewer.enablePermissions .textLayer span):
(.pdfPresentationMode .pdfViewer):
(.pdfPresentationMode .spread):
(.pdfPresentationMode .pdfViewer .page):
(@media (prefers-color-scheme: dark) :root):
(*):
(html):
(body):
(body,):
(.hidden):
([hidden]):
(#viewerContainer.pdfPresentationMode:-webkit-full-screen):
(#viewerContainer.pdfPresentationMode:fullscreen):
(.pdfPresentationMode:-webkit-full-screen a:not(.internalLink)):
(.pdfPresentationMode:fullscreen a:not(.internalLink)):
(.pdfPresentationMode:-webkit-full-screen .textLayer span):
(.pdfPresentationMode:fullscreen .textLayer span):
(.pdfPresentationMode.pdfPresentationModeControls > *,):
(#outerContainer):
(#sidebarContainer):
(html[dir="ltr"] #sidebarContainer):
(html[dir="rtl"] #sidebarContainer):
(#outerContainer.sidebarResizing #sidebarContainer):
(#outerContainer.sidebarMoving #sidebarContainer,):
(html[dir="ltr"] #outerContainer.sidebarOpen #sidebarContainer):
(html[dir="rtl"] #outerContainer.sidebarOpen #sidebarContainer):
(#mainContainer):
(#sidebarContent):
(html[dir="ltr"] #sidebarContent):
(html[dir="rtl"] #sidebarContent):
(#viewerContainer):
(#viewerContainer:not(.pdfPresentationMode)):
(#outerContainer.sidebarResizing #viewerContainer):
(html[dir="ltr"]):
(html[dir="rtl"]):
(.toolbar):
(#toolbarContainer):
(#toolbarSidebar):
(html[dir="ltr"] #toolbarSidebar):
(html[dir="rtl"] #toolbarSidebar):
(html[dir="ltr"] #toolbarSidebar .toolbarButton):
(html[dir="rtl"] #toolbarSidebar .toolbarButton):
(html[dir="ltr"] #toolbarSidebarRight .toolbarButton):
(html[dir="rtl"] #toolbarSidebarRight .toolbarButton):
(#sidebarResizer):
(html[dir="ltr"] #sidebarResizer):
(html[dir="rtl"] #sidebarResizer):
(#toolbarContainer,):
(#toolbarViewer):
(#loadingBar):
(html[dir="ltr"] #loadingBar):
(html[dir="rtl"] #loadingBar):
(html[dir="ltr"] #outerContainer.sidebarOpen #loadingBar):
(html[dir="rtl"] #outerContainer.sidebarOpen #loadingBar):
(#outerContainer.sidebarResizing #loadingBar):
(#loadingBar .progress):
(@-webkit-keyframes progressIndeterminate):
(100%):
(@keyframes progressIndeterminate):
(#loadingBar .progress.indeterminate):
(#loadingBar .progress.indeterminate .glimmer):
(.findbar,):
(.findbar):
(.findbar > div):
(.findbar.wrapContainers > div):
(.findbar.wrapContainers > div#findbarMessageContainer):
(html[dir="ltr"] .findbar):
(html[dir="rtl"] .findbar):
(.findbar .splitToolbarButton):
(html[dir="ltr"] .findbar .splitToolbarButton):
(html[dir="rtl"] .findbar .splitToolbarButton):
(.findbar .splitToolbarButton > .toolbarButton):
(.findbar .splitToolbarButton > .toolbarButton::before):
(.findbar .splitToolbarButton > .findNext):
(html[dir="ltr"] .findbar .splitToolbarButton > .findNext):
(html[dir="rtl"] .findbar .splitToolbarButton > .findNext):
(.findbar input[type="checkbox"]):
(.findbar label):
(.findbar label:hover,):
(html[dir="ltr"] #findInput):
(html[dir="rtl"] #findInput):
(.findbar .toolbarField[type="checkbox"]:checked + .toolbarLabel):
(#findInput):
(#findInput::-moz-placeholder):
(#findInput::placeholder):
(#findInput[data-status="pending"]):
(html[dir="rtl"] #findInput[data-status="pending"]):
(#findInput[data-status="notFound"]):
(.secondaryToolbar):
(html[dir="ltr"] .secondaryToolbar):
(html[dir="rtl"] .secondaryToolbar):
(#secondaryToolbarButtonContainer):
(.doorHanger,):
(.doorHanger:after,):
(.doorHanger:after):
(.doorHangerRight:after):
(.doorHanger:before,):
(html[dir="ltr"] .doorHanger:after,):
(html[dir="ltr"] .doorHanger:before,):
(html[dir="rtl"] .doorHanger:after,):
(html[dir="rtl"] .doorHanger:before,):
(#findResultsCount):
(#findMsg):
(#findMsg:empty):
(#toolbarViewerMiddle):
(html[dir="ltr"] #toolbarViewerLeft,):
(html[dir="ltr"] #toolbarViewerRight,):
(html[dir="ltr"] #toolbarViewerLeft > *,):
(html[dir="rtl"] #toolbarViewerLeft > *,):
(.splitToolbarButton):
(html[dir="ltr"] .splitToolbarButton > .toolbarButton):
(html[dir="rtl"] .splitToolbarButton > .toolbarButton):
(.toolbarButton,):
(.overlayButton:hover,):
(.overlayButton:hover > span,):
(.toolbarButton > span):
(.toolbarButton[disabled],):
(.splitToolbarButton.toggled .toolbarButton):
(.splitToolbarButton > .toolbarButton:hover,):
(.splitToolbarButton > .toolbarButton):
(html[dir="ltr"] .splitToolbarButton > .toolbarButton:first-child,):
(html[dir="ltr"] .splitToolbarButton > .toolbarButton:last-child,):
(.splitToolbarButtonSeparator):
(.findbar .splitToolbarButtonSeparator):
(html[dir="ltr"] .splitToolbarButtonSeparator):
(html[dir="rtl"] .splitToolbarButtonSeparator):
(html[dir="ltr"] #toolbarViewerLeft > .toolbarButton:first-child,):
(html[dir="ltr"] #toolbarViewerRight > .toolbarButton:last-child,):
(.toolbarButton:hover,):
(.secondaryToolbarButton:hover,):
(.toolbarButton.toggled,):
(.secondaryToolbarButton.toggled::before):
(.toolbarButton.toggled::before):
(.toolbarButton.toggled:hover:active,):
(.dropdownToolbarButton):
(.dropdownToolbarButton::after):
(html[dir="ltr"] .dropdownToolbarButton::after):
(html[dir="rtl"] .dropdownToolbarButton::after):
(.dropdownToolbarButton > select):
(html[dir="ltr"] .dropdownToolbarButton > select):
(html[dir="rtl"] .dropdownToolbarButton > select):
(.dropdownToolbarButton > select:hover,):
(.dropdownToolbarButton > select > option):
(#customScaleOption):
(#pageWidthOption):
(.toolbarButtonSpacer):
(.toolbarButton::before,):
(.dropdownToolbarButton:hover::after,):
(.toolbarButton::before):
(.toolbarButton:hover::before,):
(.secondaryToolbarButton::before):
(html[dir="ltr"] .secondaryToolbarButton::before):
(html[dir="rtl"] .secondaryToolbarButton::before):
(.toolbarButton#sidebarToggle::before):
(html[dir="rtl"] .toolbarButton#sidebarToggle::before):
(.toolbarButton#secondaryToolbarToggle::before):
(html[dir="rtl"] .toolbarButton#secondaryToolbarToggle::before):
(.toolbarButton.findPrevious::before):
(.toolbarButton.findNext::before):
(.toolbarButton.pageUp::before):
(.toolbarButton.pageDown::before):
(.toolbarButton.zoomOut::before):
(.toolbarButton.zoomIn::before):
(.toolbarButton.presentationMode::before,):
(.toolbarButton.print::before,):
(.toolbarButton.openFile::before,):
(.toolbarButton.download::before,):
(.secondaryToolbarButton.bookmark):
(.bookmark[href="#"]):
(.toolbarButton.bookmark::before,):
(#viewThumbnail.toolbarButton::before):
(#viewOutline.toolbarButton::before):
(html[dir="rtl"] #viewOutline.toolbarButton::before):
(#viewAttachments.toolbarButton::before):
(#viewLayers.toolbarButton::before):
(#currentOutlineItem.toolbarButton::before):
(html[dir="rtl"] #currentOutlineItem.toolbarButton::before):
(#viewFind.toolbarButton::before):
(.toolbarButton.pdfSidebarNotification::after):
(html[dir="ltr"] .toolbarButton.pdfSidebarNotification::after):
(html[dir="rtl"] .toolbarButton.pdfSidebarNotification::after):
(.secondaryToolbarButton):
(html[dir="ltr"] .secondaryToolbarButton):
(html[dir="rtl"] .secondaryToolbarButton):
(html[dir="ltr"] .secondaryToolbarButton > span):
(html[dir="rtl"] .secondaryToolbarButton > span):
(.secondaryToolbarButton.firstPage::before):
(.secondaryToolbarButton.lastPage::before):
(.secondaryToolbarButton.rotateCcw::before):
(.secondaryToolbarButton.rotateCw::before):
(.secondaryToolbarButton.selectTool::before):
(.secondaryToolbarButton.handTool::before):
(.secondaryToolbarButton.scrollPage::before):
(.secondaryToolbarButton.scrollVertical::before):
(.secondaryToolbarButton.scrollHorizontal::before):
(.secondaryToolbarButton.scrollWrapped::before):
(.secondaryToolbarButton.spreadNone::before):
(.secondaryToolbarButton.spreadOdd::before):
(.secondaryToolbarButton.spreadEven::before):
(.secondaryToolbarButton.documentProperties::before):
(.verticalToolbarSeparator):
(html[dir="ltr"] .verticalToolbarSeparator):
(html[dir="rtl"] .verticalToolbarSeparator):
(.horizontalToolbarSeparator):
(.toolbarField):
(.toolbarField[type="checkbox"]):
(html[dir="ltr"] .toolbarField[type="checkbox"]):
(html[dir="rtl"] .toolbarField[type="checkbox"]):
(.toolbarField.pageNumber):
(.toolbarField.pageNumber.visiblePageIsLoading):
(.toolbarField.pageNumber::-webkit-inner-spin-button,):
(.toolbarField:focus):
(.toolbarLabel):
(html[dir="ltr"] #numPages.toolbarLabel):
(html[dir="rtl"] #numPages.toolbarLabel):
(#thumbnailView):
(#thumbnailView > a:active,):
(.thumbnail):
(html[dir="ltr"] .thumbnail):
(html[dir="rtl"] .thumbnail):
(#thumbnailView > a:last-of-type > .thumbnail):
(#thumbnailView > a:last-of-type > .thumbnail:not([data-loaded])):
(.thumbnail:not([data-loaded])):
(.thumbnailImage):
(.thumbnailSelectionRing):
(a:focus > .thumbnail > .thumbnailSelectionRing > .thumbnailImage,):
(a:focus > .thumbnail > .thumbnailSelectionRing,):
(.thumbnail.selected > .thumbnailSelectionRing > .thumbnailImage):
(.thumbnail.selected > .thumbnailSelectionRing):
(#outlineView,):
(html[dir="ltr"] .treeWithDeepNesting > .treeItem,):
(html[dir="rtl"] .treeWithDeepNesting > .treeItem,):
(.treeItem > a):
(html[dir="ltr"] .treeItem > a):
(html[dir="rtl"] .treeItem > a):
(#layersView .treeItem > a > *):
(html[dir="ltr"] #layersView .treeItem > a > label):
(html[dir="rtl"] #layersView .treesItem > a > label):
(.treeItemToggler):
(.treeItemToggler::before):
(.treeItemToggler.treeItemsHidden::before):
(html[dir="rtl"] .treeItemToggler.treeItemsHidden::before):
(.treeItemToggler.treeItemsHidden ~ .treeItems):
(html[dir="ltr"] .treeItemToggler):
(html[dir="rtl"] .treeItemToggler):
(html[dir="ltr"] .treeItemToggler::before):
(html[dir="rtl"] .treeItemToggler::before):
(.treeItem.selected > a):
(.treeItemToggler:hover,):
(::-moz-selection):
(::selection):
(#errorWrapper):
(#errorMessageLeft):
(#errorMessageRight):
(#errorMoreInfo):
(.overlayButton):
(#overlayContainer):
(#overlayContainer > *):
(#overlayContainer > .container):
(#overlayContainer > .container > .dialog):
(.dialog > .row):
(.dialog > .row > *):
(.dialog .toolbarField):
(.dialog .separator):
(.dialog .buttonRow):
(.dialog :link):
(#passwordOverlay > .dialog):
(#passwordOverlay .toolbarField):
(#documentPropertiesOverlay > .dialog):
(#documentPropertiesOverlay .row > *):
(html[dir="ltr"] #documentPropertiesOverlay .row > *):
(html[dir="rtl"] #documentPropertiesOverlay .row > *):
(#documentPropertiesOverlay .row > span):
(#documentPropertiesOverlay .row > p):
(#documentPropertiesOverlay .buttonRow):
(.clearBoth):
(.fileInput):
(#PDFBug):
(#PDFBug .controls):
(#PDFBug .panels):
(#PDFBug .panels > div):
(#PDFBug button.active):
(.debuggerShowText):
(.debuggerHideText:hover):
(#PDFBug .stats):
(#PDFBug .stats .title):
(#PDFBug table):
(#PDFBug table.showText):
(#PDFBug table.showText,):
(#PDFBug table.showText td.advance):
(#viewer.textLayer-visible .textLayer):
(#viewer.textLayer-visible .canvasWrapper):
(#viewer.textLayer-visible .canvasWrapper canvas):
(#viewer.textLayer-visible .textLayer span):
(#viewer.textLayer-hover .textLayer span:hover):
(#viewer.textLayer-shadow .textLayer span):
(.grab-to-pan-grab):
(.grab-to-pan-grab:active,):
(@page):
(#printContainer):
(@media print body):
(@media print #sidebarContainer,):
(@media print #viewerContainer):
(@media print #mainContainer,):
(@media print .page):
(@media print .page[data-loaded]):
(@media print .fileInput):
(@media print body[data-pdfjsprinting] #outerContainer):
(@media print body[data-pdfjsprinting] #printContainer):
(@media print #printContainer):
(@media print #printContainer > .printedPage):
(@media print #printContainer > .xfaPrintedPage .xfaPage):
(@media print #printContainer > .xfaPrintedPage):
(@media print #printContainer > .printedPage canvas,):
(.visibleLargeView,):
(@media all and (max-width: 900px) #toolbarViewerMiddle):
(@media all and (max-width: 840px) #sidebarContainer):
(@media all and (max-width: 840px) html[dir="ltr"] #outerContainer.sidebarOpen #viewerContainer):
(@media all and (max-width: 840px) html[dir="rtl"] #outerContainer.sidebarOpen #viewerContainer):
(@media all and (max-width: 840px) #outerContainer .hiddenLargeView,):
(@media all and (max-width: 840px) #outerContainer .visibleLargeView,):
(@media all and (max-width: 770px) #outerContainer .hiddenLargeView):
(@media all and (max-width: 770px) #outerContainer .visibleLargeView):
(@media all and (max-width: 700px) #outerContainer .hiddenMediumView):
(@media all and (max-width: 700px) #outerContainer .visibleMediumView):
(@media all and (max-width: 640px) .hiddenSmallView,):
(@media all and (max-width: 640px) .visibleSmallView):
(@media all and (max-width: 640px) .toolbarButtonSpacer):
(@media all and (max-width: 640px) html[dir="ltr"] .findbar):
(@media all and (max-width: 640px) html[dir="rtl"] .findbar):
(@media all and (max-width: 535px) #scaleSelectContainer):

  • pdfjs/web/viewer.html: Added.
  • pdfjs/web/viewer.js: Added.

(exports.checkOnBlobSupport):
(exports.checkCanvasSizeLimitation):
(exports.AppOptions):
(exports.AppOptions.get const):
(exports.AppOptions.getAll):
(exports.AppOptions.set userOptions):
(exports.AppOptions.remove):
(exports.AppOptions._hasUserOptions):
(webpack_require.DefaultExternalServices):
(webpack_require.DefaultExternalServices.updateFindControlState):
(webpack_require.DefaultExternalServices.updateFindMatchesCount):
(webpack_require.DefaultExternalServices.initPassiveLoading):
(webpack_require.DefaultExternalServices.async fallback):
(webpack_require.DefaultExternalServices.reportTelemetry):
(webpack_require.DefaultExternalServices.createDownloadManager):
(webpack_require.DefaultExternalServices.createPreferences):
(webpack_require.DefaultExternalServices.createL10n):
(webpack_require.DefaultExternalServices.createScripting):
(webpack_require.DefaultExternalServices.get supportsIntegratedFind):
(webpack_require.DefaultExternalServices.get supportsDocumentFonts):
(webpack_require.DefaultExternalServices.get supportedMouseWheelZoomModifierKeys):
(webpack_require.DefaultExternalServices.get isInAutomation):
(webpack_require.const.PDFViewerApplication.async initialize):
(webpack_require.const.PDFViewerApplication.async _readPreferences):
(webpack_require.const.PDFViewerApplication.async _parseHashParameters):
(webpack_require.const.PDFViewerApplication.async _initializeL10n):
(webpack_require.const.PDFViewerApplication._forceCssTheme):
(webpack_require.const.PDFViewerApplication.async _initializeViewerComponents):
(webpack_require.const.PDFViewerApplication.run):
(webpack_require.const.PDFViewerApplication.get initialized):
(webpack_require.const.PDFViewerApplication.get initializedPromise):
(webpack_require.const.PDFViewerApplication.zoomIn):
(webpack_require.const.PDFViewerApplication.zoomOut):
(webpack_require.const.PDFViewerApplication.zoomReset):
(webpack_require.const.PDFViewerApplication.get pagesCount):
(webpack_require.const.PDFViewerApplication.get page):
(webpack_require.const.PDFViewerApplication.set page):
(webpack_require.const.PDFViewerApplication.get supportsPrinting):
(webpack_require.const.PDFViewerApplication.get supportsFullscreen):
(webpack_require.const.PDFViewerApplication.get supportsIntegratedFind):
(webpack_require.const.PDFViewerApplication.get supportsDocumentFonts):
(webpack_require.const.PDFViewerApplication.get loadingBar):
(webpack_require.const.PDFViewerApplication.get supportedMouseWheelZoomModifierKeys):
(webpack_require.const.PDFViewerApplication.initPassiveLoading):
(webpack_require.const.PDFViewerApplication.setTitleUsingUrl):
(webpack_require.const.PDFViewerApplication.setTitle):
(webpack_require.const.PDFViewerApplication.get _docFilename):
(webpack_require.const.PDFViewerApplication._hideViewBookmark):
(webpack_require.const.PDFViewerApplication._cancelIdleCallbacks):
(webpack_require.const.PDFViewerApplication.async close):
(webpack_require.const.PDFViewerApplication.async open):
(webpack_require.const.PDFViewerApplication._ensureDownloadComplete):
(webpack_require.const.PDFViewerApplication.async download):
(webpack_require.const.PDFViewerApplication.):
(webpack_require.):
(webpack_require):

2:17 PM Changeset in webkit [289575] by commit-queue@webkit.org
  • 10 edits in trunk

[GTK][WPE] Improve device detection in the GbmDevice
https://bugs.webkit.org/show_bug.cgi?id=236436

Patch by Alejandro G. Castro <alex@igalia.com> on 2022-02-10
Reviewed by Chris Lord.

.:

  • Source/cmake/OptionsGTK.cmake: Search for drm and gbm libraries

when compiling WebGL ANGLE support.

  • Source/cmake/OptionsWPE.cmake: Ditto.

Source/WebCore:

Use DRM library to detect the device location to create the gbm
device object.

No new tests, no change in behaviour.

  • PlatformGTK.cmake: Add gbm and drm include directories and

libraries to the compilation.

  • PlatformWPE.cmake: Ditto.
  • platform/graphics/angle/GraphicsContextGLANGLE.h: Avoid storing

a pointer to the gdb device, to make sure it is just in one place,

  • platform/graphics/gbm/GBMDevice.cpp:

(WebCore::GBMDevice::GBMDevice): Use the new getDeviceFd function
to open the device file. We just create the gbm device here.
(WebCore::GBMDevice::getDeviceFd): Added. Uses drm library to look
for the device file name and opens it.

  • platform/graphics/gbm/GBMDevice.h: Ditto
  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::GraphicsContextGLANGLE): Remove
the direct pointer to the gdb device, just request it when required.
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::EGLImageBacking): Ditto.
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::reset): Ditto.

2:09 PM Changeset in webkit [289574] by Andres Gonzalez
  • 3 edits in trunk/LayoutTests

Make accessibility/mac/line-index-for-textmarker.html run faster.
https://bugs.webkit.org/show_bug.cgi?id=236451
<rdar://problem/88763847>

Reviewed by Chris Fleizach.

The main cause of slowness seems to be the high number of calls to
debug(). So now it builds the output string and call debug() just once.

  • accessibility/mac/line-index-for-textmarker-expected.txt:
  • accessibility/mac/line-index-for-textmarker.html:
2:06 PM Changeset in webkit [289573] by achristensen@apple.com
  • 5 edits in trunk/Source

Unreviewed, reverting r289485.

Internal SDKs not quiiiite ready yet

Reverted changeset:

"Move Safe Browsing knowledge into SafariSafeBrowsing
framework"
https://bugs.webkit.org/show_bug.cgi?id=231692
https://commits.webkit.org/r289485

1:09 PM Changeset in webkit [289572] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Adjust bidi (and mostly RTL) coords to support vertical writing mode
https://bugs.webkit.org/show_bug.cgi?id=236413

Reviewed by Antti Koivisto.

Add more coordinate flips to the bidi codepath to support vertical writing mode.

  • layout/formattingContexts/inline/display/InlineDisplayBox.h:

(WebCore::InlineDisplay::Box::setRight):
(WebCore::InlineDisplay::Box::setTop):
(WebCore::InlineDisplay::Box::setBottom):

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox): Convert "inline direction visual, but writing mode logical" coordinates to final.
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):
(WebCore::Layout::InlineDisplayContentBuilder::flipLogicalRectToVisualForWritingMode const):
(WebCore::Layout::InlineDisplayContentBuilder::setLeftForWritingMode const):
(WebCore::Layout::InlineDisplayContentBuilder::setRightForWritingMode const):

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h:
12:36 PM Changeset in webkit [289571] by jonlee@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed gardening.

Update fuzzy data based on EWS results to support b231828.

  • css3/color-filters/color-filter-color-property-list-item.html:
12:29 PM Changeset in webkit [289570] by Alan Coon
  • 7 edits in branches/safari-613.1.16.1-branch/Source/WebCore

Cherry-pick r289383. rdar://problem/88366849

[WebCore] JSValueInWrappedObject is not correct for concurrent GC
https://bugs.webkit.org/show_bug.cgi?id=236277
rdar://88366849

Reviewed by Saam Barati.

JSValueInWrappedObject is broken for concurrent GC's marking. It is using std::variant<> to store Weak / JSValue,
which is not safe if concurrent GC reads it while changing that std::variant. This patch fixes several problems
in JSValueInWrappedObject.

  1. We must not use std::variant here since concurrent access can happen. We have both JSValue and Weak, and change Weak after fully initialize WeakImpl's content in Weak. To ensure that, we emit storeStoreBarrier before setting Weak to the JSValueInWrappedObject's field.
  2. Assignment operator & copy constructor are basically wrong for this class as we need a write-barrier to set a value to the field. We remove them and make it explicit that we do not have write-barrier, which reveals that IDBRequest has a semantic bug.
  3. We also add clear() instead of assigning empty JSValueInWrappedObject. And we ensure that this new clear() works well with concurrent GC threads: we clear the underlying WeakImpl* pointer to nullptr. But since WeakImpl* is kept alive until GC clears weak-related things in its end phase, concurrent GC thread can access the old WeakImpl*.
  • Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::setGetResult):
  • Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::setResult): (WebCore::IDBRequest::setResultToStructuredClone): (WebCore::IDBRequest::setResultToUndefined): (WebCore::IDBRequest::willIterateCursor): (WebCore::IDBRequest::didOpenOrIterateCursor):
  • Modules/paymentrequest/PaymentMethodChangeEvent.cpp:
  • Modules/paymentrequest/PaymentResponse.cpp: (WebCore::PaymentResponse::setDetailsFunction):
  • Modules/webaudio/AudioBuffer.cpp: (WebCore::AudioBuffer::getChannelData): (WebCore::AudioBuffer::visitChannelWrappers):
  • bindings/js/JSValueInWrappedObject.h: (WebCore::JSValueInWrappedObject::JSValueInWrappedObject): (WebCore::JSValueInWrappedObject::operator JSC::JSValue const): (WebCore::JSValueInWrappedObject::visit const): (WebCore::JSValueInWrappedObject::setWeakly): (WebCore::JSValueInWrappedObject::set): (WebCore::JSValueInWrappedObject::clear): (WebCore::JSValueInWrappedObject::setWithoutBarrier): (WebCore::cachedPropertyValue): (WebCore::JSValueInWrappedObject::makeValue): Deleted. (WebCore::JSValueInWrappedObject::operator=): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289383 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12:27 PM Changeset in webkit [289569] by Alan Coon
  • 21 edits
    2 copies in branches/safari-613.1.16.0-branch

Cherry-pick r289159. rdar://problem/88366590

Thread suspend and resume should take a global lock to avoid deadlock
https://bugs.webkit.org/show_bug.cgi?id=236159

Reviewed by Geoffrey Garen.

Source/bmalloc:

Introduce pas_thread_suspend_lock and take it when suspending and resuming threads.

  • CMakeLists.txt:
  • bmalloc.xcodeproj/project.pbxproj:
  • libpas/src/libpas/pas_scavenger.c: (scavenger_thread_main): (pas_scavenger_clear_all_caches):
  • libpas/src/libpas/pas_thread_local_cache.c: (pas_thread_local_cache_for_all):
  • libpas/src/libpas/pas_thread_local_cache.h:
  • libpas/src/libpas/pas_thread_suspend_lock.c: Copied from Source/WTF/wtf/ThreadMessage.cpp.
  • libpas/src/libpas/pas_thread_suspend_lock.h: Copied from Source/WTF/wtf/ThreadMessage.cpp.

Source/JavaScriptCore:

  • heap/MachineStackMarker.cpp: (JSC::MachineThreads::tryCopyOtherThreadStack): (JSC::MachineThreads::tryCopyOtherThreadStacks):
  • heap/MachineStackMarker.h:
  • runtime/SamplingProfiler.cpp: (JSC::SamplingProfiler::takeSample):
  • runtime/VMTraps.cpp:
  • wasm/WasmMachineThreads.cpp: (JSC::Wasm::resetInstructionCacheOnAllThreads):

Source/WTF:

This patch introduces a global lock which should be taken while suspending and resuming a thread.
It is possible that two different threads suspend and resume threads. And if threads suspend
each other without critical section, it can cause a dead lock.

To avoid this problem, we introduce a global lock which should be taken when suspending and resuming
threads. Since libpas is also using thread suspension, we expose a global pas_thread_suspend_lock
when libpas is used, and we use this lock in WTF's Thread suspension code.

  • wtf/ThreadMessage.cpp: (WTF::sendMessageScoped):
  • wtf/ThreadMessage.h: (WTF::sendMessage):
  • wtf/Threading.cpp: (WTF::ThreadSuspendLocker::ThreadSuspendLocker): (WTF::ThreadSuspendLocker::~ThreadSuspendLocker):
  • wtf/Threading.h:
  • wtf/posix/ThreadingPOSIX.cpp: (WTF::Thread::suspend): (WTF::Thread::resume): (WTF::Thread::getRegisters):
  • wtf/win/ThreadingWin.cpp: (WTF::Thread::suspend): (WTF::Thread::resume): (WTF::Thread::getRegisters):

Tools:

  • TestWebKitAPI/Tests/WTF/ThreadMessages.cpp: (runThreadMessageTest):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289159 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12:27 PM Changeset in webkit [289568] by Alan Coon
  • 2 edits in branches/safari-613.1.16.0-branch/Source/bmalloc

Cherry-pick r289145. rdar://problem/88366590

[libpas] Use os_unfair_lock instead of spinlock
https://bugs.webkit.org/show_bug.cgi?id=236158

Reviewed by Geoffrey Garen.

os_unfair_lock is very fast while it can properly suspend threads.
A/B test result was neutral on Speedometer2 and JetStream2. So, to
reduce unnecessary CPU spins, let's replace spinlock with os_unfair_lock
if it is supported (if OS is Darwin).

  • libpas/src/libpas/pas_config.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289145 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12:23 PM Changeset in webkit [289567] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Crash in in WebCore::CSSStyleSheet::didMutateRules
https://bugs.webkit.org/show_bug.cgi?id=236450

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2022-02-10
Reviewed by Antti Koivisto.

Replace the raw pointer rule in RuleMutationScope with a RefPtr so it can be accessible
for the scope.

  • css/CSSStyleSheet.cpp:

(WebCore::CSSStyleSheet::RuleMutationScope::~RuleMutationScope):

  • css/CSSStyleSheet.h:
12:13 PM Changeset in webkit [289566] by Ben Nham
  • 11 edits
    2 adds in trunk/Source/WebKit

Apply default sandbox to webpushd on Mac
https://bugs.webkit.org/show_bug.cgi?id=236342

Reviewed by Per Arne Vollan.

This applies a default sandbox profile that allows and logs all operations by webpushd on
the Mac. In future patches we'll tighten the sandbox based on the sandbox logs that we
receive.

To do this, I refactored the sandbox initialization logic in AuxiliaryProcess so that it can
be called without creating an AuxiliaryProcess instance. This probably should be refactored
further (e.g. since webpushd isn't an AuxiliaryProcess, but rather a system daemon). But I
wanted to keep the amount of refactoring low for now while we're still figuring things out.

We also do not currently support compiling and caching the sandbox profiles. We'll add that
support later.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • PlatformMac.cmake:
  • Shared/AuxiliaryProcess.cpp:

(WebKit::applySandboxProfileForDaemon):

  • Shared/AuxiliaryProcess.h:
  • Shared/mac/AuxiliaryProcessMac.mm:

(WebKit::getUserDirectorySuffix):
(WebKit::populateSandboxInitializationParameters):
(WebKit::AuxiliaryProcess::initializeSandbox):
(WebKit::AuxiliaryProcess::applySandboxProfileForDaemon):

  • WebKit.xcodeproj/project.pbxproj:
  • webpushd/WebPushDaemonMain.mm:

(WebKit::applySandbox):
(WebKit::WebPushDaemonMain):

  • webpushd/mac/com.apple.WebKit.webpushd.sb.in: Added.
11:56 AM Changeset in webkit [289565] by Alan Coon
  • 9 edits in branches/safari-613.1.16.0-branch/Source

Versioning.

WebKit-7613.1.16.0.6

11:50 AM Changeset in webkit [289564] by Alan Coon
  • 9 edits in branches/safari-613.1.16.1-branch/Source

Versioning.

WebKit-7613.1.16.1.6

11:49 AM Changeset in webkit [289563] by Russell Epstein
  • 3 edits
    4 adds in branches/safari-613-branch

Cherry-pick r289498. rdar://problem/88635487

Dialog element only animates once
https://bugs.webkit.org/show_bug.cgi?id=236274
rdar://88635487

Reviewed by Tim Nguyen and Dean Jackson.

LayoutTests/imported/w3c:

Add two new tests that check that we correctly start, stop and resume animations on <dialog>
and ::backdrop as a <dialog> element is open, closed and open again.

  • web-platform-tests/css/css-animations/dialog-animation-expected.txt: Added.
  • web-platform-tests/css/css-animations/dialog-animation.html: Added.
  • web-platform-tests/css/css-animations/dialog-backdrop-animation-expected.txt: Added.
  • web-platform-tests/css/css-animations/dialog-backdrop-animation.html: Added.
  • web-platform-tests/css/css-animations/support/testcommon.js: (addElement): (addDiv):

Source/WebCore:

Two issues related to CSS Animation surfaced in this bug which animates both <dialog>
and its ::backdrop as the dialog is open and eventually re-opened.

The first issue was that we didn't clear all CSS Animations state when a <dialog> was
closed and its style was set to display: none. We now use the clearCSSAnimationsForStyleable()
function (static so that it's not exposed on the Styleable struct) to correctly clear
such state both when we identify a Styleable is newly getting display: none and when
cancelDeclarativeAnimations() was called. This allows us to remove removeCSSAnimationCreatedByMarkup()
a fair bit of work to clear CSS Animation state per-animation when we only ever used that
function for _all_ animations.

The second issue was that we never called cancelDeclarativeAnimations() for ::backdrop.
We now do that inside of Element::removeFromTopLayer() at a point where the code in
Styleable::fromRenderer() will still work as the element will still be contained in
Document::topLayerElements().

Tests: imported/w3c/web-platform-tests/css/css-animations/dialog-animation.html

imported/w3c/web-platform-tests/css/css-animations/dialog-backdrop-animation.html

  • dom/Element.cpp: (WebCore::Element::removeFromTopLayer):
  • style/Styleable.cpp: (WebCore::clearCSSAnimationsForStyleable): (WebCore::Styleable::cancelDeclarativeAnimations const): (WebCore::Styleable::updateCSSAnimations const): (WebCore::removeCSSAnimationCreatedByMarkup): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289498 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:49 AM Changeset in webkit [289562] by Russell Epstein
  • 2 edits in branches/safari-613-branch/Source/WebCore/rendering

Cherry-pick r289437. rdar://problem/86153015

Grid may be empty in certain scenarios
https://bugs.webkit.org/show_bug.cgi?id=234578

Patch by Brandon Stewart <Brandon> on 2022-02-08
Reviewed by Darin Adler.

Add check to handle legend elements when inside a CSS Grid. The legend element should not be
added to aspectRatioBlockSizeDependentGridItems.

  • rendering/RenderGrid.cpp: (WebCore::RenderGrid::layoutBlock):
  • rendering/RenderGrid.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289437 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:49 AM Changeset in webkit [289561] by Russell Epstein
  • 2 edits
    2 adds in branches/safari-613-branch

Cherry-pick r289241. rdar://problem/85727334

Updating grid gap value does not recalculate styles
https://bugs.webkit.org/show_bug.cgi?id=233252
<rdar://problem/85727334>

Reviewed by Simon Fraser.

Source/WebCore:

Both column and row gap style value change need to initiate layout in order to update their geometries.

Test: fast/dynamic/gap-style-change-should-initiate-layout.html

  • rendering/style/RenderStyle.cpp: (WebCore::rareNonInheritedDataChangeRequiresLayout):

LayoutTests:

  • fast/dynamic/gap-style-change-should-initiate-layout-expected.html: Added.
  • fast/dynamic/gap-style-change-should-initiate-layout.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289241 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:49 AM Changeset in webkit [289560] by Russell Epstein
  • 9 edits
    7 adds in branches/safari-613-branch

Cherry-pick r288434. rdar://problem/56436745

texImage2d fails to set same video frame to multiple textures
https://bugs.webkit.org/show_bug.cgi?id=203148
<rdar://problem/56436745>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-01-24
Reviewed by Darin Adler.

Source/WebCore:

WebGL optimizes repeated video uploads to same texture, due to this being
usual practice among pages. Reason is that there are no API to know when the
video frame updates.
The algorithm was:

  • If the IOSurface is the same as in the last call
  • If the texture contents has not changed since we last modified this texture then skip the upload.

However, this logic skips errorneously if the "last call" updates some other texture.
Fix and test the above.

There are other issues for the current algorithm. This patch fixes some other theoretical ones:

  • If the texture is deleted and new one gets assigned the same texture id and the content seed would clash
  • Video was uploaded to a different level

The previous implementation was keeping per-texture seed value map in the context
(GraphicsContextGLANGLE) and per-teture seed value map in the texture upload helper
(GraphicsContextGLCVCocoa) and last uploaded IOSurface seed in the upload helper (not per
texture).

The implementation in this patch keeps per-texture known content description in the texture
upload helper and invalidates this when each texture changes. The known content description
is the parameter list of the texture upload call.

Test: webgl/pending/conformance/textures/misc/tex-image-video-repeated.html

  • platform/graphics/GraphicsContextGLState.h: (WebCore::GraphicsContextGLState::setBoundTexture):
  • platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLANGLE::texImage2D): (WebCore::GraphicsContextGLANGLE::texSubImage2D): (WebCore::GraphicsContextGLANGLE::compressedTexImage2D): (WebCore::GraphicsContextGLANGLE::compressedTexSubImage2D): (WebCore::GraphicsContextGLANGLE::texStorage2D): (WebCore::GraphicsContextGLANGLE::texStorage3D): (WebCore::GraphicsContextGLANGLE::texImage2DDirect): (WebCore::GraphicsContextGLANGLE::framebufferTexture2D): (WebCore::GraphicsContextGLANGLE::createTexture): (WebCore::GraphicsContextGLANGLE::deleteTexture): (WebCore::GraphicsContextGLANGLE::invalidateKnownTextureContent): (WebCore::GraphicsContextGLANGLE::textureSeed): Deleted.
  • platform/graphics/angle/GraphicsContextGLANGLE.h:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.h:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm: (WebCore::GraphicsContextGLCocoa::invalidateKnownTextureContent):
  • platform/graphics/cv/GraphicsContextGLCVCocoa.cpp: (WebCore::GraphicsContextGLCVCocoa::TextureContent::operator== const): (WebCore::GraphicsContextGLCVCocoa::copyVideoSampleToTexture): (WebCore::GraphicsContextGLCVCocoa::invalidateKnownTextureContent):
  • platform/graphics/cv/GraphicsContextGLCVCocoa.h:

LayoutTests:

Add a test for testing the bug in which some video texture uploads
were skipped errorneously.

  • webgl/pending/conformance/textures/misc/tex-image-video-repeated.html: Added.
  • webgl/pending/conformance/textures/misc/tex-image-video-repeated-expected.txt: Added.
  • webgl/pending/resources/webgl_test_files/conformance/textures/misc/tex-image-video-repeated.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288434 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:41 AM Changeset in webkit [289559] by ntim@apple.com
  • 2 edits in trunk

Unreviewed, update my (Tim Nguyen) status to reviewer

  • metadata/contributors.json:
11:36 AM Changeset in webkit [289558] by Chris Dumez
  • 53 edits
    3 copies
    53 adds
    29 deletes in trunk

Resync web-platform-tests/service-workers from upstream
https://bugs.webkit.org/show_bug.cgi?id=236380

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Resync web-platform-tests/service-workers from upstream 012f446eafc392c7.

  • web-platform-tests/interfaces/service-workers.idl: Updated.
  • web-platform-tests/service-workers/*: Updated.

Tools:

Fix import of WPT tests with global=serviceworker-module.

  • Scripts/webkitpy/w3c/test_importer.py:

(TestImporter.init):

LayoutTests:

  • TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/mac-wk2/imported/w3c/web-platform-tests/service-workers/service-worker/websocket-in-service-worker.https-expected.txt:
  • tests-options.json:
11:12 AM Changeset in webkit [289557] by Russell Epstein
  • 17 edits
    2 copies in branches/safari-613-branch

Cherry-pick r289159. rdar://problem/88366590

Thread suspend and resume should take a global lock to avoid deadlock
https://bugs.webkit.org/show_bug.cgi?id=236159

Reviewed by Geoffrey Garen.

Source/bmalloc:

Introduce pas_thread_suspend_lock and take it when suspending and resuming threads.

  • CMakeLists.txt:
  • bmalloc.xcodeproj/project.pbxproj:
  • libpas/src/libpas/pas_scavenger.c: (scavenger_thread_main): (pas_scavenger_clear_all_caches):
  • libpas/src/libpas/pas_thread_local_cache.c: (pas_thread_local_cache_for_all):
  • libpas/src/libpas/pas_thread_local_cache.h:
  • libpas/src/libpas/pas_thread_suspend_lock.c: Copied from Source/WTF/wtf/ThreadMessage.cpp.
  • libpas/src/libpas/pas_thread_suspend_lock.h: Copied from Source/WTF/wtf/ThreadMessage.cpp.

Source/JavaScriptCore:

  • heap/MachineStackMarker.cpp: (JSC::MachineThreads::tryCopyOtherThreadStack): (JSC::MachineThreads::tryCopyOtherThreadStacks):
  • heap/MachineStackMarker.h:
  • runtime/SamplingProfiler.cpp: (JSC::SamplingProfiler::takeSample):
  • runtime/VMTraps.cpp:
  • wasm/WasmMachineThreads.cpp: (JSC::Wasm::resetInstructionCacheOnAllThreads):

Source/WTF:

This patch introduces a global lock which should be taken while suspending and resuming a thread.
It is possible that two different threads suspend and resume threads. And if threads suspend
each other without critical section, it can cause a dead lock.

To avoid this problem, we introduce a global lock which should be taken when suspending and resuming
threads. Since libpas is also using thread suspension, we expose a global pas_thread_suspend_lock
when libpas is used, and we use this lock in WTF's Thread suspension code.

  • wtf/ThreadMessage.cpp: (WTF::sendMessageScoped):
  • wtf/ThreadMessage.h: (WTF::sendMessage):
  • wtf/Threading.cpp: (WTF::ThreadSuspendLocker::ThreadSuspendLocker): (WTF::ThreadSuspendLocker::~ThreadSuspendLocker):
  • wtf/Threading.h:
  • wtf/posix/ThreadingPOSIX.cpp: (WTF::Thread::suspend): (WTF::Thread::resume): (WTF::Thread::getRegisters):
  • wtf/win/ThreadingWin.cpp: (WTF::Thread::suspend): (WTF::Thread::resume): (WTF::Thread::getRegisters):

Tools:

  • TestWebKitAPI/Tests/WTF/ThreadMessages.cpp: (runThreadMessageTest):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289159 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:12 AM Changeset in webkit [289556] by Russell Epstein
  • 1 edit in branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_config.h

Cherry-pick r289145. rdar://problem/88366590

[libpas] Use os_unfair_lock instead of spinlock
https://bugs.webkit.org/show_bug.cgi?id=236158

Reviewed by Geoffrey Garen.

os_unfair_lock is very fast while it can properly suspend threads.
A/B test result was neutral on Speedometer2 and JetStream2. So, to
reduce unnecessary CPU spins, let's replace spinlock with os_unfair_lock
if it is supported (if OS is Darwin).

  • libpas/src/libpas/pas_config.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289145 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:10 AM Changeset in webkit [289555] by Russell Epstein
  • 4 edits in branches/safari-613-branch/Source

Cherry-pick r288970. rdar://problem/88459807

Update computation of FAST_TLS base.
https://bugs.webkit.org/show_bug.cgi?id=235934

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

  • assembler/MacroAssemblerARM64.h: (JSC::MacroAssemblerARM64::loadFromTLS32): (JSC::MacroAssemblerARM64::loadFromTLS64): (JSC::MacroAssemblerARM64::storeToTLS32): (JSC::MacroAssemblerARM64::storeToTLS64):
  • assembler/SecureARM64EHashPinsInlines.h: (JSC::SecureARM64EHashPins::keyForCurrentThread):
  • offlineasm/arm64.rb:

Source/WTF:

  • wtf/PlatformHave.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288970 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:07 AM Changeset in webkit [289554] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.34/Source/WebCore

Merge r289529 - [GTK] Scrollbars painted incorrectly if theme enables steppers (steppers misplaced on vertical scrollbars, horizontal scrollbars very broken)
https://bugs.webkit.org/show_bug.cgi?id=234871

Reviewed by Carlos Garcia Campos.

Actually use the scrollbar orientation when creating its contents,
instead of always using vertical.

  • platform/gtk/RenderThemeScrollbar.cpp:

(WebCore::RenderThemeScrollbar::RenderThemeScrollbar):

11:06 AM WebKitGTK/2.34.x edited by Adrian Perez de Castro
(diff)
10:46 AM Changeset in webkit [289553] by ntim@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, update BundleResourceLoader WorkQueue identifier

Address Alex's review comment in bug 236062.

  • loader/cocoa/BundleResourceLoader.mm:

(WebCore::BundleResourceLoader::loadQueue):

10:32 AM Changeset in webkit [289552] by Wenson Hsieh
  • 18 edits in trunk/Source

Support WebPageProxy::replaceSelectionWithPasteboardData() on iOS
https://bugs.webkit.org/show_bug.cgi?id=236406

Reviewed by Tim Horton.

Source/WebCore:

Move the definition of readSelectionFromPasteboard from EditorMac.mm to EditorCocoa.mm.
No change in behavior (yet).

  • editing/Editor.h:
  • editing/cocoa/EditorCocoa.mm:

(WebCore::Editor::readSelectionFromPasteboard):

  • editing/mac/EditorMac.mm:

(WebCore::Editor::readSelectionFromPasteboard): Deleted.

Move this into EditorCocoa.mm.

Source/WebKit:

In preparation for an upcoming patch, make WebPageProxy::replaceSelectionWithPasteboardData() (as well as all
downstream codepaths) available on all Cocoa platforms. This is currently macOS-specific, and only used for
service controls (i.e. inserting content via sharing picker API).

  • Sources.txt:
  • SourcesCocoa.txt:

Move WebPasteboardOverrides.cpp from SourcesCocoa to Sources, now that there are non-Cocoa-specific codepaths in
WebPlatformStrategies that exercise this class.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::replaceSelectionWithPasteboardData):

  • UIProcess/WebPageProxy.h:
  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::replaceSelectionWithPasteboardData): Deleted.

Move this into WebPageProxyCocoa.mm.

  • WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp:

(WebKit::WebPasteboardOverrides::overriddenInfo):

  • WebProcess/WebCoreSupport/WebPasteboardOverrides.h:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::getPasteboardItemsCount):
(WebKit::WebPlatformStrategies::allPasteboardItemInfo):
(WebKit::WebPlatformStrategies::informationForItemAtIndex):
(WebKit::WebPlatformStrategies::readBufferFromPasteboard):

Add additional support for returning canned data from WebPasteboardOverrides::sharedPasteboardOverrides() in
pasteboard reading codepaths that are exercised by WebCore::Pasteboard on iOS.

  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::replaceSelectionPasteboardName):
(WebKit::WebPage::replaceSelectionWithPasteboardData):
(WebKit::WebPage::readSelectionFromPasteboard):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::readSelectionFromPasteboard): Deleted.

Delete this unimplemented method stub.

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::replaceSelectionPasteboardName): Deleted.

Move this into WebPageCocoa.mm.

(WebKit::WebPage::replaceSelectionWithPasteboardData): Deleted.
(WebKit::WebPage::readSelectionFromPasteboard): Deleted.

10:29 AM Changeset in webkit [289551] by Russell Epstein
  • 2 edits in branches/safari-614.1.3-branch/Source/WebKit

Cherry-pick r289436. rdar://problem/87908259

[WebAuthn] Use AuthenticationServicesAgent for WebAuthn calls on iOS
https://bugs.webkit.org/show_bug.cgi?id=236151
rdar://87908259

Reviewed by Brent Fulgham.

This patch starts using the ASC apis to make WebAuthn calls on iOS the
same way they are made on macOS. Some cleanup work will be needed to
deprecate the WebAuthn process after this change is made.

  • UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm: (WebKit::WebAuthenticatorCoordinatorProxy::performRequest): Deleted. (WebKit::WebAuthenticatorCoordinatorProxy::isUserVerifyingPlatformAuthenticatorAvailable): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289436 268f45cc-cd09-0410-ab3c-d52691b4dbfc

9:54 AM Changeset in webkit [289550] by Kate Cheney
  • 3 edits in trunk/LayoutTests

Unskip App Privacy Report tests in open source now that EWS is updated
https://bugs.webkit.org/show_bug.cgi?id=232251

Unreviewed. Unskip iOS 15 tests now that EWS is updated.

9:49 AM Changeset in webkit [289549] by ntim@apple.com
  • 12 edits
    2 adds in trunk/Source

Add webkit-pdfjs-viewer scheme for PDF.js resources
https://bugs.webkit.org/show_bug.cgi?id=236062

Reviewed by Youenn Fablet.

The code handling the scheme is under WebCore::BundleResourceLoader.
It reads files from the pdfjs/ sub-folder in the WebCore.framework resources folder.
Right now, this sub-folder does not exist yet, but this scheme can be tested by manually populating it.

Bug 235981 will take care of populating this folder at build-time.

Note: This scheme can only be loaded inside a PDFDocument <iframe>

Source/WebCore:

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • html/PDFDocument.cpp:

(WebCore::PDFDocument::createDocumentStructure):

  • loader/cocoa/BundleResourceLoader.mm: Added
  • loader/cocoa/BundleResourceLoader.h: Added
  • loader/PolicyChecker.cpp:

(WebCore::FrameLoader::PolicyChecker::checkNavigationPolicy):

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::start):
(WebCore::ResourceLoader::isPDFJSResourceLoad const):

  • loader/ResourceLoader.h:
  • loader/SubresourceLoader.h:
  • platform/LegacySchemeRegistry.cpp:

(WebCore::builtinSecureSchemes):

Source/WebKit:

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::tryLoadingUsingPDFJSHandler):

  • WebProcess/Network/WebLoaderStrategy.h:
9:46 AM Changeset in webkit [289548] by jonlee@apple.com
  • 9 edits in trunk/LayoutTests

Unreviewed gardening.

LayoutTests/imported/w3c:

Add fuzzy data based on EWS results to support b231828.

  • web-platform-tests/css/motion/offset-rotate-004.html:

LayoutTests:

Add or update fuzzy data based on EWS results to support b231828.

  • css3/color-filters/color-filter-color-property-list-item.html:
  • css3/color-filters/color-filter-text-decoration-shadow.html:
  • css3/filters/backdrop/backdrop-filter-uneven-corner-radii.html:
  • css3/filters/backdrop/backdrop-filter-with-border-radius-and-reflection-remove.html:
  • fast/borders/hidpi-border-radius-with-subpixel-margin-not-renderable.html:
  • fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order.html:
9:46 AM Changeset in webkit [289547] by eric.carlson@apple.com
  • 6 edits in trunk/Source/WebCore

[macOS] Support both versions of ScreenCaptureKit API
https://bugs.webkit.org/show_bug.cgi?id=236422
<rdar://problem/88726849>

Reviewed by Youenn Fablet.

Source/WebCore:

Tested manually.

  • platform/mediastream/mac/ScreenCaptureKitCaptureSource.h:
  • platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:

(-[WebCoreScreenCaptureKitHelper initWithCallback:]):
(-[WebCoreScreenCaptureKitHelper stream:didOutputSampleBuffer:ofType:]):
(WebCore::ScreenCaptureKitCaptureSource::ScreenCaptureKitCaptureSource):
(WebCore::ScreenCaptureKitCaptureSource::stop):
(WebCore::ScreenCaptureKitCaptureSource::streamConfiguration):
(WebCore::ScreenCaptureKitCaptureSource::startContentStream):
(WebCore::ScreenCaptureKitCaptureSource::updateStreamConfiguration):
(WebCore::ScreenCaptureKitCaptureSource::frameAvailableHandler):
(WebCore::ScreenCaptureKitCaptureSource::streamDidOutputSampleBuffer):
(WebCore::ScreenCaptureKitCaptureSource::captureQueue):

Source/WebCore/PAL:

  • pal/mac/ScreenCaptureKitSoftLink.h:
  • pal/mac/ScreenCaptureKitSoftLink.mm:
9:44 AM Changeset in webkit [289546] by Chris Dumez
  • 17 edits
    1 copy
    1 add
    18 deletes in trunk/LayoutTests

Resync web-platform-tests/url from upstream
https://bugs.webkit.org/show_bug.cgi?id=236377

Reviewed by Youenn Fablet.

Resync web-platform-tests/url from upstream 012f446eafc392c7.

  • web-platform-tests/url/*: Updated.
9:42 AM Changeset in webkit [289545] by Chris Dumez
  • 7 edits
    27 copies
    73 moves
    88 adds
    16 deletes in trunk/LayoutTests

Resync web-platform-tests/eventsource from upstream
https://bugs.webkit.org/show_bug.cgi?id=236374

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Resync web-platform-tests/eventsource from upstream 012f446eafc392c7.

  • web-platform-tests/eventsource/*: Updated.

LayoutTests:

9:37 AM Changeset in webkit [289544] by Aditya Keerthi
  • 11 edits
    1 add in trunk

An element with both -webkit-user-select: all and -webkit-user-drag: element does not get the nice drag snapshot that you get if you just have -webkit-user-drag: element
https://bugs.webkit.org/show_bug.cgi?id=187656
<rdar://problem/42177956>

Reviewed by Wenson Hsieh.

Source/WebCore:

When dragging an element with "-webkit-user-select: all" and
"-webkit-user-drag: element", the element gets selected, leading
WebKit to add DragSourceAction::Selection to the set of
DragSourceActions. The presence of "-webkit-user-drag: element"
results in the addition of DragSourceAction::DHTML.

The addition of DragSourceAction::Selection in the
"-webkit-user-drag: element" scenario is undesirable, as
it results in a drag snapshot containing only the selection, and
copies/pastes the text selection, rather than moving the element.

To fix, drop DragSourceAction::Selection from the set of actions
when a "-webkit-user-drag: element" element is being dragged.

The new behavior matches Firefox and Chrome.

  • page/DragController.cpp:

(WebCore::DragController::draggableElement const):
(WebCore::DragController::startDrag):
(WebCore::DragController::doSystemDrag):

  • platform/DragItem.h:

Dropping DragSourceAction::Selection exposes an issue in the
UIProcess on iOS, where UIKit text interaction can unexpectedly
begin while dragging an element with "-webkit-user-drag: element".

To fix the WebProcess behavior, while keeping the UIProcess behavior
the same, a new bit is added to DragItem to indicate that the
element being dragged contains the selection. The UIProcess will use
this bit to suppress UIKit text interaction.

(WebCore::DragItem::encode const):
(WebCore::DragItem::decode):

Source/WebKit:

Plumb DragItem's containsSelection into the DragDropInteractionState
so that UIKit text interaction can be suppressed whenever the element
being dragged also contains the current selection.

  • UIProcess/ios/DragDropInteractionState.h:
  • UIProcess/ios/DragDropInteractionState.mm:

(WebKit::DragDropInteractionState::anyActiveDragSourceContainsSelection const):
(WebKit::DragDropInteractionState::stageDragItem):
(WebKit::DragDropInteractionState::anyActiveDragSourceIs const): Deleted.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):

Tools:

Added API tests on iOS and macOS to verify that dragging and dropping an
element with "-webkit-user-select: all" and "-webkit-user-drag: element"
does not paste the selection.

On iOS, the size of the lift preview is also tested.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/contenteditable-user-select-user-drag.html: Added.
  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm:

(TEST):

9:35 AM Changeset in webkit [289543] by Andres Gonzalez
  • 2 edits in trunk/LayoutTests

Mark accessibility/mac/line-index-for-textmarker.html as Slow in Mac-wk2 Debug.
https://bugs.webkit.org/show_bug.cgi?id=236448
<rdar://problem/88757785>

Unreviewed gardening.

  • platform/mac-wk2/TestExpectations:
9:28 AM Changeset in webkit [289542] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Prepare InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox for supporting vertical writing mode
https://bugs.webkit.org/show_bug.cgi?id=236400

Reviewed by Antti Koivisto.

This is just a small cleanup patch to make the vertical writing mode code easier to adopt.

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):

9:04 AM Changeset in webkit [289541] by Megan Gardner
  • 5 edits in trunk/Source/WebKit

Mail attachment switched to TIFF and balloons in size after markup.
https://bugs.webkit.org/show_bug.cgi?id=236405
rdar://87358910

Reviewed by Wenson Hsieh.

When pulling data from the webprocess to pass to the Sharing Service
for markup, we would convert it to TIFF format. This would cause files
to increase in size, and lose their original formatting, as well as outright
break PDFs. Instead we should be pulling the data from the attachment, which
already exists in the UI process and is the source of truth for that data anyways.
This allows us to give the correct type to the sharing service, and we should
take the data back as the same original type when getting the data back from
markup.

  • UIProcess/API/APIAttachment.cpp:

(API::Attachment::enclosingImageData const):

  • UIProcess/API/APIAttachment.h:
  • UIProcess/API/Cocoa/APIAttachmentCocoa.mm:

(API::Attachment::enclosingImageNSData const):

  • UIProcess/mac/WKSharingServicePickerDelegate.mm:

(-[WKSharingServicePickerDelegate sharingService:didShareItems:]):

  • UIProcess/mac/WebContextMenuProxyMac.mm:

(WebKit::WebContextMenuProxyMac::setupServicesMenu):

9:02 AM Changeset in webkit [289540] by Chris Dumez
  • 39 edits
    1 copy
    12 moves
    108 adds
    61 deletes in trunk/LayoutTests

Resync web-platform-tests/xhr from upstream
https://bugs.webkit.org/show_bug.cgi?id=236372

Reviewed by Youenn Fablet.

Resync web-platform-tests/xhr from upstream 012f446eafc392c7.

  • web-platform-tests/xhr/*: Updated.
8:54 AM Changeset in webkit [289539] by Chris Dumez
  • 7 edits
    4 deletes in trunk/LayoutTests

Resync web-platform-tests/webaudio from upstream
https://bugs.webkit.org/show_bug.cgi?id=236373

Reviewed by Youenn Fablet.

Resync web-platform-tests/webaudio from upstream 012f446eafc392c7.

  • web-platform-tests/webaudio/idlharness.https-expected.txt: Removed.
  • web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/suspend-after-construct-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audiodestinationnode-interface/idl-test-expected.txt: Removed.
  • web-platform-tests/webaudio/the-audio-api/the-audiodestinationnode-interface/idl-test.html: Removed.
  • web-platform-tests/webaudio/the-audio-api/the-audiodestinationnode-interface/w3c-import.log: Removed.
  • web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-expected.txt: Removed.
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-large-endtime-expected.txt: Removed.
  • web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-postmessage-sharedarraybuffer.https-expected.txt: Removed.
  • web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/cors-check.https-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-mediastreamaudiosourcenode-interface/mediastreamaudiosourcenode-routing-expected.txt: Removed.
8:38 AM Changeset in webkit [289538] by Tyler Wilcock
  • 2 edits in trunk/Source/WebCore

AX: Log more information when the wrapper or the wrapper's backing object is detached
https://bugs.webkit.org/show_bug.cgi?id=236381

Reviewed by Chris Fleizach.

Right now, we don't log any information when we detect a wrapper has
no object, or when it does have an object but it's detached from a
parent.

This patch logs the wrapper address and object in these scenarios, which
will help debug these issues in conjuction with other logs.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper logMissingBackingObject]):
Added.
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
Use new logMissingBackingObject, and log object if it's detached from a parent.
(-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
Use new logMissingBackingObject.

8:36 AM Changeset in webkit [289537] by Tyler Wilcock
  • 3 edits in trunk/Source/WebCore

AXIsolatedTree::updateChildren and AXIsolatedTree::nodeAncestryChanges results in adding incorrect nodes to the isolated tree
https://bugs.webkit.org/show_bug.cgi?id=236414

Reviewed by Andres Gonzalez.

Sometimes AXIsolatedTree::updateChildren is called with an object that is
not in the isolated tree. When this happens, we currently call AXIsolatedTree::nodeAncestryChanges
to build the ancestry chain up to the nearest in-isolated-tree node (starting with the original
object called for updateChildren).

However, this seems to result in adding nodes to the isolated tree that don't exist in the live tree.
I believe this also causes isolated objects to often hold references to parent objects that don't exist
in the isolated tree, breaking object searches (and more).

With this patch, when AXIsolatedTree::updateChildren is called with an object that has no isolated tree
equivalent, we traverse up the object's ancestry until we find an object in the isolated tree and update
the children for that.

This was the behavior before https://bugs.webkit.org/show_bug.cgi?id=235389. We made that change because
we believed this behavior was causing a lot of full-tree re-renders. However, in my testing on large webpages
(e.g. youtube.com, facebook.com), this doesn't seem to be the case, and performance is actually very good.

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::updateChildren):
(WebCore::AXIsolatedTree::nodeAncestryChanges):
Deleted.
(WebCore::AXIsolatedTree::nodeChangeForObject):
Remove updateNodeMap parameter, as the now-deleted nodeAncestryChanges
was the only thing that called it with the non-default value of true.

  • accessibility/isolatedtree/AXIsolatedTree.h:

(WebCore::AXIsolatedTree::queueChangesAndRemovals):

8:21 AM Changeset in webkit [289536] by youenn@apple.com
  • 6 edits in trunk

Do not expose in WebIDL the parts of the permission API that are not yet supported
https://bugs.webkit.org/show_bug.cgi?id=236301

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/permissions/idlharness.any-expected.txt:
  • web-platform-tests/permissions/idlharness.any.worker-expected.txt:

Source/WebCore:

Covered by existing tests.

  • Modules/permissions/PermissionStatus.idl:
  • Modules/permissions/Permissions.idl:
7:56 AM Changeset in webkit [289535] by Jonathan Bedard
  • 3 edits in trunk/Tools

Unreviewed, reverting 247040@main.
https://bugs.webkit.org/show_bug.cgi?id=236399
<rdar://problem/88707207>

Broke EWS links after merging.

Reverted changeset:

[EWS] Link commit URL to pull request
https://bugs.webkit.org/show_bug.cgi?id=236399
<rdar://problem/88707207>

7:49 AM Changeset in webkit [289534] by youenn@apple.com
  • 4 edits in trunk

Check for feature policy when querying permission state
https://bugs.webkit.org/show_bug.cgi?id=236299

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/permissions/permissions-query-feature-policy-attribute.https.sub-expected.txt:

Source/WebCore:

Added feature policy check for camera, microphone and geolocation, which after https://bugs.webkit.org/show_bug.cgi?id=236292
are the only one returning anything else than NotSupported.

Covered by updated test.

  • Modules/permissions/Permissions.cpp:

(WebCore::isAllowedByFeaturePolicy):
(WebCore::Permissions::query):

7:45 AM Changeset in webkit [289533] by youenn@apple.com
  • 6 edits
    2 adds in trunk

Settling of a fetch promise should be delayed in case page is entering page cache
https://bugs.webkit.org/show_bug.cgi?id=236292
<rdar://88452971>

Reviewed by Chris Dumez.

Source/WebCore:

Make sure to enqueue a task before resolving fetch promise as otherwise, page might continue running JavaScript.
Do this for worker as well for good measure.
We move signal aborted checks to two clients to handle rejecting fetch promise synchronously.

Test: http/tests/navigation/fetch-pagecache.html

  • Modules/cache/DOMCache.cpp:
  • Modules/fetch/FetchResponse.cpp:
  • Modules/fetch/FetchResponse.h:
  • Modules/fetch/WindowOrWorkerGlobalScopeFetch.cpp:
  • workers/service/FetchEvent.cpp:

LayoutTests:

  • http/tests/navigation/fetch-pagecache-expected.txt: Added.
  • http/tests/navigation/fetch-pagecache.html: Added.
7:33 AM Changeset in webkit [289532] by Chris Dumez
  • 5 edits in trunk

Fail synchronously when constructing a SharedWorker with an URL that is not same-origin
https://bugs.webkit.org/show_bug.cgi?id=236419

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/workers/constructors/SharedWorker/same-origin-expected.txt:

Rebaseline test that is now fully passing. I have verified that it is passing in both
Blink and Gecko too.

  • web-platform-tests/workers/shared-worker-in-data-url-context.window-expected.txt:

Even though this looks like a regression, this actually aligns our behavior with both
Blink & Gecko (who also fail this check). Note that the load fails no matter what.
However, the test expects it to fail asynchronously instead of synchronously in this
case.

Source/WebCore:

Fail synchronously when constructing a SharedWorker with an URL that is not same-origin.
This aligns our behavior with Chrome and matches the language in the specification.

No new tests, rebaselined existing test.

  • workers/shared/SharedWorker.cpp:

(WebCore::SharedWorker::create):

6:52 AM WebKitGTK/2.34.x edited by Michael Catanzaro
(diff)
6:46 AM Changeset in webkit [289531] by commit-queue@webkit.org
  • 20 edits
    4 adds in trunk/Source

Introduce SignedPtrTraits which enables Ref pointers to be protected with PtrTags.
https://bugs.webkit.org/show_bug.cgi?id=235588
rdar://88023849

Patch by Gavin Phillips <gavin.p@apple.com> on 2022-02-10
Reviewed by Mark Lam.

Create and adopt SignedPtrTraits which can be used to apply and verify PtrTag signatures
to pointers stored in and tracked by WTF:Ref.

Source/WebCore:

  • bindings/js/JSDOMWrapper.h:

(WebCore::JSDOMWrapper::wrapped const):
(WebCore::JSDOMWrapper::offsetOfWrapped):
(WebCore::JSDOMWrapper::hasCustomPtrTraits):

  • bindings/scripts/CodeGeneratorJS.pm:

(GetParentClassName):
(GetImplClassPtrTag):
(GenerateHeader):
(GetTaggedWrapperForInterface):

  • bindings/scripts/IDLAttributes.json:
  • bindings/scripts/test/BindingTestGlobalConstructors.idl:
  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:

(WebCore::jsTestGlobalObject_TestTaggedWrapperConstructorGetter):
(WebCore::JSC_DEFINE_CUSTOM_GETTER):

  • bindings/scripts/test/JS/JSTestTaggedWrapper.cpp: Added.

(WebCore::JSTestTaggedWrapperDOMConstructor::prototypeForStructure):
(WebCore::JSTestTaggedWrapperDOMConstructor::initializeProperties):
(WebCore::JSTestTaggedWrapperPrototype::finishCreation):
(WebCore::JSTestTaggedWrapper::JSTestTaggedWrapper):
(WebCore::JSTestTaggedWrapper::finishCreation):
(WebCore::JSTestTaggedWrapper::createPrototype):
(WebCore::JSTestTaggedWrapper::prototype):
(WebCore::JSTestTaggedWrapper::getConstructor):
(WebCore::JSTestTaggedWrapper::destroy):
(WebCore::JSC_DEFINE_CUSTOM_GETTER):
(WebCore::JSTestTaggedWrapper::subspaceForImpl):
(WebCore::JSTestTaggedWrapper::analyzeHeap):
(WebCore::JSTestTaggedWrapperOwner::isReachableFromOpaqueRoots):
(WebCore::JSTestTaggedWrapperOwner::finalize):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSTestTaggedWrapper::toWrapped):

  • bindings/scripts/test/JS/JSTestTaggedWrapper.h: Added.

(WebCore::JSTestTaggedWrapper::create):
(WebCore::JSTestTaggedWrapper::createStructure):
(WebCore::JSTestTaggedWrapper::subspaceFor):
(WebCore::wrapperOwner):
(WebCore::wrapperKey):
(WebCore::toJS):
(WebCore::toJSNewlyCreated):

  • bindings/scripts/test/SupplementalDependencies.dep:
  • bindings/scripts/test/TestTaggedWrapper.idl: Added.
  • css/DOMMatrixReadOnly.idl:
  • dom/DOMPointReadOnly.idl:
  • dom/DOMQuad.idl:
  • dom/DOMRectReadOnly.idl:
  • domjit/JSDocumentDOMJIT.cpp:

(WebCore::compileDocumentDocumentElementAttribute):
(WebCore::compileDocumentBodyAttribute):

  • domjit/JSNodeDOMJIT.cpp:

(WebCore::createCallDOMGetterForOffsetAccess):
(WebCore::compileNodeOwnerDocumentAttribute):

  • html/TimeRanges.idl:
  • html/canvas/OffscreenCanvasRenderingContext2D.idl:
  • html/canvas/PaintRenderingContext2D.idl:
  • svg/SVGMatrix.idl:

Source/WTF:

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/SignedPtr.h: Added.

(WTF::SignedPtr::SignedPtr):
(WTF::SignedPtr::get const):
(WTF::SignedPtr::set):
(WTF::SignedPtr::clear):
(WTF::SignedPtr::operator-> const):
(WTF::SignedPtr::operator* const):
(WTF::SignedPtr::operator! const):
(WTF::SignedPtr::operator UnspecifiedBoolType const):
(WTF::SignedPtr::operator bool const):
(WTF::SignedPtr::operator=):
(WTF::SignedPtr::exchange):
(WTF::SignedPtr::swap):
(WTF::SignedPtrTraits::exchange):
(WTF::SignedPtrTraits::swap):
(WTF::SignedPtrTraits::unwrap):
(WTF::SignedPtrTraits::hashTableDeletedValue):
(WTF::SignedPtrTraits::isHashTableDeletedValue):

6:23 AM Changeset in webkit [289530] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Add InInlineDirection postfix to margin/border/paddingLeft(Right)
https://bugs.webkit.org/show_bug.cgi?id=236398

Reviewed by Antti Koivisto.

This helps to make sure we don't confuse _visual_ border left and border left in the inline base direction sense
(i.e. logical left can turn into a "visual" right in the inline base direction context (RTL) which can turn into a final physical bottom after the writing mode flip)

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::marginLeftInInlineDirection):
(WebCore::Layout::marginRightInInlineDirection):
(WebCore::Layout::borderLeftInInlineDirection):
(WebCore::Layout::borderRightInInlineDirection):
(WebCore::Layout::paddingLeftInInlineDirection):
(WebCore::Layout::paddingRightInInlineDirection):
(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):
(WebCore::Layout::marginLeft): Deleted.
(WebCore::Layout::marginRight): Deleted.
(WebCore::Layout::borderLeft): Deleted.
(WebCore::Layout::borderRight): Deleted.
(WebCore::Layout::paddingLeft): Deleted.
(WebCore::Layout::paddingRight): Deleted.

6:14 AM Changeset in webkit [289529] by Alexander Mikhaylenko
  • 2 edits in trunk/Source/WebCore

[GTK] Scrollbars painted incorrectly if theme enables steppers (steppers misplaced on vertical scrollbars, horizontal scrollbars very broken)
https://bugs.webkit.org/show_bug.cgi?id=234871

Reviewed by Carlos Garcia Campos.

Actually use the scrollbar orientation when creating its contents,
instead of always using vertical.

  • platform/gtk/RenderThemeScrollbar.cpp:

(WebCore::RenderThemeScrollbar::RenderThemeScrollbar):

5:54 AM Changeset in webkit [289528] by Carlos Garcia Campos
  • 10 edits
    1 copy
    1 add in trunk/Source

[GTK][WPE] Refactor the XDGDBusProxy launcher to simplify it and fix some issues
https://bugs.webkit.org/show_bug.cgi?id=236437

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Make accessibility bus address API available for ATK too.

  • platform/graphics/PlatformDisplay.cpp:
  • platform/graphics/PlatformDisplay.h:
  • platform/graphics/x11/PlatformDisplayX11.cpp:
  • platform/graphics/x11/PlatformDisplayX11.h:

Source/WebKit:

This patch moves the XDGDBusProxy launcher implementation to its own file and fixes the following issues:

  • r289369 introduced an issue with old versions of bwrap that fails to mount over an existing file, so we need to ensure we only bind the original socket for the a11y socket and not the session bus one.
  • bindA11y is GTK specific for some reason, which means WPE doesn't have a11y under the sandbox.
  • The names of the socket paths for a11y and session bus use the same pattern dbus-proxy-XXXXXX, it helps to use a different one.
  • The code to get the a11y DBus address is now duplicated in PlatformDisplay, we can just use the PlatformDisplay to get the address.
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::argumentsToFileDescriptor):
(WebKit::bindDBusSession):
(WebKit::bindA11y):
(WebKit::bubblewrapSpawn):
(WebKit::argsToFd): Deleted.
(WebKit::XDGDBusProxyLauncher::setAddress): Deleted.
(WebKit::XDGDBusProxyLauncher::isRunning const): Deleted.
(WebKit::XDGDBusProxyLauncher::path const): Deleted.
(WebKit::XDGDBusProxyLauncher::proxyPath const): Deleted.
(WebKit::XDGDBusProxyLauncher::setPermissions): Deleted.
(WebKit::XDGDBusProxyLauncher::launch): Deleted.
(WebKit::XDGDBusProxyLauncher::makeProxyPath): Deleted.
(WebKit::XDGDBusProxyLauncher::dbusAddressToPath): Deleted.
(): Deleted.

  • UIProcess/Launcher/glib/BubblewrapLauncher.h:
  • UIProcess/Launcher/glib/XDGDBusProxy.cpp: Added.

(WebKit::XDGDBusProxy::XDGDBusProxy):
(WebKit::XDGDBusProxy::makeProxy const):
(WebKit::XDGDBusProxy::launch const):

  • UIProcess/Launcher/glib/XDGDBusProxy.h: Added.

(WebKit::XDGDBusProxy::proxyPath const):
(WebKit::XDGDBusProxy::path const):

5:50 AM WebKitGTK/2.34.x edited by Adrian Perez de Castro
(diff)
5:02 AM Changeset in webkit [289527] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Incorrect abspos layout when toggling contain
https://bugs.webkit.org/show_bug.cgi?id=236261

Patch by Rob Buis <rbuis@igalia.com> on 2022-02-10
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/contain-layout-020-expected.html: Added.
  • web-platform-tests/css/css-contain/contain-layout-020.html: Added.

Source/WebCore:

A change in layout containment for a container means either the container becomes
a absolute positioning containing block or ceases to be one. The method
removePositionedObjectsIfNeeded handles this, update it to take layout containment
changes into account.

Test: imported/w3c/web-platform-tests/css/css-contain/contain-layout-020.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::removePositionedObjectsIfNeeded):

3:10 AM Changeset in webkit [289526] by Antti Koivisto
  • 6 edits
    2 adds in trunk

[:has() pseudo-class] Nullptr crash with non-function :has
https://bugs.webkit.org/show_bug.cgi?id=236431
rdar://87061239

Reviewed by Cameron McCormack.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/parsing/parse-has-expected.txt:
  • web-platform-tests/css/selectors/parsing/parse-has.html:

Source/WebCore:

Test: fast/selectors/malformed-has.html

  • css/parser/CSSSelectorParser.cpp:

(WebCore::isOnlyPseudoClassFunction):

:has() is legal, plain :has is not.

LayoutTests:

  • fast/selectors/malformed-has-expected.txt: Added.
  • fast/selectors/malformed-has.html: Added.
2:36 AM Changeset in webkit [289525] by commit-queue@webkit.org
  • 42 edits
    3 copies
    8 adds in trunk

Introduce a RemoteMediaSampleProxy to represent captured video frames used in Media Streams and present in GPUP
https://bugs.webkit.org/show_bug.cgi?id=236099

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-10
Reviewed by Youenn Fablet.

Source/WebCore:

Add VideoFrame : public MediaStream, base class for Media Stream video frames.
Currently inherits from MediaSample, but later will remove the MediaSample.

The WebCore::VideoFrame is intended to be used in various entry-points that
currently are currently typed as:

void videoSampleAvailable(MediaSample&, VideoSampleMetadata, ...).

The new class WebKit::RemoteVideoFrameProxy : public VideoFrame can be passed to these APIs.
The API entrypoints are not yet changed in order to partially roll the changes in.
Later on, the entrypoints will be similar to:

void videoSampleAvailable(VideoFrame&, VideoSampleMetadata, ...).

Removes MediaSample::setTrackID as that is not used.
Changes MediaSample::platformSample() to const, so that it can be called from
const context.

No new tests, refactor.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/MediaSample.h:
  • platform/VideoFrame.cpp: Added.

(WebCore::VideoFrame::decodeTime const):
(WebCore::VideoFrame::duration const):
(WebCore::VideoFrame::trackID const):
(WebCore::VideoFrame::sizeInBytes const):
(WebCore::VideoFrame::presentationSize const):
(WebCore::VideoFrame::offsetTimestampsBy):
(WebCore::VideoFrame::setTimestamps):
(WebCore::VideoFrame::isDivisable const):
(WebCore::VideoFrame::divide):
(WebCore::VideoFrame::createNonDisplayingCopy const):
(WebCore::VideoFrame::flags const):
(WebCore::VideoFrame::byteRange const):
(WebCore::VideoFrame::dump const):

  • platform/VideoFrame.h: Added.
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:

(WebCore::LocalSampleBufferDisplayLayer::enqueueSampleBuffer):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateCurrentFrameImage):

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:

(isType):

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:

(WebCore::MediaSampleAVFObjC::platformSample const):

  • platform/graphics/gstreamer/MediaSampleGStreamer.cpp:

(WebCore::MediaSampleGStreamer::platformSample const):

  • platform/graphics/gstreamer/MediaSampleGStreamer.h:
  • platform/mock/mediasource/MockSourceBufferPrivate.cpp:

(WebCore::MockMediaSample::platformSample const):

Source/WebKit:

WebContent process:
Add WebKit::RemoteVideoFrameProxy, WebContent process side proxy object that
WebCore::MediaPlayerPrivateMediaStreamAVFObjC can use.

RemoteVideoFrameProxy can be sent to the GPUP and the the SampleBufferDisplayLayer. So
the captured content shows in compositing through video element.

At the moment MediaPlayerPrivateMediaStreamAVFObjC cannot paint RemoteVideoFrameProxy to the
document CSS painted content, Context2D or WebGL canvas.

GPUP:
RemoteVideoFrameObjectHeap is a mapping
RemoteVideoFrameIdentifier -> MediaSample. Currently all objects
map to normal MediaSampleAVFObjC.

Add an example implementation where a remote MediaSample is returned by IPC:
RemoteGraphicsContextGL::paintCompositedResultsToMediaSample().

The GPUP object pointed by RemoteVideoFrameIdentifier is:

  • created in RemoteGraphicsContextGL::paintCompositedResultsToMediaSample() in RemoteGraphicsContextGL thread
  • consumed in RemoteSampleBufferDisplayLayer::enqueueSample in RemoteSampleBufferDisplayLayerManager thread
  • released in RemoteVideoFrameObjectHeap::releaseVideoFrame in GPUP main thread

All of these messages are asynchronous and can arrive to their destination in any order.
For example, request to release the video frame can happen before the message to create the video frame has been
received.

To solve the ordering issue, introduce readers-writers reference counting method via following classes:

  • ObjectIdentifierReadReference
  • ObjectIdentifierWriteReference
  • ObjectIdentifierReferenceTracker

ObjectIdentifier identifies the object.
ObjectIdentifierWriteReference identifies a new version of the content pointed by the identifier.
Pseudocode examples:

WriteReference { identifier = 1, pendingReads = 0, version = 0 } means:

"End the life-time of identifier 1, version 0. Create version = 1"
This is how initial object is assigned to the reference.

WriteReference { identifier = 1, pendingReads = 77, version = 32 } means

"End the life-time of identifier 1, version 32 when all 77 reads have completed. Create version = 33"

ObjectIdentifierReadReference declares a read dependency to a specific version of the content pointed by the identifier.
Pseudocode examples:

ReadReference { identifier = 1, version = 32 } means
"Complete one read of identifier 1, version 32".

Creates, updates and destructions are WriteReferences.
Reads are ReadReferences.

The ObjectIdentifierReferenceTracker creates write and read references in the Proxy -using process (WebContent process).

The added ThreadSafeObjectHeap resolves the read and write references in the real object process (GPUP in this case).
Reads and writes are blocking the requesting thread appropriately:

  • Read of unknown version of the identifier blocks until the write creates the version
  • Write of new version of the identifier blocks until the reads have retired, or creates parallel, new version of the content in case of copy-on-write schemes.

In this commit objects pointed by RemoteVideoFrameIdentifier are immutable until destroyed, so there is no update or
copy-on-write scheme here.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::GPUConnectionToWebProcess):
(WebKit::GPUConnectionToWebProcess::didClose):
(WebKit::GPUConnectionToWebProcess::videoFrameObjectHeap const):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::RemoteGraphicsContextGL::RemoteGraphicsContextGL):
(WebKit::RemoteGraphicsContextGL::paintCompositedResultsToMediaSample):

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:
  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.cpp: Added.

(WebKit::RemoteVideoFrameObjectHeap::create):
(WebKit::RemoteVideoFrameObjectHeap::RemoteVideoFrameObjectHeap):
(WebKit::RemoteVideoFrameObjectHeap::~RemoteVideoFrameObjectHeap):
(WebKit::RemoteVideoFrameObjectHeap::stopListeningForIPC):
(WebKit::RemoteVideoFrameObjectHeap::addVideoFrame):
(WebKit::RemoteVideoFrameObjectHeap::releaseVideoFrame):

  • GPUProcess/media/RemoteVideoFrameObjectHeap.h: Added.
  • GPUProcess/media/RemoteVideoFrameObjectHeap.messages.in: Copied from Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in.
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:

(WebKit::RemoteSampleBufferDisplayLayer::create):
(WebKit::RemoteSampleBufferDisplayLayer::RemoteSampleBufferDisplayLayer):
(WebKit::RemoteSampleBufferDisplayLayer::enqueueSample):
(WebKit::RemoteSampleBufferDisplayLayer::enqueueSampleCV):

  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp:

(WebKit::RemoteSampleBufferDisplayLayerManager::createLayer):

  • Scripts/webkit/messages.py:

(types_that_cannot_be_forward_declared):
(headers_for_type):

  • Shared/IPCTester.cpp:

(WebKit::IPCTester::startMessageTesting):
(WebKit::isTestingIPC):

  • Shared/IPCTester.h:

(WebKit::isTestingIPC):

  • Shared/ObjectIdentifierReferenceTracker.h: Added.

(WebKit::ObjectIdentifierReference::ObjectIdentifierReference):
(WebKit::ObjectIdentifierReference::identifier const):
(WebKit::ObjectIdentifierReference::version const):
(WebKit::ObjectIdentifierReference::operator== const):
(WebKit::ObjectIdentifierReference::isHashTableDeletedValue const):
(WebKit::ObjectIdentifierReadReference::ObjectIdentifierReadReference):
(WebKit::ObjectIdentifierReadReference::identifier const):
(WebKit::ObjectIdentifierReadReference::version const):
(WebKit::ObjectIdentifierReadReference::reference const):
(WebKit::ObjectIdentifierReadReference::encode const):
(WebKit::ObjectIdentifierReadReference::decode):
(WebKit::ObjectIdentifierWriteReference::ObjectIdentifierWriteReference):
(WebKit::ObjectIdentifierWriteReference::identifier const):
(WebKit::ObjectIdentifierWriteReference::version const):
(WebKit::ObjectIdentifierWriteReference::pendingReads const):
(WebKit::ObjectIdentifierWriteReference::reference const):
(WebKit::ObjectIdentifierWriteReference::retire const):
(WebKit::ObjectIdentifierWriteReference::encode const):
(WebKit::ObjectIdentifierWriteReference::decode):
(WebKit::ObjectIdentifierReferenceTracker::ObjectIdentifierReferenceTracker):
(WebKit::ObjectIdentifierReferenceTracker::read const):
(WebKit::ObjectIdentifierReferenceTracker::write const):
(WebKit::ObjectIdentifierReferenceTracker::identifier const):
(WebKit::add):
(WebKit::operator<<):
(WTF::DefaultHash<WebKit::ObjectIdentifierReference<T>>::hash):
(WTF::DefaultHash<WebKit::ObjectIdentifierReference<T>>::equal):

  • Shared/ThreadSafeObjectHeap.h: Added.

(WebKit::ThreadSafeObjectHeap::ReferenceState::ReferenceState):
(WebKit::HeldType>::retire):
(WebKit::HeldType>::retireRemove):
(WebKit::HeldType>::clear):

  • Shared/mac/MediaFormatReader/MediaSampleByteRange.cpp:

(WebKit::MediaSampleByteRange::platformSample const):

  • Shared/mac/MediaFormatReader/MediaSampleByteRange.h:
  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/GPUProcessConnection.cpp:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::paintCompositedResultsToMediaSample):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
  • WebProcess/GPU/graphics/cocoa/RemoteGraphicsContextGLProxyCocoa.mm:
  • WebProcess/GPU/media/RemoteVideoFrameIdentifier.h: Copied from Source/WebKit/Shared/IPCTester.h.
  • WebProcess/GPU/media/RemoteVideoFrameProxy.cpp: Added.

(WebKit::RemoteVideoFrameProxy::create):
(WebKit::RemoteVideoFrameProxy::properties):
(WebKit::RemoteVideoFrameProxy::RemoteVideoFrameProxy):
(WebKit::RemoteVideoFrameProxy::~RemoteVideoFrameProxy):
(WebKit::RemoteVideoFrameProxy::identifier const):
(WebKit::RemoteVideoFrameProxy::write const):
(WebKit::RemoteVideoFrameProxy::read const):
(WebKit::RemoteVideoFrameProxy::presentationTime const):
(WebKit::RemoteVideoFrameProxy::platformSample const):
(WebKit::RemoteVideoFrameProxy::videoRotation const):
(WebKit::RemoteVideoFrameProxy::videoMirrored const):
(WebKit::RemoteVideoFrameProxy::videoPixelFormat const):
(WebKit::RemoteVideoFrameProxy::videoFrame const):
(WebKit::RemoteVideoFrameProxy::disconnectGPUProcessIfNeeded const):
(WebKit::RemoteVideoFrameProxy::waitForWasInitialized const):
(WebKit::RemoteVideoFrameProxy::gpuProcessConnectionDidClose):
(WebKit::RemoteVideoFrameProxy::wasInitialized):

  • WebProcess/GPU/media/RemoteVideoFrameProxy.h: Added.

(WebKit::RemoteVideoFrameProxy::Properties::encode const):
(WebKit::RemoteVideoFrameProxy::Properties::decode):
(isType):

  • WebProcess/GPU/media/RemoteVideoFrameProxy.messages.in: Copied from Source/WebKit/Shared/IPCTester.h.
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:

(WebKit::SampleBufferDisplayLayer::SampleBufferDisplayLayer):
(WebKit::SampleBufferDisplayLayer::~SampleBufferDisplayLayer):
(WebKit::SampleBufferDisplayLayer::enqueueSample):
(WebKit::SampleBufferDisplayLayer::gpuProcessConnectionDidClose):
(WebKit::SampleBufferDisplayLayer::disconnectGPUProcessConnectionIfNeeded):

  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h:

Tools:

  • Scripts/generate-gpup-webgl:
  • TestWebKitAPI/Tests/WebCore/SampleMap.cpp:
1:27 AM Changeset in webkit [289524] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Non-default constructible types cannot be decoded with IPC::Decoder
https://bugs.webkit.org/show_bug.cgi?id=236246

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-10
Reviewed by Antti Koivisto.

Add yet another decode function: std::optional<T> Decoder::decode<T>();

Consider the pattern:

std::optional<T> t;
decoder >> t;
if (!t)

....

The above neccessitates default construction of T, since it contains

std::optional<T> t;
t = ...; assignment. This assignment cannot be elided.

Better pattern is:

auto t = decoder.decode<T>();

This is significant with for types with const members:

struct T {

const uint64_t version;

};

  • Platform/IPC/Decoder.h:

(IPC::Decoder::decode):
(IPC::Decoder::operator>>):

  • Platform/IPC/HandleMessage.h:

(IPC::handleMessage):
(IPC::handleMessageWantsConnection):
(IPC::handleMessageSynchronous):
(IPC::handleMessageSynchronousWantsConnection):
(IPC::handleMessageAsync):
(IPC::handleMessageAsyncWantsConnection):

1:07 AM Changeset in webkit [289523] by Martin Robinson
  • 15 edits in trunk/LayoutTests

[macOS arm64] imported/w3c/web-platform-tests/css/css-transforms/perspective-transforms-equivalence.html is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=235084
<rdar://problem/87421733>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Update pixel tolerances for some tests from the WPT transforms suite,
fixing them on Mac and on Glib-based ports.

  • web-platform-tests/css/css-transforms/2d-rotate-001.html:
  • web-platform-tests/css/css-transforms/group/svg-transform-nested-009.html:
  • web-platform-tests/css/css-transforms/perspective-transforms-equivalence.html:
  • web-platform-tests/css/css-transforms/preserve3d-and-filter-with-perspective.html:
  • web-platform-tests/css/css-transforms/skew-test1.html:
  • web-platform-tests/css/css-transforms/transform-background-001.html:
  • web-platform-tests/css/css-transforms/transform-background-002.html:
  • web-platform-tests/css/css-transforms/transform-table-009.html:
  • web-platform-tests/css/css-transforms/transform-table-010.html:
  • web-platform-tests/css/css-transforms/transform-table-011.html:
  • web-platform-tests/css/css-transforms/transforms-skewX.html:

LayoutTests:

  • platform/glib/TestExpectations: Unskip newly passing tests.
  • platform/mac/TestExpectations: Ditto.
12:17 AM Changeset in webkit [289522] by sihui_liu@apple.com
  • 4 edits in trunk/Source/WebCore

IDBRequest should emit write barrier on JSValueInWrappedObject modification
https://bugs.webkit.org/show_bug.cgi?id=236278

Reviewed by Geoffrey Garen.

In IDBRequest, m_resultWrapper is used to cache JSValue for m_result. When request is performing operation (e.g.
iterating cursor), we clear both m_result and m_resultWrapper. When request is done, we set m_result and
m_resultWrapper. The spec requires the IDBRequest.result() to return the same JavaScript object after operation,
so we introduced m_cursorWrapper to temporarily store the JSValue during operation. When operation starts, we
set m_cursorWrapper with m_resultWrapper and when opreation finishes successfully, we set m_resultWrapper back
using m_cursorWrapper.

This has a semantic error as the assignment process does not emit write barrier (webkit.org/b/236277). To fix
it, we may just remove m_cursorWrapper and not clear m_resultWrapper during operation. Since we clear m_result
in operation, we can check if m_result is empty to decide whether we should return m_resultWrapper for
IDBRequest.result().

  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::willIterateCursor):
(WebCore::IDBRequest::didOpenOrIterateCursor):
(WebCore::IDBRequest::clearWrappers):

  • Modules/indexeddb/IDBRequest.h:

(WebCore::IDBRequest::resultWrapper):
(WebCore::IDBRequest::cursorWrapper): Deleted.

  • bindings/js/JSIDBRequestCustom.cpp:

(WebCore::JSIDBRequest::result const):
(WebCore::JSIDBRequest::visitAdditionalChildren):

12:10 AM Changeset in webkit [289521] by Manuel Rego Casasnovas
  • 4 edits
    2 adds in trunk

:focus-visible with click on radio/checkbox labels is broken
https://bugs.webkit.org/show_bug.cgi?id=236331

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Added new WPT test to cover this case.

  • web-platform-tests/css/selectors/focus-visible-026-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-026.html: Added.

Source/WebCore:

When the label is clicked we have to send the FocusTrigger information to Element::focus().
There we avoid setting FocusVisibility:Visible if it has been triggered via mouse click.

Test: imported/w3c/web-platform-tests/css/selectors/focus-visible-026.html

  • dom/Element.cpp:

(WebCore::Element::focus): Add a check for FocusTrigger::Click to avoid setting FocusVisibility:Visible.

  • html/HTMLLabelElement.cpp:

(WebCore::HTMLLabelElement::defaultEventHandler): Pass FocusTrigger::Click.

Note: See TracTimeline for information about the timeline view.