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

Timeline



Apr 4, 2022:

11:54 PM Changeset in webkit [292377] by zandobersek@gmail.com
  • 7 edits in trunk/Source/WebCore

[GTK][WPE] Use UnixFileDescriptor in DMABufObject, DMABufReleaseFlag
https://bugs.webkit.org/show_bug.cgi?id=238733

Reviewed by Adrian Perez de Castro.

Replace integer values for file descriptors in the DMABufObject and
DMABufReleaseFlag structs with UnixFileDescriptors. This enables
simply defaulting the destructors and the move constructors and
assignment operatos for the two types since the fd wrapper takes care
of these operations.

Additionally, when constructing the UnixFileDescriptor objects from
file descriptors coming from different sources, we can more easily
adapt to the need for either adoption or duplication of the passed-in
file descriptor right there in the constructor invocation.

  • platform/graphics/gbm/DMABufObject.h:

(WebCore::DMABufObject::~DMABufObject): Deleted.
(WebCore::DMABufObject::operator=): Deleted.

  • platform/graphics/gbm/DMABufReleaseFlag.h:

(WebCore::DMABufReleaseFlag::DMABufReleaseFlag):
(WebCore::DMABufReleaseFlag::dup const):
(WebCore::DMABufReleaseFlag::released const):
(WebCore::DMABufReleaseFlag::release):
(WebCore::DMABufReleaseFlag::~DMABufReleaseFlag): Deleted.
(WebCore::DMABufReleaseFlag::operator=): Deleted.

  • platform/graphics/gbm/GBMBufferSwapchain.cpp:

(WebCore::GBMBufferSwapchain::Buffer::createDMABufObject const):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::pushDMABufToCompositor):

  • platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::makeContextCurrent):

  • platform/graphics/texmap/TextureMapperPlatformLayerProxyDMABuf.cpp:

(WebCore::TextureMapperPlatformLayerProxyDMABuf::DMABufLayer::createEGLImageData):

10:38 PM Changeset in webkit [292376] by Ziran Sun
  • 7 edits
    2 deletes in trunk

[Forms] change the default appearance of button, checkbox etc. to 'auto'
https://bugs.webkit.org/show_bug.cgi?id=236012

Reviewed by Tim Nguyen.

LayoutTests/imported/w3c:

  • web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt:

Source/WebCore:

Change the default appearance of a few element to 'auto'.
This shouldn't change rendering behavior, but changes

LayoutTests:

  • platform/ios-wk2/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt: Removed.
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/rendering/widgets/appearance/default-styles-expected.txt: Removed.
10:36 PM Changeset in webkit [292375] by Antti Koivisto
  • 7 edits in trunk/Source/WebCore

[CSS Container Queries] Simplify grammar
https://bugs.webkit.org/show_bug.cgi?id=238732

Reviewed by Sam Weinig.

Because size() function syntax is no longer supported, separate SizeQuery and SizeCondition productions
are no longer needed.

Some slightly unnecessary templatization is retained to help with future work.

  • css/ContainerQuery.cpp:
  • css/ContainerQuery.h:
  • css/ContainerQueryParser.cpp:

(WebCore::ContainerQueryParser::consumeContainerQuery):
(WebCore::ContainerQueryParser::consumeCondition):
(WebCore::ContainerQueryParser::consumeSizeFeature):
(WebCore::ContainerQueryParser::consumePlainSizeFeature):
(WebCore::ContainerQueryParser::consumeSizeQuery): Deleted.

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

(WebCore::Style::ContainerQueryEvaluator::evaluateQuery const):

  • style/ContainerQueryEvaluator.h:
10:20 PM Changeset in webkit [292374] by ysuzuki@apple.com
  • 4 edits in trunk/Source/bmalloc

[libpas] Do not need to call pthread_set_qos_class_self_np repeatedly
https://bugs.webkit.org/show_bug.cgi?id=238785

Reviewed by Mark Lam.

Let's remember previously set QOS class and avoid resetting it if the value is not changed.

  • bmalloc/bmalloc.cpp:

(bmalloc::api::setScavengerThreadQOSClass):

  • libpas/src/libpas/pas_scavenger.c:

(pas_scavenger_set_requested_qos_class):
(scavenger_thread_main):

  • libpas/src/libpas/pas_scavenger.h:
9:18 PM Changeset in webkit [292373] by ysuzuki@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Reduce sizeof(BaselineCallLinkInfo) to make bug 238535 good
https://bugs.webkit.org/show_bug.cgi?id=238777

Reviewed by Mark Lam.

https://bugs.webkit.org/show_bug.cgi?id=238535 adds one pointer to CallLinkInfo.
To make BaselineCallLinkInfo small, this patch removes std::unique_ptr<CallFrameShuffleData>
in BaselineCallLinkInfo since it can be computed in repatching code.

  • bytecode/CallLinkInfo.cpp:

(JSC::BaselineCallLinkInfo::initialize):
(JSC::OptimizingCallLinkInfo::setFrameShuffleData):
(JSC::CallLinkInfo::setFrameShuffleData): Deleted.

  • bytecode/CallLinkInfo.h:

(JSC::CallLinkInfo::frameShuffleData): Deleted.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):

  • bytecode/Repatch.cpp:

(JSC::linkPolymorphicCall):

9:10 PM Changeset in webkit [292372] by ysuzuki@apple.com
  • 29 edits in trunk/Source/JavaScriptCore

[JSC] Store CodeBlock in caller side
https://bugs.webkit.org/show_bug.cgi?id=238535

Reviewed by Saam Barati.

This patch changes the calling convention of JS functions. Now, we need to store CodeBlock to the stack in the caller side instead.
This helps LLInt, unlinked Baseline, and DFG since we no longer need to load CodeBlock from callee via costly dependent loads: unlinked
ones cannot embed CodeBlock raw pointer into the machine code itself. So we needed to load it from callee. But now, caller puts the
right CodeBlock pointer into the stack so we do not need that code. And in most cases, caller already knows CodeBlock since it is tied
to actually used machine code pointer.
OSR entry also materializes CodeBlock in the stack in the OSR entry side instead of doing it in the callee side.

This contributes to 0.3% progression in Speedometer2.

  • assembler/CPU.h:

(JSC::prologueStackPointerDelta):

  • bytecode/CallLinkInfo.cpp:

(JSC::CallLinkInfo::setMonomorphicCallee):
(JSC::CallLinkInfo::clearCallee):
(JSC::CallLinkInfo::revertCallToStub):
(JSC::CallLinkInfo::emitFastPathImpl):
(JSC::CallLinkInfo::setStub):
(JSC::OptimizingCallLinkInfo::emitDirectFastPath):
(JSC::OptimizingCallLinkInfo::emitDirectTailCallFastPath):
(JSC::OptimizingCallLinkInfo::initializeDirectCall):
(JSC::OptimizingCallLinkInfo::setDirectCallTarget):

  • bytecode/CallLinkInfo.h:

(JSC::CallLinkInfo::offsetOfCodeBlock):

  • bytecode/Repatch.cpp:

(JSC::linkMonomorphicCall):
(JSC::linkDirectCall):
(JSC::linkPolymorphicCall):

  • bytecode/RepatchInlines.h:

(JSC::virtualForWithFunction):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compileEntry):

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::prepareOSREntry):
(JSC::DFG::prepareCatchOSREntry):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileCurrentBlock):

  • dfg/DFGThunks.cpp:

(JSC::DFG::osrEntryThunkGenerator):

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

(JSC::FTL::link):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::lower):

  • interpreter/CallFrame.h:
  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::calleeFrameCodeBlockBeforeCall):
(JSC::AssemblyHelpers::calleeFrameCodeBlockBeforeTailCall):
(JSC::AssemblyHelpers::prologueStackPointerDelta): Deleted.

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::prepareForTailCallSlow):

  • jit/JIT.cpp:

(JSC::JIT::compileAndLinkWithoutFinalizing):
(JSC::JIT::emitPutCodeBlockToFrameInPrologue): Deleted.

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

(JSC::JSC_DEFINE_JIT_OPERATION):

  • jit/JITOperations.h:
  • jit/ThunkGenerators.cpp:

(JSC::virtualThunkFor):
(JSC::boundFunctionCallGenerator):
(JSC::remoteFunctionCallGenerator):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • llint/WebAssembly.asm:
  • runtime/FunctionExecutable.h:
  • runtime/JSCast.h:
  • runtime/VM.cpp:

(JSC::VM::getRemoteFunction):

  • wasm/WasmOperations.cpp:

(JSC::Wasm::doOSREntry):

8:59 PM Changeset in webkit [292371] by timothy_horton@apple.com
  • 2 edits
    3 deletes in trunk/Source/WebKit

Stop generating WebKit system feature flags plists
https://bugs.webkit.org/show_bug.cgi?id=238784

Reviewed by Wenson Hsieh.

  • FeatureFlags/WebKit-appletvos.plist: Removed.
  • FeatureFlags/WebKit-ios.plist: Removed.
  • FeatureFlags/WebKit-macos.plist: Removed.
  • FeatureFlags/WebKit-watchos.plist: Removed.
  • Scripts/combine-feature-flags-plist.py: Removed.
  • Scripts/generate-feature-flags-plist.sh: Removed.
  • WebKit.xcodeproj/project.pbxproj:
8:46 PM Changeset in webkit [292370] by Chris Dumez
  • 17 edits in trunk/Source/WebCore

Avoid repeated calls to WebCore::eventNames()
https://bugs.webkit.org/show_bug.cgi?id=238773

Reviewed by Geoffrey Garen.

Avoid repeated calls to WebCore::eventNames() by caching it where appropriate.
WebCore::eventNames() calls pthread_get_specific.

  • dom/Element.cpp:

(WebCore::isCompatibilityMouseEvent):

  • dom/EventContext.cpp:

(WebCore::EventContext::handleLocalEvents const):

  • dom/EventTarget.cpp:

(WebCore::legacyType):
(WebCore::EventTarget::removeAllEventListeners):

  • dom/MouseEvent.cpp:

(WebCore::MouseEvent::toElement const):
(WebCore::MouseEvent::fromElement const):

  • dom/Node.cpp:

(WebCore::Node::moveNodeToNewDocument):
(WebCore::tryAddEventListener):
(WebCore::tryRemoveEventListener):
(WebCore::Node::defaultEventHandler):
(WebCore::Node::willRespondToMouseMoveEvents):
(WebCore::Node::willRespondToTouchEvents):
(WebCore::Node::willRespondToMouseClickEvents):

  • dom/PointerEvent.h:

(WebCore::PointerEvent::typeIsEnterOrLeave):

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::defaultEventHandler):

  • html/HTMLButtonElement.cpp:

(WebCore::HTMLButtonElement::defaultEventHandler):

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::willDispatchEvent):

  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::menuListDefaultEventHandler):
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler):

  • html/HTMLSummaryElement.cpp:

(WebCore::HTMLSummaryElement::defaultEventHandler):

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::forwardEvent):

  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::forwardEvent):

  • html/shadow/SliderThumbElement.cpp:

(WebCore::SliderThumbElement::handleTouchEvent):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
(WebCore::DOMWindow::addEventListener):
(WebCore::DOMWindow::deviceOrientationController const): Deleted.
(WebCore::DOMWindow::deviceMotionController const): Deleted.
(WebCore::DOMWindow::isAllowedToUseDeviceMotionOrOrientation const): Deleted.
(WebCore::DOMWindow::isAllowedToUseDeviceMotion const): Deleted.
(WebCore::DOMWindow::isAllowedToUseDeviceOrientation const): Deleted.
(WebCore::DOMWindow::hasPermissionToReceiveDeviceMotionOrOrientationEvents const): Deleted.
(WebCore::DOMWindow::startListeningForDeviceOrientationIfNecessary): Deleted.
(WebCore::DOMWindow::stopListeningForDeviceOrientationIfNecessary): Deleted.
(WebCore::DOMWindow::startListeningForDeviceMotionIfNecessary): Deleted.
(WebCore::DOMWindow::stopListeningForDeviceMotionIfNecessary): Deleted.
(WebCore::DOMWindow::failedToRegisterDeviceMotionEventListener): Deleted.
(WebCore::DOMWindow::incrementScrollEventListenersCount): Deleted.
(WebCore::DOMWindow::decrementScrollEventListenersCount): Deleted.
(WebCore::DOMWindow::resetAllGeolocationPermission): Deleted.
(WebCore::DOMWindow::removeEventListener): Deleted.
(WebCore::DOMWindow::languagesChanged): Deleted.
(WebCore::DOMWindow::dispatchLoadEvent): Deleted.
(WebCore::DOMWindow::dispatchEvent): Deleted.
(WebCore::DOMWindow::removeAllEventListeners): Deleted.
(WebCore::DOMWindow::captureEvents): Deleted.
(WebCore::DOMWindow::releaseEvents): Deleted.
(WebCore::DOMWindow::finishedLoading): Deleted.
(WebCore::DOMWindow::setLocation): Deleted.
(WebCore::DOMWindow::printErrorMessage const): Deleted.
(WebCore::DOMWindow::crossDomainAccessErrorMessage): Deleted.
(WebCore::DOMWindow::isInsecureScriptAccess): Deleted.
(WebCore::DOMWindow::createWindow): Deleted.
(WebCore::DOMWindow::open): Deleted.
(WebCore::DOMWindow::showModalDialog): Deleted.
(WebCore::DOMWindow::enableSuddenTermination): Deleted.
(WebCore::DOMWindow::disableSuddenTermination): Deleted.
(WebCore::DOMWindow::frame const): Deleted.
(WebCore::DOMWindow::eventListenersDidChange): Deleted.

  • page/EventHandler.cpp:

(WebCore::EventHandler::updateMouseEventTargetNode):
(WebCore::EventHandler::isKeyboardOptionTab):

8:32 PM Changeset in webkit [292369] by sbarati@apple.com
  • 10 edits in trunk

Turn off LLInt ICs in captive portal mode
https://bugs.webkit.org/show_bug.cgi?id=238778
<rdar://84830873>

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

  • bytecode/CallLinkInfo.cpp:

(JSC::BaselineCallLinkInfo::initialize):

  • bytecode/Repatch.cpp:

(JSC::unlinkCall):

  • llint/LLIntCommon.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::performLLIntGetByID):

  • runtime/OptionsList.h:

Source/WebKit:

  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:

(WebKit::XPCServiceInitializer):

Tools:

  • Scripts/run-jsc-stress-tests:
8:29 PM Changeset in webkit [292368] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebGPU

[WebGPU] Fix Apple's internal build
https://bugs.webkit.org/show_bug.cgi?id=238786
<rdar://problem/91271543>

Unreviewed build fix.

Copy FRAMEWORK_SEARCH_PATHS and SYSTEM_FRAMEWORK_SEARCH_PATHS from WebCore.xcconfig.

  • Configurations/WebGPU.xcconfig:
8:01 PM Changeset in webkit [292367] by Adrian Perez de Castro
  • 9 edits in trunk/Source/WebKit

[WPE][GTK] Fix code examples in reference documentation
https://bugs.webkit.org/show_bug.cgi?id=238770

Reviewed by Michael Catanzaro.

Replace DocBook SGML tags containing code examples with Markdown fenced code blocks
as consumed by gi-docgen.

  • UIProcess/API/glib/WebKitSettings.cpp:
  • UIProcess/API/glib/WebKitUserContentManager.cpp:
  • UIProcess/API/glib/WebKitWebContext.cpp:
  • UIProcess/API/glib/WebKitWebView.cpp:

(webkit_web_view_class_init):

  • UIProcess/API/glib/WebKitWebsitePolicies.cpp:
  • UIProcess/API/gtk/WebKitWebInspector.cpp:
  • UIProcess/API/gtk/WebKitWebViewGtk.cpp:
  • WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp:
7:42 PM Changeset in webkit [292366] by Simon Fraser
  • 2 edits in trunk/Source/WebKit

Fix the CG_DISPLAY_LIST_BACKED_IMAGE_BUFFER build
https://bugs.webkit.org/show_bug.cgi?id=238783

Unreviewed build fix.

ConcreteImageBuffer<>::create() needs a default CreationContext argument.

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::ensureFrontBuffer):

7:09 PM Changeset in webkit [292365] by timothy_horton@apple.com
  • 10 edits in trunk/Source

Remove GPU process system feature flags
https://bugs.webkit.org/show_bug.cgi?id=238766

Reviewed by Simon Fraser.

Source/WebKit:

  • FeatureFlags/WebKit-appletvos.plist:
  • FeatureFlags/WebKit-ios.plist:
  • FeatureFlags/WebKit-macos.plist:
  • FeatureFlags/WebKit-watchos.plist:
  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultCaptureAudioInGPUProcessEnabled):
(WebKit::defaultUseGPUProcessForCanvasRenderingEnabled): Deleted.
(WebKit::defaultUseGPUProcessForDOMRenderingEnabled): Deleted.
(WebKit::defaultUseGPUProcessForMediaEnabled): Deleted.
(WebKit::defaultUseGPUProcessForWebGLEnabled): Deleted.
(WebKit::defaultCaptureVideoInGPUProcessEnabled): Deleted.
(WebKit::defaultWebRTCCodecsInGPUProcess): Deleted.

  • Shared/WebPreferencesDefaultValues.h:

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
  • Scripts/Preferences/WebPreferencesInternal.yaml:
7:06 PM Changeset in webkit [292364] by Said Abou-Hallawa
  • 29 edits
    1 add in trunk/Source/WebCore

[GPU Process] CSSFilter should be created only at the painting time
https://bugs.webkit.org/show_bug.cgi?id=236574
rdar://89210004

Reviewed by Simon Fraser.

Instead of building the whole filter chain to get the filter outsets at
the layout time, we can use the SVGFilterPrimitiveStandardAttributes and
the FilterOperation super classes to get their outsets without having to
build the FilterEffects.

CSSFilter::calculateOutsets() is a static method which will loop through
the FilterOperations and will add up the outsets of the blur, the drop-
shadow and the reference FilterOperation.

SVGFilterBuilder::calculateFilterOutsets() will loop through the primitives
of the filter element and will call the new virtual method outsets() which
will call a static method in the corresponding FilterEffect.

FEDropShadow, FEGaussianBlur and FEOffset will be provide static methods
for calculating the effect outsets. These static methods will be called
from CSSFilter::calculateOutsets() and from the SVGFExxxElements.

To remove the duplication of the code from SVGFilterBuilder::
buildFilterEffects() and calculateFilterOutsets(), a new template class
named SVGFilterGraph will be introduced. It represents the graph of the
SVGFilter. The nodes of this graph will be of type FilterEffecct when
it is used to build the SVGFilterExpression. The nodes will be of type
SVGFilterPrimitiveStandardAttributes when it is used to calculate the
filter outsets.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/filters/FEDropShadow.cpp:

(WebCore::FEDropShadow::calculateOutsets):
(WebCore::FEDropShadow::outsets const): Deleted.

  • platform/graphics/filters/FEDropShadow.h:
  • platform/graphics/filters/FEGaussianBlur.cpp:

(WebCore::FEGaussianBlur::calculateOutsets):
(WebCore::FEGaussianBlur::outsets const): Deleted.

  • platform/graphics/filters/FEGaussianBlur.h:
  • platform/graphics/filters/FEOffset.cpp:

(WebCore::FEOffset::calculateOutsets):
(WebCore::FEOffset::outsets const): Deleted.

  • platform/graphics/filters/FEOffset.h:
  • platform/graphics/filters/Filter.h:
  • platform/graphics/filters/FilterFunction.h:

(WebCore::FilterFunction::apply):
(WebCore::FilterFunction::outsets const): Deleted.

  • rendering/CSSFilter.cpp:

(WebCore::calculateBlurEffectOutsets):
(WebCore::calculateDropShadowEffectOutsets):
(WebCore::referenceFilterElement):
(WebCore::calculateReferenceFilterOutsets):
(WebCore::createReferenceFilter):
(WebCore::CSSFilter::buildFilterFunctions):
(WebCore::CSSFilter::calculateOutsets):
(WebCore::createSVGFilter): Deleted.
(WebCore::CSSFilter::outsets const): Deleted.

  • rendering/CSSFilter.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::filtersForPainting const):
(WebCore::RenderLayer::calculateClipRects const):

  • rendering/RenderLayerFilters.cpp:

(WebCore::RenderLayerFilters::calculateOutsets):
(WebCore::RenderLayerFilters::beginFilterEffect):
(WebCore::RenderLayerFilters::setFilter): Deleted.
(WebCore::RenderLayerFilters::buildFilter): Deleted.

  • rendering/RenderLayerFilters.h:
  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::applyResource):

  • rendering/svg/SVGRenderTreeAsText.cpp:

(WebCore::writeSVGResourceContainer):

  • svg/SVGFEDropShadowElement.cpp:

(WebCore::SVGFEDropShadowElement::outsets const):

  • svg/SVGFEDropShadowElement.h:
  • svg/SVGFEGaussianBlurElement.cpp:

(WebCore::SVGFEGaussianBlurElement::outsets const):

  • svg/SVGFEGaussianBlurElement.h:
  • svg/SVGFEOffsetElement.cpp:

(WebCore::SVGFEOffsetElement::outsets const):

  • svg/SVGFEOffsetElement.h:
  • svg/SVGFilterPrimitiveStandardAttributes.h:

(WebCore::SVGFilterPrimitiveStandardAttributes::outsets const):

  • svg/graphics/filters/SVGFilter.cpp:

(WebCore::SVGFilter::create):
(WebCore::SVGFilter::calculateResolvedSize):
(WebCore::SVGFilter::resolvedSize const):
(WebCore::SVGFilter::outsets const): Deleted.

  • svg/graphics/filters/SVGFilter.h:
  • svg/graphics/filters/SVGFilterBuilder.cpp:

(WebCore::SVGFilterBuilder::SVGFilterBuilder):
(WebCore::appendEffectToExpression):
(WebCore::appendGraphToExpression):
(WebCore::SVGFilterBuilder::buildFilterExpression):
(WebCore::calculatePrimitiveOutsets):
(WebCore::calculateGraphOutsets):
(WebCore::SVGFilterBuilder::calculateFilterOutsets):
(WebCore::SVGFilterBuilder::setupBuiltinEffects): Deleted.
(WebCore::SVGFilterBuilder::buildFilterEffects): Deleted.
(WebCore::SVGFilterBuilder::sourceGraphic const): Deleted.
(WebCore::SVGFilterBuilder::sourceAlpha const): Deleted.
(WebCore::SVGFilterBuilder::addNamedEffect): Deleted.
(WebCore::SVGFilterBuilder::namedEffect const): Deleted.
(WebCore::SVGFilterBuilder::namedEffects const): Deleted.
(WebCore::SVGFilterBuilder::setEffectInputs): Deleted.
(WebCore::SVGFilterBuilder::appendEffectToEffectRenderer): Deleted.
(WebCore::SVGFilterBuilder::effectGeometry const): Deleted.
(WebCore::SVGFilterBuilder::buildEffectExpression const): Deleted.
(WebCore::SVGFilterBuilder::buildExpression const): Deleted.

  • svg/graphics/filters/SVGFilterBuilder.h:

(WebCore::SVGFilterBuilder::targetBoundingBox const):
(WebCore::SVGFilterBuilder::primitiveUnits const):
(WebCore::SVGFilterBuilder::effectByRenderer):
(WebCore::SVGFilterBuilder::setTargetBoundingBox): Deleted.
(WebCore::SVGFilterBuilder::setPrimitiveUnits): Deleted.

  • svg/graphics/filters/SVGFilterExpression.h:
  • svg/graphics/filters/SVGFilterGraph.h: Added.

(WebCore::SVGFilterGraph::SVGFilterGraph):
(WebCore::SVGFilterGraph::sourceGraphic const):
(WebCore::SVGFilterGraph::sourceAlpha const):
(WebCore::SVGFilterGraph::addNamedNode):
(WebCore::SVGFilterGraph::getNamedNode const):
(WebCore::SVGFilterGraph::getNamedNodes const):
(WebCore::SVGFilterGraph::setNodeInputs):
(WebCore::SVGFilterGraph::getNodeInputs const):
(WebCore::SVGFilterGraph::lastNode const):

7:03 PM Changeset in webkit [292363] by Simon Fraser
  • 2 edits in trunk/Source/WebKit

Remove lots of WebCore:: in RemoteLayerBackingStore
https://bugs.webkit.org/show_bug.cgi?id=238765

Reviewed by Wenson Hsieh.

Add a using namespace WebCore to RemoteLayerBackingStore. WebCore::IOSurface still needs qualification.

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::ensureBackingStore):
(WebKit::RemoteLayerBackingStore::encode const):
(WebKit::RemoteLayerBackingStore::setNeedsDisplay):
(WebKit::RemoteLayerBackingStore::pixelFormat const):
(WebKit::RemoteLayerBackingStore::bytesPerPixel const):
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
(WebKit::RemoteLayerBackingStore::applySwappedBuffers):
(WebKit::RemoteLayerBackingStore::prepareToDisplay):
(WebKit::RemoteLayerBackingStore::dirtyRepaintCounterIfNecessary):
(WebKit::RemoteLayerBackingStore::ensureFrontBuffer):
(WebKit::RemoteLayerBackingStore::prepareBuffers):
(WebKit::RemoteLayerBackingStore::paintContents):
(WebKit::RemoteLayerBackingStore::drawInContext):
(WebKit::RemoteLayerBackingStore::enumerateRectsBeingDrawn):
(WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
(WebKit::RemoteLayerBackingStore::takePendingFlushers):
(WebKit::RemoteLayerBackingStore::setBufferVolatile):
(WebKit::RemoteLayerBackingStore::setBufferNonVolatile):
(WebKit::RemoteLayerBackingStore::setFrontBufferNonVolatile):
(WebKit::RemoteLayerBackingStore::bufferForType const):

6:48 PM Changeset in webkit [292362] by Matteo Flores
  • 2 edits in trunk/LayoutTests

REGRESSION(r291770-r291762): [ iOS ] css3/background/background-repeat-round-auto1.html is a flaky image failure

https://bugs.webkit.org/show_bug.cgi?id=238781

Unreviewed test gardening.

  • platform/ios/TestExpectations:
6:46 PM Changeset in webkit [292361] by gnavamarino@apple.com
  • 9 edits in trunk/Source

Use Ref and RefPtr pattern when handling document close calls
https://bugs.webkit.org/show_bug.cgi?id=238747

Reviewed by Sam Weinig.

Ensure document object remains for the scope of the call.

Source/WebCore:

  • inspector/DOMPatchSupport.cpp:

(WebCore::DOMPatchSupport::patchDocument):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::stopLoading):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::init):
(WebCore::FrameLoader::clear):

  • loader/cache/CachedSVGDocument.cpp:

(WebCore::CachedSVGDocument::finishLoading):

  • loader/cache/CachedSVGFont.cpp:

(WebCore::CachedSVGFont::ensureCustomFontData):

  • xml/XMLHttpRequest.cpp:

Source/WebKitLegacy/win:

  • DOMHTMLClasses.cpp:

(DOMHTMLDocument::close):

6:41 PM Changeset in webkit [292360] by Simon Fraser
  • 3 edits in trunk/Source/WebKit

Remove lots of WebCore:: in RemoteRenderingBackend
https://bugs.webkit.org/show_bug.cgi?id=238763

Reviewed by Wenson Hsieh.

RemoteRenderingBackend already has a using namespace WebCore so remove the explicit namespacing.

