Timeline
Dec 11, 2021:
- 7:04 PM Changeset in webkit [286922] by
-
- 8 edits2 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
-
- 2 edits1 copy1 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
-
- 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
-
- 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
-
- 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
-
- 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
0when 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
0when creating an empty RefPtr.
- WebProcess/win/WebProcessWin.cpp:
(loadResourceIntoBuffer):
Source/WebKitLegacy/win:
Remove uses of
0when 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 so0can'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
-
- 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
-
- 14 edits5 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
-
- 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
-
- 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
-
- 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
-
- 50 edits10 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
-
- 2 edits in trunk
Update my github username.
Unreviewed.
- metadata/contributors.json:
- 5:36 AM Changeset in webkit [286909] by
-
- 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
-
- 56 edits17 copies11 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 1 copy in tags/Safari-613.1.11.3
Tag Safari-613.1.11.3.
- 10:20 PM Changeset in webkit [286902] by
-
- 9 edits in branches/safari-613.1.11-branch/Source
Versioning.
WebKit-7613.1.11.3
- 9:11 PM Changeset in webkit [286901] by
-
- 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
-
- 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
-
- 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
-
- 5 edits3 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
-
- 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
-
- 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
-
- 18 edits14 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
-
- 22 edits3 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 toNSPasteboardNameFonton 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 todocument.execCommand.
Source/WebKit:
- UIProcess/API/mac/WKView.mm:
- UIProcess/API/mac/WKWebViewMac.mm:
Add
-copyFont:and-pasteFont:methods viaWEBCORE_COMMAND.
- UIProcess/WebPageProxy.cpp:
(WebKit::pasteAccessCategoryForCommand):
ThePasteFontcommand should be categorized asDOMPasteAccessCategory::Fonts.
- UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::pasteboardNameForAccessCategory):
(WebKit::pasteboardForAccessCategory):
- UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::willPerformPasteCommand):
CorrelateDOMPasteAccessCategory::FontswithNSPasteboardNameFont.
- UIProcess/ios/WKContentViewInteraction.mm:
(pasteboardNameForAccessCategory):
(pasteboardForAccessCategory):
- UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::willPerformPasteCommand):
CorrelateDOMPasteAccessCategory::FontswithUIPasteboardNameGeneral.
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.
- TestExpectations:
- platform/mac/TestExpectations:
- 5:25 PM Changeset in webkit [286893] by
-
- 50 edits2 copies8 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
-
- 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
-
- 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
-
- 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.CSSPropertyNameCompletionsis 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.CSSPropertyNameCompletionswe 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 aWI.CSSQueryControllerwas 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
-
- 6 edits2 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
-
- 1 copy in tags/Safari-613.1.11.2
Tag Safari-613.1.11.2.
- 4:47 PM Changeset in webkit [286887] by
-
- 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 itasyncto allow usingawait.
(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, passoptions.recomputePositionsto 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
-
- 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
-
- 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-itemsandjustify-self, that shows icons for:
start, center, end, and stretch.
The newly added swatches reuse the existing
align-contentandalign-itemsicons, and
rotate them -90 degrees. Whilealign-*properties define alignment in the block-direction
thejustify-*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
-
- 9 edits in branches/safari-613.1.11-branch/Source
Versioning.
WebKit-7613.1.11.2
- 4:35 PM Changeset in webkit [286883] by
-
- 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
-
- 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
-
- 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
-
- 1 edit7 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
-
- 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
-
- 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
-
- 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
-
- 7 edits2 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 duringinitialLayout()
but handle them duringlayout(). 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 usingWI.ComputedStyleSectioninstead ofWI.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 ofWI.SpreadsheetCSSStyleDeclarationEditorfor rendering CSS variables with
WI.ComputedStyleSectionwhich 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_styleTracesto null instead of an empty array so that
WI.ComputedStyleSection.layout()doesn't attempt to access it like aMap.
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
-
- 5 edits7 moves5 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-itemsandalign-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-contentCSS 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):
Renamevaluetoalignmentto 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
-
- 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
-
- 3 edits6 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
-
- 1 copy in tags/Safari-613.1.11.1
Tag Safari-613.1.11.1.
- 1:24 PM Changeset in webkit [286871] by
-
- 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
-
- 18 edits in trunk/Source
Allow
Pasteboard::readBufferto 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 theindexinto
anstd::optionalso 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
-
- 22 edits2 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:
- if the input uses a space as date / time separator, the sanitized value will use a 'T' instead.
- 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
- 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
-
- 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
-
- 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
-
- 4 edits2 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
-
- 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
-
- 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
-
- 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
-
- 9 edits in branches/safari-613.1.11-branch/Source
Versioning.
WebKit-7613.1.11.1
- 11:02 AM Changeset in webkit [286861] by
-
- 8 edits in trunk/Source/WebCore
Add a way to write a
SharedBufferto 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 aSharedBuffer(with an associated type) to the font pasteboard.
Create a
struct PasteboardBufferto wrap theSharedBufferandString type(and a
String contentOriginon 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
-
- 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:
- 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
-
- 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
-
- 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
-
- 15 edits4 adds3 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 3 edits1 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
-
- 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
-
- 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
-
- 10 edits1 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.CSSPropertyNameCompletionsis 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.CSSCompletionsis 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.Completionsconstructor to expect just an array of strings. - introduces
WI.CSSPropertyNameCompletionsas a sub-class ofWI.CSSCompletionswhere its constructor is specialized to handle the payload received from the backend. - moves the
WI.CSSPropertyNameCompletionsinstance toWI.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
fromWI.CSSCompletionswith 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 toWI.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 inWI.CompletionSuggestionsView.
(WI.CSSCompletions.prototype.isValidPropertyName): Deleted.
Moved toWI.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
-
- 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
-
- 4 edits2 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
-
- 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
-
- 3 edits2 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
-
- 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
-
- 30 edits1 copy1 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
-
- 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
-
- 15 edits3 adds4 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
-
- 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: