Timeline



Apr 20, 2020:

11:59 PM Changeset in webkit [260416] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Gardening, update expectations after r260356
https://bugs.webkit.org/show_bug.cgi?id=210786

Unreviewed gardening.

  • platform/gtk/TestExpectations:
11:11 PM Changeset in webkit [260415] by Ross Kirsling
  • 222 edits in trunk

Classes marked final should not use protected access specifier
https://bugs.webkit.org/show_bug.cgi?id=210775

Reviewed by Daniel Bates.

Source/JavaScriptCore:

  • API/JSAPIValueWrapper.h:
  • API/JSCallbackConstructor.h:
  • API/JSCallbackObject.h:
  • b3/B3ExtractValue.h:
  • bytecode/UnlinkedFunctionExecutable.h:
  • inspector/JSGlobalObjectConsoleClient.h:
  • inspector/JSInjectedScriptHost.h:
  • inspector/JSJavaScriptCallFrame.h:
  • jsc.cpp:
  • runtime/AggregateError.h:
  • runtime/AggregateErrorPrototype.h:
  • runtime/ArrayConstructor.h:
  • runtime/ArrayPrototype.h:
  • runtime/AsyncFunctionPrototype.h:
  • runtime/AsyncGeneratorFunctionPrototype.h:
  • runtime/AtomicsObject.h:
  • runtime/BigIntConstructor.h:
  • runtime/BigIntObject.h:
  • runtime/BigIntPrototype.h:
  • runtime/BooleanConstructor.h:
  • runtime/BooleanPrototype.h:
  • runtime/ConsoleObject.h:
  • runtime/DateConstructor.h:
  • runtime/DatePrototype.h:
  • runtime/ErrorConstructor.h:
  • runtime/ErrorPrototype.h:
  • runtime/FileBasedFuzzerAgent.h:
  • runtime/FunctionPrototype.h:
  • runtime/FunctionRareData.h:
  • runtime/GeneratorFunctionPrototype.h:
  • runtime/GenericTypedArrayView.h:
  • runtime/InspectorInstrumentationObject.h:
  • runtime/IntlCollator.h:
  • runtime/IntlCollatorConstructor.h:
  • runtime/IntlCollatorPrototype.h:
  • runtime/IntlDateTimeFormat.h:
  • runtime/IntlDateTimeFormatConstructor.h:
  • runtime/IntlDateTimeFormatPrototype.h:
  • runtime/IntlNumberFormat.h:
  • runtime/IntlNumberFormatConstructor.h:
  • runtime/IntlNumberFormatPrototype.h:
  • runtime/IntlPluralRules.h:
  • runtime/IntlPluralRulesConstructor.h:
  • runtime/IntlPluralRulesPrototype.h:
  • runtime/IntlRelativeTimeFormatConstructor.h:
  • runtime/IntlRelativeTimeFormatPrototype.h:
  • runtime/JSArrayBuffer.h:
  • runtime/JSArrayBufferConstructor.h:
  • runtime/JSArrayBufferPrototype.h:
  • runtime/JSAsyncGenerator.h:
  • runtime/JSBoundFunction.h:
  • runtime/JSCustomGetterSetterFunction.h:
  • runtime/JSDataView.h:
  • runtime/JSDataViewPrototype.h:
  • runtime/JSGenerator.h:
  • runtime/JSGenericTypedArrayView.h:
  • runtime/JSGenericTypedArrayViewConstructor.h:
  • runtime/JSGenericTypedArrayViewPrototype.h:
  • runtime/JSGlobalLexicalEnvironment.h:
  • runtime/JSModuleLoader.h:
  • runtime/JSModuleNamespaceObject.h:
  • runtime/JSNativeStdFunction.h:
  • runtime/JSONObject.h:
  • runtime/JSObject.h:
  • runtime/JSTemplateObjectDescriptor.h:
  • runtime/JSTypedArrayViewConstructor.h:
  • runtime/JSTypedArrayViewPrototype.h:
  • runtime/MathObject.h:
  • runtime/NativeExecutable.h:
  • runtime/NumberConstructor.h:
  • runtime/NumberPrototype.h:
  • runtime/ObjectConstructor.h:
  • runtime/ObjectPrototype.h:
  • runtime/PredictionFileCreatingFuzzerAgent.h:
  • runtime/ReflectObject.h:
  • runtime/RegExp.h:
  • runtime/RegExpConstructor.h:
  • runtime/RegExpObject.h:
  • runtime/RegExpPrototype.h:
  • runtime/StringPrototype.h:
  • runtime/Structure.h:
  • runtime/Symbol.h:
  • runtime/SymbolConstructor.h:
  • runtime/SymbolObject.h:
  • runtime/SymbolPrototype.h:
  • runtime/VMTraps.cpp:
  • testRegExp.cpp:
  • wasm/WasmBBQPlan.h:
  • wasm/WasmLLIntPlan.h:
  • wasm/WasmWorklist.cpp:
  • wasm/js/JSWebAssembly.h:
  • wasm/js/JSWebAssemblyCompileError.h:
  • wasm/js/JSWebAssemblyInstance.h:
  • wasm/js/JSWebAssemblyLinkError.h:
  • wasm/js/JSWebAssemblyRuntimeError.h:
  • wasm/js/WebAssemblyCompileErrorConstructor.h:
  • wasm/js/WebAssemblyCompileErrorPrototype.h:
  • wasm/js/WebAssemblyGlobalConstructor.h:
  • wasm/js/WebAssemblyGlobalPrototype.h:
  • wasm/js/WebAssemblyInstanceConstructor.h:
  • wasm/js/WebAssemblyInstancePrototype.h:
  • wasm/js/WebAssemblyLinkErrorConstructor.h:
  • wasm/js/WebAssemblyLinkErrorPrototype.h:
  • wasm/js/WebAssemblyMemoryConstructor.h:
  • wasm/js/WebAssemblyMemoryPrototype.h:
  • wasm/js/WebAssemblyModuleConstructor.h:
  • wasm/js/WebAssemblyModulePrototype.h:
  • wasm/js/WebAssemblyRuntimeErrorConstructor.h:
  • wasm/js/WebAssemblyRuntimeErrorPrototype.h:
  • wasm/js/WebAssemblyTableConstructor.h:
  • wasm/js/WebAssemblyTablePrototype.h:
  • wasm/js/WebAssemblyWrapperFunction.h:

Source/WebCore:

  • Modules/applepay/ApplePayPaymentMethodSelectedEvent.h:
  • Modules/applepay/ApplePayValidateMerchantEvent.h:
  • Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.h:
  • Modules/webaudio/BiquadDSPKernel.h:
  • Modules/webaudio/WaveShaperDSPKernel.h:
  • Modules/websockets/WebSocketChannel.h:
  • Modules/websockets/WorkerThreadableWebSocketChannel.h:
  • Modules/webxr/WebXRSession.h:
  • Modules/webxr/WebXRSystem.h:
  • accessibility/AccessibilityARIAGridCell.h:
  • accessibility/AccessibleSetValueEvent.h:
  • animation/CSSAnimation.h:
  • bindings/js/ReadableStream.h:
  • bridge/objc/objc_runtime.h:
  • bridge/runtime_array.h:
  • css/CSSImageSetValue.h:
  • html/HTMLKeygenElement.cpp:
  • html/canvas/WebGLBuffer.h:
  • html/canvas/WebGLFramebuffer.h:
  • html/canvas/WebGLProgram.h:
  • html/canvas/WebGLQuery.h:
  • html/canvas/WebGLRenderbuffer.h:
  • html/canvas/WebGLSampler.h:
  • html/canvas/WebGLSync.h:
  • html/canvas/WebGLTransformFeedback.h:
  • html/canvas/WebGLUniformLocation.h:
  • html/shadow/TextControlInnerElements.h:
  • inspector/InspectorStyleSheet.h:
  • inspector/WebInjectedScriptManager.h:
  • loader/cache/CachedCSSStyleSheet.h:
  • page/Frame.h:
  • page/FrameView.h:
  • page/PageConsoleClient.h:
  • page/animation/KeyframeAnimation.h:
  • page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNode.h:
  • platform/audio/AudioBus.h:
  • platform/cocoa/PlaybackSessionModelMediaElement.h:
  • platform/graphics/BitmapImage.h:
  • platform/graphics/CrossfadeGeneratedImage.h:
  • platform/graphics/NamedImageGeneratedImage.h:
  • platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
  • platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.h:
  • platform/graphics/ca/win/PlatformCAAnimationWin.h:
  • platform/graphics/cg/ImageDecoderCG.h:
  • platform/graphics/iso/ISOOriginalFormatBox.h:
  • platform/graphics/iso/ISOProtectionSchemeInfoBox.h:
  • platform/graphics/iso/ISOSchemeInformationBox.h:
  • platform/graphics/iso/ISOSchemeTypeBox.h:
  • platform/graphics/iso/ISOTrackEncryptionBox.h:
  • platform/graphics/iso/ISOVTTCue.cpp:
  • platform/graphics/iso/ISOVTTCue.h:
  • platform/graphics/win/ImageDecoderDirect2D.h:
  • platform/mediastream/mac/AVCaptureDeviceManager.h:
  • platform/mock/mediasource/MockBox.h:
  • platform/mock/mediasource/MockSourceBufferPrivate.cpp:
  • rendering/RenderFullScreen.h:
  • rendering/RenderGrid.h:
  • rendering/RenderMultiColumnSet.h:
  • rendering/RenderRuby.h:
  • rendering/RenderScrollbarPart.h:
  • rendering/RenderScrollbarTheme.h:
  • rendering/RenderTableCell.h:
  • rendering/RenderTableSection.h:
  • rendering/RenderThemeIOS.h:
  • rendering/RenderView.h:
  • rendering/svg/RenderSVGResourceClipper.h:
  • svg/SVGTextPathElement.h:
  • workers/WorkerConsoleClient.h:
  • worklets/Worklet.h:

Source/WebKit:

  • Shared/API/APIDictionary.h:
  • WebProcess/GPU/media/TextTrackPrivateRemote.h:
  • WebProcess/Plugins/Netscape/JSNPMethod.h:
  • WebProcess/Plugins/Netscape/JSNPObject.h:

Source/WebKitLegacy:

  • WebCoreSupport/WebResourceLoadScheduler.h:

Source/WebKitLegacy/win:

  • DefaultDownloadDelegate.h:
  • DefaultPolicyDelegate.h:
  • MemoryStream.h:
  • WebApplicationCache.h:
  • WebArchive.h:
  • WebBackForwardList.h:
  • WebCache.h:
  • WebCoreStatistics.h:
  • WebDataSource.h:
  • WebElementPropertyBag.h:
  • WebError.h:
  • WebFrame.h:
  • WebFramePolicyListener.h:
  • WebHTMLRepresentation.h:
  • WebHistoryItem.h:
  • WebJavaScriptCollector.h:
  • WebKitClassFactory.h:
  • WebKitStatistics.h:
  • WebMutableURLRequest.h:
  • WebNotification.h:
  • WebNotificationCenter.h:
  • WebPreferences.h:
  • WebResource.h:
  • WebURLAuthenticationChallenge.h:
  • WebURLCredential.h:
  • WebURLProtectionSpace.h:
  • WebURLResponse.h:

Tools:

  • DumpRenderTree/win/DefaultPolicyDelegate.h:
  • DumpRenderTree/win/UIDelegate.h:
9:51 PM Changeset in webkit [260414] by ysuzuki@apple.com
  • 1 edit
    14 adds in trunk/JSTests

[JSC] Import V8 BigInt tests generated by bigint-tester.py
https://bugs.webkit.org/show_bug.cgi?id=210783

Reviewed by Ross Kirsling.

This patch adds BigInt tests generated by V8 bigint-tester.py, which is modified for JSC use.

  • stress/v8-bigint-add.js: Added.
  • stress/v8-bigint-and.js: Added.
  • stress/v8-bigint-dec.js: Added.
  • stress/v8-bigint-div.js: Added.
  • stress/v8-bigint-inc.js: Added.
  • stress/v8-bigint-mod.js: Added.
  • stress/v8-bigint-mul.js: Added.
  • stress/v8-bigint-neg.js: Added.
  • stress/v8-bigint-not.js: Added.
  • stress/v8-bigint-or.js: Added.
  • stress/v8-bigint-sar.js: Added.
  • stress/v8-bigint-shl.js: Added.
  • stress/v8-bigint-sub.js: Added.
  • stress/v8-bigint-xor.js: Added.
9:48 PM Changeset in webkit [260413] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WTF

Try to fix the build after r260407

  • wtf/PlatformHave.h:
9:06 PM Changeset in webkit [260412] by Peng Liu
  • 22 edits in trunk

Fix build failures when video fullscreen and picture-in-picture is disabled
https://bugs.webkit.org/show_bug.cgi?id=210777

Reviewed by Eric Carlson.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Wrap video fullscreen and picture-in-picture related code with "#if ENABLE(VIDEO_PRESENTATION_MODE)".

  • Configurations/FeatureDefines.xcconfig:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):

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

(WebCore::VideoLayerManagerObjC::setVideoLayer):
(WebCore::VideoLayerManagerObjC::requiresTextTrackRepresentation const):
(WebCore::VideoLayerManagerObjC::syncTextTrackBounds):
(WebCore::VideoLayerManagerObjC::setTextTrackRepresentation):

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Wrap video fullscreen and picture-in-picture related code with "#if ENABLE(VIDEO_PRESENTATION_MODE)".

  • Configurations/FeatureDefines.xcconfig:
  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::setVideoFullscreenGravity):
(WebKit::RemoteMediaPlayerProxy::updateVideoFullscreenInlineImage):
(WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode):
(WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged):
(WebKit::RemoteMediaPlayerProxy::setBufferingPolicy):

  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
  • GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm:

(WebKit::RemoteMediaPlayerProxy::prepareForPlayback):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::prepareForPlayback):

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

  • wtf/PlatformEnable.h:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
9:04 PM Changeset in webkit [260411] by Ross Kirsling
  • 9 edits in trunk/Source/JavaScriptCore

Intl classes shouldn't need an m_initialized* field
https://bugs.webkit.org/show_bug.cgi?id=210764

Reviewed by Darin Adler.

Existing Intl classes each have a field like m_initializedNumberFormat, but this is unnecessary on two levels:

  1. The thing that gets initialized is a unique pointer to an ICU struct, so we can check it directly.
  2. Everywhere we're checking this is redundant since we've already done the same check on the prototype side, therefore we can just ASSERT before using said ICU struct.

While we're at it, clean up other stuff like:

  • Move stuff that doesn't need to be part of the class to the CPP file (e.g. UFieldPositionIteratorDeleter).
  • Merge createCollator into initializeCollator (seems like this is probably the oldest code in this space).
  • runtime/IntlCollator.cpp:

(JSC::IntlCollator::initializeCollator):
(JSC::IntlCollator::compareStrings):
(JSC::IntlCollator::resolvedOptions):
(JSC::IntlCollator::createCollator): Deleted.

  • runtime/IntlCollator.h:
  • runtime/IntlDateTimeFormat.cpp:

(JSC::UFieldPositionIteratorDeleter::operator() const):
(JSC::IntlDateTimeFormat::initializeDateTimeFormat):
(JSC::IntlDateTimeFormat::resolvedOptions):
(JSC::IntlDateTimeFormat::format):
(JSC::partTypeString):
(JSC::IntlDateTimeFormat::formatToParts):
(JSC::IntlDateTimeFormat::UFieldPositionIteratorDeleter::operator() const): Deleted.
(JSC::IntlDateTimeFormat::partTypeString): Deleted.

  • runtime/IntlDateTimeFormat.h:
  • runtime/IntlNumberFormat.cpp:

(JSC::UFieldPositionIteratorDeleter::operator() const):
(JSC::IntlNumberFormatField::IntlNumberFormatField):
(JSC::IntlNumberFormat::initializeNumberFormat):
(JSC::IntlNumberFormat::format):
(JSC::IntlNumberFormat::resolvedOptions):
(JSC::partTypeString):
(JSC::IntlNumberFormat::formatToParts):
(JSC::IntlNumberFormat::UFieldPositionIteratorDeleter::operator() const): Deleted.
(JSC::IntlNumberFormat::partTypeString): Deleted.

  • runtime/IntlNumberFormat.h:
  • runtime/IntlPluralRules.cpp:

(JSC::localeData):
(JSC::IntlPluralRules::initializePluralRules):
(JSC::IntlPluralRules::resolvedOptions):
(JSC::IntlPluralRules::select):
(JSC::IntlPRInternal::localeData): Deleted.

  • runtime/IntlPluralRules.h:
8:23 PM Changeset in webkit [260410] by commit-queue@webkit.org
  • 18 edits in trunk

SPI clients using fastServerTrustEvaluationEnabled need SPI to inform them of modern TLS negotiation
https://bugs.webkit.org/show_bug.cgi?id=210533

Patch by Alex Christensen <achristensen@webkit.org> on 2020-04-20
Reviewed by Brady Eidson.

Source/WebKit:

  • NetworkProcess/NetworkDataTask.h:

(WebKit::NetworkDataTaskClient::didNegotiateModernTLS):

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::didNegotiateModernTLS):

  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::didNegotiateModernTLS):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):

  • UIProcess/API/APINavigationClient.h:

(API::NavigationClient::didNegotiateModernTLS):

  • UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::didNegotiateModernTLS):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::didNegotiateModernTLS):

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

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm:

(-[TLSNavigationDelegate waitForDidNegotiateModernTLS]):
(-[TLSNavigationDelegate _webView:didNegotiateModernTLS:]):
(TestWebKitAPI::TEST):

7:52 PM Changeset in webkit [260409] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WTF

Add document about WTF malloc-related macros
https://bugs.webkit.org/show_bug.cgi?id=208367

Reviewed by Anders Carlsson, Simon Fraser, and Darin Adler.

This adds document about WTF malloc-related macros since we have bunch of macros now.

  • wtf/FastMalloc.h:
7:36 PM Changeset in webkit [260408] by Kate Cheney
  • 5 edits in trunk

App-bound domain behavior should abide by the limitsNavigationsToAppBoundDomains argument in WKWebView configuration
https://bugs.webkit.org/show_bug.cgi?id=210769
<rdar://problem/62065241>

Reviewed by Brent Fulgham.

Source/WebKit:

Changes app-bound domain behavior to be triggered by the value of
limitsNavigationsToAppBoundDomains, a WebView configuration flag.
If the WebView has this parameter set and is currently navigating to
an app bound domain, then app-bound privileges will be granted.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setIsNavigatingToAppBoundDomainAndCheckIfPermitted):
Update this function to return a boolean to indicate whether the
navigation should fail. A failure should occur if a WebView has set
the limitsNavigationsToAppBoundDomains flag and attempts to navigate
away from an app-bound domain.

If the limitsNavigationsToAppBoundDomains value has not been set to
true, maintain non-app bound behavior regardless of whether the domain
is app-bound or not.

(WebKit::WebPageProxy::decidePolicyForNavigationAction):
Check the result of setIsNavigatingToAppBoundDomainAndCheckIfPermitted and fail the
navigation if needed, with both RELEASE logging and an appropriate
error message.

(WebKit::WebPageProxy::setIsNavigatingToAppBoundDomain): Deleted.

  • UIProcess/WebPageProxy.h:

Renamed for clarity.

Tools:

Removes any tests for swapping between app-bound and non app-bound
domains as this behavior is no longer supported.

Sets the limitsNavigationsToAppBoundDomains flag for tests which should
have app-bound behavior to maintain test functionality.

Adds 5 new tests for new behavior.

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:

(TEST):
(-[AppBoundDomainDelegate webView:didFinishNavigation:]):
(-[AppBoundDomainDelegate webView:didFailProvisionalNavigation:withError:]):
(-[AppBoundDomainDelegate waitForDidFinishNavigation]):
(-[AppBoundDomainDelegate waitForDidFailProvisionalNavigationError]):

5:27 PM Changeset in webkit [260407] by Nikos Mouchtaris
  • 16 edits
    2 adds in trunk/Source

WK2 Quicklook for attachments
https://bugs.webkit.org/show_bug.cgi?id=208891

Reviewed by Darin Adler.

Source/WebCore:

Added to HTMLAttachmentElement to have member image representing
QuickLook thumbnail. Added code to render this image on both iOS and Mac.

No new tests. Test will be added after additions to test infrastructure.

  • html/HTMLAttachmentElement.cpp:

(WebCore::HTMLAttachmentElement::updateThumbnailRepresentation):
Allow setting of thumbnail member.

  • html/HTMLAttachmentElement.h:
  • rendering/RenderThemeIOS.mm:

Added rendering of image member of attachment element.
(WebCore::RenderAttachmentInfo::RenderAttachmentInfo):
(WebCore::paintAttachmentIcon):
(WebCore::RenderThemeIOS::paintAttachment):

  • rendering/RenderThemeMac.mm:

(WebCore::paintAttachmentIcon):

Source/WebKit:

Allow attachment elements to render QuickLook thumbnail generated
from contents of the file as its icon, rather than the default
icons associated with each mime type.

  • Configurations/WebKit.xcconfig:

Link QuickLook thumbnailing framework.

  • UIProcess/API/APIAttachment.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _insertAttachmentWithFileWrapper:contentType:completion:]):

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

Create thumbnail request and add to queue.
(WebKit::convertNSImageToBitmap):
(WebKit::convertUIImageToBitmap):
(WebKit::WebPageProxy::getQLThumbnailForGenerationRequestion):
(WebKit::WebPageProxy::getQLThumbnailForFileWrapper):
(WebKit::WebPageProxy::getQLThumbnailForAttachment):

  • UIProcess/QLThumbnailLoad.h: Added.
  • UIProcess/QLThumbnailLoad.mm: Added.

Add code to request thumbnail for file data.
(-[WKQLThumbnailQueueManager init]):
(+[WKQLThumbnailQueueManager sharedInstance]):
(-[WKQLThumbnailLoadOperation initWithAttachment:identifier:]):
(-[WKQLThumbnailLoadOperation initWithURL:identifier:]):
(-[WKQLThumbnailLoadOperation start]):
(-[WKQLThumbnailLoadOperation isAsynchronous]):
(-[WKQLThumbnailLoadOperation isExecuting]):
(-[WKQLThumbnailLoadOperation setExecuting:]):
(-[WKQLThumbnailLoadOperation isFinished]):
(-[WKQLThumbnailLoadOperation setFinished:]):

  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updateAttachmentIcon):
Set thumbnail of attachment element

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

Thumbnail request message.

5:03 PM Changeset in webkit [260406] by Alan Coon
  • 2 edits in branches/safari-610.1.11-branch/Source/WebKit

Unreviewed macCatalyst build fix.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::disableServiceWorkerEntitlementInNetworkProcess):
(WebKit::WebPageProxy::clearServiceWorkerEntitlementOverride):

4:08 PM Changeset in webkit [260405] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

Unreviewed macCatalyst build fix.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::disableServiceWorkerEntitlementInNetworkProcess):
(WebKit::WebPageProxy::clearServiceWorkerEntitlementOverride):

3:32 PM Changeset in webkit [260404] by ysuzuki@apple.com
  • 6 edits in trunk

Add more structure-cloning tests for BigInt
https://bugs.webkit.org/show_bug.cgi?id=210765

Reviewed by Mark Lam.

Source/WebCore:

This patch adds safe-guard for future JSC primitive extension for structure-cloning.
We throw DataCloneError if we see unknown primitive value, which can happen if JSC
extends primitive value.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::dumpImmediate):
(WebCore::CloneSerializer::dumpIfTerminal):

LayoutTests:

Add more tests for BigInt outside of WPT (they are already tested in WPT, but this adds more tests).

  • fast/dom/Window/window-postmessage-clone-expected.txt:
  • fast/dom/Window/window-postmessage-clone.html:
  • platform/gtk/fast/dom/Window/window-postmessage-clone-expected.txt:
2:55 PM Changeset in webkit [260403] by Simon Fraser
  • 16 edits
    2 adds in trunk

Scrolling with background-attachment: fixed needs to trigger repaints
https://bugs.webkit.org/show_bug.cgi?id=193893
<rdar://problem/47587017>

Reviewed by Dean Jackson.

Source/WebCore:

When scrolling an overflow scroll which has "background-atttachment:fixed" in the content,
the node will have non-empty synchronous scrolling reasons. In this case we need to
send the scroll to the main thread, and trigger a repaint on scroll.

If handling the wheel event on the scrolling thread determines that the scroll must be sent
to the main thread, EventDispatcher::wheelEvent() does so in the callback function.

To trigger the repaint, RenderLayer::scrollTo() asks the composited layers backing whether
the node has synchronous scrolling reasons; this is implemented by asking the scrolling
coordinator.

Test: scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-repaint.html

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::hasSynchronousScrollingReasons const):

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

(WebCore::ScrollingCoordinator::hasSynchronousScrollingReasons const):

  • page/scrolling/ScrollingStateScrollingNode.h:

(WebCore::ScrollingStateScrollingNode::hasSynchronousScrollingReasons const):

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::handleWheelEvent):

  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::currentScrollPositionChanged):

  • page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:

(WebCore::ScrollingTreeOverflowScrollingNodeMac::handleWheelEvent): Return SendToMainThread if this node
needs to do synchronous scrolling.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollTo):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::needsRepaintOnCompositedScroll const):
(WebCore::RenderLayerBacking::setRequiresOwnBackingStore):
(WebCore::RenderLayerBacking::setContentsNeedDisplay):

  • rendering/RenderLayerBacking.h:

Source/WebKit:

When scrolling an overflow scroll which has "background-atttachment:fixed" in the content,
the node will have non-empty synchronous scrolling reasons. In this case we need to
send the scroll to the main thread, and trigger a repaint on scroll.

If handling the wheel event on the scrolling thread determines that the scroll must be sent
to the main thread, EventDispatcher::wheelEvent() does so in the callback function.

To trigger the repaint, RenderLayer::scrollTo() asks the composited layers backing whether
the node has synchronous scrolling reasons; this is implemented by asking the scrolling
coordinator.

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::wheelEvent):

LayoutTests:

  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-repaint-expected.html: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-repaint.html: Added.
2:45 PM Changeset in webkit [260402] by Megan Gardner
  • 14 edits
    2 adds in trunk

Date and Time form controls not showing correct initial values on immediate second invocation.
https://bugs.webkit.org/show_bug.cgi?id=210613

Reviewed by Wenson Hsieh.

Source/WebKit:

Updating the webprocess with the newly picked time did not update the local store of that data in the
UI process, so when the control was activated a second time, and we skipped the round trip to the
webprocess to get the data we were certian we already had, we did not start the popover in the
correct state. We now update the webprocess and the local UI stored variable at the same time.

Test: fast/forms/ios/time-picker-value-change.html

  • UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
  • UIProcess/API/ios/WKWebViewTestingIOS.mm:

(-[WKWebView timePickerValueHour]):
(-[WKWebView timePickerValueMinute]):

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

(-[WKContentView updateValueAsNumberForViewController:]):
(-[WKContentView updateValueForViewController:]):
(-[WKContentView setTimePickerValueToHour:minute:]):
(-[WKContentView timePickerValueHour]):
(-[WKContentView timePickerValueMinute]):

  • UIProcess/ios/forms/WKFormInputControl.h:
  • UIProcess/ios/forms/WKFormInputControl.mm:

(-[WKDateTimePicker hour]):
(-[WKDateTimePicker minute]):
(-[WKDateTimePicker _dateChangedSetAsNumber]):
(-[WKDateTimePicker _dateChangedSetAsString]):
(-[WKDateTimePicker setHour:minute:]):
(-[WKFormInputControl setTimePickerHour:minute:]):
(-[WKFormInputControl timePickerValueHour]):
(-[WKFormInputControl timePickerValueMinute]):
(-[WKDateTimePopover setHour:minute:]):
(-[WKDateTimePopover hour]):
(-[WKDateTimePopover minute]):

Tools:

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.h:

(WTR::UIScriptController::timePickerValueHour const):
(WTR::UIScriptController::timePickerValueMinute const):

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

(WTR::UIScriptControllerIOS::timePickerValueHour const):
(WTR::UIScriptControllerIOS::timePickerValueMinute const):

LayoutTests:

  • fast/forms/ios/time-picker-value-change-expected.txt: Added.
  • fast/forms/ios/time-picker-value-change.html: Added.
  • resources/ui-helper.js:

(window.UIHelper.timerPickerValues):

2:42 PM Changeset in webkit [260401] by Alan Coon
  • 2 edits in branches/safari-610.1.11-branch/Source/WebKit

Try to fix the macCatalyst build after r260366

  • UIProcess/API/Cocoa/_WKWebAuthenticationPanelInternal.h:
2:29 PM Changeset in webkit [260400] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Try to fix the macCatalyst build after r260366

  • UIProcess/API/Cocoa/_WKWebAuthenticationPanelInternal.h:
2:17 PM Changeset in webkit [260399] by clopez@igalia.com
  • 3 edits in trunk/LayoutTests

Skip tests related with missing reftest-wait support for imported WPT tests.

Unreviewed gardening.

Also fix a few typos on the bug numbers for the expectations.

2:14 PM Changeset in webkit [260398] by Russell Epstein
  • 1 copy in tags/Safari-609.2.8

Tag Safari-609.2.8.

2:05 PM Changeset in webkit [260397] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

FTL doesn't observe the use kind of CheckIsConstant's child1
https://bugs.webkit.org/show_bug.cgi?id=210763

Reviewed by Yusuke Suzuki.

Somehow, this didn't get added when I changed CheckIsConstant and didn't show up
when I tested r260377 because I tested in release. Fortunately, the produced
DFG IR will be the same.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCheckIsConstant):

1:38 PM Changeset in webkit [260396] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

MSVC: LayoutUnits.h(248): warning C4245: 'argument': conversion from 'const int' to 'size_t', signed/unsigned mismatch
https://bugs.webkit.org/show_bug.cgi?id=210592

Reviewed by Zalan Bujtas.

  • layout/LayoutUnits.h:

(WTF::HashTraits<WebCore::Layout::SlotPosition>::emptyValue):
(WTF::HashTraits<WebCore::Layout::SlotPosition>::constructDeletedValue):
(WTF::HashTraits<WebCore::Layout::SlotPosition>::isDeletedValue):
Use std::numeric_limits<size_t>::max() for empty and deleted
values instead of WebCore::intMinForLayoutUnit.

1:35 PM Changeset in webkit [260395] by Alan Coon
  • 1 copy in branches/safari-610.1.11-branch

New branch.

1:35 PM Changeset in webkit [260394] by Alan Coon
  • 1 delete in branches/safari-610.1.11-branch

Delete branch.

1:19 PM Changeset in webkit [260393] by Wenson Hsieh
  • 4 edits in trunk

Text manipulation sometimes fails to replace text in title elements
https://bugs.webkit.org/show_bug.cgi?id=210750
<rdar://problem/61066103>

Reviewed by Tim Horton and Darin Adler.

Source/WebCore:

Internal clients using WebKit text manipulation APIs currently fail to replace text in title and option elements
in the case where text manipulation has been completed with more than one token. These are elements for which we
want to replace the entire text as a single token, even if the text manipulation client ends up breaking the
token into multiple chunks.

To handle this case, pull the title || option check out into a helper function, and consult it when completing
text manipulation in the case where the manipulation data lacks either start or end positions. If
canPerformTextManipulationByReplacingEntireTextContent is true and there are multiple replacement tokens,
allow ourselves to process the replacement by combining the replacement tokens into a space-separated string.

Test: TextManipulation.CompleteTextManipulationShouldReplaceTextContentWithMultipleTokens

  • editing/TextManipulationController.cpp:

(WebCore::canPerformTextManipulationByReplacingEntireTextContent):
(WebCore::TextManipulationController::observeParagraphs):
(WebCore::TextManipulationController::replace):

Tools:

Add a new API test to verify that a single title or option element may be replaced with multiple tokens, as long
as all the token identifiers match.

  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:
1:11 PM Changeset in webkit [260392] by Andres Gonzalez
  • 2 edits in trunk/Source/WebCore

The rect for the primary screen should be retrieved on the main thread.
https://bugs.webkit.org/show_bug.cgi?id=210760

Reviewed by Chris Fleizach.

  • Call to screenRectForPrimaryScreen is dispatched to main thread.
  • This value is cached since it is very unlikely to change in normal

usage and this would avoid hitting the main thread repeatedly.

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper primaryScreenHeight]):

1:09 PM Changeset in webkit [260391] by stephan.szabo@sony.com
  • 2 edits in trunk/Source/WebKit

Fix build when !ENABLE(RESOURCE_LOAD_STATISTICS)
https://bugs.webkit.org/show_bug.cgi?id=210757

Reviewed by Ross Kirsling.

Build fix, no new tests

  • NetworkProcess/NetworkDataTask.cpp:

Add ENABLE(RESOURCE_LOAD_STATISTICS) around block
using NetworkSession functions only declared when
that is enabled.

1:04 PM Changeset in webkit [260390] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

When SpeculativeLoadManager is destroyed, properly clean up its PendingFrameLoads
https://bugs.webkit.org/show_bug.cgi?id=210759
<rdar://problem/62056856>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-04-20
Reviewed by Darin Adler.

Recent work on the resourceLoadStatistics layout tests increased the amount we swap out the WebsiteDataStore.
When this happens, the NetworkSession is eventually destroyed in the NetworkProcess, sometimes when running the next test.
An assertion was firing in the PendingFrameLoad destructor because it hadn't been marked as complete when it was destroyed.
Rather than remove the assertion, when we destroy the SpeculativeLoadManager (which only happens when a WebsiteDataStore
is destroyed) during a speculative pending frame load, just mark the pending frame load as complete because it is being cancelled.
Marking the pending frame load as complete can tell the SpeculativeLoadManager to mutate m_pendingFrameLoads, which we don't want
to do while iterating, so copy the RefPtrs into a Vector first then iterate that to get them all.

This fixes an assertion that was sometimes hit in http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects-database.html
but only after running other tests that had initiated speculative pending frame loads. This was ostensibly started by r260322 but is quite unrelated.

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::SpeculativeLoadManager::~SpeculativeLoadManager):

12:56 PM Changeset in webkit [260389] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests

[GTK][WPE] Gardening, update expectations after r260322
https://bugs.webkit.org/show_bug.cgi?id=210761

Unreviewed gardening.

  • platform/gtk/TestExpectations:
12:44 PM Changeset in webkit [260388] by clopez@igalia.com
  • 6 edits in trunk/LayoutTests

Clean and merge test expectations for WPT tests for Intersection Observer v2.

Unreviewed gardening.

Merge the expectations for the tests cross-origin-effects.sub.html
and cross-origin-occlusion.sub.html on the common TestExpectations file.

  • TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/wpe/TestExpectations:
12:37 PM Changeset in webkit [260387] by stephan.szabo@sony.com
  • 4 edits in trunk

[PlayStation] Fix build after r260277
https://bugs.webkit.org/show_bug.cgi?id=210756

Reviewed by Don Olmstead.

Source/WebKit:

Build fix, no new tests.

  • PlatformPlayStation.cmake:

Tools:

  • TestWebKitAPI/PlatformPlayStation.cmake:
12:35 PM Changeset in webkit [260386] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: the filter bar in the navigation sidebar should respect the global search settings
https://bugs.webkit.org/show_bug.cgi?id=210679

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/NavigationSidebarPanel.js:

(WI.NavigationSidebarPanel.prototype.updateFilter):

12:21 PM Changeset in webkit [260385] by svillar@igalia.com
  • 8 edits
    1 add in trunk

[WebXR] Update WebXRSession and WebXRSystem interfaces
https://bugs.webkit.org/show_bug.cgi?id=210553

Reviewed by Žan Doberšek.

LayoutTests/imported/w3c:

  • web-platform-tests/webxr/idlharness.https.window-expected.txt: Added.

Source/WebCore:

Update WebXRSession and WebXRSystem to the latest changes in the specs.

  • Modules/webxr/WebXRSession.idl: Added 3 new events.
  • Modules/webxr/WebXRSystem.idl: Interface name is XR not XRSystem.
  • bindings/js/WebCoreBuiltinNames.h: Renamed macro.
  • dom/EventNames.h: Added 3 new events.

LayoutTests:

  • platform/wpe/TestExpectations: Mark idlharness.https.window.html test as Passed.
12:11 PM Changeset in webkit [260384] by ysuzuki@apple.com
  • 4 edits in trunk

[JSC] Skip test262 for non-safe-integer range BigIntConstructor
https://bugs.webkit.org/show_bug.cgi?id=210749

Reviewed by Keith Miller.

JSTests:

We skip test262 test/built-ins/BigInt/constructor-integer.js for now. As it is shown in old test262 JSTests/test262/expectations.yaml,
this test was failing before BigInt flag is enabled. And new BigInt patch changes error message while we are failing in the same way.
While we implemented BigInt, this test is based on spec change introduced[1], and we are not implementing this. So we mark it skipped,
as it is skipped before BigInt is enabled.

[1]: https://github.com/tc39/proposal-bigint/pull/138

  • test262/config.yaml:

Source/JavaScriptCore:

  • runtime/BigIntConstructor.cpp:

(JSC::callBigIntConstructor):

12:10 PM Changeset in webkit [260383] by Darin Adler
  • 3 edits in trunk/Source/WTF

REGRESSION (r253987): StringImpl::adopt(Vector&&) copies only half of the characters in the Vector when copying across malloc zones
https://bugs.webkit.org/show_bug.cgi?id=210736

Reviewed by Yusuke Suzuki.

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::replace): Use copyCharacters instead of memcpy.

  • wtf/text/StringImpl.h: Use std::is_same_v instead of std::is_same.

(WTF::StringImpl::StringImpl): Use copyCharacters instead of memcpy.
Also drop C-style cast to cast away const.
(WTF::StringImpl::adopt): Don't even try to adopt across malloc zones.

11:43 AM Changeset in webkit [260382] by Chris Dumez
  • 7 edits
    2 adds in trunk

Sending beacons when Fetch KeepAlive feature is disabled crashes the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=210753
<rdar://problem/61896221>

Reviewed by Geoffrey Garen.

Source/WebCore:

Test: http/wpt/beacon/beacon-legacy-code-path.html

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setFetchAPIKeepAliveEnabled):

  • testing/InternalSettings.h:
  • testing/InternalSettings.idl:

Add internal settings to disable Fetch Keep Alive for layout testing.

Source/WebKit:

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::startPingLoad):
Make sure NetworkResourceLoadParameters's webPageProxyID / webPageID / webFrameID are properly
initialized before sending the IPC or IPC decoding will fail.

LayoutTests:

Add layout test coverage.

  • http/wpt/beacon/beacon-legacy-code-path-expected.txt: Added.
  • http/wpt/beacon/beacon-legacy-code-path.html: Added.
11:41 AM Changeset in webkit [260381] by ddkilzer@apple.com
  • 15 edits
    1 copy in trunk/Source/WebKit

[IPC hardening] Use ObjectIdentifier<> for geolocationID
<https://webkit.org/b/210680>
<rdar://problem/58892340>

Reviewed by Chris Dumez.

Replace uses of uint64_t with GeolocationIdentifier.

  • Scripts/webkit/messages.py:
  • UIProcess/GeolocationIdentifier.h: Add.
  • UIProcess/GeolocationPermissionRequestManagerProxy.cpp:

(WebKit::GeolocationPermissionRequestManagerProxy::createRequest):
(WebKit::GeolocationPermissionRequestManagerProxy::didReceiveGeolocationPermissionDecision):

  • UIProcess/GeolocationPermissionRequestManagerProxy.h:
  • UIProcess/GeolocationPermissionRequestProxy.cpp:

(WebKit::GeolocationPermissionRequestProxy::GeolocationPermissionRequestProxy):

  • UIProcess/GeolocationPermissionRequestProxy.h:

(WebKit::GeolocationPermissionRequestProxy::create):

  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:

(WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
(WebKit::GeolocationPermissionRequestManager::cancelRequestForGeolocation):
(WebKit::GeolocationPermissionRequestManager::didReceiveGeolocationPermissionDecision):
(WebKit::generateGeolocationID): Delete.

  • Replace with GeolocationIdentifier::generate().
  • WebProcess/Geolocation/GeolocationPermissionRequestManager.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didReceiveGeolocationPermissionDecision):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
11:16 AM Changeset in webkit [260380] by youenn@apple.com
  • 11 edits
    2 adds in trunk

MediaPlayerPrivateMediaStreamAVFObjC should start play a newly added audio track if it is playing
https://bugs.webkit.org/show_bug.cgi?id=210740

Reviewed by Eric Carlson.

Source/WebCore:

Before the patch, MediaPlayerPrivateMediaStreamAVFObjC was not calling play on the audio renderer when the audio renderer
was added after the MediaPlayerPrivateMediaStreamAVFObjC was asked to play.
This patch makes it so that, on configuration of an audio track, it will be asked to play if its MediaPlayerPrivateMediaStreamAVFObjC is playing.
Add internals API to be able to write a test.

Test: fast/mediastream/play-newly-added-audio-track.html

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

(WebCore::AudioTrackPrivate::isBackedByMediaStreamTrack const):

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

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks):

  • platform/mediastream/AudioTrackPrivateMediaStream.cpp:

(WebCore::AudioTrackPrivateMediaStream::play):

  • platform/mediastream/AudioTrackPrivateMediaStream.h:

(isType):

  • testing/Internals.cpp:

(WebCore::Internals::isMockRealtimeMediaSourceCenterEnabled):
(WebCore::Internals::shouldAudioTrackPlay):

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

LayoutTests:

  • fast/mediastream/play-newly-added-audio-track-expected.txt: Added.
  • fast/mediastream/play-newly-added-audio-track.html: Added.
11:14 AM Changeset in webkit [260379] by youenn@apple.com
  • 9 edits in trunk/Source/WebCore

Use a WeakHashSet to store MediaStreamPrivate observers
https://bugs.webkit.org/show_bug.cgi?id=210494

Reviewed by Eric Carlson.

Remove observers from the MediaStream and migrate existing client (MediaRecorder) to MediaStreamPrivate::Observer.
Make use of WeakHashSet in MediaStreamPrivate to improve robustness of the code.
Any time the MediaStreamPrivate tracks are modified, observers will be notified.
MediaStream needs now to decide when to send an event when its MediaStreamPrivate notifies of new/deleted tracks,
Modernize a bit the code to use more references.
Covered by existing tests.

  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::MediaRecorder::MediaRecorder):
(WebCore::MediaRecorder::~MediaRecorder):
(WebCore::MediaRecorder::handleTrackChange):

  • Modules/mediarecorder/MediaRecorder.h:
  • Modules/mediastream/MediaStream.cpp:

(WebCore::createTrackPrivateVector):
(WebCore::MediaStream::MediaStream):
(WebCore::MediaStream::~MediaStream):
(WebCore::MediaStream::addTrack):
(WebCore::MediaStream::removeTrack):
(WebCore::MediaStream::getTrackById):
(WebCore::MediaStream::didAddTrack):
(WebCore::MediaStream::didRemoveTrack):
(WebCore::MediaStream::addTrackFromPlatform):
(WebCore::MediaStream::internalAddTrack):
(WebCore::MediaStream::internalTakeTrack):

  • Modules/mediastream/MediaStream.h:
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::removeRemoteTrack):

  • platform/mediastream/MediaStreamPrivate.cpp:

(WebCore::MediaStreamPrivate::MediaStreamPrivate):
(WebCore::MediaStreamPrivate::addObserver):
(WebCore::MediaStreamPrivate::removeObserver):
(WebCore::MediaStreamPrivate::forEachObserver):
(WebCore::MediaStreamPrivate::computeActiveState):
(WebCore::MediaStreamPrivate::updateActiveState):
(WebCore::MediaStreamPrivate::addTrack):
(WebCore::MediaStreamPrivate::removeTrack):
(WebCore::MediaStreamPrivate::trackEnded):

  • platform/mediastream/MediaStreamPrivate.h:
  • testing/Internals.cpp:

(WebCore::Internals::removeMediaStreamTrack):

11:11 AM Changeset in webkit [260378] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

fast/layoutformattingcontext/simple-absolute-positioned-replaced-inline-element-with-percentage-height.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=210754

Unreviewed test gardening.

Let's not use subframe layout in LFC tests for now.

  • fast/layoutformattingcontext/simple-absolute-positioned-replaced-inline-element-with-percentage-height.html:
11:06 AM Changeset in webkit [260377] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix CheckIsConstant for non-constant values and checking for empty
https://bugs.webkit.org/show_bug.cgi?id=210752

Reviewed by Saam Barati.

We need to make sure that we only have one speculated type if our value
is empty.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

11:04 AM Changeset in webkit [260376] by Alan Coon
  • 1 copy in branches/safari-610.1.11-branch

New branch.

11:02 AM Changeset in webkit [260375] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: removing a WI.TreeElement in a WI.NavigationSidebar doesn't check if the WI.TreeOutline still matches the current filter
https://bugs.webkit.org/show_bug.cgi?id=210672

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/NavigationSidebarPanel.js:

(WI.NavigationSidebarPanel.prototype.createContentTreeOutline):
(WI.NavigationSidebarPanel.prototype.updateFilter):
(WI.NavigationSidebarPanel.prototype._checkForEmptyFilterResults):
(WI.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
(WI.NavigationSidebarPanel.prototype._handleTreeElementRemoved): Added.

10:59 AM Changeset in webkit [260374] by Alan Coon
  • 8 edits in trunk/Source

Versioning.

10:48 AM Changeset in webkit [260373] by Chris Dumez
  • 6 edits in trunk/Source/WebKit

[iOS] Refactor WebKit media playback process assertion logic to minimize chances of leaking them
https://bugs.webkit.org/show_bug.cgi?id=210670

Reviewed by Geoffrey Garen.

Refactor WebKit media playback process assertion logic to minimize chances of leaking them. In particular,
the following changes were made:

  1. Instead of the WebProcessPool having a HashMap of media playback process assertions for the WebProcess, we now store the assertion on the WebProcessProxy object itself. This is less likely to get out of sync and leak.
  2. Add a RefCounter to the WebProcessPool to count WebProcesses that have audible media. Whenever a WebProcess starts or stops playing audible media, it merely grabs a RefCounter token or releases it. The WebProcessPool relies on this counter to decide whether or not to take a media playback assertion on behalf of the UIProcess. Since this is token-based and the token is stored on the WebProcessProxy object, it makes it less likely to leak the assertion.
  3. The WebProcessProxy object now has a AudibleMediaActivity data structure wrapping both its media playback assertion and its WebProcessWithAudibleMediaToken that it got from the WebProcessPool. When the WebProcess shuts down (normally or due to crash/termination), we make sure to clear this data structure.
  4. Make sure that the WebProcessProxy updates its AudibleMediaActivity whenever a page is removed from the WebProcess.
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebProcessPool.cpp:

(WebKit::m_webProcessWithAudibleMediaCounter):
(WebKit::WebProcessPool::disconnectProcess):
(WebKit::WebProcessPool::webProcessWithAudibleMediaToken const):
(WebKit::WebProcessPool::updateAudibleMediaAssertions):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::shutDown):
(WebKit::WebProcessProxy::removeWebPage):
(WebKit::WebProcessProxy::updateAudibleMediaAssertions):

  • UIProcess/WebProcessProxy.h:
10:15 AM Changeset in webkit [260372] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

<rdar://problem/62059046>

Unreviewed macCatalyst build fix.

  • NetworkProcess/NetworkProcess.messages.in:
10:14 AM Changeset in webkit [260371] by Simon Fraser
  • 3 edits
    4 adds in trunk

Content disappears on CSS parallax example
https://bugs.webkit.org/show_bug.cgi?id=210732
Source/WebCore:

<rdar://problem/61997636>

Reviewed by Darin Adler.

If scrolling affects the computation of coverage rect of a TiledBacking, we plumb
that expanded coverage back into TransformState which is maintained during GraphicsLayer flushing,
and it's used to compute coverage rect for descendants.

It's passed into TransformState::setLastPlanarSecondaryQuad(), which has to map it back into
the coordinate system of the last flattening ancestor. However, TransformState::mapQuad()
had a missing return and the quad mapping was wrong. The new code is now the same as
TransformState::mappedPoint() (you can see where the copy/paste error came from).

Test: compositing/tiling/coverage-adjustment-secondary-quad-mapping.html

  • platform/graphics/transforms/TransformState.cpp:

(WebCore::TransformState::mapQuad const):
(WebCore::TransformState::flattenWithTransform):

LayoutTests:

Reviewed by Darin Adler.

  • compositing/tiling/coverage-adjustment-secondary-quad-mapping-expected.txt: Added.
  • compositing/tiling/coverage-adjustment-secondary-quad-mapping.html: Added.
  • platform/ios-wk2/compositing/tiling/coverage-adjustment-secondary-quad-mapping-expected.txt: Added.
  • platform/mac-wk1/compositing/tiling/coverage-adjustment-secondary-quad-mapping-expected.txt: Added.
9:54 AM Changeset in webkit [260370] by Russell Epstein
  • 3 edits in branches/safari-609-branch

Apply patch. rdar://problem/62062357

9:23 AM Changeset in webkit [260369] by Russell Epstein
  • 20 edits in branches/safari-609-branch

Apply patch. rdar://problem/61950472

9:16 AM Changeset in webkit [260368] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[LFC][TFC] Add support for border-collapse: collapse.
https://bugs.webkit.org/show_bug.cgi?id=210747

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/layoutformattingcontext/table-flex-width-border-collapse.html

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::ensureTableGrid):

LayoutTests:

  • fast/layoutformattingcontext/table-flex-width-border-collapse.html: Added.
8:53 AM Changeset in webkit [260367] by Wenson Hsieh
  • 24 edits
    2 adds
    1 delete in trunk

Oversized caret and selection rects in text fields on ganji.com and netflix.com/login
https://bugs.webkit.org/show_bug.cgi?id=210622
<rdar://problem/45945636>

Reviewed by Darin Adler.

Source/WebCore:

Currently, selection and caret rects in text fields on some web pages can be excessively tall. This patch makes
a small adjustment to allow the top of the caret or selection rect to snap to the top of the inline box instead
of being at the end of the previous line, in the case where there is no previous inline box.

In the case where we compute the caret rect for an empty renderer (i.e. no children), we make an additional
tweak so that the caret rect's height is based on the computed font height instead of line height, and then we
ensure that the caret is (logically) vertically centered.

See below for more details.

Test: editing/selection/selection-and-caret-do-not-extend-to-line-height.html

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):

Specify ForHitTesting::Yes when asking for selectionTop().

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):

Use FontMetric's height when computing the height of the caret rect, and then center it vertically in the
renderer.

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::positionForPoint):

Specify ForHitTesting::Yes when asking for selectionTop(). See below for more information.

  • rendering/RenderTextLineBoxes.cpp:

(WebCore::RenderTextLineBoxes::positionForPoint const):

  • rendering/RootInlineBox.cpp:

(WebCore::RootInlineBox::selectionTop const):

When computing selectionTop(), we currently fall back to using the top of the containing RenderBlockFlow
(blockFlow().borderAndPaddingBefore()) in the case where there is no previous root box. However, this can lead
to selection and caret rects being taller than expected; instead, we can use the max of the selectionTop
(that is, the top of the line box, adjusted for annotations) and the top of the RenderBlockFlow. This has the
effect of allowing the caret and selection to visually snap to the top of a run of text, provided there is not
already a line of text that precedes it. Taking the maximum of the two values ensures that we don't
unintentionally make the selection or caret rects even larger, if the line top is above the top of the block.

Note that we also avoid shrinking the selection and caret rects when hit-testing renderers for positions and
ranges. This allows users to still click and drag to select text in the extra line-height area above a piece of
text, even if the selection is only painted over the text (and not in the region containing the line-height).
This behavior was established in the fix for webkit.org/b/14911, and is covered by the layout test
editing/selection/inline-closest-leaf-child.html.

  • rendering/RootInlineBox.h:

Tools:

Rebaseline some expected selection and caret rects in some iOS API tests.

  • TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/ios/AutocorrectionTestsIOS.mm:

(TEST):

  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:

(TestWebKitAPI::TEST):

LayoutTests:

Rebaseline existing tests, and add a new test to verify that caret and selection rects do not extend to match
the line height in empty and non-empty editable elements, in both horizontal and vertical writing modes.

  • editing/selection/ios/absolute-selection-after-scroll-expected.txt:
  • editing/selection/ios/absolute-selection-after-scroll.html:
  • editing/selection/ios/change-selection-after-tapping-focused-element-expected.txt:
  • editing/selection/ios/change-selection-after-tapping-focused-element.html:
  • editing/selection/ios/fixed-selection-after-scroll-expected.txt:
  • editing/selection/ios/fixed-selection-after-scroll.html:
  • editing/selection/ios/selection-after-changing-text-with-callout-menu-expected.txt:
  • editing/selection/ios/selection-after-changing-text-with-callout-menu.html:
  • editing/selection/ios/selection-handles-after-touch-end-expected.txt:
  • editing/selection/ios/update-selection-after-overflow-scroll-expected.txt:
  • editing/selection/ios/update-selection-after-overflow-scroll.html:
  • editing/selection/selection-and-caret-do-not-extend-to-line-height-expected.txt: Added.
  • editing/selection/selection-and-caret-do-not-extend-to-line-height.html: Added.
  • fast/repaint/focus-ring-repaint-expected.txt:
  • platform/ios/editing/selection/ios/selection-handles-after-touch-end-expected.txt: Removed.

Delete this redundant test expectation.

8:32 AM Changeset in webkit [260366] by Darin Adler
  • 471 edits
    2 deletes in trunk

Use #import instead of #include in Objective-C and don't use #pragma once
https://bugs.webkit.org/show_bug.cgi?id=210724

Reviewed by David Kilzer.

Source/JavaScriptCore:

  • API/JSAPIWrapperObject.mm:
  • API/JSContext.h:
  • API/JSContext.mm:
  • API/JSScriptInternal.h:
  • API/JSValue.mm:
  • API/JSVirtualMachine.mm:
  • API/JSVirtualMachinePrivate.h:
  • API/JSWrapperMap.mm:
  • API/ObjCCallbackFunction.mm:
  • API/tests/CurrentThisInsideBlockGetterTest.mm:

More #import, less #pragma once.

Source/WebCore:

  • page/cocoa/SettingsBaseCocoa.mm:

(WebCore::sansSerifTraditionalHanFontFamily): Deleted.
(WebCore::sansSerifSimplifiedHanFontFamily): Deleted.
(WebCore::SettingsBase::initializeDefaultFontFamilies): Just use font name
strings directly since there are no conditionals any more.

  • Modules/applepay/PaymentRequestValidator.mm:
  • Modules/applepay/cocoa/PaymentContactCocoa.mm:
  • accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
  • accessibility/mac/AXObjectCacheMac.mm:
  • accessibility/mac/WebAccessibilityObjectWrapperBase.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.h:
  • bridge/objc/WebScriptObjectPrivate.h:
  • bridge/objc/objc_class.mm:
  • bridge/testbindings.mm:
  • crypto/mac/SerializedCryptoKeyWrapMac.mm:
  • editing/cocoa/WebArchiveResourceFromNSAttributedString.h:
  • editing/cocoa/WebArchiveResourceWebResourceHandler.h:
  • editing/cocoa/WebContentReaderCocoa.mm:
  • history/mac/HistoryItemMac.mm:
  • loader/cocoa/DiskCacheMonitorCocoa.mm:
  • loader/cocoa/SubresourceLoaderCocoa.mm:
  • loader/mac/ResourceLoaderMac.mm:
  • page/cocoa/MemoryReleaseCocoa.mm:
  • page/cocoa/ResourceUsageOverlayCocoa.mm:
  • page/cocoa/ResourceUsageThreadCocoa.mm:
  • page/ios/WebEventRegion.h:
  • page/mac/ChromeMac.mm:
  • page/mac/EventHandlerMac.mm:
  • page/mac/WheelEventDeltaFilterMac.mm:
  • page/scrolling/cocoa/ScrollingStateNode.mm:
  • page/scrolling/mac/ScrollingCoordinatorMac.mm:
  • page/scrolling/mac/ScrollingMomentumCalculatorMac.mm:
  • page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
  • page/scrolling/mac/ScrollingThreadMac.mm:
  • page/scrolling/mac/ScrollingTreeMac.mm:
  • platform/audio/cocoa/MediaSessionManagerCocoa.mm:
  • platform/audio/mac/AudioSampleDataSource.mm:
  • platform/cocoa/DataDetectorsCoreSoftLink.mm:
  • platform/cocoa/PasteboardCocoa.mm:
  • platform/cocoa/ScrollSnapAnimatorState.mm:
  • platform/cocoa/SystemVersion.mm:
  • platform/gamepad/cocoa/GameControllerGamepad.mm:
  • platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
  • platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
  • platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
  • platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
  • platform/graphics/ca/cocoa/WebSystemBackdropLayer.h:
  • platform/graphics/ca/cocoa/WebTiledBackingLayer.h:
  • platform/graphics/ca/cocoa/WebVideoContainerLayer.h:
  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
  • platform/graphics/cocoa/IOSurfacePoolCocoa.mm:
  • platform/graphics/cocoa/TextTrackRepresentationCocoa.mm:
  • platform/graphics/cocoa/WebGLLayer.h:
  • platform/graphics/cocoa/WebGLLayer.mm:
  • platform/graphics/cocoa/WebGPULayer.h:
  • platform/graphics/cocoa/WebGPULayer.mm:
  • platform/graphics/cv/ImageRotationSessionVT.mm:
  • platform/graphics/cv/ImageTransferSessionVT.mm:
  • platform/graphics/cv/TextureCacheCV.mm:
  • platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
  • platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm:
  • platform/graphics/mac/ComplexTextControllerCoreText.mm:
  • platform/graphics/mac/FloatPointMac.mm:
  • platform/graphics/mac/FloatSizeMac.mm:
  • platform/graphics/mac/IntPointMac.mm:
  • platform/graphics/mac/IntSizeMac.mm:
  • platform/graphics/mac/WebLayer.h:
  • platform/graphics/mac/WebLayer.mm:
  • platform/ios/LegacyTileCache.mm:
  • platform/ios/LegacyTileGrid.mm:
  • platform/ios/LegacyTileGridTile.mm:
  • platform/ios/LegacyTileLayer.h:
  • platform/ios/LegacyTileLayer.mm:
  • platform/ios/LegacyTileLayerPool.mm:
  • platform/ios/LocalCurrentTraitCollection.mm:
  • platform/ios/LocalizedDeviceModel.mm:
  • platform/ios/ScrollbarThemeIOS.mm:
  • platform/ios/WebCoreMotionManager.h:
  • platform/ios/WebItemProviderPasteboard.mm:
  • platform/ios/WebVideoFullscreenControllerAVKit.h:
  • platform/mac/LocalCurrentGraphicsContext.mm:
  • platform/mac/LocalDefaultSystemAppearance.mm:
  • platform/mac/LoggingMac.mm:
  • platform/mac/PlatformEventFactoryMac.mm:
  • platform/mac/RemoteCommandListenerMac.mm:
  • platform/mac/ScrollAnimatorMac.mm:
  • platform/mac/SerializedPlatformDataCueMac.mm:
  • platform/mac/WebCoreFullScreenPlaceholderView.mm:
  • platform/mac/WebCoreFullScreenWarningView.h:
  • platform/mac/WebCoreFullScreenWarningView.mm:
  • platform/mac/WebCoreFullScreenWindow.h:
  • platform/mac/WebCoreObjCExtras.mm:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
  • platform/mediasession/mac/MediaSessionInterruptionProviderMac.mm:
  • platform/mediastream/ios/AVAudioSessionCaptureDevice.mm:
  • platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.mm:
  • platform/mediastream/mac/RealtimeVideoUtilities.mm:
  • platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
  • platform/network/cocoa/CertificateInfoCocoa.mm:
  • platform/network/cocoa/WebCoreNSURLSession.h:
  • platform/network/mac/BlobDataFileReferenceMac.mm:
  • platform/network/mac/CredentialStorageMac.mm:
  • platform/network/mac/SynchronousLoaderClient.mm:
  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
  • platform/text/cocoa/LocaleCocoa.mm:
  • testing/ServiceWorkerInternals.mm:
  • testing/cocoa/WebViewVisualIdentificationOverlay.h:

More #import, less #pragma once.

Source/WebCore/PAL:

  • pal/cocoa/AppSSOSoftLink.mm:
  • pal/cocoa/FileSizeFormatterCocoa.mm:
  • pal/cocoa/UsageTrackingSoftLink.mm:
  • pal/ios/ManagedConfigurationSoftLink.mm:
  • pal/ios/UIKitSoftLink.mm:
  • pal/mac/LookupSoftLink.mm:
  • pal/spi/cocoa/AVFoundationSPI.h:
  • pal/spi/cocoa/AccessibilitySupportSoftLink.cpp:
  • pal/spi/cocoa/AppSSOSPI.h:
  • pal/spi/cocoa/AuthKitSPI.h:
  • pal/spi/cocoa/DataDetectorsCoreSPI.h:
  • pal/spi/cocoa/LaunchServicesSPI.h:
  • pal/spi/cocoa/NSAccessibilitySPI.h:
  • pal/spi/cocoa/NSAttributedStringSPI.h:
  • pal/spi/cocoa/NSProgressSPI.h:
  • pal/spi/cocoa/NSURLDownloadSPI.h:
  • pal/spi/cocoa/NSUserDefaultsSPI.h:
  • pal/spi/cocoa/NSXPCConnectionSPI.h:
  • pal/spi/cocoa/PassKitSPI.h:
  • pal/spi/cocoa/SecKeyProxySPI.h:
  • pal/spi/ios/CelestialSPI.h:
  • pal/spi/mac/DataDetectorsSPI.h:
  • pal/spi/mac/NSColorWellSPI.h:
  • pal/spi/mac/NSGraphicsSPI.h:
  • pal/spi/mac/NSPopoverColorWellSPI.h:
  • pal/spi/mac/NSScrollerImpSPI.h:

More #import, less #pragma once.

Source/WebKit:

  • mac/MigrateHeadersFromWebKitLegacy.make: Delete stale MemoryMeasure.h

forwarding header from incremental WebKit builds and ignore when generating
new forwarding headers.

  • Platform/foundation/LoggingFoundation.mm:

(WebKit::logLevelString): Use string directly instead of a named constant.

  • UIProcess/mac/WebColorPickerMac.h: Mark class final.
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
  • NetworkProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm:
  • NetworkProcess/cache/NetworkCacheDataCocoa.mm:
  • NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
  • NetworkProcess/cocoa/NetworkActivityTrackerCocoa.mm:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:
  • NetworkProcess/webrtc/NetworkRTCProvider.mm:
  • Platform/spi/Cocoa/DeviceManagementSPI.h:
  • Platform/spi/Cocoa/LocalAuthenticationSPI.h:
  • Platform/spi/Cocoa/NearFieldSPI.h:
  • Platform/spi/Cocoa/SafeBrowsingSPI.h:
  • Platform/spi/mac/AppKitSPI.h:
  • Shared/API/Cocoa/RemoteObjectInvocation.mm:
  • Shared/API/Cocoa/WKMain.mm:
  • Shared/APIWebArchive.mm:
  • Shared/APIWebArchiveResource.mm:
  • Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.mm:
  • Shared/Cocoa/LoadParametersCocoa.mm:
  • Shared/Cocoa/SandboxInitialiationParametersCocoa.mm:
  • Shared/Cocoa/WKNSData.mm:
  • Shared/DocumentEditingContext.mm:
  • Shared/Plugins/mac/PluginSandboxProfile.mm:
  • Shared/RemoteLayerTree/WKAnimationDelegate.h:
  • Shared/UserInterfaceIdiom.mm:
  • Shared/ios/WebIconUtilities.mm:
  • Shared/mac/CodeSigning.mm:
  • Shared/mac/ColorSpaceData.mm:
  • Shared/mac/HangDetectionDisablerMac.mm:
  • Shared/mac/PDFKitImports.mm:
  • UIProcess/API/Cocoa/APIContentRuleListStoreCocoa.mm:
  • UIProcess/API/Cocoa/APIHTTPCookieStoreCocoa.mm:
  • UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm:
  • UIProcess/API/Cocoa/WKContentRuleList.mm:
  • UIProcess/API/Cocoa/WKMenuItemIdentifiers.mm:
  • UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
  • UIProcess/API/Cocoa/WKPreviewActionItemIdentifiers.mm:
  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/API/Cocoa/WKWebpagePreferencesInternal.h:
  • UIProcess/API/Cocoa/_WKApplicationManifest.h:
  • UIProcess/API/Cocoa/_WKAttachment.h:
  • UIProcess/API/Cocoa/_WKResourceLoadInfoInternal.h:
  • UIProcess/API/Cocoa/_WKResourceLoadStatisticsFirstPartyInternal.h:
  • UIProcess/API/Cocoa/_WKResourceLoadStatisticsThirdPartyInternal.h:
  • UIProcess/API/Cocoa/_WKTextManipulationExclusionRule.mm:
  • UIProcess/API/Cocoa/_WKUserContentFilter.mm:
  • UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponseInternal.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanelInternal.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreDelegate.h:
  • UIProcess/Authentication/mac/WebCredentialMac.mm:
  • UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm:
  • UIProcess/Cocoa/IconLoadingDelegate.mm:
  • UIProcess/Cocoa/MediaUtilities.mm:
  • UIProcess/Cocoa/PreferenceObserver.h:
  • UIProcess/Cocoa/PreferenceObserver.mm:
  • UIProcess/Cocoa/SOAuthorization/NavigationSOAuthorizationSession.mm:
  • UIProcess/Cocoa/SOAuthorization/SOAuthorizationNSURLExtras.h:
  • UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm:
  • UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.h:
  • UIProcess/Cocoa/WKEditCommand.h:
  • UIProcess/Cocoa/WKFullKeyboardAccessWatcher.h:
  • UIProcess/Cocoa/WebPageProxyCocoa.mm:
  • UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm:
  • UIProcess/Inspector/mac/WKInspectorViewController.h:
  • UIProcess/Inspector/mac/WKInspectorWKWebView.h:
  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h:
  • UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
  • UIProcess/RemoteLayerTree/mac/ScrollerMac.mm:
  • UIProcess/RemoteLayerTree/mac/ScrollerPairMac.mm:
  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
  • UIProcess/WebAuthentication/Cocoa/WKNFReaderSessionDelegate.h:
  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
  • UIProcess/ios/WKDeferringGestureRecognizer.h:
  • UIProcess/ios/WKHighlightLongPressGestureRecognizer.h:
  • UIProcess/ios/WebDataListSuggestionsDropdownIOS.h:
  • UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm:
  • UIProcess/ios/forms/WKDatePickerViewController.h:
  • UIProcess/ios/forms/WKDatePickerViewController.mm:
  • UIProcess/ios/forms/WKFocusedFormControlView.h:
  • UIProcess/ios/forms/WKFocusedFormControlView.mm:
  • UIProcess/ios/forms/WKFormColorPicker.mm:
  • UIProcess/ios/forms/WKNumberPadViewController.h:
  • UIProcess/ios/forms/WKNumberPadViewController.mm:
  • UIProcess/ios/forms/WKQuickboardListViewController.h:
  • UIProcess/ios/forms/WKQuickboardListViewController.mm:
  • UIProcess/ios/forms/WKSelectMenuListViewController.h:
  • UIProcess/ios/forms/WKTimePickerViewController.h:
  • UIProcess/ios/forms/WKTimePickerViewController.mm:
  • UIProcess/ios/fullscreen/WKFullScreenViewController.h:
  • UIProcess/ios/fullscreen/WKFullscreenStackView.h:
  • UIProcess/ios/fullscreen/WKFullscreenStackView.mm:
  • UIProcess/mac/PageClientImplMac.mm:
  • UIProcess/mac/WKSharingServicePickerDelegate.h:
  • WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm:
  • WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.h:
  • WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
  • WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteTiledBacking.cpp:
  • WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.h:
  • WebProcess/WebPage/mac/PageBannerMac.mm:
  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h:
  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.h:
  • WebProcess/cocoa/WebProcessCocoa.mm:

More #import, less #pragma once.

Source/WebKitLegacy:

  • WebKitLegacy.xcodeproj/project.pbxproj: Removed MemoryMeasure.h/mm.

Source/WebKitLegacy/ios:

  • Misc/MemoryMeasure.h: Removed.
  • Misc/MemoryMeasure.mm: Removed.
  • WebKit.iOS.exp: Removed MemoryMeasure symbols.

Source/WebKitLegacy/mac:

  • Configurations/WebKitLegacy.xcconfig: Removed MemoryMeasure.h from

EXCLUDED_SOURCE_FILE_NAMES.

  • Misc/WebCache.mm:

(+[WebCache emptyInMemoryResources]): Removed invocation of MemoryMeasure.
This is no longer used for anything.

  • History/BackForwardList.mm:
  • Plugins/Hosted/ProxyRuntimeObject.mm:
  • Plugins/Hosted/WebHostedNetscapePluginView.mm:
  • WebCoreSupport/SearchPopupMenuMac.mm:
  • WebCoreSupport/WebAlternativeTextClient.mm:
  • WebCoreSupport/WebSecurityOriginInternal.h:
  • WebInspector/WebInspector.mm:
  • WebView/WebFramePrivate.h:
  • WebView/WebScriptWorld.h:
  • WebView/WebView.mm:

More #import, less #pragma once.

Source/WTF:

  • wtf/cocoa/Entitlements.mm:
  • wtf/cocoa/FileSystemCocoa.mm:
  • wtf/cocoa/MainThreadCocoa.mm:
  • wtf/cocoa/SystemTracingCocoa.cpp:
  • wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
  • wtf/mac/SchedulePairMac.mm:
  • wtf/text/cocoa/StringCocoa.mm:
  • wtf/text/cocoa/TextStreamCocoa.mm:

More #import.

Tools:

  • DumpRenderTree/TestNetscapePlugIn/PluginObjectMac.mm:
  • DumpRenderTree/ios/DumpRenderTreeAppMain.mm:
  • DumpRenderTree/mac/AccessibilityCommonMac.h:
  • DumpRenderTree/mac/DumpRenderTreeMain.mm:
  • TestRunnerShared/cocoa/ClassMethodSwizzler.mm:
  • TestRunnerShared/cocoa/InstanceMethodSwizzler.mm:
  • TestRunnerShared/cocoa/LayoutTestSpellChecker.h:
  • TestRunnerShared/mac/NSPasteboardAdditions.h:
  • TestRunnerShared/spi/AppKitTestSPI.h:
  • TestRunnerShared/spi/PencilKitTestSPI.h:
  • TestWebKitAPI/DataDetectorsCoreSPI.h:
  • TestWebKitAPI/EditingTestHarness.h:
  • TestWebKitAPI/EditingTestHarness.mm:
  • TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm:
  • TestWebKitAPI/Tests/WebCore/LineBreaking.mm:
  • TestWebKitAPI/Tests/WebCore/cocoa/AVFoundationSoftLinkTest.mm:
  • TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm:
  • TestWebKitAPI/Tests/WebKit/AGXCompilerService.mm:
  • TestWebKitAPI/Tests/WebKit/AccessibilityRemoteUIApp.mm:
  • TestWebKitAPI/Tests/WebKit/BacklightLevelNotification.mm:
  • TestWebKitAPI/Tests/WebKit/Battery.mm:
  • TestWebKitAPI/Tests/WebKit/DeferredViewInWindowStateChange.mm:
  • TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm:
  • TestWebKitAPI/Tests/WebKit/FindMatches.mm:
  • TestWebKitAPI/Tests/WebKit/GrantAccessToMobileAssets.mm:
  • TestWebKitAPI/Tests/WebKit/GrantAccessToPreferencesService.mm:
  • TestWebKitAPI/Tests/WebKit/LocalizedDeviceModel.mm:
  • TestWebKitAPI/Tests/WebKit/MimeTypes.mm:
  • TestWebKitAPI/Tests/WebKit/NoHistoryItemScrollToFragment.mm:
  • TestWebKitAPI/Tests/WebKit/PasteboardNotifications.mm:
  • TestWebKitAPI/Tests/WebKit/PictureInPictureSupport.mm:
  • TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm:
  • TestWebKitAPI/Tests/WebKit/SleepDisabler.mm:
  • TestWebKitAPI/Tests/WebKit/ViewportSizeForViewportUnits.mm:
  • TestWebKitAPI/Tests/WebKit/WKThumbnailView.mm:
  • TestWebKitAPI/Tests/WebKit/WebFilter.mm:
  • TestWebKitAPI/Tests/WebKit/mac/AttributedSubstringForProposedRangeWithImage.mm:
  • TestWebKitAPI/Tests/WebKit/mac/ContextMenuDownload.mm:
  • TestWebKitAPI/Tests/WebKit/mac/CustomBundleObject.h:
  • TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter.mm:
  • TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter_Bundle.mm:
  • TestWebKitAPI/Tests/WebKit/mac/EditorCommands.mm:
  • TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle.mm:
  • TestWebKitAPI/Tests/WebKit/mac/ForceLightAppearanceInBundle_Bundle.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/CloseWebViewAfterEnterFullscreen.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/CloseWebViewDuringEnterFullscreen.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/CookieAcceptPolicy.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/CookiePrivateBrowsing.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/CopyRTF.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/CopyURL.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/CustomUserAgent.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/DataDetection.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/DeviceManagementRestrictions.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/DoAfterNextPresentationUpdateAfterCrash.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/EditorStateTests.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/FindInPageAPI.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/FirstVisuallyNonEmptyMilestone.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/FixedLayoutSize.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenAlert.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenLayoutConstraints.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/InteractionDeadlockAfterCrash.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/JavaScriptDuringNavigation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/LoadFileThenReload.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/LoadFileURL.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/MediaBufferingPolicy.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/MediaType.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ModalAlerts.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/NavigationAction.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/NetworkProcessCrashNonPersistentDataStore.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/NoPauseWhenSwitchingTabs.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/NowPlayingControlsTests.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ObservedRenderingProgressEventsAfterCrash.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/OpenAndCloseWindow.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/OverrideViewportArguments.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/PageZoom.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenTests.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/PasteRTFD.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspendMediaBuffering.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ReparentWebViewTimeout.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ShouldGoToBackForwardListItem.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ShouldOpenExternalURLsInNewWindowActions.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ShrinkToFit.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/StopSuspendResumeAllMedia.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/SystemColors.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/TabOutOfWebView.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/TestURLSchemeHandler.h:
  • TestWebKitAPI/Tests/WebKitCocoa/TestURLSchemeHandler.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/TextSize.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/TextWidth.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/TopContentInset.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/UserInitiatedActionInNavigationAction.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/VideoQualityDisplayCompositing.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFindString.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/_WKInputDelegate.mm:
  • TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm:
  • TestWebKitAPI/Tests/WebKitLegacy/mac/AccessingPastedImage.mm:
  • TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm:
  • TestWebKitAPI/Tests/ios/DataDetectorsTestIOS.mm:
  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
  • TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
  • TestWebKitAPI/Tests/ios/OverflowScrollViewTests.mm:
  • TestWebKitAPI/Tests/ios/RenderingProgressTests.mm:
  • TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm:
  • TestWebKitAPI/Tests/ios/ScrollViewScrollabilityTests.mm:
  • TestWebKitAPI/Tests/ios/SelectionByWord.mm:
  • TestWebKitAPI/Tests/ios/SelectionModifyByParagraphBoundary.mm:
  • TestWebKitAPI/Tests/ios/TestInputDelegate.h:
  • TestWebKitAPI/Tests/ios/TestInputDelegate.mm:
  • TestWebKitAPI/Tests/ios/TextAutosizingBoost.mm:
  • TestWebKitAPI/Tests/ios/UIPasteboardTests.mm:
  • TestWebKitAPI/Tests/ios/WKScrollViewTests.mm:
  • TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm:
  • TestWebKitAPI/Tests/ios/WKWebViewPausePlayingAudioTests.mm:
  • TestWebKitAPI/Tests/mac/AcceptsFirstMouse.mm:
  • TestWebKitAPI/Tests/mac/AdditionalSupportedImageTypes.mm:
  • TestWebKitAPI/Tests/mac/BackForwardList.mm:
  • TestWebKitAPI/Tests/mac/BackgroundColor.mm:
  • TestWebKitAPI/Tests/mac/CandidateTests.mm:
  • TestWebKitAPI/Tests/mac/DOMHTMLTableCellCellAbove.mm:
  • TestWebKitAPI/Tests/mac/DeviceScaleFactorOnBack.mm:
  • TestWebKitAPI/Tests/mac/DynamicDeviceScaleFactor.mm:
  • TestWebKitAPI/Tests/mac/HTMLCollectionNamedItem.mm:
  • TestWebKitAPI/Tests/mac/HTMLFormCollectionNamedItem.mm:
  • TestWebKitAPI/Tests/mac/IsNavigationActionTrusted.mm:
  • TestWebKitAPI/Tests/mac/LegacyDragAndDropTests.mm:
  • TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm:
  • TestWebKitAPI/Tests/mac/SSLKeyGenerator.mm:
  • TestWebKitAPI/Tests/mac/SetAndUpdateCacheModel.mm:
  • TestWebKitAPI/Tests/mac/SetDocumentURI.mm:
  • TestWebKitAPI/Tests/mac/SimplifyMarkup.mm:
  • TestWebKitAPI/Tests/mac/SubresourceErrorCrash.mm:
  • TestWebKitAPI/Tests/mac/TypingStyleCrash.mm:
  • TestWebKitAPI/Tests/mac/WKWebViewMacEditingTests.mm:
  • TestWebKitAPI/Tests/mac/WebScriptObjectDescription.mm:
  • TestWebKitAPI/Tests/mac/WindowlessWebViewWithMedia.mm:
  • TestWebKitAPI/cocoa/DragAndDropSimulator.h:
  • TestWebKitAPI/cocoa/NSItemProviderAdditions.h:
  • TestWebKitAPI/cocoa/PlatformUtilitiesCocoa.mm:
  • TestWebKitAPI/cocoa/TestContextMenuDriver.h:
  • TestWebKitAPI/cocoa/TestNavigationDelegate.h:
  • TestWebKitAPI/cocoa/TestProtocol.mm:
  • TestWebKitAPI/cocoa/TestUIDelegate.h:
  • TestWebKitAPI/cocoa/UtilitiesCocoa.mm:
  • TestWebKitAPI/ios/PencilKitTestSPI.h:
  • TestWebKitAPI/mac/JavaScriptTestMac.mm:
  • TestWebKitAPI/mac/NSFontPanelTesting.h:
  • TestWebKitAPI/mac/NSFontPanelTesting.mm:
  • TestWebKitAPI/mac/OffscreenWindow.h:
  • TestWebKitAPI/mac/PlatformUtilitiesMac.mm:
  • TestWebKitAPI/mac/TestBrowsingContextLoadDelegate.mm:
  • TestWebKitAPI/mac/TestDraggingInfo.h:
  • TestWebKitAPI/mac/TestFilePromiseReceiver.h:
  • TestWebKitAPI/mac/TestFontOptions.h:
  • TestWebKitAPI/mac/TestInspectorBar.h:
  • TestWebKitAPI/mac/WebKitAgnosticTest.mm:
  • WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.h:
  • WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.h:
  • WebKitTestRunner/mac/PoseAsClass.mm:

More #import, less #pragma once.

8:24 AM Changeset in webkit [260365] by Diego Pino Garcia
  • 2 edits in trunk/Tools

[Flatpak SDK] Prevent exception when calling git in a non-git repository
https://bugs.webkit.org/show_bug.cgi?id=210737

Reviewed by Philippe Normand.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.is_branch_build): Return false if command executes in a
non-git repository (i.e SVN).

7:37 AM Changeset in webkit [260364] by youenn@apple.com
  • 9 edits
    8 adds in trunk

Safari doesn't apply frameRate limit when request stream from Camera
https://bugs.webkit.org/show_bug.cgi?id=210186
<rdar://problem/61452794>

Reviewed by Eric Carlson.

Source/WebCore:

Add support to RealtimeVideoSource to decimate the video samples based on the observed frame rate of its capture source.
This allows supporting two tracks using the same capture device, one track being low frame rate and the other one high frame rate.

Clean-up refactoring to make RealtimeVideoSource directly inherit from RealtimeVideoCaptureSource.
Migrate size and format of frame adaptation from RealtimeVideoCaptureSource to RealtimeVideoSource.
Fix mock capture source to update its frame rate when asked by applyConstraints.

Tests: fast/mediastream/mediastreamtrack-video-frameRate-clone-decreasing.html

fast/mediastream/mediastreamtrack-video-frameRate-clone-increasing.html
fast/mediastream/mediastreamtrack-video-frameRate-decreasing.html
fast/mediastream/mediastreamtrack-video-frameRate-increasing.html

  • platform/mediastream/RealtimeVideoCaptureSource.cpp:

(WebCore::RealtimeVideoCaptureSource::dispatchMediaSampleToObservers):
(WebCore::RealtimeVideoCaptureSource::clientUpdatedSizeAndFrameRate):

  • platform/mediastream/RealtimeVideoCaptureSource.h:

(WebCore::RealtimeVideoCaptureSource::observedFrameRate const):

  • platform/mediastream/RealtimeVideoSource.cpp:

(WebCore::RealtimeVideoSource::RealtimeVideoSource):
(WebCore::m_source):
(WebCore::RealtimeVideoSource::adaptVideoSample):
(WebCore::RealtimeVideoSource::videoSampleAvailable):

  • platform/mediastream/RealtimeVideoSource.h:
  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::setFrameRateWithPreset):

  • testing/Internals.cpp:

(WebCore::Internals::observeMediaStreamTrack):

LayoutTests:

  • fast/mediastream/mediastreamtrack-video-frameRate-clone-decreasing-expected.txt: Added.
  • fast/mediastream/mediastreamtrack-video-frameRate-clone-decreasing.html: Added.
  • fast/mediastream/mediastreamtrack-video-frameRate-clone-increasing-expected.txt: Added.
  • fast/mediastream/mediastreamtrack-video-frameRate-clone-increasing.html: Added.
  • fast/mediastream/mediastreamtrack-video-framerate-decreasing-expected.txt: added.
  • fast/mediastream/mediastreamtrack-video-framerate-decreasing.html: added.
  • fast/mediastream/mediastreamtrack-video-framerate-increasing-expected.txt: added.
  • fast/mediastream/mediastreamtrack-video-framerate-increasing.html: added.
  • webrtc/routines.js:
5:29 AM Changeset in webkit [260363] by Philippe Normand
  • 2 edits in trunk/Tools

[Flatpak SDK] Drive-by fixes
https://bugs.webkit.org/show_bug.cgi?id=210557

Reviewed by Žan Doberšek.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox): Properly format error message.
(WebkitFlatpak.main): Show flatpak update output.

5:10 AM Changeset in webkit [260362] by keith_miller@apple.com
  • 2 edits in trunk/JSTests

Unreviewed, revert accidental test changes.

  • microbenchmarks/for-of-iterate-array-entries.js:

(foo):

5:01 AM Changeset in webkit [260361] by commit-queue@webkit.org
  • 2 edits in trunk/JSTests

[32-bits] stress/for-of-array-different-globals.js is failing
https://bugs.webkit.org/show_bug.cgi?id=210718

Unreviewed gardening.

Skip test for arm and mips, failing due to r260323

Patch by Paulo Matos <Paulo Matos> on 2020-04-20

  • stress/for-of-array-different-globals.js:
4:56 AM Changeset in webkit [260360] by graouts@webkit.org
  • 3 edits
    2 adds in trunk

WebAnimations API doesn't properly apply keyframe easings to transforms
https://bugs.webkit.org/show_bug.cgi?id=210526
<rdar://problem/61800424>

Reviewed by Antti Koivisto.

Source/WebCore:

GraphicsLayerCA has code that determines whether an animation can be accelerated looking at the timing function of its keyframes and excluding
animations that use a steps timing function as one of its values. However, we we would fail to set the timing function on the KeyframeValue for
each keyframe in the KeyframeList we create for a JS-originated animation. We now do this correctly.

Test: webanimations/transform-animation-with-steps-timing-function-not-accelerated.html

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::updateBlendingKeyframes):

LayoutTests:

Add a new test that checks that an animation targeting an accelerted property does not yield an accelerated animation if one of its keyframes contains a steps timing function.

  • webanimations/transform-animation-with-steps-timing-function-not-accelerated-expected.txt: Added.
  • webanimations/transform-animation-with-steps-timing-function-not-accelerated.html: Added.
3:22 AM Changeset in webkit [260359] by Pablo Saavedra
  • 2 edits in trunk/Source/WebKit

[GTK][WPE] lowWatermarkPages() in MemoryPressureMonitor.cpp only searches the "low" value inside the first "Node" section
https://bugs.webkit.org/show_bug.cgi?id=210345

Reviewed by Adrian Perez de Castro.

  • UIProcess/linux/MemoryPressureMonitor.cpp:

(WebKit::lowWatermarkPages):

2:54 AM Changeset in webkit [260358] by ysuzuki@apple.com
  • 13 edits in trunk

StructuredClone algorithm should be aware of BigInt
https://bugs.webkit.org/show_bug.cgi?id=210728

Reviewed by Mark Lam.

LayoutTests/imported/w3c:

  • web-platform-tests/IndexedDB/bigint_value-expected.txt:
  • web-platform-tests/html/infrastructure/safe-passing-of-structured-data/structured_clone_bigint-expected.txt:

Source/JavaScriptCore:

  • CMakeLists.txt:
  • runtime/BigIntObject.h:
  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::digit): Deleted.
(JSC::JSBigInt::setDigit): Deleted.

  • runtime/JSBigInt.h:

(JSC::JSBigInt::digit):
(JSC::JSBigInt::setDigit):

Source/WebCore:

This patch adds structured-cloning for BigInt and BigIntObject.
The logic is adding BigIntTag & BigIntObjectTag. And then we put content of BigInt with length.
And deserialization reads them to reconstruct BigInt or BigIntObject.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::dumpImmediate):
(WebCore::CloneSerializer::dumpBigIntData):
(WebCore::CloneSerializer::dumpBigInt32Data):
(WebCore::CloneSerializer::dumpHeapBigIntData):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneDeserializer::readBigInt):
(WebCore::CloneDeserializer::readTerminal):

LayoutTests:

  • inspector/model/remote-object/number-expected.txt:
  • inspector/model/remote-object/object-expected.txt:
2:20 AM Changeset in webkit [260357] by svillar@igalia.com
  • 2 edits in trunk/Tools

[WebXR][WPE] Let XR_RUNTIME_JSON environment variable go through for testing
https://bugs.webkit.org/show_bug.cgi?id=210738

Reviewed by Žan Doberšek.

The OpenXR loader might be instructed to load a specific runtime by
using the XR_RUNTIME_JSON environment variable. Let it get in for testing.

  • Scripts/webkitpy/port/wpe.py:

(WPEPort.setup_environ_for_server): Copy XR_RUNTIME_JSON if set.

1:33 AM Changeset in webkit [260356] by Carlos Garcia Campos
  • 21 edits in trunk

[GTK][WPE] Enable resource load statistics
https://bugs.webkit.org/show_bug.cgi?id=210184

Reviewed by Žan Doberšek.

.:

Enable resource load statistics.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:

Source/WebCore:

  • platform/network/soup/NetworkStorageSessionSoup.cpp:

(WebCore::NetworkStorageSession::setCookiesFromDOM const): Return early if cookies are blocked and update the
persistent cookies expiration if needed.
(WebCore::NetworkStorageSession::deleteCookiesForHostnames): Implement this when receiving
IncludeHttpOnlyCookies parameter.
(WebCore::NetworkStorageSession::hasCookies const): Implement this.
(WebCore::NetworkStorageSession::getRawCookies const): Honor shouldAskITP parameter.
(WebCore::cookiesForSession): Ditto.
(WebCore::NetworkStorageSession::cookiesForDOM const): Ditto.
(WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const): Ditto.

Source/WebKit:

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::create): Pass page and frame identifiers to the constructor.
(WebKit::NetworkDataTask::isThirdPartyRequest const): Moved from NetworkDataTaskCocoa.mm.
(WebKit::NetworkDataTask::restrictRequestReferrerToOriginIfNeeded): Ditto.

  • NetworkProcess/NetworkDataTask.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup): Initialize m_frameID and m_pageID.
(WebKit::NetworkDataTaskSoup::createRequest): Add WasBlockingCookies parameter. Call
restrictRequestReferrerToOriginIfNeeded() and disable cookies in the soup message if cookies should be blocked.
(WebKit::NetworkDataTaskSoup::clearRequest): Reset m_isBlockingCookies.
(WebKit::NetworkDataTaskSoup::continueHTTPRedirection): Pass WasBlockingCookies to createRequest().

  • NetworkProcess/soup/NetworkDataTaskSoup.h:
  • UIProcess/API/C/WKPage.cpp:

(WKPageLoadedThirdPartyDomains): Added for tests.
(WKPageClearLoadedThirdPartyDomains): Ditto.

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/glib/WebsiteDataStoreGLib.cpp:

(WebKit::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): Use lowercase for consistency with other
default directories.

Tools:

Implement TestController::loadedThirdPartyDomains() and TestController::clearLoadedThirdPartyDomains() for
non-cocoa ports.

  • WebKitTestRunner/TestController.cpp:

(WTR::LoadedThirdPartyDomainsCallbackContext::LoadedThirdPartyDomainsCallbackContext):
(WTR::loadedThirdPartyDomainsCallback):
(WTR::TestController::loadedThirdPartyDomains):
(WTR::TestController::clearLoadedThirdPartyDomains):

LayoutTests:

Unskip tests that are now passing and add expectations for the two reminaing failures.

  • http/tests/resourceLoadStatistics/loaded-registrable-domains-get-reported.html: Use setTimeout in onload

handler to avoid a deadlock due to sync injected bundle messages.

  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
1:25 AM Changeset in webkit [260355] by ddkilzer@apple.com
  • 3 edits in trunk/Tools

check-webkit-style should not complain about missing config.h header in WebKitLegacy source files
<https://webkit.org/b/210734>

Reviewed by Darin Adler.

  • Scripts/webkitpy/style/checkers/cpp.py:

(_NO_CONFIG_H_PATH_PATTERNS):

  • Add 'Source/WebKitLegacy/' to the list.
  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(OrderOfIncludesTest.test_primary_header):

  • Add test for Source/WebKitLegacy source file.
12:11 AM Changeset in webkit [260354] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (r259610): Leak of RBSAssertionInvalidationCallbackType due to missing -dealloc
<https://webkit.org/b/210711>
<rdar://problem/61993361>

Reviewed by Geoffrey Garen.

  • UIProcess/ios/ProcessAssertionIOS.mm:

(-[WKRBSAssertionDelegate dealloc]): Add.

  • Release _invalidationCallback to fix the leak.

Apr 19, 2020:

11:32 PM Changeset in webkit [260353] by Simon Fraser
  • 6 edits in trunk/Source/WebCore

Use Optional<FloatQuad> in TransformState
https://bugs.webkit.org/show_bug.cgi?id=144226

Reviewed by Sam Weinig.

Use Optional<> instead of pointers in TransformState, make it loggable, make FloatQuad loggable.

  • platform/graphics/FloatQuad.cpp:

(WebCore::operator<<):

  • platform/graphics/FloatQuad.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::flushCompositingState):
(WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect const):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):

  • platform/graphics/transforms/TransformState.cpp:

(WebCore::TransformState::operator=):
(WebCore::TransformState::mappedSecondaryQuad const):
(WebCore::TransformState::setLastPlanarSecondaryQuad):
(WebCore::TransformState::flattenWithTransform):
(WebCore::operator<<):

  • platform/graphics/transforms/TransformState.h:

(WebCore::TransformState::setSecondaryQuad):
(WebCore::TransformState::lastPlanarSecondaryQuad const):
(WebCore::TransformState::isMappingSecondaryQuad const):
(WebCore::TransformState::accumulatedTransform const):

11:30 PM Changeset in webkit [260352] by ysuzuki@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed, skip imported/w3c/web-platform-tests/IndexedDB/structured-clone
https://bugs.webkit.org/show_bug.cgi?id=210731#c4

Skipping this test based on the following rationales.

  1. This test was previously *effectively* skipped because it is including BigInt syntax. This test immediately throws SyntaxError. So nothing in this test was executed before.
  2. Now JSC supports BigInt syntax. Then, this test is now executed finally. And crash happens when deserializaing DOMMatrixReadOnly.
  3. This is because DOMMatrixReadOnly requires JSDOMGlobalObject since DOMMatrixReadOnly is WebCore object, not JSC object.
  4. However, IDBSerializationContext.cpp is using plain JSGlobalObject. This is not correct since it is JSC JSGlobalObject and it does not include DOMMatrix implementations.
  5. So, nothing is related to BigInt here.
11:20 PM Changeset in webkit [260351] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Remove unneeded code from FrameLoader::loadURL
https://bugs.webkit.org/show_bug.cgi?id=210696

Patch by Rob Buis <rbuis@igalia.com> on 2020-04-19
Reviewed by Darin Adler.

Remove unneeded code from FrameLoader::loadURL, since the only way the load type can be Reload
is if loadFrameRequest set it, and the only way loadFrameRequest can set it is if cachePolicy
is ReloadIgnoringCacheData, so no need to set it again in FrameLoader::loadURL.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):

10:55 PM Changeset in webkit [260350] by beidson@apple.com
  • 37 edits
    1 add in trunk

Add WKScriptMessageHandler API that asynchronously responds with a promise.
rdar://problem/57243492 and https://bugs.webkit.org/show_bug.cgi?id=206398

Reviewed by Andy Estes.
Source/WebCore:

Covered by new API tests.

Updated for moving an #include into implementation files:

  • bindings/js/JSDOMPromiseDeferred.cpp:
  • bindings/js/JSDOMPromiseDeferred.h:
  • html/HTMLMediaElement.cpp:
  • page/DOMWindow.cpp:
  • workers/service/ServiceWorkerGlobalScope.cpp:
  • page/UserMessageHandler.cpp:

(WebCore::UserMessageHandler::postMessage): Return a promise to be fulfilled by the API client.

  • page/UserMessageHandler.h:
  • page/UserMessageHandler.idl:
  • page/UserMessageHandlerDescriptor.h:

Source/WebKit:

Change webkit.messageHandlers.<name>.postMessage() to return a promise instead of undefined.

Allow for that promise to be resolved by an asynchronous reply block up in the API client.
This is like the spiritual opposite version of [WKWebView callAsyncFunction:...]

And while we're adding a new script message handler variant, we're adding it sandboxed by WKContentWorld.

  • Shared/API/APISerializedScriptValue.h:
  • UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm:

(API::validateObject):
(API::coreValueFromNSObject):
(API::SerializedScriptValue::createFromNSObject):
(API::SerializedScriptValue::wireBytesFromNSObject): Deleted.

  • UIProcess/API/Cocoa/WKScriptMessage.h: Now that script message handlers can be per-world, messages declare which world they were posted from.
  • UIProcess/API/Cocoa/WKScriptMessage.mm:

(-[WKScriptMessage _initWithBody:webView:frameInfo:name:world:]):
(-[WKScriptMessage world]):
(-[WKScriptMessage _initWithBody:webView:frameInfo:name:]): Deleted.

  • UIProcess/API/Cocoa/WKScriptMessageInternal.h:
  • UIProcess/API/Cocoa/WKScriptMessageHandlerWithReply.h: Added. Declare the new protocol for a script message handler that can reply to messages asynchronously.
  • UIProcess/API/Cocoa/WKUserContentController.h:
  • UIProcess/API/Cocoa/WKUserContentController.mm:

(-[WKUserContentController _addScriptMessageHandler:]):
(-[WKUserContentController addScriptMessageHandler:name:]):
(-[WKUserContentController addScriptMessageHandler:contentWorld:name:]):
(-[WKUserContentController addScriptMessageHandlerWithReply:contentWorld:name:]):
(-[WKUserContentController removeScriptMessageHandlerForName:contentWorld:]):
(-[WKUserContentController removeAllScriptMessageHandlersFromContentWorld:]):
(-[WKUserContentController removeAllScriptMessageHandlers]):

  • UIProcess/API/Cocoa/WKUserContentControllerInternal.h:
  • UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _evaluateJavaScript:asAsyncFunction:withArguments:forceUserGesture:inFrame:inWorld:completionHandler:]):
Update for new shared API::SerializedScriptValue initialization.

  • UIProcess/API/glib/WebKitUserContentManager.cpp:
  • UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
  • UIProcess/Inspector/socket/RemoteInspectorProtocolHandler.cpp:
  • UIProcess/UserContent/WebScriptMessageHandler.h:
  • UIProcess/UserContent/WebUserContentControllerProxy.cpp:

(WebKit::WebUserContentControllerProxy::removeAllUserMessageHandlers):
(WebKit::WebUserContentControllerProxy::didPostMessage):

  • UIProcess/UserContent/WebUserContentControllerProxy.h:
  • UIProcess/UserContent/WebUserContentControllerProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMWindow.cpp:

(webkit_dom_dom_window_webkit_message_handlers_post_message):

  • WebProcess/UserContent/WebUserContentController.cpp:

(WebKit::WebUserContentController::removeAllUserScriptMessageHandlers):
(WebKit::WebUserContentController::removeAllUserScriptMessageHandlersForWorlds):

  • WebProcess/UserContent/WebUserContentController.h:
  • WebProcess/UserContent/WebUserContentController.messages.in:

Source/WTF:

  • wtf/CompletionHandler.h:

(WTF::CompletionHandlerWithFinalizer<Out): Add a variant of CompletionHandler that allows for a Finalizer function

to handle cases where the Completion function hasn't been called at destruction time.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:

(TEST):
(webViewForScriptMessageHandlerMultipleHandlerRemovalTest):
(-[AsyncScriptMessageHandler userContentController:didReceiveScriptMessage:replyHandler:]):

10:15 PM Changeset in webkit [260349] by Ross Kirsling
  • 25 edits
    1 copy
    6 adds in trunk

[ECMA-402] Intl.RelativeTimeFormat missing in WebKit
https://bugs.webkit.org/show_bug.cgi?id=209770

Reviewed by Darin Adler.

JSTests:

  • stress/intl-relativetimeformat.js: Added.
  • test262/config.yaml:

Enable Intl.RelativeTimeFormat feature with flag.

  • test262/expectations.yaml:

Mark known failures.
Test for locale validation is not specific to RelativeTimeFormat and should be investigated separately.
Tests for Polish appear to be wrong and should be corrected in test262.

Source/JavaScriptCore:

This patch implements the recent ECMA-402 feature Intl.RelativeTimeFormat.

RelativeTimeFormat has format / formatToParts functions like NumberFormat / DateTimeFormat
and is used to turn a number and unit into a formatted relative time string, e.g.:

new Intl.RelativeTimeFormat('en').format(10, 'day')

'in 10 days'

new Intl.RelativeTimeFormat('en', { numeric: 'auto' }).format(0, 'day')

'today'

Implementation of RelativeTimeFormat#formatToParts makes direct use of NumberFormat#formatToParts,
as the relative time string consists of at most one formatted number with optional literal text on either side.

This feature is runtime-guarded by the useIntlRelativeTimeFormat option.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • runtime/CommonIdentifiers.h:
  • runtime/IntlRelativeTimeFormat.cpp: Added.
  • runtime/IntlRelativeTimeFormat.h: Added.
  • runtime/IntlRelativeTimeFormatConstructor.cpp: Added.
  • runtime/IntlRelativeTimeFormatConstructor.h: Added.
  • runtime/IntlRelativeTimeFormatPrototype.cpp: Added.
  • runtime/IntlRelativeTimeFormatPrototype.h: Added.
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::relativeTimeFormatStructure):

  • runtime/OptionsList.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:

Add feature and runtime option.

  • runtime/IntlDateTimeFormat.cpp:

(JSC::IntlDateTimeFormat::formatToParts):

  • runtime/IntlPluralRules.cpp:

(JSC::IntlPluralRules::initializePluralRules):
(JSC::IntlPluralRules::resolvedOptions):
Make "type" a property name.

  • runtime/IntlNumberFormat.cpp:

(JSC::IntlNumberFormat::initializeNumberFormat):
(JSC::IntlNumberFormat::resolvedOptions):
(JSC::IntlNumberFormat::formatToPartsInternal):
(JSC::IntlNumberFormat::formatToParts):

  • runtime/IntlNumberFormat.h:

Factor out formatToPartsInternal so that RelativeTimeFormat can use it with its own UNumberFormat.
(This logic is too complicated to duplicate; it's because ICU won't split, e.g., "10,000" into parts for us.)

  • runtime/IntlObject.cpp:

(JSC::IntlObject::IntlObject):
(JSC::IntlObject::create):
(JSC::IntlObject::finishCreation):
(JSC::intlAvailableLocales):
(JSC::intlCollatorAvailableLocales):
(JSC::isUnicodeLocaleIdentifierType):
(JSC::supportedLocales):
(JSC::intlDateTimeFormatAvailableLocales): Deleted.
(JSC::intlNumberFormatAvailableLocales): Deleted.

  • runtime/IntlObject.h:

(JSC::intlDateTimeFormatAvailableLocales):
(JSC::intlNumberFormatAvailableLocales):
(JSC::intlPluralRulesAvailableLocales):
(JSC::intlRelativeTimeFormatAvailableLocales):
Perform three corrections for Intl classes:

  1. Collator should be the only class with unique "available locales". [unum|udat]_getAvailable exist but they've deferred to uloc_getAvailable for 20 years.
  2. isUnicodeLocaleIdentifierType isn't just alphanum{3,8} but rather alphanum{3,8} (sep alphanum{3,8})*. This is my own mistake from r239941.
  3. supportedLocalesOf entries should not be frozen. Changed in https://github.com/tc39/ecma402/pull/278.
  • tools/JSDollarVM.cpp:

(JSC::functionICUVersion):
(JSC::JSDollarVM::finishCreation):
Add $vm.icuVersion so that we can add per-line skips to stress tests.

Tools:

  • Scripts/run-jsc-stress-tests:

Add runIntlRelativeTimeFormatEnabled.

8:46 PM Changeset in webkit [260348] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (r244091): Leak of TaskStateChangedCallbackType due to missing -dealloc
<https://webkit.org/b/210710>
<rdar://problem/61992856>

Reviewed by Darin Adler.

  • Shared/Cocoa/ProcessTaskStateObserver.mm:

(-[WKProcessTaskStateObserverDelegate dealloc]): Add.

  • Release _taskStateChangedCallback to fix the leak.
7:18 PM Changeset in webkit [260347] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

[IPC hardening] Use MESSAGE_CHECK in WebPageProxy::loadRecentSearches() and WebPageProxy::saveRecentSearches()
<https://webkit.org/b/210683>
<rdar://problem/59240446>

Reviewed by Geoffrey Garen.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(MESSAGE_CHECK): Add.
(MESSAGE_CHECK_COMPLETION): Add.
(WebKit::WebPageProxy::saveRecentSearches):
(WebKit::WebPageProxy::loadRecentSearches):

  • Replace boolean check of const String& with MESSAGE_CHECK.
6:56 PM Changeset in webkit [260346] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] SlowPathCall is not supported by callOperation in Windows
https://bugs.webkit.org/show_bug.cgi?id=210727

Reviewed by Ross Kirsling.

In Windows, SlowPathCall should be handled by JITSlowPathCall, otherwise, stack is not correctly allocated.

  • jit/JITCall.cpp:

(JSC::JIT::emit_op_iterator_open):
(JSC::JIT::emit_op_iterator_next):

  • jit/SlowPathCall.h:

(JSC::JITSlowPathCall::call):

5:59 PM Changeset in webkit [260345] by ysuzuki@apple.com
  • 4 edits in trunk/Source

[JSC] Enable BigInt
https://bugs.webkit.org/show_bug.cgi?id=210726

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • runtime/OptionsList.h:

Source/WTF:

  • wtf/PlatformUse.h:
4:53 PM Changeset in webkit [260344] by ysuzuki@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] LLInt slow path call should not have third argument
https://bugs.webkit.org/show_bug.cgi?id=210721

Reviewed by Mark Lam.

LLInt callSlowPath does not work with third argument in Windows, CLoop etc. LLInt slow-path should not take third argument,
instead, use bytecode.metadata(...) to get metadata.

  • jit/JITCall.cpp:

(JSC::JIT::emit_op_iterator_open):
(JSC::JIT::emit_op_iterator_next):

  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPaths.cpp:

(JSC::iterator_open_try_fast):
(JSC::SLOW_PATH_DECL):
(JSC::iterator_next_try_fast):
(JSC::iterator_open_try_fast_narrow): Deleted.
(JSC::iterator_open_try_fast_wide16): Deleted.
(JSC::iterator_open_try_fast_wide32): Deleted.
(JSC::iterator_next_try_fast_narrow): Deleted.
(JSC::iterator_next_try_fast_wide16): Deleted.
(JSC::iterator_next_try_fast_wide32): Deleted.

  • runtime/CommonSlowPaths.h:
2:18 PM Changeset in webkit [260343] by mark.lam@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

Fix missing exception checks and handling in JSC APIs.
https://bugs.webkit.org/show_bug.cgi?id=210715
<rdar://problem/61599658>

Reviewed by Saam Barati.

  • API/APICallbackFunction.h:

(JSC::APICallbackFunction::call):

  • We should return early if an exception was thrown. We should not be using the result in any way since we cannot rely on it having any sane value.

(JSC::APICallbackFunction::construct):

  • For consistency, also return an undefined here when an exception was thrown.
  • API/JSCallbackObjectFunctions.h:

(JSC::JSCallbackObject<Parent>::construct):
(JSC::JSCallbackObject<Parent>::call):

  • Return an undefined if an exception was thrown. Don't return the potentially garbage result value. Who knows what the client code will do with it. Returning an undefined here makes the code more robust.
  • API/JSObjectRef.cpp:

(JSObjectGetProperty):
(JSObjectHasPropertyForKey):
(JSObjectGetPropertyForKey):
(JSObjectDeletePropertyForKey):
(JSObjectGetPropertyAtIndex):
(JSObjectDeleteProperty):

  • Explicitly return a nullptr if an exception was thrown. The toRef() on the result that follows the exception check may or may not return a nullptr (also see toRef(JSC::VM& vm, JSC::JSValue v) for !CPU(ADDRESS64)).
  • API/JSValueRef.cpp:

(JSValueIsEqual):
(JSValueIsInstanceOfConstructor):

  • For consistency, make these return false if an exception is thrown.
  • API/ObjCCallbackFunction.mm:

(JSC::objCCallbackFunctionCallAsFunction):
(JSC::objCCallbackFunctionCallAsConstructor):
(JSC::ObjCCallbackFunctionImpl::call):

  • Add some assertions and return early if an exception was thrown.
11:34 AM Changeset in webkit [260342] by Alan Bujtas
  • 4 edits
    2 adds in trunk

[LFC][TFC] Add column spanning support for flexible table width
https://bugs.webkit.org/show_bug.cgi?id=210713

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/layoutformattingcontext/table-flex-width-colspans.html

This patch slightly changes the extra space distribution logic by using either the minimum or
the maximum width as the base initial width for the columns.

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::layoutInFlowContent):
(WebCore::Layout::TableFormattingContext::computeColumnWidths):
(WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace): Deleted.

  • layout/tableformatting/TableFormattingContext.h:

LayoutTests:

  • fast/layoutformattingcontext/table-flex-width-colspans-expected.txt: Added.
  • fast/layoutformattingcontext/table-flex-width-colspans.html: Added.
11:12 AM Changeset in webkit [260341] by don.olmstead@sony.com
  • 4 edits
    3 moves
    2 adds in trunk/Tools

[CMake] Consolidate TestNetscapePlugin build
https://bugs.webkit.org/show_bug.cgi?id=210691

Reviewed by Fujii Hironori.

The DumpRenderTree CMakeLists.txt contained a definition of TestNetscapePlugIn
which was used for WebKitLegacy ports. The TestNetscapePlugIn directory also had
a CMakeLists.txt used by GTK for its port. The definitions in DumpRenderTree's
CMake are moved into the TestNetscapePlugIn CMake to provide a common definition
for all ports that ENABLE_NETSCAPE_PLUGIN_API.

  • DumpRenderTree/CMakeLists.txt:
  • DumpRenderTree/PlatformWin.cmake:
  • DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
  • DumpRenderTree/TestNetscapePlugIn/PlatformGTK.cmake: Added.
  • DumpRenderTree/TestNetscapePlugIn/PlatformWin.cmake: Added.
  • DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugIn.def: Renamed from Tools/DumpRenderTree/win/TestNetscapePlugin.def.
  • DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugIn.rc: Renamed from Tools/DumpRenderTree/win/TestNetscapePlugin.rc.
  • DumpRenderTree/TestNetscapePlugIn/win/resource.h: Renamed from Tools/DumpRenderTree/win/resource.h.
11:01 AM Changeset in webkit [260340] by emilio
  • 8 edits in trunk

Don't use the inherited custom properties to store environment variables.
https://bugs.webkit.org/show_bug.cgi?id=210707

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Annotate the progressions.

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/css/cssom/getComputedStyle-logical-enumeration-expected.txt:

Source/WebCore:

It leaks this implementation detail when enumerating the computed style.

Tests: imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml.xhtml

imported/w3c/web-platform-tests/css/cssom/getComputedStyle-logical-enumeration.html

  • css/CSSVariableReferenceValue.cpp:

(WebCore::resolveVariableReference):
(WebCore::resolveTokenRange):

  • style/StyleResolveForDocument.cpp:

(WebCore::Style::resolveForDocument):

LayoutTests:

  • platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
10:56 AM Changeset in webkit [260339] by emilio
  • 2 edits in trunk/Tools

Allow to override sccache server port.
https://bugs.webkit.org/show_bug.cgi?id=210722

Reviewed by Philippe Normand.

This is useful so that sccache can work both inside and outside the sandbox,
without getting confused about flatpak's chroot.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox):

10:51 AM Changeset in webkit [260338] by Antti Koivisto
  • 28 edits
    2 adds
    8 deletes in trunk

[CSS selectors] :is() / :where() should not allow pseudo-elements at parse-time
https://bugs.webkit.org/show_bug.cgi?id=210701

Reviewed by Anders Carlsson.

Source/WebCore:

https://drafts.csswg.org/selectors/#matches:

"Pseudo-elements cannot be represented by the matches-any pseudo-class; they are not valid within :is()."

Test: fast/selectors/pseudo-element-in-is-where.html

  • css/parser/CSSSelectorParser.cpp:

(WebCore::CSSSelectorParser::consumePseudo):

LayoutTests:

Remove or update tests for pseudo elements inside :is()/:where().
Also add some :where() rountrip coverage.

  • fast/css/css-selector-text-expected.txt:
  • fast/css/css-selector-text.html:
  • fast/css/css-set-selector-text-expected.txt:
  • fast/css/css-set-selector-text.html:
  • fast/css/is-specificity-6-expected.html: Removed.
  • fast/css/is-specificity-6.html: Removed.
  • fast/css/matches-specificity-6-expected.html: Removed.
  • fast/css/matches-specificity-6.html: Removed.
  • fast/css/parsing-css-allowed-string-characters-expected.txt:
  • fast/css/parsing-css-is-1-expected.txt:
  • fast/css/parsing-css-is-1.html:
  • fast/css/parsing-css-is-2-expected.txt:
  • fast/css/parsing-css-is-2.html:
  • fast/css/parsing-css-is-3-expected.txt:
  • fast/css/parsing-css-is-3.html:
  • fast/css/parsing-css-is-4-expected.txt:
  • fast/css/parsing-css-is-4.html:
  • fast/css/parsing-css-matches-1-expected.txt:
  • fast/css/parsing-css-matches-1.html:
  • fast/css/parsing-css-matches-2-expected.txt:
  • fast/css/parsing-css-matches-2.html:
  • fast/css/parsing-css-matches-3-expected.txt:
  • fast/css/parsing-css-matches-3.html:
  • fast/css/parsing-css-matches-4-expected.txt:
  • fast/css/parsing-css-matches-4.html:
  • fast/selectors/pseudo-element-in-is-where-expected.html: Added.
  • fast/selectors/pseudo-element-in-is-where.html: Added.
  • fast/selectors/pseudo-element-inside-is-expected.html: Removed.
  • fast/selectors/pseudo-element-inside-is.html: Removed.
  • fast/selectors/pseudo-element-inside-matches-expected.html: Removed.
  • fast/selectors/pseudo-element-inside-matches.html: Removed.
  • fast/selectors/querySelector-is-expected.txt:
  • fast/selectors/querySelector-is.html:
  • fast/selectors/querySelector-matches-expected.txt:
  • fast/selectors/querySelector-matches.html:
10:49 AM Changeset in webkit [260337] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][TFC] Take border spacing into account when distributing column spanners width.
https://bugs.webkit.org/show_bug.cgi?id=210712

Reviewed by Antti Koivisto.

While distributing the column spanner extra space among individual columns,
the spacing between these columns (set by border-spacing) should be taken into
account and subtract it from the width to distribute.

<table style="border-spacing: 50px"><tr><td colspan=2>long long text</td></tr><tr><td>lo</td><td>xt</td><tr></table>
[long long text]
[lo] [xt]
The individual columns don't require any extra space from the spanner.

  • layout/FormattingContext.h:

(WebCore::Layout::FormattingContext::IntrinsicWidthConstraints::operator+=):
(WebCore::Layout::FormattingContext::IntrinsicWidthConstraints::operator-=):

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints):
(WebCore::Layout::TableFormattingContext::computedPreferredWidthForColumns):
(WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace):

  • layout/tableformatting/TableGrid.h:

(WebCore::Layout::TableGrid::horizontalSpacing const):
(WebCore::Layout::TableGrid::totalHorizontalSpacing const): Deleted.

10:24 AM Changeset in webkit [260336] by Darin Adler
  • 2 edits in trunk/Tools

REGRESSION (r260334): SpacebarScrolling.cpp (test in TestWebKitAPI) fails to compile because it includes an Objective-C header
https://bugs.webkit.org/show_bug.cgi?id=210723

Reviewed by Brady Eidson.

  • TestWebKitAPI/Tests/WebKit/SpacebarScrolling.cpp: Instead of including

WKPreferencesPrivate.h, an Objective-C header, include WKPreferencesRefPrivate.h,
the header with the functions this test is trying to use.

6:46 AM Changeset in webkit [260335] by emilio
  • 5 edits
    2 adds in trunk

Fix the logic to decide whether a property is enumerated in a computed style declaration.
https://bugs.webkit.org/show_bug.cgi?id=210695

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Import the test from
https://github.com/web-platform-tests/wpt/pull/23088. One subtest is
failing, separate bug.

  • web-platform-tests/css/cssom/getComputedStyle-logical-enumeration-expected.txt: Added.
  • web-platform-tests/css/cssom/getComputedStyle-logical-enumeration.html: Added.

Source/WebCore:

Fix the logic to decide whether a property is enumerated in a computed
style declaration.

Logical properties don't need stylebuilder code, but still should be
generated. Using the specification->category for this seems a bit
hacky, but unclear if it's worse than adding a new flag.

Tests: fast/css/getComputedStyle/computed-style-enumeration.html

imported/w3c/web-platform-tests/css/cssom/getComputedStyle-logical-enumeration.html

  • css/makeprop.pl:

(skippedFromComputedStyle):
(isLogical):
(sortWithPrefixedPropertiesLast):

Apr 18, 2020:

9:41 PM Changeset in webkit [260334] by Darin Adler
  • 58 edits in trunk

Update header postprocessing version cutoff to keep Apple internal builds working
https://bugs.webkit.org/show_bug.cgi?id=210708

Reviewed by Brady Eidson.

Source/WebKit:

  • Configurations/WebKit.xcconfig: Update versions to make building with older

Apple internal SDKs continue to work.

  • Shared/API/Cocoa/WKFoundation.h:
  • Shared/API/Cocoa/_WKFrameHandle.h:
  • Shared/API/Cocoa/_WKRemoteObjectInterface.h:
  • UIProcess/API/Cocoa/WKContentWorld.h:
  • UIProcess/API/Cocoa/WKFindConfiguration.h:
  • UIProcess/API/Cocoa/WKFindResult.h:
  • UIProcess/API/Cocoa/WKFrameInfoPrivate.h:
  • UIProcess/API/Cocoa/WKHTTPCookieStorePrivate.h:
  • UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
  • UIProcess/API/Cocoa/WKPDFConfiguration.h:
  • UIProcess/API/Cocoa/WKPreferences.h:
  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/API/Cocoa/WKURLSchemeTaskPrivate.h:
  • UIProcess/API/Cocoa/WKUserScriptPrivate.h:
  • UIProcess/API/Cocoa/WKWebView.h:
  • UIProcess/API/Cocoa/WKWebViewConfiguration.h:
  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/WKWebpagePreferences.h:
  • UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h:
  • UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/API/Cocoa/_WKDownload.h:
  • UIProcess/API/Cocoa/_WKFrameTreeNode.h:
  • UIProcess/API/Cocoa/_WKInputDelegate.h:
  • UIProcess/API/Cocoa/_WKInspectorDebuggableInfo.h:
  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h:
  • UIProcess/API/Cocoa/_WKResourceLoadDelegate.h:
  • UIProcess/API/Cocoa/_WKResourceLoadInfo.h:
  • UIProcess/API/Cocoa/_WKResourceLoadStatisticsFirstParty.h:
  • UIProcess/API/Cocoa/_WKResourceLoadStatisticsThirdParty.h:
  • UIProcess/API/Cocoa/_WKTextManipulationConfiguration.h:
  • UIProcess/API/Cocoa/_WKTextManipulationExclusionRule.h:
  • UIProcess/API/Cocoa/_WKTextManipulationItem.h:
  • UIProcess/API/Cocoa/_WKTextManipulationToken.h:
  • UIProcess/API/Cocoa/_WKUserContentWorld.h:
  • UIProcess/API/Cocoa/_WKUserStyleSheet.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponse.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.h:

Because the way we do post-processing of headers in the legacy Xcode
build system won't work once the files have been processed once, touch
each file that has WK_MAC_TBA, WK_IOS_TBA, or
WK_FRAMEWORK_HEADER_POSTPROCESSING_ENABLED in it. Found something to
change in each file. This is likely unnecessary in the new Xcode build
system, but I wasn't able to test that locally.

  • WebKit.xcodeproj/project.pbxproj:

(postprocess-header-rule): Added dependencies so that post-processing will be
redone if Configurations/WebKit.xcconfig is touched, since that is where
WK_FRAMEWORK_HEADER_POSTPROCESSING_DISABLED is set, or if
Scripts/postprocess-header-rule is touched, since that is where the
post-processing code is. If either of those files changes it could affect the
output of post-processing. This should make a change like this work in the
new Xcode build system without touching files as is done above.

Tools:

  • DumpRenderTree/ios/TextInputControllerIOS.m:
  • DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm:
  • DumpRenderTree/mac/EditingDelegate.mm:
  • DumpRenderTree/mac/EventSendingController.h:
  • DumpRenderTree/mac/EventSendingController.mm:
  • DumpRenderTree/mac/FrameLoadDelegate.mm:
  • DumpRenderTree/mac/ObjCPlugin.m:
  • DumpRenderTree/mac/PixelDumpSupportMac.mm:
  • DumpRenderTree/mac/ResourceLoadDelegate.mm:
  • DumpRenderTree/mac/UIScriptControllerMac.mm:

Removed includes of <WebKit/WebKit.h>, the header for modern WebKit, from the files
here that are intending to use WebKitLegacy. This is harmless, except for if someone
builds DumpRenderTree *before* building WebKit as I just did.

8:43 PM Changeset in webkit [260333] by keith_miller@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

Fix CLoop build for iterator opcodes
https://bugs.webkit.org/show_bug.cgi?id=210709

Reviewed by Robin Morisset.

We need to add a default paramater for the metadata pointer
in the CLoop build. Additionally, the helper declarations need
to be in the various slow path header files. Lastly we need
opcode labels for our new JS call return points.

  • bytecode/BytecodeList.rb:
  • llint/LLIntSlowPaths.cpp:
  • llint/LLIntSlowPaths.h:
  • runtime/CommonSlowPaths.h:
8:07 PM Changeset in webkit [260332] by keith_miller@apple.com
  • 2 edits in trunk/JSTests

Unreviewed, mark test passing.

  • test262/expectations.yaml:
7:20 PM Changeset in webkit [260331] by rmorisset@apple.com
  • 107 edits
    1 copy in trunk

Support an inlined representation in JSValue of small BigInts ("BigInt32")
https://bugs.webkit.org/show_bug.cgi?id=206182

Reviewed by Yusuke Suzuki.

JSTests:

I improved several of the tests to give more informative error messages in the process of fixing them.

More interestingly I had to modify "missing-exception-check-in-string-compare" because it relied on "s1 == s1" resolving ropes, and we now just return true.

  • stress/big-int-division.js:

(testDiv):

  • stress/big-int-left-shift-wrapped-value.js:

(assert.sameValue):

  • stress/big-int-logical-not.js:

(assert):

  • stress/big-int-mod-jit.js:
  • stress/big-int-right-shift-general.js:

(testRightShift):

  • stress/big-int-type-of-proven-type.js:

(assert):

  • stress/compare-strict-eq-on-various-types.js:

(testAllTypesCall):

  • stress/ftl-string-strict-equality.js:
  • stress/missing-exception-check-in-string-compare.js:

Source/JavaScriptCore:

This patch attempts to optimize the performance of BigInts, when they are small (32 bit or less).
It works by inlining them into JSValue on 64-bit platforms, avoiding the allocation of a JSBigInt.
The bit pattern we use is 0000:XXXX:XXXX:0012
This representation works because of the following things:

  • It cannot be confused with a Double or Integer thanks to the top bits
  • It cannot be confused with a pointer to a Cell, thanks to bit 1 which is set to true
  • It cannot be confused with a pointer to wasm thanks to bit 0 which is set to false
  • It cannot be confused with true/false because bit 2 is set to false
  • It cannot be confused for null/undefined because bit 4 is set to true

This entire change is gated by USE(BIGINT32), to make it easier to disable if it turns out to have bugs.
It should also make it much easier to verify if a given bug comes from it or from something else.

Note that in this patch we create BigInt32s when parsing small BigInt constants, and most operations (e.g. Add or BitOr) produce a BigInt32 if both of their operands are BigInt32,
but we don't produce a BigInt32 from for example the substraction/division of two large heap-allocated JSBigInts, even if the result fits in 32-bits.
As a result, small BigInts can now either be heap-allocated or inlined in the JSValue.

This patch includes a significant refactor of various slow paths, which are now grouped together in Operations.h
Because this increased the size of Operations.h significantly, I split the parts of Operations.h which are only used by the GC into Scribble.h, to avoid bloating compile times.

In the DFG and FTL we now have 3 UseKinds for BigInts: HeapBigIntUse, BigInt32Use and AnyBigIntUse.
The latter is useful when we know that we are receiving BigInts, but speculation indicates a mix of heap-allocated and small (inlined) big-ints.

Unfortunately, a naive implementation of this patch significantly regresses the performance of StrictEq (and its variants), as it is no longer true that a cell and a non-cell cannot be equal.
Before this patch, the code was jumping to a slow path if either:

  • at least one operand is a double
  • or both operands are cells

Now, it also needs to jump to the slow path if at least one is a cell.
To recover this performance cost, I significantly rewrote this code, from

if (left is Cell && right is Cell) {

if (left == right)

return true;

goto slowPath;

}
if (! left is Int32) {

if (left is Number)

goto slowPath

}
if (! right is Int32) {

if (right is Number)

goto slowPath

}
return left == right

To the following:

if (left is Double
right is Double)

goto slowPath

if (left == right)

return true;

if (left is Cell
right is Cell)

goto slowPath

return false;

I believe this to be faster than just replacing (left is Cell && right is Cell) by an
, because I found a bit-trick to check (left is Double right is Double) which should help reduce the pressure on the branch predictor.

Early JetStream2 tests appear to confirm that this patch is roughly neutral while it was a 0.5% regression before I used this trick, but the numbers are still too noisy, I plan to do more measurements before landing this patch.

I don't yet have performance numbers for this patch on a BigInt benchmark, I will get such numbers before trying to land it, but I'd like some review in the meantime.

(JSC::X86Assembler::X86InstructionFormatter::SingleInstructionBufferWriter::memoryModRM):

  • bytecode/ArithProfile.cpp:

(JSC::ArithProfile<BitfieldType>::emitObserveResult):
(JSC::ArithProfile<BitfieldType>::shouldEmitSetBigInt32 const):
(JSC::ArithProfile<BitfieldType>::shouldEmitSetHeapBigInt const):
(JSC::ArithProfile<BitfieldType>::emitSetHeapBigInt const):
(JSC::ArithProfile<BitfieldType>::emitSetBigInt32 const):
(WTF::printInternal):

  • bytecode/ArithProfile.h:

(JSC::ObservedResults::didObserveNonInt32):
(JSC::ObservedResults::didObserveBigInt):
(JSC::ObservedResults::didObserveHeapBigInt):
(JSC::ObservedResults::didObserveBigInt32):
(JSC::ArithProfile::didObserveHeapBigInt const):
(JSC::ArithProfile::didObserveBigInt32 const):
(JSC::ArithProfile::setObservedHeapBigInt):
(JSC::ArithProfile::setObservedBigInt32):
(JSC::ArithProfile::observeResult):

  • bytecode/BytecodeList.rb:
  • bytecode/BytecodeLivenessAnalysisInlines.h:
  • bytecode/BytecodeUseDef.cpp:

(JSC::computeUsesForBytecodeIndexImpl):
(JSC::computeDefsForBytecodeIndexImpl):

  • bytecode/CodeBlock.cpp:
  • bytecode/DataFormat.h:
  • bytecode/MethodOfGettingAValueProfile.cpp:

(JSC::MethodOfGettingAValueProfile::emitReportValue const):

  • bytecode/MethodOfGettingAValueProfile.h:
  • bytecode/SpeculatedType.cpp:

(JSC::dumpSpeculation):
(JSC::speculationFromClassInfo):
(JSC::speculationFromStructure):
(JSC::speculationFromValue):
(JSC::speculationFromJSType):
(JSC::leastUpperBoundOfStrictlyEquivalentSpeculations):

  • bytecode/SpeculatedType.h:

(JSC::isBigInt32Speculation):
(JSC::isHeapBigIntSpeculation):
(JSC::isBigIntSpeculation):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitEqualityOpImpl):
(JSC::BytecodeGenerator::addBigIntConstant):

  • bytecompiler/BytecodeGenerator.h:
  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::isToThisAnIdentity):
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::fixupToThis):
(JSC::DFG::FixupPhase::fixupToNumeric):
(JSC::DFG::FixupPhase::observeUseKindOnNode):
(JSC::DFG::FixupPhase::fixupCompareStrictEqAndSameValue):

  • dfg/DFGMayExit.cpp:
  • dfg/DFGNode.h:

(JSC::DFG::Node::shouldSpeculateBigInt32):
(JSC::DFG::Node::shouldSpeculateHeapBigInt):

  • dfg/DFGNodeType.h:
  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::compileExit):

  • dfg/DFGOSRExit.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::SafeToExecuteEdge::operator()):
(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
(JSC::DFG::SpeculativeJIT::compileValueBitNot):
(JSC::DFG::SpeculativeJIT::emitUntypedOrAnyBigIntBitOp):
(JSC::DFG::SpeculativeJIT::compileValueBitwiseOp):
(JSC::DFG::SpeculativeJIT::emitUntypedOrBigIntRightShiftBitOp):
(JSC::DFG::SpeculativeJIT::compileValueLShiftOp):
(JSC::DFG::SpeculativeJIT::compileValueBitRShift):
(JSC::DFG::SpeculativeJIT::compileShiftOp):
(JSC::DFG::SpeculativeJIT::compileValueAdd):
(JSC::DFG::SpeculativeJIT::compileValueSub):
(JSC::DFG::SpeculativeJIT::compileIncOrDec):
(JSC::DFG::SpeculativeJIT::compileValueNegate):
(JSC::DFG::SpeculativeJIT::compileValueMul):
(JSC::DFG::SpeculativeJIT::compileValueDiv):
(JSC::DFG::SpeculativeJIT::compileValueMod):
(JSC::DFG::SpeculativeJIT::compileValuePow):
(JSC::DFG::SpeculativeJIT::compare):
(JSC::DFG::SpeculativeJIT::compileStrictEq):
(JSC::DFG::SpeculativeJIT::speculateHeapBigInt):
(JSC::DFG::SpeculativeJIT::speculate):
(JSC::DFG::SpeculativeJIT::compileToNumeric):
(JSC::DFG::SpeculativeJIT::compileHeapBigIntEquality):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculateBigInt32Operand::SpeculateBigInt32Operand):
(JSC::DFG::SpeculateBigInt32Operand::~SpeculateBigInt32Operand):
(JSC::DFG::SpeculateBigInt32Operand::edge const):
(JSC::DFG::SpeculateBigInt32Operand::node const):
(JSC::DFG::SpeculateBigInt32Operand::gpr):
(JSC::DFG::SpeculateBigInt32Operand::use):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::fillJSValue):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
(JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal):
(JSC::DFG::SpeculativeJIT::fillSpeculateCell):
(JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
(JSC::DFG::SpeculativeJIT::speculateBigInt32):
(JSC::DFG::SpeculativeJIT::speculateAnyBigInt):
(JSC::DFG::SpeculativeJIT::fillSpeculateBigInt32):
(JSC::DFG::SpeculativeJIT::compileBigInt32Compare):
(JSC::DFG::SpeculativeJIT::compilePeepHoleBigInt32Branch):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGStrengthReductionPhase.cpp:

(JSC::DFG::StrengthReductionPhase::handleNode):

  • dfg/DFGUseKind.cpp:

(WTF::printInternal):

  • dfg/DFGUseKind.h:

(JSC::DFG::typeFilterFor):
(JSC::DFG::isCell):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLCommonValues.cpp:

(JSC::FTL::CommonValues::initializeConstants):

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

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileValueAdd):
(JSC::FTL::DFG::LowerDFGToB3::compileValueSub):
(JSC::FTL::DFG::LowerDFGToB3::compileValueMul):
(JSC::FTL::DFG::LowerDFGToB3::compileBinaryMathIC):
(JSC::FTL::DFG::LowerDFGToB3::compileValueDiv):
(JSC::FTL::DFG::LowerDFGToB3::compileValueMod):
(JSC::FTL::DFG::LowerDFGToB3::compileValuePow):
(JSC::FTL::DFG::LowerDFGToB3::compileValueBitNot):
(JSC::FTL::DFG::LowerDFGToB3::compileValueBitAnd):
(JSC::FTL::DFG::LowerDFGToB3::compileValueBitOr):
(JSC::FTL::DFG::LowerDFGToB3::compileValueBitXor):
(JSC::FTL::DFG::LowerDFGToB3::compileValueBitRShift):
(JSC::FTL::DFG::LowerDFGToB3::compileArithBitRShift):
(JSC::FTL::DFG::LowerDFGToB3::compileArithBitLShift):
(JSC::FTL::DFG::LowerDFGToB3::compileValueBitLShift):
(JSC::FTL::DFG::LowerDFGToB3::compileBitURShift):
(JSC::FTL::DFG::LowerDFGToB3::compileToNumeric):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareEq):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
(JSC::FTL::DFG::LowerDFGToB3::compileIsBigInt):
(JSC::FTL::DFG::LowerDFGToB3::emitBinarySnippet):
(JSC::FTL::DFG::LowerDFGToB3::emitBinaryBitOpSnippet):
(JSC::FTL::DFG::LowerDFGToB3::boolify):
(JSC::FTL::DFG::LowerDFGToB3::buildTypeOf):
(JSC::FTL::DFG::LowerDFGToB3::lowHeapBigInt):
(JSC::FTL::DFG::LowerDFGToB3::lowBigInt32):
(JSC::FTL::DFG::LowerDFGToB3::isBigInt32):
(JSC::FTL::DFG::LowerDFGToB3::isNotBigInt32):
(JSC::FTL::DFG::LowerDFGToB3::unboxBigInt32):
(JSC::FTL::DFG::LowerDFGToB3::boxBigInt32):
(JSC::FTL::DFG::LowerDFGToB3::isNotAnyBigInt):
(JSC::FTL::DFG::LowerDFGToB3::speculate):
(JSC::FTL::DFG::LowerDFGToB3::isNotHeapBigIntUnknownWhetherCell):
(JSC::FTL::DFG::LowerDFGToB3::isNotHeapBigInt):
(JSC::FTL::DFG::LowerDFGToB3::isHeapBigInt):
(JSC::FTL::DFG::LowerDFGToB3::speculateHeapBigInt):
(JSC::FTL::DFG::LowerDFGToB3::speculateHeapBigIntUnknownWhetherCell):
(JSC::FTL::DFG::LowerDFGToB3::speculateBigInt32):
(JSC::FTL::DFG::LowerDFGToB3::speculateAnyBigInt):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • heap/HeapSnapshotBuilder.cpp:

(JSC::HeapSnapshotBuilder::json):

  • heap/MarkedBlockInlines.h:
  • heap/PreciseAllocation.cpp:
  • inspector/agents/InspectorHeapAgent.cpp:

(Inspector::InspectorHeapAgent::getPreview):

  • interpreter/Interpreter.cpp:

(JSC::sizeOfVarargs):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::emitConvertValueToBoolean):
(JSC::AssemblyHelpers::branchIfValue):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::branchIfBigInt32):
(JSC::AssemblyHelpers::branchIfBigInt32KnownNotNumber):
(JSC::AssemblyHelpers::branchIfNotBigInt32KnownNotNumber):
(JSC::AssemblyHelpers::branchIfHeapBigInt):
(JSC::AssemblyHelpers::branchIfNotHeapBigInt):
(JSC::AssemblyHelpers::unboxBigInt32):
(JSC::AssemblyHelpers::boxBigInt32):
(JSC::AssemblyHelpers::emitTypeOf):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:
  • jit/JITArithmetic.cpp:

(JSC::JIT::emit_op_negate):
(JSC::JIT::emitSlow_op_negate):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_is_big_int):
(JSC::JIT::compileOpStrictEq):
(JSC::JIT::compileOpStrictEqJump):
(JSC::JIT::emit_op_to_numeric):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_is_big_int):
(JSC::JIT::emit_op_to_numeric):

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • llint/LLIntOfflineAsmConfig.h:
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter64.asm:
  • parser/ParserArena.cpp:

(JSC::IdentifierArena::makeBigIntDecimalIdentifier):

  • runtime/ArrayPrototype.cpp:
  • runtime/BigIntConstructor.cpp:

(JSC::toBigInt):
(JSC::callBigIntConstructor):

  • runtime/BigIntObject.cpp:

(JSC::BigIntObject::create):
(JSC::BigIntObject::finishCreation):

  • runtime/BigIntObject.h:
  • runtime/BigIntPrototype.cpp:

(JSC::toThisBigIntValue):
(JSC::bigIntProtoFuncToStringImpl):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):
(JSC::updateArithProfileForUnaryArithOp):
(JSC::updateArithProfileForBinaryArithOp):

  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::createStructure):
(JSC::JSBigInt::parseInt):
(JSC::JSBigInt::stringToBigInt):
(JSC::JSBigInt::inc):
(JSC::JSBigInt::dec):
(JSC::JSBigInt::bitwiseAnd):
(JSC::JSBigInt::toStringGeneric):
(JSC::JSBigInt::equalsToNumber):
(JSC::JSBigInt::equalsToInt32):

  • runtime/JSBigInt.h:

(JSC::asHeapBigInt):

  • runtime/JSCJSValue.cpp:

(JSC::JSValue::toNumberSlowCase const):
(JSC::JSValue::toObjectSlowCase const):
(JSC::JSValue::toThisSlowCase const):
(JSC::JSValue::synthesizePrototype const):
(JSC::JSValue::dumpInContextAssumingStructure const):
(JSC::JSValue::dumpForBacktrace const):
(JSC::JSValue::toStringSlowCase const):

  • runtime/JSCJSValue.h:
  • runtime/JSCJSValueInlines.h:

(JSC::JSValue::JSValue):
(JSC::JSValue::asHeapBigInt const):
(JSC::JSValue::isBigInt const):
(JSC::JSValue::isHeapBigInt const):
(JSC::JSValue::isBigInt32 const):
(JSC::JSValue::bigInt32AsInt32 const):
(JSC::JSValue::isPrimitive const):
(JSC::JSValue::getPrimitiveNumber):
(JSC::JSValue::toNumeric const):
(JSC::JSValue::toBigIntOrInt32 const):
(JSC::JSValue::equalSlowCaseInline):
(JSC::JSValue::strictEqualForCells):
(JSC::JSValue::strictEqual):
(JSC::JSValue::pureStrictEqual):
(JSC::JSValue::pureToBoolean const):

  • runtime/JSCell.cpp:

(JSC::JSCell::put):
(JSC::JSCell::putByIndex):
(JSC::JSCell::toPrimitive const):
(JSC::JSCell::getPrimitiveNumber const):
(JSC::JSCell::toNumber const):
(JSC::JSCell::toObjectSlow const):

  • runtime/JSCell.h:
  • runtime/JSCellInlines.h:

(JSC::JSCell::isHeapBigInt const):
(JSC::JSCell::toBoolean const):
(JSC::JSCell::pureToBoolean const):

  • runtime/JSString.h:

(JSC::JSValue::toBoolean const):

  • runtime/JSType.cpp:

(WTF::printInternal):

  • runtime/JSType.h:
  • runtime/JSTypeInfo.h:
  • runtime/ObjectInitializationScope.cpp:
  • runtime/Operations.cpp:

(JSC::jsAddSlowCase):
(JSC::jsIsObjectTypeOrNull):

  • runtime/Operations.h:

(JSC::compareBigIntToOtherPrimitive):
(JSC::bigIntCompare):
(JSC::jsLess):
(JSC::jsLessEq):
(JSC::arithmeticBinaryOp):
(JSC::jsSub):
(JSC::jsMul):
(JSC::jsDiv):
(JSC::jsRemainder):
(JSC::jsPow):
(JSC::jsInc):
(JSC::jsDec):
(JSC::jsBitwiseNot):
(JSC::shift):
(JSC::jsLShift):
(JSC::jsRShift):
(JSC::bitwiseBinaryOp):
(JSC::jsBitwiseAnd):
(JSC::jsBitwiseOr):
(JSC::jsBitwiseXor):

  • runtime/Scribble.h: Copied from Source/JavaScriptCore/runtime/BigIntObject.h.

(JSC::scribbleFreeCells):
(JSC::isScribbledValue):
(JSC::scribble):

  • runtime/StructureInlines.h:

(JSC::prototypeForLookupPrimitiveImpl):

Source/WTF:

Add a USE(BIGINT32) flag.

  • wtf/PlatformUse.h:
7:08 PM Changeset in webkit [260330] by beidson@apple.com
  • 7 edits in trunk

Fix WebUserContentControllerProxy vs ContentWorld lifetime
https://bugs.webkit.org/show_bug.cgi?id=210700

Reviewed by Alex Christensen.

Source/WebKit:

Covered by API test.

WebUserContentControllerProxy currently keeps all of its associated API::ContentWorlds alive via RefPtrs.

This is despite the fact that all of the associated WebScriptMessageHandlers, UserScripts, and
UserStyleSheets already keep their associated API::ContentWorlds alive.

It then decideds to tell WebProcesses to forget a content world after all of its clients are removed.

Unfortunately, content worlds are used for more than just content controller stuff. They're used for direct
JavaScript evaluation as well.

So a client could:

  • Add a script message handler in a content world.
  • Evaluate JavaScript in that content world, setting up some persistent state.
  • Remove the script message handler.
  • Find that their persistent state from the JavaScript evaluation is gone from that world, even though they still retain a usable handle to that world.

The only party who has any business managing the lifetime of an API::ContentWorld is the API::ContentWorld itself.

Making this change is:

1 - Nice cleanup
2 - Fixes the above mentioned bug

  • UIProcess/API/APIContentWorld.cpp:

(API::ContentWorld::worldForIdentifier):
(API::ContentWorld::ContentWorld):
(API::ContentWorld::sharedWorldWithName):
(API::ContentWorld::~ContentWorld):
(API::ContentWorld::addAssociatedUserContentControllerProxy):
(API::ContentWorld::userContentControllerProxyDestroyed):

  • UIProcess/API/APIContentWorld.h:
  • UIProcess/UserContent/WebUserContentControllerProxy.cpp:

(WebKit::WebUserContentControllerProxy::parameters const):
(WebKit::WebUserContentControllerProxy::addContentWorld):
(WebKit::WebUserContentControllerProxy::contentWorldDestroyed):
(WebKit::WebUserContentControllerProxy::addUserScript):
(WebKit::WebUserContentControllerProxy::removeUserScript):
(WebKit::WebUserContentControllerProxy::removeAllUserScripts):
(WebKit::WebUserContentControllerProxy::addUserStyleSheet):
(WebKit::WebUserContentControllerProxy::removeUserStyleSheet):
(WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
(WebKit::WebUserContentControllerProxy::addUserScriptMessageHandler):
(WebKit::WebUserContentControllerProxy::removeUserMessageHandlerForName):
(WebKit::WebUserContentControllerProxy::removeAllUserMessageHandlers):
(WebKit::WebUserContentControllerProxy::addContentWorldUse): Deleted.
(WebKit::WebUserContentControllerProxy::shouldSendRemoveContentWorldsMessage): Deleted.
(WebKit::WebUserContentControllerProxy::removeContentWorldUses): Deleted.

  • UIProcess/UserContent/WebUserContentControllerProxy.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm:

(-[DummyMessageHandler userContentController:didReceiveScriptMessage:]):
(TEST): Make sure removing a script message handler from a particular world

doesn't also destroy the other JavaScript contents of that world.

4:32 PM Changeset in webkit [260329] by achristensen@apple.com
  • 5 edits in branches/safari-609-branch/Source/JavaScriptCore

Branch build fix after r260286
https://bugs.webkit.org/show_bug.cgi?id=210583
<rdar://problem/61943707>

The branch used ensureStillAliveHere but did not have the rename of that function in r258825,
so this effectively merges that revision, too, to make the branch and trunk more similar.

No change in behavior, just rename to successfully compile.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileArrayIndexOf):
(JSC::FTL::DFG::LowerDFGToB3::compileArrayPop):
(JSC::FTL::DFG::LowerDFGToB3::compileStringCharAt):
(JSC::FTL::DFG::LowerDFGToB3::compileStringCharCodeAt):
(JSC::FTL::DFG::LowerDFGToB3::compileStringCodePointAt):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileMultiGetByOffset):

4:23 PM Changeset in webkit [260328] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

Attempt #4 to fix tvOS build

Unreviewed.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

  • Add #if ENABLE(VIDEO_PRESENTATION_MODE)/#endif to protect function defined in WebCore/PictureInPictureSupport.h.
  • See previous build fixes in r260307, r260308 and r260313.
4:20 PM Changeset in webkit [260327] by dbates@webkit.org
  • 2 edits in trunk/Tools

Add some more tests for -focusTextInputContext:placeCaretAt:completionHandler:
https://bugs.webkit.org/show_bug.cgi?id=210624

Reviewed by Simon Fraser.

Test behavior when the target element is already focused, when the target element
is programmatically replaced, and focusing the target element after the page was
navigated away.

Also while I am here, fix up the test FocusFieldAndPlaceCaretOutsideField to
use the size of the exampleText constant - 1 instead of hardcoding this value.
This will future proof this test should the example text string literal change.

  • TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm:

(TEST):

4:17 PM Changeset in webkit [260326] by dbates@webkit.org
  • 1 edit
    2 adds in trunk/LayoutTests

Add a test to ensure WebKit::mayContainEditableElementsInRect() returns true if the document element is editable
https://bugs.webkit.org/show_bug.cgi?id=210560

Reviewed by Simon Fraser.

If the document element is marked editable then all child elements are editable.
Add a test to ensure that WebKit::mayContainEditableElementsInRect() returns true
for such a page.

  • editing/editable-region/hit-test-editable-document-element-expected.txt: Added.
  • editing/editable-region/hit-test-editable-document-element.html: Added.
4:02 PM Changeset in webkit [260325] by keith_miller@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Unreviewed, remove commented out/dead code that didn't failed to
get removed when landing r260323.

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.cpp:

(JSC::iterator_next_try_fast):

2:52 PM Changeset in webkit [260324] by fpizlo@apple.com
  • 3 edits in trunk/Websites/webkit.org

Unreviewed, check in some more files for a blog post.

  • blog-files/speculation-in-jsc/osr-exit-implicit-control-flow.graffle:
  • blog-files/speculation-in-jsc/osr-exit-implicit-control-flow.svg:
2:45 PM Changeset in webkit [260323] by keith_miller@apple.com
  • 83 edits
    1 copy
    13 adds in trunk

Redesign how we do for-of iteration for JSArrays
https://bugs.webkit.org/show_bug.cgi?id=175454

JSTests:

Reviewed by Filip Pizlo.

  • microbenchmarks/for-of-iterate-array-entries.js:

(foo):

  • stress/custom-iterators.js:

(catch):
(iter.return):
(iteratorInterfaceErrorTest):
(iteratorInterfaceErrorTestReturn):
(iteratorInterfaceBreakTestReturn):

  • stress/for-of-array-different-globals.js: Added.

(foo):
(array.Symbol.iterator.proto.next):

  • stress/for-of-array-mixed-values.js: Added.

(test):

  • stress/for-of-no-direct-loop-back-edge-osr.js: Added.

(osrIfFinalTier):
(test):

  • stress/generator-containing-for-of-on-map.js: Added.

(find):
(i.let.v.of.find):

  • stress/generator-containing-for-of-on-set.js: Added.

(find):
(set add):

  • stress/osr-from-for-of-done-getter.js: Added.

(i.let.iterable.next.return.get done):
(i.let.iterable.next):
(i.let.iterable.Symbol.iterator):
(i.let.iterable.return):

  • stress/osr-from-for-of-value-getter.js: Added.

(i.let.iterable.next.return.get value):
(i.let.iterable.next):
(i.let.iterable.Symbol.iterator):
(i.let.iterable.return):

  • stress/throw-for-of-next-returns-non-object.js: Added.

(i.let.iterable.next):
(i.let.iterable.Symbol.iterator):
(i.let.iterable.return):
(i.catch):

  • stress/throw-from-done-getter-in-for-of-header.js: Added.

(i.let.iterable.next):
(i.let.iterable.get done):
(i.let.iterable.Symbol.iterator):
(i.let.iterable.return):
(i.catch):

  • stress/throw-from-next-in-for-of-header.js: Added.

(i.let.iterable.next):
(i.let.iterable.Symbol.iterator):
(i.let.iterable.return):
(i.catch):

  • stress/throw-from-value-getter-in-for-of-header.js: Added.

(i.let.iterable.next):
(i.let.iterable.get value):
(i.let.iterable.Symbol.iterator):
(i.let.iterable.return):
(i.catch):

  • stress/webidl-tokenizer-for-of.js: Added.

(tokenise.attemptTokenMatch):
(tokenise):
(Tokeniser):
(Tokeniser.prototype.probe):
(Tokeniser.prototype.consume):
(Tokeniser.prototype.unconsume):

Source/JavaScriptCore:

Reviewed by Filip Pizlo and Saam Barati.

This patch intrinsics for-of iteration for JSArrays when they are
being iterated with the built-in Symbol.iterator. We do this by
adding two new bytecodes op_iterator_open and
op_iterator_next. These bytecodes are essentially a fused set of
existing bytecodes with a special case for our intrinsiced JSArray
case. This patch only adds support for these instructions on
64-bit.

The op_iterator_open bytecode is semantically the same as:
iterator = symbolIterator.@call(iterable);
next = iterator.next;

where iterable is the rhs of the for-of and symbolIterator is the
result of running iterable.symbolIterator;

The op_iterator_next bytecode is semantically the same as:
nextResult = next.@call(iterator);
done = nextResult.done;
value = done ? (undefined / bottom) : nextResult.value;

where nextResult is a temporary (the value VirtualRegister in the
LLInt/Baseline and a tmp in the DFG).

In order to make sure these bytecodes have the same perfomance as
the existing bytecode sequence, we need to make sure we have the
same profiling data and inline caching. Most of the existing
get_by_id code assumed a particular bytecode member name was the
same in each flavor get_by_id access. This patch adds template
specialized functions that vend the correct
Profile/VirtualRegister for the current bytecode/checkpoint. This
means we can have meaningful names for our Bytecode structs and
still use the generic functions.

In the LLInt most of the logic for calls/get_by_id had to be
factored into helper macros, so we could have bytecodes that are
some combination of those.

The trickiest part of this patch was getting the hand rolled DFG
IR to work correctly. This is because we don't have a great way to
express large chucks of DFG graph that doesn't involve manually
tracking all the DFG's invariants. Such as:

1) Flushing/Phantoming values at the end of each block.
2) Rolling forwards and backwards the BytecodeIndex when switching

blocks.

3) Remembering to GetLocal each variable at the top of every block.
4) Ensuring that the JSValue stored to the op_iterator_next.m_value

local does not cause us to OSR exit at the set local.

(4) is handled by a new function, bottomValueMatchingSpeculation,
on DFGGraph that produces a FrozenValue that is roughly the bottom
for a given speculated type. In a future patch we should make this
more complete, probably by adding a VM::bottomCellForSetLocal that
prediction propagation and AI know how treat as a true bottom
value. See: https://bugs.webkit.org/show_bug.cgi?id=210694

Lastly, this patch changes the DFG NodeType, CheckCell to be
CheckIsConstant. CheckIsConstant is equivalent to the == operator
on JSValue where it just checks the register values are the
same. In order to keep the same perf that we had for CheckCell,
CheckIsConstant supports CellUse.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::or8):
(JSC::MacroAssemblerARM64::store8):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::or8):

  • bytecode/ArrayProfile.h:

(JSC::ArrayProfile::observeStructureID):
(JSC::ArrayProfile::observeStructure):

  • bytecode/BytecodeList.rb:
  • bytecode/BytecodeLivenessAnalysis.cpp:

(JSC::tmpLivenessForCheckpoint):

  • bytecode/BytecodeOperandsForCheckpoint.h: Added.

(JSC::arrayProfileForImpl):
(JSC::hasArrayProfileFor):
(JSC::arrayProfileFor):
(JSC::valueProfileForImpl):
(JSC::hasValueProfileFor):
(JSC::valueProfileFor):
(JSC::destinationFor):
(JSC::calleeFor):
(JSC::argumentCountIncludingThisFor):
(JSC::stackOffsetInRegistersForCall):
(JSC::callLinkInfoFor):

  • bytecode/BytecodeUseDef.cpp:

(JSC::computeUsesForBytecodeIndexImpl):
(JSC::computeDefsForBytecodeIndexImpl):

  • bytecode/CallLinkInfo.cpp:

(JSC::CallLinkInfo::callTypeFor):

  • bytecode/CallLinkStatus.cpp:

(JSC::CallLinkStatus::computeFromLLInt):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::finalizeLLIntInlineCaches):
(JSC::CodeBlock::tryGetValueProfileForBytecodeIndex):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::instructionAt const):

  • bytecode/CodeBlockInlines.h:

(JSC::CodeBlock::forEachValueProfile):
(JSC::CodeBlock::forEachArrayProfile):

  • bytecode/GetByStatus.cpp:

(JSC::GetByStatus::computeFromLLInt):

  • bytecode/Instruction.h:

(JSC::BaseInstruction::width const):
(JSC::BaseInstruction::hasCheckpoints const):
(JSC::BaseInstruction::asKnownWidth const):
(JSC::BaseInstruction::wide16 const):
(JSC::BaseInstruction::wide32 const):

  • bytecode/InstructionStream.h:
  • bytecode/IterationModeMetadata.h: Copied from Source/JavaScriptCore/bytecode/SuperSampler.h.
  • bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp:

(JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::fireInternal):
(JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::clearLLIntGetByIdCache):

  • bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.h:
  • bytecode/Opcode.h:
  • bytecode/SpeculatedType.h:

(JSC::isSubtypeSpeculation):
(JSC::speculationContains):

  • bytecode/SuperSampler.h:

(JSC::SuperSamplerScope::release):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitGenericEnumeration):
(JSC::BytecodeGenerator::emitEnumeration):
(JSC::BytecodeGenerator::emitIsEmpty):
(JSC::BytecodeGenerator::emitIteratorOpen):
(JSC::BytecodeGenerator::emitIteratorNext):
(JSC::BytecodeGenerator::emitGetGenericIterator):
(JSC::BytecodeGenerator::emitIteratorGenericNext):
(JSC::BytecodeGenerator::emitIteratorGenericNextWithValue):
(JSC::BytecodeGenerator::emitIteratorGenericClose):
(JSC::BytecodeGenerator::emitGetAsyncIterator):
(JSC::BytecodeGenerator::emitDelegateYield):
(JSC::BytecodeGenerator::emitIteratorNextWithValue): Deleted.
(JSC::BytecodeGenerator::emitIteratorClose): Deleted.
(JSC::BytecodeGenerator::emitGetIterator): Deleted.

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::ArrayPatternNode::bindValue const):

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
(JSC::DFG::AbstractInterpreter<AbstractStateType>::forAllValues):

  • dfg/DFGAtTailAbstractState.h:

(JSC::DFG::AtTailAbstractState::size const):
(JSC::DFG::AtTailAbstractState::numberOfTmps const):
(JSC::DFG::AtTailAbstractState::atIndex):
(JSC::DFG::AtTailAbstractState::tmp):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::progressToNextCheckpoint):
(JSC::DFG::ByteCodeParser::get):
(JSC::DFG::ByteCodeParser::set):
(JSC::DFG::ByteCodeParser::jsConstant):
(JSC::DFG::ByteCodeParser::weakJSConstant):
(JSC::DFG::ByteCodeParser::addCall):
(JSC::DFG::ByteCodeParser::allocateUntargetableBlock):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::emitFunctionChecks):
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::handleCallVariant):
(JSC::DFG::ByteCodeParser::handleVarargsInlining):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::handleMinMax):
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
(JSC::DFG::ByteCodeParser::handleDOMJITCall):
(JSC::DFG::ByteCodeParser::handleIntrinsicGetter):
(JSC::DFG::ByteCodeParser::handleDOMJITGetter):
(JSC::DFG::ByteCodeParser::handleModuleNamespaceLoad):
(JSC::DFG::ByteCodeParser::handleTypedArrayConstructor):
(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
(JSC::DFG::ByteCodeParser::handlePutByVal):
(JSC::DFG::ByteCodeParser::handleCreateInternalFieldObject):
(JSC::DFG::ByteCodeParser::parse):

  • dfg/DFGCFGSimplificationPhase.cpp:

(JSC::DFG::CFGSimplificationPhase::keepOperandAlive):
(JSC::DFG::CFGSimplificationPhase::jettisonBlock):
(JSC::DFG::CFGSimplificationPhase::mergeBlocks):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::addStringReplacePrimordialChecks):

  • dfg/DFGForAllKills.h:

(JSC::DFG::forAllKilledOperands):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::bottomValueMatchingSpeculation):

  • dfg/DFGGraph.h:
  • dfg/DFGInPlaceAbstractState.cpp:

(JSC::DFG::InPlaceAbstractState::beginBasicBlock):
(JSC::DFG::InPlaceAbstractState::initialize):
(JSC::DFG::InPlaceAbstractState::endBasicBlock):
(JSC::DFG::InPlaceAbstractState::merge):

  • dfg/DFGInPlaceAbstractState.h:

(JSC::DFG::InPlaceAbstractState::size const):
(JSC::DFG::InPlaceAbstractState::numberOfTmps const):
(JSC::DFG::InPlaceAbstractState::atIndex):
(JSC::DFG::InPlaceAbstractState::operand):
(JSC::DFG::InPlaceAbstractState::local):
(JSC::DFG::InPlaceAbstractState::argument):
(JSC::DFG::InPlaceAbstractState::variableAt): Deleted.

  • dfg/DFGLazyJSValue.h:

(JSC::DFG::LazyJSValue::speculatedType const):

  • dfg/DFGNode.h:

(JSC::DFG::Node::hasConstant):
(JSC::DFG::Node::hasCellOperand):

  • dfg/DFGNodeType.h:
  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::callerReturnPC):

  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileCheckIsConstant):
(JSC::DFG::SpeculativeJIT::compileCheckCell): Deleted.

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGValidate.cpp:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckIsConstant):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckCell): Deleted.

  • generator/DSL.rb:
  • generator/Metadata.rb:
  • generator/Section.rb:
  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):

  • jit/JIT.h:
  • jit/JITCall.cpp:

(JSC::JIT::emitPutCallResult):
(JSC::JIT::compileSetupFrame):
(JSC::JIT::compileOpCall):
(JSC::JIT::emit_op_iterator_open):
(JSC::JIT::emitSlow_op_iterator_open):
(JSC::JIT::emit_op_iterator_next):
(JSC::JIT::emitSlow_op_iterator_next):

  • jit/JITCall32_64.cpp:

(JSC::JIT::emit_op_iterator_open):
(JSC::JIT::emitSlow_op_iterator_open):
(JSC::JIT::emit_op_iterator_next):
(JSC::JIT::emitSlow_op_iterator_next):

  • jit/JITInlines.h:

(JSC::JIT::updateTopCallFrame):
(JSC::JIT::advanceToNextCheckpoint):
(JSC::JIT::emitJumpSlowToHotForCheckpoint):
(JSC::JIT::emitValueProfilingSite):

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::setupGetByIdPrototypeCache):
(JSC::LLInt::performLLIntGetByID):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::genericCall):
(JSC::LLInt::handleIteratorOpenCheckpoint):
(JSC::LLInt::handleIteratorNextCheckpoint):
(JSC::LLInt::slow_path_checkpoint_osr_exit):
(JSC::LLInt::llint_dump_value):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • offlineasm/transform.rb:
  • runtime/CommonSlowPaths.cpp:

(JSC::iterator_open_try_fast):
(JSC::iterator_open_try_fast_narrow):
(JSC::iterator_open_try_fast_wide16):
(JSC::iterator_open_try_fast_wide32):
(JSC::iterator_next_try_fast):
(JSC::iterator_next_try_fast_narrow):
(JSC::iterator_next_try_fast_wide16):
(JSC::iterator_next_try_fast_wide32):

  • runtime/CommonSlowPaths.h:
  • runtime/Intrinsic.cpp:

(JSC::interationKindForIntrinsic):

  • runtime/Intrinsic.h:
  • runtime/JSArrayIterator.h:
  • runtime/JSCJSValue.h:
  • runtime/JSCJSValueInlines.h:

(JSC::JSValue::isCallable const):

  • runtime/JSCast.h:
  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::arrayProtoValuesFunctionConcurrently const):

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

(JSC::Structure::dumpBrief const):

Source/WTF:

Reviewed by Filip Pizlo.

  • wtf/EnumClassOperatorOverloads.h:
2:39 PM Changeset in webkit [260322] by commit-queue@webkit.org
  • 5 edits in trunk

Fix client certificate authentication when using non-default WKWebsiteDataStores
https://bugs.webkit.org/show_bug.cgi?id=210681

Patch by Alex Christensen <achristensen@webkit.org> on 2020-04-18
Reviewed by Brady Eidson.

Source/WebKit:

NetworkProcessProxy was trying to keep a map of WebsiteDataStores, but it wasn't as accurate as the one WebsiteDataStore was maintaining.
Use the latter map instead and client certificate authentication works. Otherwise, the credential isn't serialized correctly.
I found this while working on <rdar://problem/60340449> but this was unrelated so I put it in a different change.
This may fix <rdar://problem/60910392>.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::websiteDataStoreFromSessionID):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:

(TestWebKitAPI::TEST):

2:13 PM Changeset in webkit [260321] by ysuzuki@apple.com
  • 25 edits in trunk/Source/JavaScriptCore

[JSC] Replace DFG NewPromise with NewInternalFieldObject
https://bugs.webkit.org/show_bug.cgi?id=210687

Reviewed by Saam Barati.

The feature of DFG::NewPromise can be implemented completely with DFG::NewInternalFieldObject. This reduces code duplication, and furthermore,
this offers Object Allocation Sinking support for free. This patch replaces DFG::NewPromise with DFG::NewInternalFieldObject and remove DFG::NewPromise
completely.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGClobbersExitState.cpp:

(JSC::DFG::clobbersExitState):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNode.h:

(JSC::DFG::Node::convertToNewInternalFieldObject):
(JSC::DFG::Node::convertToNewInternalFieldObjectWithInlineFields):
(JSC::DFG::Node::hasIsInternalPromise):
(JSC::DFG::Node::hasStructure):
(JSC::DFG::Node::convertToNewPromise): Deleted.

  • dfg/DFGNodeType.h:
  • dfg/DFGObjectAllocationSinkingPhase.cpp:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewInternalFieldObject):
(JSC::DFG::SpeculativeJIT::compileNewPromise): Deleted.

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGStoreBarrierInsertionPhase.cpp:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileNewInternalFieldObject):
(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewInternalFieldObject):
(JSC::FTL::DFG::LowerDFGToB3::compileNewPromise): Deleted.

  • ftl/FTLOperations.cpp:

(JSC::FTL::operationPopulateObjectInOSR):
(JSC::FTL::operationMaterializeObjectInOSR):

  • runtime/JSInternalPromise.cpp:

(JSC::JSInternalPromise::createWithInitialValues):

  • runtime/JSInternalPromise.h:
  • runtime/JSPromise.cpp:

(JSC::JSPromise::createWithInitialValues):
(JSC::JSPromise::finishCreation):
(JSC::JSPromise::status const):
(JSC::JSPromise::result const):
(JSC::JSPromise::flags const):
(JSC::JSPromise::resolve):
(JSC::JSPromise::reject):
(JSC::JSPromise::rejectAsHandled):

  • runtime/JSPromise.h:

(JSC::JSPromise::initialValues):
(JSC::JSPromise::internalField const):
(JSC::JSPromise::internalField):

2:08 PM Changeset in webkit [260320] by fpizlo@apple.com
  • 1 edit
    2 adds in trunk/Websites/webkit.org

Unreviewed, check in some more files for a blog post.

  • blog-files/speculation-in-jsc/osr-exit-implicit-control-flow.graffle: Added.
  • blog-files/speculation-in-jsc/osr-exit-implicit-control-flow.svg: Added.
1:24 PM Changeset in webkit [260319] by Antti Koivisto
  • 10 edits
    2 adds in trunk

[CSS selectors] Support :where() pseudo class
https://bugs.webkit.org/show_bug.cgi?id=210690

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/invalidation/where-expected.txt:

Source/WebCore:

"The Specificity-adjustment pseudo-class, :where(), is a functional pseudo-class with the same
syntax and functionality as :is(). Unlike :is(), neither the :where pseudo-class, nor any of
its arguments contribute to the specificity of the selector—its specificity is always zero.

This is useful for introducing filters in a selector while keeping the associated style
declarations easy to override."

https://drafts.csswg.org/selectors-4/#zero-matches

In terms of implementation this is just another alias for :is() with different (always 0) specificity.

Test: fast/selectors/where-specificity.html

  • css/CSSSelector.cpp:

(WebCore::simpleSelectorSpecificityInternal):

Here is where it differs from PseudoClassIs.

(WebCore::CSSSelector::selectorText const):

  • css/CSSSelector.h:
  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::checkOne const):

  • css/SelectorPseudoClassAndCompatibilityElementMap.in:
  • css/parser/CSSSelectorParser.cpp:

(WebCore::isOnlyPseudoClassFunction):
(WebCore::CSSSelectorParser::consumePseudo):

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::addPseudoClassType):

LayoutTests:

  • fast/selectors/where-specificity-expected.html: Added.
  • fast/selectors/where-specificity.html: Added.
10:17 AM Changeset in webkit [260318] by Pablo Saavedra
  • 2 edits in trunk/Source/WebKit

[GTK][WPE] Replace evil strtok() calls with fscanf() in MemoryPressureMonitor.cpp
https://bugs.webkit.org/show_bug.cgi?id=210346

Reviewed by Adrian Perez de Castro.

  • UIProcess/linux/MemoryPressureMonitor.cpp:

(WebKit::lowWatermarkPages):
(WebKit::getCgroupControllerPath):
(WebKit::systemMemoryUsedAsPercentage):
(WebKit::CGroupMemoryController::getCgroupFileValue):

10:04 AM Changeset in webkit [260317] by commit-queue@webkit.org
  • 24 edits in trunk/Source

Reduce parameter list of the FrameLoadRequest constructor
https://bugs.webkit.org/show_bug.cgi?id=210668

Patch by Rob Buis <rbuis@igalia.com> on 2020-04-18
Reviewed by Darin Adler.

Source/WebCore:

Reduce parameter list of the FrameLoadRequest constructor by
instead using various setters. By choosing the most common
defaults the actual number of setters to call are minimized.

  • inspector/InspectorFrontendClientLocal.cpp:

(WebCore::InspectorFrontendClientLocal::openInNewTab):

  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::navigate):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::handleProvisionalLoadFailureFromContentFilter):

  • loader/FrameLoadRequest.cpp:

(WebCore::FrameLoadRequest::FrameLoadRequest):

  • loader/FrameLoadRequest.h:

(WebCore::FrameLoadRequest::FrameLoadRequest):
(WebCore::FrameLoadRequest::disableShouldReplaceDocumentIfJavaScriptURL):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::changeLocation):
(WebCore::FrameLoader::loadURLIntoChildFrame):

  • loader/NavigationScheduler.cpp:

(WebCore::NavigationScheduler::scheduleLocationChange):

  • page/ContextMenuController.cpp:

(WebCore::openNewWindow):
(WebCore::ContextMenuController::contextMenuItemSelected):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::createWindow):

  • page/DragController.cpp:

(WebCore::DragController::performDragOperation):

Source/WebKit:

Adapt to API change.

  • WebProcess/Inspector/WebInspector.cpp:

(WebKit::WebInspector::openInNewTab):

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::performFrameLoadURLRequest):
(WebKit::PluginView::loadURL):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::loadURLInFrame):
(WebKit::WebPage::loadDataInFrame):
(WebKit::WebPage::loadRequest):
(WebKit::WebPage::loadDataImpl):

Source/WebKitLegacy/ios:

Adapt to API change.

  • WebView/WebPDFViewPlaceholder.mm:

(-[WebPDFViewPlaceholder simulateClickOnLinkToURL:]):

Source/WebKitLegacy/mac:

Adapt to API change.

  • Plugins/WebPluginController.mm:

(-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):

  • WebView/WebFrame.mm:

(-[WebFrame loadRequest:]):
(-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):

  • WebView/WebPDFView.mm:

(-[WebPDFView PDFViewWillClickOnLink:withURL:]):

Source/WebKitLegacy/win:

Adapt to API change.

  • Plugins/PluginView.cpp:

(WebCore::PluginView::start):
(WebCore::PluginView::performRequest):
(WebCore::PluginView::getURLNotify):
(WebCore::PluginView::getURL):
(WebCore::PluginView::handlePost):

  • WebFrame.cpp:

(WebFrame::loadRequest):
(WebFrame::loadData):

9:35 AM Changeset in webkit [260316] by ddkilzer@apple.com
  • 5 edits in trunk/Source/WebKit

[IPC hardening] Use MESSAGE_CHECK in WebPasteboardProxy
<https://webkit.org/b/210684>
<rdar://problem/59906721>

Reviewed by Wenson Hsieh.

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
  • Add missing #undef of MESSAGE_CHECK_COMPLETION and MESSAGE_CHECK_WITH_RETURN_VALUE.

(WebKit::WebPasteboardProxy::getPasteboardPathnamesForType):
(WebKit::WebPasteboardProxy::getPasteboardStringForType):
(WebKit::WebPasteboardProxy::getPasteboardStringsForType):
(WebKit::WebPasteboardProxy::getPasteboardBufferForType):
(WebKit::WebPasteboardProxy::setPasteboardStringForType):
(WebKit::WebPasteboardProxy::setPasteboardBufferForType):
(WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
(WebKit::WebPasteboardProxy::readStringFromPasteboard):
(WebKit::WebPasteboardProxy::readBufferFromPasteboard):

  • Replace existing code with MESSAGE_CHECK_COMPLETION macros.
  • UIProcess/WebPasteboardProxy.cpp:

(WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):

  • UIProcess/WebPasteboardProxy.h:
  • UIProcess/WebPasteboardProxy.messages.in:
  • Add IPC::Connection to TypesSafeForDOMToReadAndWrite.
9:33 AM Changeset in webkit [260315] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKitLegacy/mac

-[WebPreferences initWithCoder:] should use -[NSCoder decodeValueOfObjCType:at:size:]
<https://webkit.org/b/210621>
<rdar://problem/61906458>

Reviewed by Anders Carlsson.

  • WebView/WebPreferences.mm:

(-[WebPreferences initWithCoder:]):

  • Switch to -[NSCoder decodeValueOfObjCType:at:size:].
9:25 AM Changeset in webkit [260314] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, build fix for ARM64E after r260310
https://bugs.webkit.org/show_bug.cgi?id=207330

r260310 uses undefined function Instruction.cloneWithNewOperands in arm64e.rb and throws an error.
This patch calls node.cloneWithNewOperands.

  • offlineasm/arm64e.rb:
9:01 AM Changeset in webkit [260313] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Attempt #3 to fix tvOS build

Unreviewed.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateDisableExternalPlayback):

  • Use !PLATFORM(APPLETV) to comment out functions declared within ENABLE(VIDEO_PRESENTATION_MODE) from r260307 and r260308.
9:01 AM Changeset in webkit [260312] by Alexey Shvayka
  • 9 edits
    1 add in trunk

RegExp.prototype[@@search] should use SameValue
https://bugs.webkit.org/show_bug.cgi?id=173226

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/same-value-intrinsic.js: Added.
  • test262/expectations.yaml: Mark 4 test cases as passing.

Source/JavaScriptCore:

This change exposes Object.is implementation as link-time-constant @sameValue and utilizes
it in RegExp.prototype[@@search] per spec [1], aligning JSC with V8 and SpiderMonkey.

[1]: https://tc39.es/ecma262/#sec-regexp.prototype-@@search (steps 5, 8)

  • builtins/BuiltinNames.h:
  • builtins/RegExpPrototype.js:

(Symbol.search):

  • bytecode/LinkTimeConstant.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/ObjectConstructor.cpp:
  • runtime/ObjectConstructor.h:
8:57 AM Changeset in webkit [260311] by ysuzuki@apple.com
  • 12 edits
    1 move in trunk/Source

[WTF] Move DataRef.h from WebCore to WTF to utilize it in JSC
https://bugs.webkit.org/show_bug.cgi?id=210689

Reviewed by Anders Carlsson.

Source/WebCore:

No behavior change, just moving header from WebCore to WTF.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • rendering/style/NinePieceImage.h:
  • rendering/style/RenderStyle.h:
  • rendering/style/SVGRenderStyle.h:
  • rendering/style/StyleRareInheritedData.cpp:
  • rendering/style/StyleRareInheritedData.h:
  • rendering/style/StyleRareNonInheritedData.h:

Source/WTF:

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/DataRef.h: Renamed from Source/WebCore/rendering/style/DataRef.h.
7:59 AM Changeset in webkit [260310] by commit-queue@webkit.org
  • 5 edits in trunk/Source/JavaScriptCore

Fix code origin when lowering offlineasm instructions on MIPS/ARM64E
https://bugs.webkit.org/show_bug.cgi?id=207330

Patch by Angelos Oikonomopoulos <Angelos Oikonomopoulos> on 2020-04-18
Reviewed by Mark Lam.

Instruction operands are mapped to RegisterID in RegisterID.forName
and the operation is memoized. Therefore, we can't use the codeOrigin
of the operand at that point. Use the codeOrigin of the original
instruction instead.

  • offlineasm/arm64e.rb:
  • offlineasm/ast.rb:
  • offlineasm/mips.rb:
  • offlineasm/risc.rb:
7:19 AM Changeset in webkit [260309] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION(r260246): It broke build on MIPS32
https://bugs.webkit.org/show_bug.cgi?id=210665

Patch by Angelos Oikonomopoulos <Angelos Oikonomopoulos> on 2020-04-18
Reviewed by Aakash Jain.

The mnemonic for 'store halfword' is 'sh', not 'shv'. This appears to
be a typo in a path that was never exercised.

Exposed by r260246; riscLowerMisplacedAddresses now calls into
riscAsRegisters with an 'h' suffix, which results in a 'storeh'
instruction. The storeh is then lowered to the non-existent 'shv'.

  • offlineasm/mips.rb:
4:58 AM Changeset in webkit [260308] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Attempt #2 to fix tvOS build

Unreviewed.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
  • Add #if ENABLE(VIDEO_PRESENTATION_MODE)/#endif to protect methods defined in MediaPlayerPrivate.h.
  • The previous commit was (r260307) also to fix tvOS, not watchOS.
12:15 AM Changeset in webkit [260307] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Attempt to fix watchOS build

Unreviewed.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • Add #if ENABLE(VIDEO_PRESENTATION_MODE)/#endif to protect methods defined in MediaPlayerPrivate.h.

Apr 17, 2020:

8:04 PM Changeset in webkit [260306] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKitLegacy/mac

[iOS WK1] -[_WebSafeForwarder asyncForwarder] uses non-static dispatch_once_t predicate
<https://webkit.org/b/210625>

Reviewed by Daniel Bates.

Remove use of dispatch_once to initialize
_WebSafeForwarder._asyncForwarder, and modernize both
_WebSafeForwarder and _WebSafeAsyncForwarder classes.

  • WebView/WebView.mm:

(@interface _WebSafeAsyncForwarder):

  • Make _forwarder weak. It can't be strong or a retain cycle would be created between this object and _WebSafeForwarder.
  • Change return type from id to instancetype for -[_WebSafeAsyncForwarder initWithForwarder:].

(@interface _WebSafeForwarder):

  • Make _target weak and rename from target.
  • Make _defaultTarget weak and rename from defaultTarget.
  • Rename _asyncForwarder from asyncForwarder.
  • Delete unused asyncForwarderPred.
  • Replace -asyncForwarder method declaration with a @property definition.

(-[_WebSafeForwarder initWithTarget:defaultTarget:]):

  • Update for instance variable renames.
  • Iniitalize _asyncForwarder here. There are (at most) eight _WebSafeForwarder objects created per WebView, so creating this object in the constructor seems reasonable.

(-[_WebSafeForwarder asyncForwarder:]):

  • Delete this method (and use of dispatch_once, fixing the bug). Replace with @synthesize statement.

(-[_WebSafeForwarder dealloc:]):

  • Update for instance variable renames, and assign nil to all instance variables.

(-[_WebSafeForwarder forwardInvocation:]):
(-[_WebSafeForwarder respondsToSelector:]):
(-[_WebSafeForwarder methodSignatureForSelector:]):

  • Update for instance variable renames.

(-[_WebSafeForwarder initWithForwarder:]):

  • Change return type from id to instancetype.
6:37 PM Changeset in webkit [260305] by Simon Fraser
  • 45 edits in trunk

Group overflow controls layers into a single container layer
https://bugs.webkit.org/show_bug.cgi?id=210675

Reviewed by Zalan Bujtas.

Source/WebCore:

Overflow control layers are going to change z-order in a future change. To make this
easier, group the overflow controls layer into their own container layer.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateDebugIndicators):
(WebCore::RenderLayerBacking::updateGeometry): Size the overflow controls layer using paddingBoxRectIncludingScrollbar().
(WebCore::RenderLayerBacking::updateInternalHierarchy): New parenting.
(WebCore::RenderLayerBacking::updateOverflowControlsLayers): Some refactoring with a nice lambda.
(WebCore::RenderLayerBacking::positionOverflowControlsLayers): Lovely lambda here. Nice.

  • rendering/RenderLayerBacking.h:

LayoutTests:

Rebaselines.

  • compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt:
  • compositing/layer-creation/absolute-in-async-overflow-scroll-expected.txt:
  • compositing/layer-creation/clipping-scope/nested-scroller-overlap-expected.txt:
  • compositing/layer-creation/clipping-scope/overlap-constrained-inside-scroller-expected.txt:
  • compositing/layer-creation/clipping-scope/overlap-constrained-inside-stacking-context-scroller-expected.txt:
  • compositing/layer-creation/clipping-scope/scroller-with-negative-z-children-expected.txt:
  • compositing/layer-creation/clipping-scope/shared-layers-in-scroller-expected.txt:
  • compositing/overflow/overflow-auto-with-touch-expected.txt:
  • compositing/overflow/overflow-overlay-with-touch-expected.txt:
  • compositing/overflow/overflow-scrollbar-layer-positions-expected.txt:
  • compositing/overflow/scrolling-content-clip-to-viewport-expected.txt:
  • compositing/overflow/stacking-context-composited-scroller-with-foreground-paint-phases-expected.txt:
  • compositing/overflow/textarea-scroll-touch-expected.txt:
  • compositing/repaint/scroller-with-foreground-layer-repaints-expected.txt:
  • compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-clipped-by-scroll-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/layer-for-negative-z-in-scroller-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-hidden-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-visible-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/layer-in-overflow-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/layer-in-overflow-gain-clipping-layer-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/layer-in-overflow-in-clipped-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/layer-in-overflow-lose-clipping-layer-expected.txt:
  • compositing/scrolling/async-overflow-scrolling/visibility-hidden-scrollers-expected.txt:
  • compositing/scrolling/overflow-scrolling-layers-are-self-painting-expected.txt:
  • compositing/shared-backing/overflow-scroll/absolute-in-stacking-relative-in-scroller-expected.txt:
  • compositing/shared-backing/overflow-scroll/composited-absolute-in-absolute-in-relative-in-scroller-expected.txt:
  • compositing/shared-backing/overflow-scroll/nested-absolute-with-clipping-in-stacking-overflow-expected.txt:
  • compositing/shared-backing/overflow-scroll/previous-sibling-prevents-inclusiveness-expected.txt:
  • compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-clipping-expected.txt:
  • compositing/shared-backing/overflow-scroll/relative-in-clipping-in-scroller-in-relative-clipping-expected.txt:
  • compositing/shared-backing/overflow-scroll/relative-in-div-in-overflow-scroll-expected.txt:
  • compositing/shared-backing/overflow-scroll/scrolled-contents-has-painted-content-expected.txt:
  • fast/scrolling/mac/event-region-scrolled-contents-layer-expected.txt:
  • platform/mac-wk1/compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt:
  • platform/mac/compositing/overflow/overflow-auto-with-touch-toggle-expected.txt:
  • tiled-drawing/scrolling/overflow/overflow-scrolled-down-tile-coverage-expected.txt:
  • tiled-drawing/scrolling/overflow/overflow-scrolled-up-tile-coverage-expected.txt:
  • tiled-drawing/scrolling/overflow/overflow-tile-coverage-expected.txt:
6:26 PM Changeset in webkit [260304] by mmaxfield@apple.com
  • 2 edits in trunk/LayoutTests

[Cocoa] Password obscuring dots drawn with the system font are too small
https://bugs.webkit.org/show_bug.cgi?id=209692

Reviewed by Darin Adler.

Addressing post-review comments.

  • platform/mac/TestExpectations:
5:54 PM Changeset in webkit [260303] by Kate Cheney
  • 31 edits in trunk

Enable service workers for app-bound domains
https://bugs.webkit.org/show_bug.cgi?id=210451
<rdar://problem/61479474>

Reviewed by Brent Fulgham.

Source/WebCore:

SWServer now retrieves the app-bound domains from the UI Process and
only continues with the load if the proper entitlement is present
or the load is coming from an app-bound domain.

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::addRegistrationFromStore):
(WebCore::SWServer::SWServer):
(WebCore::SWServer::validateRegistrationDomain):
(WebCore::SWServer::scheduleJob):

  • workers/service/server/SWServer.h:

Source/WebKit:

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::createFetchTask):
(WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
(WebKit::NetworkConnectionToWebProcess::swConnection):
(WebKit::NetworkConnectionToWebProcess::isServiceWorkerAllowed const): Deleted.

  • NetworkProcess/NetworkConnectionToWebProcess.h:

Removed ASSERTS and service worker entitlement checks which are now done along with app-bound
domain checks in SWServer.cpp.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::addWebsiteDataStore):
Remove the check for parentProcessHasServiceWorkerEntitlement() before
adding a serviceWorkerSession. This doesn't do anything except add an
entry to a map, and simplifies the case where we need a session for
app-bound instances which should have service workers but have no entitlement.

Pass the entitlement and a new callback to request app-bound domains
from the UI Process to the SWServer. This will make sure the server
checks for the entitlement or list of app-bound domains before completing a load.

(WebKit::NetworkProcess::registerSWServerConnection):
Remove unnecessary ASSERT for entitlement.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/ios/NetworkProcessIOS.mm:

(WebKit::NetworkProcess::parentProcessHasServiceWorkerEntitlement const):
(WebKit::NetworkProcess::disableServiceWorkerEntitlement):
(WebKit::NetworkProcess::clearServiceWorkerEntitlementOverride):
In order to test this thoroughly, TestWebKitAPI needed a way to
temporarily disable the service worker entitlement. This function
overrides the check for the entitlement if the bool is set, disabling
the entitlement.

  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):

  • Shared/WebPageCreationParameters.h:

WebPage needs to know if it is app-bound when created so it can update
the service worker preferences key accordingly.

  • Shared/WebPreferences.yaml:
  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _serviceWorkerEntitlementDisabledForTesting]):
(-[WKPreferences _setServiceWorkerEntitlementDisabledForTesting:]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:

Disable entitlement for testing.

  • UIProcess/API/APIPageConfiguration.cpp:

(API::PageConfiguration::copy const):

  • UIProcess/API/APIPageConfiguration.h:

(API::PageConfiguration::limitsNavigationsToAppBoundDomains const):
(API::PageConfiguration::setLimitsNavigationsToAppBoundDomains):
(API::PageConfiguration::limitsNavigationToAppBoundDomains const): Deleted.
(API::PageConfiguration::setLimitsNavigationToAppBoundDomains): Deleted.
(-[WKWebViewConfiguration limitsNavigationsToAppBoundDomains]):
(-[WKWebViewConfiguration setLimitsNavigationsToAppBoundDomains:]):
(-[WKWebViewConfiguration limitsNavigationToAppBoundDomains]): Deleted.
(-[WKWebViewConfiguration setLimitsNavigationToAppBoundDomains:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

Inconsistent naming (Navigation vs Navigations).

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setupPageConfiguration:]):
Check for entitlement or app-bound webview.

(-[WKWebView _serviceWorkersEnabled:]):
(-[WKWebView _clearServiceWorkerEntitlementOverride:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Testing SPIs.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::getAppBoundDomains):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:

Sends the app-bound domains to the Network Process.

  • UIProcess/WebPageProxy.cpp:

(WebKit::m_limitsNavigationsToAppBoundDomains):
(WebKit::m_limitsNavigationToAppBoundDomains): Deleted.
Naming inconsistency.

(WebKit::WebPageProxy::disableServiceWorkerEntitlementInNetworkProcess):
(WebKit::WebPageProxy::clearServiceWorkerEntitlementOverride):

  • UIProcess/WebPageProxy.h:

Disable entitlement for testing.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_isNavigatingToAppBoundDomain):
Set this parameter in the constructor so it will be accurate when
updating preferences.

(WebKit::WebPage::updatePreferences):

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::clearServiceWorkerEntitlementOverride):

  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::parentProcessHasServiceWorkerEntitlement const):
(WebKit::WebPage::disableServiceWorkerEntitlement):
(WebKit::WebPage::clearServiceWorkerEntitlementOverride):
Disable entitlement for testing.

Tools:

Adds 2 test cases to make sure service workers behave properly on
app bound domains, and that the APIs are not available on non-app
bound domains.

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:

(-[SWInAppBrowserPrivacyMessageHandler userContentController:didReceiveScriptMessage:]):

4:40 PM Changeset in webkit [260302] by achristensen@apple.com
  • 7 edits in trunk

NetworkSessionCocoa should request client certificate only once per host/port
https://bugs.webkit.org/show_bug.cgi?id=210626
<rdar://problem/60340449>

Reviewed by Geoffrey Garen.

Source/WebKit:

NSURLSession creates more than one TCP connection to a server when using HTTP 1.1.
Each TCP connection with TLS generates a didReceiveChallenge to do the server trust evaluation of the certificate chain.
If the server requests a client certificate in the TLS handshake, it also generates a didReceiveChallenge to request client
certificates as well. This is an implementation detail of our networking. We should not actually ask the WKNavigationDelegate
for client certificates more than once per host/port. We should remember the credential and give it to NSURLSession immediately
if we have used this credential in the past for a task that has received bytes (either a response or a redirect). If the TLS
handshake fails, we should not reuse that same certificate automatically.

  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
(-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
(WebKit::NetworkSessionCocoa::clientCertificateSuggestedForHost):
(WebKit::NetworkSessionCocoa::taskReceivedBytes):
(WebKit::NetworkSessionCocoa::taskFailed):
(WebKit::NetworkSessionCocoa::successfulClientCertificateForHost const):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:

(TestWebKitAPI::clientCertServerWithCertVerifier):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/cocoa/HTTPServer.h:

(TestWebKitAPI::HTTPServer::HTTPResponse::HTTPResponse):

  • TestWebKitAPI/cocoa/HTTPServer.mm:

(TestWebKitAPI::HTTPServer::HTTPServer):

4:30 PM Changeset in webkit [260301] by dino@apple.com
  • 6 edits in trunk/Source/WebCore

[WebGL] Confirm there are no errors when setting up framebuffers
https://bugs.webkit.org/show_bug.cgi?id=210632
<rdar://problem/61916680>

Reviewed by Simon Fraser.

We're seeing crashes on macOS inside GraphicsContextGL::reshape().
Specifically when we submit work at the end of the function via
glFlush.

At the moment the cause is a mystery, because we should bail out
before then if the multisample renderbuffer was not complete. In
the hope that it helps somewhat, add a call to glGetError to double
check that there isn't anything horribly wrong before we talk to
the GPU.

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::WebGL2RenderingContext): If the underlying
GCGL context was marked as "LOST" during initialization, skip the rest of our
initialization.

  • html/canvas/WebGLRenderingContext.cpp: Ditto.

(WebCore::WebGLRenderingContext::WebGLRenderingContext):

  • html/canvas/WebGLRenderingContextBase.cpp: Ditto.

(WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp: Check for a GL error during

setup and, if there is one, skip directly into a LOST state.
(WebCore::GraphicsContextGLOpenGL::reshape):

  • platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:

(WebCore::GraphicsContextGLOpenGL::reshape):

4:13 PM Changeset in webkit [260300] by Alan Coon
  • 1 copy in tags/Safari-609.2.7.1

Tag Safari-609.2.7.1.

4:06 PM Changeset in webkit [260299] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

Bug 210646: REGRESSION (r260112): createArchiveList() leaks malloc memory on early returns due to an error
<https://webkit.org/b/210646>
<rdar://problem/61928031>

Reviewed by Darin Adler.

  • Shared/mac/WebCoreArgumentCodersMac.mm:

(IPC::createArchiveList):

  • Move early returns for protocolProperties, protocolProperties and mimeType above memory allocation to fix the memory leak.
4:05 PM Changeset in webkit [260298] by ddkilzer@apple.com
  • 2 edits in trunk/Tools

Bug 210645: REGRESSION (r211095): [iOS] TestRunnerWKWebView leaks @property accessibilitySpeakSelectionContent
<https://webkit.org/b/210645>
<rdar://problem/61927607>

Reviewed by Chris Fleizach.

  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView dealloc]):

  • Release accessibilitySpeakSelectionContent in -dealloc.
4:01 PM Changeset in webkit [260297] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, reverting r260279.
https://bugs.webkit.org/show_bug.cgi?id=210678

Throwing error would be more efficient, having a generic code
is still worth doing (Requested by yusukesuzuki on #webkit).

Reverted changeset:

"[JSC] We do not need to have exit-check for Map/Set iterator
functions"
https://bugs.webkit.org/show_bug.cgi?id=210667
https://trac.webkit.org/changeset/260279

4:01 PM Changeset in webkit [260296] by Alan Coon
  • 8 edits in branches/safari-609.2.7-branch/Source

Versioning.

3:55 PM Changeset in webkit [260295] by beidson@apple.com
  • 17 edits in trunk

Pass sandbox extensions for back/forward list navigations after the policy is decided at process-swap time.
<rdar://problem/59535167> and https://bugs.webkit.org/show_bug.cgi?id=210623

Reviewed by Geoff Garen.

Source/WebKit:

Covered by almost all existing tests, and a new API test.

Instead of granting a sandbox extension when updating the back/forward cursor for a pending
back/forward list traversal, do so after the client decides the policy.
(Which is also along with a process swap in interesting cases)

  • Shared/PolicyDecision.h:

(WebKit::PolicyDecision::encode const):
(WebKit::PolicyDecision::decode):

  • Shared/WebPageCreationParameters.h:
  • UIProcess/API/APINavigation.cpp:

(API::Navigation::Navigation):

  • UIProcess/API/APINavigation.h:

(API::Navigation::create):
(API::Navigation::reloadItem const):

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::backForwardGoToItem):

  • UIProcess/ProvisionalPageProxy.h:
  • UIProcess/WebNavigationState.cpp:

(WebKit::WebNavigationState::createReloadNavigation):

  • UIProcess/WebNavigationState.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::launchProcessForReload):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::receivedPolicyDecision):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::receivedPolicyDecision):

  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebPage/WebBackForwardListProxy.cpp:

(WebKit::WebBackForwardListProxy::goToItem):

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::didReceivePolicyDecision):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
3:45 PM Changeset in webkit [260294] by Alan Coon
  • 1 copy in branches/safari-609.2.7-branch

New branch.

3:41 PM Changeset in webkit [260293] by Peng Liu
  • 4 edits in trunk/Source/WebCore

Cleanup the macros for video fullscreen and picture-in-picture
https://bugs.webkit.org/show_bug.cgi?id=210638

Reviewed by Eric Carlson.

A follow-up patch to fix build failures of r260259.

  • platform/ios/VideoFullscreenInterfaceAVKit.h:
  • platform/ios/VideoFullscreenInterfaceAVKit.mm:
  • platform/ios/WebVideoFullscreenControllerAVKit.mm:
3:35 PM Changeset in webkit [260292] by Russell Epstein
  • 1 copy in tags/Safari-610.1.10

Tag Safari-610.1.10.

3:33 PM Changeset in webkit [260291] by Devin Rousso
  • 12 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r242018): using RegExp.prototype.test with a global RegExp will ignore one potential match after each successful match
https://bugs.webkit.org/show_bug.cgi?id=210671

Reviewed by Timothy Hatcher.

  • UserInterface/Base/SearchUtilities.js:

(WI.SearchUtilities.searchRegExpForString):
(WI.SearchUtilities.filterRegExpForString):
(WI.SearchUtilities._regExpForString):
(WI.SearchUtilities.regExpForString): Deleted.
Many uses of WI.SearchUtilities.regExpForString use the returned RegExp multiple times,
expecting each use to be done in isolation from every other use (e.g. filtering). In these
cases, the global flag g should not be set on the RegExp, as otherwise it will keep a
state of the last matched index, thereby breaking this isolation. As such, it is necessary
to split WI.SearchUtilities.regExpForString into two versions, one for each use case.

  • UserInterface/Views/DOMTreeElement.js:

(WI.DOMTreeElement.prototype._highlightSearchResults):

  • UserInterface/Views/LogContentView.js:

(WI.LogContentView.prototype.performSearch):

  • UserInterface/Views/ResourceHeadersContentView.js:

(WI.ResourceHeadersContentView.prototype._perfomSearchOnKeyValuePairs):

  • UserInterface/Views/ResourceSecurityContentView.js:

(WI.ResourceSecurityContentView.prototype._perfomSearchOnKeyValuePairs):

  • UserInterface/Views/SearchSidebarPanel.js:

(WI.SearchSidebarPanel.prototype.performSearch.forEachMatch):
Use WI.SearchUtilities.searchRegExpForString as these views expect the search to maintain
its current position throughout the contents of the view.

  • UserInterface/Views/DataGrid.js:

(WI.DataGrid.prototype._updateFilter):

  • UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:

(WI.IndexedDatabaseObjectStoreContentView.prototype.dataGridMatchNodeAgainstCustomFilters):

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype._urlFilterDidChange):

  • UserInterface/Views/SourceCodeTextEditor.js:

(WI.SourceCodeTextEditor.prototype.customPerformSearch.searchResultCallback):

  • UserInterface/Views/TextEditor.js:

(WI.TextEditor.prototype.performSearch):
Use WI.SearchUtilities.filterRegExpForString as these views expect each search to be done
in isolation from every other search (e.g. filtering).

3:08 PM Changeset in webkit [260290] by ddkilzer@apple.com
  • 5 edits in trunk/Source

REGRESSION (r234105): [iOS] WKColorButton leaks a UIColor
<https://webkit.org/b/210658>
<rdar://problem/61938137>

Reviewed by Darin Adler.

Source/WebCore:

  • html/ColorInputType.cpp:

(WebCore::ColorInputType::isKeyboardFocusable const):

  • page/Chrome.cpp:

(WebCore::Chrome::createColorChooser):

  • Drive-by fix of unreachable code on PLATFORM(IOS_FAMILY).

Source/WebKit:

  • UIProcess/ios/forms/WKFormColorPicker.mm:

(-[WKColorButton dealloc]): Add.

  • Release _color instance variable to fix leak.
2:48 PM Changeset in webkit [260289] by sbarati@apple.com
  • 8 edits
    1 add in trunk

GetTypedArrayByteOffset is broken on arm64e
https://bugs.webkit.org/show_bug.cgi?id=210631

Reviewed by Mark Lam.

JSTests:

  • stress/byte-offset-on-wasteful-neutered-arm64e.js: Added.

(foo):
(assert):
(transferArrayBuffer.array.buffer):

Source/JavaScriptCore:

The vector of JSArrayBufferView is signed even when null on arm64e. However, we were
comparing against zero, which is wrong. This patch changes it so we do the right thing
and instead compare against whatever constant (ptr=nullptr,size=0) signs as.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffset):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayByteOffset):

  • runtime/CagedBarrierPtr.h:

(JSC::CagedBarrierPtr::rawBits const):

  • runtime/JSArrayBufferView.h:

(JSC::JSArrayBufferView::nullVectorPtr):

Source/WTF:

  • wtf/CagedPtr.h:

(WTF::CagedPtr::rawBits const):

2:34 PM Changeset in webkit [260288] by Alan Coon
  • 4 edits
    1 add in branches/safari-609-branch

Cherry-pick r260278. rdar://problem/61950220

Bring Fullscreen API + alert() behavior from iOS to macOS
https://bugs.webkit.org/show_bug.cgi?id=210662

Reviewed by Eric Carlson.

Source/WebKit:

When a page is showing an alert(), all non-synchronous messages will be blocked until the sync XPC for alert()
ends. And when exiting fullscreen, we block completing the fullscreen exit animation until a repaint XPC completes.
So a page that is showing an alert() will never fully exit element fullscreen mode.