Also clean up some includes in the header.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::getPixelBufferForImageBuffer):
(WebKit::RemoteRenderingBackend::getPixelBufferForImageBufferWithNewMemory):
(WebKit::RemoteRenderingBackend::putPixelBufferForImageBuffer):
(WebKit::RemoteRenderingBackend::getDataURLForImageBuffer):
(WebKit::RemoteRenderingBackend::getDataURLForImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::getDataForImageBuffer):
(WebKit::RemoteRenderingBackend::getShareableBitmapForImageBuffer):
(WebKit::RemoteRenderingBackend::getShareableBitmapForImageBufferWithQualifiedIdentifier):
(WebKit::RemoteRenderingBackend::cacheFont):
(WebKit::handleFromBuffer):
(WebKit::RemoteRenderingBackend::markSurfacesVolatile):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
6:33 PM Changeset in webkit [292359] by Matteo Flores
  • 2 edits in trunk/LayoutTests

REGRESSION(r290676?): [ iOS ] media/video-played-ranges-1.html is a flaky text failure

https://bugs.webkit.org/show_bug.cgi?id=238771

Unreviewed test gardening.

  • platform/ios/TestExpectations:
5:34 PM Changeset in webkit [292358] by timothy_horton@apple.com
  • 13 edits in trunk/Source

Remove VP8/9 and WebM-related system feature flags
https://bugs.webkit.org/show_bug.cgi?id=238757

Reviewed by Eric Carlson.

Source/WebKit:

  • FeatureFlags/WebKit-appletvos.plist:
  • FeatureFlags/WebKit-ios.plist:
  • FeatureFlags/WebKit-macos.plist:
  • FeatureFlags/WebKit-watchos.plist:
  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultWebMFormatReaderEnabled): Deleted.
(WebKit::defaultVP8DecoderEnabled): Deleted.
(WebKit::defaultVP9DecoderEnabled): Deleted.
(WebKit::defaultWebMParserEnabled): Deleted.

  • Shared/WebPreferencesDefaultValues.h:

Source/WebKitLegacy/mac:

  • WebView/WebPreferencesDefaultValues.h:

Source/WTF:

  • Scripts/Preferences/WebPreferences.yaml:
  • Scripts/Preferences/WebPreferencesExperimental.yaml:

Demote these to standard preferences, and stop using system feature flags to control their defaults.

4:42 PM Changeset in webkit [292357] by Matteo Flores
  • 2 edits in trunk/LayoutTests

[ iOS ] http/wpt/mediarecorder/mute-tracks.html is a flaky crash

https://bugs.webkit.org/show_bug.cgi?id=238774

Unreviewed test gardening.

  • platform/ios/TestExpectations:
4:21 PM Changeset in webkit [292356] by Wenson Hsieh
  • 5 edits in trunk/Source/WebKit

[macOS] [WK2] Add plumbing to extract video frames in element fullscreen
https://bugs.webkit.org/show_bug.cgi?id=238715
rdar://91216152

Reviewed by Tim Horton.

Implement (begin|cancel)ElementFullscreenVideoExtraction on macOS, leaving empty stubs for non-internal builds.

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

(WebKit::WebViewImpl::beginElementFullscreenVideoExtraction):
(WebKit::WebViewImpl::cancelElementFullscreenVideoExtraction):

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

(WebKit::PageClientImpl::beginElementFullscreenVideoExtraction):
(WebKit::PageClientImpl::cancelElementFullscreenVideoExtraction):

4:06 PM Changeset in webkit [292355] by timothy_horton@apple.com
  • 6 edits in trunk/Source/WebKit

Remove the 'general_directory_for_storage' system feature flag
https://bugs.webkit.org/show_bug.cgi?id=238762

Reviewed by Sihui Liu.

  • FeatureFlags/WebKit-appletvos.plist:
  • FeatureFlags/WebKit-ios.plist:
  • FeatureFlags/WebKit-macos.plist:
  • FeatureFlags/WebKit-watchos.plist:
  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::defaultShouldUseCustomStoragePaths):

3:28 PM Changeset in webkit [292354] by timothy_horton@apple.com
  • 9 edits in trunk/Source

Remove the 'sw_vp9_decoder_on_battery' system feature flag
https://bugs.webkit.org/show_bug.cgi?id=238761

Reviewed by Eric Carlson.

Source/WebKit:

  • FeatureFlags/WebKit-appletvos.plist:
  • FeatureFlags/WebKit-ios.plist:
  • FeatureFlags/WebKit-macos.plist:
  • FeatureFlags/WebKit-watchos.plist:
  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultVP9SWDecoderEnabledOnBattery): Deleted.

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

Switch this to a standard experimental feature.
Also, remove the WebKitLegacy case, as it is not used there.

3:24 PM Changeset in webkit [292353] by timothy_horton@apple.com
  • 9 edits in trunk/Source

Remove the 'async frame and overflow scrolling' system feature flag
https://bugs.webkit.org/show_bug.cgi?id=238758

Reviewed by Simon Fraser.

Source/WebKit:

  • FeatureFlags/WebKit-appletvos.plist:
  • FeatureFlags/WebKit-ios.plist:
  • FeatureFlags/WebKit-macos.plist:
  • FeatureFlags/WebKit-watchos.plist:
  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultAsyncFrameAndOverflowScrollingEnabled): Deleted.
(WebKit::defaultAsyncFrameScrollingEnabled): Deleted.
(WebKit::defaultAsyncOverflowScrollingEnabled): Deleted.

  • Shared/WebPreferencesDefaultValues.h:

Source/WTF:

  • Scripts/Preferences/WebPreferencesInternal.yaml:
3:22 PM Changeset in webkit [292352] by timothy_horton@apple.com
  • 13 edits in trunk/Source

Remove the incremental_pdf system feature flag
https://bugs.webkit.org/show_bug.cgi?id=238754

Reviewed by Wenson Hsieh.

Source/WebKit:

  • FeatureFlags/WebKit-appletvos.plist:
  • FeatureFlags/WebKit-ios.plist:
  • FeatureFlags/WebKit-macos.plist:
  • FeatureFlags/WebKit-watchos.plist:
  • Shared/WebPreferencesDefaultValues.cpp:
  • Shared/WebPreferencesDefaultValues.h:

(WebKit::defaultIncrementalPDFEnabled): Deleted.
Remove the incremental_pdf system feature flag in favor of a traditional WebKit preference.

Source/WebKitLegacy/mac:

  • WebView/WebPreferencesDefaultValues.mm:
  • WebView/WebPreferencesDefaultValues.h:

(WebKit::defaultIncrementalPDFEnabled): Deleted.

Source/WTF:

  • Scripts/Preferences/WebPreferences.yaml:
  • Scripts/Preferences/WebPreferencesExperimental.yaml:

Demote incremental PDF rendering from a developer-exposed experimental feature
to a standard web preference now that it's been on and shipping for a while.

3:08 PM Changeset in webkit [292351] by timothy_horton@apple.com
  • 8 edits in trunk/Source

Remove the 'RB_full_manage_WK_jetsam' system feature flag and simplify adjacent logic
https://bugs.webkit.org/show_bug.cgi?id=238760

Reviewed by Chris Dumez.

Source/WebKit:

  • FeatureFlags/WebKit-appletvos.plist:
  • FeatureFlags/WebKit-ios.plist:
  • FeatureFlags/WebKit-macos.plist:
  • FeatureFlags/WebKit-watchos.plist:
  • UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm:

(WebKit::shouldLeakBoost):

Source/WTF:

  • wtf/PlatformHave.h:
3:04 PM Changeset in webkit [292350] by Matt Woodrow
  • 3 edits
    2 adds in trunk

intersectsWithAncestor should take fragmented boxes into account.
https://bugs.webkit.org/show_bug.cgi?id=238648

Reviewed by Dean Jackson.

Source/WebCore:

Test: compositing/backing/backing-store-columns-inside-position-fixed.html

  • rendering/RenderLayerBacking.cpp:

(WebCore::intersectsWithAncestor):

Use boundingBox() for intersectsWithAncestor, so that we can explicitly request the box that contains
all fragment boxes.

LayoutTests:

  • compositing/backing/backing-store-columns-inside-position-fixed-expected.txt: Added.
  • compositing/backing/backing-store-columns-inside-position-fixed.html: Added.

Adds new test that scrolls content split into columns until the first column is offscreen, to confirm
that we still have a backing store.

3:01 PM Changeset in webkit [292349] by timothy_horton@apple.com
  • 5 edits in trunk/Source/WebKit

Remove some unused system feature flags
https://bugs.webkit.org/show_bug.cgi?id=238755

Reviewed by Wenson Hsieh.

  • FeatureFlags/WebKit-appletvos.plist:
  • FeatureFlags/WebKit-ios.plist:
  • FeatureFlags/WebKit-macos.plist:
  • FeatureFlags/WebKit-watchos.plist:

Neither of these flags is read anywhere, so they don't need to be in the plist.

2:56 PM Changeset in webkit [292348] by Alan Coon
  • 4 edits in branches/safari-613-branch

Cherry-pick r292242. rdar://91259284

Change one-shot maxTimerNestingLevel from 5 to 10
https://bugs.webkit.org/show_bug.cgi?id=237168

Reviewed by Sam Weinig, Saam Barati, and Cameron McCormack .

Source/WebCore:

Recently, we found from Chromium change[1] that changing this from 5 to 10 offers 10% Speedometer2 improvement
because Speedometer2's setTimeout nesting level is typically 7-8. We discussed with folks including Chris, Maciej,
Saam, and Cameron and for now, we increase this from 5 to 10 to align to Blink's change to keep these kind of web
content fast. This is not aligned to the spec, and currently, we only apply it to one-shot timer.

[1]: https://chromium-review.googlesource.com/c/chromium/src/+/3473463

page/DOMTimer.cpp:
(WebCore::DOMTimer::intervalClampedToMinimum const):
(WebCore::DOMTimer::alignedFireTime const):

LayoutTests:

fast/dom/timer-increase-min-interval.html:
fast/dom/timer-throttling-hidden-page-expected.txt:
fast/dom/timer-throttling-hidden-page.html:

2:56 PM Changeset in webkit [292347] by Alan Coon
  • 11 edits
    5 adds in branches/safari-613-branch

Cherry-pick r291998. rdar://91259284

Remove the 1ms minimum for setTimeout
https://bugs.webkit.org/show_bug.cgi?id=221124
<rdar://problem/73852354>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

web-platform-tests/html/webappapis/timers/zero-settimeout.any-expected.txt:
web-platform-tests/html/webappapis/timers/zero-settimeout.any.html:
web-platform-tests/html/webappapis/timers/zero-settimeout.any.js:
(async_test):

web-platform-tests/html/webappapis/timers/zero-settimeout.any.worker-expected.txt:
web-platform-tests/html/webappapis/timers/zero-settimeout.any.worker.html:
New test checking that 0ms and 1ms timeouts are called in the right
order.

web-platform-tests/FileAPI/file/File-constructor.any.worker-expected.txt:
web-platform-tests/html/webappapis/microtask-queuing/queue-microtask-exceptions.any.worker-expected.txt:
web-platform-tests/workers/interfaces/WorkerUtils/importScripts/report-error-cross-origin.sub.any.worker-expected.txt:
web-platform-tests/workers/interfaces/WorkerUtils/importScripts/report-error-redirect-to-cross-origin.sub.any.worker-expected.txt:
web-platform-tests/workers/interfaces/WorkerUtils/importScripts/report-error-same-origin.sub.any.worker-expected.txt:
web-platform-tests/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-cross-origin.sub.any.worker-expected.txt:
web-platform-tests/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-redirect-to-cross-origin.sub.any.worker-expected.txt:
web-platform-tests/workers/interfaces/WorkerUtils/importScripts/report-error-setTimeout-same-origin.sub.any.worker-expected.txt:
Disable console output in some worker tests where the reduced timeout
would cause intemittent failures due to the console message sometimes
not making it to the test output in time.

Source/WebCore:

This patch removes the 1ms minimum for setTimeout. The HTML spec makes
no mention of such a minimum, and Firefox and Chrome do not enforce
this minimum. Removing this for setTimeout results in a 0.7-2.1%
improvement on Speedometer, depending on platform and hardware.

The WPT added here demonstrates how this change can affect pages: if a
page schedules a 1ms and then a 0ms timeout in the same turn of the
event loop, then with this patch they will now be fired in the reverse
order. Since Firefox and Chrome do not impose a 1ms minimum, this
reduces the risk of this being a compatbility problem.

Scheduling a 0ms timeout will cause its callback to be called the next
time around the event loop. Other, non-timer queued tasks, will be
pre-empted. This behavior is permitted by the HTML spec, since the
event loop processing model[1] states that the implementation can
choose which task source to service, and timer callbacks are
dispatched using their own task source. Due to the way the SharedTimer
is called, we don't need to literally dispatch a task with a new
TaskSource::Timer source. (If we decided later to make a different
about whether to service timer callbacks before tasks from all other
task sources, we might need to.)

Not addressing the setTimeout 1ms minimum here, which should likely also
be removed.

While we're here, settle on "one shot" rather rather than "single
shot" as the term for timers that fire once.

[1] https://html.spec.whatwg.org/#event-loop-processing-model

Tests: imported/w3c/web-platform-tests/html/webappapis/timers/zero-settimeout.any.html

imported/w3c/web-platform-tests/html/webappapis/timers/zero-settimeout.any.worker.html

page/DOMTimer.h:
page/DOMTimer.cpp:
(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::fired):
(WebCore::DOMTimer::updateTimerIntervalIfNecessary):
(WebCore::DOMTimer::intervalClampedToMinimum const):

LayoutTests:

TestExpectations: Disable console output in some worker tests where
the reduced timeout would cause intemittent failures due to the
console message sometimes not making it to the test output in time.

