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:

Dec 29, 2019:

9:36 PM Changeset in webkit [253943] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Remove WTF::loadLoadFence from JSFunction::rareData()
https://bugs.webkit.org/show_bug.cgi?id=205625

Reviewed by Mark Lam.

WTF::loadLoadFence() is not necessary when loading FunctionRareData from JSFunction since we ensured that stored FunctionRareData
is already baked by emitting WTF::storeStoreFence().

  • runtime/JSFunction.h:

(JSC::JSFunction::rareData const):
(JSC::JSFunction::rareData): Deleted.

  • runtime/JSFunctionInlines.h:

(JSC::JSFunction::hasReifiedLength const):
(JSC::JSFunction::hasReifiedName const):
(JSC::JSFunction::areNameAndLengthOriginal):
(JSC::JSFunction::ensureRareDataAndAllocationProfile):

8:43 PM Changeset in webkit [253942] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WebCore

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

  • layout/inlineformatting/InlineLineBuilder.cpp:

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

4:35 PM Changeset in webkit [253941] by commit-queue@webkit.org
  • 15 edits in trunk/Source

Tweak the format and comment in the code to support media in GPU process
https://bugs.webkit.org/show_bug.cgi?id=205631

Patch by Peng Liu <Peng Liu> on 2019-12-29
Reviewed by Eric Carlson.

No new tests, no functional change.

Source/WebCore:

  • platform/graphics/MediaPlayerPrivate.h:

(WebCore::MediaPlayerPrivateInterface::platformLayer const):
(WebCore::MediaPlayerPrivateInterface::timedMetadata const):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata):

Source/WebKit:

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:

(WebKit::RemoteMediaPlayerManagerProxy::logChannel const):

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h:
  • WebProcess/GPU/GPUProcessConnectionInfo.h:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
  • WebProcess/GPU/media/MediaPlayerPrivateRemoteIdentifier.h:
  • WebProcess/GPU/media/RemoteMediaPlayerConfiguration.h:
  • WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:
  • WebProcess/GPU/media/RemoteMediaPlayerManager.messages.in:
  • WebProcess/GPU/media/RemoteMediaPlayerState.h:
1:55 PM Changeset in webkit [253940] by eric.carlson@apple.com
  • 5 edits in trunk/Source

Cleanup media IPC encoders
https://bugs.webkit.org/show_bug.cgi?id=205630
<rdar://problem/58232173>

Reviewed by Anders Carlsson.

Source/WebCore:

No new tests, no functional change.

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaEngineSupportParameters::decode):

Source/WebKit:

  • GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h:

(WebKit::RemoteMediaPlayerProxyConfiguration::decode):

  • WebProcess/GPU/media/RemoteMediaPlayerConfiguration.h:

(WebKit::RemoteMediaPlayerConfiguration::decode):

1:43 PM Changeset in webkit [253939] by dino@apple.com
  • 35 edits
    2 adds
    2 deletes in trunk

[WebGL] Add a pure virtual base class for GraphicsContext3D
https://bugs.webkit.org/show_bug.cgi?id=205604

Reviewed by Sam Weinig.

Source/WebCore:

This is the first step in a series of patches to allow multiple versions
of GraphicsContext3D to exist, each using a different backend rendering
system. I've added a GraphicsContext3DBase class (that will eventually
be named GraphicsContext3D) holding all the WebGL entry points as well
as some common helper functions.

I also took the chance to move some enums into enum classes, which
makes it more obvious where things come from. I also removed some
unused interfaces: WebGLRenderingContextErrorMessageCallback and
WebGLRenderingContextLostMessageCallback.

The existing GraphicsContext3D now inherits from the base class,
but is otherwise nearly identical. The next step will be to make
different instances rather than the mix of #if macros we have now.
The virtual functions are marked "override" for now, but will become
"final" in the instances.

There should be no change in functionality.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • html/canvas/WebGLProgram.cpp:

(WebCore::WebGLProgram::cacheActiveAttribLocations):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::initializeNewContext):
(WebCore::WebGLRenderingContextBase::destroyGraphicsContext3D):
(WebCore::WebGLRenderingContextBase::getActiveAttrib):
(WebCore::WebGLRenderingContextBase::getActiveUniform):
(WebCore::WebGLRenderingContextBase::getContextAttributes):
(WebCore::WebGLRenderingContextBase::getUniformLocation):
(WebCore::WebGLRenderingContextBase::texImage2DImpl):
(WebCore::WebGLRenderingContextBase::texSubImage2DImpl):
(WebCore::WebGLRenderingContextBase::texSubImage2D):
(WebCore::WebGLRenderingContextBase::texImage2D):
(WebCore::WebGLRenderingContextBase::isTexInternalFormatColorBufferCombinationValid):
(WebCore::WebGLRenderingContextLostCallback::WebGLRenderingContextLostCallback): Deleted.
(WebCore::WebGLRenderingContextErrorMessageCallback::WebGLRenderingContextErrorMessageCallback): Deleted.

  • html/canvas/WebGLRenderingContextBase.h:
  • platform/graphics/FormatConverter.cpp:

(WebCore::uint8_t>):
(WebCore::float>):
(WebCore::uint16_t>):
(WebCore::FormatConverter::convert):

  • platform/graphics/GraphicsContext3D.cpp:

(WebCore::GraphicsContext3D::ImageExtractor::ImageExtractor):
(WebCore::GraphicsContext3D::extractImageData):
(WebCore::GraphicsContext3D::extractTextureData):
(WebCore::TexelBytesForFormat):
(WebCore::GraphicsContext3D::packPixels):
(WebCore::GraphicsContext3D::getClearBitsByAttachmentType): Deleted.
(WebCore::GraphicsContext3D::getClearBitsByFormat): Deleted.
(WebCore::GraphicsContext3D::getChannelBitsByFormat): Deleted.

  • platform/graphics/GraphicsContext3D.h:

(WebCore::GraphicsContext3D::ImageExtractor::imageHtmlDomSource):
(WebCore::GraphicsContext3D::platformGraphicsContext3D const): Deleted.
(WebCore::GraphicsContext3D::platformTexture const): Deleted.
(WebCore::GraphicsContext3D::platformLayer const): Deleted.
(WebCore::GraphicsContext3D::hasAlpha): Deleted.
(WebCore::GraphicsContext3D::hasColor): Deleted.
(WebCore::GraphicsContext3D::srcFormatComesFromDOMElementOrImageData): Deleted.

  • platform/graphics/GraphicsTypes3D.h:
  • platform/graphics/angle/GraphicsContext3DANGLE.cpp:

(WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
(WebCore::GraphicsContext3D::reshapeFBOs):
(WebCore::GraphicsContext3D::attachDepthAndStencilBufferIfNeeded):
(WebCore::GraphicsContext3D::readPixels):
(WebCore::GraphicsContext3D::validateDepthStencil):
(WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
(WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
(WebCore::GraphicsContext3D::prepareTexture):
(WebCore::GraphicsContext3D::readRenderingResults):
(WebCore::GraphicsContext3D::reshape):
(WebCore::GraphicsContext3D::bindFramebuffer):
(WebCore::GraphicsContext3D::copyTexImage2D):
(WebCore::GraphicsContext3D::copyTexSubImage2D):
(WebCore::GraphicsContext3D::getContextAttributes): Deleted.

  • platform/graphics/cg/GraphicsContext3DCG.cpp:

(WebCore::getSourceDataFormat):
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):

  • platform/graphics/cocoa/GraphicsContext3DCocoa.mm:

(WebCore::GraphicsContext3D::create):
(WebCore::GraphicsContext3D::createShared):
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
(WebCore::GraphicsContext3D::setRenderbufferStorageFromDrawable):
(WebCore::GraphicsContext3D::makeContextCurrent):
(WebCore::GraphicsContext3D::checkGPUStatus):
(WebCore::GraphicsContext3D::presentRenderbuffer):
(WebCore::GraphicsContext3D::texImageIOSurface2D):
(WebCore::GraphicsContext3D::allocateIOSurfaceBackingStore):
(WebCore::GraphicsContext3D::updateCGLContext):
(WebCore::GraphicsContext3D::screenDidChange):
(WebCore::GraphicsContext3D::setContextLostCallback): Deleted.
(WebCore::GraphicsContext3D::setErrorMessageCallback): Deleted.

  • platform/graphics/cocoa/WebGLLayer.mm:

(-[WebGLLayer initWithGraphicsContext3D:]):
(-[WebGLLayer copyImageSnapshotWithColorSpace:]):
(-[WebGLLayer bindFramebufferToNextAvailableSurface]):

  • platform/graphics/cv/TextureCacheCV.mm:

(WebCore::TextureCacheCV::create):

  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:

(WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
(WebCore::GraphicsContext3D::reshapeFBOs):
(WebCore::GraphicsContext3D::attachDepthAndStencilBufferIfNeeded):
(WebCore::GraphicsContext3D::readPixels):

  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::validateDepthStencil):
(WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
(WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
(WebCore::GraphicsContext3D::prepareTexture):
(WebCore::GraphicsContext3D::readRenderingResults):
(WebCore::GraphicsContext3D::reshape):
(WebCore::GraphicsContext3D::bindFramebuffer):
(WebCore::GraphicsContext3D::copyTexImage2D):
(WebCore::GraphicsContext3D::copyTexSubImage2D):
(WebCore::GraphicsContext3D::getContextAttributes): Deleted.

LayoutTests:

Remove a test that has existing coverage in the WebGL test suite.

  • fast/canvas/webgl/framebuffer-object-attachment-expected.txt: Removed.
  • fast/canvas/webgl/framebuffer-object-attachment.html: Removed.
11:33 AM Changeset in webkit [253938] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Implement LineBuilder::revert
https://bugs.webkit.org/show_bug.cgi?id=205629
<rdar://problem/58231425>

Reviewed by Antti Koivisto.

LineBuilder::revert simply removes trailing runs, shrinks the line and rebuilds the collapsible content.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::HangingContent::width const):
(WebCore::Layout::HangingContent::isConditional const):
(WebCore::Layout::HangingContent::setIsConditional):
(WebCore::Layout::HangingContent::expand):
(WebCore::Layout::HangingContent::reset):
(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::close):
(WebCore::Layout::LineBuilder::revert):
(WebCore::Layout::LineBuilder::alignHorizontally):
(WebCore::Layout::LineBuilder::collectHangingContent):

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::InlineItemRun::operator== const):
(WebCore::Layout::LineBuilder::InlineItemRun::operator!= const):
(WebCore::Layout::LineBuilder::HangingContent::width const): Deleted. Remove m_hangingContent so that revert does not need to deal with it.
(WebCore::Layout::LineBuilder::HangingContent::isConditional const): Deleted.
(WebCore::Layout::LineBuilder::HangingContent::setIsConditional): Deleted.
(WebCore::Layout::LineBuilder::HangingContent::expand): Deleted.
(WebCore::Layout::LineBuilder::HangingContent::reset): Deleted.

10:28 AM Changeset in webkit [253937] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Add LineBreaker::Result::Revert to indicate an earlier line wrap opportunity
https://bugs.webkit.org/show_bug.cgi?id=205623
<rdar://problem/58228339>

Reviewed by Antti Koivisto.

See webkit.org/b/205613 for more info.

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::Result::Result):
(WebCore::Layout::LineBreaker::tryWrappingInlineContent const):

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

(WebCore::Layout::LineLayoutContext::checkForLineWrapAndCommit):

9:38 AM Changeset in webkit [253936] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

Make RuleSet refcounted
https://bugs.webkit.org/show_bug.cgi?id=205628
<rdar://problem/58231798>

Unreviewed folloup.

  • style/UserAgentStyle.cpp:

(WebCore::Style::UserAgentStyle::loadFullDefaultStyle):

Use deref instead of delete.

9:18 AM Changeset in webkit [253935] by Antti Koivisto
  • 10 edits in trunk/Source/WebCore

Make RuleSet refcounted
https://bugs.webkit.org/show_bug.cgi?id=205628

Reviewed by Zalan Bujtas.

For safety, and to support shared ownership.

Also convert a bunch of places that use raw RuleSet pointers to use Ref/RefPtr instead.

  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::collectMatchingAuthorRules):
(WebCore::Style::ElementRuleCollector::collectSlottedPseudoElementRulesForSlot):
(WebCore::Style::ElementRuleCollector::matchUserRules):

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

(WebCore::Style::RuleSet::evaluteDynamicMediaQueryRules):

  • style/RuleSet.h:

(WebCore::Style::RuleSet::create):
(WebCore::Style::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair): Deleted.

  • style/StyleInvalidator.cpp:

(WebCore::Style::Invalidator::Invalidator):
(WebCore::Style::Invalidator::collectRuleInformation):
(WebCore::Style::Invalidator::invalidateIfNeeded):
(WebCore::Style::Invalidator::addToMatchElementRuleSets):

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

(WebCore::Style::ScopeRuleSets::ScopeRuleSets):
(WebCore::Style::ScopeRuleSets::updateUserAgentMediaQueryStyleIfNeeded const):
(WebCore::Style::ScopeRuleSets::initializeUserStyle):
(WebCore::Style::makeRuleSet):
(WebCore::Style::ScopeRuleSets::resetAuthorStyle):
(WebCore::Style::ensureInvalidationRuleSets):

  • style/StyleScopeRuleSets.h:

(WebCore::Style::ScopeRuleSets::authorStyle const):

  • style/UserAgentStyle.cpp:

(WebCore::Style::UserAgentStyle::loadFullDefaultStyle):
(WebCore::Style::UserAgentStyle::loadSimpleDefaultStyle):

7:59 AM Changeset in webkit [253934] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Move soft wrap opportunity code out of LineBreaker
https://bugs.webkit.org/show_bug.cgi?id=205621
<rdar://problem/58227670>

Reviewed by Antti Koivisto.

Let's not mix soft and line wrap opportunity logic.

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::ContinousContent::runs const):
(WebCore::Layout::ContinousContent::isEmpty const):
(WebCore::Layout::ContinousContent::size const):
(WebCore::Layout::ContinousContent::width const):
(WebCore::Layout::ContinousContent::nonCollapsibleWidth const):
(WebCore::Layout::ContinousContent::hasTrailingCollapsibleContent const):
(WebCore::Layout::ContinousContent::isTrailingContentFullyCollapsible const):
(WebCore::Layout::LineBreaker::wrapTextContent const):
(WebCore::Layout::ContinousContent::ContinousContent):
(WebCore::Layout::ContinousContent::hasTextContentOnly const):
(WebCore::Layout::ContinousContent::isVisuallyEmptyWhitespaceContentOnly const):
(WebCore::Layout::ContinousContent::firstTextRunIndex const):
(WebCore::Layout::ContinousContent::lastContentRunIndex const):
(WebCore::Layout::ContinousContent::hasNonContentRunsOnly const):
(WebCore::Layout::ContinousContent::lastWrapOpportunityIndex const):
(WebCore::Layout::ContinousContent::TrailingCollapsibleContent::reset):
(WebCore::Layout::endsWithSoftWrapOpportunity): Deleted.
(WebCore::Layout::isAtSoftWrapOpportunity): Deleted.
(WebCore::Layout::LineBreaker::nextWrapOpportunity): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::ContinousContent): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::hasTextContentOnly const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::isVisuallyEmptyWhitespaceContentOnly const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::firstTextRunIndex const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::lastContentRunIndex const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::hasNonContentRunsOnly const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::lastWrapOpportunityIndex const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::TrailingCollapsibleContent::reset): Deleted.

  • layout/inlineformatting/InlineLineBreaker.h:

