⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Oct 11, 2021:

11:32 PM Changeset in webkit [283970] by sbarati@apple.com
  • 20 edits in trunk/Source

Remove ImplicitAddress
https://bugs.webkit.org/show_bug.cgi?id=230820
<rdar://problem/83826318>

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

Because we rely on implicit conversion from RegisterID to int values,
some compilers (aka MSVC) might convert a constant RegisterID that's passed in
to nullptr instead of calling the implicit constructor in ImplicitAddress.

For example, I got bit by this when I had code that did:
loadPtr(regT0, xyz)

This called the loadPtr(void*, RegisterID) function with nullptr passed as
the first argument instead of the loadPtr(ImplicitAddress, RegisterID)
function.

Let's avoid any such problems in the future by just not using ImplicitAddress.

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::ImplicitAddress::ImplicitAddress): Deleted.

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::pushToSave):
(JSC::MacroAssembler::popToRestore):
(JSC::MacroAssembler::loadPtr):
(JSC::MacroAssembler::storePtr):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::load64):
(JSC::MacroAssemblerARM64::load32):
(JSC::MacroAssemblerARM64::load16):
(JSC::MacroAssemblerARM64::load16Unaligned):
(JSC::MacroAssemblerARM64::load16SignedExtendTo32):
(JSC::MacroAssemblerARM64::load8):
(JSC::MacroAssemblerARM64::load8SignedExtendTo32):
(JSC::MacroAssemblerARM64::store64):
(JSC::MacroAssemblerARM64::store32):
(JSC::MacroAssemblerARM64::store16):
(JSC::MacroAssemblerARM64::store8):
(JSC::MacroAssemblerARM64::loadDouble):
(JSC::MacroAssemblerARM64::loadFloat):
(JSC::MacroAssemblerARM64::storeDouble):
(JSC::MacroAssemblerARM64::storeFloat):
(JSC::MacroAssemblerARM64::pushToSaveImmediateWithoutTouchingRegisters):
(JSC::MacroAssemblerARM64::popToRestore):
(JSC::MacroAssemblerARM64::pushToSave):
(JSC::MacroAssemblerARM64::storePtrWithPatch):
(JSC::MacroAssemblerARM64::loadAcq8SignedExtendTo32):
(JSC::MacroAssemblerARM64::loadAcq8):
(JSC::MacroAssemblerARM64::storeRel8):
(JSC::MacroAssemblerARM64::loadAcq16SignedExtendTo32):
(JSC::MacroAssemblerARM64::loadAcq16):
(JSC::MacroAssemblerARM64::storeRel16):
(JSC::MacroAssemblerARM64::loadAcq32):
(JSC::MacroAssemblerARM64::loadAcq64):
(JSC::MacroAssemblerARM64::storeRel32):
(JSC::MacroAssemblerARM64::storeRel64):
(JSC::MacroAssemblerARM64::loadLink8):
(JSC::MacroAssemblerARM64::loadLinkAcq8):
(JSC::MacroAssemblerARM64::storeCond8):
(JSC::MacroAssemblerARM64::storeCondRel8):
(JSC::MacroAssemblerARM64::loadLink16):
(JSC::MacroAssemblerARM64::loadLinkAcq16):
(JSC::MacroAssemblerARM64::storeCond16):
(JSC::MacroAssemblerARM64::storeCondRel16):
(JSC::MacroAssemblerARM64::loadLink32):
(JSC::MacroAssemblerARM64::loadLinkAcq32):
(JSC::MacroAssemblerARM64::storeCond32):
(JSC::MacroAssemblerARM64::storeCondRel32):
(JSC::MacroAssemblerARM64::loadLink64):
(JSC::MacroAssemblerARM64::loadLinkAcq64):
(JSC::MacroAssemblerARM64::storeCond64):
(JSC::MacroAssemblerARM64::storeCondRel64):
(JSC::MacroAssemblerARM64::extractSimpleAddress):

  • assembler/MacroAssemblerARM64E.h:

(JSC::MacroAssemblerARM64E::atomicXchgAdd8):
(JSC::MacroAssemblerARM64E::atomicXchgAdd16):
(JSC::MacroAssemblerARM64E::atomicXchgAdd32):
(JSC::MacroAssemblerARM64E::atomicXchgAdd64):
(JSC::MacroAssemblerARM64E::atomicXchgXor8):
(JSC::MacroAssemblerARM64E::atomicXchgXor16):
(JSC::MacroAssemblerARM64E::atomicXchgXor32):
(JSC::MacroAssemblerARM64E::atomicXchgXor64):
(JSC::MacroAssemblerARM64E::atomicXchgOr8):
(JSC::MacroAssemblerARM64E::atomicXchgOr16):
(JSC::MacroAssemblerARM64E::atomicXchgOr32):
(JSC::MacroAssemblerARM64E::atomicXchgOr64):
(JSC::MacroAssemblerARM64E::atomicXchgClear8):
(JSC::MacroAssemblerARM64E::atomicXchgClear16):
(JSC::MacroAssemblerARM64E::atomicXchgClear32):
(JSC::MacroAssemblerARM64E::atomicXchgClear64):
(JSC::MacroAssemblerARM64E::atomicXchg8):
(JSC::MacroAssemblerARM64E::atomicXchg16):
(JSC::MacroAssemblerARM64E::atomicXchg32):
(JSC::MacroAssemblerARM64E::atomicXchg64):
(JSC::MacroAssemblerARM64E::atomicStrongCAS8):
(JSC::MacroAssemblerARM64E::atomicStrongCAS16):
(JSC::MacroAssemblerARM64E::atomicStrongCAS32):
(JSC::MacroAssemblerARM64E::atomicStrongCAS64):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::or8):
(JSC::MacroAssemblerARMv7::or16):
(JSC::MacroAssemblerARMv7::or32):
(JSC::MacroAssemblerARMv7::load32):
(JSC::MacroAssemblerARMv7::load8):
(JSC::MacroAssemblerARMv7::load8SignedExtendTo32):
(JSC::MacroAssemblerARMv7::load16):
(JSC::MacroAssemblerARMv7::load16SignedExtendTo32):
(JSC::MacroAssemblerARMv7::store32):
(JSC::MacroAssemblerARMv7::store16):
(JSC::MacroAssemblerARMv7::loadDouble):
(JSC::MacroAssemblerARMv7::loadFloat):
(JSC::MacroAssemblerARMv7::storeDouble):
(JSC::MacroAssemblerARMv7::storeFloat):
(JSC::MacroAssemblerARMv7::storePtrWithPatch):

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::load8):
(JSC::MacroAssemblerMIPS::load8SignedExtendTo32):
(JSC::MacroAssemblerMIPS::load32):
(JSC::MacroAssemblerMIPS::load16):
(JSC::MacroAssemblerMIPS::store8):
(JSC::MacroAssemblerMIPS::store16):
(JSC::MacroAssemblerMIPS::store32):
(JSC::MacroAssemblerMIPS::storePtrWithPatch):
(JSC::MacroAssemblerMIPS::loadFloat):
(JSC::MacroAssemblerMIPS::loadDouble):
(JSC::MacroAssemblerMIPS::storeFloat):
(JSC::MacroAssemblerMIPS::storeDouble):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::load32):
(JSC::MacroAssemblerX86Common::load16Unaligned):
(JSC::MacroAssemblerX86Common::load8):
(JSC::MacroAssemblerX86Common::load8SignedExtendTo32):
(JSC::MacroAssemblerX86Common::load16):
(JSC::MacroAssemblerX86Common::store32):
(JSC::MacroAssemblerX86Common::store16):
(JSC::MacroAssemblerX86Common::loadDouble):
(JSC::MacroAssemblerX86Common::loadFloat):
(JSC::MacroAssemblerX86Common::storeDouble):
(JSC::MacroAssemblerX86Common::storeFloat):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::load8):
(JSC::MacroAssemblerX86_64::load32):
(JSC::MacroAssemblerX86_64::store32):
(JSC::MacroAssemblerX86_64::load64):
(JSC::MacroAssemblerX86_64::store64):
(JSC::MacroAssemblerX86_64::storePtrWithPatch):

  • assembler/testmasm.cpp:

(JSC::testBranchTruncateDoubleToInt32):
(JSC::testLoadPrePostIndex32):
(JSC::testLoadPrePostIndex64):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileStringSlice):
(JSC::DFG::SpeculativeJIT::compileGetByValOnString):
(JSC::DFG::SpeculativeJIT::compileClearCatchLocals):

  • ftl/FTLLocation.cpp:

(JSC::FTL::Location::restoreInto const):

  • ftl/FTLThunks.cpp:

(JSC::FTL::genericGenerationThunkGenerator):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::debugCall):
(JSC::AssemblyHelpers::sanitizeStackInline):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emitGetVarFromIndirectPointer):

  • jit/ThunkGenerators.cpp:

(JSC::arityFixupGenerator):

  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToWasm):

  • yarr/YarrJIT.cpp:

Source/WebCore:

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):

10:05 PM Changeset in webkit [283969] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

[GLIB] Update test expectations for failing CSS tests.
https://bugs.webkit.org/show_bug.cgi?id=231547

Unreviewed test gardening.

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-10-11

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
9:20 PM Changeset in webkit [283968] by mmaxfield@apple.com
  • 7 edits in trunk/Source/WebKit

[GPU Process] Unique RenderingResourceIdentifiers Part 5: Migrate RemoteResourceCache to QualifiedRenderingResourceIdentifier
https://bugs.webkit.org/show_bug.cgi?id=231407
<rdar://problem/84010479>

Reviewed by Said Abou-Hallawa.

This pushes QualifiedRenderingResourceIdentifier down into RemoteResourceCache, but doesn't go all the way.
This patch augments RemoteResourceCache's API to accept QualifiedRenderingResourceIdentifiers, and also
migrates RemoteResourceCache::m_resourceUseCounters to use QualifiedRenderingResourceIdentifiers.

RemoteResourceCache::m_imageBuffers, RemoteResourceCache::m_nativeImages, and RemoteResourceCache::m_fonts
are WebCore typedefs, and are passed to WebCore's display list replaying code, but that code should have no
notion of process identifiers. Therefore, in order to make those members hold data that WebCore doesn't
understand, I'm going to have to wrap an opaque class around them and pass that class around instead of
the raw HashMaps. I'll do that in another patch.

No new tests because there is no behavior change.

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::setStateWithQualifiedIdentifiers):
(WebKit::RemoteDisplayListRecorder::clipToImageBufferWithQualifiedIdentifier):
(WebKit::RemoteDisplayListRecorder::drawGlyphsWithQualifiedIdentifier):
(WebKit::RemoteDisplayListRecorder::drawImageBufferWithQualifiedIdentifier):
(WebKit::RemoteDisplayListRecorder::drawNativeImageWithQualifiedIdentifier):
(WebKit::RemoteDisplayListRecorder::drawPatternWithQualifiedIdentifier):

  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::RemoteGraphicsContextGL::paintPixelBufferToImageBuffer):

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::RemoteRenderingBackend):
(WebKit::RemoteRenderingBackend::createImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::ReplayerDelegate::ReplayerDelegate):
(WebKit::RemoteRenderingBackend::ReplayerDelegate::recordResourceUse):
(WebKit::RemoteRenderingBackend::submit):
(WebKit::RemoteRenderingBackend::nextDestinationImageBufferAfterApplyingDisplayLists):
(WebKit::RemoteRenderingBackend::wakeUpAndApplyDisplayListWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::getDataURLForImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::getDataForImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::getShareableBitmapForImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::cacheNativeImageWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::cacheFontWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::releaseRemoteResourceWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::finalizeRenderingUpdate):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/graphics/RemoteResourceCache.cpp:

(WebKit::RemoteResourceCache::RemoteResourceCache):
(WebKit::RemoteResourceCache::cacheImageBuffer):
(WebKit::RemoteResourceCache::cachedImageBuffer const):
(WebKit::RemoteResourceCache::cacheNativeImage):
(WebKit::RemoteResourceCache::cachedNativeImage const):
(WebKit::RemoteResourceCache::cacheFont):
(WebKit::RemoteResourceCache::cachedFont const):
(WebKit::RemoteResourceCache::ensureResourceUseCounter):
(WebKit::RemoteResourceCache::maybeRemoveResource):
(WebKit::RemoteResourceCache::recordResourceUse):
(WebKit::RemoteResourceCache::releaseRemoteResource):

  • GPUProcess/graphics/RemoteResourceCache.h:
9:18 PM Changeset in webkit [283967] by mmaxfield@apple.com
  • 5 edits in trunk/Source

[GPU Process] Unique RenderingResourceIdentifiers Part 6: Uniquify more of RemoteDisplayListRecorder at entry points
https://bugs.webkit.org/show_bug.cgi?id=231552
<rdar://problem/84130587>

Source/WebCore:

Reviewed by Wenson Hsieh.

No new tests because there is no behavior change.

  • platform/ProcessQualified.h:

(WebCore::ProcessQualified::operator bool const):

Source/WebKit:

This is an extension of https://bugs.webkit.org/show_bug.cgi?id=231548. It applies QualifiedRenderingResourceIdentifiers
at the rest of the entry points of RemoteDisplayListRecorder.

Reviewed by Wenson Hsieh.

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::setState):
(WebKit::RemoteDisplayListRecorder::setStateWithQualifiedIdentifiers):
(WebKit::RemoteDisplayListRecorder::drawGlyphs):
(WebKit::RemoteDisplayListRecorder::drawGlyphsWithQualifiedIdentifier):

  • GPUProcess/graphics/RemoteDisplayListRecorder.h:
8:55 PM Changeset in webkit [283966] by Simon Fraser
  • 17 edits in trunk/Source/WebKit

Make DrawingAreaType an enum class
https://bugs.webkit.org/show_bug.cgi?id=231543

Reviewed by Wenson Hsieh.

Make DrawingAreaType an enum class, and make the DrawingArea type member const.

  • Shared/DrawingAreaInfo.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::isUsingUISideCompositing const):

  • UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:

(WebKit::DrawingAreaProxyCoordinatedGraphics::DrawingAreaProxyCoordinatedGraphics):

  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setDrawingArea):
(WebKit::WebPageProxy::commitProvisionalPage):
(WebKit::WebPageProxy::enterAcceleratedCompositingMode):
(WebKit::WebPageProxy::didFirstLayerFlush):

  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:

(WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::createScrollingCoordinator const):

  • WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:

(WebKit::DrawingAreaCoordinatedGraphics::DrawingAreaCoordinatedGraphics):

  • WebProcess/WebPage/DrawingArea.cpp:

(WebKit::DrawingArea::create):
(WebKit::DrawingArea::supportsGPUProcessRendering):

  • WebProcess/WebPage/DrawingArea.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):

8:05 PM Changeset in webkit [283965] by mmaxfield@apple.com
  • 3 edits in trunk/Source/WebKit

[GPU Process] Unique RenderingResourceIdentifiers Part 5: Uniquify RemoteDisplayListRecorder at entry points
https://bugs.webkit.org/show_bug.cgi?id=231548
<rdar://problem/84128595>

Reviewed by Wenson Hsieh.

This simply applies the same treatment in https://commits.webkit.org/242676@main to
RemoteDisplayListRecorder. This is being done in a follow-up patch because it
relies on https://bugs.webkit.org/show_bug.cgi?id=231484.

No new tests because there is no behavior change.

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::RemoteDisplayListRecorder):
(WebKit::RemoteDisplayListRecorder::clipToImageBuffer):
(WebKit::RemoteDisplayListRecorder::clipToImageBufferWithQualifiedIdentifier):
(WebKit::RemoteDisplayListRecorder::drawImageBuffer):
(WebKit::RemoteDisplayListRecorder::drawImageBufferWithQualifiedIdentifier):
(WebKit::RemoteDisplayListRecorder::drawNativeImage):
(WebKit::RemoteDisplayListRecorder::drawNativeImageWithQualifiedIdentifier):
(WebKit::RemoteDisplayListRecorder::drawPattern):
(WebKit::RemoteDisplayListRecorder::drawPatternWithQualifiedIdentifier):

  • GPUProcess/graphics/RemoteDisplayListRecorder.h:

(WebKit::RemoteDisplayListRecorder::create):

7:57 PM Changeset in webkit [283964] by Darin Adler
  • 3 edits in trunk/Tools

Slightly better idiom for ARC debug autorelease workaround
https://bugs.webkit.org/show_bug.cgi?id=231435

Reviewed by David Kilzer.

  • TestWebKitAPI/Tests/WTF/cocoa/TypeCastsCocoa.mm:

(TestWebKitAPI::TEST): Use one macro instead of two, with
traditional indentation instead of left flush style.

  • TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm:

(TestWebKitAPI::TEST): Ditto.

7:48 PM Changeset in webkit [283963] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Fix makeprop.pl to not treat "inherited: false" properties as inherited.
https://bugs.webkit.org/show_bug.cgi?id=231533

Patch by Kiet Ho <Kiet Ho> on 2021-10-11
Reviewed by Simon Fraser.

makeprop.pl treats a property as inherited if the "inherited" option in
CSSProperties.json is defined, regardless of whether the option value is
true or false. Fix makeprop.pl to actually consider the option value.

  • css/makeprop.pl:

(addProperty):

7:42 PM Changeset in webkit [283962] by timothy_horton@apple.com
  • 5 edits in trunk/Source/WebCore

Implement alternate style for text fields
https://bugs.webkit.org/show_bug.cgi?id=231536

Reviewed by Wenson Hsieh.

  • rendering/RenderTheme.h:

(WebCore::RenderTheme::paintTextFieldDecorations):
(WebCore::RenderTheme::paintTextAreaDecorations):
(WebCore::RenderTheme::paintSearchFieldDecorations):
Tighten up the types.

  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::adjustTextFieldStyle const):
Drop the border and clear the background, so that we can use our
custom inner shadow painting instead.

(WebCore::RenderThemeIOS::paintTextFieldInnerShadow):
(WebCore::RenderThemeIOS::paintTextFieldDecorations):
(WebCore::RenderThemeIOS::paintTextAreaDecorations):
(WebCore::RenderThemeIOS::paintSearchFieldDecorations):
Paint our custom inner shadow for text fields, when using the alternate appearance.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::resetBorder):
(WebCore::RenderStyle::resetBorderExceptRadius):
Add a mechanism to reset all border properties except radius.

7:11 PM Changeset in webkit [283961] by Kocsen Chung
  • 1 copy in tags/Safari-612.2.9.1.10

Tag Safari-612.2.9.1.10.

6:46 PM Changeset in webkit [283960] by Kocsen Chung
  • 1 copy in tags/Safari-612.2.9.0.10

Tag Safari-612.2.9.0.10.

6:40 PM Changeset in webkit [283959] by mmaxfield@apple.com
  • 6 edits in trunk/Source/WebKit

Revert 242806@main because it broke the build
https://bugs.webkit.org/show_bug.cgi?id=231546

Unreviewed.

  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::RemoteGraphicsContextGL::paintPixelBufferToImageBuffer):

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::RemoteRenderingBackend):
(WebKit::RemoteRenderingBackend::createImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::ReplayerDelegate::ReplayerDelegate):
(WebKit::RemoteRenderingBackend::ReplayerDelegate::recordResourceUse):
(WebKit::RemoteRenderingBackend::submit):
(WebKit::RemoteRenderingBackend::nextDestinationImageBufferAfterApplyingDisplayLists):
(WebKit::RemoteRenderingBackend::wakeUpAndApplyDisplayListWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::getDataURLForImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::getDataForImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::getShareableBitmapForImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::cacheNativeImageWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::cacheFontWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::releaseRemoteResourceWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::finalizeRenderingUpdate):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/graphics/RemoteResourceCache.cpp:

(WebKit::RemoteResourceCache::RemoteResourceCache):
(WebKit::RemoteResourceCache::cacheImageBuffer):
(WebKit::RemoteResourceCache::cachedImageBuffer const):
(WebKit::RemoteResourceCache::cacheNativeImage):
(WebKit::RemoteResourceCache::cachedNativeImage const):
(WebKit::RemoteResourceCache::cacheFont):
(WebKit::RemoteResourceCache::cachedFont const):
(WebKit::RemoteResourceCache::ensureResourceUseCounter):
(WebKit::RemoteResourceCache::maybeRemoveResource):
(WebKit::RemoteResourceCache::recordResourceUse):
(WebKit::RemoteResourceCache::releaseRemoteResource):

  • GPUProcess/graphics/RemoteResourceCache.h:
5:57 PM Changeset in webkit [283958] by Russell Epstein
  • 1 copy in branches/safari-612.2.9.0.7-branch

New branch.

5:55 PM Changeset in webkit [283957] by Wenson Hsieh
  • 8 edits in trunk/Source

Clean up some code in DisplayList::Recorder in preparation for bug #230860
https://bugs.webkit.org/show_bug.cgi?id=231532

Reviewed by Myles C. Maxfield.

Source/WebCore:

See below for more details.

  • platform/graphics/Path.h:

Add WEBCORE_EXPORT here. When building debug WebKit2, logMessageImpl contains logic to dump IPC arguments
using WTF::TextStream; since a few of these new stream messages contain WebCore::Path objects, this will
generate calls to TextStream& operator<<(TextStream&, const Path&) in WebKit2, which requires this function to
be exported.

  • platform/graphics/displaylists/DisplayListRecorder.h:
  • platform/graphics/displaylists/DisplayListRecorderImpl.cpp:

(WebCore::DisplayList::RecorderImpl::recordGetPixelBuffer): Deleted.
(WebCore::DisplayList::RecorderImpl::recordPutPixelBuffer): Deleted.

Remove a couple of unnecessary virtual override hooks in the base DisplayList::Recorder class. The existing
virtual getPixelBuffer and putPixelBuffer methods are already suffificient.

  • platform/graphics/displaylists/DisplayListRecorderImpl.h:

Source/WebKit:

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:

(WebKit::RemoteDisplayListRecorderProxy::recordGetPixelBuffer): Deleted.
(WebKit::RemoteDisplayListRecorderProxy::recordPutPixelBuffer): Deleted.

See WebCore ChangeLog for more details.

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
5:53 PM Changeset in webkit [283956] by Russell Epstein
  • 1 copy in branches/safari-612.2.9.1.7-branch

New branch.

5:48 PM Changeset in webkit [283955] by mmaxfield@apple.com
  • 6 edits in trunk/Source/WebKit

[GPU Process] Unique RenderingResourceIdentifiers Part 5: Migrate RemoteResourceCache to QualifiedRenderingResourceIdentifier
https://bugs.webkit.org/show_bug.cgi?id=231407
<rdar://problem/84010479>

Reviewed by Said Abou-Hallawa.

This pushes QualifiedRenderingResourceIdentifier down into RemoteResourceCache, but doesn't go all the way.
This patch augments RemoteResourceCache's API to accept QualifiedRenderingResourceIdentifiers, and also
migrates RemoteResourceCache::m_resourceUseCounters to use QualifiedRenderingResourceIdentifiers.

RemoteResourceCache::m_imageBuffers, RemoteResourceCache::m_nativeImages, and RemoteResourceCache::m_fonts
are WebCore typedefs, and are passed to WebCore's display list replaying code, but that code should have no
notion of process identifiers. Therefore, in order to make those members hold data that WebCore doesn't
understand, I'm going to have to wrap an opaque class around them and pass that class around instead of
the raw HashMaps. I'll do that in another patch.

No new tests because there is no behavior change.

  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::RemoteGraphicsContextGL::paintPixelBufferToImageBuffer):

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::RemoteRenderingBackend):
(WebKit::RemoteRenderingBackend::createImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::ReplayerDelegate::ReplayerDelegate):
(WebKit::RemoteRenderingBackend::ReplayerDelegate::recordResourceUse):
(WebKit::RemoteRenderingBackend::submit):
(WebKit::RemoteRenderingBackend::nextDestinationImageBufferAfterApplyingDisplayLists):
(WebKit::RemoteRenderingBackend::wakeUpAndApplyDisplayListWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::getDataURLForImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::getDataForImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::getShareableBitmapForImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::cacheNativeImageWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::cacheFontWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::releaseRemoteResourceWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::finalizeRenderingUpdate):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/graphics/RemoteResourceCache.cpp:

(WebKit::RemoteResourceCache::RemoteResourceCache):
(WebKit::RemoteResourceCache::cacheImageBuffer):
(WebKit::RemoteResourceCache::cachedImageBuffer const):
(WebKit::RemoteResourceCache::cacheNativeImage):
(WebKit::RemoteResourceCache::cachedNativeImage const):
(WebKit::RemoteResourceCache::cacheFont):
(WebKit::RemoteResourceCache::cachedFont const):
(WebKit::RemoteResourceCache::ensureResourceUseCounter):
(WebKit::RemoteResourceCache::maybeRemoveResource):
(WebKit::RemoteResourceCache::recordResourceUse):
(WebKit::RemoteResourceCache::releaseRemoteResource):

  • GPUProcess/graphics/RemoteResourceCache.h:
5:33 PM Changeset in webkit [283954] by sbarati@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

Share more code that uses ScratchRegisterAllocator in the ICs
https://bugs.webkit.org/show_bug.cgi?id=231125
<rdar://problem/84066374>

Reviewed by Sam Weinig.

We had the same code to allocate a scratch register allocator copy pasted
all over the IC code. This patch refactors that to use a shared helper.

Also, Delete was using a ScratchRegisterAllocator for no reason (it never
allocated a scratch register), so I deleted that code.

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateWithGuard):
(JSC::AccessCase::generateImpl):

  • bytecode/GetterSetterAccessCase.cpp:

(JSC::GetterSetterAccessCase::emitDOMJITGetter):

  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessGenerationState::makeDefaultScratchAllocator):
(JSC::PolymorphicAccess::regenerate):

  • bytecode/PolymorphicAccess.h:
  • jit/IntrinsicEmitter.cpp:

(JSC::IntrinsicGetterAccessCase::emitIntrinsicGetter):

5:09 PM Changeset in webkit [283953] by Russell Epstein
  • 8 edits in branches/safari-612.2.9.1-branch/Source

Versioning.

WebKit-7612.2.9.1.10

5:05 PM Changeset in webkit [283952] by Chris Dumez
  • 3 edits
    3 adds in trunk

[COOP] Crash under ReportingEndpointsCache::addEndpointFromDictionary()
https://bugs.webkit.org/show_bug.cgi?id=231537
<rdar://83530643>

Reviewed by Geoffrey Garen.

Source/WebCore:

Make sure we don't crash under addEndpointFromDictionary() when the Report-To HTTP header
contains more than one endpoint URL for a given group.

The loop inside addEndpointFromDictionary() should bail as soon as we find a viable
endpoint URL (since we don't currently support having several URLs for a given group).
The crash was due to a use-after-move of the |group|.

Test: http/wpt/cross-origin-opener-policy/report-to-multiple-endpoints.html

  • loader/ReportingEndpointsCache.cpp:

(WebCore::ReportingEndpointsCache::addEndpointFromDictionary):

LayoutTests:

Add layout test coverage.

  • http/wpt/cross-origin-opener-policy/report-to-multiple-endpoints-expected.txt: Added.
  • http/wpt/cross-origin-opener-policy/report-to-multiple-endpoints.html: Added.
  • http/wpt/cross-origin-opener-policy/report-to-multiple-endpoints.html.headers: Added.
4:53 PM Changeset in webkit [283951] by Russell Epstein
  • 8 edits in branches/safari-612.2.9.0-branch/Source

Versioning.

WebKit-7612.2.9.0.10

4:45 PM Changeset in webkit [283950] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 ] imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.worker.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=231544

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
4:33 PM Changeset in webkit [283949] by Russell Epstein
  • 2 edits in branches/safari-612.2.9.1-branch/Source/WebKit

Cherry-pick r283846. rdar://problem/84117092

Fix crash in NetworkProcess preconnect due to dereferencing deallocated session
https://bugs.webkit.org/show_bug.cgi?id=231456
<rdar://problem/83752148>

Reviewed by Chris Dumez.

We capture a raw NetworkSession reference in the preconnect completion handler. This
reference could point to a deallocated object if the NetworkSession dies before the
preconnect finishes.

  • NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::preconnectTo):

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

4:32 PM Changeset in webkit [283948] by Ayumi Kojima
  • 3 edits in trunk/LayoutTests

[ iOS macOS Debug ] webgl/1.0.3/conformance/glsl/bugs/long-expressions-should-not-crash.html is a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=231541

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk1/TestExpectations:
4:29 PM Changeset in webkit [283947] by Russell Epstein
  • 2 edits in branches/safari-612.2.9.0-branch/Source/WebKit

Cherry-pick r283846. rdar://problem/84117075

Fix crash in NetworkProcess preconnect due to dereferencing deallocated session
https://bugs.webkit.org/show_bug.cgi?id=231456
<rdar://problem/83752148>

Reviewed by Chris Dumez.

We capture a raw NetworkSession reference in the preconnect completion handler. This
reference could point to a deallocated object if the NetworkSession dies before the
preconnect finishes.

  • NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::preconnectTo):

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

4:27 PM Changeset in webkit [283946] by Alan Coon
  • 9 edits in branches/safari-612-branch

Cherry-pick r283194. rdar://problem/83953433

PCM: different bundleID entries will override each other
https://bugs.webkit.org/show_bug.cgi?id=230839

Reviewed by Alex Christensen.

Source/WebKit:

We recently added a bundleID column to PCM tables. We want to make
sure entries with different bundleIDs do not override each other,
so we should make it a part of the unique constraint on both PCM
tables that contain it. This requires creating new tables and
migrating existing data to them. Luckily this code already exists
in the ITP database, and we can just move it to the shared
DatabaseUtilities class.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: (WebKit::ResourceLoadStatisticsDatabaseStore::expectedTableAndIndexQueries): (WebKit::stripIndexQueryToMatchStoredValue): Deleted. (WebKit::expectedTableAndIndexQueries): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::currentTableAndIndexQueries): Deleted. (WebKit::insertDistinctValuesInTableStatement): Deleted. (WebKit::ResourceLoadStatisticsDatabaseStore::migrateDataToNewTablesIfNecessary): Deleted.
  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
  • NetworkProcess/DatabaseUtilities.cpp: (WebKit::DatabaseUtilities::stripIndexQueryToMatchStoredValue): (WebKit::DatabaseUtilities::currentTableAndIndexQueries): (WebKit::insertDistinctValuesInTableStatement): (WebKit::DatabaseUtilities::migrateDataToNewTablesIfNecessary):
  • NetworkProcess/DatabaseUtilities.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.cpp: (WebKit::PCM::Database::Database): (WebKit::PCM::Database::expectedTableAndIndexQueries): (WebKit::PCM::Database::createUniqueIndices): (WebKit::PCM::Database::needsUpdatedSchema):
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.h:

Tools:

API test coverage for the case of existing PCM data with a bundleID
column but an expired unique index.

  • TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm: (addUnattributedPCMv4): (addAttributedPCMv4): (dumpedPCM): (pollUntilPCMIsMigrated): (emptyPcmDBPath): (createAndPopulatePCMObservedDomainTable): (setUpFromResourceLoadStatisticsDatabase): (setUpFromPCMDatabase): (TEST): (setUp): Deleted.

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

4:27 PM Changeset in webkit [283945] by Alan Coon
  • 33 edits
    15 copies
    2 adds in branches/safari-612-branch

Cherry-pick r282884. rdar://problem/83954926

PCM should include the bundle ID of the app from which it originated
https://bugs.webkit.org/show_bug.cgi?id=230576
<rdar://83065221>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-09-22
Reviewed by Kate Cheney.

Source/WebCore:

This adds infrastructure to store the bundle ID of the application.
In another patch I'm going to use that to prevent PCMs from one app from overwriting PCMs from another app during attribution.

  • html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::parsePrivateClickMeasurement const):
  • loader/PrivateClickMeasurement.cpp: (WebCore::PrivateClickMeasurement::isolatedCopy const):
  • loader/PrivateClickMeasurement.h: (WebCore::PrivateClickMeasurement::PrivateClickMeasurement): (WebCore::PrivateClickMeasurement::attributionTriggerData const): (WebCore::PrivateClickMeasurement::sourceApplicationBundleID const): (WebCore::PrivateClickMeasurement::encode const): (WebCore::PrivateClickMeasurement::decode): (WebCore::PrivateClickMeasurement::attributionTriggerData): Deleted.