js/script-tests/weakref-finalizationregistry.js:
(turnEventLoop): Use a timeout of 1ms instead of 0ms so that
the deferred work task that calls the JS FinalizationRegistry
callback gets a chance to run before we continue on to the
assertion that it was run.

2:56 PM Changeset in webkit [292346] by Alan Coon
  • 2 adds in branches/safari-613-branch/Source/WebCore/html/parser

Add HTMLNameCache.h/cpp from r289991. Prior cherry-pick somehow missed it.

2:56 PM Changeset in webkit [292345] by Alan Coon
  • 9 edits
    2 adds in branches/safari-613-branch

Cherry-pick r291889. rdar://91259284

Enable PGO when building for release and production
https://bugs.webkit.org/show_bug.cgi?id=238119
rdar://90182309

Reviewed by Alexey Proskuryakov and Geoff Garen.

Source/JavaScriptCore:

See WebCore/ChangeLog for more information.

Configurations/Base.xcconfig:
Configurations/JavaScriptCore.xcconfig:
JavaScriptCore.xcodeproj/project.pbxproj:
Source/WebCore:

Attempt to re-land support for compiling against profiling data, after it was reverted due to the profiling data
files being too large. We mitigate this by instead storing sparse profdata files as compressed files in
WebKitAdditions through git lfs, such that they don't cause the repo to grow significantly each time we update
profiling data.

At build time, we then introduce new build phase scripts to the JavaScriptCore, WebCore and WebKit builds to
decompress their respective .profdata.compressed files into .profdata files in the build, using
compression_tool. We compile against these profdata files when building for release and production
configurations, via the -fprofile-instr-use flag.

In the case where the *.profdata.compressed files are non-existent or haven't been downloaded yet, we instead
fall back to using an empty profiling data file, but only on non-production builds; this allows us to continue
passing in the -fprofile-instr-use flag, without running into build failures.

Note that we intentionally require production builds to use the (real) profiling data, and explicitly fail the
build with a specific error message in the case where the profiles are missing.

Additionally, note that in order to check for and deal with the case where the *.profdata.compressed files are
only undownloaded git-lfs stubs, we not only check whether or not the profdata.compressed file exists, but
also whether or not the file size is at least an arbitrary cutoff of 4 KB (which should already be an order of
magnitude larger than the git-lfs stub). While mostly arbitrary, I chose this cutoff due to the fact that it's
very close to the size of the Empty.profdata placeholder file in Tools; in practice, we should expect the
profiles for WebKit, WebCore and JavaScriptCore to be much, much larger than this empty file.

Configurations/Base.xcconfig:
Configurations/WebCore.xcconfig:
WebCore.xcodeproj/project.pbxproj:
Source/WebKit:

See WebCore/ChangeLog for more information.

Configurations/Base.xcconfig:
Configurations/BaseTarget.xcconfig:
WebKit.xcodeproj/project.pbxproj:
Tools:

Add an empty profiling data file that can be used as a fallback only for release (non-production) builds, when
the JavaScriptCore, WebCore or WebKit profiling data hasn't been locally downloaded.

Profiling/Empty.profdata: Added.

2:56 PM Changeset in webkit [292344] by Alan Coon
  • 6 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r291981. rdar://91259284

Speed up Element::removedFromAncestor()
https://bugs.webkit.org/show_bug.cgi?id=238404

Reviewed by Geoffrey Garen.

Speed up Element::removedFromAncestor() by inlining some of the functions it is calling.
This is a confirmed 1.5-2% progression on Speedometer on iMac 20,1.

dom/Element.cpp:
(WebCore::Element::removedFromAncestor):
(WebCore::Element::clearBeforePseudoElementSlow):
(WebCore::Element::clearAfterPseudoElementSlow):
(WebCore::Element::setSavedLayerScrollPositionSlow):
(WebCore::Element::clearBeforePseudoElement): Deleted.
(WebCore::Element::clearAfterPseudoElement): Deleted.
(WebCore::Element::setSavedLayerScrollPosition): Deleted.

dom/Element.h:
(WebCore::Element::setSavedLayerScrollPosition):
(WebCore::Element::clearBeforePseudoElement):
(WebCore::Element::clearAfterPseudoElement):

page/PointerCaptureController.cpp:
(WebCore::PointerCaptureController::elementWasRemovedSlow):
(WebCore::PointerCaptureController::elementWasRemoved): Deleted.

page/PointerCaptureController.h:
(WebCore::PointerCaptureController::elementWasRemoved):

page/PointerLockController.cpp:
(WebCore::PointerLockController::elementWasRemovedInternal):
(WebCore::PointerLockController::elementWasRemoved): Deleted.

page/PointerLockController.h:
(WebCore::PointerLockController::elementWasRemoved):

2:56 PM Changeset in webkit [292343] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r291964. rdar://91259284

Optimize toJS() for HTMLElements
https://bugs.webkit.org/show_bug.cgi?id=238426

Reviewed by Yusuke Suzuki.

Optimize toJS() for HTMLElements. Previously, the more generic Element's toJS() would be called,
which would have to do more checks.

This is a 0.6% progression on Speedometer 2.0 on MacBook Air 10,1 (AS).

bindings/js/JSHTMLElementCustom.cpp:
(WebCore::toJS):
(WebCore::toJSNewlyCreated):

html/HTMLElement.idl:

2:56 PM Changeset in webkit [292342] by Alan Coon
  • 5 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r291933. rdar://91259284

Simplify / Optimize JSNodeOwner::isReachableFromOpaqueRoots()
https://bugs.webkit.org/show_bug.cgi?id=238380

Reviewed by Geoffrey Garen.

Drop checks specific to HTMLAudioElement and HTMLImageElement from
JSNodeOwner::isReachableFromOpaqueRoots() so that other Node wrappers
that are not audio or image elements do not have to pay the cost.

In the HTMLAudioElement case, HTMLAudioElement already subclasses HTMLMediaElement which
is an ActiveDOMObject and HTMLMediaElement::virtualHasPendingActivity() already takes
care of keeping the JS wrapper alive is there is audio playing.

For HTMLImageElement, I made it subclass ActiveDOMObject so that the JSHTMLImageElement
wrapper is now calling HTMLImageElement::hasPendingActivity() instead of every JS Node
wrapper via JSNodeOwner::isReachableFromOpaqueRoots().

bindings/js/JSNodeCustom.cpp:
(WebCore::isReachableFromDOM):

html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::create):
(WebCore::HTMLImageElement::createForLegacyFactoryFunction):
(WebCore::HTMLImageElement::activeDOMObjectName const):
(WebCore::HTMLImageElement::virtualHasPendingActivity const):
(WebCore::HTMLImageElement::hasPendingActivity const): Deleted.

html/HTMLImageElement.h:
html/HTMLImageElement.idl:
html/ImageDocument.cpp:
(WebCore::ImageDocumentElement::create):

2:56 PM Changeset in webkit [292341] by Alan Coon
  • 1 edit in branches/safari-613-branch/Source/WebCore/dom/EventListenerMap.h

Cherry-pick r291866. rdar://91259284

Reduce EventListenerVector's minimum capacity from 16 to 2
https://bugs.webkit.org/show_bug.cgi?id=238374

Reviewed by Geoffrey Garen.

Reduce EventListenerVector's minimum capacity from 16 to 2 to save memory and get a small speedup on Speedometer.
Very few event listeners are registered for a given type in the common case so eagerly allocating enough memory for 16 is wasteful.
This is a confirmed 0.4% progression on Speedometer according to A/B bots.

dom/EventListenerMap.h:

2:56 PM Changeset in webkit [292340] by Alan Coon
  • 4 edits in branches/safari-613-branch/Source/WebCore/rendering

Cherry-pick r291793. rdar://91259284

Devirtualize RenderText::width
https://bugs.webkit.org/show_bug.cgi?id=238285

Reviewed by Antti Koivisto.

RenderCombineText handling is moved to RenderText (we already handle combine text in RenderText::widthFromCache).

rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineTextIfNeeded): These are all non-text-combine callsites.
(WebCore::RenderCombineText::width const): Deleted.

rendering/RenderCombineText.h:
rendering/RenderText.cpp:
(WebCore::combineTextWidth): RenderCombineText::combinedTextWidth returns the same value as RenderCombineText::width.
(WebCore::RenderText::widthFromCache const):
(WebCore::RenderText::width const):

rendering/RenderText.h:

2:56 PM Changeset in webkit [292339] by Alan Coon
  • 4 edits in branches/safari-613-branch/Source/WebCore/style

Cherry-pick r291790. rdar://91259284

Allow styles with appearance in matched declaration cache
https://bugs.webkit.org/show_bug.cgi?id=238247

Reviewed by Antoine Quint.

Improve cache efficiency by allowing styles with appearance (typically form controls) to be cached.

In Speedometer this improves the cache hit rate ~75% -> 94%.

style/MatchedDeclarationsCache.cpp:
(WebCore::Style::MatchedDeclarationsCache::isCacheable):

Remove appearance check.

(WebCore::Style::MatchedDeclarationsCache::add):

Also cache the UA style for styles with appearance.

(WebCore::Style::MatchedDeclarationsCache::remove):

style/MatchedDeclarationsCache.h:
style/StyleResolver.cpp:
(WebCore::Style::Resolver::applyMatchedProperties):

Also simplify the case where inherited properties affect resolution of other properties by
kicking out the existing entry. This also makes the second attempt cacheable.

style/StyleResolver.h:

2:56 PM Changeset in webkit [292338] by Alan Coon
  • 4 edits in branches/safari-613-branch/Source/WebCore/dom

Cherry-pick r291538. rdar://91259284

Optimize EventTarget::visitJSEventListeners()
https://bugs.webkit.org/show_bug.cgi?id=238116

Reviewed by Darin Adler.

This was confirmed by A/B bots to be a 1-1.5% progression on Speedometer on
iMac 20,1 (Intel).

dom/EventListenerMap.cpp:
(WebCore::EventListenerMap::clear):
(WebCore::EventListenerMap::replace):
(WebCore::EventListenerMap::add):
(WebCore::EventListenerMap::remove):
(WebCore::EventListenerMap::removeFirstEventListenerCreatedFromMarkup):
(WebCore::EventListenerMap::assertNoActiveIterators const): Deleted.
(WebCore::EventListenerMap::EventListenerMap): Deleted.
(WebCore::EventListenerIterator::EventListenerIterator): Deleted.
(WebCore::EventListenerIterator::~EventListenerIterator): Deleted.
(WebCore::EventListenerIterator::nextListener): Deleted.

dom/EventListenerMap.h:
(WebCore::EventListenerMap::visitJSEventListeners):
(): Deleted.
(WebCore::EventListenerMap::assertNoActiveIterators const): Deleted.

dom/EventTarget.cpp:
(WebCore::EventTarget::visitJSEventListeners): Deleted.

dom/EventTarget.h:
(WebCore::EventTarget::visitJSEventListeners):

2:56 PM Changeset in webkit [292337] by Alan Coon
  • 1 edit in branches/safari-613-branch/Source/WebCore/html/parser/AtomHTMLToken.h

Cherry-pick r291508. rdar://91259284

Optimize AtomHTMLToken::initializeAttributes()
https://bugs.webkit.org/show_bug.cgi?id=238074

Reviewed by Geoffrey Garen.

Use a HashSet to find duplicate attributes instead of doing a linear search.
This is a confirmed 1.2% progression on Speedometer on iMac20,1 via A/B bots.

html/parser/AtomHTMLToken.h:
(WebCore::AtomHTMLToken::initializeAttributes):

2:56 PM Changeset in webkit [292336] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore/dom

Cherry-pick r291495. rdar://91259284

Avoid extra pointer dereference in EventListenerMap::m_entries
https://bugs.webkit.org/show_bug.cgi?id=238075

Reviewed by Geoffrey Garen.

This is a confirmed 0.5-0.8% progression on Speedometer according to A/B
bots.

dom/EventListenerMap.cpp:
(WebCore::EventListenerMap::clear):
(WebCore::EventListenerMap::add):
(WebCore::EventListenerMap::remove):
(WebCore::EventListenerMap::find):
(WebCore::EventListenerMap::removeFirstEventListenerCreatedFromMarkup):
(WebCore::EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget):
(WebCore::EventListenerIterator::nextListener):
(WebCore::EventListenerMap::find const): Deleted.

dom/EventListenerMap.h:
(WebCore::EventListenerMap::find const):

2:56 PM Changeset in webkit [292335] by Alan Coon
  • 1 edit in branches/safari-613-branch/Source/JavaScriptCore/Configurations/Base.xcconfig

Cherry-pick r290993 and r291087.

2:56 PM Changeset in webkit [292334] by Alan Coon
  • 29 edits
    7 adds in branches/safari-613-branch

Cherry pick r290574 r290639 r291028 r291961.

Patches needed for Cameron's "Make input element UA shadow tree creation lazy" change.

2:55 PM Changeset in webkit [292333] by Alan Coon
  • 1 edit in branches/safari-613-branch/Source/JavaScriptCore/runtime/Options.cpp

Cherry-pick r290405. rdar://91259284

[JSC] Adjust thread number for GC throughput
https://bugs.webkit.org/show_bug.cgi?id=237122

Reviewed by Mark Lam.

Adjust numberOfGCMarkers from 4 to 3 to make GC and main thread througput better on M1 macOS.
3 makes sense since there is also a main thread when they are running concurrently to the
main thread.

It offers 1.2% improvement in Speedometer2 in M1Max MBP and 0.4% improvement in M1 MBP.

| subtest | ms | ms | b / a | pValue (significance using False Discovery Rate) |

