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

Timeline



Jun 27, 2021:

10:07 PM Changeset in webkit [279323] by commit-queue@webkit.org
  • 67 edits in trunk/Source

Unreviewed, reverting r279322.
https://bugs.webkit.org/show_bug.cgi?id=227434

Reverted changeset:

"Not all uses of AudioToolbox framework use soft linking"
https://bugs.webkit.org/show_bug.cgi?id=227250
https://commits.webkit.org/r279322

8:30 PM Changeset in webkit [279322] by Jean-Yves Avenard
  • 67 edits in trunk/Source

Not all uses of AudioToolbox framework use soft linking
https://bugs.webkit.org/show_bug.cgi?id=227250
<rdar://problem/79606090>

Reviewed by Eric Carlson.

Source/WebCore:

Unify AudioToolbox, CoreMedia, VideoToolbox and MediaToolbox's method
definitions and their use, ensuring that they are always soft-linked.
Unified builds and the inconsistent use of explicitly using the PAL namespace
caused some calls to be ambiguous leading to compilation errors; some
code would also use the softlinked methods while others called into the frameworks
directly.
To get around those we ensure that any calls to AudioToolbox or CoreMedia is always using
the fully resolved PAL name.
Remove unnecessary using namespace PAL; statements wherever applicable.
No change in observable behavior.

  • Modules/mediastream/PeerConnectionBackend.cpp:
  • Modules/plugins/QuickTimePluginReplacement.mm:
  • Modules/webaudio/MediaStreamAudioSourceCocoa.cpp:

(WebCore::MediaStreamAudioSource::consumeAudio):

  • dom/Document.cpp:
  • html/HTMLCanvasElement.cpp:
  • html/HTMLMediaElement.cpp:
  • platform/audio/AudioFileReader.h:
  • platform/audio/cocoa/AudioFileReaderCocoa.cpp:

(WebCore::AudioFileReader::AudioFileReader):
(WebCore::AudioFileReader::~AudioFileReader):
(WebCore::AudioFileReader::createBus):
(WebCore::createBusFromAudioFile): Deleted.

  • platform/audio/cocoa/AudioFileReaderCocoa.h:
  • platform/audio/cocoa/AudioOutputUnitAdaptor.cpp:

(WebCore::AudioOutputUnitAdaptor::~AudioOutputUnitAdaptor):
(WebCore::AudioOutputUnitAdaptor::start):
(WebCore::AudioOutputUnitAdaptor::stop):

  • platform/audio/cocoa/AudioSampleBufferList.cpp:

(WebCore::AudioSampleBufferList::copyFrom):

  • platform/audio/cocoa/AudioSampleDataSource.mm:
  • platform/audio/cocoa/WebAudioBufferList.cpp:

(WebCore::WebAudioBufferList::WebAudioBufferList):

  • platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:

(WebCore::AudioFileReader::decodeAudioForBusCreation):
(WebCore::createBusFromAudioFile): Deleted.

  • platform/audio/ios/AudioOutputUnitAdaptorIOS.cpp:

(WebCore::AudioOutputUnitAdaptor::configure):

  • platform/audio/mac/AudioOutputUnitAdaptorMac.cpp:

(WebCore::AudioOutputUnitAdaptor::configure):

  • platform/cocoa/MediaUtilities.cpp:

(WebCore::createAudioFormatDescription):
(WebCore::createAudioSampleBuffer):

  • platform/graphics/RemoteVideoSample.cpp:

(WebCore::RemoteVideoSample::create):

  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:

(WebCore::AudioSourceProviderAVFObjC::create):
(WebCore::AudioSourceProviderAVFObjC::provideInput):
(WebCore::AudioSourceProviderAVFObjC::createMixIfNeeded):
(WebCore::AudioSourceProviderAVFObjC::finalizeCallback):
(WebCore::AudioSourceProviderAVFObjC::prepareCallback):
(WebCore::AudioSourceProviderAVFObjC::unprepareCallback):
(WebCore::AudioSourceProviderAVFObjC::processCallback):
(WebCore::AudioSourceProviderAVFObjC::prepare):
(WebCore::AudioSourceProviderAVFObjC::process):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::createImageGenerator):
(WebCore::MediaPlayerPrivateAVFoundationObjC::getStartDate const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::currentMediaTime const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
(WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
(WebCore::MediaPlayerPrivateAVFoundationObjC::metadataGroupDidArrive):
(WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
(WebCore::MediaPlayerPrivateAVFoundationObjC::performTaskAtMediaTime):

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

(WebCore::EffectiveRateChangedListener::stop):
(WebCore::EffectiveRateChangedListener::EffectiveRateChangedListener):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentMediaTime const):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCurrentTimeDidChangeCallback):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateLastPixelBuffer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::destroyLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::performTaskAtMediaTime):

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

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable):
(WebCore::videoTransformationMatrix):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateCurrentFrameImage):

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