Source/WebKit:

  • NetworkProcess/DatabaseUtilities.cpp: (WebKit::DatabaseUtilities::buildPrivateClickMeasurementFromDatabase const): (WebKit::DatabaseUtilities::buildPrivateClickMeasurementFromDatabase): Deleted.
  • NetworkProcess/DatabaseUtilities.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.cpp: (WebKit::PCM::Database::Database): (WebKit::PCM::Database::insertPrivateClickMeasurement): (WebKit::PCM::Database::privateClickMeasurementToStringForTesting const): (WebKit::PCM::Database::attributionToStringForTesting const): (WebKit::PCM::Database::addBundleIDColumnIfNecessary): (WebKit::PCM::Database::columnsForTable): (WebKit::PCM::Database::addMissingColumnToTable):
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
  • UIProcess/API/Cocoa/WKWebViewTesting.mm: (-[WKWebView _addEventAttributionWithSourceID:destinationURL:sourceDescription:purchaser:reportEndpoint:optionalNonce:applicationBundleID:]): (-[WKWebView _addEventAttributionWithSourceID:destinationURL:sourceDescription:purchaser:reportEndpoint:optionalNonce:]): Deleted.
  • UIProcess/API/ios/WKWebViewIOS.mm: (-[WKWebView _setEphemeralUIEventAttribution:]): (-[WKWebView _setEphemeralUIEventAttribution:forApplicationWithBundleID:]):

Tools:

  • TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp: (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm: (pollUntilPCMIsMigrated):

LayoutTests:

  • http/tests/contentextensions/block-private-click-measurement-expected.txt:
  • http/tests/privateClickMeasurement/attribution-conversion-through-cross-site-image-redirect-expected.txt:
  • http/tests/privateClickMeasurement/attribution-conversion-through-fetch-keepalive-expected.txt:
  • http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-ephemeral-expected.txt:
  • http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window-expected.txt:
  • http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-with-priority-expected.txt:
  • http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-without-priority-expected.txt:
  • http/tests/privateClickMeasurement/conversion-disabled-in-ephemeral-session-expected.txt:
  • http/tests/privateClickMeasurement/private-click-measurement-with-source-nonce-null-content-expected.txt:
  • http/tests/privateClickMeasurement/private-click-measurement-with-source-nonce-wrong-content-type-expected.txt:
  • http/tests/privateClickMeasurement/second-attribution-converted-with-higher-priority-expected.txt:
  • http/tests/privateClickMeasurement/second-attribution-converted-with-lower-priority-expected.txt:
  • http/tests/privateClickMeasurement/second-conversion-with-higher-priority-expected.txt:
  • http/tests/privateClickMeasurement/second-conversion-with-lower-priority-expected.txt:
  • http/tests/privateClickMeasurement/store-private-click-measurement-expected.txt:

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

4:12 PM Changeset in webkit [283944] by Kocsen Chung
  • 1 copy in tags/Safari-612.2.9.3.4

Tag Safari-612.2.9.3.4.

3:46 PM Changeset in webkit [283943] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Only mark needed JSONImpl::ObjectBase functions with WTF_EXPORT_PRIVATE
https://bugs.webkit.org/show_bug.cgi?id=231521

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-11
Reviewed by Chris Dumez.

I'm trying some wild experiments with the linker, and when I do the weak symbol checker fails because
it is trying to export some of the inline functions at the bottom of JSONValues.h.
Moving WTF_EXPORT_PRIVATE from exporting the whole class to only exporting the non-inline functions fixes it.

  • wtf/JSONValues.h:
3:40 PM Changeset in webkit [283942] by Kocsen Chung
  • 2 edits in branches/safari-612.2.9.3-branch/Source/WebKit

Cherry-pick r283846. rdar://problem/84117050

Fix crash in NetworkProcess preconnect due to dereferencing deallocated session
https://bugs.webkit.org/show_bug.cgi?id=231456
<rdar://problem/83752148>

Reviewed by Chris Dumez.

We capture a raw NetworkSession reference in the preconnect completion handler. This
reference could point to a deallocated object if the NetworkSession dies before the
preconnect finishes.

  • NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::preconnectTo):

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

3:37 PM Changeset in webkit [283941] by Wenson Hsieh
  • 18 edits
    5 adds in trunk/Source

Introduce RemoteDisplayListRecorderProxy and RemoteDisplayListRecorder
https://bugs.webkit.org/show_bug.cgi?id=231484

Reviewed by Simon Fraser.

Source/WebCore:

See WebKit ChangeLog for more details.

  • platform/graphics/GraphicsContext.h:
  • platform/graphics/ImageBuffer.h:
  • platform/graphics/displaylists/DisplayListItems.h:

Add default constructors for a couple of display list items so that they can be encoded as IPC arguments using
SimpleArgumentCoder.

Source/WebKit:

Introduce two new classes that house most of the logic for propagating display list items from the web content
process to the GPU process. RemoteDisplayListRecorderProxy is a subclass of DisplayList::Recorder that records
each item by sending it to the GPU process through a stream connection, which will be added to
RemoteRenderingBackendProxy in a subsequent patch. The RemoteDisplayListRecorderProxy will be managed by
RemoteImageBufferProxy in the web process. RemoteDisplayListRecorder acts as the streaming IPC destination in
the GPU process, and handles the incoming display list items by applying them to the platform graphics context.

For most of these display list items, we can propagate them to the GPU process by sending each display list
item's constructor arguments as separate IPC arguments. In a future patch, we should add support for encoding
the following display list items in the same way:

  • SetInlineFillColor
  • SetInlineStrokeColor
  • SetState
  • SetLineDash
  • DrawGlyphs
  • DrawLinesForText
  • FillRectWithGradient

For now, the above display list items are encoded and decoded as whole items. While there's no practical
disadvantage to implementing it this way, it would be nice to make it consistent.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp: Added.

(WebKit::RemoteDisplayListRecorder::RemoteDisplayListRecorder):
(WebKit::RemoteDisplayListRecorder::resourceCache):
(WebKit::RemoteDisplayListRecorder::drawingContext):
(WebKit::RemoteDisplayListRecorder::startListeningForIPC):
(WebKit::RemoteDisplayListRecorder::stopListeningForIPC):
(WebKit::RemoteDisplayListRecorder::save):
(WebKit::RemoteDisplayListRecorder::restore):
(WebKit::RemoteDisplayListRecorder::translate):
(WebKit::RemoteDisplayListRecorder::rotate):
(WebKit::RemoteDisplayListRecorder::scale):
(WebKit::RemoteDisplayListRecorder::setCTM):
(WebKit::RemoteDisplayListRecorder::concatenateCTM):
(WebKit::RemoteDisplayListRecorder::setInlineFillColor):
(WebKit::RemoteDisplayListRecorder::setInlineStrokeColor):
(WebKit::RemoteDisplayListRecorder::setStrokeThickness):
(WebKit::RemoteDisplayListRecorder::setState):
(WebKit::RemoteDisplayListRecorder::setLineCap):
(WebKit::RemoteDisplayListRecorder::setLineDash):
(WebKit::RemoteDisplayListRecorder::setLineJoin):
(WebKit::RemoteDisplayListRecorder::setMiterLimit):
(WebKit::RemoteDisplayListRecorder::clearShadow):
(WebKit::RemoteDisplayListRecorder::clip):
(WebKit::RemoteDisplayListRecorder::clipOut):
(WebKit::RemoteDisplayListRecorder::clipToImageBuffer):
(WebKit::RemoteDisplayListRecorder::clipOutToPath):
(WebKit::RemoteDisplayListRecorder::clipPath):
(WebKit::RemoteDisplayListRecorder::beginClipToDrawingCommands):
(WebKit::RemoteDisplayListRecorder::endClipToDrawingCommands):
(WebKit::RemoteDisplayListRecorder::drawGlyphs):
(WebKit::RemoteDisplayListRecorder::drawImageBuffer):
(WebKit::RemoteDisplayListRecorder::drawNativeImage):
(WebKit::RemoteDisplayListRecorder::drawPattern):
(WebKit::RemoteDisplayListRecorder::beginTransparencyLayer):
(WebKit::RemoteDisplayListRecorder::endTransparencyLayer):
(WebKit::RemoteDisplayListRecorder::drawRect):
(WebKit::RemoteDisplayListRecorder::drawLine):
(WebKit::RemoteDisplayListRecorder::drawLinesForText):
(WebKit::RemoteDisplayListRecorder::drawDotsForDocumentMarker):
(WebKit::RemoteDisplayListRecorder::drawEllipse):
(WebKit::RemoteDisplayListRecorder::drawPath):
(WebKit::RemoteDisplayListRecorder::drawFocusRingPath):
(WebKit::RemoteDisplayListRecorder::drawFocusRingRects):
(WebKit::RemoteDisplayListRecorder::fillRect):
(WebKit::RemoteDisplayListRecorder::fillRectWithColor):
(WebKit::RemoteDisplayListRecorder::fillRectWithGradient):
(WebKit::RemoteDisplayListRecorder::fillCompositedRect):
(WebKit::RemoteDisplayListRecorder::fillRoundedRect):
(WebKit::RemoteDisplayListRecorder::fillRectWithRoundedHole):
(WebKit::RemoteDisplayListRecorder::fillLine):
(WebKit::RemoteDisplayListRecorder::fillArc):
(WebKit::RemoteDisplayListRecorder::fillQuadCurve):
(WebKit::RemoteDisplayListRecorder::fillBezierCurve):
(WebKit::RemoteDisplayListRecorder::fillPath):
(WebKit::RemoteDisplayListRecorder::fillEllipse):
(WebKit::RemoteDisplayListRecorder::getPixelBuffer):
(WebKit::RemoteDisplayListRecorder::putPixelBuffer):
(WebKit::RemoteDisplayListRecorder::paintFrameForMedia):
(WebKit::RemoteDisplayListRecorder::strokeRect):
(WebKit::RemoteDisplayListRecorder::strokeLine):
(WebKit::RemoteDisplayListRecorder::strokeArc):
(WebKit::RemoteDisplayListRecorder::strokeQuadCurve):
(WebKit::RemoteDisplayListRecorder::strokeBezierCurve):
(WebKit::RemoteDisplayListRecorder::strokePath):
(WebKit::RemoteDisplayListRecorder::strokeEllipse):
(WebKit::RemoteDisplayListRecorder::clearRect):
(WebKit::RemoteDisplayListRecorder::applyStrokePattern):
(WebKit::RemoteDisplayListRecorder::applyFillPattern):
(WebKit::RemoteDisplayListRecorder::applyDeviceScaleFactor):
(WebKit::RemoteDisplayListRecorder::flushContext):

  • GPUProcess/graphics/RemoteDisplayListRecorder.h: Added.

(WebKit::RemoteDisplayListRecorder::create):
(WebKit::RemoteDisplayListRecorder::handleItem):

  • GPUProcess/graphics/RemoteDisplayListRecorder.messages.in: Added.
  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::performWithMediaPlayerOnMainThread):

  • GPUProcess/graphics/RemoteRenderingBackend.h:

Add helper methods to RemoteRenderingBackend that are called from RemoteDisplayListRecorder.

  • Scripts/webkit/messages.py:

(headers_for_type):

  • Shared/WebCoreArgumentCoders.cpp:
  • Shared/WebCoreArgumentCoders.h:

Make it possible to encode and decode SetInlineFillColor and SetInlineStrokeColor using simple argument coder.

  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp: Added.

(WebKit::RemoteDisplayListRecorderProxy::RemoteDisplayListRecorderProxy):
(WebKit::m_renderingBackend):
(WebKit::RemoteDisplayListRecorderProxy::getPixelBuffer):
(WebKit::RemoteDisplayListRecorderProxy::putPixelBuffer):
(WebKit::RemoteDisplayListRecorderProxy::canDrawImageBuffer const):
(WebKit::RemoteDisplayListRecorderProxy::renderingMode const):
(WebKit::RemoteDisplayListRecorderProxy::recordSave):
(WebKit::RemoteDisplayListRecorderProxy::recordRestore):
(WebKit::RemoteDisplayListRecorderProxy::recordTranslate):
(WebKit::RemoteDisplayListRecorderProxy::recordRotate):
(WebKit::RemoteDisplayListRecorderProxy::recordScale):
(WebKit::RemoteDisplayListRecorderProxy::recordSetCTM):
(WebKit::RemoteDisplayListRecorderProxy::recordConcatenateCTM):
(WebKit::RemoteDisplayListRecorderProxy::recordSetInlineFillColor):
(WebKit::RemoteDisplayListRecorderProxy::recordSetInlineStrokeColor):
(WebKit::RemoteDisplayListRecorderProxy::recordSetStrokeThickness):
(WebKit::RemoteDisplayListRecorderProxy::recordSetState):
(WebKit::RemoteDisplayListRecorderProxy::recordSetLineCap):
(WebKit::RemoteDisplayListRecorderProxy::recordSetLineDash):
(WebKit::RemoteDisplayListRecorderProxy::recordSetLineJoin):
(WebKit::RemoteDisplayListRecorderProxy::recordSetMiterLimit):
(WebKit::RemoteDisplayListRecorderProxy::recordClearShadow):
(WebKit::RemoteDisplayListRecorderProxy::recordClip):
(WebKit::RemoteDisplayListRecorderProxy::recordClipOut):
(WebKit::RemoteDisplayListRecorderProxy::recordClipToImageBuffer):
(WebKit::RemoteDisplayListRecorderProxy::recordClipOutToPath):
(WebKit::RemoteDisplayListRecorderProxy::recordClipPath):
(WebKit::RemoteDisplayListRecorderProxy::recordBeginClipToDrawingCommands):
(WebKit::RemoteDisplayListRecorderProxy::recordEndClipToDrawingCommands):
(WebKit::RemoteDisplayListRecorderProxy::recordDrawGlyphs):
(WebKit::RemoteDisplayListRecorderProxy::recordDrawImageBuffer):
(WebKit::RemoteDisplayListRecorderProxy::recordDrawNativeImage):
(WebKit::RemoteDisplayListRecorderProxy::recordDrawPattern):
(WebKit::RemoteDisplayListRecorderProxy::recordBeginTransparencyLayer):
(WebKit::RemoteDisplayListRecorderProxy::recordEndTransparencyLayer):
(WebKit::RemoteDisplayListRecorderProxy::recordDrawRect):
(WebKit::RemoteDisplayListRecorderProxy::recordDrawLine):
(WebKit::RemoteDisplayListRecorderProxy::recordDrawLinesForText):
(WebKit::RemoteDisplayListRecorderProxy::recordDrawDotsForDocumentMarker):
(WebKit::RemoteDisplayListRecorderProxy::recordDrawEllipse):
(WebKit::RemoteDisplayListRecorderProxy::recordDrawPath):
(WebKit::RemoteDisplayListRecorderProxy::recordDrawFocusRingPath):
(WebKit::RemoteDisplayListRecorderProxy::recordDrawFocusRingRects):
(WebKit::RemoteDisplayListRecorderProxy::recordFillRect):
(WebKit::RemoteDisplayListRecorderProxy::recordFillRectWithColor):
(WebKit::RemoteDisplayListRecorderProxy::recordFillRectWithGradient):
(WebKit::RemoteDisplayListRecorderProxy::recordFillCompositedRect):
(WebKit::RemoteDisplayListRecorderProxy::recordFillRoundedRect):
(WebKit::RemoteDisplayListRecorderProxy::recordFillRectWithRoundedHole):
(WebKit::RemoteDisplayListRecorderProxy::recordFillLine):
(WebKit::RemoteDisplayListRecorderProxy::recordFillArc):
(WebKit::RemoteDisplayListRecorderProxy::recordFillQuadCurve):
(WebKit::RemoteDisplayListRecorderProxy::recordFillBezierCurve):
(WebKit::RemoteDisplayListRecorderProxy::recordFillPath):
(WebKit::RemoteDisplayListRecorderProxy::recordFillEllipse):
(WebKit::RemoteDisplayListRecorderProxy::recordGetPixelBuffer):
(WebKit::RemoteDisplayListRecorderProxy::recordPutPixelBuffer):
(WebKit::RemoteDisplayListRecorderProxy::recordPaintFrameForMedia):
(WebKit::RemoteDisplayListRecorderProxy::recordStrokeRect):
(WebKit::RemoteDisplayListRecorderProxy::recordStrokeLine):
(WebKit::RemoteDisplayListRecorderProxy::recordStrokeArc):
(WebKit::RemoteDisplayListRecorderProxy::recordStrokeQuadCurve):
(WebKit::RemoteDisplayListRecorderProxy::recordStrokeBezierCurve):
(WebKit::RemoteDisplayListRecorderProxy::recordStrokePath):
(WebKit::RemoteDisplayListRecorderProxy::recordStrokeEllipse):
(WebKit::RemoteDisplayListRecorderProxy::recordClearRect):
(WebKit::RemoteDisplayListRecorderProxy::recordApplyStrokePattern):
(WebKit::RemoteDisplayListRecorderProxy::recordApplyFillPattern):
(WebKit::RemoteDisplayListRecorderProxy::recordApplyDeviceScaleFactor):
(WebKit::RemoteDisplayListRecorderProxy::recordResourceUse):
(WebKit::RemoteDisplayListRecorderProxy::flushContext):
(WebKit::RemoteDisplayListRecorderProxy::createNestedContext):

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h: Added.

(WebKit::RemoteDisplayListRecorderProxy::~RemoteDisplayListRecorderProxy):
(WebKit::RemoteDisplayListRecorderProxy::resetNeedsFlush):
(WebKit::RemoteDisplayListRecorderProxy::needsFlush const):
(WebKit::RemoteDisplayListRecorderProxy::send):
(WebKit::RemoteDisplayListRecorderProxy::recordDrawPattern):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::recordNativeImageUse):
(WebKit::RemoteRenderingBackendProxy::recordFontUse):
(WebKit::RemoteRenderingBackendProxy::recordImageBufferUse):
(WebKit::RemoteRenderingBackendProxy::isCached const):

Add helper methods to RemoteRenderingBackendProxy that are called from RemoteDisplayListRecorderProxy.

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:

(WebKit::RemoteRenderingBackendProxy::sendToStream):

3:30 PM Changeset in webkit [283940] by dino@apple.com
  • 6 edits in trunk/Source

Disable SystemPreview in WKContentProviderRegistry
https://bugs.webkit.org/show_bug.cgi?id=231538
rdar://84110761

Reviewed by Tim Horton.

Source/WebKit:

Disable the WebViewContentProvider for System Previews
if UIKIT_WEBKIT_INTERNALS is true.

  • UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:

(-[WKWebViewContentProviderRegistry initWithConfiguration:]):

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

Source/WTF:

Revert the change in r283811.

  • wtf/PlatformUse.h:
3:19 PM Changeset in webkit [283939] by Jonathan Bedard
  • 2 edits in trunk/Tools

[build-imagediff] Build universal binaries by default
https://bugs.webkit.org/show_bug.cgi?id=231527
<rdar://problem/84113091>

Reviewed by Ryan Haddad.

  • Scripts/build-imagediff:
2:45 PM Changeset in webkit [283938] by sbarati@apple.com
  • 6 edits
    1 add in trunk

Don't branch around register allocation in DFG enumerator get by val and pass in the right LValue type to strictInt52ToJSValue
https://bugs.webkit.org/show_bug.cgi?id=231465
<rdar://83876470>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/dont-branch-around-regalloc-enumerator-get-by-val.js: Added.

(foo):

Source/JavaScriptCore:

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::setIntTypedArrayLoadResult):
(JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

2:21 PM Changeset in webkit [283937] by Patrick Griffis
  • 2 edits in trunk

Add my github username to contributors.json

Unreviewed.

  • metadata/contributors.json:
2:12 PM Changeset in webkit [283936] by Jonathan Bedard
  • 3 edits in trunk/Tools

[run-benchmark] Make Python 3 compatible
https://bugs.webkit.org/show_bug.cgi?id=231512
<rdar://problem/84098736>

Reviewed by Dewei Zhu.

  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_browser_driver.py:

(LinuxBrowserDriver.launch_url): Encode Popen call if Python 3.

  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:

(OSXSafariDriver.launch_url): Ditto.

1:59 PM Changeset in webkit [283935] by ntim@apple.com
  • 39 edits
    1 delete in trunk

Implement new autofocus behavior
https://bugs.webkit.org/show_bug.cgi?id=203139
<rdar://problem/56397019>

Reviewed by Wenson Hsieh.

Make WebKit match the new autofocus spec:

The new autofocus behavior queues up all autofocusable elements (visible or not), then
fires autofocus asynchronously during the "update rendering" steps, unlike the old behavior
which runs focus synchronously whenever it finds a visible autofocusable element.

Original patch by Ryosuke Niwa.

LayoutTests/imported/w3c:

  • web-platform-tests/html/interaction/focus/the-autofocus-attribute/document-with-fragment-empty-expected.txt:
  • web-platform-tests/html/interaction/focus/the-autofocus-attribute/document-with-fragment-nonexistent-expected.txt:
  • web-platform-tests/html/interaction/focus/the-autofocus-attribute/document-with-fragment-top-expected.txt:
  • web-platform-tests/html/interaction/focus/the-autofocus-attribute/first-expected.txt:
  • web-platform-tests/html/interaction/focus/the-autofocus-attribute/first-when-later-expected.txt:
  • web-platform-tests/html/interaction/focus/the-autofocus-attribute/queue-non-focusable-expected.txt:
  • web-platform-tests/html/interaction/focus/the-autofocus-attribute/update-the-rendering-expected.txt:
  • web-platform-tests/selection/selection-select-all-move-input-crash-expected.txt: Expected change since input autofocus now places caret at start

Source/WebCore:

  • dom/Document.cpp:

(WebCore::Document::appendAutofocusCandidate):
(WebCore::Document::flushAutofocusCandidates):

  • dom/Document.h:

(WebCore::Document::isAutofocusProcessed const):
(WebCore::Document::setAutofocusProcessed):

  • dom/Element.cpp:

(WebCore::Element::runFocusingStepsForAutofocus):

  • dom/Element.h:
  • html/HTMLFormControlElement.cpp:

(WebCore::shouldAutofocus):
(WebCore::HTMLFormControlElement::didAttachRenderers):
(WebCore::HTMLFormControlElement::insertedIntoAncestor):
(WebCore::HTMLFormControlElement::runFocusingStepsForAutofocus):

  • html/HTMLFormControlElement.h:

(WebCore::HTMLFormControlElement::hasAutofocused const): Deleted.
(WebCore::HTMLFormControlElement::setAutofocused): Deleted.

  • page/Page.cpp:

(WebCore::Page::updateRendering):

  • page/Page.h:

LayoutTests:

  • TestExpectations:
  • fast/dom/Window/window-scroll-ignore-null-frame.html:
  • fast/dom/adopt-node-crash-2-expected.txt:
  • fast/dom/adopt-node-crash-2.html:
  • fast/dom/window-inner-width-crash.html:
  • fast/forms/autofocus-in-sandbox-with-allow-scripts-expected.txt:
  • fast/forms/autofocus-in-sandbox-with-allow-scripts.html:
  • fast/forms/autofocus-keygen.html:
  • fast/forms/autofocus-opera-001.html:
  • fast/forms/autofocus-opera-002.html:
  • fast/forms/autofocus-opera-003.html:
  • fast/forms/autofocus-opera-006.html:
  • fast/forms/autofocus-opera-007.html:
  • fast/forms/change-input-type-in-focus-handler.html:
  • fast/frames/crash-when-iframe-is-remove-in-eventhandler.html:
  • fast/history/page-cache-execute-script-during-restore.html:
  • platform/ios-wk2/TestExpectations:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/interaction/focus/the-autofocus-attribute/update-the-rendering-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/selection/selection-select-all-move-input-crash-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/interaction/focus/the-autofocus-attribute/update-the-rendering-expected.txt:
  • platform/win/TestExpectations:
1:37 PM Changeset in webkit [283934] by commit-queue@webkit.org
  • 9 edits in trunk/Tools

Reduce use of TCPServer
https://bugs.webkit.org/show_bug.cgi?id=231518

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-11
Reviewed by Chris Dumez.

HTTPServer runs its logic on the main thread and doesn't hang in its destructor
when the number of connections and requests isn't exactly what was expected.

verifyCertificateAndPublicKey needed its expected bytes to be changed because it is
using the identity from TCPServer::testCertificate instead of TCPServer::startSecureConnection now.

I also moved the proxy basic authentication check from proxyAuthenticationServer to proxyDefinition.

  • TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:

(TEST):
(verifyCertificateAndPublicKey):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/Proxy.mm:

(TestWebKitAPI::proxyAuthenticationServer):
(TestWebKitAPI::webViewAndDelegate):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/cocoa/HTTPServer.h:
  • TestWebKitAPI/cocoa/HTTPServer.mm:

(TestWebKitAPI::proxyDefinition):
(TestWebKitAPI::shouldDisableTLS):
(TestWebKitAPI::HTTPServer::listenerParameters):
(TestWebKitAPI::statusText):
(TestWebKitAPI::HTTPServer::request const):

1:27 PM Changeset in webkit [283933] by Chris Dumez
  • 2 edits in branches/safari-612-branch/LayoutTests/imported/w3c

Unreviewed, minor test rebaseline on the branch.

Due to lack of SharedArrayBuffer stubs.

  • web-platform-tests/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt:
1:16 PM Changeset in webkit [283932] by weinig@apple.com
  • 2 edits in trunk

Add my github username and keep my expertise where it is because, while not up to date, it is fun

Unreviewed.

  • metadata/contributors.json:
1:14 PM Changeset in webkit [283931] by Chris Dumez
  • 12 edits
    1 copy
    2 moves
    1 add
    2 deletes in branches/safari-612-branch

Cherry-pick r283509. <rdar://83953710>

1:10 PM Changeset in webkit [283930] by commit-queue@webkit.org
  • 7 edits in trunk/Source

Unified build fix
https://bugs.webkit.org/show_bug.cgi?id=231524

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-11
Reviewed by Chris Dumez.

Source/WebCore:

  • platform/encryptedmedia/CDMProxy.cpp:

Source/WebKit:

This adds some missing includes and things to fix the build once I add some more files, making the unified build combine differently

  • NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementNetworkLoaderCocoa.mm:

(-[WKNetworkSessionDelegateAllowingOnlyNonRedirectedJSON URLSession:dataTask:didReceiveResponse:completionHandler:]):

  • NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementXPCUtilities.h:
  • NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementXPCUtilities.mm:
  • Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonEntryPoint.mm:
12:58 PM Changeset in webkit [283929] by Chris Dumez
  • 58 edits
    1 copy
    1 add in branches/safari-612-branch

Cherry-pick r283179. <rdar://83956559>

12:53 PM Changeset in webkit [283928] by Russell Epstein
  • 1 copy in tags/Safari-613.1.4.2

Tag Safari-613.1.4.2.

12:52 PM Changeset in webkit [283927] by Russell Epstein
  • 5 edits in branches/safari-613.1.4-branch/Source/WebKit

Cherry-pick r283925. rdar://problem/84111635

[macOS] Grant access in sandbox to 'system-privilege' for root
https://bugs.webkit.org/show_bug.cgi?id=231501
<rdar://83959448>

Reviewed by Brent Fulgham.

When running as root, WebKit processes need access to 'system-privilege'.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:

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

12:51 PM Changeset in webkit [283926] by Russell Epstein
  • 8 edits in branches/safari-613.1.4-branch/Source

Versioning.

WebKit-7613.1.4.2

12:41 PM Changeset in webkit [283925] by pvollan@apple.com
  • 5 edits in trunk/Source/WebKit

[macOS] Grant access in sandbox to 'system-privilege' for root
https://bugs.webkit.org/show_bug.cgi?id=231501
<rdar://83959448>

Reviewed by Brent Fulgham.

When running as root, WebKit processes need access to 'system-privilege'.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
12:37 PM Changeset in webkit [283924] by commit-queue@webkit.org
  • 2 edits in trunk

Various updates to my contributors.json entry.

Unreviewed.

Patch by Theresa O'Connor <hober@apple.com> on 2021-10-11

  • metadata/contributors.json:
12:34 PM Changeset in webkit [283923] by Chris Dumez
  • 2 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r282854. <rdar://83957011>

12:30 PM Changeset in webkit [283922] by Chris Dumez
  • 23 edits
    1 add
    1 delete in branches/safari-612-branch

Cherry-pick r282604. <rdar://83954050>

12:17 PM Changeset in webkit [283921] by BJ Burg
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: add TabBar context menu support for WI.WebInspectorExtensionTabContentView
https://bugs.webkit.org/show_bug.cgi?id=231181
<rdar://74698241>

Unreviewed. Land parts of the previous patch which seem to have been mis-merged and not landed.

  • UserInterface/Base/Main.js:

(WI.isNewTabWithTypeAllowed):

  • UserInterface/Controllers/WebInspectorExtensionController.js:

(WI.WebInspectorExtensionController.prototype.showExtensionTab):

  • UserInterface/Views/TabBar.js:

(WI.TabBar.prototype._handleAddClosedTabsTabBarItemMouseDown):
(WI.TabBar.prototype._handleTabContainerContextMenu):
(WI.TabBar):

12:14 PM Changeset in webkit [283920] by Chris Dumez
  • 46 edits
    2 adds in branches/safari-612-branch

Cherry-pick r282305. <rdar://83955184>

12:03 PM Changeset in webkit [283919] by Devin Rousso
  • 2 edits in trunk

Add my github and update my expertise

Unreviewed.

  • metadata/contributors.json:
12:02 PM Changeset in webkit [283918] by Ayumi Kojima
  • 3 edits in trunk/LayoutTests

[ iOS BigSur wk1 ] webgl/1.0.3/conformance/uniforms/uniform-default-values.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=231514

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk1/TestExpectations:
11:52 AM Changeset in webkit [283917] by Chris Dumez
  • 11 edits
    3 adds in branches/safari-612-branch

Cherry-pick r281935. <rdar://83953588>

11:38 AM Changeset in webkit [283916] by Ben Nham
  • 14 edits
    14 adds in trunk

Add push registration stubs
https://bugs.webkit.org/show_bug.cgi?id=231064

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Update test results after importing PushManager-related IDL.

  • web-platform-tests/push-api/idlharness.https.any-expected.txt:
  • web-platform-tests/push-api/idlharness.https.any.serviceworker-expected.txt:
  • web-platform-tests/push-api/idlharness.https.any.worker-expected.txt:

Source/WebCore:

Import IDL related to PushManager and implement steps 1-7 of the subscribe method as
described in https://www.w3.org/TR/push-api/#pushmanager-interface. Further steps will be
implemented in future patches.

Tests: http/wpt/push-api/pushManager.any.html

http/wpt/push-api/pushManager.any.serviceworker.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/push-api/PushManager.cpp: Added.

(WebCore::PushManager::PushManager):
(WebCore::PushManager::supportedContentEncodings):
(WebCore::PushManager::ref const):
(WebCore::PushManager::deref const):
(WebCore::PushManager::subscribe):
(WebCore::PushManager::getSubscription):
(WebCore::PushManager::permissionState):

  • Modules/push-api/PushManager.h: Added.
  • Modules/push-api/PushManager.idl: Added.
  • Modules/push-api/PushPermissionState.h: Added.
  • Modules/push-api/PushPermissionState.idl: Added.
  • Modules/push-api/ServiceWorkerRegistration+PushAPI.idl: Added.
  • Modules/push-api/ServiceWorkerRegistrationPushAPI.cpp: Added.

(WebCore::ServiceWorkerRegistrationPushAPI::ServiceWorkerRegistrationPushAPI):
(WebCore::ServiceWorkerRegistrationPushAPI::pushManager):
(WebCore::ServiceWorkerRegistrationPushAPI::from):
(WebCore::ServiceWorkerRegistrationPushAPI::supplementName):

  • Modules/push-api/ServiceWorkerRegistrationPushAPI.h: Added.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h:
  • workers/service/ServiceWorkerRegistration.h:

LayoutTests:

Add basic tests for PushManager.subscribe in both the window and service worker contexts.

  • http/wpt/push-api/pushManager-worker.js: Added.
  • http/wpt/push-api/pushManager.any-expected.txt: Added.
  • http/wpt/push-api/pushManager.any.html: Added.
  • http/wpt/push-api/pushManager.any.js: Added.

(isServiceWorker.promise_test.async test):
(else.promise_test.async test):
(promise_test.async test):

  • http/wpt/push-api/pushManager.any.serviceworker-expected.txt: Added.
  • http/wpt/push-api/pushManager.any.serviceworker.html: Added.
11:31 AM Changeset in webkit [283915] by Chris Dumez
  • 47 edits
    1 copy
    2 adds in branches/safari-612-branch

Cherry-pick r281832. <rdar://83953492>

11:28 AM Changeset in webkit [283914] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[JSC][ARMv7] Make LLInt CSR save/restore order match the JITs
https://bugs.webkit.org/show_bug.cgi?id=231517

Patch by Geza Lore <Geza Lore> on 2021-10-11
Reviewed by Saam Barati.

Since the new unlinked baseline JIT was introduced, the baseline JIT
uses the metadata table GPR the same way as the LLInt does, and relies
on it being in a saved CSR in emit_op_catch. This unearthed an issue
in the order in which LLInt on ARMv7 stores and restores CSRs when
trying to handle exceptions. This patch fixes the mismatch.

  • llint/LowLevelInterpreter.asm:
11:16 AM Changeset in webkit [283913] by Chris Dumez
  • 7 edits in branches/safari-612-branch

Merge r281802. <rdar://83957220>

11:05 AM Changeset in webkit [283912] by Chris Dumez
  • 27 edits
    1 move in trunk/Source

DOMTimeStamp is now EpochTimeStamp
https://bugs.webkit.org/show_bug.cgi?id=231496

Reviewed by Sam Weinig.

Source/WebCore:

DOMTimeStamp was renamed EpochTimeStamp. There is no observable behavioral change - it's just a name change.

Relevant WebIDL discussions/issue:

Which lead to:

  • Headers.cmake:
  • Modules/geolocation/Geolocation.cpp:

(WebCore::createGeolocationPosition):
(WebCore::Geolocation::haveSuitableCachedPosition):

  • Modules/geolocation/GeolocationPosition.h:

(WebCore::GeolocationPosition::create):
(WebCore::GeolocationPosition::timestamp const):
(WebCore::GeolocationPosition::GeolocationPosition):

  • Modules/geolocation/GeolocationPosition.idl:
  • Modules/notifications/Notification.idl:
  • Modules/push-api/PushSubscription.cpp:

(WebCore::PushSubscription::PushSubscription):
(WebCore::PushSubscription::expirationTime const):

  • Modules/push-api/PushSubscription.h:
  • Modules/push-api/PushSubscription.idl:
  • Modules/push-api/PushSubscriptionJSON.h:
  • Modules/push-api/PushSubscriptionJSON.idl:
  • Modules/push-api/PushSubscriptionOptions.h:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/scripts/IDLParser.pm:

(addBuiltinTypedefs):

  • bindings/scripts/test/TestTypedefs.idl:
  • dom/EpochTimeStamp.h: Renamed from Source/WebCore/dom/DOMTimeStamp.h.

(WebCore::convertSecondsToEpochTimeStamp):
(WebCore::convertEpochTimeStampToSeconds):

  • testing/Internals.cpp:

(WebCore::Internals::createPushSubscription):

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKitLegacy/mac:

  • DOM/DOMEvent.h:
  • DOM/DOMEvent.mm:

(-[DOMEvent timeStamp]):

  • DOM/DOMObject.h:

Source/WebKitLegacy/win:

  • DOMEventsClasses.cpp:

(DOMEvent::timeStamp):

  • DOMEventsClasses.h:

(DOMUIEvent::timeStamp):
(DOMKeyboardEvent::timeStamp):
(DOMMouseEvent::timeStamp):
(DOMMutationEvent::timeStamp):
(DOMOverflowEvent::timeStamp):
(DOMWheelEvent::timeStamp):

  • Interfaces/DOMEvents.idl:
10:52 AM Changeset in webkit [283911] by Simon Fraser
  • 31 edits in trunk/Source

Smooth-scroll animations should run in the UI process on iOS
https://bugs.webkit.org/show_bug.cgi?id=204936

Reviewed by Tim Horton.

Source/WebCore:

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::handleScrollPositionRequest): On iOS scrollingTreeNodeRequestsScroll()
doesn't handle the animated scroll, so we need to call startAnimatedScrollToPosition() from here.

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::scrollToOffset): call stopAsyncAnimatedScroll()
for overflow scrolls as we do in FrameView.

