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

Timeline



Dec 31, 2019:

6:27 PM Changeset in webkit [253964] by commit-queue@webkit.org
  • 32 edits
    6 copies
    8 adds in trunk

Add remote media resource loader for the GPU process
https://bugs.webkit.org/show_bug.cgi?id=205379

Patch by Peng Liu <Peng Liu> on 2019-12-31
Reviewed by Youenn Fablet.

Source/WebCore:

There are two definitions of ShouldContinue: WebCore::ScriptExecutionContext::ShouldContinue
and WebCore::ShouldContinue. This patch moves WebCore::ShouldContinue to
WebCore::PolicyChecker::ShouldContinue in order to support transmitting it in XPC messages.

Tests: media/audio-play-with-video-element.html

media/audio-play.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):

  • loader/FrameLoader.h:
  • loader/MediaResourceLoader.cpp:

(WebCore::MediaResource::responseReceived):

  • loader/PolicyChecker.h:
  • platform/graphics/PlatformMediaResourceLoader.h:

(WebCore::PlatformMediaResourceClient::responseReceived):

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(CachedResourceStreamingClient::responseReceived):

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(WebCore::WebCoreNSURLSessionDataTaskClient::responseReceived):
(-[WebCoreNSURLSessionDataTask resource:receivedResponse:completionHandler:]):

Source/WebKit:

In the GPU process, the RemoteMediaResourceLoader creates RemoteMediaResource(s),
which will notify the media resource clients (WebCoreNSURLSessionDataTaskClient).
Then the data will be forwarded to AVFoundation.

In the Web process, MeidaResourceLoader creates MediaResource(s), which take care of
downloading media data through the network process. The received data will be forwarded to
RemoteMediaResourceProxy, which will forward the data to the corresponding RemoteMediaResource
through XPC messages.

(WebKit::GPUConnectionToWebProcess::remoteMediaResourceManager):
(WebKit::GPUConnectionToWebProcess::didReceiveMessage):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:
  • GPUProcess/media/RemoteMediaPlayerManagerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::~RemoteMediaPlayerProxy):
(WebKit::RemoteMediaPlayerProxy::requestResource):
(WebKit::RemoteMediaPlayerProxy::removeResource):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerCreateResourceLoader):

  • GPUProcess/media/RemoteMediaPlayerProxy.h:

(WebKit::RemoteMediaPlayerProxy::~RemoteMediaPlayerProxy): Deleted.
(WebKit::RemoteMediaPlayerProxy::mediaPlayerLogIdentifier): Deleted.

  • GPUProcess/media/RemoteMediaResource.cpp: Added.

(WebKit::RemoteMediaResource::create):
(WebKit::RemoteMediaResource::RemoteMediaResource):
(WebKit::RemoteMediaResource::~RemoteMediaResource):
(WebKit::RemoteMediaResource::stop):
(WebKit::RemoteMediaResource::didPassAccessControlCheck const):
(WebKit::RemoteMediaResource::responseReceived):
(WebKit::RemoteMediaResource::redirectReceived):
(WebKit::RemoteMediaResource::shouldCacheResponse):
(WebKit::RemoteMediaResource::dataSent):
(WebKit::RemoteMediaResource::dataReceived):
(WebKit::RemoteMediaResource::accessControlCheckFailed):
(WebKit::RemoteMediaResource::loadFailed):
(WebKit::RemoteMediaResource::loadFinished):

  • GPUProcess/media/RemoteMediaResource.h: Added.

(WebKit::RemoteMediaResource::ready const):
(WebKit::RemoteMediaResource::setReady):

  • GPUProcess/media/RemoteMediaResourceIdentifier.h: Added.
  • GPUProcess/media/RemoteMediaResourceLoader.cpp: Added.

(WebKit::RemoteMediaResourceLoader::RemoteMediaResourceLoader):
(WebKit::RemoteMediaResourceLoader::~RemoteMediaResourceLoader):
(WebKit::RemoteMediaResourceLoader::requestResource):

  • GPUProcess/media/RemoteMediaResourceLoader.h: Added.
  • GPUProcess/media/RemoteMediaResourceManager.cpp: Added.