(WTF::CFTypeTrait<CMSampleBufferRef>::typeID):
(WebCore::MediaSampleAVFObjC::createImageSample):
(WebCore::MediaSampleAVFObjC::presentationTime const):
(WebCore::MediaSampleAVFObjC::decodeTime const):
(WebCore::MediaSampleAVFObjC::duration const):
(WebCore::MediaSampleAVFObjC::sizeInBytes const):
(WebCore::MediaSampleAVFObjC::videoPixelFormat const):
(WebCore::isCMSampleBufferAttachmentRandomAccess):
(WebCore::doesCMSampleBufferHaveSyncInfo):
(WebCore::isCMSampleBufferRandomAccess):
(WebCore::isCMSampleBufferAttachmentNonDisplaying):
(WebCore::isCMSampleBufferNonDisplaying):
(WebCore::MediaSampleAVFObjC::presentationSize const):
(WebCore::MediaSampleAVFObjC::offsetTimestampsBy):
(WebCore::MediaSampleAVFObjC::setTimestamps):
(WebCore::MediaSampleAVFObjC::isDivisable const):
(WebCore::MediaSampleAVFObjC::divide):
(WebCore::MediaSampleAVFObjC::createNonDisplayingCopy const):
(WebCore::MediaSampleAVFObjC::getRGBAImageData const):
(WebCore::setSampleBufferAsDisplayImmediately):
(WebCore::MediaSampleAVFObjC::isHomogeneous const):
(WebCore::MediaSampleAVFObjC::divideIntoHomogeneousSamples):
(WebCore::MediaSampleAVFObjC::cloneSampleBufferAndSetAsDisplayImmediately):

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

(WebCore::bufferWasConsumedCallback):
(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::rendererWasAutomaticallyFlushed):
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
(WebCore::SourceBufferPrivateAVFObjC::canSetMinimumUpcomingPresentationTime const):
(WebCore::SourceBufferPrivateAVFObjC::setMinimumUpcomingPresentationTime):

  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:

(WebCore::SourceBufferParserWebM::OnFrame):
(WebCore::SourceBufferParserWebM::VideoTrackData::consumeFrameData):
(WebCore::SourceBufferParserWebM::VideoTrackData::createSampleBuffer):
(WebCore::SourceBufferParserWebM::AudioTrackData::consumeFrameData):
(WebCore::SourceBufferParserWebM::AudioTrackData::createSampleBuffer):

  • platform/graphics/cocoa/VP9UtilitiesCocoa.mm:

(WebCore::convertToCMColorPrimaries):
(WebCore::convertToCMTransferFunction):
(WebCore::convertToCMYCbCRMatrix):
(WebCore::createFormatDescriptionFromVPCodecConfigurationRecord):

  • platform/graphics/cocoa/WebCoreDecompressionSession.mm:

(WTF::CFTypeTrait<CMSampleBufferRef>::typeID):
(WebCore::WebCoreDecompressionSession::setTimebase):
(WebCore::WebCoreDecompressionSession::enqueueSample):
(WebCore::WebCoreDecompressionSession::shouldDecodeSample):
(WebCore::WebCoreDecompressionSession::ensureDecompressionSessionForSample):
(WebCore::WebCoreDecompressionSession::decodeSample):
(WebCore::WebCoreDecompressionSession::handleDecompressionOutput):
(WebCore::WebCoreDecompressionSession::getFirstVideoFrame):
(WebCore::WebCoreDecompressionSession::automaticDequeue):
(WebCore::WebCoreDecompressionSession::enqueueDecodedSample):
(WebCore::WebCoreDecompressionSession::isReadyForMoreMediaData const):
(WebCore::WebCoreDecompressionSession::notifyWhenHasAvailableVideoFrame):
(WebCore::WebCoreDecompressionSession::imageForTime):
(WebCore::WebCoreDecompressionSession::flush):
(WebCore::WebCoreDecompressionSession::getDecodeTime):
(WebCore::WebCoreDecompressionSession::getPresentationTime):
(WebCore::WebCoreDecompressionSession::getDuration):
(WebCore::WebCoreDecompressionSession::compareBuffers):
(WebCore::WebCoreDecompressionSession::updateQosWithDecodeTimeStatistics):

  • platform/graphics/cv/ImageTransferSessionVT.mm:

(WebCore::ImageTransferSessionVT::createPixelBuffer):
(WebCore::ImageTransferSessionVT::convertCMSampleBuffer):
(WebCore::ImageTransferSessionVT::createCMSampleBuffer):

  • platform/ios/PlaybackSessionInterfaceAVKit.mm:

(WebCore::PlaybackSessionInterfaceAVKit::seekableRangesChanged):

  • platform/mac/VideoFullscreenInterfaceMac.mm:
  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:

(WebCore::MediaRecorderPrivateAVFImpl::videoSampleAvailable):

  • platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm:

(WebCore::AudioSampleBufferCompressor::~AudioSampleBufferCompressor):
(WebCore::AudioSampleBufferCompressor::initialize):
(WebCore::AudioSampleBufferCompressor::finish):
(WebCore::AudioSampleBufferCompressor::initAudioConverterForSourceFormatDescription):
(WebCore::AudioSampleBufferCompressor::attachPrimingTrimsIfNeeded):
(WebCore::AudioSampleBufferCompressor::gradualDecoderRefreshCount):
(WebCore::AudioSampleBufferCompressor::sampleBufferWithNumPackets):
(WebCore::AudioSampleBufferCompressor::provideSourceDataNumOutputPackets):
(WebCore::AudioSampleBufferCompressor::processSampleBuffersUntilLowWaterTime):
(WebCore::AudioSampleBufferCompressor::processSampleBuffer):
(WebCore::AudioSampleBufferCompressor::getOutputSampleBuffer):
(WebCore::AudioSampleBufferCompressor::takeOutputSampleBuffer):

  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:

(WebCore::MediaRecorderPrivateWriter::MediaRecorderPrivateWriter):
(WebCore::MediaRecorderPrivateWriter::processNewCompressedVideoSampleBuffers):
(WebCore::MediaRecorderPrivateWriter::processNewCompressedAudioSampleBuffers):
(WebCore::MediaRecorderPrivateWriter::startAssetWriter):
(WebCore::MediaRecorderPrivateWriter::appendCompressedVideoSampleBuffer):
(WebCore::appendEndsPreviousSampleDurationMarker):
(WebCore::copySampleBufferWithCurrentTimeStamp):
(WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
(WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
(WebCore::MediaRecorderPrivateWriter::completeFetchData):
(WebCore::MediaRecorderPrivateWriter::pause):
(WebCore::MediaRecorderPrivateWriter::resume):

  • platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm:

(WebCore::VideoSampleBufferCompressor::~VideoSampleBufferCompressor):
(WebCore::VideoSampleBufferCompressor::initialize):
(WebCore::VideoSampleBufferCompressor::finish):
(WebCore::VideoSampleBufferCompressor::videoCompressionCallback):
(WebCore::VideoSampleBufferCompressor::vtProfileLevel const):
(WebCore::VideoSampleBufferCompressor::initCompressionSession):
(WebCore::VideoSampleBufferCompressor::processSampleBuffer):
(WebCore::VideoSampleBufferCompressor::getOutputSampleBuffer):
(WebCore::VideoSampleBufferCompressor::takeOutputSampleBuffer):

  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererInternalUnit.cpp:

(WebCore::LocalAudioMediaStreamTrackRendererInternalUnit::start):
(WebCore::LocalAudioMediaStreamTrackRendererInternalUnit::stop):
(WebCore::LocalAudioMediaStreamTrackRendererInternalUnit::createAudioUnitIfNeeded):

  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::setSessionSizeAndFrameRate):
(WebCore::AVVideoCaptureSource::frameDurationForFrameRate):
(WebCore::AVVideoCaptureSource::generatePresets):

  • platform/mediastream/mac/CoreAudioCaptureDevice.cpp:

(WebCore::CoreAudioCaptureDevice::deviceClock):

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioSharedUnit::setupAudioUnit):
(WebCore::CoreAudioSharedUnit::configureMicrophoneProc):
(WebCore::CoreAudioSharedUnit::configureSpeakerProc):
(WebCore::CoreAudioSharedUnit::cleanupAudioUnit):
(WebCore::CoreAudioSharedUnit::reconfigureAudioUnit):
(WebCore::CoreAudioSharedUnit::startInternal):
(WebCore::CoreAudioSharedUnit::stopInternal):
(WebCore::CoreAudioSharedUnit::defaultInputDevice):

  • platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:
  • platform/mediastream/mac/MockAudioSharedUnit.mm:

(WebCore::MockAudioSharedUnit::reconfigure):
(WebCore::MockAudioSharedUnit::emitSampleBuffers):

  • platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
  • platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:

(WebCore::RealtimeIncomingAudioSourceCocoa::OnData):

  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:

(WebCore::RealtimeIncomingVideoSourceCocoa::OnFrame):

  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:

(WebCore::RealtimeOutgoingVideoSourceCocoa::videoSampleAvailable):

  • platform/mediastream/mac/WindowDisplayCapturerMac.mm:

Source/WebCore/PAL:

  • pal/cf/AudioToolboxSoftLink.cpp:
  • pal/cf/AudioToolboxSoftLink.h: Add methods whose definitions were scattered across

the code.

  • pal/cocoa/MediaToolboxSoftLink.cpp:
  • pal/cocoa/MediaToolboxSoftLink.h: Same as above.
  • pal/cf/AudioToolboxSoftLink.cpp:
  • pal/cf/AudioToolboxSoftLink.h: Add missing methods
  • pal/cf/CoreMediaSoftLink.cpp:
  • pal/cf/CoreMediaSoftLink.h: Add missing methods; Reshuffled definitions as many didn't

exist on Windows, yet could potentially be loaded and error.

  • pal/cf/VideoToolboxSoftLink.cpp:
  • pal/cf/VideoToolboxSoftLink.h: Add missing methods and fix some spelling in define names
  • pal/cocoa/MediaToolboxSoftLink.cpp:
  • pal/cocoa/MediaToolboxSoftLink.h: Add missing methods

Source/WebKit:

  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:

(WebKit::WebProcessProxy::sendAudioComponentRegistrations):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::consumeAudioComponentRegistrations):

  • Shared/mac/MediaFormatReader/CoreMediaWrapped.cpp:

(WebKit::createWrapper):
(WebKit::wrapperStorage):
(WebKit::wrapperVTable):

  • Shared/mac/MediaFormatReader/MediaFormatReader.cpp:

(WebKit::MediaFormatReader::copyProperty):

  • Shared/mac/MediaFormatReader/MediaSampleByteRange.cpp:

(WebKit::MediaSampleByteRange::MediaSampleByteRange):

  • Shared/mac/MediaFormatReader/MediaSampleCursor.cpp:
  • Shared/mac/MediaFormatReader/MediaTrackReader.cpp:
  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:

(WebKit::WebProcessProxy::sendAudioComponentRegistrations):

  • UIProcess/Media/cocoa/MediaUsageManagerCocoa.mm:
  • WebProcess/cocoa/RemoteRealtimeAudioSource.cpp:
  • WebProcess/cocoa/RemoteRealtimeMediaSourceProxy.cpp:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::consumeAudioComponentRegistrations):

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

Treat image data url's as not identical
https://bugs.webkit.org/show_bug.cgi?id=226924

Patch by Rob Buis <rbuis@igalia.com> on 2021-06-27
Reviewed by Said Abou-Hallawa.

Treat image data url's as not identical
in fillImagesAreIdentical.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::updateFillImages):

  • rendering/style/StyleCachedImage.cpp:

(WebCore::StyleCachedImage::usesDataProtocol const):

  • rendering/style/StyleCachedImage.h:
  • rendering/style/StyleCursorImage.cpp:

(WebCore::StyleCursorImage::usesDataProtocol const):

  • rendering/style/StyleCursorImage.h:
  • rendering/style/StyleImage.h:

(WebCore::StyleImage::usesDataProtocol const):

12:49 PM Changeset in webkit [279320] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

[iOS 15] Fix the internal build after rdar://76549109
https://bugs.webkit.org/show_bug.cgi?id=227430
rdar://79832425

Reviewed by Sam Weinig.