Source/WebKit:

Implement animated scrolls in the UI process for UI-side compositing. The scrolling tree
decoded in the UI process has a RequestedScrollData with the 'animated' flag. This is
processed by handleScrollPositionRequest() as normal.

ScrollingTreeOverflowScrollingNodeIOS::startAnimatedScrollToPosition() responds by calling
through to the delegate, which simply calls -[setContentOffset:animated:YES] on the
UIScrollView.

Main frame scrolls are a little different because the programmatic scroll needs to be
handled after layer tree commits; leverage the existing
RemoteScrollingCoordinatorProxy::scrollingTreeNodeRequestsScroll() code, but clean it up to
share the RequestedScrollData type, and have commitScrollingTreeState() return
std::optional<RequestedScrollData> instead of storing a pointer to a struct on the stack as
it did before. The various requestScroll() functions take a ScrollIsAnimated flag which
turns into -[setContentOffset:animated:YES] in WKWebView.

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:

(WebKit::dump):

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::requestScroll):

  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/API/ios/WKWebViewIOS.h:
  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _scrollToContentScrollPosition:scrollOrigin:animated:]):
(-[WKWebView _scrollToContentScrollPosition:scrollOrigin:]): Deleted.

  • UIProcess/API/wpe/PageClientImpl.cpp:

(WebKit::PageClientImpl::requestScroll):

  • UIProcess/API/wpe/PageClientImpl.h:
  • UIProcess/PageClient.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):

  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:

(WebKit::RemoteScrollingCoordinatorProxy::commitScrollingTreeState):
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeRequestsScroll):

  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
  • UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:

(WebKit::RemoteScrollingTree::scrollingTreeNodeRequestsScroll):

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:

(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateAfterChildren): The delegate's
commitStateAfterChildren() has to run first to update UIScrollView state before the programmatic scroll
is handled in the base class.

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
  • UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:

(WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateAfterChildren): The delegate's
commitStateAfterChildren() has to run first to update UIScrollView state before the programmatic scroll
is handled in the base class.
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::startAnimatedScrollToPosition):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::stopAnimatedScroll):

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:

(WebKit::ScrollingTreeScrollingNodeDelegateIOS::scrollLayer const): Deleted.
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::activeTouchActions const): Deleted.
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::clearActiveTouchActions): Deleted.

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:

(WebKit::ScrollingTreeScrollingNodeDelegateIOS::startAnimatedScrollToPosition):
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::stopAnimatedScroll):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::requestScroll):

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::requestScroll):

  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::requestScroll):

  • UIProcess/playstation/PageClientImpl.cpp:

(WebKit::PageClientImpl::requestScroll):

  • UIProcess/playstation/PageClientImpl.h:
  • UIProcess/win/PageClientImpl.cpp:

(WebKit::PageClientImpl::requestScroll):

  • UIProcess/win/PageClientImpl.h:
10:49 AM Changeset in webkit [283910] by Chris Dumez
  • 30 edits
    2 copies
    1 move
    20 adds
    3 deletes in branches/safari-612-branch/LayoutTests

Cherry-pick r281775. <rdar://83954681>

10:46 AM Changeset in webkit [283909] by Chris Dumez
  • 2 edits in branches/safari-612-branch/Tools

Cherry-pick r281709. <rdar://83953401>

10:41 AM Changeset in webkit [283908] by Chris Dumez
  • 28 edits
    4 adds in branches/safari-612-branch

Cherry-pick r281706. <rdar://83955085>

10:34 AM Changeset in webkit [283907] by Ryan Haddad
  • 3 edits in trunk/Tools

Bring up an iOS GPU Process tester
https://bugs.webkit.org/show_bug.cgi?id=231515

Reviewed by Jonathan Bedard.

  • CISupport/build-webkit-org/config.json:
  • CISupport/build-webkit-org/factories_unittest.py:
10:22 AM Changeset in webkit [283906] by commit-queue@webkit.org
  • 54 edits in trunk

Prepare to switch from WTF::Variant to std::variant
https://bugs.webkit.org/show_bug.cgi?id=231239

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-11
Reviewed by Chris Dumez.

Source/JavaScriptCore:

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileCallDOM):

  • parser/Lexer.cpp:

(JSC::Lexer<T>::parseHex):
(JSC::Lexer<T>::parseBinary):
(JSC::Lexer<T>::parseOctal):
(JSC::Lexer<T>::parseDecimal):

  • runtime/CachePayload.cpp:

(JSC::CachePayload::data const):
(JSC::CachePayload::size const):

  • runtime/CacheUpdate.cpp:

(JSC::CacheUpdate::CacheUpdate):

Source/WebCore:

  • Modules/cache/DOMCacheEngine.cpp:

(WebCore::DOMCacheEngine::isolatedResponseBody):
(WebCore::DOMCacheEngine::copyResponseBody):

  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::loadingException const):

  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::sourceObjectStoreIdentifier const):

  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsHost::showMediaControlsContextMenu):

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::addIceCandidate):

  • Modules/mediastream/RTCRtpTransform.cpp:

(WebCore::RTCRtpTransform::isAttached const):
(WebCore::operator==):

  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:

(WebCore::LibWebRTCRtpSenderBackend::videoSource):
(WebCore::LibWebRTCRtpSenderBackend::hasSource const):
(WebCore::operator==): Deleted.

  • Modules/webxr/WebXRFrame.cpp:

(WebCore::WebXRFrame::getViewerPose):

  • Modules/webxr/WebXRWebGLLayer.cpp:

(WebCore::WebXRWebGLLayer::canvas const):

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::intPointAttributeValue const):
(WebCore::AXIsolatedObject::objectAttributeValue const):
(WebCore::AXIsolatedObject::rectAttributeValue const):
(WebCore::AXIsolatedObject::vectorAttributeValue const):
(WebCore::AXIsolatedObject::optionSetAttributeValue const):
(WebCore::AXIsolatedObject::pairAttributeValue const):
(WebCore::AXIsolatedObject::uint64AttributeValue const):
(WebCore::AXIsolatedObject::urlAttributeValue const):
(WebCore::AXIsolatedObject::pathAttributeValue const):
(WebCore::AXIsolatedObject::colorAttributeValue const):
(WebCore::AXIsolatedObject::floatAttributeValue const):
(WebCore::AXIsolatedObject::doubleAttributeValue const):
(WebCore::AXIsolatedObject::unsignedAttributeValue const):

  • bindings/IDLTypes.h:
  • bindings/js/JSDOMConvertWebGL.cpp:

(WebCore::convertToJSValue):

  • bindings/js/JSPaymentMethodChangeEventCustom.cpp:

(WebCore::JSPaymentMethodChangeEvent::methodDetails const):

  • bindings/js/JSValueInWrappedObject.h:

(WebCore::JSValueInWrappedObject::operator JSC::JSValue const):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFontWeight):

  • dom/MessageEvent.cpp:

(WebCore::MessageEvent::memoryCost const):

  • editing/Editor.cpp:

(WebCore::Editor::advanceToNextMisspelling):

  • editing/TextManipulationController.cpp:

(WebCore::TextManipulationController::ExclusionRule::match const):

  • html/URLSearchParams.cpp:

(WebCore::URLSearchParams::create):

  • inspector/InspectorCanvas.cpp:

(WebCore::InspectorCanvas::canvasContext const):
(WebCore::InspectorCanvas::canvasElement const):
(WebCore::InspectorCanvas::scriptExecutionContext const):
(WebCore::InspectorCanvas::buildObjectForCanvas):
(WebCore::InspectorCanvas::indexForData):

  • inspector/InspectorShaderProgram.cpp:

(WebCore::InspectorShaderProgram::program const):

  • platform/SharedBuffer.cpp:

(WebCore::SharedBuffer::DataSegment::data const):
(WebCore::SharedBuffer::DataSegment::size const):

  • platform/cf/SharedBufferCF.cpp:

(WebCore::SharedBuffer::createCFData const):
(WebCore::SharedBuffer::hintMemoryNotNeededSoon const):

  • platform/generic/KeyedDecoderGeneric.cpp:

(WebCore::KeyedDecoderGeneric::Dictionary::add):
(WebCore::KeyedDecoderGeneric::getPointerFromDictionaryStack):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfTrack):

  • platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:

(WebCore::TextureMapperPlatformLayerBuffer::clone):

  • platform/mock/MockMediaDevice.h:

(WebCore::MockMediaDevice::encode const):

  • platform/network/FormData.cpp:

(WebCore::FormData::imageOrMediaFilesCount const):
(WebCore::FormDataElement::lengthInBytes const):
(WebCore::FormDataElement::isolatedCopy const):
(WebCore::FormData::appendData):
(WebCore::FormData::flatten const):
(WebCore::FormData::prepareForUpload):
(WebCore::FormData::asBlobURL const):

  • platform/network/cf/FormDataStreamCFNet.cpp:

(WebCore::advanceCurrentStream):
(WebCore::setHTTPBody):

  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::enableSSLForHost):

  • platform/network/curl/CurlFormDataStream.cpp:

(WebCore::CurlFormDataStream::read):

  • platform/network/curl/CurlSSLVerifier.cpp:

(WebCore::CurlSSLVerifier::CurlSSLVerifier):

  • platform/network/soup/ResourceRequestSoup.cpp:

(WebCore::ResourceRequest::updateSoupMessageBody const):

  • style/StyleResolveForFontRaw.cpp:

(WebCore::Style::resolveForFontRaw):

Source/WebKit:

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::resolveBlobReferences):

  • NetworkProcess/NetworkResourceLoadParameters.cpp:

(WebKit::NetworkResourceLoadParameters::encode const):

  • Platform/IPC/FormDataReference.h:

(IPC::FormDataReference::encode const):

  • Shared/mac/MediaFormatReader/MediaSampleCursor.cpp:

(WebKit::MediaSampleCursor::locateIterator const):

  • UIProcess/API/APIWebAuthenticationPanel.h:
  • UIProcess/Automation/SimulatedInputDispatcher.h:
  • UIProcess/Cocoa/WKSafeBrowsingWarning.h:

Source/WTF:

This is the pieces of bug 231086 that can be done without changing behavior.

  1. It makes WTF::get_if look more like std::get_if by taking a pointer to a variant instead of a reference.
  2. std::visit is pickier than WTF::visit. The former allows taking lambdas with different return types as long

as the return types can be converted to the overall desired return type. std::visit has a static_assert that the
return types of all the lambdas are all exactly the same type, so I explicitly declare the return type of many lambdas.

  1. It also resolves some types that will become ambiguous by using WTF::in_place,

which will become wrapped by std::in_place_type then removed.

  1. It adds a few explicit WTF:: and #include <wtf/Variant.h> that will be needed after removing Variant from Forward.h.
  2. It removes the fast malloc check in the one place a Variant is dynamically allocated in KeyedDecoderGeneric.cpp

(which is for non-cocoa platforms) because std::variant isn't fast allocated.

  • wtf/LikelyDenseUnsignedIntegerSet.h:

(WTF::LikelyDenseUnsignedIntegerSet::iterator::operator* const):

  • wtf/Variant.h:

(WTF::get_if):

Tools:

  • TestWebKitAPI/Tests/WTF/Hasher.cpp:

(TestWebKitAPI::add):

  • TestWebKitAPI/Tests/WTF/Variant.cpp:

(TestWebKitAPI::TEST):

10:19 AM Changeset in webkit [283905] by Chris Dumez
  • 38 edits
    2 adds in branches/safari-612-branch

Cherry-pick r281516. <rdar://83956860>

10:00 AM Changeset in webkit [283904] by Jonathan Bedard
  • 2 edits in trunk/Tools

[build.webkit.org] Build iOS 15 as universal binary (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=231389
<rdar://problem/83997697>

Reviewed by Ryan Haddad.

  • CISupport/build-webkit-org/config.json: Use universal iOS 15 Simulator Release build.
9:58 AM Changeset in webkit [283903] by keith_miller@apple.com
  • 28 edits
    1 copy in trunk/Source/JavaScriptCore

SourceID should have a type name and only be 32-bits
https://bugs.webkit.org/show_bug.cgi?id=231436

Reviewed by Filip Pizlo.

This patch gives SourceID a proper type name and shrinks it to
32-bits on 64-bit systems. Shrinking the size makes room on
SourceProvider for metadata in a future patch I'm working on.
It's also pretty unlikely that any system has more than ~4 billion
script tags, evals, wasm modules so shinking the size is unlikely
to cause any debugger/profiling issues.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/TypeLocation.h:
  • debugger/Debugger.cpp:

(JSC::Debugger::toggleBreakpoint):
(JSC::Debugger::pauseIfNeeded):

  • debugger/DebuggerLocation.h:

(JSC::DebuggerLocation::DebuggerLocation):

  • debugger/DebuggerPrimitives.h:
  • inspector/JavaScriptCallFrame.h:

(Inspector::JavaScriptCallFrame::sourceID const):

  • inspector/ScriptCallStackFactory.cpp:

(Inspector::CreateScriptCallStackFunctor::operator() const):
(Inspector::createScriptCallStackFromException):

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::Frame::sourceID):

  • interpreter/StackVisitor.h:
  • parser/Nodes.h:

(JSC::ScopeNode::sourceID const):

  • parser/SourceCode.h:

(JSC::SourceCode::SourceCode):
(JSC::SourceCode::firstLine const):
(JSC::SourceCode::startColumn const):
(JSC::SourceCode::providerID const):
(JSC::SourceCode::provider const):
(JSC::SourceCode::operator== const):
(JSC::SourceCode::operator!= const):
(JSC::makeSource):
(JSC::SourceCode::subExpression const):

  • parser/SourceProvider.cpp:

(JSC::SourceProvider::getID):

  • parser/SourceProvider.h:

(JSC::SourceProvider::asID):

  • runtime/ControlFlowProfiler.cpp:

(JSC::ControlFlowProfiler::getBasicBlockLocation):
(JSC::ControlFlowProfiler::getBasicBlocksForSourceID const):
(JSC::ControlFlowProfiler::hasBasicBlockAtTextOffsetBeenExecuted):
(JSC::ControlFlowProfiler::basicBlockExecutionCountAtTextOffset):

  • runtime/ControlFlowProfiler.h:
  • runtime/FunctionHasExecutedCache.cpp:

(JSC::FunctionHasExecutedCache::hasExecutedAtOffset):
(JSC::FunctionHasExecutedCache::insertUnexecutedRange):
(JSC::FunctionHasExecutedCache::removeUnexecutedRange):
(JSC::FunctionHasExecutedCache::getFunctionRanges):

  • runtime/FunctionHasExecutedCache.h:
  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::StackFrame::sourceID):

  • runtime/SamplingProfiler.h:
  • runtime/ScriptExecutable.h:

(JSC::ScriptExecutable::sourceID const):

  • runtime/StackFrame.cpp:

(JSC::StackFrame::sourceID const):

  • runtime/StackFrame.h:
  • runtime/TypeLocationCache.cpp:

(JSC::TypeLocationCache::getTypeLocation):

  • runtime/TypeLocationCache.h:
  • runtime/TypeProfiler.cpp:

(JSC::TypeProfiler::typeInformationForExpressionAtOffset):
(JSC::TypeProfiler::findLocation):

  • runtime/TypeProfiler.h:

(JSC::QueryKey::QueryKey):
(JSC::QueryKey::isHashTableDeletedValue const):

9:54 AM Changeset in webkit [283902] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Use inline box isFirstBox/isLastBox bits in iterator
https://bugs.webkit.org/show_bug.cgi?id=231513

Reviewed by Alan Bujtas.

  • layout/integration/InlineIteratorBoxModernPath.h:

(WebCore::InlineIterator::BoxModernPath::traverseNextInlineBox):
(WebCore::InlineIterator::BoxModernPath::traversePreviousInlineBox):

Avoid always traversing to the end.

9:36 AM Changeset in webkit [283901] by Kocsen Chung
  • 1 copy in tags/Safari-613.1.4.1

Tag Safari-613.1.4.1.

9:18 AM Changeset in webkit [283900] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Export some display list item methods for use in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=231483

Reviewed by Anders Carlsson.

Add WEBCORE_EXPORT to various apply methods on display list items, which will allow RemoteDisplayListRecorder
(in the GPU process, and implemented in WebKit2) to play back incoming display list items.

  • platform/graphics/displaylists/DisplayListItems.h:
9:13 AM Changeset in webkit [283899] by Razvan Caliman
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Move CSS longhand and shorthand mapping away from WI.CSSCompletions
https://bugs.webkit.org/show_bug.cgi?id=231432
<rdar://problem/84029471>

Reviewed by Devin Rousso.

WI.CSSCompletions has scope creep. Beyond handling filtering for CSS completions,
it holds logic to deal with CSS property name longhand-to-shorthand mapping.

But it already relies heavily on metadata about properties set on WI.CSSKeywordCompletions
populated as a result of the one-time initialization from WI.CSSCompletions.initializeCSSCompletions(target) >
WI.CSSKeywordCompletions.addCustomCompletions(properties).

This change moves the longhand-to-shorthand mapping from WI.CSSCompletions to
WI.CSSKeywordCompletions.ShorthandNamesForLongHandProperty and updates relevant consumers.

The aim is to gradually remove all specialized logic for property names from WI.CSSCompletions.

  • UserInterface/Models/CSSCompletions.js:

(WI.CSSCompletions):
(WI.CSSCompletions.prototype.isShorthandPropertyName): Deleted.
(WI.CSSCompletions.prototype.shorthandsForLonghand): Deleted.

  • UserInterface/Models/CSSKeywordCompletions.js:
  • UserInterface/Models/CSSProperty.js:

(WI.CSSProperty):

  • UserInterface/Models/DOMNodeStyles.js:

(WI.DOMNodeStyles.prototype._associateRelatedProperties):

9:12 AM Changeset in webkit [283898] by Kocsen Chung
  • 8 edits in branches/safari-613.1.4-branch/Source

Versioning.

WebKit-7613.1.4.1

9:04 AM Changeset in webkit [283897] by commit-queue@webkit.org
  • 5 edits
    1 add in trunk/Source/WebKit

Add AdAttributionDaemon sandbox on iOS
https://bugs.webkit.org/show_bug.cgi?id=231308

Patch by Alex Christensen <achristensen@webkit.org> on 2021-10-11
Reviewed by Brent Fulgham.

This makes it so that AdAttributionDaemon has enough permission to access the network and its storage file and not much else.

  • Configurations/AdAttributionDaemon.xcconfig:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.AdAttributionDaemon.sb: Added.
  • Scripts/process-entitlements.sh:
  • Shared/EntryPointUtilities/Cocoa/Daemon/PCMDaemonEntryPoint.mm:

(WebKit::enterSandbox):

  • WebKit.xcodeproj/project.pbxproj:
8:55 AM Changeset in webkit [283896] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

LineLayoutPath::LineBoxesPath name is outdated
https://bugs.webkit.org/show_bug.cgi?id=231494

Reviewed by Antti Koivisto.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::printModernLineLayoutCoverage):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::layoutInlineChildren):
(WebCore::RenderBlockFlow::invalidateLineLayoutPath):

  • rendering/RenderBlockFlow.h:
8:43 AM Changeset in webkit [283895] by Antti Koivisto
  • 5 edits
    1 add
    7 deletes in trunk

Remove inline box decoration painting quirk
https://bugs.webkit.org/show_bug.cgi?id=231510

Reviewed by Alan Bujtas.

Source/WebCore:

This quirk implemented in InlineBoxPainter::constrainToLineTopAndBottomIfNeeded constraints
painting of inline box decorations under certain narrow conditions in quirks mode.
It has been removed from Chrome so removing it is likely web compatible.

The quirk originated from https://trac.webkit.org/changeset/53200/webkit

  • rendering/InlineBoxPainter.cpp:

(WebCore::InlineBoxPainter::paintMask):
(WebCore::InlineBoxPainter::paintDecorations):
(WebCore::InlineBoxPainter::paintFillLayer):
(WebCore::InlineBoxPainter::constrainToLineTopAndBottomIfNeeded const): Deleted.

  • rendering/InlineBoxPainter.h:

LayoutTests:

  • fast/backgrounds/quirks-mode-line-box-backgrounds-expected-mismatch.html: Added.
  • fast/backgrounds/quirks-mode-line-box-backgrounds.html:
  • platform/glib/fast/backgrounds/quirks-mode-line-box-backgrounds-expected.txt: Removed.
  • platform/gtk/fast/backgrounds/quirks-mode-line-box-backgrounds-expected.png: Removed.
  • platform/ios/fast/backgrounds/quirks-mode-line-box-backgrounds-expected.txt: Removed.
  • platform/mac/fast/backgrounds/quirks-mode-line-box-backgrounds-expected.png: Removed.
  • platform/mac/fast/backgrounds/quirks-mode-line-box-backgrounds-expected.txt: Removed.
  • platform/win/fast/backgrounds/quirks-mode-line-box-backgrounds-expected.txt: Removed.
  • platform/wincairo/fast/backgrounds/quirks-mode-line-box-backgrounds-expected.txt: Removed.
8:30 AM Changeset in webkit [283894] by Noam Rosenthal
  • 2 edits in trunk

Add my github username to contributors.json

Unreviewed.

  • metadata/contributors.json:
8:12 AM Changeset in webkit [283893] by Antti Koivisto
  • 15 edits in trunk/Source/WebCore

[LFC][Integration] paintFillLayerExtended should use inline iterator
https://bugs.webkit.org/show_bug.cgi?id=231502

Reviewed by Alan Bujtas.

Prepare for LFC inline box painting.

  • layout/integration/InlineIteratorInlineBox.cpp:

(WebCore::InlineIterator::InlineBox::hasClosedLeftAndRightEdge const):

Add a shared helper.

The answer is computed here though this information is needed for layout too.
We should be able to consult layout to get it.

  • layout/integration/InlineIteratorInlineBox.h:
  • rendering/InlineBoxPainter.cpp:

(WebCore::clipRectForNinePieceImageStrip):
(WebCore::InlineBoxPainter::paintDecorations):
(WebCore::InlineBoxPainter::paintFillLayer):
(WebCore::InlineBoxPainter::paintBoxShadow):

  • rendering/LegacyInlineBox.h:
  • rendering/LegacyInlineFlowBox.cpp:

(WebCore::LegacyInlineFlowBox::boxShadowCanBeAppliedToBackground const): Deleted.

Move to the only call site as a lambda.

  • rendering/LegacyInlineFlowBox.h:
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::paintBoxDecorations):
(WebCore::RenderBox::paintBackground):
(WebCore::RenderBox::paintFillLayer):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::getBackgroundRoundedRect const):
(WebCore::RenderBoxModelObject::backgroundRoundedRectAdjustedForBleedAvoidance const):
(WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground const):

  • rendering/RenderBoxModelObject.h:
  • rendering/RenderImage.cpp:

(WebCore::RenderImage::boxShadowShouldBeAppliedToBackground const):

  • rendering/RenderImage.h:
  • rendering/RenderTable.cpp:

(WebCore::RenderTable::paintBoxDecorations):

  • rendering/RenderTableCell.cpp:

(WebCore::RenderTableCell::boxShadowShouldBeAppliedToBackground const):

  • rendering/RenderTableCell.h:
6:50 AM Changeset in webkit [283892] by ntim@apple.com
  • 7 edits
    7 copies
    8 adds in trunk/LayoutTests

Import new top layer WPTs
https://bugs.webkit.org/show_bug.cgi?id=229318

Reviewed by Youenn Fablet.

Sync html/semantics/interactive-elements/the-dialog-element/ WPTs from https://github.com/web-platform-tests/wpt/commit/023d5aa5d338569ae12988190705e1d570930d61

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/resources/green-dialog-and-backdrop.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/resources/w3c-import.log:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-clip-expected.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-clip.html: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/resources/green-dialog-and-backdrop.html.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-filter-expected.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-filter.html: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/resources/green-dialog-and-backdrop.html.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-mask-expected.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-mask.html: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/resources/green-dialog-and-backdrop.html.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-opacity-expected.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-opacity.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-overflow-clip-expected.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-overflow-clip.html: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/resources/green-dialog-and-backdrop.html.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-overflow-hidden-expected.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-overflow-hidden.html: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/resources/green-dialog-and-backdrop.html.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-overflow-scroll-expected.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-overflow-scroll.html: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/resources/green-dialog-and-backdrop.html.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-transform-expected.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-transform.html: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/resources/green-dialog-and-backdrop.html.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/w3c-import.log:

LayoutTests:

6:48 AM Changeset in webkit [283891] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Sort syscall filters in the WebContent process' sandbox
https://bugs.webkit.org/show_bug.cgi?id=231509
<rdar://problem/84095366>

Unreviewed, this patch only sorts existing message filters.

Syscall filters should be sorted in the WebContent process' sandbox. This patch does not add or
remove items from the filters, so there should be no change in behavior.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
4:50 AM Changeset in webkit [283890] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

Block access in sandbox to capability which is allowed by default
https://bugs.webkit.org/show_bug.cgi?id=231079
<rdar://66586853>

Reviewed by Brent Fulgham.

Some capabilities are allowed by default, and needs to be explicitly denied in the sandbox.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
4:05 AM Changeset in webkit [283889] by emilio
  • 2 edits in trunk

Add my GitHub username to contributors.json.
https://bugs.webkit.org/show_bug.cgi?id=231507

Unreviewed.

  • metadata/contributors.json:
3:47 AM Changeset in webkit [283888] by Claudio Saavedra
  • 2 edits in trunk

Add my github username to contributors.json

Unreviewed.

  • metadata/contributors.json:
2:10 AM Changeset in webkit [283887] by commit-queue@webkit.org
  • 6 edits in trunk/Source/JavaScriptCore

[JSC][32bit] Fix profiling in baseline
https://bugs.webkit.org/show_bug.cgi?id=231368

Patch by Geza Lore <Geza Lore> on 2021-10-11
Reviewed by Yusuke Suzuki.

Fixes profiling omissions introduced with the recent 32-bit baseline
build fixes, and also brings the rest of profile updates in-line with
the unlinked baseline on 64-bit platforms.

  • jit/JIT.h:
  • jit/JITCall32_64.cpp:

(JSC::JIT::emitPutCallResult):
(JSC::JIT::compileSetupFrame):
(JSC::JIT::compileOpCall):
(JSC::JIT::emit_op_iterator_open):
(JSC::JIT::emitSlow_op_iterator_open):
(JSC::JIT::emit_op_iterator_next):
(JSC::JIT::emitSlow_op_iterator_next):

  • jit/JITInlines.h:

(JSC::JIT::emitValueProfilingSiteIfProfiledOpcode):
(JSC::JIT::emitValueProfilingSite):
(JSC::JIT::emitArrayProfilingSiteWithCell):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_jneq_ptr):
(JSC::JIT::emit_op_to_number):
(JSC::JIT::emit_op_to_numeric):
(JSC::JIT::emit_op_to_object):
(JSC::JIT::emit_op_catch):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emitSlow_op_get_by_val):
(JSC::JIT::emit_op_get_private_name):
(JSC::JIT::emitSlow_op_get_private_name):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emitSlow_op_get_by_id_direct):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
(JSC::JIT::emit_op_in_by_val):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emitSlow_op_get_from_scope):
(JSC::JIT::emit_op_get_from_arguments):
(JSC::JIT::emit_op_get_internal_field):

1:14 AM Changeset in webkit [283886] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Add message filter in the WebContent process' sandbox
https://bugs.webkit.org/show_bug.cgi?id=231046
<rdar://problem/83743661>

Reviewed by Brent Fulgham.

Add IOKit message filter in the WebContent process' sandbox on iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
12:34 AM Changeset in webkit [283885] by Diego Pino Garcia
  • 2 edits in trunk

Add GitHub username for Diego Pino Garcia

Unreviewed.

  • metadata/contributors.json:

Oct 10, 2021:

11:59 PM Changeset in webkit [283884] by Pablo Saavedra
  • 2 edits in trunk

Add GitHub username for Pablo Saavedra

Unreviewed.

  • metadata/contributors.json:
11:38 PM Changeset in webkit [283883] by calvaris@igalia.com
  • 2 edits in trunk

Unreviewed. Add GitHub username for Xabier Rodriguez Calvar

  • metadata/contributors.json:
9:31 PM Changeset in webkit [283882] by Cameron McCormack
  • 2 edits in trunk

Add GitHub account to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=231497

Unreviewed.

  • metadata/contributors.json:
5:31 PM Changeset in webkit [283881] by sihui_liu@apple.com
  • 70 edits
    1 copy
    8 adds in trunk

Add support for iterating FileSystemDirectoryHandle
https://bugs.webkit.org/show_bug.cgi?id=231142
<rdar://problem/83848092>