(WebCore::Layout::LineBreaker::ContinousContent::runs const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::isEmpty const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::size const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::width const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::nonCollapsibleWidth const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::hasTrailingCollapsibleContent const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::isTrailingContentFullyCollapsible const): Deleted.

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::endsWithSoftWrapOpportunity):
(WebCore::Layout::isAtSoftWrapOpportunity):
(WebCore::Layout::nextWrapOpportunity):
(WebCore::Layout::LineLayoutContext::nextContentForLine):

Dec 28, 2019:

11:01 PM Changeset in webkit [253933] by ysuzuki@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Unreviewed, rename .executable to .isExecutable
https://bugs.webkit.org/show_bug.cgi?id=205554

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
9:32 PM Changeset in webkit [253932] by ysuzuki@apple.com
  • 29 edits in trunk/Source/JavaScriptCore

[JSC] JSFunction's m_executable / m_rareData should be merged
https://bugs.webkit.org/show_bug.cgi?id=205554

Reviewed by Mark Lam.

This patch merges JSFunction::m_executable and JSFunction::m_rareData fields into one JSFunction::m_executableOrRareData field.
JSFunction is one of the most frequently allocated objects (e.g. it is common that anonymous JSFunction expression is used as a scope).
If we can save sizeof(JSFunction), we can get great savings in memory usage.

JSFunction::m_scope field is touched every time we execute this function. (op_get_scope, or obtaining JSGlobalObject for host functions).
On the other hand, m_executable field can be skipped if JSFunction call is cached by CallLinkInfo. So compared to JSFunction::m_scope,
this field is less frequently touched. So, we merge m_executable and m_rareData fields into one, m_executableOrRareData. When it holds
ExecutableBase*, we do nothing. But when we create FunctionRareData, we put ExecutableBase in FunctionRareData and store FunctionRareData
to JSFunction::m_executableOrRareData field with 0x1 flag.

This patch reduces sizeof(JSFunction) from 48 to 32.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewFunctionCommon):
(JSC::DFG::SpeculativeJIT::compileGetExecutable):
(JSC::DFG::SpeculativeJIT::compileCreateThis):
(JSC::DFG::SpeculativeJIT::compileCreatePromise):
(JSC::DFG::SpeculativeJIT::compileCreateInternalFieldObject):

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

(JSC::FTL::DFG::LowerDFGToB3::compileGetExecutable):
(JSC::FTL::DFG::LowerDFGToB3::compileNewFunction):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateThis):
(JSC::FTL::DFG::LowerDFGToB3::compileCreatePromise):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateInternalFieldObject):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_create_this):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_create_this):

  • jit/Repatch.cpp:

(JSC::linkPolymorphicCall):

  • jit/ThunkGenerators.cpp:

(JSC::virtualThunkFor):
(JSC::nativeForGenerator):
(JSC::boundFunctionCallGenerator):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/FunctionRareData.cpp:

(JSC::FunctionRareData::create):
(JSC::FunctionRareData::visitChildren):
(JSC::FunctionRareData::FunctionRareData):

  • runtime/FunctionRareData.h:
  • runtime/JSBoundFunction.cpp:

(JSC::JSBoundFunction::create):
(JSC::JSBoundFunction::JSBoundFunction):

  • runtime/JSBoundFunction.h:
  • runtime/JSCustomGetterSetterFunction.cpp:

(JSC::JSCustomGetterSetterFunction::JSCustomGetterSetterFunction):
(JSC::JSCustomGetterSetterFunction::create):

  • runtime/JSCustomGetterSetterFunction.h:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::create):
(JSC::JSFunction::createFunctionThatMasqueradesAsUndefined):
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::finishCreation):
(JSC::JSFunction::allocateRareData):
(JSC::JSFunction::allocateAndInitializeRareData):
(JSC::JSFunction::initializeRareData):
(JSC::JSFunction::visitChildren):
(JSC::JSFunction::put):
(JSC::JSFunction::defineOwnProperty):

  • runtime/JSFunction.h:

(JSC::JSFunction::executable const):
(JSC::JSFunction::offsetOfExecutableOrRareData):
(JSC::JSFunction::rareData):
(JSC::JSFunction::offsetOfExecutable): Deleted.
(JSC::JSFunction::offsetOfRareData): Deleted.

  • runtime/JSFunctionInlines.h:

(JSC::JSFunction::JSFunction):
(JSC::JSFunction::jsExecutable const):
(JSC::JSFunction::isHostFunction const):
(JSC::JSFunction::nativeFunction):
(JSC::JSFunction::nativeConstructor):
(JSC::JSFunction::hasReifiedLength const):
(JSC::JSFunction::hasReifiedName const):
(JSC::JSFunction::areNameAndLengthOriginal):
(JSC::JSFunction::ensureRareDataAndAllocationProfile):

  • runtime/JSNativeStdFunction.cpp:

(JSC::JSNativeStdFunction::JSNativeStdFunction):
(JSC::JSNativeStdFunction::create):

  • runtime/JSNativeStdFunction.h:
  • wasm/js/WebAssemblyFunction.cpp:

(JSC::WebAssemblyFunction::create):
(JSC::WebAssemblyFunction::WebAssemblyFunction):

  • wasm/js/WebAssemblyFunction.h:
  • wasm/js/WebAssemblyFunctionBase.cpp:

(JSC::WebAssemblyFunctionBase::WebAssemblyFunctionBase):

  • wasm/js/WebAssemblyFunctionBase.h:
  • wasm/js/WebAssemblyWrapperFunction.cpp:

(JSC::WebAssemblyWrapperFunction::WebAssemblyWrapperFunction):
(JSC::WebAssemblyWrapperFunction::create):

  • wasm/js/WebAssemblyWrapperFunction.h:
8:47 PM Changeset in webkit [253931] by ysuzuki@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

[JSC] StructureChain should hold vector of StructureID
https://bugs.webkit.org/show_bug.cgi?id=205592

Reviewed by Mark Lam.

StructureChain should keep vector of StructureID instead of Structure* to minimize the size of vector.

  • llint/LowLevelInterpreter64.asm:
  • runtime/JSPropertyNameEnumerator.h:

(JSC::propertyNameEnumerator):

  • runtime/ProxyObject.h:
  • runtime/Structure.cpp:

(JSC::Structure::canCachePropertyNameEnumerator const):

  • runtime/Structure.h:
  • runtime/StructureChain.cpp:

(JSC::StructureChain::StructureChain):
(JSC::StructureChain::create):
(JSC::StructureChain::finishCreation):
(JSC::StructureChain::visitChildren):

  • runtime/StructureChain.h:
  • runtime/StructureInlines.h:

(JSC::Structure::isValid const):

7:39 PM Changeset in webkit [253930] by commit-queue@webkit.org
  • 23 edits in trunk/Tools

Unreviewed, rolling out r253804.
https://bugs.webkit.org/show_bug.cgi?id=205622