Fix the build by replacing the use of the UIFloatIsZero macro with its actual definition. The immediate cause
of this build failure is a UIKit change that changed the definition of UIFloatIsZero, such that we end up
redefining UIFloatIsZero in HTMLConverter.mm. However, since UIFloatIsZero is specific to iOS family and
HTMLConverter is used only in this one place on both macOS and iOS, it makes more sense to simply use the macro
definition itself.

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::computedAttributesForElement):

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

Backgrounding and returning to a FaceTime call in MobileSafari leads to a blank black sreen
https://bugs.webkit.org/show_bug.cgi?id=227406

Reviewed by Eric Carlson.

The RequireUserGestureForFullscreen restriction will be kept in a MediaElementSession
if the corresponding media element is autoplay. Therefore, the request to enter
picture-in-picture from the UI process will be ignored by the media element, and the
state machine managing video presentation mode in the UI process will be an inconsistent state.

This patch creates a UserGestureIndicator before requesting the media element
to change its presentation mode to make sure the request will be handled.

  • platform/cocoa/VideoFullscreenModelVideoElement.mm:

(WebCore::VideoFullscreenModelVideoElement::fullscreenModeChanged):

12:16 PM Changeset in webkit [279318] by Alan Bujtas
  • 3 edits
    4 adds in trunk

[LFC][TFC] Add support for shrinking over-constrained columns based on the width type priority list
https://bugs.webkit.org/show_bug.cgi?id=227426

Reviewed by Antti Koivisto.

Source/WebCore:

Let's take the priority list into use when shrinking the columns in an over-constrained context.
e.g.
<div style="width: 100px">

<table><tr><td style="width: 90%""></td><td style="width: 400px;"></td><td style="width: 100px;"></td></tr></table>

</div>

While the second and the third columns have the preferred width of 400px and 100px respectively, we can't accommodate
them as the containing block (<div>) sets a 100px horizontal constraint on the table content and the first column already takes up 90px space.

Now we start shrinking the columns using the following priority list: auto < relative < fixed < percent (ignoring the actual column order).

The preferred width of the table (assume 0px border spacing and padding) is 90px + 400px + 100px. It produces a -490px
available space. This negative space needs to be distributed among the columns staring with the fixed sized ones.
The fixed sized columns have a flex space of 500px which covers the -490px gap. Based on their 4:1 distribution ratio, they'll end
up with 8px and 2px and the percent column stays at 90px.

Tests: fast/layoutformattingcontext/table-space-shinking-mixed-width-type-simple.html

fast/layoutformattingcontext/table-space-shinking-mixed-width-type-simple2.html

  • layout/formattingContexts/table/TableLayout.cpp:

(WebCore::Layout::distributeAvailableSpace):
(WebCore::Layout::TableFormattingContext::TableLayout::distributedHorizontalSpace):
(WebCore::Layout::TableFormattingContext::TableLayout::distributedVerticalSpace):

LayoutTests:

  • fast/layoutformattingcontext/table-space-shinking-mixed-width-type-simple-expected.html: Added.
  • fast/layoutformattingcontext/table-space-shinking-mixed-width-type-simple.html: Added.
  • fast/layoutformattingcontext/table-space-shinking-mixed-width-type-simple2-expected.html: Added.
  • fast/layoutformattingcontext/table-space-shinking-mixed-width-type-simple2.html: Added.
10:39 AM Changeset in webkit [279317] by Wenson Hsieh
  • 4 edits in trunk/Source/WebKit

Unreviewed, fix the iOS build after rdar://76781873

Remove support for -[UIResponder _insertTextFromCamera:] in WebKit2, now that UIKit only supports the public
API version (-[UIResponder captureTextFromCamera:]).

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

(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView _insertTextFromCameraForWebView:]): Deleted.

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

[LFC][TFC] Rename GridSpace::preferredSpace to preferredSize
https://bugs.webkit.org/show_bug.cgi?id=227425

Reviewed by Antti Koivisto.

It is a more descriptive name.

  • layout/formattingContexts/table/TableLayout.cpp:

(WebCore::Layout::GridSpace::isEmpty const):
(WebCore::Layout::operator-):
(WebCore::Layout::operator+=):
(WebCore::Layout::operator/):
(WebCore::Layout::distributeAvailableSpace):
(WebCore::Layout::TableFormattingContext::TableLayout::distributedHorizontalSpace): preferredWidth is the same in both cases.