Reviewed by Youenn Fablet and Yusuke Suzuki.

LayoutTests/imported/w3c:

Rebaselined existing tests as new interface is added and tests can proceed to next stage.

  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-BroadcastChannel.https.window-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-Error.https.window-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-frames.https.window-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-windows.https.window-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-workers.https.window-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-frames.https.window-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-windows.https.window-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-workers.https.window-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-create-sync-access-handle-dedicated-worker.https.tentative.window-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-flush.https.tentative.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-getSize.https.tentative.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-read-write.https.tentative.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-truncate.https.tentative.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any.worker-expected.txt:

Source/JavaScriptCore:

  • CMakeLists.txt:
  • runtime/JSBoundFunction.h:
  • runtime/JSGlobalObject.h:
  • runtime/JSGlobalObjectInlines.h:

(JSC::JSGlobalObject::performPromiseThenFunction const):

  • runtime/JSPromise.cpp:

(JSC::JSPromise::createNewPromiseCapability):
(JSC::JSPromise::convertCapabilityToDeferredData):
(JSC::JSPromise::createDeferredData):
(JSC::JSPromise::performPromiseThen):

  • runtime/JSPromise.h:

Source/WebCore:

Introduce a new template class JSDOMAsyncIteratorBase to provide support for AsyncIterable in IDL.
Spec: https://webidl.spec.whatwg.org/#es-asynchronous-iterator-prototype-object.

Since bindings code generator does not support creating specialized class for interface yet (we will do it in
webkit.org/b/231243), manually create a new specialized class JSFileSystemDirectoryHandleIterator
and implement keys(), values(), and entries() of JSFileSystemDirectoryHandle as custom methods to return a
JSFileSystemDirectoryHandleIterator object.

Add support for async directory iteration.
Spec: https://wicg.github.io/file-system-access/#api-filesystemdirectoryhandle-asynciterable

Add a new class FileSystemDirectoryHandle::Iterator, which retrieves the keys (names of children handles) on
initialization. In next(), it takes out a key and request to get corresponding handle from backend. If the
request fails, for example because file is removed after iterator initialization, it repeats the steps above
until a valid handle is received or keys becomes empty.

Tests: storage/filesystemaccess/directory-handle-iteration-worker.html

storage/filesystemaccess/directory-handle-iteration.html

  • Modules/filesystemaccess/FileSystemDirectoryHandle.cpp:

(WebCore::FileSystemDirectoryHandle::getHandleNames):
(WebCore::FileSystemDirectoryHandle::getHandle):
(WebCore::FileSystemDirectoryHandle::createIterator):
(WebCore::FileSystemDirectoryHandleIterator::create):
(WebCore::FileSystemDirectoryHandleIterator::next):
(WebCore::FileSystemDirectoryHandleIterator::advance):

  • Modules/filesystemaccess/FileSystemDirectoryHandle.h:
  • Modules/filesystemaccess/FileSystemDirectoryHandle.idl:
  • Modules/filesystemaccess/FileSystemFileHandle.cpp:

(WebCore::FileSystemFileHandle::getFile):

  • Modules/filesystemaccess/FileSystemStorageConnection.h:
  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp:

(WebCore::WorkerFileSystemStorageConnection::getHandleNames):
(WebCore::WorkerFileSystemStorageConnection::didGetHandleNames):
(WebCore::WorkerFileSystemStorageConnection::getHandle):
(WebCore::WorkerFileSystemStorageConnection::didGetHandleWithType):

  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.h:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMAsyncIterator.h: Added.

(WebCore::JSDOMAsyncIteratorBase::createPrototype):
(WebCore::JSDOMAsyncIteratorBase::JSDOMAsyncIteratorBase):
(WebCore::jsPair):
(WebCore::iteratorCreate):
(WebCore::convertToJS):
(WebCore::JSIterator>::destroy):
(WebCore::JSIterator>::next):
(WebCore::JSIterator>::runNextSteps):
(WebCore::JSIterator>::getNextIterationResult):
(WebCore::JSIterator>::settle):
(WebCore::JSIterator>::fulfill):
(WebCore::JSIterator>::reject):
(WebCore::JSIterator>::finishCreation):

  • bindings/js/JSFileSystemDirectoryHandleCustom.cpp: Added.

(WebCore::JSFileSystemDirectoryHandle::entries):
(WebCore::JSFileSystemDirectoryHandle::keys):
(WebCore::JSFileSystemDirectoryHandle::values):

  • bindings/js/JSFileSystemDirectoryHandleIterator.cpp: Added.

(WebCore::JSFileSystemDirectoryHandleIterator::subspaceForImpl):
(WebCore::jsFileSystemDirectoryHandleIterator_onPromiseSettledBody):
(WebCore::JSC_DEFINE_HOST_FUNCTION):
(WebCore::JSFileSystemDirectoryHandleIterator::createOnSettledFunction):
(WebCore::jsFileSystemDirectoryHandleIterator_onPromiseFulfilledBody):
(WebCore::JSFileSystemDirectoryHandleIterator::createOnFulfilledFunction):
(WebCore::jsFileSystemDirectoryHandleIterator_onPromiseRejectedBody):
(WebCore::JSFileSystemDirectoryHandleIterator::createOnRejectedFunction):

  • bindings/js/JSFileSystemDirectoryHandleIterator.h: Added.
  • bindings/js/WebCoreBuiltinNames.h:
  • bindings/js/WebCoreJSClientData.h:

(WebCore::JSVMClientData::fileSystemDirectoryHandleIteratorSpace):
(WebCore::JSVMClientData::setFileSystemDirectoryHandleIteratorSpace):

Source/WebKit:

  • NetworkProcess/storage/FileSystemStorageHandle.cpp:

(WebKit::FileSystemStorageHandle::FileSystemStorageHandle):
(WebKit::FileSystemStorageHandle::getHandleNames):
(WebKit::FileSystemStorageHandle::getHandle):

  • NetworkProcess/storage/FileSystemStorageHandle.h:

(WebKit::FileSystemStorageHandle::type const):

  • NetworkProcess/storage/FileSystemStorageManager.cpp:

(WebKit::FileSystemStorageManager::createHandle):
(WebKit::FileSystemStorageManager::getType):

  • NetworkProcess/storage/FileSystemStorageManager.h:
  • NetworkProcess/storage/NetworkStorageManager.cpp:

(WebKit::NetworkStorageManager::getHandleNames):
(WebKit::NetworkStorageManager::getHandle):

  • NetworkProcess/storage/NetworkStorageManager.h:
  • NetworkProcess/storage/NetworkStorageManager.messages.in:
  • WebProcess/WebCoreSupport/WebFileSystemStorageConnection.cpp:

(WebKit::WebFileSystemStorageConnection::getFileHandle):
(WebKit::WebFileSystemStorageConnection::getDirectoryHandle):
(WebKit::WebFileSystemStorageConnection::getHandleNames):
(WebKit::WebFileSystemStorageConnection::getHandle):

  • WebProcess/WebCoreSupport/WebFileSystemStorageConnection.h:

LayoutTests:

  • platform/wk2/TestExpectations: mark some tests as flaky failure on release builds. They were flaky at import,

but they didn't get to run due to missing directory iteration support.

  • storage/filesystemaccess/directory-handle-iteration-expected.txt: Added.
  • storage/filesystemaccess/directory-handle-iteration-worker-expected.txt: Added.
  • storage/filesystemaccess/directory-handle-iteration-worker.html: Added.
  • storage/filesystemaccess/directory-handle-iteration.html: Added.
  • storage/filesystemaccess/resources/directory-handle-iteration.js: Added.

(testPrototype):
(async testNext):
(async test):

4:05 PM Changeset in webkit [283880] by dino@apple.com
  • 10 edits in trunk/Source/WebCore

[WebXR] Replace the session reference in WebXRSpace subclasses with weak pointers
https://bugs.webkit.org/show_bug.cgi?id=231482

Reviewed by Sam Weinig.

WebXRSpace had a pure virtual session() accessor that returned a
reference to a WebXRSession. This made subclasses hold strong
references to the WebXRSession, and is problematic for WebXRSpace
subclasses that are (indirectly) owned by the WebXRSession.

Change the accessor to return a pointer, and all the subclasses
to use weak pointers instead.

  • Modules/webxr/WebXRBoundedReferenceSpace.h: Use a WeakPtr and change

the constructor parameter to take a reference instead of a Ref<>.

  • Modules/webxr/WebXRBoundedReferenceSpace.cpp:

(WebCore::WebXRBoundedReferenceSpace::create):
(WebCore::WebXRBoundedReferenceSpace::WebXRBoundedReferenceSpace):
(WebCore::WebXRBoundedReferenceSpace::getOffsetReferenceSpace):
(WebCore::WebXRBoundedReferenceSpace::updateIfNeeded): Add early return.

  • Modules/webxr/WebXRFrame.cpp:

(WebCore::WebXRFrame::populatePose): Compare pointers directly.

  • Modules/webxr/WebXRInputSpace.h: Use WeakPtr.
  • Modules/webxr/WebXRInputSpace.cpp:

(WebCore::WebXRInputSpace::WebXRInputSpace):
(WebCore::WebXRInputSpace::nativeOrigin const): Change this to return an
optional so we can detect errors and raise Exceptions.

  • Modules/webxr/WebXRReferenceSpace.h: Use a WeakPtr and change

the constructor parameter to take a reference instead of a Ref<>.

  • Modules/webxr/WebXRReferenceSpace.cpp:

(WebCore::WebXRReferenceSpace::create):
(WebCore::WebXRReferenceSpace::WebXRReferenceSpace):
(WebCore::WebXRReferenceSpace::nativeOrigin const): Return an optional.
(WebCore::WebXRReferenceSpace::getOffsetReferenceSpace):
(WebCore::WebXRReferenceSpace::floorOriginTransform const): Return an optional.

  • Modules/webxr/WebXRSpace.cpp: Return a * instead of a &.

(WebCore::WebXRSpace::isPositionEmulated const):
(WebCore::WebXRViewerSpace::WebXRViewerSpace):
(WebCore::WebXRViewerSpace::nativeOrigin const):

  • Modules/webxr/WebXRSpace.h:
3:24 PM Changeset in webkit [283879] by Alan Bujtas
  • 5 edits in trunk

[IFC][Integration] Do not bail out on missing primary font
https://bugs.webkit.org/show_bug.cgi?id=231488

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/css/cssom-view/getBoundingClientRect-shy-expected.txt:

Source/WebCore:

IFC has non-primary font support now.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::printReason):
(WebCore::LayoutIntegration::canUseForFontAndText):

  • layout/integration/LayoutIntegrationCoverage.h:
2:28 PM Changeset in webkit [283878] by commit-queue@webkit.org
  • 2 edits in trunk

[WPE] Reenable -fvisibility=hidden and -fvisibility-inlines-hidden
https://bugs.webkit.org/show_bug.cgi?id=222860

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-10-10
Reviewed by Philippe Normand.

  • Source/cmake/OptionsWPE.cmake:
1:42 PM Changeset in webkit [283877] by Adrian Perez de Castro
  • 2 edits in trunk

Unreviewed. Add GitHub username for Adrian Perez de Castro

While at it, run "validate-committer-lists --canonicalize".

  • metadata/contributors.json:
10:36 AM Changeset in webkit [283876] by commit-queue@webkit.org
  • 12 edits
    2 moves
    1 add in trunk

[WPE] Expose WKTextCheckerSetContinuousSpellCheckingEnabled and use it from WKTR
https://bugs.webkit.org/show_bug.cgi?id=231446

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-10-10
Reviewed by Philippe Normand.

Source/WebKit:

This is to avoid WKTR needing to poke WebKit internals to turn on spellchecking.

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • UIProcess/API/C/glib/WKTextCheckerGLib.cpp: Renamed from Source/WebKit/UIProcess/API/C/gtk/WKTextCheckerGtk.cpp.

(WKTextCheckerSetClient):
(WKTextCheckerContinuousSpellCheckingEnabledStateChanged):
(WKTextCheckerGrammarCheckingEnabledStateChanged):
(WKTextCheckerCheckSpelling):
(WKTextCheckerChangeSpellingToWord):
(WKTextCheckerSetSpellCheckingLanguages):
(WKTextCheckerSetContinuousSpellCheckingEnabled):

  • UIProcess/API/C/glib/WKTextCheckerGLib.h: Renamed from Source/WebKit/UIProcess/API/C/gtk/WKTextCheckerGtk.h.
  • UIProcess/gtk/WebTextChecker.h:
  • UIProcess/gtk/WebTextCheckerClient.h:

Tools:

  • WebKitTestRunner/gtk/TestControllerGtk.cpp:
  • WebKitTestRunner/gtk/UIScriptControllerGtk.cpp:
  • WebKitTestRunner/gtk/main.cpp:
  • WebKitTestRunner/wpe/UIScriptControllerWPE.cpp:

(WTR::UIScriptControllerWPE::setContinuousSpellCheckingEnabled):

9:05 AM Changeset in webkit [283875] by Alan Bujtas
  • 7 edits in trunk

[LFC][IFC] Do no bail out on boundary neutral characters
https://bugs.webkit.org/show_bug.cgi?id=231485

Reviewed by Antti Koivisto.

Source/WebCore:

They don't affect directionality (no bidi impact), no need to take the legacy codepath.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForText):

LayoutTests:

1:49 AM Changeset in webkit [283874] by ysuzuki@apple.com
  • 16 edits
    1 add in trunk

[JSC] Refine RegExp#compile based on regexp-legacy-features proposal
https://bugs.webkit.org/show_bug.cgi?id=231486

Reviewed by Alexey Shvayka.

JSTests:

  • stress/regexp-recompile.js: Added.

(shouldBe):
(recompile):
(target):

  • test262/expectations.yaml:

Source/JavaScriptCore:

This patch refines RegExp#compile based regexp-legacy-features proposal[1].
We add legacyFeaturesDisabledFlag flag to RegExpObject so that we can
detect LegacyFeaturesEnabled.

We also add regExpRecompiledWatchpoint to JSGlobalObject. We have strength
reduction in DFG / FTL, but we should recompile DFG / FTL code when RegExp
is recompiled. Since it is rare, instead of having this watchpoint per
RegExpObject, we hold it in JSGlobalObject.

[1]: https://github.com/tc39/proposal-regexp-legacy-features

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewRegexp):
(JSC::DFG::SpeculativeJIT::compileSetRegExpObjectLastIndex):

  • dfg/DFGStrengthReductionPhase.cpp:

(JSC::DFG::StrengthReductionPhase::handleNode):

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

  • ftl/FTLOperations.cpp:

(JSC::FTL::JSC_DEFINE_JIT_OPERATION):

  • jit/JITOperations.cpp:

(JSC::JSC_DEFINE_JIT_OPERATION):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::JSGlobalObject):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::regExpRecompiledWatchpoint):
(JSC::JSGlobalObject::isRegExpRecompiled const):

  • runtime/RegExpConstructor.cpp:

(JSC::areLegacyFeaturesEnabled):
(JSC::regExpCreate):
(JSC::constructRegExp):

  • runtime/RegExpObject.cpp:

(JSC::RegExpObject::RegExpObject):

  • runtime/RegExpObject.h:
  • runtime/RegExpPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

12:01 AM Changeset in webkit [283873] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore

[Build-time perf] Speed up the WebCore null build
https://bugs.webkit.org/show_bug.cgi?id=231473

Reviewed by Myles C. Maxfield.

The DerivedSources-output.xcfilelist had a number of entries for files that no longer exist, or had been renamed.

The "Check For Inappropriate Objective-C Class Names" and "Check For Inappropriate Files In Framework" build phases
had no inputs or outputs listed, causing them to run every time. Define an output of an empty text file in the
TARGET_TEMP_DIR directory that will get touched after the check, allowing the build system to do dependency checking.

The "Make Frameworks Symbolic Link" build phase had no output defined, causing it to run every time.

  • DerivedSources-output.xcfilelist:
  • WebCore.xcodeproj/project.pbxproj:

Oct 9, 2021:

9:41 PM Changeset in webkit [283872] by Alan Bujtas
  • 4 edits in trunk

Ideographic space behaves as breaking space
https://bugs.webkit.org/show_bug.cgi?id=231480

Reviewed by Antti Koivisto.

Source/WebCore:

We should be able to break at U+3000.
See https://drafts.csswg.org/css-text-3/#word-break-property and https://www.unicode.org/reports/tr14/tr14-47.html

  • layout/formattingContexts/inline/InlineTextItem.cpp:

(WebCore::Layout::moveToNextNonWhitespacePosition):

  • rendering/BreakLines.h:

(WebCore::isBreakableSpace):

LayoutTests:

3:01 PM Changeset in webkit [283871] by Simon Fraser
  • 10 edits in trunk

Run smooth scroll animations on the scrolling thread
https://bugs.webkit.org/show_bug.cgi?id=231481

Reviewed by Tim Horton.

Source/WebCore:

Implement AsyncScrollingCoordinator::requestAnimatedScrollToPosition() and stopAnimatedScroll()
so that smooth scroll animations are dispatched to the scrolling thread.

RequestedScrollData gains a requestType field so that we can indicate the need
to cancel a running animation on the scrolling thread.

Tested by tests in imported/w3c/web-platform-tests/css/cssom-view.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::requestAnimatedScrollToPosition):
(WebCore::AsyncScrollingCoordinator::stopAnimatedScroll):

  • page/scrolling/ScrollingCoordinatorTypes.h:

(WebCore::RequestedScrollData::operator== const):

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::handleScrollPositionRequest): We already cancel
the animation each time. If this is a ScrollRequestType::CancelAnimatedScroll, there is no
more to do.

Source/WebKit:

Implement AsyncScrollingCoordinator::requestAnimatedScrollToPosition() and stopAnimatedScroll()
so that smooth scroll animations are dispatched to the scrolling thread.

RequestedScrollData gains a requestType field so that we can indicate the need
to cancel a running animation on the scrolling thread.

Tested by tests in imported/w3c/web-platform-tests/css/cssom-view.

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:

(ArgumentCoder<RequestedScrollData>::encode):
(ArgumentCoder<RequestedScrollData>::decode):
(WebKit::dump):

LayoutTests:

imported/w3c/web-platform-tests/css/cssom-view/idlharness.html seems to pass just fine.
imported/w3c/web-platform-tests/css/cssom-view/scroll-behavior-smooth.html has some problems
indicated by the github issue.

Three tests pass now on iOS (but they are not yet scrolling in the UI process).

2:35 PM Changeset in webkit [283870] by Beth Dakin
  • 5 edits
    2 adds in trunk/Tools

Pull modifier key extraction into TestRunnerShared
https://bugs.webkit.org/show_bug.cgi?id=231267

Reviewed by Tim Horton.

This patch pulls the code to extract modifier key information is pulled into a little class
called ModifierKeys in TestRunnerShared. That code is now shared between DRT and WKTR
for the existing implementations of keyDown.

  • DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
  • DumpRenderTree/mac/EventSendingController.mm:

(-[EventSendingController keyDown:withModifiers:withLocation:]):

  • TestRunnerShared/cocoa/ModifierKeys.h: Added.
  • TestRunnerShared/cocoa/ModifierKeys.mm: Added.

(-[ModifierKeys init]):
(-[ModifierKeys dealloc]):
(+[ModifierKeys modifierKeysWithKey:modifiers:keyLocation:]):

  • WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
  • WebKitTestRunner/mac/EventSenderProxy.mm:

(WTR::EventSenderProxy::keyDown):

2:19 PM Changeset in webkit [283869] by berto@igalia.com
  • 2 edits in trunk

Add GitHub account to contributors.json

Unreviewed.

  • metadata/contributors.json:
1:38 PM Changeset in webkit [283868] by commit-queue@webkit.org
  • 6 edits
    2 adds in trunk

Remove scrollbars explicitly when destroying render tree
https://bugs.webkit.org/show_bug.cgi?id=229274

Patch by Rob Buis <rbuis@igalia.com> on 2021-10-09
Reviewed by Simon Fraser.

Source/WebCore:

Scrollbars in FrameViews that are hosted by RenderWidget need the RenderView
to exist because of RenderScrollbarPart. So when we are destroying the render tree
the RenderView will be destroyed too, so before that happens remove the scrollbars
and its RenderScrollbarParts.

Test: editing/inserting/insert-html-crash-02.html

  • page/FrameView.cpp:

(WebCore::FrameView::willBeDestroyed):

  • page/FrameView.h:
  • platform/Widget.h:

(WebCore::Widget::willBeDestroyed):

  • rendering/RenderWidget.cpp:

(WebCore::RenderWidget::willBeDestroyed):

LayoutTests:

  • editing/inserting/insert-html-crash-02-expected.txt: Added.
  • editing/inserting/insert-html-crash-02.html: Added.
6:13 AM Changeset in webkit [283867] by Jean-Yves Avenard
  • 2 edits in trunk

2021-10-09 Jean-Yves Avenard <Jean-Yves Avenard>

Unreviewed, add my GitHub username

  • metadata/contributors.json:
4:47 AM Changeset in webkit [283866] by Manuel Rego Casasnovas
  • 2 edits in trunk

Add GitHub account to contributors.json and update expertise field
https://bugs.webkit.org/show_bug.cgi?id=231476

Unreviewed.

  • metadata/contributors.json:

Oct 8, 2021:

11:48 PM Changeset in webkit [283865] by jh718.park@samsung.com
  • 2 edits in trunk

Unreviewed. Add github username for Joonghun Park.

  • metadata/contributors.json:
11:24 PM Changeset in webkit [283864] by Devin Rousso
  • 6 edits
    27 adds in trunk

[GPU Process] support rendering Apple Pay logos
https://bugs.webkit.org/show_bug.cgi?id=230664
<rdar://problem/83187282>

Reviewed by Tim Horton.

Source/WebCore:

  • platform/cocoa/ThemeCocoa.mm:

(WebCore::drawApplePayButton):
Instead of drawing directly into the GraphicsContext::platformContext (which will not be
valid in the WebProcess when DOM rendering happens in the GPUProcess), first draw into a
temporary ImageBuffer and then consume it to draw into the actual/used GraphicsContext.
While it is possible to create a dedicated display list item for this, we don't want to do
that because we need to load PDFs from PassKit, which are not as secure as we'd like for use
in the GPUProcess.

LayoutTests:

  • fast/css/webkit-named-image/apple-pay-logo-black/background-size-centered.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/background-size-centered-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/background-size.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/background-size-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/basic.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/basic-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/container-larger-height.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/container-larger-height-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/container-larger-width.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/container-larger-width-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/mask.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-black/mask-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/background-size-centered.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/background-size-centered-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/background-size.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/background-size-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/basic.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/basic-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/container-larger-height.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/container-larger-height-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/container-larger-width.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/container-larger-width-expected-mismatch.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/mask.html: Added.
  • fast/css/webkit-named-image/apple-pay-logo-white/mask-expected-mismatch.html: Added.
  • TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:

Skip the above tests everywhere except iOS and macOS.

11:18 PM Changeset in webkit [283863] by Devin Rousso
  • 13 edits in trunk/Source/WebCore

[iOS][GPU Process] support <attachment>
https://bugs.webkit.org/show_bug.cgi?id=230781
<rdar://problem/70884096>

Reviewed by Myles Maxfield.

Source/WebCore:

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderAttachmentInfo::addLine):
(WebCore::RenderAttachmentInfo::buildWrappedLines):
(WebCore::RenderAttachmentInfo::buildSingleLine):
(WebCore::paintAttachmentText):
Instead of drawing directly into the GraphicsContext::platformContext (which will not be
valid in the WebProcess when DOM rendering happens in the GPUProcess), use DrawGlyphsRecorder
to "translate" native CTLineDraw into a sequence of actions from which a GraphicsContext
method can be derived, thereby hooking into and benefiting from existing GPUProcess support.

  • platform/graphics/DrawGlyphsRecorder.h:

(WebCore::DrawGlyphsRecorder::deconstructDrawGlyphs const): Renamed from drawGlyphsDeconstruction.

  • platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:

(WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder):
(WebCore::DrawGlyphsRecorder::recordDrawGlyphs):
(WebCore::DrawGlyphsRecorder::drawGlyphs):
(WebCore::DrawGlyphsRecorder::drawNativeText):

  • platform/graphics/harfbuzz/DrawGlyphsRecorderHarfBuzz.cpp:

(WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder):

  • platform/graphics/win/DrawGlyphsRecorderWin.cpp:

(WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder):
Add a new parameter to DrawGlyphsRenderer that controls whether fonts other than the one
initially provided to drawGlyphs/drawNativeText can be used to draw glyphs. This is only
used by the above as we know that the initial font is a system font, and therefore that the
fallback list will also only contain system fonts, meaning that sending the font to the
GPUProcess is cheap (a file path instead of actual data).

  • platform/graphics/displaylists/DisplayListRecorder.h:
  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::Recorder):

  • platform/graphics/displaylists/DisplayListRecorderImpl.h:
  • platform/graphics/displaylists/DisplayListRecorderImpl.cpp:

(WebCore::DisplayList::Recorder::RecorderImpl):

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::displayListForTextRun const):
Drive-by: Rename DrawGlyphsDeconstruction to DeconstructDrawGlyphs as it reads better.

Source/WebCore/PAL:

  • pal/spi/cg/CoreGraphicsSPI.h:
8:29 PM Changeset in webkit [283862] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Run backwards propagation before we prune the graph after ForceOSRExit nodes in BytecodeParser
https://bugs.webkit.org/show_bug.cgi?id=230823
<rdar://problem/83565088>

Reviewed by Yusuke Suzuki.

When I ported the phase to run right after bytecode parsing, I wanted
to maintain the same behavior as the prior pass that ran after CPS
rethreading. I noticed a slight bug in some of my logic that changed
some of heuristics and how they'd effect double voting.

The old patch was mimicking the "is loaded from" bit by using the NodeFlags.
Howver, this has some issues with how this interacts with our other uses
of NodeFlags. So, to make things simple, I just add a new "VariableIsUsed"
bit.

  • dfg/DFGBackwardsPropagationPhase.cpp:

(JSC::DFG::BackwardsPropagationPhase::propagate):

7:53 PM Changeset in webkit [283861] by Simon Fraser
  • 3 edits in trunk/LayoutTests

Unreviewed. Fix up some TestExpectations errors.

  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
7:15 PM Changeset in webkit [283860] by Russell Epstein
  • 8 edits in branches/safari-612.2.9.1-branch/Source

Versioning.

WebKit-7612.2.9.1.7

6:40 PM Changeset in webkit [283859] by BJ Burg
  • 9 edits in trunk/Source/WebInspectorUI

Web Inspector: add TabBar context menu support for WI.WebInspectorExtensionTabContentView
https://bugs.webkit.org/show_bug.cgi?id=231181
<rdar://74698241>

Reviewed by Devin Rousso.

The existing TabBar/TabBrowser system relies on the fact that each tab class can
be instantiated once. This is no longer true with extension tabs, as all of them
are instances of the same WI.WebInspectorExtensionTabContentView class.

The new approach builds on bug 230758 by introducing a 'visible' property on ContentView.
This is necessary to mark extension tabs as "attached by not showing" due to the
override of shouldNotRemoveFromDOMWhenHidden().

  • UserInterface/Base/Main.js:

(WI._createTabContentViewForType):
(WI.isNewTabWithTypeAllowed):
List WebInspectorExtensionTabContentView as a known tab class. But do not allow
this tab class to be instantiated directly. Extension tabs are intended to be
created using WebInspectorExtensionController.createTabForExtension().

  • UserInterface/Controllers/WebInspectorExtensionController.js:

(WI.WebInspectorExtensionController.prototype.unregisterExtension):
(WI.WebInspectorExtensionController.prototype.createTabForExtension):
Drive-by, suppress animations when extension tabs are created and destroyed. Otherwise
there is a lot of unnecessary and glitchy animation when multiple extension tabs are
created upon loading Web Inspector the first time.

(WI.WebInspectorExtensionController.prototype.showExtensionTab):
(WI.WebInspectorExtensionController.prototype.hideExtensionTab): Added.
These methods are counterparts. They toggle tabContentView.visible to make the tab
visible and not visible. Note that 'hiding' does not actually close/destroy the
extension tab. Extension tabs are hidden by setting .not-visible ('display:none') and
removing the tab's TabBarItem from the TabBar.

(WI.WebInspectorExtensionController.prototype.addContextMenuItemsForClosedExtensionTabs):
(WI.WebInspectorExtensionController.prototype.addContextMenuItemsForAllExtensionTabs):
Added. TabBar delegates the creation of extension tab context menu items to this class.
The first method only shows hidden extension tabs (for the Reopen Closed Tabs + item).
The second method shows visible and not visible extension tabs and feeds the main context menu.

  • UserInterface/Views/ContentView.css:

(.content-view.not-visible):

  • UserInterface/Views/ContentViewContainer.css:

(.content-view-container > .content-view):
(.content-view-container > .content-view.not-visible): Deleted.
This style class is now managed by ContentView.js. So, move the style declaration.

  • UserInterface/Views/ContentView.js:

(WI.ContentView):
(WI.ContentView.prototype.get visible):
(WI.ContentView.prototype.set visible):
Add a flag so that clients can determine when the content view is not visible and not closed.
This can be true if a subclass overrides shouldNotRemoveFromDOMWhenHidden() to return true.

  • UserInterface/Views/ContentViewContainer.js:

(WI.ContentViewContainer.prototype._disassociateFromContentView):
Fix this code to not detach extension tabs that are hidden.

(WI.ContentViewContainer.prototype._showEntry):
(WI.ContentViewContainer.prototype._hideEntry):
Adopt new setter for ContentView.prototype.hidden.

  • UserInterface/Views/TabBar.js:

(WI.TabBar.prototype._handleAddClosedTabsTabBarItemMouseDown):
Don't add generic context menu items for WebInspectorExtensionTabContentView. Call out
to WebInspectorExtensionController to create the appropriate extension tab context menu items.
(WI.TabBar.prototype._handleTabContainerContextMenu):
(WI.TabBar):

  • UserInterface/Views/WebInspectorExtensionTabContentView.js:

(WI.WebInspectorExtensionTabContentView.isTabAllowed): Drive-by, gate creation of this class
on Web Extensions being enabled (InspectorFrontendHost.supportsWebExtensions).

6:39 PM Changeset in webkit [283858] by Aditya Keerthi
  • 14 edits in trunk

Add support for '-webkit-appearance: auto'
https://bugs.webkit.org/show_bug.cgi?id=231203
rdar://83696133

Reviewed by Wenson Hsieh.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:

Mark progression.

Source/WebCore:

The 'appearance' property allows authors to use the 'auto' keyword
to opt widgets (any element that can have a native appearance) into
a native appearance [1]. Elements other than widgets are rendered
as if none had been specified.

Since '-webkit-appearance' is a parse time alias of 'appearance',
support '-webkit-appearance: auto' prior to unprefixing.

The used-value for appearance (effectiveAppearance) is determined by
the element tag and type. In the case of elements in the UA shadow
tree, the pseudo id is used to determine the effective appearance. The
used-values when specifying 'auto' match the default specified values
in the UA style sheet.

Note that additional test coverage exists in the form of web platform
web platform tests, and is dependent on unprefixing.

[1] https://www.w3.org/TR/css-ui-4/#valdef-appearance-auto

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ControlPart const):

  • css/CSSProperties.json:
  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

  • platform/ThemeTypes.cpp:

(WebCore::operator<<):

  • platform/ThemeTypes.h:
  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::autoAppearanceForElement const):

  • rendering/RenderTheme.h:

LayoutTests:

  • platform/gtk/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
6:38 PM Changeset in webkit [283857] by BJ Burg
  • 24 edits
    1 copy
    1 add in trunk

[Cocoa] Web Inspector: provide a way for _WKInspectorExtension clients to be notified when the inspected page navigates
https://bugs.webkit.org/show_bug.cgi?id=231338
<rdar://71200338>

Reviewed by Devin Rousso.

Source/WebCore:

New API test: WKInspectorExtensionDelegate.InspectedPageNavigatedCallbacks

Add plumbing for new event.

  • inspector/InspectorFrontendClient.h:

(WebCore::InspectorFrontendClient::inspectedPageDidNavigate):

  • inspector/InspectorFrontendHost.h:
  • inspector/InspectorFrontendHost.idl:
  • inspector/InspectorFrontendHost.cpp:

(WebCore::InspectorFrontendHost::inspectedPageDidNavigate):

Source/WebInspectorUI:

Pass along an onNavigated event to InspectorFrontendHost when the WI.Frame.MainResourceDidChange
event fires at a main frame target.

  • UserInterface/Controllers/WebInspectorExtensionController.js:

(WI.WebInspectorExtensionController):
(WI.WebInspectorExtensionController.prototype.registerExtension):
(WI.WebInspectorExtensionController.prototype.unregisterExtension):
Do not add this global listener unless at least one WI.WebInspectorExtension
is currently registered.

(WI.WebInspectorExtensionController.prototype._handleMainResourceDidChange):

Source/WebKit:

Add plumbing for a new event to pass from WebInspectorUI out to _WKInspectorExtensionDelegate.

  • UIProcess/API/APIInspectorExtensionClient.h:

(API::InspectorExtensionClient::inspectedPageDidNavigate):

  • UIProcess/API/Cocoa/_WKInspectorExtensionDelegate.h:
  • UIProcess/Inspector/Cocoa/InspectorExtensionDelegate.h:
  • UIProcess/Inspector/Cocoa/InspectorExtensionDelegate.mm:

(WebKit::InspectorExtensionDelegate::InspectorExtensionDelegate):
(WebKit::InspectorExtensionDelegate::InspectorExtensionClient::inspectedPageDidNavigate):

  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h:
  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.messages.in:
  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp:

(WebKit::WebInspectorUIExtensionControllerProxy::inspectedPageDidNavigate):
Call the delegate method for all _WKInspectorExtensions associated with this
id<_WKInspectorExtensionHost>. Clients can map from extension to inspector if needed.

  • WebProcess/Inspector/RemoteWebInspectorUI.h:
  • WebProcess/Inspector/RemoteWebInspectorUI.cpp:

(WebKit::RemoteWebInspectorUI::inspectedPageDidNavigate):

  • WebProcess/Inspector/WebInspectorUI.h:
  • WebProcess/Inspector/WebInspectorUI.cpp:

(WebKit::WebInspectorUI::inspectedPageDidNavigate):

  • WebProcess/Inspector/WebInspectorUIExtensionController.h:
  • WebProcess/Inspector/WebInspectorUIExtensionController.cpp:

(WebKit::WebInspectorUIExtensionController::inspectedPageDidNavigate):

Tools:

Add a new test to verify that triggering a navigation on the inspected WKWebView
causes the -extension:inspectedPageDidNavigate: method of _WKInspectorExtensionDelegate
to fire.

  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm:

(resetGlobalState):
(-[InspectorExtensionDelegateForTesting inspectorExtension:inspectedPageDidNavigate:]):
(TEST):

5:41 PM Changeset in webkit [283856] by Jonathan Bedard
  • 2 edits in trunk

Add github username for Michael Catanzaro

Unreviewed.

  • metadata/contributors.json:
5:41 PM Changeset in webkit [283855] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Vectorize EqualPowerPanner::pan()
https://bugs.webkit.org/show_bug.cgi?id=231458

Reviewed by Eric Carlson.

Vectorize EqualPowerPanner::pan() for performance. This is used by PannerNode.

  • platform/audio/EqualPowerPanner.cpp:

(WebCore::EqualPowerPanner::pan):

5:14 PM Changeset in webkit [283854] by Russell Epstein
  • 8 edits in branches/safari-612.2.9.0-branch/Source

Versioning.

WebKit-7612.2.9.0.7

5:01 PM Changeset in webkit [283853] by commit-queue@webkit.org
  • 2 edits in trunk

Add github username for kbr
https://bugs.webkit.org/show_bug.cgi?id=231462

Patch by Kenneth Russell <kbr@chromium.org> on 2021-10-08
Reviewed by Dean Jackson.

  • metadata/contributors.json:
4:32 PM Changeset in webkit [283852] by Tadeu Zagallo
  • 83 edits
    8 copies
    40 adds in trunk

Implement the WebAssembly exception handling proposal
https://bugs.webkit.org/show_bug.cgi?id=229681
<rdar://81603387>

JSTests:

Reviewed by Keith Miller.

Add new tests for the exception handling and import a set of tests used by V8 into wasm/v8.

  • wasm.yaml:
  • wasm/Builder.js:

(const._importExceptionContinuation.type.Import.field):
(export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
(const._exportFunctionContinuation.type.Export.field): Deleted.
(const._exportFunctionContinuation): Deleted.

  • wasm/Builder_WebAssemblyBinary.js:

(const.emitters.Import):
(const.emitters.Export):
(const.emitters.Exception):

  • wasm/assert.js:
  • wasm/self-test/test_BuilderJSON.js:

(ImportBeforeTypeSections): Deleted.

  • wasm/stress/catch-with-delegate.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.callback):
(assert.throws):

  • wasm/stress/create-tag-from.js: Added.
  • wasm/stress/exception-cross-instance-2.js: Added.

(test):
(assert.eq):

  • wasm/stress/exception-cross-instance-3.js: Added.

(test):
(assert.eq):

  • wasm/stress/exception-cross-instance.js: Added.

(test):
(assert.throws):
(instB.new.WebAssembly.Instance):

  • wasm/stress/exception-liveness-tier-up.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.catch):
(assert.eq.):
(assert.eq):

  • wasm/stress/exception-multiple-instances.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.const.module.new.WebAssembly.Module):
(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.inst.exports.throw):

  • wasm/stress/exception-simple-delegate.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.testSimpleThrowDelegate):
(testThrowDelegateSkip):
(testDelegateCaller):
(testSimpleDelegateMerge):

  • wasm/stress/exception-simple-throw-catch.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.testSimpleTryCatch):
(testSimpleTryCatchAll):
(testCallTryCatch):
(testCallTryCatchAll):
(testSimpleTryCatchValue):
(testCallTryCatchValue):
(testStackTryCatch):
(testLiveAfterTryCatch):
(testLiveAfterTryCatchAll):
(testUnifyTryCatchCatch):
(testUnifyTryCatchCatchAll):
(testUnifyTryNoThrow):
(testUnifyTryNoCatch):
(testNestedCatch):

  • wasm/stress/exception-thrown-from-js-to-wasm-catchall-rethrow.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.callback):

  • wasm/stress/exception-thrown-from-js-to-wasm-catchall.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.callback):

  • wasm/stress/exception-thrown-from-js-to-wasm.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.callback):

  • wasm/stress/exception-thrown-out-of-wasm.js: Added.
  • wasm/stress/exception-thrown-over-wasm.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.callback):

  • wasm/stress/exception-trap.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.testCannotCatchUnreachable):
(testCannotCatchOOB):
(testWasmAPIThrow):
(testJSCatchAndRethrow):

  • wasm/stress/rethrow-from-catch-to-catch.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.callback):

  • wasm/stress/rethrow-to-catch.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.callback):
(assert.throws.callback):
(assert.throws):

  • wasm/stress/rethrow-to-delegate-to-catch.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here):
(assert.eq.exn.getArg):
(assert.throws):
(assert.throws.callback):
(assert.eq):

  • wasm/stress/simple-export-exception.js: Added.
  • wasm/v8/LICENSE: Added.
  • wasm/v8/exceptions-api.js: Added.

(TestImport):
(TestImportExport):
(TestExceptionConstructor):
(TestExceptionConstructorWithPayload):
(TestCatchJSException.js_func):
(js_func):
(TestCatchJS):
(TestCatchJSExceptionWithPayload):
(TestGetArg):

  • wasm/v8/exceptions-export.js: Added.

(TestExportMultiple):
(TestExportOutOfBounds):

  • wasm/v8/exceptions-externref.js: Added.

(TestThrowRefNull):
(TestThrowRefParam):

  • wasm/v8/exceptions-import.js: Added.

(NewExportedTag):
(TestImportSimple):
(TestImportMissing):

  • wasm/v8/exceptions-rethrow.js: Added.

(TestRethrowInCatch):
(TestRethrowInCatchAll):
(TestRethrowNested):
(TestRethrowRecatch):

  • wasm/v8/exceptions-shared.js: Added.

(NewExportedException):
(TestSingleInstance.let.instance.builder.instantiate.):
(TestSingleInstance):
(TestMultiInstanceNonShared.let.instance2.builder.instantiate.):
(TestMultiInstanceShared.let.instance2.builder.instantiate.):
(TestMultiModuleShared.let.instance2.builder2.instantiate.):

  • wasm/v8/exceptions-type-reflection.js: Added.

(TestExport):
(TestImportExport):

  • wasm/v8/exceptions-utils.js: Added.

(assertWasmThrows):

  • wasm/v8/exceptions.js: Added.

(TestThrowSimple):
(TestCatchSimple):
(TestTrapNotCaught):
(TestTrapViaJSNotCaught.js_import):
(TestManuallyThrownRuntimeErrorCaught.throw_exc):
(TestManuallyThrownRuntimeErrorCaught):
(TestExnWithWasmProtoNotCaught.js_import):
(TestExnWithWasmProtoNotCaught):
(TestStackOverflowNotCaught.stack_overflow):
(TestStackOverflowNotCaught):
(TestThrowParamI):
(TestThrowParamF):
(TestThrowParamL):
(TestThrowParamD):
(TestCatchCrossFunctions.throw_value):
(TestCatchCrossFunctions.throw_string):
(TestCatchCrossFunctions.throw_undefined):
(TestCatchCrossFunctions.throw_fp):
(TestCatchCrossFunctions.throw_large):
(TestDelegateNoThrow):
(TestDelegateThrow):
(TestDelegateThrowNoCatch):
(TestDelegateMerge):
(TestDelegate1):
(TestDelegateUnreachable):
(TestDelegateToCaller):
(TestUnreachableInCatchAll):
(TestThrowWithLocal):
(TestCatchlessTry):

  • wasm/v8/mjsunit.js: Added.

(MjsUnitAssertionError):
(MjsUnitAssertionError.prototype.toString):
(catch):
(classOf):
(ValueOf):
(prettyPrinted):
(prettyPrintedArrayElement):
(failWithMessage):
(formatFailureText):
(fail):
(deepObjectEquals):
(deepEquals):
(assertSame):
(assertNotSame):
(assertEquals):
(assertNotEquals):
(assertEqualsDelta):
(assertArrayEquals):
(assertPropertiesEqual):
(assertToStringEquals):
(assertTrue):
(assertFalse):
(assertNull):
(assertNotNull):
(executeCode):
(checkException):
(assertThrows):
(assertThrowsEquals):
(assertThrowsAsync):
(assertInstanceof):
(assertDoesNotThrow):
(assertUnreachable):
(assertContains):
(assertMatches):
(concatenateErrors):
(assertPromiseResult):
(OptimizationStatus):
(assertUnoptimized):
(assertOptimized):
(isNeverOptimizeLiteMode):
(isNeverOptimize):
(isAlwaysOptimize):
(isInterpreted):
(isBaseline):
(isUnoptimized):
(isOptimized):
(isTurboFanned):
(MjsUnitAssertionError.prepareStackTrace):

  • wasm/v8/wasm-module-builder.js: Added.

(bytes):
(wasmOptRefType):
(wasmRefType):
(wasmRtt):
(wasmRttNoDepth):
(makeSig):
(makeSig_v_x):
(makeSig_x_v):
(makeSig_v_xx):
(makeSig_r_v):
(makeSig_r_x):
(makeSig_r_xx):
(defineWasmOpcode):
(assertTraps):
(Binary):
(Binary.prototype.ensure_space):
(Binary.prototype.trunc_buffer):
(Binary.prototype.reset):
(Binary.prototype.emit_u8):
(Binary.prototype.emit_u16):
(Binary.prototype.emit_u32):
(Binary.prototype.emit_leb_u):
(Binary.prototype.emit_u32v):
(Binary.prototype.emit_u64v):
(Binary.prototype.emit_bytes):
(Binary.prototype.emit_string):
(Binary.prototype.emit_heap_type):
(Binary.prototype.emit_type):
(Binary.prototype.emit_init_expr_recursive):
(Binary.prototype.emit_init_expr):
(Binary.prototype.emit_header):
(Binary.prototype.emit_section):
(WasmFunctionBuilder):
(WasmFunctionBuilder.prototype.numLocalNames):
(WasmFunctionBuilder.prototype.exportAs):
(WasmFunctionBuilder.prototype.exportFunc):
(WasmFunctionBuilder.prototype.setCompilationHint):
(WasmFunctionBuilder.prototype.addBody):
(WasmFunctionBuilder.prototype.addBodyWithEnd):
(WasmFunctionBuilder.prototype.getNumLocals):
(WasmFunctionBuilder.prototype.addLocals):
(WasmFunctionBuilder.prototype.end):
(WasmInitExpr.I32Const):
(WasmInitExpr.I64Const):
(WasmInitExpr.F32Const):
(WasmInitExpr.F64Const):
(WasmInitExpr.S128Const):
(WasmInitExpr.GlobalGet):
(WasmInitExpr.RefFunc):
(WasmInitExpr.RefNull):
(WasmInitExpr.StructNewWithRtt):
(WasmInitExpr.StructNew):
(WasmInitExpr.StructNewDefaultWithRtt):
(WasmInitExpr.StructNewDefault):
(WasmInitExpr.ArrayInit):
(WasmInitExpr.ArrayInitStatic):
(WasmInitExpr.RttCanon):
(WasmInitExpr.RttSub):
(WasmInitExpr.RttFreshSub):
(WasmInitExpr.defaultFor):
(WasmInitExpr):
(WasmGlobalBuilder):
(WasmGlobalBuilder.prototype.exportAs):
(WasmTableBuilder):
(WasmTableBuilder.prototype.exportAs):
(makeField):
(WasmStruct):
(WasmStructSubtype):
(WasmArray):
(WasmArraySubtype):
(WasmElemSegment):
(WasmElemSegment.prototype.is_active):
(WasmElemSegment.prototype.is_passive):
(WasmElemSegment.prototype.is_declarative):
(WasmElemSegment.prototype.expressions_as_elements):
(WasmModuleBuilder):
(WasmModuleBuilder.prototype.addStart):
(WasmModuleBuilder.prototype.addMemory):
(WasmModuleBuilder.prototype.addMemory64):
(WasmModuleBuilder.prototype.addExplicitSection):
(WasmModuleBuilder.prototype.stringToBytes):
(WasmModuleBuilder.prototype.createCustomSection):
(WasmModuleBuilder.prototype.addCustomSection):
(WasmModuleBuilder.prototype.addType):
(WasmModuleBuilder.prototype.addStruct):
(WasmModuleBuilder.prototype.addStructSubtype):
(WasmModuleBuilder.prototype.addArray):
(WasmModuleBuilder.prototype.addArraySubtype):
(WasmModuleBuilder.prototype.addGlobal):
(WasmModuleBuilder.prototype.addTable):
(WasmModuleBuilder.prototype.addTag):
(WasmModuleBuilder.prototype.addFunction):
(WasmModuleBuilder.prototype.addImport):
(WasmModuleBuilder.prototype.addImportedGlobal):
(WasmModuleBuilder.prototype.addImportedMemory):
(WasmModuleBuilder.prototype.addImportedTable):
(WasmModuleBuilder.prototype.addImportedTag):
(WasmModuleBuilder.prototype.addExport):
(WasmModuleBuilder.prototype.addExportOfKind):
(WasmModuleBuilder.prototype.setCompilationHint):
(WasmModuleBuilder.prototype.addDataSegment):
(WasmModuleBuilder.prototype.addPassiveDataSegment):
(WasmModuleBuilder.prototype.exportMemoryAs):
(WasmModuleBuilder.prototype.addActiveElementSegment):
(WasmModuleBuilder.prototype.addPassiveElementSegment):
(WasmModuleBuilder.prototype.addDeclarativeElementSegment):
(WasmModuleBuilder.prototype.appendToTable):
(WasmModuleBuilder.prototype.setTableBounds):
(WasmModuleBuilder.prototype.setName):
(WasmModuleBuilder.prototype.toBuffer):
(WasmModuleBuilder.prototype.toArray):
(WasmModuleBuilder.prototype.instantiate):
(WasmModuleBuilder.prototype.asyncInstantiate):
(WasmModuleBuilder.prototype.toModule):
(wasmSignedLeb):
(wasmUnsignedLeb):
(wasmI32Const):
(wasmI64Const):
(wasmF32Const):
(wasmF64Const):
(wasmS128Const):
(getOpcodeName):

  • wasm/wasm.json:

Source/JavaScriptCore:

Reviewed by Keith Miller.

Add support for the WebAssembly exception handling proposal, as per
the WIP spec: https://github.com/WebAssembly/exception-handling

The proposal includes 6 new instructions: try, catch, catch_all,
delegate, throw and rethrow. All the instructions are supported by
the LLInt and B3 generators, but not yet supported in Air. Any
functions use exceptions will use B3 in BBQ.

A few important notes about the implementation:

  • In B3, since we can now have multiple entrypoints (one for the

function entry + 1 for each catch/catch_all), we can no longer just
replace every value in the stack with a Phi when we find a new
entrypoint. This worked so far because of the assumption that any
block couldn't access its enclosing stack, and since the enclosing stack
would only be accessible when we exited the current block, we added Phis
at the end of each block when we had a new entrypoint. Now, since we have to capture all
live values at any point that might throw (calls, throw and rethrow),
we break that assumption. To simplify all the possible ways we might
have to merge the state from multiple entrypoints we now use B3
Variables to represent stack slots.

  • Some extra information is required to be able to properly restore

the state when catching an exception:

  • We added a field VM::calleeForWasmCatch. This field is necessary because whenever we throw, we might end up in JavaScript, which assumes the callee is a cell and uses it to get the VM and restore callee saves. The issue is when catching exceptions in wasm we still need the original callee, and if throwing and catching from the same frame, that call frame slot has now been overwritten, so we store its original value in the VM field.
  • We also need to store the current Wasm Instance into the call frame's slot for the this argument. The instance is used both by the unwinder, to check if the exception being thrown matches the exceptions handled by catch candidates, and by the catch implementation, which is necessary when throwing from a cross instance call where both the callee save or TLS will have the callee's instance.
  • We store the current opcode for the llint, or the call site index for B3, in the call frame slot for the argument count tag. The call site index is used by the unwinder to check if a given catch can handle the exception being thrown.
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/BytecodeList.rb:
  • bytecode/HandlerInfo.h:
  • bytecode/Instruction.h:

(JSC::BaseInstruction::name const):

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::bytecodeIndex const):

  • interpreter/CallFrame.h:

(JSC::CallSiteIndex::CallSiteIndex):
(JSC::CallSiteIndex::hash const):
(JSC::CallSiteIndex::deletedValue):
(JSC::CallSiteIndex::isHashTableDeletedValue const):
(JSC::CallSiteIndexHash::hash):
(JSC::CallSiteIndexHash::equal):

  • interpreter/Interpreter.cpp:

(JSC::CatchInfo::CatchInfo):
(JSC::UnwindFunctor::UnwindFunctor):
(JSC::UnwindFunctor::operator() const):
(JSC::Interpreter::unwind):

  • interpreter/Interpreter.h:

(JSC::CatchInfo::CatchInfo):

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::readNonInlinedFrame):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::restoreCalleeSavesFromEntryFrameCalleeSavesBuffer):
(JSC::AssemblyHelpers::restoreCalleeSavesFromVMEntryFrameCalleeSavesBuffer):
(JSC::AssemblyHelpers::restoreCalleeSavesFromVMEntryFrameCalleeSavesBufferImpl):

  • jit/AssemblyHelpers.h:
  • jit/JITExceptions.cpp:

(JSC::genericUnwind):

  • jit/JSInterfaceJIT.h:

(JSC::JSInterfaceJIT::convertCalleeToVM):

  • llint/LLIntData.h:

(JSC::LLInt::getCodeRef):
(JSC::LLInt::getWide16CodeRef):
(JSC::LLInt::getWide32CodeRef):

  • llint/LLIntExceptions.cpp:

(JSC::LLInt::wasmReturnToThrow):
(JSC::LLInt::handleWasmCatch):
(JSC::LLInt::handleWasmCatchAll):

  • llint/LLIntExceptions.h:
  • llint/LLIntOffsetsExtractor.cpp:
  • llint/WebAssembly.asm:
  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::ErrorInstance):

  • runtime/ErrorInstance.h:

(JSC::ErrorInstance::setCatchableFromWasm):
(JSC::ErrorInstance::isCatchableFromWasm const):

  • runtime/JSGlobalObject.cpp:
  • runtime/JSGlobalObject.h:
  • runtime/OptionsList.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:

(JSC::VM::calleeForWasmCatchOffset):

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::ControlData::isTry):
(JSC::Wasm::AirIRGenerator::ControlData::isCatch):
(JSC::Wasm::AirIRGenerator::ControlData::isAnyCatch):
(JSC::Wasm::AirIRGenerator::ControlData::isLoop):
(JSC::Wasm::AirIRGenerator::ControlData::isBlock):
(JSC::Wasm::AirIRGenerator::ControlData::dump const):
(JSC::Wasm::AirIRGenerator::addTry):
(JSC::Wasm::AirIRGenerator::addCatch):
(JSC::Wasm::AirIRGenerator::addCatchToUnreachable):
(JSC::Wasm::AirIRGenerator::addCatchAll):
(JSC::Wasm::AirIRGenerator::addCatchAllToUnreachable):
(JSC::Wasm::AirIRGenerator::addDelegate):
(JSC::Wasm::AirIRGenerator::addDelegateToUnreachable):
(JSC::Wasm::AirIRGenerator::addThrow):
(JSC::Wasm::AirIRGenerator::addRethrow):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::ControlData::ControlData):
(JSC::Wasm::B3IRGenerator::ControlData::isTry):
(JSC::Wasm::B3IRGenerator::ControlData::isAnyCatch):
(JSC::Wasm::B3IRGenerator::ControlData::isLoop):
(JSC::Wasm::B3IRGenerator::ControlData::isBlock):
(JSC::Wasm::B3IRGenerator::ControlData::isCatch):
(JSC::Wasm::B3IRGenerator::ControlData::dump const):
(JSC::Wasm::B3IRGenerator::ControlData::convertTryToCatch):
(JSC::Wasm::B3IRGenerator::ControlData::convertTryToCatchAll):
(JSC::Wasm::B3IRGenerator::ControlData::tryStart const):
(JSC::Wasm::B3IRGenerator::ControlData::tryEnd const):
(JSC::Wasm::B3IRGenerator::ControlData::tryDepth const):
(JSC::Wasm::B3IRGenerator::ControlData::catchKind const):
(JSC::Wasm::B3IRGenerator::ControlData::exception const):
(JSC::Wasm::B3IRGenerator::ControlData::stackSize const):
(JSC::Wasm::B3IRGenerator::didPopValueFromStack):
(JSC::Wasm::B3IRGenerator::addStackMap):
(JSC::Wasm::B3IRGenerator::takeStackmaps):
(JSC::Wasm::B3IRGenerator::takeExceptionHandlers):
(JSC::Wasm::B3IRGenerator::push):
(JSC::Wasm::B3IRGenerator::get):
(JSC::Wasm::B3IRGenerator::set):
(JSC::Wasm::PatchpointExceptionHandle::generate const):
(JSC::Wasm::B3IRGenerator::fixupPointerPlusOffset):
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::restoreWebAssemblyGlobalState):
(JSC::Wasm::B3IRGenerator::insertEntrySwitch):
(JSC::Wasm::B3IRGenerator::insertConstants):
(JSC::Wasm::B3IRGenerator::addRefIsNull):
(JSC::Wasm::B3IRGenerator::addTableGet):
(JSC::Wasm::B3IRGenerator::addTableSet):
(JSC::Wasm::B3IRGenerator::addRefFunc):
(JSC::Wasm::B3IRGenerator::addTableInit):
(JSC::Wasm::B3IRGenerator::addTableSize):
(JSC::Wasm::B3IRGenerator::addTableGrow):
(JSC::Wasm::B3IRGenerator::addTableFill):
(JSC::Wasm::B3IRGenerator::addTableCopy):
(JSC::Wasm::B3IRGenerator::getLocal):
(JSC::Wasm::B3IRGenerator::emitIndirectCall):
(JSC::Wasm::B3IRGenerator::addGrowMemory):
(JSC::Wasm::B3IRGenerator::addCurrentMemory):
(JSC::Wasm::B3IRGenerator::addMemoryFill):
(JSC::Wasm::B3IRGenerator::addMemoryInit):
(JSC::Wasm::B3IRGenerator::addMemoryCopy):
(JSC::Wasm::B3IRGenerator::setLocal):
(JSC::Wasm::B3IRGenerator::getGlobal):
(JSC::Wasm::B3IRGenerator::setGlobal):
(JSC::Wasm::B3IRGenerator::emitCheckAndPreparePointer):
(JSC::Wasm::B3IRGenerator::emitLoadOp):
(JSC::Wasm::B3IRGenerator::load):
(JSC::Wasm::B3IRGenerator::emitStoreOp):
(JSC::Wasm::B3IRGenerator::store):
(JSC::Wasm::B3IRGenerator::sanitizeAtomicResult):
(JSC::Wasm::B3IRGenerator::fixupPointerPlusOffsetForAtomicOps):
(JSC::Wasm::B3IRGenerator::emitAtomicLoadOp):
(JSC::Wasm::B3IRGenerator::atomicLoad):
(JSC::Wasm::B3IRGenerator::emitAtomicStoreOp):
(JSC::Wasm::B3IRGenerator::atomicStore):
(JSC::Wasm::B3IRGenerator::emitAtomicBinaryRMWOp):
(JSC::Wasm::B3IRGenerator::atomicBinaryRMW):
(JSC::Wasm::B3IRGenerator::emitAtomicCompareExchange):
(JSC::Wasm::B3IRGenerator::atomicCompareExchange):
(JSC::Wasm::B3IRGenerator::atomicWait):
(JSC::Wasm::B3IRGenerator::atomicNotify):
(JSC::Wasm::B3IRGenerator::truncSaturated):
(JSC::Wasm::B3IRGenerator::addSelect):
(JSC::Wasm::B3IRGenerator::addConstant):
(JSC::Wasm::B3IRGenerator::emitLoopTierUpCheck):
(JSC::Wasm::B3IRGenerator::loadFromScratchBuffer):
(JSC::Wasm::B3IRGenerator::connectControlEntry):
(JSC::Wasm::B3IRGenerator::addLoop):
(JSC::Wasm::B3IRGenerator::addTopLevel):
(JSC::Wasm::B3IRGenerator::addBlock):
(JSC::Wasm::B3IRGenerator::addIf):
(JSC::Wasm::B3IRGenerator::addElse):
(JSC::Wasm::B3IRGenerator::addElseToUnreachable):
(JSC::Wasm::B3IRGenerator::addTry):
(JSC::Wasm::B3IRGenerator::addCatch):
(JSC::Wasm::B3IRGenerator::preparePatchpointForExceptions):
(JSC::Wasm::B3IRGenerator::addCatchToUnreachable):
(JSC::Wasm::B3IRGenerator::addCatchAll):
(JSC::Wasm::B3IRGenerator::addCatchAllToUnreachable):
(JSC::Wasm::B3IRGenerator::emitCatchImpl):
(JSC::Wasm::B3IRGenerator::addDelegate):
(JSC::Wasm::B3IRGenerator::addDelegateToUnreachable):
(JSC::Wasm::B3IRGenerator::addThrow):
(JSC::Wasm::B3IRGenerator::addRethrow):
(JSC::Wasm::B3IRGenerator::addReturn):
(JSC::Wasm::B3IRGenerator::addBranch):
(JSC::Wasm::B3IRGenerator::addSwitch):
(JSC::Wasm::B3IRGenerator::endBlock):
(JSC::Wasm::B3IRGenerator::addEndToUnreachable):
(JSC::Wasm::B3IRGenerator::createCallPatchpoint):
(JSC::Wasm::B3IRGenerator::addCall):
(JSC::Wasm::B3IRGenerator::addCallIndirect):
(JSC::Wasm::B3IRGenerator::addCallRef):
(JSC::Wasm::B3IRGenerator::unify):
(JSC::Wasm::B3IRGenerator::unifyValuesWithBlock):
(JSC::Wasm::parseAndCompile):
(JSC::Wasm::computeExceptionHandlerLocations):
(JSC::Wasm::B3IRGenerator::emitChecksForModOrDiv):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32DivS>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32RemS>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32DivU>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32RemU>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64DivS>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64RemS>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64DivU>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64RemU>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32Ctz>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64Ctz>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32Popcnt>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64Popcnt>):
(JSC::Wasm::B3IRGenerator::addOp<F64ConvertUI64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F32ConvertUI64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F64Nearest>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F32Nearest>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F64Trunc>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F32Trunc>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncSF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncSF32>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncUF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32TruncUF32>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncSF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncUF64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncSF32>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64TruncUF32>):

  • wasm/WasmB3IRGenerator.h:
  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::prepareImpl):
(JSC::Wasm::BBQPlan::work):
(JSC::Wasm::BBQPlan::compileFunction):
(JSC::Wasm::BBQPlan::didCompleteCompilation):
(JSC::Wasm::BBQPlan::initializeCallees):

  • wasm/WasmBBQPlan.h:
  • wasm/WasmCallee.cpp:

(JSC::Wasm::Callee::handlerForIndex):
(JSC::Wasm::LLIntCallee::LLIntCallee):
(JSC::Wasm::LLIntCallee::linkExceptionHandlers):
(JSC::Wasm::OptimizingJITCallee::linkExceptionHandlers):
(JSC::Wasm::OptimizingJITCallee::stackmap const):

  • wasm/WasmCallee.h:

(JSC::Wasm::Callee::hasExceptionHandlers const):
(JSC::Wasm::Callee::functionCodeBlock const):
(JSC::Wasm::OptimizingJITCallee::OptimizingJITCallee):

  • wasm/WasmCallingConvention.h:

(JSC::Wasm::WasmCallingConvention::callInformationFor const):

  • wasm/WasmFormat.h:

(JSC::Wasm::typeToString):
(JSC::Wasm::isValidExternalKind):
(JSC::Wasm::makeString):

  • wasm/WasmFunctionCodeBlock.h:

(JSC::Wasm::FunctionCodeBlock::numberOfExceptionHandlers const):
(JSC::Wasm::FunctionCodeBlock::exceptionHandler):
(JSC::Wasm::FunctionCodeBlock::addExceptionHandler):

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::isTryOrCatch):
(JSC::Wasm::FunctionParser<Context>::parseExceptionIndex):
(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):

  • wasm/WasmHandlerInfo.cpp: Added.

(JSC::Wasm::HandlerInfo::initialize):
(JSC::Wasm::HandlerInfo::handlerForIndex):

  • wasm/WasmHandlerInfo.h: Added.

(JSC::Wasm::UnlinkedHandlerInfo::UnlinkedHandlerInfo):
(JSC::Wasm::HandlerInfo::tag const):
(JSC::Wasm::HandlerInfo::delegateTarget const):

  • wasm/WasmInstance.cpp:

(JSC::Wasm::Instance::~Instance):

  • wasm/WasmInstance.h:

(JSC::Wasm::Instance::addTag):
(JSC::Wasm::Instance::tag const):

  • wasm/WasmLLIntGenerator.cpp:

(JSC::Wasm::LLIntGenerator::ControlType::try_):
(JSC::Wasm::LLIntGenerator::ControlType::catch_):
(JSC::Wasm::LLIntGenerator::ControlType::isLoop):
(JSC::Wasm::LLIntGenerator::ControlType::isBlock):
(JSC::Wasm::LLIntGenerator::ControlType::isIf):
(JSC::Wasm::LLIntGenerator::ControlType::isTry):
(JSC::Wasm::LLIntGenerator::ControlType::isAnyCatch):
(JSC::Wasm::LLIntGenerator::ControlType::isCatch):
(JSC::Wasm::LLIntGenerator::unifyValuesWithBlock):
(JSC::Wasm::LLIntGenerator::walkExpressionStack):
(JSC::Wasm::LLIntGenerator::materializeConstantsAndLocals):
(JSC::Wasm::parseAndCompileBytecode):
(JSC::Wasm::LLIntGenerator::LLIntGenerator):
(JSC::Wasm::LLIntGenerator::repatch):
(JSC::Wasm::LLIntGenerator::finalize):
(JSC::Wasm::LLIntGenerator::callInformationForCaller):
(JSC::Wasm::LLIntGenerator::callInformationForCallee):
(JSC::Wasm::LLIntGenerator::addArguments):
(JSC::Wasm::LLIntGenerator::addLoop):
(JSC::Wasm::LLIntGenerator::addTry):
(JSC::Wasm::LLIntGenerator::finalizePreviousBlockForCatch):
(JSC::Wasm::LLIntGenerator::addCatch):
(JSC::Wasm::LLIntGenerator::addCatchToUnreachable):
(JSC::Wasm::LLIntGenerator::addCatchAll):
(JSC::Wasm::LLIntGenerator::addCatchAllToUnreachable):
(JSC::Wasm::LLIntGenerator::addDelegate):
(JSC::Wasm::LLIntGenerator::addDelegateToUnreachable):
(JSC::Wasm::LLIntGenerator::addThrow):
(JSC::Wasm::LLIntGenerator::addRethrow):
(JSC::Wasm::LLIntGenerator::endBlock):
(JSC::Wasm::LLIntGenerator::addEndToUnreachable):

  • wasm/WasmLLIntGenerator.h:
  • wasm/WasmLimits.h:
  • wasm/WasmModuleInformation.cpp:
  • wasm/WasmModuleInformation.h:

(JSC::Wasm::ModuleInformation::exceptionIndexSpaceSize const):
(JSC::Wasm::ModuleInformation::isImportedExceptionFromExceptionIndexSpace const):
(JSC::Wasm::ModuleInformation::signatureIndexFromExceptionIndexSpace const):
(JSC::Wasm::ModuleInformation::importExceptionCount const):
(JSC::Wasm::ModuleInformation::isDeclaredException const):
(JSC::Wasm::ModuleInformation::addDeclaredException):

  • wasm/WasmOMGForOSREntryPlan.cpp:

(JSC::Wasm::OMGForOSREntryPlan::work):

  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

  • wasm/WasmOSREntryData.h:

(JSC::Wasm::OSREntryData::values):

  • wasm/WasmOperations.cpp:

(JSC::Wasm::loadValuesIntoBuffer):
(JSC::Wasm::doOSREntry):
(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):

  • wasm/WasmOperations.h:
  • wasm/WasmSectionParser.cpp:

(JSC::Wasm::SectionParser::parseImport):
(JSC::Wasm::SectionParser::parseExport):
(JSC::Wasm::SectionParser::parseException):

  • wasm/WasmSections.h:

(JSC::Wasm::validateOrder):

  • wasm/WasmSignature.cpp:

(JSC::Wasm::SignatureInformation::SignatureInformation):
(JSC::Wasm::SignatureInformation::signatureFor):

  • wasm/WasmSlowPaths.cpp:

(JSC::LLInt::WASM_SLOW_PATH_DECL):

  • wasm/WasmSlowPaths.h:
  • wasm/WasmStreamingParser.cpp:

(JSC::Wasm::StreamingParser::parseCodeSectionSize):

  • wasm/WasmTag.cpp: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyRuntimeError.h.
  • wasm/WasmTag.h: Copied from Source/JavaScriptCore/wasm/WasmLLIntGenerator.h.

(JSC::Wasm::Tag::create):
(JSC::Wasm::Tag::parameterCount const):
(JSC::Wasm::Tag::parameter const):
(JSC::Wasm::Tag::operator== const):
(JSC::Wasm::Tag::operator!= const):
(JSC::Wasm::Tag::signature const):
(JSC::Wasm::Tag::Tag):

  • wasm/WasmThunks.cpp:
  • wasm/WasmThunks.h:
  • wasm/generateWasmB3IRGeneratorInlinesHeader.py:

(CodeGenerator.generateOpcode):
(CodeGenerator.makeResult):
(CodeGenerator.generate):

  • wasm/generateWasmOpsHeader.py:

(typeMacroizer):

  • wasm/js/JSWebAssembly.cpp:
  • wasm/js/JSWebAssemblyException.cpp: Added.

(JSC::JSWebAssemblyException::JSWebAssemblyException):
(JSC::JSWebAssemblyException::finishCreation):
(JSC::JSWebAssemblyException::visitChildrenImpl):
(JSC::JSWebAssemblyException::destroy):
(JSC::JSWebAssemblyException::getArg const):

  • wasm/js/JSWebAssemblyException.h: Added.

(JSC::JSWebAssemblyException::subspaceFor):
(JSC::JSWebAssemblyException::createStructure):
(JSC::JSWebAssemblyException::create):
(JSC::JSWebAssemblyException::tag const):
(JSC::JSWebAssemblyException::payload const):

  • wasm/js/JSWebAssemblyHelpers.h:

(JSC::toJSValue):
(JSC::fromJSValue):

  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::tryCreate):

  • wasm/js/JSWebAssemblyInstance.h:
  • wasm/js/JSWebAssemblyRuntimeError.cpp:

(JSC::createJSWebAssemblyRuntimeError):

  • wasm/js/JSWebAssemblyRuntimeError.h:
  • wasm/js/JSWebAssemblyTag.cpp: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyRuntimeError.cpp.

(JSC::JSWebAssemblyTag::create):
(JSC::JSWebAssemblyTag::createStructure):
(JSC::JSWebAssemblyTag::JSWebAssemblyTag):

  • wasm/js/JSWebAssemblyTag.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyRuntimeError.h.
  • wasm/js/WasmToJS.cpp:

(JSC::Wasm::wasmToJS):

  • wasm/js/WebAssemblyExceptionConstructor.cpp: Added.

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::WebAssemblyExceptionConstructor::create):
(JSC::WebAssemblyExceptionConstructor::createStructure):
(JSC::WebAssemblyExceptionConstructor::finishCreation):
(JSC::WebAssemblyExceptionConstructor::WebAssemblyExceptionConstructor):

  • wasm/js/WebAssemblyExceptionConstructor.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyRuntimeError.h.
  • wasm/js/WebAssemblyExceptionPrototype.cpp: Added.

(JSC::WebAssemblyExceptionPrototype::create):
(JSC::WebAssemblyExceptionPrototype::createStructure):
(JSC::WebAssemblyExceptionPrototype::finishCreation):
(JSC::WebAssemblyExceptionPrototype::WebAssemblyExceptionPrototype):
(JSC::getException):
(JSC::getTag):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyExceptionPrototype.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyRuntimeError.h.
  • wasm/js/WebAssemblyFunction.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::linkImpl):

  • wasm/js/WebAssemblyTagConstructor.cpp: Added.

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::WebAssemblyTagConstructor::createTag):
(JSC::WebAssemblyTagConstructor::create):
(JSC::WebAssemblyTagConstructor::createStructure):
(JSC::WebAssemblyTagConstructor::finishCreation):
(JSC::WebAssemblyTagConstructor::WebAssemblyTagConstructor):

  • wasm/js/WebAssemblyTagConstructor.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyRuntimeError.h.
  • wasm/js/WebAssemblyTagPrototype.cpp: Added.

(JSC::WebAssemblyTagPrototype::create):
(JSC::WebAssemblyTagPrototype::createStructure):
(JSC::WebAssemblyTagPrototype::finishCreation):
(JSC::WebAssemblyTagPrototype::WebAssemblyTagPrototype):
(JSC::getTag):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/js/WebAssemblyTagPrototype.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyRuntimeError.h.
  • wasm/wasm.json:

Tools:

Reviewed by Keith Miller.

  • Scripts/run-jsc-stress-tests:
4:31 PM Changeset in webkit [283851] by jer.noble@apple.com
  • 355 edits
    20 copies
    1 add in trunk

[Build-time perf] Forward-declare more things in Element.h
https://bugs.webkit.org/show_bug.cgi?id=231283

Reviewed by Myles C. Maxfield.

Source/JavaScriptCore:

Add two new forwarding headers: one for Strong, and as a dependency, one for Handle.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • heap/Handle.h:
  • heap/HandleForward.h: Copied from Source/JavaScriptCore/runtime/Forward.h.
  • heap/Strong.h:
  • heap/StrongForward.h: Copied from Source/JavaScriptCore/runtime/Forward.h.
  • runtime/Forward.h:

Source/WebCore:

Replace as many #includes as possible with forward type declarations. To do so, split out the inline function
definitions into their own ElementInlines.h header.

Move MediaKeyMessageEventInit into its own .idl to allow the bindings generator code to include
the two files separately, and to allow MediaKeyMessageEventInit to be forward-declared in MediaKeyMessageEvent.h.

Move Event's enums into their own EventOptions.h header that allows those enums to be forward declared.

Move ScrollExtents into its own ScrollExtents.h header, so that ScrollTypes.h can be freely #included without
pulling in geometry and math headers.

Modify some of the parameters to methods in HTMLMediaElement.h to be passed by reference or r-value reference,
allowing those types to be forward-declared.

Because the SVG and RenderSVG classes rely on ElementInlines.h, their inline methods must be inlined
as well, to ensure ElementInlines.h doesn't leak out into header includes generally.

With these changes in place, the net cost of Element.h during a typical build has gone from ~750s to ~57s.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Headers.cmake:
  • Modules/encryptedmedia/MediaKeyMessageEvent.cpp:

(WebCore::MediaKeyMessageEvent::message const):

  • Modules/encryptedmedia/MediaKeyMessageEvent.h:
  • Modules/encryptedmedia/MediaKeyMessageEvent.idl:
  • Modules/encryptedmedia/MediaKeyMessageEventInit.idl: Added.
  • Modules/encryptedmedia/MediaKeyMessageType.idl: Added.
  • Modules/encryptedmedia/MediaKeySession.cpp:
  • Modules/entriesapi/HTMLInputElementEntriesAPI.cpp:
  • Modules/highlight/AppHighlightStorage.cpp:
  • Modules/model-element/HTMLModelElement.cpp:
  • Modules/remoteplayback/RemotePlayback.cpp:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • accessibility/AccessibilityListBoxOption.cpp:
  • accessibility/AccessibilityRenderObject.cpp:
  • accessibility/AccessibilitySVGElement.cpp:
  • accessibility/AccessibilitySVGRoot.cpp:
  • accessibility/atk/WebKitAccessible.cpp:
  • bindings/js/JSNodeCustom.h:
  • bindings/scripts/CodeGenerator.pm:

(GetterExpression):

  • bindings/scripts/test/JS/JSTestCEReactions.cpp:
  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • css/CSSCursorImageValue.cpp:
  • css/CSSFontFaceSource.cpp:
  • css/CSSStyleSheet.cpp:
  • css/SelectorChecker.cpp:
  • dom/ContainerNode.cpp:
  • dom/DataTransferMac.mm:
  • dom/DatasetDOMStringMap.cpp:
  • dom/Document.cpp:
  • dom/DocumentInlines.h: Added.

(WebCore::Document::textEncoding const):
(WebCore::Document::templateDocument const):
(WebCore::Document::existingAXObjectCache const):
(WebCore::Document::create):
(WebCore::Document::invalidateAccessKeyCache):
(WebCore::Node::scriptExecutionContext const):

  • dom/Element.cpp:
  • dom/Element.h:

(WebCore::Element::attributesIterator const): Deleted.
(WebCore::Element::findAttributeIndexByName const): Deleted.
(WebCore::Node::hasAttributes const): Deleted.
(WebCore::Node::attributes const): Deleted.
(WebCore::Node::parentElement const): Deleted.
(WebCore::Element::rootElement const): Deleted.
(WebCore::Element::hasAttributeWithoutSynchronization const): Deleted.
(WebCore::Element::attributeWithoutSynchronization const): Deleted.
(WebCore::Element::hasAttributesWithoutUpdate const): Deleted.
(WebCore::Element::idForStyleResolution const): Deleted.
(WebCore::Element::getIdAttribute const): Deleted.
(WebCore::Element::getNameAttribute const): Deleted.
(WebCore::Element::setIdAttribute): Deleted.
(WebCore::Element::classNames const): Deleted.
(WebCore::Element::attributeCount const): Deleted.
(WebCore::Element::attributeAt const): Deleted.
(WebCore::Element::findAttributeByName const): Deleted.
(WebCore::Element::hasID const): Deleted.
(WebCore::Element::hasClass const): Deleted.
(WebCore::Element::hasName const): Deleted.
(WebCore::Element::ensureUniqueElementData): Deleted.
(WebCore::shouldIgnoreAttributeCase): Deleted.
(WebCore::Element::getAttribute const): Deleted.
(WebCore::isInTopLayerOrBackdrop): Deleted.

  • dom/ElementInlines.h: Added.

(WebCore::Element::attributesIterator const):
(WebCore::Element::findAttributeIndexByName const):
(WebCore::Node::hasAttributes const):
(WebCore::Node::attributes const):
(WebCore::Node::parentElement const):
(WebCore::Element::rootElement const):
(WebCore::Element::hasAttributeWithoutSynchronization const):
(WebCore::Element::attributeWithoutSynchronization const):
(WebCore::Element::hasAttributesWithoutUpdate const):
(WebCore::Element::idForStyleResolution const):
(WebCore::Element::getIdAttribute const):
(WebCore::Element::getNameAttribute const):
(WebCore::Element::setIdAttribute):
(WebCore::Element::classNames const):
(WebCore::Element::attributeCount const):
(WebCore::Element::attributeAt const):
(WebCore::Element::findAttributeByName const):
(WebCore::Element::hasID const):
(WebCore::Element::hasClass const):
(WebCore::Element::hasName const):
(WebCore::Element::ensureUniqueElementData):
(WebCore::shouldIgnoreAttributeCase):
(WebCore::Element::getAttribute const):
(WebCore::isInTopLayerOrBackdrop):

  • dom/ElementIterator.h:
  • dom/ElementIteratorAssertions.h:
  • dom/Event.h:
  • dom/EventOptions.h: Added.
  • dom/FullscreenManager.cpp:
  • dom/InlineClassicScript.cpp:
  • dom/InlineStyleSheetOwner.cpp:
  • dom/NamedNodeMap.cpp:
  • dom/Node.h:
  • dom/Position.cpp:
  • dom/Range.cpp:
  • dom/ScriptElement.cpp:
  • dom/ShadowRoot.cpp:
  • dom/SlotAssignment.cpp:
  • dom/StyledElement.cpp:
  • dom/StyledElement.h:
  • dom/Text.cpp:
  • dom/VisitedLinkState.cpp:
  • editing/Editing.cpp:
  • editing/EditingStyle.cpp:
  • editing/EditorCommand.cpp:
  • editing/FrameSelection.h:
  • editing/MarkupAccumulator.cpp:
  • editing/ModifySelectionListLevel.cpp:
  • editing/TextIterator.cpp:
  • editing/cocoa/HTMLConverter.mm:
  • editing/cocoa/WebContentReaderCocoa.mm:
  • editing/gtk/EditorGtk.cpp:
  • html/Autofill.cpp:
  • html/BaseTextInputType.cpp:
  • html/DateInputType.cpp:
  • html/DateTimeLocalInputType.cpp:
  • html/FeaturePolicy.cpp:
  • html/FormAssociatedElement.cpp:
  • html/HTMLAnchorElement.h:

(WebCore::HTMLAnchorElement::visitedLinkHash const): Deleted.

  • html/HTMLAnchorElementInlines.h: Added.

(WebCore::HTMLAnchorElement::visitedLinkHash const):

  • html/HTMLAreaElement.cpp:
  • html/HTMLAttachmentElement.cpp:
  • html/HTMLBaseElement.cpp:
  • html/HTMLBodyElement.cpp:
  • html/HTMLButtonElement.cpp:
  • html/HTMLCanvasElement.cpp:
  • html/HTMLCanvasElement.h:
  • html/HTMLElement.h:
  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::resultForDialogSubmit const):

  • html/HTMLFormControlElement.h:

(WebCore::HTMLFormControlElement::resultForDialogSubmit const): Deleted.

  • html/HTMLFrameElementBase.cpp:
  • html/HTMLFrameOwnerElement.cpp:
  • html/HTMLHtmlElement.cpp:
  • html/HTMLIFrameElement.cpp:
  • html/HTMLImageElement.h:
  • html/HTMLLinkElement.cpp:
  • html/HTMLMarqueeElement.cpp:
  • html/HTMLMediaElement.h:
  • html/HTMLMetaElement.cpp:
  • html/HTMLParamElement.cpp:
  • html/HTMLPlugInImageElement.cpp:
  • html/HTMLScriptElement.cpp:
  • html/HTMLSlotElement.cpp:
  • html/HTMLSourceElement.cpp:
  • html/HTMLTableCellElement.cpp:
  • html/HTMLTableColElement.cpp:
  • html/HTMLTrackElement.cpp:
  • html/HTMLVideoElement.cpp:
  • html/ImageInputType.cpp:
  • html/InputType.cpp:
  • html/MediaElementSession.cpp:
  • html/MonthInputType.cpp:
  • html/NumberInputType.cpp:
  • html/TextFieldInputType.cpp:
  • html/TimeInputType.cpp:
  • html/ValidationMessage.cpp:
  • html/WeekInputType.cpp:
  • html/parser/HTMLConstructionSite.cpp:
  • html/parser/HTMLConstructionSite.h:
  • html/parser/HTMLTreeBuilder.cpp:
  • html/track/DataCue.cpp:
  • html/track/InbandGenericTextTrack.cpp:
  • html/track/InbandTextTrack.cpp:
  • html/track/LoadableTextTrack.cpp:
  • html/track/TextTrackCue.cpp:
  • html/track/TextTrackCue.h:
  • html/track/VTTRegion.h:
  • html/track/WebVTTElement.cpp:
  • html/track/WebVTTParser.cpp:
  • inspector/InspectorOverlay.cpp:
  • inspector/InspectorStyleSheet.cpp:
  • inspector/agents/InspectorPageAgent.cpp:
  • loader/FormSubmission.cpp:
  • loader/FrameLoader.cpp:
  • loader/ImageLoader.cpp:
  • loader/cache/CachedImage.cpp:
  • loader/cache/CachedResourceLoader.cpp:
  • loader/cache/CachedResourceLoader.h:
  • loader/cache/CachedResourceRequest.h:
  • mathml/MathMLAnnotationElement.cpp:
  • mathml/MathMLElement.cpp:
  • mathml/MathMLFractionElement.cpp:
  • mathml/MathMLMencloseElement.cpp:
  • mathml/MathMLOperatorElement.cpp:
  • mathml/MathMLPresentationElement.cpp:
  • mathml/MathMLSelectElement.cpp:
  • page/CaptionUserPreferences.h:
  • page/DragController.cpp:
  • page/EventHandler.cpp:
  • page/Frame.cpp:
  • page/FrameView.cpp:
  • page/IntersectionObserver.h:
  • page/KeyboardScroll.h:
  • page/PageSerializer.cpp:
  • page/Quirks.cpp:
  • page/mac/ImageOverlayControllerMac.mm:
  • page/mac/PageMac.mm:
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:
  • page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp:
  • platform/ScrollAnimation.h:
  • platform/ScrollAnimationKinetic.cpp:
  • platform/ScrollAnimationSmooth.cpp:
  • platform/ScrollAnimator.cpp:
  • platform/ScrollAnimator.h:
  • platform/ScrollExtents.h: Added.

(WebCore::ScrollExtents::minimumScrollOffset const):
(WebCore::ScrollExtents::maximumScrollOffset const):

  • platform/ScrollSnapAnimatorState.cpp:
  • platform/ScrollSnapAnimatorState.h:
  • platform/ScrollTypes.h:

(WebCore::logicalToPhysical):
(WebCore::ScrollExtents::minimumScrollOffset const): Deleted.
(WebCore::ScrollExtents::maximumScrollOffset const): Deleted.

  • platform/ScrollingEffectsController.cpp:
  • platform/ScrollingEffectsController.h:
  • platform/ScrollingMomentumCalculator.h:
  • platform/SharedBuffer.cpp:
  • platform/SharedBuffer.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.mm:
  • platform/encryptedmedia/CDMLogging.cpp:
  • platform/mac/ScrollingEffectsController.mm:
  • platform/win/PasteboardWin.cpp:
  • rendering/CSSFilter.cpp:
  • rendering/HitTestResult.cpp:
  • rendering/LegacyLineLayout.cpp:
  • rendering/ReferencedSVGResources.cpp:
  • rendering/RenderBlockFlow.cpp:
  • rendering/RenderBox.cpp:
  • rendering/RenderDetailsMarker.cpp:
  • rendering/RenderElement.cpp:
  • rendering/RenderImage.cpp:
  • rendering/RenderLayer.cpp:
  • rendering/RenderLineBreak.cpp:
  • rendering/RenderListItem.cpp:
  • rendering/RenderMenuList.cpp:
  • rendering/RenderObject.h:
  • rendering/RenderSearchField.cpp:
  • rendering/RenderTableCell.cpp:
  • rendering/RenderText.cpp:
  • rendering/RenderThemeMac.mm:
  • rendering/RenderTreeAsText.cpp:
  • rendering/mathml/RenderMathMLFenced.cpp:
  • rendering/svg/RenderSVGBlock.cpp:
  • rendering/svg/RenderSVGBlock.h:

(WebCore::RenderSVGBlock::graphicsElement const): Deleted.

  • rendering/svg/RenderSVGBlockInlines.h: Added.

(WebCore::RenderSVGBlock::graphicsElement const):

  • rendering/svg/RenderSVGEllipse.cpp:
  • rendering/svg/RenderSVGForeignObject.cpp:
  • rendering/svg/RenderSVGGradientStop.cpp:
  • rendering/svg/RenderSVGGradientStop.h:
  • rendering/svg/RenderSVGGradientStopInlines.h: Added.

(WebCore::RenderSVGGradientStop::element const):

  • rendering/svg/RenderSVGImage.cpp:
  • rendering/svg/RenderSVGInline.h:

(WebCore::RenderSVGInline::graphicsElement const): Deleted.

  • rendering/svg/RenderSVGInlineInlines.h: Added.

(WebCore::RenderSVGInline::graphicsElement const):

  • rendering/svg/RenderSVGInlineText.cpp:
  • rendering/svg/RenderSVGRect.cpp:
  • rendering/svg/RenderSVGResourceClipper.cpp:
  • rendering/svg/RenderSVGResourceClipper.h:
  • rendering/svg/RenderSVGResourceClipperInlines.h: Added.

(WebCore::RenderSVGResourceClipper::clipPathElement const):
(WebCore::RenderSVGResourceClipper::clipPathUnits const):

  • rendering/svg/RenderSVGResourceContainer.cpp:
  • rendering/svg/RenderSVGResourceFilter.cpp:
  • rendering/svg/RenderSVGResourceFilter.h:
  • rendering/svg/RenderSVGResourceFilterInlines.h: Added.

(WebCore::RenderSVGResourceFilter::filterElement const):
(WebCore::RenderSVGResourceFilter::filterUnits const):
(WebCore::RenderSVGResourceFilter::primitiveUnits const):

  • rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
  • rendering/svg/RenderSVGResourceLinearGradient.cpp:
  • rendering/svg/RenderSVGResourceLinearGradient.h:
  • rendering/svg/RenderSVGResourceLinearGradientInlines.h: Added.

(WebCore::RenderSVGResourceLinearGradient::linearGradientElement const):

  • rendering/svg/RenderSVGResourceMarker.cpp:
  • rendering/svg/RenderSVGResourceMarker.h:
  • rendering/svg/RenderSVGResourceMarkerInlines.h: Added.

(WebCore::RenderSVGResourceMarker::markerElement const):
(WebCore::RenderSVGResourceMarker::markerUnits const):

  • rendering/svg/RenderSVGResourceMasker.cpp:
  • rendering/svg/RenderSVGResourceMasker.h:
  • rendering/svg/RenderSVGResourceMaskerInlines.h: Added.

(WebCore::RenderSVGResourceMasker::maskElement const):
(WebCore::RenderSVGResourceMasker::maskUnits const):
(WebCore::RenderSVGResourceMasker::maskContentUnits const):

  • rendering/svg/RenderSVGResourcePattern.cpp:
  • rendering/svg/RenderSVGResourceRadialGradient.cpp:
  • rendering/svg/RenderSVGResourceRadialGradient.h:
  • rendering/svg/RenderSVGResourceRadialGradientInlines.h: Added.

(WebCore::RenderSVGResourceRadialGradient::radialGradientElement const):

  • rendering/svg/RenderSVGRoot.cpp:
  • rendering/svg/RenderSVGShape.cpp:
  • rendering/svg/RenderSVGShape.h:

(WebCore::RenderSVGShape::graphicsElement const): Deleted.

  • rendering/svg/RenderSVGShapeInlines.h: Added.

(WebCore::RenderSVGShape::graphicsElement const):

  • rendering/svg/RenderSVGTSpan.h:
  • rendering/svg/RenderSVGText.cpp:
  • rendering/svg/RenderSVGTextPath.cpp:
  • rendering/svg/RenderSVGTextPath.h:
  • rendering/svg/RenderSVGTransformableContainer.cpp:

(WebCore::RenderSVGTransformableContainer::graphicsElement):

  • rendering/svg/RenderSVGTransformableContainer.h:
  • rendering/svg/RenderSVGViewportContainer.cpp:
  • rendering/svg/SVGInlineFlowBox.cpp:
  • rendering/svg/SVGInlineTextBox.cpp:
  • rendering/svg/SVGInlineTextBox.h:
  • rendering/svg/SVGInlineTextBoxInlines.h: Added.

(WebCore::SVGInlineTextBox::renderer const):
(WebCore::SVGInlineTextBox::nextTextBox const):

  • rendering/svg/SVGPathData.cpp:
  • rendering/svg/SVGRenderSupport.cpp:
  • rendering/svg/SVGRenderTreeAsText.cpp:
  • rendering/svg/SVGRenderingContext.cpp:
  • rendering/svg/SVGResources.cpp:
  • rendering/svg/SVGRootInlineBox.cpp:
  • rendering/svg/SVGTextLayoutEngine.cpp:
  • rendering/svg/SVGTextQuery.cpp:
  • style/StyleAdjuster.cpp:
  • style/StyleBuilderState.cpp:
  • style/StyleChange.h:
  • style/StyleResolver.h:
  • style/StyleScope.cpp:
  • style/StyleSharingResolver.cpp:
  • svg/DocumentSVG.cpp:
  • svg/SVGAElement.cpp:
  • svg/SVGAltGlyphDefElement.cpp:
  • svg/SVGAltGlyphElement.cpp:
  • svg/SVGAnimateMotionElement.cpp:
  • svg/SVGAnimationElement.cpp:
  • svg/SVGCircleElement.cpp:
  • svg/SVGElement.cpp:
  • svg/SVGElement.h:

(WebCore::SVGElement::invalidateSVGAttributes): Deleted.
(WebCore::SVGElement::invalidateSVGPresentationalHintStyle): Deleted.
(WebCore::SVGAttributeHashTranslator::hash): Deleted.
(WebCore::SVGAttributeHashTranslator::equal): Deleted.
(WebCore::Node::hasTagName const): Deleted.

  • svg/SVGElementInlines.h: Added.

(WebCore::SVGElement::invalidateSVGAttributes):
(WebCore::SVGElement::invalidateSVGPresentationalHintStyle):
(WebCore::SVGAttributeHashTranslator::hash):
(WebCore::SVGAttributeHashTranslator::equal):
(WebCore::Element::hasTagName const):
(WebCore::Node::hasTagName const):

  • svg/SVGEllipseElement.cpp:
  • svg/SVGFEComponentTransferElement.cpp:
  • svg/SVGFELightElement.cpp:
  • svg/SVGFilterElement.cpp:
  • svg/SVGFontFaceElement.cpp:
  • svg/SVGFontFaceFormatElement.cpp:
  • svg/SVGFontFaceNameElement.cpp:
  • svg/SVGFontFaceSrcElement.cpp:
  • svg/SVGFontFaceUriElement.cpp:
  • svg/SVGForeignObjectElement.cpp:
  • svg/SVGGlyphRefElement.cpp:
  • svg/SVGHKernElement.cpp:
  • svg/SVGImageElement.cpp:
  • svg/SVGImageLoader.cpp:
  • svg/SVGLengthContext.cpp:
  • svg/SVGLinearGradientElement.cpp:
  • svg/SVGLocatable.cpp:
  • svg/SVGMPathElement.cpp:
  • svg/SVGMaskElement.cpp:
  • svg/SVGPathElement.cpp:
  • svg/SVGPatternElement.cpp:
  • svg/SVGRadialGradientElement.cpp:
  • svg/SVGRectElement.cpp:
  • svg/SVGSVGElement.cpp:
  • svg/SVGStyleElement.cpp:
  • svg/SVGStyleElement.h:
  • svg/SVGTextContentElement.cpp:
  • svg/SVGTextPositioningElement.cpp:
  • svg/SVGUseElement.cpp:
  • svg/SVGVKernElement.cpp:
  • svg/animation/SVGSMILElement.cpp:
  • svg/graphics/SVGImage.cpp:
  • svg/properties/SVGAttributeAnimator.cpp:
  • xml/XPathFunctions.cpp:
  • xml/XPathNodeSet.cpp:
  • xml/XPathStep.cpp:
  • xml/parser/XMLDocumentParser.cpp:

Source/WebKit:

Include ElementInlines.h in various necessary places.

  • Shared/TouchBarMenuData.cpp:
  • Shared/TouchBarMenuItemData.cpp:
  • Shared/glib/InputMethodState.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementGtk.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAnchorElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLAreaElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBRElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBaseElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLBodyElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLButtonElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDivElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLEmbedElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFontElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFormElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLFrameSetElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHRElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHeadingElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLHtmlElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLIFrameElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLImageElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLIElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLabelElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLegendElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLLinkElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMetaElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLModElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLObjectElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptGroupElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParagraphElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLParamElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLScriptElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLStyleElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCaptionElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableCellElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableColElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableRowElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTableSectionElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLUListElement.cpp:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:
  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
  • WebProcess/cocoa/PlaybackSessionManager.mm:

Source/WebKitLegacy/mac:

Include ElementInlines.h in various necessary places.

  • WebView/WebHTMLRepresentation.mm:

Tools:

Include ArrayBuffer.h in various necessary places.

  • TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:
4:25 PM Changeset in webkit [283850] by Truitt Savell
  • 3 edits in trunk/Tools

Reverting r283824 becasue it broke baseline search paths
https://bugs.webkit.org/show_bug.cgi?id=230540

Unreviewed revert.

  • Scripts/libraries/webkitcorepy/webkitcorepy/tests/version_unittest.py:

(VersionTestCase.test_int_constructor):

  • Scripts/libraries/webkitcorepy/webkitcorepy/version.py:

(Version.from_iterable):
(Version.init):
(Version.setitem):
(Version.contains):
(Version.hash):
(Version.cmp):

4:10 PM Changeset in webkit [283849] by Simon Fraser
  • 16 edits in trunk/Source

Ensure that animated scrolls will run on the scrolling thread
https://bugs.webkit.org/show_bug.cgi?id=231441

Reviewed by Tim Horton.

On macOS, scrolling tree commits run on the main thread (holding a lock), so we can't start
scroll animations directly inside the commit because then they will run on the main thread.

Fix by adding ScrollingTree::didCommitTree(), and having ThreadedScrollingTree override it
to bounce to the scrolling tree to start animations. We also have to intercept requested scroll
position updates via ScrollingTree::scrollingTreeNodeRequestsScroll(); ThreadedScrollingTree
uses this to put pending animations into m_nodesWithPendingScrollAnimations.

Now that ScrollingTreeScrollingNode::commitStateAfterChildren() responds to
RequestedScrollPosition changes by calling handleScrollPositionRequest(), we can remove code
in derived classes that did the same thing.

Not yet tested because animated scrolls don't yet get to the scrolling tree.

Source/WebCore:

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::commitTreeState):

  • page/scrolling/ScrollingTree.h:

(WebCore::ScrollingTree::scrollingTreeNodeRequestsScroll):
(WebCore::ScrollingTree::didCommitTree):

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::commitStateAfterChildren):
(WebCore::ScrollingTreeScrollingNode::handleScrollPositionRequest):

  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::didCommitTree):
(WebCore::ThreadedScrollingTree::didCommitTreeOnScrollingThread):
(WebCore::ThreadedScrollingTree::scrollingTreeNodeRequestsScroll):

  • page/scrolling/ThreadedScrollingTree.h:
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren):

  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h:
  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:

(WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateAfterChildren): Deleted.

Source/WebKit:

  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:

(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeRequestsScroll):

  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
  • UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:

(WebKit::RemoteScrollingTree::scrollingTreeNodeRequestsScroll):

  • UIProcess/RemoteLayerTree/RemoteScrollingTree.h:
  • UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:

(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateAfterChildren):

4:09 PM Changeset in webkit [283848] by Wenson Hsieh
  • 16 edits
    2 adds in trunk

