Timeline



Dec 11, 2021:

7:04 PM Changeset in webkit [286922] by don.olmstead@sony.com
  • 8 edits
    2 deletes in trunk/Source/WebCore

SharedBuffer should use WTF::FileSystem when creating from a file
https://bugs.webkit.org/show_bug.cgi?id=233598
<rdar://problem/86123732>

Reviewed by Chris Dumez.

Remove platform specific implementations of SharedBuffer::createFromReadingFile and use
FileSystem::readEntireFile instead when creating a SharedBuffer from a file. The function
was only used within SharedBuffer::createWithContentsOfFile so the implementation is just
moved into that function.

  • PlatformFTW.cmake:
  • PlatformPlayStation.cmake:
  • PlatformWin.cmake:
  • platform/SharedBuffer.cpp:

(WebCore::SharedBuffer::createWithContentsOfFile):

  • platform/SharedBuffer.h:
  • platform/cocoa/SharedBufferCocoa.mm:

(WebCore::SharedBuffer::createFromReadingFile): Deleted.

  • platform/glib/SharedBufferGlib.cpp:

(WebCore::SharedBuffer::createFromReadingFile): Deleted.

  • platform/posix/SharedBufferPOSIX.cpp: Removed.
  • platform/win/SharedBufferWin.cpp: Removed.
6:08 PM Changeset in webkit [286921] by Alan Bujtas
  • 2 edits
    1 copy
    1 add in trunk/LayoutTests

fast/borders/bidi-002.html is failing on Monterey bots.
https://bugs.webkit.org/show_bug.cgi?id=234204

Unreviewed gardening.

  • platform/mac-bigsur/fast/borders/bidi-002-expected.txt: Copied from LayoutTests/platform/mac/fast/borders/bidi-002-expected.txt.
  • platform/mac/fast/borders/bidi-002-expected.txt:
4:39 PM Changeset in webkit [286920] by sbarati@apple.com
  • 14 edits in trunk/Source/JavaScriptCore

Teach the sampling profiler how to display origin data for B3 Wasm
https://bugs.webkit.org/show_bug.cgi?id=234097

Reviewed by Yusuke Suzuki.

This teaches the SamplingProfiler how to gather origin data for
Wasm. We reuse the PCToCodeOriginMap from JS, and store the wasm
function offset data inside of CodeOrigin's BytecodeIndex.

For now, this patch is only doing this for B3, because the Air backend
doesn't currently generate filled in OpcodeOrigin data. We'll fix that
in: https://bugs.webkit.org/show_bug.cgi?id=234182

Also, this capability isn't yet supported in Web Inspector. We'll want
to do that in a future change as we improve Web Inspector's ability to
debug Wasm code. When that time comes, we'll have to generate the
PCToCodeOriginMap based on debugging info, and not just 'useSamplingProfiler'
JSC option.

The data now shows up like this for hottest bytecodes:

Hottest bytecodes as <numSamples 'functionName#hash:JITType:bytecodeIndex'>

524 '<?>.wasm-function[2373]:OMG:0x21a'
414 '<?>.wasm-function[2363]:OMG:0x1ae'
395 '<?>.wasm-function[2373]:OMG:0x418'
354 '<?>.wasm-function[2373]:OMG:0x34f'
270 '<?>.wasm-function[2373]:OMG:0x352'
256 '<?>.wasm-function[2363]:OMG:0x152'

  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • jit/PCToCodeOriginMap.cpp:

(JSC::PCToCodeOriginMapBuilder::PCToCodeOriginMapBuilder):

  • jit/PCToCodeOriginMap.h:
  • runtime/SamplingProfiler.cpp:

(JSC::FrameWalker::recordJITFrame):
(JSC::SamplingProfiler::processUnverifiedStackTraces):
(JSC::SamplingProfiler::reportTopBytecodes):

  • runtime/SamplingProfiler.h:
  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::origin):
(JSC::Wasm::parseAndCompileAir):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::parseAndCompile):
(JSC::Wasm::computePCToCodeOriginMap):

  • wasm/WasmB3IRGenerator.h:

(): Deleted.

  • wasm/WasmBBQPlan.cpp:

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

  • wasm/WasmCalleeRegistry.h:

(JSC::Wasm::CalleeRegistry::unregisterCallee):
(JSC::Wasm::CalleeRegistry::addPCToCodeOriginMap):
(JSC::Wasm::CalleeRegistry::WTF_REQUIRES_LOCK):

  • wasm/WasmOMGPlan.cpp:

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

  • wasm/WasmOpcodeOrigin.h:

(JSC::Wasm::OpcodeOrigin::OpcodeOrigin):

4:38 PM Changeset in webkit [286919] by timothy_horton@apple.com
  • 7 edits in trunk/Source/WebKit

Momentum Event Dispatcher: Tail frames are the wrong velocity if momentum event dispatch rate doesn't match screen refresh rate
https://bugs.webkit.org/show_bug.cgi?id=234168
<rdar://problem/86247557>

Reviewed by Simon Fraser.

In r286671, I scaled the tail frames into the momentum event disaptch
rate, but they are actually always dispatched at display refresh
frequency. In many cases these things are the same, but in some
cases can differ (most commonly a 120Hz display with 60Hz event dispatch),
so to always have the tail move at the right rate, scale into the display
refresh rate instead).

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::windowScreenDidChange):

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::pageScreenDidChange):

  • WebProcess/WebPage/EventDispatcher.h:
  • WebProcess/WebPage/EventDispatcher.messages.in:
  • WebProcess/WebPage/MomentumEventDispatcher.cpp:

(WebKit::MomentumEventDispatcher::didStartMomentumPhase):
(WebKit::MomentumEventDispatcher::displayProperties const):
(WebKit::MomentumEventDispatcher::startDisplayLink):
(WebKit::MomentumEventDispatcher::stopDisplayLink):
(WebKit::MomentumEventDispatcher::pageScreenDidChange):
(WebKit::MomentumEventDispatcher::displayWasRefreshed):
(WebKit::MomentumEventDispatcher::displayID const): Deleted.

  • WebProcess/WebPage/MomentumEventDispatcher.h:

Plumb and store the nominal display refresh rate.

(WebKit::MomentumEventDispatcher::buildOffsetTableWithInitialDelta):
Scale the tail frames from the 60Hz ideal rate into the display refresh
rate, instead of the event dispatch rate.

Incoming events still scale *in* from the event dispatch rate, since
that's... the rate they come at.

4:29 PM Changeset in webkit [286918] by Chris Dumez
  • 17 edits in trunk/Source/WebCore

ContextDestructionObserver::m_scriptExecutionContext should be private
https://bugs.webkit.org/show_bug.cgi?id=234184

Reviewed by Youenn Fablet.

ContextDestructionObserver::m_scriptExecutionContext should be private. It is poor encapsulation
to have protected data members.

  • Modules/encryptedmedia/CDM.cpp:

(WebCore::CDM::getSupportedConfiguration):

  • Modules/encryptedmedia/MediaKeySystemRequest.cpp:

(WebCore::MediaKeySystemRequest::topLevelDocumentOrigin const):
(WebCore::MediaKeySystemRequest::start):
(WebCore::MediaKeySystemRequest::deny):
(WebCore::MediaKeySystemRequest::stop):
(WebCore::MediaKeySystemRequest::document const):

  • Modules/geolocation/Geolocation.cpp:

(WebCore::Geolocation::watchPosition):

  • Modules/mediastream/RTCDataChannel.h:
  • Modules/mediastream/RTCDtlsTransport.h:
  • Modules/mediastream/RTCIceTransport.h:
  • Modules/mediastream/RTCSctpTransport.h:
  • Modules/mediastream/UserMediaRequest.cpp:

(WebCore::UserMediaRequest::userMediaDocumentOrigin const):
(WebCore::UserMediaRequest::topLevelDocumentOrigin const):
(WebCore::UserMediaRequest::start):
(WebCore::UserMediaRequest::allow):
(WebCore::UserMediaRequest::deny):
(WebCore::UserMediaRequest::stop):
(WebCore::UserMediaRequest::document const):

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::mediaSessionGroupIdentifier const):

  • Modules/webaudio/BaseAudioContext.cpp:

(WebCore::BaseAudioContext::document const):
(WebCore::BaseAudioContext::origin const):
(WebCore::BaseAudioContext::addConsoleMessage):

  • Modules/webdatabase/DatabaseContext.cpp:

(WebCore::DatabaseContext::allowDatabaseAccess const):
(WebCore::DatabaseContext::databaseExceededQuota):
(WebCore::DatabaseContext::securityOrigin const):
(WebCore::DatabaseContext::isContextThread const):

  • Modules/webxr/WebXRSystem.cpp:

(WebCore::WebXRSystem::DummyInlineDevice::requestFrame):

  • dom/ActiveDOMObject.cpp:

(WebCore::ActiveDOMObject::~ActiveDOMObject):
(WebCore::ActiveDOMObject::suspendIfNeeded):

  • dom/ContextDestructionObserver.h:
  • dom/MessagePort.cpp:

(WebCore::MessagePort::MessagePort):
(WebCore::MessagePort::~MessagePort):
(WebCore::MessagePort::entangle):
(WebCore::MessagePort::postMessage):
(WebCore::MessagePort::disentangle):
(WebCore::MessagePort::messageAvailable):
(WebCore::MessagePort::start):
(WebCore::MessagePort::contextDestroyed):
(WebCore::MessagePort::dispatchMessages):
(WebCore::MessagePort::dispatchEvent):
(WebCore::MessagePort::virtualHasPendingActivity const):

  • html/track/VTTRegion.cpp:

(WebCore::VTTRegion::getDisplayTree):
(WebCore::VTTRegion::prepareRegionDisplayTree):

12:48 PM Changeset in webkit [286917] by don.olmstead@sony.com
  • 15 edits in trunk/Source

Add a std::nullptr_t constructor for RefPtr
https://bugs.webkit.org/show_bug.cgi?id=234192

Reviewed by Yusuke Suzuki.

Source/WebCore:

Remove uses of 0 when creating an empty RefPtr.

  • accessibility/AccessibilityObject.cpp:

(WebCore::Accessibility::findMatchingObjects):

  • platform/graphics/cairo/CairoUtilities.cpp:

(WebCore::drawPatternToCairoContext):

  • platform/graphics/texmap/TextureMapperGL.cpp:

(WebCore::TextureMapperGL::drawTexture):
(WebCore::TextureMapperGL::drawTexturePlanarYUV):
(WebCore::TextureMapperGL::drawTextureSemiPlanarYUV):
(WebCore::TextureMapperGL::drawTexturePackedYUV):

  • platform/graphics/win/IconWin.cpp:

(WebCore::Icon::createIconForFiles):

  • platform/graphics/win/ImageCGWin.cpp:

(WebCore::BitmapImage::create):

  • platform/graphics/win/ImageCairoWin.cpp:

(WebCore::BitmapImage::create):

  • platform/win/DragImageWin.cpp:

(WebCore::dragLabelFont):

Source/WebKit:

Remove uses of 0 when creating an empty RefPtr.

  • WebProcess/win/WebProcessWin.cpp:

(loadResourceIntoBuffer):

Source/WebKitLegacy/win:

Remove uses of 0 when creating an empty RefPtr.

  • FullscreenVideoController.cpp:

(FullscreenVideoController::draw):

  • WebArchive.cpp:

(WebArchive::createInstance):

Source/WTF:

Add the constexpr constructor RefPtr(std::nullptr_t) with the same behavior as the default
constructor. Both std::unique_ptr and std::shared_ptr have this same overload to optimize
for the nullptr case. As an added bonus this also makes it so 0 can't fill in as a
nullptr since the ambiguity will cause a compilation error.

  • wtf/RefPtr.h:

(WTF::RefPtr::RefPtr):

10:28 AM Changeset in webkit [286916] by Antti Koivisto
  • 28 edits in trunk/Source

Remove redundant StyleRule::Type enum
https://bugs.webkit.org/show_bug.cgi?id=234156

Reviewed by Alan Bujtas.

Source/WebCore:

Remove redundant CSSRule::STYLE_RULE etc enum values and just use StyleRuleType enum class.

  • bindings/js/JSCSSRuleCustom.cpp:

(WebCore::toJSNewlyCreated):

  • bindings/scripts/CodeGenerator.pm:

(GenerateCompileTimeCheckForEnumsIfNeeded):

Add 'ConstantsEnum' attribute to generate static_asserts for constants that match an enum class.

  • bindings/scripts/IDLAttributes.json:
  • css/CSSCounterStyleRule.h:
  • css/CSSFontFaceRule.h:
  • css/CSSFontPaletteValuesRule.h:
  • css/CSSImportRule.h:
  • css/CSSKeyframeRule.h:
  • css/CSSKeyframesRule.h:
  • css/CSSLayerBlockRule.h:
  • css/CSSLayerStatementRule.h:
  • css/CSSMediaRule.h:
  • css/CSSNamespaceRule.h:
  • css/CSSPageRule.h:
  • css/CSSRule.cpp:
  • css/CSSRule.h:

(WebCore::CSSRule::typeForBindings const):

  • css/CSSRule.idl:
  • css/CSSStyleRule.h:
  • css/CSSSupportsRule.h:
  • css/CSSUnknownRule.h:
  • css/StyleRuleType.h:
  • style/InspectorCSSOMWrappers.cpp:

(WebCore::Style::InspectorCSSOMWrappers::collect):

Source/WebKitLegacy/mac:

  • DOM/DOMCSS.mm:

(kitClass):

  • DOM/DOMCSSRule.mm:

(-[DOMCSSRule type]):

10:20 AM Changeset in webkit [286915] by graouts@webkit.org
  • 14 edits
    5 adds in trunk

Expose a frameRate property to Web Animations
https://bugs.webkit.org/show_bug.cgi?id=234174
rdar://86338983

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Rebaseline the output of a Web Animations WPT which lists all enumerable Animation properties.

  • web-platform-tests/web-animations/interfaces/Animation/style-change-events-expected.txt:

Source/WebCore:

Expose a new frameRate property to the Animation interface. This property
accepts either a value from the new AnimationFrameRatePreset enum (auto,
low, high or highest) or a FramesPerSecond explicit value. This property
is governed by an off-by-default runtime setting.

When we obtain the frame rate from the IDL bindings, we record an "effective"
frame rate which is either a null value for the default frame rate, or an
explicit FramesPerSecond value for any value above or below it.

Test: webanimations/frame-rate/animation-frame-rate.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/AnimationFrameRatePreset.h: Added.
  • animation/AnimationFrameRatePreset.idl: Added.
  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::setBindingsFrameRate):
(WebCore::WebAnimation::setEffectiveFrameRate):

  • animation/WebAnimation.h:

(WebCore::WebAnimation::bindingsFrameRate const):
(WebCore::WebAnimation::frameRate const):

  • animation/WebAnimation.idl:

LayoutTests:

Add a new test checking whether valid values are accepted and invalid values
rejected without effect.

  • webanimations/frame-rate/animation-frame-rate-expected.txt: Added.
  • webanimations/frame-rate/animation-frame-rate.html: Added.
10:17 AM Changeset in webkit [286914] by Lauro Moura
  • 16 edits in trunk/Source

Non-unified build fixes, mid mid December 2021 edition
https://bugs.webkit.org/show_bug.cgi?id=234191

Unreviewed build fix.

A few more fixes already a couple of days after the last fix.

Full build still failing due to the issue discussed on bug226088.

All changes are inclusion of missing headers.

Source/WebCore:

  • html/shadow/DateTimeEditElement.cpp:
  • platform/graphics/displaylists/DisplayListRecorder.cpp:
  • workers/WorkerDebuggerProxy.h:
  • workers/shared/SharedWorkerManager.cpp:
  • workers/shared/SharedWorkerProxy.cpp:
  • workers/shared/SharedWorkerScriptLoader.cpp:
  • workers/shared/SharedWorkerScriptLoader.h:
  • workers/shared/SharedWorkerThread.cpp:

Source/WebKit:

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
8:59 AM Changeset in webkit [286913] by mark.lam@apple.com
  • 5 edits in trunk/Source

Automatically forbid JS execution when we throw a TerminationException.
https://bugs.webkit.org/show_bug.cgi?id=234188

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

For Worker threads, we throw a TerminationException when Worker.terminate() is
called. Once the TerminationException is thrown, we expect to completely unwind
out of any JS frames on the stack, and we also expect the client to never call
into JS again. Previously, WebCore will call VM:setExecutionForbidden() to flag
that we should not re-enter the VM anymore. On JSC side, this executionForbidden()
is used to prevent micro-tasks from firing. On WebCore side, it is used to prevent
many things from running, including firing events.

Previously, we reply on WebCore side to catch the TerminationException, determine
that it is the TerminationException, and then call VM:setExecutionForbidden().
This is tedious and error prone as there may be places in WebCore that should call
VM:setExecutionForbidden() but is missed. This has been the source of some bugs
with the handling of the Worker termination in the past.

In this patch, we change VM to setExecutionForbidden() immediately when we throw
the TerminationException, but only if VM::m_executionForbiddenOnTermination is set.
Currently, we'll only set VM:m_executionForbiddenOnTermination for Workers because
for legacy reasons, other clients of JSC has the ability to re-enter the VM after
a TerminationException unwinds out (which is ok to do when used under some
controlled conditions). Until we can determine that it is safe to adopt this
"execution forbidden on termination" behavior universally, we'll adopt it only for
workers.

In a subsequent patch, we can also look into removing all the places in WebCore
that checks for TerminationException in order to call VM:setExecutionForbidden().
We'll leave those in place for now though they should be redundant after this patch.

Also add some ASSERTs to document invariants regarding states used in the handing
of TerminationException.

  • runtime/VM.cpp:

(JSC::VM::setException):
(JSC::VM::throwTerminationException):

  • runtime/VM.h:

(JSC::VM::forbidExecutionOnTermination):

Source/WebCore:

Enable "execution forbidden on termination" behavior for workers.

  • workers/WorkerOrWorkletScriptController.cpp:

(WebCore::WorkerOrWorkletScriptController::WorkerOrWorkletScriptController):

8:55 AM Changeset in webkit [286912] by mark.lam@apple.com
  • 2 edits in trunk/Source/WebCore

WebCore::createDOMException() should abort early if termination is pending.
https://bugs.webkit.org/show_bug.cgi?id=234190

Reviewed by Darin Adler.

Attempting to create Error objects may re-enter the VM, which we should not do
when termination is pending.

This issue manifested as an ASSERT failure, and was discovered while running
http/wpt/fetch/ layout tests with a Debug build on an M1 Mac. It also manifested
on some testing bots.

  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::createDOMException):

7:33 AM Changeset in webkit [286911] by commit-queue@webkit.org
  • 50 edits
    10 deletes in trunk

Unreviewed, reverting r286893.
https://bugs.webkit.org/show_bug.cgi?id=234197

Breaks the build

Reverted changeset:

"[macOS] Add new screen and window capture backend"
https://bugs.webkit.org/show_bug.cgi?id=234029
https://commits.webkit.org/r286893

6:37 AM Changeset in webkit [286910] by aakash_jain@apple.com
  • 2 edits in trunk

Update my github username.

Unreviewed.

  • metadata/contributors.json:
5:36 AM Changeset in webkit [286909] by jh718.park@samsung.com
  • 2 edits in trunk/Source/WebCore

Unreviewed. CSSCalcOperationNode::allowsNegativePercentageReference() should be const member function.

In r286897, the above method's const keyword was missed out, so add it.

No new tests, no new behaviours.

  • css/calc/CSSCalcOperationNode.h:
1:00 AM Changeset in webkit [286908] by jer.noble@apple.com
  • 56 edits
    17 copies
    11 adds in trunk

Source/WebCore:
Add an experimental trackConfiguration accessor on AudioTrack & VideoTrack.
https://bugs.webkit.org/show_bug.cgi?id=230841

Reviewed by Eric Carlson.

Add an experimental property on AudioTrack VideoTrack which contains information about the
underlying media track's configuration. The AudioTrackConfiguration is based on
AudioConfiguration from MediaCapabilities. The VideoTrackConfiguration is based on a
combination of the VideoConfiguration from MediaCapabilities and the VideoColorSpace from
WebCodecs.

The AVFoundation implementation of AVTrackPrivateAVFObjCImpl will extract a NAL unit for the
video codec from the CMFormatDescription containing information about the underlying media,
and pass that NAL unit to utility methods in HEVCUtilities (which should probably be
renamed to CodecUntilities) to extract and create codec configuration strings. It will
extract colorspace information from CMFormatDescriptionExtensions found in the format
description. It will extract framerate, bitrate, width and height, sample rate and channel
count information from the underlying AVAssetTrack. There are shortcomings here, as HLS
streams and MSE streams do not generate framerate or bitrate information in the
AVAssetTrack.

Tests: media/track/audio-track-configuration.html

media/track/video-track-configuration.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/webcodecs/VideoColorPrimaries.h:
  • Modules/webcodecs/VideoColorPrimaries.idl:
  • Modules/webcodecs/VideoColorSpace.h:

(WebCore::VideoColorSpace::create):
(WebCore::VideoColorSpace::primaries const):
(WebCore::VideoColorSpace::setPrimaries):
(WebCore::VideoColorSpace::transfer const):
(WebCore::VideoColorSpace::setTransfer):
(WebCore::VideoColorSpace::matrix const):
(WebCore::VideoColorSpace::setMatrix):
(WebCore::VideoColorSpace::fullRange const):
(WebCore::VideoColorSpace::setfFullRange):
(WebCore::VideoColorSpace::VideoColorSpace):

  • Modules/webcodecs/VideoColorSpace.idl:
  • Modules/webcodecs/VideoColorSpaceInit.h:
  • Modules/webcodecs/VideoColorSpaceInit.idl:
  • Modules/webcodecs/VideoMatrixCoefficients.h:
  • Modules/webcodecs/VideoMatrixCoefficients.idl:
  • Modules/webcodecs/VideoTransferCharacteristics.h:
  • Modules/webcodecs/VideoTransferCharacteristics.idl:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • html/track/AudioTrack.cpp:

(WebCore::AudioTrack::AudioTrack):
(WebCore::AudioTrack::setPrivate):
(WebCore::AudioTrack::updateConfigurationFromPrivate):

  • html/track/AudioTrack.h:
  • html/track/AudioTrack.idl:
  • html/track/AudioTrackConfiguration.h:

(WebCore::AudioTrackConfiguration::create):
(WebCore::AudioTrackConfiguration::codec const):
(WebCore::AudioTrackConfiguration::setCodec):
(WebCore::AudioTrackConfiguration::sampleRate const):
(WebCore::AudioTrackConfiguration::setSampleRate):
(WebCore::AudioTrackConfiguration::numberOfChannels const):
(WebCore::AudioTrackConfiguration::setNumberOfChannels):
(WebCore::AudioTrackConfiguration::bitrate const):
(WebCore::AudioTrackConfiguration::setBitrate):
(WebCore::AudioTrackConfiguration::AudioTrackConfiguration):

  • html/track/AudioTrackConfiguration.idl:
  • html/track/VideoTrack.cpp:

(WebCore::VideoTrack::VideoTrack):
(WebCore::VideoTrack::setPrivate):
(WebCore::VideoTrack::updateConfigurationFromPrivate):

  • html/track/VideoTrack.h:
  • html/track/VideoTrack.idl:
  • html/track/VideoTrackConfiguration.h: Added.

(WebCore::VideoTrackConfiguration::create):
(WebCore::VideoTrackConfiguration::codec const):
(WebCore::VideoTrackConfiguration::setCodec):
(WebCore::VideoTrackConfiguration::width const):
(WebCore::VideoTrackConfiguration::setWidth):
(WebCore::VideoTrackConfiguration::height const):
(WebCore::VideoTrackConfiguration::setHeight):
(WebCore::VideoTrackConfiguration::colorSpace const):
(WebCore::VideoTrackConfiguration::setColorSpace):
(WebCore::VideoTrackConfiguration::framerate const):
(WebCore::VideoTrackConfiguration::setFramerate):
(WebCore::VideoTrackConfiguration::bitrate const):
(WebCore::VideoTrackConfiguration::setBitrate):
(WebCore::VideoTrackConfiguration::VideoTrackConfiguration):

  • html/track/VideoTrackConfiguration.idl:
  • platform/graphics/AudioTrackPrivate.h:

(WebCore::AudioTrackPrivate::codec const):
(WebCore::AudioTrackPrivate::setCodec):
(WebCore::AudioTrackPrivate::sampleRate const):
(WebCore::AudioTrackPrivate::setSampleRate):
(WebCore::AudioTrackPrivate::numberOfChannels const):
(WebCore::AudioTrackPrivate::setNumberOfChannels):
(WebCore::AudioTrackPrivate::bitrate const):
(WebCore::AudioTrackPrivate::setBitrate):

  • platform/graphics/HEVCUtilities.cpp:

(WebCore::parseAVCCodecParameters):
(WebCore::createAVCCodecParametersString):
(WebCore::parseAVCDecoderConfigurationRecord):
(WebCore::parseHEVCCodecParameters):
(WebCore::createHEVCCodecParametersString):
(WebCore::parseHEVCDecoderConfigurationRecord):
(WebCore::parseDoViDecoderConfigurationRecord):
(WebCore::createDoViCodecParametersString):

  • platform/graphics/HEVCUtilities.h:
  • platform/graphics/PlatformVideoColorPrimaries.h:
  • platform/graphics/PlatformVideoColorSpace.h:

(WebCore::PlatformVideoColorSpace::encode const):
(WebCore::PlatformVideoColorSpace::decode):

  • platform/graphics/PlatformVideoMatrixCoefficients.h:
  • platform/graphics/PlatformVideoTransferCharacteristics.h:
  • platform/graphics/VideoTrackPrivate.h:

(WebCore::VideoTrackPrivate::codec const):
(WebCore::VideoTrackPrivate::setCodec):
(WebCore::VideoTrackPrivate::width const):
(WebCore::VideoTrackPrivate::setWidth):
(WebCore::VideoTrackPrivate::height const):
(WebCore::VideoTrackPrivate::setHeight):
(WebCore::VideoTrackPrivate::colorSpace const):
(WebCore::VideoTrackPrivate::setColorSpace):
(WebCore::VideoTrackPrivate::framerate const):
(WebCore::VideoTrackPrivate::setFramerate):
(WebCore::VideoTrackPrivate::bitrate const):
(WebCore::VideoTrackPrivate::setBitrate):

  • platform/graphics/VideoTrackPrivateClient.h:
  • platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
  • platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:

(WebCore::assetTrackFor):
(WebCore::formatDescriptionFor):
(WebCore::AVTrackPrivateAVFObjCImpl::codec const):
(WebCore::AVTrackPrivateAVFObjCImpl::width const):
(WebCore::AVTrackPrivateAVFObjCImpl::height const):
(WebCore::AVTrackPrivateAVFObjCImpl::colorSpace const):
(WebCore::AVTrackPrivateAVFObjCImpl::framerate const):
(WebCore::AVTrackPrivateAVFObjCImpl::sampleRate const):
(WebCore::AVTrackPrivateAVFObjCImpl::numberOfChannels const):
(WebCore::AVTrackPrivateAVFObjCImpl::bitrate const):

  • platform/graphics/avfoundation/AudioTrackPrivateAVF.h:

(WebCore::AudioTrackPrivateAVF::kind const): Deleted.
(WebCore::AudioTrackPrivateAVF::id const): Deleted.
(WebCore::AudioTrackPrivateAVF::label const): Deleted.
(WebCore::AudioTrackPrivateAVF::language const): Deleted.
(WebCore::AudioTrackPrivateAVF::trackIndex const): Deleted.

  • platform/graphics/avfoundation/FormatDescriptionUtilities.cpp: Added.

(WebCore::presentationSizeFromFormatDescription):
(WebCore::colorSpaceFromFormatDescription):
(WebCore::codecFromFormatDescription):

  • platform/graphics/avfoundation/FormatDescriptionUtilities.h:
  • platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h:
  • platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:

(WebCore::MediaSelectionOptionAVFObjC::assetTrack const):

  • platform/graphics/avfoundation/VideoTrackPrivateAVF.h:
  • platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:

(WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack):

  • platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:

(WebCore::VideoTrackPrivateAVFObjC::resetPropertiesFromTrack):

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

(WebCore::VideoTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):

  • platform/graphics/cocoa/VideoTrackPrivateWebM.cpp:

(WebCore::VideoTrackPrivateWebM::codec const):
(WebCore::VideoTrackPrivateWebM::width const):
(WebCore::VideoTrackPrivateWebM::height const):
(WebCore::VideoTrackPrivateWebM::framerate const):

  • platform/graphics/cocoa/VideoTrackPrivateWebM.h:

Source/WebCore/PAL:
Add an experimental trackConfiguration accessor on AudioTrack & VideoTrack.
https://bugs.webkit.org/show_bug.cgi?id=230841

Reviewed by Eric Carlson.

  • pal/cf/CoreMediaSoftLink.cpp:
  • pal/cf/CoreMediaSoftLink.h:
  • pal/spi/cocoa/AVFoundationSPI.h:

Source/WebKit:
Add an experimental trackConfiguration accessor on AudioTrack & VideoTrack.
https://bugs.webkit.org/show_bug.cgi?id=230841

Reviewed by Eric Carlson.

  • GPUProcess/media/RemoteAudioTrackProxy.cpp:

(WebKit::RemoteAudioTrackProxy::configuration):

  • GPUProcess/media/RemoteAudioTrackProxy.h:
  • GPUProcess/media/RemoteVideoTrackProxy.cpp:

(WebKit::RemoteVideoTrackProxy::configuration):
(WebKit::RemoteVideoTrackProxy::updateConfiguration):
(WebKit::RemoteVideoTrackProxy::selectedChanged):
(WebKit::RemoteVideoTrackProxy::idChanged):
(WebKit::RemoteVideoTrackProxy::labelChanged):
(WebKit::RemoteVideoTrackProxy::languageChanged):
(WebKit::RemoteVideoTrackProxy::configurationChanged): Deleted.

  • GPUProcess/media/RemoteVideoTrackProxy.h:
  • GPUProcess/media/TrackPrivateRemoteConfiguration.h:

(WebKit::TrackPrivateRemoteConfiguration::encode const):
(WebKit::TrackPrivateRemoteConfiguration::decode):

  • WebProcess/GPU/media/AudioTrackPrivateRemote.cpp:

(WebKit::AudioTrackPrivateRemote::updateConfiguration):

  • WebProcess/GPU/media/AudioTrackPrivateRemote.h:
  • WebProcess/GPU/media/VideoTrackPrivateRemote.cpp:

(WebKit::VideoTrackPrivateRemote::updateConfiguration):

  • WebProcess/GPU/media/VideoTrackPrivateRemote.h:

Source/WTF:
Add an experimental VideoTrackConfiguration class and accessor on VideoTrack
https://bugs.webkit.org/show_bug.cgi?id=230841

Reviewed by Eric Carlson.

Drive-by change: add a Vector::reverseFindMatching convenience method.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
  • wtf/Vector.h:

(WTF::Malloc>::reverseFindMatching const):

LayoutTests:
Add an experimental trackConfiguration accessor on AudioTrack & VideoTrack.
https://bugs.webkit.org/show_bug.cgi?id=230841

Reviewed by Eric Carlson.

  • fast/mediastream/MediaStream-video-element-expected.txt:
  • media/content/test-hevc.mp4: Added.
  • media/hevc-codec-parameters-expected.txt:
  • media/hevc-codec-parameters.html:
  • media/hevc-codec-string-expected.txt: Added.
  • media/hevc-codec-string.html: Added.
  • media/track/audio-track-configuration-expected.txt: Added.
  • media/track/audio-track-configuration.html: Added.
  • media/track/video-track-configuration-expected.txt: Added.
  • media/track/video-track-configuration.html: Added.
12:47 AM Changeset in webkit [286907] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore

[Cocoa] -[AVPlayerItem liveUpdateInterval] can hang the main thread for ~60ms
https://bugs.webkit.org/show_bug.cgi?id=234131

Reviewed by Eric Carlson.

Direct property access of AVFoundation objects can take tens of milliseconds to return
a value, even for simple properties. This impacts scrolling responsiveness.

-liveUpdateInterval is not KVO-observable, but only changes when -seekableTimeRanges does
as well. Query and cache that property during KVO of -seekableTimeRanges.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesLastModifiedTime const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::liveUpdateInterval const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesDidChange):
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):

12:01 AM Changeset in webkit [286906] by mmaxfield@apple.com
  • 3 edits in trunk/LayoutTests

Test gardening after r286889.
https://bugs.webkit.org/show_bug.cgi?id=234171

Unreviewed.

  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:

Dec 10, 2021:

11:17 PM Changeset in webkit [286905] by Simon Fraser
  • 12 edits in trunk/Source

Scrolling can drop frames when CoreAnimation commits take a long time
https://bugs.webkit.org/show_bug.cgi?id=234160
<rdar://86235740>

Reviewed by Tim Horton.

In r261985 I added a mechanism that has the scrolling thread wait for the main thread to
finish a rendering update, and, if the main thread fails to complete in time, then the
scrolling thread commits. This allows for scrolling synchronization when the main thread is
responsive, but smooth scrolling when the main thread is busy.

However, r261985 only waits for WebKit work to finish; what we really care about is whether
the main thread completes its CA commit in time (because that determines whether the scroll
shows on the screen).

So plumb through pre-/post-commit hooks from TiledCoreAnimationDrawingArea, which already
had them for inspector instrumentation. Then have ThreadedScrollingTree notify
m_stateCondition in didCompletePlatformRenderingUpdate(), instead of
didCompleteRenderingUpdate().
Source/WebCore:

Also, now we can call the inspector hooks from Page, rather than out in TiledCoreAnimationDrawingArea.

  • page/Page.cpp:

(WebCore::Page::willStartPlatformRenderingUpdate):
(WebCore::Page::didCompletePlatformRenderingUpdate):

  • page/Page.h:
  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::willStartPlatformRenderingUpdate):
(WebCore::ScrollingCoordinator::didCompletePlatformRenderingUpdate):

  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::didCompletePlatformRenderingUpdate):
(WebCore::ThreadedScrollingTree::didCompleteRenderingUpdate): Deleted.

  • page/scrolling/ThreadedScrollingTree.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::didCompletePlatformRenderingUpdate):

Source/WebKit:

Also, now we can call the inspector hooks from Page, rather than out in TiledCoreAnimationDrawingArea.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::willStartPlatformRenderingUpdate):
(WebKit::WebPage::didCompletePlatformRenderingUpdate):

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

(WebKit::TiledCoreAnimationDrawingArea::addCommitHandlers):

11:00 PM Changeset in webkit [286904] by Chris Dumez
  • 8 edits in trunk

Implement AbortSignal.throwIfAborted
https://bugs.webkit.org/show_bug.cgi?id=234127

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Resync WPT test from upstream to gain test coverage and rebaseline it.

  • web-platform-tests/dom/abort/event.any-expected.txt:
  • web-platform-tests/dom/abort/event.any.js:
  • web-platform-tests/dom/abort/event.any.worker-expected.txt:

Source/WebCore:

Implement AbortSignal.throwIfAborted as per:

No new tests, updated / rebaselined existing test.

  • dom/AbortSignal.cpp:

(WebCore::AbortSignal::throwIfAborted):

  • dom/AbortSignal.h:
  • dom/AbortSignal.idl:
10:40 PM Changeset in webkit [286903] by Kocsen Chung
  • 1 copy in tags/Safari-613.1.11.3

Tag Safari-613.1.11.3.

10:20 PM Changeset in webkit [286902] by Kocsen Chung
  • 9 edits in branches/safari-613.1.11-branch/Source

Versioning.

WebKit-7613.1.11.3

9:11 PM Changeset in webkit [286901] by ysuzuki@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Wasm catch thunk should be JIT code to use ExceptionHandlerPtrTag
https://bugs.webkit.org/show_bug.cgi?id=234183

Reviewed by Tadeu Zagallo.

ExceptionHandlerPtrTag is only usable for JITCode. Thus, we should not tag wasm catch LLInt code with it.
This patch fixes it by using trampoline. This is the same to normal LLInt's handleCatchThunk.

  • assembler/JITOperationList.cpp:

(JSC::JITOperationList::populatePointersInJavaScriptCoreForLLInt):

  • llint/LLIntExceptions.cpp:

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

  • llint/LLIntThunks.cpp:

(JSC::LLInt::handleWasmCatchThunk):
(JSC::LLInt::handleWasmCatchAllThunk):

  • llint/LLIntThunks.h:
7:43 PM Changeset in webkit [286900] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit

Momentum Event Dispatcher: Magic Mouse doesn't use momentum event dispatcher
https://bugs.webkit.org/show_bug.cgi?id=234189
<rdar://problem/86344954>

Reviewed by Simon Fraser.

  • Shared/mac/ScrollingAccelerationCurveMac.mm:

(WebKit::fromIOHIDDevice):
Fix the FIXME here about the additional fallback values; it turns out
Magic Mouse is one device that does not have a value for
kIOHIDScrollAccelerationTypeKey, so we need the full fallback chain to support it.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::sendWheelEvent):
Un-wrapping this optional results in losing the engaged state, and sending
a garbage ScrollingAccelerationCurve across the wire.
The message argument is also an optional, so just pass it along.

The result of this bug was that if you had ever used a device with a curve
for a given page, and then used a device with no curve, MomentumEventDispatcher
would have a garbage curve (from this message trying to "unset" the optional),
and a garbage curve results in chaotic scrolling.

7:24 PM Changeset in webkit [286899] by Kyle Piddington
  • 4 edits in trunk/Source/ThirdParty/ANGLE

[ANGLE] ASTC-HDR is unavailable on some platforms
https://bugs.webkit.org/show_bug.cgi?id=234164

Reviewed by Kenneth Russell.

Update autogenerated format table to avoid using ASTC_HDR on
platforms that don't have the enum.

  • src/libANGLE/renderer/metal/gen_mtl_format_table.py:

(gen_image_map_switch_astc_case_iosmac):
(gen_image_map_switch_astc_case_tvos):
(gen_image_map_switch_astc_case_tvos.gen_format_assign_code):
(gen_image_map_switch_string):
(gen_image_mtl_to_angle_switch_string):
(gen_mtl_format_caps_init_string):
(gen_image_map_switch_astc_case): Deleted.
(gen_image_map_switch_astc_case.gen_format_assign_code): Deleted.

  • src/libANGLE/renderer/metal/mtl_format_map.json:
  • src/libANGLE/renderer/metal/mtl_format_table_autogen.mm:

(rx::mtl::Format::MetalToAngleFormatID):
(rx::mtl::Format::init):
(rx::mtl::FormatTable::initNativeFormatCapsAutogen):

7:02 PM Changeset in webkit [286898] by Alexey Shvayka
  • 5 edits
    3 adds in trunk

Setting "onselectionchange" content attribute should add an event listener
https://bugs.webkit.org/show_bug.cgi?id=234167

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Import WPT tests from https://github.com/web-platform-tests/wpt/pull/32013.

  • web-platform-tests/selection/textcontrols: Added.
  • web-platform-tests/selection/textcontrols/onselectionchange-content-attribute-expected.txt: Added.
  • web-platform-tests/selection/textcontrols/onselectionchange-content-attribute.html: Added.

Source/WebCore:

This patch implements full support for "onselectionchange" content attribute,
enabling it to add an event listener on any element, which fixes regression
introduced in r268745 and aligns "onselectionchange" with "onselectstart".

Aligns WebKit with Gecko and the spec [1].

[1] https://w3c.github.io/selection-api/#extensions-to-globaleventhandlers-interface

Tests: fast/dom/event-handler-attributes.html

imported/w3c/web-platform-tests/selection/textcontrols/onselectionchange-content-attribute.html

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::createEventHandlerNameMap):

LayoutTests:

  • fast/dom/event-handler-attributes-expected.txt:
6:45 PM Changeset in webkit [286897] by jh718.park@samsung.com
  • 14 edits in trunk

Don't do simplification for percentage comparison resolution against negative reference values.
https://bugs.webkit.org/show_bug.cgi?id=233987

Reviewed by Darin Adler.

A percentage may be resolved against a negative value, which is allowed only in 'background-position' property.

Currently in CSSCalcExpressionNodeParser::parseCalc,
it creates CSSCalcExpressionNode tree result and does simplification for it.
But during it, e.g. min(50%, 10%) is simplified to min(10%) and max(50%, 10%) is simplified to max(50%),
which is the opposite result what should be done against negative basis.

With this patch, the percentage comparison resolution against nagative basis is done correctly.

The corresponding spec is step 4's note described below in
https://drafts.csswg.org/css-values-4/#simplify-a-calculation-tree.

'If a percentage is left at this point, it will usually block simplification of the node,
since it needs to be resolved against another value using information not currently available.
(Otherwise, it would have been converted to a different value in an earlier step.)
This includes operations such as "min", since percentages might resolve against a negative basis,
and thus end up with an opposite comparative relationship than the raw percentage value would seem to indicate.'

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-values/minmax-percentage-serialize-expected.txt:

Source/WebCore:

  • css/calc/CSSCalcExpressionNodeParser.cpp:

(WebCore::CSSCalcExpressionNodeParser::parseCalc):

  • css/calc/CSSCalcExpressionNodeParser.h:
  • css/calc/CSSCalcOperationNode.cpp:

(WebCore::CSSCalcOperationNode::combineChildren):

  • css/calc/CSSCalcOperationNode.h:
  • css/calc/CSSCalcValue.cpp:

(WebCore::CSSCalcValue::create):

  • css/calc/CSSCalcValue.h:
  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeBackgroundPosition):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::CalcParser::CalcParser):
(WebCore::CSSPropertyParserHelpers::consumeLengthOrPercent):
(WebCore::CSSPropertyParserHelpers::consumePositionComponent):
(WebCore::CSSPropertyParserHelpers::consumePositionCoordinates):

  • css/parser/CSSPropertyParserHelpers.h:

LayoutTests:

6:32 PM Changeset in webkit [286896] by msaboff@apple.com
  • 17 edits in trunk/Source

https://bugs.webkit.org/show_bug.cgi?id=234173
Update Install Paths for build system changes

Reviewed by Yusuke Suzuki.

Updated install paths for changes in the build system that use a system path prefix.

Source/JavaScriptCore:

  • Configurations/Base.xcconfig:

Source/ThirdParty/ANGLE:

  • Configurations/ANGLE-dynamic.xcconfig:

Source/ThirdParty/libwebrtc:

  • Configurations/libwebrtc.xcconfig:

Source/WebCore:

Covered by existing tests.

  • Configurations/WebCore.xcconfig:

Source/WebGPU:

  • Configurations/WebGPU.xcconfig:

Source/WebInspectorUI:

  • Configurations/WebInspectorUIFramework.xcconfig:

Source/WebKit:

  • Configurations/BaseTarget.xcconfig:
  • Configurations/WebKit.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/WebKitLegacy.xcconfig:
6:26 PM Changeset in webkit [286895] by commit-queue@webkit.org
  • 18 edits
    14 adds in trunk

Some WebIDL operations / attributes incorrectly use _current_ realm instead of _relevant_
https://bugs.webkit.org/show_bug.cgi?id=230941

Patch by Alexey Shvayka <ashvayka@apple.com> on 2021-12-10
Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Import WPT tests from https://github.com/web-platform-tests/wpt/pull/32012.

  • web-platform-tests/dom/events/Event-timestamp-cross-realm-getter-expected.txt: Added.
  • web-platform-tests/dom/events/Event-timestamp-cross-realm-getter.html: Added.
  • web-platform-tests/html/browsers/history/the-history-interface/history_back_cross_realm_method-expected.txt: Added.
  • web-platform-tests/html/browsers/history/the-history-interface/history_back_cross_realm_method.html: Added.
  • web-platform-tests/html/browsers/history/the-history-interface/history_forward_cross_realm_method-expected.txt: Added.
  • web-platform-tests/html/browsers/history/the-history-interface/history_forward_cross_realm_method.html: Added.
  • web-platform-tests/html/browsers/history/the-history-interface/history_go_cross_realm_method-expected.txt: Added.
  • web-platform-tests/html/browsers/history/the-history-interface/history_go_cross_realm_method.html: Added.
  • web-platform-tests/html/webappapis/scripting/reporterror-cross-realm-method-expected.txt: Added.
  • web-platform-tests/html/webappapis/scripting/reporterror-cross-realm-method.html: Added.
  • web-platform-tests/html/webappapis/structured-clone/structured-clone-cross-realm-method-expected.txt: Added.
  • web-platform-tests/html/webappapis/structured-clone/structured-clone-cross-realm-method.html: Added.
  • web-platform-tests/requestidlecallback/callback-timeRemaining-cross-realm-method-expected.txt: Added.
  • web-platform-tests/requestidlecallback/callback-timeRemaining-cross-realm-method.html: Added.

Source/WebCore:

This patch replaces _current_ global object with _relevant_, as per recommendation
for spec authors [1], for select WebIDL operations / attributes that satisfy all
the following conditions:

1) it's an instance member: static ones and constructors can't use _relevant_;
2) it's on standards track (not deprecated / WebKit-only / internal);
3) the change is directly observable: global object is used for something

beyond lifecycle / event loop / parsing CSS etc;

4) the change either aligns WebKit with both Blink and Gecko,

or the spec explicitly requires _relevant_ realm / settings object.

Most of the remaining [CallWith=GlobalObject] instances are correctly used for
converting JS arguments to WebIDL values; the rest, along with _current_ Document
and ScriptExecutionContext, either match the spec or replacing them with _relevant_
global object is not directly observable (see condition #3).

This change is aimed at fixing web-exposed APIs rather than performing a global cleanup.

[1] https://html.spec.whatwg.org/multipage/webappapis.html#concept-current-everything

Tests: imported/w3c/web-platform-tests/dom/events/Event-timestamp-cross-realm-getter.html

imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/history_back_cross_realm_method.html
imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/history_forward_cross_realm_method.html
imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/history_go_cross_realm_method.html
imported/w3c/web-platform-tests/html/webappapis/scripting/reporterror-cross-realm-method.html
imported/w3c/web-platform-tests/html/webappapis/structured-clone/structured-clone-cross-realm-method.html
imported/w3c/web-platform-tests/requestidlecallback/callback-timeRemaining-cross-realm-method.html

  • Modules/indexeddb/IDBFactory.idl:

https://www.w3.org/TR/IndexedDB/#dom-idbfactory-open (step 2)
https://www.w3.org/TR/IndexedDB/#dom-idbfactory-deletedatabase (step 1)
https://www.w3.org/TR/IndexedDB/#dom-idbfactory-databases (step 1)

  • Modules/paymentrequest/PaymentRequest.idl:

https://www.w3.org/TR/payment-request/#show-method (steps 2-4)
https://www.w3.org/TR/payment-request/#can-make-payment-algorithm (before step 1)

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateCallWith):

  • bindings/scripts/IDLAttributes.json:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/TestObj.idl:
  • dom/Event.idl:

https://dom.spec.whatwg.org/#inner-event-creation-steps (step 3)

  • dom/IdleDeadline.idl:

https://w3c.github.io/requestidlecallback/#the-requestidlecallback-method (step 1)

  • page/History.idl:

https://html.spec.whatwg.org/multipage/history.html#dom-history-go (step 1)
https://html.spec.whatwg.org/multipage/history.html#dom-history-back (step 1)
https://html.spec.whatwg.org/multipage/history.html#dom-history-forward (step 1)

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::setTimeout):
(WebCore::DOMWindow::setInterval):

  • page/DOMWindow.h:
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::setTimeout):
(WebCore::WorkerGlobalScope::setInterval):

  • workers/WorkerGlobalScope.h:

Although condition #4 isn't satisfied for setTimeout() / setInterval() because
_current_ global object is used only for logging, replacing it with _relevant_
nicely cleans up method signatures.

  • page/WindowOrWorkerGlobalScope.cpp:

(WebCore::WindowOrWorkerGlobalScope::structuredClone):

  • page/WindowOrWorkerGlobalScope.h:
  • page/WindowOrWorkerGlobalScope.idl:

https://html.spec.whatwg.org/multipage/webappapis.html#report-the-exception
https://html.spec.whatwg.org/multipage/structured-data.html#structured-cloning (step 2)

6:06 PM Changeset in webkit [286894] by Devin Rousso
  • 22 edits
    3 adds in trunk

WKWebView doesn’t respond to -copyFont: and -pasteFont:
https://bugs.webkit.org/show_bug.cgi?id=191379
<rdar://problem/45878659>

Reviewed by Wenson Hsieh.

Source/WebCore:

Test: editing/execCommand/mac/copyFont-pasteFont.html

  • dom/DOMPasteAccess.h:

Add DOMPasteAccessCategory::Fonts (which corresponds to NSPasteboardNameFont on macOS).

  • editing/Editor.h:
  • editing/Editor.cpp:

(WebCore::eventNameForClipboardEvent):
(WebCore::createDataTransferForClipboardEvent):
(WebCore::Editor::copyFont): Added.
(WebCore::Editor::pasteFont): Added.
Add platform-agnostic handling for "CopyFont" and "PasteFont" editor commands.

  • editing/mac/EditorMac.mm:

(WebCore::Editor::platformCopyFont): Added.
(WebCore::Editor::platformPasteFont): Added.
Mimic the logic in -[WebHTMLView copyFont:]/-[WebHTMLView pasteFont:] to be compatible
with WK1 (i.e. to make it easier for clients to switch to WK2).

  • editing/gtk/EditorGtk.cpp:

(WebCore::Editor::platformCopyFont): Added.
(WebCore::Editor::platformPasteFont): Added.

  • editing/ios/EditorIOS.mm:

(WebCore::Editor::platformCopyFont): Added.
(WebCore::Editor::platformPasteFont): Added.

  • editing/libwpe/EditorLibWPE.cpp:

(WebCore::Editor::platformCopyFont): Added.
(WebCore::Editor::platformPasteFont): Added.

  • editing/win/EditorWin.cpp:

(WebCore::Editor::platformCopyFont): Added.
(WebCore::Editor::platformPasteFont): Added.
Add stubs for other platforms.

  • editing/EditorCommand.cpp:

(WebCore::executeCopyFont): Added.
(WebCore::executePasteFont): Added.
(WebCore::createCommandMap):
Hook "CopyFont" and "PasteFont" editor commands up to document.execCommand.

Source/WebKit:

  • UIProcess/API/mac/WKView.mm:
  • UIProcess/API/mac/WKWebViewMac.mm:

Add -copyFont: and -pasteFont: methods via WEBCORE_COMMAND.

  • UIProcess/WebPageProxy.cpp:

(WebKit::pasteAccessCategoryForCommand):
The PasteFont command should be categorized as DOMPasteAccessCategory::Fonts.

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::pasteboardNameForAccessCategory):
(WebKit::pasteboardForAccessCategory):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::willPerformPasteCommand):
Correlate DOMPasteAccessCategory::Fonts with NSPasteboardNameFont.

  • UIProcess/ios/WKContentViewInteraction.mm:

(pasteboardNameForAccessCategory):
(pasteboardForAccessCategory):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::willPerformPasteCommand):
Correlate DOMPasteAccessCategory::Fonts with UIPasteboardNameGeneral.

LayoutTests:

  • editing/editing.js:

(execCopyFontCommand): Added.
(copyFontCommand): Added.
(execPasteFontCommand): Added.
(pasteFontCommand): Added.

  • editing/execCommand/mac/copyFont-pasteFont.html: Added.
  • editing/execCommand/mac/copyFont-pasteFont-expected.html: Added.
5:25 PM Changeset in webkit [286893] by eric.carlson@apple.com
  • 50 edits
    2 copies
    8 adds in trunk

[macOS] Add new screen and window capture backend
https://bugs.webkit.org/show_bug.cgi?id=234029

Reviewed by Jer Noble and Youenn Fablet.

Source/WebCore:

New API test: GetDisplayMediaWindowAndScreen.mm

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • en.lproj/Localizable.strings: Add strings for window and screen prompts.
  • platform/mediastream/MediaConstraints.h:

(WebCore::StringConstraint::getExact const): Drive-by: fix logic inversion bug.
(WebCore::StringConstraint::getIdeal const): Ditto.

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::fitnessDistance): Assert if device ID constraint is
not a string.

  • platform/mediastream/RealtimeMediaSourceCenter.h:

(WebCore::RealtimeMediaSourceCenter::useScreenCaptureKit const):
(WebCore::RealtimeMediaSourceCenter::setUseScreenCaptureKit):
(WebCore::RealtimeMediaSourceCenter::useMockCaptureDevices const):
(WebCore::RealtimeMediaSourceCenter::setUseMockCaptureDevices):

  • platform/mediastream/cocoa/DisplayCaptureSourceCocoa.cpp:

(WebCore::DisplayCaptureSourceCocoa::create):
(WebCore::DisplayCaptureSourceCocoa::DisplayCaptureSourceCocoa):
(WebCore::DisplayCaptureSourceCocoa::Capturer::setObserver):
(WebCore::DisplayCaptureSourceCocoa::Capturer::capturerIsRunningChanged): Deleted.

  • platform/mediastream/cocoa/DisplayCaptureSourceCocoa.h:

(WebCore::CapturerObserver::capturerIsRunningChanged):
(WebCore::CapturerObserver::capturerFailed):

  • platform/mediastream/ios/ReplayKitCaptureSource.mm:

(WebCore::ReplayKitCaptureSource::captureStateDidChange):

  • platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp:

(WebCore::DisplayCaptureManagerCocoa::updateDisplayCaptureDevices): Use
ScreenCaptureKitCaptureSource when available.
(WebCore::DisplayCaptureManagerCocoa::updateWindowCaptureDevices): Ditto.
(WebCore::DisplayCaptureManagerCocoa::screenCaptureDeviceWithPersistentID): Ditto.
(WebCore::DisplayCaptureManagerCocoa::windowCaptureDeviceWithPersistentID): Ditto.

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

(-[WebCoreScreenCaptureKitHelper initWithCallback:]):
(-[WebCoreScreenCaptureKitHelper disconnect]):
(-[WebCoreScreenCaptureKitHelper stream:didStopWithError:]):
(WebCore::usingOldAPI):
(WebCore::ScreenCaptureKitCaptureSource::isAvailable):
(WebCore::ScreenCaptureKitCaptureSource::create):
(WebCore::ScreenCaptureKitCaptureSource::ScreenCaptureKitCaptureSource):
(WebCore::ScreenCaptureKitCaptureSource::~ScreenCaptureKitCaptureSource):
(WebCore::ScreenCaptureKitCaptureSource::start):
(WebCore::ScreenCaptureKitCaptureSource::stop):
(WebCore::ScreenCaptureKitCaptureSource::streamFailedWithError):
(WebCore::ScreenCaptureKitCaptureSource::generateFrame):
(WebCore::ScreenCaptureKitCaptureSource::processSharableContent):
(WebCore::ScreenCaptureKitCaptureSource::findShareableContent):
(WebCore::ScreenCaptureKitCaptureSource::streamConfiguration):
(WebCore::ScreenCaptureKitCaptureSource::startContentStream):
(WebCore::ScreenCaptureKitCaptureSource::intrinsicSize const):
(WebCore::ScreenCaptureKitCaptureSource::updateStreamConfiguration):
(WebCore::ScreenCaptureKitCaptureSource::commitConfiguration):
(WebCore::ScreenCaptureKitCaptureSource::captureQueue):
(WebCore::ScreenCaptureKitCaptureSource::frameAvailableHandler):
(WebCore::ScreenCaptureKitCaptureSource::deviceType const):
(WebCore::ScreenCaptureKitCaptureSource::surfaceType const):
(WebCore::ScreenCaptureKitCaptureSource::screenCaptureDeviceWithPersistentID):
(WebCore::ScreenCaptureKitCaptureSource::screenCaptureDevices):
(WebCore::ScreenCaptureKitCaptureSource::windowCaptureDeviceWithPersistentID):
(WebCore::ScreenCaptureKitCaptureSource::windowCaptureDevices):
(WebCore::ScreenCaptureKitCaptureSource::forEachNSWindow):

  • platform/mock/MockMediaDevice.h:

(WebCore::MockMediaDevice::captureDevice const): Make devices enabled by default.
Initialize screen and window devices with the correct type.

  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::defaultDevices): Fix window device types.
(WebCore::MockRealtimeMediaSourceCenter::displayDevices):

  • platform/mock/MockRealtimeMediaSourceCenter.h:

Source/WebCore/PAL:

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

Source/WebKit:

  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/WKPreferences.mm: Add _useScreenCaptureKit private preference.

(-[WKPreferences _useScreenCaptureKit]):
(-[WKPreferences _setUseScreenCaptureKit:]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Add private delegate for a

getDisplayMedia-specific prompt.

  • UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
  • UIProcess/API/Cocoa/WKWebViewTesting.mm:

(-[WKWebView _setIndexOfGetDisplayMediaDeviceSelectedForTesting:]): Set the index
of the screen or window device to return for getDisplayMedia without prompting.

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

(WebKit::UIDelegate::UIClient::promptForDisplayCapturePermission): Call new
screen/window capture delegate.
(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):

  • UIProcess/UserMediaPermissionRequestProxy.cpp:

(WebKit::UserMediaPermissionRequestProxy::create):
(WebKit::UserMediaPermissionRequestProxy::promptForGetDisplayMedia): Add parameter
specifying a window or screen capture prompt.

  • UIProcess/UserMediaPermissionRequestProxy.h:

(WebKit::UserMediaPermissionRequestProxy::create):
(WebKit::UserMediaPermissionRequestProxy::manager const):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setIndexOfGetDisplayMediaDeviceSelectedForTesting):

  • UIProcess/WebPageProxy.h:
  • UIProcess/mac/DisplayCaptureSessionManager.h: Added.

(WebKit::DisplayCaptureSessionManager::setIndexOfDeviceSelectedForTesting):

  • UIProcess/mac/DisplayCaptureSessionManager.mm: Added.

(WebKit::getMockWindowList):
(WebKit::getCGWindowList):
(WebKit::getWindowList):
(WebKit::alertForWindowSelection):
(WebKit::DisplayCaptureSessionManager::alertForGetDisplayMedia):
(WebKit::DisplayCaptureSessionManager::isAvailable):
(WebKit::DisplayCaptureSessionManager::singleton):
(WebKit::DisplayCaptureSessionManager::DisplayCaptureSessionManager):
(WebKit::DisplayCaptureSessionManager::~DisplayCaptureSessionManager):
(WebKit::DisplayCaptureSessionManager::promptForGetDisplayMedia):
(WebKit::DisplayCaptureSessionManager::deviceSelectedForTesting):
(WebKit::DisplayCaptureSessionManager::showWindowPicker):
(WebKit::DisplayCaptureSessionManager::showScreenPicker):

  • UIProcess/mac/UserMediaPermissionRequestProxyMac.h: Added.
  • UIProcess/mac/UserMediaPermissionRequestProxyMac.mm: Added.

(WebKit::UserMediaPermissionRequestProxy::create):
(WebKit::UserMediaPermissionRequestProxyMac::UserMediaPermissionRequestProxyMac):
(WebKit::UserMediaPermissionRequestProxyMac::~UserMediaPermissionRequestProxyMac):
(WebKit::UserMediaPermissionRequestProxyMac::promptForGetDisplayMedia):
(WebKit::UserMediaPermissionRequestProxyMac::canPromptForGetDisplayMedia):

  • WebKit.xcodeproj/project.pbxproj:

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml: Add UseScreenCaptureKit.
  • wtf/PlatformHave.h: Define HAVE_SCREEN_CAPTURE_KIT.
  • wtf/cocoa/SoftLinking.h: Add softlink macros that take an API_AVAILABLE check.

Tools:

  • TestWebKitAPI/SourcesCocoa.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/GetDisplayMediaWindowAndScreen.mm: Added.

(-[WindowAndScreenCaptureTestView haveStream:]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewUnderPageBackgroundColor.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WebProcessTerminate.mm:
  • TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.h:
  • TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.mm:

(-[UserMediaCaptureUIDelegate init]):
(-[UserMediaCaptureUIDelegate setGetDisplayMediaDecision:]):
(-[UserMediaCaptureUIDelegate _webView:requestDisplayCapturePermissionForOrigin:initiatedByFrame:decisionHandler:]):

5:17 PM Changeset in webkit [286892] by Mikhail R. Gadelha
  • 2 edits in trunk/Source/JavaScriptCore

[JSC][32bit] Add callee save registers for MIPS
https://bugs.webkit.org/show_bug.cgi?id=233766

Reviewed by Mark Lam.

This patch enables callee save registers for mips, which fixes an
assertion violation from the call frame shufflers in some tests if
jsc was built with assertions enabled (either debug or release+assert
mode).

  • jit/RegisterSet.cpp:

(JSC::RegisterSet::llintBaselineCalleeSaveRegisters):
(JSC::RegisterSet::dfgCalleeSaveRegisters):

5:10 PM Changeset in webkit [286891] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] isTaggedJSCCodePtrImpl does not have proper implementation for JITCage & JITCode combination
https://bugs.webkit.org/show_bug.cgi?id=234186

Reviewed by Mark Lam.

If JITCage is enabled and target code is JITCode, we should use tagJSCCodePtrImpl.

  • runtime/JSCPtrTag.h:

(JSC::isTaggedJSCCodePtrImpl):

5:08 PM Changeset in webkit [286890] by Razvan Caliman
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Add CSS variable names to property name completion list
https://bugs.webkit.org/show_bug.cgi?id=233372
<rdar://83205968>

Reviewed by Devin Rousso.

Add the list of applicable CSS variables to the list of CSS property name completions.

WI.CSSPropertyNameCompletions is a long-lived object that holds all supported property names.
It doesn't need to change over time in a Web Inspector session. But the list of applicable
CSS variables depends on the selected node.

To avoid thrashing the long list of values in WI.CSSPropertyNameCompletions we don't proactively collect
CSS variables. Instead, we introduce a flag to indicate that the list of CSS variables may
be stale whenever the inspected node changes. Only when completions are requested do we check
this flag and augment the list of CSS property names with the latest list of CSS variables.

  • UserInterface/Models/CSSCompletions.js:

(WI.CSSCompletions.prototype.replaceValues):
Allow a sub-class to replace the list of values in one go.
If a WI.CSSQueryController was used, reset it and provide it the new list of values.

  • UserInterface/Models/CSSPropertyNameCompletions.js:

(WI.CSSPropertyNameCompletions):
(WI.CSSPropertyNameCompletions.prototype.executeQuery):
(WI.CSSPropertyNameCompletions.prototype.startsWith):
(WI.CSSPropertyNameCompletions.prototype._updateValuesWithLatestCSSVariablesIfNeeded):
Holding a copy of the original list of CSS property names in order to create a new list
agumented with variables on demand.

(WI.CSSPropertyNameCompletions.prototype.addValues):
Warn when trying to add new property values which would overwrite the cached and sorted list of CSS property names.

(WI.CSSPropertyNameCompletions.prototype._handleInspectedNodeChanged):
Consider changing of the inspected node as an indicator that the list of variables is stale.
That may not necessarily be true for web pages with all CSS variables declared on :root or <html>,
but iterating over them to verify is needlessly expensive especially if completions were not even requested.

(WI.CSSPropertyNameCompletions.prototype._handleNodesStylesNeedsRefresh):
Consider any change to the styles of the inspected node as a potential change to the list of applicable variables.

(WI.CSSPropertyNameCompletions):

4:53 PM Changeset in webkit [286889] by mmaxfield@apple.com
  • 6 edits
    2 adds in trunk

[Cocoa] OT-SVG glyphs don't draw into canvases (because of the GPU process)
https://bugs.webkit.org/show_bug.cgi?id=234171
<rdar://problem/70166552>

Reviewed by Devin Rousso.

Source/WebCore:

Drawing OT-SVG glyphs into canvas was intentionally disabled in https://trac.webkit.org/changeset/269211/webkit.
This patch enables it again. Rather than doing anything complicated like supporting all of SVG in DrawGlyphsRecorder,
we can simply support this by drawing the glyphs into a ImageBuffer and sending the ImageBuffer to the GPU process.

For text, it's pretty important that the pixel grid of the ImageBuffer matches the pixel grid of the destination,
rather than being offset by half a pixel or something. This patch adds a new creation function to ImageBuffer which
accepts a FloatRect (instead of the previous FloatSize which it used to accept). The FloatRect is necessary because
inflating the geometry has to happen on both the left and the right if we want the pixel grids to match.

Test: fast/text/otsvg-canvas.html

  • platform/graphics/DrawGlyphsRecorder.h:
  • platform/graphics/ImageBuffer.cpp:

(WebCore::ImageBuffer::createCompatibleBuffer):
(WebCore::ImageBuffer::compatibleBufferInfo):

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

(WebCore::DrawGlyphsRecorder::drawOTSVGRun):
(WebCore::DrawGlyphsRecorder::drawNonOTSVGRun):
(WebCore::DrawGlyphsRecorder::drawBySplittingIntoOTSVGAndNonOTSVGRuns):
(WebCore::DrawGlyphsRecorder::drawGlyphs):
(WebCore::filterOutOTSVGGlyphs): Deleted.

LayoutTests:

  • fast/text/otsvg-canvas-expected.html: Added.
  • fast/text/otsvg-canvas.html: Added.
4:53 PM Changeset in webkit [286888] by Alan Coon
  • 1 copy in tags/Safari-613.1.11.2

Tag Safari-613.1.11.2.

4:47 PM Changeset in webkit [286887] by BJ Burg
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: save and restore extension tab positions
https://bugs.webkit.org/show_bug.cgi?id=234115
<rdar://85560636>

Reviewed by Devin Rousso and Patrick Angle.

The existing tab state restoration system works by saving or loading tab positions
from persistent storage and saving or restoring each tab's state using one cookie per tab type.

With extension tabs, it is now possible to have more than one tab per tab type.
Additionally, extension tabs can be added at any time via InspectorFrontendAPI.
Given these challenges, we need a different system for saving and restoring extension tabs.

Extension tab restoration is now handled by WI.WebInspectorExtensionController.
We consider a tab to be an 'anchor' tab if it is saveable, visible, and not pinnable.
In other words, an anchor tab is one of the built-in singleton tabs like Console, Elements, etc.

When the tab bar item list is modified, for each extension tab, we save the observed
'anchor' tab's type and a distance from that anchor tab's insertion index.
Updates to extension tab positions are saved to persistent storage at most every 5 seconds.

When it is time to place an extension tab with createTabForExtension() or showExtensionTab(),
perform the reverse operation of computing an insertion index from a anchorTabType and distanceFromAnchorTab.

This patch was tested with one extension, multiple extensions, showing/hiding extension tabs,
remote inspecting a JSContext, and remote inspecting a WKWebView.

  • UserInterface/Views/TabBar.js:

(WI.TabBar.prototype.get visibleTabBarItemsFromLeftToRight): Added.

  • UserInterface/Controllers/WebInspectorExtensionController.js:

(WI.WebInspectorExtensionController):
(WI.WebInspectorExtensionController.get extensionTabPositionsObjectStoreKey): Added.

(WI.WebInspectorExtensionController.prototype.registerExtension):
(WI.WebInspectorExtensionController.prototype.unregisterExtension):
Add and remove WI.TabBar event listeners that notify us of changes to the tab bar.

(WI.WebInspectorExtensionController.prototype.createTabForExtension): Deleted.
(WI.WebInspectorExtensionController.prototype.async createTabForExtension): Renamed.
Load saved tab positions from persistent storage if needed. Compute the insertion index for the new tab.
This method is already expected to return a promise, so make it async to allow using await.

(WI.WebInspectorExtensionController.prototype.showExtensionTab):
Compute the insertion index for the new tab.

(WI.WebInspectorExtensionController.prototype.async _loadExtensionTabPositions):
Load saved tab positions from persistent storage, allowing for the case where nothing has been saved yet.

(WI.WebInspectorExtensionController.prototype.async _saveExtensionTabPositions):
Recompute and save tab positions for all extension tabs. Then write to persistent storage
at most every 5 seconds using a WI.Debouncer.

(WI.WebInspectorExtensionController.prototype._insertionIndexForExtensionTab): Added, wrapper method.
(WI.WebInspectorExtensionController.prototype._computeIndicesForExtensionTab):
Compute the anchorTabType, distanceFromAnchorTab, and insertionIndex for the extension tab.
If saving tab positions, pass options.recomputePositions to ignore saved positions
and recompute these fields based on what is currently visible in the tab bar.

  • UserInterface/Views/WebInspectorExtensionTabContentView.js:

(WI.WebInspectorExtensionTabContentView.prototype.get savedTabPositionKey): Added.

4:46 PM Changeset in webkit [286886] by Megan Gardner
  • 16 edits in trunk/Source

Image does not update after Markup Pane is dismissed.
https://bugs.webkit.org/show_bug.cgi?id=234162

Reviewed by Devin Rousso.

Once the item is retured from the Sharing Service, we need to pipe the information
back to the attachement element so that it can be properly updated.
This includes holding onto the attachment ID of the controlled image so that it
can later be found and updated.

Source/WebCore:

  • dom/mac/ImageControlsMac.cpp:

(WebCore::ImageControlsMac::handleEvent):

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::setAttachmentElement):

  • page/ChromeClient.h:

(WebCore::ChromeClient::handleImageServiceClick):

Source/WebKit:

  • Shared/ContextMenuContextData.cpp:

(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::encode const):
(WebKit::ContextMenuContextData::decode):

  • Shared/ContextMenuContextData.h:

(WebKit::ContextMenuContextData::controlledImageAttachmentID const):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):

  • UIProcess/API/Cocoa/_WKAttachment.h:
  • UIProcess/API/Cocoa/_WKAttachment.mm:

(-[_WKAttachment setData:newContentType:]):

  • UIProcess/API/Cocoa/_WKAttachmentInternal.h:
  • UIProcess/mac/WKSharingServicePickerDelegate.h:
  • UIProcess/mac/WKSharingServicePickerDelegate.mm:

(-[WKSharingServicePickerDelegate setAttachmentID:]):
(-[WKSharingServicePickerDelegate sharingService:didShareItems:]):

  • UIProcess/mac/WebContextMenuProxyMac.mm:

(WebKit::WebContextMenuProxyMac::setupServicesMenu):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::handleImageServiceClick):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::handleImageServiceClick):

4:40 PM Changeset in webkit [286885] by Nikita Vasilyev
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: Add a swatch for justify-content, justify-items, and justify-self
https://bugs.webkit.org/show_bug.cgi?id=233055
<rdar://problem/85613257>

Reviewed by Patrick Angle.

Add an inline swatch for justify-content, that shows icons for common values:
start, center, end, space-between, space-around, space-evenly, and stretch.

Also, add inline swatches for justify-items and justify-self, that shows icons for:
start, center, end, and stretch.

The newly added swatches reuse the existing align-content and align-items icons, and
rotate them -90 degrees. While align-* properties define alignment in the block-direction
the justify-* properties define alignment in the inline-direction.

  • UserInterface/Models/AlignmentData.js:

(WI.AlignmentData._propertyNameToType):

  • UserInterface/Views/AlignmentEditor.css:

(.alignment-editor .glyph.rotate-left > svg):

  • UserInterface/Views/AlignmentEditor.js:

(WI.AlignmentEditor.shouldRotateGlyph):
(WI.AlignmentEditor._glyphsForType):
(WI.AlignmentEditor.prototype.set alignment):

  • UserInterface/Views/InlineSwatch.css:

(.inline-swatch.alignment > span.rotate-left):

  • UserInterface/Views/InlineSwatch.js:

(WI.InlineSwatch.prototype._updateSwatch):

4:38 PM Changeset in webkit [286884] by Alan Coon
  • 9 edits in branches/safari-613.1.11-branch/Source

Versioning.

WebKit-7613.1.11.2

4:35 PM Changeset in webkit [286883] by don.olmstead@sony.com
  • 12 edits in trunk

Add FileSystem function to read a file at a path
https://bugs.webkit.org/show_bug.cgi?id=234103

Reviewed by Alex Christensen.

Source/JavaScriptCore:

Use FileSystem::readEntireFile.

  • inspector/remote/socket/RemoteInspectorSocket.cpp:

(Inspector::RemoteInspector::backendCommands const):

Source/WebCore:

Use FileSystem::readEntireFile.

  • platform/network/curl/CurlCacheEntry.cpp:

(WebCore::CurlCacheEntry::readCachedData):
(WebCore::CurlCacheEntry::loadResponseHeaders):
(WebCore::CurlCacheEntry::loadFileToBuffer): Deleted.

  • platform/network/curl/CurlCacheEntry.h:
  • platform/network/curl/CurlCacheManager.cpp:

(WebCore::CurlCacheManager::loadIndex):

  • rendering/RenderThemeWin.cpp:

(WebCore::RenderThemeWin::stringWithContentsOfFile):
(WebCore::fillBufferWithContentsOfFile): Deleted.

Source/WTF:

Add FileSystem::readEntireFile which takes a path and attempts to read the whole contents
of the file into a Vector<uint8_t>. If the file is not found or is empty then it returns
nullopt. Internally it manages the opening and closing of the file to prevent file handles
from leaking.

Modify FileSystem::readEntireFile which takes a handle to continue reading until the entire
file has been read. Previously it could've just done a partial read as
FileSystem::readFromFile does not guarantee it will read all the bytes requested.

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::readEntireFile):

  • wtf/FileSystem.h:

Tools:

Add tests for readEntireFile.

  • TestWebKitAPI/Tests/WTF/FileSystem.cpp:

(TestWebKitAPI::TEST_F):

3:17 PM Changeset in webkit [286882] by Mikhail R. Gadelha
  • 2 edits in trunk

Mark myself (Mikhail R. Gadelha) as committer
https://bugs.webkit.org/show_bug.cgi?id=234157

Unreviewed.

  • metadata/contributors.json:
3:03 PM Changeset in webkit [286881] by ysuzuki@apple.com
  • 2 edits in trunk/JSTests

Unreviewed, we may not throw an stack overflow error

  • stress/stack-overflow-in-custom-hasInstance.js:

(catch):

3:02 PM Changeset in webkit [286880] by Robert Jenner
  • 1 edit
    7 adds in trunk/LayoutTests

REGRESSION(r286795):REBASELINE [ iOS EWS ] 4X CSS (layout-tests) are constant text failures
https://bugs.webkit.org/show_bug.cgi?id=234177

Uneviewed test gardening. Rebaseline for iOS.

  • platform/ios-wk2/fast/css/getComputedStyle/computed-style-expected.txt: Added.
  • platform/ios-wk2/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Added.
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt: Added.
  • platform/ios-wk2/svg/css/getComputedStyle-basic-expected.txt: Added.
2:52 PM Changeset in webkit [286879] by Aditya Keerthi
  • 5 edits in trunk/Source/WebKit

[iOS] Support find-in-page keyboard shortcuts
https://bugs.webkit.org/show_bug.cgi?id=234163
rdar://86333128

Reviewed by Devin Rousso.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/API/ios/WKWebViewIOS.h:
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView findForWebView:]):
(-[WKContentView findNextForWebView:]):
(-[WKContentView findPreviousForWebView:]):

2:19 PM Changeset in webkit [286878] by beidson@apple.com
  • 5 edits in trunk/Source

Teach webpushd to launch an app in response to an injected message.
https://bugs.webkit.org/show_bug.cgi?id=234122

Reviewed by Alex Christensen.

Source/WebCore/PAL:

  • pal/spi/cocoa/LaunchServicesSPI.h:

Source/WebKit:

To by covered by future API test.

When a message comes in, webpushd knows which code signing identifier it was targetted for.
It launches that app in a special mode so the app can then "take it from there"

  • webpushd/WebPushDaemon.h:
  • webpushd/WebPushDaemon.mm:

(WebPushD::Daemon::injectPushMessageForTesting):
(WebPushD::Daemon::notifyClientPushMessageIsAvailable):

2:17 PM Changeset in webkit [286877] by graouts@webkit.org
  • 11 edits in trunk/Source

Expose the maximum device frame rate to the Web Animations model
https://bugs.webkit.org/show_bug.cgi?id=234161
rdar://85983792

Reviewed by Simon Fraser.

Source/WebCore:

Expose a new property on DocumentTimeline, governed by an off-by-default runtime flag,
that exposes the maximum frame rate supported by the device. This will allow authors
to use this information to make informed decision on appropriate frame rates to set
on animations.

  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::maximumFrameRate const):

  • animation/DocumentTimeline.h:
  • animation/DocumentTimeline.idl:

Source/WebCore/PAL:

Add a newly-used CADisplayLink SPI.

  • pal/spi/cocoa/QuartzCoreSPI.h:

Source/WebKit:

The display's nominal frame rate was only provided to the Page on macOS. We also
expose it on iOS such that the new DocumentTimeline property also works on iOS.

  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:

(-[WKOneShotDisplayLinkHandler initWithDrawingAreaProxy:]):

  • UIProcess/WebPageProxy.h:

Source/WTF:

Add a new experimental feature controlling the availability of per-animation frame rate.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
2:15 PM Changeset in webkit [286876] by Razvan Caliman
  • 7 edits
    2 adds in trunk

Web Inspector: Computed Panel: Group CSS variables by value type
https://bugs.webkit.org/show_bug.cgi?id=233563
<rdar://82978905>

Reviewed by Devin Rousso and Patrick Angle.

Source/WebInspectorUI:

Add the ability to view CSS variables in the Computed styles details sidebar panel
groupped by value type in a few sections: "colors", "dimensions", "numbers" and a
catch-all group of "other".

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Models/DOMNodeStyles.js:

(WI.DOMNodeStyles):
(WI.DOMNodeStyles.prototype.variableStylesByType):
Iterate on-demand over all CSS variables found in the node's computed styles
and assign each to a group depending on its value type:

  • color
  • dimension (number followed by a CSS unit-like string)
  • number
  • other

Additional groups and refinements will come in follow-up patches.

(WI.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
The map of CSS variable groups gets invalidated when there's a significant
change in the node's computed style. This supports the use case where previously
empty groups become populated or, conversely, become empty.

  • UserInterface/Views/ComputedStyleDetailsPanel.js:

(WI.ComputedStyleDetailsPanel):
(WI.ComputedStyleDetailsPanel.prototype.refresh):
(WI.ComputedStyleDetailsPanel.prototype.applyFilter):
(WI.ComputedStyleDetailsPanel.prototype.initialLayout):
No longer generate the elements for laying out CSS variables during initialLayout()
but handle them during layout(). This support mutating the DOM for laying out
either one top-level list of CSS variables (ungrouped) or multiple lists of CSS variable
groups depeding on the grouping mode selected at runtime.

  • UserInterface/Views/ComputedStyleDetailsPanel.css:

(.sidebar > .panel.details.css-style > .content > .computed .details-section > .content):
Ensure both top-level and nested details sections overwrite styles. CSS variables groups are in nested details sections.

(.sidebar > .panel.details.css-style > .content > .computed .details-section.computed-style-variables .computed-property-item):
Adapt stylesheet to account for using WI.ComputedStyleSection instead of WI.SpreadsheetCSSStyleDeclarationEditor

(.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .scope-bar.computed-style-variables-grouping-mode):
(.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .scope-bar.computed-style-variables-grouping-mode.default-item-selected:not(:hover)):
(.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .scope-bar.computed-style-variables-grouping-mode.default-item-selected:hover):
Reuse the visual treatment from SourcesNavigationSidebarPanel.css to avoid highlighting the default grouping mode scope bar item.

(.sidebar > .panel.details.css-style > .content > .computed > .details-section > .content): Deleted.
(.sidebar > .panel.details.css-style > .content > .computed .property): Deleted.

(WI.ComputedStyleDetailsPanel.prototype.layout):
Skip destroying and rebuilding sections whose data sources change during
WI.ComputedStyleDetailsPanel.refresh() and which handle layout internally.
We need to remove and rebuild just the sections for CSS variables because
layout is requested in response to changing the CSS variables grouping mode.

(WI.ComputedStyleDetailsPanel.prototype._createVariablesStyleSection):
Replaces the use of WI.SpreadsheetCSSStyleDeclarationEditor for rendering CSS variables with
WI.ComputedStyleSection which is already used for rendering CSS properties.
It's a lighter-weight View that's fit for purpose.

(WI.ComputedStyleDetailsPanel.prototype._renderVariablesStyleSectionGroup):
Use a generic renderer for CSS variable sections that can be reused for any group type.

(WI.ComputedStyleDetailsPanel.prototype._handleDetailsSectionCollapsedStateChanged):
Generalize handling collapsed state change events for all sections, current and future.

(WI.ComputedStyleDetailsPanel.prototype._handleEditorFilterApplied):
Generalize handling filtering events for all sections, current and future.

(WI.ComputedStyleDetailsPanel.prototype._handleVariablesGroupingModeScopeBarSelectionChanged):
(WI.ComputedStyleDetailsPanel.prototype._handleVariablesGroupingSettingChanged):
(WI.ComputedStyleDetailsPanel.prototype._handlePropertiesSectionCollapsedStateChanged): Deleted.
(WI.ComputedStyleDetailsPanel.prototype._handleVariablesSectionCollapsedStateChanged): Deleted.

  • UserInterface/Views/ComputedStyleSection.js:

(WI.ComputedStyleSection):
Change the default value of _styleTraces to null instead of an empty array so that
WI.ComputedStyleSection.layout() doesn't attempt to access it like a Map.

LayoutTests:

Check logic for grouping CSS variables by value type in Web Inspector.

  • inspector/css/variableStylesByType-expected.txt: Added.
  • inspector/css/variableStylesByType.html: Added.
2:01 PM Changeset in webkit [286875] by Nikita Vasilyev
  • 5 edits
    7 moves
    5 adds in trunk/Source/WebInspectorUI

Web Inspector: Add a swatch for align-items and align-self
https://bugs.webkit.org/show_bug.cgi?id=233054
<rdar://problem/85613199>

Reviewed by Devin Rousso.

Introduce inline swatches for align-items and align-self, that shows icons for common values:
start, center, end, and stretch.

  • UserInterface/Images/AlignContentCenter.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentCenter.svg.
  • UserInterface/Images/AlignContentEnd.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentEnd.svg.
  • UserInterface/Images/AlignContentSpaceAround.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentSpaceAround.svg.
  • UserInterface/Images/AlignContentSpaceBetween.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentSpaceBetween.svg.
  • UserInterface/Images/AlignContentSpaceEvenly.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentSpaceEvenly.svg.
  • UserInterface/Images/AlignContentStart.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentStart.svg.
  • UserInterface/Images/AlignContentStretch.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentStretch.svg.

Rename icons from Alignment to AlignContent since they are only used for align-content CSS property now.

  • UserInterface/Images/AlignItemsCenter.svg: Added.
  • UserInterface/Images/AlignItemsEnd.svg: Added.
  • UserInterface/Images/AlignItemsStart.svg: Added.
  • UserInterface/Images/AlignItemsStretch.svg: Added.
  • UserInterface/Main.html:
  • UserInterface/Models/AlignmentData.js: Added.

(WI.AlignmentData):
(WI.AlignmentData.isAlignmentAwarePropertyName):
(WI.AlignmentData._propertyNameToType):
(WI.AlignmentData.prototype.get type):
(WI.AlignmentData.prototype.get text):
(WI.AlignmentData.prototype.set text):
(WI.AlignmentData.prototype.toString):
Introduce a model object to be more consistent with the rest of the inline swatches.

  • UserInterface/Views/AlignmentEditor.js:

(WI.AlignmentEditor):
Allow AlignmentEditor to work with more than one CSS property (i.e. align-content), by introducing propertyName argument.

(WI.AlignmentEditor.glyphPath):
(WI.AlignmentEditor._glyphsForType):
(WI.AlignmentEditor.prototype.get alignment):
(WI.AlignmentEditor.prototype.set alignment):
Rename value to alignment to be more consistent with the rest of the editors.

(WI.AlignmentEditor.prototype._removePreviouslySelected):
(WI.AlignmentEditor.prototype._updateSelected):
(WI.AlignmentEditor.isAlignContentValue): Deleted.
(WI.AlignmentEditor.prototype.get value): Deleted.
(WI.AlignmentEditor.prototype.set value): Deleted.

  • UserInterface/Views/InlineSwatch.js:

(WI.InlineSwatch.prototype._updateSwatch):
(WI.InlineSwatch.prototype._valueEditorValueDidChange):

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype._replaceSpecialTokens):
(WI.SpreadsheetStyleProperty.prototype._addAlignmentTokens):

1:56 PM Changeset in webkit [286874] by Sam Sneddon
  • 2 edits in trunk/Source/WTF

Enable the 'resolution' media query by default
https://bugs.webkit.org/show_bug.cgi?id=78087

Reviewed by Simon Fraser.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
1:28 PM Changeset in webkit [286873] by Alexey Shvayka
  • 3 edits
    6 adds in trunk

Extend the scope where the Window's current event is set
https://bugs.webkit.org/show_bug.cgi?id=233833

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Import WPT tests from https://github.com/web-platform-tests/wpt/pull/31894.

  • web-platform-tests/dom/events/event-global-is-still-set-when-coercing-beforeunload-result-expected.txt: Added.
  • web-platform-tests/dom/events/event-global-is-still-set-when-coercing-beforeunload-result.html: Added.
  • web-platform-tests/dom/events/event-global-set-before-handleEvent-lookup.any-expected.txt: Added.
  • web-platform-tests/dom/events/event-global-set-before-handleEvent-lookup.any.html: Added.
  • web-platform-tests/dom/events/event-global-set-before-handleEvent-lookup.any.js: Added.
  • web-platform-tests/dom/events/resources/event-global-is-still-set-when-coercing-beforeunload-result-frame.html: Added.

Source/WebCore:

Inner invoke algorithm [1] sets window.event from step 8.2 until step 12 (inclusive).
That includes calling a callback interface [2], which performs "handleEvent" lookup
(step 10.1) and coerces return value of "beforeunload" handler (step 14).

Before this patch, window.event was not set during these user-observable operations.
Now WebKit is aligned with Blink and Gecko.

JSErrorHandler is correct: although reportException() may call userland "error" handler,
it will have window.event on its own.

[1] https://dom.spec.whatwg.org/#concept-event-listener-inner-invoke
[2] https://webidl.spec.whatwg.org/#call-a-user-objects-operation

Tests: imported/w3c/web-platform-tests/dom/events/event-global-is-still-set-when-coercing-beforeunload-result.html

imported/w3c/web-platform-tests/dom/events/event-global-set-before-handleEvent-lookup.any.html

  • bindings/js/JSEventListener.cpp:

(WebCore::JSEventListener::handleEvent):
ScopeExit is used since the method has so many exit points.

1:25 PM Changeset in webkit [286872] by Alan Coon
  • 1 copy in tags/Safari-613.1.11.1

Tag Safari-613.1.11.1.

1:24 PM Changeset in webkit [286871] by Alexey Shvayka
  • 5 edits in trunk

JSErrorHandler should not set window.event if invocation target is in shadow tree
https://bugs.webkit.org/show_bug.cgi?id=233834

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Update the test per https://github.com/web-platform-tests/wpt/pull/31893 as well as its expectations.

  • web-platform-tests/dom/events/event-global-expected.txt:
  • web-platform-tests/dom/events/event-global.html:

Source/WebCore:

This patch brings r233489 for JSErrorHandler (window.onerror handler for ErrorEvent),
implementing the spec [1] and aligning WebKit with Blink and Gecko.

[1] https://dom.spec.whatwg.org/#ref-for-window-current-event%E2%91%A1

Test: imported/w3c/web-platform-tests/dom/events/event-global.html

  • bindings/js/JSErrorHandler.cpp:

(WebCore::JSErrorHandler::handleEvent):

1:15 PM Changeset in webkit [286870] by Devin Rousso
  • 18 edits in trunk/Source

Allow Pasteboard::readBuffer to read from the pasteboard as a whole instead of a specific item
https://bugs.webkit.org/show_bug.cgi?id=233940

Reviewed by Wenson Hsieh.

In order to match the WK1 implementation of -pasteFont: <https://webkit.org/b/191379>, we
need to read from the font pasteboard as a whole, not a specific item. Make the index into
an std::optional so that we can have this behavior without needing to have a new method.

No change in behavior.

Source/WebCore:

  • platform/Pasteboard.h:
  • platform/Pasteboard.cpp:

(WebCore::Pasteboard::readBuffer):

  • platform/PasteboardStrategy.h:
  • platform/PlatformPasteboard.h:
  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::getTypes const):
(WebCore::PlatformPasteboard::bufferForType const):
(WebCore::PlatformPasteboard::readBuffer const):
(WebCore::PlatformPasteboard::getTypes): Deleted.
(WebCore::PlatformPasteboard::bufferForType): Deleted.

  • platform/libwpe/PlatformPasteboardLibWPE.cpp:

(WebCore::PlatformPasteboard::getTypes const):
(WebCore::PlatformPasteboard::getTypes): Deleted.

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::PlatformPasteboard::getTypes const):
(WebCore::PlatformPasteboard::bufferForType const):
(WebCore::PlatformPasteboard::readBuffer const):
(WebCore::PlatformPasteboard::getTypes): Deleted.
(WebCore::PlatformPasteboard::bufferForType): Deleted.

Source/WebKit:

  • UIProcess/WebPasteboardProxy.messages.in:
  • UIProcess/WebPasteboardProxy.h:
  • UIProcess/WebPasteboardProxy.cpp:

(WebKit::WebPasteboardProxy::readBufferFromPasteboard):

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:

(WebKit::WebPasteboardProxy::readBufferFromPasteboard):

  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::readBufferFromPasteboard):

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:

(WebPlatformStrategies::readBufferFromPasteboard):

12:37 PM Changeset in webkit [286869] by Chris Dumez
  • 22 edits
    2 adds in trunk

Improve <type="datetime-local"> value parsing and sanitization
https://bugs.webkit.org/show_bug.cgi?id=234039

Reviewed by Darin Adler.

Source/WebCore:

Improve <type="datetime-local"> value parsing and sanitization.

Test: fast/forms/datetimelocal/datetime-local-value-sanitization.html

  • html/BaseDateAndTimeInputType.h:
  • html/DateTimeLocalInputType.cpp:

(WebCore::DateTimeLocalInputType::sanitizeValue const):
Implement value sanitization for <type="datetime-local"> so that:

  • html/DateTimeLocalInputType.h:
  • platform/DateComponents.cpp:

(WebCore::DateComponents::parseTime):
Fix bug where we would allow more than 3 digits for the millisecond part of the time (we
would silently ignore follow-up digits instead of failing parsing). This is as per:

This was covered by one of the subtests in imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/datetime-local.html

(WebCore::isDateTimeLocalSeparator):
(WebCore::DateComponents::parseDateTimeLocal):
Allow using a space as date / time separator in <type="datetime-local">, instead of simply allowing a 'T'.
This would align our behavior with Gecko and the specification:

Note that Blink still seems to only allow 'T' as separator.

(WebCore::DateComponents::toStringForTime const):
The output will use the shortest possible string, omitting seconds or milliseconds when 0, as per
https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-normalised-local-date-and-time-string

LayoutTests:

  • fast/forms/datetimelocal/ValidityState-typeMismatch-datetimelocal-expected.txt:
  • fast/forms/datetimelocal/ValidityState-typeMismatch-datetimelocal.html:
  • fast/forms/datetimelocal/input-valueasnumber-datetimelocal-expected.txt:
  • fast/forms/datetimelocal/input-valueasnumber-datetimelocal.html:

Update a couple of existing tests to reflect behavior change.

  • fast/forms/datetimelocal/datetime-local-value-sanitization-expected.txt: Added.
  • fast/forms/datetimelocal/datetime-local-value-sanitization.html: Added.

Improve test coverage for datetime-local value sanitization.

  • platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valueMissing-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/datetime-local-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-2-expected.txt:

Rebaseline WPT tests now that more checks are passing.

12:23 PM Changeset in webkit [286868] by achristensen@apple.com
  • 20 edits in trunk

Move if-domain and unless-domain conversion to WKContentRuleList parsing
https://bugs.webkit.org/show_bug.cgi?id=234126

Reviewed by Tim Hatcher.

Source/WebCore:

This simplifies a part of the compiler that is about to get more complicated.
if-domain and unless-domain were the predecessors of if-top-url and unless-top-url,
which are strictly more powerful because they run regexes on the whole top URL.
This just translates *-domain into a *-top-url regex. This also makes it so there
is no reason not to have *-domain and *-top-url conditions in the same rule list.

Covered by existing tests.

  • contentextensions/CombinedURLFilters.cpp:

(WebCore::ContentExtensions::CombinedURLFilters::addDomain): Deleted.

  • contentextensions/CombinedURLFilters.h:
  • contentextensions/CompiledContentExtension.h:
  • contentextensions/ContentExtension.cpp:

(WebCore::ContentExtensions::ContentExtension::populateConditionCacheIfNeeded):

  • contentextensions/ContentExtensionCompiler.cpp:

(WebCore::ContentExtensions::compileRuleList):

  • contentextensions/ContentExtensionCompiler.h:
  • contentextensions/ContentExtensionError.cpp:

(WebCore::ContentExtensions::contentExtensionErrorCategory):

  • contentextensions/ContentExtensionError.h:
  • contentextensions/ContentExtensionParser.cpp:

(WebCore::ContentExtensions::getDomainList):
(WebCore::ContentExtensions::loadTrigger):

  • contentextensions/ContentExtensionRule.h:

Source/WebKit:

  • Shared/WebCompiledContentRuleList.cpp:

(WebKit::WebCompiledContentRuleList::conditionsApplyOnlyToDomain const): Deleted.

  • Shared/WebCompiledContentRuleList.h:
  • Shared/WebCompiledContentRuleListData.cpp:

(WebKit::WebCompiledContentRuleListData::encode const):
(WebKit::WebCompiledContentRuleListData::decode):

  • Shared/WebCompiledContentRuleListData.h:

(WebKit::WebCompiledContentRuleListData::WebCompiledContentRuleListData):

  • UIProcess/API/APIContentRuleListStore.cpp:

(API::encodeContentRuleListMetaData):
(API::decodeContentRuleListMetaData):
(API::compiledToFile):
(API::createExtension):
(API::getContentRuleListSourceFromMappedFile):

  • UIProcess/API/APIContentRuleListStore.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:

(TestWebKitAPI::testRequestImpl):
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::testRequest): Deleted.

11:55 AM Changeset in webkit [286867] by Said Abou-Hallawa
  • 4 edits in trunk/Source/WebCore

[GPU Process] [Filters] Address review comments after r285597
https://bugs.webkit.org/show_bug.cgi?id=234130

Reviewed by Darin Adler.

Most of the comments in https://bugs.webkit.org/show_bug.cgi?id=232457
have already been addressed. This patch covers the unaddressed ones.

  • platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp:

(WebCore::FEMorphologySoftwareApplier::apply const):
Remove wasteful ceilf() calls

  • rendering/RenderLayerFilters.cpp:

(WebCore::RenderLayerFilters::buildFilter):
Capitalize the sentence in the FIXME comments.

  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::applyResource):
Use 'auto' in a few places where the type can be deduced.

11:37 AM Changeset in webkit [286866] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

nullptr deref in ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=234018

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2021-12-10
Reviewed by Alan Bujtas.

Source/WebCore:

Test: fast/rendering/floating-object-renderer-crash.html

When destroying a given renderer, we first remove floats and out-of-flow positioned objects
from their containing block before detaching the renderer from the tree. We do this by obtaining
the renderer’s outermost block containing a floating object and recursively marking all siblings
and descendants for layout.

The criteria for continuing down the list of children require the current block to contain floats
or be able to shrink to avoid floats. However, we can have a scenario where the current child block
doesn’t have a float, but one of its descendants does. In this case, although we should continue to
that descendant and remove the float, we do not.

The proposal in this patch will instead check whether the child block contains a float, or any of its descendants do.
If so we should continue traversing towards that descendant.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::subtreeContainsFloat const):
(WebCore::RenderBlockFlow::subtreeContainsFloats const):
(WebCore::RenderBlockFlow::markAllDescendantsWithFloatsForLayout):

  • rendering/RenderBlockFlow.h:

LayoutTests:

  • fast/rendering/floating-object-renderer-crash-expected.txt: Added.
  • fast/rendering/floating-object-renderer-crash.html: Added.
11:34 AM Changeset in webkit [286865] by pvollan@apple.com
  • 7 edits in trunk/Source/WebKit

[WP] Block access to container manager service for Mail
https://bugs.webkit.org/show_bug.cgi?id=234080
<rdar://problem/86269784>

Reviewed by Brent Fulgham.

Local testing is not showing access to this daemon when running Mail.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

  • WebProcess/com.apple.WebProcess.sb.in:
11:26 AM Changeset in webkit [286864] by Said Abou-Hallawa
  • 27 edits in trunk/Source

[GPU Process] [Filters] Make FilterEffectVector a Vector of Ref<FilterEffect>
https://bugs.webkit.org/show_bug.cgi?id=234108

Reviewed by Cameron McCormack.

Source/WebCore:

There is no case that would require inserting a nullptr in FilterEffectVector.

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

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

  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::inputEffect const):

  • platform/graphics/filters/FilterEffect.h:
  • platform/graphics/filters/FilterEffectVector.h:
  • platform/graphics/filters/SourceAlpha.cpp:

(WebCore::SourceAlpha::SourceAlpha):

  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::buildFilterFunctions):
(WebCore::CSSFilter::effectsOfType const):

  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):

  • svg/SVGFEBlendElement.cpp:

(WebCore::SVGFEBlendElement::build const):

  • svg/SVGFEColorMatrixElement.cpp:

(WebCore::SVGFEColorMatrixElement::build const):

  • svg/SVGFEComponentTransferElement.cpp:

(WebCore::SVGFEComponentTransferElement::build const):

  • svg/SVGFECompositeElement.cpp:

(WebCore::SVGFECompositeElement::build const):

  • svg/SVGFEConvolveMatrixElement.cpp:

(WebCore::SVGFEConvolveMatrixElement::build const):

  • svg/SVGFEDiffuseLightingElement.cpp:

(WebCore::SVGFEDiffuseLightingElement::build const):

  • svg/SVGFEDisplacementMapElement.cpp:

(WebCore::SVGFEDisplacementMapElement::build const):

  • svg/SVGFEDropShadowElement.cpp:

(WebCore::SVGFEDropShadowElement::build const):

  • svg/SVGFEGaussianBlurElement.cpp:

(WebCore::SVGFEGaussianBlurElement::build const):

  • svg/SVGFEMergeElement.cpp:

(WebCore::SVGFEMergeElement::build const):

  • svg/SVGFEMorphologyElement.cpp:

(WebCore::SVGFEMorphologyElement::build const):

  • svg/SVGFEOffsetElement.cpp:

(WebCore::SVGFEOffsetElement::build const):

  • svg/SVGFESpecularLightingElement.cpp:

(WebCore::SVGFESpecularLightingElement::build const):

  • svg/SVGFETileElement.cpp:

(WebCore::SVGFETileElement::build const):

  • svg/graphics/filters/SVGFilter.cpp:

(WebCore::SVGFilter::effectsOfType const):

  • svg/graphics/filters/SVGFilterBuilder.cpp:

(WebCore::SVGFilterBuilder::clearResultsRecursive):
(WebCore::SVGFilterBuilder::buildEffectExpression const):
(WebCore::SVGFilterBuilder::buildExpression const):

  • svg/graphics/filters/SVGFilterBuilder.h:

(WebCore::SVGFilterBuilder::effectReferences):

Source/WebKit:

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::drawFilteredImageBuffer):

11:26 AM Changeset in webkit [286863] by Alan Coon
  • 2 edits in branches/safari-613.1.11-branch/Source/WebKit

Cherry-pick r286805. rdar://problem/86331680

Momentum Generator: Scroll tail hiccup only when scrolling up on 60Hz displays
https://bugs.webkit.org/show_bug.cgi?id=234104
<rdar://problem/86291413>

Reviewed by Simon Fraser.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::equalizeTailGaps): Sort in the correct direction based on the sign of the first delta...

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

11:21 AM Changeset in webkit [286862] by Alan Coon
  • 9 edits in branches/safari-613.1.11-branch/Source

Versioning.

WebKit-7613.1.11.1

11:02 AM Changeset in webkit [286861] by Devin Rousso
  • 8 edits in trunk/Source/WebCore

Add a way to write a SharedBuffer to the Pasteboard
https://bugs.webkit.org/show_bug.cgi?id=234065

Reviewed by Wenson Hsieh.

In order to match the WK1 implementation of -pasteFont: <https://webkit.org/b/191379>, we
need to be able to write a SharedBuffer (with an associated type) to the font pasteboard.

Create a struct PasteboardBuffer to wrap the SharedBuffer and String type (and a
String contentOrigin on Cocoa platforms, which is used to decide whether to show a "Paste"
callout to the user as a gate on crossorigin content sharing) in a single object.

Though it isn't used in this patch, -pasteFont: <https://webkit.org/b/191379> will use
this to write RTF data (which contains the necessary font data).

No change in behavior.

  • platform/Pasteboard.h:
  • platform/Pasteboard.cpp:
  • platform/libwpe/PasteboardLibWPE.cpp:

(WebCore::Pasteboard::write):

  • platform/gtk/PasteboardGtk.cpp:

(WebCore::Pasteboard::write):

  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::write):

  • platform/mac/PasteboardMac.mm:

(WebCore::Pasteboard::write):

  • platform/win/PasteboardWin.cpp:

(WebCore::Pasteboard::write):

11:00 AM Changeset in webkit [286860] by Patrick Griffis
  • 7 edits in trunk

LayoutTests/imported/w3c:
CSP: Implement protections against nonce-hijacking
https://bugs.webkit.org/show_bug.cgi?id=233087

Reviewed by Brent Fulgham.

Update expectations.

  • web-platform-tests/content-security-policy/script-src/nonce-enforce-blocked-expected.txt:

Source/WebCore:
CSP: Prevent nonce-hijacking
https://bugs.webkit.org/show_bug.cgi?id=233087

Reviewed by Brent Fulgham.

Implement protections against nonce-hijacking as described in this spec:

https://www.w3.org/TR/CSP3/#security-nonce-hijacking

  • dom/Element.cpp:

(WebCore::Element::isNonceable const):
(WebCore::Element::nonce const):

  • dom/Element.h:

(WebCore::Element::hasDuplicateAttribute const):
(WebCore::Element::setHasDuplicateAttribute):

  • html/parser/AtomHTMLToken.h:

(WebCore::AtomHTMLToken::hasDuplicateAttribute const):
(WebCore::AtomHTMLToken::initializeAttributes):

  • html/parser/HTMLConstructionSite.cpp:

(WebCore::setAttributes):
(WebCore::HTMLConstructionSite::insertCustomElement):

10:52 AM Changeset in webkit [286859] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[WP][macOS] Add required system call
https://bugs.webkit.org/show_bug.cgi?id=234129

Reviewed by Brent Fulgham.

  • WebProcess/com.apple.WebProcess.sb.in:
10:17 AM Changeset in webkit [286858] by Darin Adler
  • 6 edits in trunk/Source

Use simpler idioms for std::less and std::greater possible in modern C++
https://bugs.webkit.org/show_bug.cgi?id=234117

Reviewed by Anders Carlsson.

Source/WebCore:

  • testing/InternalsMapLike.cpp:

(WebCore::InternalsMapLike::inspectValues const): Remove unneeded explicit
use of std:less, because this is what std::sort by default.

Source/WebKit:

  • WebProcess/WebPage/MomentumEventDispatcher.cpp:

(WebKit::MomentumEventDispatcher::equalizeTailGaps): Removed unneeded
template arguments for std::greater, and removed explicit use of std::less,
since that's what std::sort does by default.

Source/WTF:

  • wtf/ListDump.h:

(WTF::sortedListDump): Removed unnecessary template arguments to std::less.

9:28 AM Changeset in webkit [286857] by commit-queue@webkit.org
  • 15 edits
    4 adds
    3 deletes in trunk

Unreviewed, reverting r286836.
https://bugs.webkit.org/show_bug.cgi?id=234153

some tests are flaky on iOS and some are crashing on macOS

Reverted changeset:

"[Model] Add load and error events to distinguish resource
load from model readiness"
https://bugs.webkit.org/show_bug.cgi?id=233706
https://commits.webkit.org/r286836

9:25 AM Changeset in webkit [286856] by Tadeu Zagallo
  • 2 edits in trunk/Source/JavaScriptCore

Remove Mac-specific ARM64EHash implementation
https://bugs.webkit.org/show_bug.cgi?id=234150

Reviewed by Saam Barati.

Currently we have a weaker implementation of ARM64EHash on mac, but we measured it and it's not
any faster than the stricter version we use on iOS. We are removing the mac-specific version and
switching it to use the stricter version.

  • assembler/AssemblerBuffer.h:
9:16 AM Changeset in webkit [286855] by Chris Dumez
  • 23 edits in trunk

Radio buttons with no form owner are not grouped
https://bugs.webkit.org/show_bug.cgi?id=220502
<rdar://problem/73300895>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

  • web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valid-expected.txt:
  • web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valueMissing-expected.txt:
  • web-platform-tests/html/semantics/forms/the-input-element/radio-expected.txt:

Source/WebCore:

Per the HTML specification and to match the behavior of both Gecko and Blink,
radio buttons should still be grouped, even if they are disconnected and not
owned by a form.

This patch aligns our behavior with Gecko and Blink and is based on the following
Blink commit:

No new tests, rebaselined existing tests.

  • dom/ContainerNode.h:

(WebCore::ContainerNode::rootNode const):

  • dom/ElementTraversal.h:

(WebCore::Traversal<ElementType>::inclusiveFirstWithin):

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::setChecked):
(WebCore::HTMLInputElement::didChangeForm):
(WebCore::HTMLInputElement::insertedIntoAncestor):
(WebCore::HTMLInputElement::removedFromAncestor):
(WebCore::HTMLInputElement::checkedRadioButtonForGroup const):

  • html/InputType.h:

(WebCore::InputType::willUpdateCheckedness):

  • html/RadioInputType.cpp:

(WebCore::RadioInputType::valueMissing const):
(WebCore::RadioInputType::willUpdateCheckedness):

  • html/RadioInputType.h:

LayoutTests:

  • fast/forms/radio/ValidityState-valueMissing-radio-expected.txt:
  • fast/forms/radio/ValidityState-valueMissing-radio.html:
  • fast/forms/radio/radio-live-validation-style-expected.txt:
  • fast/forms/radio/radio-live-validation-style.html:

Update existing tests to reflect behavior change. I have verified that our behavior on those tests
is aligned with both Firefox and Chrome.

  • platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valid-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valueMissing-expected.txt:

Rebaseline WPT tests now that more checks are passing.

9:07 AM Changeset in webkit [286854] by youenn@apple.com
  • 3 edits in trunk/LayoutTests

[ Monterey ] http/tests/workers/service/serviceworker-websocket.https.html (layout-test) is constant text failure
https://bugs.webkit.org/show_bug.cgi?id=233665
<rdar://problem/85888177>

Reviewed by Alex Christensen.

Allow all SSL certificates.

  • http/tests/workers/service/serviceworker-websocket.https.html:
  • platform/mac-wk2/TestExpectations:
8:56 AM Changeset in webkit [286853] by Patrick Griffis
  • 20 edits in trunk

CSP: Allow external scripts with SRI hashes matching CSP
https://bugs.webkit.org/show_bug.cgi?id=233911

Reviewed by Kate Cheney.

LayoutTests/imported/w3c:

Update expectations with more passes.

  • web-platform-tests/content-security-policy/script-src/script-src-report-only-policy-works-with-external-hash-policy-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-sri_hash.sub-expected.txt:

Source/WebCore:

This is a change in CSP3 that allows loading external
scripts that have SRI hashes matching CSP hashes.
https://www.w3.org/TR/CSP3/#external-hash

ResourceCryptographicDigest was changed to not validate padding
during base64 decoding which is harmless and fixes parsing the
hashes used in WPT's script-src-sri_hash.sub.html.

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::isAllowedByContentSecurityPolicy):

  • loader/ResourceCryptographicDigest.cpp:

(WebCore::parseCryptographicDigestImpl):
(WebCore::decodeEncodedResourceCryptographicDigest):

  • loader/SubresourceIntegrity.cpp:

(WebCore::parseIntegrityMetadata):

  • loader/SubresourceIntegrity.h:
  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::allowedByContentSecurityPolicy const):

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::allScriptPoliciesAllow const):
(WebCore::parseSubResourceIntegrityIntoDigests):
(WebCore::ContentSecurityPolicy::allowResourceFromSource const):
(WebCore::ContentSecurityPolicy::allowScriptFromSource const):

  • page/csp/ContentSecurityPolicy.h:
  • page/csp/ContentSecurityPolicyDirectiveList.cpp:

(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForScript const):

  • page/csp/ContentSecurityPolicyDirectiveList.h:
  • page/csp/ContentSecurityPolicySourceList.cpp:

(WebCore::ContentSecurityPolicySourceList::matchesAll const):

  • page/csp/ContentSecurityPolicySourceList.h:
  • page/csp/ContentSecurityPolicySourceListDirective.cpp:

(WebCore::ContentSecurityPolicySourceListDirective::containsAllHashes const):

  • page/csp/ContentSecurityPolicySourceListDirective.h:

LayoutTests:

Update tests to accept base64 with extra padding.

  • http/tests/security/contentSecurityPolicy/1.1/scripthash-tests-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-tests.html:
8:33 AM Changeset in webkit [286852] by pvollan@apple.com
  • 7 edits in trunk/Source/WebKit

Fix sandbox build error
https://bugs.webkit.org/show_bug.cgi?id=234146

Unreviewed fix sandbox build error after r286460.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
8:20 AM Changeset in webkit [286851] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Replace Vector<std::unique_ptr<DisplayBoxNode> with Vector<DisplayBoxTree::Node>
https://bugs.webkit.org/show_bug.cgi?id=234110

Reviewed by Antti Koivisto.

This patch switches over from using DisplayBoxNode* in AncestorStack to simple indexes to contain heap allocations.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::DisplayBoxTree::DisplayBoxTree):
(WebCore::Layout::DisplayBoxTree::hasInlineBox const):
(WebCore::Layout::DisplayBoxTree::root const):
(WebCore::Layout::DisplayBoxTree::at):
(WebCore::Layout::DisplayBoxTree::at const):
(WebCore::Layout::DisplayBoxTree::append):
(WebCore::Layout::AncestorStack::unwind):
(WebCore::Layout::AncestorStack::push):
(WebCore::Layout::createdDisplayBoxNodeForContainerBoxAndPushToAncestorStack):
(WebCore::Layout::InlineDisplayContentBuilder::ensureDisplayBoxForContainer):
(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):
(WebCore::Layout::DisplayBoxNode::DisplayBoxNode): Deleted.
(WebCore::Layout::DisplayBoxNode::appendChild): Deleted.
(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForChildNode): Deleted.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.h:
7:36 AM Changeset in webkit [286850] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed, reverting r282794.
<rdar://problem/86271222>

Regressed PLT5

Reverted changeset:

"Avoid doing a second server pre-connect after a process-swap"
https://bugs.webkit.org/show_bug.cgi?id=230517
https://commits.webkit.org/r282794

6:28 AM Changeset in webkit [286849] by keith_miller@apple.com
  • 2 edits in trunk/Source/WTF

Reduce maximum mmap size for Structure regions to help placate ios
https://bugs.webkit.org/show_bug.cgi?id=234091

Reviewed by Saam Barati.

Use mach_vm_map since that supports memory alignement so we don't have to map 2x desired address space then free then trim.

  • wtf/PlatformHave.h:
  • wtf/posix/OSAllocatorPOSIX.cpp:

(WTF::OSAllocator::reserveUncommittedAligned):

6:27 AM Changeset in webkit [286848] by Alan Bujtas
  • 8 edits in trunk

[LFC][IFC] Enable bidi handling for content with inline boxes
https://bugs.webkit.org/show_bug.cgi?id=234055

Reviewed by Antti Koivisto.

Source/WebCore:

  • layout/integration/LayoutIntegrationCoverage.cpp:

LayoutTests:

Progressions.

  • platform/mac/fast/borders/bidi-002-expected.txt:
  • platform/mac/fast/borders/bidi-012-expected.txt:
  • platform/mac/fast/borders/rtl-border-05-expected.txt:
6:07 AM Changeset in webkit [286847] by Manuel Rego Casasnovas
  • 3 edits
    1 add in trunk/LayoutTests/imported/w3c

[WPT] Import resources/accesskey.js
https://bugs.webkit.org/show_bug.cgi?id=234137

Reviewed by Rob Buis.

This just imports the changes from this WPT PR:
https://github.com/web-platform-tests/wpt/pull/32000

Which will allow to write other WPT tests using pressAccessKey() method.

  • web-platform-tests/resources/accesskey.js: Added.

(pressAccessKey):

  • web-platform-tests/resources/w3c-import.log:
  • web-platform-tests/shadow-dom/accesskey.tentative.html:
5:51 AM Changeset in webkit [286846] by Nikolas Zimmermann
  • 5 edits in trunk/Source/WebCore

[LBSE] Create RenderSVGRoot renderer for outermost <svg> and allow direct <rect> children
https://bugs.webkit.org/show_bug.cgi?id=233873

Reviewed by Rob Buis.

Construct RenderSVGRoot renderers for the outermost <svg> element when LBSE is enabled.
An 'allowlist' approach is used to only create renderers for those SVG elements that
are aware of LBSE: outermost <svg> element + <rect> element. For all other elements
no renderers will be created in LBSE for now.

This patch leaves the legacy engine unchanged (probed by EWS & local test runs),
and also LBSE shows no assertions/crashes/hangs in release/debug builds - tested
with "run-webkit-tests --internal-feature=LayerBasedSVGEngineEnabled".

Note that many layout tests will either timeout or show a different result,
due to the small capabilities of LBSE at present. Therefore it's beneficial to
decrease timeouts / use more workers when running layout tests. Otherwise they
will take a long time to complete. On my macOS Monterey M1 MacBook, following
parameters lead to a reasonable test execution time:

run-webkit-tests --internal-feature=LayerBasedSVGEngineEnabled --timeout=5000 \
--no-sample-on-timeout --no-retry-failures --child-processes=15 \
[--release / --debug] svg

Covered by existing tests.

  • rendering/svg/RenderSVGModelObject.cpp:

(WebCore::RenderSVGModelObject::clippedOverflowRect const):
(WebCore::RenderSVGModelObject::nodeAtPoint):

  • rendering/svg/RenderSVGModelObject.h:

(WebCore::RenderSVGModelObject::visualOverflowRectEquivalent const):

  • svg/SVGElement.cpp:

(WebCore::createSVGLayerAwareElementSet):
(WebCore::isSVGLayerAwareElement):
(WebCore::SVGElement::childShouldCreateRenderer const):

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::createElementRenderer):

5:28 AM Changeset in webkit [286845] by Antti Koivisto
  • 13 edits in trunk/Source

[CSS Container Queries] Basic @container at-rule parsing support
https://bugs.webkit.org/show_bug.cgi?id=234135

Reviewed by Antoine Quint.

Source/WebCore:

Implement basic support for parsing @container at-rules.
This patch doesn't yet parse the queries themselves.

Disabled by default.

  • css/StyleRule.cpp:

(WebCore::StyleRuleBase::destroy):
(WebCore::StyleRuleBase::copy const):
(WebCore::StyleRuleBase::createCSSOMWrapper const):
(WebCore::StyleRuleContainer::StyleRuleContainer):
(WebCore::StyleRuleContainer::create):

  • css/StyleRule.h:

(WebCore::StyleRuleBase::isContainerRule const):
(isType):

  • css/StyleRuleType.h:
  • css/StyleSheetContents.cpp:

(WebCore::traverseRulesInVector):
(WebCore::StyleSheetContents::traverseSubresources const):

  • css/parser/CSSAtRuleID.cpp:

(WebCore::cssAtRuleID):

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

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

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

(WebCore::CSSParserImpl::consumeAtRule):
(WebCore::CSSParserImpl::consumeContainerRule):

  • css/parser/CSSParserImpl.h:

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

Add preference for container queries, disabled by default.

4:23 AM Changeset in webkit [286844] by Razvan Caliman
  • 10 edits
    1 add in trunk/Source/WebInspectorUI

Web Inspector: Extract a specialized CSSNameCompletions from CSSCompletions
https://bugs.webkit.org/show_bug.cgi?id=233369
<rdar://83206520>

Reviewed by Devin Rousso.

WI.CSSPropertyNameCompletions is a long-lived object that holds the list of all CSS properties
supported by the target. It is instantiated only once on Web Inspector startup.

By contrast, WI.CSSCompletions is an object instantiated as often as needed with
lists of property values, CSS function values, etc. It holds the generic logic for
matching values against a given query.

The specialized logic for CSS property names was mixed-in with the generic logic in WI.CSSCompletions.
The main difference is in the format of the payload provided:

  • an array of objects with key/value pairs for WI.CSSPropertyNameCompletions.
  • an array of strings for general purpose WI.CSSCompletions.

This patch reduces the complexity in WI.Completions:

  • moves the one-time initialization method to WI.cssManager.initializeCSSCompletions.
  • simplifies WI.Completions constructor to expect just an array of strings.
  • introduces WI.CSSPropertyNameCompletions as a sub-class of WI.CSSCompletions where its constructor is specialized to handle the payload received from the backend.
  • moves the WI.CSSPropertyNameCompletions instance to WI.cssManager.cssPropertyNameCompletions.
  • removes unused accessors for navigating the list of matched completions.
  • UserInterface/Base/Main.js:

(WI.performOneTimeFrontendInitializationsUsingTarget):

  • UserInterface/Controllers/CSSManager.js:

(WI.CSSManager):
(WI.CSSManager.prototype.initializeCSSPropertyNameCompletions.):
(WI.CSSManager.prototype.initializeCSSPropertyNameCompletions):
Moved the initializiation method for objects used to get CSS completions
from WI.CSSCompletions with data from the backed to a more appropriate place.

(WI.CSSManager.prototype.get propertyNameCompletions):

  • UserInterface/Controllers/CodeMirrorCompletionController.js:

(WI.CodeMirrorCompletionController.prototype._generateCSSCompletions):

  • UserInterface/Main.html:
  • UserInterface/Models/CSSCompletions.js:

(WI.CSSCompletions.prototype._firstIndexOfPrefix):
(WI.CSSCompletions):
(WI.CSSCompletions.initializeCSSCompletions.): Deleted.
(WI.CSSCompletions.initializeCSSCompletions.collectPropertyNameForCodeMirror): Deleted.
(WI.CSSCompletions.initializeCSSCompletions.propertiesCallback): Deleted.
(WI.CSSCompletions.initializeCSSCompletions.fontFamilyNamesCallback): Deleted.
(WI.CSSCompletions.initializeCSSCompletions): Deleted.
Moved to WI.CSSManager.

(WI.CSSCompletions.prototype.next): Deleted.
(WI.CSSCompletions.prototype.previous): Deleted.
(WI.CSSCompletions.prototype._closest): Deleted.
Removed unused methods for navigating the completions list.
This behavior is encapsulated in WI.CompletionSuggestionsView.

(WI.CSSCompletions.prototype.isValidPropertyName): Deleted.
Moved to WI.CSSPropertyNameCompletions.

  • UserInterface/Models/CSSKeywordCompletions.js:

(WI.CSSKeywordCompletions.forPartialPropertyName):

  • UserInterface/Models/CSSPropertyNameCompletions.js: Added.

(WI.CSSPropertyNameCompletions.prototype.isValidPropertyName):
(WI.CSSPropertyNameCompletions):

  • UserInterface/Test.html:
  • UserInterface/Test/Test.js:

(WI.performOneTimeFrontendInitializationsUsingTarget):

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.updateStatus):
(WI.SpreadsheetStyleProperty.prototype._addCSSDocumentationButton):

4:19 AM Changeset in webkit [286843] by Nikolas Zimmermann
  • 13 edits in trunk/Source/WebCore

[LBSE] Handle RenderSVGRoot in all places that handle LegacyRenderSVGRoot
https://bugs.webkit.org/show_bug.cgi?id=233872

Reviewed by Rob Buis.

Various places that handle LegacyRenderSVGRoot, also need to handle the
LBSE RenderSVGRoot renderer -- this patch plumbs in support for
RenderSVGRoot where necessary.

Covered by existing tests, no change in behaviour.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::elementPath const):

  • page/FrameView.cpp:

(WebCore::FrameView::applyOverflowToViewport):

  • rendering/RenderTreeAsText.cpp:

(WebCore::write):

  • rendering/svg/RenderSVGResource.cpp:

(WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):

  • rendering/svg/SVGRenderSupport.cpp:

(WebCore::layoutSizeOfNearestViewportChanged):

  • rendering/svg/SVGRenderTreeAsText.cpp:

(WebCore::write):

  • rendering/svg/SVGRenderTreeAsText.h:
  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::attachInternal):
(WebCore::RenderTreeBuilder::detach):

  • rendering/updating/RenderTreeBuilderSVG.cpp:

(WebCore::RenderTreeBuilder::SVG::attach):
(WebCore::RenderTreeBuilder::SVG::detach):

  • rendering/updating/RenderTreeBuilderSVG.h:
  • svg/SVGElement.cpp:

(WebCore::SVGElement::childShouldCreateRenderer const):

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::svgAttributeChanged):
(WebCore::SVGSVGElement::currentViewBoxRect const):
(WebCore::SVGSVGElement::currentViewportSize const):

3:24 AM Changeset in webkit [286842] by Nikolas Zimmermann
  • 4 edits
    2 adds in trunk/Source/WebCore

[LBSE] Begin layer-aware RenderSVGRoot implementation
https://bugs.webkit.org/show_bug.cgi?id=233863

Reviewed by Rob Buis.

Begin implementing RenderSVGRoot - the renderer for the outermost <svg> element -
for the layer-based SVG engine (LBSE). Starting with the downstream implementation,
all parts were removed that can be upstreamed separated (SVGBoundingBoxComputation,
SVGContainerLayout, etc.). This only creates the renderer and integrates it with
the build systems.

Covered by existing tests, no change in behaviour.

  • Sources.txt: Add RenderSVGRoot.* to build.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • platform/graphics/transforms/TransformState.h:

(WebCore::TransformState::direction const): Make direction() public.

  • rendering/svg/RenderSVGRoot.cpp: Added.

(WebCore::RenderSVGRoot::RenderSVGRoot):
(WebCore::RenderSVGRoot::svgSVGElement const):
(WebCore::RenderSVGRoot::computeIntrinsicRatioInformation const):
(WebCore::RenderSVGRoot::isEmbeddedThroughSVGImage const):
(WebCore::RenderSVGRoot::isEmbeddedThroughFrameContainingSVGDocument const):
(WebCore::RenderSVGRoot::computeReplacedLogicalWidth const):
(WebCore::RenderSVGRoot::computeReplacedLogicalHeight const):
(WebCore::RenderSVGRoot::layout):
(WebCore::RenderSVGRoot::shouldApplyViewportClip const):
(WebCore::RenderSVGRoot::paint):
(WebCore::RenderSVGRoot::paintObject):
(WebCore::RenderSVGRoot::paintContents):
(WebCore::RenderSVGRoot::willBeDestroyed):
(WebCore::RenderSVGRoot::insertedIntoTree):
(WebCore::RenderSVGRoot::willBeRemovedFromTree):
(WebCore::RenderSVGRoot::styleDidChange):
(WebCore::RenderSVGRoot::updateLayerInformation):
(WebCore::RenderSVGRoot::updateFromStyle):
(WebCore::RenderSVGRoot::clippedOverflowRect const):
(WebCore::RenderSVGRoot::computeTransformationMatrices):
(WebCore::RenderSVGRoot::nodeAtPoint):
(WebCore::RenderSVGRoot::hasRelativeDimensions const):
(WebCore::RenderSVGRoot::addResourceForClientInvalidation):
(WebCore::RenderSVGRoot::currentViewportSize const):
(WebCore::RenderSVGRoot::mapLocalToContainer const):
(WebCore::RenderSVGRoot::overflowClipRect const):
(WebCore::RenderSVGRoot::applyTransform const):
(WebCore::RenderSVGRoot::absoluteRects const):
(WebCore::RenderSVGRoot::absoluteQuads const):

  • rendering/svg/RenderSVGRoot.h: Added.
2:39 AM Changeset in webkit [286841] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (iOS 15): Safari loses Network access when establishing WebRTC session
https://bugs.webkit.org/show_bug.cgi?id=233752
<rdar://problem/86196093>

Reviewed by Geoffrey Garen.

When we get an error from a UDP nw socket, we do not need to stop reading and close it.
We can just log the error and continue reading as the error might get fixed later on.

Not easily testable.

  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.mm:
2:30 AM Changeset in webkit [286840] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Handle TerminationException in WebCore::ReadableStream::create()
https://bugs.webkit.org/show_bug.cgi?id=233061

Patch by Frederic Wang <fwang@igalia.com> on 2021-12-10
Reviewed by Darin Adler.

Source/WebCore:

Test: streams/readable-stream-create-after-worker-terminates-crash.html

  • bindings/js/ReadableStream.cpp:

(WebCore::ReadableStream::create): Do not try immediately casting the constructor value to an
object, since it is undefined when a termination exception is thrown.

LayoutTests:

Add non-regression test.

  • streams/readable-stream-create-after-worker-terminates-crash-expected.txt: Added.
  • streams/readable-stream-create-after-worker-terminates-crash.html: Added.
2:18 AM Changeset in webkit [286839] by Chris Lord
  • 2 edits in trunk

Change contributor status of Chris Lord from committer to reviewer
https://bugs.webkit.org/show_bug.cgi?id=234136

Unreviewed.

  • metadata/contributors.json:
12:24 AM Changeset in webkit [286838] by commit-queue@webkit.org
  • 30 edits
    1 copy
    1 add in trunk

IOSurface memory attribution is hard to use in constructors
https://bugs.webkit.org/show_bug.cgi?id=232988
<rdar://problem/85541918>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-12-10
Reviewed by Chris Dumez.

Source/WebCore:

Add WebCore::ProcessIdentity type that can be used to communicate memory attribution.
For non-Cocoa ports, this is nullptr.
This is used in WebCore to set the memory attribution of IOSurface and objects
that hold IOSurfaces.
This is instantiated in WebKit.
Currently the only useful way to instantiate ProcessIdentity is by receiving
the ProcessIdentity as a message and create it this way for the
sender process.

No new tests, refactor.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/Logging.h:

Add WebCore Process log tag since the code moved from WebKit to ProcessIdentity
used that tag to log.

  • platform/ProcessIdentity.cpp: Added.

(WebCore::ProcessIdentity::ProcessIdentity):
(WebCore::ProcessIdentity::taskIdToken const):
(WebCore::ProcessIdentity::sendRight const):
(WebCore::ProcessIdentity::operator bool const):

  • platform/ProcessIdentity.h: Added.

Add the ProcessIdentity type that can be used to communicate memory attribution.

  • platform/graphics/RemoteVideoSample.h:

(WebCore::RemoteVideoSample::setOwnershipIdentity):

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

(WebCore::GraphicsContextGLCocoa::create):
(WebCore::GraphicsContextGLCocoa::GraphicsContextGLCocoa):
(WebCore::GraphicsContextGLANGLE::allocateAndBindDisplayBufferBacking):
Add an example use where the constructor takes the memory attribution token.
This may be needed in the future when the token is used as a parameter in
the ANGLE context creation.
Use the token in creating the IOSurface. This fixes a bug where WebGL
back buffers would not be attributed until they were sent to WP.

  • platform/graphics/cocoa/IOSurface.h:
  • platform/graphics/cocoa/IOSurface.mm:

(WebCore::IOSurface::setOwnershipIdentity):

  • platform/graphics/cocoa/WebProcessGraphicsContextGLCocoa.mm:

Source/WebKit:

Remove ifdefs and direct use of task_id_token_t.
Instead, use WebCore::ProcessIdentifier. This way the
cross-platform code is easier to author.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::GPUConnectionToWebProcess):

  • GPUProcess/GPUConnectionToWebProcess.h:

(WebKit::GPUConnectionToWebProcess::webProcessIdentity const):
(WebKit::GPUConnectionToWebProcess::webProcessIdentityToken const): Deleted.

  • GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:

(WebKit::RemoteGraphicsContextGLCocoa::RemoteGraphicsContextGLCocoa):
(WebKit::RemoteGraphicsContextGLCocoa::platformWorkQueueInitialize):
(WebKit::RemoteGraphicsContextGLCocoa::prepareForDisplay):

  • GPUProcess/graphics/RemoteImageBuffer.h:

(WebKit::RemoteImageBuffer::setOwnershipIdentity):
(WebKit::RemoteImageBuffer::setProcessOwnership): Deleted.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::RemoteRenderingBackend):
(WebKit::RemoteRenderingBackend::createImageBufferWithQualifiedIdentifier):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:

(WebKit::Function<void):

  • Shared/GPUProcessConnectionParameters.h:

(WebKit::GPUProcessConnectionParameters::encode const):
(WebKit::GPUProcessConnectionParameters::decode):

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::SourceProxy::SourceProxy):
(WebKit::UserMediaCaptureManagerProxy::SourceProxy::setShouldApplyRotation):
(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
(WebKit::UserMediaCaptureManagerProxy::clone):
(WebKit::UserMediaCaptureManagerProxy::SourceProxy::setWebProcessIdentityToken): Deleted.

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:

(WebKit::UserMediaCaptureManagerProxy::ConnectionProxy::webProcessIdentityToken const): Deleted.

  • UIProcess/WebProcessProxy.cpp:
  • WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h:

(WebKit::ImageBufferShareableBitmapBackend::setOwnershipIdentity):

  • WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.cpp:

(WebKit::ImageBufferShareableMappedIOSurfaceBackend::setOwnershipIdentity):
(WebKit::ImageBufferShareableMappedIOSurfaceBackend::setProcessOwnership): Deleted.

  • WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.h:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeGPUProcessConnectionParameters):

Tools:

Update constructor calling base class constructor, add empty
ProcesseIdentity.

  • TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLCocoa.mm:
12:22 AM Changeset in webkit [286837] by Adrian Perez de Castro
  • 24 edits in trunk/Source

Non-unified build fixes, mid December 2021 edition
https://bugs.webkit.org/show_bug.cgi?id=234106

Unreviewed non-unified build fixes.

Source/JavaScriptCore:

  • wasm/js/WasmToJS.h: Remove unneeded forward declaration of CallLinkInfo, add forward

declaration of OptimizingCallLinkInfo.

Source/WebCore:

No new tests needed.

  • bindings/js/JSDOMConvertCallbacks.h: Add missing JSDOMGlobalObject.h header.
  • css/CSSImportRule.cpp: Add missing CSSMarkup.h header.
  • css/CSSLayerStatementRule.cpp: Add missinig CSSLayerBlockRule.h header.
  • platform/graphics/ColorInterpolation.cpp: Remove unneeded #pragma once.
  • platform/graphics/ColorInterpolation.h: Add missing <optional> header.
  • platform/graphics/displaylists/DisplayListItemBuffer.cpp: Add missing Filter.h header.
  • platform/graphics/displaylists/DisplayListRecorderImpl.cpp: Ditto.
  • platform/graphics/filters/FilterFunction.cpp: Add missing ImageBuffer.h header.
  • platform/graphics/filters/FilterOperation.cpp: Ditto.
  • platform/graphics/filters/FilterOperations.cpp: Ditto.
  • platform/graphics/filters/SourceAlpha.cpp: Ditto.
  • platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.cpp: Ditto.
  • platform/graphics/filters/software/SourceGraphicSoftwareApplier.cpp: Add missing

FilterImage.h header.

  • svg/SVGFEFuncAElement.cpp: Add missing ImageBuffer.h header.
  • svg/SVGFEFuncBElement.cpp: Ditto.
  • svg/SVGFEFuncGElement.cpp: Ditto.
  • svg/SVGFEFuncRElement.cpp: Ditto.
  • svg/SVGFEPointLightElement.cpp: Ditto.
  • svg/SVGFESpotLightElement.cpp: Ditto.

Source/WebKit:

  • NetworkProcess/storage/OriginStorageManager.cpp: Add missing WebsiteDataType.h and

wtf/FileSystem.h headers.

12:15 AM Changeset in webkit [286836] by graouts@webkit.org
  • 15 edits
    3 adds
    4 deletes in trunk

[Model] Add load and error events to distinguish resource load from model readiness
https://bugs.webkit.org/show_bug.cgi?id=233706
rdar://85922697

Reviewed by Chris Dumez and Dean Jackson.

Source/WebCore:

Test: model-element/model-element-error-and-load-events.html

Prior to this patch, <model> elements had a "ready" promise which resolved once the resource had been loaded.
However, this promise should be used when the <model> is fully ready, and this is done on macOS and iOS asynchronously
after the resource has been loaded by the supporting ARQL framework. So we need a way to monitor success or failure of
the resource load specifically.

To that end, and matching the <img> element, we dispatch "load" and "error" events on <model> elements and add a
"complete" property to indicate whether the resource is loaded.

Meanwhile, the "ready" promise is now resolved when the model is fully loaded by the supporting framework, indicating
that further APIs are safe to use.

Since creating the support ARQL object for macOS and iOS also requires the <model> element's renderer being available,
we opt into "custom style resolve callbacks" so that we may implement didAttachRenderers() on HTMLModelElement and keep
track of renderer availability before attempting to create the ModelPlayer.

  • Modules/model-element/HTMLModelElement.cpp:

(WebCore::HTMLModelElement::HTMLModelElement):
(WebCore::HTMLModelElement::create):
(WebCore::HTMLModelElement::setSourceURL):
(WebCore::HTMLModelElement::didAttachRenderers):
(WebCore::HTMLModelElement::notifyFinished):
(WebCore::HTMLModelElement::modelDidChange):
(WebCore::HTMLModelElement::createModelPlayer):
(WebCore::HTMLModelElement::didFinishLoading):
(WebCore::HTMLModelElement::didFailLoading):
(WebCore::HTMLModelElement::activeDOMObjectName const):
(WebCore::HTMLModelElement::virtualHasPendingActivity const):

  • Modules/model-element/HTMLModelElement.h:
  • Modules/model-element/HTMLModelElement.idl:

Tools:

Use the "load" event instead of the "ready" promise for this test which only requires monitoring
the <model> resource being loaded.

  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:

(TestWebKitAPI::TEST):

LayoutTests:

Remove existing tests around resource loading and recreate them in terms of "load" and "error"
events in model-element/model-element-error-and-load-events.html and in terms of the ready
promise in model-element/model-element-ready.html.

Other tests using model.ready for other purposes are also rewritten using events.

  • model-element/model-element-contents-layer-updates-with-clipping.html:
  • model-element/model-element-contents-layer-updates.html:
  • model-element/model-element-error-and-load-events-expected.txt: Added.
  • model-element/model-element-error-and-load-events.html: Added.
  • model-element/model-element-graphics-layers-opacity.html:
  • model-element/model-element-graphics-layers.html:
  • model-element/model-element-ready-expected.txt:
  • model-element/model-element-ready-load-aborted-expected.txt: Removed.
  • model-element/model-element-ready-load-aborted.html: Removed.
  • model-element/model-element-ready-load-failed-expected.txt: Removed.
  • model-element/model-element-ready-load-failed.html: Removed.
  • model-element/model-element-ready.html:
  • model-element/resources/model-element-test-utils.js: Added.

(const.createModelAndSource):

  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
12:11 AM Changeset in webkit [286835] by Said Abou-Hallawa
  • 12 edits in trunk/Source/WebCore

[GPU Process] [Filters] Enable Filter rendering in GPU Process
https://bugs.webkit.org/show_bug.cgi?id=233989

Reviewed by Cameron McCormack.

This will move applying the CSSFilterImageValue, the CSSFilter and the
SVGFilter to GPUProcess.

  • css/CSSFilterImageValue.cpp:

(WebCore::CSSFilterImageValue::image):

  • rendering/RenderLayerFilters.cpp:

(WebCore::RenderLayerFilters::allocateBackingStoreIfNeeded):

  • rendering/RenderMenuList.cpp:

(RenderMenuList::hostWindow const):
Change the implementation to call RenderObject::hostWindow() since it is
now defined to be virtual in the two base classes.

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::hostWindow const):

  • rendering/RenderObject.h:

Add the helper function RenderObject::hostWindow() since it is being
requested in many places because of creating ImageBuffer for GPUProcess.

  • rendering/RenderSearchField.cpp:

(WebCore::RenderSearchField::hostWindow const):
Change the implementation to call RenderObject::hostWindow() since it is
now defined to be virtual in the two base classes.

  • rendering/svg/RenderSVGResourceClipper.cpp:

(WebCore::RenderSVGResourceClipper::applyClippingToContext):

  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::applyResource):
(WebCore::RenderSVGResourceFilter::postApplyResource):

  • rendering/svg/RenderSVGResourceMasker.cpp:

(WebCore::RenderSVGResourceMasker::applyResource):
filterData.sourceGraphicBuffer will have to stay around because caching
the filter result has not been implemented yet.

  • rendering/svg/SVGRenderingContext.cpp:

(WebCore::SVGRenderingContext::createImageBuffer):

  • rendering/svg/SVGRenderingContext.h:

Dec 9, 2021:

10:55 PM Changeset in webkit [286834] by Simon Fraser
  • 3 edits in trunk/Source/WebKit

Inspector "composite" events are all very short
https://bugs.webkit.org/show_bug.cgi?id=234114
<rdar://86299391>

Reviewed by Tim Horton.

The kCATransactionPhasePreCommit callbacks fire after painting, but we want the composite
time to include painting so use kCATransactionPhasePreLayout.

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::addCommitHandlers):

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::addCommitHandlers):

10:24 PM Changeset in webkit [286833] by Aditya Keerthi
  • 2 edits in trunk/Source/WebKit

Fix the tvOS and watchOS builds after r286641
https://bugs.webkit.org/show_bug.cgi?id=234124

Unreviewed build fix.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

WKWebView does not conform to the protocol on watchOS/tvOS.

9:42 PM Changeset in webkit [286832] by Ryan Haddad
  • 2 edits in trunk/Source/WebKit

Add ability to inject messages into webpushd
https://bugs.webkit.org/show_bug.cgi?id=233988

Unreviewed attempt to fix some builds.

  • Configurations/webpushtool.xcconfig:
9:05 PM Changeset in webkit [286831] by Wenson Hsieh
  • 9 edits in trunk/Source

Add a new WKWebpagePreferences SPI for modal container observation policies
https://bugs.webkit.org/show_bug.cgi?id=234013
rdar://86219613

Reviewed by Brent Fulgham.

Source/WebCore:

Add a new website policy flag ModalContainerObservationPolicy. Refer to rdar://86219613 for more info.

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::modalContainerObservationPolicy const):
(WebCore::DocumentLoader::setModalContainerObservationPolicy):

Source/WebKit:

Add a new website policy flag ModalContainerObservationPolicy, and expose it as SPI on WKWebpagePreferences.
Refer to rdar://86219613 for additional details.

  • Shared/WebsitePoliciesData.cpp:

(WebKit::WebsitePoliciesData::encode const):
(WebKit::WebsitePoliciesData::decode):
(WebKit::WebsitePoliciesData::applyToDocumentLoader):

  • Shared/WebsitePoliciesData.h:
  • UIProcess/API/APIWebsitePolicies.cpp:

(API::WebsitePolicies::copy const):
(API::WebsitePolicies::data):

  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/Cocoa/WKWebpagePreferences.mm:

(WebKit::modalContainerObservationPolicy):
(WebKit::coreModalContainerObservationPolicy):
(-[WKWebpagePreferences _setModalContainerObservationPolicy:]):
(-[WKWebpagePreferences _modalContainerObservationPolicy]):

  • UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h:
8:48 PM Changeset in webkit [286830] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[Playstation] Fix build break after r286751 with INTELLIGENT_TRACKING_PREVENTION enabled
https://bugs.webkit.org/show_bug.cgi?id=234095

Patch by Jigen Zhou <jigen.zhou@sony.com> on 2021-12-09
Reviewed by Darin Adler.

Added a forward declaration of class ResourceError to NetworkSession.h to resolve
a compiling error. No new test is need since no behavior change is expected.

  • NetworkProcess/NetworkSession.h:
8:46 PM Changeset in webkit [286829] by commit-queue@webkit.org
  • 12 edits
    1 delete in trunk/LayoutTests

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

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-12-09

  • platform/glib/TestExpectations:
  • platform/glib/fast/css/getComputedStyle/computed-style-expected.txt:
  • platform/glib/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/css/cssom-view/cssom-getBoundingClientRect-003-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeOverflow-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeUnderflow-expected.txt:
  • platform/wpe/TestExpectations:
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/reflection-text-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-stretchy-001-expected.txt: Removed.
8:31 PM Changeset in webkit [286828] by Alan Bujtas
  • 2 edits in trunk/Source/WTF

Enable the CSS Contain property by default
https://bugs.webkit.org/show_bug.cgi?id=234020
<rdar://problem/86218835>

Reviewed by Brent Fulgham.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
7:37 PM Changeset in webkit [286827] by cathiechen
  • 4 edits
    2 adds in trunk

Stack-overflow crash in WebCore::RenderBox::computeLogicalHeight()
https://bugs.webkit.org/show_bug.cgi?id=233460

Reviewed by Sergio Villar Senin and Darin Adler.

Source/WebCore:

Like flexibleBox item, deprecatedFlexibleBox item should call clearOverridingContentSize if
it is positioned. Otherwise, RenderReplaced::computeAspectRatioInformationForRenderBox might call
itself recursively.

Test: fast/css/deprecated-flex-box-with-min-content-crashes.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::styleDidChange):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::isDisplayFlexibleOrGridBoxIncludingDeprecated const):
(WebCore::RenderStyle::isDisplayDeprecatedFlexibleBox):

LayoutTests:

  • fast/css/deprecated-flex-box-with-min-content-crashes-expected.txt: Added.
  • fast/css/deprecated-flex-box-with-min-content-crashes.html: Added.
7:16 PM Changeset in webkit [286826] by Robert Jenner
  • 2 edits in branches/safari-612-branch/LayoutTests

REGRESSION(r285452-r285595):[ Monterey Release ] 2 accessibility (layout-tests) are constant text failures
<rdar://problem/86302643>

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
7:08 PM Changeset in webkit [286825] by Devin Rousso
  • 40 edits in trunk/Source

Add a DOMPasteAccessCategory to control which pasteboard the WebProcess is granted access to when pasting
https://bugs.webkit.org/show_bug.cgi?id=233939

Reviewed by Wenson Hsieh.

Implementing -pasteFont: <https://webkit.org/b/191379> requires that we read from the font
pasteboard instead of the general pasteboard. In order to allow web content to trigger this
(e.g. document.execCommand("PasteFont"))) we must have a way for the WebProcess to signal
that it wishes to read from the font pasteboard instead of the general pasteboard. As such,
create and pass along a DOMPasteAccessCategory to requestDOMPasteAccess.

No change in behavior.

Source/WebCore:

  • dom/DOMPasteAccess.h:

Create DOMPasteAccessCategory.

  • page/EditorClient.h:
  • page/Frame.h:
  • page/Frame.cpp:

(WebCore::Frame::requestDOMPasteAccess):

  • loader/EmptyClients.cpp:

(WebCore::EmptyEditorClient::requestDOMPasteAccess):
Pass along the DOMPasteAccessCategory.

Source/WebKit:

  • Scripts/webkit/messages.py:

(headers_for_type):
Indicate which header is associated with DOMPasteAccessCategory.

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

(-[WKDOMPasteMenuDelegate initWithWebViewImpl:pasteAccessCategory:]): Added.
(-[WKDOMPasteMenuDelegate menuDidClose:]):
(-[WKDOMPasteMenuDelegate _web_grantDOMPasteAccess]): Added.
(WebKit::WebViewImpl::handleProcessSwapOrExit):
(WebKit::pasteboardNameForAccessCategory): Added.
(WebKit::pasteboardForAccessCategory): Added.
(WebKit::WebViewImpl::requestDOMPasteAccess):
(WebKit::WebViewImpl::handleDOMPasteRequestForCategoryWithResult):
(WebKit::WebViewImpl::hideDOMPasteMenuWithResult): Added.
(-[WKDOMPasteMenuDelegate initWithWebViewImpl:]): Deleted.
(WebKit::WebViewImpl::handleDOMPasteRequestWithResult): Deleted.

  • UIProcess/API/mac/WKView.mm:

(-[WKView _web_grantDOMPasteAccess]): Deleted.

  • UIProcess/API/mac/WKWebViewMac.mm:

(-[WKWebView _web_grantDOMPasteAccess]): Deleted.
Pass the DOMPasteAccessCategory to the WKDOMPasteMenuDelegate and use it as the target
of the NSMenuItem so that we can pass along the DOMPasteAccessCategory in the action.

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

(pasteboardNameForAccessCategory): Added.
(pasteboardForAccessCategory): Added.
(-[WKContentView _handleDOMPasteRequestWithResult:]):
(-[WKContentView _requestDOMPasteAccessForCategory:elementRect:originIdentifier:completionHandler:]): Added.
(-[WKContentView _requestDOMPasteAccessWithElementRect:originIdentifier:completionHandler:]): Deleted.

  • UIProcess/PageClient.h:
  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::requestDOMPasteAccess):

  • UIProcess/API/wpe/PageClientImpl.h:
  • UIProcess/API/wpe/PageClientImpl.cpp:

(WebKit::PageClientImpl::requestDOMPasteAccess):

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

(WebKit::PageClientImpl::requestDOMPasteAccess):

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

(WebKit::PageClientImpl::requestDOMPasteAccess):

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

(WebKit::PageClientImpl::requestDOMPasteAccess):

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

(WebKit::PageClientImpl::requestDOMPasteAccess):

  • WebProcess/WebCoreSupport/WebEditorClient.h:
  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::requestDOMPasteAccess):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::requestDOMPasteAccess):
Pass along the DOMPasteAccessCategory.

  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::pasteAccessCategoryForCommand): Added.
(WebKit::WebPageProxy::executeEditCommand):
(WebKit::WebPageProxy::requestDOMPasteAccess):
(WebKit::WebPageProxy::willPerformPasteCommand):
(WebKit::isPasteCommandName): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::willPerformPasteCommand):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::willPerformPasteCommand)
Create a mapping between paste command name and DOMPasteAccessCategory.

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebEditorClient.h:

(WebEditorClient::requestDOMPasteAccess):

Source/WebKitLegacy/win:

  • WebCoreSupport/WebEditorClient.h:

(WebEditorClient::requestDOMPasteAccess):

6:38 PM Changeset in webkit [286824] by Said Abou-Hallawa
  • 16 edits in trunk/Source

[GPU Process] [Filters] Add the encoding and decoding for FEImage
https://bugs.webkit.org/show_bug.cgi?id=234099

Reviewed by Wenson Hsieh.

Source/WebCore:

FEImage needs to encode and decode the RenderingResourceIdentifier of the
Image or the ImageBuffer of its SourceImage.

A new type 'RenderingResourceIdentifier' is added to FEImage::SourceImage
variant. This going to be used while transferring the FEImage from
WebProcess to GPUProcess.

Record-using the Image or ImageBuffer of FEImage::SourceImage has to
happen in Recorder::drawFilteredImageBuffer() since this is the place we
can send messages to GPUProcess.

Resolving RenderingResourceIdentifier of FEImage::SourceImage back to an
Image or an ImageBuffer has to happen in RemoteDisplayListRecorder::
drawFilteredImageBuffer before handling the item DrawFilteredImageBuffer.

Because of the two restrictions above we have to provide the virtual
function Filter::effectsOfType() which is overridden by CSSFilter and
SVGFilter.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/displaylists/DisplayListRecorder.cpp:

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

  • platform/graphics/filters/Filter.h:
  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::effectsOfType const):

  • rendering/CSSFilter.h:
  • svg/SVGPreserveAspectRatioValue.cpp:

(WebCore::SVGPreserveAspectRatioValue::SVGPreserveAspectRatioValue):

  • svg/SVGPreserveAspectRatioValue.h:

(WebCore::SVGPreserveAspectRatioValue::encode const):
(WebCore::SVGPreserveAspectRatioValue::decode):

  • svg/graphics/filters/SVGFEImage.cpp:

(WebCore::FEImage::calculateImageRect const):
(WebCore::FEImageSoftwareApplier::apply const):

  • svg/graphics/filters/SVGFEImage.h:

(WebCore::FEImage::encode const):
(WebCore::FEImage::decode):

  • svg/graphics/filters/SVGFilter.cpp:

(WebCore::SVGFilter::effectsOfType const):

  • svg/graphics/filters/SVGFilter.h:

Source/WebKit:

Add the support to encode and decode the FEImage through FilterReference.
The RenderingResourceIdentifier of the Image or the ImageBuffer will be
used while encoding and decoding the FEImage. Resolving the decoded
RenderingResourceIdentifier back to an Image or ImageBuffer will happen
in RemoteDisplayListRecorder::drawFilteredImageBuffer).

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::drawFilteredImageBuffer):

  • Platform/IPC/FilterReference.h:

(IPC::FilterReference::encodeFilterEffect):
(IPC::FilterReference::decodeFilterEffect):

6:16 PM Changeset in webkit [286823] by Aditya Keerthi
  • 10 edits in trunk

[iOS] Add SPI to enable find interactions on WKWebView
https://bugs.webkit.org/show_bug.cgi?id=234017
rdar://86140542

Reviewed by Wenson Hsieh.

Source/WebKit:

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _findInteractionEnabled]):
(-[WKWebView _setFindInteractionEnabled:]):

Make the contentView the searchableObject, rather than self (the WKWebView)
to avoid a retain cycle.

(-[WKWebView _findInteraction]):
(-[WKWebView offsetFromPosition:toPosition:inDocument:]):
(-[WKWebView decorateFoundTextRange:inDocument:usingStyle:]):

  • UIProcess/ios/WKContentViewInteraction.h:

Make WKContentView conform to _UITextSearching so that it can be set as
the interaction's searchableObject.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView decorateFoundTextRange:inDocument:usingStyle:]):
(-[WKContentView offsetFromPosition:toPosition:inDocument:]):
(-[WKContentView decorateFoundTextRange:usingStyle:]): Deleted.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:

(TEST):

Test that the new SPI installs a _UIFindInteraction on the web view.

6:07 PM Changeset in webkit [286822] by Alan Coon
  • 1 copy in tags/Safari-612.4.3

Tag Safari-612.4.3.

5:06 PM Changeset in webkit [286821] by Chris Dumez
  • 172 edits
    4 copies
    4 adds in trunk

Add basic support for launching a SharedWorker
https://bugs.webkit.org/show_bug.cgi?id=233895

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that tests involving Shared Workers are actually running.

  • web-platform-tests/content-security-policy/gen/top.http-rp/script-src-self/sharedworker-classic.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/script-src-self/sharedworker-classic.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/script-src-self/sharedworker-import-data.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/script-src-self/sharedworker-import-data.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/script-src-self/sharedworker-import.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/script-src-self/sharedworker-import.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/script-src-self/sharedworker-module.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/script-src-self/sharedworker-module.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/script-src-wildcard/sharedworker-classic.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/script-src-wildcard/sharedworker-classic.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/script-src-wildcard/sharedworker-import-data.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/script-src-wildcard/sharedworker-import-data.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/script-src-wildcard/sharedworker-import.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/script-src-wildcard/sharedworker-import.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/script-src-wildcard/sharedworker-module.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/script-src-wildcard/sharedworker-module.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-none/sharedworker-classic.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-none/sharedworker-classic.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-none/sharedworker-import-data.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-none/sharedworker-import-data.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-none/sharedworker-import.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-none/sharedworker-import.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-none/sharedworker-module.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-none/sharedworker-module.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-self/sharedworker-classic.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-self/sharedworker-classic.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-self/sharedworker-import-data.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-self/sharedworker-import-data.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-self/sharedworker-import.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-self/sharedworker-import.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-self/sharedworker-module.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-self/sharedworker-module.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-wildcard/sharedworker-classic.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-wildcard/sharedworker-classic.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-wildcard/sharedworker-import-data.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-wildcard/sharedworker-import-data.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-wildcard/sharedworker-import.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-wildcard/sharedworker-import.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-wildcard/sharedworker-module.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.http-rp/worker-src-wildcard/sharedworker-module.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/script-src-self/sharedworker-classic.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/script-src-self/sharedworker-classic.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/script-src-self/sharedworker-import-data.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/script-src-self/sharedworker-import-data.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/script-src-self/sharedworker-import.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/script-src-self/sharedworker-import.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/script-src-self/sharedworker-module.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/script-src-self/sharedworker-module.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/script-src-wildcard/sharedworker-classic.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/script-src-wildcard/sharedworker-classic.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/script-src-wildcard/sharedworker-import-data.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/script-src-wildcard/sharedworker-import-data.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/script-src-wildcard/sharedworker-import.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/script-src-wildcard/sharedworker-import.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/script-src-wildcard/sharedworker-module.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/script-src-wildcard/sharedworker-module.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-none/sharedworker-classic.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-none/sharedworker-classic.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-none/sharedworker-import-data.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-none/sharedworker-import-data.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-none/sharedworker-import.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-none/sharedworker-import.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-none/sharedworker-module.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-none/sharedworker-module.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-self/sharedworker-classic.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-self/sharedworker-classic.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-self/sharedworker-import-data.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-self/sharedworker-import-data.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-self/sharedworker-import.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-self/sharedworker-import.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-self/sharedworker-module.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-self/sharedworker-module.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-wildcard/sharedworker-classic.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-wildcard/sharedworker-classic.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-wildcard/sharedworker-import-data.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-wildcard/sharedworker-import-data.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-wildcard/sharedworker-import.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-wildcard/sharedworker-import.https-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-wildcard/sharedworker-module.http-expected.txt:
  • web-platform-tests/content-security-policy/gen/top.meta/worker-src-wildcard/sharedworker-module.https-expected.txt:
  • web-platform-tests/content-security-policy/inside-worker/sharedworker-connect-src.sub-expected.txt:
  • web-platform-tests/content-security-policy/inside-worker/sharedworker-report-only.sub-expected.txt:
  • web-platform-tests/content-security-policy/inside-worker/sharedworker-script-src.sub-expected.txt:
  • web-platform-tests/content-security-policy/sandbox/shared-worker-sandbox-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_worker.https-expected.txt:
  • web-platform-tests/content-security-policy/script-src/worker-data-set-timeout.sub-expected.txt:
  • web-platform-tests/content-security-policy/script-src/worker-importscripts.sub-expected.txt:
  • web-platform-tests/content-security-policy/script-src/worker-set-timeout.sub-expected.txt:
  • web-platform-tests/fetch/api/cors/data-url-shared-worker-expected.txt:
  • web-platform-tests/fetch/api/request/destination/fetch-destination-worker.https-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-workers.https.window-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-workers.https.window-expected.txt:
  • web-platform-tests/html/browsers/offline/appcache/workers/appcache-worker.https-expected.txt:
  • web-platform-tests/html/browsers/offline/no-appcache-in-shared-workers-historical.https-expected.txt:
  • web-platform-tests/html/cross-origin-embedder-policy/anonymous-iframe/sharedworker-partitioning.tentative.https.window-expected.txt:
  • web-platform-tests/html/cross-origin-embedder-policy/cache-storage-reporting-shared-worker.https-expected.txt:
  • web-platform-tests/html/cross-origin-embedder-policy/cross-origin-isolated-permission.https-expected.txt:
  • web-platform-tests/html/cross-origin-embedder-policy/reporting-subresource-corp.https-expected.txt:
  • web-platform-tests/html/cross-origin-embedder-policy/reporting-to-endpoint.https-expected.txt:
  • web-platform-tests/html/cross-origin-embedder-policy/shared-workers.https-expected.txt:
  • web-platform-tests/html/cross-origin-embedder-policy/worker-inheritance.sub.https-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/evaluation-order-1-nothrow-sharedworker-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/evaluation-order-1-sharedworker-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-1-nothrow-sharedworker-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-1-sharedworker-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-2-import-sharedworker-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-3-dynamic-sharedworker-expected.txt:
  • web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-url-expected.txt:
  • web-platform-tests/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.sharedworker-expected.txt:
  • web-platform-tests/html/webappapis/the-windoworworkerglobalscope-mixin/Worker_Self_Origin-expected.txt:
  • web-platform-tests/service-workers/service-worker/clients-get-client-types.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/worker-interception-redirect.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/worker-interception.https-expected.txt:
  • web-platform-tests/wasm/serialization/module/broadcastchannel-success-and-failure-expected.txt:
  • web-platform-tests/wasm/serialization/module/window-sharedworker-failure-expected.txt:
  • web-platform-tests/webmessaging/broadcastchannel/workers-expected.txt:
  • web-platform-tests/workers/SharedWorkerPerformanceNow-expected.txt:
  • web-platform-tests/workers/SharedWorker_dataUrl-expected.txt:
  • web-platform-tests/workers/abrupt-completion-expected.txt:
  • web-platform-tests/workers/baseurl/alpha/importScripts-in-sharedworker-expected.txt:
  • web-platform-tests/workers/baseurl/alpha/xhr-in-sharedworker-expected.txt:
  • web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/name/getting-expected.txt:
  • web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/name/setting-expected.txt:
  • web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/onconnect-expected.txt:
  • web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-sharedworker-expected.txt:
  • web-platform-tests/workers/modules/shared-worker-import-blob-url.window-expected.txt:
  • web-platform-tests/workers/modules/shared-worker-import-data-url-cross-origin-expected.txt:
  • web-platform-tests/workers/modules/shared-worker-import-data-url.window-expected.txt:
  • web-platform-tests/workers/modules/shared-worker-import-failure-expected.txt:
  • web-platform-tests/workers/modules/shared-worker-import-meta-expected.txt:
  • web-platform-tests/workers/modules/shared-worker-import.window-expected.txt:
  • web-platform-tests/workers/modules/shared-worker-options-credentials-expected.txt:
  • web-platform-tests/workers/modules/shared-worker-options-type-expected.txt:
  • web-platform-tests/workers/modules/shared-worker-parse-error-failure-expected.txt:
  • web-platform-tests/workers/semantics/encodings/002-expected.txt:
  • web-platform-tests/workers/semantics/encodings/004-expected.txt:
  • web-platform-tests/workers/semantics/multiple-workers/001-expected.txt:
  • web-platform-tests/workers/semantics/multiple-workers/004-expected.txt:
  • web-platform-tests/workers/semantics/multiple-workers/008-expected.txt:
  • web-platform-tests/workers/semantics/reporting-errors/001-expected.txt:
  • web-platform-tests/workers/semantics/reporting-errors/002-expected.txt:
  • web-platform-tests/workers/semantics/reporting-errors/003-expected.txt:
  • web-platform-tests/workers/semantics/reporting-errors/004-expected.txt:
  • web-platform-tests/workers/semantics/run-a-worker/002-expected.txt:
  • web-platform-tests/workers/semantics/run-a-worker/003-expected.txt:
  • web-platform-tests/workers/semantics/structured-clone/shared-expected.txt:
  • web-platform-tests/workers/semantics/xhr/003-expected.txt:
  • web-platform-tests/workers/semantics/xhr/004-expected.txt:
  • web-platform-tests/workers/semantics/xhr/006-expected.txt:
  • web-platform-tests/workers/shared-worker-from-blob-url.window-expected.txt:
  • web-platform-tests/workers/shared-worker-name-via-options-expected.txt:
  • web-platform-tests/workers/shared-worker-parse-error-failure-expected.txt:
  • web-platform-tests/xhr/open-url-redirected-sharedworker-origin-expected.txt:

Source/WebCore:

Add basic support for launching a SharedWorker. For now, it mostly behaves as lauching
a dedicated worker (except that the worker has a SharedWorkerGlobalScope). The shared
workers are currently not shared in any way, not even within the same process. This
will need to be implemented in a follow-up.

This patch is based on Alex Christensen's initial patch from Bug 230382.

No new tests, rebaselined existing tests.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • page/SecurityOrigin.h:

(WebCore::SecurityOrigin::canAccessSharedWorkers const):

  • workers/AbstractWorker.cpp:

(WebCore::AbstractWorker::workerFetchOptions):

  • workers/AbstractWorker.h:
  • workers/Worker.cpp:

(WebCore::Worker::create):

  • workers/WorkerOrWorkletScriptController.cpp:

(WebCore::WorkerOrWorkletScriptController::initScript):

  • workers/WorkerThread.cpp:

(WebCore::WorkerParameters::isolatedCopy const):

  • workers/WorkerThreadType.h:
  • workers/shared/SharedWorker.cpp:

(WebCore::SharedWorker::create):
(WebCore::SharedWorker::SharedWorker):
(WebCore::SharedWorker::~SharedWorker):
(WebCore::SharedWorker::scriptExecutionContext const):
(WebCore::SharedWorker::activeDOMObjectName const):
(WebCore::SharedWorker::stop):
(WebCore::SharedWorker::virtualHasPendingActivity const):
(WebCore::SharedWorker::terminate):
(WebCore::SharedWorker::port const): Deleted.

  • workers/shared/SharedWorker.h:
  • workers/shared/SharedWorker.idl:
  • workers/shared/SharedWorkerGlobalScope.cpp:

(WebCore::SharedWorkerGlobalScope::SharedWorkerGlobalScope):
(WebCore::SharedWorkerGlobalScope::close):
(WebCore::SharedWorkerGlobalScope::name const): Deleted.

  • workers/shared/SharedWorkerGlobalScope.h:

(isType):

  • workers/shared/SharedWorkerManager.cpp: Added.

(WebCore::SharedWorkerManager::singleton):
(WebCore::SharedWorkerManager::connect):
(WebCore::SharedWorkerManager::scriptLoadFailed):
(WebCore::SharedWorkerManager::scriptLoadedSuccessfully):

  • workers/shared/SharedWorkerManager.h: Copied from Source/WebCore/workers/shared/SharedWorker.h.
  • workers/shared/SharedWorkerProxy.cpp: Added.

(WebCore::SharedWorkerProxy::SharedWorkerProxy):
(WebCore::SharedWorkerProxy::startWorkerGlobalScope):
(WebCore::SharedWorkerProxy::terminateWorkerGlobalScope):
(WebCore::SharedWorkerProxy::postMessageToWorkerGlobalScope):
(WebCore::SharedWorkerProxy::postTaskToWorkerGlobalScope):
(WebCore::SharedWorkerProxy::hasPendingActivity const):
(WebCore::SharedWorkerProxy::workerObjectDestroyed):
(WebCore::SharedWorkerProxy::notifyNetworkStateChange):
(WebCore::SharedWorkerProxy::suspendForBackForwardCache):
(WebCore::SharedWorkerProxy::resumeForBackForwardCache):
(WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
(WebCore::SharedWorkerProxy::workerGlobalScopeDestroyed):
(WebCore::SharedWorkerProxy::postMessageToWorkerObject):
(WebCore::SharedWorkerProxy::confirmMessageFromWorkerObject):
(WebCore::SharedWorkerProxy::reportPendingActivity):
(WebCore::SharedWorkerProxy::createCacheStorageConnection):
(WebCore::SharedWorkerProxy::createRTCDataChannelRemoteHandlerConnection):
(WebCore::SharedWorkerProxy::postTaskToLoader):
(WebCore::SharedWorkerProxy::postTaskForModeToWorkerOrWorkletGlobalScope):
(WebCore::SharedWorkerProxy::postMessageToDebugger):
(WebCore::SharedWorkerProxy::setResourceCachingDisabledByWebInspector):
(WebCore::SharedWorkerProxy::workerGlobalScopeDestroyedInternal):

  • workers/shared/SharedWorkerProxy.h: Added.

(WebCore::SharedWorkerProxy::create):
(WebCore::SharedWorkerProxy::thread):

  • workers/shared/SharedWorkerScriptLoader.cpp: Added.

(WebCore::SharedWorkerScriptLoader::SharedWorkerScriptLoader):
(WebCore::SharedWorkerScriptLoader::didReceiveResponse):
(WebCore::SharedWorkerScriptLoader::notifyFinished):

  • workers/shared/SharedWorkerScriptLoader.h: Copied from Source/WebCore/workers/shared/SharedWorker.h.

(WebCore::SharedWorkerScriptLoader::identifier const):
(WebCore::SharedWorkerScriptLoader::url const):
(WebCore::SharedWorkerScriptLoader::worker):
(WebCore::SharedWorkerScriptLoader::options):

  • workers/shared/SharedWorkerThread.cpp: Copied from Source/WebCore/workers/shared/SharedWorkerGlobalScope.cpp.

(WebCore::SharedWorkerThread::SharedWorkerThread):
(WebCore::SharedWorkerThread::createWorkerGlobalScope):

  • workers/shared/SharedWorkerThread.h: Copied from Source/WebCore/workers/shared/SharedWorker.h.

(WebCore::SharedWorkerThread::create):

  • xml/XMLHttpRequest.idl:

LayoutTests:

Update test expectations now that tests involving Shared Workers are actually running.

5:02 PM Changeset in webkit [286820] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Stop using the last-bidi value for opaque inline items
https://bugs.webkit.org/show_bug.cgi?id=234043

Reviewed by Antti Koivisto.

Now that we only need to guess the bidi level for empty inline boxes, let's stop applying the "keep tracking
the last bidi level from the end" logic. It may work for non-empty inline boxes (when the last bidi value
comes from an actual content run), but it is somewhat incorrect for empty inline boxes.

e.g. <span id=visually-second>&#8238;END OF CONTENT</span><span id=visually-first></span>

The "visually-first" inline box's "guessed" bidi level comes from the root direction (since it's the very list run)
making it LTR while the RTL override character (&#8238;) makes it RTL. It produces incorrect visual ordering for
these inline boxes.

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::InlineItemsBuilder::breakAndComputeBidiLevels):

4:58 PM Changeset in webkit [286819] by Alan Coon
  • 1 copy in tags/Safari-612.4.2.1.2

Tag Safari-612.4.2.1.2.

4:47 PM Changeset in webkit [286818] by Ryan Haddad
  • 2 edits in trunk/Source/WTF

Unreviewed, reverting r286804.

Breaks internal builds.

Reverted changeset:

"Reduce maximum mmap size for Structure regions to help
placate ios"
https://bugs.webkit.org/show_bug.cgi?id=234091
https://commits.webkit.org/r286804

4:30 PM Changeset in webkit [286817] by Lauro Moura
  • 3 edits in trunk/Tools

[webkitpy] Make check-webkit-style check WebDriverTests/TestExpectations.json
https://bugs.webkit.org/show_bug.cgi?id=213453

Reviewed by Adrian Perez de Castro.

While the WebDriver tests are imported and mostly ignored by
check-webkit-style, the script must check TestExpectations.json
to avoid commiting invalid json data and breaking the bots.

  • Scripts/webkitpy/style/checker.py:
  • Scripts/webkitpy/style/checker_unittest.py:

(CheckerDispatcherSkipTest._assert_should_skip_without_warning): Pass
a valid error handler so the JSONChecker can be instantiated.
(CheckerDispatcherSkipTest.test_should_skip_without_warningfalse):

4:25 PM Changeset in webkit [286816] by achristensen@apple.com
  • 75 edits in trunk

Prepare for transition to C++20
https://bugs.webkit.org/show_bug.cgi?id=234022

Reviewed by Yusuke Suzuki.

Source/bmalloc:

  • bmalloc/List.h:

(bmalloc::List::iterator::operator!= const):
(bmalloc::List::iterator::operator!=): Deleted.

Source/JavaScriptCore:

  • bytecode/SuperSampler.cpp:
  • bytecode/SuperSampler.h:
  • heap/GCSegmentedArray.h:

(JSC::GCSegmentedArrayIterator::operator== const):
(JSC::GCSegmentedArrayIterator::operator!= const):
(JSC::GCSegmentedArrayIterator::operator==): Deleted.
(JSC::GCSegmentedArrayIterator::operator!=): Deleted.

  • jit/RegisterSet.h:

(JSC::RegisterSet::iterator::operator== const):
(JSC::RegisterSet::iterator::operator!= const):
(JSC::RegisterSet::iterator::operator==): Deleted.
(JSC::RegisterSet::iterator::operator!=): Deleted.

  • parser/Parser.h:

(JSC::ScopeRef::operator== const):
(JSC::ScopeRef::operator!= const):
(JSC::ScopeRef::operator==): Deleted.
(JSC::ScopeRef::operator!=): Deleted.

  • parser/ParserTokens.h:
  • runtime/GenericOffset.h:

(JSC::GenericOffset::operator== const):
(JSC::GenericOffset::operator!= const):
(JSC::GenericOffset::operator< const):
(JSC::GenericOffset::operator> const):
(JSC::GenericOffset::operator<= const):
(JSC::GenericOffset::operator>= const):

  • runtime/PropertyTable.h:

Source/ThirdParty/libwebrtc:

  • Source/webrtc/common_audio/wav_header.cc:
  • Source/webrtc/modules/audio_processing/include/aec_dump.cc:
  • Source/webrtc/modules/audio_processing/include/aec_dump.h:
  • Source/webrtc/modules/audio_processing/utility/delay_estimator_wrapper.cc:
  • Source/webrtc/modules/audio_processing/vad/vad_audio_proc.h:
  • Source/webrtc/modules/video_coding/media_opt_util.h:
  • Source/webrtc/rtc_base/race_checker.h:
  • Source/webrtc/rtc_base/units/unit_base.h:

(webrtc::rtc_units_impl::UnitBase::operator== const):
(webrtc::rtc_units_impl::UnitBase::operator!= const):
(webrtc::rtc_units_impl::UnitBase::operator<= const):
(webrtc::rtc_units_impl::UnitBase::operator>= const):
(webrtc::rtc_units_impl::UnitBase::operator> const):
(webrtc::rtc_units_impl::UnitBase::operator< const):

Source/WebCore:

  • contentextensions/ContentExtensionActions.h:

(WebCore::ContentExtensions::ActionWithoutMetadata::operator== const):
(WebCore::ContentExtensions::ActionWithStringMetadata::operator== const):

  • contentextensions/ImmutableNFANodeBuilder.h:

(WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::operator== const):
(WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::operator!= const):
(WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::operator==): Deleted.
(WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::operator!=): Deleted.

  • loader/cache/CachedResourceHandle.h:

(WebCore::CachedResourceHandle::operator== const):

  • page/mac/ImageOverlayControllerMac.mm:

(WebCore::ImageOverlayController::updateDataDetectorHighlights):

  • page/mac/ServicesOverlayController.mm:

(WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
(WebCore::ServicesOverlayController::buildSelectionHighlight):

  • platform/audio/cocoa/AudioDestinationCocoa.cpp:

(WebCore::AudioDestinationCocoa::getAudioStreamBasicDescription):

  • platform/audio/cocoa/AudioFileReaderCocoa.cpp:

(WebCore::AudioFileReader::clientDataFormat const):

  • platform/audio/cocoa/CAAudioStreamDescription.cpp:

(WebCore::CAAudioStreamDescription::CAAudioStreamDescription):

  • platform/audio/cocoa/CAAudioStreamDescription.h:
  • platform/audio/ios/AudioOutputUnitAdaptorIOS.cpp:

(WebCore::AudioOutputUnitAdaptor::configure):

  • platform/audio/mac/AudioOutputUnitAdaptorMac.cpp:

(WebCore::AudioOutputUnitAdaptor::configure):

  • platform/graphics/DisplayRefreshMonitorManager.cpp:

(WebCore::DisplayRefreshMonitorManager::ensureMonitorForDisplayID):

  • platform/graphics/DisplayRefreshMonitorManager.h:
  • platform/graphics/FontSelectionAlgorithm.h:
  • platform/graphics/GraphicsContext.cpp:

(WebCore::TextBoxIterator::operator== const):
(WebCore::TextBoxIterator::operator!= const):
(WebCore::TextBoxIterator::operator==): Deleted.
(WebCore::TextBoxIterator::operator!=): Deleted.

  • platform/graphics/PixelBufferConversion.cpp:

(WebCore::makeVImageCGImageFormat):

  • platform/graphics/cg/GraphicsContextGLCG.cpp:

(WebCore::GraphicsContextGLImageExtractor::extractImage):

  • platform/graphics/cg/ImageBufferCGBackend.cpp:

(WebCore::createBitmapImageAfterScalingIfNeeded):
(WebCore::ImageBufferCGBackend::copyCGImageForEncoding const):

  • platform/graphics/cg/ImageBufferCGBitmapBackend.cpp:

(WebCore::ImageBufferCGBitmapBackend::create):
(WebCore::ImageBufferCGBitmapBackend::copyNativeImage const):

  • platform/graphics/cg/ImageBufferUtilitiesCG.cpp:

(WebCore::encode):

  • platform/graphics/cg/NativeImageCG.cpp:

(WebCore::NativeImage::singlePixelSolidColor const):

  • platform/graphics/cocoa/IOSurface.mm:

(WebCore::IOSurface::ensurePlatformContext):

  • platform/graphics/cv/PixelBufferConformerCV.cpp:

(WebCore::PixelBufferConformerCV::createImageFromPixelBuffer):

  • platform/graphics/displaylists/DisplayListIterator.h:

(WebCore::DisplayList::DisplayList::Iterator::operator== const):
(WebCore::DisplayList::DisplayList::Iterator::operator!= const):
(WebCore::DisplayList::DisplayList::Iterator::operator==): Deleted.
(WebCore::DisplayList::DisplayList::Iterator::operator!=): Deleted.

  • platform/graphics/filters/FEComponentTransfer.h:
  • platform/graphics/transforms/Matrix3DTransformOperation.h:
  • platform/graphics/transforms/MatrixTransformOperation.h:
  • platform/graphics/transforms/PerspectiveTransformOperation.h:
  • platform/graphics/transforms/RotateTransformOperation.h:
  • platform/graphics/transforms/ScaleTransformOperation.h:
  • platform/graphics/transforms/SkewTransformOperation.h:
  • platform/graphics/transforms/TranslateTransformOperation.h:
  • platform/network/mac/ResourceErrorMac.mm:

(WebCore::ResourceError::mapPlatformError):

  • rendering/GapRects.h:

(WebCore::GapRects::operator== const):
(WebCore::GapRects::operator!= const):
(WebCore::GapRects::operator==): Deleted.
(WebCore::GapRects::operator!=): Deleted.

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::setShouldMockBoldSystemFontForAccessibility):

Source/WebKit:

  • Shared/mac/MediaFormatReader/MediaFormatReader.cpp:

(WebKit::MediaFormatReader::didParseTracks):

  • Shared/mac/MediaFormatReader/MediaSampleCursor.cpp:

(WebKit::MediaSampleCursor::getSampleMap const):

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _setRequiresPageVisibilityToPlayAudio:]):

  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:

(-[_WKWebsiteDataStoreConfiguration setRequiresSecureHTTPSProxyConnection:]):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:

(WebKit::WebsiteDataStoreConfiguration::setRequiresSecureHTTPSProxyConnection):

Source/WTF:

In C++20, volitile is deprecated, operator== is stricter (related to the introduction of operator <=>),
and operations on enums of different types are stricter too. This does the changes we can do before
the transition, which will be done in bug 233963.

  • wtf/DateMath.h:

(WTF::LocalTimeOffset::operator== const):
(WTF::LocalTimeOffset::operator!= const):
(WTF::LocalTimeOffset::operator==): Deleted.
(WTF::LocalTimeOffset::operator!=): Deleted.

  • wtf/FastBitVector.h:

(WTF::FastBitVectorImpl::operator== const):
(WTF::FastBitVectorImpl::operator!= const):

  • wtf/GenericTimeMixin.h:

(WTF::GenericTimeMixin::operator== const):
(WTF::GenericTimeMixin::operator!= const):
(WTF::GenericTimeMixin::operator< const):
(WTF::GenericTimeMixin::operator> const):
(WTF::GenericTimeMixin::operator<= const):
(WTF::GenericTimeMixin::operator>= const):

  • wtf/IteratorAdaptors.h:

(WTF::FilterIterator::operator== const):
(WTF::FilterIterator::operator!= const):
(WTF::TransformIterator::operator== const):
(WTF::TransformIterator::operator!= const):

  • wtf/Liveness.h:

(WTF::Liveness::LocalCalc::Iterable::iterator::operator== const):
(WTF::Liveness::LocalCalc::Iterable::iterator::operator!= const):
(WTF::Liveness::LocalCalc::Iterable::iterator::operator==): Deleted.
(WTF::Liveness::LocalCalc::Iterable::iterator::operator!=): Deleted.

Tools:

  • DumpRenderTree/cg/PixelDumpSupportCG.cpp:

(createBitmapContext):

  • TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewSnapshot.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitLegacy/ios/SnapshotViaRenderInContext.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/cocoa/TestPDFDocument.mm:

(TestWebKitAPI::TestPDFPage::colorAtPoint const):

  • WebKitTestRunner/cg/TestInvocationCG.cpp:

(WTR::createCGContextFromCGImage):

4:23 PM Changeset in webkit [286815] by achristensen@apple.com
  • 24 edits in trunk/Source

Use Span for IPC::ArrayReference and DataReference
https://bugs.webkit.org/show_bug.cgi?id=233931

Reviewed by Wenson Hsieh.

Source/WebKit:

No change in behavior, just simplifying some code.

  • Platform/IPC/ArgumentCoders.h:
  • Platform/IPC/ArrayReference.h:

(): Deleted.
(IPC::ArrayReference::ArrayReference): Deleted.
(IPC::ArrayReference::isEmpty const): Deleted.
(IPC::ArrayReference::size const): Deleted.
(IPC::ArrayReference::data const): Deleted.
(IPC::ArrayReference::vector const): Deleted.

  • Platform/IPC/DataReference.h:
  • Platform/IPC/SharedBufferDataReference.cpp:

(IPC::SharedBufferDataReference::encode const):

  • Shared/API/APIData.cpp:

(API::Data::create):

  • Shared/Cocoa/SandboxExtensionCocoa.mm:

(WebKit::SandboxExtension::Handle::decode):

  • Shared/UserData.cpp:

(WebKit::UserData::decode):

  • Shared/cf/ArgumentCodersCF.cpp:

(IPC::ArgumentCoder<RetainPtr<CFURLRef>>::decode):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView createPDFWithConfiguration:completionHandler:]):

  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::createData):

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::registerWebProcessAccessibilityToken):

  • UIProcess/UserContent/WebUserContentControllerProxy.cpp:

(WebKit::WebUserContentControllerProxy::didPostMessage):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadSimulatedRequest):
(WebKit::WebPageProxy::runJavaScriptInFrameInScriptWorld):
(WebKit::WebPageProxy::wrapCryptoKey):
(WebKit::WebPageProxy::unwrapCryptoKey):

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _wk_pageCountForPrintFormatter:]):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:

(WebKit::RemoteGraphicsContextGLProxy::getShaderPrecisionFormat):

  • WebProcess/Network/WebSocketChannel.cpp:

(WebKit::WebSocketChannel::didReceiveBinaryData):

  • WebProcess/Network/webrtc/RTCDataChannelRemoteManager.cpp:

(WebKit::RTCDataChannelRemoteManager::receiveData):

  • WebProcess/UserContent/WebUserContentController.cpp:
  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::replaceSelectionWithPasteboardData):

Source/WTF:

  • wtf/Vector.h:

(WTF::Vector::Vector):
(WTF::Vector::span const):

4:21 PM Changeset in webkit [286814] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

An <input> that's been autofilled with obscured content should still be editable
https://bugs.webkit.org/show_bug.cgi?id=234046
<rdar://problem/86226960>

Reviewed by Wenson Hsieh.

It should be possible to delete the value in the <input> even if it's been obscured.

  • css/html.css:

(input:-webkit-autofill-and-obscured):

3:56 PM Changeset in webkit [286813] by Robert Jenner
  • 56 edits
    18 deletes in trunk

Unreviewed, reverting r286754.

Broke 2 tests on all mac an iOS

Reverted changeset:

"Add an experimental trackConfiguration accessor on AudioTrack
& VideoTrack."
https://bugs.webkit.org/show_bug.cgi?id=230841
https://commits.webkit.org/r286754

3:25 PM Changeset in webkit [286812] by Megan Gardner
  • 13 edits in trunk/Source

Markup Pane not displaying.
https://bugs.webkit.org/show_bug.cgi?id=234089

Reviewed by Tim Horton.

Source/WebCore:

Vend the image location so that the Markup Pane knows where to
present from.

  • dom/mac/ImageControlsMac.cpp:

(WebCore::ImageControlsMac::handleEvent):

  • page/ChromeClient.h:

(WebCore::ChromeClient::handleImageServiceClick):

Source/WebKit:

An optional method on NSSharingServiceDelegate was not implemented, meaning
that the markup pane did not know where to present, and would assert and fail to
show up. Make sure this is implemented for the image controls menu and also
give it the correct location to present form.

  • Shared/ContextMenuContextData.cpp:

(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::encode const):
(WebKit::ContextMenuContextData::decode):

  • Shared/ContextMenuContextData.h:

(WebKit::ContextMenuContextData::controlledImageFrame const):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):

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

(-[WKSharingServicePickerDelegate setSourceFrame:]):
(-[WKSharingServicePickerDelegate sharingService:sourceFrameOnScreenForShareItem:]):

  • UIProcess/mac/WebContextMenuProxyMac.mm:

(WebKit::WebContextMenuProxyMac::setupServicesMenu):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::handleImageServiceClick):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::handleImageServiceClick):

3:20 PM Changeset in webkit [286811] by Tyler Wilcock
  • 2 edits in trunk/Source/WebCore

AX: Improve ASSERT while processing tree appends in AXIsolatedTree::applyPendingChanges
https://bugs.webkit.org/show_bug.cgi?id=234085

Reviewed by Chris Fleizach.

When processing m_pendingAppends in AXIsolatedTree::applyPendingChanges,
we ASSERT to verify the refcount is what we expect:

ASSERT_UNUSED(addResult, addResult.iterator->value->refCount() == 2

(addResult.iterator->value.ptr() == m_rootNode.get() && m_rootNode->refCount() == 3));

But this doesn't include the actual refcount in the ASSERT message,
making it harder to debug.

This patch uses ASSERT_WITH_MESSAGE to display the actual refcount.

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::applyPendingChanges):

3:19 PM Changeset in webkit [286810] by Alan Coon
  • 2 edits in branches/safari-612.4.2.1-branch/Source/WebKit

Cherry-pick r286805. rdar://problem/86291413

Momentum Generator: Scroll tail hiccup only when scrolling up on 60Hz displays
https://bugs.webkit.org/show_bug.cgi?id=234104
<rdar://problem/86291413>

Reviewed by Simon Fraser.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::equalizeTailGaps): Sort in the correct direction based on the sign of the first delta...

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

3:19 PM Changeset in webkit [286809] by Russell Epstein
  • 1 copy in tags/Safari-613.1.11

Tag Safari-613.1.11.

3:17 PM Changeset in webkit [286808] by Alan Coon
  • 8 edits in branches/safari-612.4.2.1-branch/Source

Versioning.

WebKit-7612.4.2.1.2

3:11 PM Changeset in webkit [286807] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Stop including inline box start/end inline items in the visual reordering unless they are completely empty
https://bugs.webkit.org/show_bug.cgi?id=234035

Reviewed by Antti Koivisto.

When the visual order == logical order, we use the inline box start/end markers to
construct/finalize the inline box type of display boxes.
e.g <span>content</span> when we see the "<span>" run, we construct the inline box type of display box
and later when we come across the "</span>" run, we finalize its geometry.
Now with visual reordering, those explicit markers may be out of order. In such cases (bidi in general) we
switch over to relying solely on the content type of runs to create/finalize the required inline box type of display boxes (see InlineDisplayContentBuilder::ensureDisplayBoxForContainer).

This implicit way of constructing the inline box type of display boxes allows us to include only the minimum set of inline
items for visual reordering:
<span><span><span>content</span></span></span>
should produce only one entry for visual reordering.
It is essential to minimize the "noise" to limit the potential confusion introduced by non-content bidi runs (with their guessed levels).

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::InlineItemsBuilder::breakAndComputeBidiLevels): Reserve the guess bidi level for empty inline boxes only.

3:10 PM Changeset in webkit [286806] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r286805. rdar://problem/86291413

Momentum Generator: Scroll tail hiccup only when scrolling up on 60Hz displays
https://bugs.webkit.org/show_bug.cgi?id=234104
<rdar://problem/86291413>

Reviewed by Simon Fraser.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::equalizeTailGaps): Sort in the correct direction based on the sign of the first delta...

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

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

Momentum Generator: Scroll tail hiccup only when scrolling up on 60Hz displays
https://bugs.webkit.org/show_bug.cgi?id=234104
<rdar://problem/86291413>

Reviewed by Simon Fraser.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp:

(WebKit::MomentumEventDispatcher::equalizeTailGaps):
Sort in the correct direction based on the sign of the first delta...

2:56 PM Changeset in webkit [286804] by keith_miller@apple.com
  • 2 edits in trunk/Source/WTF

Reduce maximum mmap size for Structure regions to help placate ios
https://bugs.webkit.org/show_bug.cgi?id=234091

Reviewed by Saam Barati.

Use mach_vm_map since that supports memory alignement so we don't have to map 2x desired address space then free then trim.

  • wtf/PlatformHave.h:
  • wtf/posix/OSAllocatorPOSIX.cpp:

(WTF::OSAllocator::reserveUncommittedAligned):

2:47 PM Changeset in webkit [286803] by Brent Fulgham
  • 10 edits in trunk

Unprefix CSS value text-align: -webkit-match-parent
https://bugs.webkit.org/show_bug.cgi?id=229496
<rdar://problem/82628618>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline to show new passing tests.

  • web-platform-tests/css/css-text/parsing/text-align-computed-expected.txt:
  • web-platform-tests/css/css-text/parsing/text-align-valid-expected.txt:

Source/WebCore:

Tested by web-platform-tests: css/css-text/parsing/text-align-computed.html,

css/css-text/parsing/text-align-valid.html

SSIA.

  • css/CSSProperties.json: Add the unprefixed version.
  • css/CSSValueKeywords.in: Ditto.
  • css/html.css:

(li): Use the unprefixed version.

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertTextAlign): Handle the new unprefixed version.

Source/WebInspectorUI:

  • UserInterface/Models/CSSKeywordCompletions.js: Add 'match-parent'
1:49 PM Changeset in webkit [286802] by sbarati@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Procedure::setNeedsPCToOriginMap should call Code::forcePreservationOfB3Origins
https://bugs.webkit.org/show_bug.cgi?id=234093

Reviewed by Yusuke Suzuki.

We need to do this to ensure the sampling profiler works in FTL.
The reason this was sometimes working was Air::Code's constructor
was looking at Procedure's m_needsPCToOriginMap before it was initialized,
in its constructor. This is because Procedure was constructing Code
before all its fields were initialized. This patch fixes that bug to
construct Code after Procedure has all its fields initialized.

  • b3/B3Procedure.cpp:

(JSC::B3::Procedure::Procedure):
(JSC::B3::Procedure::setNeedsPCToOriginMap):

  • b3/B3Procedure.h:

(JSC::B3::Procedure::setNeedsPCToOriginMap): Deleted.

1:28 PM Changeset in webkit [286801] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Try not to include non-content type of inline boxes in the visual reordering
https://bugs.webkit.org/show_bug.cgi?id=234033

Reviewed by Antti Koivisto.

In InlineItemsBuilder::setBidiLevelForOpaqueInlineItems we try to figure out the bidi
level for inline box markers (<span> and </span>) mostly to be able to position
empty inline boxes (specifically with decorations). In some cases though the guessed
bidi level breaks the continuation between the content before and after the marker (e.g. before</span>after)
In this patch we try to limit the number of items associated with this guessed bidi level.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

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

  • layout/formattingContexts/inline/InlineItem.h:
  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::InlineItemsBuilder::breakAndComputeBidiLevels):

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::layoutInlineContent): we may only submit a subset of runs to the reordering
algorithm. It also means we may end up with gaps between the visual index values and the real run item indexes.
The runIndexOffsetMap ensures that the indexes are always consistent with the content in the lineRuns vector.

1:18 PM WebKitGTK/2.34.x edited by Adrian Perez de Castro
(diff)
1:14 PM Changeset in webkit [286800] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

[WPE] Crash under WebProcessProxy::setIsInProcessCache when closing web view in debug builds
https://bugs.webkit.org/show_bug.cgi?id=233933

Reviewed by Geoffrey Garen.

The crash would occur because the WebProcessPool destructor would call WebProcessCache::clear()
which would destroy WebProcessCache::CachedProcess objects, causing
WebProcessProxy::setIsInProcessCache(false) to get called. Previously, this call to
setIsInProcessCache() would convert the WeakPtr the WebProcessProxy held to its process pool
into a RefPtr, thus causing the WebProcessPool to get ref'd while in the middle of destruction.

To address the issue, the setIsInProcessCache() setter now takes a WillShutDown flag that gets
set in the CachedProcess destructor and which causes setIsInProcessCache() to return early
right after setting the m_isInProcessCache flag, without trying to send IPC to the WebProcess
or trying to ref the WebProcessPool.

  • UIProcess/WebProcessCache.cpp:

(WebKit::WebProcessCache::CachedProcess::~CachedProcess):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::setIsInProcessCache):

  • UIProcess/WebProcessProxy.h:
12:55 PM Changeset in webkit [286799] by BJ Burg
  • 25 edits in trunk

[Cocoa] Web Inspector: provide a way for _WKInspectorExtension clients to be to notified when an extension tab navigates
https://bugs.webkit.org/show_bug.cgi?id=233935
<rdar://86123899>

Reviewed by Patrick Angle.

Source/WebCore:

Add new InspectorFrontendHost hooks to notify the client about didNavigateExtensionTab().

  • inspector/InspectorFrontendClient.h:

(WebCore::InspectorFrontendClient::didNavigateExtensionTab):

  • inspector/InspectorFrontendHost.cpp:

(WebCore::InspectorFrontendHost::didNavigateExtensionTab):

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

Source/WebInspectorUI:

In order instrument all loads inside the extension iframe, we cannot rely on the <iframe src> attribute
to query the currently loaded page, or to change the current page. Use a helper method to query and set
the iframe location indirectly using document.location.

  • UserInterface/Protocol/InspectorFrontendAPI.js:
  • UserInterface/Controllers/WebInspectorExtensionController.js:

(WI.WebInspectorExtensionController.prototype.createTabForExtension):
(WI.WebInspectorExtensionController.prototype.showExtensionTab):
Standardize on returning {"result": value} from these methods.

  • UserInterface/Views/WebInspectorExtensionTabContentView.js:

(WI.WebInspectorExtensionTabContentView):
(WI.WebInspectorExtensionTabContentView.prototype.whenPageAvailable): Added.
(WI.WebInspectorExtensionTabContentView.prototype._extensionFrameDidLoad):
Trigger a load of the actual requested page by evaluating document.location.href = <url>
in the context of the extension tab iframe. Notify clients when this non-initial load completes.

(WI.WebInspectorExtensionTabContentView.prototype.async _maybeDispatchDidNavigateExtensionTab):
Dispatch didNavigateExtensionTab with the new URL when the extension tab iframe completes a load.
Don't notify the client if the extension tab has not yet loaded.

Source/WebKit:

Add plumbing to notify clients when an extension tab loads. This is implemented similarly to
-inspectorExtension:didShowExtensionTab: and -inspectorExtension:didHideExtensionTab:.

  • UIProcess/API/APIInspectorExtensionClient.h:

(API::InspectorExtensionClient::didNavigateExtensionTab):

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

(WebKit::InspectorExtensionDelegate::InspectorExtensionDelegate):
(WebKit::InspectorExtensionDelegate::InspectorExtensionClient::didNavigateExtensionTab):

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

(WebKit::WebInspectorUIExtensionControllerProxy::didNavigateExtensionTab):

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

(WebKit::RemoteWebInspectorUI::didNavigateExtensionTab):

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

(WebKit::WebInspectorUI::didHideExtensionTab):
(WebKit::WebInspectorUI::didNavigateExtensionTab):

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

(WebKit::WebInspectorUIExtensionController::createTabForExtension):
Standardize on returning {result: value} for showExtensionTab.

(WebKit::WebInspectorUIExtensionController::showExtensionTab):
Standardize on returning {result: value} for showExtensionTab.
Also, there's no need to inspect the result value if it's not an error.

(WebKit::WebInspectorUIExtensionController::didNavigateExtensionTab):
Add plumbing.

Tools:

Add API test coverage for -inspectorExtension:didNavigateTabWithIdentifier:newURL:

  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm:

(TEST):
Drive-by, fix an outdated completion handler type signature.

  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionDelegate.mm:

(-[InspectorExtensionDelegateForTesting inspectorExtension:didNavigateTabWithIdentifier:newURL:]):
(TEST):
Add a test case which exercises the new delegate method.

12:35 PM Changeset in webkit [286798] by Lauro Moura
  • 2 edits in trunk

Adds Lauro Moura's GitHub username to constributors.json

Unreviewed.

  • metadata/contributors.json:
12:35 PM Changeset in webkit [286797] by Lauro Moura
  • 2 edits in trunk/Tools

[WebXR][WPE] Build fails without openxr installed
https://bugs.webkit.org/show_bug.cgi?id=220250

Reviewed by Adrian Perez de Castro.

Based on original patch by Yury Semikhatsky. Rebased and installed
only for WPE, as GTK's module set does not declare openxr.

  • wpe/dependencies/apt: Install libxcb-glx0-dev
12:25 PM Changeset in webkit [286796] by Said Abou-Hallawa
  • 15 edits in trunk/Source/WebCore

[GPU Process] [Filters] Add the encoding and decoding for LightSource
https://bugs.webkit.org/show_bug.cgi?id=234086

Reviewed by Wenson Hsieh.

This will allow encoding and decoding FEDiffuseLighting and FESpecularLighting.

The create() and the constructor of the LightSource super classes have
to be non-inline to overcome a "missing vtable" linking issue.

New constructors are added to FEDiffuseLighting and FESpecularLighting
to allow creating these super classes from the combined data members of
FELighting.

m_bufferPosition of PointLightSource and SpotLightSource are used to cache
the absolute value of m_userSpacePosition relative to the result FilterImage.
So it does not need to be encoded/decoded since it is initialized by
FELightingSoftwareApplier.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/filters/DistantLightSource.cpp:

(WebCore::DistantLightSource::create):
(WebCore::DistantLightSource::DistantLightSource):

  • platform/graphics/filters/DistantLightSource.h:

(WebCore::DistantLightSource::encode const):
(WebCore::DistantLightSource::decode):
(WebCore::DistantLightSource::create): Deleted.
(WebCore::DistantLightSource::DistantLightSource): Deleted.

  • platform/graphics/filters/FEDiffuseLighting.cpp:

(WebCore::FEDiffuseLighting::create):

  • platform/graphics/filters/FEDiffuseLighting.h:
  • platform/graphics/filters/FELighting.h:

(WebCore::FELighting::encode const):
(WebCore::FELighting::decode):

  • platform/graphics/filters/FESpecularLighting.cpp:

(WebCore::FESpecularLighting::create):

  • platform/graphics/filters/FESpecularLighting.h:
  • platform/graphics/filters/LightSource.h:
  • platform/graphics/filters/PointLightSource.cpp:

(WebCore::PointLightSource::create):
(WebCore::PointLightSource::PointLightSource):

  • platform/graphics/filters/PointLightSource.h:

(WebCore::PointLightSource::encode const):
(WebCore::PointLightSource::decode):
(WebCore::PointLightSource::create): Deleted.
(WebCore::PointLightSource::PointLightSource): Deleted.

  • platform/graphics/filters/SpotLightSource.cpp:

(WebCore::SpotLightSource::create):
(WebCore::SpotLightSource::SpotLightSource):

  • platform/graphics/filters/SpotLightSource.h:

(WebCore::SpotLightSource::encode const):
(WebCore::SpotLightSource::decode):
(WebCore::SpotLightSource::create): Deleted.
(WebCore::SpotLightSource::SpotLightSource): Deleted.

12:22 PM Changeset in webkit [286795] by commit-queue@webkit.org
  • 94 edits
    15 copies
    12 adds in trunk

Unprefix -webkit-mask
https://bugs.webkit.org/show_bug.cgi?id=229082

Patch by Matt Woodrow <matt.woodrow@gmail.com> on 2021-12-09
Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-masking/animations/mask-image-interpolation-expected.txt:
  • web-platform-tests/css/css-masking/animations/mask-position-interpolation-expected.txt:
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-expected.html:
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-filter-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-expected.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-filter.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-incompatible-shapes1-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-expected.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-incompatible-shapes1.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-incompatible-shapes2-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-expected.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-incompatible-shapes2.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-overflow-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-overflow.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-three-keyframes1-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-expected.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-three-keyframes1.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-three-keyframes2-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-expected.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-three-keyframes2.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation.html:
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-transition-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-expected.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-transition.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation.html.
  • web-platform-tests/css/css-masking/clip-path/animations/w3c-import.log:
  • web-platform-tests/css/css-masking/clip-path/clip-path-columns-shape-002.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-descendant-text-mutated-001.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-element-userSpaceOnUse-001.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-element-userSpaceOnUse-002.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-element-userSpaceOnUse-003.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-element-userSpaceOnUse-004.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-fixed-scroll-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-fixed-scroll.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-001-expected.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-002-expected.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-interpolation-001-expected.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-interpolation-002-expected.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-reference-restore.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-svg-invalidate-expected.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-svg-invalidate.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-svg-text-backdrop-filter.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-svg-text-font-loading.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-transform-mutated-001.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-transform-mutated-002.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-url-reference-change-from-empty.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-url-reference-change.html:
  • web-platform-tests/css/css-masking/clip-path/reference-local-url-with-base-001.html:
  • web-platform-tests/css/css-masking/clip-path/reference-mutated.html:
  • web-platform-tests/css/css-masking/clip-path/reference-nonexisting-existing-local.html:
  • web-platform-tests/css/css-masking/clip-path/w3c-import.log:
  • web-platform-tests/css/css-masking/clip-rule/clip-rule-001.html:
  • web-platform-tests/css/css-masking/clip-rule/clip-rule-002.html:
  • web-platform-tests/css/css-masking/hit-test/clip-path-element-objectboundingbox-001.html:
  • web-platform-tests/css/css-masking/hit-test/clip-path-element-objectboundingbox-002.html:
  • web-platform-tests/css/css-masking/hit-test/clip-path-element-userspaceonuse-001.html:
  • web-platform-tests/css/css-masking/idlharness.html:
  • web-platform-tests/css/css-masking/inheritance.sub-expected.txt:
  • web-platform-tests/css/css-masking/parsing/mask-position-valid-expected.txt:
  • web-platform-tests/css/css-masking/parsing/mask-valid.sub-expected.txt:

Source/WebCore:

Tests: fast/masking/parsing-webkit-mask.html

imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-filter.html
imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-incompatible-shapes1.html
imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-incompatible-shapes2.html
imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-overflow.html
imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-three-keyframes1.html
imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-three-keyframes2.html
imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-transition.html
imported/w3c/web-platform-tests/css/css-masking/clip-path/clip-path-fixed-scroll.html
svg/masking/mask-external-reference-expected.svg
svg/masking/mask-external-reference.svg

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::createPositionListForLayer):
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSImageValue.cpp:

(WebCore::ResolvedURL::isLocalURL const):
(WebCore::CSSImageValue::reresolvedURL const):

  • css/CSSImageValue.h:
  • css/CSSPrimitiveValue.h:

(WebCore::CSSPrimitiveValue::create):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator CompositeOperator const):
(WebCore::CSSPrimitiveValue::operator FillBox const):

  • css/CSSProperties.json:
  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::mapFillMaskMode):

  • css/CSSValueKeywords.in:
  • css/CSSValuePool.h:

(WebCore::CSSValuePool::createValue):

  • css/SVGCSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::svgPropertyValue):

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue const):
(WebCore::resolvedClipValue):
(WebCore::isSameAsInitialClipValue):
(WebCore::StyleProperties::getLayeredShorthandValue const):
(WebCore::StyleProperties::asText const):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeMaskClip):
(WebCore::consumePrefixedBackgroundComposite):
(WebCore::consumeBackgroundComposite):
(WebCore::consumeBackgroundComponent):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::consumeBackgroundPosition):
(WebCore::CSSPropertyParser::consumeBackgroundShorthand):
(WebCore::CSSPropertyParser::parseShorthand):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumePositionCoordinates):

  • display/css/DisplayBoxDecorationPainter.cpp:

(WebCore::Display::BoxDecorationPainter::paintFillLayer const):

  • rendering/style/FillLayer.cpp:

(WebCore::clipMax):
(WebCore::FillLayer::computeClipMax const):

  • rendering/style/FillLayer.h:
  • rendering/style/RenderStyle.cpp:

(WebCore::rareNonInheritedDataChangeRequiresLayerRepaint):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::hasPositionedMask const):

  • rendering/style/RenderStyleConstants.cpp:

(WebCore::operator<<):

  • rendering/style/RenderStyleConstants.h:
  • rendering/style/SVGRenderStyle.cpp:

(WebCore::SVGRenderStyle::SVGRenderStyle):
(WebCore::SVGRenderStyle::operator== const):
(WebCore::SVGRenderStyle::copyNonInheritedFrom):
(WebCore::SVGRenderStyle::diff const):

  • rendering/style/SVGRenderStyle.h:

(WebCore::SVGRenderStyle::initialLightingColor):
(WebCore::SVGRenderStyle::y const):
(WebCore::SVGRenderStyle::hasFill const):
(WebCore::SVGRenderStyle::initialMaskerResource): Deleted.
(WebCore::SVGRenderStyle::maskerResource const): Deleted.
(WebCore::SVGRenderStyle::hasMasker const): Deleted.
(WebCore::SVGRenderStyle::isolatesBlending const): Deleted.
(WebCore::SVGRenderStyle::setMaskerResource): Deleted.

  • rendering/style/SVGRenderStyleDefs.cpp:

(WebCore::StyleResourceData::StyleResourceData): Deleted.
(WebCore::StyleResourceData::copy const): Deleted.
(WebCore::StyleResourceData::operator== const): Deleted.

  • rendering/style/SVGRenderStyleDefs.h:

(WebCore::StyleResourceData::create): Deleted.
(WebCore::StyleResourceData::operator!= const): Deleted.

  • rendering/style/StyleCachedImage.cpp:

(WebCore::StyleCachedImage::imageURL const):
(WebCore::StyleCachedImage::reresolvedURL const):
(WebCore::StyleCachedImage::imageURL): Deleted.

  • rendering/style/StyleCachedImage.h:
  • rendering/style/WillChangeData.cpp:

(WebCore::WillChangeData::propertyCreatesStackingContext):

  • rendering/svg/SVGRenderSupport.cpp:

(WebCore::SVGRenderSupport::isolatesBlending):
(WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending):

  • rendering/svg/SVGRenderTreeAsText.cpp:

(WebCore::writeResources):

  • rendering/svg/SVGRenderingContext.cpp:

(WebCore::SVGRenderingContext::prepareToRenderSVGContent):

  • rendering/svg/SVGResources.cpp:

(WebCore::SVGResources::buildCachedResources):

LayoutTests:

  • fast/masking/parsing-mask-expected.txt:
  • fast/masking/parsing-mask-mode.html:
  • fast/masking/parsing-mask.html:
  • fast/masking/parsing-webkit-mask-expected.txt: Copied from LayoutTests/fast/masking/parsing-mask-expected.txt.
  • fast/masking/parsing-webkit-mask.html: Copied from LayoutTests/fast/masking/parsing-mask.html.
  • platform/mac/imported/w3c/web-platform-tests/css/css-masking/animations/mask-image-interpolation-expected.png: Added.
  • platform/mac/imported/w3c/web-platform-tests/css/css-masking/parsing/mask-valid.sub-expected.png: Added.
  • svg/masking/mask-external-reference-expected.svg: Added.
  • svg/masking/mask-external-reference.svg: Added.
  • svg/masking/resources/mask-resource.svg: Added.
12:02 PM Changeset in webkit [286794] by Tyler Wilcock
  • 14 edits
    1 delete in trunk/LayoutTests

AX: Make 6 more layout tests async so they pass in isolated tree mode
https://bugs.webkit.org/show_bug.cgi?id=233966

Reviewed by Chris Fleizach.

  • accessibility/element-haspopup-expected.txt:
  • accessibility/element-haspopup.html:

Use accessibilityController.accessibleElementById to get a reference
to the link1 and link2 AX objects instead of document.getElementById()
and accessibilityController.focusedElement. The latter would work, but
would require the test to be made unnecessarily async.

  • accessibility/mac/label-element-changing-children-string-value-expected.txt:
  • accessibility/mac/label-element-changing-children-string-value.html:
  • accessibility/mac/label-element-changing-textcontent-string-value-expected.txt:
  • accessibility/mac/label-element-changing-textcontent-string-value.html:
  • accessibility/mac/update-children-when-aria-role-changes-expected.txt:
  • accessibility/mac/update-children-when-aria-role-changes.html:
  • accessibility/tabindex-removed-expected.txt:
  • accessibility/tabindex-removed.html:

Make these tests async. They dynamically change page content with JS,
so they must verify expectations asynchronously to pass in isolated
tree mode.

  • accessibility/auto-fill-crash.html:

Make this test async.

  • accessibility/auto-fill-crash-expected.txt:
  • platform/glib/accessibility/auto-fill-crash-expected.txt:

Update expectations to reflect the test rewrite.

  • platform/win/accessibility/auto-fill-crash-expected.txt:

Removed because the expectation is the same as the base
auto-fill-crash-expected.txt

11:53 AM Changeset in webkit [286793] by Alan Coon
  • 4 edits in branches/safari-612-branch/Source/WebCore

Apply patch. rdar://problem/86235842

11:39 AM Changeset in webkit [286792] by Razvan Caliman
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Enable fuzzy matching for CSS completions
https://bugs.webkit.org/show_bug.cgi?id=234092

Reviewed by Patrick Angle.

Flip the flag to enable fuzzy matching when autocompleting CSS properties and values.

  • UserInterface/Base/Setting.js:
11:12 AM Changeset in webkit [286791] by Ryan Haddad
  • 3 edits in trunk/Tools

Bring up another iOS GPU Processes tester
https://bugs.webkit.org/show_bug.cgi?id=234016

Rubber-stamped by Alexey Proskuryakov.

  • CISupport/build-webkit-org/config.json: Repurpose the Catalina GPU bot for this queue.
  • CISupport/build-webkit-org/factories_unittest.py:

(TestExpectedBuildSteps): Update unit tests.

11:07 AM Changeset in webkit [286790] by sbarati@apple.com
  • 16 edits in trunk/Source/JavaScriptCore

Add an option to dump the B3 IR for an allowlist of Wasm function indices
https://bugs.webkit.org/show_bug.cgi?id=234028

Reviewed by Tadeu Zagallo.

  • b3/B3Common.cpp:

(JSC::B3::shouldDumpIR):

  • b3/B3Common.h:
  • b3/B3Generate.cpp:

(JSC::B3::generateToAir):

  • b3/B3Procedure.cpp:

(JSC::B3::Procedure::dump const):
(JSC::B3::Procedure::setShouldDumpIR):

  • b3/B3Procedure.h:

(JSC::B3::Procedure::shouldDumpIR const):

  • b3/air/AirGenerate.cpp:

(JSC::B3::Air::prepareForGeneration):

  • b3/testb3.h:

(shouldBeVerbose):
(lowerToAirForTesting):

  • b3/testb3_6.cpp:

(testInterpreter):
(testMoveConstants):

  • b3/testb3_7.cpp:

(testReduceStrengthReassociation):

  • runtime/OptionsList.h:
  • tools/FunctionAllowlist.cpp:

(JSC::FunctionAllowlist::shouldDumpWasmFunction const):

  • tools/FunctionAllowlist.h:
  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::shouldDumpIRFor):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmOMGForOSREntryPlan.cpp:

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

  • wasm/WasmOMGPlan.cpp:

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

11:01 AM Changeset in webkit [286789] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Add support for ink overflow on bidi inline boxes
https://bugs.webkit.org/show_bug.cgi?id=233968

Reviewed by Antti Koivisto.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::appendInlineDisplayBoxAtBidiBoundary):
(WebCore::Layout::InlineDisplayContentBuilder::ensureDisplayBoxForContainer):
(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForChildNode):
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.h:
10:58 AM Changeset in webkit [286788] by beidson@apple.com
  • 28 edits
    3 copies in trunk

Add ability to inject messages into webpushd
https://bugs.webkit.org/show_bug.cgi?id=233988

Reviewed by Alex Christensen.

Source/WebKit:

Covered by API tests.

This patch:

  • Adds WKWebsiteDataStore SPI to fetch pending push messages for the embedding application
  • Gives webpushd code to inject a push message for a given bundle identifier
  • Gives webpushtool the ability to send one of these fake messages
  • Gives webpushtool the ability to reconnect to the next daemon instance after the current connection is dropped
  • Tests the injection and fetching of push messages via TestWebKitAPI
  • Configurations/webpushtool.xcconfig:
  • WebKit.xcodeproj/project.pbxproj:
  • Resources/webpushtool.entitlements:
  • NetworkProcess/NetworkProcess.cpp:

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

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/Notifications/NetworkNotificationManager.cpp:

(WebKit::NetworkNotificationManager::getPendingPushMessages):
(WebKit::ReplyCaller<Vector<WebPushMessage>::callReply):

  • NetworkProcess/Notifications/NetworkNotificationManager.h:
  • Shared/Cocoa/WebPushMessageCocoa.mm: Copied from Source/WebKit/webpushd/webpushtool/WebPushToolConnection.h.

(WebKit::WebPushMessage::fromDictionary):
(WebKit::WebPushMessage::toDictionary const):

  • Shared/PushMessageForTesting.h: Copied from Source/WebKit/Shared/WebPushDaemonConstants.h.

(WebKit::WebPushD::PushMessageForTesting::encode const):
(WebKit::WebPushD::PushMessageForTesting::decode):

  • Shared/WebPushDaemonConstants.h:

(WebKit::WebPushD::messageTypeSendsReply):

  • Shared/WebPushMessage.h: Copied from Source/WebKit/webpushd/webpushtool/WebPushToolConnection.h.

(WebKit::WebPushMessage::encode const):
(WebKit::WebPushMessage::decode):

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _getPendingPushMessages:]):
(-[WKWebsiteDataStore _processPushMessage:completionHandler:]):
(-[WKWebsiteDataStore _processPushMessage:registration:completionHandler:]): Deleted.

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::getPendingPushMessages):
(WebKit::NetworkProcessProxy::processPushMessage):

  • UIProcess/Network/NetworkProcessProxy.h:
  • webpushd/PushClientConnection.h:
  • webpushd/PushClientConnection.mm:

(WebPushD::ClientConnection::hostAppHasPushEntitlement):
(WebPushD::ClientConnection::hostAppHasPushInjectEntitlement):
(WebPushD::ClientConnection::hostHasEntitlement):
(WebPushD::ClientConnection::broadcastDebugMessage):

  • webpushd/WebPushDaemon.h:
  • webpushd/WebPushDaemon.mm:

(WebPushD::MessageInfo::injectPushMessageForTesting::encodeReply):
(WebPushD::MessageInfo::getPendingPushMessages::encodeReply):
(WebPushD::Daemon::decodeAndHandleMessage):
(WebPushD::Daemon::injectPushMessageForTesting):
(WebPushD::Daemon::getPendingPushMessages):

  • webpushd/webpushtool/WebPushToolConnection.h:

(WebPushTool::Connection::setPushMessage):

  • webpushd/webpushtool/WebPushToolConnection.mm:

(WebPushTool::Connection::startAction):
(WebPushTool::Connection::sendPushMessage):

  • webpushd/webpushtool/WebPushToolMain.mm:

(printUsageAndTerminate):
(pushMessageFromArguments):
(main):

Tools:

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

(messageDictionary):

  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:

(TestWebKitAPI::createMessageDictionary):
(TestWebKitAPI::sendMessageToDaemon):
(TestWebKitAPI::sendMessageToDaemonWaitingForReply):
(TestWebKitAPI::sendConfigurationWithAuditToken):
(TestWebKitAPI::createAndConfigureConnectionToService):
(TestWebKitAPI::encodeString):
(TestWebKitAPI::TEST):
(TestWebKitAPI::function):

  • TestWebKitAPI/cocoa/TestWKWebView.h:
10:44 AM Changeset in webkit [286787] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ iOS EWS ] 2X media/track (layout-tests) are a constant image failure
https://bugs.webkit.org/show_bug.cgi?id=234090

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
10:33 AM Changeset in webkit [286786] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Add support for empty bidi inline boxes
https://bugs.webkit.org/show_bug.cgi?id=233896

Reviewed by Antti Koivisto.

Inline boxes with decoration only should also produce associated display boxes.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::createdDisplayBoxNodeForContainerBoxAndPushToAncestorStack):
(WebCore::Layout::InlineDisplayContentBuilder::ensureDisplayBoxForContainer):
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

9:53 AM Changeset in webkit [286785] by J Pascoe
  • 44 edits in trunk

[WebAuthn] Remove user gesture requirement for using platform authenticator on the web
https://bugs.webkit.org/show_bug.cgi?id=230893
<rdar://problem/79781342>

Reviewed by Brent Fulgham.

Source/WebCore:

Remove web authentication user gesture bypass quirk as it's no longer used.

  • page/Quirks.cpp:

(WebCore::Quirks::shouldBypassUserGestureRequirementForWebAuthn const): Deleted.

  • page/Quirks.h:

Source/WebKit:

This patch loosens the user gesture requirement around using WebAuthn with respect to user gestures by
removing the Quirks.h allowlist of sites that get a freebie. Instead the new behavior is
all sites get one freebie, then on subsequent attempts they show a non-modal consent dialog.

  • UIProcess/API/APIUIClient.h:

(API::UIClient::requestWebAuthenticationNoGesture):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageUIClient):

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

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::requestWebAuthenticationNoGesture):

  • UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp:

(WebKit::WebAuthenticatorCoordinatorProxy::handleRequest):

  • WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:

(WebKit::WebAuthenticatorCoordinator::processingUserGesture):

Tools:

This patch removes the Quirks allowlist of the freebie web authentication use without a gesture and replaces it with one freebie, then a consent sheet.

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(-[TestWebAuthenticationPanelUIDelegate _webView:requestWebAuthenticationNoGestureForOrigin:completionHandler:]):
Test delegate

LayoutTests:

Modify layout tests to reflect new WebAuthn user gesture console message.

  • http/wpt/credential-management/credentialscontainer-store-basics.https-expected.txt:
  • http/wpt/webauthn/ctap-hid-failure.https-expected.txt:
  • http/wpt/webauthn/ctap-hid-success.https-expected.txt:
  • http/wpt/webauthn/ctap-nfc-failure.https-expected.txt:
  • http/wpt/webauthn/idl.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-hid.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-local-silent.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-local.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-nfc.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-u2f.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-success-hid.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-success-local.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-success-nfc.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-success-u2f.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-hid.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-local-silent.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-local.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-nfc.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure-u2f.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-failure.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-success-hid.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-success-local.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-success-nfc.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-get-success-u2f.https-expected.txt:
9:26 AM Changeset in webkit [286784] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Refactor bidi inline box boundary handling
https://bugs.webkit.org/show_bug.cgi?id=233880

Reviewed by Antti Koivisto.

This patch remove some code complexity by introducing more suitable data types to handle
content ranges for inline boxes.

  1. The final output of the InlineDisplayContentBuilder is a list of display boxes. It's a simple "one box right after the other" type of setup with continuous geometry (ie next box starts where the previous ends +-horizontal margins) unless the content is embedded in an inline box (e.g. <span>embedded content</span>) Inline box type of display boxes enclose all their descendant content. Normally when the logical order == visual order (unidirectional content), the descendant content ends right before the "inline box end" mark (</span>). It makes it easy to compute the right edge/enclosing width for the inline box type of display boxes.
  2. However the visual order of the bidi content makes the "let's use the inline box end mark" logic unusable as we may see the "inline box end" mark even before we come across any descendant content (there are other types of confusions with random ordering).
  3. Working with a list when the content comes in a nested flavor may introduce some complexity (e.g. need to keep content ranges around).

This patch introduces a very simple DisplayBoxNode type which keeps track of the display boxes in a tree fashion.
The display boxes are still stored in a list, while this newly introduced DisplayBoxNode tree helps traversing
the nested content.
It helps finding out the insertion point at unexpected bidi boundaries (e.g. when nested content from other inline boxes
show up in a logically unrelated inline box) and it is also very valuable when computing visual geometries for those enclosing display boxes.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::DisplayBoxNode::DisplayBoxNode):
(WebCore::Layout::DisplayBoxNode::appendChild):
(WebCore::Layout::AncestorStack::unwind):
(WebCore::Layout::AncestorStack::push):
(WebCore::Layout::InlineDisplayContentBuilder::ensureDisplayBoxForContainer):
(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForChildNode):
(WebCore::Layout::InlineDisplayContentBuilder::insertInlineBoxDisplayBoxForBidiBoundary): Deleted.
(WebCore::Layout::InlineDisplayContentBuilder::adjustInlineBoxDisplayBoxForBidiBoundary): Deleted.
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent): Deleted.
(WebCore::Layout::InlineDisplayContentBuilder::processOverflownRunsForEllipsis): Deleted.
(WebCore::Layout::InlineDisplayContentBuilder::collectInkOverflowForInlineBoxes): Deleted.
(WebCore::Layout::InlineDisplayContentBuilder::computeIsFirstIsLastBoxForInlineContent): Deleted.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.h:
  • layout/formattingContexts/inline/display/InlineDisplayBox.h:

(WebCore::InlineDisplay::Box::setLogicalLeft):
(WebCore::InlineDisplay::Box::setLogicalRight):
(WebCore::InlineDisplay::Box::setLogicalRect):
(WebCore::InlineDisplay::Box::setHasContent):

9:22 AM Changeset in webkit [286783] by Antti Koivisto
  • 2 edits in trunk/Source/WTF

Enable :focus-visible pseudo-class by default
https://bugs.webkit.org/show_bug.cgi?id=234019
<rdar://problem/86218583>

Reviewed by Brent Fulgham.

This enables :focus-visible pseudo-class for authors.

It also changes :focus-visible behavior in the user agent stylesheet so that

  • <div tabindex> (or any element with 'tabindex' attribute that is not focusable otherwise) will not show focus indicator when focused via click/tap/script.
  • <details> element will not show focus indicator when focused via click/tap/script.

Both still show focus indicator when focused via keyboard (tab) navigation.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
9:10 AM Changeset in webkit [286782] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Make collectInkOverflowForInlineBoxes propagate ink overflow using the display box list
https://bugs.webkit.org/show_bug.cgi?id=233950

Reviewed by Antti Koivisto.

This is in preparation for supporting ink overflow across bidi boundaries.

The current HashMap<const Box*, size_t> approach does not work when a layout box could
produce multiple inline box type of display boxes on the same line (at bidi boundaries).
Instead let's propagate ink overflow by traversing the display box list starting
at the end and bubble up the inflated ink overflow rect to the parent inline boxes.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::build):
(WebCore::Layout::computeBoxShadowInkOverflow):
(WebCore::Layout::InlineDisplayContentBuilder::appendAtomicInlineLevelDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::appendInlineBoxDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::appendSpanningInlineBoxDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::collectInkOverflowForInlineBoxes):
(WebCore::Layout::addBoxShadowInkOverflow): Deleted.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.h:
8:39 AM Changeset in webkit [286781] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed fix after r286778 to address WebContent crashes on launch

  • WebProcess/com.apple.WebProcess.sb.in:
7:40 AM Changeset in webkit [286780] by Tyler Wilcock
  • 3 edits in trunk/Source/WebCore

AX: Use RefPtr<AXCoreObject> instead of raw AXCoreObject* pointers in Accessibility::findMatchingObjects and downstream functions
https://bugs.webkit.org/show_bug.cgi?id=233888

Reviewed by Chris Fleizach.

Move usages of raw AXCoreObject* pointers to RefPtr<AXCoreObject> in
Accessibility::findMatchingObjects and downstream functions.

This fixes isolated tree mode only crashes for tests:

  • accessibility/mac/search-predicate-element-count.html
  • accessibility/mac/search-predicate-visible-button.html

These crashed because:

  1. The secondary thread starts a search and stores raw pointers on its stack.
  2. The main thread performs some operation to queue isolated tree changes.
  3. The search continues on the secondary thread, eventually calling AXIsolatedObject::children. This in turns calls AXIsolatedTree::pendingChanges.
  4. The object(s) which we held pointers to are destroyed.
  • accessibility/AccessibilityObject.cpp:

(WebCore::appendAccessibilityObject):
(WebCore::Accessibility::isRadioButtonInDifferentAdhocGroup):
(WebCore::Accessibility::isAccessibilityObjectSearchMatchAtIndex):
(WebCore::Accessibility::isAccessibilityObjectSearchMatch):
(WebCore::Accessibility::isAccessibilityTextSearchMatch):
(WebCore::Accessibility::objectMatchesSearchCriteriaWithResultLimit):
(WebCore::Accessibility::appendChildrenToArray):
(WebCore::Accessibility::findMatchingObjects):
Use RefPtr<AXCoreObject> instead of raw AXCoreObject* pointers.

7:33 AM Changeset in webkit [286779] by dino@apple.com
  • 2 edits in trunk/Source/ThirdParty/ANGLE

[ANGLE] Code generation happens on each build and produces SCM diffs
https://bugs.webkit.org/show_bug.cgi?id=234025

Reviewed by Kimmo Kinnunen.

Temporarily remove the build phase that generates the
mtl_default_shaders_src_autogen files because they are producing
diffs.

We either need to generate these manually, or fix the Xcode project
to generate them into Derived Sources so they don't appear in our
repository.

  • ANGLE.xcodeproj/project.pbxproj:
7:07 AM Changeset in webkit [286778] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS][WP] Block access to unused system calls
https://bugs.webkit.org/show_bug.cgi?id=234003

Reviewed by Brent Fulgham.

Based on telemetry, block access to unused system calls in the WebContent process on macOS.

  • WebProcess/com.apple.WebProcess.sb.in:
6:46 AM Changeset in webkit [286777] by commit-queue@webkit.org
  • 28 edits
    3 deletes in trunk

Unreviewed, reverting r286764.
https://bugs.webkit.org/show_bug.cgi?id=234081

broke the build

Reverted changeset:

"Add ability to inject messages into webpushd"
https://bugs.webkit.org/show_bug.cgi?id=233988
https://commits.webkit.org/r286764

6:03 AM Changeset in webkit [286776] by Manuel Rego Casasnovas
  • 3 edits
    2 adds in trunk

[selectors] Match :focus-visible on <select> elements
https://bugs.webkit.org/show_bug.cgi?id=233924

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/forms/select-listbox-focusring.html

  • dom/Element.cpp:

(WebCore::shouldAlwaysHaveFocusVisibleWhenFocused):

LayoutTests:

  • fast/forms/select-listbox-focusring-expected.html: Added.
  • fast/forms/select-listbox-focusring.html: Added.
5:14 AM Changeset in webkit [286775] by Antti Koivisto
  • 7 edits in trunk

[selectors] Use :focus-visible in the user agent style sheet
https://bugs.webkit.org/show_bug.cgi?id=221925
<rdar://problem/74613552>

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/focus-visible-018-2-expected.txt:
  • web-platform-tests/css/selectors/focus-visible-018-expected.txt:

Source/WebCore:

Replace :-internal-direct-focus with :focus-visible for the default focus outline styling in the user agent style sheet.

When enabled, this will change focus drawing behavior in two cases:

  • <div tabindex> (or any element with 'tabindex' attribute that is not focusable otherwise) will not show focus indicator when focused via click/tap/script.
  • <details> will not show focus indicator when focused via click/tap/script.

Both still show focus indicator when focused via keyboard (tab) navigation.

With the feature disabled UA sheet :focus-visible behaves like :-internal-direct-focus.

This patch does not enable the feature yet.

  • css/SelectorCheckerTestFunctions.h:

(WebCore::matchesFocusVisiblePseudoClass):

Check the feature flag. If it is not enabled :focus-visible matches like :-internal-direct-focus.

  • css/html.css:

(:focus-visible):
(:-internal-direct-focus): Deleted.

Replace :-internal-direct-focus.

  • css/parser/CSSParserContext.cpp:

(WebCore::CSSParserContext::CSSParserContext):

Always allow :focus-visible when parsing UA sheet.

3:42 AM Changeset in webkit [286774] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Copy ServiceWorkerNavigationPreloader error when failing its ServiceWorkerFetchTask
https://bugs.webkit.org/show_bug.cgi?id=234002

Reviewed by Chris Dumez.

Covered by existing tests.

  • NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:

When failing a ServiceWorkerNavigationPreloader, we might delete it, so it is not safe to manage a reference to its error.
Instead copy the error.

3:23 AM Changeset in webkit [286773] by commit-queue@webkit.org
  • 8 edits in trunk/Source/bmalloc

[libpas] Fix up missing header includes and build guards in unit tests
https://bugs.webkit.org/show_bug.cgi?id=234007

Patch by Zan Dobersek <zdobersek@igalia.com> on 2021-12-09
Reviewed by Yusuke Suzuki.

Add missing header inclusions in different libpas unit test sources
to avoid build problems.

In IsoHeapChaosTests.cpp, Mach-specific thread-related header inclusion
and usage is put inside PAS_OS(DARWIN) build guards. On Linux, the
enumerator sub-tests that utilize this thread suspension and resuming
functionality are disabled.

  • libpas/src/test/ExpendableMemoryTests.cpp:
  • libpas/src/test/IsoHeapChaosTests.cpp:

(std::testAllocationChaos):

  • libpas/src/test/IsoHeapPageSharingTests.cpp:
  • libpas/src/test/IsoHeapPartialAndBaselineTests.cpp:
  • libpas/src/test/RaceTests.cpp:
  • libpas/src/test/TestHarness.cpp:
  • libpas/src/test/ThingyAndUtilityHeapAllocationTests.cpp:
2:34 AM Changeset in webkit [286772] by don.olmstead@sony.com
  • 94 edits
    3 copies
    31 moves
    2 adds
    1 delete in trunk

Move TextCodec files from WebCore/platform/text to WebCore/PAL/text
https://bugs.webkit.org/show_bug.cgi?id=233683

Reviewed by Yusuke Suzuki.

Source/WebCore:

This is a purely mechanical move. The TextCodec files don't have any dependencies
except for ICU, so they're good candidates to move.

They do have a thread-local cache, so I split ThreadGlobalData into a PAL part and
a WebCore part.

No new tests because there is no behavior change.

  • Headers.cmake:
  • Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:

(WebCore::CDMSessionClearKey::generateKeyRequest):

  • Modules/fetch/FetchBody.cpp:

(WebCore::FetchBody::consumeAsStream):
(WebCore::FetchBody::consumeText):
(WebCore::FetchBody::bodyAsFormData const):
(WebCore::FetchBody::take):

  • Modules/fetch/FetchBodyConsumer.cpp:

(WebCore::FetchBodyConsumer::packageFormData):

  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • accessibility/atk/WebKitAccessibleInterfaceText.cpp:
  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::executeJavaScriptURL):

  • css/parser/CSSParserContext.cpp:

(WebCore::CSSParserContext::completeURL const):

  • css/parser/CSSParserContext.h:
  • dom/Document.cpp:

(WebCore::Document::characterSetWithUTF8Fallback const):
(WebCore::Document::defaultCharsetForLegacyBindings const):

  • dom/Document.h:
  • dom/DocumentInlines.h:

(WebCore::Document::textEncoding const):

  • dom/TextDecoder.cpp:
  • dom/TextDecoder.h:
  • fileapi/BlobBuilder.cpp:

(WebCore::BlobBuilder::append):

  • fileapi/FileReaderLoader.cpp:

(WebCore::FileReaderLoader::convertToText):
(WebCore::FileReaderLoader::setEncoding):

  • fileapi/FileReaderLoader.h:
  • html/DOMFormData.cpp:

(WebCore::DOMFormData::DOMFormData):
(WebCore::DOMFormData::create):

  • html/DOMFormData.h:

(WebCore::DOMFormData::encoding const):

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::process):

  • html/ImageDocument.cpp:

(WebCore::ImageDocument::finishedParsing):

  • html/MediaFragmentURIParser.cpp:

(WebCore::MediaFragmentURIParser::parseFragments):

  • html/parser/HTMLMetaCharsetParser.cpp:

(WebCore::HTMLMetaCharsetParser::HTMLMetaCharsetParser):
(WebCore::HTMLMetaCharsetParser::encodingFromMetaAttributes):

  • html/parser/HTMLMetaCharsetParser.h:

(WebCore::HTMLMetaCharsetParser::encoding):

  • html/track/WebVTTParser.cpp:

(WebCore::WebVTTParser::WebVTTParser):

  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::computeContentSecurityPolicySHA256Hash):

  • inspector/agents/InspectorNetworkAgent.cpp:
  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::decodeBuffer):

  • loader/FormSubmission.cpp:

(WebCore::appendMailtoPostFormDataToURL):
(WebCore::encodingFromAcceptCharset):
(WebCore::FormSubmission::create):

  • loader/TextResourceDecoder.cpp:

(WebCore::findTextEncoding):
(WebCore::TextResourceDecoder::defaultEncoding):
(WebCore::TextResourceDecoder::TextResourceDecoder):
(WebCore::TextResourceDecoder::create):
(WebCore::TextResourceDecoder::setEncoding):
(WebCore::TextResourceDecoder::checkForBOM):
(WebCore::TextResourceDecoder::checkForHeadCharset):
(WebCore::TextResourceDecoder::decode):
(WebCore::TextResourceDecoder::flush):
(WebCore::TextResourceDecoder::encodingForURLParsing):

  • loader/TextResourceDecoder.h:

(WebCore::TextResourceDecoder::create):
(WebCore::TextResourceDecoder::encoding const):

  • loader/cache/CachedApplicationManifest.cpp:

(WebCore::CachedApplicationManifest::CachedApplicationManifest):

  • loader/cache/CachedScript.cpp:

(WebCore::CachedScript::script):

  • page/FrameView.cpp:

(WebCore::FrameView::scrollToFragment):

  • page/Page.cpp:

(WebCore::Page::userStyleSheetLocationChanged):

  • page/PageSerializer.cpp:

(WebCore::PageSerializer::serializeFrame):
(WebCore::PageSerializer::serializeCSSStyleSheet):

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::extractInnerURL):
(WebCore::SecurityOrigin::create):

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::findHashOfContentInPolicies const):

  • page/csp/ContentSecurityPolicy.h:
  • page/csp/ContentSecurityPolicySource.cpp:

(WebCore::ContentSecurityPolicySource::pathMatches const):

  • page/csp/ContentSecurityPolicySourceList.cpp:

(WebCore::ContentSecurityPolicySourceList::parsePath):

  • platform/ThreadGlobalData.cpp:

(WebCore::ThreadGlobalData::ThreadGlobalData):
(WebCore::ThreadGlobalData::destroy):
(PAL::threadGlobalData):

  • platform/ThreadGlobalData.h:

(WebCore::ThreadGlobalData::threadTimers):
(WebCore::ThreadGlobalData::ThreadGlobalData::cachedResourceRequestInitiators): Deleted.
(WebCore::ThreadGlobalData::ThreadGlobalData::eventNames): Deleted.
(WebCore::ThreadGlobalData::ThreadGlobalData::qualifiedNameCache): Deleted.
(WebCore::ThreadGlobalData::ThreadGlobalData::mimeTypeRegistryThreadGlobalData): Deleted.
(WebCore::ThreadGlobalData::ThreadGlobalData::threadTimers): Deleted.
(WebCore::ThreadGlobalData::ThreadGlobalData::cachedConverterICU): Deleted.
(WebCore::ThreadGlobalData::ThreadGlobalData::currentState const): Deleted.
(WebCore::ThreadGlobalData::ThreadGlobalData::setCurrentState): Deleted.
(WebCore::ThreadGlobalData::ThreadGlobalData::isInRemoveAllEventListeners const): Deleted.
(WebCore::ThreadGlobalData::ThreadGlobalData::setIsInRemoveAllEventListeners): Deleted.
(WebCore::ThreadGlobalData::ThreadGlobalData::fontCache): Deleted.
(WebCore::ThreadGlobalData::ThreadGlobalData::fontCacheIfNotDestroyed): Deleted.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):

  • platform/gtk/PlatformKeyboardEventGtk.cpp:
  • platform/network/DataURLDecoder.cpp:

(WebCore::DataURLDecoder::decodeBase64):
(WebCore::DataURLDecoder::decodeEscaped):

  • platform/network/FormData.cpp:

(WebCore::normalizeStringData):
(WebCore::FormData::appendMultiPartFileValue):
(WebCore::FormData::appendMultiPartStringValue):
(WebCore::FormData::flattenToString const):

  • platform/network/FormData.h:
  • platform/network/FormDataBuilder.cpp:

(WebCore::FormDataBuilder::addFilenameToMultiPartHeader):

  • platform/network/FormDataBuilder.h:
  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::handleDataURL):

  • platform/network/soup/ResourceHandleSoup.cpp:
  • platform/win/ClipboardUtilitiesWin.cpp:

(WebCore::getFullCFHTML):
(WebCore::getUtf8Data):

  • platform/win/DragDataWin.cpp:
  • platform/win/PasteboardWin.cpp:

(WebCore::Pasteboard::documentFragment):
(WebCore::createGlobalHDropContent):

  • rendering/RenderText.cpp:

(WebCore::RenderText::computeUseBackslashAsYenSymbol const):

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::send):
(WebCore::XMLHttpRequest::finalResponseCharset const):
(WebCore::XMLHttpRequest::createDecoder const):

  • xml/XMLHttpRequest.h:
  • xml/XSLTProcessor.cpp:

(WebCore::XSLTProcessor::createDocumentFromSource):

Source/WebCore/PAL:

This is a purely mechanical move. The TextCodec files don't have any dependencies
except for ICU, so they're good candidates to move.

  • PAL.xcodeproj/project.pbxproj:
  • pal/CMakeLists.txt:
  • pal/PlatformMac.cmake:
  • pal/ThreadGlobalData.cpp: Copied from Source/WebCore/PAL/pal/text/UnencodableHandling.h.

(PAL::ThreadGlobalData::ThreadGlobalData):
(PAL::ThreadGlobalData::destroy):

  • pal/ThreadGlobalData.h: Copied from Source/WebCore/html/parser/HTMLMetaCharsetParser.h.

(PAL::ThreadGlobalData::ThreadGlobalData::cachedConverterICU):

  • pal/text/DecodeEscapeSequences.h: Renamed from Source/WebCore/platform/text/DecodeEscapeSequences.h.

(PAL::Unicode16BitEscapeSequence::findEndOfRun):
(PAL::Unicode16BitEscapeSequence::decodeRun):
(PAL::URLEscapeSequence::findEndOfRun):
(PAL::URLEscapeSequence::decodeRun):
(PAL::decodeURLEscapeSequencesAsData):

  • pal/text/EncodingTables.cpp: Renamed from Source/WebCore/platform/text/EncodingTables.cpp.

(PAL::big5):
(PAL::eucKR):

  • pal/text/EncodingTables.h: Renamed from Source/WebCore/platform/text/EncodingTables.h.

(PAL::findInSortedPairs):

  • pal/text/TextCodec.cpp: Renamed from Source/WebCore/platform/text/TextCodec.cpp.
  • pal/text/TextCodec.h: Renamed from Source/WebCore/platform/text/TextCodec.h.
  • pal/text/TextCodecASCIIFastPath.h: Renamed from Source/WebCore/platform/text/TextCodecASCIIFastPath.h.
  • pal/text/TextCodecCJK.cpp: Renamed from Source/WebCore/platform/text/TextCodecCJK.cpp.

(PAL::gb18030Ranges):

  • pal/text/TextCodecCJK.h: Renamed from Source/WebCore/platform/text/TextCodecCJK.h.
  • pal/text/TextCodecICU.cpp: Renamed from Source/WebCore/platform/text/TextCodecICU.cpp.

(PAL::TextCodecICU::decode):

  • pal/text/TextCodecICU.h: Renamed from Source/WebCore/platform/text/TextCodecICU.h.
  • pal/text/TextCodecLatin1.cpp: Renamed from Source/WebCore/platform/text/TextCodecLatin1.cpp.
  • pal/text/TextCodecLatin1.h: Renamed from Source/WebCore/platform/text/TextCodecLatin1.h.
  • pal/text/TextCodecReplacement.cpp: Renamed from Source/WebCore/platform/text/TextCodecReplacement.cpp.
  • pal/text/TextCodecReplacement.h: Renamed from Source/WebCore/platform/text/TextCodecReplacement.h.
  • pal/text/TextCodecSingleByte.cpp: Renamed from Source/WebCore/platform/text/TextCodecSingleByte.cpp.

(PAL::TextCodecSingleByte::encode const):
(PAL::TextCodecSingleByte::decode):

  • pal/text/TextCodecSingleByte.h: Renamed from Source/WebCore/platform/text/TextCodecSingleByte.h.
  • pal/text/TextCodecUTF16.cpp: Renamed from Source/WebCore/platform/text/TextCodecUTF16.cpp.
  • pal/text/TextCodecUTF16.h: Renamed from Source/WebCore/platform/text/TextCodecUTF16.h.
  • pal/text/TextCodecUTF8.cpp: Renamed from Source/WebCore/platform/text/TextCodecUTF8.cpp.

(PAL::TextCodecUTF8::decode):

  • pal/text/TextCodecUTF8.h: Renamed from Source/WebCore/platform/text/TextCodecUTF8.h.
  • pal/text/TextCodecUserDefined.cpp: Renamed from Source/WebCore/platform/text/TextCodecUserDefined.cpp.
  • pal/text/TextCodecUserDefined.h: Renamed from Source/WebCore/platform/text/TextCodecUserDefined.h.
  • pal/text/TextEncoding.cpp: Renamed from Source/WebCore/platform/text/TextEncoding.cpp.

(PAL::TextEncoding::encode const):

  • pal/text/TextEncoding.h: Renamed from Source/WebCore/platform/text/TextEncoding.h.
  • pal/text/TextEncodingDetector.h: Renamed from Source/WebCore/platform/text/TextEncodingDetector.h.
  • pal/text/TextEncodingDetectorICU.cpp: Renamed from Source/WebCore/platform/text/TextEncodingDetectorICU.cpp.

(PAL::detectTextEncoding):

  • pal/text/TextEncodingRegistry.cpp: Renamed from Source/WebCore/platform/text/TextEncodingRegistry.cpp.

(PAL::isUndesiredAlias):

  • pal/text/TextEncodingRegistry.h: Renamed from Source/WebCore/platform/text/TextEncodingRegistry.h.
  • pal/text/UnencodableHandling.h:
  • pal/text/ios/TextEncodingRegistryIOS.mm: Renamed from Source/WebCore/platform/text/ios/TextEncodingRegistryIOS.mm.

(PAL::webDefaultCFStringEncoding):

  • pal/text/mac/TextEncodingRegistryMac.mm: Renamed from Source/WebCore/platform/text/mac/TextEncodingRegistryMac.mm.
  • pal/text/win/TextCodecWin.cpp: Renamed from Source/WebCore/platform/text/win/TextCodecWin.cpp.

(PAL::getCodePageFlags):

  • pal/text/win/TextCodecWin.h: Renamed from Source/WebCore/platform/text/win/TextCodecWin.h.

Source/WebKit:

Update to use the new PAL files.

  • NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm:
  • NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
  • NetworkProcess/WebStorage/StorageManager.cpp:
  • NetworkProcess/WebStorage/StorageManagerSet.cpp:

(WebKit::StorageManagerSet::StorageManagerSet):

  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:

(WebKit::NetworkDataTaskCurl::suggestedFilename const):

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::suggestedFilename const):

  • Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
  • UIProcess/API/glib/WebKitFileChooserRequest.cpp:

(webkit_file_chooser_request_select_files):

  • UIProcess/API/glib/WebKitSettings.cpp:
  • UIProcess/Inspector/WebInspectorUIProxy.cpp:

(WebKit::WebInspectorUIProxy::isMainOrTestInspectorPage):

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::performJavaScriptURLRequest):

Source/WebKitLegacy:

Update to use the new PAL files.

  • Storage/StorageTracker.cpp:

(WebKit::StorageTracker::internalInitialize):

Source/WebKitLegacy/mac:

Update to use the new PAL files.

  • Misc/WebNSURLExtras.mm:

(-[NSString _webkit_stringByReplacingValidPercentEscapes]):

  • WebView/WebFrame.mm:

(+[WebFrame stringWithData:textEncodingName:]):

  • WebView/WebPreferences.mm:

(+[WebPreferences _systemCFStringEncoding]):
(+[WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]):

  • WebView/WebResource.mm:

(-[WebResource _stringValue]):

Source/WebKitLegacy/win:

Update to use the new PAL files.

  • WebDownloadCurl.cpp:

(WebDownload::didReceiveResponse):

Source/WTF:

Update to use the new PAL files.

  • Scripts/Preferences/WebPreferences.yaml:

Tools:

Update to use the new PAL files.

  • Scripts/webkitpy/style/checkers/cpp.py:

(check_identifier_name_in_declaration):

  • TestWebKitAPI/Tests/WebCore/TextCodec.cpp:

(TestWebKitAPI::testDecode):

  • TestWebKitAPI/Tests/WebCore/URLParserTextEncoding.cpp:

(TestWebKitAPI::checkURL):
(TestWebKitAPI::TEST_F):

2:33 AM Changeset in webkit [286771] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

Unreviewed. Fix GTK build.

WebKitBuild/Release/WTF/Headers/wtf/persistence/PersistentCoder.h:40:11: error: ‘const class WTF::String’ has no member named ‘encode’

40 | t.encode(encoder);

| ~

  • NetworkProcess/storage/NetworkStorageManager.cpp: Include wtf/persistence/PersistentCoders.h
2:17 AM Changeset in webkit [286770] by mmaxfield@apple.com
  • 4 edits in trunk/Source

[WebGPU] [MacCatalyst] Fix WebGPU Mac Catalyst build in Apple's internal build system
https://bugs.webkit.org/show_bug.cgi?id=234072

Unreviewed.

Source/WebKit:

No new tests because there is no behavior change.

  • Configurations/BaseTarget.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/WebKitLegacy.xcconfig:
12:47 AM Changeset in webkit [286769] by ysuzuki@apple.com
  • 26 edits in trunk/Source/JavaScriptCore

[JSC] Introduce BaselineCallLinkInfo and OptimizingCallLinkInfo to shrink sizeof(BaselineCallLinkInfo)
https://bugs.webkit.org/show_bug.cgi?id=233985

Reviewed by Mark Lam.

This patch introduces BaselineCallLinkInfo and OptimizingCallLinkInfo to shrink sizeof(BaselineCallLinkInfo).
BaselineCallLinkInfo is included in metadata, and allocated for LLInt and Baseline. So shrinking it can make
metadata small for LLInt and Baseline, which exists for all live functions.

We also reorder OpIteratorOpen::Metadata and OpIteratorNext::Metadata to shrink sizes.

sizeof(BaselineCallLinkInfo) becomes 88, while the old sizeof(CallLinkInfo) was 120.

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateImpl):

  • bytecode/BytecodeList.rb:
  • bytecode/CallLinkInfo.cpp:

(JSC::CallLinkInfo::setMonomorphicCallee):
(JSC::CallLinkInfo::emitFastPathImpl):
(JSC::OptimizingCallLinkInfo::emitFastPath):
(JSC::OptimizingCallLinkInfo::emitTailCallFastPath):
(JSC::OptimizingCallLinkInfo::emitSlowPath):
(JSC::CallLinkInfo::emitDataICSlowPath):
(JSC::OptimizingCallLinkInfo::slowPathStart):
(JSC::OptimizingCallLinkInfo::fastPathStart):
(JSC::OptimizingCallLinkInfo::emitDirectFastPath):
(JSC::OptimizingCallLinkInfo::emitDirectTailCallFastPath):
(JSC::OptimizingCallLinkInfo::initializeDirectCall):
(JSC::OptimizingCallLinkInfo::setDirectCallTarget):
(JSC::BaselineCallLinkInfo::initialize):
(JSC::CallLinkInfo::slowPathStart): Deleted.
(JSC::CallLinkInfo::fastPathStart): Deleted.
(JSC::CallLinkInfo::emitFastPath): Deleted.
(JSC::CallLinkInfo::emitTailCallFastPath): Deleted.
(JSC::CallLinkInfo::emitSlowPath): Deleted.
(JSC::CallLinkInfo::initializeDataIC): Deleted.
(JSC::CallLinkInfo::emitDirectFastPath): Deleted.
(JSC::CallLinkInfo::emitDirectTailCallFastPath): Deleted.
(JSC::CallLinkInfo::initializeDirectCall): Deleted.
(JSC::CallLinkInfo::setDirectCallTarget): Deleted.

  • bytecode/CallLinkInfo.h:

(JSC::CallLinkInfo::type const):
(JSC::CallLinkInfo::CallLinkInfo):
(JSC::CallLinkInfo::calleeGPR const):
(JSC::CallLinkInfo::callLinkInfoGPR const):
(JSC::CallLinkInfo::setCallLinkInfoGPR):
(JSC::CallLinkInfo::setUpCall): Deleted.
(JSC::CallLinkInfo::setCodeLocations): Deleted.
(JSC::CallLinkInfo::calleeGPR): Deleted.

  • bytecode/CallLinkStatus.cpp:

(JSC::CallLinkStatus::computeFor):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::setupWithUnlinkedBaselineCode):
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::getICStatusMap):
(JSC::CodeBlock::jettison):

  • bytecode/GetterSetterAccessCase.h:
  • bytecode/PolymorphicAccess.h:
  • bytecode/Repatch.cpp:

(JSC::revertCall):
(JSC::linkDirectCall):

  • bytecode/Repatch.h:
  • dfg/DFGCommonData.h:

(JSC::DFG::CommonData::addCallLinkInfo):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::link):

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::addJSCall):
(JSC::DFG::JITCompiler::addJSDirectCall):
(JSC::DFG::JITCompiler::JSCallRecord::JSCallRecord):
(JSC::DFG::JITCompiler::JSDirectCallRecord::JSDirectCallRecord):

  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • dfg/DFGOperations.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • ftl/FTLLowerDFGToB3.cpp:

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

  • jit/CallFrameShuffleData.cpp:

(JSC::CallFrameShuffleData::createForBaselineOrLLIntTailCall):

  • jit/GCAwareJITStubRoutine.cpp:

(JSC::MarkingGCAwareJITStubRoutine::MarkingGCAwareJITStubRoutine):
(JSC::GCAwareJITStubRoutineWithExceptionHandler::GCAwareJITStubRoutineWithExceptionHandler):
(JSC::createICJITStubRoutine):

  • jit/GCAwareJITStubRoutine.h:
  • jit/JITCall.cpp:

(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileTailCall):
(JSC::JIT::compileOpCall):
(): Deleted.

  • wasm/js/JSWebAssemblyCodeBlock.h:
  • wasm/js/WasmToJS.cpp:

(JSC::Wasm::wasmToJS):

  • wasm/js/WasmToJS.h:
12:37 AM Changeset in webkit [286768] by mmaxfield@apple.com
  • 4 edits in trunk/Source

[WebGPU] Fix WebGPU build in Apple's internal build system
https://bugs.webkit.org/show_bug.cgi?id=234070

Unreviewed.

The PAL headers get put in a different place.

Source/WebKit:

No new tests because there is no behavior change.

  • Configurations/BaseTarget.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/WebKitLegacy.xcconfig:
12:26 AM Changeset in webkit [286767] by Carlos Garcia Campos
  • 21 edits in trunk

[GTK][a11y] Ensure atspi wrappers have root set at construction time
https://bugs.webkit.org/show_bug.cgi?id=233804

Reviewed by Joanmarie Diggs.

Source/WebCore:

Pass the AccessibilityRootAtspi as a parameter to AccessibilityObjectAtspi constructor and store it as a
reference. A pointer to the AccessibilityRootAtspi object is now set in Page so that it can be accessed from the
AXObjectCache. Also remove setRoot() and use m_root directly instead of root() accessor.

  • accessibility/atspi/AXObjectCacheAtspi.cpp:

(WebCore::AXObjectCache::attachWrapper): Get the AccessibilityRootAtspi from the page and pass it to the wrapper
constructor. Also set the parent of the dom root element wrapper to the atspi root element.

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::childrenChanged):

  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::create):
(WebCore::AccessibilityObjectAtspi::AccessibilityObjectAtspi):
(WebCore::AccessibilityObjectAtspi::cacheDestroyed):
(WebCore::AccessibilityObjectAtspi::elementDestroyed):
(WebCore::AccessibilityObjectAtspi::path):
(WebCore::AccessibilityObjectAtspi::reference):
(WebCore::AccessibilityObjectAtspi::hyperlinkReference):
(WebCore::AccessibilityObjectAtspi::parentReference const):
(WebCore::AccessibilityObjectAtspi::childAt const):
(WebCore::AccessibilityObjectAtspi::wrapperVector const):
(WebCore::AccessibilityObjectAtspi::buildRelationSet const):
(WebCore::AccessibilityObjectAtspi::serialize const):
(WebCore::AccessibilityObjectAtspi::childAdded):
(WebCore::AccessibilityObjectAtspi::childRemoved):
(WebCore::AccessibilityObjectAtspi::stateChanged):
(WebCore::AccessibilityObjectAtspi::setRoot): Deleted.
(WebCore::AccessibilityObjectAtspi::root const): Deleted.

  • accessibility/atspi/AccessibilityObjectAtspi.h:
  • accessibility/atspi/AccessibilityObjectComponentAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectHyperlinkAtspi.cpp:
  • accessibility/atspi/AccessibilityObjectHypertextAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::hyperlink const):

  • accessibility/atspi/AccessibilityObjectSelectionAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::selectedChild const):
(WebCore::AccessibilityObjectAtspi::selectionChanged):

  • accessibility/atspi/AccessibilityObjectTableAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::cell const):
(WebCore::AccessibilityObjectAtspi::tableCaption const):
(WebCore::AccessibilityObjectAtspi::rowHeader const):
(WebCore::AccessibilityObjectAtspi::columnHeader const):

  • accessibility/atspi/AccessibilityObjectTableCellAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::cellRowHeaders const):
(WebCore::AccessibilityObjectAtspi::cellColumnHeaders const):

  • accessibility/atspi/AccessibilityObjectTextAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::textInserted):
(WebCore::AccessibilityObjectAtspi::textDeleted):
(WebCore::AccessibilityObjectAtspi::selectionChanged):
(WebCore::AccessibilityObjectAtspi::textAttributesChanged):

  • accessibility/atspi/AccessibilityObjectValueAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::valueChanged):

  • accessibility/atspi/AccessibilityRootAtspi.cpp:

(WebCore::AccessibilityRootAtspi::registerObject):
(WebCore::AccessibilityRootAtspi::unregisterObject):
(WebCore::AccessibilityRootAtspi::child const):
(WebCore::AccessibilityRootAtspi::focusedObject const): Deleted.

  • accessibility/atspi/AccessibilityRootAtspi.h:
  • page/Page.h:

(WebCore::Page::accessibilityRootObject const):
(WebCore::Page::setAccessibilityRootObject):

Source/WebKit:

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

(WKAccessibilityRootObject): Remove ATSPI specific code.
(WKAccessibilityFocusedObject): Ditto.

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::accessibilityRootObject const): Deleted.

Tools:

  • WebKitTestRunner/InjectedBundle/atspi/AccessibilityControllerAtspi.cpp:

(WTR::AccessibilityController::axRunLoop):

Dec 8, 2021:

11:09 PM Changeset in webkit [286766] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

Fix build after r286759
https://bugs.webkit.org/show_bug.cgi?id=234067

Unreviewed.

No new tests because there is no behavior change.

  • platform/audio/ios/AudioSessionIOS.mm:

(WebCore::AudioSessionIOS::setPresentingProcesses):

10:39 PM Changeset in webkit [286765] by Said Abou-Hallawa
  • 27 edits in trunk/Source/WebCore

[GPU Process] [Filters] Make Filter::apply() and FilterEffect:apply() take FilterImageVector for the inputs
https://bugs.webkit.org/show_bug.cgi?id=233973
rdar://86248999

Reviewed by Cameron McCormack.

This is a step towards removing the dependency on the input effects. This
step is required to make encoding/decoding the FilterEffect just be
sending or receiving its primitive data.

In this patch:

-- The sourceImage and sourceImageRect arguments to Filter::apply() are

used to create a FilterImage. This will be the input to the SourceGraphic.

-- The members m_sourceImage and m_sourceImageRect of Filter are removed.

-- CSSFilter::apply() loops through its functions and uses the result

of every function as the input to the next one. The initial input is
the sourceImage. And the result of the last function is the returned
FilterImage.

-- SVGFilter::apply() loops through its expression. It uses a stack of

FilterImageVector to keep track of the inputs while applying each
FilterEffect. Every FilterEffect is asked to takeInputs() from this
stack. The result of applying the FilterEffect is pushed on this stack.
The stack should have a single FilterImage when finishing the loop.
This item is the result of applying the Filter.

-- FilterEffect::transformInputsColorSpace() was added to transform the

input FilterImageVector to the operating color space of FilterEffect.
It is overridden by FEDisplacementMap which does not transform the
color space of the first input FilterImage.

-- FilterEffect::correctPremultipliedInputs() was added to correct the

premultiplied pixels of the inputs FilterImageVector. We do not need
to do this correction if the FilterEffect we apply is arithmetic
composite filter. Otherwise we need to correct the FilterImage of any
arithmetic composite filter in the FilterImageVector.

-- No need for totalNumberFilterEffects(). This count is the size of the

SVGFilter expression.

  • platform/graphics/coreimage/SourceGraphicCoreImageApplier.mm:

(WebCore::SourceGraphicCoreImageApplier::apply const):

  • platform/graphics/filters/FEBlend.h:
  • platform/graphics/filters/FEComposite.h:
  • platform/graphics/filters/FEDisplacementMap.cpp:

(WebCore::FEDisplacementMap::calculateImageRect const):
(WebCore::FEDisplacementMap::transformInputsColorSpace const):
(WebCore::FEDisplacementMap::transformResultColorSpace): Deleted.

  • platform/graphics/filters/FEDisplacementMap.h:
  • platform/graphics/filters/FEFlood.h:
  • platform/graphics/filters/FEMerge.h:
  • platform/graphics/filters/FETurbulence.h:
  • platform/graphics/filters/Filter.cpp:

(WebCore::Filter::apply):

  • platform/graphics/filters/Filter.h:

(WebCore::Filter::sourceImageRect const): Deleted.
(WebCore::Filter::setSourceImageRect): Deleted.
(WebCore::Filter::sourceImage const): Deleted.
(WebCore::Filter::setSourceImage): Deleted.

  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::takeImageInputs const):
(WebCore::FilterEffect::calculateImageRect const):
(WebCore::FilterEffect::transformInputsColorSpace const):
(WebCore::FilterEffect::correctPremultipliedInputs const):
(WebCore::FilterEffect::apply):
(WebCore::FilterEffect::inputEffect const):
(WebCore::FilterEffect::inputFilterImages const): Deleted.
(WebCore::FilterEffect::correctPremultipliedResultIfNeeded): Deleted.
(WebCore::FilterEffect::transformResultColorSpace): Deleted.

  • platform/graphics/filters/FilterEffect.h:

(WebCore::FilterEffect::filterImage const):
(WebCore::FilterEffect::numberOfEffectInputs const):
(WebCore::FilterEffect::numberOfImageInputs const):
(WebCore::FilterEffect::resultIsValidPremultiplied const):
(WebCore::FilterEffect::mayProduceInvalidPremultipliedPixels const): Deleted.
(WebCore::FilterEffect::correctFilterResultIfNeeded): Deleted.
(WebCore::FilterEffect::transformResultColorSpace): Deleted.

  • platform/graphics/filters/FilterFunction.h:

(WebCore::FilterFunction::apply):

  • platform/graphics/filters/FilterImage.cpp:

(WebCore::FilterImage::create):
(WebCore::FilterImage::FilterImage):
(WebCore::FilterImage::correctPremultipliedPixelBuffer):

  • platform/graphics/filters/FilterImage.h:
  • platform/graphics/filters/SourceAlpha.cpp:

(WebCore::SourceAlpha::calculateImageRect const): Deleted.

  • platform/graphics/filters/SourceAlpha.h:
  • platform/graphics/filters/SourceGraphic.cpp:

(WebCore::SourceGraphic::calculateImageRect const): Deleted.

  • platform/graphics/filters/SourceGraphic.h:
  • platform/graphics/filters/software/SourceGraphicSoftwareApplier.cpp:

(WebCore::SourceGraphicSoftwareApplier::apply const):

  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::apply):

  • rendering/CSSFilter.h:
  • svg/graphics/filters/SVGFEImage.h:
  • svg/graphics/filters/SVGFilter.cpp:

(WebCore::SVGFilter::apply):

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

(WebCore::SVGFilterBuilder::buildFilterEffects):
(WebCore::SVGFilterBuilder::buildExpression const):
(WebCore::collectEffects): Deleted.
(WebCore::totalNumberFilterEffects): Deleted.

10:37 PM Changeset in webkit [286764] by beidson@apple.com
  • 28 edits
    3 copies in trunk

Add ability to inject messages into webpushd
https://bugs.webkit.org/show_bug.cgi?id=233988

Reviewed by Alex Christensen.

Source/WebKit:

Covered by API tests.

This patch:

  • Adds WKWebsiteDataStore SPI to fetch pending push messages for the embedding application
  • Gives webpushd code to inject a push message for a given bundle identifier
  • Gives webpushtool the ability to send one of these fake messages
  • Gives webpushtool the ability to reconnect to the next daemon instance after the current connection is dropped
  • Tests the injection and fetching of push messages via TestWebKitAPI
  • Configurations/webpushtool.xcconfig:
  • WebKit.xcodeproj/project.pbxproj:
  • Resources/webpushtool.entitlements:
  • NetworkProcess/NetworkProcess.cpp:

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

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/Notifications/NetworkNotificationManager.cpp:

(WebKit::NetworkNotificationManager::getPendingPushMessages):
(WebKit::ReplyCaller<Vector<WebPushMessage>::callReply):

  • NetworkProcess/Notifications/NetworkNotificationManager.h:
  • Shared/Cocoa/WebPushMessageCocoa.mm: Copied from Source/WebKit/webpushd/webpushtool/WebPushToolConnection.h.

(WebKit::WebPushMessage::fromDictionary):
(WebKit::WebPushMessage::toDictionary const):

  • Shared/PushMessageForTesting.h: Copied from Source/WebKit/Shared/WebPushDaemonConstants.h.

(WebKit::WebPushD::PushMessageForTesting::encode const):
(WebKit::WebPushD::PushMessageForTesting::decode):

  • Shared/WebPushDaemonConstants.h:

(WebKit::WebPushD::messageTypeSendsReply):

  • Shared/WebPushMessage.h: Copied from Source/WebKit/webpushd/webpushtool/WebPushToolConnection.h.

(WebKit::WebPushMessage::encode const):
(WebKit::WebPushMessage::decode):

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _getPendingPushMessages:]):
(-[WKWebsiteDataStore _processPushMessage:completionHandler:]):
(-[WKWebsiteDataStore _processPushMessage:registration:completionHandler:]): Deleted.

  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::getPendingPushMessages):
(WebKit::NetworkProcessProxy::processPushMessage):

  • UIProcess/Network/NetworkProcessProxy.h:

Tools:

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

(messageDictionary):

  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:

(TestWebKitAPI::createMessageDictionary):
(TestWebKitAPI::sendMessageToDaemon):
(TestWebKitAPI::sendMessageToDaemonWaitingForReply):
(TestWebKitAPI::sendConfigurationWithAuditToken):
(TestWebKitAPI::createAndConfigureConnectionToService):
(TestWebKitAPI::encodeString):
(TestWebKitAPI::TEST):
(TestWebKitAPI::function):

  • TestWebKitAPI/cocoa/TestWKWebView.h:
10:34 PM Changeset in webkit [286763] by Patrick Griffis
  • 7 edits in trunk

CSP: Skip whitespace at beginning of policy header
https://bugs.webkit.org/show_bug.cgi?id=233951

Reviewed by Kate Cheney.

LayoutTests/imported/w3c:

Update expectations as passing.

  • web-platform-tests/content-security-policy/script-src/script-src-strict_dynamic_double_policy_honor_source_expressions.sub-expected.txt:

Source/WebCore:

This should have no practical effect but it fixes matching
the originalPolicy property in WPT results.

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::didReceiveHeader):

LayoutTests:

No longer skip a test and update results to not have leading whitespace.

  • TestExpectations:
  • http/tests/security/contentSecurityPolicy/1.1/script-blocked-sends-multiple-reports-expected.txt:
9:27 PM Changeset in webkit [286762] by Megan Gardner
  • 17 edits in trunk/Source

Show correct content menu for images services chevron.
https://bugs.webkit.org/show_bug.cgi?id=233970

Reviewed by Tim Horton.

Add support for showing the correct context menu for image services.
Since this is internal only and can never be affected by web content, we bypass
the web content round trip and directly message the UIProcess about showing
a context menu for images. And because it would be bizarre if the web content
could prevent a menu from popping up on a button they have no control over.

Source/WebCore:

  • dom/mac/ImageControlsMac.cpp:

(WebCore::ImageControlsMac::isImageControlsButtonElement):
(WebCore::ImageControlsMac::imageFromImageElementNode):
(WebCore::ImageControlsMac::handleEvent):
(WebCore::ImageControlsMac::imageControlHost): Deleted.

  • dom/mac/ImageControlsMac.h:
  • html/HTMLButtonElement.cpp:

(WebCore::HTMLButtonElement::defaultEventHandler):

  • page/ChromeClient.h:

(WebCore::ChromeClient::handleImageServiceClick):

  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::maybeCreateContextMenu):
(WebCore::imageFromImageElementNode): Deleted.

Source/WebKit:

  • Shared/ContextMenuContextData.cpp:

(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::m_selectionIsEditable):
(WebKit::ContextMenuContextData::setImage):
(WebKit::ContextMenuContextData::controlledDataIsEditable const):

  • Shared/ContextMenuContextData.h:

(WebKit::ContextMenuContextData::webHitTestResultData):
(WebKit::ContextMenuContextData::webHitTestResultData const):

  • UIProcess/WebContextMenuProxy.cpp:

(WebKit::WebContextMenuProxy::show):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::contextMenuItemSelected):

  • UIProcess/mac/WebContextMenuProxyMac.mm:

(WebKit::WebContextMenuProxyMac::getShareMenuItem):
(WebKit::WebContextMenuProxyMac::getContextMenuFromItems):
(WebKit::WebContextMenuProxyMac::useContextMenuItems):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::handleContextMenuQuickLookImage):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::handleImageServiceClick):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::handleImageServiceClick):

8:21 PM Changeset in webkit [286761] by Alan Bujtas
  • 1 edit
    1 add in trunk/PerformanceTests

Add layout performance test for simple bidi content with inline boxes
https://bugs.webkit.org/show_bug.cgi?id=234062

Unreviewed.

This is in preparation for enabling IFC bidi handling.

  • Layout/line-layout-simple-bidi-with-inline-boxes.html: Added.
8:17 PM Changeset in webkit [286760] by Alan Bujtas
  • 1 edit
    1 add in trunk/PerformanceTests

Add layout performance test for bidi content with direction override inside inline boxes
https://bugs.webkit.org/show_bug.cgi?id=234064

Unreviewed.

This is in preparation for enabling IFC bidi handling.

  • Layout/line-layout-simple-bidi-with-direction-overrides-in-inline-boxes.html: Added.
8:05 PM Changeset in webkit [286759] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

[MacCatalyst] Fix Mac Catalyst build
https://bugs.webkit.org/show_bug.cgi?id=234067

Unreviewed.

There's a compile error:

Source/WebCore/platform/audio/ios/AudioSessionIOS.mm:247:5: error: 'auto' deduced as 'id' in declaration of 'session' [-Werror,-Wauto-var-id]
auto *session = [PAL::getAVAudioSessionClass() sharedInstance];

No new tests because there is no behavior change.

  • platform/audio/ios/AudioSessionIOS.mm:

(WebCore::setEligibleForSmartRouting):
(WebCore::AudioSessionIOS::setPresentingProcesses):
(WebCore::AudioSessionIOS::setCategory):

6:40 PM Changeset in webkit [286758] by commit-queue@webkit.org
  • 73 edits in trunk/LayoutTests

[WPE] Update test baselines after r284521. Unreviewed test gardening.
https://bugs.webkit.org/show_bug.cgi?id=234023

These are all changes in tag capitalization due to files being
detected as XHTML instead of HTML.

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-12-08

  • platform/wpe/fast/block/positioning/inline-block-relposition-expected.txt:
  • platform/wpe/fast/body-propagation/background-color/001-expected.txt:
  • platform/wpe/fast/body-propagation/background-color/005-expected.txt:
  • platform/wpe/fast/body-propagation/background-image/001-expected.txt:
  • platform/wpe/fast/body-propagation/background-image/005-expected.txt:
  • platform/wpe/fast/body-propagation/background-image/009-expected.txt:
  • platform/wpe/fast/body-propagation/background-image/010-expected.txt:
  • platform/wpe/fast/body-propagation/overflow/005-expected.txt:
  • platform/wpe/fast/text/tatechuyoko-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/background-color-applied-to-rounded-inline-element-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/background-color-border-box-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/background-repeat-space-padding-box-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/background-size-002-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/background-size-applies-to-block-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/background_color_padding_box-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/background_position_three_four_values-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/background_properties_greater_than_images-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/background_repeat_space_border_box-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/background_repeat_space_content_box-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-001-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-002-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-003-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-005-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-006-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-007-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-008-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-009-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-010-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-011-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-012-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-013-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-014-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-015-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-016-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-applies-to-017-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-clip-001-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-clip-002-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-content-edge-001-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-initial-value-001-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-not-inherited-001-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-shorthand-001-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-style-001-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-style-002-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-style-003-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-style-004-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-style-005-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-sum-of-radii-001-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-sum-of-radii-002-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-with-three-values-001-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-radius-with-two-values-001-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-top-left-radius-values-001-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-top-left-radius-values-002-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-top-left-radius-values-003-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-top-left-radius-values-004-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/border-top-right-radius-values-004-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/box-shadow-001-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/box-shadow-002-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/box-shadow-003-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/box-shadow-004-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/color-behind-images-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/none-as-image-layer-expected.txt:
  • platform/wpe/ietestcenter/css3/bordersbackgrounds/order-of-images-expected.txt:
  • platform/wpe/ietestcenter/css3/text/textshadow-001-expected.txt:
  • platform/wpe/ietestcenter/css3/text/textshadow-003-expected.txt:
  • platform/wpe/ietestcenter/css3/text/textshadow-004-expected.txt:
  • platform/wpe/ietestcenter/css3/text/textshadow-005-expected.txt:
  • platform/wpe/ietestcenter/css3/text/textshadow-006-expected.txt:
  • platform/wpe/ietestcenter/css3/text/textshadow-007-expected.txt:
  • platform/wpe/ietestcenter/css3/text/textshadow-008-expected.txt:
  • platform/wpe/ietestcenter/css3/text/textshadow-009-expected.txt:
  • platform/wpe/ietestcenter/css3/text/textshadow-010-expected.txt:
  • platform/wpe/svg/custom/svg-fonts-in-html-expected.txt:
6:35 PM Changeset in webkit [286757] by Kyle Piddington
  • 4 edits in trunk

[MacCatalyst] Update header search paths for ANGLE Catalyst
https://bugs.webkit.org/show_bug.cgi?id=233996

For iOSMac builds, search for ANGLE public headers inside System/iOSSupport

Reviewed by Dean Jackson.

Source/WebKit:

  • Configurations/BaseTarget.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/Base.xcconfig:
6:09 PM Changeset in webkit [286756] by Alan Coon
  • 1 copy in tags/Safari-612.4.2.1.1

Tag Safari-612.4.2.1.1.

6:09 PM Changeset in webkit [286755] by Russell Epstein
  • 1 copy in tags/Safari-612.4.2.0.1

Tag Safari-612.4.2.0.1.

4:50 PM Changeset in webkit [286754] by jer.noble@apple.com
  • 56 edits
    17 copies
    11 adds in trunk

Source/WebCore:
Add an experimental trackConfiguration accessor on AudioTrack & VideoTrack.
https://bugs.webkit.org/show_bug.cgi?id=230841

Reviewed by Eric Carlson.

Add an experimental property on AudioTrack VideoTrack which contains information about the
underlying media track's configuration. The AudioTrackConfiguration is based on
AudioConfiguration from MediaCapabilities. The VideoTrackConfiguration is based on a
combination of the VideoConfiguration from MediaCapabilities and the VideoColorSpace from
WebCodecs.

The AVFoundation implementation of AVTrackPrivateAVFObjCImpl will extract a NAL unit for the
video codec from the CMFormatDescription containing information about the underlying media,
and pass that NAL unit to utility methods in HEVCUtilities (which should probably be
renamed to CodecUntilities) to extract and create codec configuration strings. It will
extract colorspace information from CMFormatDescriptionExtensions found in the format
description. It will extract framerate, bitrate, width and height, sample rate and channel
count information from the underlying AVAssetTrack. There are shortcomings here, as HLS
streams and MSE streams do not generate framerate or bitrate information in the
AVAssetTrack.

Tests: media/track/audio-track-configuration.html

media/track/video-track-configuration.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/webcodecs/VideoColorPrimaries.h:
  • Modules/webcodecs/VideoColorPrimaries.idl:
  • Modules/webcodecs/VideoColorSpace.h:

(WebCore::VideoColorSpace::create):
(WebCore::VideoColorSpace::primaries const):
(WebCore::VideoColorSpace::setPrimaries):
(WebCore::VideoColorSpace::transfer const):
(WebCore::VideoColorSpace::setTransfer):
(WebCore::VideoColorSpace::matrix const):
(WebCore::VideoColorSpace::setMatrix):
(WebCore::VideoColorSpace::fullRange const):
(WebCore::VideoColorSpace::setfFullRange):
(WebCore::VideoColorSpace::VideoColorSpace):

  • Modules/webcodecs/VideoColorSpace.idl:
  • Modules/webcodecs/VideoColorSpaceInit.h:
  • Modules/webcodecs/VideoColorSpaceInit.idl:
  • Modules/webcodecs/VideoMatrixCoefficients.h:
  • Modules/webcodecs/VideoMatrixCoefficients.idl:
  • Modules/webcodecs/VideoTransferCharacteristics.h:
  • Modules/webcodecs/VideoTransferCharacteristics.idl:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • html/track/AudioTrack.cpp:

(WebCore::AudioTrack::AudioTrack):
(WebCore::AudioTrack::setPrivate):
(WebCore::AudioTrack::updateConfigurationFromPrivate):

  • html/track/AudioTrack.h:
  • html/track/AudioTrack.idl:
  • html/track/AudioTrackConfiguration.h:

(WebCore::AudioTrackConfiguration::create):
(WebCore::AudioTrackConfiguration::codec const):
(WebCore::AudioTrackConfiguration::setCodec):
(WebCore::AudioTrackConfiguration::sampleRate const):
(WebCore::AudioTrackConfiguration::setSampleRate):
(WebCore::AudioTrackConfiguration::numberOfChannels const):
(WebCore::AudioTrackConfiguration::setNumberOfChannels):
(WebCore::AudioTrackConfiguration::bitrate const):
(WebCore::AudioTrackConfiguration::setBitrate):
(WebCore::AudioTrackConfiguration::AudioTrackConfiguration):

  • html/track/AudioTrackConfiguration.idl:
  • html/track/VideoTrack.cpp:

(WebCore::VideoTrack::VideoTrack):
(WebCore::VideoTrack::setPrivate):
(WebCore::VideoTrack::updateConfigurationFromPrivate):

  • html/track/VideoTrack.h:
  • html/track/VideoTrack.idl:
  • html/track/VideoTrackConfiguration.h: Added.

(WebCore::VideoTrackConfiguration::create):
(WebCore::VideoTrackConfiguration::codec const):
(WebCore::VideoTrackConfiguration::setCodec):
(WebCore::VideoTrackConfiguration::width const):
(WebCore::VideoTrackConfiguration::setWidth):
(WebCore::VideoTrackConfiguration::height const):
(WebCore::VideoTrackConfiguration::setHeight):
(WebCore::VideoTrackConfiguration::colorSpace const):
(WebCore::VideoTrackConfiguration::setColorSpace):
(WebCore::VideoTrackConfiguration::framerate const):
(WebCore::VideoTrackConfiguration::setFramerate):
(WebCore::VideoTrackConfiguration::bitrate const):
(WebCore::VideoTrackConfiguration::setBitrate):
(WebCore::VideoTrackConfiguration::VideoTrackConfiguration):

  • html/track/VideoTrackConfiguration.idl:
  • platform/graphics/AudioTrackPrivate.h:

(WebCore::AudioTrackPrivate::codec const):
(WebCore::AudioTrackPrivate::setCodec):
(WebCore::AudioTrackPrivate::sampleRate const):
(WebCore::AudioTrackPrivate::setSampleRate):
(WebCore::AudioTrackPrivate::numberOfChannels const):
(WebCore::AudioTrackPrivate::setNumberOfChannels):
(WebCore::AudioTrackPrivate::bitrate const):
(WebCore::AudioTrackPrivate::setBitrate):

  • platform/graphics/HEVCUtilities.cpp:

(WebCore::parseAVCCodecParameters):
(WebCore::createAVCCodecParametersString):
(WebCore::parseAVCDecoderConfigurationRecord):
(WebCore::parseHEVCCodecParameters):
(WebCore::createHEVCCodecParametersString):
(WebCore::parseHEVCDecoderConfigurationRecord):
(WebCore::parseDoViDecoderConfigurationRecord):
(WebCore::createDoViCodecParametersString):

  • platform/graphics/HEVCUtilities.h:
  • platform/graphics/PlatformVideoColorPrimaries.h:
  • platform/graphics/PlatformVideoColorSpace.h:

(WebCore::PlatformVideoColorSpace::encode const):
(WebCore::PlatformVideoColorSpace::decode):

  • platform/graphics/PlatformVideoMatrixCoefficients.h:
  • platform/graphics/PlatformVideoTransferCharacteristics.h:
  • platform/graphics/VideoTrackPrivate.h:

(WebCore::VideoTrackPrivate::codec const):
(WebCore::VideoTrackPrivate::setCodec):
(WebCore::VideoTrackPrivate::width const):
(WebCore::VideoTrackPrivate::setWidth):
(WebCore::VideoTrackPrivate::height const):
(WebCore::VideoTrackPrivate::setHeight):
(WebCore::VideoTrackPrivate::colorSpace const):
(WebCore::VideoTrackPrivate::setColorSpace):
(WebCore::VideoTrackPrivate::framerate const):
(WebCore::VideoTrackPrivate::setFramerate):
(WebCore::VideoTrackPrivate::bitrate const):
(WebCore::VideoTrackPrivate::setBitrate):

  • platform/graphics/VideoTrackPrivateClient.h:
  • platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
  • platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:

(WebCore::assetTrackFor):
(WebCore::formatDescriptionFor):
(WebCore::AVTrackPrivateAVFObjCImpl::codec const):
(WebCore::AVTrackPrivateAVFObjCImpl::width const):
(WebCore::AVTrackPrivateAVFObjCImpl::height const):
(WebCore::AVTrackPrivateAVFObjCImpl::colorSpace const):
(WebCore::AVTrackPrivateAVFObjCImpl::framerate const):
(WebCore::AVTrackPrivateAVFObjCImpl::sampleRate const):
(WebCore::AVTrackPrivateAVFObjCImpl::numberOfChannels const):
(WebCore::AVTrackPrivateAVFObjCImpl::bitrate const):

  • platform/graphics/avfoundation/AudioTrackPrivateAVF.h:

(WebCore::AudioTrackPrivateAVF::kind const): Deleted.
(WebCore::AudioTrackPrivateAVF::id const): Deleted.
(WebCore::AudioTrackPrivateAVF::label const): Deleted.
(WebCore::AudioTrackPrivateAVF::language const): Deleted.
(WebCore::AudioTrackPrivateAVF::trackIndex const): Deleted.

  • platform/graphics/avfoundation/FormatDescriptionUtilities.cpp: Added.

(WebCore::presentationSizeFromFormatDescription):
(WebCore::colorSpaceFromFormatDescription):
(WebCore::codecFromFormatDescription):

  • platform/graphics/avfoundation/FormatDescriptionUtilities.h:
  • platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h:
  • platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:

(WebCore::MediaSelectionOptionAVFObjC::assetTrack const):

  • platform/graphics/avfoundation/VideoTrackPrivateAVF.h:
  • platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:

(WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack):

  • platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:

(WebCore::VideoTrackPrivateAVFObjC::resetPropertiesFromTrack):

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

(WebCore::VideoTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):

  • platform/graphics/cocoa/VideoTrackPrivateWebM.cpp:

(WebCore::VideoTrackPrivateWebM::codec const):
(WebCore::VideoTrackPrivateWebM::width const):
(WebCore::VideoTrackPrivateWebM::height const):
(WebCore::VideoTrackPrivateWebM::framerate const):

  • platform/graphics/cocoa/VideoTrackPrivateWebM.h:

Source/WebCore/PAL:
Add an experimental trackConfiguration accessor on AudioTrack & VideoTrack.
https://bugs.webkit.org/show_bug.cgi?id=230841

Reviewed by Eric Carlson.

  • pal/cf/CoreMediaSoftLink.cpp:
  • pal/cf/CoreMediaSoftLink.h:
  • pal/spi/cocoa/AVFoundationSPI.h:

Source/WebKit:
Add an experimental trackConfiguration accessor on AudioTrack & VideoTrack.
https://bugs.webkit.org/show_bug.cgi?id=230841

Reviewed by Eric Carlson.

  • GPUProcess/media/RemoteAudioTrackProxy.cpp:

(WebKit::RemoteAudioTrackProxy::configuration):

  • GPUProcess/media/RemoteAudioTrackProxy.h:
  • GPUProcess/media/RemoteVideoTrackProxy.cpp:

(WebKit::RemoteVideoTrackProxy::configuration):
(WebKit::RemoteVideoTrackProxy::updateConfiguration):
(WebKit::RemoteVideoTrackProxy::selectedChanged):
(WebKit::RemoteVideoTrackProxy::idChanged):
(WebKit::RemoteVideoTrackProxy::labelChanged):
(WebKit::RemoteVideoTrackProxy::languageChanged):
(WebKit::RemoteVideoTrackProxy::configurationChanged): Deleted.

  • GPUProcess/media/RemoteVideoTrackProxy.h:
  • GPUProcess/media/TrackPrivateRemoteConfiguration.h:

(WebKit::TrackPrivateRemoteConfiguration::encode const):
(WebKit::TrackPrivateRemoteConfiguration::decode):

  • WebProcess/GPU/media/AudioTrackPrivateRemote.cpp:

(WebKit::AudioTrackPrivateRemote::updateConfiguration):

  • WebProcess/GPU/media/AudioTrackPrivateRemote.h:
  • WebProcess/GPU/media/VideoTrackPrivateRemote.cpp:

(WebKit::VideoTrackPrivateRemote::updateConfiguration):

  • WebProcess/GPU/media/VideoTrackPrivateRemote.h:

Source/WTF:
Add an experimental VideoTrackConfiguration class and accessor on VideoTrack
https://bugs.webkit.org/show_bug.cgi?id=230841

Reviewed by Eric Carlson.

Drive-by change: add a Vector::reverseFindMatching convenience method.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
  • wtf/Vector.h:

(WTF::Malloc>::reverseFindMatching const):

LayoutTests:
Add an experimental trackConfiguration accessor on AudioTrack & VideoTrack.
https://bugs.webkit.org/show_bug.cgi?id=230841

Reviewed by Eric Carlson.

  • fast/mediastream/MediaStream-video-element-expected.txt:
  • media/content/test-hevc.mp4: Added.
  • media/hevc-codec-parameters-expected.txt:
  • media/hevc-codec-parameters.html:
  • media/hevc-codec-string-expected.txt: Added.
  • media/hevc-codec-string.html: Added.
  • media/track/audio-track-configuration-expected.txt: Added.
  • media/track/audio-track-configuration.html: Added.
  • media/track/video-track-configuration-expected.txt: Added.
  • media/track/video-track-configuration.html: Added.
4:36 PM Changeset in webkit [286753] by Said Abou-Hallawa
  • 11 edits in trunk/Source

[GPU Process] [Filters] Add the encoding and decoding for SVGFilter
https://bugs.webkit.org/show_bug.cgi?id=234024

Reviewed by Wenson Hsieh.

Source/WebCore:

Add new methods to help encoding and decoding SVGFilter members. Also
add a new constructor for SVGFilter which is going to be called from
FilterReference.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/filters/FilterEffectGeometry.h:

(WebCore::FilterEffectGeometry::encode const):
(WebCore::FilterEffectGeometry::decode):

  • platform/graphics/filters/SourceAlpha.cpp:

(WebCore::SourceAlpha::create):
(WebCore::SourceAlpha::SourceAlpha):

  • platform/graphics/filters/SourceAlpha.h:

The plan is to remove the input effects from FilterEffect. Currently it
is still used but not through FilterEffect::apply(). So it is okay for
now for GPUProcess to create SourceAlpha without input since the input
will not used inside GPUProcess.

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

(WebCore::SVGFilter::create):
(WebCore::SVGFilter::SVGFilter):

  • svg/graphics/filters/SVGFilter.h:

Source/WebKit:

When encoding the SVGFilter we need to encode the individual FilterEffects
in filter.expression(). And for every SVGFilterExpressionTerm we need to
encode the index of its Ref<FilterEffect> in the individual FilterEffects.

When decoding the SVGFilter we do the opposite. We get the Ref<FilterEffect>
which corresponds to index of ExpressionReferenceTerm. We send the decoded
expression to the constructor of SVGFilter.

  • Platform/IPC/FilterReference.h:

(IPC::FilterReference::decodeFilterEffect):
(IPC::FilterReference::ExpressionReferenceTerm::encode const):
(IPC::FilterReference::ExpressionReferenceTerm::decode):
(IPC::FilterReference::encodeSVGFilter):
(IPC::FilterReference::decodeSVGFilter):

4:32 PM Changeset in webkit [286752] by don.olmstead@sony.com
  • 2 edits in trunk/Source/WebCore

[Win] Remove CF when using Windows clipboard
https://bugs.webkit.org/show_bug.cgi?id=194876

Reviewed by Brent Fulgham.

Remove any CF code from ClipboardUtilitiesWin and replace it with WTF code. The
urlFromPath function is deleted since it is no longer relevant.

  • platform/win/ClipboardUtilitiesWin.cpp:

(WebCore::getURL):
(WebCore::urlFromPath): Deleted.

4:19 PM Changeset in webkit [286751] by achristensen@apple.com
  • 17 edits in trunk

Add SPI to load a resource in the context of a page
https://bugs.webkit.org/show_bug.cgi?id=233908

Reviewed by Tim Horton.

Source/WebKit:

This is similar to startDownloadUsingRequest but you don't have to get the data from the disk.
This is similar to NSURLSession's dataTaskWithRequest:completionHandler: but using the same session as the page.
This is needed because LinkPresentation is currently using _getMainResourceDataWithCompletionHandler after loading
in a WKWebView made with _relatedWebView to get the content of a resource, and that's awful and limited to certain mime types.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::requestResource):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::requestResource):

  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::requestResource):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _requestResource:completionHandler:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::requestResource):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::requestResource):

  • UIProcess/WebPageProxy.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:

(TEST):

4:16 PM Changeset in webkit [286750] by Alan Coon
  • 1 edit in branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.h

Revert "Unreviewed build fix. rdar://problem/85928816"

This reverts r286737.

4:11 PM Changeset in webkit [286749] by commit-queue@webkit.org
  • 22 edits in trunk/LayoutTests

[WPE] Update test baselines after r283875, r284194, and r286107
https://bugs.webkit.org/show_bug.cgi?id=234038

Unreviewed test gardening.

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-12-08

  • platform/wpe/fast/dom/52776-expected.txt:
  • platform/wpe/fast/text/basic/014-expected.txt:
  • platform/wpe/fast/text/basic/015-expected.txt:
  • platform/wpe/fast/text/international/bidi-LDB-2-CSS-expected.txt:
  • platform/wpe/fast/text/international/bidi-LDB-2-HTML-expected.txt:
  • platform/wpe/fast/text/international/bidi-LDB-2-formatting-characters-expected.txt:
  • platform/wpe/fast/text/international/bidi-european-terminators-expected.txt:
  • platform/wpe/fast/text/international/bidi-ignored-for-first-child-inline-expected.txt:
  • platform/wpe/fast/text/international/bidi-innertext-expected.txt:
  • platform/wpe/fast/text/international/bidi-listbox-expected.txt:
  • platform/wpe/fast/text/international/bidi-menulist-expected.txt:
  • platform/wpe/fast/text/international/bidi-neutral-run-expected.txt:
  • platform/wpe/fast/text/international/bidi-override-expected.txt:
  • platform/wpe/fast/text/whitespace/004-expected.txt:
  • platform/wpe/fast/text/whitespace/005-expected.txt:
  • platform/wpe/fast/text/whitespace/006-expected.txt:
  • platform/wpe/fast/text/whitespace/007-expected.txt:
  • platform/wpe/fast/text/whitespace/010-expected.txt:
  • platform/wpe/fast/text/whitespace/011-expected.txt:
  • platform/wpe/fast/text/whitespace/015-expected.txt:
  • platform/wpe/fast/text/whitespace/016-expected.txt:
4:07 PM Changeset in webkit [286748] by Alan Coon
  • 1 edit in branches/safari-612-branch/Source/WebKit/UIProcess/WebPageProxy.h

Revert "Unreviewed build fix. rdar://problem/85928816"

This reverts r286739.

4:05 PM Changeset in webkit [286747] by BJ Burg
  • 2 edits in trunk/Source/WebKit

Web Inspector: evaluateScriptForExtension() incorrectly unwraps internal errors, causing an ASSERT
https://bugs.webkit.org/show_bug.cgi?id=233961
<rdar://86123763>

Reviewed by Patrick Angle.

Standardize the unwrapping code based on the evaluateScriptInExtensionTab version, which
correctly handles the case where an internal error is returned by the evaluation.
This happens, for example, when NotImplemented is returned for unsupported evaluation
options.

This particular issue was caused by a lack of support for the 'frameURL' option.
The fix for that is tracked by https://webkit.org/b/222568/.

  • WebProcess/Inspector/WebInspectorUIExtensionController.cpp:

(WebKit::WebInspectorUIExtensionController::evaluateScriptForExtension):

3:49 PM Changeset in webkit [286746] by J Pascoe
  • 6 edits in trunk

[WebAuthn] Consider support for the displayName for FIDO authenticator
https://bugs.webkit.org/show_bug.cgi?id=233389
rdar://84938707

Reviewed by Brent Fulgham.

Source/WebKit:

Start storing the displayName field with the platform authenticator
and add them to the getAllLocalAuthenticatorCredentials SPI.

The displayName is part of the WebAuthn level 2 spec:
https://www.w3.org/TR/webauthn-2/#dom-publickeycredentialuserentity-displayname

  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:

(getAllLocalAuthenticatorCredentialsImpl):

  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:

(WebKit::LocalAuthenticator::continueMakeCredentialAfterUserVerification):

Tools:

Add test for new field stored with platform authenticator: displayName

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST):

3:27 PM Changeset in webkit [286745] by Alan Coon
  • 1 copy in tags/Safari-612.3.6.1.8

Tag Safari-612.3.6.1.8.

3:15 PM Changeset in webkit [286744] by Alan Coon
  • 8 edits in branches/safari-612.3.6.1-branch/Source

Versioning.

WebKit-7612.3.6.1.8.

2:59 PM Changeset in webkit [286743] by jer.noble@apple.com
  • 11 edits
    9 adds in trunk

[VTT] Fix various issues with complicated rendering of VTT cues
https://bugs.webkit.org/show_bug.cgi?id=233901

Reviewed by Eric Carlson.

Source/WebCore:

Tests: media/track/track-webvtt-no-snap-to-lines-overlap.html

media/track/track-webvtt-snap-to-lines-inline-style.html
media/track/track-webvtt-snap-to-lines-left-right.html

When positioning VTT cues, the spec requires UAs to avoid collisions between cues
by detecting that two cues overlap each other. However, WebKit's implementation
looks for collisions between non-displaying portions of the cues; namely the
::-webkit-media-text-track-display element, which is used to position the displaying
portion of the cue. Instead, the UA should look for collisions between the
::-webkit-media-text-track-display-backdrop element, which holds the background
of the cue, if present.

Add a convenience function to retrieve the backdrop element, and another to retrieve
the cue itself.

Add cast macros for RenderVTTCue to allow downcast<>ing. Use this macro to retrieve
other cues's backdrop elements for collision avoidance.

VTTCueBox::applyCSSProperties() had a section for moving cues into place that is entirely
unneeded if VTTCue::getCSSPosition() returns the pre-calculated m_displayPosition.

RenderVTTCue::initializeLayoutParameters() is a careful implementation of the specification,
accurately layout out cues' initial position so that the text run is exactly at the
bottom of the content box. However, if the cue has a border, padding, or extra height,
this will result in the cue being pushed outside the content box. To account for this,
adjust the inital layout parameter by the difference between the cue text size and the
backdrop element size.

RenderVTTCue::layout() will create a LayoutStateMaintainer, which modifies the behavior of
layout machinery during the layout itself. However, certain child renderers get dramatically
incorrect results for absoluteBoundingRect() unless the maintainer explicitly sets disableState.

  • html/track/VTTCue.cpp:

(WebCore::VTTCueBox::applyCSSProperties):
(WebCore::VTTCue::getCSSPosition const):

  • html/track/VTTCue.h:
  • rendering/RenderObject.h:

(WebCore::RenderObject::isRenderVTTCue const):

  • rendering/RenderVTTCue.cpp:

(WebCore::RenderVTTCue::layout):
(WebCore::RenderVTTCue::initializeLayoutParameters):
(WebCore::RenderVTTCue::isOutside const):
(WebCore::RenderVTTCue::overlappingObject const):
(WebCore::RenderVTTCue::overlappingObjectForRect const):
(WebCore::RenderVTTCue::moveIfNecessaryToKeepWithinContainer):
(WebCore::RenderVTTCue::findNonOverlappingPosition const):
(WebCore::RenderVTTCue::repositionGenericCue):
(WebCore::RenderVTTCue::backdropBox const):
(WebCore::RenderVTTCue::cueBox const):

LayoutTests:

  • media/track/captions-webvtt/no-snap-to-lines-overlap.vtt: Added.
  • media/track/captions-webvtt/snap-to-lines-inline-style.vtt: Added.
  • media/track/captions-webvtt/snap-to-lines-left-and-right.vtt: Added.
  • media/track/track-webvtt-no-snap-to-lines-overlap-expected.html: Added.
  • media/track/track-webvtt-no-snap-to-lines-overlap.html: Added.
  • media/track/track-webvtt-snap-to-lines-inline-style-expected.html: Added.
  • media/track/track-webvtt-snap-to-lines-inline-style.html: Added.
  • media/track/track-webvtt-snap-to-lines-left-right-expected.html: Added.
  • media/track/track-webvtt-snap-to-lines-left-right.html: Added.
2:57 PM Changeset in webkit [286742] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

[MSE] Add a Modules/mediasource/README.md file
https://bugs.webkit.org/show_bug.cgi?id=234026
<rdar://problem/86227732>

Reviewed by Eric Carlson.

Follow-up to address review comments.

  • Modules/mediasource/README.md:
2:10 PM Changeset in webkit [286741] by Alan Coon
  • 2 edits in branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess

Apply patch. rdar://problem/85928816

2:08 PM Changeset in webkit [286740] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/WebKit/UIProcess

Apply patch. rdar://problem/85928816

2:08 PM Changeset in webkit [286739] by Alan Coon
  • 1 edit in branches/safari-612-branch/Source/WebKit/UIProcess/WebPageProxy.h

Unreviewed build fix. rdar://problem/85928816

1:39 PM Changeset in webkit [286738] by jer.noble@apple.com
  • 1 edit
    1 add in trunk/Source/WebCore

[MSE] Add a Modules/mediasource/README.md file
https://bugs.webkit.org/show_bug.cgi?id=234026

Reviewed by Eric Carlson.

  • Modules/mediasource/README.md: Added.
1:29 PM Changeset in webkit [286737] by Alan Coon
  • 1 edit in branches/safari-612.4.2.1-branch/Source/WebKit/UIProcess/WebPageProxy.h

Unreviewed build fix. rdar://problem/85928816

1:28 PM Changeset in webkit [286736] by Kyle Piddington
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Update ANGLE changes.diff with new roll.
https://bugs.webkit.org/show_bug.cgi?id=233952

Reviewed by Kenneth Russell.

  • changes.diff:
1:26 PM Changeset in webkit [286735] by Alan Coon
  • 2 edits in branches/safari-612.4.2.1-branch/Source/WebKit

Cherry-pick r286574. rdar://problem/86224832

Regression(r286505) imported/w3c/web-platform-tests/html/cross-origin-opener-policy/javascript-url.https.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=233874

Reviewed by Darin Adler.

r286505 fixed ProvisionalPageProxy so that ProvisionalPageProxy::m_provisionalLoadURL gets properly initialized when the
ProvisionalPageProxy gets constructed *after* the provisional load has already started (COOP proces-swap case). One side
effect of this though is that ProvisionalPageProxy::cancel() no longer returns early and will try to notify the client
that the provisional load failed, dereferencing m_mainFrame in doing so. In the event where the main frame has not yet
been created in the new provisional process, this would do a null-dereference of m_mainFrame.

To address the issue, we now early return in ProvisionalPageProxy::cancel() if m_isProcessSwappingOnNavigationResponse
is true (i.e. The ProvisionalPageProxy was created after the provisional load had started). In such situations, we
don't want to ProvisionalPageProxy to be the one notifying the client of the provisional load failure anyway. The reason
is that there is still a provisional load going on in the committed process/page.

No new tests, covered by existing test that is flakily crashing.

  • UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::cancel):

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

1:26 PM Changeset in webkit [286734] by Alan Coon
  • 3 edits in branches/safari-612.4.2.1-branch/Source/WebKit

Cherry-pick r286671. rdar://problem/85928816

Momentum Event Dispatcher: Momentum tail should have montonically decreasing deltas and tail gaps
https://bugs.webkit.org/show_bug.cgi?id=233993
<rdar://problem/86118367>

Reviewed by Simon Fraser.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::consumeDeltaForCurrentTime): (WebKit::MomentumEventDispatcher::buildOffsetTableWithInitialDelta): (WebKit::MomentumEventDispatcher::computeNextDelta): In order to avoid visual stutter due to integral rounding of the deltas we dispatch in the momentum phase, switch to a table of deltas instead of interpolating along the offset curve during the tail end of the animation (when the rounding makes up a large proportion of each delta).

(WebKit::MomentumEventDispatcher::equalizeTailGaps):
Sort the deltas up until the first zero to ensure a lack of unexpected
perceptual acceleration, and then inject skipped frames in order to
ensure that frames that have effective scroll movement (non-zero deltas)
are always spaced equally-or-further apart than earlier ones, but
never closer together (which, again, would be percieved as acceleration).

(WebKit::MomentumEventDispatcher::handleWheelEvent):
(WebKit::MomentumEventDispatcher::pushLogEntry):
(WebKit::MomentumEventDispatcher::flushLog):
Lastly, adjust some logging to make it easier to tell which row in
the output corresponds to an event delta or generated delta, so it's
easier to find skipped frames.

  • WebProcess/WebPage/MomentumEventDispatcher.h:

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

1:26 PM Changeset in webkit [286733] by Alan Coon
  • 2 edits in branches/safari-612.4.2.1-branch/Source/WebKit

Cherry-pick r286631. rdar://problem/85928816

[Scroll Momentum Generator] Pages lose ability to momentum scroll after dragging between displays
https://bugs.webkit.org/show_bug.cgi?id=233948
rdar://86110813

Reviewed by Tim Horton.

This is a conservative fix for the bug. When a view moves to a new screen, WebPageProxy
needs to unregister for full speed updates using the old displayID, and register
using the new one.

Longer term, it would be better if "full speed updates" was a per-observer concept,
but that would mean registering an observer while wheel events are being received,
which needs a bit more thought.

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

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

1:26 PM Changeset in webkit [286732] by Alan Coon
  • 2 edits in branches/safari-612.4.2.1-branch/Source/WebKit

Cherry-pick r286566. rdar://problem/85928816

Momentum Event Dispatcher: Momentum phase runs backwards with natural scrolling disabled
https://bugs.webkit.org/show_bug.cgi?id=233894
<rdar://problem/86111948>

Reviewed by Simon Fraser.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::consumeDeltaForCurrentTime): Only flip the deltas if the trackpad is configured to use "natural" scrolling (in which "directionInvertedFromDevice" is true).

(WebKit::MomentumEventDispatcher::computeNextDelta):
Fix initial queue state logging to log both axes before setting the "did log" bit.

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

1:26 PM Changeset in webkit [286731] by Alan Coon
  • 6 edits in branches/safari-612.4.2.1-branch

Cherry-pick r286537. rdar://problem/85928816

Add trace points for generated momentum events
https://bugs.webkit.org/show_bug.cgi?id=233857

Reviewed by Tim Horton.

Source/WebKit:

Add start/end points for synthetic momentum, and a trace point for each generated event.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::dispatchSyntheticMomentumEvent): (WebKit::MomentumEventDispatcher::didStartMomentumPhase): (WebKit::MomentumEventDispatcher::didEndMomentumPhase):

Source/WTF:

  • wtf/SystemTracing.h:

Tools:

Add start/end points for synthetic momentum, and a trace point for each generated event.

  • Tracing/SystemTracePoints.plist:

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

1:26 PM Changeset in webkit [286730] by Alan Coon
  • 1 edit in branches/safari-612.4.2.1-branch/Source/WebKit/Shared/mac/MediaFormatReader/MediaFormatReader.cpp

Unreviewed build fix. rdar://problem/85928816

1:26 PM Changeset in webkit [286729] by Alan Coon
  • 1 edit in branches/safari-612.4.2.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp

Unreviewed build fix. rdar://problem/85928816

error: use of undeclared identifier 'isInWebProcess'; did you mean 'WebCore::isInWebProcess'?

1:26 PM Changeset in webkit [286728] by Alan Coon
  • 1 edit in branches/safari-612.4.2.1-branch/Source/WebKit/Shared/mac/MediaFormatReader/MediaFormatReader.cpp

Unreviewed build fix. rdar://problem/85928816

error: member access into incomplete type 'Webcore::SharedBuffer'

1:26 PM Changeset in webkit [286727] by Alan Coon
  • 4 edits in branches/safari-612.4.2.1-branch/Source/WebKit

Cherry-pick r286512. rdar://problem/85928816

Add more logging for MomentumEventDispatcher
https://bugs.webkit.org/show_bug.cgi?id=233811

Reviewed by Simon Fraser.

Add a temporary event log to MomentumEventDispatcher, to debug delta/offset/curve issues.

  • WebProcess/WebPage/EventDispatcher.h: (WebKit::EventDispatcher::queue):
  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::handleWheelEvent): Accumulate event deltas. Also accumulate event deltas for the fingers-down phase in the "generated" offset. Store the phase and momentum phase smooshed into a single field.

(WebKit::MomentumEventDispatcher::dispatchSyntheticMomentumEvent):
Accumulate generated deltas.

(WebKit::MomentumEventDispatcher::didEndMomentumPhase):
Attempt to dump the log 1 second after each momentum phase. We'll skip
it if another scroll has started since.

(WebKit::MomentumEventDispatcher::setScrollingAccelerationCurve):
(WebKit::MomentumEventDispatcher::startDisplayLink):
(WebKit::MomentumEventDispatcher::stopDisplayLink):
(WebKit::MomentumEventDispatcher::consumeDeltaForCurrentTime):
(WebKit::MomentumEventDispatcher::buildOffsetTableWithInitialDelta):
(WebKit::MomentumEventDispatcher::computeNextDelta):
Adopt more MOMENTUM_EVENT_DISPATCHER_TEMPORARY_LOGGING. Error logging
we leave outside of this, because that we'll keep around.

(WebKit::MomentumEventDispatcher::pushLogEntry):
(WebKit::MomentumEventDispatcher::flushLog):
Dump the event log in an easy-to-copy-into-a-CSV format.

  • WebProcess/WebPage/MomentumEventDispatcher.h:

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

1:26 PM Changeset in webkit [286726] by Alan Coon
  • 2 edits in branches/safari-612.4.2.1-branch/Source/WTF

Cherry-pick r286504. rdar://problem/85928816

Enable Momentum Event Generator by default
https://bugs.webkit.org/show_bug.cgi?id=233807
<rdar://problem/85262515>

Reviewed by Simon Fraser.

  • Scripts/Preferences/WebPreferencesInternal.yaml: Turn it on for modern WebKit. Adjust the description slightly.

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

1:26 PM Changeset in webkit [286725] by Alan Coon
  • 16 edits in branches/safari-612.4.2.1-branch/Source

Cherry-pick r285526. rdar://problem/85928816

Add runtime flag for momentum scrolling
https://bugs.webkit.org/show_bug.cgi?id=232898
<rdar://problem/85211338>

Reviewed by Simon Fraser.

  • Scripts/Preferences/WebPreferencesInternal.yaml: Add the preference.
  • page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::setFrameScrollingNodeState):
  • page/scrolling/ScrollingStateFrameScrollingNode.cpp: (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode): (WebCore::ScrollingStateFrameScrollingNode::applicableProperties const): (WebCore::ScrollingStateFrameScrollingNode::setMomentumScrollingAnimatorEnabled):
  • page/scrolling/ScrollingStateFrameScrollingNode.h:
  • page/scrolling/ScrollingStateNode.h:
  • page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::commitTreeState):
  • page/scrolling/ScrollingTree.h: (WebCore::ScrollingTree::momentumScrollingAnimatorEnabled const): (WebCore::ScrollingTree::setMomentumScrollingAnimatorEnabled):
  • page/scrolling/ScrollingTreeScrollingNode.cpp: (WebCore::ScrollingTreeScrollingNode::momentumScrollingAnimatorEnabled const):
  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm: (WebCore::ScrollingTreeScrollingNodeDelegateMac::momentumScrollingAnimatorEnabled const):
  • platform/ScrollingEffectsController.h: (WebCore::ScrollingEffectsControllerClient::momentumScrollingAnimatorEnabled const):
  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp: (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode): (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):

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

1:26 PM Changeset in webkit [286724] by Alan Coon
  • 6 edits in branches/safari-612.4.2.1-branch/Source/WebKit

Cherry-pick r286483. rdar://problem/85928816

MomentumEventDispatcher curve sometimes doesn't match the system curve
https://bugs.webkit.org/show_bug.cgi?id=233801
<rdar://problem/85870287>

Reviewed by Simon Fraser.

Three small changes to get us closer to the system curve:

1) Fetch the momentum event dispatch interval from the system, and use
it to scale the momentum start event's delta (which we use as our
initial velocity) into the "ideal" curve's frame rate (which is always
60fps regardless).

2) Back-date the animation start time to the fingers-down phase end event,
so that the momentum start phase has a delta. This seems to match what
the system does.

3) Switch to MonotonicTime for the animation time, since it doesn't need
to be in the same timebase as events (which are oddly in WallTime), and
certainly should be monotonic.

  • Shared/ScrollingAccelerationCurve.cpp: (WebKit::ScrollingAccelerationCurve::ScrollingAccelerationCurve): (WebKit::ScrollingAccelerationCurve::interpolate): (WebKit::ScrollingAccelerationCurve::encode const): (WebKit::ScrollingAccelerationCurve::decode): (WebKit::operator<<):
  • Shared/ScrollingAccelerationCurve.h: (WebKit::ScrollingAccelerationCurve::frameRate): (WebKit::ScrollingAccelerationCurve::operator== const):
  • Shared/mac/ScrollingAccelerationCurveMac.mm: (WebKit::fromIOHIDCurve): (WebKit::fromIOHIDCurveArrayWithAcceleration): (WebKit::fromIOHIDDevice): Fetch and propagate the dispatch frame rate. This isn't *really* a ScrollingAccelerationCurve property, but neither is resolution; this is just currently the only place we look up HID properties and push them to the Web Content process; some re-architecture is warranted here in the future.
  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::handleWheelEvent): Keep track of the last fingers-down phase ended event timestamp.

(WebKit::MomentumEventDispatcher::didStartMomentumPhase):
Backdate the start time so that the first event has the appropriate delta.
Divide out the dispatch frame rate so that the initial velocity is
as if the curve were running at 60fps (since we *will* run it at 60fps and interpolate).

(WebKit::MomentumEventDispatcher::didEndMomentumPhase):
(WebKit::MomentumEventDispatcher::consumeDeltaForTime):
(WebKit::MomentumEventDispatcher::displayWasRefreshed):
Factor the consume-a-delta-from-the-ideal-curve code out from displayWasRefreshed
so we can use it in the start phase too.

(WebKit::MomentumEventDispatcher::offsetAtTime):
(WebKit::MomentumEventDispatcher::computeNextDelta):
Rename idealCurveFrameRate->idealCurveFrameInterval for accuracy.

  • WebProcess/WebPage/MomentumEventDispatcher.h:

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

1:25 PM Changeset in webkit [286723] by Alan Coon
  • 6 edits in branches/safari-612.4.2.1-branch/Source

Cherry-pick r286481. rdar://problem/85928816

A Safari tab can rarely get stuck in a state where rendering updates stop happening
https://bugs.webkit.org/show_bug.cgi?id=233784
rdar://85445072

Reviewed by Chris Dumez.

Sometimes a Safari tab can get into a state where rendering updates cease to happen,
which manifests as partially broken scrolling, blank tiles revealed when scrolling,
and somewhat broken page updates. I was able to sometimes reproduce this by clicking
on links in eBay emails from Mail on a system with two displays.

From the one time I reproduce with logging, the output indicated that DisplayRefreshMonitor::displayLinkFired()
would early return because isPreviousFrameDone() was false. The only way for that to occur,
barring memory corruption, is if DisplayRefreshMonitorMac::dispatchDisplayDidRefresh() returned early,
which it does if the callback comes twice in a single event loop; this may explain the rarity.

So fix DisplayRefreshMonitorMac::dispatchDisplayDidRefresh() call setIsPreviousFrameDone(true)
so the next callback can make progress

Also add some locking annotations and fix one missing lock, and some release logging.

Source/WebCore:

  • platform/graphics/DisplayRefreshMonitor.cpp: (WebCore::DisplayRefreshMonitor::stop): (WebCore::DisplayRefreshMonitor::firedAndReachedMaxUnscheduledFireCount): (WebCore::DisplayRefreshMonitor::displayLinkFired):
  • platform/graphics/DisplayRefreshMonitor.h: (WebCore::DisplayRefreshMonitor::WTF_REQUIRES_LOCK): (WebCore::DisplayRefreshMonitor::WTF_GUARDED_BY_LOCK): (WebCore::DisplayRefreshMonitor::setMaxUnscheduledFireCount): Deleted. (WebCore::DisplayRefreshMonitor::isScheduled const): Deleted. (WebCore::DisplayRefreshMonitor::setIsScheduled): Deleted. (WebCore::DisplayRefreshMonitor::isPreviousFrameDone const): Deleted. (WebCore::DisplayRefreshMonitor::setIsPreviousFrameDone): Deleted.

Source/WebKit:

  • WebProcess/WebPage/mac/DisplayRefreshMonitorMac.cpp: (WebKit::DisplayRefreshMonitorMac::dispatchDisplayDidRefresh):

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

1:25 PM Changeset in webkit [286722] by Alan Coon
  • 3 edits in branches/safari-612.4.2.1-branch/Source/WebKit

Cherry-pick r286380. rdar://problem/85928816

Unreviewed build fixes after r286346.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::startDisplayLink): (WebKit::MomentumEventDispatcher::displayWasRefreshed): (WebKit::MomentumEventDispatcher::didReceiveScrollEventWithInterval): (WebKit::MomentumEventDispatcher::buildOffsetTableWithInitialDelta): (WebKit::MomentumEventDispatcher::offsetAtTime): (WebKit::momentumDecayRate): (WebKit::MomentumEventDispatcher::computeNextDelta):
  • WebProcess/WebPage/MomentumEventDispatcher.h:

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

1:25 PM Changeset in webkit [286721] by Alan Coon
  • 1 edit in branches/safari-612.4.2.1-branch/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp

Unreviewed, speculative build fix for r286410. rdar://problem/85928816

Remove reference to serviceScrollAnimations.

1:25 PM Changeset in webkit [286720] by Alan Coon
  • 3 edits in branches/safari-612.4.2.1-branch/Source/WebCore

Cherry-pick r286410. rdar://problem/85928816

Scrolling complex websites can stutter: scrolling thread commit can get blocked on scroll synchronization
https://bugs.webkit.org/show_bug.cgi?id=233738
rdar://85880147

Reviewed by Tim Horton.

The scroll synchronization added in r261985 can cause dropped frames while scrolling. This
occurs when ThreadedScrollingTree::waitForRenderingUpdateCompletionOrTimeout(), which is
called at the start of a rendering update on the main thread, starts at a time when it will
delay the handling of displayDidRefreshOnScrollingThread(). This can result in delaying the
CA commit for that frame on the scrolling thread.

The solution is to clamp the duration that waitForRenderingUpdateCompletionOrTimeout() waits
on the condition, so that it doesn't exceed the next expected display refresh time.

  • page/scrolling/ThreadedScrollingTree.cpp: (WebCore::ThreadedScrollingTree::waitForRenderingUpdateCompletionOrTimeout): (WebCore::ThreadedScrollingTree::displayDidRefreshOnScrollingThread):
  • page/scrolling/ThreadedScrollingTree.h:

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

1:25 PM Changeset in webkit [286719] by Alan Coon
  • 3 edits in branches/safari-612.4.2.1-branch/Source/WebCore

Cherry-pick r286411. rdar://problem/85928816

Scrolling complex websites can stutter: scrolling thread frame can fail to process wheel events
https://bugs.webkit.org/show_bug.cgi?id=233739
rdar://85946176

Reviewed by Tim Horton.

While the scrolling thread is chilling in
ThreadedScrollingTree::waitForRenderingUpdateCompletionOrTimeout(), waiting up to half a
frame to allow the main thread to handle the commit (for scroll synchronization), wheel
events may have been dispatched to the scrolling thread.

If we blow the timeout and commit anyway, we need to make sure we've handled these wheel
events first, so that the current frame can commit some layer movement. We can achieve this
by dispatching the applyLayerPositions(), which will enqueue it behind any waiting wheel
event dispatch from EventDispatcher::internalWheelEvent().

  • page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::applyLayerPositions):
  • page/scrolling/ThreadedScrollingTree.cpp: (WebCore::ThreadedScrollingTree::waitForRenderingUpdateCompletionOrTimeout):

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

1:25 PM Changeset in webkit [286718] by Alan Coon
  • 4 edits in branches/safari-612.4.2.1-branch/Source/WebCore

Cherry-pick r286352. rdar://problem/85928816

Custom application of r286352 to introduce frameDuration() for a future patch.

Pass the timestamp for scrolling thread animations through all the serviceScrollAnimation() calls
https://bugs.webkit.org/show_bug.cgi?id=233678

Reviewed by Tim Horton.

Source/WebCore:

All scroll animations serviced at the same time should use a common timestamp, and
avoid multiple calls to MonotonicTime::now() by passing the time down through from
ThreadedScrollingTree::displayDidRefreshOnScrollingThread().

Also minor refactoring in ThreadedScrollingTree to prepare for a future patch.

  • page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::nominalFramesPerSecond):
  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/ScrollingTreeScrollingNodeDelegate.h:
  • page/scrolling/ThreadedScrollingTree.cpp: (WebCore::ThreadedScrollingTree::frameDuration): (WebCore::ThreadedScrollingTree::maxAllowableRenderingUpdateDurationForSynchronization): (WebCore::ThreadedScrollingTree::serviceScrollAnimations): (WebCore::ThreadedScrollingTree::displayDidRefreshOnScrollingThread):
  • page/scrolling/ThreadedScrollingTree.h:
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: (WebCore::ScrollingTreeFrameScrollingNodeMac::serviceScrollAnimation):
  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h:
  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm: (WebCore::ScrollingTreeOverflowScrollingNodeMac::serviceScrollAnimation):
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm: (WebCore::ScrollingTreeScrollingNodeDelegateMac::serviceScrollAnimation):
  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp: (WebCore::ScrollingTreeFrameScrollingNodeNicosia::serviceScrollAnimation):
  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h:
  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp: (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::serviceScrollAnimation):
  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h:
  • page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp: (WebCore::ScrollingTreeScrollingNodeDelegateNicosia::serviceScrollAnimation):
  • page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.h:

Source/WebKit:

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:

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

1:25 PM Changeset in webkit [286717] by Alan Coon
  • 16 edits
    5 adds in branches/safari-612.4.2.1-branch/Source

Cherry-pick r286346. rdar://problem/85928816

Add a momentum event synthesizer
https://bugs.webkit.org/show_bug.cgi?id=233653
<rdar://problem/85571258>

Reviewed by Simon Fraser.

Source/WebCore/PAL:

  • pal/spi/mac/IOKitSPIMac.h: Add some SPI.

Source/WebKit:

  • Platform/Logging.h: Add ScrollAnimations log channel to WebKit (it already exists in WebCore).
  • Shared/ScrollingAccelerationCurve.cpp: Added. (WebKit::ScrollingAccelerationCurve::ScrollingAccelerationCurve): (WebKit::ScrollingAccelerationCurve::interpolate): (WebKit::ScrollingAccelerationCurve::computeIntermediateValuesIfNeeded): (WebKit::ScrollingAccelerationCurve::evaluateQuartic): (WebKit::ScrollingAccelerationCurve::accelerationFactor): (WebKit::ScrollingAccelerationCurve::encode const): (WebKit::ScrollingAccelerationCurve::decode): (WebKit::operator<<): (WebKit::ScrollingAccelerationCurve::fromNativeWheelEvent):
  • Shared/ScrollingAccelerationCurve.h: Added. (WebKit::ScrollingAccelerationCurve::operator== const): (WebKit::ScrollingAccelerationCurve::operator!= const): Add a class that represents a quartic scrolling acceleration curve with a trailing linear tangent region, and allows interpolation between curves and evaluation of the curve at a point.
  • Shared/mac/ScrollingAccelerationCurveMac.mm: Added. (WebKit::fromFixedPoint): (WebKit::readFixedPointParameter): (WebKit::fromIOHIDCurve): (WebKit::fromIOHIDCurveArrayWithAcceleration): (WebKit::ScrollingAccelerationCurve::fromNativeWheelEvent): Given a NativeWebWheelEvent, extract its underlying platform event and fetch the ScrollingAccelerationCurve for the originating device.
  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::handleWheelEvent): Fetch the current ScrollingAccelerationCurve on each momentum begin event, if the feature is enabled.

(WebKit::WebPageProxy::sendWheelEvent):
Send the ScrollingAccelerationCurve to EventDispatcher just before
we send the momentum begin event along, if it has changed.

(WebKit::WebPageProxy::windowScreenDidChange):
Keep EventDispatcher apprised of changes to the current screen of the page.

(WebKit::WebPageProxy::resetState):

  • UIProcess/WebPageProxy.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::EventDispatcher): (WebKit::EventDispatcher::internalWheelEvent): Factor most of wheelEvent out into internalWheelEvent, so that MomentumEventDispatcher can call internalWheelEvent(), skipping the code in wheelEvent() that forwards the event... to MomentumEventDispatcher.

Also, keep track of where the event came from (UI process or MomentumEventDispatcher)
and avoid sending didReceiveEvent replies to the UI process for synthetic
events that it doesn't know about.

(WebKit::EventDispatcher::wheelEvent):
Forward wheel events to MomentumEventDispatcher.

(WebKit::EventDispatcher::setScrollingAccelerationCurve):
Forward scrolling curve changes to MomentumEventDispatcher.

(WebKit::EventDispatcher::displayWasRefreshed):
Forward display refresh callbacks to MomentumEventDispatcher.

(WebKit::EventDispatcher::windowScreenDidChange):
Forward page screen changes to MomentumEventDispatcher.

  • WebProcess/WebPage/EventDispatcher.h:
  • WebProcess/WebPage/EventDispatcher.messages.in:
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::wheelEvent): (WebKit::WebPage::dispatchWheelEventWithoutScrolling):
  • WebProcess/WebPage/WebPage.h: Don't send didReceiveEvent for synthetic events from the main thread either.
  • WebProcess/WebPage/MomentumEventDispatcher.cpp: Added. (WebKit::MomentumEventDispatcher::MomentumEventDispatcher): (WebKit::MomentumEventDispatcher::~MomentumEventDispatcher): (WebKit::MomentumEventDispatcher::eventShouldStartSyntheticMomentumPhase const): If we have everything we need (a scrolling curve - which also implies that the setting is enabled - and raw platform deltas), and the event is a momentum begin event, we can use it to start a synthetic momentum phase.

(WebKit::MomentumEventDispatcher::handleWheelEvent):
Start or stop the momentum phase as appropriate.
Record any incoming fingers-down phase events in a rolling event history structure.
Block platform-event-driven events from being further handled by WebKit
if we are inside a synthetic momentum phase, since we'll be replacing them.

(WebKit::appKitScrollMultiplierForEvent):
Determine the AppKit scroll muliplier ("accelerated" vs "unaccelerated"
deltas in NSEvent parlance) from the event via division.

(WebKit::MomentumEventDispatcher::dispatchSyntheticMomentumEvent):
Dispatch a synthetic event with the given momentum phase and delta.
We borrow some properties from the event that initiated the momentum
phase (e.g. the position), and some from whatever event we've most
recently seen (even if we told the rest of WebKit to ignore it), so
that we get the most up-to-date state for e.g. the keyboard modifiers.

(WebKit::MomentumEventDispatcher::didStartMomentumPhase):
Record relevant information about the start event, generate the
momentum curve, and start a full-rate display link. Also, send a momentum
begin event, since we blocked the real one.

(WebKit::MomentumEventDispatcher::didEndMomentumPhase):
Send a momentum ended event, shut down the display link, and reset all
per-gesture state.

(WebKit::MomentumEventDispatcher::setScrollingAccelerationCurve):
Store ScrollingAccelerationCurves on a per-page basis.

(WebKit::MomentumEventDispatcher::displayID const):
Look up the displayID for the current gesture's page.

(WebKit::MomentumEventDispatcher::startDisplayLink):
(WebKit::MomentumEventDispatcher::stopDisplayLink):
Start and stop a display link, which will - in a roundabout manner -
eventually call back into displayWasRefreshed.

(WebKit::MomentumEventDispatcher::windowScreenDidChange):
Store DisplayIDs on a per-page basis.

(WebKit::MomentumEventDispatcher::displayWasRefreshed):
When the display link calls us back, emit a single momentum changed
event of sufficient delta to move us to the desired offset along the curve.

(WebKit::MomentumEventDispatcher::didScrollWithInterval):
(WebKit::MomentumEventDispatcher::didScroll):
Record incoming scrolling events into a rolling history deque.

(WebKit::MomentumEventDispatcher::buildOffsetTableWithInitialDelta):
Compute the offsets for the entire "ideal curve" table (at 60Hz) by
running the animation and accumulating the deltas.

(WebKit::interpolate):
(WebKit::MomentumEventDispatcher::offsetAtTime):
Interpolate along the "ideal curve" to determine the intended offset
at a given time.

(WebKit::momentumDecayRate):
(WebKit::MomentumEventDispatcher::computeNextDelta):
Compute the next delta given a delta (and the event history) by applying
a bit of exponential decay and then passing it through the
ScrollingAccelerationCurve. We return both the unaccelerated
and accelerated deltas, because the input to the next iteration of
computeNextDelta is the unaccelerated delta, but the delta applied
to the actual scroll position is the accelerated delta.

  • WebProcess/WebPage/MomentumEventDispatcher.h: Added.

Source/WTF:

  • wtf/PlatformEnable.h: Add an ENABLE().

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

1:25 PM Changeset in webkit [286716] by Alan Coon
  • 16 edits in branches/safari-612.4.2.1-branch/Source

Cherry-pick r283353. rdar://problem/85928816

Simplify some scrolling-related code in WebKit with use of RectEdges<bool>
https://bugs.webkit.org/show_bug.cgi?id=231037

Reviewed by Tim Horton.

Source/WebCore:

Export edgePinnedState().

  • platform/ScrollableArea.h:

Source/WebKit:

Use RectEdges<bool> in code that tracks rubber banding state, and edge pinned state.

  • Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<RectEdges<bool>>::encode): (IPC::ArgumentCoder<RectEdges<bool>>::decode):
  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/API/C/WKPage.cpp: (WKPageIsPinnedToLeftSide): (WKPageIsPinnedToRightSide): (WKPageIsPinnedToTopSide): (WKPageIsPinnedToBottomSide): (WKPageRubberBandsAtLeft): (WKPageRubberBandsAtRight): (WKPageRubberBandsAtTop): (WKPageRubberBandsAtBottom):
  • UIProcess/Cocoa/WebViewImpl.mm: (WebKit::toWKRectEdge): (WebKit::toRectEdges): (WebKit::WebViewImpl::pinnedState): (WebKit::WebViewImpl::rubberBandingEnabled): (WebKit::WebViewImpl::setRubberBandingEnabled):
  • UIProcess/ViewGestureController.cpp: (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::sendWheelEvent): (WebKit::WebPageProxy::setRubberBandsAtLeft): (WebKit::WebPageProxy::setRubberBandsAtRight): (WebKit::WebPageProxy::setRubberBandsAtTop): (WebKit::WebPageProxy::setRubberBandsAtBottom): (WebKit::WebPageProxy::didCommitLoadForFrame): (WebKit::WebPageProxy::resetState): (WebKit::WebPageProxy::didChangeScrollOffsetPinningForMainFrame): (WebKit::WebPageProxy::rubberBandsAtLeft const): Deleted. (WebKit::WebPageProxy::rubberBandsAtRight const): Deleted. (WebKit::WebPageProxy::rubberBandsAtTop const): Deleted. (WebKit::WebPageProxy::rubberBandsAtBottom const): Deleted.
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::wheelEvent):
  • WebProcess/WebPage/EventDispatcher.h:
  • WebProcess/WebPage/EventDispatcher.messages.in:
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updateMainFrameScrollOffsetPinning):
  • WebProcess/WebPage/WebPage.h:

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

1:25 PM Changeset in webkit [286715] by Alan Coon
  • 2 edits in branches/safari-612.4.2.1-branch/Tools

Cherry-pick r286368. rdar://problem/85928816

REGRESSION (r286346): ResourceLoadDelegate.LoadInfo fails
https://bugs.webkit.org/show_bug.cgi?id=233689

Reviewed by Simon Fraser.

  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadDelegate.mm: This test asserts that archiving a _WKResourceLoadInfo via NSKeyedArchiver encodes to a particular size (607 bytes).

If you look at the resultant plist before r286346, the encoded frameID
and resourceLoadID have the same value, and because of NSKeyedArchiver
deduplication, share the same object.

If you look at the resultant plist *after* r286346, the encoded frameID
is one larger than the resourceLoadID, thus cannot be deduplicated, and
end up encoding as separate objects. This results in the encoded size
increasing to 612 bytes.

The reason that the encoded frameID is now one value larger is that
ObjectIdentifier uses a global identifier pool, and r286346 creates
one more ObjectIdentifier during EventHandler construction, destroying
our entirely coincidental ID overlap, and causing the aforementioned
encoded size change.

Remove this assertion from the test, since it is very aggressive and
seems unnecessary. We could instead just rebaseline the test, but it
seems insufficiently important to burden some future developer with
a repeat of this evening of exploration and discovery.

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

1:25 PM Changeset in webkit [286714] by Alan Coon
  • 2 edits in branches/safari-612.4.2.1-branch/Source/WebKit

Cherry-pick r286277. rdar://problem/85928816

Fix the build

  • Shared/ios/WebIOSEventFactory.mm: (WebIOSEventFactory::createWebWheelEvent):

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

1:25 PM Changeset in webkit [286713] by Alan Coon
  • 10 edits in branches/safari-612.4.2.1-branch/Source

Cherry-pick r286270. rdar://problem/85928816

Plumb raw platform scrolling deltas along in wheel events
https://bugs.webkit.org/show_bug.cgi?id=233583

Reviewed by Simon Fraser.

Source/WebCore:

  • platform/PlatformWheelEvent.cpp: (WebCore::PlatformWheelEvent::createFromGesture):
  • platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::rawPlatformDelta const):
  • PAL/pal/spi/mac/IOKitSPIMac.h:

Source/WebKit:

  • Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
  • Shared/WebWheelEvent.cpp: (WebKit::WebWheelEvent::WebWheelEvent): (WebKit::WebWheelEvent::encode const): (WebKit::WebWheelEvent::decode):
  • Shared/WebWheelEvent.h: (WebKit::WebWheelEvent::rawPlatformDelta const):
  • Shared/WebWheelEventCoalescer.cpp: (WebKit::WebWheelEventCoalescer::coalesce):
  • Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebWheelEvent): Extract and plumb raw unaccelerated (in the HID sense) deltas in scroll events for use in a future patch.

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

1:25 PM Changeset in webkit [286712] by Alan Coon
  • 16 edits in branches/safari-612.4.2.1-branch/Source

Cherry-pick r285790. rdar://problem/85928816

Attach IOHIDEvent timestamps to wheel events
https://bugs.webkit.org/show_bug.cgi?id=233051

Reviewed by Wenson Hsieh.
Source/WebCore:

On some macOS devices, there can be significant deltas between NSEvent timestamps,
and the timestamps on underlying IOHIDEvents (rdar://85309639). This makes momentum
velocity computation unpredictable; we can get better results by using IOHIDEvent
timestamps.

  • platform/PlatformWheelEvent.cpp: (WebCore::PlatformWheelEvent::createFromGesture):
  • platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::ioHIDEventTimestamp const):
  • platform/mac/PlatformEventFactoryMac.h:
  • platform/mac/PlatformEventFactoryMac.mm: (WebCore::eventTimeStampSince1970): (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder): (WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder): (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):

Source/WebCore/PAL:

Expose a few bits of SPI needed.

  • pal/spi/cg/CoreGraphicsSPI.h:
  • pal/spi/cocoa/IOKitSPI.h:

Source/WebKit:

On some macOS devices, there can be significant deltas between NSEvent timestamps,
and the timestamps on underlying IOHIDEvents (rdar://85309639). This makes momentum
velocity computation unpredictable; we can get better results by using IOHIDEvent
timestamps.

  • Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
  • Shared/WebWheelEvent.cpp: (WebKit::WebWheelEvent::WebWheelEvent): (WebKit::WebWheelEvent::encode const): (WebKit::WebWheelEvent::decode):
  • Shared/WebWheelEvent.h: (WebKit::WebWheelEvent::ioHIDEventTimestamp const):
  • Shared/WebWheelEventCoalescer.cpp: (WebKit::WebWheelEventCoalescer::coalesce):
  • Shared/ios/WebIOSEventFactory.mm: (WebIOSEventFactory::createWebWheelEvent):
  • Shared/mac/NativeWebGestureEventMac.mm:
  • Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent):

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

1:25 PM Changeset in webkit [286711] by Alan Coon
  • 8 edits
    1 copy in branches/safari-612.4.2.1-branch/Source/WebCore

Cherry-pick r285786. rdar://problem/85928816

Clean up IOKit SPI headers
https://bugs.webkit.org/show_bug.cgi?id=233093

Reviewed by Simon Fraser.

Source/WebCore:

  • platform/gamepad/cocoa/GameControllerGamepadProvider.mm:
  • platform/gamepad/mac/HIDGamepadProvider.h:
  • platform/gamepad/mac/HIDGamepadProvider.mm:

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/spi/cg/CoreGraphicsSPI.h:
  • pal/spi/cocoa/IOKitSPI.h:
  • pal/spi/ios/IOKitSPIIOS.h: Added.
  • pal/spi/mac/IOKitSPIMac.h: IOKit vends a much different set of public API on iOS vs. macOS, so we have separate SPI headers to reduce the confusion.

Unfortunately, the SPI header for iOS was not explicitly named as such,
and started being used in some macOS code. For a while, this didn't lead
to any trouble because the aforementioned macOS code didn't ALSO have
the public SDK headers included, but a future patch from Simon will
use IOKitSPI.h in a place where the macOS IOKit public headers are included,
and thus we must make the split more explicit.

Rename IOKitSPI.h to IOKitSPIIOS.h; make IOKitSPI choose the right one.
Add some SPI defintions to IOKitSPIMac.h that were missing (which the
dependent code was getting via the iOS header on macOS).

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

1:19 PM Changeset in webkit [286710] by Russell Epstein
  • 3 edits in branches/safari-613.1.11-branch/Source/WebKit

Cherry-pick r286671. rdar://problem/86226565

Momentum Event Dispatcher: Momentum tail should have montonically decreasing deltas and tail gaps
https://bugs.webkit.org/show_bug.cgi?id=233993
<rdar://problem/86118367>

Reviewed by Simon Fraser.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::consumeDeltaForCurrentTime): (WebKit::MomentumEventDispatcher::buildOffsetTableWithInitialDelta): (WebKit::MomentumEventDispatcher::computeNextDelta): In order to avoid visual stutter due to integral rounding of the deltas we dispatch in the momentum phase, switch to a table of deltas instead of interpolating along the offset curve during the tail end of the animation (when the rounding makes up a large proportion of each delta).

(WebKit::MomentumEventDispatcher::equalizeTailGaps):
Sort the deltas up until the first zero to ensure a lack of unexpected
perceptual acceleration, and then inject skipped frames in order to
ensure that frames that have effective scroll movement (non-zero deltas)
are always spaced equally-or-further apart than earlier ones, but
never closer together (which, again, would be percieved as acceleration).

(WebKit::MomentumEventDispatcher::handleWheelEvent):
(WebKit::MomentumEventDispatcher::pushLogEntry):
(WebKit::MomentumEventDispatcher::flushLog):
Lastly, adjust some logging to make it easier to tell which row in
the output corresponds to an event delta or generated delta, so it's
easier to find skipped frames.

  • WebProcess/WebPage/MomentumEventDispatcher.h:

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

1:06 PM Changeset in webkit [286709] by Truitt Savell
  • 63 edits
    1 copy
    1 move
    1 delete in trunk

Unreviewed, reverting r286596.

broke 2 tests on iOS

Reverted changeset:

"Cocoa WebGL should support UI side compositing"
https://bugs.webkit.org/show_bug.cgi?id=231009
https://commits.webkit.org/r286596

12:46 PM Changeset in webkit [286708] by don.olmstead@sony.com
  • 4 edits in trunk/Source/WebCore

[Win] WebCore::cfHDropFormat implementation is not CF specific
https://bugs.webkit.org/show_bug.cgi?id=234021

Reviewed by Alex Christensen.

The implementation of cfHDropFormat was guarded by USE(CF) but there is nothing CF specific
about the implementation. Drop the guards around it and any of its callers.

Renaming CFData functions to HDropData to better represent the underlying Windows type for
the clipboard and make sure its not mistaken for CoreFoundation functionality.

  • platform/win/ClipboardUtilitiesWin.cpp:

(WebCore::getWebLocData):
(WebCore::getHDropData):
(WebCore::setHDropData):
(WebCore::getClipboardMap):
(WebCore::getCFData): Deleted.
(WebCore::setCFData): Deleted.

  • platform/win/DragDataWin.cpp:

(WebCore::DragData::containsFiles const):
(WebCore::DragData::numberOfFiles const):
(WebCore::DragData::asFilenames const):

  • platform/win/PasteboardWin.cpp:

(WebCore::Pasteboard::read):
(WebCore::writeFileToDataObject):

12:44 PM Changeset in webkit [286707] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r286574. rdar://problem/86224832

Regression(r286505) imported/w3c/web-platform-tests/html/cross-origin-opener-policy/javascript-url.https.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=233874

Reviewed by Darin Adler.

r286505 fixed ProvisionalPageProxy so that ProvisionalPageProxy::m_provisionalLoadURL gets properly initialized when the
ProvisionalPageProxy gets constructed *after* the provisional load has already started (COOP proces-swap case). One side
effect of this though is that ProvisionalPageProxy::cancel() no longer returns early and will try to notify the client
that the provisional load failed, dereferencing m_mainFrame in doing so. In the event where the main frame has not yet
been created in the new provisional process, this would do a null-dereference of m_mainFrame.

To address the issue, we now early return in ProvisionalPageProxy::cancel() if m_isProcessSwappingOnNavigationResponse
is true (i.e. The ProvisionalPageProxy was created after the provisional load had started). In such situations, we
don't want to ProvisionalPageProxy to be the one notifying the client of the provisional load failure anyway. The reason
is that there is still a provisional load going on in the committed process/page.

No new tests, covered by existing test that is flakily crashing.

  • UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::cancel):

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

12:34 PM Changeset in webkit [286706] by Russell Epstein
  • 8 edits in branches/safari-612.4.2.3-branch/Source

Versioning.

WebKit-7612.4.2.3.1

12:34 PM Changeset in webkit [286705] by Truitt Savell
  • 40 edits in trunk/Source

Unreviewed, reverting r286632.

Broke 3 tests on iOS

Reverted changeset:

"Add a DOMPasteAccessCategory to control which pasteboard
the WebProcess is granted access to when pasting"
https://bugs.webkit.org/show_bug.cgi?id=233939
https://commits.webkit.org/r286632

12:31 PM Changeset in webkit [286704] by Russell Epstein
  • 8 edits in branches/safari-612.4.2.2-branch/Source

Versioning.

WebKit-7612.4.2.2.1

12:27 PM Changeset in webkit [286703] by commit-queue@webkit.org
  • 18 edits
    21 adds in trunk

Support WebAssembly.Memory imports in Wasm/ESM modules.
https://bugs.webkit.org/show_bug.cgi?id=184745

Patch by Asumu Takikawa <asumu@igalia.com> on 2021-12-08
Reviewed by Yusuke Suzuki.

JSTests:

  • wasm/modules/wasm-imports-js-exports.js:

(then):

  • wasm/modules/wasm-imports-js-exports/memory-fail-1.js: Added.
  • wasm/modules/wasm-imports-js-exports/memory-fail-1.wasm: Added.
  • wasm/modules/wasm-imports-js-exports/memory-fail-1.wat: Added.
  • wasm/modules/wasm-imports-js-exports/memory-fail-2.js: Added.
  • wasm/modules/wasm-imports-js-exports/memory-fail-2.wasm: Added.
  • wasm/modules/wasm-imports-js-exports/memory-fail-2.wat: Added.
  • wasm/modules/wasm-imports-js-exports/memory-fail-3.js: Added.
  • wasm/modules/wasm-imports-js-exports/memory-fail-3.wasm: Added.
  • wasm/modules/wasm-imports-js-exports/memory-fail-3.wat: Added.
  • wasm/modules/wasm-imports-js-exports/memory-fail-4.js: Added.
  • wasm/modules/wasm-imports-js-exports/memory-fail-4.wasm: Added.
  • wasm/modules/wasm-imports-js-exports/memory-fail-4.wat: Added.
  • wasm/modules/wasm-imports-js-exports/memory-fail-5.js: Added.
  • wasm/modules/wasm-imports-js-exports/memory-fail-5.wasm: Added.
  • wasm/modules/wasm-imports-js-exports/memory-fail-5.wat: Added.
  • wasm/modules/wasm-imports-js-exports/memory.js: Added.

(export.setMemory):

  • wasm/modules/wasm-imports-js-exports/memory.wasm: Added.
  • wasm/modules/wasm-imports-js-exports/memory.wat: Added.
  • wasm/modules/wasm-imports-js-exports/shared-memory.js: Added.
  • wasm/modules/wasm-imports-js-exports/shared-memory.wasm: Added.
  • wasm/modules/wasm-imports-js-exports/shared-memory.wat: Added.
  • wasm/modules/wasm-imports-js-re-exports-wasm-exports.js:
  • wasm/modules/wasm-imports-js-re-exports-wasm-exports/imports.wasm:
  • wasm/modules/wasm-imports-js-re-exports-wasm-exports/imports.wat:
  • wasm/modules/wasm-imports-js-re-exports-wasm-exports/re-export.js:
  • wasm/modules/wasm-imports-js-re-exports-wasm-exports/sum.wasm:
  • wasm/modules/wasm-imports-js-re-exports-wasm-exports/sum.wat:

Source/JavaScriptCore:

Changes how Wasm code is initialized for modules that are loaded
by the module loader and have memory imports. The initial code for
the LLInt tier is copied to all memory modes, so that the memory
import can be initialized after compilation. When LLInt is turned
off, the compilation of B3/Air code is delayed until the memory is
initialized.

  • wasm/WasmCodeBlock.cpp:

(JSC::Wasm::CodeBlock::createFromExisting):
(JSC::Wasm::CodeBlock::CodeBlock):

  • wasm/WasmCodeBlock.h:
  • wasm/WasmInstance.h:

(JSC::Wasm::Instance::finalizeCreation):
(JSC::Wasm::Instance::module const):
(JSC::Wasm::Instance::codeBlock const):
(JSC::Wasm::Instance::memory const):
(JSC::Wasm::Instance::isImportFunction const):
(JSC::Wasm::Instance::module): Deleted.
(JSC::Wasm::Instance::codeBlock): Deleted.
(JSC::Wasm::Instance::memory): Deleted.

  • wasm/WasmModule.cpp:

(JSC::Wasm::Module::copyInitialCodeBlockToAllMemoryModes):

  • wasm/WasmModule.h:
  • wasm/js/JSWebAssembly.cpp:

(JSC::instantiate):

  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::finalizeCreation):
(JSC::JSWebAssemblyInstance::tryCreate):

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

(JSC::WebAssemblyModuleRecord::initializeImportsAndExports):

12:27 PM Changeset in webkit [286702] by Russell Epstein
  • 8 edits in branches/safari-612.4.2.1-branch/Source

Versioning.

WebKit-7612.4.2.1.1

12:24 PM Changeset in webkit [286701] by Alan Coon
  • 3 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r286671. rdar://problem/85928816

Momentum Event Dispatcher: Momentum tail should have montonically decreasing deltas and tail gaps
https://bugs.webkit.org/show_bug.cgi?id=233993
<rdar://problem/86118367>

Reviewed by Simon Fraser.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::consumeDeltaForCurrentTime): (WebKit::MomentumEventDispatcher::buildOffsetTableWithInitialDelta): (WebKit::MomentumEventDispatcher::computeNextDelta): In order to avoid visual stutter due to integral rounding of the deltas we dispatch in the momentum phase, switch to a table of deltas instead of interpolating along the offset curve during the tail end of the animation (when the rounding makes up a large proportion of each delta).

(WebKit::MomentumEventDispatcher::equalizeTailGaps):
Sort the deltas up until the first zero to ensure a lack of unexpected
perceptual acceleration, and then inject skipped frames in order to
ensure that frames that have effective scroll movement (non-zero deltas)
are always spaced equally-or-further apart than earlier ones, but
never closer together (which, again, would be percieved as acceleration).

(WebKit::MomentumEventDispatcher::handleWheelEvent):
(WebKit::MomentumEventDispatcher::pushLogEntry):
(WebKit::MomentumEventDispatcher::flushLog):
Lastly, adjust some logging to make it easier to tell which row in
the output corresponds to an event delta or generated delta, so it's
easier to find skipped frames.

  • WebProcess/WebPage/MomentumEventDispatcher.h:

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

12:24 PM Changeset in webkit [286700] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r286631. rdar://problem/85928816

[Scroll Momentum Generator] Pages lose ability to momentum scroll after dragging between displays
https://bugs.webkit.org/show_bug.cgi?id=233948
rdar://86110813

Reviewed by Tim Horton.

This is a conservative fix for the bug. When a view moves to a new screen, WebPageProxy
needs to unregister for full speed updates using the old displayID, and register
using the new one.

Longer term, it would be better if "full speed updates" was a per-observer concept,
but that would mean registering an observer while wheel events are being received,
which needs a bit more thought.

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

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

12:23 PM Changeset in webkit [286699] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r286566. rdar://problem/85928816

Momentum Event Dispatcher: Momentum phase runs backwards with natural scrolling disabled
https://bugs.webkit.org/show_bug.cgi?id=233894
<rdar://problem/86111948>

Reviewed by Simon Fraser.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::consumeDeltaForCurrentTime): Only flip the deltas if the trackpad is configured to use "natural" scrolling (in which "directionInvertedFromDevice" is true).

(WebKit::MomentumEventDispatcher::computeNextDelta):
Fix initial queue state logging to log both axes before setting the "did log" bit.

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

12:23 PM Changeset in webkit [286698] by Alan Coon
  • 6 edits in branches/safari-612-branch

Cherry-pick r286537. rdar://problem/85928816

Add trace points for generated momentum events
https://bugs.webkit.org/show_bug.cgi?id=233857

Reviewed by Tim Horton.

Source/WebKit:

Add start/end points for synthetic momentum, and a trace point for each generated event.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::dispatchSyntheticMomentumEvent): (WebKit::MomentumEventDispatcher::didStartMomentumPhase): (WebKit::MomentumEventDispatcher::didEndMomentumPhase):

Source/WTF:

  • wtf/SystemTracing.h:

Tools:

Add start/end points for synthetic momentum, and a trace point for each generated event.

  • Tracing/SystemTracePoints.plist:

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

12:23 PM Changeset in webkit [286697] by Alan Coon
  • 1 edit in branches/safari-612-branch/Source/WebKit/Shared/mac/MediaFormatReader/MediaFormatReader.cpp

Unreviewed build fix. rdar://problem/85928816

12:23 PM Changeset in webkit [286696] by Alan Coon
  • 1 edit in branches/safari-612-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp

Unreviewed build fix. rdar://problem/85928816

error: use of undeclared identifier 'isInWebProcess'; did you mean 'WebCore::isInWebProcess'?

12:23 PM Changeset in webkit [286695] by Alan Coon
  • 1 edit in branches/safari-612-branch/Source/WebKit/Shared/mac/MediaFormatReader/MediaFormatReader.cpp

Unreviewed build fix. rdar://problem/85928816

error: member access into incomplete type 'Webcore::SharedBuffer'

12:23 PM Changeset in webkit [286694] by Alan Coon
  • 4 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r286512. rdar://problem/85928816

Add more logging for MomentumEventDispatcher
https://bugs.webkit.org/show_bug.cgi?id=233811

Reviewed by Simon Fraser.

Add a temporary event log to MomentumEventDispatcher, to debug delta/offset/curve issues.

  • WebProcess/WebPage/EventDispatcher.h: (WebKit::EventDispatcher::queue):
  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::handleWheelEvent): Accumulate event deltas. Also accumulate event deltas for the fingers-down phase in the "generated" offset. Store the phase and momentum phase smooshed into a single field.

(WebKit::MomentumEventDispatcher::dispatchSyntheticMomentumEvent):
Accumulate generated deltas.

(WebKit::MomentumEventDispatcher::didEndMomentumPhase):
Attempt to dump the log 1 second after each momentum phase. We'll skip
it if another scroll has started since.

(WebKit::MomentumEventDispatcher::setScrollingAccelerationCurve):
(WebKit::MomentumEventDispatcher::startDisplayLink):
(WebKit::MomentumEventDispatcher::stopDisplayLink):
(WebKit::MomentumEventDispatcher::consumeDeltaForCurrentTime):
(WebKit::MomentumEventDispatcher::buildOffsetTableWithInitialDelta):
(WebKit::MomentumEventDispatcher::computeNextDelta):
Adopt more MOMENTUM_EVENT_DISPATCHER_TEMPORARY_LOGGING. Error logging
we leave outside of this, because that we'll keep around.

(WebKit::MomentumEventDispatcher::pushLogEntry):
(WebKit::MomentumEventDispatcher::flushLog):
Dump the event log in an easy-to-copy-into-a-CSV format.

  • WebProcess/WebPage/MomentumEventDispatcher.h:

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

12:23 PM Changeset in webkit [286693] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/WTF

Cherry-pick r286504. rdar://problem/85928816

Enable Momentum Event Generator by default
https://bugs.webkit.org/show_bug.cgi?id=233807
<rdar://problem/85262515>

Reviewed by Simon Fraser.

  • Scripts/Preferences/WebPreferencesInternal.yaml: Turn it on for modern WebKit. Adjust the description slightly.

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

12:23 PM Changeset in webkit [286692] by Alan Coon
  • 16 edits in branches/safari-612-branch/Source

Cherry-pick r285526. rdar://problem/85928816

Add runtime flag for momentum scrolling
https://bugs.webkit.org/show_bug.cgi?id=232898
<rdar://problem/85211338>

Reviewed by Simon Fraser.

  • Scripts/Preferences/WebPreferencesInternal.yaml: Add the preference.
  • page/scrolling/AsyncScrollingCoordinator.cpp: (WebCore::AsyncScrollingCoordinator::setFrameScrollingNodeState):
  • page/scrolling/ScrollingStateFrameScrollingNode.cpp: (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode): (WebCore::ScrollingStateFrameScrollingNode::applicableProperties const): (WebCore::ScrollingStateFrameScrollingNode::setMomentumScrollingAnimatorEnabled):
  • page/scrolling/ScrollingStateFrameScrollingNode.h:
  • page/scrolling/ScrollingStateNode.h:
  • page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::commitTreeState):
  • page/scrolling/ScrollingTree.h: (WebCore::ScrollingTree::momentumScrollingAnimatorEnabled const): (WebCore::ScrollingTree::setMomentumScrollingAnimatorEnabled):
  • page/scrolling/ScrollingTreeScrollingNode.cpp: (WebCore::ScrollingTreeScrollingNode::momentumScrollingAnimatorEnabled const):
  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm: (WebCore::ScrollingTreeScrollingNodeDelegateMac::momentumScrollingAnimatorEnabled const):
  • platform/ScrollingEffectsController.h: (WebCore::ScrollingEffectsControllerClient::momentumScrollingAnimatorEnabled const):
  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp: (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode): (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):

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

12:23 PM Changeset in webkit [286691] by Alan Coon
  • 6 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r286483. rdar://problem/85928816

MomentumEventDispatcher curve sometimes doesn't match the system curve
https://bugs.webkit.org/show_bug.cgi?id=233801
<rdar://problem/85870287>

Reviewed by Simon Fraser.

Three small changes to get us closer to the system curve:

1) Fetch the momentum event dispatch interval from the system, and use
it to scale the momentum start event's delta (which we use as our
initial velocity) into the "ideal" curve's frame rate (which is always
60fps regardless).

2) Back-date the animation start time to the fingers-down phase end event,
so that the momentum start phase has a delta. This seems to match what
the system does.

3) Switch to MonotonicTime for the animation time, since it doesn't need
to be in the same timebase as events (which are oddly in WallTime), and
certainly should be monotonic.

  • Shared/ScrollingAccelerationCurve.cpp: (WebKit::ScrollingAccelerationCurve::ScrollingAccelerationCurve): (WebKit::ScrollingAccelerationCurve::interpolate): (WebKit::ScrollingAccelerationCurve::encode const): (WebKit::ScrollingAccelerationCurve::decode): (WebKit::operator<<):
  • Shared/ScrollingAccelerationCurve.h: (WebKit::ScrollingAccelerationCurve::frameRate): (WebKit::ScrollingAccelerationCurve::operator== const):
  • Shared/mac/ScrollingAccelerationCurveMac.mm: (WebKit::fromIOHIDCurve): (WebKit::fromIOHIDCurveArrayWithAcceleration): (WebKit::fromIOHIDDevice): Fetch and propagate the dispatch frame rate. This isn't *really* a ScrollingAccelerationCurve property, but neither is resolution; this is just currently the only place we look up HID properties and push them to the Web Content process; some re-architecture is warranted here in the future.
  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::handleWheelEvent): Keep track of the last fingers-down phase ended event timestamp.

(WebKit::MomentumEventDispatcher::didStartMomentumPhase):
Backdate the start time so that the first event has the appropriate delta.
Divide out the dispatch frame rate so that the initial velocity is
as if the curve were running at 60fps (since we *will* run it at 60fps and interpolate).

(WebKit::MomentumEventDispatcher::didEndMomentumPhase):
(WebKit::MomentumEventDispatcher::consumeDeltaForTime):
(WebKit::MomentumEventDispatcher::displayWasRefreshed):
Factor the consume-a-delta-from-the-ideal-curve code out from displayWasRefreshed
so we can use it in the start phase too.

(WebKit::MomentumEventDispatcher::offsetAtTime):
(WebKit::MomentumEventDispatcher::computeNextDelta):
Rename idealCurveFrameRate->idealCurveFrameInterval for accuracy.

  • WebProcess/WebPage/MomentumEventDispatcher.h:

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

12:23 PM Changeset in webkit [286690] by Alan Coon
  • 6 edits in branches/safari-612-branch/Source

Cherry-pick r286481. rdar://problem/85928816

A Safari tab can rarely get stuck in a state where rendering updates stop happening
https://bugs.webkit.org/show_bug.cgi?id=233784
rdar://85445072

Reviewed by Chris Dumez.

Sometimes a Safari tab can get into a state where rendering updates cease to happen,
which manifests as partially broken scrolling, blank tiles revealed when scrolling,
and somewhat broken page updates. I was able to sometimes reproduce this by clicking
on links in eBay emails from Mail on a system with two displays.

From the one time I reproduce with logging, the output indicated that DisplayRefreshMonitor::displayLinkFired()
would early return because isPreviousFrameDone() was false. The only way for that to occur,
barring memory corruption, is if DisplayRefreshMonitorMac::dispatchDisplayDidRefresh() returned early,
which it does if the callback comes twice in a single event loop; this may explain the rarity.

So fix DisplayRefreshMonitorMac::dispatchDisplayDidRefresh() call setIsPreviousFrameDone(true)
so the next callback can make progress

Also add some locking annotations and fix one missing lock, and some release logging.

Source/WebCore:

  • platform/graphics/DisplayRefreshMonitor.cpp: (WebCore::DisplayRefreshMonitor::stop): (WebCore::DisplayRefreshMonitor::firedAndReachedMaxUnscheduledFireCount): (WebCore::DisplayRefreshMonitor::displayLinkFired):
  • platform/graphics/DisplayRefreshMonitor.h: (WebCore::DisplayRefreshMonitor::WTF_REQUIRES_LOCK): (WebCore::DisplayRefreshMonitor::WTF_GUARDED_BY_LOCK): (WebCore::DisplayRefreshMonitor::setMaxUnscheduledFireCount): Deleted. (WebCore::DisplayRefreshMonitor::isScheduled const): Deleted. (WebCore::DisplayRefreshMonitor::setIsScheduled): Deleted. (WebCore::DisplayRefreshMonitor::isPreviousFrameDone const): Deleted. (WebCore::DisplayRefreshMonitor::setIsPreviousFrameDone): Deleted.

Source/WebKit:

  • WebProcess/WebPage/mac/DisplayRefreshMonitorMac.cpp: (WebKit::DisplayRefreshMonitorMac::dispatchDisplayDidRefresh):

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

12:23 PM Changeset in webkit [286689] by Alan Coon
  • 3 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r286380. rdar://problem/85928816

Unreviewed build fixes after r286346.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::startDisplayLink): (WebKit::MomentumEventDispatcher::displayWasRefreshed): (WebKit::MomentumEventDispatcher::didReceiveScrollEventWithInterval): (WebKit::MomentumEventDispatcher::buildOffsetTableWithInitialDelta): (WebKit::MomentumEventDispatcher::offsetAtTime): (WebKit::momentumDecayRate): (WebKit::MomentumEventDispatcher::computeNextDelta):
  • WebProcess/WebPage/MomentumEventDispatcher.h:

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

12:23 PM Changeset in webkit [286688] by Alan Coon
  • 1 edit in branches/safari-612-branch/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp

Unreviewed, speculative build fix for r286410. rdar://problem/85928816

Remove reference to serviceScrollAnimations.

12:23 PM Changeset in webkit [286687] by Alan Coon
  • 3 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r286410. rdar://problem/85928816

Scrolling complex websites can stutter: scrolling thread commit can get blocked on scroll synchronization
https://bugs.webkit.org/show_bug.cgi?id=233738
rdar://85880147

Reviewed by Tim Horton.

The scroll synchronization added in r261985 can cause dropped frames while scrolling. This
occurs when ThreadedScrollingTree::waitForRenderingUpdateCompletionOrTimeout(), which is
called at the start of a rendering update on the main thread, starts at a time when it will
delay the handling of displayDidRefreshOnScrollingThread(). This can result in delaying the
CA commit for that frame on the scrolling thread.

The solution is to clamp the duration that waitForRenderingUpdateCompletionOrTimeout() waits
on the condition, so that it doesn't exceed the next expected display refresh time.

  • page/scrolling/ThreadedScrollingTree.cpp: (WebCore::ThreadedScrollingTree::waitForRenderingUpdateCompletionOrTimeout): (WebCore::ThreadedScrollingTree::displayDidRefreshOnScrollingThread):
  • page/scrolling/ThreadedScrollingTree.h:

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

12:23 PM Changeset in webkit [286686] by Alan Coon
  • 3 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r286411. rdar://problem/85928816

Scrolling complex websites can stutter: scrolling thread frame can fail to process wheel events
https://bugs.webkit.org/show_bug.cgi?id=233739
rdar://85946176

Reviewed by Tim Horton.

While the scrolling thread is chilling in
ThreadedScrollingTree::waitForRenderingUpdateCompletionOrTimeout(), waiting up to half a
frame to allow the main thread to handle the commit (for scroll synchronization), wheel
events may have been dispatched to the scrolling thread.

If we blow the timeout and commit anyway, we need to make sure we've handled these wheel
events first, so that the current frame can commit some layer movement. We can achieve this
by dispatching the applyLayerPositions(), which will enqueue it behind any waiting wheel
event dispatch from EventDispatcher::internalWheelEvent().

  • page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::applyLayerPositions):
  • page/scrolling/ThreadedScrollingTree.cpp: (WebCore::ThreadedScrollingTree::waitForRenderingUpdateCompletionOrTimeout):

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

12:23 PM Changeset in webkit [286685] by Russell Epstein
  • 8 edits in branches/safari-612.4.2.0-branch/Source

Versioning.

WebKit-7612.4.2.0.1

12:23 PM Changeset in webkit [286684] by Alan Coon
  • 4 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r286352. rdar://problem/85928816

Custom application of r286352 to introduce frameDuration() for a future patch.

Pass the timestamp for scrolling thread animations through all the serviceScrollAnimation() calls
https://bugs.webkit.org/show_bug.cgi?id=233678

Reviewed by Tim Horton.

Source/WebCore:

All scroll animations serviced at the same time should use a common timestamp, and
avoid multiple calls to MonotonicTime::now() by passing the time down through from
ThreadedScrollingTree::displayDidRefreshOnScrollingThread().

Also minor refactoring in ThreadedScrollingTree to prepare for a future patch.

  • page/scrolling/ScrollingTree.cpp: (WebCore::ScrollingTree::nominalFramesPerSecond):
  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/ScrollingTreeScrollingNodeDelegate.h:
  • page/scrolling/ThreadedScrollingTree.cpp: (WebCore::ThreadedScrollingTree::frameDuration): (WebCore::ThreadedScrollingTree::maxAllowableRenderingUpdateDurationForSynchronization): (WebCore::ThreadedScrollingTree::serviceScrollAnimations): (WebCore::ThreadedScrollingTree::displayDidRefreshOnScrollingThread):
  • page/scrolling/ThreadedScrollingTree.h:
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: (WebCore::ScrollingTreeFrameScrollingNodeMac::serviceScrollAnimation):
  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h:
  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm: (WebCore::ScrollingTreeOverflowScrollingNodeMac::serviceScrollAnimation):
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm: (WebCore::ScrollingTreeScrollingNodeDelegateMac::serviceScrollAnimation):
  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp: (WebCore::ScrollingTreeFrameScrollingNodeNicosia::serviceScrollAnimation):
  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h:
  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp: (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::serviceScrollAnimation):
  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h:
  • page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.cpp: (WebCore::ScrollingTreeScrollingNodeDelegateNicosia::serviceScrollAnimation):
  • page/scrolling/nicosia/ScrollingTreeScrollingNodeDelegateNicosia.h:

Source/WebKit:

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:

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

12:23 PM Changeset in webkit [286683] by Alan Coon
  • 16 edits
    5 adds in branches/safari-612-branch/Source

Cherry-pick r286346. rdar://problem/85928816

Add a momentum event synthesizer
https://bugs.webkit.org/show_bug.cgi?id=233653
<rdar://problem/85571258>

Reviewed by Simon Fraser.

Source/WebCore/PAL:

  • pal/spi/mac/IOKitSPIMac.h: Add some SPI.

Source/WebKit:

  • Platform/Logging.h: Add ScrollAnimations log channel to WebKit (it already exists in WebCore).
  • Shared/ScrollingAccelerationCurve.cpp: Added. (WebKit::ScrollingAccelerationCurve::ScrollingAccelerationCurve): (WebKit::ScrollingAccelerationCurve::interpolate): (WebKit::ScrollingAccelerationCurve::computeIntermediateValuesIfNeeded): (WebKit::ScrollingAccelerationCurve::evaluateQuartic): (WebKit::ScrollingAccelerationCurve::accelerationFactor): (WebKit::ScrollingAccelerationCurve::encode const): (WebKit::ScrollingAccelerationCurve::decode): (WebKit::operator<<): (WebKit::ScrollingAccelerationCurve::fromNativeWheelEvent):
  • Shared/ScrollingAccelerationCurve.h: Added. (WebKit::ScrollingAccelerationCurve::operator== const): (WebKit::ScrollingAccelerationCurve::operator!= const): Add a class that represents a quartic scrolling acceleration curve with a trailing linear tangent region, and allows interpolation between curves and evaluation of the curve at a point.
  • Shared/mac/ScrollingAccelerationCurveMac.mm: Added. (WebKit::fromFixedPoint): (WebKit::readFixedPointParameter): (WebKit::fromIOHIDCurve): (WebKit::fromIOHIDCurveArrayWithAcceleration): (WebKit::ScrollingAccelerationCurve::fromNativeWheelEvent): Given a NativeWebWheelEvent, extract its underlying platform event and fetch the ScrollingAccelerationCurve for the originating device.
  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::handleWheelEvent): Fetch the current ScrollingAccelerationCurve on each momentum begin event, if the feature is enabled.

(WebKit::WebPageProxy::sendWheelEvent):
Send the ScrollingAccelerationCurve to EventDispatcher just before
we send the momentum begin event along, if it has changed.

(WebKit::WebPageProxy::windowScreenDidChange):
Keep EventDispatcher apprised of changes to the current screen of the page.

(WebKit::WebPageProxy::resetState):

  • UIProcess/WebPageProxy.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::EventDispatcher): (WebKit::EventDispatcher::internalWheelEvent): Factor most of wheelEvent out into internalWheelEvent, so that MomentumEventDispatcher can call internalWheelEvent(), skipping the code in wheelEvent() that forwards the event... to MomentumEventDispatcher.

Also, keep track of where the event came from (UI process or MomentumEventDispatcher)
and avoid sending didReceiveEvent replies to the UI process for synthetic
events that it doesn't know about.

(WebKit::EventDispatcher::wheelEvent):
Forward wheel events to MomentumEventDispatcher.

(WebKit::EventDispatcher::setScrollingAccelerationCurve):
Forward scrolling curve changes to MomentumEventDispatcher.

(WebKit::EventDispatcher::displayWasRefreshed):
Forward display refresh callbacks to MomentumEventDispatcher.

(WebKit::EventDispatcher::windowScreenDidChange):
Forward page screen changes to MomentumEventDispatcher.

  • WebProcess/WebPage/EventDispatcher.h:
  • WebProcess/WebPage/EventDispatcher.messages.in:
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::wheelEvent): (WebKit::WebPage::dispatchWheelEventWithoutScrolling):
  • WebProcess/WebPage/WebPage.h: Don't send didReceiveEvent for synthetic events from the main thread either.
  • WebProcess/WebPage/MomentumEventDispatcher.cpp: Added. (WebKit::MomentumEventDispatcher::MomentumEventDispatcher): (WebKit::MomentumEventDispatcher::~MomentumEventDispatcher): (WebKit::MomentumEventDispatcher::eventShouldStartSyntheticMomentumPhase const): If we have everything we need (a scrolling curve - which also implies that the setting is enabled - and raw platform deltas), and the event is a momentum begin event, we can use it to start a synthetic momentum phase.

(WebKit::MomentumEventDispatcher::handleWheelEvent):
Start or stop the momentum phase as appropriate.
Record any incoming fingers-down phase events in a rolling event history structure.
Block platform-event-driven events from being further handled by WebKit
if we are inside a synthetic momentum phase, since we'll be replacing them.

(WebKit::appKitScrollMultiplierForEvent):
Determine the AppKit scroll muliplier ("accelerated" vs "unaccelerated"
deltas in NSEvent parlance) from the event via division.

(WebKit::MomentumEventDispatcher::dispatchSyntheticMomentumEvent):
Dispatch a synthetic event with the given momentum phase and delta.
We borrow some properties from the event that initiated the momentum
phase (e.g. the position), and some from whatever event we've most
recently seen (even if we told the rest of WebKit to ignore it), so
that we get the most up-to-date state for e.g. the keyboard modifiers.

(WebKit::MomentumEventDispatcher::didStartMomentumPhase):
Record relevant information about the start event, generate the
momentum curve, and start a full-rate display link. Also, send a momentum
begin event, since we blocked the real one.

(WebKit::MomentumEventDispatcher::didEndMomentumPhase):
Send a momentum ended event, shut down the display link, and reset all
per-gesture state.

(WebKit::MomentumEventDispatcher::setScrollingAccelerationCurve):
Store ScrollingAccelerationCurves on a per-page basis.

(WebKit::MomentumEventDispatcher::displayID const):
Look up the displayID for the current gesture's page.

(WebKit::MomentumEventDispatcher::startDisplayLink):
(WebKit::MomentumEventDispatcher::stopDisplayLink):
Start and stop a display link, which will - in a roundabout manner -
eventually call back into displayWasRefreshed.

(WebKit::MomentumEventDispatcher::windowScreenDidChange):
Store DisplayIDs on a per-page basis.

(WebKit::MomentumEventDispatcher::displayWasRefreshed):
When the display link calls us back, emit a single momentum changed
event of sufficient delta to move us to the desired offset along the curve.

(WebKit::MomentumEventDispatcher::didScrollWithInterval):
(WebKit::MomentumEventDispatcher::didScroll):
Record incoming scrolling events into a rolling history deque.

(WebKit::MomentumEventDispatcher::buildOffsetTableWithInitialDelta):
Compute the offsets for the entire "ideal curve" table (at 60Hz) by
running the animation and accumulating the deltas.

(WebKit::interpolate):
(WebKit::MomentumEventDispatcher::offsetAtTime):
Interpolate along the "ideal curve" to determine the intended offset
at a given time.

(WebKit::momentumDecayRate):
(WebKit::MomentumEventDispatcher::computeNextDelta):
Compute the next delta given a delta (and the event history) by applying
a bit of exponential decay and then passing it through the
ScrollingAccelerationCurve. We return both the unaccelerated
and accelerated deltas, because the input to the next iteration of
computeNextDelta is the unaccelerated delta, but the delta applied
to the actual scroll position is the accelerated delta.

  • WebProcess/WebPage/MomentumEventDispatcher.h: Added.

Source/WTF:

  • wtf/PlatformEnable.h: Add an ENABLE().

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

12:23 PM Changeset in webkit [286682] by Alan Coon
  • 16 edits in branches/safari-612-branch/Source

Cherry-pick r283353. rdar://problem/85928816

Simplify some scrolling-related code in WebKit with use of RectEdges<bool>
https://bugs.webkit.org/show_bug.cgi?id=231037

Reviewed by Tim Horton.

Source/WebCore:

Export edgePinnedState().

  • platform/ScrollableArea.h:

Source/WebKit:

Use RectEdges<bool> in code that tracks rubber banding state, and edge pinned state.

  • Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<RectEdges<bool>>::encode): (IPC::ArgumentCoder<RectEdges<bool>>::decode):
  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/API/C/WKPage.cpp: (WKPageIsPinnedToLeftSide): (WKPageIsPinnedToRightSide): (WKPageIsPinnedToTopSide): (WKPageIsPinnedToBottomSide): (WKPageRubberBandsAtLeft): (WKPageRubberBandsAtRight): (WKPageRubberBandsAtTop): (WKPageRubberBandsAtBottom):
  • UIProcess/Cocoa/WebViewImpl.mm: (WebKit::toWKRectEdge): (WebKit::toRectEdges): (WebKit::WebViewImpl::pinnedState): (WebKit::WebViewImpl::rubberBandingEnabled): (WebKit::WebViewImpl::setRubberBandingEnabled):
  • UIProcess/ViewGestureController.cpp: (WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::sendWheelEvent): (WebKit::WebPageProxy::setRubberBandsAtLeft): (WebKit::WebPageProxy::setRubberBandsAtRight): (WebKit::WebPageProxy::setRubberBandsAtTop): (WebKit::WebPageProxy::setRubberBandsAtBottom): (WebKit::WebPageProxy::didCommitLoadForFrame): (WebKit::WebPageProxy::resetState): (WebKit::WebPageProxy::didChangeScrollOffsetPinningForMainFrame): (WebKit::WebPageProxy::rubberBandsAtLeft const): Deleted. (WebKit::WebPageProxy::rubberBandsAtRight const): Deleted. (WebKit::WebPageProxy::rubberBandsAtTop const): Deleted. (WebKit::WebPageProxy::rubberBandsAtBottom const): Deleted.
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::wheelEvent):
  • WebProcess/WebPage/EventDispatcher.h:
  • WebProcess/WebPage/EventDispatcher.messages.in:
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updateMainFrameScrollOffsetPinning):
  • WebProcess/WebPage/WebPage.h:

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

12:22 PM Changeset in webkit [286681] by Alan Coon
  • 2 edits in branches/safari-612-branch/Tools

Cherry-pick r286368. rdar://problem/85928816

REGRESSION (r286346): ResourceLoadDelegate.LoadInfo fails
https://bugs.webkit.org/show_bug.cgi?id=233689

Reviewed by Simon Fraser.

  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadDelegate.mm: This test asserts that archiving a _WKResourceLoadInfo via NSKeyedArchiver encodes to a particular size (607 bytes).

If you look at the resultant plist before r286346, the encoded frameID
and resourceLoadID have the same value, and because of NSKeyedArchiver
deduplication, share the same object.

If you look at the resultant plist *after* r286346, the encoded frameID
is one larger than the resourceLoadID, thus cannot be deduplicated, and
end up encoding as separate objects. This results in the encoded size
increasing to 612 bytes.

The reason that the encoded frameID is now one value larger is that
ObjectIdentifier uses a global identifier pool, and r286346 creates
one more ObjectIdentifier during EventHandler construction, destroying
our entirely coincidental ID overlap, and causing the aforementioned
encoded size change.

Remove this assertion from the test, since it is very aggressive and
seems unnecessary. We could instead just rebaseline the test, but it
seems insufficiently important to burden some future developer with
a repeat of this evening of exploration and discovery.

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

12:22 PM Changeset in webkit [286680] by Alan Coon
  • 2 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r286277. rdar://problem/85928816

Fix the build

  • Shared/ios/WebIOSEventFactory.mm: (WebIOSEventFactory::createWebWheelEvent):

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

12:22 PM Changeset in webkit [286679] by Alan Coon
  • 10 edits in branches/safari-612-branch/Source

Cherry-pick r286270. rdar://problem/85928816

Plumb raw platform scrolling deltas along in wheel events
https://bugs.webkit.org/show_bug.cgi?id=233583

Reviewed by Simon Fraser.

Source/WebCore:

  • platform/PlatformWheelEvent.cpp: (WebCore::PlatformWheelEvent::createFromGesture):
  • platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::rawPlatformDelta const):
  • PAL/pal/spi/mac/IOKitSPIMac.h:

Source/WebKit:

  • Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
  • Shared/WebWheelEvent.cpp: (WebKit::WebWheelEvent::WebWheelEvent): (WebKit::WebWheelEvent::encode const): (WebKit::WebWheelEvent::decode):
  • Shared/WebWheelEvent.h: (WebKit::WebWheelEvent::rawPlatformDelta const):
  • Shared/WebWheelEventCoalescer.cpp: (WebKit::WebWheelEventCoalescer::coalesce):
  • Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebWheelEvent): Extract and plumb raw unaccelerated (in the HID sense) deltas in scroll events for use in a future patch.

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

12:22 PM Changeset in webkit [286678] by Alan Coon
  • 16 edits in branches/safari-612-branch/Source

Cherry-pick r285790. rdar://problem/85928816

Attach IOHIDEvent timestamps to wheel events
https://bugs.webkit.org/show_bug.cgi?id=233051

Reviewed by Wenson Hsieh.
Source/WebCore:

On some macOS devices, there can be significant deltas between NSEvent timestamps,
and the timestamps on underlying IOHIDEvents (rdar://85309639). This makes momentum
velocity computation unpredictable; we can get better results by using IOHIDEvent
timestamps.

  • platform/PlatformWheelEvent.cpp: (WebCore::PlatformWheelEvent::createFromGesture):
  • platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::ioHIDEventTimestamp const):
  • platform/mac/PlatformEventFactoryMac.h:
  • platform/mac/PlatformEventFactoryMac.mm: (WebCore::eventTimeStampSince1970): (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder): (WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder): (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):

Source/WebCore/PAL:

Expose a few bits of SPI needed.

  • pal/spi/cg/CoreGraphicsSPI.h:
  • pal/spi/cocoa/IOKitSPI.h:

Source/WebKit:

On some macOS devices, there can be significant deltas between NSEvent timestamps,
and the timestamps on underlying IOHIDEvents (rdar://85309639). This makes momentum
velocity computation unpredictable; we can get better results by using IOHIDEvent
timestamps.

  • Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
  • Shared/WebWheelEvent.cpp: (WebKit::WebWheelEvent::WebWheelEvent): (WebKit::WebWheelEvent::encode const): (WebKit::WebWheelEvent::decode):
  • Shared/WebWheelEvent.h: (WebKit::WebWheelEvent::ioHIDEventTimestamp const):
  • Shared/WebWheelEventCoalescer.cpp: (WebKit::WebWheelEventCoalescer::coalesce):
  • Shared/ios/WebIOSEventFactory.mm: (WebIOSEventFactory::createWebWheelEvent):
  • Shared/mac/NativeWebGestureEventMac.mm:
  • Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent):

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

12:22 PM Changeset in webkit [286677] by Alan Coon
  • 8 edits
    1 copy in branches/safari-612-branch/Source/WebCore

Cherry-pick r285786. rdar://problem/85928816

Clean up IOKit SPI headers
https://bugs.webkit.org/show_bug.cgi?id=233093

Reviewed by Simon Fraser.

Source/WebCore:

  • platform/gamepad/cocoa/GameControllerGamepadProvider.mm:
  • platform/gamepad/mac/HIDGamepadProvider.h:
  • platform/gamepad/mac/HIDGamepadProvider.mm:

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/spi/cg/CoreGraphicsSPI.h:
  • pal/spi/cocoa/IOKitSPI.h:
  • pal/spi/ios/IOKitSPIIOS.h: Added.
  • pal/spi/mac/IOKitSPIMac.h: IOKit vends a much different set of public API on iOS vs. macOS, so we have separate SPI headers to reduce the confusion.

Unfortunately, the SPI header for iOS was not explicitly named as such,
and started being used in some macOS code. For a while, this didn't lead
to any trouble because the aforementioned macOS code didn't ALSO have
the public SDK headers included, but a future patch from Simon will
use IOKitSPI.h in a place where the macOS IOKit public headers are included,
and thus we must make the split more explicit.

Rename IOKitSPI.h to IOKitSPIIOS.h; make IOKitSPI choose the right one.
Add some SPI defintions to IOKitSPIMac.h that were missing (which the
dependent code was getting via the iOS header on macOS).

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

12:20 PM Changeset in webkit [286676] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebCore

[GStreamer] Fill in client-name property on audio sinks
https://bugs.webkit.org/show_bug.cgi?id=233826

Patch by Philippe Normand <pnormand@igalia.com> on 2021-12-08
Reviewed by Xabier Rodriguez-Calvar.

The audio sink client-name property is now set on sinks that support this property, such as
pulsesink and pipewiresink. This is picked-up by GNOME settings and the corresponding audio
streams now appear as owned by the WebKit application (MiniBrowser, ephy, etc) instead of
"WebKitWebProcess".

When the audio mixer is enabled, no media.role property is set, because the mixer can accept
music and/or video roles simultaneously, so it doesn't make sense in this context.

  • platform/audio/gstreamer/AudioDestinationGStreamer.cpp:

(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer): Drive-by refactoring, using
a lambda instead of a static callback function.
(WebCore::autoAudioSinkChildAddedCallback): Deleted.

  • platform/graphics/gstreamer/GStreamerAudioMixer.cpp:

(WebCore::GStreamerAudioMixer::GStreamerAudioMixer):

  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::createAutoAudioSink):
(WebCore::createPlatformAudioSink):

  • platform/graphics/gstreamer/GStreamerCommon.h:
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamPropertiesCallback): Deleted.
(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties): Deleted.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
12:17 PM Changeset in webkit [286675] by Russell Epstein
  • 2 edits in branches/safari-613.1.11-branch/Source/WebKit

Cherry-pick r286631. rdar://problem/86223494

[Scroll Momentum Generator] Pages lose ability to momentum scroll after dragging between displays
https://bugs.webkit.org/show_bug.cgi?id=233948
rdar://86110813

Reviewed by Tim Horton.

This is a conservative fix for the bug. When a view moves to a new screen, WebPageProxy
needs to unregister for full speed updates using the old displayID, and register
using the new one.

Longer term, it would be better if "full speed updates" was a per-observer concept,
but that would mean registering an observer while wheel events are being received,
which needs a bit more thought.

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

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

12:17 PM Changeset in webkit [286674] by Russell Epstein
  • 2 edits in branches/safari-613.1.11-branch/Source/WebKit

Cherry-pick r286566. rdar://problem/86223477

Momentum Event Dispatcher: Momentum phase runs backwards with natural scrolling disabled
https://bugs.webkit.org/show_bug.cgi?id=233894
<rdar://problem/86111948>

Reviewed by Simon Fraser.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::consumeDeltaForCurrentTime): Only flip the deltas if the trackpad is configured to use "natural" scrolling (in which "directionInvertedFromDevice" is true).

(WebKit::MomentumEventDispatcher::computeNextDelta):
Fix initial queue state logging to log both axes before setting the "did log" bit.

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

12:04 PM Changeset in webkit [286673] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS][WP] Block unused sys calls
https://bugs.webkit.org/show_bug.cgi?id=233999

Reviewed by Brent Fulgham.

Block sys calls in the WebContent process on iOS that are unused according to telemetry.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
12:02 PM Changeset in webkit [286672] by commit-queue@webkit.org
  • 7 edits in trunk

[css-contain] Prevent various kinds of propagation to RenderView
https://bugs.webkit.org/show_bug.cgi?id=233535

Patch by Rob Buis <rbuis@igalia.com> on 2021-12-08
Reviewed by Alan Bujtas.

Source/WebCore:

Prevent direction/background/writing-mode propagation to RenderView
in cases where contain is used. The reason is in the github issue
and latest draft specification has been updated [1, 2].

[1] https://github.com/w3c/csswg-drafts/issues/5913
[2] https://drafts.csswg.org/css-contain-2/

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::styleDidChange):
(WebCore::RenderBox::updateFromStyle):

  • rendering/RenderObject.cpp:

(WebCore::shouldApplyAnyContainment):

  • rendering/RenderObject.h:
  • rendering/RenderView.cpp:

(WebCore::RenderView::rendererForRootBackground const):

LayoutTests:

11:58 AM Changeset in webkit [286671] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit

Momentum Event Dispatcher: Momentum tail should have montonically decreasing deltas and tail gaps
https://bugs.webkit.org/show_bug.cgi?id=233993
<rdar://problem/86118367>

Reviewed by Simon Fraser.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp:

(WebKit::MomentumEventDispatcher::consumeDeltaForCurrentTime):
(WebKit::MomentumEventDispatcher::buildOffsetTableWithInitialDelta):
(WebKit::MomentumEventDispatcher::computeNextDelta):
In order to avoid visual stutter due to integral rounding of the
deltas we dispatch in the momentum phase, switch to a table of
deltas instead of interpolating along the offset curve during the
tail end of the animation (when the rounding makes up a large
proportion of each delta).

(WebKit::MomentumEventDispatcher::equalizeTailGaps):
Sort the deltas up until the first zero to ensure a lack of unexpected
perceptual acceleration, and then inject skipped frames in order to
ensure that frames that have effective scroll movement (non-zero deltas)
are always spaced equally-or-further apart than earlier ones, but
never closer together (which, again, would be percieved as acceleration).

(WebKit::MomentumEventDispatcher::handleWheelEvent):
(WebKit::MomentumEventDispatcher::pushLogEntry):
(WebKit::MomentumEventDispatcher::flushLog):
Lastly, adjust some logging to make it easier to tell which row in
the output corresponds to an event delta or generated delta, so it's
easier to find skipped frames.

  • WebProcess/WebPage/MomentumEventDispatcher.h:
11:55 AM WebKitGTK/2.34.x edited by Philippe Normand
(diff)
11:46 AM Changeset in webkit [286670] by commit-queue@webkit.org
  • 4 edits in trunk/Source/bmalloc

[libpas] Guard Darwin-specific malloc zone usage in mbmalloc sources
https://bugs.webkit.org/show_bug.cgi?id=234005

Patch by Zan Dobersek <zdobersek@igalia.com> on 2021-12-08
Reviewed by Yusuke Suzuki.

Use PAS_OS(DARWIN) build guards for the Darwin-specific malloc header
inclusions and malloc_zone_pressure_relief() calls.

  • libpas/src/mbmalloc/mbmalloc_bmalloc.c:

(mbscavenge):

  • libpas/src/mbmalloc/mbmalloc_hotbit.c:

(mbscavenge):

  • libpas/src/mbmalloc/mbmalloc_iso_common_primitive.c:

(mbscavenge):

11:33 AM Changeset in webkit [286669] by eric.carlson@apple.com
  • 5 edits in trunk/Source/WebCore

[iOS] Always set audio session preferred input after changing the category
https://bugs.webkit.org/show_bug.cgi?id=232626
rdar://81618758

Reviewed by Youenn Fablet.

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::sessionCaptureConfigurationChanged): Schedule
a session update so the category and/or preferred input is setup.

  • platform/audio/PlatformMediaSessionManager.h:
  • platform/audio/ios/AudioSessionIOS.h:
  • platform/audio/ios/AudioSessionIOS.mm:

(WebCore::AudioSessionIOS::setCategory): Don't set the audio session category unless
something has changed. Ask the AVAudioSessionCaptureDeviceManager to set the preferred
capture device if that has changed.

  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.h:
  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:

(WebCore::AVAudioSessionCaptureDeviceManager::setPreferredAudioSessionDeviceUID):
Remember the device UID if the configuration is successful.
(WebCore::AVAudioSessionCaptureDeviceManager::configurePreferredAudioCaptureDevice):
Reset the preferred device if necessary.
(WebCore::AVAudioSessionCaptureDeviceManager::setPreferredAudioSessionDeviceUIDInternal):
Refactored from setPreferredAudioSessionDeviceUID.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioSharedUnit::captureDeviceChanged):

11:16 AM Changeset in webkit [286668] by Antti Koivisto
  • 7 edits in trunk

[CSS Cascade Layers] CSSImportRule.cssText doesn't include layer parameter
https://bugs.webkit.org/show_bug.cgi?id=234010

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-cascade/parsing/layer-import-parsing-expected.txt:

Source/WebCore:

Fix serialization of import rules than include layer, like

@import url(foo.css) layer(A);

Also make the parsing of the layer() argument stricter.

  • css/CSSImportRule.cpp:

(WebCore::CSSImportRule::cssText const):

Serialize the layer.

  • css/CSSLayerBlockRule.cpp:

(WebCore::stringFromCascadeLayerName):

Serialize layer name segments as identifiers.

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::consumeImportRule):

Fail parsing if there is anything left in the function argument after consuming the layer name.
If the parsing fails, revert and try the full string as media query.

11:11 AM Changeset in webkit [286667] by ysuzuki@apple.com
  • 38 edits in trunk/Source/JavaScriptCore

[JSC] Introduce WriteBarrierStructureID
https://bugs.webkit.org/show_bug.cgi?id=233918

Reviewed by Mark Lam.

This patch adds WriteBarrierStructureID class, which is similar to WriteBarrier<Structure>, but internally,
it holds StructureID, so sizeof(WriteBarrierStructureID) is 4. This class is useful to use StructureID for
memory saving while keeping WriteBarrier<Structure>'s useful features (automatically inserts write-barrier when
setting etc.). This also paves the way to introducing DOMStructures array with WriteBarrierStructureID instead
of costly HashMap<ClassInfo*, WriteBarrier<Structure>>.

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::AccessCase):
(JSC::AccessCase::forEachDependentCell const):
(JSC::AccessCase::dump const):
(JSC::AccessCase::propagateTransitions const):
(JSC::AccessCase::canBeShared):

  • bytecode/AccessCase.h:

(JSC::AccessCase::structure const):
(JSC::AccessCase::newStructure const):
(JSC::AccessCase::hash const):
(JSC::AccessCase::AccessCase):

  • bytecode/CheckPrivateBrandStatus.cpp:

(JSC::CheckPrivateBrandStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/DeleteByStatus.cpp:

(JSC::DeleteByStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/GetByStatus.cpp:

(JSC::GetByStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/InByStatus.cpp:

(JSC::InByStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/InlineAccess.cpp:

(JSC::InlineAccess::rewireStubAsJumpInAccess):
(JSC::InlineAccess::resetStubAsJumpInAccess):

  • bytecode/InstanceOfStatus.cpp:

(JSC::InstanceOfStatus::computeForStubInfo):

  • bytecode/InternalFunctionAllocationProfile.h:

(JSC::InternalFunctionAllocationProfile::offsetOfStructureID):
(JSC::InternalFunctionAllocationProfile::structure):
(JSC::InternalFunctionAllocationProfile::clear):
(JSC::InternalFunctionAllocationProfile::visitAggregate):
(JSC::InternalFunctionAllocationProfile::createAllocationStructureFromBase):
(JSC::InternalFunctionAllocationProfile::offsetOfStructure): Deleted.

  • bytecode/PutByStatus.cpp:

(JSC::PutByStatus::computeForStubInfo):

  • bytecode/SetPrivateBrandStatus.cpp:

(JSC::SetPrivateBrandStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::initGetByIdSelf):
(JSC::StructureStubInfo::initPutByIdReplace):
(JSC::StructureStubInfo::initInByIdSelf):
(JSC::StructureStubInfo::deref):
(JSC::StructureStubInfo::aboutToDie):
(JSC::StructureStubInfo::addAccessCase):
(JSC::StructureStubInfo::reset):
(JSC::StructureStubInfo::visitAggregateImpl):
(JSC::StructureStubInfo::visitWeakReferences):
(JSC::StructureStubInfo::propagateTransitions):
(JSC::StructureStubInfo::summary const):
(JSC::StructureStubInfo::containsPC const):

  • bytecode/StructureStubInfo.h:

(JSC::StructureStubInfo::inlineAccessBaseStructure):
(JSC::StructureStubInfo::offsetOfByIdSelfOffset):
(JSC::StructureStubInfo::offsetOfInlineAccessBaseStructureID):
(JSC::StructureStubInfo::offsetOfInlineAccessBaseStructure): Deleted.

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

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

  • heap/AbstractSlotVisitor.h:
  • heap/AbstractSlotVisitorInlines.h:

(JSC::AbstractSlotVisitor::append):
(JSC::AbstractSlotVisitor::appendHidden):

  • heap/SlotVisitor.h:
  • heap/SlotVisitorInlines.h:

(JSC::SlotVisitor::append):
(JSC::SlotVisitor::appendHidden):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::emitNonNullDecodeStructureID):
(JSC::AssemblyHelpers::emitLoadStructure):

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

(JSC::generateGetByIdInlineAccess):
(JSC::JITPutByIdGenerator::generateBaselineDataICFastPath):
(JSC::JITInByIdGenerator::generateBaselineDataICFastPath):

  • runtime/FunctionExecutable.cpp:

(JSC::FunctionExecutable::visitChildrenImpl):

  • runtime/FunctionExecutable.h:
  • runtime/FunctionRareData.cpp:

(JSC::FunctionRareData::visitChildrenImpl):

  • runtime/FunctionRareData.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::visitChildrenImpl):

  • runtime/JSGlobalObject.h:
  • runtime/JSPropertyNameEnumerator.cpp:

(JSC::JSPropertyNameEnumerator::JSPropertyNameEnumerator):
(JSC::JSPropertyNameEnumerator::visitChildrenImpl):

  • runtime/JSPropertyNameEnumerator.h:
  • runtime/StructureRareData.cpp:

(JSC::StructureRareData::StructureRareData):

  • runtime/StructureRareData.h:
  • runtime/WriteBarrier.h:

(JSC::WriteBarrierStructureID::WriteBarrierStructureID):
(JSC::WriteBarrierStructureID::get const):
(JSC::WriteBarrierStructureID::operator* const):
(JSC::WriteBarrierStructureID::operator-> const):
(JSC::WriteBarrierStructureID::clear):
(JSC::WriteBarrierStructureID::operator bool const):
(JSC::WriteBarrierStructureID::operator! const):
(JSC::WriteBarrierStructureID::setWithoutWriteBarrier):
(JSC::WriteBarrierStructureID::unvalidatedGet const):
(JSC::WriteBarrierStructureID::value const):

  • runtime/WriteBarrierInlines.h:

(JSC::WriteBarrierStructureID::set):
(JSC::WriteBarrierStructureID::setMayBeNull):
(JSC::WriteBarrierStructureID::setEarlyValue):

  • tools/JSDollarVM.cpp:

(JSC::JSDollarVM::finishCreation):
(JSC::JSDollarVM::visitChildrenImpl):

  • tools/JSDollarVM.h:
10:49 AM Changeset in webkit [286666] by Russell Epstein
  • 1 copy in branches/safari-612.4.2.3-branch

New branch.

10:49 AM Changeset in webkit [286665] by Russell Epstein
  • 1 copy in branches/safari-612.4.2.2-branch

New branch.

10:49 AM Changeset in webkit [286664] by Russell Epstein
  • 1 copy in branches/safari-612.4.2.1-branch

New branch.

10:49 AM Changeset in webkit [286663] by Russell Epstein
  • 1 copy in branches/safari-612.4.2.0-branch

New branch.

10:42 AM Changeset in webkit [286662] by Russell Epstein
  • 8 edits in branches/safari-612-branch/Source

Versioning.

WebKit-7612.4.3

10:04 AM Changeset in webkit [286661] by Chris Dumez
  • 12 edits
    1 copy in trunk

Make KVO work for WKWebpagePreferences._captivePortalModeEnabled
https://bugs.webkit.org/show_bug.cgi?id=233954

Reviewed by Alex Christensen.

Source/WebKit:

Make KVO work for WKWebpagePreferences._captivePortalModeEnabled so that the client can observe
when the system setting changes. Also add SPI to simulate a change of the system setting so that
I can write API tests.

  • UIProcess/API/Cocoa/WKProcessPool.mm:

(+[WKProcessPool _setCaptivePortalModeEnabledGloballyForTesting:]):
(+[WKProcessPool _clearCaptivePortalModeEnabledGloballyForTesting]):

  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
  • UIProcess/API/Cocoa/WKWebpagePreferences.mm:

(-[WKWebpagePreferences init]):
(-[WKWebpagePreferences _setCaptivePortalModeEnabled:]):

  • UIProcess/API/Cocoa/WKWebpagePreferencesInternal.h:
  • UIProcess/CaptivePortalModeObserver.h: Copied from Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesInternal.h.

(WebKit::CaptivePortalModeObserver::~CaptivePortalModeObserver):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::captivePortalModeObservers):
(WebKit::isCaptivePortalModeEnabledGloballyForTesting):
(WebKit::isCaptivePortalModeEnabledBySystemIgnoringCaching):
(WebKit::WebProcessPool::captivePortalModeStateChanged):
(WebKit::addCaptivePortalModeObserver):
(WebKit::removeCaptivePortalModeObserver):
(WebKit::captivePortalModeEnabledBySystem):
(WebKit::setCaptivePortalModeEnabledGloballyForTesting):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::receivedNavigationPolicyDecision):

  • UIProcess/WebProcessPool.cpp:

(WebKit::addCaptivePortalModeObserver):
(WebKit::removeCaptivePortalModeObserver):
(WebKit::setCaptivePortalModeEnabledGloballyForTesting):

  • UIProcess/WebProcessPool.h:
  • WebKit.xcodeproj/project.pbxproj:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

(-[CaptivePortalModeKVO observeValueForKeyPath:ofObject:change:context:]):

9:50 AM Changeset in webkit [286660] by Aditya Keerthi
  • 6 edits in trunk

[iOS] Add support for _UITextSearchOptions when finding a string
https://bugs.webkit.org/show_bug.cgi?id=233957
rdar://86140673

Reviewed by Wenson Hsieh.

Source/WebKit:

Add support for case-insensitive, full-word, and prefix matching.

  • Shared/WebFindOptions.h:

Introduce AtWordEnds at the WebKit layer to support full-word matching
when used with AtWordStarts.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView performTextSearchWithQueryString:usingOptions:resultAggregator:]):

  • WebProcess/WebPage/FindController.cpp:

(WebKit::core):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:

(testPerformTextSearchWithQueryStringInWebView):
(TEST):

Add additional test cases for search options.

9:06 AM Changeset in webkit [286659] by Adrian Perez de Castro
  • 3 edits in trunk/Source/ThirdParty/ANGLE

Avoid noisy Wcomment warnings after ANGLE update in r286603
https://bugs.webkit.org/show_bug.cgi?id=233964
<rdar://problem/86186455>

Reviewed by Michael Catanzaro.

  • CMakeLists.txt: Pass also -Wno-comment when building with GCC or Clang; arrange to

set compiler flags for any of the ANGLE library targets instead of only for libANGLE.

  • src/compiler/translator/tree_util/IntermTraverse.h: Revert change from 233964 to

avoid having differences with the upstream version of the file.

9:04 AM Changeset in webkit [286658] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Add a missing CompletionHandlerCallChecker around a UI delegate method call after r286640
https://bugs.webkit.org/show_bug.cgi?id=233890
rdar://86117718

Reviewed by Dan Bernstein.

Create and pass a CompletionHandlerCallChecker through the new delegate call to
-_webView:requestCookieConsentWithMoreInfoHandler:decisionHandler: added in r286640.

  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::requestCookieConsent):

8:55 AM Changeset in webkit [286657] by Antti Koivisto
  • 21 edits
    4 copies
    3 moves in trunk

[CSS Cascade Layers] Update CSSOM to the spec
https://bugs.webkit.org/show_bug.cgi?id=231340
<rdar://problem/83958697>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-cascade/idlharness-expected.txt:
  • web-platform-tests/css/css-cascade/layer-rules-cssom-expected.txt:

Source/WebCore:

Add CSSLayerBlockRule and CSSLayerStatementRule interfaces.
Also add support for layerName property of CSSImportRule.

https://www.w3.org/TR/css-cascade-5/#layer-apis

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSCSSRuleCustom.cpp:

(WebCore::toJSNewlyCreated):

  • css/CSSImportRule+Layer.idl: Copied from Source/WebCore/css/CSSLayerRule.idl.
  • css/CSSImportRule.cpp:

(WebCore::CSSImportRule::layerName const):
(WebCore::CSSImportRule::cascadeLayerName const): Deleted.

  • css/CSSImportRule.h:
  • css/CSSLayerBlockRule.cpp: Renamed from Source/WebCore/css/CSSLayerRule.cpp.

(WebCore::CSSLayerBlockRule::CSSLayerBlockRule):
(WebCore::CSSLayerBlockRule::create):
(WebCore::CSSLayerBlockRule::cssText const):
(WebCore::CSSLayerBlockRule::name const):
(WebCore::stringFromCascadeLayerName):

  • css/CSSLayerBlockRule.h: Copied from Source/WebCore/css/CSSLayerRule.h.
  • css/CSSLayerBlockRule.idl: Copied from Source/WebCore/css/CSSLayerRule.idl.
  • css/CSSLayerStatementRule.cpp: Copied from Source/WebCore/css/CSSLayerRule.h.

(WebCore::CSSLayerStatementRule::CSSLayerStatementRule):
(WebCore::CSSLayerStatementRule::create):
(WebCore::CSSLayerStatementRule::cssText const):
(WebCore::CSSLayerStatementRule::nameList const):
(WebCore::CSSLayerStatementRule::reattach):

  • css/CSSLayerStatementRule.h: Renamed from Source/WebCore/css/CSSLayerRule.h.
  • css/CSSLayerStatementRule.idl: Renamed from Source/WebCore/css/CSSLayerRule.idl.
  • css/CSSRule.h:
  • css/StyleRule.cpp:

(WebCore::StyleRuleBase::destroy):
(WebCore::StyleRuleBase::copy const):
(WebCore::StyleRuleBase::createCSSOMWrapper const):
(WebCore::StyleRuleLayer::StyleRuleLayer):

  • css/StyleRule.h:

(WebCore::StyleRuleBase::isGroupRule const):
(WebCore::StyleRuleBase::isLayerRule const):

  • css/StyleRuleType.h:
  • css/StyleSheetContents.cpp:

(WebCore::traverseRulesInVector):
(WebCore::StyleSheetContents::traverseSubresources const):

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::consumeLayerRule):

  • inspector/InspectorStyleSheet.cpp:

(flattenSourceData):
(WebCore::asCSSRuleList):
(WebCore::buildArrayForGroupings):

  • style/InspectorCSSOMWrappers.cpp:

(WebCore::Style::InspectorCSSOMWrappers::collect):

8:27 AM Changeset in webkit [286656] by youenn@apple.com
  • 7 edits
    8 adds in trunk

Same-site lax cookies not sent by fetch event handler after page reload
https://bugs.webkit.org/show_bug.cgi?id=226386
<rdar://problem/78878853>

Reviewed by Chris Dumez.

Source/WebCore:

When a service worker fetches a navigation request exposed from the fetch event, we need to keep isTopSite intact as
the service worker does not really have the information of which frame is actually loaded and whether it is a main frame or not.

Tests: http/wpt/service-workers/cross-site-navigation-same-cookie-lax.https.html

http/wpt/service-workers/same-cookie-lax.https.html

  • loader/cache/CachedResource.cpp:

Source/WebKit:

StorageBlockingPolicy handling is not covered by generated code so explicit update StorageBlockingPolicy setting from preference store.
This impacts the computation of cookie/cache partitioning.

  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

LayoutTests:

  • http/wpt/service-workers/cross-site-navigation-same-cookie-lax.https-expected.txt: Added.
  • http/wpt/service-workers/cross-site-navigation-same-cookie-lax.https.html: Added.
  • http/wpt/service-workers/resources/get-cookie.py: Added.
  • http/wpt/service-workers/resources/get-document-cookie.py: Added.
  • http/wpt/service-workers/resources/set-cookie-lax.py: Added.
  • http/wpt/service-workers/same-cookie-lax-worker.js: Added.
  • http/wpt/service-workers/same-cookie-lax.https-expected.txt: Added.
  • http/wpt/service-workers/same-cookie-lax.https.html: Added.
7:59 AM Changeset in webkit [286655] by youenn@apple.com
  • 6 edits
    4 adds in trunk

Safari Bug "no-cache" network error
https://bugs.webkit.org/show_bug.cgi?id=233916

Reviewed by Chris Dumez.

Source/WebCore:

Test: http/wpt/service-workers/cache-control-request.html

Remove Cache-Control header when going the service worker road if it is added by the network code path and not the application.

  • loader/CrossOriginAccessControl.cpp:

(WebCore::httpHeadersToKeepFromCleaning):
(WebCore::cleanHTTPRequestHeadersForAccessControl):

  • loader/CrossOriginAccessControl.h:
  • platform/network/ResourceRequestBase.cpp:

(WebCore::ResourceRequestBase::removeHTTPHeaderField):

  • platform/network/ResourceRequestBase.h:

LayoutTests:

  • http/wpt/service-workers/cache-control-request-expected.txt: Added.
  • http/wpt/service-workers/cache-control-request-worker.js: Added.

(async doTest):

  • http/wpt/service-workers/cache-control-request.html: Added.
  • http/wpt/service-workers/resources/cross-origin-allow.py: Added.

(main):

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

[css-flexbox] gap does not work correctly when flex-direction: column-reverse is applied
https://bugs.webkit.org/show_bug.cgi?id=225278
Source/WebCore:

rdar://problem/77708991

Patch by Vitaly Dyachkov <obyknovenius@me.com> on 2021-12-08
Reviewed by Sergio Villar Senin.

Whenever flex-direction: column-reverse is specified flexbox does always compute the flex item sizes and positions
ignoring the -reverse direction until the very end. After completing the computations we just need to swap offsets
to get the reversed positions. The code was properly considering space between items added by content justification
but it was not adding gaps. Fixed it by adding the gap size to the flex items' offsets.

Test: imported/w3c/web-platform-tests/css/css-flexbox/column-reverse-gap.html

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
(WebCore::RenderFlexibleBox::layoutColumnReverse):

  • rendering/RenderFlexibleBox.h:

LayoutTests:

Patch by Vitaly Dyachkov <obyknovenius@me.com> on 2021-12-08
Reviewed by Sergio Villar Senin.

  • imported/w3c/web-platform-tests/css/css-flexbox/column-reverse-gap-expected.txt: Added.
  • imported/w3c/web-platform-tests/css/css-flexbox/column-reverse-gap.html: Added.
7:31 AM Changeset in webkit [286653] by Lauro Moura
  • 2 edits in trunk/Source/WebCore

REGRESSION(r286603) [GTK][WPE] WebGL broken after the ANGLE update.
https://bugs.webkit.org/show_bug.cgi?id=233965

Reviewed by Adrian Perez de Castro.

Covered by existing tests.

  • platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp:

(WebCore::ExtensionsGLOpenGLCommon::getTranslatedShaderSourceANGLE):
Remove usage of SH_UNFOLD_SHORT_CIRCUIT after last ANGLE update as
suggested by Kimmo.

5:51 AM Changeset in webkit [286652] by graouts@webkit.org
  • 5 edits
    2 adds in trunk

'border-radius shorthand is getting expanded in WebKit
https://bugs.webkit.org/show_bug.cgi?id=233960

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add a new WPT to check the behavior of border-radius when serializing using cssText.

  • web-platform-tests/css/css-backgrounds/border-radius-css-text-expected.txt: Added.
  • web-platform-tests/css/css-backgrounds/border-radius-css-text.html: Added.

Source/WebCore:

Test: imported/w3c/web-platform-tests/css/css-backgrounds/border-radius-css-text.html

Use the border-radius shorthand property instead of individual longhands when serializing.

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::asText const):

LayoutTests:

Rebase an existing test now that we correctly use the shorthand in cssText for border-radius.

  • fast/css/remove-shorthand-expected.txt:
5:42 AM Changeset in webkit [286651] by commit-queue@webkit.org
  • 1 edit
    1 delete in trunk/Source/bmalloc

[libpas] Remove the stale SkipListTests.cpp file
https://bugs.webkit.org/show_bug.cgi?id=234000

Unreviewed, removing the redundant test file that's not been built (and
cannot be built anymore) since the libpas update done in r285789.

Patch by Zan Dobersek <zdobersek@igalia.com> on 2021-12-08

  • libpas/src/test/SkipListTests.cpp: Removed.
3:05 AM Changeset in webkit [286650] by youenn@apple.com
  • 15 edits in trunk/Source

Let RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit switch to VPIO unit if VPIO is running
https://bugs.webkit.org/show_bug.cgi?id=233316

Reviewed by Eric Carlson.

Source/WebCore:

Add support for an external provider of speaker data to the audio capture unit.
We use this in WebKit to render the MediaStreamTracks of the process doing capture through VPIO when running.
In case the audio capture unit speaker format is not matching the producer format, we have to reconfigure and align with the producer format.
In case, audio is being rendered by the audio capture unit but capture is stopped, we continue running the audio capture unit.
This allows to mute/unmute microphone without any audio glitch.
We make sure to stop the audio capture unit when it is no longer used for rendering or capture.

In case the unit is suspended and we restart an audio source, we will unsuspend the unit, which will unmute sources.
We do not want to start audio sources within the start of an audio source.
For that reason, we unmute the sources asynchronously.

Manually tested.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/mediastream/mac/BaseAudioSharedUnit.cpp:
  • platform/mediastream/mac/BaseAudioSharedUnit.h:
  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:
  • platform/mediastream/mac/CoreAudioCaptureSource.h:

Source/WebKit:

We track which process is the last to start audio capture.
In that case, we register its RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit to the capture unit.
This allows RemoteAudioMediaStreamTrackRendererInternalUnitManager::Unit to switch between RemoteIO if capture unit does not run
or the capture unit if running.
This allows to remove the x5 gain workaround.

  • GPUProcess/GPUConnectionToWebProcess.cpp:
  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/GPUProcess.cpp:
  • GPUProcess/GPUProcess.h:
  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.cpp:
  • GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.h:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
2:08 AM Changeset in webkit [286649] by mmaxfield@apple.com
  • 5 edits in trunk/Source

[MacCatalyst] Various build fixes
https://bugs.webkit.org/show_bug.cgi?id=233995

Unreviewed.

Source/WebCore:

No new tests because there is no behavior change.

  • Modules/speech/cocoa/SpeechRecognizerCocoa.mm:

(WebCore::SpeechRecognizer::dataCaptured):

  • platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm:

(WebCore::AudioSampleBufferCompressor::processSampleBuffersUntilLowWaterTime):

Source/WebKit:

  • UIProcess/WebPageProxy.cpp:

(WebKit::mediaRelatedMachServices):

1:54 AM Changeset in webkit [286648] by commit-queue@webkit.org
  • 6 edits in trunk/Source

[GStreamer] Enable mediaSourceInlinePainting
https://bugs.webkit.org/show_bug.cgi?id=233813

Patch by Philippe Normand <pnormand@igalia.com> on 2021-12-08
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Covered by http/tests/media/media-source/mediasource-rvfc.html

  • page/RuntimeEnabledFeatures.cpp:

(WebCore::RuntimeEnabledFeatures::setMediaSourceInlinePaintingEnabled):

  • page/RuntimeEnabledFeatures.h:
  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::mediaSourceInlinePaintingEnabled const):

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml: GStreamer ports can already run tests

requiring this setting, without change in the platform layer, until we migrate to the
GPUProcess.

12:55 AM Changeset in webkit [286647] by Antti Koivisto
  • 9 edits
    21 adds in trunk/LayoutTests

[CSS Cascade Layers] import some new WPTs
https://bugs.webkit.org/show_bug.cgi?id=233947

Reviewed by Kimmo Kinnunen.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-cascade/idlharness-expected.txt: Added.
  • web-platform-tests/css/css-cascade/idlharness.html: Added.
  • web-platform-tests/css/css-cascade/layer-cssom-order-reverse-expected.txt: Added.
  • web-platform-tests/css/css-cascade/layer-cssom-order-reverse.html: Added.
  • web-platform-tests/css/css-cascade/layer-import-expected.txt:
  • web-platform-tests/css/css-cascade/layer-import.html:
  • web-platform-tests/css/css-cascade/layer-media-query-expected.txt:
  • web-platform-tests/css/css-cascade/layer-media-query.html:
  • web-platform-tests/css/css-cascade/layer-rules-cssom-expected.txt: Added.
  • web-platform-tests/css/css-cascade/layer-rules-cssom.html: Added.
  • web-platform-tests/css/css-cascade/layer-slotted-rule-expected.xht: Added.
  • web-platform-tests/css/css-cascade/layer-slotted-rule.html: Added.
  • web-platform-tests/css/css-cascade/layer-statement-before-import-expected.txt: Added.
  • web-platform-tests/css/css-cascade/layer-statement-before-import.html: Added.
  • web-platform-tests/css/css-cascade/parsing/layer-import-parsing-expected.txt: Added.
  • web-platform-tests/css/css-cascade/parsing/layer-import-parsing.html: Added.
  • web-platform-tests/css/css-cascade/parsing/w3c-import.log:
  • web-platform-tests/css/css-cascade/revert-layer-009-expected.xht: Added.
  • web-platform-tests/css/css-cascade/revert-layer-009.html: Added.
  • web-platform-tests/css/css-cascade/revert-layer-010-expected.xht: Added.
  • web-platform-tests/css/css-cascade/revert-layer-010.html: Added.
  • web-platform-tests/css/css-cascade/revert-layer-011-expected.xht: Added.
  • web-platform-tests/css/css-cascade/revert-layer-011.html: Added.
  • web-platform-tests/css/css-cascade/revert-layer-012-expected.xht: Added.
  • web-platform-tests/css/css-cascade/revert-layer-012.html: Added.
  • web-platform-tests/css/css-cascade/w3c-import.log:
  • web-platform-tests/interfaces/css-cascade-5.idl: Added.

LayoutTests:

12:28 AM Changeset in webkit [286646] by Diego Pino Garcia
  • 2 edits in trunk/Source/WebCore

REGRESSION(r286556): DeviceOrientationUpdateProvider.h is only available in iOS
https://bugs.webkit.org/show_bug.cgi?id=233991

Unreviewed build fix.

  • page/PageConfiguration.h:

Dec 7, 2021:

11:27 PM Changeset in webkit [286645] by mmaxfield@apple.com
  • 2 edits in trunk/Source/ThirdParty/ANGLE

[MacCatalyst] Fix build after r286603
https://bugs.webkit.org/show_bug.cgi?id=233977

Unreviewed.

Previously, TARGET_OS_IOS and TARGET_OS_MACCATALYST were never on at the same time.
Now, they're on at the same time, and ANGLE doesn't expect that. This patch turns
off TARGET_OS_IOS when TARGET_OS_MACCATALYST is on, just to get ANGLE to build.
The long-term fix is to either update all the sites to use correct macros, or to
use the ANGLE_PLATFORM_* defines instead.

  • src/common/platform.h:
10:43 PM Changeset in webkit [286644] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Add logging to RealtimeOutgoingVideoSource creation
https://bugs.webkit.org/show_bug.cgi?id=233929

Reviewed by Eric Carlson.

This will allow to identify when trying to start sending video.
No change of behavior.

  • platform/mediastream/RealtimeOutgoingVideoSource.cpp:

(WebCore::RealtimeOutgoingVideoSource::RealtimeOutgoingVideoSource):
(WebCore::RealtimeOutgoingVideoSource::setSource):

10:34 PM Changeset in webkit [286643] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

[Model] Only expose APIs on the IDL interface when the feature is enabled
https://bugs.webkit.org/show_bug.cgi?id=233942

Reviewed by Dean Jackson.

  • Modules/model-element/HTMLModelElement.idl:
10:28 PM Changeset in webkit [286642] by graouts@webkit.org
  • 5 edits in trunk/Source/WebCore

ActiveDOMObject::suspendIfNeeded() should not be called in the WebAnimation constructor
https://bugs.webkit.org/show_bug.cgi?id=233932

Reviewed by Chris Dumez.

It is not safe to call ActiveDOMObject::suspendIfNeeded() in a constructor. Since WebAnimation has several subclasses
(DeclarativeAnimation, and then CSSTransition and CSSAnimation deriving from DeclarativeAnimation) each with their own
create() methods, we add a new protected initialize() method which refactors code from the WebAnimation constructor
and is called from the two WebAnimation::create() methods.

DeclarativeAnimation already had an initialize method for common setup for the create() methods in CSSTransition and
CSS Animation, so we can simply call WebAnimation::initialize() from DeclarativeAnimation::initialize() and this guarantees
all create() methods for WebAnimation and all of its subclasses are correctly calling ActiveDOMObject::suspendIfNeeded().

  • animation/DeclarativeAnimation.cpp:

(WebCore::DeclarativeAnimation::initialize):

  • animation/DeclarativeAnimation.h:
  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::create):
(WebCore::WebAnimation::initialize):
(WebCore::WebAnimation::WebAnimation):

  • animation/WebAnimation.h:
9:30 PM Changeset in webkit [286641] by Aditya Keerthi
  • 17 edits in trunk

[iOS] Add initial support for find-in-page SPI
https://bugs.webkit.org/show_bug.cgi?id=233915
rdar://86140501

Reviewed by Wenson Hsieh.

Source/WebKit:

Expose new find-in-page SPI for use by clients.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView selectedTextRange]):
(-[WKWebView offsetFromPosition:toPosition:inDocument:]):
(-[WKWebView performTextSearchWithQueryString:usingOptions:resultAggregator:]):
(-[WKWebView decorateFoundTextRange:inDocument:usingStyle:]):
(-[WKWebView clearAllDecoratedFoundText]):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::findRectsForStringMatches):
(WebKit::WebPageProxy::hideFindIndicator):

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

(-[WKContentView offsetFromPosition:toPosition:]):

The implementation here is needed to determine the relative ordering of
two search results.

(-[WKContentView performTextSearchWithQueryString:usingOptions:resultAggregator:]):

Call into the WebProcess to perform the search, and asynchronously
mark the search as complete.

A search result is represented as a WKFoundTextRange, and contains
two pieces of information.

  1. A rect – so that clients can determine whether or not the result is visible.
  1. An index – to allow for highlighting of a result and to enable determining relative ordering between two results.

(-[WKContentView decorateFoundTextRange:usingStyle:]):
(-[WKContentView clearAllDecoratedFoundText]):
(+[WKFoundTextRange foundTextRangeWithRect:index:]):
(-[WKFoundTextRange start]):
(-[WKFoundTextRange end]):
(-[WKFoundTextRange isEmpty]):
(+[WKFoundTextPosition textPositionWithIndex:]):

  • WebProcess/WebPage/FindController.cpp:

(WebKit::FindController::findString):

Prevent Editor from revealing the selection on all platforms, as the
existing call to didFindString is now responsible for revealing
selection on all platforms.

(WebKit::FindController::findRectsForStringMatches):

Gather rects for all search results and return them to the UIProcess.

(WebKit::FindController::indicateFindMatch):

This method was previously unused on iOS, and required some changes
to work correctly.

Wrap the call to select the current match with calls to
{will|did}FindString to account for iOS specific selection behavior.
See the existing comment in didFindString for more details.

No behavior change on other platforms, since willFindString is empty,
and didFindString now reveals the selection.

(WebKit::FindController::didFindString):

  • WebProcess/WebPage/FindController.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::findRectsForStringMatches):
(WebKit::WebPage::hideFindIndicator):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Added two new WebPage messages.

  1. findRectsForStringMatches returns an vector of string match rects for use in the UIProcess.
  1. Expose hideFindIndicator via IPC so that the UIProcess can hide the indicator without dismissing the overlay entirely.

Source/WTF:

  • wtf/PlatformHave.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:

(-[TestSearchAggregator initWithCompletionHandler:]):
(-[TestSearchAggregator foundRange:forSearchString:inDocument:]):
(-[TestSearchAggregator finishedSearching]):
(TEST):

Added an API test to verify that search results are found correctly.

8:24 PM Changeset in webkit [286640] by Wenson Hsieh
  • 33 edits
    9 adds in trunk

Add support for navigator.requestCookieConsent() behind a disabled feature flag
https://bugs.webkit.org/show_bug.cgi?id=233890
rdar://86117718

Reviewed by Darin Adler.

Source/WebCore:

Add plumbing to support a new (internal-for-the-time-being) navigator API, requestCookieConsent(). This
returns a promise indicating whether or not the user (or the UA, on behalf of the user) consents to usage of
cookies that are not strictly necessary for page performance.

Paired with this web-facing API, we also introduce corresponding private WKUIDelegate methods that are invoked
as a result of calling navigator.requestCookieConsent();, which a WebKit embedder may implement in order to
present UI or otherwise respond appropriately to the request. See WebKit ChangeLog for more details.

Tests: CookieConsent.BasicDecisionHandler

CookieConsent.NotEnabled
CookieConsent.ThrowsExceptionWithoutDelegate

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Headers.cmake:
  • Modules/cookie-consent/CookieConsentDecisionResult.h: Added.
  • Modules/cookie-consent/Navigator+CookieConsent.idl: Added.
  • Modules/cookie-consent/NavigatorCookieConsent.cpp: Added.

Add a new partial interface on Navigator that implements the new API by calling into the chrome client hook (see
WebKit changes for more details). Note that in the case where the consent delegate method is not implemented by
the client, we will reject the promise with a NotSupportedError.

(WebCore::NavigatorCookieConsent::requestCookieConsent):
(WebCore::NavigatorCookieConsent::from):

  • Modules/cookie-consent/NavigatorCookieConsent.h: Added.

(WebCore::RequestCookieConsentOptions::RequestCookieConsentOptions):

  • Modules/cookie-consent/RequestCookieConsentOptions.h: Added.
  • Modules/cookie-consent/RequestCookieConsentOptions.idl: Added.
  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp:
  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.h:

Add some missing includes to fix the unified source build on Windows.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • loader/EmptyClients.cpp:

(WebCore::EmptyChromeClient::requestCookieConsent):

  • loader/EmptyClients.h:
  • page/ChromeClient.h:

Source/WebKit:

Add plumbing for an async requestCookieConsent() method on ChromeClient that plumbs through the WebKit2 client
layer, into a new private (for the time being) UI delegate method. If the new delegate method is not implemented
(or there is no UI delegate at all), we immediately invoke the decision handler with a result of NotSupported,
allowing us to reject the promise with a NotSupportedError.

See WebCore ChangeLog for more details.

  • UIProcess/API/APIUIClient.h:

(API::UIClient::requestCookieConsent):

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

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::requestCookieConsent):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::requestCookieConsent):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::requestCookieConsent):

  • WebProcess/WebCoreSupport/WebChromeClient.h:

Source/WebKitLegacy/mac:

Add an implementation stub for the new chrome client hook, requestCookieConsent().

  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::requestCookieConsent):

Source/WebKitLegacy/win:

Add an implementation stub for the new chrome client hook, requestCookieConsent().

  • WebCoreSupport/WebChromeClient.cpp:

(WebChromeClient::requestCookieConsent):

  • WebCoreSupport/WebChromeClient.h:

Source/WTF:

Add the new feature flag (off by default). Note that this is also only an internal feature flag for the time
being (rather than an experimental feature flag), such that it cannot (yet) be turned on by non-Apple internal
users.

  • Scripts/Preferences/WebPreferencesInternal.yaml:

Tools:

Add several new API tests that enable the feature flag and exercise the API.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/CookieConsent.mm: Added.

(-[CookieConsentDelegate _webView:requestCookieConsentWithMoreInfoHandler:decisionHandler:]):
(TestWebKitAPI::createWebViewForTestingCookieConsent):
(TestWebKitAPI::checkForString):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/cookie-consent-basic.html: Added.
7:59 PM Changeset in webkit [286639] by sbarati@apple.com
  • 6 edits
    3 adds in trunk

TypedArray prototype set should go down the fast path when using non clamped integer types of the same byte size
https://bugs.webkit.org/show_bug.cgi?id=233905

Reviewed by Keith Miller.

JSTests:

  • microbenchmarks/typed-array-prototype-set.js: Added.
  • microbenchmarks/typed-array-prototype-set-order.js: Added.
  • stress/typed-array-prototype-set.js: Added.

Source/JavaScriptCore:

We can use memmove in this scenario because the bitpattern of the
data between the signed and unsigned values will be the same.

This patch also fixes a bug where we were looking at the wrong
pointer when determining to do a forward or backwards loop in
our memmove. We were looking at the vector instead of vector+offset.

  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::set):

LayoutTests:

  • js/script-tests/typedarray-set-overlapping-elements-of-same-size.js:
  • js/typedarray-set-overlapping-elements-of-same-size-expected.txt:
6:49 PM Changeset in webkit [286638] by ysuzuki@apple.com
  • 3 edits in trunk/Source/ThirdParty/ANGLE

Unreviewed, these files are modified after building ANGLE
https://bugs.webkit.org/show_bug.cgi?id=220896
<rdar://problem/73539682>

  • src/libANGLE/renderer/metal/shaders/mtl_default_shaders_src_autogen.inc:
  • src/libANGLE/renderer/metal/shaders/mtl_default_shaders_src_autogen.metal:
6:11 PM Changeset in webkit [286637] by Cameron McCormack
  • 4 edits in trunk/Source/WebCore

Remove expandAroundIdeographs static variables
https://bugs.webkit.org/show_bug.cgi?id=233750

Reviewed by Myles Maxfield.

With OffscreenCanvas, we can call into
ComplexTextController::adjustGlyphsAndAdvances,
FontCascade::expansionOpportunityCountInternal, and
WidthIterator::calculateAdditionalWidth from worker threads.
These all have a static variable variable with an initializer
that calls FontCascade::canExpandAroundIdeographsInComplexText,
and such initializers are not safe under -fno-threadsafe-statics.

canExpandAroundIdeographsInComplexText is a simple enough function in
all ports (it just returns a constant bool) that it's not worth caching
the result in a static.

  • platform/graphics/ComplexTextController.cpp:

(WebCore::ComplexTextController::adjustGlyphsAndAdvances):

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::expansionOpportunityCountInternal):

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::calculateAdditionalWidth const):

6:09 PM Changeset in webkit [286636] by Lauro Moura
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Avoid noisy Wcomment warnings after ANGLE update in r286603
https://bugs.webkit.org/show_bug.cgi?id=233964

Unreviewed warning removal.

  • src/compiler/translator/tree_util/IntermTraverse.h:
5:43 PM Changeset in webkit [286635] by Ross Kirsling
  • 8 edits in trunk/Source/JavaScriptCore

[JSC] Add LLInt IC for try_get_by_id of own cacheable value
https://bugs.webkit.org/show_bug.cgi?id=233830

Reviewed by Yusuke Suzuki.

This patch adds an LLInt IC for the "own cacheable value" path of try_get_by_id;
this is the simplest case and basically the same as get_by_id_direct.

Performance is neutral with JIT enabled as well as on current uses of try_get_by_id in JSC
(e.g. hasObservableSideEffectsForRegexpSplit), but microbenchmarks of try_get_by_id itself see a 2x speedup:

Before After

try-get-by-id-polymorphic 123.8361+-0.4562 61.7586+-0.3770 definitely 2.0052x faster
try-get-by-id-basic 124.4437+-0.6091 61.0340+-0.1924 definitely 2.0389x faster

<geometric> 124.1207+-0.3130 61.3865+-0.2019 definitely 2.0220x faster

  • bytecode/BytecodeList.rb:
  • bytecode/CodeBlock.cpp:
  • bytecode/GetByStatus.cpp:
  • llint/LLIntSlowPaths.cpp:
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
5:35 PM Changeset in webkit [286634] by Cameron McCormack
  • 3 edits in trunk/Source/WebCore

Move shouldAutoActivateFontIfNeeded knownFamilies cache to FontCache
https://bugs.webkit.org/show_bug.cgi?id=233749

Reviewed by Myles Maxfield.

With OffscreenCanvas, we can call shouldAutoActivateFontIfNeeded on a
worker thread, and the knownFamilies HashSet is not thread safe. Also,
the AtomStrings it stores are thread-specific. Move it to FontCache, so
each thread has its own set.

  • platform/graphics/FontCache.h:
  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::FontCache::shouldAutoActivateFontIfNeeded):
(WebCore::shouldAutoActivateFontIfNeeded): Deleted.

5:32 PM Changeset in webkit [286633] by Yousuke.Kimoto@sony.com
  • 2 edits in trunk/Tools

[webkitcorepy] Fail to install python module when a working directory is not on C drive on Windows
https://bugs.webkit.org/show_bug.cgi?id=233936

Reviewed by Jonathan Bedard.

On Windows, autoinstall.py installs python modules to C drive even if
your working directory is on other drive (e.g. D drive). To install
python modules correctly on Windows, a drive letter where your working
directory exists needs to be given to "--root" option of "setup.py"
in autoinstall.py.

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

(Package.install): Added root_location to detect a right drive letter to isntall modules on Windows.

4:55 PM Changeset in webkit [286632] by Devin Rousso
  • 40 edits in trunk/Source

Add a DOMPasteAccessCategory to control which pasteboard the WebProcess is granted access to when pasting
https://bugs.webkit.org/show_bug.cgi?id=233939

Reviewed by Wenson Hsieh.

Implementing -pasteFont: <https://webkit.org/b/191379> requires that we read from the font
pasteboard instead of the general pasteboard. In order to allow web content to trigger this
(e.g. document.execCommand("PasteFont"))) we must have a way for the WebProcess to signal
that it wishes to read from the font pasteboard instead of the general pasteboard. As such,
create and pass along a DOMPasteAccessCategory to requestDOMPasteAccess.

No change in behavior.

Source/WebCore:

  • dom/DOMPasteAccess.h:

Create DOMPasteAccessCategory.

  • page/EditorClient.h:
  • page/Frame.h:
  • page/Frame.cpp:

(WebCore::Frame::requestDOMPasteAccess):

  • loader/EmptyClients.cpp:

(WebCore::EmptyEditorClient::requestDOMPasteAccess):
Pass along the DOMPasteAccessCategory.

Source/WebKit:

  • Scripts/webkit/messages.py:

(headers_for_type):
Indicate which header is associated with DOMPasteAccessCategory.

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

(-[WKDOMPasteMenuDelegate initWithWebViewImpl:pasteAccessCategory:]): Added.
(-[WKDOMPasteMenuDelegate menuDidClose:]):
(-[WKDOMPasteMenuDelegate _web_grantDOMPasteAccess]): Added.
(WebKit::WebViewImpl::handleProcessSwapOrExit):
(WebKit::pasteboardNameForAccessCategory): Added.
(WebKit::pasteboardForAccessCategory): Added.
(WebKit::WebViewImpl::requestDOMPasteAccess):
(WebKit::WebViewImpl::handleDOMPasteRequestForCategoryWithResult):
(WebKit::WebViewImpl::hideDOMPasteMenuWithResult): Added.
(-[WKDOMPasteMenuDelegate initWithWebViewImpl:]): Deleted.
(WebKit::WebViewImpl::handleDOMPasteRequestWithResult): Deleted.

  • UIProcess/API/mac/WKView.mm:

(-[WKView _web_grantDOMPasteAccess]): Deleted.

  • UIProcess/API/mac/WKWebViewMac.mm:

(-[WKWebView _web_grantDOMPasteAccess]): Deleted.
Pass the DOMPasteAccessCategory to the WKDOMPasteMenuDelegate and use it as the target
of the NSMenuItem so that we can pass along the DOMPasteAccessCategory in the action.

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

(-[WKContentView cleanUpInteraction]):
(-[WKContentView resignFirstResponderForWebView]):
(-[WKContentView _webTouchEventsRecognized:]):
(-[WKContentView _willHideMenu:]):
(-[WKContentView pasteForWebView:]):
(pasteboardNameForAccessCategory): Added.
(pasteboardForAccessCategory): Added.
(-[WKContentView _hidePasteMenuWithResult:]): Added.
(-[WKContentView _handleDOMPasteRequestForCategory:result:]): Added.
(-[WKContentView _willPerformAction:sender:]):
(-[WKContentView _didPerformAction:sender:]):
(-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
(-[WKContentView _requestDOMPasteAccessForCategory:elementRect:originIdentifier:completionHandler:]): Added.
(-[WKContentView _handleDOMPasteRequestWithResult:]): Deleted.
(-[WKContentView _requestDOMPasteAccessWithElementRect:originIdentifier:completionHandler:]): Deleted.

  • UIProcess/PageClient.h:
  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::requestDOMPasteAccess):

  • UIProcess/API/wpe/PageClientImpl.h:
  • UIProcess/API/wpe/PageClientImpl.cpp:

(WebKit::PageClientImpl::requestDOMPasteAccess):

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

(WebKit::PageClientImpl::requestDOMPasteAccess):

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

(WebKit::PageClientImpl::requestDOMPasteAccess):

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

(WebKit::PageClientImpl::requestDOMPasteAccess):

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

(WebKit::PageClientImpl::requestDOMPasteAccess):

  • WebProcess/WebCoreSupport/WebEditorClient.h:
  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::requestDOMPasteAccess):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::requestDOMPasteAccess):
Pass along the DOMPasteAccessCategory.

  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::pasteAccessCategoryForCommand): Added.
(WebKit::WebPageProxy::executeEditCommand):
(WebKit::WebPageProxy::requestDOMPasteAccess):
(WebKit::WebPageProxy::willPerformPasteCommand):
(WebKit::isPasteCommandName): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::willPerformPasteCommand):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::willPerformPasteCommand)
Create a mapping between paste command name and DOMPasteAccessCategory.

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebEditorClient.h:

(WebEditorClient::requestDOMPasteAccess):

Source/WebKitLegacy/win:

  • WebCoreSupport/WebEditorClient.h:

(WebEditorClient::requestDOMPasteAccess):

4:44 PM Changeset in webkit [286631] by Simon Fraser
  • 2 edits in trunk/Source/WebKit

[Scroll Momentum Generator] Pages lose ability to momentum scroll after dragging between displays
https://bugs.webkit.org/show_bug.cgi?id=233948
rdar://86110813

Reviewed by Tim Horton.

This is a conservative fix for the bug. When a view moves to a new screen, WebPageProxy
needs to unregister for full speed updates using the old displayID, and register
using the new one.

Longer term, it would be better if "full speed updates" was a per-observer concept,
but that would mean registering an observer while wheel events are being received,
which needs a bit more thought.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::windowScreenDidChange):

4:40 PM Changeset in webkit [286630] by Devin Rousso
  • 7 edits
    1 copy
    1 add in trunk

Add helper methods to WebCore::FontShadow for serializing to CSS and converting to NSShadow
https://bugs.webkit.org/show_bug.cgi?id=233938

Source/WebCore:

Implementing -pasteFont: <https://webkit.org/b/191379> requires that we convert native
font attribute data into objects understandable by WebCore, one of which is a NSShadow.
These helpers will make it easier to parse the NSShadow and convert it to a CSS value that
we will use to override the selection's CSS text-shadow.

No change in behavior.

Reviewed by Wenson Hsieh.

Tests: FontShadow.InvalidColor

FontShadow.NoOffsetOrBlurRadius
FontShadow.NoOffset
FontShadow.NegativeOffset
FontShadow.NoBlurRadius
FontShadow.NegativeBlurRadius
FontShadow.AllNegative

  • editing/FontShadow.h:
  • editing/FontShadow.cpp: Added.

(WebCore::serializationForCSS):

  • editing/cocoa/FontShadowCocoa.mm:

(WebCore::fontShadowFromNSShadow): Added.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:

Tools:

Reviewed by Wenson Hsieh.

  • TestWebKitAPI/Tests/WebCore/FontShadowTests.cpp: Added.

(TestWebKitAPI::TEST.FontShadow.InvalidColor):
(TestWebKitAPI::TEST.FontShadow.NoOffsetOrBlurRadius):
(TestWebKitAPI::TEST.FontShadow.NoOffset):
(TestWebKitAPI::TEST.FontShadow.NegativeOffset):
(TestWebKitAPI::TEST.FontShadow.NoBlurRadius):
(TestWebKitAPI::TEST.FontShadow.NegativeBlurRadius):
(TestWebKitAPI::TEST.FontShadow.AllNegative):

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
4:24 PM Changeset in webkit [286629] by Jonathan Bedard
  • 2 edits in trunk/Tools

[commits.webkit.org] Fallback to remote repository (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=233904
<rdar://problem/86131927>

Reviewed by Dewei Zhu.

  • CISupport/ews-build/steps.py:

(PushCommitToWebKitRepo.evaluateCommand): Wait before querying commits.webkit.org

4:22 PM Changeset in webkit [286628] by yoshiaki.jitsukawa@sony.com
  • 7 edits
    5 adds in trunk

Support Animated JPEG-XL images
https://bugs.webkit.org/show_bug.cgi?id=233545
<rdar://problem/86077143>

Reviewed by Don Olmstead.

Source/WebCore:

Implement relevant API, such as frameCount() and support a positive
frame index for frameBufferAtIndex().

Introduce a query to count frames because JPEG XL code stream itself doesn't have frame
count metadata and we need to scan the code stream to the last frame.

Also introduce the Size query instead of the onlySize parameter of the decode() function.

With the DecodeImage query, the decoder decodes a single frame. To
specify which frame to decode, we make use of the JxlDecoderRewind()
and JxlDecoderSkipFrames() functions of libjxl.

To omit rewind and skip as much as possible, we record the query to
m_lastQuery and use it in shouldRewind().

Test: fast/images/animated-jpegxl-loop-count.html

  • platform/image-decoders/jpegxl/JPEGXLImageDecoder.cpp:

(WebCore::JPEGXLImageDecoder::~JPEGXLImageDecoder):
(WebCore::JPEGXLImageDecoder::frameCount const):
(WebCore::JPEGXLImageDecoder::repetitionCount const):
(WebCore::JPEGXLImageDecoder::frameBufferAtIndex):
(WebCore::JPEGXLImageDecoder::clearFrameBufferCache):
(WebCore::JPEGXLImageDecoder::setFailed):
(WebCore::JPEGXLImageDecoder::tryDecodeSize):
(WebCore::JPEGXLImageDecoder::hasAlpha const):
(WebCore::JPEGXLImageDecoder::hasAnimation const):
(WebCore::JPEGXLImageDecoder::ensureDecoderInitialized):
(WebCore::JPEGXLImageDecoder::shouldRewind const):
(WebCore::JPEGXLImageDecoder::rewind):
(WebCore::JPEGXLImageDecoder::updateFrameCount):
(WebCore::JPEGXLImageDecoder::decode):
(WebCore::JPEGXLImageDecoder::processInput):
(WebCore::JPEGXLImageDecoder::imageOut):
(WebCore::JPEGXLImageDecoder::clear): Deleted.

  • platform/image-decoders/jpegxl/JPEGXLImageDecoder.h:

LayoutTests:

Add test for animated JPEG XL, based on animated-gif-loop-count.

  • TestExpectations:
  • fast/images/animated-jpegxl-loop-count-expected.html: Added.
  • fast/images/animated-jpegxl-loop-count.html: Added.
  • fast/images/resources/animated-red-green-blue-repeat-1.jxl: Added.
  • fast/images/resources/animated-red-green-blue-repeat-2.jxl: Added.
  • fast/images/resources/animated-red-green-blue-repeat-infinite.jxl: Added.
  • platform/glib/TestExpectations:
  • platform/wincairo/TestExpectations:
4:06 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
4:01 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
3:36 PM Changeset in webkit [286627] by Robert Jenner
  • 2 edits in trunk/LayoutTests

REGRESSION(iOS 14): svg/W3C-I18N/tspan-direction-rtl.svg is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=217258

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
3:33 PM Changeset in webkit [286626] by Robert Jenner
  • 2 edits in trunk/LayoutTests

REGRESSION(iOS 14): svg/W3C-I18N/tspan-direction-rtl.svg is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=217258

Unreviewed test gardening. iOS 15 rebaseline.

  • platform/ios/svg/W3C-I18N/tspan-direction-rtl-expected.txt:
3:33 PM Changeset in webkit [286625] by Cameron McCormack
  • 40 edits in trunk/Source

Move FontCache singleton and instance on WorkerGlobalScope to ThreadGlobalData
https://bugs.webkit.org/show_bug.cgi?id=233747

Reviewed by Darin Adler.

Source/WebCore:

There are various places in font code where we need access to a
FontCache instance. Currently we:

  • assume that we're on the main thread and call FontCache::singleton(), or
  • get a FontCache off WorkerGlobalScope and pass it down (or store it) where it's needed, then pass it to fontCacheFallingBackToSingleton.

Having to thread through, or store, the FontCache pointer is
inconvenient, and there are some places where we don't have access to
a FontCache pointer, but we're on a worker, and we call
fontCacheFallingBackToSingleton and incorrectly get back the main
thread's instance.

I think it would be cleaner if we moved both the main thread FontCache
singleton, and the one stored on a WorkerGlobalScope, to
ThreadGlobalData, which is easily globally accessible. Performing a
TLS lookup is cheap these days.

  • css/CSSFontFace.h:
  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::font):
(WebCore::CSSFontFace::fontCacheFallingBackToSingleton):
Remove fontCacheFallingBackToSingleton and replace calls to it with
FontCache::forCurrentThread.

  • css/CSSFontFaceSet.cpp:

(WebCore::CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered):
Replace getting the FontCache from the ScriptExecutionContext with a
call to FontCache::forCurrentThread.

  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::load):
(WebCore::CSSFontFaceSource::font):

  • editing/cocoa/FontAttributeChangesCocoa.mm:

(WebCore::FontChanges::platformFontFamilyNameForCSS const):

  • inspector/agents/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::getSupportedSystemFontFamilyNames):

  • page/MemoryRelease.cpp:

(WebCore::releaseNoncriticalMemory):

  • page/ProcessWarming.cpp:

(WebCore::ProcessWarming::prewarmGlobally):
(WebCore::ProcessWarming::collectPrewarmInformation):
(WebCore::ProcessWarming::prewarmWithInformation):

  • page/SettingsBase.cpp:

(WebCore::invalidateAfterGenericFamilyChange):
Replace calls to FontCache::singleton with calls to
FontCache::forCurrentThread.

  • css/CSSFontSelector.h:
  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::CSSFontSelector):
(WebCore::CSSFontSelector::~CSSFontSelector):
(WebCore::CSSFontSelector::fontRangesForFamily):
(WebCore::CSSFontSelector::fallbackFontAt):
Remove CSSFontSelector::m_fontCache and use
FontCache::forCurrentThread instead. For the CSSFontSelector
destructor, we call forCurrentThreadIfNotDestroyed since it
can run after ThreadGlobalData::destroy has been called for
a worker, and we don't want to cause a fresh FontCache object to be
created at this point.

  • dom/ScriptExecutionContext.h:
  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::fontCache):
Remove the FontCache member.

  • platform/ThreadGlobalData.h:

(WebCore::ThreadGlobalData::ThreadGlobalData::cachedResourceRequestInitiators):
(WebCore::ThreadGlobalData::ThreadGlobalData::eventNames):
(WebCore::ThreadGlobalData::ThreadGlobalData::qualifiedNameCache):
(WebCore::ThreadGlobalData::ThreadGlobalData::mimeTypeRegistryThreadGlobalData):
(WebCore::ThreadGlobalData::ThreadGlobalData::fontCache):
(WebCore::ThreadGlobalData::ThreadGlobalData::fontCacheIfNotDestroyed):

  • platform/ThreadGlobalData.cpp:

(WebCore::ThreadGlobalData::destroy):
(WebCore::ThreadGlobalData::initializeFontCache):
Add accessors for a lazily created FontCache. Also record whether
destroy has been called on the ThreadGlobalData so that
fontCacheIfNotDestroyed can check it, and the other lazy object
creation methods can assert destroy hasn't been called yet.

  • platform/graphics/Font.h:
  • platform/graphics/Font.cpp:

(WebCore::Font::create):
(WebCore::Font::Font):
(WebCore::Font::systemFallbackFontForCharacter const):

  • platform/graphics/FontCache.cpp:

(WebCore::FontCache::fontForPlatformData):

  • workers/WorkerFontLoadRequest.cpp:

(WebCore::WorkerFontLoadRequest::createFont):
Remove FontCache arguments and use FontCache::forCurrentThread in
their place.

  • platform/graphics/FontCache.cpp:

(WebCore::FontCache::create): Removed.
(WebCore::FontCache::singleton):
(WebCore::FontCache::forCurrentThread):
Replace FontCache::singleton with FontCache::forCurrentThread, which
looks up the FontCache on ThreadGlobalData.
(WebCore::FontCache::invalidateAllFontCaches):
New function that will in the future invalidate the main thread and
all worker thread FontCaches.

  • platform/graphics/FontCache.h:

Remove refcounting from FontCache since we no longer need to store a
strong reference to it on other objects.
(WebCore::FontCache::fontCacheFallingBackToSingleton): Deleted.

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::isCurrent const):
(WebCore::FontCascade::update const):
Call FontCache::forCurrentThread instead of getting it from the
FontSelector.

  • platform/graphics/FontCascadeFonts.cpp:

(WebCore::FontCascadeFonts::FontCascadeFonts):
(WebCore::realizeNextFallback):
(WebCore::FontCascadeFonts::realizeFallbackRangesAt):
(WebCore::FontCascadeFonts::glyphDataForSystemFallback):

  • platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:

(WebCore::FontCascade::fontForCombiningCharacterSequence const):
Use FontCache::forCurrentThread.

  • platform/graphics/FontSelector.h:

Remove fontCache method.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
(WebCore::fontWithFamilySpecialCase):
(WebCore::FontCache::prewarmGlobally):

  • platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:

(WebCore::FontFamilySpecificationCoreText::fontRanges const):

  • platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:

(WebCore::SystemFontDatabaseCoreText::systemFontParameters):

  • platform/graphics/mac/ComplexTextControllerCoreText.mm:

(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setShouldMockBoldSystemFontForAccessibility):
Use FontCache::forCurrentThread.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::invalidateFontCache):

  • testing/Internals.cpp:

(WebCore::Internals::invalidateFontCache):
Call the new FontCache::invalidateAllFontCaches.

  • platform/graphics/win/FontCacheWin.cpp:

(WebCore::getCJKCodePageMasks):
(WebCore::FontCache::systemFallbackForCharacters):
Use the FontCache instance we have access to rather than call
FontCache::singleton.

  • workers/WorkerGlobalScope.h:
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::fontCache):
Remove the FontCache member and accessor.

Source/WebKit:

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::terminate):
Update existing main threa callers of FontCache::singleton() to use
FontCache::forCurrentThread().

Source/WebKitLegacy/mac:

  • Misc/WebCoreStatistics.mm:

(+[WebCoreStatistics cachedFontDataCount]):
(+[WebCoreStatistics cachedFontDataInactiveCount]):
(+[WebCoreStatistics purgeInactiveFontData]):
Update existing main thread callers of FontCache::singleton() to use
FontCache::forCurrentThread().

Source/WebKitLegacy/win:

  • WebCoreStatistics.cpp:

(WebCoreStatistics::cachedFontDataCount):
(WebCoreStatistics::cachedFontDataInactiveCount):
(WebCoreStatistics::purgeInactiveFontData):
Update existing main thread callers of FontCache::singleton() to use
FontCache::forCurrentThread().

2:51 PM Changeset in webkit [286624] by Ben Nham
  • 5 edits
    2 adds
    1 delete in trunk/Source/WebKit

webpushd should run with regular user permissions
https://bugs.webkit.org/show_bug.cgi?id=233844

Reviewed by Brady Eidson.

Currently webpushd runs as root, which is unneessary. This patch makes it so that we run
with regular user permissions. This is done by specifying a UserName in the launchd plist on
iOS and by installing the plist to /System/Library/LaunchAgents on Mac. Since the plists now
differ based on platform, I changed the "Copy Daemon Plists" build phase in the WebKit
target to copy the appropriate plist to either /S/L/LaunchDaemons or /S/L/LaunchAgents.

Additionally, webpushd needs the aps-connection-initiate or
com.apple.private.aps-connection-initiate to receive pushes from apsd on iOS and Mac
respectively, so I gave the daemon those entitlements.

Finally, webpushd now registers for the com.apple.aps.webkit.webpushd.incoming-push Mach
service so that it can be launched on demand in response to a push. Right now we just
bootstrap_check_in to the service at launch time, but eventually we'll remove that and
use APSConnection to check in to the service instead. Since the bootstrap_check_in
call is temporary, I chose not to make a header file in wtf/spi and declared the prototype
in the implementation file instead.

  • Configurations/webpushd.xcconfig:
  • Scripts/process-entitlements.sh:
  • WebKit.xcodeproj/project.pbxproj:
  • webpushd/WebPushDaemonMain.mm:

(WebKit::WebPushDaemonMain):

  • webpushd/com.apple.webkit.webpushd.ios.plist: Added.
  • webpushd/com.apple.webkit.webpushd.mac.plist: Added.
  • webpushd/com.apple.webkit.webpushd.plist: Removed.
2:31 PM Changeset in webkit [286623] by Jonathan Bedard
  • 6 edits in trunk/Tools

[commits.webkit.org] Fallback to remote repository (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=233904
<rdar://problem/86131927>

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/init.py: Bump version.
  • Tools/Scripts/libraries/reporelaypy/reporelaypy/checkout.py:

(Checkout.Encoder.default):
(Checkout.init): Allow user to specify a remote fallback repository.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/checkoutroute.py:

(CheckoutRoute.commit): If no commit is found, query the fallback repository.

  • Tools/Scripts/libraries/reporelaypy/run: Add --fallback option.
  • Tools/Scripts/libraries/reporelaypy/setup.py: Bump version.

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

2:27 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
2:26 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
2:25 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
2:22 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
2:17 PM Changeset in webkit [286622] by Russell Epstein
  • 2 edits in branches/safari-613.1.11-branch/Source/WebKit

Cherry-pick r286563. rdar://problem/86175400

REGRESSION (r286527): Three API tests crashing under WebKit::ProcessLauncher::launchProcess()
https://bugs.webkit.org/show_bug.cgi?id=233882
<rdar://problem/86111726>

Reviewed by Brent Fulgham.

Correct the eventHandler to capture the process name, rather than using a raw pointer to the character string.

  • UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm: (WebKit::ProcessLauncher::launchProcess):

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

2:06 PM Changeset in webkit [286621] by Russell Epstein
  • 2 edits in branches/safari-613.1.11-branch/Source/WebKit

Cherry-pick r286574. rdar://problem/86174696

Regression(r286505) imported/w3c/web-platform-tests/html/cross-origin-opener-policy/javascript-url.https.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=233874

Reviewed by Darin Adler.

r286505 fixed ProvisionalPageProxy so that ProvisionalPageProxy::m_provisionalLoadURL gets properly initialized when the
ProvisionalPageProxy gets constructed *after* the provisional load has already started (COOP proces-swap case). One side
effect of this though is that ProvisionalPageProxy::cancel() no longer returns early and will try to notify the client
that the provisional load failed, dereferencing m_mainFrame in doing so. In the event where the main frame has not yet
been created in the new provisional process, this would do a null-dereference of m_mainFrame.

To address the issue, we now early return in ProvisionalPageProxy::cancel() if m_isProcessSwappingOnNavigationResponse
is true (i.e. The ProvisionalPageProxy was created after the provisional load had started). In such situations, we
don't want to ProvisionalPageProxy to be the one notifying the client of the provisional load failure anyway. The reason
is that there is still a provisional load going on in the committed process/page.

No new tests, covered by existing test that is flakily crashing.

  • UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::cancel):

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

1:58 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
1:58 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
1:57 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
1:49 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
1:46 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
1:38 PM Changeset in webkit [286620] by Russell Epstein
  • 1 copy in tags/Safari-613.1.9.2

Tag Safari-613.1.9.2.

1:32 PM Changeset in webkit [286619] by Russell Epstein
  • 9 edits in branches/safari-613.1.9-branch/Source

Versioning.

WebKit-7613.1.9.2

1:20 PM Changeset in webkit [286618] by Russell Epstein
  • 1 copy in tags/Safari-613.1.10.2

Tag Safari-613.1.10.2.

1:20 PM Changeset in webkit [286617] by Russell Epstein
  • 1 delete in tags/Safari-613.1.10.2

Remove tag.

1:19 PM Changeset in webkit [286616] by Russell Epstein
  • 6 edits
    2 copies in branches/safari-613.1.10-branch/Source/WebKit

Cherry-pick r286564. rdar://problem/86052131

Put webpushd code in WebKit.framework.
https://bugs.webkit.org/show_bug.cgi?id=233886

Reviewed by Alex Christensen.

This fixes some build/mastering/linking issues.

  • Configurations/webpushd.xcconfig:
  • Shared/API/Cocoa/WKMain.h:
  • Shared/API/Cocoa/WKMain.mm: (WKWebPushDaemonMain):
  • WebKit.xcodeproj/project.pbxproj:
  • webpushd/WebPushDaemonMain.h: Copied from Source/WebKit/Shared/API/Cocoa/WKMain.mm.
  • webpushd/WebPushDaemonMain.mm: (WebKit::WebPushDaemonMain): (main): Deleted.
  • webpushd/webpushd.cpp: Copied from Source/WebKit/Shared/API/Cocoa/WKMain.mm. (main):

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

1:19 PM Changeset in webkit [286615] by Russell Epstein
  • 2 edits
    7 adds in branches/safari-613.1.10-branch/Source/WebKit

Cherry-pick r286533. rdar://problem/86052131

Add command line webpushtool for daemon development and debugging.
https://bugs.webkit.org/show_bug.cgi?id=233845

Reviewed by Tim Horton.

No behavior change.

This utility will eventually be quite fleshed out.

For now, it can act as a terminal that prints debug messages from webpushd.

  • Configurations/webpushtool.xcconfig: Added.
  • Resources/webpushtool.entitlements: Added.
  • WebKit.xcodeproj/project.pbxproj:
  • WebKit.xcodeproj/xcshareddata/xcschemes/webpushtool.xcscheme: Added.
  • webpushd/webpushtool/WebPushToolConnection.h: Added.
  • webpushd/webpushtool/WebPushToolConnection.mm: Added. (WebPushTool::Connection::create): (WebPushTool::maybeConnectToService): (WebPushTool::Connection::Connection): (WebPushTool::Connection::connectToService): (WebPushTool::Connection::startAction): (WebPushTool::Connection::startDebugStreamAction): (WebPushTool::Connection::sendAuditToken): (WebPushTool::Connection::connectionDropped): (WebPushTool::Connection::messageReceived):
  • webpushd/webpushtool/WebPushToolMain.mm: Added. (printUsageAndTerminate): (main):

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

1:19 PM Changeset in webkit [286614] by Russell Epstein
  • 22 edits
    1 copy in branches/safari-613.1.10-branch

Cherry-pick r286355. rdar://problem/86052131

Add WKWebsiteDataStore configuration option to enable Mock app bundle testing.
https://bugs.webkit.org/show_bug.cgi?id=233679

Reviewed by Tim Horton.

Source/WebKit:

Covered by API tests.

We're about to land actual implementations of app permissions bundles.
But the mock bundles still have a place for testing.
We need a way to switch between Mock and Native.

This patch takes the opportunity to plumb out a WebPushDaemonConnectionConfiguration object
that can easily be augmented in future patches to add new options without messing with messaging directly.

  • NetworkProcess/NetworkSession.h: (WebKit::NetworkSession::webpushdUsesMockBundlesForTesting const):
  • NetworkProcess/NetworkSessionCreationParameters.cpp: (WebKit::NetworkSessionCreationParameters::encode const): (WebKit::NetworkSessionCreationParameters::decode):
  • NetworkProcess/NetworkSessionCreationParameters.h:
  • NetworkProcess/Notifications/NetworkNotificationManager.cpp: (WebKit::NetworkNotificationManager::maybeSendConnectionConfiguration const): (WebKit::NetworkNotificationManager::sendMessage const): (WebKit::NetworkNotificationManager::sendMessageWithReply const): (WebKit::NetworkNotificationManager::maybeSendHostAppAuditToken const): Deleted.
  • NetworkProcess/Notifications/NetworkNotificationManager.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
  • Shared/WebPushDaemonConnectionConfiguration.h: Copied from Source/WebKit/Shared/WebPushDaemonConstants.h. (WebKit::WebPushD::WebPushDaemonConnectionConfiguration::encode const): (WebKit::WebPushD::WebPushDaemonConnectionConfiguration::decode):
  • Shared/WebPushDaemonConstants.h: (WebKit::WebPushD::messageTypeSendsReply):
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm: (-[_WKWebsiteDataStoreConfiguration webpushdUsesMockBundlesForTesting]): (-[_WKWebsiteDataStoreConfiguration setWebpushdUsesMockBundlesForTesting:]):
  • UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::parameters):
  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: (WebKit::WebsiteDataStoreConfiguration::copy const): (WebKit::WebsiteDataStoreConfiguration::webPushDaemonConnectionConfiguration const):
  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h: (WebKit::WebsiteDataStoreConfiguration::webpushdUsesMockBundlesForTesting const): (WebKit::WebsiteDataStoreConfiguration::setWebpushdUsesMockBundlesForTesting):
  • WebKit.xcodeproj/project.pbxproj:
  • webpushd/AppBundleRequest.mm: (WebPushD::AppBundleRequest::AppBundleRequest): (WebPushD::AppBundleRequest::start):
  • webpushd/PushClientConnection.h: (WebPushD::ClientConnection::hasHostAppAuditToken const): (WebPushD::ClientConnection::useMockBundlesForTesting const):
  • webpushd/PushClientConnection.mm: (WebPushD::ClientConnection::updateConnectionConfiguration): (WebPushD::ClientConnection::setHostAppAuditTokenData):
  • webpushd/WebPushDaemon.h:
  • webpushd/WebPushDaemon.mm: (WebPushD::Daemon::decodeAndHandleMessage): (WebPushD::Daemon::getOriginsWithPushAndNotificationPermissions): (WebPushD::Daemon::setDebugModeIsEnabled): (WebPushD::Daemon::updateConnectionConfiguration): (WebPushD::Daemon::setHostAppAuditToken): Deleted.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:

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

1:19 PM Changeset in webkit [286613] by Russell Epstein
  • 9 edits
    4 copies
    4 adds in branches/safari-613.1.10-branch

Cherry-pick r286273. rdar://problem/86052131

Make webpushd "fake registration for testing" much more complicated by adding a "mock app bundle" install
https://bugs.webkit.org/show_bug.cgi?id=233454

Reviewed by Alex Christensen.

Covered by API tests.

Before this patch, webpushd remembered "registrations" using a simple in-memory HashMap.

In the near future, registrations will actually be represented with a placeholder app bundle on disk.

The process of installing placeholders (and checking for existing ones) is complicated and asynchronous.

This patch shifts the in-memory testing implementation from a simple HashMap to a "complicated and asynchronous"
registration mechanism that simulates how app-bundle installs will work.

Once the "real" mechanisms are in place there will be much more in-depth testing that we can do.
For now, this is a "no behavior change" patch.

  • NetworkProcess/Notifications/Cocoa/WebPushDaemonConnectionCocoa.mm: (WebKit::WebPushD::Connection::connectionReceivedEvent const):
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • WebKit.xcodeproj/project.pbxproj:

"PushAppBundle" is an abstract base class for representing a placeholder application bundle for a registration.
Eventually there will be a native one for each platform that actually does system operations.
For now, the concrete implementation is the in-memory "Mock" app bundle.

  • webpushd/PushAppBundle.h: Copied from Source/WebKit/webpushd/PushClientConnection.h.
  • webpushd/PushAppBundle.mm: Copied from Source/WebKit/webpushd/PushClientConnection.h. (WebPushD::PushAppBundleClient::~PushAppBundleClient): (WebPushD::PushAppBundle::PushAppBundle): (WebPushD::PushAppBundle::~PushAppBundle): (WebPushD::PushAppBundle::detachFromClient):

An "AppBundleRequest" is a queable operation meant to do something with an "App bundle".
For now the operations are "create" and "delete"

  • webpushd/AppBundleRequest.h: Added. (WebPushD::AppBundleRequestImpl::AppBundleRequestImpl): (WebPushD::AppBundleRequestImpl::~AppBundleRequestImpl): (WebPushD::AppBundleRequestImpl::callCompletionHandlerAndCleanup): (WebPushD::AppBundlePermissionsRequest::AppBundlePermissionsRequest): (WebPushD::AppBundleDeletionRequest::AppBundleDeletionRequest):
  • webpushd/AppBundleRequest.mm: Added. (WebPushD::AppBundleRequest::AppBundleRequest): (WebPushD::AppBundleRequest::~AppBundleRequest): (WebPushD::AppBundleRequest::start): (WebPushD::AppBundleRequest::cancel): (WebPushD::AppBundleRequest::cleanupAfterCompletionHandler): (WebPushD::AppBundlePermissionsRequest::startInternal): (WebPushD::AppBundlePermissionsRequest::didCheckForExistingBundle): (WebPushD::AppBundlePermissionsRequest::didCreateAppBundle): (WebPushD::AppBundleDeletionRequest::startInternal): (WebPushD::AppBundleDeletionRequest::didDeleteExistingBundleWithError):
  • webpushd/MockAppBundleForTesting.h: Copied from Source/WebKit/webpushd/PushClientConnection.h. (WebPushD::MockAppBundleForTesting::create):
  • webpushd/MockAppBundleForTesting.mm: Added. (WebPushD::MockAppBundleForTesting::MockAppBundleForTesting): (WebPushD::MockAppBundleForTesting::~MockAppBundleForTesting): (WebPushD::MockAppBundleForTesting::checkForExistingBundle): (WebPushD::MockAppBundleForTesting::deleteExistingBundle): (WebPushD::MockAppBundleForTesting::createBundle): (WebPushD::MockAppBundleForTesting::stop):
  • webpushd/MockAppBundleRegistry.h: Copied from Source/WebKit/webpushd/PushClientConnection.h.
  • webpushd/MockAppBundleRegistry.mm: Added. (WebPushD::MockAppBundleRegistry::singleton): (WebPushD::MockAppBundleRegistry::getOriginsWithRegistrations): (WebPushD::MockAppBundleRegistry::doesBundleExist): (WebPushD::MockAppBundleRegistry::createBundle): (WebPushD::MockAppBundleRegistry::deleteBundle):
  • webpushd/PushClientConnection.h:
  • webpushd/PushClientConnection.mm: (WebPushD::ClientConnection::create): (WebPushD::ClientConnection::enqueueAppBundleRequest): (WebPushD::ClientConnection::maybeStartNextAppBundleRequest): (WebPushD::ClientConnection::didCompleteAppBundleRequest): (WebPushD::ClientConnection::connectionClosed):
  • webpushd/WebPushDaemon.h:
  • webpushd/WebPushDaemon.mm: (WebPushD::Daemon::connectionAdded): (WebPushD::Daemon::connectionRemoved): (WebPushD::Daemon::requestSystemNotificationPermission): (WebPushD::Daemon::getOriginsWithPushAndNotificationPermissions): (WebPushD::Daemon::deletePushAndNotificationRegistration):

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

1:17 PM Changeset in webkit [286612] by Russell Epstein
  • 1 copy in tags/Safari-613.1.10.2

Tag Safari-613.1.10.2.

12:51 PM Changeset in webkit [286611] by Razvan Caliman
  • 19 edits
    3 adds in trunk

Web Inspector: Support fuzzy matching in CSS completions
https://bugs.webkit.org/show_bug.cgi?id=230351
<rdar://82976292>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Use fuzzy matching for identifying CSS completions in the Styles details sidebar.

There are three main parts to this patch:

  1. Introduce WI.CSSQueryController with logic to do fuzzy matching on provided values.
  2. Change WI.CompletionSuggestionsView to support both plain strings and WI.QueryResults.
  3. Change WI.SpreadsheetTextField so its value doesn't always return its element.textContent.

With fuzzy matching, completions are not guaranteed anymore to be prefixed with the query.
Therefore, it's no longer viable to rely on WI.SpreadsheetTextField.value being a concatenation of textContent of nodes within.

To adress this, there's now WI.SpreadsheetTextField._pendingValue which includes the prospective
completion regardless of whether the query is a completion prefix or at match at any other position.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/Setting.js:

Add a flag to enable the fuzzy matching feature.

  • UserInterface/Controllers/CSSQueryController.js: Added.

(WI.CSSQueryController):
(WI.CSSQueryController.prototype.addValues):
(WI.CSSQueryController.prototype.reset):
(WI.CSSQueryController.prototype.executeQuery):
(WI.CSSQueryController.prototype._findSpecialCharacterIndices):
Add a speclialized class to hold the logic for fuzzy matching of CSS properties and values.
It clones logic from WI.ResouceQueryController with adjustments specific to CSS; more to follow as the feature gets refined.

  • UserInterface/Main.html:
  • UserInterface/Models/CSSCompletions.js:

(WI.CSSCompletions):
(WI.CSSCompletions.prototype.addValues):
(WI.CSSCompletions.prototype.executeQuery):
Support both the current prefix matching approach as well as fuzzy matching.

  • UserInterface/Models/CSSKeywordCompletions.js:

(WI.CSSKeywordCompletions.forPartialPropertyName):
Opt into fuzzy matching when getting completions for property names and values.

  • UserInterface/Models/QueryResult.js:

(WI.QueryResult.prototype.get matches):

  • UserInterface/Test.html:
  • UserInterface/Views/CompletionSuggestionsView.css:

(.completion-suggestions-container > .item > .highlighted):
Highlight specific characters that matched in result identified by fuzzy matching.

  • UserInterface/Views/CompletionSuggestionsView.js:

(WI.CompletionSuggestionsView.prototype.selectNext):
(WI.CompletionSuggestionsView.prototype.selectPrevious):
(WI.CompletionSuggestionsView.prototype.update):
(WI.CompletionSuggestionsView.prototype.getCompletionText):
(WI.CompletionSuggestionsView.prototype._createHighlightedCompletionFragment):
Change WI.CompletionSuggestionsView to hold a list of completions,
either strings or WI.QueryResult, and return the appropriate completion text
instead of returning the textContent of the selected element.

WI.CompletionSuggestionsView is used elsewhere in the Console and Sources panel
so avoid impacting those consumers until they opt in to fuzzy matching as well.

  • UserInterface/Views/SettingsTabContentView.js:
  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype._handleNameChange):
(WI.SpreadsheetStyleProperty.prototype._handleValueChange):
(WI.SpreadsheetStyleProperty.prototype._nameCompletionDataProvider):
(WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
On change, get the value of the WI.SpreadsheetTextField instead of
the corresponding element's textContent.

  • UserInterface/Views/SpreadsheetTextField.js:

Introduced SpreadsheetTextField._completionPrefix to hold the query a user is typing.

Introduced SpreadsheetTextField._completionText to hold the completion text of the selected but
not yet applied completion. This replaces the previous behavior of concatenating the query and suggestionHint
because with fuzzy matching the completion isn't guaranteed to be prefixed with the query.

Introduced SpreadsheetTextField._pendingValue to hold the result of applying the selected
completion. This replaces the previous behavior of WI.SpreadsheetTextField._combineEditorElementChildren.

(WI.SpreadsheetTextField):
(WI.SpreadsheetTextField.prototype.get value):
Change WI.SpreadsheetTextField so its value is divorced from its element's textContent.
While editing, WI.SpreadsheetTextField.value returns the pending value so that
a valid CSS string gets written to the stylesheet.

(WI.SpreadsheetTextField.prototype.set suggestionHint):
If the query is a prefix for the selected completion, keep the existing behavior of appending
the suggestion hint substring. Otherwise, hide the suggestion hint element because the
concatenation doesn't make sense.

(WI.SpreadsheetTextField.prototype.stopEditing):
(WI.SpreadsheetTextField.prototype.discardCompletion):
(WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion):
(WI.SpreadsheetTextField.prototype.completionSuggestionsClickedCompletion):
(WI.SpreadsheetTextField.prototype._discardChange):
(WI.SpreadsheetTextField.prototype._handleBlur):
(WI.SpreadsheetTextField.prototype._handleKeyDown):
(WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView):
(WI.SpreadsheetTextField.prototype._handleInput):
(WI.SpreadsheetTextField.prototype._updateCompletions):
(WI.SpreadsheetTextField.prototype._applyPendingValue):
After applying a completion, the value is replaced with WI.SpreadsheetTextField._pendingValue.
At this point, WI.SpreadsheetTextField.value and the textContent of the element converge.

(WI.SpreadsheetTextField.prototype._updatePendingValueWithCompletionText):
When presented with a completion, the query gets substituted with the full completion text in
WI.SpreadsheetTextField._pendingValue regardless of whether the query is a prefix or not.

(WI.SpreadsheetTextField.prototype._applyCompletionHint): Deleted.
(WI.SpreadsheetTextField.prototype._combineEditorElementChildren): Deleted.

LayoutTests:

Add test for WI.CSSQueryController to check fuzzy matching logic for CSS completions.
Follows prior example from LayoutTests/inspector/unit-tests/resource-query-controller.html
since WI.ResouceQueryController served as the model class that was adapted for CSS.

  • inspector/unit-tests/css-query-controller-expected.txt: Added.
  • inspector/unit-tests/css-query-controller.html: Added.
12:51 PM Changeset in webkit [286610] by Cameron McCormack
  • 2 edits in trunk/Websites/webkit.org

Puzzle feature detection followup
https://bugs.webkit.org/show_bug.cgi?id=233946

Unreviewed.

  • blog-files/wide-gamut-canvas/puzzle.html:
12:42 PM Changeset in webkit [286609] by Chris Dumez
  • 4 edits in trunk

ASSERTION FAILED: m_messagesBeingDispatched.isEmpty() on http/tests/resourceLoadStatistics/website-data-removal-for-site-with-user-interaction.html
https://bugs.webkit.org/show_bug.cgi?id=228164
<rdar://problem/80914914>

Reviewed by Darin Adler.

Source/WebKit:

dispatchMessagesAndResetDidScheduleDispatchMessagesForConnection() has an assertion to make sure that m_messagesBeingDispatched
was empty when getting called. However, in the case where there is a nested run loop, the call to
m_messagesBeingDispatched.takeFirst().dispatch() at the end of the function may cause the function to re-enter. When entering,
m_messagesBeingDispatched may not be empty so the assertion is wrong. Looking at the code, I think dropping the assertion is the
right thing to do as the implementation seems to be doing something sane upon re-entering. It will just append new messages to
m_messagesBeingDispatched and then try and dispatch them. Based on how it is implemented, message ordering would be preserved.

No new tests, unskipped existing test.

  • Platform/IPC/Connection.cpp:

(IPC::Connection::SyncMessageState::dispatchMessagesAndResetDidScheduleDispatchMessagesForConnection):

LayoutTests:

Unskip test that should no longer be crashing.

  • platform/ios-wk2/TestExpectations:
12:40 PM Changeset in webkit [286608] by Cameron McCormack
  • 2 edits in trunk/Websites/webkit.org

Tweak puzzle to use feature detection
https://bugs.webkit.org/show_bug.cgi?id=233946

Unreviewed.

  • blog-files/wide-gamut-canvas/puzzle.html:
12:33 PM Changeset in webkit [286607] by Russell Epstein
  • 9 edits in trunk/Source

Versioning.

WebKit-7613.1.12

12:29 PM Changeset in webkit [286606] by Russell Epstein
  • 6 edits
    2 copies in branches/safari-613.1.11-branch/Source/WebKit

Cherry-pick r286564. rdar://problem/86052131

Put webpushd code in WebKit.framework.
https://bugs.webkit.org/show_bug.cgi?id=233886

Reviewed by Alex Christensen.

This fixes some build/mastering/linking issues.

  • Configurations/webpushd.xcconfig:
  • Shared/API/Cocoa/WKMain.h:
  • Shared/API/Cocoa/WKMain.mm: (WKWebPushDaemonMain):
  • WebKit.xcodeproj/project.pbxproj:
  • webpushd/WebPushDaemonMain.h: Copied from Source/WebKit/Shared/API/Cocoa/WKMain.mm.
  • webpushd/WebPushDaemonMain.mm: (WebKit::WebPushDaemonMain): (main): Deleted.
  • webpushd/webpushd.cpp: Copied from Source/WebKit/Shared/API/Cocoa/WKMain.mm. (main):

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

12:16 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
12:11 PM Changeset in webkit [286605] by Lauro Moura
  • 3 edits in trunk/Tools

[reporelaypy] Autoinstall missing lupa fakeredis dependency
https://bugs.webkit.org/show_bug.cgi?id=233934

Reviewed by Jonathan Bedard.

Using the same version as resultsdbpy. Avoids ImportErrors running the
webkitpy suite when they're not installed.

  • Scripts/libraries/reporelaypy/reporelaypy/init.py: Add lupa and

bump version.

  • Scripts/libraries/reporelaypy/setup.py: Bump version.
12:11 PM Changeset in webkit [286604] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Make WebLockRegistryProxy::processDidExit() return early if process never registered any locks
https://bugs.webkit.org/show_bug.cgi?id=233832

Reviewed by Darin Adler.

Make WebLockRegistryProxy::processDidExit() return early if process never registered any locks.
This avoids calling LocalWebLockRegistry::clientsAreGoingAway() (which can be expensive) in the
case we know for sure no locks were registered by this process.

  • UIProcess/WebLockRegistryProxy.cpp:

(WebKit::WebLockRegistryProxy::requestLock):
(WebKit::WebLockRegistryProxy::processDidExit):

  • UIProcess/WebLockRegistryProxy.h:
11:51 AM Changeset in webkit [286603] by dino@apple.com
  • 1370 edits
    615 adds
    262 deletes in trunk

Roll ANGLE to include upstreamed Metal backend
https://bugs.webkit.org/show_bug.cgi?id=220896
<rdar://problem/73539682>

Patch by Kyle Piddington <Kyle Piddington> on 2021-12-07
Reviewed by Ken Russell and Dean Jackson.

Source/ThirdParty/ANGLE:

Update ANGLE to ce854632690e505551414f80d01d864df6118882

The changelog has been intentionally deleted to preserve
readability

The following additional changes were made in the mergeup.

Update ShaderMtl get debug info to return translated source.

Fix crashes in webgl/2.0.y/conformance/extensions/webgl-compressed-texture-s3tc-srgb.html
Fix angle-instanced-arrays-out-of-bounds.html
Skip additional validation when primitive count in drawArraysInstanced is zero

Fix Clear-Invalidate-Render bug for multisample attachments.
Clearing a multisample texture, and then invalidating the render pass would lead
to the next pass not loading the cleared texture.

Fix exports and includes for egl_autogen.h files.

Fix webgl/2.0.0/deqp/functional/gles3/fboinvalidate/default.html
Add synchronization when reading pixels back from shared framebuffers

Source/WebCore:

Update ANGLE to ce854632690e505551414f80d01d864df6118882

Update OpenGL callsites to use the new
method names. Ideally, we should replace this with
a more robust function loader. For now, we call directly
into ANGLE's methods.

Fix exports and includes for egl_autogen.h files.

  • platform/graphics/angle/ANGLEHeaders.h:
  • platform/graphics/angle/ANGLEUtilities.h:

(WebCore::ScopedRestoreTextureBinding::ScopedRestoreTextureBinding):
(WebCore::ScopedRestoreTextureBinding::~ScopedRestoreTextureBinding):
(WebCore::ScopedBufferBinding::ScopedBufferBinding):
(WebCore::ScopedBufferBinding::~ScopedBufferBinding):
(WebCore::ScopedRestoreReadFramebufferBinding::bindFramebuffer):
(WebCore::ScopedRestoreReadFramebufferBinding::~ScopedRestoreReadFramebufferBinding):
(WebCore::ScopedPixelStorageMode::ScopedPixelStorageMode):
(WebCore::ScopedPixelStorageMode::~ScopedPixelStorageMode):
(WebCore::ScopedPixelStorageMode::pixelStore):
(WebCore::ScopedTexture::ScopedTexture):
(WebCore::ScopedTexture::~ScopedTexture):
(WebCore::ScopedFramebuffer::ScopedFramebuffer):
(WebCore::ScopedFramebuffer::~ScopedFramebuffer):
(WebCore::ScopedGLFence::reset):
(WebCore::ScopedGLFence::fenceSync):

  • platform/graphics/angle/ExtensionsGLANGLE.cpp:

(WebCore::ExtensionsGLANGLE::ensureEnabled):
(WebCore::ExtensionsGLANGLE::getTranslatedShaderSourceANGLE):
(WebCore::ExtensionsGLANGLE::initializeAvailableExtensions):
(WebCore::ExtensionsGLANGLE::drawBuffersEXT):
(WebCore::ExtensionsGLANGLE::getExtensions):

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::releaseThreadResources):
(WebCore::GraphicsContextGLANGLE::readPixelsForPaintResults):
(WebCore::GraphicsContextGLANGLE::reshapeFBOs):
(WebCore::GraphicsContextGLANGLE::attachDepthAndStencilBufferIfNeeded):
(WebCore::GraphicsContextGLANGLE::resolveMultisamplingIfNecessary):
(WebCore::GraphicsContextGLANGLE::renderbufferStorage):
(WebCore::GraphicsContextGLANGLE::getIntegerv):
(WebCore::GraphicsContextGLANGLE::getShaderPrecisionFormat):
(WebCore::GraphicsContextGLANGLE::texImage2D):
(WebCore::GraphicsContextGLANGLE::texSubImage2D):
(WebCore::GraphicsContextGLANGLE::compressedTexImage2D):
(WebCore::GraphicsContextGLANGLE::compressedTexSubImage2D):
(WebCore::GraphicsContextGLANGLE::depthRange):
(WebCore::GraphicsContextGLANGLE::clearDepth):
(WebCore::GraphicsContextGLANGLE::readnPixelsImpl):
(WebCore::GraphicsContextGLANGLE::prepareTextureImpl):
(WebCore::GraphicsContextGLANGLE::reshape):
(WebCore::GraphicsContextGLANGLE::activeTexture):
(WebCore::GraphicsContextGLANGLE::attachShader):
(WebCore::GraphicsContextGLANGLE::bindAttribLocation):
(WebCore::GraphicsContextGLANGLE::bindBuffer):
(WebCore::GraphicsContextGLANGLE::bindFramebuffer):
(WebCore::GraphicsContextGLANGLE::bindRenderbuffer):
(WebCore::GraphicsContextGLANGLE::bindTexture):
(WebCore::GraphicsContextGLANGLE::blendColor):
(WebCore::GraphicsContextGLANGLE::blendEquation):
(WebCore::GraphicsContextGLANGLE::blendEquationSeparate):
(WebCore::GraphicsContextGLANGLE::blendFunc):
(WebCore::GraphicsContextGLANGLE::blendFuncSeparate):
(WebCore::GraphicsContextGLANGLE::bufferData):
(WebCore::GraphicsContextGLANGLE::bufferSubData):
(WebCore::GraphicsContextGLANGLE::getBufferSubData):
(WebCore::GraphicsContextGLANGLE::copyBufferSubData):
(WebCore::GraphicsContextGLANGLE::getInternalformativ):
(WebCore::GraphicsContextGLANGLE::renderbufferStorageMultisample):
(WebCore::GraphicsContextGLANGLE::texStorage2D):
(WebCore::GraphicsContextGLANGLE::texStorage3D):
(WebCore::GraphicsContextGLANGLE::texImage3D):
(WebCore::GraphicsContextGLANGLE::texSubImage3D):
(WebCore::GraphicsContextGLANGLE::compressedTexImage3D):
(WebCore::GraphicsContextGLANGLE::compressedTexSubImage3D):
(WebCore::GraphicsContextGLANGLE::getActiveUniforms):
(WebCore::GraphicsContextGLANGLE::checkFramebufferStatus):
(WebCore::GraphicsContextGLANGLE::clearColor):
(WebCore::GraphicsContextGLANGLE::clear):
(WebCore::GraphicsContextGLANGLE::clearStencil):
(WebCore::GraphicsContextGLANGLE::colorMask):
(WebCore::GraphicsContextGLANGLE::compileShader):
(WebCore::GraphicsContextGLANGLE::compileShaderDirect):
(WebCore::GraphicsContextGLANGLE::texImage2DDirect):
(WebCore::GraphicsContextGLANGLE::copyTexImage2D):
(WebCore::GraphicsContextGLANGLE::copyTexSubImage2D):
(WebCore::GraphicsContextGLANGLE::cullFace):
(WebCore::GraphicsContextGLANGLE::depthFunc):
(WebCore::GraphicsContextGLANGLE::depthMask):
(WebCore::GraphicsContextGLANGLE::detachShader):
(WebCore::GraphicsContextGLANGLE::disable):
(WebCore::GraphicsContextGLANGLE::disableVertexAttribArray):
(WebCore::GraphicsContextGLANGLE::drawArrays):
(WebCore::GraphicsContextGLANGLE::drawElements):
(WebCore::GraphicsContextGLANGLE::enable):
(WebCore::GraphicsContextGLANGLE::enableVertexAttribArray):
(WebCore::GraphicsContextGLANGLE::finish):
(WebCore::GraphicsContextGLANGLE::flush):
(WebCore::GraphicsContextGLANGLE::framebufferRenderbuffer):
(WebCore::GraphicsContextGLANGLE::framebufferTexture2D):
(WebCore::GraphicsContextGLANGLE::frontFace):
(WebCore::GraphicsContextGLANGLE::generateMipmap):
(WebCore::GraphicsContextGLANGLE::getActiveAttribImpl):
(WebCore::GraphicsContextGLANGLE::getActiveUniformImpl):
(WebCore::GraphicsContextGLANGLE::getAttachedShaders):
(WebCore::GraphicsContextGLANGLE::getAttribLocation):
(WebCore::GraphicsContextGLANGLE::moveErrorsToSyntheticErrorList):
(WebCore::GraphicsContextGLANGLE::getError):
(WebCore::GraphicsContextGLANGLE::getString):
(WebCore::GraphicsContextGLANGLE::hint):
(WebCore::GraphicsContextGLANGLE::isBuffer):
(WebCore::GraphicsContextGLANGLE::isEnabled):
(WebCore::GraphicsContextGLANGLE::isFramebuffer):
(WebCore::GraphicsContextGLANGLE::isProgram):
(WebCore::GraphicsContextGLANGLE::isRenderbuffer):
(WebCore::GraphicsContextGLANGLE::isShader):
(WebCore::GraphicsContextGLANGLE::isTexture):
(WebCore::GraphicsContextGLANGLE::lineWidth):
(WebCore::GraphicsContextGLANGLE::linkProgram):
(WebCore::GraphicsContextGLANGLE::pixelStorei):
(WebCore::GraphicsContextGLANGLE::polygonOffset):
(WebCore::GraphicsContextGLANGLE::sampleCoverage):
(WebCore::GraphicsContextGLANGLE::scissor):
(WebCore::GraphicsContextGLANGLE::shaderSource):
(WebCore::GraphicsContextGLANGLE::stencilFunc):
(WebCore::GraphicsContextGLANGLE::stencilFuncSeparate):
(WebCore::GraphicsContextGLANGLE::stencilMask):
(WebCore::GraphicsContextGLANGLE::stencilMaskSeparate):
(WebCore::GraphicsContextGLANGLE::stencilOp):
(WebCore::GraphicsContextGLANGLE::stencilOpSeparate):
(WebCore::GraphicsContextGLANGLE::texParameterf):
(WebCore::GraphicsContextGLANGLE::texParameteri):
(WebCore::GraphicsContextGLANGLE::uniform1f):
(WebCore::GraphicsContextGLANGLE::uniform1fv):
(WebCore::GraphicsContextGLANGLE::uniform2f):
(WebCore::GraphicsContextGLANGLE::uniform2fv):
(WebCore::GraphicsContextGLANGLE::uniform3f):
(WebCore::GraphicsContextGLANGLE::uniform3fv):
(WebCore::GraphicsContextGLANGLE::uniform4f):
(WebCore::GraphicsContextGLANGLE::uniform4fv):
(WebCore::GraphicsContextGLANGLE::uniform1i):
(WebCore::GraphicsContextGLANGLE::uniform1iv):
(WebCore::GraphicsContextGLANGLE::uniform2i):
(WebCore::GraphicsContextGLANGLE::uniform2iv):
(WebCore::GraphicsContextGLANGLE::uniform3i):
(WebCore::GraphicsContextGLANGLE::uniform3iv):
(WebCore::GraphicsContextGLANGLE::uniform4i):
(WebCore::GraphicsContextGLANGLE::uniform4iv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix2fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix3fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix4fv):
(WebCore::GraphicsContextGLANGLE::useProgram):
(WebCore::GraphicsContextGLANGLE::validateProgram):
(WebCore::GraphicsContextGLANGLE::vertexAttrib1f):
(WebCore::GraphicsContextGLANGLE::vertexAttrib1fv):
(WebCore::GraphicsContextGLANGLE::vertexAttrib2f):
(WebCore::GraphicsContextGLANGLE::vertexAttrib2fv):
(WebCore::GraphicsContextGLANGLE::vertexAttrib3f):
(WebCore::GraphicsContextGLANGLE::vertexAttrib3fv):
(WebCore::GraphicsContextGLANGLE::vertexAttrib4f):
(WebCore::GraphicsContextGLANGLE::vertexAttrib4fv):
(WebCore::GraphicsContextGLANGLE::vertexAttribPointer):
(WebCore::GraphicsContextGLANGLE::vertexAttribIPointer):
(WebCore::GraphicsContextGLANGLE::viewport):
(WebCore::GraphicsContextGLANGLE::createVertexArray):
(WebCore::GraphicsContextGLANGLE::deleteVertexArray):
(WebCore::GraphicsContextGLANGLE::isVertexArray):
(WebCore::GraphicsContextGLANGLE::bindVertexArray):
(WebCore::GraphicsContextGLANGLE::getBooleanv):
(WebCore::GraphicsContextGLANGLE::getBufferParameteri):
(WebCore::GraphicsContextGLANGLE::getFloatv):
(WebCore::GraphicsContextGLANGLE::getInteger64):
(WebCore::GraphicsContextGLANGLE::getInteger64i):
(WebCore::GraphicsContextGLANGLE::getFramebufferAttachmentParameteri):
(WebCore::GraphicsContextGLANGLE::getProgrami):
(WebCore::GraphicsContextGLANGLE::getProgramInfoLog):
(WebCore::GraphicsContextGLANGLE::getRenderbufferParameteri):
(WebCore::GraphicsContextGLANGLE::getShaderi):
(WebCore::GraphicsContextGLANGLE::getShaderInfoLog):
(WebCore::GraphicsContextGLANGLE::getTexParameterf):
(WebCore::GraphicsContextGLANGLE::getTexParameteri):
(WebCore::GraphicsContextGLANGLE::getUniformfv):
(WebCore::GraphicsContextGLANGLE::getUniformiv):
(WebCore::GraphicsContextGLANGLE::getUniformuiv):
(WebCore::GraphicsContextGLANGLE::getUniformLocation):
(WebCore::GraphicsContextGLANGLE::getVertexAttribOffset):
(WebCore::GraphicsContextGLANGLE::createBuffer):
(WebCore::GraphicsContextGLANGLE::createFramebuffer):
(WebCore::GraphicsContextGLANGLE::createProgram):
(WebCore::GraphicsContextGLANGLE::createRenderbuffer):
(WebCore::GraphicsContextGLANGLE::createShader):
(WebCore::GraphicsContextGLANGLE::createTexture):
(WebCore::GraphicsContextGLANGLE::deleteBuffer):
(WebCore::GraphicsContextGLANGLE::deleteFramebuffer):
(WebCore::GraphicsContextGLANGLE::deleteProgram):
(WebCore::GraphicsContextGLANGLE::deleteRenderbuffer):
(WebCore::GraphicsContextGLANGLE::deleteShader):
(WebCore::GraphicsContextGLANGLE::deleteTexture):
(WebCore::GraphicsContextGLANGLE::synthesizeGLError):
(WebCore::GraphicsContextGLANGLE::drawArraysInstanced):
(WebCore::GraphicsContextGLANGLE::drawElementsInstanced):
(WebCore::GraphicsContextGLANGLE::vertexAttribDivisor):
(WebCore::GraphicsContextGLANGLE::getUniformBlockIndex):
(WebCore::GraphicsContextGLANGLE::getActiveUniformBlockName):
(WebCore::GraphicsContextGLANGLE::uniformBlockBinding):
(WebCore::GraphicsContextGLANGLE::createQuery):
(WebCore::GraphicsContextGLANGLE::beginQuery):
(WebCore::GraphicsContextGLANGLE::endQuery):
(WebCore::GraphicsContextGLANGLE::getQueryObjectui):
(WebCore::GraphicsContextGLANGLE::createTransformFeedback):
(WebCore::GraphicsContextGLANGLE::deleteTransformFeedback):
(WebCore::GraphicsContextGLANGLE::isTransformFeedback):
(WebCore::GraphicsContextGLANGLE::bindTransformFeedback):
(WebCore::GraphicsContextGLANGLE::beginTransformFeedback):
(WebCore::GraphicsContextGLANGLE::endTransformFeedback):
(WebCore::GraphicsContextGLANGLE::transformFeedbackVaryings):
(WebCore::GraphicsContextGLANGLE::getTransformFeedbackVarying):
(WebCore::GraphicsContextGLANGLE::bindBufferBase):
(WebCore::GraphicsContextGLANGLE::blitFramebuffer):
(WebCore::GraphicsContextGLANGLE::framebufferTextureLayer):
(WebCore::GraphicsContextGLANGLE::invalidateFramebuffer):
(WebCore::GraphicsContextGLANGLE::invalidateSubFramebuffer):
(WebCore::GraphicsContextGLANGLE::readBuffer):
(WebCore::GraphicsContextGLANGLE::copyTexSubImage3D):
(WebCore::GraphicsContextGLANGLE::getFragDataLocation):
(WebCore::GraphicsContextGLANGLE::uniform1ui):
(WebCore::GraphicsContextGLANGLE::uniform2ui):
(WebCore::GraphicsContextGLANGLE::uniform3ui):
(WebCore::GraphicsContextGLANGLE::uniform4ui):
(WebCore::GraphicsContextGLANGLE::uniform1uiv):
(WebCore::GraphicsContextGLANGLE::uniform2uiv):
(WebCore::GraphicsContextGLANGLE::uniform3uiv):
(WebCore::GraphicsContextGLANGLE::uniform4uiv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix2x3fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix3x2fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix2x4fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix4x2fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix3x4fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix4x3fv):
(WebCore::GraphicsContextGLANGLE::vertexAttribI4i):
(WebCore::GraphicsContextGLANGLE::vertexAttribI4iv):
(WebCore::GraphicsContextGLANGLE::vertexAttribI4ui):
(WebCore::GraphicsContextGLANGLE::vertexAttribI4uiv):
(WebCore::GraphicsContextGLANGLE::drawRangeElements):
(WebCore::GraphicsContextGLANGLE::drawBuffers):
(WebCore::GraphicsContextGLANGLE::clearBufferiv):
(WebCore::GraphicsContextGLANGLE::clearBufferuiv):
(WebCore::GraphicsContextGLANGLE::clearBufferfv):
(WebCore::GraphicsContextGLANGLE::clearBufferfi):
(WebCore::GraphicsContextGLANGLE::deleteQuery):
(WebCore::GraphicsContextGLANGLE::isQuery):
(WebCore::GraphicsContextGLANGLE::getQuery):
(WebCore::GraphicsContextGLANGLE::createSampler):
(WebCore::GraphicsContextGLANGLE::deleteSampler):
(WebCore::GraphicsContextGLANGLE::isSampler):
(WebCore::GraphicsContextGLANGLE::bindSampler):
(WebCore::GraphicsContextGLANGLE::samplerParameteri):
(WebCore::GraphicsContextGLANGLE::samplerParameterf):
(WebCore::GraphicsContextGLANGLE::getSamplerParameterf):
(WebCore::GraphicsContextGLANGLE::getSamplerParameteri):
(WebCore::GraphicsContextGLANGLE::fenceSync):
(WebCore::GraphicsContextGLANGLE::isSync):
(WebCore::GraphicsContextGLANGLE::deleteSync):
(WebCore::GraphicsContextGLANGLE::clientWaitSync):
(WebCore::GraphicsContextGLANGLE::waitSync):
(WebCore::GraphicsContextGLANGLE::getSynci):
(WebCore::GraphicsContextGLANGLE::pauseTransformFeedback):
(WebCore::GraphicsContextGLANGLE::resumeTransformFeedback):
(WebCore::GraphicsContextGLANGLE::bindBufferRange):
(WebCore::GraphicsContextGLANGLE::getUniformIndices):
(WebCore::GraphicsContextGLANGLE::getActiveUniformBlockiv):
(WebCore::GraphicsContextGLANGLE::multiDrawArraysANGLE):
(WebCore::GraphicsContextGLANGLE::multiDrawArraysInstancedANGLE):
(WebCore::GraphicsContextGLANGLE::multiDrawElementsANGLE):
(WebCore::GraphicsContextGLANGLE::multiDrawElementsInstancedANGLE):
(WebCore::GraphicsContextGLANGLE::waitAndUpdateOldestFrame):

  • platform/graphics/angle/TemporaryANGLESetting.cpp:

(WebCore::TemporaryANGLESetting::TemporaryANGLESetting):
(WebCore::TemporaryANGLESetting::~TemporaryANGLESetting):

  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm:

(WebCore::GraphicsContextGLANGLE::GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLANGLE::~GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLANGLE::bindDisplayBufferBacking):
(WebCore::GraphicsContextGLCocoa::attachIOSurfaceToSharedTexture):
(WebCore::GraphicsContextGLANGLE::prepareForDisplay):
(WebCore::GraphicsContextGLANGLE::readCompositedResults):

  • platform/graphics/cv/GraphicsContextGLCVCocoa.cpp:

(WebCore::GraphicsContextGLCVCocoa::~GraphicsContextGLCVCocoa):
(WebCore::GraphicsContextGLCVCocoa::GraphicsContextGLCVCocoa):
(WebCore::GraphicsContextGLCVCocoa::copyPixelBufferToTexture):

Tools:

Update script to take sources from main, instead of master.

  • Scripts/update-angle:

LayoutTests:

Update ANGLE to ce854632690e505551414f80d01d864df6118882

Update s3tc tests to adapt to new ANGLE validation
Update shaders-with-name-conflicts to pass, as it tests a valid
program.

  • webgl/1.0.3/resources/webgl_test_files/conformance/extensions/webgl-compressed-texture-s3tc.html:
  • webgl/1.0.3/resources/webgl_test_files/conformance/glsl/misc/shaders-with-name-conflicts.html:
  • webgl/2.0.0/resources/webgl_test_files/conformance/extensions/webgl-compressed-texture-s3tc-srgb.html:
  • webgl/2.0.0/resources/webgl_test_files/conformance/extensions/webgl-compressed-texture-s3tc.html:
  • webgl/2.0.0/resources/webgl_test_files/conformance/glsl/misc/shaders-with-name-conflicts.html:
  • webgl/pending/resources/webgl_test_files/conformance/context/context-attributes-alpha-depth-stencil-antialias.html:
  • webgl/resources/webgl_test_files/conformance/extensions/s3tc-and-rgtc.html:
  • webgl/resources/webgl_test_files/conformance/extensions/webgl-compressed-texture-s3tc-srgb.html:
11:35 AM Changeset in webkit [286602] by Chris Dumez
  • 8 edits in trunk/Source/WebKit

Reload web views when toggling the captive portal mode at system level
https://bugs.webkit.org/show_bug.cgi?id=233900

Reviewed by Brent Fulgham.

Reload web views when toggling the captive portal mode at system level, so that the views end up
being backed by WebProcesses with the proper captive portal mode.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::cachedCaptivePortalModeEnabledGlobally):
(WebKit::WebProcessPool::captivePortalModeStateChanged):
(WebKit::captivePortalModeEnabledBySystem):
(WebKit::WebProcessPool::notifyPreferencesChanged):

  • UIProcess/WebProcessPool.h:
11:33 AM Changeset in webkit [286601] by sihui_liu@apple.com
  • 29 edits
    1 add in trunk

Fetch and remove file system data via WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=233567
<rdar://problem/86029185>

Reviewed by Youenn Fablet.

Source/WebCore:

  • Modules/filesystemaccess/FileSystemStorageConnection.h:

Source/WebKit:

Introduce a new WebsiteDataType value FileSystem for FileSystemAccess data. Network process now can fetch and
delete this type of data when fetching and deleteing website data (if FileSystem type is included in target
types).

To track origins that have FileSystem data, this patch introduces a new file named origin in the origin's
directory. This file will be created when OriginStorageManager is created.

To delete existing FileSystem data, network process finds origins that are requested to be deleted and have data
on disk, closes active access handles, and deletes the files. The origin file mentioned above will be deleted if
there is no other file left in the same directory, and empty directories will be deleted.

New API tests: FileSystemAccess.FetchAndRemoveData

FileSystemAccess.RemoveDataByModificationTime
FileSystemAccess.FetchDataForThirdParty

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::monitoredDataTypes):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::registrableDomainsWithWebsiteData):

  • NetworkProcess/storage/FileSystemStorageHandle.h:

(WebKit::FileSystemStorageHandle::activeSyncAccessHandle const):

  • NetworkProcess/storage/FileSystemStorageManager.cpp:

(WebKit::FileSystemStorageManager::~FileSystemStorageManager):
(WebKit::FileSystemStorageManager::close):

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

(WebKit::readOriginFromFile):
(WebKit::writeOriginToFileIfNecessary):
(WebKit::deleteOriginFileIfNecessary):
(WebKit::originDirectoryPath):
(WebKit::originFilePath):
(WebKit::NetworkStorageManager::localOriginStorageManager):
(WebKit::NetworkStorageManager::removeOriginStorageManagerIfPossible):
(WebKit::NetworkStorageManager::persist):
(WebKit::NetworkStorageManager::clearStorageForTesting): Only reset persisted state here as our test bot can run
tests in parallel. If one worker finishes a test and asks to clear storage, while another worker is running a
filesystem test; the test may fail as data is gone. (The workers are using the same network process.)
(WebKit::toWebsiteDataType):
(WebKit::NetworkStorageManager::forEachOriginDirectory):
(WebKit::NetworkStorageManager::fetchDataFromDisk):
(WebKit::NetworkStorageManager::fetchData):
(WebKit::NetworkStorageManager::deleteDataOnDisk):
(WebKit::NetworkStorageManager::deleteData):
(WebKit::NetworkStorageManager::deleteDataModifiedSince):
(WebKit::NetworkStorageManager::deleteDataForRegistrableDomains):
(WebKit::originPath): Deleted.

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

(WebKit::OriginStorageManager::StorageBucket::toStorageIdentifier):
(WebKit::OriginStorageManager::StorageBucket::typeStoragePath const):
(WebKit::OriginStorageManager::StorageBucket::fileSystemStorageManager):
(WebKit::OriginStorageManager::StorageBucket::isActive):
(WebKit::OriginStorageManager::StorageBucket::deleteData):
(WebKit::OriginStorageManager::StorageBucket::deleteFileSystemStorageData):
(WebKit::OriginStorageManager::OriginStorageManager):
(WebKit::OriginStorageManager::fileSystemStorageManager):
(WebKit::OriginStorageManager::isActive):
(WebKit::OriginStorageManager::deleteData):
(WebKit::OriginStorageManager::setPersisted):
(WebKit::OriginStorageManager::persist): Deleted.

  • NetworkProcess/storage/OriginStorageManager.h:
  • Shared/WebsiteData/WebsiteData.cpp:

(WebKit::WebsiteData::ownerProcess):

  • Shared/WebsiteData/WebsiteDataType.h:
  • UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:

(dataTypesToString):

  • UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:

(WebKit::toWebsiteDataType):
(WebKit::toWKWebsiteDataTypes):

  • UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(+[WKWebsiteDataStore _allWebsiteDataTypesIncludingPrivate]):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::didReceiveMessage):

  • WebProcess/WebCoreSupport/WebFileSystemStorageConnection.messages.in: Added.

Source/WTF:

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::readEntireFile): Read whole file content into a Vector.
(WTF::FileSystemImpl::deleteAllFilesModifiedSince): Recursively delete files and folders modified after
specified time in a directory.

  • wtf/FileSystem.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm:
10:25 AM Changeset in webkit [286600] by Jonathan Bedard
  • 3 edits in trunk/Tools

[reporelaypy] Add implementation of commits.webkit.org (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=233734
<rdar://problem/85945101>

Unreviewed follow-up fix.

  • Scripts/libraries/reporelaypy/reporelaypy/init.py: Bump version, add sortedcontainers dependency.
  • Scripts/libraries/reporelaypy/setup.py: Bump version.
10:20 AM Changeset in webkit [286599] by Antti Koivisto
  • 3 edits
    2 adds in trunk

Assertion after removing stylesheet with loading @import rule
https://bugs.webkit.org/show_bug.cgi?id=233928

Reviewed by Alan Bujtas.

Source/WebCore:

Tests: fast/css/import-and-remove-assert.html

  • dom/InlineStyleSheetOwner.cpp:

(WebCore::InlineStyleSheetOwner::removedFromDocument):

Ensure we notify Style::Scope

LayoutTests:

  • fast/css/import-and-remove-assert-expected.txt: Added.
  • fast/css/import-and-remove-assert.html: Added.
9:49 AM Changeset in webkit [286598] by Antti Koivisto
  • 11 edits in trunk/Source/WebCore

Use more specific keys for pseudo-class invalidation
https://bugs.webkit.org/show_bug.cgi?id=233883

Reviewed by Simon Fraser.

Currently pseudo-class invalidation is keyed with pseudo-class type only. If we have rule like

.foo:hover { ... }

we end up considering this rule for every element whenever :hover state changes, whether the element has class 'foo' or not.

We can improve this by keying pseudo-class invalidation more narrowly with type/class, type/id or type/tag pairs.

  • css/CSSSelector.cpp:

(WebCore::CSSSelector::CSSSelector):
(WebCore::CSSSelector::firstInCompound const):

Add a function to find the start of a compound selector.

  • css/CSSSelector.h:

(WebCore::CSSSelector::tagHistory const):
(WebCore::CSSSelector::isFirstInTagHistory const):
(WebCore::CSSSelector::setNotFirstInTagHistory):

Add isFirstInTagHistory bit, similar to the isLastInTagHistory bit, to enable firstInCompound.

(WebCore::CSSSelector::CSSSelector):

  • css/CSSSelectorList.cpp:

(WebCore::CSSSelectorList::CSSSelectorList):

Set the bit.

  • style/PseudoClassChangeInvalidation.cpp:

(WebCore::Style::makePseudoClassInvalidationKeys):

Collect the id, tag and classes from the element and make keys out of them.

(WebCore::Style::PseudoClassChangeInvalidation::computeInvalidation):
(WebCore::Style::PseudoClassChangeInvalidation::collectRuleSets):

Use the keys to look up for matching invalidation rulesets.

  • style/PseudoClassChangeInvalidation.h:
  • style/RuleFeature.cpp:

(WebCore::Style::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):
(WebCore::Style::makePseudoClassInvalidationKey):

Make a key out of a selector.
Search the compound for id, classes or tag.

(WebCore::Style::RuleFeatureSet::collectFeatures):
(WebCore::Style::RuleFeatureSet::add):
(WebCore::Style::RuleFeatureSet::clear):

  • style/RuleFeature.h:
  • style/StyleScopeRuleSets.cpp:

(WebCore::Style::ScopeRuleSets::pseudoClassInvalidationRuleSets const):

  • style/StyleScopeRuleSets.h:
8:56 AM Changeset in webkit [286597] by commit-queue@webkit.org
  • 15 edits
    1 add in trunk/Source/JavaScriptCore

Unreviewed, reverting r286502 and r286580.
https://bugs.webkit.org/show_bug.cgi?id=233930

Speedometer2 0.7% regression

Reverted changesets:

"Remove StructureIDBlob"
https://bugs.webkit.org/show_bug.cgi?id=233723
https://commits.webkit.org/r286502

"TypeInfo should be materializable from Structures as a single
load."
https://bugs.webkit.org/show_bug.cgi?id=233875
https://commits.webkit.org/r286580

6:38 AM WebKitGTK/GCCRequirement edited by Lauro Moura
Update versions (diff)
4:22 AM Changeset in webkit [286596] by commit-queue@webkit.org
  • 64 edits
    1 copy
    1 move
    1 delete in trunk

Cocoa WebGL should support UI side compositing
https://bugs.webkit.org/show_bug.cgi?id=231009
<rdar://83437059>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-12-07
Reviewed by Simon Fraser.

Source/WebCore:

Implement Cocoa UI-side compositing for WebGL.

Make CanvasRenderingContext draw via GraphicsLayerContentsDisplayDelegate
instead of PlatformLayer. On Cocoa the GraphicsLayer contents can be
three different objects: CGImage, CALayer or content in "backing store"
of the underlying compositor layer.
For UI-side compositing for WebGL, we want it to be the latter.
As such, the object CanvasRenderingContext draws to cannot be a platform
layer (CALayer). So conceptually, WebGL does not draw into a platform
layer, it draws into backing store that can be put to (possibly many)
platform layers.

Add GraphicsLayerContentsDisplayDelegate interface, which can be
used to run client specific code during compositor layer contents update
phase (i.e. layer display phase).

WebGL will use new overloads of PlatformCALayer::setContents to set the
contents during delegated display. The contents is IOSurface for
in-process mode and MachSendRight of IOSurface in GPUP mode.
The IOSurface is set as the contents of the WebSimpleLayer instead
of the running the draw via display().
The MachSendRight is set as the contents of PlatformCALayerRemote
and be serialized to the UI process.

For non-Cocoa ports, add a simple GraphicsLayerContentsDisplayDelegate
that returns the platform layer to the GraphicsLayer inside the compositor.

No new tests, a refactor.

  • Headers.cmake:
  • PlatformMac.cmake:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.order:
  • WebCore.xcodeproj/project.pbxproj:
  • html/canvas/CanvasRenderingContext.cpp:

(WebCore::CanvasRenderingContext::layerContentsDisplayDelegate):

  • html/canvas/CanvasRenderingContext.h:

(WebCore::CanvasRenderingContext::platformLayer const): Deleted.

  • html/canvas/PlaceholderRenderingContext.cpp:

(WebCore::PlaceholderRenderingContext::layerContentsDisplayDelegate):
(WebCore::PlaceholderRenderingContext::platformLayer const): Deleted.

  • html/canvas/PlaceholderRenderingContext.h:
  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::layerContentsDisplayDelegate):
(WebCore::WebGLRenderingContextBase::platformLayer const): Deleted.

  • html/canvas/WebGLRenderingContextBase.h:
  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::setContentsDisplayDelegate):

  • platform/graphics/GraphicsLayer.h:
  • platform/graphics/GraphicsLayerContentsDisplayDelegate.cpp: Added.

(WebCore::GraphicsLayerContentsDisplayDelegate::prepareToDelegateDisplay):
(WebCore::GraphicsLayerContentsDisplayDelegate::orientation const):

  • platform/graphics/GraphicsLayerContentsDisplayDelegate.h: Added.
  • platform/graphics/ImageBufferPipe.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setContentsDisplayDelegate):
(WebCore::GraphicsLayerCA::layerDisplay):
(WebCore::GraphicsLayerCA::updateContentsPlatformLayer):

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/PlatformCALayerClient.h:

(WebCore::PlatformCALayerClient::platformCALayerLayerDisplay):

  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
(WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
(WebCore::PlatformCALayerCocoa::commonInit):
(WebCore::PlatformCALayerCocoa::setContents):

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::displayBuffer):
(WebCore::GraphicsContextGLOpenGL::markDisplayBufferInUse):
(WebCore::GraphicsContextGLOpenGL::platformLayer const): Deleted.

  • platform/graphics/cocoa/WebGLLayer.mm: Removed.

(-[WebGLLayer initWithDevicePixelRatio:contentsOpaque:]): Deleted.
(-[WebGLLayer setTransform:]): Deleted.
(-[WebGLLayer setAnchorPoint:]): Deleted.
(-[WebGLLayer display]): Deleted.

  • platform/graphics/cocoa/WebProcessGraphicsContextGLOpenGLCocoa.mm:
  • platform/graphics/cv/CVUtilities.mm:
  • platform/graphics/mac/WebLayer.mm:

(-[WebSimpleLayer display]):

  • platform/graphics/nicosia/NicosiaImageBufferPipe.cpp:

(Nicosia::WebCore::NicosiaImageBufferPipeSource::layerContentsDisplayDelegate):
(Nicosia::WebCore::NicosiaImageBufferPipe::layerContentsDisplayDelegate):
(Nicosia::NicosiaImageBufferPipeSource::NicosiaImageBufferPipeSource): Deleted.
(Nicosia::NicosiaImageBufferPipeSource::~NicosiaImageBufferPipeSource): Deleted.
(Nicosia::NicosiaImageBufferPipeSource::handle): Deleted.
(Nicosia::NicosiaImageBufferPipeSource::platformLayer const): Deleted.
(Nicosia::NicosiaImageBufferPipeSource::swapBuffersIfNeeded): Deleted.
(Nicosia::NicosiaImageBufferPipe::NicosiaImageBufferPipe): Deleted.
(Nicosia::NicosiaImageBufferPipe::source const): Deleted.
(Nicosia::NicosiaImageBufferPipe::platformLayer const): Deleted.

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:

(WebCore::GraphicsContextGLOpenGL::create):

  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayerTextureMapper::setContentsDisplayDelegate):

  • platform/graphics/texmap/GraphicsLayerTextureMapper.h:
  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::setContentsDisplayDelegate):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateConfiguration):

Source/WebKit:

Implement the capability to assign IOSurfaces
to PlatformCALayerRemote contents.

Make RemoteGraphicsContextGLProxyCocoa use the added
GraphicsLayerContentsDisplayDelegate.

  • GPUProcess/graphics/GPUProcessGraphicsContextGL.h:
  • GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:

(WebKit::RemoteGraphicsContextGLCocoa::prepareForDisplay):

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.h:

(WebKit::RemoteLayerBackingStore::hasFrontBuffer const):

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::clearBackingStore):
(WebKit::RemoteLayerBackingStore::encode const):
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
(WebKit::RemoteLayerBackingStore::setContents):
(WebKit::RemoteLayerBackingStore::display):
Change the contract of what RemoteLayerBackingStore serializes to
the transaction. Before, it serialized the front buffer.
After, it serializes the m_bufferHandle.
The buffer handle is produced by display() phase either by
delegated display setting the contents or drawing to
front buffer and then assigning the front buffer handle.

  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::description const):

  • UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:

(WebKit::RemoteLayerTreeHost::makeNode):

  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:

(WebKit::RemoteLayerTreeHost::makeNode):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/graphics/cocoa/RemoteGraphicsContextGLProxyCocoa.mm:

(WebKit::RemoteGraphicsContextGLProxy::create):

  • WebProcess/GPU/graphics/wc/RemoteGraphicsContextGLProxyWC.cpp:

(WebKit::RemoteGraphicsContextGLProxy::create): Deleted.

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
(WebKit::PlatformCALayerRemote::setContents):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.h:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm:

(WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
(WebKit::PlatformCALayerRemoteCustom::clone const):
(WebKit::PlatformCALayerRemoteCustom::setNeedsDisplayInRect):
(WebKit::PlatformCALayerRemoteCustom::setNeedsDisplay):

  • WebProcess/WebPage/wc/GraphicsLayerWC.cpp:

(WebKit::GraphicsLayerWC::setContentsDisplayDelegate):

Tools:

  • TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLOpenGLCocoa.mm:

Add a dummy override of the new member function layerContentsDisplayDelegate.

3:36 AM Changeset in webkit [286595] by cathiechen
  • 1 edit
    1 add in trunk/PerformanceTests

[Performance test][css-contain] Add test large-grid.html
https://bugs.webkit.org/show_bug.cgi?id=233628

Reviewed by Rob Buis.

This test large-grid.html is imported from Chromium, and we change it a little bit.
This case tests the performance of getting gridContainer.offsetHeight which is the parent of
a large grid with contain: strict. The performance is improved when enable CSS contain,
because offsetHeight returns the value directly if the element doesn't need relayout, see
Document::updateLayoutIfDimensionsOutOfDate. contain: strict sets a relayout boundary to
the large grid, so when its subtree changes, the container of the large grid doesn't need
relayout.

  • Layout/large-grid.html: Added.
2:46 AM Changeset in webkit [286594] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebGPU

[WebGPU] Fix MacCatalyst build
https://bugs.webkit.org/show_bug.cgi?id=233920

Unreviewed.

Taken from JavaScriptCore.xcodeproj.

  • Configurations/WebGPU.xcconfig:
2:20 AM Changeset in webkit [286593] by svillar@igalia.com
  • 6 edits in trunk

[css-flexbox] Account for captions when flexing tables with specified sizes
https://bugs.webkit.org/show_bug.cgi?id=233814

Reviewed by Darin Adler.

Source/WebCore:

Flexing tables is complex because of the specifics of the table layout algorithms. There are
two interrelated issues that were causing some failures in flexbox WPT tests.

The first one is that tables interpret overriding sizes (flexed sizes) as the sizes of rows + captions.
However the specified height of a table only accounts for the heights of the rows, not the captions. That's
why when setting the flexed height of a table we must add up the specified height of the table and the height
of the captions. The table algorithm will properly substract the captions' size in order to compute the
available height for rows.

The second issue is that the table layout algorithm adds the size of the bottom border at the very end
of its execution after performing all the computations and it does it unconditionally. The thing is that
the flexbox code already takes into account the borders and paddings so we basically have to substract that
border when setting the height of the table, because the table layout will add it later.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::computeCaptionsLogicalHeight const): New method refactored from current code.
(WebCore::RenderTable::layout):

  • rendering/RenderTable.h: Expose computeCaptionsLogicalHeight.

LayoutTests:

2:01 AM Changeset in webkit [286592] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

[RISCV64] Add more MacroAssemblerRISCV64 helper infrastructure
https://bugs.webkit.org/show_bug.cgi?id=233805

Patch by Zan Dobersek <zdobersek@igalia.com> on 2021-12-07
Reviewed by Yusuke Suzuki.

Introduce RISCV64Assembler::ImmediateLoader, a helper class that
generates the operations necessary for loading any immediate value into
some register. This can be as simple as using ADDI to load 12-bit values
or a combination of LUI, ADDI and possibly additional combinations of
LSHIFT and ADDI instructions. There's also a placeholder mode which
generates no-ops for unused operation slots, in order to enable
future patching and repatching for other immediate values.

MacroAssemblerRISCV64::Imm is introduced as a private helper struct that
groups together validity and construction operations for the different
immediate types implemented in the RISCV64Instructions namespace.

In MacroAssemblerRISCV64, resolveAddress() overloads are provided to
help generate most optimal address loading sequencing. RISC-V addressing
mode utilizes a base register and a 12-bit signed offset. When needed,
additional computation is done on the address object's parameters and
stored in the destination register through which the load can then be
performed.

Helper TempRegister and LazyTempRegister structs are added to the
MacroAssemblerRISCV64 class, along with the respective temps() and
lazyTemp() methods. temps() returns the TempRegister object, with the
template parameters defining which of the two scratch register types
should be allowed for use through this object. Release-time assert
on the m_allowScratchRegister value is done at the point of calling
temps(). lazyTemp() only handles one scratch register, and the assert
is done only when the register is actually used, and not just reserved
for use. This enables simpler implementations that better handle both
modes of scratch register usage (allowed or disallowed).

To get things rolling, the first set of MacroAssemblerRISCV64 methods
is implemented. Addition, subtraction and multiplication definitions
are provided, with the templated no-op declarations removed.

  • assembler/MacroAssemblerRISCV64.h:

(JSC::MacroAssemblerRISCV64::TempRegister::data):
(JSC::MacroAssemblerRISCV64::TempRegister::memory):
(JSC::MacroAssemblerRISCV64::LazyTempRegister::LazyTempRegister):
(JSC::MacroAssemblerRISCV64::LazyTempRegister::operator RegisterID):
(JSC::MacroAssemblerRISCV64::temps):
(JSC::MacroAssemblerRISCV64::lazyTemp):
(JSC::MacroAssemblerRISCV64::add32):
(JSC::MacroAssemblerRISCV64::add64):
(JSC::MacroAssemblerRISCV64::sub32):
(JSC::MacroAssemblerRISCV64::sub64):
(JSC::MacroAssemblerRISCV64::mul32):
(JSC::MacroAssemblerRISCV64::mul64):
(JSC::MacroAssemblerRISCV64::Imm::isValid):
(JSC::MacroAssemblerRISCV64::Imm::I):
(JSC::MacroAssemblerRISCV64::Imm::S):
(JSC::MacroAssemblerRISCV64::Imm::B):
(JSC::MacroAssemblerRISCV64::Imm::U):
(JSC::MacroAssemblerRISCV64::Imm::J):
(JSC::MacroAssemblerRISCV64::resolveAddress):

  • assembler/RISCV64Assembler.h:

(JSC::RISCV64Assembler::ImmediateLoader::ImmediateLoader):
(JSC::RISCV64Assembler::ImmediateLoader::moveInto):

12:27 AM Changeset in webkit [286591] by Martin Robinson
  • 14 edits in trunk

perspective() <= 1px should be clamped to 1px
https://bugs.webkit.org/show_bug.cgi?id=232619
<rdar://problem/85197362>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-transforms/animation/transform-interpolation-verify-reftests-expected.txt: Update to show newly passing subtests.

Source/WebCore:

No new tests. This is covered by the newly passing WPT tests
in this change.

When the CSS 3D transform interoperability experimental feature is turned on,
round perspectives that are < 1 pixel to 1 pixel. This behavior is described
in the specification, but breaks backward compatibility. The reasoning provided
by the specification is:

As very small <length> values can produce bizarre rendering results and
stress the numerical accuracy of transform calculations, values less than
1px must be treated as 1px for rendering purposes.

  • platform/graphics/transforms/PerspectiveTransformOperation.h: When getting

the floating point perspective value, round to 1px.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::perspectiveTransform const): Use usedPerspective from
RenderSTyle.

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::getTransformFromContainer const): Ditto.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::usedPerspective const): Added this method which rounds
to 1px.

  • rendering/style/RenderStyle.h:

LayoutTests:

  • TestExpectations: Mark tests as passing.
  • transforms/3d/general/3dtransform-values.html:
  • transforms/3d/general/prefixed-3dtransform-values.html:
  • transforms/3d/general/3dtransform-values-expected.txt:
  • transforms/3d/general/prefixed-3dtransform-values-expected.txt:
Note: See TracTimeline for information about the timeline view.