9:51 AM Changeset in webkit [279315] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][TFC] Introduce a priority order for the grid types
https://bugs.webkit.org/show_bug.cgi?id=227417

Reviewed by Antti Koivisto.

Extra space distribution is based on a priority list with percent columns having the highest priority
and auto columns having the lowest (percent > fixed > relative > auto).

  • layout/formattingContexts/table/TableLayout.cpp:

(WebCore::Layout::distributeAvailableSpace):

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

[LFC][TFC] Introduce GridSpace::type
https://bugs.webkit.org/show_bug.cgi?id=227409

Reviewed by Antti Koivisto.

This is in preparation for supporting mixed width/height types (percent/fixed/relative/auto).
Available space distribution is based on type priority (e.g. percent value takes precedence over fixed width).

  • layout/formattingContexts/table/TableLayout.cpp:

(WebCore::Layout::distributeAvailableSpace):
(WebCore::Layout::TableFormattingContext::TableLayout::distributedHorizontalSpace):
(WebCore::Layout::TableFormattingContext::TableLayout::distributedVerticalSpace):
(WebCore::Layout::max): Deleted.

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

[GStreamer] SleepDisabler not destroyed when video playback stops
https://bugs.webkit.org/show_bug.cgi?id=219353

Patch by Philippe Normand <pnormand@igalia.com> on 2021-06-27
Reviewed by Eric Carlson.

Source/WebCore:

In GStreamer ports the SleepDisabler remained active after EOS because
HTMLMediaElement::updateSleepDisabling() was not being triggered. An explicit clean-up upon
the ended event in the media element is better than any other implicit action.

Test: media/video-ended-does-not-hold-sleep-assertion.html

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::dispatchEvent):

LayoutTests:

  • media/video-ended-does-not-hold-sleep-assertion-expected.txt: Added.
  • media/video-ended-does-not-hold-sleep-assertion.html: Added.
1:55 AM Changeset in webkit [279312] by graouts@webkit.org
  • 11 edits
    2 adds in trunk/Source

[Model] [iOS] Add support for rendering model resources
https://bugs.webkit.org/show_bug.cgi?id=227392
<rdar://problem/79770136>

Reviewed by Tim Horton.

Source/WebCore:

Ensure the anchor point is set correctly for model content layers, otherwise the preview layer shows
its center at the corner of the parent layer's origin.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setContentsToModel):

Source/WebCore/PAL:

Declare the ASVInlinePreview class.

  • pal/spi/ios/SystemPreviewSPI.h:

Source/WebKit:

Add a new WKModelView class which manages an ASVInlinePreview and displays its layer.
The current incarnation of the ASVInlinePreview SPI requires a URL to a file to specify
the resource, so we write a file to the temporary directory added in 279267 with the data
wrapped in the Model object passed through the remote layer tree. Ultimately we will be
able to use an SPI that does not require a file and instead will allow data to be passed
directly, this is purely for a temporary experimentation.

  • Platform/Logging.h:
  • SourcesCocoa.txt:
  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:

(WebKit::RemoteLayerTreeHost::makeNode):

  • UIProcess/ios/WKModelView.h: Added.
  • UIProcess/ios/WKModelView.mm: Added.

(-[WKModelView preview]):
(-[WKModelView initWithFrame:]):
(-[WKModelView initWithCoder:]):
(-[WKModelView initWithModel:]):
(-[WKModelView createFileForModel:]):
(-[WKModelView layoutSubviews]):
(-[WKModelView updateBounds]):

  • WebKit.xcodeproj/project.pbxproj:

Source/WTF:

Add a new compile-time flag indicating the availability of the ASVInlinePreview SPI on iOS.
We only define it when the header itself is present for now to avoid issues with older iOS
15 SDKs, but ultimately we will only use the iOS version check.

  • wtf/PlatformHave.h:

Jun 26, 2021:

10:42 PM Changeset in webkit [279311] by jh718.park@samsung.com
  • 3 edits in trunk/Source/WebCore

Unreviewed. Remove the build warnings below since r279050.
warning: redundant move in return statement [-Wredundant-move]

No new tests, no new behavioral changes.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeCounterStyleAdditiveSymbols):

  • css/parser/CSSPropertyParserWorkerSafe.cpp:

(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontFaceSrcURI):

7:06 PM Changeset in webkit [279310] by Wenson Hsieh
  • 4 edits in trunk/Source/WebKit