Split DisplayList::Recorder into an abstract base class and a concrete implementation
https://bugs.webkit.org/show_bug.cgi?id=231404

Reviewed by Myles Maxfield.

Source/WebCore:

This patch splits the current code in the DisplayList::Recorder class into two classes: an abstract base class
with the existing name (DisplayList::Recorder), and a new concrete implementation of this virtual class,
DisplayList::RecorderImpl. See below for more details.

This refactoring will allow us to introduce a WebKit2-specific subclass of DisplayList::Recorder in a subsequent
patch, which is similar to the existing DisplayList::Recorder object, but will record its display list items by
sending them to the GPU Process through the IPC stream connection, rather than append them to an instance of
DisplayList.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::displayListForTextRun const):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

Change various uses of DisplayList::Recorder to DisplayList::RecorderImpl.

(WebCore::GraphicsLayerCA::recursiveCommitChanges):

  • platform/graphics/displaylists/DisplayList.h:
  • platform/graphics/displaylists/DisplayListDrawingContext.cpp:

(WebCore::DisplayList::DrawingContext::DrawingContext):

  • platform/graphics/displaylists/DisplayListDrawingContext.h:

(WebCore::DisplayList::DrawingContext::DrawingContext):
(WebCore::DisplayList::DrawingContext::recorder):

  • platform/graphics/displaylists/DisplayListImageBuffer.h:

(WebCore::DisplayList::ImageBuffer::ImageBuffer):

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

The abstract Recorder now contains logic for mapping GraphicsContext method calls into calls to record
individual display list items. Note that while many GraphicsContext methods correspond directly to display list
items, some methods map to one or more display list items, such as setting state consisting only of inline POD
data or drawing simple paths. The base class also manages updating and maintaining the state stack (a list of
Recorder::ContextState) when modifying graphics context state.

Importantly, this means that the abstract Recorder class does not contain either a Recorder Delegate, nor does
it contain a DisplayList. Instead, the concrete subclass (DisplayList::RecorderImpl) now holds on to the local
DisplayList.

This also ensures that subclasses of DisplayList::Recorder only need to worry about "recording" display list
items given their constituent arguments, instead of directly implementing the individual GraphicsContext drawing
methods.

(WebCore::DisplayList::Recorder::Recorder):
(WebCore::DisplayList::Recorder::~Recorder):
(WebCore::DisplayList::Recorder::appendStateChangeItem):
(WebCore::DisplayList::Recorder::appendStateChangeItemIfNecessary):
(WebCore::DisplayList::Recorder::setLineCap):
(WebCore::DisplayList::Recorder::setLineDash):
(WebCore::DisplayList::Recorder::setLineJoin):
(WebCore::DisplayList::Recorder::setMiterLimit):
(WebCore::DisplayList::Recorder::drawGlyphsAndCacheFont):
(WebCore::DisplayList::Recorder::drawImageBuffer):
(WebCore::DisplayList::Recorder::drawNativeImage):
(WebCore::DisplayList::Recorder::drawPattern):
(WebCore::DisplayList::Recorder::save):
(WebCore::DisplayList::Recorder::restore):
(WebCore::DisplayList::Recorder::translate):
(WebCore::DisplayList::Recorder::rotate):
(WebCore::DisplayList::Recorder::scale):
(WebCore::DisplayList::Recorder::concatCTM):
(WebCore::DisplayList::Recorder::setCTM):
(WebCore::DisplayList::Recorder::beginTransparencyLayer):
(WebCore::DisplayList::Recorder::endTransparencyLayer):
(WebCore::DisplayList::Recorder::drawRect):
(WebCore::DisplayList::Recorder::drawLine):
(WebCore::DisplayList::Recorder::drawLinesForText):
(WebCore::DisplayList::Recorder::drawDotsForDocumentMarker):
(WebCore::DisplayList::Recorder::drawEllipse):
(WebCore::DisplayList::Recorder::drawPath):
(WebCore::DisplayList::Recorder::drawFocusRing):
(WebCore::DisplayList::Recorder::fillRect):
(WebCore::DisplayList::Recorder::fillRoundedRect):
(WebCore::DisplayList::Recorder::fillRectWithRoundedHole):
(WebCore::DisplayList::Recorder::fillPath):
(WebCore::DisplayList::Recorder::fillEllipse):
(WebCore::DisplayList::Recorder::strokeRect):
(WebCore::DisplayList::Recorder::strokePath):
(WebCore::DisplayList::Recorder::strokeEllipse):
(WebCore::DisplayList::Recorder::clearRect):
(WebCore::DisplayList::Recorder::applyStrokePattern):
(WebCore::DisplayList::Recorder::applyFillPattern):
(WebCore::DisplayList::Recorder::clip):
(WebCore::DisplayList::Recorder::clipOut):
(WebCore::DisplayList::Recorder::clipPath):
(WebCore::DisplayList::Recorder::clipToImageBuffer):
(WebCore::DisplayList::Recorder::clipToDrawingCommands):
(WebCore::DisplayList::Recorder::paintFrameForMedia):
(WebCore::DisplayList::Recorder::applyDeviceScaleFactor):
(WebCore::DisplayList::Recorder::getPixelBuffer): Deleted.
(WebCore::DisplayList::Recorder::putPixelBuffer): Deleted.
(WebCore::DisplayList::Recorder::recordNativeImageUse): Deleted.
(WebCore::DisplayList::Recorder::canAppendItemOfType const): Deleted.
(WebCore::DisplayList::Recorder::canDrawImageBuffer const): Deleted.
(WebCore::DisplayList::Recorder::renderingMode const): Deleted.
(WebCore::DisplayList::Recorder::extentFromLocalBounds const): Deleted.

  • platform/graphics/displaylists/DisplayListRecorder.h:

(WebCore::DisplayList::Recorder::recordDrawPattern):
(WebCore::DisplayList::Recorder::ContextState::ContextState):
(WebCore::DisplayList::Recorder::ContextState::cloneForSave const):
(WebCore::DisplayList::Recorder::ContextState::cloneForTransparencyLayer const):
(WebCore::DisplayList::Recorder::stateStack const):
(WebCore::DisplayList::Recorder::isEmpty const): Deleted.
(WebCore::DisplayList::Recorder::Delegate::~Delegate): Deleted.
(WebCore::DisplayList::Recorder::Delegate::canAppendItemOfType): Deleted.
(WebCore::DisplayList::Recorder::Delegate::recordNativeImageUse): Deleted.
(WebCore::DisplayList::Recorder::Delegate::isCachedImageBuffer const): Deleted.
(WebCore::DisplayList::Recorder::Delegate::recordFontUse): Deleted.
(WebCore::DisplayList::Recorder::Delegate::recordImageBufferUse): Deleted.
(WebCore::DisplayList::Recorder::Delegate::renderingMode const): Deleted.
(WebCore::DisplayList::Recorder::flushContext): Deleted.
(WebCore::DisplayList::Recorder::append): Deleted.
(WebCore::DisplayList::Recorder::itemNeedsState): Deleted.

  • platform/graphics/displaylists/DisplayListRecorderImpl.cpp: Added.

(WebCore::DisplayList::RecorderImpl::RecorderImpl):
(WebCore::DisplayList::RecorderImpl::~RecorderImpl):
(WebCore::DisplayList::RecorderImpl::getPixelBuffer):
(WebCore::DisplayList::RecorderImpl::putPixelBuffer):
(WebCore::DisplayList::RecorderImpl::canAppendItemOfType const):
(WebCore::DisplayList::RecorderImpl::canDrawImageBuffer const):
(WebCore::DisplayList::RecorderImpl::renderingMode const):
(WebCore::DisplayList::RecorderImpl::createNestedContext):

Refactor the nested Recorder logic used for Recorder::clipToDrawingCommands, such that it's now a separate
override point. This allows subclasses to instantiate nested contexts of the same type, while keeping the main
logic in clipToDrawingCommands in the shared base class.

(WebCore::DisplayList::RecorderImpl::recordSave):
(WebCore::DisplayList::RecorderImpl::recordRestore):
(WebCore::DisplayList::RecorderImpl::recordTranslate):
(WebCore::DisplayList::RecorderImpl::recordRotate):
(WebCore::DisplayList::RecorderImpl::recordScale):
(WebCore::DisplayList::RecorderImpl::recordSetCTM):
(WebCore::DisplayList::RecorderImpl::recordConcatenateCTM):
(WebCore::DisplayList::RecorderImpl::recordSetInlineFillColor):
(WebCore::DisplayList::RecorderImpl::recordSetInlineStrokeColor):
(WebCore::DisplayList::RecorderImpl::recordSetStrokeThickness):
(WebCore::DisplayList::RecorderImpl::recordSetState):
(WebCore::DisplayList::RecorderImpl::recordSetLineCap):
(WebCore::DisplayList::RecorderImpl::recordSetLineDash):
(WebCore::DisplayList::RecorderImpl::recordSetLineJoin):
(WebCore::DisplayList::RecorderImpl::recordSetMiterLimit):
(WebCore::DisplayList::RecorderImpl::recordClearShadow):
(WebCore::DisplayList::RecorderImpl::recordClip):
(WebCore::DisplayList::RecorderImpl::recordClipOut):
(WebCore::DisplayList::RecorderImpl::recordClipToImageBuffer):
(WebCore::DisplayList::RecorderImpl::recordClipOutToPath):
(WebCore::DisplayList::RecorderImpl::recordClipPath):
(WebCore::DisplayList::RecorderImpl::recordBeginClipToDrawingCommands):
(WebCore::DisplayList::RecorderImpl::recordEndClipToDrawingCommands):
(WebCore::DisplayList::RecorderImpl::recordDrawGlyphs):
(WebCore::DisplayList::RecorderImpl::recordDrawImageBuffer):
(WebCore::DisplayList::RecorderImpl::recordDrawNativeImage):
(WebCore::DisplayList::RecorderImpl::recordDrawPattern):
(WebCore::DisplayList::RecorderImpl::recordBeginTransparencyLayer):
(WebCore::DisplayList::RecorderImpl::recordEndTransparencyLayer):
(WebCore::DisplayList::RecorderImpl::recordDrawRect):
(WebCore::DisplayList::RecorderImpl::recordDrawLine):
(WebCore::DisplayList::RecorderImpl::recordDrawLinesForText):
(WebCore::DisplayList::RecorderImpl::recordDrawDotsForDocumentMarker):
(WebCore::DisplayList::RecorderImpl::recordDrawEllipse):
(WebCore::DisplayList::RecorderImpl::recordDrawPath):
(WebCore::DisplayList::RecorderImpl::recordDrawFocusRingPath):
(WebCore::DisplayList::RecorderImpl::recordDrawFocusRingRects):
(WebCore::DisplayList::RecorderImpl::recordFillRect):
(WebCore::DisplayList::RecorderImpl::recordFillRectWithColor):
(WebCore::DisplayList::RecorderImpl::recordFillRectWithGradient):
(WebCore::DisplayList::RecorderImpl::recordFillCompositedRect):
(WebCore::DisplayList::RecorderImpl::recordFillRoundedRect):
(WebCore::DisplayList::RecorderImpl::recordFillRectWithRoundedHole):
(WebCore::DisplayList::RecorderImpl::recordFillLine):
(WebCore::DisplayList::RecorderImpl::recordFillArc):
(WebCore::DisplayList::RecorderImpl::recordFillQuadCurve):
(WebCore::DisplayList::RecorderImpl::recordFillBezierCurve):
(WebCore::DisplayList::RecorderImpl::recordFillPath):
(WebCore::DisplayList::RecorderImpl::recordFillEllipse):
(WebCore::DisplayList::RecorderImpl::recordGetPixelBuffer):
(WebCore::DisplayList::RecorderImpl::recordPutPixelBuffer):
(WebCore::DisplayList::RecorderImpl::recordPaintFrameForMedia):
(WebCore::DisplayList::RecorderImpl::recordStrokeRect):
(WebCore::DisplayList::RecorderImpl::recordStrokeLine):
(WebCore::DisplayList::RecorderImpl::recordStrokeArc):
(WebCore::DisplayList::RecorderImpl::recordStrokeQuadCurve):
(WebCore::DisplayList::RecorderImpl::recordStrokeBezierCurve):
(WebCore::DisplayList::RecorderImpl::recordStrokePath):
(WebCore::DisplayList::RecorderImpl::recordStrokeEllipse):
(WebCore::DisplayList::RecorderImpl::recordClearRect):
(WebCore::DisplayList::RecorderImpl::recordApplyStrokePattern):
(WebCore::DisplayList::RecorderImpl::recordApplyFillPattern):
(WebCore::DisplayList::RecorderImpl::recordApplyDeviceScaleFactor):
(WebCore::DisplayList::RecorderImpl::recordResourceUse):
(WebCore::DisplayList::RecorderImpl::extentFromLocalBounds const):

  • platform/graphics/displaylists/DisplayListRecorderImpl.h: Added.

(WebCore::DisplayList::RecorderImpl::isEmpty const):
(WebCore::DisplayList::RecorderImpl::Delegate::~Delegate):
(WebCore::DisplayList::RecorderImpl::Delegate::canAppendItemOfType):
(WebCore::DisplayList::RecorderImpl::Delegate::recordNativeImageUse):
(WebCore::DisplayList::RecorderImpl::Delegate::isCachedImageBuffer const):
(WebCore::DisplayList::RecorderImpl::Delegate::recordFontUse):
(WebCore::DisplayList::RecorderImpl::Delegate::recordImageBufferUse):
(WebCore::DisplayList::RecorderImpl::Delegate::renderingMode const):
(WebCore::DisplayList::RecorderImpl::recordDrawPattern):
(WebCore::DisplayList::RecorderImpl::append):

Source/WebKit:

See WebCore/ChangeLog for more details.

  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:

Tools:

See WebCore/ChangeLog for more details.

  • TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp:

(TestWebKitAPI::TEST):

4:02 PM Changeset in webkit [283847] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitscmpy] Allow caller to differentiate remote branches
https://bugs.webkit.org/show_bug.cgi?id=231450
<rdar://problem/84042400>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:

(Git.branches): Change _branches_for to branches_for.
(Git.branches_for): Allow call to differentiate remote branches
to be returned, or return dictionary of all remotes.
(Git.commit): Change _branches_for to branches_for.
(Git._branches_for): Renamed branches_for.

3:57 PM Changeset in webkit [283846] by Ben Nham
  • 2 edits in trunk/Source/WebKit

Fix crash in NetworkProcess preconnect due to dereferencing deallocated session
https://bugs.webkit.org/show_bug.cgi?id=231456
<rdar://problem/83752148>

Reviewed by Chris Dumez.

We capture a raw NetworkSession reference in the preconnect completion handler. This
reference could point to a deallocated object if the NetworkSession dies before the
preconnect finishes.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::preconnectTo):

3:43 PM Changeset in webkit [283845] by Russell Epstein
  • 21 edits
    1 delete in branches/safari-612-branch

Revert r283238. rdar://problem/83955650

3:35 PM Changeset in webkit [283844] by stephan.szabo@sony.com
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] Add private C API for JSGlobalObject::setEvalEnabled
https://bugs.webkit.org/show_bug.cgi?id=231448

Reviewed by Yusuke Suzuki.

WebCore can prohibit eval (and Function constructor) usage in JS execution based on content security policy;
this patch gives embedders the ability to do similarly.

  • API/JSContextRef.cpp:

(JSGlobalContextSetEvalEnabled): Added.

  • API/JSContextRefPrivate.h:
  • API/tests/testapi.c:
3:21 PM Changeset in webkit [283843] by commit-queue@webkit.org
  • 4 edits in trunk/Tools

Ensure webkitpy secret storage works successfully on Linux using only autoinstalled libraries
https://bugs.webkit.org/show_bug.cgi?id=231381

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-10-08
Reviewed by Jonathan Bedard.

Update to the latest python-keyring and python-secretstorage when using python 3.6 or newer.
Otherwise, use the latest version that still supports python2. This version is broken on
Linux, but that's OK because we do not care about python2 or python 3.5 anymore. I'm just
trying to avoid gratuitous breakage.

Autoinstall python-jeepey, a D-Bus library required by python-secretstorage.

Update to a newer version of importlib_metadata when using python 3.6 or newer. For older
versions of python, stick to the older version. There are some API breaks in this library
that I hope only affect python-keyring. We have other software that depends on this library,
but I think it's OK with either version. test-webkitpy will be the arbiter of that.

  • Scripts/libraries/webkitcorepy/setup.py:
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py:
  • Scripts/webkitpy/init.py:
3:19 PM Changeset in webkit [283842] by Ross Kirsling
  • 2 edits in trunk

Unreviewed, add GitHub usernames for Sony contributors.

  • metadata/contributors.json:
3:02 PM Changeset in webkit [283841] by ysuzuki@apple.com
  • 3 edits
    1 add in trunk

[JSC] UnlinkedCodeBlock::m_instructions can be nullptr
https://bugs.webkit.org/show_bug.cgi?id=231445
rdar://83975933

Reviewed by Mark Lam.

JSTests:

  • stress/unlinked-code-block-destructor.js: Added.

(useAllMemory.get Object):
(useAllMemory.foo):
(useAllMemory):
(try.bar):

Source/JavaScriptCore:

UnlinkedCodeBlock is first created with m_instructions = nullptr.
If BytecodeGenerator failed (due to OOM error etc.), then we keep it nullptr.
So, when destroying UnlinkedCodeBlock, we should have nullptr check.

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::~UnlinkedCodeBlock):

2:51 PM Changeset in webkit [283840] by ysuzuki@apple.com
  • 2 edits in trunk

Unreviewed, add my GitHub username

  • metadata/contributors.json:
2:43 PM Changeset in webkit [283839] by ntim@apple.com
  • 2 edits in trunk

[contributors.json] Add more Github usernames
https://bugs.webkit.org/show_bug.cgi?id=231453

Reviewed by Jonathan Bedard.

  • metadata/contributors.json:
2:12 PM Changeset in webkit [283838] by Fujii Hironori
  • 3 edits
    3 adds in trunk/Tools

[Win][MiniBrowser][WK2] Implement Show Layer Tree to dump the GraphicsLayer tree
https://bugs.webkit.org/show_bug.cgi?id=231409

Reviewed by Don Olmstead.

MiniBrower has Show Layer Tree to dump the GraphicsLayer tree.
It's useful, but worked only in WebKit1. It should work for
WebKit2.

The layer tree are dumped to the debug console of WebProcess by
using OutputDebugString. You need to attach a debugger to it to
see the message. I'd like to recommend to install Child Process
Debugging Power Tool to your Visual Studio.

  • MiniBrowser/win/CMakeLists.txt:
  • MiniBrowser/win/Common2.cpp: Added.

(createString):

  • MiniBrowser/win/Common2.h: Added.
  • MiniBrowser/win/InjectedBundle.cpp: Added.

(didReceiveMessageToPage):
(WKBundleInitialize):

  • MiniBrowser/win/WebKitBrowserWindow.cpp:

(injectedBundlePath):
(WebKitBrowserWindow::create):
(WebKitBrowserWindow::showLayerTree):

2:03 PM Changeset in webkit [283837] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Update getAllLocalAuthenticatorCredentials query according to internal needs
https://bugs.webkit.org/show_bug.cgi?id=231439
rdar://84032359

Patch by John Pascoe <J Pascoe> on 2021-10-08
Reviewed by Tim Horton.

Covered by manual tests.

  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:

(updateQueryIfNecessary):
(getAllLocalAuthenticatorCredentialsImpl):

2:02 PM Changeset in webkit [283836] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 Debug ] ASSERTION FAILED: sockets.empty().
https://bugs.webkit.org/show_bug.cgi?id=231451

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
1:56 PM Changeset in webkit [283835] by Alan Bujtas
  • 3 edits
    2 adds in trunk

ASSERTION FAILED: m_collapsibleLogicalWidth <= m_logicalWidth in WebCore::Layout::InlineContentBreaker::ContinuousContent::append
https://bugs.webkit.org/show_bug.cgi?id=231274

Reviewed by Antti Koivisto.

Source/WebCore:

Remove incorrect assertions. They stopped working when negative horizontal margin was enabled for IFC.

Test: fast/inline/negative-margin-with-collapsible-content-assert.html

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::ContinuousContent::append):

LayoutTests:

  • fast/inline/negative-margin-with-collapsible-content-assert-expected.txt: Added.
  • fast/inline/negative-margin-with-collapsible-content-assert.html: Added.
1:01 PM Changeset in webkit [283834] by basuke.suzuki@sony.com
  • 2 edits in trunk/Source/WebKit

Fix build break after r283796 when ENABLE_SERVICE_WORKER is off
https://bugs.webkit.org/show_bug.cgi?id=231440

Unreviewed build fix.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::hasServiceWorkerBackgroundActivityForTesting const):

12:53 PM Changeset in webkit [283833] by Jonathan Bedard
  • 8 edits in trunk

[contributors.json] Support GitHub usernames
https://bugs.webkit.org/show_bug.cgi?id=231400
<rdar://problem/84005266>

Reviewed by Dewei Zhu.

.:

  • metadata/contributors.json: Add some GitHub usernames.

Tools:

  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py:

(Contributor.Encoder.default): Add GitHub and BitBucket username.
(Contributor.Mapping.load): Ditto.
(Contributor.Mapping.add): Ditto.
(Contributor.init): Ditto.

  • Scripts/libraries/webkitscmpy/webkitscmpy/test/contributor_unittest.py:

(TestContributor):
(TestContributor.test_github):
(TestContributor.test_bitbucket):

  • Scripts/webkitpy/common/config/committers.py:

(Contributor.init): Add GitHub username.
(Contributor.as_dict): Ditto.
(Committer.init): Ditto.
(Reviewer.init): Ditto.
(Bot.init): Ditto.
(CommitterList.load_json): Ditto.

12:44 PM Changeset in webkit [283832] by Alan Coon
  • 19 edits
    2 moves
    4 adds in branches/safari-612-branch

Cherry-pick r283531. rdar://problem/83956741

Choose an appropriate color space when converting an SVG image into a NativeImage for canvas drawImage
https://bugs.webkit.org/show_bug.cgi?id=231062
<rdar://problem/83752451>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Add a test for drawImage() with an SVG image that has sRGB and Display
P3 colors.

Not adding tests for patterns pointing to SVG images for now, since
WebKit currently always taints the canvas in that case, or for
ImageBitmaps wrapping SVG images, since we always flatten them to sRGB
(and we don't track what content is inside the SVG to make a better
decision about what color space ImageBuffer to use).

  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage.https-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-expected.txt.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage.https.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage.html.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3.js:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-0.7333-0-0.svg: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-1-0-0.svg: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000.svg: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0000.svg: Added.

Source/WebCore:

When GPUP canvas is enabled, drawImage() with an SVG image is handled
by drawing into a NativeImage and then sending that to the GPUP. We
need to choose a color space for the NativeImage's ImageBuffer that
matches the canvas.

Once full SVG rendering is supported by the GPU process, we can undo
this code, as we'll no longer be using a NativeImage.

Test: imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage.https.html

  • html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::drawImage): (WebCore::drawImageToContext): (WebCore::CanvasRenderingContext2DBase::fullCanvasCompositedDrawImage):
  • platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawImageForCanvas):
  • platform/graphics/GraphicsContext.h:
  • platform/graphics/Image.cpp: (WebCore::Image::drawForCanvas):
  • platform/graphics/Image.h:
  • platform/graphics/MediaPlayer.h:
  • svg/graphics/SVGImage.cpp: (WebCore::SVGImage::drawForCanvasForContainer): (WebCore::SVGImage::drawForContainer): (WebCore::SVGImage::drawForContainerInternal): (WebCore::SVGImage::nativeImage): (WebCore::SVGImage::drawForCanvas): (WebCore::SVGImage::draw): (WebCore::SVGImage::drawInternal): (WebCore::SVGImage::drawAsNativeImage):
  • svg/graphics/SVGImage.h:
  • svg/graphics/SVGImageForContainer.cpp: (WebCore::SVGImageForContainer::drawForCanvas):
  • svg/graphics/SVGImageForContainer.h:

LayoutTests:

  • TestExpectations:
  • platform/ios-14/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:

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

12:44 PM Changeset in webkit [283831] by Alan Coon
  • 7 edits in branches/safari-612-branch

Cherry-pick r283193. rdar://problem/83954782

Preserve color space when structured cloning ImageBitmaps
https://bugs.webkit.org/show_bug.cgi?id=230429
<rdar://problem/83293533>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

The test added in https://bugs.webkit.org/show_bug.cgi?id=230429 was
buggy, in that by the time the "message" event handler ran, the
values for the various test configuration variables had changed. The
key bugfix here is checking for the right testID value in the message
event handler, but the test is rewritten more substantially to be a bit
clearer and less indented.

  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned-expected.txt:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned.html:

Source/WebCore:

The logic for serializing the CGColorSpace is copied and adapted from
the ArgumentCoder<CGColorSpaceRef> specialization, which we cannot
easily re-use.

  • bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpImageBitmap): (WebCore::CloneSerializer::write): (WebCore::CloneDeserializer::read): (WebCore::CloneDeserializer::readImageBitmap):

LayoutTests:

  • fast/storage/serialized-script-value.html: Bump the current version number.

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

12:44 PM Changeset in webkit [283830] by Alan Coon
  • 21 edits
    12 adds in branches/safari-612-branch

Cherry-pick r282696. rdar://problem/83954782

Preserve color space when creating ImageBuffers for ImageBitmaps
https://bugs.webkit.org/show_bug.cgi?id=229022
<rdar://problem/81828459>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-Blob-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-Blob.html: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-ImageBitmap-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-ImageBitmap.html: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-ImageData-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-ImageData.html: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-canvas-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-canvas.html: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned.html: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-image-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-image.html: Added.

Source/WebCore:

ImageBitmaps can be created with various sources of image data.
Currently, they always create an sRGB ImageBuffer to copy the
image data into. This patch tries to preserve the color space
of the source image data. Because ImageBuffer only works with 8 bit
RGBA data, other color space models (such as CMYK) get converted
to Display P3 if available, or sRGB otherwise. The rationale for
this is that ImageBitmaps are designed to be drawn into canvases,
and we currently only support sRGB and Display P3 for canvas backing
stores.

It's not ideal that we do the color space conversion, since it would
be better to delay the conversion until it's needed when drawing onto
the canvas. It's also not ideal that we can't preserve the pixel
format of the image data, which might be 16 bit color or floats. We
could support these only if ImageBuffer were extended to support them.
A different design for ImageBitmap where it can hold on to the image
data source directly (and support for structured cloning and worker
thread transferrance added) could also work. For now, we don't worry,
and accept the loss of color fidelity when downsampling or converting
from non-RGB color space models.

Support for structured cloning of ImageBitmaps with non-sRGB data
isn't added, but a test for this is. (This will need a way to
serialize the DestinationColorSpace.)

Tests: imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-Blob.html

imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-ImageBitmap.html
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-ImageData.html
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-canvas.html
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned.html
imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-image.html

  • bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpImageBitmap): (WebCore::CloneDeserializer::readImageBitmap):
  • html/ImageBitmap.cpp: (WebCore::ImageBitmap::create): (WebCore::ImageBitmap::createImageBuffer): (WebCore::ImageBitmap::resolveWithBlankImageBuffer): (WebCore::ImageBitmap::createPromise): (WebCore::ImageBitmap::createFromBuffer):
  • html/ImageBitmap.h:
  • html/OffscreenCanvas.cpp: (WebCore::OffscreenCanvas::transferToImageBitmap): (WebCore::OffscreenCanvas::createImageBuffer const):
  • platform/graphics/BitmapImage.cpp: (WebCore::BitmapImage::colorSpace):
  • platform/graphics/BitmapImage.h:
  • platform/graphics/DestinationColorSpace.cpp: (WebCore::DestinationColorSpace::asRGB const): New function that abstracts out the behavior "tell me whether the color space is appropriate for use with an 8 bit RGB buffer", which is common to ImageBitmap and ShareableBitmapCG.
  • platform/graphics/DestinationColorSpace.h:
  • platform/graphics/Image.cpp: (WebCore::Image::colorSpace):
  • platform/graphics/Image.h:

Source/WebKit:

  • Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::validateConfiguration): Factor out some loging into DestinationColorSpace::asRGB.

Source/WTF:

  • wtf/PlatformHave.h:

LayoutTests:

  • TestExpectations:
  • platform/ios-14/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:

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

12:44 PM Changeset in webkit [283829] by Alan Coon
  • 9 edits
    4 adds in branches/safari-612-branch

Cherry-pick r282630. rdar://problem/83956741

Support patterns with a wide gamut source painting into a display-p3 canvas
https://bugs.webkit.org/show_bug.cgi?id=229023
<rdar://problem/81828466>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Add tests for wide gamut <img> and <canvas> sources for patterns.

  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage.html:
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-canvas-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-canvas.html: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-image-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-image.html: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3.js:

Source/WebKit:

Patterns are sent to the GPU process using ShareableBitmaps created
from ImageBuffers. Ensure we pass along the pattern source color space
to ShareableBitmap::create.

Tests: imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-canvas.html

imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-image.html

  • GPUProcess/graphics/RemoteRenderingBackend.cpp: (WebKit::RemoteRenderingBackend::getShareableBitmapForImageBuffer):

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

12:44 PM Changeset in webkit [283828] by Alan Coon
  • 9 edits
    119 deletes in branches/safari-612-branch/LayoutTests

Cherry-pick r283099. rdar://problem/83957623

Remove old test files from canvas WPTs that were moved
https://bugs.webkit.org/show_bug.cgi?id=230811
<rdar://problem/83554404>

Reviewed by Tim Horton.

LayoutTests/imported/w3c:

A bunch of canvas test moved directories in
https://github.com/web-platform-tests/wpt/pull/23996. When we re-
imported canvas WPTs in bug 229750, these old files were left behind.
We can remove them since they all now live under
html/canvas/element/manual/.

  • web-platform-tests/html/canvas/element/building-paths/canvas_complexshapes_arcto_001.htm: Removed.
  • web-platform-tests/html/canvas/element/building-paths/canvas_complexshapes_beziercurveto_001.htm: Removed.
  • web-platform-tests/html/canvas/element/context-attributes/getContextAttributes-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/context-attributes/getContextAttributes.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-orientation-none.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-orientation-none.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height-orientation-none.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height-orientation-none.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap-swap-width-height.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-bitmap.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-orientation-none.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-orientation-none.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height-orientation-none.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height-orientation-none.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element-swap-width-height.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-from-element.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-with-src-rect.tentative-expected.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/image-orientation/drawImage-with-src-rect.tentative.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/canvas_complexshapes_ispointInpath_001.htm: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_001-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_001.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_002-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_002.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_003-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_003.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_004-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_004.html: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_005-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/drawing-paths-to-the-canvas/drawFocusIfNeeded_005.html: Removed.
  • web-platform-tests/html/canvas/element/image-smoothing/imagesmoothing-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/image-smoothing/imagesmoothing.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/canvas-createImageBitmap-resize-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/canvas-createImageBitmap-resize.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/canvas-createImageBitmap-video-resize-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/canvas-createImageBitmap-video-resize.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/common.sub.js: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-blob-invalidtype-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-blob-invalidtype.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-bounds-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-bounds.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-drawImage-closed-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-drawImage-closed.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-drawImage-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-drawImage.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-flipY-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-flipY.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-in-worker-transfer-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-in-worker-transfer.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-invalid-args-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-invalid-args.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-origin.sub-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-origin.sub.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-serializable-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-serializable.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-sizeOverflow-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-sizeOverflow.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-transfer-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-transfer.html: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-worker.js: Removed.
  • web-platform-tests/html/canvas/element/imagebitmap/transfer-worker.js: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-semitransparent-p3d65.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-semitransparent-rec2020.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-semitransparent-srgb.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb-fullcolor.ogv: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb-transparent.bmp: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb-transparent.ico: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb-transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb-transparent.webp: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.bmp: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.gif: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.ico: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.jpg: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.svg: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/pattern-srgb.webp: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_AdobeRGB_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_AdobeRGB_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_DisplayP3_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_DisplayP3_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_ProPhoto_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_ProPhoto_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_Rec2020_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_Rec2020_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_AdobeRGB_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_AdobeRGB_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_DisplayP3_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_DisplayP3_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_ProPhoto_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_ProPhoto_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_Rec2020_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_Rec2020_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_sRGB_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_interlaced_sRGB_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_sRGB_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_16bit_sRGB_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_AdobeRGB_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_AdobeRGB_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_DisplayP3_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_DisplayP3_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_ProPhoto_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_ProPhoto_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_Rec2020_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_Rec2020_transparent.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_sRGB_opaque.png: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/resources/png-16bit/2x2_8bit_sRGB_transparent.png: Removed.