| Elm-TodoMVC |107.445000 |102.856667 |0.957296 | 0.000000 (significant) |
| VueJS-TodoMVC |21.571667 |21.805000 |1.010817 | 0.403054 |
| EmberJS-TodoMVC |113.320000 |111.300000 |0.982174 | 0.000027 (significant) |
| BackboneJS-TodoMVC |39.981667 |39.318333 |0.983409 | 0.002346 (significant) |
| Preact-TodoMVC |15.516667 |15.648333 |1.008485 | 0.544754 |
| AngularJS-TodoMVC |117.010000 |115.346667 |0.985785 | 0.000495 (significant) |
| Vanilla-ES2015-TodoMVC |57.790000 |57.176667 |0.989387 | 0.000270 (significant) |
| Inferno-TodoMVC |55.275000 |53.755000 |0.972501 | 0.000000 (significant) |
| Flight-TodoMVC |53.875000 |53.941667 |1.001237 | 0.739556 |
| Angular2-TypeScript-TodoMVC |36.600000 |36.471667 |0.996494 | 0.743761 |
| VanillaJS-TodoMVC |48.058333 |47.671667 |0.991954 | 0.158193 |
| jQuery-TodoMVC |203.433333 |201.878333 |0.992356 | 0.009271 (significant) |
| EmberJS-Debug-TodoMVC |325.058333 |319.848333 |0.983972 | 0.000003 (significant) |
| React-TodoMVC |80.533333 |79.281667 |0.984458 | 0.000011 (significant) |
| React-Redux-TodoMVC |134.738333 |131.801667 |0.978205 | 0.000000 (significant) |
| Vanilla-ES2015-Babel-Webpack-TodoMVC |56.780000 |56.168333 |0.989227 | 0.000514 (significant) |

a mean = 293.86568
b mean = 297.52900
pValue = 0.0266899465
(Bigger means are better.)
1.012 times better
Results ARE significant

runtime/Options.cpp:
(JSC::overrideDefaults):

2:55 PM Changeset in webkit [292332] by Alan Coon
  • 15 edits in branches/safari-613-branch/Source/WebCore/html

Cherry-pick r290086. rdar://91259284

Always use ChildChange::Source::Parser when creating input element UA shadow tree contents
https://bugs.webkit.org/show_bug.cgi?id=236740

Reviewed by Dean Jackson.

When creating an input element's UA shadow tree, we currently use a
ChildChange::Source value that depends on whether the input element
itself was parser- or script-inserted. But since UA shadow trees are
not exposed to content, and we don't have any dependency on the extra
work that inserting using ChildChange::Source::API does, we can use
ChildChange::Source::Parser unconditionally.

Local testing shows this scores a 0.1% Speedometer 2 improvement.

html/BaseDateAndTimeInputType.cpp:
(WebCore::BaseDateAndTimeInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

html/BaseDateAndTimeInputType.h:
html/ColorInputType.cpp:
(WebCore::ColorInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

html/ColorInputType.h:
html/FileInputType.cpp:
(WebCore::FileInputType::appendFormData const):
(WebCore::FileInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

html/FileInputType.h:
html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::createShadowSubtreeAndUpdateInnerTextElementEditability):

html/InputType.cpp:
(WebCore::InputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

html/InputType.h:
html/RangeInputType.cpp:
(WebCore::RangeInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

html/RangeInputType.h:
html/SearchInputType.cpp:
(WebCore::SearchInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

html/SearchInputType.h:
html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

html/TextFieldInputType.h:

2:55 PM Changeset in webkit [292331] by Alan Coon
  • 8 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r289991. rdar://91259284

Cache an entire attribute QualifiedName when parsing HTML, not just its local name AtomString
https://bugs.webkit.org/show_bug.cgi?id=236570
<rdar://problem/88876545>

Reviewed by Darin Adler.

Bug 229907 added HTMLAtomStringCache, which uses a fast to compute hash
that works well to cache HTML tag names, attribute names, and attribute
values. When AtomHTMLToken initializes its list of Attributes, it uses
HTMLAtomStringCache to look up or create an AtomString for the
attribute's local name, and then creates a QualifiedName to wrap it.
QualifiedName construction involves looking up QualifiedNameCache, which
is a thread-specific cache of QualifiedNameImpl objects. If we make
HTMLAtomStringCache responsible for caching an attribute's QualifiedName
instead of just its local name AtomString, we can avoid the work of
looking up the QualifiedNameCache.

To reflect its broader responsibilities, HTMLAtomStringCache is renamed
to HTMLNameCache.

Doing this results in a 0.2-0.3% improvement on Speedometer 2, and a
0.3-0.4% improvement on PLT5 (with the lower end of those ranges being
on Apple Silicon and the higher end on Intel).

Sources.txt:
WebCore.xcodeproj/project.pbxproj:
dom/QualifiedName.h:
(WebCore::QualifiedName::QualifiedName):

html/parser/AtomHTMLToken.h:
(WebCore::AtomHTMLToken::initializeAttributes):
(WebCore::AtomHTMLToken::AtomHTMLToken):

html/parser/HTMLAtomStringCache.h: Removed.
(WebCore::HTMLAtomStringCache::makeTagOrAttributeName): Deleted.
(WebCore::HTMLAtomStringCache::makeAttributeValue): Deleted.
(WebCore::HTMLAtomStringCache::clear): Deleted.
(WebCore::HTMLAtomStringCache::make): Deleted.
(WebCore::HTMLAtomStringCache::cacheSlot): Deleted.

html/parser/HTMLNameCache.cpp: Renamed from Source/WebCore/html/parser/HTMLAtomStringCache.cpp.
(WebCore::HTMLNameCache::atomStringCache):
(WebCore::HTMLNameCache::qualifiedNameCache):

html/parser/HTMLNameCache.h: Added.
(WebCore::HTMLNameCache::makeTagName):
(WebCore::HTMLNameCache::makeAttributeQualifiedName):
(WebCore::HTMLNameCache::makeAttributeValue):
(WebCore::HTMLNameCache::clear):
(WebCore::HTMLNameCache::makeAtomString):
(WebCore::HTMLNameCache::makeQualifiedName):
(WebCore::HTMLNameCache::slotIndex):
(WebCore::HTMLNameCache::atomStringCacheSlot):
(WebCore::HTMLNameCache::qualifiedNameCacheSlot):

page/MemoryRelease.cpp:
(WebCore::releaseNoncriticalMemory):

page/cocoa/MemoryReleaseCocoa.mm:
(WebCore::jettisonExpensiveObjectsOnTopLevelNavigation):

2:55 PM Changeset in webkit [292330] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore/rendering

Cherry-pick r289692. rdar://91259284

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

Reviewed by Simon Fraser.

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

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

rendering/RenderWidget.cpp:
(WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):

rendering/RenderWidget.h:
(WebCore::WidgetHierarchyUpdatesSuspensionScope::~WidgetHierarchyUpdatesSuspensionScope):
(WebCore::WidgetHierarchyUpdatesSuspensionScope::scheduleWidgetToMove):

2:55 PM Changeset in webkit [292329] by Alan Coon
  • 1 edit in branches/safari-613-branch/Source/WebCore/html/InputType.cpp

Cherry-pick r289691. rdar://91259284

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

Reviewed by Myles C. Maxfield.

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

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

html/InputType.cpp:
(WebCore::InputType::create):

2:55 PM Changeset in webkit [292328] by Alan Coon
  • 8 edits in branches/safari-613-branch/Source/JavaScriptCore

Cherry-pick r289359. rdar://91259284

[JSC] Convert JSString's non-atomic WTF::String to atomic string while concurrent compilers / heap threads run
https://bugs.webkit.org/show_bug.cgi?id=236262

Reviewed by Saam Barati.

Inspired from r289177. This patch introduces a new protocol which allows us to replace JSString's underlying non-atomic String
to atomic String if we once call toIdentifier / toAtomString.

We had a problem that,

We have a JSString, which has a "test" WTF::String.
We already have "test" atomic string in the table.
Then, when we call JSString::toIdentifier, we know that there is an atomic "test" string, but we cannot replace the current JSString's WTF::String because it can be accessed concurrently from concurrent compilers and GC heap helpers.
Thus, JSString keeps non atomic "test" WTF::String.
But this means that we need to lookup atom string table every time we would like to get an atom string from this JSString.

So, in this patch, we introduce a new protocol, which allows swapping existing WTF::String with an atom string.

When we found that JSString has a WTF::String and we already have atom string in the table with the same content (when calling
toIdentifier / toAtomString), we attempt to replace JSString's WTF::String with the atom string, but *keep the old string in JSC::Heap's
vector called m_possiblyAccessedStringsFromConcurrentThreads. Then, we can keep these strings alive until next GC ends. This ensures that
all concurrent compilers / heap helpers can keep accessing to the old strings. And then, in the GC finalize, we clear this vector since
resumed concurrent compilers and GC heap helpers will not touch these old strings in the next GC cycle. Only case we have a problem is
that we keep having StringImpl* of the old string after GC safepoint in the concurrent compiler, and the only use of that is
DFG::Graph::m_copiedStrings. So, I changed the code not to keep old StringImpl* in DFG::Graph::m_copiedStrings. Also, note that we do
this only when we convert non-atom string to atom string so all UniquedStringImpl* from JSString* (it is atom ones) does not matter since
they are already atom one: they will not be replaced.

This does not increase memory usage, rather, improve memory usage since this kept string was anyway held by the wrapper's JSString at least
until the next GC run. And we clear m_possiblyAccessedStringsFromConcurrentThreads in the next GC run, so we can shrink memory.

It improves Speedometer2 by 0.2%.

----------------------------------------------------------------------------------------------------------------------------------
| subtest | ms | ms | b / a | pValue (significance using False Discovery Rate) |
----------------------------------------------------------------------------------------------------------------------------------
| Elm-TodoMVC |106.193333 |105.690000 |0.995260 | 0.050074 |
| VueJS-TodoMVC |21.671667 |21.741667 |1.003230 | 0.715305 |
| EmberJS-TodoMVC |113.146667 |110.871667 |0.979893 | 0.000000 (significant) |
| BackboneJS-TodoMVC |42.481667 |42.346667 |0.996822 | 0.358040 |
| Preact-TodoMVC |15.796667 |16.016667 |1.013927 | 0.226011 |
| AngularJS-TodoMVC |117.568333 |117.345000 |0.998100 | 0.543369 |
| Vanilla-ES2015-TodoMVC |58.348333 |57.905000 |0.992402 | 0.000381 (significant) |
| Inferno-TodoMVC |54.656667 |54.946667 |1.005306 | 0.254310 |
| Flight-TodoMVC |61.106667 |61.141667 |1.000573 | 0.880780 |
| Angular2-TypeScript-TodoMVC |37.030000 |37.065000 |1.000945 | 0.918550 |
| VanillaJS-TodoMVC |47.741667 |47.911667 |1.003561 | 0.497675 |
| jQuery-TodoMVC |205.251667 |203.903333 |0.993431 | 0.000420 (significant) |
| EmberJS-Debug-TodoMVC |312.448333 |308.848333 |0.988478 | 0.000020 (significant) |
| React-TodoMVC |78.381667 |78.268333 |0.998554 | 0.654647 |
| React-Redux-TodoMVC |131.246667 |131.626667 |1.002895 | 0.138912 |
| Vanilla-ES2015-Babel-Webpack-TodoMVC |57.860000 |57.533333 |0.994354 | 0.156536 |
----------------------------------------------------------------------------------------------------------------------------------
a mean = 290.61106
b mean = 291.21768
pValue = 0.1419936818
(Bigger means are better.)
1.002 times better
Results ARE NOT significant

bytecompiler/BytecodeGenerator.cpp:
(JSC::prepareJumpTableForStringSwitch):

dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):

dfg/DFGGraph.h:
dfg/DFGLazyJSValue.cpp:
(JSC::DFG::CrossThreadStringTranslator::hash):
(JSC::DFG::CrossThreadStringTranslator::equal):
(JSC::DFG::CrossThreadStringTranslator::translate):
(JSC::DFG::LazyJSValue::tryGetString const):

dfg/DFGLazyJSValue.h:
(JSC::DFG::LazyJSValue::knownStringImpl):

heap/Heap.cpp:
(JSC::Heap::finalize):

heap/Heap.h:
(JSC::Heap::appendPossiblyAccessedStringFromConcurrentThreads):

runtime/JSString.h:
(JSC::JSString::swapToAtomString const):
(JSC::JSString::toIdentifier const):
(JSC::JSString::toAtomString const):

2:55 PM Changeset in webkit [292327] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/JavaScriptCore/runtime

Cherry-pick r289177. rdar://91259284

Cache the most recent AtomString produced by JSString::toIdentifier
https://bugs.webkit.org/show_bug.cgi?id=236124

Reviewed by Yusuke Suzuki.

JSString::toIdentifier does not store the result of atomizing its string
value, except when it is a rope. We can often end up atomizing the same
JSString a number of times.

This patch caches the last atomized string produced from
JSString::toIdentifier in a given VM. From local testing, this is a 0.5%
Speedometer2 improvement on an M1 MacBook Air, although surprisingly is
neutral on a recent Intel MacBook Pro.

runtime/JSString.h:
(JSC::JSRopeString::toIdentifier const):
(JSC::JSString::toIdentifier const):

runtime/VM.h:

2:55 PM Changeset in webkit [292326] by Alan Coon
  • 5 edits
    1 add in branches/safari-613-branch

Cherry-pick r289020. rdar://91259284

Speed-up JSON.stringify() by avoiding "toJSON" property lookups
https://bugs.webkit.org/show_bug.cgi?id=235996

Patch by Alexey Shvayka ashvayka@apple.com> on 2022-02-02
Reviewed by Saam Barati.

JSTests:

microbenchmarks/json-stringify-many-objects-to-json.js:
Make this test a little more realistic by moving "toJSON" onto prototype.

microbenchmarks/vanilla-todomvc-json-stringify.js: Added.
Source/JavaScriptCore:

Speedometer2/Vanilla* subtests are highly reliant on JSON.stringify() for "storage":
it accounts for 10-15% of running time. EmberJS* subtests rely on JSON.stringify() as
well, although they are significantly slower overall, and also encounter only a few
different structures.

This patch caches "toJSON" properties on Structure's rare data; it's the same technique
we are using in toPrimitive() to avoid "toString" / "valueOf" lookups. The microbenchmark,
which was carefully extracted from Speedometer2/Vanilla* subtests, progressed by 3.7%.

While we could come up with a solution that doesn't involve creating StructureRareData
for all structures we stringify, like keeping a list of StructureIDs w/o "toJSON" method,

which will be correct as long as m_hasFastObjectProperties
m_isJSArray is true for all

seen objects, that would probably miss some edge case, won't persist between JSON.stringify()
calls, and won't speed-up structures with "toJSON" methods like Dates.

runtime/CachedSpecialPropertyAdaptiveStructureWatchpoint.cpp:
(JSC::CachedSpecialPropertyAdaptiveStructureWatchpoint::fireInternal):

runtime/JSONObject.cpp:
(JSC::Stringifier::toJSON):

runtime/StructureRareData.cpp:
(JSC::StructureRareData::cacheSpecialPropertySlow):
(JSC::CachedSpecialPropertyAdaptiveInferredPropertyValueWatchpoint::handleFire):

runtime/StructureRareData.h:

2:55 PM Changeset in webkit [292325] by Alan Coon
  • 112 edits
    3 copies
    2 adds in branches/safari-613-branch/Source

Cherry pick r288815 r288854 r288870 r289592 r289717 r289718 r291448 r291456.

These are all part of Keith's StructureID overhaul.

2:54 PM Changeset in webkit [292324] by Alan Coon
  • 1 edit in branches/safari-613-branch/Source/JavaScriptCore/yarr/YarrJIT.cpp

Cherry-pick r288748. rdar://91259284

[JSC] YarrJIT optimization for character BM search
https://bugs.webkit.org/show_bug.cgi?id=235738

Reviewed by Saam Barati.

Add micro-optimization of BM search path. Since it is super hot path,
this small improvement offsers 1% in jquery-todomvc-regexp microbenchmark.

ToT Patched

jquery-todomvc-regexp 484.1399+-1.0527 479.0932+-1.0999 definitely 1.0105x faster

yarr/YarrJIT.cpp:

2:54 PM Changeset in webkit [292323] by Alan Coon
  • 2 edits in branches/safari-613-branch

Cherry-pick r288669. rdar://91259284

Avoid setting and clearing :active state when dispatching synthetic click events when possible
https://bugs.webkit.org/show_bug.cgi?id=235672
<rdar://problem/88095418>

Reviewed by Simon Fraser.

Source/WebCore:

Simulated click events are dispatched with two options:

whether to send associated events mouseover, mouseup, mousedown
whether to repaint the target element with its pressed look
We currently always set the element's :active state just after when we'd
send the mousedown event, and clear it just after that.

When we dispatch a simulated click event with neither of the above
options set, there's no way to observe the temporary :active state on
the element. We can skip it in that case.

We need to continue clearing clearing the :active state regardless,
because some callers have already set :active and are relying on
simulateClick to clear it.

This patch is a 0.3-0.4% improvement on Speedometer 2.

dom/SimulatedClick.cpp:
(WebCore::simulateClick):

LayoutTests:

platform/gtk/inspector/timeline/line-column-expected.txt:

2:54 PM Changeset in webkit [292322] by Alan Coon
  • 3 edits in branches/safari-613-branch/Source/JavaScriptCore/runtime

Cherry-pick r288537. rdar://91259284

Remove VM::stringCache
https://bugs.webkit.org/show_bug.cgi?id=235536

Reviewed by Sam Weinig.

We consult VM::stringCache when creating a JSString, but since
bug 142115 we never insert anything into it.

Removing this results in almost-significant improvements in the VueJS,
Vanilla-ES2015, and jQuery sub-tests of Speedometer 2 (of 0.5-2%,
0.03 <= p <= 0.05), and an almost significant 0.2% improvement in the
overall score (p = 0.06).

runtime/JSString.cpp:
(JSC::jsStringWithCacheSlowCase):

runtime/VM.cpp:
(JSC::VM::VM):

runtime/VM.h:

2:52 PM Changeset in webkit [292321] by Brent Fulgham
  • 1 edit in trunk/Source/WebCore/features.json

Correct typo in features.json

2:38 PM Changeset in webkit [292320] by Alan Coon
  • 9 edits in branches/safari-613-branch/Source

Versioning.

WebKit-7613.2.6

2:38 PM Changeset in webkit [292319] by Cameron McCormack
  • 4 edits in trunk/Source/WebKit

Remove display list map entry before remote resource
https://bugs.webkit.org/show_bug.cgi?id=238764

Reviewed by Simon Fraser.

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::clearImageBufferReference):

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

(WebKit::RemoteRenderingBackend::releaseRemoteResourceWithQualifiedIdentifier):

2:30 PM Changeset in webkit [292318] by Simon Fraser
  • 2 edits in trunk/Tools

Fix the TestWebKitAPI build with an iOS 15.4 internal SDK
https://bugs.webkit.org/show_bug.cgi?id=238750

Reviewed by Alex Christensen.

Add needed include.

  • TestWebKitAPI/ios/UIKitSPI.h:
2:21 PM Changeset in webkit [292317] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

[CSS-contain] Update select element based test failures.

Unreviewed.

2:16 PM Changeset in webkit [292316] by Wenson Hsieh
  • 7 edits in trunk/Source

[macOS] Add helper methods to install and uninstall VKCImageAnalysisOverlayView
https://bugs.webkit.org/show_bug.cgi?id=238714

Reviewed by Tim Horton.

Source/WebCore/PAL:

Add soft-linking support for VKCImageAnalysisOverlayView. See WebKit/ChangeLog for more details.

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

Source/WebKit:

Add helper methods for adding and removing a temporary VKCImageAnalysisOverlayView as a subview of WKWebView.
See below for more details. No change in behavior (yet).

  • UIProcess/Cocoa/WebViewImpl.h:

(WebKit::WebViewImpl::imageAnalysisInteractionBounds const):
(WebKit::WebViewImpl::imageAnalysisOverlayView const):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::processImageAnalyzerRequest):

Pull logic for processing an image analyzer request and invoking the completion handler on the main thread (via
callOnMainRunLoop) out into a separate helper method (to be used in a subsequent patch).

(WebKit::WebViewImpl::requestTextRecognition):
(-[WKImageAnalysisOverlayViewDelegate initWithWebViewImpl:]):

Add an Objective-C object that acts as a delegate for the image analysis overlay view. This is done to correctly
position the overlay, but also for a couple of additonal reasons below.

(-[WKImageAnalysisOverlayViewDelegate dealloc]):
(-[WKImageAnalysisOverlayViewDelegate observeValueForKeyPath:ofObject:change:context:]):

Add logic to steal first responder status away from VKCImageAnalysisOverlayView's internal text selection view
and restore it to the web view when there is no longer an active text selection in the overlay. This ensures
that key events are only routed to the image analysis overlay view in the case where the overlay actually
contains a text selection.

(-[WKImageAnalysisOverlayViewDelegate firstResponderIsInsideImageOverlay]):
(-[WKImageAnalysisOverlayViewDelegate imageAnalysisOverlay:shouldHandleKeyDownEvent:]):

Never allow the image overlay view to override Escape key handling.

(-[WKImageAnalysisOverlayViewDelegate contentsRectForImageAnalysisOverlayView:]):
(WebKit::WebViewImpl::installImageAnalysisOverlayView):
(WebKit::WebViewImpl::uninstallImageAnalysisOverlayView):
(WebKit::WebViewImpl::imageAnalysisOverlayViewHasCursorAtPoint const):

Allow the image analysis overlay view to set the mouse cursor when the mouse is over interactable content.

  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::setCursor):

1:54 PM Changeset in webkit [292315] by ggaren@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Only check isPagedOut() under memory pressure
https://bugs.webkit.org/show_bug.cgi?id=238742

Reviewed by Cameron McCormack.

Worth about 0.4% on Speedometer.

In theory, if we're not under memory pressure, we're either (a) not
paged out because we were not recently under memory pressure or (b)
paged out but OK to page in again because memory is available.

This could increase swap if a system frequently oscillated between
yes-memory-pressure and no-memory-pressure; but in practice the systems
we see under significant memory pressure tend to stay that way.

  • heap/FullGCActivityCallback.cpp:

(JSC::FullGCActivityCallback::doCollection):

1:41 PM Changeset in webkit [292314] by Tyler Wilcock
  • 4 edits
    5 adds in trunk

AccessibilityNodeObject::elementRect should use children rects for display:contents AX objects
https://bugs.webkit.org/show_bug.cgi?id=238680

Reviewed by Chris Fleizach and Andres Gonzalez.

Source/WebCore:

Because display:contents AccessibilityNodeObjects can have rendered
content (unlike hidden, aria-hidden="false" node objects), we can compute
AccessibilityNodeObject::elementRect by adding up the rectangles of the object's children.
This provides a more accurate frame for these objects.

Test: accessibility/node-only-object-element-rect.html

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::boundingBoxRect const):