[iOS] Safari sometimes hangs under sync IPC in -[WKWebView _setSuppressSoftwareKeyboard:]
https://bugs.webkit.org/show_bug.cgi?id=227424
rdar://79745385

Reviewed by Tim Horton.

When activating streamlined AutoFill, Safari calls UIKit SPI (-_setSuppressSoftwareKeyboard:) on WKWebView to
ensure that the normal software keyboard doesn't briefly appear instead of the AutoFill input view; after
requesting AutoFill credentials, Safari then stops suppressing the software keyboard by setting the SPI property
back to NO. In WebKit, we override -[WKWebView _setSuppressSoftwareKeyboard:], such that WKContentView's
keyboard suppression state follows the web view's state (this is necessary, since WKContentView is the actual
-firstResponder when editing focused text inputs). However, when changing software keyboard suppression from
YES to NO, UIKit reloads input views and (in the process) calls into
-requestAutocorrectionContextWithCompletionHandler:, which then makes a sync IPC call into the web process.

To avoid this sync IPC call, we refactor the implementation of -[WKWebView _setSuppressSoftwareKeyboard:],
such that we don't immediately attempt to unsuppress the software keyboard by calling into WKContentView.
Instead, we asynchronously request an autocorrection context from the web process, and then call
-[WKContentView _setSuppressSoftwareKeyboard:NO] after the autocorrection context request completes (using
the last known autocorrection context data in the UI process rather than making a sync IPC call).

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _setSuppressSoftwareKeyboard:]):

Call into -updateSoftwareKeyboardSuppressionStateFromWebView below.

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

(-[WKContentView cleanUpInteraction]):

Invoke -unsuppressSoftwareKeyboardUsingLastAutocorrectionContextIfNeeded to ensure that we stop software
keyboard suppression if the web process terminates while we're waiting for autocorrection context data to
arrive.

(-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
(-[WKContentView _handleAutocorrectionContext:]):
(-[WKContentView updateSoftwareKeyboardSuppressionStateFromWebView]):

Add a new helper that keeps WKContentView's software keyboard suppression state in sync with the WKWebView's
software keyboard suppression state. In the case where we're supressing the software keyboard, we can simply
call into -[WKContentView _setSuppressSoftwareKeyboard:] right away, since UIKit won't try to request an
autocorrection context.

However, in the case where we're unsuppressing the software keyboard, set a new flag, don't immediately forward
the call to WKContentView. Instead, set the _unsuppressSoftwareKeyboardAfterNextAutocorrectionContextUpdate
flag to YES and call into WebPageProxy to request an updated autocorrection context. Upon receiving the response
in -[WKContentView _handleAutocorrectionContext:], we then unset the flag and unsuppress the software keyboard
(crucially, using _lastAutocorrectionContext instead of making a synchronous call back to the web content
process).

(-[WKContentView unsuppressSoftwareKeyboardUsingLastAutocorrectionContextIfNeeded]):

6:07 PM Changeset in webkit [279309] by weinig@apple.com
  • 68 edits
    4 copies in trunk

[Modern Media Controls] Modern media controls should not need to know about specific platforms in shared code
https://bugs.webkit.org/show_bug.cgi?id=227423

Reviewed by Eric Carlson.

Source/WebCore:

Rather than requiring the shared media control classes to know specifics about
the various platforms via the LayoutTraits flags, we now abstract those decisions
via a new polymorphic LayoutTraits class, which each platform subclasses and
implements.

This will gives better separation and will allow easier experimentation with new
control patterns.

  • DerivedSources-input.xcfilelist:
  • DerivedSources.make:
  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • Modules/modern-media-controls/js-files:

Adds new files for layout traits and its subclasses.

  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsHost::layoutTraitsClassName const):
(WebCore::MediaControlsHost::platform const): Deleted.

  • Modules/mediacontrols/MediaControlsHost.h:
  • Modules/mediacontrols/MediaControlsHost.idl:

Replace platform accessor with a new layoutTraitsClassName, which allows
the platform to spcecify which of the trait subclasses to use.

  • Modules/modern-media-controls/controls/layout-traits.js: Added.
  • Modules/modern-media-controls/controls/ios-layout-traits.js: Added.
  • Modules/modern-media-controls/controls/macos-layout-traits.js: Added.
  • Modules/modern-media-controls/controls/watchos-layout-traits.js: Added.