(WebKit::RemoteMediaResourceManager::RemoteMediaResourceManager):
(WebKit::RemoteMediaResourceManager::~RemoteMediaResourceManager):
(WebKit::RemoteMediaResourceManager::addMediaResource):
(WebKit::RemoteMediaResourceManager::removeMediaResource):
(WebKit::RemoteMediaResourceManager::responseReceived):
(WebKit::RemoteMediaResourceManager::redirectReceived):
(WebKit::RemoteMediaResourceManager::dataSent):
(WebKit::RemoteMediaResourceManager::dataReceived):
(WebKit::RemoteMediaResourceManager::accessControlCheckFailed):
(WebKit::RemoteMediaResourceManager::loadFailed):
(WebKit::RemoteMediaResourceManager::loadFinished):

  • GPUProcess/media/RemoteMediaResourceManager.h: Added.
  • GPUProcess/media/RemoteMediaResourceManager.messages.in: Added.
  • WebProcess/GPU/GPUProcessConnection.h:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote):
(WebKit::MediaPlayerPrivateRemote::requestResource):
(WebKit::MediaPlayerPrivateRemote::removeResource):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
  • WebProcess/GPU/media/MediaPlayerPrivateRemoteIdentifier.h:
  • WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:

(WebKit::RemoteMediaPlayerManager::supportsTypeAndCodecs):
(WebKit::RemoteMediaPlayerManager::originsInMediaCache):
(WebKit::RemoteMediaPlayerManager::clearMediaCacheForOrigins):
(WebKit::RemoteMediaPlayerManager::networkStateChanged):
(WebKit::RemoteMediaPlayerManager::readyStateChanged):
(WebKit::RemoteMediaPlayerManager::volumeChanged):
(WebKit::RemoteMediaPlayerManager::muteChanged):
(WebKit::RemoteMediaPlayerManager::timeChanged):
(WebKit::RemoteMediaPlayerManager::durationChanged):
(WebKit::RemoteMediaPlayerManager::rateChanged):
(WebKit::RemoteMediaPlayerManager::playbackStateChanged):
(WebKit::RemoteMediaPlayerManager::engineFailedToLoad):
(WebKit::RemoteMediaPlayerManager::requestResource):
(WebKit::RemoteMediaPlayerManager::removeResource):

  • WebProcess/GPU/media/RemoteMediaPlayerManager.h:

(WebKit::RemoteMediaPlayerManager::didReceiveMessageFromGPUProcess):
(WebKit::RemoteMediaPlayerManager::didReceiveMessageFromWebProcess): Deleted.

  • WebProcess/GPU/media/RemoteMediaPlayerManager.messages.in:
  • WebProcess/GPU/media/RemoteMediaResourceProxy.cpp: Added.

(WebKit::RemoteMediaResourceProxy::RemoteMediaResourceProxy):
(WebKit::RemoteMediaResourceProxy::~RemoteMediaResourceProxy):
(WebKit::RemoteMediaResourceProxy::responseReceived):
(WebKit::RemoteMediaResourceProxy::redirectReceived):
(WebKit::RemoteMediaResourceProxy::shouldCacheResponse):
(WebKit::RemoteMediaResourceProxy::dataSent):
(WebKit::RemoteMediaResourceProxy::dataReceived):
(WebKit::RemoteMediaResourceProxy::accessControlCheckFailed):
(WebKit::RemoteMediaResourceProxy::loadFailed):
(WebKit::RemoteMediaResourceProxy::loadFinished):

  • WebProcess/GPU/media/RemoteMediaResourceProxy.h: Added.

LayoutTests:

  • gpu-process/TestExpectations:
  • media/audio-play-expected.txt: Added.
  • media/audio-play-with-video-element-expected.txt: Added.
  • media/audio-play-with-video-element.html: Added.
  • media/audio-play.html: Added.
4:02 PM Changeset in webkit [253963] by Darin Adler
  • 11 edits in trunk/Source

Tidy a bit of StringBuilder usage
https://bugs.webkit.org/show_bug.cgi?id=205509

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • dfg/DFGStrengthReductionPhase.cpp:

(JSC::DFG::StrengthReductionPhase::handleNode): Remove unneeded check that
duplicates range checking that StringBuilder::appendSubstring does.

Source/WebCore:

  • dom/Range.cpp:

(WebCore::Range::toString const): Remove redundant range checking and let the
StringBuilder::appendSubstring take care of it.

  • editing/MarkupAccumulator.cpp:

(WebCore::appendCharactersReplacingEntitiesInternal): Use appendSubstring.
(WebCore::MarkupAccumulator::appendNamespace): Use single calls to
StringBuilder::append with multiple arguments rather than multiple calls.