On iOS, we fixed this behavior by exiting fullscreen mode whenever the page shows an alert() or prompt(). We should
bring this behavior to macOS as well.

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::runJavaScriptAlert): (WebKit::WebPageProxy::runJavaScriptConfirm): (WebKit::WebPageProxy::runJavaScriptPrompt):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenAlert.mm: Added. (TestWebKitAPI::TEST):

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

2:34 PM Changeset in webkit [260287] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/JavaScriptCore

Cherry-pick r260246. rdar://problem/61943700

offlineasm is generating the wrong load/store for the "orh" instruction.
https://bugs.webkit.org/show_bug.cgi?id=210639
<rdar://problem/21501876>

Reviewed by Robin Morisset.

For example, on ARM64E, the "orh" instruction was generating the following:

"\tldr w17, [x1, #0]\n" JavaScriptCore/llint/LowLevelInterpreter64.asm:919
"\torr w17, w17, #64\n"
JavaScriptCore/llint/LowLevelInterpreter64.asm:919
"\tstr w17, [x1, #0]\n" JavaScriptCore/llint/LowLevelInterpreter64.asm:919

i.e. a 32-bit load, followed by a 32-bit OR, followed by a 32-bit store.

Instead, it should be generating the following:

"\tldrh w17, [x1, #0]\n" JavaScriptCore/llint/LowLevelInterpreter64.asm:919
"\torr w17, w17, #64\n"
JavaScriptCore/llint/LowLevelInterpreter64.asm:919
"\tstrh w17, [x1, #0]\n" JavaScriptCore/llint/LowLevelInterpreter64.asm:919

i.e. a 16-bit load, followed by a 32-bit OR, followed by a 16-bit store.

This bug also affects ARM64, ARMv7, and MIPS (basically any backend that uses
riscLowerMisplacedAddresses() from rise.rb). It does not affect x86, x86_64, and
C_LOOP (which was written based on x86).

  • offlineasm/risc.rb:

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

2:34 PM Changeset in webkit [260286] by Alan Coon
  • 3 edits in branches/safari-609-branch/Source/JavaScriptCore

Cherry-pick r260180. rdar://problem/61943707

[JSC] Use ensureStillAliveHere in FTL when content of storage should be kept alive
https://bugs.webkit.org/show_bug.cgi?id=210583
<rdar://problem/61831515>

Reviewed by Mark Lam.

The content of Butterfly / ArrayStorage is kept alive only when the owner JSCell is alive.
This means that we should keep the owner JSCell alive if we are loading content of storage
which includes JSCells. This patch inserts ensureStillAliveHere in FTL to ensure this invariant.

  • ftl/FTLJITCode.cpp: (JSC::FTL::JITCode::~JITCode): Found that we get crash with dumpDisassembly if FTL::JITCode is destroyed while it fails to generate code while testing this.
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileGetByVal): (JSC::FTL::DFG::LowerDFGToB3::compileArrayIndexOf): (JSC::FTL::DFG::LowerDFGToB3::compileArrayPop): (JSC::FTL::DFG::LowerDFGToB3::compileStringCharAt): (JSC::FTL::DFG::LowerDFGToB3::compileStringCharCodeAt): (JSC::FTL::DFG::LowerDFGToB3::compileStringCodePointAt): (JSC::FTL::DFG::LowerDFGToB3::compileGetByOffset): (JSC::FTL::DFG::LowerDFGToB3::compileMultiGetByOffset):

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

2:34 PM Changeset in webkit [260285] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/JavaScriptCore

Cherry-pick r259572. rdar://problem/61943713

[JSC] Put ensureStillAliveHere for Integer TypedArrays in GetByVal
https://bugs.webkit.org/show_bug.cgi?id=210047

Reviewed by Mark Lam.

While r258381 puts ensureStillAliveHere in FTL to keep base alive for float/double TypedArrays,
we need to do the same thing for integer TypedArrays too. This patch places it.

  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):

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

2:29 PM Changeset in webkit [260284] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Deny iokit open access of unused class in the WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=210669

Reviewed by Brent Fulgham.

Telemetry shows that iokit open access of an iokit class can be removed from the WebContent sandbox.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2:20 PM Changeset in webkit [260283] by Chris Dumez
  • 17 edits in trunk/Source/WebKit

[iOS] Refactor WebKit uploads process assertion logic to minimize chances of leaking them
https://bugs.webkit.org/show_bug.cgi?id=210664
<rdar://problem/61751982>

Reviewed by Geoff Garen.

To minimize chances of leaking "WebKit uploads" process assertion, the following refactoring
was done:

  1. WebKit upload assertions are now held by NetworkProcessProxy instead of the WebProcessPool. This makes more sense since uploads are tied to a particular network process. In base of a network process crash, we would not want those assertions to persist for example.
  2. Store all upload assertions (UIProcess + NetworkProcess + WebProcesses) into a single UploadActivity data structure that can easily be cleared. Make sure we clear it on network process crash.
  3. No longer on the WebProcess to send IPC whenever its has pending uploads or not. Instead, have the network process send such IPC. This makes more sense, especially now that all webkit upload process assertions are now stored on NetworkProcessProxy. It also makes it so that we deal properly with WebProcess crashes. In case of a WebProcess crash, its connection to the network process will get closed. NetworkConnectionToWebProcess::didClose() gets called and causes all NetworkResourceLoader objects for this connection to get destroyed. As a result, the network process will properly notify the UIProcess that this process no longer has any upload in progress.
  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
(WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess):
(WebKit::NetworkConnectionToWebProcess::hasUploadStateChanged):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkResourceLoadMap.cpp:

(WebKit::NetworkResourceLoadMap::NetworkResourceLoadMap):
(WebKit::NetworkResourceLoadMap::~NetworkResourceLoadMap):
(WebKit::NetworkResourceLoadMap::add):
(WebKit::NetworkResourceLoadMap::clear):
(WebKit::NetworkResourceLoadMap::take):
(WebKit::NetworkResourceLoadMap::setHasUpload):

  • NetworkProcess/NetworkResourceLoadMap.h:

(WebKit::NetworkResourceLoadMap::hasUpload const):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::didClose):
(WebKit::NetworkProcessProxy::setWebProcessHasUploads):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/ProcessAssertion.cpp:

(WebKit::ProcessAssertion::ProcessAssertion):

  • UIProcess/ProcessAssertion.h:

(WebKit::ProcessAssertion::pid const):

  • UIProcess/WebProcessPool.cpp:
  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessPool.messages.in:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::~WebProcessProxy):

  • UIProcess/WebProcessProxy.h:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::remove):
(WebKit::WebLoaderStrategy::loadResourceSynchronously):

  • WebProcess/Network/WebLoaderStrategy.h:
2:19 PM Changeset in webkit [260282] by Brent Fulgham
  • 2 edits in trunk/Tools

Unreviewed build fix after r260269.

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:

(TEST): Correct argument order.

2:13 PM Changeset in webkit [260281] by Ryan Haddad
  • 2 edits in branches/safari-609-branch/Tools

Cherry-pick r258385. rdar://problem/61948294

Pull in JS tests from "Internal" when there are "Internal" tests in an adjacent directory
https://bugs.webkit.org/show_bug.cgi?id=209038

Reviewed by Keith Miller.

This allows us to automatically pull in some tests that are in non open sourced Apple
checkouts.

  • Scripts/run-javascriptcore-tests: (runJSCStressTests):

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

2:05 PM Changeset in webkit [260280] by Alan Coon
  • 8 edits in branches/safari-609-branch/Source

Versioning.

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

[JSC] We do not need to have exit-check for Map/Set iterator functions
https://bugs.webkit.org/show_bug.cgi?id=210667

Reviewed by Michael Saboff.

If the intrinsic's DFG node does not support general cases, we should check exit-frequency to avoid exit-recompile loop.
However, Map/Set iterator creation functions (values, keys, entries) always require Map / Set types. And throwing an error
when this is not met. So, the current DFG nodes for these intrinsic supports all the cases except for the case throwing an
error, and error will exit anyway. So we do not need to have this exit-frequency guard here.

This path is already tested by map-iterator-check-before-fail.js / set-iterator-check-before-fail.js.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

1:41 PM Changeset in webkit [260278] by jer.noble@apple.com
  • 4 edits
    1 add in trunk

Bring Fullscreen API + alert() behavior from iOS to macOS
https://bugs.webkit.org/show_bug.cgi?id=210662

Reviewed by Eric Carlson.

Source/WebKit:

When a page is showing an alert(), all non-synchronous messages will be blocked until the sync XPC for alert()
ends. And when exiting fullscreen, we block completing the fullscreen exit animation until a repaint XPC completes.
So a page that is showing an alert() will never fully exit element fullscreen mode.

On iOS, we fixed this behavior by exiting fullscreen mode whenever the page shows an alert() or prompt(). We should
bring this behavior to macOS as well.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::runJavaScriptAlert):
(WebKit::WebPageProxy::runJavaScriptConfirm):
(WebKit::WebPageProxy::runJavaScriptPrompt):

Tools:

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

(TestWebKitAPI::TEST):

1:15 PM Changeset in webkit [260277] by don.olmstead@sony.com
  • 20 edits
    1 add in trunk

[CMake] Add WebKit::WebCore target
https://bugs.webkit.org/show_bug.cgi?id=210445

Reviewed by Michael Catanzaro.

.:

Add a target file for internal Apple Windows builds.

  • Source/cmake/target/WebCore.cmake: Added.

Source/WebCore:

Add a WebKit::WebCore target. Remove the WebCoreHeaderInterface target since
the WebKit::WebCore target is functionaly the same.

  • CMakeLists.txt:

Source/WebKit:

Use the WebKit::WebCore target within the WebKit target.

  • CMakeLists.txt:
  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • PlatformWin.cmake:

Source/WebKitLegacy:

Use the WebKit::WebCore target within WebKitLegacy.

  • CMakeLists.txt:
  • PlatformFTW.cmake:
  • PlatformWin.cmake:

Tools:

Use the WebKit::WebCore target within tests and developer tools.

  • DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
  • MiniBrowser/wpe/CMakeLists.txt:
  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/PlatformGTK.cmake:
  • TestWebKitAPI/PlatformWPE.cmake:
  • TestWebKitAPI/PlatformWin.cmake:
  • TestWebKitAPI/glib/CMakeLists.txt:
1:04 PM Changeset in webkit [260276] by Simon Fraser
  • 3 edits in trunk/Source/WebKit

Turn async frame and overflow scrolling on by default on macOS
https://bugs.webkit.org/show_bug.cgi?id=210661
rdar://problem/60420037

Reviewed by Tim Horton.

Flip the plist value and the default value for macOS which is outside of the feature flag #ifdef.

Testing keeps async overflow scrolling off by default, so this should not affect testing.

This only impacts WebKit2.

  • FeatureFlags/WebKit.plist:
  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultAsyncFrameAndOverflowScrollingEnabled):

12:46 PM Changeset in webkit [260275] by Devin Rousso
  • 8 edits
    1 move in trunk

Rename NullishEq / NULLISHEQUAL to CoalesceEq / COALESCEEQUAL to match the spec
https://bugs.webkit.org/show_bug.cgi?id=210663

Reviewed by Ross Kirsling.

JSTests:

  • stress/logical-assignment-operator-coalesce.js: Renamed from stress/logical-assignment-operator-nullish.js.

Source/JavaScriptCore:

  • bytecompiler/NodesCodegen.cpp:

(JSC::emitShortCircuitAssignment):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::makeAssignNode):

  • parser/Lexer.cpp:

(JSC::Lexer<T>::lexWithoutClearingLineTerminator):

  • parser/Nodes.h:
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseAssignmentExpression):

  • parser/ParserTokens.h:
12:32 PM Changeset in webkit [260274] by Ryan Haddad
  • 9 edits
    8 deletes in trunk

Unreviewed, reverting r260245.

The tests added with this change are frequently failing on
macOS bots.

Reverted changeset:

"Safari doesn't apply frameRate limit when request stream from
Camera"
https://bugs.webkit.org/show_bug.cgi?id=210186
https://trac.webkit.org/changeset/260245

12:31 PM Changeset in webkit [260273] by Devin Rousso
  • 28 edits
    6 adds in trunk

Implement Promise.any and AggregateError
https://bugs.webkit.org/show_bug.cgi?id=202566

Reviewed by Yusuke Suzuki.

JSTests:

  • test262/config.yaml:
  • test262/expectations.yaml:

Source/JavaScriptCore:

Promise.any resolves when any of the given promises resolve, but only rejects if _all_
of the given promises reject. In order to support aggregating all of the reason values
for all of the rejections, a new error type AggregateError is introduced which has an
get errors that returns an aggregated array of the reason values.

  • builtins/PromiseConstructor.js:

(all.newResolveElement):
(allSettled.newResolveRejectElements):
(any): Added.
(any.newRejectElement): Added.

  • runtime/JSPromiseConstructor.cpp:
  • builtins/BuiltinNames.h:
  • bytecode/LinkTimeConstant.h:
  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::errorStructure const):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::initializeAggregateErrorConstructor): Added.
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
Expose @AggregateError for builtins.

  • runtime/AggregateError.h: Added.

(JSC::AggregateError::destroy):
(JSC::AggregateError::subspaceFor):
(JSC::AggregateError::createStructure):
(JSC::AggregateError::create):
(JSC::AggregateError::errors const):

  • runtime/AggregateError.cpp: Added.

(JSC::AggregateError::AggregateError):
(JSC::AggregateError::visitChildren):
(JSC::AggregateError::create):
(JSC::AggregateError::finishCreation):

  • runtime/AggregateErrorPrototype.h: Added.
  • runtime/AggregateErrorPrototype.cpp: Added.

(JSC::AggregateErrorPrototype::AggregateErrorPrototype):
(JSC::AggregateErrorPrototype::finishCreation):
(JSC::aggregateErrorPrototypeAccessorErrors):

  • runtime/AggregateErrorConstructor.h: Added.
  • runtime/AggregateErrorConstructor.cpp: Added.

(JSC::callAggregateErrorConstructor):
(JSC::constructAggregateErrorConstructor):
(JSC::AggregateErrorConstructor::AggregateErrorConstructor):
(JSC::AggregateErrorConstructor::finishCreation):

  • runtime/ErrorType.h:
  • runtime/ErrorType.cpp:

(JSC::errorTypeName):

  • runtime/VM.h:
  • runtime/VM.cpp:

(JSC::VM::VM):
Make an IsoSubspace for AggregateError as it has a different size than ErrorInstance.

  • runtime/ErrorInstance.h:

(JSC::ErrorInstance::create):

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::finishCreation):

  • wasm/js/JSWebAssemblyCompileError.cpp:

(JSC::JSWebAssemblyCompileError::create):

  • wasm/js/JSWebAssemblyLinkError.cpp:

(JSC::JSWebAssemblyLinkError::create):

  • wasm/js/JSWebAssemblyRuntimeError.cpp:

(JSC::JSWebAssemblyRuntimeError::create):
Assign to ErrorInstance member variables inside ErrorInstance::finishCreation instead of
inside ErrorInstance::create so that subclasses don't have to do the work as well.

  • runtime/Error.cpp:

(JSC::createError):

  • runtime/ErrorPrototype.h:

(JSC::ErrorPrototype::createStructure):

  • runtime/NativeErrorPrototype.h:

(JSC::NativeErrorPrototype::createStructure):
Drive-by: fix incorrect usage of ErrorInstanceType since ErrorPrototype does not inherit

from ErrorInstance (and therefore neither does NativeErrorPrototype).

  • runtime/ArgList.h:

Add WTF_MAKE_NONMOVABLE to MarkedArgumentBuffer.

Source/WebInspectorUI:

  • UserInterface/Models/IssueMessage.js:

Mark AggregateError as a WI.IssueMessage.Type.SemanticIssue.

12:26 PM Changeset in webkit [260272] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

REGRESSION (r259463): [ Mojave Debug ] http/tests/IndexedDB/collect-IDB-objects.https.html is flaky failing and timing out
https://bugs.webkit.org/show_bug.cgi?id=210219

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations: Test transitioned from timeout -> failure.
12:10 PM Changeset in webkit [260271] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix.

  • platform/cocoa/AGXCompilerService.cpp:
11:55 AM Changeset in webkit [260270] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

REGRESSION ( r254044 ): [ Win ] css1/box_properties/padding_left.html is failing
https://bugs.webkit.org/show_bug.cgi?id=207480

Unreviewed test gardening.

Adjusted this test expectation and others in the Windows category with lint alerts.

  • platform/win/TestExpectations:
11:35 AM Changeset in webkit [260269] by graouts@webkit.org
  • 2 edits in trunk/Tools

Stop including style rules related to media controls in the UA style sheet when Modern Media Controls are enabled
https://bugs.webkit.org/show_bug.cgi?id=210606

Unreviewed build fix after r260261.

  • TestWebKitAPI/Tests/WebKitCocoa/InAppBrowserPrivacy.mm:

(TEST):

11:22 AM Changeset in webkit [260268] by Russell Epstein
  • 1 copy in tags/Safari-609.2.7

Tag Safari-609.2.7.

11:06 AM Changeset in webkit [260267] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

Layout Test fast/text/variations/ipc2.html is failing
https://bugs.webkit.org/show_bug.cgi?id=189550

Unreviewed test gardening.

  • platform/win/TestExpectations:
11:04 AM Changeset in webkit [260266] by Alan Coon
  • 539 edits
    19 adds
    160 deletes in branches/safari-610.1.10-branch/Source/ThirdParty/ANGLE

Revert r259589. rdar://problem/61942180

10:57 AM Changeset in webkit [260265] by Ross Kirsling
  • 16 edits in trunk/Source/JavaScriptCore

Clean up some Intl classes following the ICU upgrade
https://bugs.webkit.org/show_bug.cgi?id=210637

Reviewed by Yusuke Suzuki.

In r259606, I removed the compile-time guards for {DateTimeFormat, NumberFormat}.prototype.formatToParts,
but I forgot to move the method setup back to the lookup table.

This patch addresses that and prunes various other unnecessary includes and forward declarations.

  • runtime/IntlCollator.h:
  • runtime/IntlCollatorConstructor.h:
  • runtime/IntlDateTimeFormat.h:
  • runtime/IntlDateTimeFormatConstructor.h:
  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatPrototype::create):
(JSC::IntlDateTimeFormatPrototype::finishCreation):

  • runtime/IntlDateTimeFormatPrototype.h:
  • runtime/IntlNumberFormat.h:
  • runtime/IntlNumberFormatConstructor.h:
  • runtime/IntlNumberFormatPrototype.cpp:

(JSC::IntlNumberFormatPrototype::create):
(JSC::IntlNumberFormatPrototype::finishCreation):

  • runtime/IntlNumberFormatPrototype.h:
  • runtime/IntlObject.h:
  • runtime/IntlPluralRules.h:
  • runtime/IntlPluralRulesConstructor.h:
  • runtime/IntlPluralRulesPrototype.cpp:

(JSC::IntlPluralRulesPrototype::create):
(JSC::IntlPluralRulesPrototype::finishCreation):

  • runtime/IntlPluralRulesPrototype.h:
10:56 AM Changeset in webkit [260264] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

[ macOS ] inspector/runtime/getCollectionEntries.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207642

Unreviewed test gardening.

Removed duplicate expectations.

  • platform/mac/TestExpectations:
10:44 AM Changeset in webkit [260263] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Add telemetry to some mach lookup sandbox extensions
https://bugs.webkit.org/show_bug.cgi?id=210657

Reviewed by Darin Adler.

Add telemetry in order to learn more about how some of the mach lookup extensions are being used in the WebContent process on iOS.

No new tests, since this patch does not change any behavior.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
10:43 AM Changeset in webkit [260262] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests

[Web Animations] Update WPT tests related to Web Animations and remove imported Mozilla tests
https://bugs.webkit.org/show_bug.cgi?id=203291

Unreviewed test gardening.

Removed duplicate test expectations.

  • platform/ios/TestExpectations:
10:24 AM Changeset in webkit [260261] by graouts@webkit.org
  • 7 edits in trunk/Source/WebCore

Stop including style rules related to media controls in the UA style sheet when Modern Media Controls are enabled
https://bugs.webkit.org/show_bug.cgi?id=210606

Reviewed by Antti Koivisto and Daniel Bates.

There is no need to insert style rules related to media controls in the UA stylesheet when Modern Media Controls are enabled.
There is one rule from mediaControlsApple.css for the default sizing of <audio> that makes sense broadly for content on the Web
so we move that to html.css. We also set the background-color property for media documents in html.css.

  • Modules/mediacontrols/mediaControlsApple.css:

(audio): Deleted.
(body:-webkit-full-page-media): Deleted.

  • Modules/mediacontrols/mediaControlsiOS.css:

(body:-webkit-full-page-media): Deleted.

  • Modules/modern-media-controls/controls/media-document.css:

(:host(.media-document)):

  • css/html.css:

(body:-webkit-full-page-media):
(audio):

  • css/mediaControls.css:

(body:-webkit-full-page-media): Deleted.

  • style/UserAgentStyle.cpp:

(WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):

10:17 AM Changeset in webkit [260260] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Validate socket in NetworkRTCProvider::wrapNewTCPConnection
https://bugs.webkit.org/show_bug.cgi?id=210594

Reviewed by Eric Carlson.

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:

(WebKit::NetworkRTCProvider::wrapNewTCPConnection):
Add a null check in case the identifier does not relate to an existing pending socket.

10:13 AM Changeset in webkit [260259] by Peng Liu
  • 33 edits in trunk/Source

Cleanup the macros for video fullscreen and picture-in-picture
https://bugs.webkit.org/show_bug.cgi?id=210638

Reviewed by Eric Carlson.

Source/WebCore:

Replace some "#if PLATFORM(IOS_FAMILY) and all "#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT))
(PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))"
(PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))"

with "#if ENABLE(VIDEO_PRESENTATION_MODE)".

No new tests, no functional change.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaEngineWasUpdated):
(WebCore::HTMLMediaElement::setVideoFullscreenStandby):

  • html/HTMLMediaElement.h:
  • html/HTMLVideoElement.cpp:
  • html/HTMLVideoElement.h:
  • platform/PictureInPictureSupport.h:
  • platform/cocoa/VideoFullscreenChangeObserver.h:
  • platform/cocoa/VideoFullscreenModel.h:
  • platform/cocoa/VideoFullscreenModelVideoElement.h:
  • platform/cocoa/VideoFullscreenModelVideoElement.mm:
  • platform/graphics/MediaPlayer.cpp:
  • platform/graphics/MediaPlayer.h:
  • platform/graphics/MediaPlayerPrivate.h:
  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(WebCore::supportsPictureInPicture):

Source/WebKit:

Replace some "#if PLATFORM(IOS_FAMILY) and all "#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT))
(PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))"
(PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))"

with "#if ENABLE(VIDEO_PRESENTATION_MODE)".

  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::setVideoFullscreenGravity):
(WebKit::RemoteMediaPlayerProxy::updateVideoFullscreenInlineImage):
(WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode):
(WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged):

  • UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
  • UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in:
  • UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didAttachToRunningProcess):
(WebKit::WebPageProxy::viewDidLeaveWindow):
(WebKit::WebPageProxy::exitFullscreenImmediately):

  • UIProcess/WebPageProxy.h:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
  • WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:
  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::~WebPage):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/cocoa/VideoFullscreenManager.h:
  • WebProcess/cocoa/VideoFullscreenManager.messages.in:
  • WebProcess/cocoa/VideoFullscreenManager.mm:

Source/WTF:

Add macro ENABLE_VIDEO_PRESENTATION_MODE.

  • wtf/PlatformEnable.h:
10:01 AM Changeset in webkit [260258] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][TFC] Resolve the minimum width for overlapping spanner columns
https://bugs.webkit.org/show_bug.cgi?id=210654

Reviewed by Antti Koivisto.

The extra horizontal space distribution is based on the columns' minimum widths.
In case of column spanners, first we need to distribute the spanner's minimum
width across the columns using the non-spanning minimum widths as the distribution ratio.
When there's no non-spanning minimum width for a column (all rows have column spanners for tbis particular column)
the minimum width gets distributed equally across the spanned columns. This distribution starts with the shortest columns spans
so that we can use these resolved column widths to compute the wider ones.

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace):

9:36 AM Changeset in webkit [260257] by Claudio Saavedra
  • 2 edits in trunk/Source/WTF

[GTK][WPE] Bump dependencies minimum required version in Platform.h
https://bugs.webkit.org/show_bug.cgi?id=210651

Reviewed by Adrian Perez de Castro.

Bring the minimum required version in Platform.h in sync with the actual
minimal required version. This ensures that deprecated APIs used bring up
compilation warnings.

  • wtf/Platform.h:
9:24 AM Changeset in webkit [260256] by Jason_Lawrence
  • 2 edits in trunk/LayoutTests/imported/w3c

REGRESSION: (r260243) [ Mac and iOS ] imported/w3c/web-platform-tests/css/cssom-view/MediaQueryList-addListener-handleEvent.html fails.
https://bugs.webkit.org/show_bug.cgi?id=210655

Unreviewed test gardening.

  • web-platform-tests/css/cssom-view/MediaQueryList-addListener-handleEvent-expected.txt:
8:50 AM Changeset in webkit [260255] by Claudio Saavedra
  • 9 edits in trunk

[GTK] Update for GdkKeymap API changes
https://bugs.webkit.org/show_bug.cgi?id=210642

Reviewed by Adrian Perez de Castro.

No new tests needed.

gdk_keymap_get_default() is deprecated in GTK+ 3.22, so use
gdk_keymap_get_for_display() instead. Since in GTK4 this method is
removed to gdk_display_get_keymap(), add a helper to
GtkVersioning.h to avoid cluttering with ifdefs all over the
place.

Source/WebCore:

  • platform/gtk/GtkVersioning.h:

(gdk_keymap_get_for_display):

  • platform/gtk/PlatformKeyboardEventGtk.cpp:

(WebCore::PlatformKeyboardEvent::currentCapsLockState):
(WebCore::PlatformKeyboardEvent::modifiersContainCapsLock):

Source/WebKit:

  • UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:

(WebKit::doKeyStrokeEvent):

Tools:

  • TestWebKitAPI/glib/WebKitGLib/gtk/WebViewTestGtk.cpp:

(WebViewTest::keyStroke):

  • TestWebKitAPI/gtk/PlatformWebViewGtk.cpp:

(TestWebKitAPI::doKeyStroke):

  • WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:

(WTR::EventSenderProxy::keyDown):

8:49 AM WebKitGTK/2.28.x edited by Michael Catanzaro
(diff)
8:47 AM Changeset in webkit [260254] by graouts@webkit.org
  • 6 edits in trunk

Allow the UserStyleLevel to be set through _WKUserStyleSheet
https://bugs.webkit.org/show_bug.cgi?id=210653
<rdar://problem/60506645>

Reviewed by Tim Horton.

Source/WebKit:

Add a new _WKUserStyleLevel enum such that we may provide the specificity level of the backing UserStyleSheet, represented by the UserStyleLevel enum in WebCore.

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

(-[_WKUserStyleSheet initWithSource:forWKWebView:forMainFrameOnly:level:userContentWorld:]):
(-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:level:userContentWorld:]):
(-[_WKUserStyleSheet initWithSource:forWKWebView:forMainFrameOnly:userContentWorld:]): Deleted.

  • UIProcess/API/Cocoa/_WKUserStyleSheetInternal.h:

(API::toWebCoreUserStyleLevel):

Tools:

Add new tests for the "level" parameter when creating a _WKUserStyleSheet.

  • TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:

(TEST):

8:41 AM Changeset in webkit [260253] by commit-queue@webkit.org
  • 2 edits in trunk/JSTests

Reduce test iterations for stress/array-buffer-view-watchpoint-can-be-fired-in-really-add-in-dfg.js on mips
https://bugs.webkit.org/show_bug.cgi?id=210641

Patch by Paulo Matos <Paulo Matos> on 2020-04-17
Reviewed by Yusuke Suzuki.

Reduce test iteration count on mips for which the current value is too high.

  • stress/array-buffer-view-watchpoint-can-be-fired-in-really-add-in-dfg.js:
8:24 AM Changeset in webkit [260252] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[GTK][X11] REGRESSION(r259944): Wrong position of select popup menu in X11
https://bugs.webkit.org/show_bug.cgi?id=210603

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2020-04-17
Reviewed by Michael Catanzaro.

gdk_window_move_to_rect expects the given rectangle in coordinates relative to the top-left corner of the window
that the popup window is transient for. We were using screen coordinates.

  • UIProcess/gtk/WebPopupMenuProxyGtk.cpp:

(WebKit::WebPopupMenuProxyGtk::showPopupMenu): Translate widget coordinates to window coordinates before passing
the rectangle to gdk_window_move_to_rect().

8:02 AM Changeset in webkit [260251] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (r256756): -[WKUserDefaults initWithSuiteName:]: Instance variable used while 'self' is not set to the result of '[(super or self) init...]'
<https://webkit.org/b/210647>
<rdar://problem/61928289>

Reviewed by Anders Carlsson.

  • UIProcess/Cocoa/PreferenceObserver.mm:

(-[WKUserDefaults initWithSuiteName:]):

  • Call [self initWithSuite:] and set self to fix the clang static analyzer warning.
  • Fix camelCase of suitename parameter.
7:57 AM Changeset in webkit [260250] by ddkilzer@apple.com
  • 2 edits in trunk/Tools

REGRESSION (r162729): [iOS] WebKitTestRunner over-releases UITextField in WTR::PlatformWebView::removeChromeInputField()
<https://webkit.org/b/210643>
<rdar://problem/61927190>

Reviewed by Wenson Hsieh.

  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(WTR::PlatformWebView::removeChromeInputField):

  • Remove unnecessary -release.
7:46 AM Changeset in webkit [260249] by Oriol Brufau
  • 27 edits in trunk

Revert "[css-grid] Exclude implicit grid tracks from the resolved value"
https://bugs.webkit.org/show_bug.cgi?id=210617

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

WPT tests are not reverted for now, just updating the expectations.

  • web-platform-tests/css/css-grid/grid-definition/grid-inline-support-flexible-lengths-001-expected.txt:
  • web-platform-tests/css/css-grid/grid-definition/grid-inline-support-grid-template-columns-rows-001-expected.txt:
  • web-platform-tests/css/css-grid/grid-definition/grid-inline-support-named-grid-lines-001-expected.txt:
  • web-platform-tests/css/css-grid/grid-definition/grid-inline-support-repeat-001-expected.txt:
  • web-platform-tests/css/css-grid/grid-definition/grid-inline-template-columns-rows-resolved-values-001-expected.txt:
  • web-platform-tests/css/css-grid/grid-definition/grid-support-flexible-lengths-001-expected.txt:
  • web-platform-tests/css/css-grid/grid-definition/grid-support-grid-template-columns-rows-001-expected.txt:
  • web-platform-tests/css/css-grid/grid-definition/grid-support-named-grid-lines-001-expected.txt:
  • web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-001-expected.txt:
  • web-platform-tests/css/css-grid/grid-definition/grid-template-columns-rows-resolved-values-001-expected.txt:
  • web-platform-tests/css/css-grid/grid-layout-properties-expected.txt:
  • web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-withcontent-expected.txt:
  • web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-withcontent-expected.txt:

Source/WebCore:

Revert r254561 since it appears to be breaking site authoring tools
which were relying on the previous behaviour.

Tests: fast/css-grid-layout/grid-auto-columns-rows-get-set.html

fast/css-grid-layout/grid-columns-rows-get-set.html
fast/css-grid-layout/grid-template-shorthand-get-set.html
fast/css-grid-layout/mark-as-infinitely-growable.html
fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks.html
fast/css-grid-layout/negative-growth-share-as-infinity-crash.html
imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-inline-support-flexible-lengths-001.html
imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-inline-support-grid-template-columns-rows-001.html
imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-inline-support-named-grid-lines-001.html
imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-inline-support-repeat-001.html
imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-inline-template-columns-rows-resolved-values-001.html
imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-flexible-lengths-001.html
imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-grid-template-columns-rows-001.html
imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-named-grid-lines-001.html
imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-001.html
imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-template-columns-rows-resolved-values-001.html
imported/w3c/web-platform-tests/css/css-grid/grid-layout-properties.html
imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-withcontent.html
imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-withcontent.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::valueForGridTrackList):

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::trackSizesForComputedStyle const):

LayoutTests:

Revert r254561 since it appears to be breaking site authoring tools
which were relying on the previous behaviour.

  • fast/css-grid-layout/grid-auto-columns-rows-get-set-expected.txt:
  • fast/css-grid-layout/grid-auto-columns-rows-get-set.html:
  • fast/css-grid-layout/grid-columns-rows-get-set.html:
  • fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt:
  • fast/css-grid-layout/grid-template-shorthand-get-set.html:
  • fast/css-grid-layout/mark-as-infinitely-growable.html:
  • fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks-expected.txt:
  • fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks.html:
  • fast/css-grid-layout/negative-growth-share-as-infinity-crash.html:
7:41 AM Changeset in webkit [260248] by ysuzuki@apple.com
  • 3 edits
    2 adds in trunk

[JSC] Map/Set iterator creation functions should fail with BadType etc. before executing insertChecks
https://bugs.webkit.org/show_bug.cgi?id=210649
<rdar://problem/61925452>

Reviewed by Mark Lam.

JSTests:

  • stress/map-iterator-check-before-fail.js: Added.

(test):

  • stress/set-iterator-check-before-fail.js: Added.

(set new):
(set var):

Source/JavaScriptCore:

Since insertChecks adds some DFG nodes, we should determine whether this intrinsic handling is OK or not before executing insertChecks.
Otherwise, we will hit an assertion with !didInsertChecks.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

7:40 AM Changeset in webkit [260247] by pvollan@apple.com
  • 22 edits
    3 adds in trunk

[iOS] Deny iokit open access to graphics related classes
https://bugs.webkit.org/show_bug.cgi?id=210616

Reviewed by Darin Adler.

Source/WebCore:

Deny iokit open access to graphics related classes in the WebContent process on iOS, but issue
extensions for these for some devices which still need access to them.

API test: WebKit.IOKitOpenSandboxAccessForDeviceWithAGXCompilerService

  • WebCore.xcodeproj/project.pbxproj:
  • platform/cocoa/AGXCompilerService.cpp: Added.

(WebCore::setDeviceHasAGXCompilerServiceForTesting):
(WebCore::deviceHasAGXCompilerService):

  • platform/cocoa/AGXCompilerService.h: Added.
  • testing/Internals.cpp:

(WebCore::Internals::hasSandboxIOKitOpenAccessToClass):

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

(WebCore::Internals::hasSandboxIOKitOpenAccessToClass):

Source/WebKit:

Deny iokit open access to graphics related classes in the WebContent process on iOS, but issue
extensions for these for some devices which still need access to them.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • Shared/Cocoa/SandboxExtensionCocoa.mm:

(WebKit::SandboxExtensionImpl::sandboxExtensionForType):
(WebKit::SandboxExtension::createHandleForIOKitClassExtension):

  • Shared/SandboxExtension.h:
  • Shared/WebProcessCreationParameters.cpp:

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

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
  • UIProcess/API/ios/WKWebViewTestingIOS.mm:

(-[WKWebView _setDeviceHasAGXCompilerServiceForTesting]):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::deviceHasAGXCompilerService): Deleted.

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::setDeviceHasAGXCompilerServiceForTesting const):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

Source/WTF:

  • wtf/spi/darwin/SandboxSPI.h:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/AGXCompilerService.mm: Added.

(TEST):

7:38 AM Changeset in webkit [260246] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

offlineasm is generating the wrong load/store for the "orh" instruction.
https://bugs.webkit.org/show_bug.cgi?id=210639
<rdar://problem/21501876>

Reviewed by Robin Morisset.

For example, on ARM64E, the "orh" instruction was generating the following:

"\tldr w17, [x1, #0]\n" JavaScriptCore/llint/LowLevelInterpreter64.asm:919
"\torr w17, w17, #64\n"
JavaScriptCore/llint/LowLevelInterpreter64.asm:919
"\tstr w17, [x1, #0]\n" JavaScriptCore/llint/LowLevelInterpreter64.asm:919

i.e. a 32-bit load, followed by a 32-bit OR, followed by a 32-bit store.

Instead, it should be generating the following:

"\tldrh w17, [x1, #0]\n" JavaScriptCore/llint/LowLevelInterpreter64.asm:919
"\torr w17, w17, #64\n"
JavaScriptCore/llint/LowLevelInterpreter64.asm:919
"\tstrh w17, [x1, #0]\n" JavaScriptCore/llint/LowLevelInterpreter64.asm:919

i.e. a 16-bit load, followed by a 32-bit OR, followed by a 16-bit store.

This bug also affects ARM64, ARMv7, and MIPS (basically any backend that uses
riscLowerMisplacedAddresses() from rise.rb). It does not affect x86, x86_64, and
C_LOOP (which was written based on x86).

  • offlineasm/risc.rb:
7:22 AM Changeset in webkit [260245] by youenn@apple.com
  • 9 edits
    8 adds in trunk

Safari doesn't apply frameRate limit when request stream from Camera
https://bugs.webkit.org/show_bug.cgi?id=210186
<rdar://problem/61452794>

Reviewed by Eric Carlson.

Source/WebCore:

Add support to RealtimeVideoSource to decimate the video samples based on the observed frame rate of its capture source.
This allows supporting two tracks using the same capture device, one track being low frame rate and the other one high frame rate.

Clean-up refactoring to make RealtimeVideoSource directly inherit from RealtimeVideoCaptureSource.
Migrate size and format of frame adaptation from RealtimeVideoCaptureSource to RealtimeVideoSource.
Fix mock capture source to update its frame rate when asked by applyConstraints.

Tests: fast/mediastream/mediastreamtrack-video-frameRate-clone-decreasing.html

fast/mediastream/mediastreamtrack-video-frameRate-clone-increasing.html
fast/mediastream/mediastreamtrack-video-frameRate-decreasing.html
fast/mediastream/mediastreamtrack-video-frameRate-increasing.html

  • platform/mediastream/RealtimeVideoCaptureSource.cpp:

(WebCore::RealtimeVideoCaptureSource::dispatchMediaSampleToObservers):
(WebCore::RealtimeVideoCaptureSource::clientUpdatedSizeAndFrameRate):

  • platform/mediastream/RealtimeVideoCaptureSource.h:

(WebCore::RealtimeVideoCaptureSource::observedFrameRate const):

  • platform/mediastream/RealtimeVideoSource.cpp:

(WebCore::RealtimeVideoSource::RealtimeVideoSource):
(WebCore::m_source):
(WebCore::RealtimeVideoSource::adaptVideoSample):
(WebCore::RealtimeVideoSource::videoSampleAvailable):

  • platform/mediastream/RealtimeVideoSource.h:
  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::setFrameRateWithPreset):

  • testing/Internals.cpp:

(WebCore::Internals::observeMediaStreamTrack):