Add new layout trait files.

  • Modules/modern-media-controls/controls/fullscreen-button.js:
  • Modules/modern-media-controls/controls/icon-service.js:
  • Modules/modern-media-controls/controls/ios-inline-media-controls.js:
  • Modules/modern-media-controls/controls/layout-item.js:
  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:
  • Modules/modern-media-controls/controls/macos-inline-media-controls.js:
  • Modules/modern-media-controls/controls/media-controls.js:
  • Modules/modern-media-controls/controls/play-pause-button.js:
  • Modules/modern-media-controls/controls/time-control.js:
  • Modules/modern-media-controls/controls/watchos-media-controls.js:
  • Modules/modern-media-controls/media/media-controller.js:
  • Modules/modern-media-controls/media/tracks-support.js:

Replace explicit checks for platform with queries to the layout traits interface.

LayoutTests:

Update tests and results to use LayoutTraits class.

  • media/modern-media-controls/airplay-button/airplay-button-on.html:
  • media/modern-media-controls/airplay-button/airplay-button.html:
  • media/modern-media-controls/airplay-placard/airplay-placard.html:
  • media/modern-media-controls/button/button-active-state.html:
  • media/modern-media-controls/button/button-click-on-edges.html:
  • media/modern-media-controls/button/button-focus-state.html:
  • media/modern-media-controls/button/button-icon-name-expected.txt:
  • media/modern-media-controls/button/button-icon-name.html:
  • media/modern-media-controls/button/button-on.html:
  • media/modern-media-controls/forward-button/forward-button.html:
  • media/modern-media-controls/fullscreen-button/fullscreen-button.html:
  • media/modern-media-controls/icon-service/icon-service-expected.txt:
  • media/modern-media-controls/icon-service/icon-service.html:
  • media/modern-media-controls/invalid-placard/invalid-placard-constrained-metrics-expected.txt:
  • media/modern-media-controls/invalid-placard/invalid-placard-constrained-metrics.html:
  • media/modern-media-controls/invalid-placard/invalid-placard.html:
  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-constructor.html:
  • media/modern-media-controls/layout-item/layout-item-expected.txt:
  • media/modern-media-controls/layout-item/layout-item.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor-expected.txt:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor.html:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-constructor-expected.txt:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-constructor.html:
  • media/modern-media-controls/media-controller/media-controller-fullscreen-change.html:
  • media/modern-media-controls/media-controls/media-controls-appear-when-focus.html:
  • media/modern-media-controls/media-controls/media-controls-constructor-expected.txt:
  • media/modern-media-controls/media-controls/media-controls-constructor.html:
  • media/modern-media-controls/media-controls/media-controls-placard-compressed-metrics-expected.txt:
  • media/modern-media-controls/media-controls/media-controls-placard-compressed-metrics.html:
  • media/modern-media-controls/mute-button/mute-button.html:
  • media/modern-media-controls/overflow-button/overflow-button.html:
  • media/modern-media-controls/pip-button/pip-button.html:
  • media/modern-media-controls/pip-placard/pip-placard.html:
  • media/modern-media-controls/placard/placard-expected.txt:
  • media/modern-media-controls/placard/placard.html:
  • media/modern-media-controls/play-pause-button/play-pause-button.html:
  • media/modern-media-controls/rewind-button/rewind-button.html:
  • media/modern-media-controls/skip-back-button/skip-back-button.html:
  • media/modern-media-controls/skip-forward-button/skip-forward-button.html:
  • media/modern-media-controls/time-control/time-control-expected.txt:
  • media/modern-media-controls/time-control/time-control.html:
  • media/modern-media-controls/tracks-button/tracks-button.html:
  • media/modern-media-controls/watchos-media-controls/watchos-media-controls-constructor-expected.txt:
  • media/modern-media-controls/watchos-media-controls/watchos-media-controls-constructor.html:
5:48 PM Changeset in webkit [279308] by dino@apple.com
  • 4 edits in trunk/Source/WebCore

Build fix for iOS Simulator. MTLSharedTexture is not available
on that configuration.

  • Modules/webxr/WebXROpaqueFramebuffer.cpp:

(WebCore::WebXROpaqueFramebuffer::startFrame):
(WebCore::WebXROpaqueFramebuffer::endFrame):

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
Note: See TracTimeline for information about the timeline view.