LayoutTests:

  • TestExpectations:
  • platform/glib/TestExpectations:
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/image-smoothing/imagesmoothing-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/canvas-createImageBitmap-resize-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-drawImage-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-flipY-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-invalid-args-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-serializable-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-transfer-expected.txt: Removed.
  • platform/ios-14/TestExpectations:
  • platform/ios-simulator-wk2/TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-flipY-expected.txt: Removed.
  • platform/mac/TestExpectations:

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

12:44 PM Changeset in webkit [283827] by Alan Coon
  • 11 edits
    1 copy
    1 add in branches/safari-612-branch

Cherry-pick r282634. rdar://problem/83957287

Preserve canvas color space when producing JPEGs from toDataURL/toBlob
https://bugs.webkit.org/show_bug.cgi?id=230209
<rdar://82948457>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.jpeg.p3.canvas-expected.txt: Added.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.jpeg.p3.canvas.html: Copied from LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.p3.canvas.html.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.p3.canvas-expected.txt:
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.p3.canvas.html:
  • web-platform-tests/html/canvas/tools/yaml/element/color_space.yaml:

Source/WebCore:

Test: imported/w3c/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.jpeg.p3.canvas.html

  • platform/graphics/cg/ImageBufferCGBackend.cpp: (WebCore::colorSpaceForBitmap): Return an appropriate color space for performing any graphics operations on ImageBuffers (such as scaling or cropping, or compositing on top of solid colors) becore encoding. (WebCore::createBitmapImageAfterScalingIfNeeded): (WebCore::ImageBufferCGBackend::copyCGImageForEncoding const):

LayoutTests:

  • TestExpectations:
  • platform/ios-14/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:

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

12:44 PM Changeset in webkit [283826] by Alan Coon
  • 18 edits
    35 adds in branches/safari-612-branch

Cherry-pick r282626. rdar://problem/83956767

Support drawImage with a wide gamut image painting into a display-p3 canvas
https://bugs.webkit.org/show_bug.cgi?id=229021
<rdar://problem/81828450>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Adding a new WPT for drawImage() using images with various embedded
color profiles.

  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage.html: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-settings-expected.txt: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-settings.html: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3.js: Added. (pixelsApproximatelyEqual):
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BB0000CC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BB0000FF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BBBC00000000CCCC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-BBBC00000000FFFF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FF0000CC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FF0000FF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FFFF00000000CCCC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Adobe-RGB-FFFF00000000FFFF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BB0000CC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BB0000FF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BBBC00000000CCCC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-BBBC00000000FFFF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FF0000CC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FF0000FF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FFFF00000000CCCC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Display-P3-FFFF00000000FFFF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Generic-CMYK-BE000000.jpg: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/Generic-CMYK-FF000000.jpg: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000CC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BB0000FF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BBBC00000000CCCC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-BBBC00000000FFFF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0000CC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FF0000FF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FFFF00000000CCCC.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/resources/sRGB-FFFF00000000FFFF.png: Added.
  • web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-draw-high-bit-depth-images-expected.txt: Results changing for an existing test. It's designed to test canvas with a float16 backing store, which is (at the moment) non-standard, and unsupported by us. The sub-tests changing from PASS to FAIL are notable; they are drawing semi-transparent 16 bit wide gamut images and comparing the results to drawing 8 bit equivalent images. Might be accuracy issues due to pre-multiplied alpha?

Source/WebCore:

Expose the color space of a NativeImage.

Tests: imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage.html

imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-settings.html

  • platform/graphics/NativeImage.h:
  • platform/graphics/cairo/NativeImageCairo.cpp: (WebCore::NativeImage::colorSpace const):
  • platform/graphics/cg/NativeImageCG.cpp: (WebCore::NativeImage::colorSpace const):
  • platform/graphics/win/NativeImageDirect2D.cpp: (WebCore::NativeImage::colorSpace const):

Source/WebKit:

ShareableBitmap is used to share image data used by drawImage() calls,
from the Web process to the GPU process. This change makes
ShareableBitmap create a CGBitmap with a color space matching the
source NativeImage, if that is an RGB-based color space, or extended
sRGB otherwise. This allows us to pass Adobe RGB, Display P3, etc.
images to the GPU process without needing to convert color space,
while still allowing for example CMYK JPEGs to be drawn correctly.

  • Shared/ShareableBitmap.cpp: (WebKit::ShareableBitmap::create): (WebKit::ShareableBitmap::createShareable):
  • Shared/ShareableBitmap.h:
  • Shared/cairo/ShareableBitmapCairo.cpp: (WebKit::ShareableBitmap::validateConfiguration):
  • Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::validateConfiguration): Map the requested color space into one appropriate for the CGBitmap. (WebKit::colorSpace):
  • Shared/win/ShareableBitmapDirect2D.cpp: (WebKit::ShareableBitmap::validateConfiguration):
  • WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp: (WebKit::createShareableBitmapFromNativeImage): Pass in the color space of the NativeImage.

LayoutTests:

  • TestExpectations:
  • platform/ios-14/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:

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

12:29 PM Changeset in webkit [283825] by Chris Dumez
  • 11 edits in trunk

Merge optimizations to AudioParamTimeline::hasValues() from Blink
https://bugs.webkit.org/show_bug.cgi?id=231428

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Merge https://github.com/web-platform-tests/wpt/pull/31165. Thanks to the new optimizations, we are now
using K-Rate processing in more cases. For some of the StereoPannerNode tests, we went from A-Rate processing
to K-Rate. Because our K-Rate processing implementation is vectorized (and doing all operations as float), it
does not have the same precision as the A-Rate one which does operations of double variables and only casts
to float at the end.

  • web-platform-tests/webaudio/resources/stereopanner-testing.js:

(Test):

  • web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/no-dezippering-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/no-dezippering.html:
  • web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/stereopannernode-panning-expected.txt:

Source/WebCore:

Merge optimizations to AudioParamTimeline::hasValues() from Blink:

It is important for AudioParamTimeline::hasValues() to return false whenever
possible because it allows our implementation to use K-Rate processing (instead
of A-Rate), which is much faster.

No new tests, no expected Web-facing behavior change.

  • Modules/webaudio/AudioParamTimeline.cpp:

(WebCore::AudioParamTimeline::hasValues const):
Merge optimizations to AudioParamTimeline::hasValues() from Blink:

When there is a single event on the timeline (which is fairly common), do our best to
find out if the event is relevant for the current rendering quantum, based on the event
type and attributes.

  • Modules/webaudio/PannerNode.cpp:

(WebCore::PannerNode::process):
I recently introduced a cache of PannerNode's azimuth/elevavation/coneGain. The cache
works fine as long as PannerNode processing stays in K-Rate or in A-Rate the whole
time. However, if switching from A-Rate to K-rate, it could make bad calculations
because we failed to invalidate the cached attributes while in A-Rate. For this
reason, we have to invalidate the cached attributes if dirty no matter what rate we
are using (not just while in K-Rate).

  • platform/audio/EqualPowerPanner.cpp:

(WebCore::EqualPowerPanner::EqualPowerPanner):
(WebCore::EqualPowerPanner::pan):

  • platform/audio/EqualPowerPanner.h:
  • platform/audio/Panner.cpp:

(WebCore::Panner::create):
Now that more Panner tests are using K-Rate processing, it found a bug in our
implementation where we were still doing dezippering. Dezippering is no longer
part of the specification and Blink no longer does this either. We've already
dropped dezippering in other places but we missed it here.
I have also noticed that the implementation is not vectorized but easily could
be so I have added a FIXME comment and will follow-up to fix it.

12:19 PM Changeset in webkit [283824] by Jonathan Bedard
  • 5 edits in trunk/Tools

[webkitcorepy] Not possible to autoinstall a package with micro version 0
https://bugs.webkit.org/show_bug.cgi?id=230540
<rdar://problem/83613371>

Reviewed by Michael Catanzaro.

  • Scripts/libraries/webkitcorepy/setup.py: Bump version.
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Ditto.
  • Scripts/libraries/webkitcorepy/webkitcorepy/tests/version_unittest.py:

(VersionTestCase.test_int_constructor): Default values are 'None.'

  • Scripts/libraries/webkitcorepy/webkitcorepy/version.py:

(Version.from_iterable):
(Version.init): Use 'None' as the default value instead of 0.
(Version.setitem): Support 'None' as a version value.
(Version.contains): Ditto.
(Version.hash): Ditto.
(Version.cmp): Ditto.

12:16 PM Changeset in webkit [283823] by Eric Hutchison
  • 2 edits in trunk/LayoutTests

[ iOS15 ] imported/blink/fast/dom/shadow/shadowdom-for-keygen-only-shadow.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=231444.

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
12:15 PM Changeset in webkit [283822] by Russell Epstein
  • 1 copy in tags/Safari-613.1.4

Tag Safari-613.1.4.

12:15 PM Changeset in webkit [283821] by Russell Epstein
  • 1 delete in tags/Safari-613.1.4

Delete tag.

12:11 PM Changeset in webkit [283820] by Russell Epstein
  • 9 edits in branches/safari-613.1.4-branch/Source/WebKit

Revert "Revert r283187. rdar://problem/83985586"

This reverts commit r283733.

12:10 PM Changeset in webkit [283819] by Russell Epstein
  • 2 edits in branches/safari-613.1.4-branch/Source/WTF

Cherry-pick r283811.

Disable SYSTEM_PREVIEW when UIKit internals is enabled
https://bugs.webkit.org/show_bug.cgi?id=231438
rdar://84019482

Reviewed by Tim Horton.

We're going to replace SystemPreview with the <model>
element, so disable it when UIKit internals are enabled.

  • wtf/PlatformUse.h:

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

12:01 PM Changeset in webkit [283818] by sbarati@apple.com
  • 3 edits
    1 add in trunk

RegExpExec can't statically prove which of the two structures it will get in AI by just looking at the RegExp*
https://bugs.webkit.org/show_bug.cgi?id=231382
<rdar://83722151>

Reviewed by Mark Lam.

JSTests:

  • stress/reg-exp-exec-cant-prove-which-structure-it-produces-in-ai.js: Added.

(foo):

Source/JavaScriptCore:

Because of the RegExp.prototype.compile API, we don't know if the RegExp
produced by RegExpExec will have indices or not, because that bit of
information can be reset by the RegExp.prototype.compile API. So, we
conservatively say that it can produce either structure.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

11:50 AM Changeset in webkit [283817] by Alan Coon
  • 2 edits in branches/safari-612-branch/LayoutTests

Cherry-pick r281611. rdar://problem/83955924

REGRESSION (r281516): [AppleSilicon WK2] fast/loader/reload-zero-byte-plugin.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=229532
<rdar://problem/82370692>

Unreviewed, temporarily skip the test on macOS WK2 while I investigate, so that the bots don't
complain.

  • platform/mac-wk2/TestExpectations:

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

11:50 AM Changeset in webkit [283816] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS Release & macOS wk2 ] http/wpt/mediarecorder/set-srcObject-MediaStream-Blob.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=231442

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
11:40 AM Changeset in webkit [283815] by Andres Gonzalez
  • 21 edits in trunk

AX: AXMathRootRadicand should return an array of elements, not just the first
https://bugs.webkit.org/show_bug.cgi?id=230986
<rdar://83688829>

Reviewed by Chris Fleizach.

Source/WebCore:

Tests: accessibility/mac/mathml-elements.html

accessibility/mac/mathml-root.html

Square root element radicand can be more than one element. For that
reason the return value of AXCoreObject::mathRadicand should be an
optional array of AX objects instead of a single object.

  • accessibility/AccessibilityMathMLElement.cpp:

(WebCore::AccessibilityMathMLElement::mathRadicand):
(WebCore::AccessibilityMathMLElement::mathRadicandObject): Renamed mathRadicand.

  • accessibility/AccessibilityMathMLElement.h:
  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityMathRadicand]):
(-[WebAccessibilityObjectWrapper accessibilityMathRadicandObject]): Renamed accessibilityMathRadicand.

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::mathRadicand):

  • accessibility/isolatedtree/AXIsolatedObject.h:
  • accessibility/isolatedtree/AXIsolatedTree.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

Tools:

Added AccessibilityUIElement::mathRootRadicand as a readonly property to
be used in LayoutTests.

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::mathRootRadicand const):

LayoutTests:

Instead of getting the root radicand as the first child of the root
element, use the readonly property mathRootRadicand.
Added a check for the length of the mathRootRadicand array.

  • accessibility/mac/mathml-elements-expected.txt:
  • accessibility/mac/mathml-elements.html:
  • accessibility/mac/mathml-root-expected.txt:
  • accessibility/mac/mathml-root.html:

Added the test case where the square root element has a radicand
consisting of more than one AX object.

  • platform/mac-wk1/TestExpectations:
11:32 AM Changeset in webkit [283814] by mmaxfield@apple.com
  • 4 edits in trunk/Source/WebKit

[GPU Process] Unique RenderingResourceIdentifiers Part 4: Migrate PendingWakeupInformation to QualifiedRenderingResourceIdentifier
https://bugs.webkit.org/show_bug.cgi?id=231406
<rdar://problem/84009999>

Reviewed by Wenson Hsieh.

This starts pushing QualifiedRenderingResourceIdentifier into a few more places. It's being pushed into
PendingWakeupInformation and RemoteImageBuffer. (I can't split this patch up any further because the
pieces intermingle.)

The next step is to push QualifiedRenderingResourceIdentifier down into RemoteResourceCache.

No new tests because there is no behavior change.

  • GPUProcess/graphics/RemoteImageBuffer.h:

(WebKit::RemoteImageBuffer::create):
(WebKit::RemoteImageBuffer::RemoteImageBuffer):

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::didCreateImageBufferBackend):
(WebKit::RemoteRenderingBackend::didFlush):
(WebKit::RemoteRenderingBackend::createImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::nextDestinationImageBufferAfterApplyingDisplayLists):
(WebKit::RemoteRenderingBackend::wakeUpAndApplyDisplayListWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::setNextItemBufferToRead):
(WebKit::RemoteRenderingBackend::cacheNativeImageWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::cacheFontWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::finalizeRenderingUpdate):
(WebKit::RemoteRenderingBackend::resumeFromPendingWakeupInformation):

  • GPUProcess/graphics/RemoteRenderingBackend.h:

(WebKit::RemoteRenderingBackend::PendingWakeupInformation::shouldPerformWakeup const):

11:08 AM Changeset in webkit [283813] by timothy_horton@apple.com
  • 4 edits in trunk/Source

defaultAlternateFormControlDesignEnabled() can't read UIUserInterfaceIdiom in the Web Content process
https://bugs.webkit.org/show_bug.cgi?id=231416
<rdar://problem/84009054>

Reviewed by Anders Carlsson.

Source/WebKit:

It turns out WebPreferences default getters are run in the Web Content process,
which is a problem for defaultAlternateFormControlDesignEnabled because
it needs to consult with application state.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setupPageConfiguration:]):
Explicitly initialize this preference in the UI process.

Source/WTF:

  • Scripts/Preferences/WebPreferences.yaml:

Remove the autogenerated default.

11:05 AM Changeset in webkit [283812] by Russell Epstein
  • 1 copy in tags/Safari-613.1.4

Tag Safari-613.1.4.

10:40 AM Changeset in webkit [283811] by dino@apple.com
  • 2 edits in trunk/Source/WTF

Disable SYSTEM_PREVIEW when UIKit internals is enabled
https://bugs.webkit.org/show_bug.cgi?id=231438
rdar://84019482

Reviewed by Tim Horton.

We're going to replace SystemPreview with the <model>
element, so disable it when UIKit internals are enabled.

  • wtf/PlatformUse.h:
9:49 AM Changeset in webkit [283810] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS 15 ] Rebaselining platform/ios/ios/fast/text/opticalFontWithWeight.html.
https://bugs.webkit.org/show_bug.cgi?id=231380

Unreviewed test gardening.

  • platform/ios/platform/ios/ios/fast/text/opticalFontWithWeight-expected.txt:
9:38 AM Changeset in webkit [283809] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

REGRESSION(r283802): broke Apple ports
https://bugs.webkit.org/show_bug.cgi?id=231434

Unreviewed, revert changes to TextChecker.h that broke the iOS build.

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-10-08

  • UIProcess/TextChecker.h:
9:37 AM Changeset in webkit [283808] by Antti Koivisto
  • 8 edits in trunk

Make WTF::IteratorRange reversible
https://bugs.webkit.org/show_bug.cgi?id=231415

Reviewed by Darin Adler.

Source/WebCore:

Replace a custom range type with the new reversible IteratorRange.

  • layout/integration/LayoutIntegrationInlineContent.cpp:

(WebCore::LayoutIntegration:: const):
(WebCore::LayoutIntegration::InlineContent::boxesForRect const): Deleted.

  • layout/integration/LayoutIntegrationInlineContent.h:

(WebCore::LayoutIntegration::InlineContent::BoxRange::begin const): Deleted.
(WebCore::LayoutIntegration::InlineContent::BoxRange::end const): Deleted.
(WebCore::LayoutIntegration::InlineContent::BoxRange::rbegin const): Deleted.
(WebCore::LayoutIntegration::InlineContent::BoxRange::rend const): Deleted.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::hitTest):

Source/WTF:

Also export some names out of the WTF namespace.

  • wtf/IteratorRange.h:

(WTF::IteratorRange::rbegin const):
(WTF::IteratorRange::rend const):

Tools:

  • TestWebKitAPI/Tests/WTF/IteratorRange.cpp:

(TestWebKitAPI::TEST):

9:32 AM Changeset in webkit [283807] by mmaxfield@apple.com
  • 3 edits in trunk/Source/WebKit

[GPU Process] Unique RenderingResourceIdentifiers Part 3: Uniquify in wakeUpAndApplyDisplayList
https://bugs.webkit.org/show_bug.cgi?id=231405
<rdar://problem/84008003>

Reviewed by Chris Dumez.

This simply applies the same treatment in https://commits.webkit.org/242676@main to
RemoteRenderingBackend::wakeUpAndApplyDisplayList(). This is being done in a follow-up
patch because it relies on https://bugs.webkit.org/show_bug.cgi?id=231403.

No new tests because there is no behavior change.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::wakeUpAndApplyDisplayList):
(WebKit::RemoteRenderingBackend::wakeUpAndApplyDisplayListWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::resumeFromPendingWakeupInformation):

  • GPUProcess/graphics/RemoteRenderingBackend.h:

(WebKit::RemoteRenderingBackend::PendingWakeupInformation::arguments const): Deleted.

9:16 AM Changeset in webkit [283806] by youenn@apple.com
  • 4 edits in trunk/Source/WebCore

https://webrtc.github.io/samples/src/content/getusermedia/getdisplaymedia/ is broken on Webkit ToT
https://bugs.webkit.org/show_bug.cgi?id=231426

Reviewed by Eric Carlson.

CGDisplayStreamScreenCaptureSource may start capturing with frameRate, width and height set to 0.
In that case, capture would fail, as examplified in https://webrtc.github.io/samples/src/content/getusermedia/getdisplaymedia/.
To ensure we have a frameRate value, we make sure to commit the configuration anytime we start producing data.
In case width and height are not set, thus are zero, we use the screen size.
Covered by existing tests through debug ASSERT in mock code.

  • platform/mediastream/mac/CGDisplayStreamScreenCaptureSource.mm:

(WebCore::CGDisplayStreamScreenCaptureSource::createDisplayStream):

  • platform/mediastream/mac/DisplayCaptureSourceMac.cpp:

(WebCore::DisplayCaptureSourceMac::startProducingData):

  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::MockDisplayCapturer::start):
(WebCore::MockDisplayCapturer::commitConfiguration):

9:05 AM Changeset in webkit [283805] by youenn@apple.com
  • 7 edits
    2 adds in trunk

Move deviceChange handling from CoreAudioSharedUnit to BaseAudioSharedUnit
https://bugs.webkit.org/show_bug.cgi?id=231284

Reviewed by Eric Carlson.

Source/WebCore:

Previously setting capture devices was done in CoreAudioSharedUnit and MockAudioSharedUnit.
Detection of missing devices was done in CoreAudioSharedUnit.
Move this code to BaseAudioSharedUnit and add a test based on mock to cover this code.

Test: fast/mediastream/microphone-change-while-capturing.html

  • platform/mediastream/mac/BaseAudioSharedUnit.cpp:

(WebCore::BaseAudioSharedUnit::prepareForNewCapture):
(WebCore::BaseAudioSharedUnit::setCaptureDevice):
(WebCore::BaseAudioSharedUnit::devicesChanged):
(WebCore::BaseAudioSharedUnit::captureFailed):

  • platform/mediastream/mac/BaseAudioSharedUnit.h:

(WebCore::BaseAudioSharedUnit::persistentID const):
(WebCore::BaseAudioSharedUnit::captureDeviceID const):

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioSharedUnit::captureDeviceChanged):
(WebCore::CoreAudioSharedUnit::setupAudioUnit):
(WebCore::CoreAudioSharedUnit::setCaptureDevice): Deleted.
(WebCore::CoreAudioSharedUnit::devicesChanged): Deleted.

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

(WebCore::MockAudioSharedUnit::resetSampleRate):
(WebCore::MockAudioSharedUnit::captureDeviceChanged):
(WebCore::MockAudioSharedUnit::setCaptureDevice): Deleted.

LayoutTests:

  • fast/mediastream/microphone-change-while-capturing-expected.txt: Added.
  • fast/mediastream/microphone-change-while-capturing.html: Added.
8:51 AM Changeset in webkit [283804] by Ayumi Kojima
  • 2 edits in trunk/LayoutTests

[ iOS14 EWS ] http/tests/privateClickMeasurement/attribution-conversion-through-fetch-keepalive.html is a flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=231431

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
8:44 AM Changeset in webkit [283803] by Antti Koivisto
  • 7 edits
    5 adds in trunk

REGRESSION (r277818): XHR with requestType document broken for larger HTML files
https://bugs.webkit.org/show_bug.cgi?id=231138
<rdar://problem/83823282>

Reviewed by Darin Adler.

Source/WebCore:

The parser may end up yielding during XHR or DOMParser parsing even though those should be
synchronous. This appears to be a long standing bug that was made more visible by r277818
because it makes the parser yield more eagerly. This only affects cases where the document
being parsed contains <script> tags as those are considered potential yield points.

Tests: http/tests/xmlhttprequest/xhr-and-parse-large-document.html

http/tests/xmlhttprequest/xhr-large-document.html

  • dom/Document.cpp:

(WebCore::Document::setContent):

Explicitly parse synchronously. The comment was wrong, nothing forces parser flushing on close().

  • dom/DocumentParser.h:

(WebCore::DocumentParser::appendSynchronously):

  • html/parser/HTMLDocumentParser.cpp:

(WebCore::HTMLDocumentParser::append):
(WebCore::HTMLDocumentParser::appendSynchronously):

  • html/parser/HTMLDocumentParser.h:
  • html/parser/HTMLParserScheduler.cpp:

(WebCore::HTMLParserScheduler::shouldYieldBeforeExecutingScript):

Also avoid script yielding if script execution is not allowed.

LayoutTests:

  • http/tests/xmlhttprequest/resources/large-html-with-script-tags.py: Added.
  • http/tests/xmlhttprequest/xhr-and-parse-large-document-expected.txt: Added.
  • http/tests/xmlhttprequest/xhr-and-parse-large-document.html: Added.
  • http/tests/xmlhttprequest/xhr-large-document-expected.txt: Added.
  • http/tests/xmlhttprequest/xhr-large-document.html: Added.
8:33 AM Changeset in webkit [283802] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit

[WPE][Qt] API export fixes
https://bugs.webkit.org/show_bug.cgi?id=231430

Patch by Philippe Normand <pnormand@igalia.com> on 2021-10-08
Reviewed by Michael Catanzaro.

Remove internal WebKit API (GRefPtr) from the public QtWPE API, and export classes exposing
the public QtWPE API.

  • UIProcess/API/wpe/qt/WPEQtView.cpp:

(WPEQtView::~WPEQtView):
(WPEQtView::createWebView):
(WPEQtView::url const):
(WPEQtView::setUrl):
(WPEQtView::loadProgress const):
(WPEQtView::title const):
(WPEQtView::canGoBack const):
(WPEQtView::isLoading const):
(WPEQtView::canGoForward const):
(WPEQtView::goBack):
(WPEQtView::goForward):
(WPEQtView::reload):
(WPEQtView::stop):
(WPEQtView::loadHtml):
(WPEQtView::runJavaScript):

  • UIProcess/API/wpe/qt/WPEQtView.h:

(): Deleted.
(WPEQtView::triggerUpdate): Deleted.
(WPEQtView::errorOccured const): Deleted.
(WPEQtView::setErrorOccured): Deleted.

  • UIProcess/API/wpe/qt/WPEQtViewLoadRequest.h:
  • UIProcess/TextChecker.h:
8:08 AM Changeset in webkit [283801] by Claudio Saavedra
  • 3 edits in trunk/Source/WebCore

[LibWPE] Do not destroy EGL backend if not created
https://bugs.webkit.org/show_bug.cgi?id=224309

Reviewed by Carlos Garcia Campos.

about:gpu will create a PlatformDisplay to fill in GPU
information, but this doesn't call
LibWPEPlatformDisplay::initialize() as it doesn't need to, so the
backend member is not initialized. Make sure that the backend is
not a nullptr before attempting to destroy it when the display is
destroyed.

  • platform/graphics/libwpe/PlatformDisplayLibWPE.cpp:

(WebCore::PlatformDisplayLibWPE::~PlatformDisplayLibWPE):

  • platform/graphics/libwpe/PlatformDisplayLibWPE.h:
7:44 AM Changeset in webkit [283800] by svillar@igalia.com
  • 1 edit
    1 add in trunk/LayoutTests

[GTK] web-platform-tests/css/css-flexbox/text-as-flexitem-size-001.html is failing
https://bugs.webkit.org/show_bug.cgi?id=231429

Unreviewed gardening. Adding GTK expectations for a test that has been failing since it was imported.

  • platform/gtk/imported/w3c/web-platform-tests/css/css-flexbox/text-as-flexitem-size-001-expected.txt: Added.
7:34 AM Changeset in webkit [283799] by commit-queue@webkit.org
  • 7 edits
    3 adds in trunk

AX: Expose the URL attribute of <video> elements
https://bugs.webkit.org/show_bug.cgi?id=231384

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-10-08
Reviewed by Chris Fleizach.

Source/WebCore:

Expose URL attribute for <video> accessibility elements.

Test: accessibility/video-element-url-attribute.html

  • accessibility/AccessibilityObjectInterface.h:

(WebCore::AXCoreObject::isVideo const): Added.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::url const):
Return the currentSrc of video elements.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

Mark the URL attribute as supported for video elements.

LayoutTests:

Add test ensuring <video> accessibility elements return
a URL attribute when appropriate.

  • accessibility/resources/test.mp4: Added.
  • accessibility/video-element-url-attribute-expected.txt: Added.
  • accessibility/video-element-url-attribute.html: Added.
  • platform/ios/TestExpectations: Enable new test.
  • platform/win/TestExpectations: Skip new test due to lack of mp4

support.

7:21 AM Changeset in webkit [283798] by commit-queue@webkit.org
  • 237 edits
    5 copies
    47 adds
    3 deletes in trunk

[WebDriver] Update w3c and selenium tests
https://bugs.webkit.org/show_bug.cgi?id=230551
<rdar://problem/83620518>

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-10-08
Reviewed by Jonathan Bedard.

Tools:

  • CISupport/build-webkit-org/steps.py:

(RunWebDriverTests): Run run-webdriver-tests with python3.

  • Scripts/run-webdriver-tests: Run with python3.
  • Scripts/webkitpy/init.py: Use a newer version of pytest and its dependencies to match what tests expect.
  • Scripts/webkitpy/webdriver_tests/pytest_runner.py:

(collect): Use contextlib to redirect stdout to /dev/null while collecting tests.
(run): Use ExitCode new enum added to pytest.

  • Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py:

(WebDriverSeleniumExecutor.init): Do not encode paths.

  • Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py:

(WebDriverTestRunnerSelenium.collect_tests): Use items() instead of iteritems() that doesn't exist in python3.

  • Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py:

(WebKitDriverServer.init):
(WebDriverW3CExecutor.init):
(WebDriverW3CExecutor.setup):
(WebDriverW3CExecutor._runner):

WebDriverTests:

  • imported/selenium/common/src/web/javascriptPage.html:
  • imported/selenium/importer.json:
  • imported/selenium/py/:
  • imported/w3c/importer.json:
  • imported/w3c/tools/:
  • imported/w3c/webdriver/:
5:30 AM Changeset in webkit [283797] by youenn@apple.com
  • 4 edits in trunk/Source/WebKit

Bind the number of WebRTC sockets opened per process
https://bugs.webkit.org/show_bug.cgi?id=231171

Reviewed by Alex Christensen.

Migrate from HashMap to StdMap so that we can keep the order based on socket identifiers.
Take benefit of the ordering so that, above a certain size, we get the oldest socket, close it and remove it from the map.
We set the maximum size to 256 sockets per process.
Fix a potential bug in NetworkRTCTCPSocketCocoa to ensure we remove the socket from the map even if the nw connection is not live.
Manually tested.

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:
  • NetworkProcess/webrtc/NetworkRTCProvider.h:
  • NetworkProcess/webrtc/NetworkRTCTCPSocketCocoa.mm:
3:02 AM Changeset in webkit [283796] by youenn@apple.com
  • 16 edits in trunk

Add support for processing push events without service worker clients
https://bugs.webkit.org/show_bug.cgi?id=231285

Reviewed by Chris Dumez.

Source/WebCore:

Covered by API test.

  • workers/service/server/SWServer.cpp:

Add a timer to terminate service worker if a push message is not processed with a given number of seconds.
The timer value is the default termination delay or 1 second for testing.

Source/WebKit:

When firing a push event, ask UIProcess to take a background assertion for the process running the service worker.
We use a counter based approach to take/dispose of the backgorund assertion.

  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:
  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/WebProcessProxy.cpp:
  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:
  • UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm:
1:25 AM Changeset in webkit [283795] by ntim@apple.com
  • 6 edits
    4 adds
    5 deletes in trunk/LayoutTests

Re-sync the-dialog-element and inert WPT from upstream
https://bugs.webkit.org/show_bug.cgi?id=231392

Reviewed by Youenn Fablet.

Upstream commit: https://github.com/web-platform-tests/wpt/commit/a44515b7c7774abf1256f488bf0e9dc02459fced

LayoutTests/imported/w3c:

  • resources/resource-files.json:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-inert.tentative-expected.txt: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-inert.tentative.html: Added.
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/w3c-import.log:
  • web-platform-tests/inert/frame/button.html: Removed.
  • web-platform-tests/inert/frame/w3c-import.log: Removed.
  • web-platform-tests/inert/inert-computed-style-expected.txt: Added.
  • web-platform-tests/inert/inert-computed-style.html: Added.
  • web-platform-tests/inert/inert-retargeting-iframe.tentative.html: Removed.
  • web-platform-tests/inert/inert-retargeting.tentative.html: Removed.
  • web-platform-tests/inert/w3c-import.log:

LayoutTests:

  • TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/inert/inert-retargeting-iframe.tentative-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/inert/inert-retargeting-iframe.tentative-expected.txt: Removed.
12:57 AM Changeset in webkit [283794] by mmaxfield@apple.com
  • 3 edits
    4 adds in trunk

font-families inside @font-palette-values need to be case insensitive
https://bugs.webkit.org/show_bug.cgi?id=231215
<rdar://problem/83871643>

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-fonts/font-palette-33-expected.html: Added.
  • web-platform-tests/css/css-fonts/font-palette-33.html: Added.
  • web-platform-tests/css/css-fonts/font-palette-34-expected.html: Added.
  • web-platform-tests/css/css-fonts/font-palette-34.html: Added.

Source/WebCore:

https://drafts.csswg.org/css-fonts-4/#font-family-2-desc says:

The value of this descriptor matches the definition of the <family-name> for the font-family property.

Tests: imported/w3c/web-platform-tests/css/css-fonts/font-palette-33.html

imported/w3c/web-platform-tests/css/css-fonts/font-palette-34.html

  • css/CSSFontSelector.h:
Note: See TracTimeline for information about the timeline view.