LayoutTests:

  • accessibility/node-only-object-element-rect-expected.txt: Added.
  • accessibility/node-only-object-element-rect.html: Added.
  • platform/glib/accessibility/node-only-object-element-rect-expected.txt: Added.
  • platform/ios/TestExpectations: Enable new test.
  • platform/ios/accessibility/node-only-object-element-rect-expected.txt: Added.
  • platform/win/accessibility/node-only-object-element-rect-expected.txt: Added.
12:53 PM Changeset in webkit [292313] by stephan.szabo@sony.com
  • 2 edits in trunk

[PlayStation] Re-disable WebDriver
https://bugs.webkit.org/show_bug.cgi?id=238756

Unreviewed build fix

  • Source/cmake/OptionsPlayStation.cmake:
12:48 PM Changeset in webkit [292312] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

[Apple Pay] buttons should be localized based on the system if not specified by the HTML
https://bugs.webkit.org/show_bug.cgi?id=238743
<rdar://problem/89592004>

Reviewed by Wenson Hsieh.

  • rendering/RenderThemeCocoa.mm:

(WebCore::RenderThemeCocoa::paintApplePayButton):

12:44 PM Changeset in webkit [292311] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Update 'features.json' for current state of WebKit
https://bugs.webkit.org/show_bug.cgi?id=238746

Reviewed by Tim Nguyen.

I noticed that the current 'features.json' file is out of date. I think the attached changes more
accurately reflect the state of the engine.

  • features.json:
12:25 PM Changeset in webkit [292310] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Simplify / Optimize the whitespace cache implementation
https://bugs.webkit.org/show_bug.cgi?id=238736

Reviewed by Sam Weinig.

Instead of using 2 C arrays of size maximumCachedStringLength + 1 Vector with an inline
buffer of size maximumCachedStringLength, we now used a single FixedVector of size
maximumCachedStringLength.

Because the Vector has an inline buffer whose size is the max size of the cache, using
a FixedVector is just more efficient. It also means we don't need to store indexes in
that Vector in a separate C array. Finally, I used a struct named AtomStringWithCode to
store { AtomString, uint64 code } so we don't need separate containers for the AtomString
and the code.

Note that I added VectorTraits for the new AtomStringWithCode struct to make sure it can
get initialized via a simple memset.

This is a 0.25-0.3% progression on Speedometer according to A/B bots.

  • html/parser/HTMLConstructionSite.cpp:

(WebCore::WhitespaceCache::lookup):

  • html/parser/HTMLConstructionSite.h:

(WebCore::WhitespaceCache::WhitespaceCache):

12:06 PM Changeset in webkit [292309] by Wenson Hsieh
  • 5 edits
    2 adds in trunk/Tools

[iOS] Add API tests for video extraction in element fullscreen
https://bugs.webkit.org/show_bug.cgi?id=238706
rdar://91205141

Reviewed by Eric Carlson.

Add a WebKitAdditions hook for the new API test, as well as a new test page that exercises element fullscreen
with a video element.

  • TestWebKitAPI/SourcesCocoa.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenVideoExtraction.mm: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/element-fullscreen.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/iOSMouseSupport.mm:
11:31 AM Changeset in webkit [292308] by J Pascoe
  • 16 edits
    26 adds
    4 deletes in trunk