Seeing strange test results after this change (Requested by ap
on #webkit).

Reverted changeset:

"Python 3: Add support to run-webkit-tests"
https://bugs.webkit.org/show_bug.cgi?id=205291
https://trac.webkit.org/changeset/253804

6:05 PM Changeset in webkit [253929] by Wenson Hsieh
  • 7 edits in trunk/Tools

[iOS] Layout tests sometimes throw an exception under checkForOutstandingCallbacks
https://bugs.webkit.org/show_bug.cgi?id=205612
<rdar://problem/57789693>

Reviewed by Tim Horton.

On iOS, layout tests that synthesize HID events but end before WebKitTestRunnerApp finishes dequeueing and
handling those events occasionally cause the next test to crash with an Objective-C exception under
UIScriptControllerIOS::checkForOutstandingCallbacks. This happens when UIScriptContext is destroyed after a HID
marker event is dispatched, but before that HID marker event has been handled. (For clarity, the HID marker
event is a special vendor-defined event used by HIDEventGenerator to signify the end of a series of synthesized
HID events that were previously dispatched to the application).

This is typically fixed by ensuring that all iOS layout tests always wait for synthesized HID events to finish
before ending the test (i.e. by calling testRunner.notifyDone()). However, some tests that fall into this
category are imported: e.g. dom/events/document-level-touchmove-event-listener-passive-by-default.html in
web-platform-tests/, which does not wait for the swipe gesture to finish before completing. This current causes
us to dispatch the end of the gesture while the following test (dom/events/event-disabled-dynamic.html) begins.

While I wasn't able to trivially reproduce the exception locally, it was consistently reproducible by forcing a
50 ms sleep in -[HIDEventGenerator sendMarkerHIDEventWithCompletionBlock:], right before queueing the marker
event. This suggests that the crash is timing-dependent, and just seems to occasionally reproduce more
frequently in internal automation.

This test seems to be passing reliably in other engines (e.g. Chrome and Edge), so instead of trying to fix the
test to always wait for events to finish dispatching, we can address the issue by teaching WebKitTestRunner to
simply wait for outgoing marker events to finish dispatching before proceeding with the next test, rather than
crashing. This should not only fix the crash, but also address sporadic flakiness that may result from tests
that handle synthetic HID events that were dispatched by the previous test.

  • TestRunnerShared/UIScriptContext/UIScriptContext.cpp:

(UIScriptContext::~UIScriptContext):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:

(WTR::UIScriptController::waitForOutstandingCallbacks):
(WTR::UIScriptController::checkForOutstandingCallbacks): Deleted.

Rename checkForOutstandingCallbacks to waitForOutstandingCallbacks, and make it wait up to a second for the
application to finish handling any outgoing marker HID event. In the event that the timeout is hit, we still
throw an Objective-C exception to avoid beginning the next test in an unpredictable state.

  • WebKitTestRunner/ios/HIDEventGenerator.h:
  • WebKitTestRunner/ios/HIDEventGenerator.mm:

(-[HIDEventGenerator init]):

Perform some minor cleanup here, by removing excess private category properties in HIDEventGenerator (including
-debugTouchViews, which was unused); also, change _eventCallbacks into a RetainPtr, so that we don't need to
worry about manually releasing it.

(-[HIDEventGenerator dealloc]): Deleted.
(-[HIDEventGenerator hasOutstandingCallbacks]):
(-[HIDEventGenerator checkForOutstandingCallbacks]): Deleted.

Rename -checkForOutstandingCallbacks to -hasOutstandingCallbacks, and flip the return result.

  • WebKitTestRunner/ios/UIScriptControllerIOS.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptControllerIOS::waitForOutstandingCallbacks):
(WTR::UIScriptControllerIOS::checkForOutstandingCallbacks): Deleted.

4:19 PM Changeset in webkit [253928] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Keep track of last line wrap opportunity
https://bugs.webkit.org/show_bug.cgi?id=205619
<rdar://problem/58227112>

Reviewed by Antti Koivisto.

This is in preparation for being able to revert back to an earlier position
of the current line as the line wrapping opportunity.
(actually the m_lastWrapOpportunity is already taken into use at LineBreaker::wordBreakBehavior)

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::shouldKeepBeginningOfLineWhitespace):
(WebCore::Layout::LineBreaker::shouldWrapInlineContent):
(WebCore::Layout::LineBreaker::shouldWrapFloatBox):
(WebCore::Layout::LineBreaker::tryWrappingInlineContent const):
(WebCore::Layout::LineBreaker::wrapTextContent const):
(WebCore::Layout::LineBreaker::wordBreakBehavior const):
(WebCore::Layout::LineBreaker::tryBreakingTextRun const):
(WebCore::Layout::LineBreaker::ContinousContent::lastWrapOpportunityIndex const):

  • layout/inlineformatting/InlineLineBreaker.h:
1:42 PM Changeset in webkit [253927] by Antti Koivisto
  • 6 edits in trunk/Tools

Allow disabling internal and experimental features in run-webkit-tests
https://bugs.webkit.org/show_bug.cgi?id=205614

Reviewed by Tim Horton.

Add an optional true/false parameter to --internal-feature/--experimental-feature options.
This can be useful for isolating problems in features that are enabled by default. Example:

--internal-feature LayoutFormattingContextIntegrationEnabled=false

The [=true|false] syntax is the same as used in test headers.

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(parse_args):

  • WebKitTestRunner/Options.cpp:

(WTR::parseFeature):
(WTR::handleOptionExperimentalFeature):
(WTR::handleOptionInternalFeature):

  • WebKitTestRunner/Options.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::testOptionsForTest const):

  • WebKitTestRunner/TestController.h:
12:16 PM Changeset in webkit [253926] by dino@apple.com
  • 85 edits
    18 deletes in trunk

[WebGL] Enable ANGLE by default for Cocoa platforms (except simulator)
https://bugs.webkit.org/show_bug.cgi?id=205483
rdar://56925821

Reviewed by Simon Fraser.

Source/ThirdParty/ANGLE:

Export entry_points_gles_ext_autogen.h.

  • ANGLE.xcodeproj/project.pbxproj:

Source/WebCore:

Log an error rather than asserting.

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::getBufferSubData):

Source/WTF:

Turn USE_ANGLE on for Cocoa, with the exception of the simulator.

  • wtf/Platform.h:

LayoutTests:

Remove some tests that are better covered in the official test
suite which we already have in the repository.

Rebaseline a bunch of tests which we now pass. Yay!