Source/WTF:

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::decodeFromFilename): Fix misleading variable name "hexDigit"
for result of decoding "%+XXXX"; what's decoded is a character, not a hex digit.

  • wtf/HexNumber.h: Remove unused appendUnsignedAsHexFixedSize function for

destinations other than StringBuilder. Don't need it at this time, could add
it later if we ever decide we do.

  • wtf/text/StringBuilder.h:

(WTF::StringBuilder::appendSubstring): Improved logic in appendSubstring so it
will handle even absurd values for offset and length correctly, and added a
default length of "infinity" just like in String::substring.

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::convertToLowercaseWithoutLocale): Use isASCII.
(WTF::StringImpl::convertToLowercaseWithoutLocaleStartingAtFailingIndex8Bit): Ditto.

  • wtf/text/WTFString.cpp:

(asciiDebug): Use StringBuilder to build the string; this was the one place that
used appendUnsignedAsHexFixedSize on something else, and there is no need.

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

[LFC][IFC] Add scrollable overflow rect to Display::LineBox
https://bugs.webkit.org/show_bug.cgi?id=205661
<rdar://problem/58256282>

Reviewed by Antti Koivisto.

Compute layout overflow rect while closing the line and adjusting the rust vertically.

  • layout/displaytree/DisplayInlineRect.h:

(WebCore::Display::InlineRect::setBottom):
(WebCore::Display::InlineRect::expandVerticallyToContain):

  • layout/displaytree/DisplayLineBox.h:

(WebCore::Display::LineBox::scrollableOverflowRect const):
(WebCore::Display::LineBox::logicalTopLeft const):
(WebCore::Display::LineBox::setScrollableOverflowRect):

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::alignContentVertically):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::collectOverflow):

10:18 AM Changeset in webkit [253961] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Fix imported/w3c/web-platform-tests/css/css-text/white-space/pre-wrap-014.html
https://bugs.webkit.org/show_bug.cgi?id=205657
<rdar://problem/58254951>

Reviewed by Antti Koivisto.

Use the adjusted available width when justifying the runs during line close.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::justifyRuns const):
(WebCore::Layout::LineBuilder::alignHorizontally):

  • layout/inlineformatting/InlineLineBuilder.h:
8:51 AM Changeset in webkit [253960] by clopez@igalia.com
  • 2 edits in trunk/Tools

[WPE] OpenJPEG missing in install dependencies script.
https://bugs.webkit.org/show_bug.cgi?id=205647

Unreviewed follow-up fix.

Add also the OpenJPEG-2 package to the WPE install list.

  • wpe/install-dependencies:
8:15 AM Changeset in webkit [253959] by Antti Koivisto
  • 20 edits in trunk/Source/WebCore

StyleRule accessor in RuleData should return a const reference
https://bugs.webkit.org/show_bug.cgi?id=205655

Reviewed by Zalan Bujtas.

It is currently a non-const pointer.

This leads to StyleRule being const in many other places too.

  • css/StyleRule.h:

(WebCore::StyleRuleBase::deref const):
(WebCore::StyleRuleBase::deref): Deleted.

Make deref const, matching RefCounted and allowing RefPtr<const StyleRule>

  • editing/EditingStyle.cpp:

(WebCore::styleFromMatchedRulesForElement):

  • inspector/agents/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::buildObjectForRule):
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):

  • inspector/agents/InspectorCSSAgent.h:
  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::matchedRuleList const):
(WebCore::Style::ElementRuleCollector::transferMatchedRules):
(WebCore::Style::ElementRuleCollector::ruleMatches):
(WebCore::Style::ElementRuleCollector::collectMatchingRulesForList):

  • style/ElementRuleCollector.h:
  • style/InspectorCSSOMWrappers.cpp:

(WebCore::Style::InspectorCSSOMWrappers::getWrapperForRuleInSheets):

  • style/InspectorCSSOMWrappers.h:
  • style/RuleData.cpp:

(WebCore::Style::RuleData::RuleData):

  • style/RuleData.h:

(WebCore::Style::RuleData::styleRule const):
(WebCore::Style::RuleData::compiledSelector const):
(WebCore::Style::RuleData::rule const): Deleted.

  • style/RuleFeature.cpp:

(WebCore::Style::RuleFeature::RuleFeature):
(WebCore::Style::RuleFeatureSet::collectFeatures):

  • style/RuleFeature.h:

(WebCore::Style::RuleFeature::RuleFeature): Deleted.

  • style/RuleSet.cpp:

(WebCore::Style::RuleSet::addRule):
(WebCore::Style::RuleSet::addStyleRule):
(WebCore::Style::RuleSet::evaluteDynamicMediaQueryRules):
(WebCore::Style::RuleSet::MediaQueryCollector::addRuleIfNeeded):

  • style/RuleSet.h:
  • style/StyleResolver.cpp:

(WebCore::Style::Resolver::styleRulesForElement):
(WebCore::Style::Resolver::pseudoStyleRulesForElement):

  • style/StyleResolver.h:
  • style/StyleScopeRuleSets.cpp:

(WebCore::Style::makeRuleSet):
(WebCore::Style::ensureInvalidationRuleSets):

8:13 AM WebKitGTK/MaintenanceTips edited by Michael Catanzaro
Change insure -> ensure. Using "insure" to mean "ensure" seems archaic! (diff)
7:55 AM Changeset in webkit [253958] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC](Regression r253909) Fix fast/text/simple-line-with-br.html
https://bugs.webkit.org/show_bug.cgi?id=205653
<rdar://problem/58248900>

Reviewed by Antti Koivisto.

When the inline content is followed by a line break (e.g. text content<br>), the line
break should not initiate a new line unless the line is empty (e.g text content<br><br>).
Let's include the line break in the LineCandidateContent so that we can close the line by
adding the trailing line break (This is a partial revert of r253909).

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::nextWrapOpportunity):
(WebCore::Layout::LineCandidateContent::inlineRuns const):
(WebCore::Layout::LineCandidateContent::trailingLineBreak const):
(WebCore::Layout::LineCandidateContent::setTrailingLineBreak):
(WebCore::Layout::LineCandidateContent::append):
(WebCore::Layout::LineLayoutContext::layoutLine):
(WebCore::Layout::LineLayoutContext::nextContentForLine):
(WebCore::Layout::LineLayoutContext::tryAddingInlineItems):
(WebCore::Layout::LineCandidateContent::runs const): Deleted.
(WebCore::Layout::LineCandidateContent::isLineBreak const): Deleted.
(WebCore::Layout::LineCandidateContent::setIsLineBreak): Deleted.

  • layout/inlineformatting/LineLayoutContext.h:
2:00 AM Changeset in webkit [253957] by youenn@apple.com
  • 34 edits
    2 copies
    9 adds in trunk

Implement RTC VTB decoders in GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=205607

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Expose remote decoder abilities with C like functions.
This allows WebProcess to implement IPC-based decoders.
Expose VTB H264 decoder as C like functions.
This allows GPU process to instantiate wasily H2664 decoders.

  • Configurations/libwebrtc.iOS.exp:
  • Configurations/libwebrtc.iOSsim.exp:
  • Configurations/libwebrtc.mac.exp:
  • Source/webrtc/sdk/WebKit/WebKitUtilities.h:
  • Source/webrtc/sdk/WebKit/WebKitUtilities.mm:

(webrtc::videoDecoderCallbacks):
(webrtc::setVideoDecoderCallbacks):
(webrtc::RemoteVideoDecoder::RemoteVideoDecoder):
(webrtc::RemoteVideoDecoder::decodeComplete):
(webrtc::RemoteVideoDecoder::InitDecode):
(webrtc::RemoteVideoDecoder::Decode):
(webrtc::RemoteVideoDecoder::RegisterDecodeCompleteCallback):
(webrtc::RemoteVideoDecoder::Release):
(webrtc::RemoteVideoDecoderFactory::RemoteVideoDecoderFactory):
(webrtc::RemoteVideoDecoderFactory::GetSupportedFormats const):
(webrtc::RemoteVideoDecoderFactory::CreateVideoDecoder):
(webrtc::createWebKitDecoderFactory):
(webrtc::createLocalDecoder):
(webrtc::releaseLocalDecoder):
(webrtc::decodeFrame):

  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH264.h:
  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH264.mm:

(-[RTCVideoDecoderH264 decode:missingFrames:codecSpecificInfo:renderTimeMs:]):
(-[RTCVideoDecoderH264 decodeData:size:timeStamp:]):

Source/WebCore:

Add routine to create a RemoveVideoSample from a pixel buffer.
Update LibWebRTCProvider to enable/disable decoding in GPU Process and add internals API.

Test: webrtc/video-gpuProcess.html

  • platform/graphics/RemoteVideoSample.cpp:

(WebCore::RemoteVideoSample::create):

  • platform/graphics/RemoteVideoSample.h:
  • platform/graphics/cv/ImageTransferSessionVT.h:
  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

(WebCore::LibWebRTCProvider::setUseGPUProcess):

  • platform/mediastream/libwebrtc/LibWebRTCProvider.h:
  • platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h:
  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setUseGPUProcessForWebRTC):

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

Source/WebKit:

Implement decoder factory callbacks.
Implement WebProcess codecs by sending IPC for creating/releasing/decoding a frame.
WebProcess receives IPC messages from GPU Process whenever a frame is decoded.

  • Configurations/WebKit.xcconfig:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::libWebRTCCodecsProxy):
(WebKit::GPUConnectionToWebProcess::didReceiveMessage):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.h: Added.

(WebKit::LibWebRTCCodecsProxy::didReceiveMessageFromWebProcess):

  • GPUProcess/webrtc/LibWebRTCCodecsProxy.messages.in: Added.
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm: Added.

(WebKit::LibWebRTCCodecsProxy::LibWebRTCCodecsProxy):
(WebKit::LibWebRTCCodecsProxy::~LibWebRTCCodecsProxy):
(WebKit::LibWebRTCCodecsProxy::createDecoder):
(WebKit::LibWebRTCCodecsProxy::releaseDecoder):
(WebKit::LibWebRTCCodecsProxy::decodeFrame):

  • Scripts/webkit/messages.py:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::didReceiveMessage):

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: Added.

(WebKit::createVideoDecoder):
(WebKit::releaseVideoDecoder):
(WebKit::decodeVideoFrame):
(WebKit::registerDecodeCompleteCallback):
(WebKit::LibWebRTCCodecs::setVideoDecoderCallbacks):
(WebKit::LibWebRTCCodecs::createDecoder):
(WebKit::LibWebRTCCodecs::releaseDecoder):
(WebKit::LibWebRTCCodecs::decodeFrame):
(WebKit::LibWebRTCCodecs::registerDecodeFrameCallback):
(WebKit::LibWebRTCCodecs::failedDecoding):
(WebKit::LibWebRTCCodecs::completedDecoding):

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.h: Added.
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.messages.in: Added.
  • WebProcess/GPU/webrtc/RTCDecoderIdentifier.h: Added.
  • WebProcess/Network/webrtc/LibWebRTCProvider.cpp:

(WebKit::LibWebRTCProvider::createDecoderFactory):

  • WebProcess/Network/webrtc/LibWebRTCProvider.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::libWebRTCCodecs):

  • WebProcess/WebProcess.h:

LayoutTests:

  • webrtc/video-gpuProcess-expected.txt: Added.
  • webrtc/video-gpuProcess.html: Added.

Dec 30, 2019:

9:41 PM Changeset in webkit [253956] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, build fix after r253904
https://bugs.webkit.org/show_bug.cgi?id=205553

  • bytecompiler/BytecodeGeneratorBaseInlines.h:

(JSC::BytecodeGeneratorBase<Traits>::alignWideOpcode16):
(JSC::BytecodeGeneratorBase<Traits>::alignWideOpcode32):

3:53 PM Changeset in webkit [253955] by clopez@igalia.com
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION(r253896): [GTK][WPE] Broke the build with GCC-7
https://bugs.webkit.org/show_bug.cgi?id=205649

Reviewed by Mark Lam.

Add WTF_INTERNAL macro to explicitly adjust the symbol visibility.

  • llint/LLIntSlowPaths.h:
3:43 PM Changeset in webkit [253954] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK][WPE] OpenJPEG missing in install dependencies script
https://bugs.webkit.org/show_bug.cgi?id=205647

Reviewed by Adrian Perez de Castro.

  • gtk/install-dependencies: Add OpenJPEG-2 package to the list.
2:16 PM Changeset in webkit [253953] by dino@apple.com
  • 1 edit in trunk/Source/WebCore/platform/mediastream/mac/BaseAudioSharedUnit.cpp

Build fix for iOS simulator.

  • platform/mediastream/mac/BaseAudioSharedUnit.cpp:
12:52 PM Changeset in webkit [253952] by eric.carlson@apple.com
  • 15 edits
    2 adds in trunk

Create media mime type cache base class to reduce duplicate code
https://bugs.webkit.org/show_bug.cgi?id=205632
<rdar://problem/58233565>

Reviewed by Jer Noble.

No new tests, no functional change.

AVStreamDataParserMIMETypeCache and AVAssetMIMETypeCache have a lot of very similar code,
so create MIMETypeCache as a base class. Also move most of the logic from
MediaPlayerPrivateMediaSourceAVFObjC::supportsType and MediaPlayerPrivateAVFoundationObjC::supportsType
in the caches.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/MIMETypeRegistry.cpp:

(WebCore::MIMETypeRegistry::isSupportedImageVideoOrSVGMIMEType): Call supportsContainerType.

  • platform/graphics/MIMETypeCache.cpp: Added.

(WebCore::MIMETypeCache::supportedTypes):
(WebCore::MIMETypeCache::supportsContainerType):
(WebCore::MIMETypeCache::canDecodeType):
(WebCore::MIMETypeCache::canDecodeTypePrivate):
(WebCore::MIMETypeCache::setSupportedTypes):
(WebCore::MIMETypeCache::addSupportedType):
(WebCore::MIMETypeCache::staticContainerTypeList):

  • platform/graphics/MIMETypeCache.h: Added.

(WebCore::MIMETypeCache::isUnsupportedType):
(WebCore::MIMETypeCache::isAvailable const):
(WebCore::MIMETypeCache::canDecodeTypeInternal):
(WebCore::MIMETypeCache::initializeCache):

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaEngineSupportParameters::encode const): Drive-by fix - add missing variable.

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

(WebCore::AVAssetMIMETypeCache::isAvailable const):
(WebCore::AVAssetMIMETypeCache::canDecodeTypeInternal):
(WebCore::AVAssetMIMETypeCache::isUnsupportedType):
(WebCore::AVAssetMIMETypeCache::staticContainerTypeList):
(WebCore::AVAssetMIMETypeCache::initializeCache):
(WebCore::AVAssetMIMETypeCache::setSupportedTypes): Moved to base class.
(WebCore::AVAssetMIMETypeCache::types): Moved to base class as supportedTypes.
(WebCore::AVAssetMIMETypeCache::supportsContentType): Renamed supportsContainerType.
(WebCore::AVAssetMIMETypeCache::canDecodeType): Moved to base class.
(WebCore::AVAssetMIMETypeCache::loadMIMETypes): Deleted.

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

(WebCore::AVStreamDataParserMIMETypeCache::canDecodeTypeInternal):
(WebCore::AVStreamDataParserMIMETypeCache::initializeCache):
(WebCore::AVStreamDataParserMIMETypeCache::types): Moved to base class as supportedTypes.
(WebCore::AVStreamDataParserMIMETypeCache::supportsContentType): Renamed supportsContainerType.
(WebCore::AVStreamDataParserMIMETypeCache::canDecodeType): Moved to base class.
(WebCore::AVStreamDataParserMIMETypeCache::loadMIMETypes): Deleted.

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

(WebCore::ImageDecoderAVFObjC::supportsContainerType): Renamed from supportsContentType.
(WebCore::ImageDecoderAVFObjC::canDecodeType):
(WebCore::ImageDecoderAVFObjC::supportsContentType): Deleted.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::getSupportedTypes):
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem):

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

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::getSupportedTypes):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):

12:46 PM Changeset in webkit [253951] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][Integration] Do not apply trailing whitespace quirk when content is right aligned.
https://bugs.webkit.org/show_bug.cgi?id=205634
<rdar://problem/58234523>

Reviewed by Antti Koivisto.

Apparently we don't always need this quirk. See SimpleLineLayout::createLineRuns.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::removeTrailingCollapsibleContent):

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::isTextAlignRight const):

12:23 PM Changeset in webkit [253950] by beidson@apple.com
  • 25 edits
    2 adds in trunk

Add WKWebView SPI to evaluate a function with arguments
https://bugs.webkit.org/show_bug.cgi?id=205239

Reviewed by Alex Christensen.

Source/WebCore:

Covered by new API tests.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/ExceptionDetails.h:
  • bindings/js/RunJavaScriptParameters.h: Added.