LayoutTests:

  • fast/mediastream/mediastreamtrack-video-frameRate-clone-decreasing-expected.txt: Added.
  • fast/mediastream/mediastreamtrack-video-frameRate-clone-decreasing.html: Added.
  • fast/mediastream/mediastreamtrack-video-frameRate-clone-increasing-expected.txt: Added.
  • fast/mediastream/mediastreamtrack-video-frameRate-clone-increasing.html: Added.
  • fast/mediastream/mediastreamtrack-video-framerate-decreasing-expected.txt: added.
  • fast/mediastream/mediastreamtrack-video-framerate-decreasing.html: added.
  • fast/mediastream/mediastreamtrack-video-framerate-increasing-expected.txt: added.
  • fast/mediastream/mediastreamtrack-video-framerate-increasing.html: added.
  • webrtc/routines.js:
6:36 AM WebKitGTK/Gardening/Howto edited by Lauro Moura
Update flakiness dashboard link (diff)
5:53 AM Changeset in webkit [260244] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[GTK] UI process crash when entering compositing mode when WPE_RENDERER is enabled
https://bugs.webkit.org/show_bug.cgi?id=209118

Reviewed by Michael Catanzaro.

Check if EGL_WL_bind_wayland_display extension is available when using WPE_RENDERER, since we don't suport the
SHM interface.

  • UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:

(WebKit::AcceleratedBackingStoreWayland::checkRequirements): Return false if EGL_WL_bind_wayland_display is not present.

3:16 AM Changeset in webkit [260243] by Alexey Shvayka
  • 31 edits
    3 adds
    5 deletes in trunk

MediaQueryList should extend EventTarget
https://bugs.webkit.org/show_bug.cgi?id=203288

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/css/cssom-view/MediaQueryList-addListener-handleEvent-expected.txt:
  • web-platform-tests/css/cssom-view/MediaQueryList-addListener-removeListener-expected.txt:
  • web-platform-tests/css/cssom-view/MediaQueryList-extends-EventTarget-expected.txt:
  • web-platform-tests/css/cssom-view/MediaQueryList-extends-EventTarget-interop-expected.txt:
  • web-platform-tests/css/cssom-view/MediaQueryListEvent-expected.txt:
  • web-platform-tests/css/cssom-view/idlharness-expected.txt:
  • web-platform-tests/css/cssom-view/matchMedia-expected.txt:

Source/WebCore:

Initially, CSSOM View Module specification [1] had a custom callback mechanism with addListener() and removeListener(),
and the callback was invoked with the associated MediaQueryList as argument.

Now the normal event mechanism [2] is used instead. For backwards compatibility, addListener() and removeListener()
methods are basically aliases for addEventListener() and removeEventListener(), respectively, and the "change" event
masquerades as a MediaQueryList.

This patch implements new event mechanism, aligning WebKit with Blink and SpiderMonkey, and also fixes
a few minor spec incompatibilities: mandatory listener argument, "handleEvent" support, and listeners call order.

[1]: https://www.w3.org/TR/2011/WD-cssom-view-20110804/#mediaquerylist
[2]: https://www.w3.org/TR/cssom-view-1/#mediaquerylist

Tests: fast/media/media-query-list-07.html