[ 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
rdar://problem/84122086

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

Update expectations to account for variant metadata.

  • web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.https.any-expected.txt: Removed.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.https.any.html:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.https.any.worker-expected.txt: Removed.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.https.any.worker.html:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.https.any.worker_1-1000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.https.any.worker_1001-2000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.https.any.worker_2001-3000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.https.any.worker_3001-last-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.https.any_1-1000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.https.any_1001-2000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.https.any_2001-3000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.https.any_3001-last-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any-expected.txt: Removed.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.html:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.worker-expected.txt: Removed.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.worker.html:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.worker_1-1000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.worker_1001-2000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.worker_2001-3000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.worker_3001-4000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.worker_4001-5000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.worker_5001-6000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.worker_6001-7000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.worker_7001-8000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any.worker_8001-last-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any_1-1000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any_1001-2000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any_2001-3000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any_3001-4000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any_4001-5000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any_5001-6000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any_6001-7000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any_7001-8000-expected.txt: Added.
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.https.any_8001-last-expected.txt: Added.

Tools:

This patch adds support for running js templated WPT tests with the variant
meta tag seperately, as the WPT test infrastructure does.

New unit tests were added to webkitpy scripts to test the new behavior.

  • Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy.py:

(LayoutTestFinder._expand_variants):
(LayoutTestFinder._real_tests):

  • Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy_unittest.py:

(LayoutTestFinderTests.test_find_template_variants):
(LayoutTestFinderTests.test_preserves_order_directories): Deleted.
(LayoutTestFinderTests.test_preserves_order_mixed_file_type): Deleted.
(LayoutTestFinderTests.test_preserves_order_mixed_file_type_b): Deleted.
(LayoutTestFinderTests.test_find_directory_multiple_times): Deleted.
(LayoutTestFinderTests.test_no_reference): Deleted.
(LayoutTestFinderTests.test_glob_no_references): Deleted.
(LayoutTestFinderTests.test_find_with_skipped_directories): Deleted.
(LayoutTestFinderTests.test_find_with_skipped_directories_2): Deleted.
(LayoutTestFinderTests.test_is_test_file): Deleted.
(LayoutTestFinderTests.test_is_w3c_resource_file): Deleted.

  • Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:

(SingleTestRunner):

  • Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:

(TestResultWriter.output_filename):

  • Scripts/webkitpy/port/base.py:

(Port._expected_baselines_for_suffixes):

  • Scripts/webkitpy/w3c/common.py:
  • Scripts/webkitpy/w3c/test_importer.py:

(TestImporter._variant_lines):
(TestImporter):
(TestImporter._write_html_template):
(TestImporter._read_environments_and_variants_for_template_test):
(TestImporter.write_html_files_for_templated_js_tests):
(TestImporter.readEnvironmentsForTemplateTest): Deleted.

  • Scripts/webkitpy/w3c/test_importer_unittest.py:

LayoutTests:

Remove timeout expectation.

  • platform/ios-wk2/TestExpectations:
11:27 AM Changeset in webkit [292307] by ntim@apple.com
  • 3 edits in trunk/LayoutTests/imported/w3c

Make focus-after-close.html WPT pass
https://bugs.webkit.org/show_bug.cgi?id=233525

Reviewed by Simon Fraser.

The last subtest doesn't pass, because WebKit intentionally differs from other browsers by scrolling
to the focused element asynchronously (see bug 181575). Wait for a scroll event + tick to make it pass.

  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/focus-after-close-expected.txt:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/focus-after-close.html:
11:11 AM Changeset in webkit [292306] by ntim@apple.com
  • 12 edits
    3 deletes in trunk

Conditionally inject <attachment> styles based on runtime flag
https://bugs.webkit.org/show_bug.cgi?id=238739

Reviewed by Tim Horton.

Source/WebCore:

Also use appearance: auto instead of -webkit-appearance: attachment, since it also works thanks to
RenderTheme::adjustAppearanceForElement().

Test: LayoutTests/fast/attachment/attachment-disabled-rendering.html

  • css/html.css:

(#endif):

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::attachmentStyleSheet const):
Move html.css styles in there.
(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::adjustAttachmentStyle const): Deleted.
adjustAttachmentStyle was unused, not overriden and no-op.

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

(WebCore::RenderThemeIOS::attachmentStyleSheet const):
Put iOS specific styles there.

  • style/UserAgentStyle.cpp:

(WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):
Append styles to UA styling.

  • style/UserAgentStyle.h:

LayoutTests:

Update test expectations, now that display is no longer forced to inline-block by appearance, and now that
color is no longer unconditionally set on iOS to -apple-system-blue.

  • fast/attachment/attachment-disabled-rendering-expected.txt:
  • fast/attachment/attachment-disabled-rendering.html:
  • platform/ios/fast/attachment/attachment-disabled-rendering-expected.txt: Removed.
  • platform/mac/fast/attachment/attachment-disabled-rendering-expected.png:
  • platform/win/fast/attachment/attachment-disabled-rendering-expected.txt: Removed.
  • platform/wpe/fast/attachment/attachment-disabled-rendering-expected.txt: Removed.
10:56 AM Changeset in webkit [292305] by vjaquez@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK][WPE] Compilation error in debug mode after r292279
https://bugs.webkit.org/show_bug.cgi?id=238741

Reviewed by Philippe Normand.

No functional changes.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Add symbol
guards.

10:56 AM Changeset in webkit [292304] by Jonathan Bedard
  • 3 edits in trunk/Tools

[git-webkit canonicalize] Support multiple empty lines
https://bugs.webkit.org/show_bug.cgi?id=238744
<rdar://problem/91246947>

Reviewed by Stephanie Lewis and Dewei Zhu.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/canonicalize/message.py:

(main): When committing a change with 'Patch by' in it, SVN adds an
extra empty line in the commit message.

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

(TestCanonicalize.test_git_svn_existing_merge_queue): Added.

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

10:52 AM Changeset in webkit [292303] by Alan Coon
  • 1 copy in tags/Safari-614.1.8.2

Tag Safari-614.1.8.2.

10:49 AM Changeset in webkit [292302] by Alan Coon
  • 1 copy in tags/Safari-614.1.7.5

Tag Safari-614.1.7.5.

10:49 AM Changeset in webkit [292301] by Alan Coon
  • 16 edits in branches/safari-614.1.8-branch/Source

Cherry-pick r292258. rdar://problem/91069927

Stop copying StagedFrameworks to the secondary path by default
https://bugs.webkit.org/show_bug.cgi?id=238688

Reviewed by Saam Barati.

Decoupled COPY_STAGED_FRAMEWORKS_TO_SECONDARY_PATH from USE_SYSTEM_CONTENT_PATH so we won't
always copy frameworks to the secondary path on macOS. Instead, the build configuration can set
COPY_STAGED_FRAMEWORKS_TO_SECONDARY_PATH as appropriate.

Source/JavaScriptCore:

  • Configurations/Base.xcconfig:

Source/ThirdParty/ANGLE:

  • Configurations/ANGLE-dynamic.xcconfig:

Source/ThirdParty/libwebrtc:

  • Configurations/libwebrtc.xcconfig:

Source/WebCore:

  • Configurations/WebCore.xcconfig:

Source/WebGPU:

  • Configurations/WebGPU.xcconfig:

Source/WebInspectorUI:

  • Configurations/WebInspectorUIFramework.xcconfig:

Source/WebKit:

  • Configurations/Base.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/Base.xcconfig:

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

10:46 AM Changeset in webkit [292300] by Alan Coon
  • 9 edits in branches/safari-614.1.8-branch/Source

Versioning.

WebKit-7614.1.8.2

10:37 AM Changeset in webkit [292299] by Chris Dumez
  • 7 edits in trunk

Drop mostly unused String(const LChar*) constructor
https://bugs.webkit.org/show_bug.cgi?id=238716

Reviewed by Geoffrey Garen.

Source/WTF:

  • wtf/text/WTFString.cpp:
  • wtf/text/WTFString.h:

Tools:

  • TestWebKitAPI/Tests/WTF/StringOperators.cpp:

(TestWebKitAPI::TEST):

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

(TestWebKitAPI::TEST):

10:33 AM Changeset in webkit [292298] by Russell Epstein
  • 1 copy in branches/safari-614.1.9-branch

New branch.

10:32 AM Changeset in webkit [292297] by Russell Epstein
  • 9 edits in trunk/Source

Versioning.

WebKit-7614.1.10

10:31 AM Changeset in webkit [292296] by youenn@apple.com
  • 3 edits
    4 adds in trunk

Service-Worker-Navigation-Preload header not being sent when Navigation Preload is enabled.
https://bugs.webkit.org/show_bug.cgi?id=238564

Reviewed by Alex Christensen.

Source/WebKit:

We were cancelling the preload as soon as receiving a response through FetchEvent.respondWith.
But it is possible to answer with a synthetic response and then use the preload to fill the synthetic response body.
To allow this, we no longer cancel the preload when receiving a response in case of enabled navigation preload.

Test: http/wpt/service-workers/service-worker-iframe-preload-after-response.https.html

  • NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:

LayoutTests:

  • http/wpt/service-workers/resources/service-worker-iframe-preload-after-response-script.py: Added.
  • http/wpt/service-workers/service-worker-iframe-preload-after-response-worker.js: Added.
  • http/wpt/service-workers/service-worker-iframe-preload-after-response.https-expected.txt: Added.
  • http/wpt/service-workers/service-worker-iframe-preload-after-response.https.html: Added.
10:21 AM Changeset in webkit [292295] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

Unreviewed, GStreamer 1.21 build fix after r292215

  • Modules/mediastream/gstreamer/GStreamerStatsCollector.cpp:

(WebCore::fillInboundRTPStreamStats): Fix typo in packetsLost variable name.

10:20 AM Changeset in webkit [292294] by Said Abou-Hallawa
  • 9 edits in trunk

[GPU Process] [iOS] Sometimes the text drop shadow is not drawn
https://bugs.webkit.org/show_bug.cgi?id=236923
rdar://89196794

Reviewed by Simon Fraser.

Source/WebCore:

The baseCTM of internal context of DrawGlyphsRecorder has to match the
baseCTM of the owner DisplayList::Recorder.

When recording the glyph runs, DrawGlyphsRecorder::recordDrawGlyphs()
updates the shadow of the recorder such that ShadowsIgnoreTransforms is
set to "false". That means no shadow transformation will be applied to
the offset or the blur radius in GPUP.

  • platform/graphics/DrawGlyphsRecorder.h:
  • platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:

(WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder):
(WebCore::DrawGlyphsRecorder::populateInternalState):

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

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

  • platform/graphics/harfbuzz/DrawGlyphsRecorderHarfBuzz.cpp:

(WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder):

  • platform/graphics/win/DrawGlyphsRecorderWin.cpp:

(WebCore::DrawGlyphsRecorder::DrawGlyphsRecorder):

  • rendering/RenderThemeIOS.mm:

(WebCore::paintAttachmentText):

LayoutTests:

Unskip failed the text drop shadow layout test.

  • platform/ios-wk2/TestExpectations:
10:07 AM Changeset in webkit [292293] by youenn@apple.com
  • 7 edits in trunk

CORS: Allow particular Range header values without a preflight
https://bugs.webkit.org/show_bug.cgi?id=231174
<rdar://problem/84101544>

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/range/general.any-expected.txt:
  • web-platform-tests/fetch/range/general.any.js:
  • web-platform-tests/fetch/range/general.any.worker-expected.txt:
  • web-platform-tests/fetch/range/resources/long-wav.py:

Source/WebCore:

Covered by updated tests.

  • platform/network/HTTPParsers.cpp:
9:59 AM Changeset in webkit [292292] by Elliott Williams
  • 9 edits
    1 add
    2 deletes in trunk

[XCBuild] WebKitLegacy's "Migrated headers" script does not emit task information
https://bugs.webkit.org/show_bug.cgi?id=238409
<rdar://problem/90869551>

Reviewed by Alexey Proskuryakov.

Source/WebKit:

  • WebKit.xcodeproj/project.pbxproj: Small build rule fix to prevent "no rule to process

file" warnings on every generated forwarding header. This happened because the build rule
that generates these temporary forwarding headers looked like it was supposed to _process_
those headers, too.

Source/WebKitLegacy:

Like r291809, replace MigrateHeaders.make with a "Migrated Headers" group in
WebKitLegacy.xcodeproj, and use a build rule to rewrite the headers at build-time. This
provides the build system with sufficient metadata to reason about the migrated headers and
when they need to be re-processed.

Since WebKitLegacy uses an export symbols list, run tapi-reexport on each migrated header as
it is processed. In the "Generate Export Files" phase, stitch these together to form the
EXPORTED_SYMBOLS_FILE given to the linker.

  • scripts/migrate-header-rule: Added. Runs sed and tapi-reexport on headers as they are

migrated. For tapi, include <TargetConditionals.h> so that TARGET_OS_* declarations get
resolved according to the target triple. This was not needed in the Make-based approach
because it processed all the headers in one invocation, and one of them imports
TargetConditionals early enough that it affects the others.

Running one tapi instance per header is obviously more overhead, but on a sufficiently
multicore machine it should be faster than blocking WebKitLegacy's build process on the
Make-based script phase.

  • WebKitLegacy.xcodeproj/project.pbxproj: Delete script phases, add "Migrated Headers" group

and build rule. Add a legacy-only "Install Headers" phase which launches a child xcodebuild
to install headers using the new build system. Unlike prior implementations in WebKit, WTF,
and PAL, the child xcodebuild needs access to existing build products so that clang (via
tapi) can import them. Do this by populating the child xcodebuild's SYMROOT with symlinks to
the real build products.

Source/WebKitLegacy/mac:

  • Configurations/WebKitLegacy.xcconfig: Use EXCLUDED_SOURCE_FILE_NAMES and

INCLUDED_SOURCE_FILE_NAMES to control which headers are exported. Set
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES, so that the "Generate Export Files" phase can
depend on the whole directory of reexport files and be invoked when any of them change.

  • MigrateHeaders.make: Removed.

Tools:

  • Scripts/check-for-inappropriate-files-in-framework: We were relying on a script to create

an (empty) WebKitLegacy.framework/Headers directory, which was being scanned here.
WebKitLegacy is entirely private API, so change it to check PrivateHeaders/.

9:31 AM Changeset in webkit [292291] by Jonathan Bedard
  • 3 edits in trunk/Tools

[Merge-Queue] Remove custom summaries when skipped
https://bugs.webkit.org/show_bug.cgi?id=238633
<rdar://problem/91125435>

Reviewed by Aakash Jain.

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

(ValidateSquashed.getResultSummary):
(AddReviewerToCommitMessage.getResultSummary):
(AddReviewerToChangeLog.getResultSummary):
(ValidateCommitMessage.getResultSummary):
(Canonicalize.getResultSummary):
(PushPullRequestBranch.getResultSummary):
(UpdatePullRequest.getResultSummary):

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

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

8:55 AM Changeset in webkit [292290] by jer.noble@apple.com
  • 4 edits in trunk/Source/WebCore

[Perf] HTMLVideoElement is performing synchronous paints; causing main thread hangs
https://bugs.webkit.org/show_bug.cgi?id=238707
<rdar://91025299>

Reviewed by Eric Carlson.