(WebCore::RunJavaScriptParameters::RunJavaScriptParameters):
(WebCore::RunJavaScriptParameters::encode const):
(WebCore::RunJavaScriptParameters::decode):

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::executeScriptInWorldIgnoringException):
(WebCore::ScriptController::executeScriptInWorld):
(WebCore::ScriptController::callInWorld):
(WebCore::ScriptController::executeUserAgentScriptInWorld):
(WebCore::ScriptController::executeUserAgentScriptInWorldInternal):
(WebCore::ScriptController::executeAsynchronousUserAgentScriptInWorld):

  • bindings/js/ScriptController.h:

XPathGrammar changes completely unrelated to the functionality of this patch,
but because of our poor #include hygiene these were necessary to keep linuxes building.

  • xml/XPathGrammar.cpp:
  • xml/XPathGrammar.y:

Source/WebKit:

  • Shared/API/APISerializedScriptValue.h:
  • UIProcess/API/C/WKPage.cpp:

(WKPageRunJavaScriptInMainFrame):

  • UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm:

(API::sharedContext):
(API::SerializedScriptValue::deserialize):
(API::SerializedScriptValue::wireBytesFromNSObject):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView evaluateJavaScript:completionHandler:]):
(validateArgument):
(-[WKWebView _evaluateJavaScript:asAsyncFunction:withArguments:forceUserGesture:completionHandler:]):
(-[WKWebView _callAsyncFunction:withArguments:completionHandler:]):
(-[WKWebView _evaluateJavaScriptWithoutUserGesture:completionHandler:]):
(-[WKWebView _evaluateJavaScript:forceUserGesture:completionHandler:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/glib/WebKitWebView.cpp:

(webkit_web_view_run_javascript):
(webkit_web_view_run_javascript_in_world):
(resourcesStreamReadCallback):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::runJavaScriptInMainFrame):
(WebKit::WebPageProxy::runJavaScriptInMainFrameScriptWorld):

  • UIProcess/WebPageProxy.h:
  • UIProcess/socket/RemoteInspectorProtocolHandler.cpp:

(WebKit::RemoteInspectorProtocolHandler::runScript):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::runJavaScript):
(WebKit::WebPage::runJavaScriptInMainFrameScriptWorld):
(WebKit::WebPage::runJavaScriptInFrame):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/AsyncFunction.mm: Added.

(TestWebKitAPI::TEST):

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

(-[WKWebView objectByCallingAsyncFunction:withArguments:error:]):

12:16 PM Changeset in webkit [253949] by Antti Koivisto
  • 5 edits in trunk/Source/WebCore

Style invalidation cleanups
https://bugs.webkit.org/show_bug.cgi?id=205644

Reviewed by Zalan Bujtas.

Move more of the invalidation code from Style::Scope to Style::Invalidator.

  • style/StyleInvalidator.cpp:

(WebCore::Style::Invalidator::invalidateStyle):
(WebCore::Style::Invalidator::invalidateAllStyle):
(WebCore::Style::Invalidator::invalidateHostAndSlottedStyleIfNeeded):

  • style/StyleInvalidator.h:
  • style/StyleScope.cpp:

(WebCore::Style::Scope::analyzeStyleSheetChange):

Return StyleSheetChange struct.

(WebCore::Style::Scope::updateActiveStyleSheets):
(WebCore::Style::Scope::invalidateStyleAfterStyleSheetChange):

Use StyleSheetChange to invalidate the style.

(WebCore::Style::Scope::updateResolver):
(WebCore::Style::Scope::scheduleUpdate):
(WebCore::Style::Scope::evaluateMediaQueries):
(WebCore::Style::invalidateHostAndSlottedStyleIfNeeded): Deleted.

  • style/StyleScope.h:

(WebCore::Style::Scope::document):
(WebCore::Style::Scope::shadowRoot const):
(WebCore::Style::Scope::shadowRoot):

10:25 AM Changeset in webkit [253948] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][IFC] Fix imported/w3c/web-platform-tests/css/css-text/white-space/white-space-wrap-after-nowrap-001.html
https://bugs.webkit.org/show_bug.cgi?id=205633
<rdar://problem/58234239>

Reviewed by Antti Koivisto.

When the LineBreaker comes back with Action::Revert (meaning that the line
needs to be reverted back to an earlier line wrap opportunity), call LineBuilder::revert and
close the line.

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::tryWrappingInlineContent const): Return push when the current content can be wrapped.
(WebCore::Layout::ContinousContent::ContinousContent):
(WebCore::Layout::ContinousContent::lastWrapOpportunityIndex const): Fix the last position logic.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::revert):
(WebCore::Layout::LineBuilder::collectHangingContent):

  • layout/inlineformatting/InlineLineBuilder.h:
  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::endsWithSoftWrapOpportunity):