web-platform-tests/css/cssom-view/MediaQueryList-addListener-handleEvent.html
web-platform-tests/css/cssom-view/MediaQueryList-addListener-removeListener.html
web-platform-tests/css/cssom-view/MediaQueryList-extends-EventTarget.html
web-platform-tests/css/cssom-view/MediaQueryList-extends-EventTarget-interop.html
web-platform-tests/css/cssom-view/MediaQueryListEvent.html
web-platform-tests/css/cssom-view/idlharness.html
web-platform-tests/css/cssom-view/matchMedia.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h:
  • bindings/scripts/test/JS/*: Updated.
  • css/MediaQueryList.cpp:

(WebCore::MediaQueryList::MediaQueryList):
(WebCore::MediaQueryList::create):
(WebCore::MediaQueryList::~MediaQueryList):
(WebCore::MediaQueryList::addListener):
(WebCore::MediaQueryList::removeListener):

  • css/MediaQueryList.h:
  • css/MediaQueryList.idl:
  • css/MediaQueryListEvent.cpp: Added.

(WebCore::MediaQueryListEvent::MediaQueryListEvent):

  • css/MediaQueryListEvent.h: Added.
  • css/MediaQueryListEvent.idl: Added.
  • css/MediaQueryListListener.h: Removed.
  • css/MediaQueryListListener.idl: Removed.
  • css/MediaQueryMatcher.cpp:

(WebCore::MediaQueryMatcher::documentDestroyed):
(WebCore::MediaQueryMatcher::addMediaQueryList):
(WebCore::MediaQueryMatcher::removeMediaQueryList):
(WebCore::MediaQueryMatcher::matchMedia):
(WebCore::MediaQueryMatcher::evaluateAll):
(WebCore::MediaQueryMatcher::addListener): Deleted.
(WebCore::MediaQueryMatcher::removeListener): Deleted.

  • css/MediaQueryMatcher.h:
  • dom/EventNames.in:
  • dom/EventTarget.h:

(WebCore::EventTarget::removeEventListener):

  • dom/EventTargetFactory.in:

Source/WebInspectorUI:

  • UserInterface/Models/NativeFunctionParameters.js:

LayoutTests:

  • TestExpectations:
  • fast/media/media-query-list-07-expected.txt:
  • fast/media/media-query-list-07.html:
2:35 AM Changeset in webkit [260242] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix after r260123

No new tests needed.

  • platform/gtk/CursorGtk.cpp:

(WebCore::createCustomCursor): Pass missing pixel buffer data pointer to gdk_memory_texture_new().

1:40 AM Changeset in webkit [260241] by youenn@apple.com
  • 10 edits in trunk/Source

Make use of WeakHashSet for MediaStreamTrackPrivate and RealtimeMediaSource observers
https://bugs.webkit.org/show_bug.cgi?id=210492

Reviewed by Geoffrey Garen.

Source/WebCore:

We are making use of WeakHashSet to improve the robustness of the code.
For that purpose we use the new WeakHashSet::forEach method.
No change of behavior.

  • Modules/mediarecorder/MediaRecorder.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
  • platform/mediastream/MediaStreamPrivate.cpp:

(WebCore::MediaStreamPrivate::forEachObserver const):

  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::forEachObserver):
(WebCore::MediaStreamTrackPrivate::addObserver):
(WebCore::MediaStreamTrackPrivate::removeObserver):
(WebCore::MediaStreamTrackPrivate::forEachObserver const): Deleted.

  • platform/mediastream/MediaStreamTrackPrivate.h:

(WebCore::MediaStreamTrackPrivate::hasObserver const): Deleted.

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::addAudioSampleObserver):
(WebCore::RealtimeMediaSource::removeAudioSampleObserver):
(WebCore::RealtimeMediaSource::addObserver):
(WebCore::RealtimeMediaSource::removeObserver):
(WebCore::RealtimeMediaSource::forEachObserver):
(WebCore::RealtimeMediaSource::notifyMutedObservers):
(WebCore::RealtimeMediaSource::requestToEnd):
(WebCore::RealtimeMediaSource::forEachObserver const): Deleted.
(WebCore::RealtimeMediaSource::notifyMutedObservers const): Deleted.

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/RealtimeOutgoingVideoSource.h:

Source/WTF:

  • wtf/WeakHashSet.h:
1:37 AM Changeset in webkit [260240] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[Flatpak SDK] Not fully hooked in BuildSlaveSupport
https://bugs.webkit.org/show_bug.cgi?id=210548

Patch by Philippe Normand <pnormand@igalia.com> on 2020-04-17
Reviewed by Carlos Alberto Lopez Perez.

  • Scripts/webkitdirs.pm:

(determineBaseProductDir): Flatpak SDK builds use a dedicated product directory per port.

12:52 AM Changeset in webkit [260239] by commit-queue@webkit.org
  • 17 edits in trunk/Source

Move allowPlugins to FrameLoader
https://bugs.webkit.org/show_bug.cgi?id=205876

Patch by Rob Buis <rbuis@igalia.com> on 2020-04-17
Reviewed by Darin Adler.

Source/WebCore:

Move allowPlugins to FrameLoader to reduce
pointer dereferences and lessen dependency
on SubframeLoader. Also rename to
arePluginsEnabled since the method is asking
the Setting with the same name.

  • dom/DOMImplementation.cpp:

(WebCore::DOMImplementation::createDocument):

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::rendererIsEverNeeded):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::arePluginsEnabled):

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

(WebCore::SubframeLoader::createJavaAppletWidget):
(WebCore::SubframeLoader::allowPlugins): Deleted.

  • loader/SubframeLoader.h:
  • plugins/DOMMimeType.cpp:

(WebCore::DOMMimeType::enabledPlugin const):

Source/WebKit:

Adapt to API change.

  • WebProcess/Plugins/WebPluginInfoProvider.cpp:

(WebKit::WebPluginInfoProvider::pluginInfo):
(WebKit::WebPluginInfoProvider::populatePluginCache):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::objectContentType):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::createPlugin):
(WebKit::WebPage::canPluginHandleResponse):
(WebKit::WebPage::canShowMIMEType const):

Source/WebKitLegacy/mac:

Adapt to API change.

  • WebCoreSupport/WebPluginInfoProvider.mm:

(WebPluginInfoProvider::pluginInfo):

  • WebView/WebFrame.mm:

(-[WebFrame _canProvideDocumentSource]):

Source/WebKitLegacy/win:

Adapt to API change.

  • WebView.cpp:

(WebView::canShowMIMEType):

12:35 AM Changeset in webkit [260238] by commit-queue@webkit.org
  • 5 edits in trunk

Fix an integer overflow in WebCrypto AES-CTR Mac implementation, which may detect a false loop
https://bugs.webkit.org/show_bug.cgi?id=210540

Source/WebCore:

(1 << counterLength) causes an integer overflow, and the undefined behavior.
The longest valid counterLength on 64 bit machine is 63,
and the literal 1 is considered as 32-bit signed integer.
Left shifting 1 beyond or to sign-bit is undefined behavior in C++ spec.

This issue is originally found in https://bugs.webkit.org/show_bug.cgi?id=208186#c2

Patch by Tomoki Imai <Tomoki Imai> on 2020-04-17
Reviewed by Jiewen Tan.

Test: crypto/subtle/aes-ctr-import-key-encrypt.html

  • crypto/mac/CryptoAlgorithmAES_CTRMac.cpp:

(WebCore::transformAES_CTR):

LayoutTests:

Patch by Tomoki Imai <Tomoki Imai> on 2020-04-17
Reviewed by Jiewen Tan.

Added more AES-CTR tests for AesCtrParams.length larger than 32.

  • crypto/subtle/aes-ctr-import-key-encrypt-expected.txt:
  • crypto/subtle/aes-ctr-import-key-encrypt.html:

Apr 16, 2020:

9:57 PM Changeset in webkit [260237] by Ross Kirsling
  • 5 edits in trunk

REGRESSION(r259480): Two new failing i18n tests
https://bugs.webkit.org/show_bug.cgi?id=210605

Reviewed by Darin Adler.

JSTests:

  • stress/date-toLocaleString.js:

Tests shouldn't rely on system default time zone.

Source/JavaScriptCore:

  • runtime/IntlDateTimeFormat.cpp:

(JSC::isUTCEquivalent):
(JSC::defaultTimeZone):
(JSC::canonicalizeTimeZoneName):
The default time zone needs to be canonicalized too.

  • runtime/IntlObject.cpp:

(JSC::canonicalLangTag):
(JSC::resolveLocale):
Deal with some odd ""_s cases from my previous patch.
(Drive-by fix inspired by Darin's comments on this one.)

9:34 PM Changeset in webkit [260236] by Lauro Moura
  • 2 edits in trunk/Tools

[GTK] A couple of API tests are flaky failing on X11.

Unreviewed test gardening.

  • TestWebKitAPI/glib/TestExpectations.json:
9:08 PM Changeset in webkit [260235] by Peng Liu
  • 2 edits in trunk/Source/WebKit

Cleanup the usage of ENABLE_FULLSCREEN_API
https://bugs.webkit.org/show_bug.cgi?id=210630

Reviewed by Daniel Bates.

Replace "#if defined(ENABLE_FULLSCREEN_API) && ENABLE_FULLSCREEN_API" with
"#if ENABLE(FULLSCREEN_API)".

No new tests, no functional change

  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:

(WKBundlePageSetFullScreenClient):
(WKBundlePageWillEnterFullScreen):
(WKBundlePageDidEnterFullScreen):
(WKBundlePageWillExitFullScreen):
(WKBundlePageDidExitFullScreen):

6:55 PM Changeset in webkit [260234] by Simon Fraser
  • 4 edits
    2 adds in trunk

Scrolling-tree hit-testing is off by top content inset
https://bugs.webkit.org/show_bug.cgi?id=210629
<rdar://problem/61848883>

Reviewed by Tim Horton.

Source/WebCore:

r259936 added a point conversion from the superlayer of the root content layer,
to fix RTL, but this also pulled in top content inset, which we don't want.

Instead, do the RTL fix by factoring in scroll origin.

Test: fast/scrolling/mac/async-scroll-overflow-top-inset.html

  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/mac/ScrollingTreeMac.mm:

(ScrollingTreeMac::scrollingNodeForPoint):

LayoutTests:

Test for scroller hit-testing with top content inset.

  • fast/scrolling/mac/async-scroll-overflow-top-inset-expected.txt: Added.
  • fast/scrolling/mac/async-scroll-overflow-top-inset.html: Added.
6:13 PM Changeset in webkit [260233] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

Distinguish between an empty WKAppBoundDomains array and a missing entry
https://bugs.webkit.org/show_bug.cgi?id=210628
<rdar://problem/61909669>

Reviewed by Brent Fulgham.

Currently we treat a missing WKAppBoundDomains key the same as an empty
key, which is incorrect. Having the key present, even with no entries,
should opt an app into app-bound domain behavior.

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::initializeAppBoundDomains):
(WebKit::WebsiteDataStore::beginAppBoundDomainCheck):

6:09 PM Changeset in webkit [260232] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

Add a new 'limitNavigationsToAppBoundDomains' property to WKWebViewConfiguration
https://bugs.webkit.org/show_bug.cgi?id=210620
<rdar://problem/61903225>

Reviewed by Andy Estes.

Follow-up fix. The property exposed by WKWebViewConfiguration should not
use a local BOOL; it simply exposes the APIPageConfiguration value.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration limitsNavigationToAppBoundDomains]):
(-[WKWebViewConfiguration setLimitsNavigationToAppBoundDomains:]):
(-[WKWebViewConfiguration _setIgnoresAppBoundDomains:]):

5:53 PM Changeset in webkit [260231] by Brent Fulgham
  • 7 edits in trunk/Source/WebKit

Switch NetworkProcess and NetworkProcessProxy messages to use CallbackID class
https://bugs.webkit.org/show_bug.cgi?id=210566
<rdar://problem/61791784>

Reviewed by David Kilzer.

Instead of using the raw uint64_t type to represent callbacks, use the purpose
built WebKit::CallbackID type.

Tested by existing cases.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::fetchWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcessProxy::didFetchWebsiteData):
(WebKit::NetworkProcessProxy::didDeleteWebsiteData):
(WebKit::NetworkProcessProxy::didDeleteWebsiteDataForOrigins):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
5:21 PM Changeset in webkit [260230] by timothy_horton@apple.com
  • 4 edits in trunk/Source/WebKit

Try to fix the macCatalyst build

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

(uiImageForImage):
(createTargetedPreview):
(createFallbackTargetedPreview):
(-[WKContentView _createTargetedContextMenuHintPreviewIfPossible]):

5:17 PM Changeset in webkit [260229] by ddkilzer@apple.com
  • 3 edits in trunk/Source/WebKit

Re-land: [IPC Hardening] MachMessage::create() should use checked arithmetic
<https://webkit.org/b/210572>
<rdar://problem/61729947>

Reviewed by Chris Dumez.

  • Platform/IPC/cocoa/ConnectionCocoa.mm:

(IPC::Connection::sendOutgoingMessage):

  • Add nullptr check since MachMessage::create() can return an empty std::unique_ptr<> now.
  • Platform/IPC/cocoa/MachMessage.cpp:

(IPC::MachMessage::create):

  • Use CheckedSize to compute the buffer size.
5:05 PM Changeset in webkit [260228] by Brent Fulgham
  • 7 edits in trunk/Source/WebKit

Add a new 'limitNavigationsToAppBoundDomains' property to WKWebViewConfiguration
https://bugs.webkit.org/show_bug.cgi?id=210620
<rdar://problem/61903225>

Reviewed by Andy Estes.

Provide a way for Developers to opt-in to AppBound domains through a new WKWebViewConfiguration
property.

This patch only creates the property and exposes the flag to the APIPageConfiguration and
WebPageProxy. A separate patch will take action based on its value.

  • UIProcess/API/APIPageConfiguration.cpp:

(API::PageConfiguration::copy const):

  • UIProcess/API/APIPageConfiguration.h:

(API::PageConfiguration::limitsNavigationToAppBoundDomains const):
(API::PageConfiguration::setLimitsNavigationToAppBoundDomains):

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

(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration limitsNavigationToAppBoundDomains]):
(-[WKWebViewConfiguration setLimitsNavigationToAppBoundDomains:]):
(-[WKWebViewConfiguration _setIgnoresAppBoundDomains:]): Keep the new property in
sync with this internal flag.

  • UIProcess/WebPageProxy.cpp:

(WebKit::m_limitsNavigationToAppBoundDomains):

  • UIProcess/WebPageProxy.h:
4:50 PM Changeset in webkit [260227] by svillar@igalia.com
  • 10 edits in trunk/Source

Unreviewed build fix for non unified builds.

Source/JavaScriptCore:

  • dfg/DFGOperations.cpp: Added missing includes.

Source/WebCore:

  • html/OffscreenCanvas.cpp: Added missing include.
  • html/canvas/CanvasRenderingContext2DBase.cpp: Ditto.
  • layout/tableformatting/TableFormattingContextGeometry.cpp: Ditto.
  • workers/WorkerAnimationController.cpp:

(WebCore::WorkerAnimationController::requestAnimationFrame): Added namespace.

  • workers/WorkerAnimationController.h: Added missing include.

Source/WebKit:

  • NetworkProcess/webrtc/LibWebRTCSocketClient.cpp: Added missing include.
4:30 PM Changeset in webkit [260226] by ysuzuki@apple.com
  • 2 edits in trunk/JSTests

Unreviewed, reduce # of iteration since this test is timed out in slow devices
https://bugs.webkit.org/show_bug.cgi?id=210023

  • stress/map-iteration-oas.js:
4:23 PM Changeset in webkit [260225] by dbates@webkit.org
  • 7 edits in trunk

Remove unused -_focusTextInputContext
https://bugs.webkit.org/show_bug.cgi?id=210619

Reviewed by Darin Adler.

Source/WebKit:

While this function was in the "SPI" header, there is no software at Apple that was using
this funciton and I will assume no non-Apple software was using it either.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _focusTextInputContext:completionHandler:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:

Tools:

Remove test now that the SPI was removed.

  • TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm:

(-[TestWKWebView synchronouslyFocusTextInputContext:]): Deleted.

4:05 PM Changeset in webkit [260224] by Simon Fraser
  • 6 edits
    2 adds in trunk

A slow-starting swipe always latches on the root node
https://bugs.webkit.org/show_bug.cgi?id=210618

Reviewed by Tim Horton.

Source/WebCore:

If the first event in a wheel event gesture had zero delta, scrolling thread logic would
always latch on the root node and the rest of the gesture would scroll the document.

Fix by not latching for events with zero delta.

Test: scrollingcoordinator/mac/latching/zero-delta-began-should-not-latch.html

  • page/scrolling/ScrollingTreeLatchingController.cpp:

(WebCore::ScrollingTreeLatchingController::nodeDidHandleEvent):

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::canScrollWithWheelEvent const):
(WebCore::ScrollingTreeScrollingNode::eventCanScrollContents const):
(WebCore::ScrollingTreeScrollingNode::scrollLimitReached const): Deleted.

  • page/scrolling/ScrollingTreeScrollingNode.h:
  • platform/PlatformWheelEvent.h:

(WebCore::PlatformWheelEvent::shouldConsiderLatching const): FIXME comment. Ideally this would
check delta() that that's too scarey at the moment.

LayoutTests:

  • scrollingcoordinator/mac/latching/zero-delta-began-should-not-latch-expected.txt: Added.
  • scrollingcoordinator/mac/latching/zero-delta-began-should-not-latch.html: Added.
3:35 PM Changeset in webkit [260223] by mark.lam@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

[Re-landing] Use more PAC diversity for JIT probe code.
https://bugs.webkit.org/show_bug.cgi?id=210252
<rdar://problem/54490367>

Reviewed by Keith Miller.

Introducing new PtrTags:

JITProbePtrTag - for the client probe function.
JITProbeTrampolinePtrTag - for calling the ctiMasmProbeTrampoline.
JITProbeExecutorPtrTag - for calling the probe executor.

Currently, this is only the Probe::executeProbe().

JITProbeStackInitializationFunctionPtrTag - for calling the optional stack

initialization function that the client probe function may set.

We'll now use these in the JIT probe mechanism instead of adopting the default
CFunctionPtrTag.

Fixed an assert in MacroAssemblerARM64.cpp which does not apply to non ARM64E
builds.

  • assembler/MacroAssembler.cpp:

(JSC::MacroAssembler::probe):

  • assembler/MacroAssemblerARM64.cpp:

(JSC::MacroAssembler::probe):

  • assembler/MacroAssemblerPrinter.h:

(JSC::MacroAssembler::print):

  • assembler/ProbeContext.h:
  • runtime/JSCPtrTag.h:
  • tools/JSDollarVM.cpp:

(JSC::callWithStackSizeProbeFunction):

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::emitLoopTierUpCheck):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::emitLoopTierUpCheck):

2:40 PM Changeset in webkit [260222] by mark.lam@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

Rolling out r259897: Causing crashes on iOS.
https://bugs.webkit.org/show_bug.cgi?id=210252

Not reviewed.

  • assembler/MacroAssembler.cpp:

(JSC::MacroAssembler::probe):

  • assembler/MacroAssemblerARM64.cpp:

(JSC::MacroAssembler::probe):

  • assembler/MacroAssemblerPrinter.h:

(JSC::MacroAssembler::print):

  • assembler/ProbeContext.h:
  • runtime/JSCPtrTag.h:
  • tools/JSDollarVM.cpp:

(JSC::callWithStackSizeProbeFunction):

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::emitLoopTierUpCheck):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::emitLoopTierUpCheck):

1:54 PM Changeset in webkit [260221] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[macOS] Switch unused IOKit classes from allow-with-report to deny-with-report
https://bugs.webkit.org/show_bug.cgi?id=210136
<rdar://problem/61403216>

Reviewed by Per Arne Vollan.

After tracking telemetry for several weeks, we can now safely switch the default state
of a number of IOKit classes from 'allow with telemetry' to 'deny with telemetry'.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
1:42 PM Changeset in webkit [260220] by ysuzuki@apple.com
  • 1 edit
    8 adds in trunk/Tools

Add slack-aware WKR implementation
https://bugs.webkit.org/show_bug.cgi?id=210425

Reviewed by Alexey Proskuryakov.

This patch adds new WKR implementation, which is posting changes to #changes in WebKit slack.
Currently, we are polling git.webkit.org's feed once a minute. The more efficient way to implement
this bot is introducing post-commit hook, but for now, this polling strategy just works.

  • WKR/.gitignore: Added.
  • WKR/ReadMe.md: Added.
  • WKR/WKR.mjs: Added.
  • WKR/data/.gitignore: Added.
  • WKR/package-lock.json: Added.
  • WKR/package.json: Added.
1:41 PM Changeset in webkit [260219] by Russell Epstein
  • 2 edits in branches/safari-610.1.10-branch/Source/WebKit

Cherry-pick r260218. rdar://problem/61897737

Fix the iOS build when building without EDITABLE_REGION after r260192
(https://bugs.webkit.org/show_bug.cgi?id=210398)

Have -_mayContainEditableElementsInRect compile-time conditionally call WebKit::mayContainEditableElementsInRect().
If ENABLE(EDITABLE_REGION) is not enabled then return NO.

  • UIProcess/API/ios/WKWebViewTestingIOS.mm: (-[WKWebView _mayContainEditableElementsInRect:]):

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

1:38 PM Changeset in webkit [260218] by dbates@webkit.org
  • 2 edits in trunk/Source/WebKit

Fix the iOS build when building without EDITABLE_REGION after r260192
(https://bugs.webkit.org/show_bug.cgi?id=210398)

Have -_mayContainEditableElementsInRect compile-time conditionally call WebKit::mayContainEditableElementsInRect().
If ENABLE(EDITABLE_REGION) is not enabled then return NO.

  • UIProcess/API/ios/WKWebViewTestingIOS.mm:

(-[WKWebView _mayContainEditableElementsInRect:]):

1:27 PM Changeset in webkit [260217] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed build-fix after r260182; guard call to fullscreenManager() for ports which do not
ENABLE(FULLSCREEN_API).

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::updateMediaUsageIfChanged):

1:13 PM Changeset in webkit [260216] by ddkilzer@apple.com
  • 3 edits in trunk/Source/WebKit

Rollout: [IPC Hardening] MachMessage::create() should use checked arithmetic
<https://webkit.org/b/210572>
<rdar://problem/61729947>

Unreviewed rollout of r260160.

Appears to have caused 8 API test failures on iOS.

  • Platform/IPC/cocoa/ConnectionCocoa.mm:

(IPC::Connection::sendOutgoingMessage):

  • Platform/IPC/cocoa/MachMessage.cpp:

(IPC::MachMessage::create):

1:02 PM Changeset in webkit [260215] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

REGRESSION(r260081) Broke iOS PLT due to InjectedBundle initialization (edit)
https://bugs.webkit.org/show_bug.cgi?id=210582
<rdar://problem/61838584>

Reviewed by Darin Adler.

The changes in r260081 began enforcing NSSecureCoding best practices, triggering
a bug in InjectedBundleMac.mm, which is used by iOS as well.

This patch does the following:

  1. Delays parameter decoding until we use the appropriate InjectedBundle mechanism for expressing the valid classes to use in the Unarchiver.
  2. Removes a temporary workaround needed to get PLT running on iOS again.

This patch also moves the check of the CFBundleGetFunctionPointerForName slightly earlier
so we can use a single function pointer check, and only invoke the parameter decoding
if we are using the C API.

If not, we delay parameter decoding until we have constructed the WKWebProcessPlugIn
object so we can consume it's 'additionalClassesForParameterCoder' before calling
its initialization method.

  • WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:

(WebKit::InjectedBundle::decodeBundleParameters): Remove temporary workaround
needed to get PLT working again. Instead of using a debug assert, return as
a decoding failure if the resulting object is not an NSDictionary.
(WebKit::InjectedBundle::initialize): Delay decoding the bundle parameters on
iOS until the Plugin's additionalClassesForParameterCoder method can be called.

12:48 PM Changeset in webkit [260214] by dbates@webkit.org
  • 13 edits in trunk

[iOS] Add a way to focus a text input and place a caret
https://bugs.webkit.org/show_bug.cgi?id=210611
<rdar://problem/61893062>

Reviewed by Darin Adler.

Source/WebKit:

Add some IPI that will be used by code in WebKitAdditions to focus a text input context
and place the caret in it. This will replace the existing -focusTextInput SPI, which I
will remove in a subsequent commit.

  • UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
  • UIProcess/API/ios/WKWebViewTestingIOS.mm:

(-[WKWebView _requestTextInputContextsInRect:completionHandler:]): Fix up code style
of signature while I am here.
(-[WKWebView _focusTextInputContext:placeCaretAt:completionHandler:]): Added.

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

(-[WKContentView _isTextInputContextFocused:]): Added.
(-[WKContentView _focusTextInputContext:placeCaretAt:completionHandler:]): Added.
(-[WKContentView _requestTextInputContextsInRect:completionHandler:]): Fix up code style
of signature while I am here.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::focusTextInputContextAndPlaceCaret):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::focusTextInputContext): Use auto now that elementForContext() returns a RefPtr.
(WebKit::WebPage::elementForContext const): Have it return a RefPtr instead of a raw
pointer so callers don't have to remember to take out a ref of otherwise be mindful
of the element's lifetime.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::removeTextPlaceholder): Use auto now that elementForContext() returns a RefPtr.
(WebKit::WebPage::requestDocumentEditingContext): Ditto.
(WebKit::WebPage::focusTextInputContextAndPlaceCaret): Added.

Tools:

Add some tests.

  • TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm:

(-[TestWKWebView synchronouslyFocusTextInputContext:placeCaretAt:]): Added.
(webViewLoadHTMLStringAndWaitForAllFramesToPaint): Use the bundle's TestWebKitAPI.resources directory
as the base URL so that we have a valid file URL. Some of the tests will then
call -_setAllowUniversalAccessFromFileURLs to allow the main frame access to
the unique-origin child frame contents.
(TEST):

12:44 PM Changeset in webkit [260213] by Russell Epstein
  • 3 edits in branches/safari-610.1.10-branch/Source/WebKit

Cherry-pick r260120. rdar://problem/61899305

Unreviewed, reverting r259891.

Causes significant iOS MotionMark regression

Reverted changeset:

"Switch unused IOKit classes from allow-with-report to deny-
with-report"
https://bugs.webkit.org/show_bug.cgi?id=210136
https://trac.webkit.org/changeset/259891

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

12:31 PM Changeset in webkit [260212] by Russell Epstein
  • 4 edits in branches/safari-610.1.10-branch

Cherry-pick r260193. rdar://problem/61897737

REGRESSION (r259762): Should always hit test for editable elements if the WKWebView is fully editable
https://bugs.webkit.org/show_bug.cgi?id=210558
<rdar://problem/61798347>

Reviewed by Wenson Hsieh.

Source/WebKit:

If the entire WKWebView is marked editable (via SPI -[WKWebView _setEditable]) then
always ask the web process to hit test the page because every element is considered
editable.

  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _requestTextInputContextsInRect:completionHandler:]):

Tools:

Add a test.

  • TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm: (TEST):

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

12:31 PM Changeset in webkit [260211] by Russell Epstein
  • 17 edits in branches/safari-610.1.10-branch

Cherry-pick r260192. rdar://problem/61897737

Move -_requestTextInputContextsInRect to WKContentView to simplify implementation
https://bugs.webkit.org/show_bug.cgi?id=210398
<rdar://problem/61656931>

Reviewed by Darin Adler.

Source/WebKit:

-_requestTextInputContextsInRect is not needed on Mac, but supporting it complicates
its implementation: it has to deal with coordinate space differences due to differences
in what is the root view on Mac and iOS + it has to know about iOS's custom content views.
While this function was in the "SPI" header, there is no software at Apple that was using
these outside of WebKit, and I will assume no non-Apple software was using them either.
Moving this function to WKContentView lets me simplify the implementation.

  • Platform/spi/ios/UIKitSPI.h: Add more forward declarations.
  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _convertRectFromRootViewCoordinates:]): Deleted. (-[WKWebView _convertRectToRootViewCoordinates:]): Deleted. (-[WKWebView _mayContainEditableElementsInRect:]): Deleted; moved to WKWebViewTestingIOS.mm. (-[WKWebView _requestTextInputContextsInRect:completionHandler:]): Deleted; moved to WKContentViewInteraction.mm.
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
  • UIProcess/API/ios/WKWebViewTestingIOS.mm: (-[WKWebView _requestTextInputContextsInRect:completionHandler:]): Added. Turns around and calls the function of the same name on the WKContentView. It takes care to convert the specified rect from WKWebView coordinates to WKContentView coordinates and fixes up the bounding rects for the returned contexts to be in WKWebView coordinates. This keeps existings tests passing as mekes using this function intuitive since callers specify and get rects in WKWebView coordinates. (-[WKWebView _requestDocumentContext:completionHandler:]): Added. (-[WKWebView _adjustSelectionWithDelta:completionHandler:]): Added. (-[WKWebView _mayContainEditableElementsInRect:]): Moved from WKWebView.mm.
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _requestTextInputContextsInRect:completionHandler:]): Moved from WKWebView.mm and simplified.

Source/WTF:

Add a convenience function to create an NSArray from a WTF::Vector with a transform function.
The tranform function can either return a RetainPtr or an id.

  • wtf/cocoa/VectorCocoa.h: (WTF::createNSArray): Added.

Tools:

Update test now that -_requestTextInputContextsInRect has moved from WKWebView to WKContentView.
I expose new testing-only WKWebView SPI to access it on the content view.

  • TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm: (-[TestWKWebView synchronouslyRequestDocumentContext:]): Added; due to category name change. (-[TestWKWebView synchronouslyAdjustSelectionWithDelta:]): Added; due to category name change.
  • TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm: (-[WKWebView synchronouslyRequestTextInputContextsInRect:]): Deleted; due to category name change. (-[WKWebView synchronouslyFocusTextInputContext:]): Deleted; due to category name change.
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptControllerIOS::mayContainEditableElementsInRect): Convert from content coordinates to WKWebView coordinates now that -_mayContainEditableElementsInRect expects it.

LayoutTests:

Update test and expected results now that UIScriptController.mayContainEditableElementsInRect()
expects the passed rect to be in content coordinates.

I replaced one sub-test of a rect pre-scroll with another that tests the location
of a rect that will have editable elements after scroll. The purpose of that sub-test
hasn't changed, but it now makes the sub-tests' rects symmetric for before and after
scroll. I also added debug() statements to demarcate the before scroll and after scroll
sub-tests in the results to make it easier to understand what this test file is testing.

  • editing/editable-region/hit-test-fixed-expected.txt:
  • editing/editable-region/hit-test-fixed.html:

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

12:31 PM Changeset in webkit [260210] by Russell Epstein
  • 4 edits in branches/safari-610.1.10-branch/Source/WebKit

Cherry-pick r260186. rdar://problem/61897760

REGRESSION (r259898): WebKit-based Books views are all blank
https://bugs.webkit.org/show_bug.cgi?id=210590
<rdar://problem/61791109>

Reviewed by Chris Dumez.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::enterAcceleratedCompositingWithRootLayer): (WebKit::WebViewImpl::setAcceleratedCompositingRootLayer): (WebKit::WebViewImpl::setAcceleratedCompositingRootLayerAfterFlush): Deleted.
  • UIProcess/mac/PageClientImplMac.mm: (WebKit::PageClientImpl::enterAcceleratedCompositingMode): (WebKit::PageClientImpl::didFirstLayerFlush): The changes to setAcceleratedCompositingRootLayer in r259898 proved to be wrong in a second way (the first being fixed in r260104): when setAcceleratedCompositingRootLayer is called from updateAcceleratedCompositingMode, because the layer hosting mode changed (Books appears to use app-hosted layers), it incorrectly identified the root layer change as a process swap, resulting in the correct layer never being unhidden.

This is enough mistakes that I'm going to try a different approach:
put setAcceleratedCompositingRootLayer back to the way it was before, where
it immediately updates the layer without any smarts, remove
setAcceleratedCompositingRootLayerAfterFlush, because it's no longer necessary,
and add enterAcceleratedCompositingWithRootLayer, which is specifically only
called in the case where DrawingArea will for-sure send us a follow-up
(didFirstLayerFlush) that will unhide the root layer.

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

12:27 PM Changeset in webkit [260209] by Claudio Saavedra
  • 3 edits in trunk/Source/WebCore

[GTK] Deprecation-guards fixes
https://bugs.webkit.org/show_bug.cgi?id=210600

Reviewed by Adrian Perez de Castro.

No new tests needed.

  • platform/gtk/RenderThemeGadget.cpp:

(WebCore::RenderThemeGadget::backgroundColor const): Add missing
deprecation guards for deprecated GtkStyleContext API.

  • platform/gtk/ThemeGtk.cpp:

(WebCore::ThemeGtk::ensurePlatformColors const): Switch to WK
deprecation guards from glib ones.

11:59 AM Changeset in webkit [260208] by Alan Coon
  • 8 edits in branches/safari-609-branch/Source

Versioning.

11:42 AM Changeset in webkit [260207] by Jack Lee
  • 4 edits
    2 adds in trunk

ASSERTION FAILED: candidate.isCandidate() in WebCore::canonicalizeCandidate
https://bugs.webkit.org/show_bug.cgi?id=130844
<rdar://59535009>

Reviewed by Geoffrey Garen.

Source/WebCore:

Call Position::isCandidate() in PositionIterator::isCandidate so behavior of
candidate search become identical in both classes.

Test: editing/inserting/insert-in-br.html

  • dom/PositionIterator.cpp:

(WebCore::PositionIterator::isCandidate const):

LayoutTests:

  • editing/inserting/insert-in-br-expected.txt: Added.
  • editing/inserting/insert-in-br.html: Added.

Added a regression test for the crash.

  • editing/inserting/insert-list-in-table-cell-07-expected.txt:

Update node tree in expected text file due to behavior change in function
PositionIterator::isCandidate. The visual result remains the same.

11:38 AM Changeset in webkit [260206] by Ryan Haddad
  • 4 edits in branches/safari-609-branch/LayoutTests

Cherry-pick r259621. rdar://problem/59461792

[Cocoa] REGRESSION(r254389): fast/text/international/system-language/declarative-language.html is failing
https://bugs.webkit.org/show_bug.cgi?id=208023
<rdar://problem/59461792>

Reviewed by Simon Fraser.

minimizedLanguagesFromLanguages() is supposed to minimize the language list;
that's its whole raison d'être

  • fast/text/international/system-language/declarative-language-expected.txt:
  • fast/text/international/system-language/declarative-language.html:
  • platform/mac/TestExpectations:

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

11:38 AM Changeset in webkit [260205] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Remove outdated comment from FrameLoader
https://bugs.webkit.org/show_bug.cgi?id=210607

Patch by Rob Buis <rbuis@igalia.com> on 2020-04-16
Reviewed by Darin Adler.

Remove comment from FrameLoader that is not valid/important anymore because
addExtraFieldsToRequest does not set the Origin header since r259036.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadDifferentDocumentItem):

11:38 AM Changeset in webkit [260204] by Ryan Haddad
  • 2 edits in branches/safari-609-branch/LayoutTests

Cherry-pick r257821. rdar://problem/61408640

REGRESSION(iOS): editing/selection/ios/set-selection-by-tapping-after-changing-focused-element-bounds.html is always timing out
https://bugs.webkit.org/show_bug.cgi?id=208556

Reviewed by Wenson Hsieh.

Wait for the dobule tap delay between the initial tap and the second tap on the editable region
so that the second tap would result in a selection change instead of both taps to be recognized
as a single dobule tap.

  • editing/selection/ios/set-selection-by-tapping-after-changing-focused-element-bounds.html:

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

11:37 AM Changeset in webkit [260203] by Chris Fleizach
  • 3 edits
    2 adds in trunk

AX: Need method for setting selected range from NSRange
https://bugs.webkit.org/show_bug.cgi?id=210593

Reviewed by Darin Adler.

Source/WebCore:

Allow setSelection to work outside of text controls.

Test: accessibility/ios-simulator/non-textcontrol-set-selection.html

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper _accessibilitySetSelectedTextRange:]):

LayoutTests:

  • accessibility/ios-simulator/non-textcontrol-set-selection-expected.txt: Added.
  • accessibility/ios-simulator/non-textcontrol-set-selection.html: Added.
11:30 AM Changeset in webkit [260202] by dbates@webkit.org
  • 2 edits in trunk/Source/WTF

Clean up VectorCocoa createNSArray overloads and add documentation for createNSArray taking a map function
https://bugs.webkit.org/show_bug.cgi?id=210610

Reviewed by Darin Adler.

Remove unnecessary local variable. Rename "map" type in createNSArray function for clarity
and add documentation for createNSArray function that takes a map function.

I was tempted, but decided not to write the createNSArray function that does not take a
map function in terms of the one that did. With the "right" optimization settings the
compiler should emit the same code, but I didn't verify this. So, I didn't do it.

While I am here, update makeVector() to call shrinkToFit() to reduce the memory footprint
of the returned vector should it end of having less entries, due to filtering, than its
initial capacity.

  • wtf/cocoa/VectorCocoa.h:

(WTF::createNSArray): See above description.
(WTF::makeVector): Shrink to fit before returning the vector. See above for more details.

11:11 AM Changeset in webkit [260201] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

[macOS] Update ScreenTime as playback state changes
https://bugs.webkit.org/show_bug.cgi?id=210518
<rdar://problem/61181092>

Reviewed by Eric Carlson.

Follow up to r260182; Pass a WeakPtr into our task queue in sessionWillEndPlayback rather than a bare pointer.

  • platform/audio/cocoa/MediaSessionManagerCocoa.mm:

(WebCore::MediaSessionManagerCocoa::sessionWillEndPlayback):

11:06 AM Changeset in webkit [260200] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Use safeRoundPage() instead of round_page() in SharedMemory
https://bugs.webkit.org/show_bug.cgi?id=210608
<rdar://problem/60600443>

Reviewed by Geoffrey Garen.

Use new safeRoundPage() instead of round_page() in SharedMemory, to deal safely with overflows.

  • Platform/cocoa/SharedMemoryCocoa.cpp:

(WebKit::SharedMemory::allocate):
(WebKit::makeMemoryEntry):
(WebKit::SharedMemory::~SharedMemory):
(WebKit::SharedMemory::createHandle):

11:04 AM Changeset in webkit [260199] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Captured ThreadedScrollingTree should check its m_scrollingCoordinator before calling its methods
https://bugs.webkit.org/show_bug.cgi?id=210570

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-04-16
Reviewed by Simon Fraser.

m_scrollingCoordinator may be nullified before asynchronously calling its
method scheduleUpdateScrollPositionAfterAsyncScroll(). Check if it is
not null before calling this method.

  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):

10:44 AM Changeset in webkit [260198] by Alan Coon
  • 2 edits in branches/safari-609-branch/Source/WTF

Cherry-pick r259980. rdar://problem/61888315

Follow-up: WTF::Persistence::Coder and WTF::Persistence::Decoder should use WARN_UNUSED_RETURN
<https://webkit.org/b/210238>
<rdar://problem/61491575>

Changes based on feedback from Alex Christensen and Darin Adler:

  • Remove WARN_UNUSED_RETURN from methods returning Optional<>.
  • Place WARN_UNUSED_RETURN consistently before the return type.
  • wtf/persistence/PersistentDecoder.h:

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

10:44 AM Changeset in webkit [260197] by Alan Coon
  • 6 edits in branches/safari-609-branch/Source

Cherry-pick r259814. rdar://problem/61888315

WTF::Persistence::Coder and WTF::Persistence::Decoder should use WARN_UNUSED_RETURN
<https://webkit.org/b/210238>
<rdar://problem/61491575>

Reviewed by Darin Adler.

Source/WebKit:

  • NetworkProcess/cache/NetworkCacheEntry.cpp: (WebKit::NetworkCache::Entry::decodeStorageRecord):
  • Add missing return value check for decode.decode().

Source/WTF:

  • wtf/persistence/PersistentCoders.cpp: (WTF::Persistence::decodeStringText):
  • Add WARN_UNUSED_RETURN.
  • wtf/persistence/PersistentCoders.h: (WTF::Persistence::Coder<Optional<T>>::decode): (WTF::Persistence::Coder<Seconds>::decode): (WTF::Persistence::Coder<WallTime>::decode):
  • Add WARN_UNUSED_RETURN.
  • Add missing return value check for decode.decodeFixedLengthData().
  • wtf/persistence/PersistentDecoder.h: (WTF::Persistence::Decoder::decode): (WTF::Persistence::Decoder::decodeEnum): (WTF::Persistence::Decoder::bufferIsLargeEnoughToContain const):
  • Add WARN_UNUSED_RETURN.

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

10:39 AM Changeset in webkit [260196] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Crash in IndefiniteSizeStrategy::recomputeUsedFlexFractionIfNeeded when min-size can not be resolved
https://bugs.webkit.org/show_bug.cgi?id=210584
<rdar://problem/56685237>

Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

Use the initial value of 0 when the min-height can't be resolved.

Test: fast/css-grid-layout/crash-when-min-height-cant-be-resolved.html

  • rendering/GridTrackSizingAlgorithm.cpp:

(WebCore::IndefiniteSizeStrategy::recomputeUsedFlexFractionIfNeeded const):

LayoutTests:

  • fast/css-grid-layout/crash-when-min-height-cant-be-resolved-expected.txt: Added.
  • fast/css-grid-layout/crash-when-min-height-cant-be-resolved.html: Added.
10:30 AM Changeset in webkit [260195] by Adrian Perez de Castro
  • 15 edits in trunk/Source

Non-unified build fixes mid April 2020 edition
https://bugs.webkit.org/show_bug.cgi?id=210599

Unreviewed build fix.

Source/WebCore:

No new tests needed.

  • bindings/js/JSNavigatorCustom.cpp: Add missing JavaScriptCore/JSCJSValue.h header.

(WebCore::JSNavigator::getUserMedia): Prefix with the JSC:: namespace where needed.

  • dom/ShadowRoot.cpp: Add missing WebAnimation.h header.
  • dom/SimpleRange.cpp: Add missing NodeTraversal.h header.
  • editing/RemoveNodePreservingChildrenCommand.cpp: Add missing Editing.h header.
  • page/MemoryRelease.cpp: Add missing JavaScriptCore/VM.h header.
  • page/PageConfiguration.cpp: Add missing UserContentURLPattern.h header.
  • page/scrolling/ScrollingTree.h: Add missing EventTrackingRegions.h header.
  • page/scrolling/ScrollingTreeLatchingController.cpp: Add missing Logging.h header.
  • page/scrolling/ScrollingTreeLatchingController.h: Add missing ScrollTypes.h header,

and forward declaration for WebCore::PlatformWheelEvent.

  • workers/service/server/SWServerJobQueue.cpp: Add missing Logging.h header.

Source/WebKit:

  • UIProcess/DeviceIdHashSaltStorage.cpp: Add missing Logging.h header.
  • UIProcess/Inspector/gtk/WebInspectorProxyGtk.cpp:

(WebKit::WebInspectorProxy::platformSetForcedAppearance): Add missing WebCore:: namespace
prefix.

  • UIProcess/linux/MemoryPressureMonitor.h: Add missing wtf/text/CString.h header.
9:59 AM Changeset in webkit [260194] by Alan Coon
  • 1 edit in branches/safari-609-branch/Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm

Unreviewed build fix. rdar://problem/61853298

Attempted resolution of: use of undeclared identifier 'isInBounds'; did you mean 'WTF::isInBounds'?

9:52 AM Changeset in webkit [260193] by dbates@webkit.org
  • 4 edits in trunk

REGRESSION (r259762): Should always hit test for editable elements if the WKWebView is fully editable
https://bugs.webkit.org/show_bug.cgi?id=210558
<rdar://problem/61798347>

Reviewed by Wenson Hsieh.

Source/WebKit:

If the entire WKWebView is marked editable (via SPI -[WKWebView _setEditable]) then
always ask the web process to hit test the page because every element is considered
editable.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _requestTextInputContextsInRect:completionHandler:]):

Tools:

Add a test.

  • TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm:

(TEST):

9:47 AM Changeset in webkit [260192] by dbates@webkit.org
  • 17 edits in trunk

Move -_requestTextInputContextsInRect to WKContentView to simplify implementation
https://bugs.webkit.org/show_bug.cgi?id=210398
<rdar://problem/61656931>

Reviewed by Darin Adler.

Source/WebKit:

-_requestTextInputContextsInRect is not needed on Mac, but supporting it complicates
its implementation: it has to deal with coordinate space differences due to differences
in what is the root view on Mac and iOS + it has to know about iOS's custom content views.
While this function was in the "SPI" header, there is no software at Apple that was using
these outside of WebKit, and I will assume no non-Apple software was using them either.
Moving this function to WKContentView lets me simplify the implementation.

  • Platform/spi/ios/UIKitSPI.h: Add more forward declarations.
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _convertRectFromRootViewCoordinates:]): Deleted.
(-[WKWebView _convertRectToRootViewCoordinates:]): Deleted.
(-[WKWebView _mayContainEditableElementsInRect:]): Deleted; moved to WKWebViewTestingIOS.mm.
(-[WKWebView _requestTextInputContextsInRect:completionHandler:]): Deleted; moved to WKContentViewInteraction.mm.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
  • UIProcess/API/ios/WKWebViewTestingIOS.mm:

(-[WKWebView _requestTextInputContextsInRect:completionHandler:]): Added. Turns around and
calls the function of the same name on the WKContentView. It takes care to convert the specified
rect from WKWebView coordinates to WKContentView coordinates and fixes up the bounding rects
for the returned contexts to be in WKWebView coordinates. This keeps existings tests passing
as mekes using this function intuitive since callers specify and get rects in WKWebView coordinates.
(-[WKWebView _requestDocumentContext:completionHandler:]): Added.
(-[WKWebView _adjustSelectionWithDelta:completionHandler:]): Added.
(-[WKWebView _mayContainEditableElementsInRect:]): Moved from WKWebView.mm.

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

(-[WKContentView _requestTextInputContextsInRect:completionHandler:]): Moved from WKWebView.mm and simplified.

Source/WTF:

Add a convenience function to create an NSArray from a WTF::Vector with a transform function.
The tranform function can either return a RetainPtr or an id.

  • wtf/cocoa/VectorCocoa.h:

(WTF::createNSArray): Added.

Tools:

Update test now that -_requestTextInputContextsInRect has moved from WKWebView to WKContentView.
I expose new testing-only WKWebView SPI to access it on the content view.

  • TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm:

(-[TestWKWebView synchronouslyRequestDocumentContext:]): Added; due to category name change.
(-[TestWKWebView synchronouslyAdjustSelectionWithDelta:]): Added; due to category name change.

  • TestWebKitAPI/Tests/WebKitCocoa/RequestTextInputContext.mm:

(-[WKWebView synchronouslyRequestTextInputContextsInRect:]): Deleted; due to category name change.
(-[WKWebView synchronouslyFocusTextInputContext:]): Deleted; due to category name change.

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptControllerIOS::mayContainEditableElementsInRect): Convert from content coordinates
to WKWebView coordinates now that -_mayContainEditableElementsInRect expects it.

LayoutTests:

Update test and expected results now that UIScriptController.mayContainEditableElementsInRect()
expects the passed rect to be in content coordinates.

I replaced one sub-test of a rect pre-scroll with another that tests the location
of a rect that will have editable elements after scroll. The purpose of that sub-test
hasn't changed, but it now makes the sub-tests' rects symmetric for before and after
scroll. I also added debug() statements to demarcate the before scroll and after scroll
sub-tests in the results to make it easier to understand what this test file is testing.

  • editing/editable-region/hit-test-fixed-expected.txt:
  • editing/editable-region/hit-test-fixed.html:
9:25 AM Changeset in webkit [260191] by ddkilzer@apple.com
  • 13 edits
    1 copy in trunk/Source/WebKit

[IPC Hardening] Use ObjectIdentifier<> for LegacyCustomProtocol
<https://webkit.org/b/210580>
<rdar://problem/61791686>

Reviewed by Chris Dumez.

Replace uses of uint64_t with LegacyCustomProtocolID.

  • NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm:

(WebKit::LegacyCustomProtocolManager::didFailWithError):
(WebKit::LegacyCustomProtocolManager::didLoadData):
(WebKit::LegacyCustomProtocolManager::didReceiveResponse):
(WebKit::LegacyCustomProtocolManager::didFinishLoading):
(WebKit::LegacyCustomProtocolManager::wasRedirectedToRequest):
(WebKit::LegacyCustomProtocolManager::protocolForID):

  • NetworkProcess/CustomProtocols/LegacyCustomProtocolID.h: Add.
  • NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp:

(WebKit::LegacyCustomProtocolManager::addCustomProtocol):
(WebKit::LegacyCustomProtocolManager::removeCustomProtocol):
(WebKit::LegacyCustomProtocolManager::startLoading):
(WebKit::LegacyCustomProtocolManager::stopLoading):
(WebKit::generateCustomProtocolID): Delete.

  • Replace with LegacyCustomProtocolID::generate().
  • NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h:
  • NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.messages.in:
  • Scripts/webkit/messages.py:
  • UIProcess/API/APICustomProtocolManagerClient.h:

(API::CustomProtocolManagerClient::startLoading):
(API::CustomProtocolManagerClient::stopLoading):

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

(-[WKCustomProtocolLoader initWithLegacyCustomProtocolManagerProxy:customProtocolID:request:]):
(WebKit::LegacyCustomProtocolManagerClient::startLoading):
(WebKit::LegacyCustomProtocolManagerClient::stopLoading):

  • UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp:

(WebKit::LegacyCustomProtocolManagerProxy::startLoading):
(WebKit::LegacyCustomProtocolManagerProxy::stopLoading):
(WebKit::LegacyCustomProtocolManagerProxy::wasRedirectedToRequest):
(WebKit::LegacyCustomProtocolManagerProxy::didReceiveResponse):
(WebKit::LegacyCustomProtocolManagerProxy::didLoadData):
(WebKit::LegacyCustomProtocolManagerProxy::didFailWithError):
(WebKit::LegacyCustomProtocolManagerProxy::didFinishLoading):

  • UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h:
  • Remove unused typedef and instance variable.
  • UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • Add LegacyCustomProtocolID.h to project.
8:55 AM Changeset in webkit [260190] by Simon Fraser
  • 16 edits
    6 adds in trunk

[Async overflow scrolling] Slow-repaint overflow scroll have force their enclosing scrollers to be slow too
https://bugs.webkit.org/show_bug.cgi?id=210591

Reviewed by Antti Koivisto.

Source/WebCore:

If an overflow:scroll has background-attachment:fixed in the contents, then both it and all its containing-block
scrolling ancestors have to be slow-scrolling too, because scrolling any of them affects the local geometry
of the fixed backgrounds which paint on scroll.

Implement this by having the scrolling tree do a post-commit pass over the nodes with sync scrolling reasons
(which we collect during the commit phase). For each slow-scrolling node, walk its ancestor chain (via
proxy nodes when necessary) and mark the scrolling node ancestors with the "DescendantScrollersHaveSynchronousScrolling"
reason.

For testing, expose internals.scrollingTreeAsText(), which needs a bit of synchronization via
waitForScrollingTreeCommit() since the commit happens on the scrolling thread.

Tests: scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-nested-non-cb-overflow.html

scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-nested-overflow.html
scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-nested-overflow2.html

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText const):
(WebCore::AsyncScrollingCoordinator::scrollingTreeAsText const):

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::scrollingStateTreeAsText const):
(WebCore::ScrollingCoordinator::scrollingTreeAsText const):
(WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):

  • page/scrolling/ScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinatorTypes.h:
  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::commitTreeState):
(WebCore::ScrollingTree::updateTreeFromStateNodeRecursive):
(WebCore::ScrollingTree::propagateSynchronousScrollingReasons):
(WebCore::ScrollingTree::updateTreeFromStateNode): Deleted.

  • page/scrolling/ScrollingTree.h:

(WebCore::ScrollingTree::waitForScrollingTreeCommit):

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::commitStateAfterChildren):

  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::waitForScrollingTreeCommit):

  • page/scrolling/ThreadedScrollingTree.h:
  • testing/Internals.cpp:

(WebCore::Internals::scrollingTreeAsText const):

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

LayoutTests:

  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-nested-non-cb-overflow-expected.txt: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-nested-non-cb-overflow.html: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-nested-overflow-expected.txt: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-nested-overflow.html: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-nested-overflow2-expected.txt: Added.
  • scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-nested-overflow2.html: Added.
8:52 AM Changeset in webkit [260189] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests

[ Mac wk2 Debug ] media/modern-media-controls/media-controller/media-controller-auto-hide.html is flaky timing out.
https://bugs.webkit.org/show_bug.cgi?id=210349
<rdar://problem/61594098>

Reviewed by Eric Carlson.

This test had several things wrong about it. First, it manually created a MediaController in the test page and set a custom auto-hide delay on it.
However, it would test the proper behavior of the auto-hide behavior on the MediaController created by the media element, querying the state of
the media controls markup within that media element's shadow root. In that world, the auto-hide delay was the default delay, and not the custom
one set on the page-created MediaController.

The cause of the timeout was that the media clip used in this test is barely longer than the auto-hide delay, and it could happen that under slow
conditions, the media would end and the auto-hide timer would never have a chance to fire since it would be canceled due to auto-hide being disabled
when the media is not playing, such as when it ended.

We make this test saner and more realistic by not customizing the auto-hide delay, removing the page MediaController and simply setting "loop" on the
media element such that it never stops playing, givin the auto-hide timer additional time to fire with no risk of it being canceled by the media ending.

  • media/modern-media-controls/media-controller/media-controller-auto-hide.html:
  • platform/mac-wk2/TestExpectations:
8:45 AM Changeset in webkit [260188] by Kocsen Chung
  • 1 copy in tags/Safari-610.1.9.4

Tag Safari-610.1.9.4.

8:34 AM Changeset in webkit [260187] by Kocsen Chung
  • 8 edits in branches/safari-610.1.9-branch/Source

Versioning.

8:33 AM Changeset in webkit [260186] by timothy_horton@apple.com
  • 4 edits in trunk/Source/WebKit

REGRESSION (r259898): WebKit-based Books views are all blank
https://bugs.webkit.org/show_bug.cgi?id=210590
<rdar://problem/61791109>

Reviewed by Chris Dumez.

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

(WebKit::WebViewImpl::enterAcceleratedCompositingWithRootLayer):
(WebKit::WebViewImpl::setAcceleratedCompositingRootLayer):
(WebKit::WebViewImpl::setAcceleratedCompositingRootLayerAfterFlush): Deleted.

  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::enterAcceleratedCompositingMode):
(WebKit::PageClientImpl::didFirstLayerFlush):
The changes to setAcceleratedCompositingRootLayer in r259898 proved
to be wrong in a second way (the first being fixed in r260104): when
setAcceleratedCompositingRootLayer is called from updateAcceleratedCompositingMode,
because the layer hosting mode changed (Books appears to use app-hosted layers),
it incorrectly identified the root layer change as a process swap, resulting
in the correct layer never being unhidden.

This is enough mistakes that I'm going to try a different approach:
put setAcceleratedCompositingRootLayer back to the way it was before, where
it immediately updates the layer without any smarts, remove
setAcceleratedCompositingRootLayerAfterFlush, because it's no longer necessary,
and add enterAcceleratedCompositingWithRootLayer, which is specifically only
called in the case where DrawingArea will for-sure send us a follow-up
(didFirstLayerFlush) that will unhide the root layer.

7:55 AM Changeset in webkit [260185] by Philippe Normand
  • 2 edits in trunk/Tools

Unreviewed, GTK clean build fix after r260132.

  • TestWebKitAPI/gtk/main.cpp:

(main): Don't use GtkVersioning here. A dependency on the WebCore
private headers for this single file is overkill.

7:25 AM Changeset in webkit [260184] by Claudio Saavedra
  • 3 edits in trunk/Source/WebCore

Clean a couple of unused-parameters warnings
https://bugs.webkit.org/show_bug.cgi?id=210596

Unreviewed.

No new tests needed.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::wouldTaintOrigin const): Remove
a spurious UNUSED_PARAM() for an actually used parameter.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::updateSecurityDiscCharacters):

7:07 AM Changeset in webkit [260183] by Diego Pino Garcia
  • 2 edits
    1 delete in trunk/LayoutTests

[GTK] Gardening, mark several animations test as failure
https://bugs.webkit.org/show_bug.cgi?id=210602

Unreviewed gardening.

For some reason these baselines are not making the tests pass in
the EWS GTK-WK2 bot, so I'm removing these GTK baselines added in
r260155 and mark the tests as failing instead.

  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt: Removed.
  • platform/gtk/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/commitStyles-expected.txt: Removed.
  • platform/gtk/imported/w3c/web-platform-tests/web-animations/interfaces/KeyframeEffect/style-change-events-expected.txt: Removed.
  • platform/gtk/imported/w3c/web-platform-tests/web-animations/interfaces/KeyframeEffect/target-expected.txt: Removed.
6:36 AM Changeset in webkit [260182] by eric.carlson@apple.com
  • 42 edits
    9 adds in trunk

[macOS] Update ScreenTime as playback state changes
https://bugs.webkit.org/show_bug.cgi?id=210518
<rdar://problem/61181092>

Reviewed by Jer Noble.
Source/WebCore:

Test: media/media-usage-state.html

Pass media element state to the UI process whenever it changes.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::mediaSessionUniqueIdentifier const):

  • html/HTMLMediaElement.h:
  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::MediaElementSession):
(WebCore::MediaElementSession::~MediaElementSession):
(WebCore::MediaElementSession::updateMediaUsageIfChanged):

  • html/MediaElementSession.h:
  • page/ChromeClient.h:

(WebCore::ChromeClient::addMediaUsageManagerSession):
(WebCore::ChromeClient::updateMediaUsageManagerSessionState):
(WebCore::ChromeClient::removeMediaUsageManagerSession):

  • platform/audio/PlatformMediaSession.cpp:

(WebCore::PlatformMediaSession::PlatformMediaSession):

  • platform/audio/PlatformMediaSession.h:

(WebCore::PlatformMediaSession::updateMediaUsageIfChanged):
(WebCore::PlatformMediaSession::mediaSessionIdentifier const):

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary):

  • platform/audio/PlatformMediaSessionManager.h:

(WebCore::PlatformMediaSessionManager::scheduleUpdateSessionStatus):
(WebCore::PlatformMediaSessionManager::sessionDidEndRemoteScrubbing):
(WebCore::PlatformMediaSessionManager::scheduleUpdateNowPlayingInfo): Deleted.

  • platform/audio/cocoa/MediaSessionManagerCocoa.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.mm:

(WebCore::MediaSessionManagerCocoa::scheduleUpdateSessionStatus):
(WebCore::MediaSessionManagerCocoa::sessionWillBeginPlayback):
(WebCore::MediaSessionManagerCocoa::sessionDidEndRemoteScrubbing):
(WebCore::MediaSessionManagerCocoa::removeSession):
(WebCore::MediaSessionManagerCocoa::sessionWillEndPlayback):
(WebCore::MediaSessionManagerCocoa::clientCharacteristicsChanged):
(WebCore::MediaSessionManagerCocoa::sessionCanProduceAudioChanged):
(WebCore::MediaSessionManagerCocoa::scheduleUpdateNowPlayingInfo): Deleted.

  • platform/audio/ios/MediaSessionManagerIOS.mm:

(WebCore::MediaSessionManageriOS::resetRestrictions):
(WebCore::MediaSessionManageriOS::sessionWillBeginPlayback):

  • platform/graphics/MediaUsageInfo.h: Added.

(WebCore::MediaUsageInfo::operator== const):
(WebCore::MediaUsageInfo::operator!= const):
(WebCore::MediaUsageInfo::encode const):
(WebCore::MediaUsageInfo::decode):

  • testing/Internals.cpp:

(WebCore::Internals::setMediaElementRestrictions):
(WebCore::Internals::mediaUsageState const):

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

Source/WebCore/PAL:

Soft link the UsageTracking framework.

  • PAL.xcodeproj/project.pbxproj:
  • pal/cocoa/UsageTrackingSoftLink.h: Added.
  • pal/cocoa/UsageTrackingSoftLink.mm: Added.

Source/WebKit:

Add a manager that gets media element state changes, and a Cocoa-specific
implementation that passes that state to ScreenTime.

  • Scripts/webkit/messages.py:
  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::mediaUsageManager):
(WebKit::WebPageProxy::addMediaUsageManagerSession):
(WebKit::WebPageProxy::updateMediaUsageManagerSessionState):
(WebKit::WebPageProxy::removeMediaUsageManagerSession):

  • UIProcess/Media/MediaUsageManager.cpp: Added.

(WebKit::MediaUsageManager::create):
(WebKit::reset):
(WebKit::MediaUsageManager::addMediaSession):
(WebKit::MediaUsageManager::removeMediaSession):
(WebKit::MediaUsageManager::updateMediaUsage):

  • UIProcess/Media/MediaUsageManager.h: Added.
  • UIProcess/Media/cocoa/MediaUsageManagerCocoa.h: Added.

(WebKit::MediaUsageManagerCocoa::SessionMediaUsage::SessionMediaUsage):

  • UIProcess/Media/cocoa/MediaUsageManagerCocoa.mm: Added.

(WebKit::usageTrackingAvailable):
(WebKit::MediaUsageManager::create):
(WebKit::MediaUsageManagerCocoa::~MediaUsageManagerCocoa):
(WebKit::MediaUsageManagerCocoa::reset):
(WebKit::MediaUsageManagerCocoa::addMediaSession):
(WebKit::MediaUsageManagerCocoa::removeMediaSession):
(WebKit::MediaUsageManagerCocoa::updateMediaUsage):

  • UIProcess/WebAuthentication/AuthenticatorManager.cpp:
  • UIProcess/WebAuthentication/Mock/MockLocalConnection.mm:
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::addMediaUsageManagerSession):
(WebKit::WebChromeClient::updateMediaUsageManagerSessionState):
(WebKit::WebChromeClient::removeMediaUsageManagerSession):

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

(WebKit::WebPage::addMediaUsageManagerSession):
(WebKit::WebPage::updateMediaUsageManagerSessionState):
(WebKit::WebPage::removeMediaUsageManagerSession):

  • WebProcess/WebPage/WebPage.h:

Source/WTF:

Define HAVE_MEDIA_USAGE_FRAMEWORK and ENABLE_MEDIA_USAGE

  • wtf/PlatformEnableCocoa.h:
  • wtf/PlatformHave.h:

LayoutTests:

  • media/media-usage-state-expected.txt: Added.
  • media/media-usage-state.html: Added.
  • platform/gtk/TestExpectations: Skip new test.
  • platform/win/TestExpectations: Ditto.
  • platform/wpe/TestExpectations: Ditto.
6:07 AM Changeset in webkit [260181] by ysuzuki@apple.com
  • 54 edits
    14 adds in trunk

[JSC] Implement JSMapIterator/JSSetIterator with JSInternalFieldObjectImpl
https://bugs.webkit.org/show_bug.cgi?id=210023

Reviewed by Keith Miller.

JSTests:

  • stress/map-iteration-oas.js: Added.

(shouldBe):
(test):

  • stress/map-iterator-creation-fail-dfg.js: Added.

(shouldThrow):
(test2):
(test3):

  • stress/map-iterator-creation-fail.js: Added.

(shouldThrow):
(i.shouldThrow):
(test2):
(test3):

  • stress/set-iteration-oas.js: Added.

(shouldBe):

  • stress/set-iterator-creation-fail-dfg.js: Added.

(shouldThrow):
(set shouldThrow):

  • stress/set-iterator-creation-fail.js: Added.

(shouldThrow):
(i.shouldThrow):
(test2):
(test3):

Source/JavaScriptCore:

This patch reimplement JSMapIterator/JSSetIterator with JSInternalFieldObjectImpl.
This makes current JSFinalObject-based Map/SetIterator simple and small.
We generalize NewArrayIterator/PhantomNewArrayIterator to convert them to NewInternalFieldObject/PhantomNewInternalFieldObject
to support JSMapIterator/JSSetIterator too in DFG / FTL. This makes allocation efficient and object-allocation-sinking aware.

  • builtins/BuiltinNames.h:
  • builtins/MapIteratorPrototype.js:

(globalPrivate.mapIteratorNext):
(next):

  • builtins/MapPrototype.js:

(globalPrivate.MapIterator): Deleted.
(values): Deleted.
(keys): Deleted.
(entries): Deleted.

  • builtins/SetIteratorPrototype.js:

(globalPrivate.setIteratorNext):
(next):

  • builtins/SetPrototype.js:

(globalPrivate.SetIterator): Deleted.
(values): Deleted.
(entries): Deleted.

  • bytecode/BytecodeIntrinsicRegistry.cpp:

(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):

  • bytecode/BytecodeIntrinsicRegistry.h:
  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::emitIsMapIterator):
(JSC::BytecodeGenerator::emitIsSetIterator):

  • bytecompiler/NodesCodegen.cpp:

(JSC::mapIteratorInternalFieldIndex):
(JSC::setIteratorInternalFieldIndex):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_getMapIteratorInternalField):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_getSetIteratorInternalField):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_putMapIteratorInternalField):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_putSetIteratorInternalField):

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGClobbersExitState.cpp:

(JSC::DFG::clobbersExitState):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGMayExit.cpp:
  • dfg/DFGNode.h:

(JSC::DFG::Node::convertToPhantomNewInternalFieldObject):
(JSC::DFG::Node::hasStructure):
(JSC::DFG::Node::isPhantomAllocation):
(JSC::DFG::Node::convertToPhantomNewArrayIterator): Deleted.

  • dfg/DFGNodeType.h:
  • dfg/DFGObjectAllocationSinkingPhase.cpp:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewInternalFieldObjectImpl):
(JSC::DFG::SpeculativeJIT::compileNewGenerator):
(JSC::DFG::SpeculativeJIT::compileNewAsyncGenerator):
(JSC::DFG::SpeculativeJIT::compileNewInternalFieldObject):
(JSC::DFG::SpeculativeJIT::compileNewArrayIterator): Deleted.

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGStoreBarrierInsertionPhase.cpp:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileNewInternalFieldObjectImpl):
(JSC::FTL::DFG::LowerDFGToB3::compileNewGenerator):
(JSC::FTL::DFG::LowerDFGToB3::compileNewAsyncGenerator):
(JSC::FTL::DFG::LowerDFGToB3::compileNewInternalFieldObject):
(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewInternalFieldObject):
(JSC::FTL::DFG::LowerDFGToB3::compileNewArrayIterator): Deleted.

  • ftl/FTLOperations.cpp:

(JSC::FTL::operationPopulateObjectInOSR):
(JSC::FTL::operationMaterializeObjectInOSR):

  • inspector/JSInjectedScriptHost.cpp:

(Inspector::JSInjectedScriptHost::subtype):
(Inspector::JSInjectedScriptHost::getInternalProperties):
(Inspector::cloneMapIteratorObject):
(Inspector::cloneSetIteratorObject):
(Inspector::JSInjectedScriptHost::iteratorEntries):

  • runtime/CommonIdentifiers.h:
  • runtime/Intrinsic.cpp:

(JSC::intrinsicName):

  • runtime/Intrinsic.h:
  • runtime/JSArrayIterator.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::mapIteratorPrototype const):
(JSC::JSGlobalObject::setIteratorPrototype const):
(JSC::JSGlobalObject::mapIteratorStructure const):
(JSC::JSGlobalObject::setIteratorStructure const):

  • runtime/JSMapIterator.cpp:

(JSC::JSMapIterator::createWithInitialValues):
(JSC::JSMapIterator::finishCreation):
(JSC::JSMapIterator::visitChildren):

  • runtime/JSMapIterator.h:
  • runtime/JSSetIterator.cpp:

(JSC::JSSetIterator::createWithInitialValues):
(JSC::JSSetIterator::finishCreation):
(JSC::JSSetIterator::visitChildren):

  • runtime/JSSetIterator.h:
  • runtime/JSType.cpp:

(WTF::printInternal):

  • runtime/JSType.h:
  • runtime/JSTypedArrayViewPrototype.cpp:

(JSC::JSTypedArrayViewPrototype::finishCreation):

  • runtime/MapPrototype.cpp:

(JSC::MapPrototype::finishCreation):
(JSC::createMapIteratorObject):
(JSC::mapProtoFuncValues):
(JSC::mapProtoFuncKeys):
(JSC::mapProtoFuncEntries):

  • runtime/SetPrototype.cpp:

(JSC::SetPrototype::finishCreation):
(JSC::createSetIteratorObject):
(JSC::setProtoFuncValues):
(JSC::setProtoFuncEntries):

  • runtime/VM.cpp:

(JSC::VM::setIteratorStructureSlow): Deleted.
(JSC::VM::mapIteratorStructureSlow): Deleted.

  • runtime/VM.h:

(JSC::VM::setIteratorStructure): Deleted.
(JSC::VM::mapIteratorStructure): Deleted.

Source/WebCore:

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::serialize):

5:06 AM Changeset in webkit [260180] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Use ensureStillAliveHere in FTL when content of storage should be kept alive
https://bugs.webkit.org/show_bug.cgi?id=210583
<rdar://problem/61831515>

Reviewed by Mark Lam.

The content of Butterfly / ArrayStorage is kept alive only when the owner JSCell is alive.
This means that we should keep the owner JSCell alive if we are loading content of storage
which includes JSCells. This patch inserts ensureStillAliveHere in FTL to ensure this invariant.

  • ftl/FTLJITCode.cpp:

(JSC::FTL::JITCode::~JITCode): Found that we get crash with dumpDisassembly if FTL::JITCode is destroyed while it fails to generate code while testing this.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileArrayIndexOf):
(JSC::FTL::DFG::LowerDFGToB3::compileArrayPop):
(JSC::FTL::DFG::LowerDFGToB3::compileStringCharAt):
(JSC::FTL::DFG::LowerDFGToB3::compileStringCharCodeAt):
(JSC::FTL::DFG::LowerDFGToB3::compileStringCodePointAt):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileMultiGetByOffset):

4:46 AM WebKitGTK/2.28.x edited by berto@igalia.com
(diff)
4:46 AM WebKitGTK/2.28.x edited by berto@igalia.com
(diff)
4:45 AM Changeset in webkit [260179] by berto@igalia.com
  • 2 edits in trunk/Source/WTF

Unreviewed, set CeilingOnPageSize for MIPS64

This fixes a build failure ("Must set CeilingOnPageSize in
PageBlock.h").

  • wtf/PageBlock.h:
4:43 AM Changeset in webkit [260178] by Philippe Normand
  • 3 edits in trunk/Source/WebCore

Unreviewed, fix GStreamer build warnings.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::cdmInstanceDetached):

  • platform/graphics/gstreamer/mse/AppendPipeline.cpp:

(WebCore::AppendPipeline::handleErrorConditionFromStreamingThread):

4:39 AM Changeset in webkit [260177] by ddkilzer@apple.com
  • 5 edits in trunk/Source/WebKit

[IPC hardening] DrawingArea::updateBackingStoreState() is not used on Apple platforms
<https://webkit.org/b/210585>
<rdar://problem/61802011>

Reviewed by Geoffrey Garen.

  • UIProcess/DrawingAreaProxy.h:
  • UIProcess/DrawingAreaProxy.messages.in:
  • WebProcess/WebPage/DrawingArea.h:

(WebKit::DrawingArea::updateBackingStoreState):

  • WebProcess/WebPage/DrawingArea.messages.in:
Use USE(COORDINATED_GRAPHICS)
USE(TEXTURE_MAPPER) to

protect code not used on Apple platforms.

4:22 AM Changeset in webkit [260176] by clopez@igalia.com
  • 7 edits in trunk

[GTK] MiniBrowser opens new windows too small causing failures on some WPT tests
https://bugs.webkit.org/show_bug.cgi?id=210206

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Some WPT tests (when executed with the WPT runner via WebDriver)
open new browser windows via JavaScript invoking Window.open()
and then run the test on this new window.
The size of the new window is not specified, and we were failing
to provide a default window size, so it was using the minimum of
100x100 which its just too small for some test that later call
document.elementFromPoint() on some coordinates
that are outside of that size.

To fix that provide the size of the default GTK window to WebCore
if the application sets one via gtk_window_set_default_size().
And if not, then use the size of the previous window.

Also change the way we position the new window to work better when
the system uses more than one monitor. Previously to get the default
coordinates of the new window we were using gdk_display_get_monitor()
with just the first monitor available.
This causes issues in the calculation of the available space when
using several monitors. Instead get the monitor in use by looking
at the current GDK root window.

Tests: TestWebKitAPI/WebKit2Gtk/TestUIClient:/webkit/WebKitWebView/open-window-default-size
and TestWebKitAPI/WebKit2Gtk/TestUIClient:/webkit/WebKitWebView/open-window-no-default-size

  • loader/FrameLoader.cpp:

(WebCore::createWindow):

  • platform/gtk/PlatformScreenGtk.cpp:

(WebCore::getCurrentScreenMonitor):
(WebCore::screenRect):
(WebCore::screenAvailableRect):

Source/WebKit:

Provide the size of the default window (if is set) when windowRect is called
before the window is shown.

  • UIProcess/API/glib/WebKitUIClient.cpp:

Tools:

Add two API test to check that window.open() by default gets a size
request equal to the old window if there is no default window size,
or to the default window if there is a default window size.

A new function helper setCreateNewWebViewsInWindowsWithDefaultSize()
its added to create new webviews in new windows automatically, which
its needed to test the case of having a default window size.

  • TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:

(testWebViewWindowProperties):
(testWebViewOpenWindowDefaultSize):
(testWebViewOpenWindowNoDefaultSize):
(beforeAll):

2:19 AM Changeset in webkit [260175] by Carlos Garcia Campos
  • 2 edits in trunk

[GTK4] Disable netscape plugins API
https://bugs.webkit.org/show_bug.cgi?id=210552

Reviewed by Adrian Perez de Castro.

Because GTK4 is the future and NPAPI plugins the past.

  • Source/cmake/OptionsGTK.cmake:
12:11 AM Changeset in webkit [260174] by commit-queue@webkit.org
  • 8 edits in trunk/Source

TextureMapper renders video element with "object-fit: cover" incorrectly
https://bugs.webkit.org/show_bug.cgi?id=210544

Patch by Tomoki Imai <Tomoki Imai> on 2020-04-16
Reviewed by Žan Doberšek.

Propagate GraphicsLayer::contentsClippingRect information to TextureMapperLayer
to properly clip the outside of DOM element when the element has "object-fit: cover".

Unfortunately, the test is disabled on WebKitGTK due to bug 177536, bug 163528.
Test: compositing/video/video-object-fit.html

Source/WebCore:

  • platform/graphics/nicosia/NicosiaPlatformLayer.h:

(Nicosia::CompositionLayer::flushState):

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::paintSelf): Clip using propagated contentsClippingRect when rendering m_contentsLayer.
(WebCore::TextureMapperLayer::setContentsClippingRect):

  • platform/graphics/texmap/TextureMapperLayer.h:
  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::setContentsClippingRect):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:

Source/WebKit:

  • Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:

(WebKit::CoordinatedGraphicsScene::updateSceneState):

Note: See TracTimeline for information about the timeline view.