Rebaseline a small number of regressions, which will be fixed
in a follow-up.

  • fast/canvas/webgl/angle-instanced-arrays-expected.txt: Removed.
  • fast/canvas/webgl/angle-instanced-arrays-out-of-bounds-expected.txt: Removed.
  • fast/canvas/webgl/angle-instanced-arrays-out-of-bounds.html: Removed.
  • fast/canvas/webgl/angle-instanced-arrays.html: Removed.
  • fast/canvas/webgl/array-bounds-clamping-expected.txt:
  • fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias-expected.txt: Removed.
  • fast/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html: Removed.
  • fast/canvas/webgl/copy-tex-image-and-sub-image-2d-bad-input-expected.txt:
  • fast/canvas/webgl/draw-elements-out-of-bounds-uint-index-expected.txt:
  • fast/canvas/webgl/drawElements-empty-vertex-data-expected.txt:
  • fast/canvas/webgl/glsl-conformance-expected.txt: Removed.
  • fast/canvas/webgl/glsl-conformance.html: Removed.
  • fast/canvas/webgl/oes-texture-half-float-expected.txt: Removed.
  • fast/canvas/webgl/oes-texture-half-float-linear-expected.txt: Removed.
  • fast/canvas/webgl/oes-texture-half-float-linear.html: Removed.
  • fast/canvas/webgl/oes-texture-half-float-with-canvas-expected.txt: Removed.
  • fast/canvas/webgl/oes-texture-half-float-with-canvas.html: Removed.
  • fast/canvas/webgl/oes-texture-half-float-with-image-expected.txt: Removed.
  • fast/canvas/webgl/oes-texture-half-float-with-image.html: Removed.
  • fast/canvas/webgl/oes-texture-half-float-with-video-expected.txt: Removed.
  • fast/canvas/webgl/oes-texture-half-float-with-video.html: Removed.
  • fast/canvas/webgl/oes-texture-half-float.html: Removed.
  • fast/canvas/webgl/readPixels-float-expected.txt:
  • fast/canvas/webgl/vertexAttribPointer-with-bad-offset-expected.txt:
  • fast/canvas/webgl/webgl-drawarrays-crash-2-expected.txt:
  • fast/canvas/webgl/webgl-drawarrays-crash-expected.txt:
  • fast/canvas/webgl/webgl2-texture-upload-enums-expected.txt:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
  • webgl/1.0.3/conformance/extensions/get-extension-expected.txt:
  • webgl/1.0.3/conformance/extensions/oes-texture-float-expected.txt:
  • webgl/1.0.3/conformance/extensions/oes-texture-half-float-expected.txt:
  • webgl/1.0.3/conformance/glsl/bugs/nested-functions-should-not-crash-expected.txt:
  • webgl/1.0.3/conformance/glsl/misc/shader-struct-scope-expected.txt:
  • webgl/1.0.3/conformance/glsl/misc/shaders-with-invariance-expected.txt:
  • webgl/1.0.3/conformance/glsl/misc/shaders-with-name-conflicts-expected.txt:
  • webgl/1.0.3/conformance/misc/type-conversion-test-expected.txt:
  • webgl/1.0.3/conformance/misc/webgl-specific-expected.txt:
  • webgl/1.0.3/conformance/rendering/point-no-attributes-expected.txt:
  • webgl/1.0.3/conformance/textures/texture-copying-feedback-loops-expected.txt:
  • webgl/2.0.0/conformance/context/context-lost-restored-expected.txt:
  • webgl/2.0.0/conformance/extensions/ext-sRGB-expected.txt:
  • webgl/2.0.0/conformance/extensions/get-extension-expected.txt:
  • webgl/2.0.0/conformance/extensions/oes-texture-float-expected.txt:
  • webgl/2.0.0/conformance/extensions/oes-texture-half-float-expected.txt:
  • webgl/2.0.0/conformance/extensions/oes-vertex-array-object-expected.txt:
  • webgl/2.0.0/conformance/extensions/webgl-depth-texture-expected.txt:
  • webgl/2.0.0/conformance/extensions/webgl-draw-buffers-framebuffer-unsupported-expected.txt:
  • webgl/2.0.0/conformance/glsl/bugs/compound-assignment-type-combination-expected.txt:
  • webgl/2.0.0/conformance/glsl/bugs/nested-functions-should-not-crash-expected.txt:
  • webgl/2.0.0/conformance/glsl/constructors/glsl-construct-ivec2-expected.txt:
  • webgl/2.0.0/conformance/glsl/constructors/glsl-construct-mat2-expected.txt:
  • webgl/2.0.0/conformance/glsl/constructors/glsl-construct-mat3-expected.txt:
  • webgl/2.0.0/conformance/glsl/constructors/glsl-construct-vec2-expected.txt:
  • webgl/2.0.0/conformance/glsl/implicit/less_than.vert-expected.txt:
  • webgl/2.0.0/conformance/glsl/misc/global-variable-init-expected.txt:
  • webgl/2.0.0/conformance/glsl/misc/shader-struct-scope-expected.txt:
  • webgl/2.0.0/conformance/glsl/misc/shader-with-conditional-scoping-negative-expected.txt:
  • webgl/2.0.0/conformance/glsl/misc/shaders-with-invariance-expected.txt:
  • webgl/2.0.0/conformance/glsl/misc/shaders-with-name-conflicts-expected.txt:
  • webgl/2.0.0/conformance/glsl/misc/struct-unary-operators-expected.txt:
  • webgl/2.0.0/conformance/limits/gl-line-width-expected.txt:
  • webgl/2.0.0/conformance/misc/type-conversion-test-expected.txt:
  • webgl/2.0.0/conformance/misc/webgl-specific-expected.txt:
  • webgl/2.0.0/conformance/ogles/GL/biuDepthRange/biuDepthRange_001_to_002-expected.txt:
  • webgl/2.0.0/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_001_to_003-expected.txt:
  • webgl/2.0.0/conformance/reading/read-pixels-test-expected.txt:
  • webgl/2.0.0/conformance/renderbuffers/framebuffer-object-attachment-expected.txt:
  • webgl/2.0.0/conformance/rendering/point-no-attributes-expected.txt:
  • webgl/2.0.0/conformance/textures/misc/cube-incomplete-fbo-expected.txt:
  • webgl/2.0.0/conformance/textures/misc/texture-copying-feedback-loops-expected.txt:
  • webgl/2.0.0/conformance2/buffers/get-buffer-sub-data-expected.txt:
  • webgl/2.0.0/conformance2/buffers/one-large-uniform-buffer-expected.txt:
  • webgl/2.0.0/conformance2/context/context-attributes-depth-stencil-antialias-obeyed-expected.txt:
  • webgl/2.0.0/conformance2/extensions/ext-color-buffer-float-expected.txt:
  • webgl/2.0.0/conformance2/extensions/promoted-extensions-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/compound-assignment-type-combination-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/shader-linking-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/shader-with-1024-character-identifier.frag-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/shader-with-invalid-characters-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/shader-with-mis-matching-uniform-block-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/valid-invariant-expected.txt:
  • webgl/2.0.0/conformance2/renderbuffers/invalidate-framebuffer-expected.txt:
  • webgl/2.0.0/conformance2/renderbuffers/multisample-with-full-sample-counts-expected.txt:
  • webgl/2.0.0/conformance2/renderbuffers/multisampled-renderbuffer-initialization-expected.txt:
  • webgl/2.0.0/conformance2/rendering/attrib-type-match-expected.txt:
  • webgl/2.0.0/conformance2/rendering/blitframebuffer-test-expected.txt:
  • webgl/2.0.0/conformance2/rendering/clear-func-buffer-type-match-expected.txt:
  • webgl/2.0.0/conformance2/rendering/clear-srgb-color-buffer-expected.txt:
  • webgl/2.0.0/conformance2/rendering/clipping-wide-points-expected.txt:
  • webgl/2.0.0/conformance2/rendering/framebuffer-unsupported-expected.txt:
  • webgl/2.0.0/conformance2/rendering/fs-color-type-mismatch-color-buffer-type-expected.txt:
  • webgl/2.0.0/conformance2/rendering/instanced-arrays-expected.txt:
  • webgl/2.0.0/conformance2/rendering/instanced-rendering-bug-expected.txt:
  • webgl/2.0.0/conformance2/rendering/rendering-sampling-feedback-loop-expected.txt:
  • webgl/2.0.0/conformance2/rendering/rgb-format-support-expected.txt:
  • webgl/2.0.0/conformance2/state/gl-get-calls-expected.txt:
  • webgl/2.0.0/conformance2/textures/misc/copy-texture-image-expected.txt:
  • webgl/2.0.0/conformance2/textures/misc/tex-image-with-bad-args-expected.txt:
  • webgl/2.0.0/conformance2/textures/misc/tex-mipmap-levels-expected.txt:
  • webgl/2.0.0/conformance2/textures/misc/tex-new-formats-expected.txt:
  • webgl/2.0.0/conformance2/textures/misc/tex-storage-2d-expected.txt:
  • webgl/2.0.0/conformance2/textures/misc/texture-npot-expected.txt:
  • webgl/2.0.0/conformance2/transform_feedback/unwritten-output-defaults-to-zero-expected.txt:
  • webgl/2.0.0/conformance2/vertex_arrays/vertex-array-object-expected.txt:
9:13 AM Changeset in webkit [253925] by Antti Koivisto
  • 2 edits in trunk/Source/WebKit

Make simple line layout an internal feature
https://bugs.webkit.org/show_bug.cgi?id=205615

Reviewed by Zalan Bujtas.

So it can be enabled/disabled from run-webkit-tests command line.

This also adds it to the internal feature menus, allowing removal of hardcoded menu entries.

  • Shared/WebPreferences.yaml:
8:07 AM Changeset in webkit [253924] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Keep the LineBreaker object around until after the line is closed.
https://bugs.webkit.org/show_bug.cgi?id=205613
<rdar://problem/58222870>

Reviewed by Antti Koivisto.

In order to be able to point back to an earlier line wrap opportunity on the line e.g.
<div style="white-space: pre"><span style="white-space: normal">earlier_wrap opportunities</span> <span>can't_wrap_this content</span></div>
the LineBreaker class needs more context.
Currently (taking the example above), if the available space runs out somewhere around the second <span> we would just simply
overflow the line since the overflowing content has a style saying "do not wrap".
However the line has multiple earlier wrap opportunities inside the first <span>.
Since we construct a LineBreaker object for each continuous run

  1. [container start][earlier_wrap]
  2. [ ]
  3. [opportunities][container end]
  4. [ ]
  5. [container start][can't_wrap_this]
  6. [ ]
  7. [content][container end]

the LineBreaker does not have enough context to point back to the last line wrap opportunity (after run #3).

This patch is in preparation for supporting such content.

  1. Rename couple of functions and structs
  2. Move the LineBreaker construction to LineLayoutContext::layoutLine so that we can keep it around for multiple set of runs.
  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::isContentWrappingAllowed):
(WebCore::Layout::isContentSplitAllowed):
(WebCore::Layout::LineBreaker::isTextContentWrappingAllowed const):
(WebCore::Layout::LineBreaker::shouldKeepEndOfLineWhitespace const):
(WebCore::Layout::LineBreaker::shouldWrapInlineContent):
(WebCore::Layout::isTextContentWrappingAllowed): Deleted.
(WebCore::Layout::shouldKeepEndOfLineWhitespace): Deleted.
(WebCore::Layout::LineBreaker::breakingContextForInlineContent): Deleted.

  • layout/inlineformatting/InlineLineBreaker.h:

(WebCore::Layout::LineBreaker::setHyphenationDisabled):

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::isLineConsideredEmpty):
(WebCore::Layout::LineLayoutContext::layoutLine):
(WebCore::Layout::LineLayoutContext::checkForLineWrapAndCommit):
(WebCore::Layout::LineLayoutContext::commitContent):
(WebCore::Layout::LineLayoutContext::placeInlineContentOnCurrentLine): Deleted.

  • layout/inlineformatting/LineLayoutContext.h:

Dec 27, 2019:

9:58 AM Changeset in webkit [253923] by Darin Adler
  • 32 edits
    1 delete in trunk/Source

Refactor to simplify broadcasting to all media elements
https://bugs.webkit.org/show_bug.cgi?id=205567

Reviewed by Eric Carlson.

Source/WebCore:

Over time, we have accumulated many different sets of all the media elements.
With the goal of being a bit abstract and not building too much behavior into
the Document object, we ended up with unnecessary complexity, and many sets
of all the HTMLMediaElement objects. This is a first cut at reducing that complexity.
At the same time, the refactoring makes all the iteration use a safe algorithm that
builds a vector of Ref<HTMLMediaElement>, safe even if the work done for each
media element calls out to arbitrary DOM operations.

Separately, this patch also includes some name changes that still say "atomic"
instead of "atom" left over from our renaming of AtomicString to AtomString.

  • Headers.cmake: Removed ApplicationStateChangeListener.h.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • css/StyleSheetContents.cpp:

(WebCore::StyleSheetContents::estimatedSizeInBytes const): Reworded comment to
say "atom".

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::getElementsByName): Updated for "atomic" -> "atom".
(WebCore::ContainerNode::radioNodeList): Ditto.

  • dom/Document.cpp:

(WebCore::Document::visibilityStateChanged): Moved the code from
the notifyMediaCaptureOfVisibilityChanged in here. No need for a separate
function for the two lines of code.
(WebCore::Document::registerMediaElement): Added. Replaces the multiple registrations
that each media element would do.
(WebCore::Document::unregisterMediaElement): Ditto.
(WebCore::Document::forEachMediaElement): Added. Safely iterates the media elements
and calls a function on each of them.
(WebCore::Document::registerForAllowsMediaDocumentInlinePlaybackChangedCallbacks): Deleted.
(WebCore::Document::unregisterForAllowsMediaDocumentInlinePlaybackChangedCallbacks): Deleted.
(WebCore::Document::allowsMediaDocumentInlinePlaybackChanged): Deleted.
(WebCore::Document::mediaVolumeDidChange): Deleted.
(WebCore::Document::registerForMediaVolumeCallbacks): Deleted.
(WebCore::Document::unregisterForMediaVolumeCallbacks): Deleted.
(WebCore::Document::privateBrowsingStateDidChange): Use forEachMediaElement to call
privateBrowsingStateDidChange on each media element rather than keeping a separate registry.
(WebCore::Document::registerForPrivateBrowsingStateChangedCallbacks): Deleted.
(WebCore::Document::unregisterForPrivateBrowsingStateChangedCallbacks): Deleted.
(WebCore::Document::registerForCaptionPreferencesChangedCallbacks): Updated the type
to be HTMLMediaElement rather than just Element.
(WebCore::Document::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
(WebCore::Document::registerForPageScaleFactorChangedCallbacks): Deleted.
(WebCore::Document::unregisterForPageScaleFactorChangedCallbacks): Deleted.
(WebCore::Document::pageScaleFactorChangedAndStable): Deleted.
(WebCore::Document::registerForUserInterfaceLayoutDirectionChangedCallbacks): Deleted.
(WebCore::Document::unregisterForUserInterfaceLayoutDirectionChangedCallbacks): Deleted.
(WebCore::Document::userInterfaceLayoutDirectionChanged): Deleted.
(WebCore::Document::notifyMediaCaptureOfVisibilityChanged): Deleted.
(WebCore::Document::registerForMediaStreamStateChangeCallbacks): Deleted.
(WebCore::Document::unregisterForMediaStreamStateChangeCallbacks): Deleted.
(WebCore::Document::mediaStreamCaptureStateChanged): Use forEachMediaElement to call
mediaStreamCaptureStarted on each media element rather than keeping a separate registry.
(WebCore::Document::addApplicationStateChangeListener): Deleted.
(WebCore::Document::removeApplicationStateChangeListener): Deleted.
(WebCore::Document::forEachApplicationStateChangeListener): Deleted.

  • dom/Document.h: Clean up forward declarations a bit. Updated for above changes,

removing many function and data members.

  • dom/Element.cpp:

(WebCore::Element::spellcheckAttributeState const): Deleted.
(WebCore::Element::isSpellCheckingEnabled const): Refactored to merge in the logic
from the spellcheckAttributeState function. The combined function is both a bit easier
to understand and smaller than the two functions were.

  • dom/Element.h: Removed some unneeded includes. Removed SpellcheckAttributeState.

Made fastAttributeLookupAllowed private. Removed mediaVolumeDidChange,
privateBrowsingStateDidChange, captionPreferencesChanged, and spellcheckAttributeState.

  • dom/FullscreenManager.cpp: Removed unneeded includes.

(WebCore::FullscreenManager::willEnterFullscreen): Use is<HTMLMediaElement> instead of
calling isMediaElement directly.

  • dom/NameNodeList.cpp:

(WebCore::NameNodeList::~NameNodeList): Updated for "atomic" -> "atom".

  • dom/Node.cpp:

(WebCore::NodeListsNodeData::invalidateCaches): Ditto.
(WebCore::NodeListsNodeData::invalidateCachesForAttribute): Ditto.

  • dom/NodeRareData.h: Removed unneeded includes. Updated for "atomic" -> "atom".

Made a few coding style tweaks.

  • dom/TreeScope.cpp:

(WebCore::TreeScope::getElementById const): Updated for "atomic" -> "atom".

  • html/HTMLMediaElement.cpp:

(WebCore::documentToElementSetMap): Deleted.
(WebCore::addElementToDocumentMap): Deleted.
(WebCore::removeElementFromDocumentMap): Deleted.
(WebCore::HTMLMediaElement::registerWithDocument): Added call to registerMediaElement,
removed eight now-obsolete registrations.
(WebCore::HTMLMediaElement::unregisterWithDocument): Ditto.
(WebCore::HTMLMediaElement::mediaVolumeDidChange): Added an #if !PLATFORM(IOS_FAMILY)
to preserve the current behavior, since this was not registered for PLATFORM(IOS_FAMILY)
before. This should be revisited because it's not clear this platform difference is needed.
(WebCore::HTMLMediaElement::privateBrowsingStateDidChange): Ditto.
(WebCore::HTMLMediaElement::setMediaGroup): Change to use Document::forEachMediaElement
so we don't need to keep our own global set of media elements for each document. Required
a little bit of code structure change. Added a FIXME because the decision about which
media element is selected depends on hash table order as it always has; seems inappropriate.
(WebCore::HTMLMediaElement::setMediaControlsDependOnPageScaleFactor): Removed the code
to register/unregister.
(WebCore::HTMLMediaElement::pageScaleFactorChanged): Only do the work if it's needed;
this replicates the old behavior which was accomplished by registering/unregistering.

  • html/HTMLMediaElement.h: Removed the overrides for various virtual member functions.

Instead these are now public functions. Also removed ApplicationStateChangeListener.

  • html/LabelableElement.cpp:

(WebCore::LabelableElement::labels): Updated for "atomic" -> "atom".

  • html/LabelsNodeList.cpp:

(WebCore::LabelsNodeList::~LabelsNodeList): Ditto.

  • html/RadioNodeList.cpp:

(WebCore::RadioNodeList::~RadioNodeList): Ditto.

  • html/parser/HTMLDocumentParser.cpp:

(WebCore::HTMLDocumentParser::constructTreeFromHTMLToken): Ditto.

  • loader/appcache/ApplicationCacheStorage.cpp:

(WebCore::parseHeader): Ditto.

  • page/ApplicationStateChangeListener.h: Removed.
  • page/Page.cpp:

(WebCore::Page::renderTreeSize const): Use forEachDocument.
(WebCore::Page::setNeedsRecalcStyleInAllFrames): Ditto.
(WebCore::Page::unmarkAllTextMatches): Ditto.
(WebCore::Page::editableElementsInRect const): Ditto.
(WebCore::Page::setMediaVolume): Tweaked range check so it will reject
NaN values. Use forEachMediaElement to call mediaVolumeDidChange,
eliminating the need for Document::mediaVolumeDidChange.
(WebCore::Page::setPageScaleFactor): Refactored to eliminate large blocks
of repeated code. Use forEachMediaElement to call pageScaleFactorChanged,
eliminating the need for Document::pageScaleFactorChangedAndStable.
(WebCore::Page::setUserInterfaceLayoutDirection): Use forEachMediaElement
to call userInterfaceLayoutDirectionChanged, eliminating the need for
Document::userInterfaceLayoutDirectionChanged.
(WebCore::Page::updateMediaElementRateChangeRestrictions): Use
forEachMediaElement to call updateRateChangeRestrictionas. The old code
would call this on all media elements in the current web process, which
means the functions would be called many times for the same media element.
(WebCore::Page::updateRendering): Use forEachDocument consistently for
all the document iteration. Before it was used for half the function and not
used for the other half; no obvious reason for the differece.
(WebCore::Page::suspendScriptedAnimations): Use forEachDocument.
(WebCore::Page::resumeScriptedAnimations): Ditto.
(WebCore::updateScriptedAnimationsThrottlingReason): Ditto.
(WebCore::Page::userStyleSheetLocationChanged): Ditto.
(WebCore::Page::invalidateStylesForAllLinks): Ditto.
(WebCore::Page::invalidateStylesForLink): Ditto.
(WebCore::Page::invalidateInjectedStyleSheetCacheInAllFrames): Ditto.
(WebCore::Page::setTimerThrottlingState): Ditto.
(WebCore::Page::dnsPrefetchingStateChanged): Ditto.
(WebCore::Page::storageBlockingStateChanged): Ditto.
(WebCore::Page::updateIsPlayingMedia): Ditto.
(WebCore::Page::setMuted): Ditto.
(WebCore::Page::stopMediaCapture): Ditto.
(WebCore::Page::stopAllMediaPlayback): Ditto.
(WebCore::Page::suspendAllMediaPlayback): Ditto.
(WebCore::Page::resumeAllMediaPlayback): Ditto.
(WebCore::Page::suspendAllMediaBuffering): Ditto.
(WebCore::Page::resumeAllMediaBuffering): Ditto.
(WebCore::setSVGAnimationsState): Deleted.
(WebCore::Page::setIsVisibleInternal): Use forEachDocument to call
suspend/resumeDeviceMotionAndOrientationUpdates, obviating the need for
Page::suspend/resumeDeviceMotionAndOrientationUpdates. Use
forEachDocument to call pause/unpauseAnimations, obviating the need for
WebCore::setSVGAnimationsState. Use forEachDocument to call
visibilityStateChanged, removing the need to write out a loop that
gathers the documents into a vector.
(WebCore::Page::suspendDeviceMotionAndOrientationUpdates): Deleted.
(WebCore::Page::resumeDeviceMotionAndOrientationUpdates): Deleted.
(WebCore::Page::captionPreferencesChanged): Use forEachDocument.
(WebCore::Page::setSessionID): Ditto.
(WebCore::Page::setPlaybackTarget): Ditto.
(WebCore::Page::playbackTargetAvailabilityDidChange): Ditto.
(WebCore::Page::setShouldPlayToPlaybackTarget): Ditto.
(WebCore::Page::playbackTargetPickerWasDismissed): Ditto.
(WebCore::Page::setAllowsMediaDocumentInlinePlayback): Use
forEachMediaElement to call allowsMediaDocumentInlinePlaybackChanged,
obviating the need for Document::allowsMediaDocumentInlinePlaybackChanged.
(WebCore::Page::setUnobscuredSafeAreaInsets): Use forEachDocument.
(WebCore::Page::setUseSystemAppearance): Ditto.
(WebCore::Page::setFullscreenInsets): Ditto.
(WebCore::Page::setFullscreenAutoHideDuration): Ditto.
(WebCore::Page::setFullscreenControlsHidden): Ditto.
(WebCore::Page::forEachDocument): Merged the collectDocuments function
in since it's only used here.
(WebCore::Page::collectDocuments): Deleted.
(WebCore::Page::forEachMediaElement): Added.
(WebCore::Page::applicationWillResignActive): Use forEachMediaElement,
eliminating the need for forEachApplicationStateChangeListener.
(WebCore::Page::applicationDidBecomeActive): Ditto.
(WebCore::Page::recomputeTextAutoSizingInAllFrames): Use forEachDocument.

  • page/Page.h: Removed unneeded forward declarations. Removed unused

FindDirection enum. Tweaked formatting. Use bool instead of uint8_t as
underlying type for enum class with only two values. Updated for changes above.

  • platform/text/TextEncoding.cpp:

(WebCore::TextEncoding::TextEncoding): Updated for "atomic" -> "atom".
(WebCore::TextEncoding::domName const): Ditto.
(WebCore::TextEncoding::usesVisualOrdering const): Ditto.

  • platform/text/TextEncodingRegistry.cpp:

(WebCore::addToTextEncodingNameMap): Ditto.
(WebCore::addToTextCodecMap): Ditto.
(WebCore::pruneBlacklistedCodecs): Ditto.
(WebCore::addEncodingName): Ditto.
(WebCore::atomCanonicalTextEncodingName): Ditto.

  • platform/text/TextEncodingRegistry.h: Ditto.
  • xml/XPathFunctions.cpp:

(WebCore::XPath::atomicSubstring): Deleted.
(WebCore::XPath::toStringView): Added. Later could make a StringBuilder member
function instead.
(WebCore::XPath::FunId::evaluate const): Use toStringView and StringView::substring
instead of "atomicSubstring", since getElementById can be called on a StringView
and there's no need to allocate/deallocate an AtomString just to check if it exists.

Source/WebKit:

  • WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:

(WebKit::InjectedBundleHitTestResult::mediaType const): Use is<HTMLMediaElement>.

Source/WebKitLegacy/win:

  • AccessibleBase.cpp:

(AccessibleBase::get_attribute): Updated for "atomic" -> "atom".

8:09 AM Changeset in webkit [253922] by commit-queue@webkit.org
  • 5 edits
    11 moves
    6 adds
    5 deletes in trunk/LayoutTests

LayoutTests/imported/w3c:
[css-grid] Move some alignment tests to the WPT folder and add width-keyword-classes.css
https://bugs.webkit.org/show_bug.cgi?id=204407

Patch by Rossana Monteriso <rmonteriso@igalia.com> on 2019-12-27
Reviewed by Javier Fernandez.

Add some css alignment tests from WebKit, checked and adapted to WPT, in the corresponding css-grid/alignment folder.
Add width-keyword-classes.css support file to css/support, to make it easily available to all css tests.

  • resources/import-expectations.json:
  • web-platform-tests/css/css-grid/alignment/grid-align-content.html:
  • web-platform-tests/css/css-grid/alignment/grid-align-content-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-margin-border-padding-vertical-lr.html:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-margin-border-padding-vertical-lr-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-margin-border-padding-vertical-rl.html:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-margin-border-padding-vertical-rl-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-margin-border-padding.html:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-margin-border-padding-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-overflow.html:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-overflow-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-stretch-with-orthogonal-flows.html:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-stretch-with-orthogonal-flows-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-stretch.html:
  • web-platform-tests/css/css-grid/alignment/grid-align-justify-stretch-expected.txt:
  • web-platform-tests/css/css-grid/alignment/grid-align.html:
  • web-platform-tests/css/css-grid/alignment/grid-align-expected.txt:
  • web-platform-tests/css/css-grid/alignment/w3c-import.log:
  • web-platform-tests/css/support/width-keyword-classes.css:

LayoutTests:
[css-grid] Move some alignment tests to the WPT folder
https://bugs.webkit.org/show_bug.cgi?id=204407

Patch by Rossana Monteriso <rmonteriso@igalia.com> on 2019-12-27
Reviewed by Javier Fernandez.

Remove some tests from fast/css-grid/alignment, that are being replaced by adapted tests in the corresponding WPT test folder.

  • fast/css-grid-layout/grid-align-content-expected.txt: Removed.
  • fast/css-grid-layout/grid-align-expected.txt: Removed.
  • fast/css-grid-layout/grid-align-justify-margin-border-padding-expected.txt: Removed.
  • fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-lr-expected.txt: Removed.
  • fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-rl-expected.txt: Removed.
  • fast/css-grid-layout/grid-align-justify-overflow-expected.txt: Removed.
  • fast/css-grid-layout/grid-align-justify-stretch-expected.txt: Removed.
  • fast/css-grid-layout/grid-align-justify-stretch-with-orthogonal-flows-expected.txt: Removed.
  • fast/css-grid-layout/grid-align-justify-stretch-with-orthogonal-flows.html: Removed.
  • fast/css-grid-layout/grid-align-content.html: Removed.
  • fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-lr.html: Removed.
  • fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-rl.html: Removed.
  • fast/css-grid-layout/grid-align-justify-margin-border-padding.html: Removed.
  • fast/css-grid-layout/grid-align-justify-overflow.html: Removed.
  • fast/css-grid-layout/grid-align-justify-stretch-with-orthogonal-flows.html: Removed.
  • fast/css-grid-layout/grid-align-justify-stretch.html: Removed.
  • fast/css-grid-layout/grid-align.html: Removed.
  • resources/import-expectations.json:
  • web-platform-tests/css/css-grid/alignment/w3c-import.log:
7:22 AM Changeset in webkit [253921] by Antti Koivisto
  • 4 edits in trunk/Source/WebCore

[LFC][Integration] Ensure layout boxes have expected display types
https://bugs.webkit.org/show_bug.cgi?id=205606

Reviewed by Zalan Bujtas.

In some cases render tree may have display property values that don't match the renderer type. This is fine since the behavior is driven by the renderer.

LFC layout is driven by display property so the effective value needs to make sense. This patch fixes assertions seen in

fast/css/fieldset-display-row.html
fast/css-grid-layout/grid-strict-ordering-crash-2.html
imported/w3c/web-platform-tests/css/css-display/display-flow-root-001.html
imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-display.html
tables/mozilla/bugs/bug275625.html

  • layout/integration/LayoutIntegrationLineLayout.cpp:

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

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::buildLayoutTreeForIntegration):