(WebCore::Layout::LineLayoutContext::layoutLine):
(WebCore::Layout::LineLayoutContext::tryAddingFloatItems):
(WebCore::Layout::LineLayoutContext::tryAddingInlineItems):
(WebCore::Layout::LineLayoutContext::addFloatItems): Deleted.
(WebCore::Layout::LineLayoutContext::checkForLineWrapAndCommit): Deleted.

  • layout/inlineformatting/LineLayoutContext.h:
9:17 AM Changeset in webkit [253947] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK][WPE] Report number of total tests run and failed in API test runner like run-api-tests does
https://bugs.webkit.org/show_bug.cgi?id=205608

Reviewed by Carlos Garcia Campos.

Calculate the total number of tests (including subtests) executed
and report it at the end of the step in the same format than run-api-tests does.

  • glib/api_test_runner.py:

(TestRunner._run_test_glib): Pass the list of skipped tests instead of calculating it here to avoid calculating it twice.
(TestRunner._get_tests_from_google_test_suite): Ditto.
(TestRunner._run_google_test_suite): Ditto.
(TestRunner._run_test): Ditto.
(TestRunner.run_tests):
(TestRunner.run_tests.number_of_tests):
(TestRunner.run_tests.report):

9:10 AM Changeset in webkit [253946] by youenn@apple.com
  • 14 edits
    8 adds in trunk

Ignore URL host for schemes that are not using host information
https://bugs.webkit.org/show_bug.cgi?id=205157
Source/WebCore:

rdar://problem/57825963

Reviewed by Darin Adler.

Tests: http/tests/local/file-url-host.html

http/tests/security/about-url-host.html
http/tests/security/data-url-host.html
http/tests/security/javascript-url-host.html

Whenever setting the document URL, remove the host information if its scheme is not supposed to have a host.
This is done for file, data and about schemes.

Add internals APIs to test this.

  • dom/Document.cpp:

(WebCore::Document::setURL):

  • page/DOMWindow.h:
  • page/Location.h:
  • page/Location.idl:
  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::shouldIgnoreHost):

  • page/SecurityOrigin.h:
  • testing/Internals.cpp:

(WebCore::Internals::windowLocationHost):

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

Source/WTF:

<rdar://problem/57825963>

Reviewed by Darin Adler.

  • wtf/URL.cpp:

(WTF::URL::removeHostAndPort):

  • wtf/URL.h:

LayoutTests:

Reviewed by Darin Adler.

  • http/tests/local/file-url-host-expected.txt: Added.
  • http/tests/local/file-url-host.html: Added.
  • http/tests/security/about-url-host-expected.txt: Added.
  • http/tests/security/about-url-host.html: Added.
  • http/tests/security/data-url-host-expected.txt: Added.
  • http/tests/security/data-url-host.html: Added.
  • http/tests/security/javascript-url-host-expected.txt: Added.
  • http/tests/security/javascript-url-host.html: Added.
9:01 AM Changeset in webkit [253945] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK][WPE] support output of results in json format in API test runner.
https://bugs.webkit.org/show_bug.cgi?id=205579

Reviewed by Carlos Garcia Campos.

Write the results of the tests in json format when the option --json-output
is passed to run-gtk-tests or run-wpe-tests. Use the same format than mac's
run-api-tests.

  • glib/api_test_runner.py:

(TestRunner.run_tests):
(TestRunner.run_tests.generate_test_list_for_json_output):
(TestRunner):
(add_options):

6:45 AM Changeset in webkit [253944] by youenn@apple.com
  • 4 edits
    1 add in trunk/Source/ThirdParty/libwebrtc

Do not build yasm for iOS and iOS simulator
https://bugs.webkit.org/show_bug.cgi?id=205556
<rdar://problem/58159497>

Reviewed by Eric Carlson.

We want to stop compiling yasm for iOS/iOS simulator but we do not have a good way to do so right now.
Instead, compile a dummy main_noop.c for iOS/iOS simulator and build the executable with it.
This executable wil anyway not be used on these platforms.

  • Configurations/yasm.xcconfig:
  • Source/third_party/yasm/main_noop.c: Added.

(main):

  • libwebrtc.xcodeproj/project.pbxproj:
Note: See TracTimeline for information about the timeline view.