Spin trace diagnostics show that the main thread of the WebContent process is often hung,
blocked on a synchronous Paint message to the GPU process; in turn, the GPU process is often
busy performing media-related work, but in each of the cases found, painting is unnecessary.
The media player in question is accelerated, and should only be painted during layer snapshotting
or during a print operation.

Only paint if the renderer is not accelerated, the media element is not accelerated, or if
the paint operation isn't flattening or snapshotting. HTMLMediaElement inappropriately caches
the value of MediaPlayer::supportsAcceleratedRendering(), under the (incorrect) assumption that
the value cannot change during the lifetime of the MediaPlayer, so remove this caching layer.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaEngineWasUpdated):
(WebCore::HTMLMediaElement::clearMediaPlayer):

  • html/HTMLMediaElement.h:

(WebCore::HTMLMediaElement::supportsAcceleratedRendering const):

  • rendering/RenderVideo.cpp:

(WebCore::RenderVideo::paintReplaced):

8:45 AM Changeset in webkit [292289] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebKit

RemoteRenderingBackendProxy fails to maintain correct state when gpu process crashes and upon deletion
https://bugs.webkit.org/show_bug.cgi?id=238618

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-04-04
Reviewed by Simon Fraser.

RemoteRenderingBackendProxy::m_needsWakeUpSemaphoreForDisplayListStream
was not reset when proxy would connect to a new gpu process after a crash.
RemoteRenderingBackendProxy::~RemoteRenderingBackendProxy() would not
remove the GPUConnection::Client registration.

  • Platform/IPC/MessageReceiveQueueMap.cpp:

(IPC::MessageReceiveQueueMap::remove):

  • Platform/IPC/StreamClientConnection.h:
  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::~RemoteRenderingBackendProxy):
(WebKit::RemoteRenderingBackendProxy::gpuProcessConnectionDidClose):
(WebKit::RemoteRenderingBackendProxy::disconnectGPUProcess):
(WebKit::RemoteRenderingBackendProxy::streamConnection):
(WebKit::RemoteRenderingBackendProxy::didCreateWakeUpSemaphoreForDisplayListStream):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
8:40 AM Changeset in webkit [292288] by Sam Sneddon
  • 2 edits in trunk/Tools

WPT export broken under Python 3
https://bugs.webkit.org/show_bug.cgi?id=238735

Reviewed by Tim Nguyen.

  • Scripts/webkitpy/w3c/wpt_github.py:

(WPTGitHub.request): Ensure we have bytes, not str.

4:19 AM Changeset in webkit [292287] by Adrian Perez de Castro
  • 5 edits in trunk

[WPE][GTK] REGRESSION(r292263): Cannot make release tarballs
https://bugs.webkit.org/show_bug.cgi?id=238698

Reviewed by Carlos Garcia Campos.

.:

  • Source/cmake/WebKitDist.cmake: Make "dist" and "distcheck" targets depend on "doc-all".

Tools:

  • gtk/manifest.txt.in: Fix paths of generated documentation to be included in release tarballs.
  • wpe/manifest.txt.in: Ditto.
4:17 AM Changeset in webkit [292286] by Adrian Perez de Castro
  • 2 edits in trunk

[CMake] Provide better messages when gi-docgen cannot be found
https://bugs.webkit.org/show_bug.cgi?id=238729

Reviewed by Carlos Garcia Campos.

When gi-docgen cannot be found, or cannot be executed, provide better error messages
than those provided by CMake. While at it, make the messages mention how gi-docgen
can be installed inside the WebKit source tree to be used for the build.

  • Source/cmake/FindGIDocgen.cmake:
2:39 AM Changeset in webkit [292285] by magomez@igalia.com
  • 2 edits in trunk

Change contributor status of Miguel Gomez from committer to reviewer
https://bugs.webkit.org/show_bug.cgi?id=238730

Unreviewed.

  • metadata/contributors.json:
1:37 AM Changeset in webkit [292284] by cathiechen
  • 6 edits
    2 deletes in trunk

REGRESSION(r291797): [wk1] 5 contain-intrinsic-size* tests are constant text failures
https://bugs.webkit.org/show_bug.cgi?id=238584

Reviewed by Simon Fraser.

Source/WTF:

Enable ResizeObserver for legacy WebKit.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

Tools:

Enable ResizeObserver for wk1 test.

  • DumpRenderTree/TestOptions.cpp:

(WTR::TestOptions::defaults):

LayoutTests:

  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk1/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-031-expected.txt: Removed.
  • platform/mac-wk1/imported/w3c/web-platform-tests/resize-observer/change-layout-in-error-expected.txt: Removed.
1:03 AM Changeset in webkit [292283] by mmaxfield@apple.com
  • 4 edits in trunk/LayoutTests

[WebGPU] Unskip the first few passing WebGPU tests
https://bugs.webkit.org/show_bug.cgi?id=238709

Reviewed by Tim Nguyen.

The tests pass, so they shouldn't be marked as skip.

  • platform/ios-device-wk1/TestExpectations:
  • platform/ios-simulator-wk1/TestExpectations:
  • platform/mac-wk1/TestExpectations:
12:53 AM Changeset in webkit [292282] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebKit

StreamClientConnection should have waitForAndDispatchImmediately
https://bugs.webkit.org/show_bug.cgi?id=238622

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-04-04
Reviewed by Simon Fraser.

IPC::StreamClientConnection should have the same communication methods
as the IPC::Connection. The stream connection will forward
the calls to underlying IPC::Connection, if needed.
Add missing IPC::StreamClientConnection::waitForAndDispatchImmediately()
and use it.
Remove conveinence accessor methods for the IPC::Connection, as that should be
accessed by accessing the stream connection in the respective classes.

No new tests, refactor.

  • Platform/IPC/StreamClientConnection.h:

(IPC::StreamClientConnection::waitForAndDispatchImmediately):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::RemoteGraphicsContextGLProxy):
(WebKit::RemoteGraphicsContextGLProxy::waitUntilInitialized):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:

(WebKit::RemoteGraphicsContextGLProxy::sendSync):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::waitForDidCreateImageBufferBackend):
(WebKit::RemoteRenderingBackendProxy::waitForDidFlush):
(WebKit::RemoteRenderingBackendProxy::streamConnection):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
  • WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp:

(WebKit::RemoteGPUProxy::RemoteGPUProxy):
(WebKit::RemoteGPUProxy::waitUntilInitialized):

12:36 AM Changeset in webkit [292281] by commit-queue@webkit.org
  • 157 edits
    1 add
    7 deletes in trunk/Source/ThirdParty/ANGLE

Roll ANGLE to 2022-03-31 (fe28a4295af087ee82b8f629b67176b95019af6d)
https://bugs.webkit.org/show_bug.cgi?id=238647

Large autogenerated ChangeLog elided.

Tested locally with MiniBrowser on M1.

Patch by Kenneth Russell <kbr@chromium.org> on 2022-04-04
Reviewed by Kimmo Kinnunen.

12:29 AM Changeset in webkit [292280] by commit-queue@webkit.org
  • 35 edits in trunk/Source/WebKit

IPC::StreamServerConnectionBase has only one subclass, it should be removed
https://bugs.webkit.org/show_bug.cgi?id=238676

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-04-04
Reviewed by Wenson Hsieh.

Merge IPC::StreamServerConnectionBase and IPC::StreamServerConnection.
The base was useful when the concrete classes were templates per message receiver.
The concrete class was changed to use multiple message receivers, and the templating
was replaced with id lookup.

No new tests, refactor.

  • GPUProcess/graphics/RemoteDisplayListRecorder.h:
  • GPUProcess/graphics/RemoteGraphicsContextGL.h:
  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/graphics/WebGPU/RemoteAdapter.h:
  • GPUProcess/graphics/WebGPU/RemoteBindGroup.h:
  • GPUProcess/graphics/WebGPU/RemoteBindGroupLayout.h:
  • GPUProcess/graphics/WebGPU/RemoteBuffer.h:
  • GPUProcess/graphics/WebGPU/RemoteCommandBuffer.h:
  • GPUProcess/graphics/WebGPU/RemoteCommandEncoder.h:
  • GPUProcess/graphics/WebGPU/RemoteComputePassEncoder.h:
  • GPUProcess/graphics/WebGPU/RemoteComputePipeline.h:
  • GPUProcess/graphics/WebGPU/RemoteDevice.h:
  • GPUProcess/graphics/WebGPU/RemoteExternalTexture.h:
  • GPUProcess/graphics/WebGPU/RemoteGPU.h:
  • GPUProcess/graphics/WebGPU/RemotePipelineLayout.h:
  • GPUProcess/graphics/WebGPU/RemoteQuerySet.h:
  • GPUProcess/graphics/WebGPU/RemoteQueue.h:
  • GPUProcess/graphics/WebGPU/RemoteRenderBundle.h:
  • GPUProcess/graphics/WebGPU/RemoteRenderBundleEncoder.h:
  • GPUProcess/graphics/WebGPU/RemoteRenderPassEncoder.h:
  • GPUProcess/graphics/WebGPU/RemoteRenderPipeline.h:
  • GPUProcess/graphics/WebGPU/RemoteSampler.h:
  • GPUProcess/graphics/WebGPU/RemoteShaderModule.h:
  • GPUProcess/graphics/WebGPU/RemoteTexture.h:
  • GPUProcess/graphics/WebGPU/RemoteTextureView.h:
  • Platform/IPC/HandleMessage.h:

(IPC::handleMessageSynchronous):

  • Platform/IPC/StreamConnectionWorkQueue.cpp:

(IPC::StreamConnectionWorkQueue::addStreamConnection):
(IPC::StreamConnectionWorkQueue::removeStreamConnection):
(IPC::StreamConnectionWorkQueue::processStreams):

  • Platform/IPC/StreamConnectionWorkQueue.h:
  • Platform/IPC/StreamMessageReceiver.h:
  • Platform/IPC/StreamServerConnection.cpp:

(IPC::StreamServerConnection::StreamServerConnection):
(IPC::StreamServerConnection::startReceivingMessages):
(IPC::StreamServerConnection::stopReceivingMessages):
(IPC::StreamServerConnection::enqueueMessage):
(IPC::StreamServerConnection::tryAcquire):
(IPC::StreamServerConnection::acquireAll):
(IPC::StreamServerConnection::release):
(IPC::StreamServerConnection::releaseAll):
(IPC::StreamServerConnection::alignedSpan):
(IPC::StreamServerConnection::size):
(IPC::StreamServerConnection::clampedLimit const):
(IPC::StreamServerConnection::dispatchStreamMessages):

  • Platform/IPC/StreamServerConnection.h:

(IPC::StreamServerConnection::sendSyncReply):

  • Scripts/webkit/messages.py:

(generate_message_handler):

  • Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp:

(WebKit::TestWithStream::didReceiveStreamMessage):

  • Shared/IPCStreamTester.h:

Apr 3, 2022:

11:18 PM Changeset in webkit [292279] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

Make it hard to add a new CSS property to WebKit wihtout adding animation support
https://bugs.webkit.org/show_bug.cgi?id=238447

Reviewed by Dean Jackson.

It's easy to add a new CSS property to WebKit without thinking about animation support.
Down the line, it would be better to add support to the script dealing with CSSProperties.json
to automatically generate animation support where possible, but to get started we now
ASSERT() whether all properties have been found to have animated support, except those
known not to be animatable.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

7:35 PM Changeset in webkit [292278] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Standardize naming of WK_NETWORK_EXTENSION_LDFLAGS (from LD_FLAGS)
https://bugs.webkit.org/show_bug.cgi?id=238717

Reviewed by Wenson Hsieh.

No new tests, just a style fix.

  • Configurations/WebCore.xcconfig:
6:14 PM Changeset in webkit [292277] by ggaren@apple.com
  • 2 edits in trunk/Source/WebCore

Document::addListenerTypeIfNeeded should not call pthread_get_specific 14 times
https://bugs.webkit.org/show_bug.cgi?id=238702

Reviewed by Cameron McCormack.

Document::addListenerTypeIfNeeded => pthread_get_specific showed up in
a profile of Preact-TodoMVC, and I verified by disassembly that the
generated code really does call pthread_get_specific 14x, along with
related inefficiencies.

Only worth about 0.5%, so I didn't A/B test it.

You could imagine lots of other ways to speed up this function /
functionality, but why don't we start with 14x and see where that takes
us.

  • dom/Document.cpp:

(WebCore::Document::addListenerTypeIfNeeded): Use a local variable
because, like, come on.

12:51 PM Changeset in webkit [292276] by Tyler Wilcock
  • 2 edits in trunk/Source/WebCore

-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:] should fail fast if the given parameter wrapper has no backing object
https://bugs.webkit.org/show_bug.cgi?id=238635

Reviewed by Chris Fleizach.

If this method is called with a parameter wrapper object that has lost
its backing object, we should return early to avoid dereferencing a
null pointer.

This could happen in rare split-second transition states where a wrapper
has lost its backing object but has not yet been cleaned up by a notification.
This could also happen if WebKit is vending detached objects (e.g. via AXChildren)
in a similar transition state.

No test added because I haven't been able to find any scenario reproducing
this issue either in our existing layout tests or on real webpages.

rdar://90925399

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

1:04 AM Changeset in webkit [292275] by timothy_horton@apple.com
  • 6 edits in trunk/Source

_WKDataTask doesn't work in macCatalyst
https://bugs.webkit.org/show_bug.cgi?id=238655

Reviewed by Alexey Proskuryakov.

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:]): Deleted.

Source/WTF:

  • wtf/PlatformHave.h:

Enable HAVE(NSURLSESSION_TASK_DELEGATE) on macCatalyst.
Drive-by enable a few other things on macCatalyst.
Remove and simplify some always-true version checks.
Leave some comments about ones I'm not sure about.

Note: See TracTimeline for information about the timeline view.