Always set display to 'block' for the root RenderBlockFlow.
Renamed for clarity.

(WebCore::Layout::TreeBuilder::createLayoutBox):

Always set <br> display to inline.

(WebCore::Layout::TreeBuilder::buildTableStructure):
(WebCore::Layout::TreeBuilder::buildSubTree):

Pass the parent container instead of parent renderer so we can read effective style.

  • layout/layouttree/LayoutTreeBuilder.h:
6:13 AM Changeset in webkit [253920] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Fix LayoutTests/fast/backgrounds/size/backgroundSize15.html
https://bugs.webkit.org/show_bug.cgi?id=205602
<rdar://problem/58212499>

Reviewed by Antti Koivisto.

softWrapOpportunityIndex could point after the last inline item in the list (when there's no more wrap opportunity)
e.g text<br> : the softWrapOpportunityIndex is 2.

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::LineLayoutContext::nextContentForLine):

2:50 AM Changeset in webkit [253919] by commit-queue@webkit.org
  • 8 edits
    3 deletes in trunk

ANGLE: Fix WebGL conformance tests for EXT_texture_filter_anisotropic
https://bugs.webkit.org/show_bug.cgi?id=205520

Fixes get-extension.html and ext-texture-filter-anisotropic.html.

Patch by James Darpinian <James Darpinian> on 2019-12-27
Reviewed by Dean Jackson.

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::getExtension):
(WebCore::WebGL2RenderingContext::getSupportedExtensions):
(WebCore::WebGL2RenderingContext::getParameter):

  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::getExtension):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::getTexParameter):

12:49 AM Changeset in webkit [253918] by commit-queue@webkit.org
  • 6 edits
    4 deletes in trunk

ANGLE: Fix WebGL conformance test framebuffer-object-attachment.html
https://bugs.webkit.org/show_bug.cgi?id=205514

Rely on ANGLE to implement DEPTH_STENCIL_ATTACHMENT instead of emulating it.

Patch by James Darpinian <James Darpinian> on 2019-12-27
Reviewed by Dean Jackson.

  • html/canvas/WebGLFramebuffer.cpp:

(WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::setupFlags):
(WebCore::WebGLRenderingContextBase::framebufferRenderbuffer):
(WebCore::WebGLRenderingContextBase::readPixels):

Note: See TracTimeline for information about the timeline view.