Timeline



Dec 11, 2018:

9:54 PM Changeset in webkit [239098] by justin_michaud@apple.com
  • 37 edits in trunk

Implement feature flag for CSS Typed OM
https://bugs.webkit.org/show_bug.cgi?id=192610

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:
  • bindings/js/JSTypedOMCSSStyleValueCustom.cpp:
  • css/typedom/StylePropertyMapReadOnly.h:
  • css/typedom/StylePropertyMapReadOnly.idl:
  • css/typedom/TypedOMCSSImageValue.h:
  • css/typedom/TypedOMCSSImageValue.idl:
  • css/typedom/TypedOMCSSNumericValue.h:
  • css/typedom/TypedOMCSSNumericValue.idl:
  • css/typedom/TypedOMCSSStyleValue.h:
  • css/typedom/TypedOMCSSStyleValue.idl:
  • css/typedom/TypedOMCSSUnitValue.h:
  • css/typedom/TypedOMCSSUnitValue.idl:
  • css/typedom/TypedOMCSSUnparsedValue.h:
  • css/typedom/TypedOMCSSUnparsedValue.idl:
  • features.json:
  • html/ImageBitmap.cpp:
  • html/ImageBitmap.h:
  • html/canvas/CanvasDrawImage.idl:
  • html/canvas/CanvasFillStrokeStyles.idl:
  • html/canvas/CanvasRenderingContext2DBase.cpp:
  • html/canvas/CanvasRenderingContext2DBase.h:
  • inspector/InspectorCanvas.cpp:

(WebCore::InspectorCanvas::buildAction):

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setCSSTypedOMEnabled):
(WebCore::RuntimeEnabledFeatures::cssTypedOMEnabled const):

  • page/WindowOrWorkerGlobalScope.idl:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:
  • Shared/WebPreferences.yaml:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
9:18 PM Changeset in webkit [239097] by Fujii Hironori
  • 2 edits in trunk/Source/WebKitLegacy

[Win][WebKitLegacy][Clang] WebKit.h warning: 'IWebEditingDelegate2::shouldInsertNode' hides overloaded virtual function [-Woverloaded-virtual]
https://bugs.webkit.org/show_bug.cgi?id=192581

Reviewed by Alex Christensen.

Conventionally, WebKit COM interface adds a new interface with
same name methods with the old interface. For example, both
IWebEditingDelegate and IWebEditingDelegate2 interfaces has
shouldInsertNode method.

This is a part of public API, can't be renamed.

  • PlatformWin.cmake: Added -Wno-overloaded-virtual compiler option

for WebKitLegacy

7:58 PM Changeset in webkit [239096] by rniwa@webkit.org
  • 4 edits
    2 adds in trunk

connectedCallback is invoked during the removal of the element inside another element's connectedCallback
https://bugs.webkit.org/show_bug.cgi?id=183586
<rdar://problem/38403504>

Reviewed by Frédéric Wang.

Source/WebCore:

Align WebKit's behavior with Chrome/Firefox with regards to https://github.com/w3c/webcomponents/issues/760

After much discussion, it's unclear that there is a clear path forward to fixing the oddness that
the presence of a custom element reaction changes the timing at which another reaction callback gets invoked.
So matching Chrome/Firefox behaviors in this case seems the path of the least resistance to interoperability.

Namely, this patch makes WebKit not insert a custom element to the appropriate element queue when the element
does not have a matching reaction callback. Put it another way, steps 3-5 in would be done before step 6 in:
https://html.spec.whatwg.org/multipage/custom-elements.html#enqueue-a-custom-element-callback-reaction

  1. Let definition be element's custom element definition.
  2. Let callback be the value of the entry in definition's lifecycle callbacks with key callbackName.
  3. If callback is null, then return
  4. If callbackName is "attributeChangedCallback", then:
    1. Let attributeName be the first element of args.
    2. If definition's observed attributes does not contain attributeName, then return.
  5. Add a new callback reaction to element's custom element reaction queue, with callback function callback and arguments args.
  6. Enqueue an element on the appropriate element queue given element.

Test: fast/custom-elements/enqueue-custom-element-callback-reactions-inside-another-callback.html

  • dom/CustomElementReactionQueue.cpp:

(WebCore::CustomElementReactionQueue::enqueueElementUpgrade):
(WebCore::CustomElementReactionQueue::enqueueConnectedCallbackIfNeeded):
(WebCore::CustomElementReactionQueue::enqueueDisconnectedCallbackIfNeeded):
(WebCore::CustomElementReactionQueue::enqueueAdoptedCallbackIfNeeded):
(WebCore::CustomElementReactionQueue::enqueueAttributeChangedCallbackIfNeeded):
(WebCore::CustomElementReactionQueue::enqueuePostUpgradeReactions):
(WebCore::CustomElementReactionQueue::enqueueElementOnAppropriateElementQueue): Renamed from ensureCurrentQueue.

  • dom/CustomElementReactionQueue.h:

LayoutTests:

Added a W3C style testharness test.

  • fast/custom-elements/enqueue-custom-element-callback-reactions-inside-another-callback-expected.txt: Added.
  • fast/custom-elements/enqueue-custom-element-callback-reactions-inside-another-callback.html: Added.
6:54 PM Changeset in webkit [239095] by Chris Dumez
  • 2 edits in trunk/Tools

Unreviewed, fix bad check in API test added in r239080.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
6:24 PM WPE edited by Michael Catanzaro
Fix capitalization (diff)
5:40 PM Changeset in webkit [239094] by justin_fan@apple.com
  • 29 edits
    9 copies
    3 adds in trunk

Source/WebCore:
[WebGPU] Implement WebGPUBuffer, and some nullibility consistency in WebGPU
https://bugs.webkit.org/show_bug.cgi?id=192516

Reviewed by Dean Jackson.

Test: webgpu/buffers.html

Enable basic creation of WebGPUBuffers, and fix nullability inconsitencies in WebGPU implementation.

Add necessary symbols and files for Web/GPUBuffer, Web/GPUBufferUsage, and Web/GPUBufferDescriptor:

  • CMakeLists.txt:
  • DerivedSources.make:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h:
  • Modules/webgpu/WebGPUBuffer.cpp: Added.

(WebCore::WebGPUBuffer::create):
(WebCore::WebGPUBuffer::WebGPUBuffer):

  • Modules/webgpu/WebGPUBuffer.h: Added.

(WebCore::WebGPUBuffer::mapping const):
(WebCore::WebGPUBuffer::unmap): Unimplemented stub, for now, as Metal equivalent is unclear.
(WebCore::WebGPUBuffer::destroy): Unimplemented stub.

  • Modules/webgpu/WebGPUBuffer.idl: Added.
  • Modules/webgpu/WebGPUBufferDescriptor.h: Added.
  • Modules/webgpu/WebGPUBufferDescriptor.idl: Added.
  • Modules/webgpu/WebGPUDevice.cpp:

(WebCore::WebGPUDevice::createBuffer const): Added.

  • platform/graphics/gpu/GPUBuffer.h:

(WebCore::GPUBuffer::platformBuffer const):
(WebCore::GPUBuffer::mapping const):

  • platform/graphics/gpu/GPUBufferDescriptor.h: Added.
  • platform/graphics/gpu/GPUDevice.cpp:

(WebCore::GPUDevice::createBuffer const): Added.

  • platform/graphics/gpu/GPUDevice.h:
  • platform/graphics/gpu/cocoa/GPUBufferMetal.mm: Added.

(WebCore::GPUBuffer::create): Attempt to create a page-aligned Gigacage to back the GPUBuffer's ArrayBuffer.
(WebCore::GPUBuffer::GPUBuffer):
(WebCore::GPUBuffer::~GPUBuffer): Dereference mapped ArrayBuffer first.

Small benign edits, most to make nullability more consistent in WebGPU classes:

  • Modules/webgpu/WebGPUCommandBuffer.cpp:

(WebCore::WebGPUCommandBuffer::create):
(WebCore::WebGPUCommandBuffer::beginRenderPass):

  • Modules/webgpu/WebGPUCommandBuffer.h:
  • Modules/webgpu/WebGPUDevice.cpp:

(WebCore::WebGPUDevice::create):
(WebCore::WebGPUDevice::WebGPUDevice):
(WebCore::WebGPUDevice::createShaderModule const):
(WebCore::WebGPUDevice::createRenderPipeline const):
(WebCore::WebGPUDevice::createCommandBuffer const):

  • Modules/webgpu/WebGPUDevice.h:

(WebCore::WebGPUDevice::device const):

  • Modules/webgpu/WebGPUDevice.idl:
  • Modules/webgpu/WebGPUQueue.cpp:

(WebCore::WebGPUQueue::create):

  • Modules/webgpu/WebGPURenderPassEncoder.cpp:

(WebCore::WebGPURenderPassEncoder::create):

  • Modules/webgpu/WebGPURenderPassEncoder.h:
  • Modules/webgpu/WebGPUShaderModule.cpp:

(WebCore::WebGPUShaderModule::create):
(WebCore::WebGPUShaderModule::WebGPUShaderModule):

  • Modules/webgpu/WebGPUShaderModule.h:

(WebCore::WebGPUShaderModule::module const):

  • Modules/webgpu/WebGPUSwapChain.idl: Sync with IDL changes.
  • Modules/webgpu/WebGPUTexture.cpp:

(WebCore::WebGPUTexture::create):
(WebCore::WebGPUTexture::createDefaultTextureView):

  • Modules/webgpu/WebGPUTextureView.cpp:

(WebCore::WebGPUTextureView::create):

  • Modules/webgpu/WebGPUTextureView.h:
  • platform/graphics/gpu/cocoa/GPUQueueMetal.mm:

(WebCore::GPUQueue::create):

  • platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:

(WebCore::GPURenderPipeline::create):

  • platform/graphics/gpu/cocoa/GPUShaderModuleMetal.mm:

(WebCore::GPUShaderModule::create):

  • platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm:

(WebCore::GPUSwapChain::setDevice):

  • platform/graphics/gpu/cocoa/GPUTextureMetal.mm:

(WebCore::GPUTexture::GPUTexture):

LayoutTests:
[WebGPU] Implement WebGPUBuffer
https://bugs.webkit.org/show_bug.cgi?id=192516

Reviewed by Dean Jackson.

Basic test to create a WebGPUBuffer and ensure that its memory is valid.

  • webgpu/buffers-expected.txt: Added.
  • webgpu/buffers.html: Added.
5:34 PM Changeset in webkit [239093] by Fujii Hironori
  • 4 edits in trunk/Source/WTF

[Win][Clang] Fix compilation warnings of WTF
https://bugs.webkit.org/show_bug.cgi?id=192583

Reviewed by Alex Christensen.

clang-cl reports the following warnings.

[92/206] Building CXX object Source\WTF\wtf\CMakeFiles\WTF.dir\StackBounds.cpp.obj
..\..\Source\WTF\wtf\StackBounds.cpp(163,48): warning: missing field 'AllocationBase' initializer [-Wmissing-field-initializers]

MEMORY_BASIC_INFORMATION stackOrigin = { 0 };


1 warning generated.
[160/206] Building CXX object Source\WTF\wtf\CMakeFiles\WTF.dir\win\RunLoopWin.cpp.obj
..\..\Source\WTF\wtf\win\RunLoopWin.cpp(34,54): warning: ISO C++11 does not allow conversion from string literal to 'const LPWSTR' (aka 'wchar_t *const') [-Wwritable-strings]
static const LPWSTR kRunLoopMessageWindowClassName = L"RunLoopMessageWindow";


..\..\Source\WTF\wtf\win\RunLoopWin.cpp(86,32): warning: missing field 'lpfnWndProc' initializer [-Wmissing-field-initializers]

WNDCLASS windowClass = { 0 };


2 warnings generated.
[175/206] Building CXX object Source\WTF\wtf\CMakeFiles\WTF.dir\DateMath.cpp.obj
..\..\Source\WTF\wtf\DateMath.cpp(125,20): warning: unused function 'getLocalTime' [-Wunused-function]
static inline void getLocalTime(const time_t* localTime, struct tm* localTM)


1 warning generated.

  • wtf/DateMath.cpp:

(WTF::getLocalTime): Defined only if used.

  • wtf/StackBounds.cpp:

(WTF::StackBounds::currentThreadStackBoundsInternal): Initialize stackOrigin with '{ }'.

  • wtf/win/RunLoopWin.cpp: Change the type of kRunLoopMessageWindowClassName to LPCWSTR.

(WTF::RunLoop::registerRunLoopMessageWindowClass): Initialize windowClass with '{ }'.

5:15 PM Changeset in webkit [239092] by Fujii Hironori
  • 26 edits in trunk

[Win][Clang] Fix warning -Wmissing-field-initializers
https://bugs.webkit.org/show_bug.cgi?id=192584

Reviewed by Yusuke Suzuki.

Initialize a struct with '{ }' instead of '= {0}'.

Source/WebCore:

No new tests, no behavior changes.

  • platform/graphics/win/FontCacheWin.cpp:

(WebCore::FontCache::lastResortFallbackFont):

  • platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:

(WebCore::MediaPlayerPrivateFullscreenWindow::createWindow):

  • platform/win/ClipboardUtilitiesWin.cpp:

(WebCore::setFileDescriptorData):
(WebCore::setFileContentData):
(WebCore::setUCharData):
(WebCore::setUtf8Data):
(WebCore::setCFData):

  • platform/win/CursorWin.cpp:

(WebCore::createSharedCursor):

  • platform/win/DefWndProcWindowClass.cpp:

(WebCore::registerClass):

  • platform/win/DragImageWin.cpp:

(WebCore::createDragImageIconForCachedImageFilename):

  • platform/win/PasteboardWin.cpp:

(WebCore::writeURL):
(WebCore::Pasteboard::writeString):
(WebCore::Pasteboard::writeRangeToDataObject):
(WebCore::Pasteboard::writePlainTextToDataObject):
(WebCore::writeFileToDataObject):
(WebCore::Pasteboard::writeMarkup):

  • platform/win/PopupMenuWin.cpp:

(WebCore::PopupMenuWin::show):

  • platform/win/SSLKeyGeneratorWin.cpp:

(WebCore::WebCore::signedPublicKeyAndChallengeString):

Source/WebKit:

  • UIProcess/Launcher/win/ProcessLauncherWin.cpp:

(WebKit::ProcessLauncher::launchProcess):

  • UIProcess/win/WebPopupMenuProxyWin.cpp:

(WebKit::WebPopupMenuProxyWin::showPopupMenu):

  • UIProcess/win/WebView.cpp:

(WebKit::WebView::initializeToolTipWindow):
(WebKit::WebView::setToolTip):

Source/WebKitLegacy/win:

  • WebKitMessageLoop.cpp:

(WebKitMessageLoop::run):

  • WebView.cpp:

(WebView::onMenuCommand):
(WebView::gesture):
(WebView::setShouldInvertColors):
(WebView::initializeToolTipWindow):
(WebView::setToolTip):
(WebView::fullScreenClientForceRepaint):

Tools:

  • DumpRenderTree/win/DumpRenderTree.cpp:

(runTest):

  • DumpRenderTree/win/EventSender.cpp:

(makeMsg):
(replaySavedEvents):
(beginDragWithFilesCallback):

  • DumpRenderTree/win/PixelDumpSupportWin.cpp:

(createBitmapContextFromWebView):

  • MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:

(updateMenuItemForHistoryItem):

  • MiniBrowser/win/WinMain.cpp:

(wWinMain):

  • TestWebKitAPI/win/HostWindow.cpp:

(TestWebKitAPI::HostWindow::clientRect const):
(TestWebKitAPI::HostWindow::registerWindowClass):

  • TestWebKitAPI/win/PlatformWebViewWin.cpp:

(TestWebKitAPI::PlatformWebView::registerWindowClass):

  • WebKitTestRunner/win/PlatformWebViewWin.cpp:

(WTR::registerWindowClass):
(WTR::PlatformWebView::windowFrame):
(WTR::PlatformWebView::windowSnapshotImage):

4:18 PM Changeset in webkit [239091] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Globally namespaced objects shouldn't use framework-prefixed names
https://bugs.webkit.org/show_bug.cgi?id=192600

Reviewed by Eric Carlson.

Rename CMSampleBufferIs... -> isCMSampleBuffer...

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

(WebCore::isCMSampleBufferRandomAccess):
(WebCore::isCMSampleBufferNonDisplaying):
(WebCore::MediaSampleAVFObjC::flags const):
(WebCore::CMSampleBufferIsRandomAccess): Deleted.
(WebCore::CMSampleBufferIsNonDisplaying): Deleted.

2:34 PM Changeset in webkit [239090] by bfulgham@apple.com
  • 3 edits
    2 adds in trunk

Don't attempt to compute animated values when there is no relevant animation
https://bugs.webkit.org/show_bug.cgi?id=192591
<rdar://problem/34336946>

Reviewed by Dean Jackson.

Source/WebCore:

Check if the property is supposed to be animated, or has animatable features, before
attempting to calculate the current animated value.

Test: svg/animations/avoid-calculating-for-non-animating-elements.html

  • svg/SVGAnimateElementBase.cpp:

(WebCore::SVGAnimateElementBase::calculateAnimatedValue):

LayoutTests:

  • svg/animations/avoid-calculating-for-non-animating-elements-expected.txt: Added.
  • svg/animations/avoid-calculating-for-non-animating-elements.html: Added.
2:00 PM Changeset in webkit [239089] by Chris Dumez
  • 5 edits in trunk

Unreviewed, fix typos in console log from r239087.

Source/WebCore:

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::addEventListener):

LayoutTests:

  • http/tests/events/device-orientation-motion-non-secure-context.html:
  • platform/ios/http/tests/events/device-orientation-motion-non-secure-context-expected.txt:
1:54 PM Changeset in webkit [239088] by timothy_horton@apple.com
  • 6 edits in trunk/Source

WebCore shouldn't have a Objective-C class named NSCursor
https://bugs.webkit.org/show_bug.cgi?id=192602
<rdar://problem/46615532>

Reviewed by Wenson Hsieh.

Source/WebCore:

  • platform/ios/wak/WAKAppKitStubs.h:
  • platform/ios/wak/WAKAppKitStubs.m:

(+[NSCursor setHiddenUntilMouseMoves:]): Deleted.
Get rid of the class.
Also remove a comment that seems to have detached from wherever it's supposed to be.

Source/WebKitLegacy/mac:

  • WebView/WebFrameView.mm:

(-[WebFrameView keyDown:keyDown:]):

  • WebView/WebHTMLView.mm:

(-[WebHTMLView keyDown:]):
(-[WebHTMLView performKeyEquivalent:]):
Only use NSCursor on macOS.

1:49 PM Changeset in webkit [239087] by Chris Dumez
  • 7 edits
    7 adds in trunk

Restrict DeviceMotion / DeviceOrientation APIs to secure contexts
https://bugs.webkit.org/show_bug.cgi?id=192595
<rdar://problem/46382603>

Reviewed by Dean Jackson.

Source/WebCore:

Tests: http/tests/events/device-orientation-motion-non-secure-context.html

http/tests/events/device-orientation-motion-secure-context.html

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::addEventListener):

  • page/SecurityOrigin.h:

(WebCore::SecurityOrigin::setIsPotentiallyTrustworthy):

  • testing/Internals.cpp:

(WebCore::Internals::markContextAsInsecure):
(WebCore::Internals::postTask):

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

LayoutTests:

Add layout test coverage. Note however that we currently do not have mock data providers
for these APIs.

  • http/tests/events/device-orientation-motion-non-secure-context-expected.txt: Added.
  • http/tests/events/device-orientation-motion-non-secure-context.html: Added.
  • http/tests/events/device-orientation-motion-secure-context-expected.txt: Added.
  • http/tests/events/device-orientation-motion-secure-context.html: Added.
  • platform/ios/http/tests/events/device-orientation-motion-non-secure-context-expected.txt: Added.
  • platform/ios/http/tests/events/device-orientation-motion-secure-context-expected.txt: Added.
1:13 PM Changeset in webkit [239086] by wenson_hsieh@apple.com
  • 7 edits in trunk/Source/WebCore

[iOS] Send the full list of file upload URLs and types in PasteboardItemInfo
https://bugs.webkit.org/show_bug.cgi?id=192598
Work towards <rdar://problem/35626913>

Reviewed by Tim Horton.

Refactors PasteboardItemInfo to contain lists of file URLs and corresponding pasteboard types, instead of just
a "preferred" file upload URL and type. See below for more details.

  • platform/PasteboardItemInfo.h:

(WebCore::PasteboardItemInfo::pathForContentType const):

Add a helper method to find a file upload URL corresponding to a given type.

(WebCore::PasteboardItemInfo::encode const):
(WebCore::PasteboardItemInfo::decode):

Change pathForFileUpload to pathsForFileUpload, and contentTypeForFileUpload to contentTypesForFileUpload.

  • platform/ios/AbstractPasteboard.h:
  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::readRespectingUTIFidelities):

Adjust this to take the file path for the highest fidelity representation in pathsForContentType.

(WebCore::Pasteboard::readFilePaths):

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::informationForItemAtIndex):

  • platform/ios/WebItemProviderPasteboard.h:
  • platform/ios/WebItemProviderPasteboard.mm:

(-[NSItemProvider web_containsFileURLAndFileUploadContent]):
(-[NSItemProvider web_fileUploadContentTypes]):

Replace web_containsFileUploadContent with web_fileUploadContentTypes, which returns the full list of file
upload content types (rather than just a BOOL indicating whether one or more of these types exist).

(-[WebItemProviderPasteboard fileUploadURLsAtIndex:fileTypes:]):
(-[WebItemProviderPasteboard numberOfFiles]):
(-[NSItemProvider web_containsFileUploadContent]): Deleted.
(-[WebItemProviderPasteboard preferredFileUploadURLAtIndex:fileType:]): Deleted.

Replaced with -fileUploadURLsAtIndex:fileTypes:. This implementation currently just returns the highest
fidelity loaded type identifier, but this is wrong because it doesn't take into account inline data types that
shouldn't be represented as data for file uploads (for instance, it never makes sense to upload the internal
data serialization for an NSURL as a file on the web).

Instead, use existing logic in web_fileUploadContentTypes to determine which file types can be treated as file
uploads, and return all of these file types that we've loaded.

1:12 PM Changeset in webkit [239085] by Alan Coon
  • 4 edits
    1 copy
    1 add in branches/safari-606-branch

Cherry-pick r238877. rdar://problem/45997440

Don't report resource timing to parent frame for history items
https://bugs.webkit.org/show_bug.cgi?id=192273
<rdar://problem/45163764>

Reviewed by Youenn Fablet.

Source/WebCore:

We should not report history items to its parent frame as those are less
interested to its parent and might not be the first navigation in the iframes.

This change aligns the behavior when a cached document is not available for the
history item with the available case as we don't report resource timing for any
cached main document.

Test: http/tests/misc/resource-timing-navigation-in-restored-iframe-2.html

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::loadDifferentDocumentItem):

LayoutTests:

  • http/tests/misc/resource-timing-navigation-in-restored-iframe-2-expected.txt: Added.
  • http/tests/misc/resource-timing-navigation-in-restored-iframe-2.html: Copied from LayoutTests/http/tests/misc/resource-timing-navigation-in-restored-iframe.html.
  • http/tests/misc/resource-timing-navigation-in-restored-iframe.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238877 268f45cc-cd09-0410-ab3c-d52691b4dbfc

1:12 PM Changeset in webkit [239084] by Alan Coon
  • 3 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r238582. rdar://problem/46085283

Refactor duplicate code for calling into media controls
https://bugs.webkit.org/show_bug.cgi?id=192040
<rdar://problem/46278931>

Reviewed by Youenn Fablet.

No new tests, no functional change.

  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setupAndCallJS): (WebCore::HTMLMediaElement::updateCaptionContainer): (WebCore::HTMLMediaElement::configureTextTrackDisplay): (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript): (WebCore::HTMLMediaElement::setControllerJSProperty): (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): (WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange): (WebCore::HTMLMediaElement::getCurrentMediaControlsStatus):
  • html/HTMLMediaElement.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238582 268f45cc-cd09-0410-ab3c-d52691b4dbfc

1:12 PM Changeset in webkit [239083] by Alan Coon
  • 3 edits in branches/safari-606-branch/Source/WebCore

Cherry-pick r238232. rdar://problem/46085281

Modernize RTCPeerConnection handling of pendingActivity
https://bugs.webkit.org/show_bug.cgi?id=191661

Reviewed by Eric Carlson.

makePendingActivity is the modern way to handle set/unset of pending activity.
No change of behavior.

  • Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::create): (WebCore::RTCPeerConnection::doStop):
  • Modules/mediastream/RTCPeerConnection.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238232 268f45cc-cd09-0410-ab3c-d52691b4dbfc

1:12 PM Changeset in webkit [239082] by Alan Coon
  • 1 edit in branches/safari-606-branch/Source/ThirdParty/libwebrtc/Source/webrtc/modules/rtp_rtcp/source/ulpfec_receiver_impl.cc

Apply patch. rdar://problem/46603462

12:25 PM Changeset in webkit [239081] by don.olmstead@sony.com
  • 4 edits in trunk/Source/WebCore

Resource Load Statistics: Use common implementation within NetworkStorageSession
https://bugs.webkit.org/show_bug.cgi?id=192592

Reviewed by Alex Christensen.

There's nothing within the resource load statistics implementation contained
in NetworkStorageSessionCFNet that was CF specific. All of the resource load
statistics methods are moved from that file to the root NetworkStorageSession
implementation.

  • platform/network/NetworkStorageSession.cpp:

(WebCore::getPartitioningDomain):
(WebCore::NetworkStorageSession::shouldBlockThirdPartyCookies const):
(WebCore::NetworkStorageSession::shouldBlockCookies const):
(WebCore::NetworkStorageSession::maxAgeCacheCap):
(WebCore::NetworkStorageSession::setAgeCapForClientSideCookies):
(WebCore::NetworkStorageSession::setPrevalentDomainsToBlockCookiesFor):
(WebCore::NetworkStorageSession::removePrevalentDomains):
(WebCore::NetworkStorageSession::hasStorageAccess const):
(WebCore::NetworkStorageSession::getAllStorageAccessEntries const):
(WebCore::NetworkStorageSession::grantStorageAccess):
(WebCore::NetworkStorageSession::removeStorageAccessForFrame):
(WebCore::NetworkStorageSession::removeStorageAccessForAllFramesOnPage):
(WebCore::NetworkStorageSession::removeAllStorageAccess):
(WebCore::NetworkStorageSession::setCacheMaxAgeCapForPrevalentResources):
(WebCore::NetworkStorageSession::resetCacheMaxAgeCapForPrevalentResources):

  • platform/network/NetworkStorageSession.h:
  • platform/network/cf/NetworkStorageSessionCFNet.cpp:

(WebCore::getPartitioningDomain): Deleted.
(WebCore::NetworkStorageSession::shouldBlockThirdPartyCookies const): Deleted.
(WebCore::NetworkStorageSession::shouldBlockCookies const): Deleted.
(WebCore::NetworkStorageSession::maxAgeCacheCap): Deleted.
(WebCore::NetworkStorageSession::setAgeCapForClientSideCookies): Deleted.
(WebCore::NetworkStorageSession::setPrevalentDomainsToBlockCookiesFor): Deleted.
(WebCore::NetworkStorageSession::removePrevalentDomains): Deleted.
(WebCore::NetworkStorageSession::hasStorageAccess const): Deleted.
(WebCore::NetworkStorageSession::getAllStorageAccessEntries const): Deleted.
(WebCore::NetworkStorageSession::grantStorageAccess): Deleted.
(WebCore::NetworkStorageSession::removeStorageAccessForFrame): Deleted.
(WebCore::NetworkStorageSession::removeStorageAccessForAllFramesOnPage): Deleted.
(WebCore::NetworkStorageSession::removeAllStorageAccess): Deleted.
(WebCore::NetworkStorageSession::setCacheMaxAgeCapForPrevalentResources): Deleted.
(WebCore::NetworkStorageSession::resetCacheMaxAgeCapForPrevalentResources): Deleted.

12:24 PM Changeset in webkit [239080] by Chris Dumez
  • 12 edits in trunk

PSON logic gets confused by concurrent decidePolicyForNavigationAction requests
https://bugs.webkit.org/show_bug.cgi?id=192482
<rdar://problem/46470145>

Reviewed by Antti Koivisto.

Source/WebKit:

It is possible to get 2 parallel decidePolicyForNavigationAction() requests from the
WebProcess when a new load is started before responding to the existing policy
decision. This would lead to several issues with regards to PSON:

  • We would decide to swap for the first policy decision and tell the WebProcess to suspend. However, because the WebProcess issued a new decidePolicyForNavigationAction since for the same frame, the previous one is invalidated and the WebProcess would ignore our request to suspend.
  • We would hit assertions later on because the navigation has been destroyed and yet we're getting a didStartProvisionalLoad for it.
  • swapToWebProcess() was asynchronous so that it would wait for the destination SuspendedPage to finish suspending before asking it to unsuspend. This led to various problems because anything can happen in the UIProcess while we're waiting for the suspension (e.g. another load). Also, we may create the SuspendedPageProxy for the current page too late and start getting IPC from the previous process about the suspension load to about:blank.

To address these issues, the following design is now implemented:

  • swapToWebProcess() is no longer asynchronous
  • instead, WebProcessPool::processForNavigation() is now asynchronous. This is better because at this point we have not yet told the WebProcess about the policy decision. We already properly deal with the policy decision being made asynchronously. This also allows us to choose another process if the SuspendedPage we'd like to use failed to suspend.
  • If the WebProcess receives a PolicyAction::Suspend but ignores it, have it send an IPC to the UIProcess so that the SuspendedPageProxy knows about it. We then destroy the SuspendedPageProxy and make sure it is not used.
  • After the asynchronous process selection, if the navigation has been destroy, abort the process-swap to avoid hitting assertions later on due to doing a load for a destroyed navigation.
  • UIProcess/SuspendedPageProxy.cpp:

(WebKit::SuspendedPageProxy::~SuspendedPageProxy):
Make sure m_whenReadyToConsume completion handler gets called if necessary if the
SuspendedPageProxy gets destroyed. We pass null so that the SuspendedPage is not
used.

(WebKit::SuspendedPageProxy::whenReadyToConsume):
Add whenReadyToConsume() utility method to get a completion handler called when
the SuspendedPageProxy is ready to be used. This basically means we have to wait
for the page to finish its about:blank suspension load. If the suspension fails
then we call the completion handler with null to indicate that the suspended
page is not usable.

(WebKit::SuspendedPageProxy::unsuspendAndConsume):
Rename unsuspend() to unsuspendAndConsume() and make it synchronous. This only gets
called after whenReadyToConsume()'s completion handler has been called and if we
do decide to use the SuspendedPageProxy. It tells the WebProcess to unsuspend and
removes the SuspendedPageProxy from the WebProcessPool.

(WebKit::SuspendedPageProxy::didFinishLoad):
rename m_finishedSuspendingHandler to m_whenReadyToConsume.

(WebKit::SuspendedPageProxy::didFailToSuspend):
Add new didFailToSuspend() that gets called when the WebProcess sends us an IPC telling
us it ignored our request to suspend. We then call m_whenReadyToConsume completion
handler with null and destroy the SuspendedPageProxy.

(WebKit::SuspendedPageProxy::didReceiveMessage):

  • UIProcess/SuspendedPageProxy.h:
  • UIProcess/WebNavigationState.h:

(WebKit::WebNavigationState::hasNavigation const):
Add utility function to query if a navigation is still valid.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::swapToWebProcess):
Update method so that it is no longer asynchronous. Some of its code was also moved to
continueNavigationInNewProcess() for clarity.

(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
Deal with WebProcessPool::processForNavigation() now being asynchronous.

(WebKit::WebPageProxy::continueNavigationInNewProcess):
Update code now that swapToWebProcess() is no longer asynchronous. Some of the swapToWebProcess()
code was also moved here for clarity.

(WebKit::WebPageProxy::didFailToSuspendAfterProcessSwap):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:

Add new DidFailToSuspendAfterProcessSwap IPC message.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::processForNavigation):
(WebKit::WebProcessPool::processForNavigationInternal):

  • UIProcess/WebProcessPool.h:

Make asynchronous. If we decide to use a SuspendedPageProxy's process, then call
whenReadyToConsume() on it to wait for it to suspend. If the SuspendedPageProxy
fails to suspend use a new process instead.

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::didReceivePolicyDecision):
If we ignore the policy decision and the decision was "Suspend", send the DidFailToSuspendAfterProcessSwap
IPC to the UIProcess so that the SuspendedPageProxy knows about it.

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
11:27 AM Changeset in webkit [239079] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

Web Inspector: overlay bounds rulers don't match element when page is scrolled
https://bugs.webkit.org/show_bug.cgi?id=192577

Reviewed by Joseph Pecoraro.

When drawing the highlight for a node, the canvas is translated based on the scroll position
of the node. This translation was not applied to the bounds calculations, which meant that
the bounds always drew where the node would have been if it wasn't scrolled.

  • inspector/InspectorOverlayPage.js:

(Bounds.prototype.get minX):
(Bounds.prototype.get minY):
(Bounds.prototype.get maxX):
(Bounds.prototype.get maxY):
(Bounds.prototype.offset): Added.
(drawNodeHighlight):
Drive-by: draw bounds for every node being highlighted instead of just the first one.
Drive-by: switch the bounds color to be a semi-transparent red for more visibility/contrast.

11:21 AM Changeset in webkit [239078] by aestes@apple.com
  • 38 edits in trunk

Introduce makeBlockPtr for lambdas
https://bugs.webkit.org/show_bug.cgi?id=192594

Reviewed by Alex Christensen.

Source/WebCore:

Adopted makeBlockPtr.

  • platform/cocoa/FileMonitorCocoa.mm:

(WebCore::FileMonitor::FileMonitor):

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

(WebCore::VideoFullscreenLayerManagerObjC::setVideoFullscreenLayer):

  • platform/graphics/gpu/legacy/cocoa/GPULegacyCommandBufferMetal.mm:

(WebCore::GPULegacyCommandBuffer::GPULegacyCommandBuffer):

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(-[WebCoreNSURLSession addDelegateOperation:]):
(-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:completionHandler:]):

  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:

(-[WebCoreResourceHandleAsOperationQueueDelegate callFunctionOnMainThread:]):

Source/WebCore/PAL:

Adopted makeBlockPtr.

  • pal/Logging.cpp:

(PAL::registerNotifyCallback):

Source/WebKit:

Adopted makeBlockPtr.

  • NetworkProcess/Downloads/cocoa/WKDownloadProgress.mm:

(-[WKDownloadProgress initWithDownloadTask:download:URL:sandboxExtension:]):

  • NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:

(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::write):

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::clearDiskCache):
(WebKit::saveCookies):

  • NetworkProcess/watchos/NetworkProximityAssertion.mm:

(WebKit::BluetoothProximityAssertion::suspend):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setInputDelegate:]):

  • UIProcess/API/mac/WKView.mm:

(-[WKView maybeInstallIconLoadingClient]):

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
(WebKit::WebPaymentCoordinatorProxy::platformOpenPaymentSetup):

  • UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:

(WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):

  • UIProcess/Cocoa/AutomationSessionClient.mm:

(WebKit::AutomationSessionClient::requestNewPageWithOptions):
(WebKit::AutomationSessionClient::requestSwitchToPage):
(WebKit::AutomationSessionClient::requestHideWindowOfPage):
(WebKit::AutomationSessionClient::requestRestoreWindowOfPage):
(WebKit::AutomationSessionClient::requestMaximizeWindowOfPage):

  • UIProcess/Cocoa/DownloadClient.mm:

(WebKit::DownloadClient::didReceiveAuthenticationChallenge):
(WebKit::DownloadClient::decideDestinationWithSuggestedFilename):

  • UIProcess/Cocoa/IconLoadingDelegate.mm:

(WebKit::IconLoadingDelegate::IconLoadingClient::getLoadDecisionForIcon):

  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::NavigationClient::decidePolicyForPluginLoad):
(WebKit::NavigationState::NavigationClient::webGLLoadPolicy const):
(WebKit::NavigationState::NavigationClient::resolveWebGLLoadPolicy const):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
(WebKit::NavigationState::NavigationClient::didReceiveAuthenticationChallenge):

  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
(WebKit::UIDelegate::UIClient::createNewPage):
(WebKit::UIDelegate::UIClient::runJavaScriptAlert):
(WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
(WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
(WebKit::UIDelegate::UIClient::requestStorageAccessConfirm):
(WebKit::UIDelegate::UIClient::decidePolicyForGeolocationPermissionRequest):
(WebKit::UIDelegate::UIClient::runBeforeUnloadConfirmPanel):
(WebKit::UIDelegate::UIClient::exceededDatabaseQuota):
(WebKit::UIDelegate::UIClient::windowFrame):
(WebKit::UIDelegate::UIClient::toolbarsAreVisible):
(WebKit::UIDelegate::UIClient::decidePolicyForNotificationPermissionRequest):
(WebKit::UIDelegate::UIClient::runOpenPanel):
(WebKit::requestUserMediaAuthorizationForDevices):
(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
(WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin):
(WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota):
(WebKit::UIDelegate::UIClient::requestPointerLock):

  • UIProcess/Cocoa/WKSafeBrowsingWarning.mm:

(-[WKSafeBrowsingWarning clickedOnLink:]):

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::beginSafeBrowsingCheck):

  • UIProcess/WebAuthentication/Cocoa/HidConnection.mm:

(WebKit::HidConnection::send):

  • UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:

(WebKit::LocalConnection::getUserConsent const):
(WebKit::LocalConnection::getAttestation const):

  • UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:

(WebKit::MockHidConnection::send):

  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::requestPasswordForQuickLookDocument):

  • UIProcess/ios/WKGeolocationProviderIOS.mm:

(-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):

  • UIProcess/mac/ServicesController.mm:

(WebKit::hasCompatibleServicesForItems):
(WebKit::ServicesController::refreshExistingServices):

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(PageLoaderClient::didStartProvisionalLoadForFrame):

Source/WTF:

BlockPtr<...>::fromCallable is cumbersome because it requires repeating the callable's
signature as a class template argument. This patch introduces an overload of makeBlockPtr
that deduces the correct BlockPtr instantiation from a lambda's operator() signature.

  • wtf/BlockPtr.h:

(WTF::makeBlockPtr):

Adopted makeBlockPtr.

  • wtf/cocoa/WorkQueueCocoa.cpp:

(WTF::WorkQueue::dispatch):
(WTF::WorkQueue::dispatchAfter):
(WTF::WorkQueue::concurrentApply):

Tools:

Adopted makeBlockPtr and added API tests.

  • DumpRenderTree/TestRunner.cpp:

(TestRunner::callUIScriptCallback):

  • TestWebKitAPI/Tests/WTF/BlockPtr.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm:

(-[DownloadProgressTestRunner init]):
(-[DownloadProgressTestRunner subscribeAndWaitForProgress]):

11:10 AM Changeset in webkit [239077] by Chris Dumez
  • 2 edits in trunk/Tools

REGRESSION (r238764-238783): TestWTF.WTF.StringOperators is failing
https://bugs.webkit.org/show_bug.cgi?id=192361
<rdar://problem/46524903>

Reviewed by Alex Christensen.

Compile StringOperators.cpp with -O1 optimization level instead of -Os. This
fixes the failures for me locally.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
10:45 AM Changeset in webkit [239076] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix an internal build failure after r239014
https://bugs.webkit.org/show_bug.cgi?id=192205

  • UIProcess/Cocoa/WKSafeBrowsingWarning.mm:

(fontOfSize):
There's a system that doesn't have safe browsing or UIFontTextStyleLargeTitle.

10:12 AM Changeset in webkit [239075] by mark.lam@apple.com
  • 17 edits
    1 copy in branches/safari-606-branch

Cherry-pick r239062. rdar://problem/46603464

2018-12-10 Mark Lam <mark.lam@apple.com>

PropertyAttribute needs a CustomValue bit.
https://bugs.webkit.org/show_bug.cgi?id=191993
<rdar://problem/46264467>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-191993.js: Added.

Source/JavaScriptCore:

This is because GetByIdStatus needs to distinguish CustomValue properties from
other types, and its only means of doing so is via the property's attributes.
Previously, there's nothing in the property's attributes that can indicate that
the property is a CustomValue.

We fix this by doing the following:

  1. Added a PropertyAttribute::CustomValue bit.
  2. Added a PropertyAttribute::CustomAccessorOrValue convenience bit mask that is CustomAccessor | CustomValue.
  1. Since CustomGetterSetter properties are only set via JSObject::putDirectCustomAccessor(), we added a check in JSObject::putDirectCustomAccessor() to see if the attributes bits include PropertyAttribute::CustomAccessor. If not, then the property must be a CustomValue, and we'll add the PropertyAttribute::CustomValue bit to the attributes bits.

This ensures that the property attributes is sufficient to tell us if the
property contains a CustomGetterSetter.

  1. Updated all checks for PropertyAttribute::CustomAccessor to check for PropertyAttribute::CustomAccessorOrValue instead if their intent is to check for the presence of a CustomGetterSetter as opposed to checking specifically for one that is used as a CustomAccessor.

This includes all the Structure transition code that needs to capture the
attributes change when a CustomValue has been added.

  1. Filtered out the PropertyAttribute::CustomValue bit in PropertyDescriptor. The fact that we're using a CustomGetterSetter as a CustomValue should remain invisible to the descriptor. This is because the descriptor should describe a CustomValue no differently from a plain value.
  1. Added some asserts to ensure that property attributes are as expected, and to document some invariants.
  • bytecode/GetByIdStatus.cpp: (JSC::GetByIdStatus::computeFromLLInt): (JSC::GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback): (JSC::GetByIdStatus::computeFor):
  • bytecode/InByIdStatus.cpp: (JSC::InByIdStatus::computeForStubInfoWithoutExitSiteFeedback):
  • bytecode/PropertyCondition.cpp: (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const):
  • bytecode/PutByIdStatus.cpp: (JSC::PutByIdStatus::computeFor):
  • runtime/JSFunction.cpp: (JSC::getCalculatedDisplayName):
  • runtime/JSObject.cpp: (JSC::JSObject::putDirectCustomAccessor): (JSC::JSObject::putDirectNonIndexAccessor): (JSC::JSObject::putDirectIndexSlowOrBeyondVectorLength):
  • runtime/JSObject.h: (JSC::JSObject::putDirectIndex): (JSC::JSObject::fillCustomGetterPropertySlot): (JSC::JSObject::putDirect):
  • runtime/JSObjectInlines.h: (JSC::JSObject::putDirectInternal):
  • runtime/PropertyDescriptor.cpp: (JSC::PropertyDescriptor::setDescriptor): (JSC::PropertyDescriptor::setCustomDescriptor): (JSC::PropertyDescriptor::setAccessorDescriptor):
  • runtime/PropertySlot.h: (JSC::PropertySlot::setCustomGetterSetter):

Source/WebCore:

This patch revealed a bug in the CodeGenerator where a constructor property is
set with a ReadOnly attribute. This conflicts with the WebIDL link (see clause
12 in https://heycam.github.io/webidl/#interface-prototype-object) which states
that it should be [Writable]. The ReadOnly attribute is now removed.

On the WebCore side, this change is covered by existing tests.

  • bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation):
  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
9:39 AM Changeset in webkit [239074] by Brian Burg
  • 2 edits in trunk/Source/WebKit

SimulatedInputDispatcher::transitionInputSourceToState() can reuse a moved-from completion handler
https://bugs.webkit.org/show_bug.cgi?id=191155
<rdar://problem/45745569>

Reviewed by Joseph Pecoraro.

  • UIProcess/Automation/SimulatedInputDispatcher.cpp:

(WebKit::SimulatedInputDispatcher::transitionInputSourceToState):
Add an ASSERT to guard against unexpected inputs where >1 VirtualKey changes per state.
webkitdriver needs to be updated to not produce such states in this scenario, but this will
avoid a runtime crash caused by trying to call a moved-out completion handler a second time.

7:14 AM Changeset in webkit [239073] by Philippe Normand
  • 2 edits in trunk/Tools

Unreviewed, WPE build fix after r239028

The FLATPAK_USER_DIR env var is not set early enough, leading to:

Traceback (most recent call last):
File "/home/phil/WebKit/Tools/Scripts/webkit-flatpak", line 28, in <module>

sys.exit(WebkitFlatpak.load_from_args().run())

File "/home/phil/WebKit/Tools/flatpak/flatpakutils.py", line 761, in run

if not self.clean_args():

File "/home/phil/WebKit/Tools/flatpak/flatpakutils.py", line 574, in clean_args

_log.debug("Using flatpak user dir: %s" % os.environFLATPAK_USER_DIR?)

File "/usr/lib/python2.7/UserDict.py", line 40, in getitem

raise KeyError(key)

KeyError: 'FLATPAK_USER_DIR'

  • flatpak/flatpakutils.py:

(WebkitFlatpak.clean_args):

6:33 AM Changeset in webkit [239072] by commit-queue@webkit.org
  • 58 edits in trunk/Source/WebKit

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

Broke WPE build due to undefined references to toAPI() and
toImpl() inside the C API (Requested by magomez on #webkit).

Reverted changeset:

"[meta][WebKit] Remove using namespace WebCore and WebKit in
the global scope for unified source builds"
https://bugs.webkit.org/show_bug.cgi?id=192449
https://trac.webkit.org/changeset/239071

Dec 10, 2018:

10:55 PM Changeset in webkit [239071] by Chris Fleizach
  • 58 edits in trunk/Source/WebKit

[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449

Reviewed by Darin Adler.

  • NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
  • NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
  • NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
  • NetworkProcess/ios/NetworkProcessIOS.mm:
  • NetworkProcess/mac/NetworkProcessMac.mm:
  • NetworkProcess/mac/RemoteNetworkingContext.mm:
  • Platform/spi/ios/AccessibilitySupportSPI.h:
  • PlatformMac.cmake:
  • PluginProcess/PluginControllerProxy.cpp:
  • PluginProcess/PluginProcess.cpp:
  • PluginProcess/WebProcessConnection.cpp:
  • Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
  • Shared/API/c/cf/WKErrorCF.cpp:

(WKErrorCreateWithCFError):
(WKErrorCopyCFError):

  • Shared/API/c/cg/WKImageCG.cpp:

(WKImageCreateCGImage):
(WKImageCreateFromCGImage):

  • Shared/ChildProcess.cpp:
  • Shared/ContextMenuContextData.cpp:
  • Shared/EditorState.cpp:
  • Shared/Plugins/NPIdentifierData.cpp:
  • Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
  • Shared/SessionState.cpp:
  • Shared/SessionTracker.cpp:
  • Shared/ShareableBitmap.cpp:
  • Shared/ShareableResource.cpp:
  • Shared/VisibleContentRectUpdateInfo.cpp:
  • Shared/WebBackForwardListItem.cpp:
  • Shared/WebContextMenuItemData.cpp:
  • Shared/WebCoreArgumentCoders.cpp:
  • Shared/WebHitTestResultData.cpp:
  • Shared/WebImage.cpp:
  • Shared/WebMediaSessionMetadata.cpp:
  • Shared/WebMemorySampler.cpp:
  • Shared/WebMouseEvent.cpp:
  • Shared/WebRenderObject.cpp:
  • Shared/WebSQLiteDatabaseTracker.cpp:
  • Shared/WebWheelEvent.cpp:
  • Shared/cf/ArgumentCodersCF.cpp:
  • Shared/ios/WebPlatformTouchPointIOS.cpp:
  • SourcesCocoa.txt:
  • UIProcess/API/APIContentRuleListStore.cpp:
  • UIProcess/API/APIHitTestResult.cpp:
  • UIProcess/API/APINavigation.cpp:
  • UIProcess/API/APIOpenPanelParameters.cpp:
  • UIProcess/API/APIPageConfiguration.cpp:
  • UIProcess/API/C/WKPage.cpp:

(WKPageLoadURLWithShouldOpenExternalURLsPolicy):
(WKPageLoadURLWithUserData):
(WKPageLoadURLRequestWithUserData):
(WKPageSetPaginationMode):
(WKPageGetPaginationMode):
(WKPageSetPageLoaderClient):
(WKPageSetPagePolicyClient):

  • UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:
  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
  • UIProcess/WebStorage/LocalStorageDatabase.cpp:
  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
(-[WKContentView initWithFrame:processPool:configuration:webView:]):
(-[WKContentView dealloc]):
(-[WKContentView page]):
(-[WKContentView updateFixedClippingView:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
(-[WKContentView _updateForScreen:]):
(-[WKContentView _accessibilityRegisterUIProcessTokens]):
(-[WKContentView _createDrawingAreaProxy]):
(-[WKContentView _didCommitLayerTree:]):
(-[WKContentView _wk_pageCountForPrintFormatter:]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
(hasAssistedNode):
(-[WKContentView setupInteraction]):
(-[WKContentView positionInformation]):
(-[WKContentView _webTouchEventsRecognized:]):
(inflateQuad):
(-[WKContentView _updateTapHighlight]):
(-[WKContentView _showTapHighlight]):
(-[WKContentView _requiresKeyboardWhenFirstResponder]):
(-[WKContentView _displayFormNodeInputView]):
(-[WKContentView inputView]):
(-[WKContentView _actionForLongPressFromPositionInformation:]):
(-[WKContentView currentPositionInformation]):
(-[WKContentView doAfterPositionInformationUpdate:forRequest:]):
(-[WKContentView _currentPositionInformationIsValidForRequest:]):
(-[WKContentView _hasValidOutstandingPositionInformationRequest:]):
(-[WKContentView _currentPositionInformationIsApproximatelyValidForRequest:]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView pointIsNearMarkedText:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
(-[WKContentView webSelectionRectsForSelectionRects:]):
(-[WKContentView _twoFingerSingleTapGestureRecognized:]):
(-[WKContentView _stylusSingleTapRecognized:]):
(-[WKContentView _singleTapCommited:]):
(-[WKContentView _attemptClickAtLocation:]):
(-[WKContentView _positionInformationDidChange:]):
(-[WKContentView requiresAccessoryView]):
(-[WKContentView supportedPasteboardTypesForCurrentSelection]):
(-[WKContentView _lookupForWebView:]):
(-[WKContentView _shareForWebView:]):
(-[WKContentView textStylingAtPosition:inDirection:]):
(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView selectForWebView:]):
(-[WKContentView _accessibilityRetrieveRectsEnclosingSelectionOffset:withGranularity:]):
(-[WKContentView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]):
(toGestureType):
(toUIWKGestureType):
(toSelectionTouch):
(toUIWKSelectionTouch):
(toGestureRecognizerState):
(toUIGestureRecognizerState):
(toUIWKSelectionFlags):
(toWKTextGranularity):
(toWKSelectionDirection):
(selectionChangedWithGesture):
(selectionChangedWithTouch):
(-[WKContentView changeSelectionWithGestureAt:withGesture:withState:withFlags:]):
(-[WKContentView autocorrectionData]):
(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
(-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
(-[WKContentView _updateAccessory]):
(-[WKContentView selectedTextRange]):
(-[WKContentView setMarkedText:selectedRange:]):
(coreWritingDirection):
(-[WKContentView closestPositionToPoint:]):
(-[WKContentView insertText:]):
(-[WKContentView textInputTraits]):
(-[WKContentView handleKeyWebEvent:]):
(-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
(-[WKContentView isScrollableForKeyboardScrollViewAnimator:]):
(-[WKContentView keyboardScrollViewAnimator:distanceForIncrement:]):
(-[WKContentView assistedNodeInformation]):
(-[WKContentView assistedNodeSelectOptions]):
(isAssistableInputType):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _stopAssistingNode]):
(-[WKContentView updateCurrentAssistedNodeInformation:]):
(-[WKContentView presentViewControllerForCurrentAssistedNode]):
(-[WKContentView actionNameForFocusedFormControlView:]):
(-[WKContentView selectWordForReplacement]):
(-[WKContentView _updateChangedSelection:]):
(-[WKContentView _beginSuppressingSelectionAssistantForReason:]):
(-[WKContentView _stopSuppressingSelectionAssistantForReason:]):
(-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]):
(-[WKContentView _showRunOpenPanel:resultListener:]):
(-[WKContentView _showShareSheet:completionHandler:]):
(-[WKContentView positionInformationForActionSheetAssistant:]):
(-[WKContentView updatePositionInformationForActionSheetAssistant:]):
(-[WKContentView _startDrag:item:]):
(-[WKContentView _didHandleAdditionalDragItemsRequest:]):
(-[WKContentView _didHandleStartDataInteractionRequest:]):
(dropOperationForWebCoreDragOperation):
(-[WKContentView dragDataForDropSession:dragDestinationAction:]):
(-[WKContentView _didConcludeEditDataInteraction:]):
(-[WKContentView _didPerformDragOperation:]):
(-[WKContentView _prepareToDragPromisedAttachment:]):
(-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]):
(-[WKContentView _autofillContext]):
(-[WKContentView _dragInteraction:itemsForAddingToSession:withTouchAtPoint:completion:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView dragInteraction:itemsForBeginningSession:]):
(-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
(-[WKContentView dragInteraction:session:didEndWithOperation:]):
(-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
(-[WKContentView dropInteraction:performDrop:]):
(-[WKContentView dropInteraction:sessionDidEnd:]):
(-[WKContentView allowsLanguageSelectionMenuForListViewController:]):
(-[WKContentView shouldDisplayInputContextViewForListViewController:]):
(-[WKContentView numericInputModeForListViewController:]):
(-[WKContentView textContentTypeForListViewController:]):
(-[WKContentView allowsDictationInputForListViewController:]):
(-[WKContentView _simulateLongPressActionAtLocation:]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _presentationRectsForPreviewItemController:]):

  • UIProcess/ios/fullscreen/WKFullScreenViewController.mm:

(WKFullScreenViewControllerPlaybackSessionModelClient::setInterface):
(WKFullScreenViewControllerVideoFullscreenModelClient::setInterface):
(WKFullScreenViewControllerVideoFullscreenModelClient::interface const):
(-[WKFullScreenViewController videoControlsManagerDidChange]):
(-[WKFullScreenViewController _manager]):
(-[WKFullScreenViewController _togglePiPAction:]):

  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:

(-[WKFullscreenAnimationController configureInitialAndFinalStatesForTransition:]):
(-[WKFullScreenWindowController isFullScreen]):
(-[WKFullScreenWindowController enterFullScreen]):
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController exitFullScreen]):
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController _completedExitFullScreen]):
(-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
(-[WKFullScreenWindowController _exitFullscreenImmediately]):
(-[WKFullScreenWindowController _manager]):

  • UIProcess/mac/WebPageProxyMac.mm:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Cache/WebCacheStorageConnection.cpp:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:

(mediaTimeToCurrentTime):
(-[WKAnimationDelegate initWithLayerID:layerTreeHost:]):

  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:

(-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]):

10:50 PM Changeset in webkit [239070] by bfulgham@apple.com
  • 11 edits
    2 copies
    2 adds in trunk

SVGViewSpec objects should mark relevant SVG elements
https://bugs.webkit.org/show_bug.cgi?id=192567
<rdar://problem/46491325>

Reviewed by Ryosuke Niwa.

Source/WebCore:

SVGViewSpec elements reflect the state of an underlying SVGElement. Teach the mark algorithm to
recognize the relevant SVGElement as active as long as the SVGViewSpec is active.

Update SVGElement so that it can vend WeakPtrs. I also noticed that SVGAttributeOwner used a bare
pointer to the SVGElement, so switched to a WeakPtr.

Test: svg/animations/view-dependency-crash.html

  • Sources.txt: Add new files.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • bindings/js/JSSVGViewSpecCustom.cpp: Added.

(WebCore::JSSVGViewSpec::visitAdditionalChildren):

  • svg/SVGElement.h:
  • svg/SVGPathElement.h:
  • svg/SVGViewSpec.cpp:

(WebCore::SVGViewSpec::SVGViewSpec): Hold a weak pointer (rather than a bare pointer) to the underlying element.

  • svg/SVGViewSpec.h:
  • svg/SVGViewSpec.idl:
  • svg/properties/SVGAttributeOwnerProxy.cpp: Added.

(WebCore::SVGAttributeOwnerProxy::SVGAttributeOwnerProxy): Hold a weak pointer (rather than a bare pointer) to
the underling SVGElement.
(WebCore::SVGAttributeOwnerProxy::element const): Ditto.

  • svg/properties/SVGAttributeOwnerProxy.h:

(WebCore::SVGAttributeOwnerProxy::SVGAttributeOwnerProxy): Move implementation to cpp file.
(WebCore::SVGAttributeOwnerProxy::element const): Ditto.

  • svg/properties/SVGAttributeOwnerProxyImpl.h: Update for WeakPtr use.

LayoutTests:

  • svg/animations/view-dependency-crash-expected.txt: Added.
  • svg/animations/view-dependency-crash.html: Added.
9:37 PM Changeset in webkit [239069] by benjamin@webkit.org
  • 3 edits
    3 adds in trunk

<rdar://problem/45296285> Content blocker rule "raw" blocks media elements from loading
https://bugs.webkit.org/show_bug.cgi?id=192439

Reviewed by Dean Jackson.

Source/WebCore:

This broken when WebKit switched to NSURLSession.
In CachedResourceLoader::requestResource(), toResourceType() was turning media load into RAW.

Test: http/tests/contentextensions/video-element-resource-type.html

  • loader/ResourceLoadInfo.cpp:

(WebCore::toResourceType):

LayoutTests:

  • http/tests/contentextensions/video-element-resource-type-expected.txt: Added.
  • http/tests/contentextensions/video-element-resource-type.html: Added.
  • http/tests/contentextensions/video-element-resource-type.html.json: Added.
8:04 PM Changeset in webkit [239068] by don.olmstead@sony.com
  • 14 edits in trunk

Move ENABLE_RESOURCE_LOAD_STATISTICS to FeatureDefines.xcconfig
https://bugs.webkit.org/show_bug.cgi?id=192573

Reviewed by Simon Fraser.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

Remove ENABLE_RESOURCE_LOAD_STATISTICS from Platform.h and instead rely
on it being set in FeatureDefines.xcconfig.

  • wtf/Platform.h:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
7:55 PM Changeset in webkit [239067] by justin_michaud@apple.com
  • 11 edits
    3 copies
    5 adds in trunk

CS Painting API should support multiple worklets.
https://bugs.webkit.org/show_bug.cgi?id=192335

Reviewed by Dean Jackson.

Source/WebCore:

Adds a new map to support separate paint worklet global scopes (one for each worklet). Also
adds some tests and a fix for a repaint bug that this oncovered, where changing a custom property required
for paint would not trigger a repaint if there had not been a valid value set before.

Test: fast/css-custom-paint/multiple-worklets.html

  • css/CSSPaintImageValue.cpp:

(WebCore::CSSPaintImageValue::image):

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::applyProperty):

  • dom/Document.cpp:

(WebCore::Document::prepareForDestruction):
(WebCore::Document::paintWorkletGlobalScope):
(WebCore::Document::setPaintWorkletGlobalScope):

  • dom/Document.h:

(WebCore::Document::paintWorkletGlobalScope): Deleted.

  • rendering/style/RenderStyle.cpp:

(WebCore::changedCustomPaintWatchedProperty):

  • worklets/Worklet.cpp:

(WebCore::Worklet::addModule):

  • worklets/WorkletGlobalScope.cpp:

(WebCore::WorkletGlobalScope::prepareForDestruction):

LayoutTests:

  • fast/css-custom-paint/animate-repaint-expected.txt:
  • fast/css-custom-paint/animate-repaint.html:
  • fast/css-custom-paint/delay-expected.html: Added.
  • fast/css-custom-paint/delay-repaint-expected.txt: Copied from LayoutTests/fast/css-custom-paint/animate-repaint-expected.txt.
  • fast/css-custom-paint/delay-repaint.html: Copied from LayoutTests/fast/css-custom-paint/animate-repaint.html.
  • fast/css-custom-paint/delay.html: Copied from LayoutTests/fast/css-custom-paint/animate-repaint.html.
  • fast/css-custom-paint/multiple-worklets-expected.html: Added.
  • fast/css-custom-paint/multiple-worklets.html: Added.
7:50 PM Changeset in webkit [239066] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION (r238599): unable to select specific timeline
https://bugs.webkit.org/show_bug.cgi?id=192443
<rdar://problem/46608087>

Reviewed by Joseph Pecoraro.

When determining the trailing horizontal edge for TreeElement mouse
events, TreeOutline should not assume that its containing DOM element
is only as wide as its <ol> element.

  • UserInterface/Views/TreeOutline.js:

(WI.TreeOutline.prototype.treeElementFromEvent):

7:46 PM Changeset in webkit [239065] by youenn@apple.com
  • 16 edits
    2 deletes in trunk/Source

Remove derived classes of RealtimeMediaSourceCenter
https://bugs.webkit.org/show_bug.cgi?id=192546

Reviewed by Eric Carlson.

Source/WebCore:

Remove virtual methods of RealtimeMediaSourceCenter and remove derived classes of it.
Instead port specific implementation directly implement the needed default factory methods.

Renamed some methods for improved consistency.
Moved some static variables as RealtimeMediaSourceCenter members.

No change of behavior.

  • WebCore.xcodeproj/project.pbxproj:
  • page/DeprecatedGlobalSettings.cpp:
  • platform/mediastream/RealtimeMediaSourceCenter.cpp:

(WebCore::RealtimeMediaSourceCenter::createMediaStream):
(WebCore::RealtimeMediaSourceCenter::getMediaStreamDevices):
(WebCore::RealtimeMediaSourceCenter::getUserMediaDevices):
(WebCore::RealtimeMediaSourceCenter::setVideoCapturePageState):
(WebCore::RealtimeMediaSourceCenter::setAudioFactory):
(WebCore::RealtimeMediaSourceCenter::unsetAudioFactory):
(WebCore::RealtimeMediaSourceCenter::audioCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::setVideoFactory):
(WebCore::RealtimeMediaSourceCenter::unsetVideoFactory):
(WebCore::RealtimeMediaSourceCenter::videoCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::setDisplayCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::unsetDisplayCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::displayCaptureFactory):

  • platform/mediastream/RealtimeMediaSourceCenter.h:
  • platform/mediastream/RealtimeVideoSource.cpp:

(WebCore::RealtimeVideoSource::~RealtimeVideoSource):
(WebCore::RealtimeVideoSource::prepareToProduceData):

  • platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.cpp:

(WebCore::RealtimeMediaSourceCenter::singleton):
(WebCore::RealtimeMediaSourceCenter::defaultAudioCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::defaultVideoCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::defaultDisplayCaptureFactory):

  • platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.h: Removed.
  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::~AVVideoCaptureSource):
(WebCore::AVVideoCaptureSource::setupCaptureSession):

  • platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:

(WebCore::DisplayCaptureSourceCocoa::~DisplayCaptureSourceCocoa):
(WebCore::DisplayCaptureSourceCocoa::startProducingData):

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

(WebCore::RealtimeMediaSourceCenter::singleton):
(WebCore::RealtimeMediaSourceCenter::defaultAudioCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::defaultVideoCaptureFactory):
(WebCore::RealtimeMediaSourceCenter::defaultDisplayCaptureFactory):

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.h: Removed.
  • platform/mock/MockRealtimeAudioSource.cpp:

(WebCore::MockRealtimeAudioSource::~MockRealtimeAudioSource):
(WebCore::MockRealtimeAudioSource::startProducingData):

  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::MockRealtimeMediaSourceCenter::setMockRealtimeMediaSourceCenterEnabled):
(WebCore::MockRealtimeMediaSourceCenter::audioCaptureFactory):
(WebCore::MockRealtimeMediaSourceCenter::videoCaptureFactory):

  • platform/mock/MockRealtimeMediaSourceCenter.h:

Source/WebKit:

pdate code according WebCore changes.

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::~UserMediaCaptureManager):
(WebKit::UserMediaCaptureManager::initialize):

7:43 PM Changeset in webkit [239064] by youenn@apple.com
  • 6 edits in trunk

DataChannels created asynchronously never open and are unusable
https://bugs.webkit.org/show_bug.cgi?id=192566

Reviewed by Eric Carlson.

Source/WebCore:

For every new data channel (remote or local), we should check the underlying backend state.
This allows firing events if needed.
We were not always doing that which was prohibiting sending some open
events for data channels created after the SCTP connection is set up.

Covered by updated test.

  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:

(WebCore::LibWebRTCDataChannelHandler::channelEvent):
(WebCore::LibWebRTCDataChannelHandler::setClient):
(WebCore::LibWebRTCDataChannelHandler::OnStateChange):
(WebCore::LibWebRTCDataChannelHandler::checkState):

  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:

LayoutTests:

  • webrtc/datachannel/basic-expected.txt:
  • webrtc/datachannel/basic.html:
7:05 PM Changeset in webkit [239063] by rniwa@webkit.org
  • 4 edits in trunk/Source/WebCore

Use WeakPtr to refer to VTTCue in VTTCueBox
https://bugs.webkit.org/show_bug.cgi?id=192575

Reviewed by Eric Carlson.

Address the FIXME in VTTCue::~VTTCue by clearing VTTCueBox::m_cue when VTTCue goes away.
This is implemented by simply using WeakPtr.

No new tests since there shoul be no behaivoral change.

  • html/track/TextTrackCueGeneric.cpp:

(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):

  • html/track/VTTCue.cpp:

(WebCore::VTTCueBox::VTTCueBox):
(WebCore::VTTCueBox::getCue const):
(WebCore::VTTCueBox::applyCSSProperties):
(WebCore::VTTCue::~VTTCue):

  • html/track/VTTCue.h:

(WebCore::VTTCueBox::fontSizeFromCaptionUserPrefs const):

6:42 PM Changeset in webkit [239062] by mark.lam@apple.com
  • 15 edits
    1 add in trunk

PropertyAttribute needs a CustomValue bit.
https://bugs.webkit.org/show_bug.cgi?id=191993
<rdar://problem/46264467>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-191993.js: Added.

Source/JavaScriptCore:

This is because GetByIdStatus needs to distinguish CustomValue properties from
other types, and its only means of doing so is via the property's attributes.
Previously, there's nothing in the property's attributes that can indicate that
the property is a CustomValue.

We fix this by doing the following:

  1. Added a PropertyAttribute::CustomValue bit.
  2. Added a PropertyAttribute::CustomAccessorOrValue convenience bit mask that is CustomAccessor | CustomValue.
  1. Since CustomGetterSetter properties are only set via JSObject::putDirectCustomAccessor(), we added a check in JSObject::putDirectCustomAccessor() to see if the attributes bits include PropertyAttribute::CustomAccessor. If not, then the property must be a CustomValue, and we'll add the PropertyAttribute::CustomValue bit to the attributes bits.

This ensures that the property attributes is sufficient to tell us if the
property contains a CustomGetterSetter.

  1. Updated all checks for PropertyAttribute::CustomAccessor to check for PropertyAttribute::CustomAccessorOrValue instead if their intent is to check for the presence of a CustomGetterSetter as opposed to checking specifically for one that is used as a CustomAccessor.

This includes all the Structure transition code that needs to capture the
attributes change when a CustomValue has been added.

  1. Filtered out the PropertyAttribute::CustomValue bit in PropertyDescriptor. The fact that we're using a CustomGetterSetter as a CustomValue should remain invisible to the descriptor. This is because the descriptor should describe a CustomValue no differently from a plain value.
  1. Added some asserts to ensure that property attributes are as expected, and to document some invariants.
  • bytecode/GetByIdStatus.cpp:

(JSC::GetByIdStatus::computeFromLLInt):
(JSC::GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback):
(JSC::GetByIdStatus::computeFor):

  • bytecode/InByIdStatus.cpp:

(JSC::InByIdStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/PropertyCondition.cpp:

(JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const):

  • bytecode/PutByIdStatus.cpp:

(JSC::PutByIdStatus::computeFor):

  • runtime/JSFunction.cpp:

(JSC::getCalculatedDisplayName):

  • runtime/JSObject.cpp:

(JSC::JSObject::putDirectCustomAccessor):
(JSC::JSObject::putDirectNonIndexAccessor):
(JSC::JSObject::putDirectIndexSlowOrBeyondVectorLength):

  • runtime/JSObject.h:

(JSC::JSObject::putDirectIndex):
(JSC::JSObject::fillCustomGetterPropertySlot):
(JSC::JSObject::putDirect):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::putDirectInternal):

  • runtime/PropertyDescriptor.cpp:

(JSC::PropertyDescriptor::setDescriptor):
(JSC::PropertyDescriptor::setCustomDescriptor):
(JSC::PropertyDescriptor::setAccessorDescriptor):

  • runtime/PropertySlot.h:

(JSC::PropertySlot::setCustomGetterSetter):

Source/WebCore:

This patch revealed a bug in the CodeGenerator where a constructor property is
set with a ReadOnly attribute. This conflicts with the WebIDL link (see clause
12 in https://heycam.github.io/webidl/#interface-prototype-object) which states
that it should be [Writable]. The ReadOnly attribute is now removed.

On the WebCore side, this change is covered by existing tests.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:

(WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):

5:17 PM Changeset in webkit [239061] by don.olmstead@sony.com
  • 4 edits in trunk

[CMake] Add ENABLE_RESOURCE_LOAD_STATISTICS to WebKitFeatures.cmake
https://bugs.webkit.org/show_bug.cgi?id=192574

Reviewed by Michael Catanzaro.

.:

  • Source/cmake/WebKitFeatures.cmake:

Tools:

  • Scripts/webkitperl/FeatureList.pm:
4:35 PM Changeset in webkit [239060] by Ross Kirsling
  • 2 edits in trunk

Add test262-results directory to .gitignore.
https://bugs.webkit.org/show_bug.cgi?id=192547

Reviewed by Dean Jackson.

  • .gitignore:
4:32 PM Changeset in webkit [239059] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit

Animated scrolling on Google Maps scrolls the page in addition to moving the map
https://bugs.webkit.org/show_bug.cgi?id=192521
<rdar://problem/46382007>

Reviewed by Sam Weinig.

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

(-[WKKeyboardScrollViewAnimator rubberbandableDirections]):
Only do keyboard-based rubber-banding in directions that we can actually
scroll, not directions we can only finger-rubber-band in. This effectively
means keyboard scrolling will ignore "alwaysBounce{Vertical, Horizontal}".

4:08 PM Changeset in webkit [239058] by don.olmstead@sony.com
  • 2 edits in trunk/Tools

Sync FeatureList.pm
https://bugs.webkit.org/show_bug.cgi?id=192565

Reviewed by Michael Catanzaro.

  • Scripts/webkitperl/FeatureList.pm:
3:56 PM Changeset in webkit [239057] by Antti Koivisto
  • 9 edits in trunk/Source

Rename "forced style recalc" to "full style rebuild"
https://bugs.webkit.org/show_bug.cgi?id=192572

Reviewed by Zalan Bujtas.

Source/WebCore:

The old name is confusing.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::hasValidStyleForProperty):

  • dom/Document.cpp:

(WebCore::Document::scheduleStyleRebuild):
(WebCore::Document::scheduleStyleRecalc):
(WebCore::Document::unscheduleStyleRecalc):
(WebCore::Document::hasPendingStyleRebuild const):
(WebCore::Document::resolveStyle):
(WebCore::Document::needsStyleRecalc const):
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
(WebCore::Document::invalidateMatchedPropertiesCacheAndForceStyleRecalc):
(WebCore::Document::setDesignMode):
(WebCore::Document::webkitDidExitFullScreenForElement):
(WebCore::Document::setAnimatingFullScreen):
(WebCore::Document::setFullscreenControlsHidden):
(WebCore::Document::scheduleForcedStyleRecalc): Deleted.
(WebCore::Document::hasPendingForcedStyleRecalc const): Deleted.

  • dom/Document.h:
  • dom/Element.cpp:

(WebCore::Element::needsStyleInvalidation const):

  • page/Page.cpp:

(WebCore::Page::updateStyleAfterChangeInEnvironment):

  • style/StyleScope.cpp:

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

Source/WebKitLegacy/mac:

  • WebView/WebHTMLView.mm:

(-[WebHTMLView setNeedsToApplyStyles:]):

3:36 PM Changeset in webkit [239056] by commit-queue@webkit.org
  • 15 edits in trunk/Source

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

Speculative rollout due to broken perf test (Requested by
deanj on #webkit).

Reverted changeset:

"Enable HTTP and HTTPS proxies on iOS and make it a property
of the NSURLSession"
https://bugs.webkit.org/show_bug.cgi?id=192374
https://trac.webkit.org/changeset/239023

3:14 PM Changeset in webkit [239055] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

LinkBuffer::copyCompactAndLinkCode() needs to be aware of ENABLE(SEPARATED_WX_HEAP).
https://bugs.webkit.org/show_bug.cgi?id=192569
<rdar://problem/45615617>

Reviewed by Saam Barati.

  • assembler/LinkBuffer.cpp:

(JSC::LinkBuffer::copyCompactAndLinkCode):

3:05 PM Changeset in webkit [239054] by ap@apple.com
  • 2 edits in trunk/Source/WebCore

Include CoreGraphics.h from WebCorePrefix.h
https://bugs.webkit.org/show_bug.cgi?id=192557

Reviewed by Tim Horton.

The theory is that this will improve build time. Let's try and see what bots say.

  • WebCorePrefix.h:
2:18 PM Changeset in webkit [239053] by wenson_hsieh@apple.com
  • 5 edits in trunk

[iOS] Unable to upload data that conforms to "public.item" but not "public.content"
https://bugs.webkit.org/show_bug.cgi?id=192555
<rdar://problem/35204990>

Reviewed by Tim Horton.

Source/WebCore:

Add support for uploading content that conforms to "public.item" via drag and drop. Currently, iOS WebKit only
supports data that conforms to "public.content", but there exist several types of files that conform to
"public.item" but not "public.content". See below for more detail.

Test: DragAndDropTests.ExternalSourcePKCS12ToSingleFileInput

  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::supportedFileUploadPasteboardTypes):

Update this to include "public.item", and remove "public.folder", which is now redundant because "public.folder"
conforms to "public.item".

  • platform/ios/WebItemProviderPasteboard.mm:

(-[NSItemProvider web_containsFileURLAndFileUploadContent]):

Pull out the "contains content that is supported for file uploads" part of this helper method into a separate
method, and use it within -web_containsFileURLAndFileUploadContent. Note that this prevents "public.url"-
conformant data from being uploaded as files (i.e., we never want to upload a URL string *itself* as a file).
Drawing this distinction ensures that we don't confuse item providers that contain just a URL as files when
dropping into a file upload area or file input (see API test: ExternalSourceZIPArchiveAndURLToSingleFileInput
for an example of this corner case).

(-[NSItemProvider web_containsFileUploadContent]):
(-[WebItemProviderPasteboard numberOfFiles]):

Refactor this to use -web_containsFileUploadContent.

Tools:

Add a test to verify that .p12 files may be uploaded as files via drag and drop. "com.rsa.pkcs-12" is an
example of a data type that conforms to "public.item", but not "public.content"; before this patch, we would
only support uploading "public.content", so files such as these would not be accepted when dropping into file
inputs, or be exposed as files on DataTransfer.

  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:

(TestWebKitAPI::TEST):

2:10 PM Changeset in webkit [239052] by wenson_hsieh@apple.com
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix the iOS build after r239039.
https://bugs.webkit.org/show_bug.cgi?id=192568

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView dropInteraction:sessionDidUpdate:]):

2:03 PM Changeset in webkit [239051] by Matt Baker
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Move TreeOutlineGroup coordination out of TreeElement
https://bugs.webkit.org/show_bug.cgi?id=192487
<rdar://problem/46543431>

Reviewed by Devin Rousso.

  • UserInterface/Views/TreeElement.js:

(WI.TreeElement.prototype.select):
(WI.TreeElement.prototype.deselect):

  • UserInterface/Views/TreeOutlineGroup.js:

(WI.TreeOutlineGroup):
(WI.TreeOutlineGroup.prototype.itemAdded):
(WI.TreeOutlineGroup.prototype.itemRemoved):
(WI.TreeOutlineGroup.prototype._removeConflictingTreeSelections):
(WI.TreeOutlineGroup.prototype._treeOutlineSelectionDidChange):
(WI.TreeOutlineGroup.groupForTreeOutline): Deleted.
(WI.TreeOutlineGroup.prototype.didSelectTreeElement): Deleted.
make the group responsible for listening to selection changes from the
TreeOutlines it manages, and synchronizing the selection between them.

1:55 PM Changeset in webkit [239050] by ddkilzer@apple.com
  • 2 edits in trunk/Tools

Injected bundle for WebKitTestRunner leaks WKTypeRef objects
<https://webkit.org/b/192481>
<rdar://problem/46539059>

Follow-up to address Darin's feedback.

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::shouldDumpPixels const):
(WTR::TestRunner::whatToDump const):
(WTR::TestRunner::shouldWaitUntilDone const):
(WTR::TestRunner::shouldDumpFrameLoadCallbacks):
(WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const):
(WTR::TestRunner::secureEventInputIsEnabled const):
(WTR::TestRunner::isStatisticsPrevalentResource):
(WTR::TestRunner::isStatisticsVeryPrevalentResource):
(WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder):
(WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder):
(WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo):
(WTR::TestRunner::isStatisticsHasHadUserInteraction):
(WTR::TestRunner::isStatisticsGrandfathered):
(WTR::TestRunner::hasDOMCache):
(WTR::TestRunner::keyExistsInKeychain):

1:50 PM Changeset in webkit [239049] by achristensen@apple.com
  • 3 edits in trunk/Source/WebKit

Fix WatchOS build.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView actionNameForFocusedFormControlView:]):

1:48 PM Changeset in webkit [239048] by jbedard@apple.com
  • 3 edits in trunk/Tools

webkitpy: Ref tests don't respect platform specific expectations
https://bugs.webkit.org/show_bug.cgi?id=192515
<rdar://problem/46564839>

Reviewed by Lucas Forschler.

  • Scripts/webkitpy/port/base.py:

(Port._expected_baselines_for_suffixes): Accept multiple suffixes so ref tests can use this function.
(Port.expected_baselines): Move implementation to _expected_baselines_for_suffixes.
(Port.expected_filename): Remove irrelevant FIXME, code clean-up.
(Port.reference_files): Instead of just searching a single directory, use _expected_baselines_for_suffixes to
search all platform expectations as well.

  • Scripts/webkitpy/port/base_unittest.py:

(test_ref_tests_platform_directory):

1:30 PM Changeset in webkit [239047] by Matt Lewis
  • 57 edits in trunk/Source/WebKit

Unreviewed, rolling out r239029.

This patch caused internal build failures.

Reverted changeset:

"[meta][WebKit] Remove using namespace WebCore and WebKit in
the global scope for unified source builds"
https://bugs.webkit.org/show_bug.cgi?id=192449
https://trac.webkit.org/changeset/239029

1:26 PM Changeset in webkit [239046] by Chris Dumez
  • 13 edits in trunk

Add SPI to allow the client to set the user-agent at main frame level, from the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=192509
<rdar://problem/46500832>

Reviewed by Alex Christensen.

Source/WebCore:

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::setCustomUserAgent):
(WebCore::DocumentLoader::customUserAgent const):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::userAgent const):

Source/WebKit:

Add SPI to allow the client to set the user-agent at main frame level, from the UIProcess instead of doing
it at resource-level from the injected bundle.

The custom user-agent string can now be set on _WKWebsitePolicies during the
decidePolicyForNavigationAction for the main feame, and will impact this main resource load as well as its
future subresource loads.

  • Shared/WebsitePoliciesData.cpp:

(WebKit::WebsitePoliciesData::encode const):
(WebKit::WebsitePoliciesData::decode):
(WebKit::WebsitePoliciesData::applyToDocumentLoader):

  • Shared/WebsitePoliciesData.h:
  • UIProcess/API/APIWebsitePolicies.cpp:

(API::WebsitePolicies::data):

  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.mm:

(-[_WKWebsitePolicies setCustomUserAgent:]):
(-[_WKWebsitePolicies customUserAgent]):

  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(-[DataMappingSchemeHandler addMappingFromURLString:toData:]):
(-[DataMappingSchemeHandler webView:startURLSchemeTask:]):
(-[DataMappingSchemeHandler webView:stopURLSchemeTask:]):
(-[CustomUserAgentDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[CustomUserAgentDelegate webView:didFinishNavigation:]):

1:11 PM Changeset in webkit [239045] by Caio Lima
  • 22 edits
    5 adds in trunk

[BigInt] Add ValueMul into DFG
https://bugs.webkit.org/show_bug.cgi?id=186175

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/big-int-mul-jit-osr.js: Added.
  • stress/big-int-mul-jit-untyped.js: Added.
  • stress/value-mul-fixup-int32-big-int.js: Added.

PerformanceTests:

  • BigIntBench/big-int-simple-mul.js: Added.
  • BigIntBench/value-mul-type-propagation.js: Added.

Source/JavaScriptCore:

This patch is adding a new DFG node called ValueMul. This node is
responsible to handle multiplication operations that can result into
non-number values. We emit such node during DFGByteCodeParser when the
operands are not numbers. During FixupPhase, we change this
operation to ArithMul if we can speculate Number/Boolean operands.

The BigInt specialization shows a small progression:

noSpec changes

big-int-simple-mul 18.8090+-1.0435 17.4305+-0.2673 definitely 1.0791x faster

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGBackwardsPropagationPhase.cpp:

(JSC::DFG::BackwardsPropagationPhase::propagate):

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGNode.h:

(JSC::DFG::Node::arithNodeFlags):

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

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileValueMul):
(JSC::DFG::SpeculativeJIT::compileArithMul):

  • dfg/DFGSpeculativeJIT.h:
  • 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::compileValueMul):
(JSC::FTL::DFG::LowerDFGToB3::compileArithMul):

12:56 PM Changeset in webkit [239044] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Safe browsing warning should layout buttons vertically in narrow WKWebViews
https://bugs.webkit.org/show_bug.cgi?id=192535
<rdar://problem/46308364>

Reviewed by Tim Horton.

They're usually next to each other, but in narrow WKWebViews they currently get clipped.
In order to make it more likely that both buttons are completely visible, put one above
the other if the WKWebView is too narrow to completely show both. This also helps with
languages where the translations of "Go Back" or "Show Details" are rendered wider than English.

  • UIProcess/Cocoa/WKSafeBrowsingWarning.mm:

(buttonWidth):
(-[WKSafeBrowsingWarning addContent]):

12:46 PM Changeset in webkit [239043] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebCore

[GLib] FileSystem::moveFile() should fall back to copying
https://bugs.webkit.org/show_bug.cgi?id=192562

Reviewed by Michael Catanzaro.

No new tests needed.

  • platform/glib/FileSystemGlib.cpp:

(WebCore::FileSystem::moveFile): Use g_file_move() instead of a plain g_rename(), which
provides a fall-back which does copy+delete when a direct move or rename cannot be done.

12:43 PM Changeset in webkit [239042] by simon.fraser@apple.com
  • 12 edits in trunk

Allow control over child order when adding nodes to the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=176914
<rdar://problem/46542237>

Re-land r239010 after over-zealous rollout.

Source/WebCore:

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::attachToStateTree):
(WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):

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

(WebCore::ScrollingCoordinator::attachToStateTree):

  • page/scrolling/ScrollingStateNode.cpp:

(WebCore::ScrollingStateNode::insertChild):
(WebCore::ScrollingStateNode::indexOfChild const):

  • page/scrolling/ScrollingStateNode.h:
  • page/scrolling/ScrollingStateTree.cpp:

(WebCore::ScrollingStateTree::nodeTypeAndParentMatch const):
(WebCore::ScrollingStateTree::attachNode):

  • page/scrolling/ScrollingStateTree.h:

Source/WebKit:

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:

(WebKit::RemoteScrollingCoordinatorTransaction::decode):

LayoutTests:

  • platform/mac-wk2/TestExpectations:
12:42 PM Changeset in webkit [239041] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

Document should throttle style recalc even when m_pendingStyleRecalcShouldForce is true.
https://bugs.webkit.org/show_bug.cgi?id=191695

Reviewed by Zalan Bujtas.

  • dom/Document.cpp:

(WebCore::Document::scheduleStyleRecalc):

Don't test for m_pendingStyleRecalcShouldForce.

(WebCore::Document::hasPendingStyleRecalc const):
(WebCore::Document::hasPendingForcedStyleRecalc const):

Don't base the pending status of these function on whether the timer is running.
Instead check if the style is invalid.

12:31 PM Changeset in webkit [239040] by commit-queue@webkit.org
  • 8 edits in trunk

XMLHttpRequest removes spaces from content-types before processing
https://bugs.webkit.org/show_bug.cgi?id=8644

Patch by Rob Buis <rbuis@igalia.com> on 2018-12-10
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Update improved test expectations.

  • web-platform-tests/mimesniff/mime-types/parsing.any-expected.txt:
  • web-platform-tests/mimesniff/mime-types/parsing.any.worker-expected.txt:

Source/WebCore:

Stop trimming white space characters from the middle of
type/subtype value. Also make sure whitespace being parsed
adheres to OWS definition from RFC 7230 Section 3.2.3
(referenced by RFC 7231), i.e. space or HT.

Based on http://crrev.com/416586.

Behavior matches Firefox and Chrome.

Tests: http/tests/xmlhttprequest/supported-xml-content-types.html

web-platform-tests/mimesniff/mime-types/parsing.any.html
web-platform-tests/mimesniff/mime-types/parsing.any.worker.html

  • platform/network/HTTPParsers.cpp:

(WebCore::extractMIMETypeFromMediaType):

LayoutTests:

Update improved test expectation and remove comment.

  • http/tests/xmlhttprequest/supported-xml-content-types-expected.txt:
  • http/tests/xmlhttprequest/supported-xml-content-types.html:
12:27 PM Changeset in webkit [239039] by wenson_hsieh@apple.com
  • 17 edits in trunk

[iOS] Caret is obscured by finger when dragging over an editable element
https://bugs.webkit.org/show_bug.cgi?id=192499
<rdar://problem/46570101>

Reviewed by Tim Horton.

Source/WebCore:

  • page/DragActions.h:

Move DragHandlingMethod to DragActions.h, and drive-by fix some minor issues (i.e. make a couple of enum classes
use 8 bits, fix the indentation levels, and update the copyright year). Also add EnumTraits for
DragHandlingMethod so that it may be encoded over IPC.

  • page/DragController.cpp:

(WebCore::dragIsHandledByDocument):

Simplify this helper function.

(WebCore::DragController::tryDocumentDrag):

  • page/DragController.h:

Expose the current DragHandlingMethod via a const getter method.

(WebCore::DragController::dragHandlingMethod const):

Source/WebKit:

Add support for setting the precise property of UIDropProposal to YES when dragging over an editable area.
When enabled, this property shifts the drop location up by a small amount, allowing the user to see the drop
caret (currently, this is not the case, and it's difficult to drop text at a precise location on iOS). Changes
are covered by adding to existing API tests.

  • Scripts/webkit/messages.py:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:

Add a new version of -_webView:willUpdateDataInteractionOperationToOperation:forSession: that receives and
returns a UIDropProposal, so that Mail can more easily port over existing logic in its legacy-WebKit-based
compose implementation. iOS Safari is currently the only client of this private delegate, so the old version can
be easily removed once Safari adopts this new version.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didPerformDragControllerAction):

Add plumbing to send the latest drag handling method from WebPage to WebPageProxy.

(WebKit::WebPageProxy::resetCurrentDragInformation):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::currentDragHandlingMethod const):

  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView dropInteraction:sessionDidUpdate:]):

Call the new UI delegate hook when determining the drop proposal to return to UIKit. Additionally set the
precise bit on the drop proposal in the case where the drop handling method is either "editing rich text" or
"editing plain text".

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::performDragControllerAction):

  • WebProcess/WebPage/WebPage.h:

Tools:

Augment some existing API tests to check that the precise flag is either on or off on UIDropProposal.

  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
  • TestWebKitAPI/cocoa/DragAndDropSimulator.h:
  • TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:

(-[DragAndDropSimulator _resetSimulatedState]):
(-[DragAndDropSimulator lastKnownDropProposal]):

Rename currentDropProposal to lastKnownDropProposal, and expose it as a readonly property.

(-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]):
(-[DragAndDropSimulator _advanceProgress]):
(-[DragAndDropSimulator setShowCustomActionSheetBlock:]):
(-[DragAndDropSimulator showCustomActionSheetBlock]):
(-[DragAndDropSimulator setConvertItemProvidersBlock:]):
(-[DragAndDropSimulator convertItemProvidersBlock]):
(-[DragAndDropSimulator setOverridePerformDropBlock:]):
(-[DragAndDropSimulator overridePerformDropBlock]):
(-[DragAndDropSimulator setOverrideDragUpdateBlock:]):
(-[DragAndDropSimulator overrideDragUpdateBlock]):
(-[DragAndDropSimulator setDropCompletionBlock:]):
(-[DragAndDropSimulator dropCompletionBlock]):

Refactor these properties to return and take normal Objective-C blocks, rather than BlockPtrs. However, use
BlockPtr instance variables to manage the lifetimes of these blocks.

(-[DragAndDropSimulator _webView:willUpdateDropProposalToProposal:forSession:]):
(-[DragAndDropSimulator _webView:willUpdateDataInteractionOperationToOperation:forSession:]): Deleted.

Update this to use the new WebKit delegate hook for overriding the drop proposal.

11:53 AM Changeset in webkit [239038] by youenn@apple.com
  • 5 edits in trunk/Source

Make mock capture happen in the process used for real capture
https://bugs.webkit.org/show_bug.cgi?id=192544

Reviewed by Eric Carlson.

Source/WebCore:

MockRealtimeMediaSourceCenter previously was setting its factories whenever mock capture is on.
Add booleans to choose which source (audio, video, display) will actually be toggled on.

Covered by existing tests.

  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::MockRealtimeMediaSourceCenter::setMockRealtimeMediaSourceCenterEnabled):

  • platform/mock/MockRealtimeMediaSourceCenter.h:

(WebCore::MockRealtimeMediaSourceCenter::setMockAudioCaptureEnabled):
(WebCore::MockRealtimeMediaSourceCenter::setMockVideoCaptureEnabled):
(WebCore::MockRealtimeMediaSourceCenter::setMockDisplayCaptureEnabled):

Source/WebKit:

Make mock capture happen in the right process by only overriding
factories by mock factories for source types that UserMediaCaptureManager will not override.
That way, UserMediaCaptureManager will be used to go to UIProcess, where mock will be used as if it was the real capture.

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::initialize):

11:45 AM Changeset in webkit [239037] by dino@apple.com
  • 7 edits in trunk/Source

Use text/javascript as recommended by the HTML specification
https://bugs.webkit.org/show_bug.cgi?id=192525
<rdar://problem/46569636>

Reviewed by Jon Lee.

The HTML specification says we should use text/javascript for
JavaScript files:
https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages:javascript-mime-type

Source/WebCore:

  • loader/cache/CachedScript.cpp: Replace application/javascript with text/javascript.

(WebCore::CachedScript::CachedScript):

  • platform/network/ios/WebCoreURLResponseIOS.mm: Ditto.

(WebCore::createExtensionToMIMETypeMap):

  • platform/network/mac/WebCoreURLResponse.mm: Ditto.

(WebCore::createExtensionToMIMETypeMap):

Source/WebInspectorUI:

  • UserInterface/Base/MIMETypeUtilities.js:

(WI.mimeTypeForFileExtension):

  • UserInterface/Views/TextEditor.js:

(WI.TextEditor.prototype._attemptToDetermineMIMEType):

11:37 AM Changeset in webkit [239036] by dino@apple.com
  • 6 edits
    2 adds in trunk/Source/WebCore

[iOS] Make WebGPU work with remote layer hosting
https://bugs.webkit.org/show_bug.cgi?id=192508
<rdar://problem/46560649>

Reviewed by Tim Horton.

WebGPU wasn't working on iOS because we were not correctly
identifying the CALayers for remote hosting. Fix this by
adding a new CALayer type, WebGPULayer. This will also
eventually hold the code to render WebGPU into a canvas.

Covered by the existing reference tests (on device).

  • SourcesCocoa.txt: Add new files.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Recognise the WebGPULayer

class for remote hosting.
(WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
(WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):

  • platform/graphics/cocoa/WebGPULayer.h: Added. Very simple inheritance

from CAMetalLayer.

  • platform/graphics/cocoa/WebGPULayer.mm: Added.

(-[WebGPULayer init]):
(-[WebGPULayer copyImageSnapshotWithColorSpace:]):

  • platform/graphics/gpu/GPUSwapChain.h: Reference WebGPULayer rather

than CALayer.

  • platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm: Ensure that

the WebGPULayer has a reference back to this object, which it
will use in the future.
(WebCore::GPUSwapChain::create):
(WebCore::GPUSwapChain::GPUSwapChain):

10:06 AM Changeset in webkit [239035] by ap@apple.com
  • 4 edits in trunk/Source

Move ENABLE_SEC_ITEM_SHIM out of WebKit's config.h
https://bugs.webkit.org/show_bug.cgi?id=192428

Reviewed by Tim Horton.

Source/WebKit:

  • config.h:

Source/WTF:

  • wtf/Platform.h:
9:55 AM Changeset in webkit [239034] by ap@apple.com
  • 4 edits in trunk/Source

Move more macros out of WebKit's config.h
https://bugs.webkit.org/show_bug.cgi?id=192430

Reviewed by Tim Horton.

Source/WebKit:

  • config.h:

Source/WTF:

  • wtf/Platform.h:
9:51 AM Changeset in webkit [239033] by Chris Dumez
  • 4 edits in trunk/Source

[macOS] MSHCreateMIGServerSource invocation does not handle send/receive rights correctly
https://bugs.webkit.org/show_bug.cgi?id=192533
rdar://problem/45732710

Patch by Darin Adler <Darin Adler> on 2018-12-10
Reviewed by Anders Carlsson.

Source/WebCore/PAL:

  • pal/spi/mac/HIServicesSPI.h: Added kMSHDoNotCreateSendRightOption.

Source/WebKitLegacy/mac:

  • Plugins/Hosted/NetscapePluginHostProxy.mm:

(WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): Pass kMSHDoNotCreateSendRightOption.

9:50 AM Changeset in webkit [239032] by Chris Dumez
  • 3 edits in trunk/Source/WebKitLegacy/mac

[macOS] Use mach_port_mod_refs instead of mach_port_destroy
https://bugs.webkit.org/show_bug.cgi?id=192532
rdar://problem/45731047

Patch by Darin Adler <Darin Adler> on 2018-12-10
Reviewed by Chris Dumez.

  • Plugins/Hosted/NetscapePluginHostManager.mm:

(WebKit::NetscapePluginHostManager::hostForPlugin): Use mach_port_mod_refs.

  • Plugins/Hosted/NetscapePluginHostProxy.mm:

(WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy): Ditto.

9:17 AM Changeset in webkit [239031] by Truitt Savell
  • 6 edits
    2 deletes in trunk/Source/WebCore

Unreviewed, rolling out r238965.

Caused internal iOS build failures

Reverted changeset:

"[iOS] Make WebGPU work with remote layer hosting"
https://bugs.webkit.org/show_bug.cgi?id=192508
https://trac.webkit.org/changeset/238965

8:30 AM Changeset in webkit [239030] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

MockLibWebRTCPeerConnectionFactory should isolate copy its test case
https://bugs.webkit.org/show_bug.cgi?id=192545

Reviewed by Eric Carlson.

Isolate copy the test case member so that it can be destroyed on another thread.
Covered by existing test that should no longer crash.

  • testing/MockLibWebRTCPeerConnection.cpp:

(WebCore::useMockRTCPeerConnectionFactory):
(WebCore::MockLibWebRTCPeerConnectionFactory::MockLibWebRTCPeerConnectionFactory):

  • testing/MockLibWebRTCPeerConnection.h:

(WebCore::MockLibWebRTCPeerConnectionFactory::create):

8:07 AM Changeset in webkit [239029] by Chris Fleizach
  • 57 edits in trunk/Source/WebKit

[meta][WebKit] Remove using namespace WebCore and WebKit in the global scope for unified source builds
https://bugs.webkit.org/show_bug.cgi?id=192449

Reviewed by Darin Adler.

  • NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
  • NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:
  • NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
  • NetworkProcess/ios/NetworkProcessIOS.mm:
  • NetworkProcess/mac/NetworkProcessMac.mm:
  • NetworkProcess/mac/RemoteNetworkingContext.mm:
  • Platform/spi/ios/AccessibilitySupportSPI.h:
  • PlatformMac.cmake:
  • PluginProcess/PluginControllerProxy.cpp:
  • PluginProcess/PluginProcess.cpp:
  • PluginProcess/WebProcessConnection.cpp:
  • Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
  • Shared/API/c/cf/WKErrorCF.cpp:

(WKErrorCreateWithCFError):
(WKErrorCopyCFError):

  • Shared/API/c/cg/WKImageCG.cpp:

(WKImageCreateCGImage):
(WKImageCreateFromCGImage):

  • Shared/ChildProcess.cpp:
  • Shared/ContextMenuContextData.cpp:
  • Shared/EditorState.cpp:
  • Shared/Plugins/NPIdentifierData.cpp:
  • Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
  • Shared/SessionState.cpp:
  • Shared/SessionTracker.cpp:
  • Shared/ShareableBitmap.cpp:
  • Shared/ShareableResource.cpp:
  • Shared/VisibleContentRectUpdateInfo.cpp:
  • Shared/WebBackForwardListItem.cpp:
  • Shared/WebContextMenuItemData.cpp:
  • Shared/WebCoreArgumentCoders.cpp:
  • Shared/WebHitTestResultData.cpp:
  • Shared/WebImage.cpp:
  • Shared/WebMediaSessionMetadata.cpp:
  • Shared/WebMemorySampler.cpp:
  • Shared/WebMouseEvent.cpp:
  • Shared/WebRenderObject.cpp:
  • Shared/WebSQLiteDatabaseTracker.cpp:
  • Shared/WebWheelEvent.cpp:
  • Shared/cf/ArgumentCodersCF.cpp:
  • Shared/ios/WebPlatformTouchPointIOS.cpp:
  • SourcesCocoa.txt:
  • UIProcess/API/APIContentRuleListStore.cpp:
  • UIProcess/API/APIHitTestResult.cpp:
  • UIProcess/API/APINavigation.cpp:
  • UIProcess/API/APIOpenPanelParameters.cpp:
  • UIProcess/API/APIPageConfiguration.cpp:
  • UIProcess/API/C/WKPage.cpp:

(WKPageLoadURLWithShouldOpenExternalURLsPolicy):
(WKPageLoadURLWithUserData):
(WKPageLoadURLRequestWithUserData):
(WKPageSetPaginationMode):
(WKPageGetPaginationMode):
(WKPageSetPageLoaderClient):
(WKPageSetPagePolicyClient):

  • UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:
  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
  • UIProcess/WebStorage/LocalStorageDatabase.cpp:
  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
(-[WKContentView initWithFrame:processPool:configuration:webView:]):
(-[WKContentView dealloc]):
(-[WKContentView page]):
(-[WKContentView updateFixedClippingView:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
(-[WKContentView _updateForScreen:]):
(-[WKContentView _accessibilityRegisterUIProcessTokens]):
(-[WKContentView _createDrawingAreaProxy]):
(-[WKContentView _didCommitLayerTree:]):
(-[WKContentView _wk_pageCountForPrintFormatter:]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
(hasAssistedNode):
(-[WKContentView setupInteraction]):
(-[WKContentView positionInformation]):
(-[WKContentView _webTouchEventsRecognized:]):
(inflateQuad):
(-[WKContentView _updateTapHighlight]):
(-[WKContentView _showTapHighlight]):
(-[WKContentView _requiresKeyboardWhenFirstResponder]):
(-[WKContentView _displayFormNodeInputView]):
(-[WKContentView inputView]):
(-[WKContentView _actionForLongPressFromPositionInformation:]):
(-[WKContentView currentPositionInformation]):
(-[WKContentView doAfterPositionInformationUpdate:forRequest:]):
(-[WKContentView _currentPositionInformationIsValidForRequest:]):
(-[WKContentView _hasValidOutstandingPositionInformationRequest:]):
(-[WKContentView _currentPositionInformationIsApproximatelyValidForRequest:]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView pointIsNearMarkedText:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
(-[WKContentView webSelectionRectsForSelectionRects:]):
(-[WKContentView _twoFingerSingleTapGestureRecognized:]):
(-[WKContentView _stylusSingleTapRecognized:]):
(-[WKContentView _singleTapCommited:]):
(-[WKContentView _attemptClickAtLocation:]):
(-[WKContentView _positionInformationDidChange:]):
(-[WKContentView requiresAccessoryView]):
(-[WKContentView supportedPasteboardTypesForCurrentSelection]):
(-[WKContentView _lookupForWebView:]):
(-[WKContentView _shareForWebView:]):
(-[WKContentView textStylingAtPosition:inDirection:]):
(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView selectForWebView:]):
(-[WKContentView _accessibilityRetrieveRectsEnclosingSelectionOffset:withGranularity:]):
(-[WKContentView _accessibilityRetrieveRectsAtSelectionOffset:withText:completionHandler:]):
(toGestureType):
(toUIWKGestureType):
(toSelectionTouch):
(toUIWKSelectionTouch):
(toGestureRecognizerState):
(toUIGestureRecognizerState):
(toUIWKSelectionFlags):
(toWKTextGranularity):
(toWKSelectionDirection):
(selectionChangedWithGesture):
(selectionChangedWithTouch):
(-[WKContentView changeSelectionWithGestureAt:withGesture:withState:withFlags:]):
(-[WKContentView autocorrectionData]):
(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
(-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
(-[WKContentView _updateAccessory]):
(-[WKContentView selectedTextRange]):
(-[WKContentView setMarkedText:selectedRange:]):
(coreWritingDirection):
(-[WKContentView closestPositionToPoint:]):
(-[WKContentView insertText:]):
(-[WKContentView textInputTraits]):
(-[WKContentView handleKeyWebEvent:]):
(-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
(-[WKContentView isScrollableForKeyboardScrollViewAnimator:]):
(-[WKContentView keyboardScrollViewAnimator:distanceForIncrement:]):
(-[WKContentView assistedNodeInformation]):
(-[WKContentView assistedNodeSelectOptions]):
(isAssistableInputType):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _stopAssistingNode]):
(-[WKContentView updateCurrentAssistedNodeInformation:]):
(-[WKContentView presentViewControllerForCurrentAssistedNode]):
(-[WKContentView actionNameForFocusedFormControlView:]):
(-[WKContentView selectWordForReplacement]):
(-[WKContentView _updateChangedSelection:]):
(-[WKContentView _beginSuppressingSelectionAssistantForReason:]):
(-[WKContentView _stopSuppressingSelectionAssistantForReason:]):
(-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]):
(-[WKContentView _showRunOpenPanel:resultListener:]):
(-[WKContentView _showShareSheet:completionHandler:]):
(-[WKContentView positionInformationForActionSheetAssistant:]):
(-[WKContentView updatePositionInformationForActionSheetAssistant:]):
(-[WKContentView _startDrag:item:]):
(-[WKContentView _didHandleAdditionalDragItemsRequest:]):
(-[WKContentView _didHandleStartDataInteractionRequest:]):
(dropOperationForWebCoreDragOperation):
(-[WKContentView dragDataForDropSession:dragDestinationAction:]):
(-[WKContentView _didConcludeEditDataInteraction:]):
(-[WKContentView _didPerformDragOperation:]):
(-[WKContentView _prepareToDragPromisedAttachment:]):
(-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]):
(-[WKContentView _autofillContext]):
(-[WKContentView _dragInteraction:itemsForAddingToSession:withTouchAtPoint:completion:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView dragInteraction:itemsForBeginningSession:]):
(-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
(-[WKContentView dragInteraction:session:didEndWithOperation:]):
(-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
(-[WKContentView dropInteraction:performDrop:]):
(-[WKContentView dropInteraction:sessionDidEnd:]):
(-[WKContentView allowsLanguageSelectionMenuForListViewController:]):
(-[WKContentView shouldDisplayInputContextViewForListViewController:]):
(-[WKContentView numericInputModeForListViewController:]):
(-[WKContentView textContentTypeForListViewController:]):
(-[WKContentView allowsDictationInputForListViewController:]):
(-[WKContentView _simulateLongPressActionAtLocation:]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _presentationRectsForPreviewItemController:]):

  • UIProcess/ios/fullscreen/WKFullScreenViewController.mm:

(WKFullScreenViewControllerPlaybackSessionModelClient::setInterface):
(WKFullScreenViewControllerVideoFullscreenModelClient::setInterface):
(WKFullScreenViewControllerVideoFullscreenModelClient::interface const):
(-[WKFullScreenViewController videoControlsManagerDidChange]):
(-[WKFullScreenViewController _manager]):
(-[WKFullScreenViewController _togglePiPAction:]):

  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:

(-[WKFullscreenAnimationController configureInitialAndFinalStatesForTransition:]):
(-[WKFullScreenWindowController isFullScreen]):
(-[WKFullScreenWindowController enterFullScreen]):
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController exitFullScreen]):
(-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController _completedExitFullScreen]):
(-[WKFullScreenWindowController webViewDidRemoveFromSuperviewWhileInFullscreen]):
(-[WKFullScreenWindowController _exitFullscreenImmediately]):
(-[WKFullScreenWindowController _manager]):

  • UIProcess/mac/WebPageProxyMac.mm:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Cache/WebCacheStorageConnection.cpp:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCAAnimationRemote.mm:

(mediaTimeToCurrentTime):
(-[WKAnimationDelegate initWithLayerID:layerTreeHost:]):

  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:

(-[WKAccessibilityWebPageObjectBase accessibilityRootObjectWrapper]):

6:58 AM Changeset in webkit [239028] by Michael Catanzaro
  • 2 edits in trunk/Tools

[WPE][GTK] run-minibrowser improperly creates webkit-flatpak environment
https://bugs.webkit.org/show_bug.cgi?id=190241

Reviewed by Carlos Garcia Campos.

run-minibrowser calls into webkit-flatpak to check if a flatpak environment is available.
Currently this actually creates the directories needed for the flatpak environment. Fix it.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.clean_args):
(WebkitFlatpak.run):

6:56 AM Changeset in webkit [239027] by Michael Catanzaro
  • 2 edits in trunk/Tools

[GTK] Don't use the slice allocator
https://bugs.webkit.org/show_bug.cgi?id=192360

Reviewed by Carlos Garcia Campos.

  • MiniBrowser/gtk/main.c:

(aboutDataRequestFree):
(aboutDataRequestNew):

1:05 AM Changeset in webkit [239026] by timothy_horton@apple.com
  • 6 edits in trunk

WKWebView should support custom tintColor
https://bugs.webkit.org/show_bug.cgi?id=192518
<rdar://problem/37243261>

Reviewed by Wenson Hsieh.

Source/WebKit:

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

(-[WKContentView insertionPointColor]):
(-[WKContentView selectionBarColor]):
(-[WKContentView selectionHighlightColor]):
Grab insertion point and selection colors from UITextInputTraits.

(-[WKContentView _updateInteractionTintColor]):
Determine our effective tint color:

  • transparent if interaction is disabled
  • a CSS-derived color if caret-color style is applied
  • the _inheritedInteractionTintColor, which climbs up to the tintColor API

Apply it to our UITextInputTraits.

(-[WKContentView tintColorDidChange]):
(-[WKContentView textInputTraits]):
Call _updateInteractionTintColor whenever we create a new UITextInputTraits
or when the tint color changes.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SystemColors.mm:

(TestWebKitAPI::TEST):
Add a test that tintColor affects UITextInputTraits' interaction colors.

Dec 9, 2018:

11:54 PM Changeset in webkit [239025] by wenson_hsieh@apple.com
  • 2 edits in trunk/Tools

[iOS] DragAndDropTests.RespectsExternalSourceFidelityRankings is flaky
https://bugs.webkit.org/show_bug.cgi?id=192524

Reviewed by Ryosuke Niwa.

This test started failing on certain builds of iOS where UIKit now attempts to reveal the selection by scrolling
(see <rdar://problem/28300343>). This API test simulates two drops from external sources, both from the point
(300, 400) to (100, 300) in window coordinates. On these aforementioned builds of iOS, what happens is that the
first drop inserts text that overflows the editable region by an enormous amount, which creates an extremely
wide selection rect and increases the width of the document; revealing this selection causes the web view to
scroll horizontally, such that the second attempt to simulate a drag from (300, 400) to (100, 300) fails, since
these window coordinates no longer correspond to the drop destination element in the document.

To fix this test, we simply mark the drop destination as overflow: hidden to ensure that we don't try and
scroll horizontally after the first drop.

  • TestWebKitAPI/Tests/WebKitCocoa/autofocus-contenteditable.html:
9:30 PM Changeset in webkit [239024] by youenn@apple.com
  • 21 edits in trunk/Source

Move capture manager from RealtimeMediaSourceCenter to capture factory
https://bugs.webkit.org/show_bug.cgi?id=192542

Reviewed by Eric Carlson.

Source/WebCore:

We should be able to run mock captures in wither UIProcess or WebProcess.
Currently, mock capture is only done in WebProcess.
This patch is a first step towards that goal.

It also simplifies RealtimeMediaSourceCenter implementation by starting to remove virtual methods.
Further refactoring will remove the need to subclass RealtimeMediaSourceCenter.
Instead, remaining virtual methods will become non virtual and their
implementation will become port specific.

Removed a JS internal method that is not longer used to further simplify RealtimeMediaSourceCenter.

No visible change of behavior.
Covered by existing tests.

  • platform/mediastream/CaptureDeviceManager.h:
  • platform/mediastream/RealtimeMediaSourceCenter.cpp:

(WebCore::RealtimeMediaSourceCenter::singleton):
(WebCore::RealtimeMediaSourceCenter::getMediaStreamDevices):
(WebCore::RealtimeMediaSourceCenter::getDisplayMediaDevices):
(WebCore::RealtimeMediaSourceCenter::getUserMediaDevices):
(WebCore::RealtimeMediaSourceCenter::captureDeviceWithPersistentID):
(WebCore::RealtimeMediaSourceCenter::unsetAudioFactory):
(WebCore::RealtimeMediaSourceCenter::unsetVideoFactory):
(WebCore::RealtimeMediaSourceCenter::unsetDisplayCaptureFactory):

  • platform/mediastream/RealtimeMediaSourceCenter.h:
  • platform/mediastream/RealtimeMediaSourceFactory.h:
  • platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp:
  • platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
  • platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.cpp:
  • platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.h:
  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSourceFactory::audioCaptureDeviceManager):

  • platform/mediastream/mac/CoreAudioCaptureSource.h:
  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::MockRealtimeMediaSourceCenter::setMockRealtimeMediaSourceCenterEnabled):
(WebCore::MockRealtimeMediaSourceCenter::audioFactory):
(WebCore::MockRealtimeMediaSourceCenter::videoFactory):
(WebCore::MockRealtimeMediaSourceCenter::displayCaptureFactory):

  • platform/mock/MockRealtimeMediaSourceCenter.h:

(WebCore::MockRealtimeMediaSourceCenter::audioCaptureDeviceManager):
(WebCore::MockRealtimeMediaSourceCenter::videoCaptureDeviceManager):
(WebCore::MockRealtimeMediaSourceCenter::displayCaptureDeviceManager):

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

Source/WebKit:

Make sure to unregister for video capture as done for other capture types.
Implement manager which should be doing nothing as the manager is used for enumeration of devices
which should only happen in UIProcess.

Given that mock capture is interfering with UserMediaCaptureManager,
switching on/off mock capture will require creating a new process.
This shortcoming should be fixed once mock capture will be fully happening in
the same process as regular capture.

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::~UserMediaCaptureManager):

  • WebProcess/cocoa/UserMediaCaptureManager.h:
5:56 PM Changeset in webkit [239023] by sbarati@apple.com
  • 15 edits in trunk/Source

Enable HTTP and HTTPS proxies on iOS and make it a property of the NSURLSession
https://bugs.webkit.org/show_bug.cgi?id=192374
<rdar://problem/46506286>

Reviewed by Alex Christensen.

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Remove the now-unused SPI declaration.

Source/WebKit:

This patch makes it so that we can use HTTP/HTTPS proxies on iOS as well.
To enable on iOS, you can do something like:
$ defaults write -g WebKit2HTTPProxy -string "http://localhost:8080"
$ defaults write -g WebKit2HTTPSProxy -string "http://localhost:8080"

This patch also changes the Proxy to be enabled on a per NSURLSession
basis instead of a per process basis.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):

  • NetworkProcess/NetworkSessionCreationParameters.cpp:

(WebKit::NetworkSessionCreationParameters::privateSessionParameters):
(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):

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

(WebKit::proxyDictionary):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • NetworkProcess/mac/NetworkProcessMac.mm:

(WebKit::NetworkProcess::platformInitializeNetworkProcess):
(WebKit::overrideSystemProxies): Deleted.

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _initWithConfiguration:]):

  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:

(-[_WKWebsiteDataStoreConfiguration httpProxy]):
(-[_WKWebsiteDataStoreConfiguration setHTTPProxy:]):
(-[_WKWebsiteDataStoreConfiguration httpsProxy]):
(-[_WKWebsiteDataStoreConfiguration setHTTPSProxy:]):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeNetworkProcess):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:

(WebKit::WebsiteDataStoreConfiguration::copy):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:

(WebKit::WebsiteDataStoreConfiguration::httpProxy const):
(WebKit::WebsiteDataStoreConfiguration::setHTTPProxy):
(WebKit::WebsiteDataStoreConfiguration::httpsProxy const):
(WebKit::WebsiteDataStoreConfiguration::setHTTPSProxy):

12:17 PM Changeset in webkit [239022] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebKit

Build failure due to missing include of APIWebsiteDataStore.h
https://bugs.webkit.org/show_bug.cgi?id=192541

Reviewed by Youenn Fablet.

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: Add missing

include of APIWebsiteDataStore.h

8:43 AM Changeset in webkit [239021] by yusukesuzuki@slowstart.org
  • 2 edits in trunk/Source/WTF

Unreviewed, fix build failure on GCC 8.2, part 2

Add RefCountedArray::assign, and use it instead of operator= internally.
We should have operator=(const RefCountedArray&) since it will be automatically generated
if we do not have correct implementation here.

  • wtf/RefCountedArray.h:

(WTF::RefCountedArray::operator=):
(WTF::RefCountedArray::assign):

8:09 AM Changeset in webkit [239020] by yusukesuzuki@slowstart.org
  • 2 edits in trunk/Source/WTF

Unreviewed, fix build failure on GCC 8.2

We remove operator=<PtrTraits> call since it is not necessary.
This is a workaround. It seems that GCC 8.2 fails to parse this specialization.

  • wtf/RefCountedArray.h:
1:05 AM Changeset in webkit [239019] by wenson_hsieh@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS device] Crash when attempting to call -[_WKAttachment info] for an editable image
https://bugs.webkit.org/show_bug.cgi?id=192538

Reviewed by Tim Horton.

Fix the crash by ensuring that the result of -renderedDrawing survives long enough to be wrapped by a
RetainPtr in -PNGRepresentation. This isn't currently testable, since this codepath isn't supported on the
iOS simulator; instead, I manually verified using MobileAttachments.app.

  • UIProcess/ios/WKDrawingView.mm:

(-[WKDrawingView renderedDrawing]):

12:00 AM Changeset in webkit [239018] by commit-queue@webkit.org
  • 12 edits in trunk

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

Breaks fast/visual-viewport/tiled-drawing/zoomed-fixed-
scrolling-layers-state.html again (Requested by ap on
#webkit).

Reverted changeset:

"Allow control over child order when adding nodes to the
scrolling tree"
https://bugs.webkit.org/show_bug.cgi?id=176914
https://trac.webkit.org/changeset/239010

Dec 8, 2018:

11:09 PM Changeset in webkit [239017] by Darin Adler
  • 2 edits in trunk/Source/WTF

Fix stray-semicolon warning seen with a new version of clang in Xcode
https://bugs.webkit.org/show_bug.cgi?id=192534

Reviewed by Alexey Proskuryakov.

  • wtf/Lock.h: Removed an unneeded semicolon.
9:36 PM Changeset in webkit [239016] by eric.carlson@apple.com
  • 7 edits
    2 adds in trunk

[MediaStream] Scaled video frames should be resized in letterbox mode
https://bugs.webkit.org/show_bug.cgi?id=192528
<rdar://problem/46576638>

Reviewed by Darin Adler.

Source/WebCore:

Test: fast/mediastream/resize-letterbox.html

  • platform/graphics/cv/ImageTransferSessionVT.mm:

(WebCore::ImageTransferSessionVT::ImageTransferSessionVT): Use letterbox resize mode, not trim.

  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::captureSize const): "Capture" at the preset size, not
necessarily at the requested size to be more like a physical camera.
(WebCore::MockRealtimeVideoSource::settingsDidChange):
(WebCore::MockRealtimeVideoSource::drawAnimation):
(WebCore::MockRealtimeVideoSource::drawBoxes):
(WebCore::MockRealtimeVideoSource::drawText):
(WebCore::MockRealtimeVideoSource::generateFrame):
(WebCore::MockRealtimeVideoSource::imageBuffer const):

  • platform/mock/MockRealtimeVideoSource.h:

LayoutTests:

  • fast/mediastream/resize-letterbox-expected.txt: Added.
  • fast/mediastream/resize-letterbox.html: Added.
8:11 PM Changeset in webkit [239015] by achristensen@apple.com
  • 4 edits in trunk/Source

Don't programmatically capitalize safe browsing warning buttons
https://bugs.webkit.org/show_bug.cgi?id=192531
<rdar://problem/46417791>

Reviewed by Darin Adler.

Source/WebCore:

This doesn't work so well in other languages.
Capitalize the source strings in English instead.

  • en.lproj/Localizable.strings:

Source/WebKit:

  • UIProcess/Cocoa/WKSafeBrowsingWarning.mm:

(makeButton):

5:55 PM Changeset in webkit [239014] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Safe browsing warning should respect text size from settings
https://bugs.webkit.org/show_bug.cgi?id=192205

Reviewed by Tim Horton.

  • UIProcess/Cocoa/WKSafeBrowsingWarning.mm:

(fontWithSize):
(makeButton):
(-[WKSafeBrowsingWarning addContent]):
(-[WKSafeBrowsingWarning showDetailsClicked]):

3:53 PM Changeset in webkit [239013] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Reduce size of PropertySlot and PutPropertySlot.
https://bugs.webkit.org/show_bug.cgi?id=192526

Reviewed by Keith Miller.

With some minor adjustments, we can reduce the size of PropertySlot from 80 bytes
(19 padding bytes) to 64 bytes (3 padding bytes), and PutPropertySlot from 40
bytes (4 padding bytes) to 32 bytes (0 padding bytes but with 6 unused bits).
These measurements are for a 64-bit build.

  • runtime/PropertySlot.h:
  • runtime/PutPropertySlot.h:

(JSC::PutPropertySlot::PutPropertySlot):

2:10 PM Changeset in webkit [239012] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WTF

[WTF] Debug build fails due conflicting abort() method
https://bugs.webkit.org/show_bug.cgi?id=192491

Reviewed by Michael Catanzaro.

  • wtf/Assertions.h: Use namespaced std::abort() insted of plain abort() to avoid clashes

inside classes which have an ::abort() method, but only when cplusplus is defined to
allow inclusion of the header in plain C sources.

1:53 PM Changeset in webkit [239011] by dbates@webkit.org
  • 2 edits in trunk/Tools

Fix lldb_webkit.py following r238771
(https://bugs.webkit.org/show_bug.cgi?id=190234)

Substitute WTFURLProvider for WebCoreURLProvider in one call site that was inadvertently
missed in r238771.

  • lldb/lldb_webkit.py:

(WebCoreDocumentProvider.url):

1:08 PM Changeset in webkit [239010] by simon.fraser@apple.com
  • 12 edits in trunk

Allow control over child order when adding nodes to the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=176914
<rdar://problem/46542237>

Source/WebCore:

Patch by Frederic Wang <fwang@igalia.com> on 2018-12-08
Reviewed by Simon Fraser.

Based on an earlier patch by Simon Fraser.

Previously ScrollingCoordinator just allowed nodes to be "attached" with a given parent,
but with no control over sibling order. To allow for correct hit-testing overflow and
frame scrolling nodes, we have to build the scrolling tree in z-order.

This patch adds a 'childIndex' parameter to attachNode() which gives control over
sibling order. For now, RenderLayerCompositor always uses the default 'notFound' value
for childIndex so the current behavior (appending new nodes at the end of child list) is
preserved.

One test marked as flakey, since scrolling tree order is currently dependent on HashSet
traversal order.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::attachToStateTree):
(WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):

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

(WebCore::ScrollingCoordinator::attachToStateTree):

  • page/scrolling/ScrollingStateNode.cpp:

(WebCore::ScrollingStateNode::insertChild):
(WebCore::ScrollingStateNode::indexOfChild const):

  • page/scrolling/ScrollingStateNode.h:
  • page/scrolling/ScrollingStateTree.cpp:

(WebCore::ScrollingStateTree::nodeTypeAndParentMatch const):
(WebCore::ScrollingStateTree::attachNode):

  • page/scrolling/ScrollingStateTree.h:

Source/WebKit:

Patch by Frederic Wang <fwang@igalia.com> on 2018-12-08
Reviewed by Simon Fraser.

Based on an earlier patch by Simon Fraser.

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:

(WebKit::RemoteScrollingCoordinatorTransaction::decode):

LayoutTests:

Reviewed by Simon Fraser.

  • platform/mac-wk2/TestExpectations: Mark fast/visual-viewport/tiled-drawing/zoomed-fixed-scrolling-layers-state.html

as flakey, which it will be until we attach in z-order.

6:57 AM Changeset in webkit [239009] by dinfuehr@igalia.com
  • 4 edits in trunk/Source/JavaScriptCore

Record right offset with aligned wide instructions
https://bugs.webkit.org/show_bug.cgi?id=192006

Reviewed by Yusuke Suzuki.

Aligning bytecode instructions inserts nops into the instruction stream.
Emitting an instruction did not record the actual start of the instruction with
aligned instructions, but the nop just before the actual instruction. This was
problematic with the StaticPropertyAnalyzer that used the wrong instruction offset.

  • bytecode/InstructionStream.h:

(JSC::InstructionStream::MutableRef::clone):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::alignWideOpcode):
(JSC::BytecodeGenerator::emitCreateThis):
(JSC::BytecodeGenerator::emitNewObject):

  • generator/Opcode.rb:
5:02 AM Changeset in webkit [239008] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] check-patch-relevance failure should not mark the overall build as failure
https://bugs.webkit.org/show_bug.cgi?id=192510

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/steps.py:

(CheckPatchRelevance.start):

Dec 7, 2018:

11:35 PM Changeset in webkit [239007] by commit-queue@webkit.org
  • 30 edits in trunk/Source/WebKit

Remove unused API in NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=192415

Patch by Rob Buis <rbuis@igalia.com> on 2018-12-07
Reviewed by Alex Christensen.

This patch removed some unused API and headers in NetworkProcess.

  • NetworkProcess/NetworkCORSPreflightChecker.cpp:

(WebKit::NetworkCORSPreflightChecker::startPreflight):

  • NetworkProcess/NetworkCORSPreflightChecker.h:
  • NetworkProcess/NetworkConnectionToWebProcess.cpp:
  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkContentRuleListManager.h:
  • NetworkProcess/NetworkDataTask.cpp:
  • NetworkProcess/NetworkDataTask.h:
  • NetworkProcess/NetworkDataTaskBlob.cpp:
  • NetworkProcess/NetworkLoad.cpp:
  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/NetworkLoadChecker.cpp:
  • NetworkProcess/NetworkLoadChecker.h:
  • NetworkProcess/NetworkLoadClient.h:
  • NetworkProcess/NetworkLoadParameters.h:
  • NetworkProcess/NetworkProcess.cpp:
  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcessCreationParameters.h:
  • NetworkProcess/NetworkResourceLoadParameters.cpp:

(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):

  • NetworkProcess/NetworkResourceLoadParameters.h:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::didReceiveBuffer):

  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/NetworkSession.cpp:
  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/NetworkSocketStream.cpp:
  • NetworkProcess/NetworkSocketStream.h:
  • NetworkProcess/PingLoad.cpp:

(WebKit::PingLoad::PingLoad):

  • NetworkProcess/PingLoad.h:
  • NetworkProcess/PreconnectTask.cpp:

(WebKit::PreconnectTask::PreconnectTask):
(WebKit::PreconnectTask::frameID const): Deleted.
(WebKit::PreconnectTask::pageID const): Deleted.

  • NetworkProcess/PreconnectTask.h:
7:11 PM Changeset in webkit [239006] by eric.carlson@apple.com
  • 16 edits
    3 adds in trunk

[MediaStream] 'devicechange' event should not fire in frames that can't access capture devices
https://bugs.webkit.org/show_bug.cgi?id=192511
<rdar://problem/46562063>

Reviewed by Youenn Fablet.

Source/WebCore:

Test: http/tests/media/media-stream/device-change-event-in-iframe.html

  • Modules/mediastream/MediaDevices.cpp:

(WebCore::MediaDevices::addEventListener): Don't fire the event unless the document can
access a camera or microphone.

Source/WebKit:

  • UIProcess/UserMediaPermissionCheckProxy.cpp:

(WebKit::UserMediaPermissionCheckProxy::UserMediaPermissionCheckProxy): Remove userMediaID parameter.
(WebKit::UserMediaPermissionCheckProxy::setUserMediaAccessInfo): ID not passed to callback.

  • UIProcess/UserMediaPermissionCheckProxy.h:

(WebKit::UserMediaPermissionCheckProxy::create):
(WebKit::UserMediaPermissionCheckProxy::completionHandler): Deleted.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::generateRequestID): New.
(WebKit::UserMediaPermissionRequestManagerProxy::captureDevicesChanged): Don't notify if
the page does not have a granted request and does not have persistent access.
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame): Use generateRequestID.
(WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo): Change variable name.
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame): Use generateRequestID.

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:

LayoutTests:

  • fast/mediastream/device-change-event.html: Fix bogus title.
  • http/tests/media/media-stream/device-change-event-in-iframe-expected.txt: Added.
  • http/tests/media/media-stream/device-change-event-in-iframe.html: Added.
  • http/tests/media/media-stream/resources/device-change-iframe.html: Added.
7:10 PM Changeset in webkit [239005] by eric.carlson@apple.com
  • 3 edits in trunk/Source/WebCore

[MediaStream] Address post-review comments after r238904
https://bugs.webkit.org/show_bug.cgi?id=192514
<rdar://problem/46564302>

Reviewed by Youenn Fablet.

No new tests, no functional change.

  • platform/graphics/cv/ImageTransferSessionVT.mm:

(WebCore::ImageTransferSessionVT::setSize):

  • platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:

(WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream):

5:19 PM Changeset in webkit [239004] by Michael Catanzaro
  • 4 edits in releases/WebKitGTK/webkit-2.22

Merge r235253 - [CMake] Have checks are not getting set inside CMake properly
https://bugs.webkit.org/show_bug.cgi?id=188901

Reviewed by Michael Catanzaro.

.:

Make sure the variable's value is sent to SET_AND_EXPOSE_TO_BUILD
within the WEBKIT_CHECK_HAVE_* macros.

  • Source/cmake/WebKitFeatures.cmake:

PerformanceTests:

Add notification that MallocBench is disabled.

  • CMakeLists.txt:
5:19 PM Changeset in webkit [239003] by Michael Catanzaro
  • 2 edits in releases/WebKitGTK/webkit-2.22

Merge r237491 - Make VIDEO enabled if ENCRYPTED_MEDIA is enabled.
https://bugs.webkit.org/show_bug.cgi?id=190983

Unreviewed build update.

  • Source/cmake/WebKitFeatures.cmake:
5:19 PM Changeset in webkit [239002] by Michael Catanzaro
  • 4 edits in releases/WebKitGTK/webkit-2.22/Source/WebCore

Merge r238082 - [GTK] Silence ATK_XY_PARENT warnings
https://bugs.webkit.org/show_bug.cgi?id=191504

Reviewed by Carlos Garcia Campos.

  • accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:

(atkToContents):

  • accessibility/atk/WebKitAccessibleInterfaceText.cpp:

(textExtents):

  • accessibility/atk/WebKitAccessibleUtil.cpp:

(contentsRelativeToAtkCoordinateType):

5:19 PM Changeset in webkit [239001] by Michael Catanzaro
  • 3 edits in releases/WebKitGTK/webkit-2.22

Merge r238619 - [CMake] Automatically disable JIT and enable USE_SYSTEM_MALLOC on unfamiliar architectures
https://bugs.webkit.org/show_bug.cgi?id=186722

Reviewed by Žan Doberšek.

Time for part #2! This change was defeated for GTK and WPE by the code that makes the
options public. We have three options: (a) duplicate the architecture check currently in
WebKitFeatures.cmake in both OptionsGTK.cmake and OptionsWPE.cmake, (b) rely on the result
of that check in OptionsGTK.cmake and OptionsWPE.cmake by using ENABLE_JIT_DEFAULT and
USE_SYSTEM_MALLOC_DEFAULT, a fragile encapsulation violation, or (c) just make the options
private. They have been public up until now because they needed to be turned off on
unsupported architectures. But now they are off by default and enabled only for particular
whitelisted architectures, so they shouldn't be needed anymore.

Note we have to hide ENABLE_SAMPLING_PROFILER as well, since it needs to match the value of
ENABLE_JIT. Again, this is handled properly in WebKitFeatures.cmake, and defeated here in
OptionsGTK.cmake. (This is not a problem for WPE.)

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:
5:19 PM Changeset in webkit [239000] by Michael Catanzaro
  • 2 edits in releases/WebKitGTK/webkit-2.22

Revert "Merge r235356 - [JSC] Array.prototype.reverse modifies JSImmutableButterfly"

This reverts commit 729388b8e4bc924eacddcb4e40e0e2ae41588085.

This commit had already been backported in r236061, but was missing the 'Merged' in the commit message so I failed to find it. All I managed to accomplish here was duplicating the ChangeLog entries.

5:19 PM Changeset in webkit [238999] by Michael Catanzaro
  • 5 edits in releases/WebKitGTK/webkit-2.22

Merge r238929 - [GStreamer] -DENABLE_VIDEO=ON -DENABLE_OPENGL=OFF still tries to build GstreamerGL
https://bugs.webkit.org/show_bug.cgi?id=191998

Patch by Carlos Eduardo Ramalho <cadubentzen@gmail.com> on 2018-12-06
Reviewed by Philippe Normand.

Fix compilation with -DENABLE_VIDEO=ON and -DENABLE_OPENGL=OFF due to GStreamerGL.

.:

  • Source/cmake/GStreamerDependencies.cmake: "DEFINED ENABLE_OPENGL" is always false because ENABLE_OPENGL

is not a CMake variable (WEBKIT_OPTION_DEFINE macro does not define ENABLE_OPENGL variable per se, but other
variables and appends it to a list).

  • Source/cmake/OptionsGTK.cmake: GStreamerDefinitions.cmake was included twice by mistake. Second should be GStreamerDependencies.cmake.

Source/WebCore:

No new tests required. Only fixing the build with certain flags.

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:

(WebCore::CanvasCaptureMediaStreamTrack::Source::canvasChanged): add required #if ENABLE(WEBGL).

5:19 PM Changeset in webkit [238998] by Michael Catanzaro
  • 6 edits in releases/WebKitGTK/webkit-2.22

Merge r238928 - REGRESSION(r231043): [GTK] Undefined references to WebCore::LayerRepresentation::* with -DENABLE_OPENGL=OFF builds
https://bugs.webkit.org/show_bug.cgi?id=191997

Patch by Carlos Eduardo Ramalho <cadubentzen@gmail.com> on 2018-12-06
Reviewed by Philippe Normand.

.:

Fix build with -DENABLE_OPENGL=OFF and -DENABLE_VIDEO=OFF

  • Source/cmake/OptionsGTK.cmake: make ENABLE_ASYNC_SCROLLING depend on ENABLE_OPENGL

Source/WebCore:

Fix build with -DENABLE_OPENGL=OFF and -DENABLE_VIDEO=OFF.

No new tests required. Only fixing build.

  • platform/gtk/PlatformWheelEventGtk.cpp:

(WebCore::PlatformWheelEvent::PlatformWheelEvent): add required #if ENABLE(ASYNC_SCROLLING)

Source/WebKit:

Fix build with -DENABLE_OPENGL=OFF and -DENABLE_VIDEO=OFF.

  • Shared/WebEventConversion.cpp:

(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): add required #if ENABLE(ASYNC_SCROLLING)

5:12 PM Changeset in webkit [238997] by tzagallo@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Align the metadata table on all platforms
https://bugs.webkit.org/show_bug.cgi?id=192050
<rdar://problem/46312674>

Reviewed by Mark Lam.

Although certain platforms don't require the metadata to be aligned,
values were being concurrently read and written to ValueProfiles,
which caused crashes since these operations are not atomic on unaligned
addresses.

  • bytecode/Opcode.cpp:

(JSC::metadataAlignment):

  • bytecode/Opcode.h:
  • bytecode/UnlinkedMetadataTableInlines.h:

(JSC::UnlinkedMetadataTable::finalize):

4:45 PM Changeset in webkit [238996] by youenn@apple.com
  • 61 edits
    5 deletes in trunk/Source/ThirdParty/libwebrtc

Update libwebrtc up to 2fb890f08c
https://bugs.webkit.org/show_bug.cgi?id=192517

Reviewed by Eric Carlson.

Merge changes to track libwebrtc M72.

  • Source/webrtc/DEPS:
  • Source/webrtc/api/audio/echo_canceller3_config.h:
  • Source/webrtc/api/rtp_headers.h:
  • Source/webrtc/api/video/encoded_frame.h:
  • Source/webrtc/api/video/encoded_image.h:
  • Source/webrtc/call/rtp_transport_controller_send_interface.h:
  • Source/webrtc/call/video_receive_stream.h:
  • Source/webrtc/call/video_send_stream.h:
  • Source/webrtc/common_types.h:

(webrtc::RtcpStatistics::RtcpStatistics):
(webrtc::RtcpStatisticsCallback::~RtcpStatisticsCallback):

  • Source/webrtc/logging/rtc_event_log/rtc_event_log_impl.cc:
  • Source/webrtc/media/engine/webrtcvideoengine.cc:
  • Source/webrtc/modules/audio_coding/BUILD.gn:
  • Source/webrtc/modules/audio_coding/neteq/neteq_unittest.cc:
  • Source/webrtc/modules/audio_processing/aec3/BUILD.gn:
  • Source/webrtc/modules/audio_processing/aec3/aec_state.cc:
  • Source/webrtc/modules/audio_processing/aec3/api_call_jitter_metrics.cc: Removed.
  • Source/webrtc/modules/audio_processing/aec3/api_call_jitter_metrics.h: Removed.
  • Source/webrtc/modules/audio_processing/aec3/api_call_jitter_metrics_unittest.cc: Removed.
  • Source/webrtc/modules/audio_processing/aec3/echo_canceller3.cc:
  • Source/webrtc/modules/audio_processing/aec3/echo_canceller3.h:
  • Source/webrtc/modules/audio_processing/aec3/filter_analyzer.cc:
  • Source/webrtc/modules/audio_processing/aec3/filter_analyzer.h:
  • Source/webrtc/modules/audio_processing/aec3/suppression_gain.cc:
  • Source/webrtc/modules/rtp_rtcp/BUILD.gn:
  • Source/webrtc/modules/rtp_rtcp/include/receive_statistics.h:
  • Source/webrtc/modules/rtp_rtcp/include/rtcp_statistics.h: Removed.
  • Source/webrtc/modules/rtp_rtcp/include/rtp_rtcp.h:
  • Source/webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h:
  • Source/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h:
  • Source/webrtc/modules/rtp_rtcp/source/rtp_header_extension_map.cc:
  • Source/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc:
  • Source/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h:

(webrtc::HdrMetadataExtension::ValueSize):

  • Source/webrtc/modules/rtp_rtcp/source/rtp_packet_received.cc:
  • Source/webrtc/modules/rtp_rtcp/source/rtp_packet_unittest.cc:
  • Source/webrtc/modules/rtp_rtcp/source/rtp_utility.cc:
  • Source/webrtc/modules/video_coding/codecs/test/videocodec_test_libvpx.cc:
  • Source/webrtc/modules/video_coding/codecs/vp9/test/vp9_impl_unittest.cc:
  • Source/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc:
  • Source/webrtc/modules/video_coding/codecs/vp9/vp9_impl.h:
  • Source/webrtc/modules/video_coding/encoded_frame.h:

(webrtc::VCMEncodedFrame::video_timing_mutable):
(webrtc::VCMEncodedFrame::SetCodecSpecific):

  • Source/webrtc/modules/video_coding/frame_buffer2.cc:
  • Source/webrtc/modules/video_coding/frame_buffer2.h:
  • Source/webrtc/modules/video_coding/frame_buffer2_unittest.cc:
  • Source/webrtc/modules/video_coding/frame_object.cc:
  • Source/webrtc/modules/video_coding/rtp_frame_reference_finder.cc:
  • Source/webrtc/p2p/base/p2ptransportchannel.cc:
  • Source/webrtc/p2p/base/p2ptransportchannel_unittest.cc:
  • Source/webrtc/p2p/base/port.cc:
  • Source/webrtc/p2p/base/port.h:
  • Source/webrtc/p2p/client/basicportallocator.cc:
  • Source/webrtc/p2p/client/basicportallocator.h:
  • Source/webrtc/p2p/client/basicportallocator_unittest.cc:
  • Source/webrtc/pc/peerconnection.cc:
  • Source/webrtc/pc/rtcstats_integrationtest.cc:
  • Source/webrtc/pc/test/peerconnectiontestwrapper.cc:
  • Source/webrtc/pc/test/peerconnectiontestwrapper.h:
  • Source/webrtc/rtc_base/stringize_macros.h:
  • Source/webrtc/sdk/objc/components/video_codec/nalu_rewriter_unittest.cc: Removed.
  • Source/webrtc/test/fuzzers/rtp_packet_fuzzer.cc:
  • Source/webrtc/tools_webrtc/ios/internal.client.webrtc/iOS64_Perf.json:
  • Source/webrtc/tools_webrtc/ios/internal.tryserver.webrtc/ios_arm64_perf.json:
  • Source/webrtc/tools_webrtc/whitespace.txt:
  • Source/webrtc/video/report_block_stats.h:
  • Source/webrtc/video/rtp_video_stream_receiver.cc:
  • Source/webrtc/video/video_receive_stream.cc:
4:26 PM Changeset in webkit [238995] by Antti Koivisto
  • 18 edits
    2 moves in trunk/Source/WebCore

[LFC] Rename LayoutFormattingState files to LayoutState
https://bugs.webkit.org/show_bug.cgi?id=192520

Reviewed by Zalan Bujtas.

Match the class name.

  • layout/FormattingContext.cpp:
  • layout/FormattingContextQuirks.cpp:
  • layout/FormattingState.h:
  • layout/LayoutFormattingState.cpp: Removed.
  • layout/LayoutFormattingState.h: Removed.
  • layout/LayoutState.cpp: Copied from Source/WebCore/layout/LayoutFormattingState.cpp.
  • layout/LayoutState.h: Copied from Source/WebCore/layout/LayoutFormattingState.h.
  • layout/Verification.cpp:
  • layout/blockformatting/BlockFormattingContext.cpp:
  • layout/blockformatting/BlockFormattingContextQuirks.cpp:
  • layout/blockformatting/BlockInvalidation.cpp:
  • layout/floats/FloatAvoider.cpp:
  • layout/floats/FloatingContext.cpp:
  • layout/floats/FloatingState.cpp:
  • layout/inlineformatting/InlineFormattingContext.cpp:
  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:
  • layout/inlineformatting/InlineInvalidation.cpp:
  • layout/layouttree/LayoutTreeBuilder.cpp:
  • page/FrameViewLayoutContext.cpp:
4:26 PM Changeset in webkit [238994] by Michael Catanzaro
  • 2 edits in releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore

Merge r236554 - JITMathIC should not use integer offsets into machine code.
https://bugs.webkit.org/show_bug.cgi?id=190030
<rdar://problem/44803307>

Reviewed by Saam Barati.

We'll replace them with CodeLocation smart pointers instead.

  • jit/JITMathIC.h:

(JSC::isProfileEmpty):

4:25 PM Changeset in webkit [238993] by Michael Catanzaro
  • 6 edits in releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore

Merge r236587 - ByValInfo should not use integer offsets.
https://bugs.webkit.org/show_bug.cgi?id=190070
<rdar://problem/44803430>

Reviewed by Saam Barati.

Also moved some fields around to allow the ByValInfo struct to be more densely packed.

  • bytecode/ByValInfo.h:

(JSC::ByValInfo::ByValInfo):

  • jit/JIT.cpp:

(JSC::JIT::link):

  • jit/JITOpcodes.cpp:

(JSC::JIT::privateCompileHasIndexedProperty):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::privateCompileHasIndexedProperty):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::privateCompileGetByVal):
(JSC::JIT::privateCompileGetByValWithCachedId):
(JSC::JIT::privateCompilePutByVal):
(JSC::JIT::privateCompilePutByValWithCachedId):

4:25 PM Changeset in webkit [238992] by Michael Catanzaro
  • 6 edits in releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore

Merge r236576 - DFG::OSREntry::m_machineCodeOffset should be a CodeLocation.
https://bugs.webkit.org/show_bug.cgi?id=190054
<rdar://problem/44803543>

Reviewed by Saam Barati.

  • dfg/DFGJITCode.h:

(JSC::DFG::JITCode::appendOSREntryData):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::noticeOSREntry):

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::OSREntryData::dumpInContext const):
(JSC::DFG::prepareOSREntry):

  • dfg/DFGOSREntry.h:
  • runtime/JSCPtrTag.h:
4:25 PM Changeset in webkit [238991] by Michael Catanzaro
  • 5 edits in releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore

Merge r236585 - DFG::OSRExit::m_patchableCodeOffset should not be an int
https://bugs.webkit.org/show_bug.cgi?id=190066
<rdar://problem/39498244>

Reviewed by Mark Lam.

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::linkOSRExits):
(JSC::DFG::JITCompiler::link):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::codeLocationForRepatch const):
(JSC::DFG::OSRExit::compileOSRExit):
(JSC::DFG::OSRExit::setPatchableCodeOffset): Deleted.
(JSC::DFG::OSRExit::getPatchableCodeOffsetAsJump const): Deleted.
(JSC::DFG::OSRExit::correctJump): Deleted.

  • dfg/DFGOSRExit.h:
  • dfg/DFGOSRExitCompilationInfo.h:
4:25 PM Changeset in webkit [238990] by Michael Catanzaro
  • 4 edits in releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore

Merge r236584 - Don't use int offsets in StructureStubInfo
https://bugs.webkit.org/show_bug.cgi?id=190064
<rdar://problem/44784719>

Reviewed by Mark Lam.

  • bytecode/InlineAccess.cpp:

(JSC::linkCodeInline):

  • bytecode/StructureStubInfo.h:

(JSC::StructureStubInfo::slowPathCallLocation):
(JSC::StructureStubInfo::doneLocation):
(JSC::StructureStubInfo::slowPathStartLocation):

  • jit/JITInlineCacheGenerator.cpp:

(JSC::JITInlineCacheGenerator::finalize):

4:25 PM Changeset in webkit [238989] by Michael Catanzaro
  • 6 edits
    1 add in releases/WebKitGTK/webkit-2.22

Merge r236161 - Ensure that ForInContexts are invalidated if their loop local is over-written.
https://bugs.webkit.org/show_bug.cgi?id=189571
<rdar://problem/44402277>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-189571.js: Added.

Source/JavaScriptCore:

Instead of hunting down every place in the BytecodeGenerator that potentially
needs to invalidate an enclosing ForInContext (if one exists), we simply iterate
the bytecode range of the loop body when the ForInContext is popped, and
invalidate the context if we ever find the loop temp variable over-written.

This has 2 benefits:

  1. It ensures that every type of opcode that can write to the loop temp will be handled appropriately, not just the op_mov that we've hunted down.
  2. It avoids us having to check the BytecodeGenerator's m_forInContextStack every time we emit an op_mov (or other opcodes that can write to a local) even when we're not inside a for-in loop.

JSC benchmarks show that that this change is performance neutral.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::pushIndexedForInScope):
(JSC::BytecodeGenerator::popIndexedForInScope):
(JSC::BytecodeGenerator::pushStructureForInScope):
(JSC::BytecodeGenerator::popStructureForInScope):
(JSC::ForInContext::finalize):
(JSC::StructureForInContext::finalize):
(JSC::IndexedForInContext::finalize):
(JSC::BytecodeGenerator::invalidateForInContextForLocal): Deleted.

  • bytecompiler/BytecodeGenerator.h:

(JSC::ForInContext::ForInContext):
(JSC::ForInContext::bodyBytecodeStartOffset const):
(JSC::StructureForInContext::StructureForInContext):
(JSC::IndexedForInContext::IndexedForInContext):

  • bytecompiler/NodesCodegen.cpp:

(JSC::PostfixNode::emitResolve):
(JSC::PrefixNode::emitResolve):
(JSC::ReadModifyResolveNode::emitBytecode):
(JSC::AssignResolveNode::emitBytecode):
(JSC::EmptyLetExpression::emitBytecode):
(JSC::ForInNode::emitLoopHeader):
(JSC::ForOfNode::emitBytecode):
(JSC::BindingNode::bindValue const):
(JSC::AssignmentElementNode::bindValue const):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

4:25 PM Changeset in webkit [238988] by Michael Catanzaro
  • 3 edits in releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore

Merge r236018 - Refactor some ForInContext code for better encapsulation.
https://bugs.webkit.org/show_bug.cgi?id=189626
<rdar://problem/44466415>

Reviewed by Keith Miller.

  1. Add a ForInContext::m_type field to store the context type. This does not increase the class size, but eliminates the need for a virtual call to get the type.

Note: we still need a virtual destructor because we'll be mingling
IndexedForInContexts and StructureForInContexts in the BytecodeGenerator::m_forInContextStack.

  1. Add ForInContext::isIndexedForInContext() and ForInContext::isStructureForInContext() convenience methods.
  1. Add ForInContext::asIndexedForInContext() and ForInContext::asStructureForInContext() to do the casting to the subclass types. This ensures that we'll properly assert that the casting is legal.
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitGetByVal):
(JSC::BytecodeGenerator::popIndexedForInScope):
(JSC::BytecodeGenerator::popStructureForInScope):

  • bytecompiler/BytecodeGenerator.h:

(JSC::ForInContext::type const):
(JSC::ForInContext::isIndexedForInContext const):
(JSC::ForInContext::isStructureForInContext const):
(JSC::ForInContext::asIndexedForInContext):
(JSC::ForInContext::asStructureForInContext):
(JSC::ForInContext::ForInContext):
(JSC::StructureForInContext::StructureForInContext):
(JSC::IndexedForInContext::IndexedForInContext):
(JSC::ForInContext::~ForInContext): Deleted.

4:25 PM Changeset in webkit [238987] by Michael Catanzaro
  • 2 edits in releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore

Revert "[GTK] Cannot make debug builds of JSC using release 2.22.3"

This reverts commit 4f5957964086375c1ada9728c533e7beb4ea3c86.

This was needed due to an error backporting the previous commit, which I am about to re-backport without conflicts.

4:25 PM Changeset in webkit [238986] by Michael Catanzaro
  • 6 edits
    1 delete in releases/WebKitGTK/webkit-2.22

Revert "Merged r236161 - Ensure that ForInContexts are invalidated if their loop local is over-written. https://bugs.webkit.org/show_bug.cgi?id=189571 <rdar://problem/44402277>"

This reverts commit 3fec08985ee04d132fd0dfcbb77709e9a73c5477.

Going to try backporting this again after first backporting an older commit. The history is a bit difficult otherwise.

4:25 PM Changeset in webkit [238985] by Michael Catanzaro
  • 2 edits in releases/WebKitGTK/webkit-2.22

Merge r235356 - [JSC] Array.prototype.reverse modifies JSImmutableButterfly
https://bugs.webkit.org/show_bug.cgi?id=188794

Reviewed by Saam Barati.

JSTests:

  • stress/reverse-with-immutable-butterfly.js: Added.

(shouldBe):
(reverseInt):
(reverseDouble):
(reverseContiguous):

Source/JavaScriptCore:

While Array.prototype.reverse modifies the butterfly of the given Array,
it does not account JSImmutableButterfly case. So it accidentally modifies
the content of JSImmutableButterfly.
This patch converts CoW arrays to writable arrays before reversing.

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncReverse):

  • runtime/JSObject.h:

(JSC::JSObject::ensureWritable):

4:25 PM Changeset in webkit [238984] by Michael Catanzaro
  • 4 edits in releases/WebKitGTK/webkit-2.22/Source/WebKit

Merge r236227 - Crash under WebPageProxy::decidePolicyForNavigationAction()
https://bugs.webkit.org/show_bug.cgi?id=189763
<rdar://problem/44597111>

Reviewed by Alex Christensen.

Update WebNavigationState::navigation() / WebNavigationState::takeNavigation()
to return a pointer instead of a reference as we have evidence that they can
return null. I kept the debug assertions to try and catch the cases where we
return null but at least we stop crashing in release builds.

  • UIProcess/WebNavigationState.cpp:

(WebKit::WebNavigationState::navigation):
(WebKit::WebNavigationState::takeNavigation):

  • UIProcess/WebNavigationState.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForResponse):

4:25 PM Changeset in webkit [238983] by Michael Catanzaro
  • 2 edits in releases/WebKitGTK/webkit-2.22/Source/WebCore

Merge r238788 - Lifetime of HTMLMediaElement is not properly handled in asynchronous actions
https://bugs.webkit.org/show_bug.cgi?id=192087
<rdar://problem/45975230>

Reviewed by Dean Jackson.

The HTMLMediaElement performs operations that allow arbitrary JavaScript to run. We need to make
sure the active media element is protected until those calls complete.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::didFinishInsertingNode):
(WebCore::HTMLMediaElement::exitFullscreen):
(WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured):
(WebCore::HTMLMediaElement::scheduleConfigureTextTracks):
(WebCore::HTMLMediaElement::scheduleMediaEngineWasUpdated):
(WebCore::HTMLMediaElement::scheduleUpdatePlayState):
(WebCore::HTMLMediaElement::scheduleUpdateMediaState):

4:25 PM Changeset in webkit [238982] by Michael Catanzaro
  • 16 edits
    1 copy
    7 adds in releases/WebKitGTK/webkit-2.22

Merge r238562 - Disallow loading webarchives as iframes
https://bugs.webkit.org/show_bug.cgi?id=191728
<rdar://problem/45524528>

Reviewed by Youenn Fablet.

Source/WebCore:

Disallow loading webarchives as iframes. We don't allow loading remote webarchives.
Now, this policy is hardened to disallow loading webarchives as iframes for local
documents as well.

To allow old tests still be able to run, a flag is added to always allow loading local
webarchives in document. The flag can be set via window.internals.

Tests: webarchive/loading/test-loading-archive-subresource.html

webarchive/loading/test-loading-top-archive.html

  • dom/Document.h:

(WebCore::Document::setAlwaysAllowLocalWebarchive):
(WebCore::Document::alwaysAllowLocalWebarchive):

  • loader/DocumentLoader.cpp:

(WebCore::disallowWebArchive):
(WebCore::DocumentLoader::continueAfterContentPolicy):
(WebCore::isRemoteWebArchive): Deleted.

  • testing/Internals.cpp:

(WebCore::Internals::setAlwaysAllowLocalWebarchive const):

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

Source/WebKit:

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::unableToImplementPolicy):
Add a check to prevent null pointer dereference.

LayoutTests:

  • platform/mac-wk1/webarchive/loading/test-loading-archive-subresource-expected.txt: Added.
  • platform/mac/fast/loader/webarchive-encoding-respected.html:
  • webarchive/loading/cache-expired-subresource.html:
  • webarchive/loading/mainresource-null-mimetype-crash.html:
  • webarchive/loading/missing-data.html:
  • webarchive/loading/resources/test-loading-archive-main.webarchive: Copied from LayoutTests/webarchive/loading/test-loading-archive.html.
  • webarchive/loading/test-loading-archive-subresource-expected.txt: Added.
  • webarchive/loading/test-loading-archive-subresource-null-mimetype.html:
  • webarchive/loading/test-loading-archive-subresource.html: Copied from LayoutTests/webarchive/loading/test-loading-archive.html.
  • webarchive/loading/test-loading-archive.html:
  • webarchive/loading/test-loading-top-archive-expected.txt: Added.
  • webarchive/loading/test-loading-top-archive.html: Added.
4:25 PM Changeset in webkit [238981] by Michael Catanzaro
  • 3 edits
    1 add
    1 delete in releases/WebKitGTK/webkit-2.22

Merge r238270 - RegExpObject's collectMatches should not be using JSArray::push to fill in its match results.
https://bugs.webkit.org/show_bug.cgi?id=191730
<rdar://problem/46048517>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-187006.js: Removed.
    • this test is invalid because its sole purpose is to test for the non-spec compliant behavior that we just fixed.
  • stress/regress-191730.js: Added.

Source/JavaScriptCore:

According to the spec https://www.ecma-international.org/ecma-262/9.0/index.html#sec-regexp.prototype-@@match,
the RegExp match results are filled in using the spec's CreateDataProperty()
function which does not consult the prototype for setters. JSArray:push()
consults the prototype for setters. We should be using putDirectIndex() instead.

  • runtime/RegExpObjectInlines.h:

(JSC::collectMatches):

4:25 PM Changeset in webkit [238980] by Michael Catanzaro
  • 4 edits
    1 add in releases/WebKitGTK/webkit-2.22

Merge r238267 - RegExp operations should not take fast patch if lastIndex is not numeric.
https://bugs.webkit.org/show_bug.cgi?id=191731
<rdar://problem/46017305>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-191731.js: Added.

Source/JavaScriptCore:

This is because if lastIndex is an object with a valueOf() method, it can execute
arbitrary code which may have side effects, and side effects are not permitted by
the RegExp fast paths.

  • builtins/RegExpPrototype.js:

(globalPrivate.hasObservableSideEffectsForRegExpMatch):
(overriddenName.string_appeared_here.search):
(globalPrivate.hasObservableSideEffectsForRegExpSplit):
(intrinsic.RegExpTestIntrinsic.test):

  • builtins/StringPrototype.js:

(globalPrivate.hasObservableSideEffectsForStringReplace):

4:25 PM Changeset in webkit [238979] by Michael Catanzaro
  • 6 edits
    3 adds in releases/WebKitGTK/webkit-2.22

Merge r238326 - All users of ArrayBuffer should agree on the same max size
https://bugs.webkit.org/show_bug.cgi?id=191771

Reviewed by Mark Lam.

JSTests:

  • stress/big-wasm-memory-grow-no-max.js: Added.

(foo):
(catch):

  • stress/big-wasm-memory-grow.js: Added.

(foo):
(catch):

  • stress/big-wasm-memory.js: Added.

(foo):
(catch):

Source/JavaScriptCore:

Array buffers cannot be larger than 0x7fffffff, because otherwise loading typedArray.length in the DFG/FTL would produce
a uint32 or would require a signedness check, neither of which sounds reasonable. It's better to just bound their max size
instead.

  • runtime/ArrayBuffer.cpp:

(JSC::ArrayBufferContents::ArrayBufferContents):
(JSC::ArrayBufferContents::tryAllocate):
(JSC::ArrayBufferContents::transferTo):
(JSC::ArrayBufferContents::copyTo):
(JSC::ArrayBufferContents::shareWith):

  • runtime/ArrayBuffer.h:
  • wasm/WasmMemory.cpp:

(JSC::Wasm::Memory::tryCreate):
(JSC::Wasm::Memory::grow):

  • wasm/WasmPageCount.h:
4:25 PM Changeset in webkit [238978] by Michael Catanzaro
  • 4 edits
    1 copy
    1 add in releases/WebKitGTK/webkit-2.22

Merge r238877 - Don't report resource timing to parent frame for history items
https://bugs.webkit.org/show_bug.cgi?id=192273
<rdar://problem/45163764>

Reviewed by Youenn Fablet.

Source/WebCore:

We should not report history items to its parent frame as those are less
interested to its parent and might not be the first navigation in the iframes.

This change aligns the behavior when a cached document is not available for the
history item with the available case as we don't report resource timing for any
cached main document.

Test: http/tests/misc/resource-timing-navigation-in-restored-iframe-2.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadDifferentDocumentItem):

LayoutTests:

  • http/tests/misc/resource-timing-navigation-in-restored-iframe-2-expected.txt: Added.
  • http/tests/misc/resource-timing-navigation-in-restored-iframe-2.html: Copied from LayoutTests/http/tests/misc/resource-timing-navigation-in-restored-iframe.html.
  • http/tests/misc/resource-timing-navigation-in-restored-iframe.html:
4:24 PM Changeset in webkit [238977] by Michael Catanzaro
  • 3 edits in releases/WebKitGTK/webkit-2.22/Source/WebKit

Merge r238798 - Alignment padding needs to be zeroed out in IPC::Encoder
https://bugs.webkit.org/show_bug.cgi?id=192304

Reviewed by Chris Dumez.

Might be useful to make a regression test for this, but I couldn't find any
other tests for this code.

  • Platform/IPC/Encoder.cpp:

(IPC::Encoder::grow): Use std::memset to zero-fill padding bytes.

  • UIProcess/mac/LegacySessionStateCoding.cpp:

(WebKit::HistoryEntryDataEncoder::grow): Ditto.

4:24 PM Changeset in webkit [238976] by Michael Catanzaro
  • 2 edits in releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore

Merge r238578 - [Re-landing] NaNs read from Wasm code needs to be be purified.
https://bugs.webkit.org/show_bug.cgi?id=191056
<rdar://problem/45660341>

Reviewed by Filip Pizlo.

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::link):

4:24 PM Changeset in webkit [238975] by Michael Catanzaro
  • 4 edits
    1 add in releases/WebKitGTK/webkit-2.22

Merge r238408 - Return nullptr immediately if the key doesn't exist in the HashMap.
https://bugs.webkit.org/show_bug.cgi?id=191841

Reviewed by Chris Dumez.
Source/WebKit:

  • Shared/API/APIDictionary.h:

Tools:

Add a test that would crash prior to the fix for this bug.

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

(TestWebKitAPI::TEST):

4:24 PM Changeset in webkit [238974] by Michael Catanzaro
  • 2 edits in releases/WebKitGTK/webkit-2.22/Source/WTF

Merge r236969 - StringTypeAdapter constructor is not properly enforcing String::MaxLength.
https://bugs.webkit.org/show_bug.cgi?id=190392
<rdar://problem/45116210>

Reviewed by Saam Barati.

Previously, the StringTypeAdapter constructor for a UChar* string was summing the
unsigned length of the source string without an overflow check. We now make that
length a size_t which removes this issue, and assert that it's within
String::MaxLength thereafter.

Also made the StringTypeAdapter constructor for a LChar* string behave in an
equivalent manner for consistency. In both cases, we'll crash in a RELEASE_ASSERT
if the source string length exceeds String::MaxLength.

  • wtf/text/StringConcatenate.h:
4:24 PM Changeset in webkit [238973] by Michael Catanzaro
  • 10 edits
    1 add in releases/WebKitGTK/webkit-2.22

Merge r236804 - Make string MaxLength for all WTF and JS strings consistently equal to INT_MAX.
https://bugs.webkit.org/show_bug.cgi?id=190187
<rdar://problem/42512909>

Reviewed by Michael Saboff.

JSTests:

  • stress/regress-190187.js: Added.

Source/JavaScriptCore:

Allowing different max string lengths at each level opens up opportunities for
bugs to creep in. With 2 different max length values, it is more difficult to
keep the story straight on how we do overflow / bounds checks at each place in
the code. It's also difficult to tell if a seemingly valid check at the WTF level
will have bad ramifications at the JSC level. Also, it's also not meaningful to
support a max length > INT_MAX. To eliminate this class of bugs, we'll
standardize on a MaxLength of INT_MAX at all levels.

We'll also standardize the way we do length overflow checks on using
CheckedArithmetic, and add some asserts to document the assumptions of the code.

  • runtime/FunctionConstructor.cpp:

(JSC::constructFunctionSkippingEvalEnabledCheck):

  • Fix OOM error handling which crashed a test after the new MaxLength was applied.
  • runtime/JSString.h:

(JSC::JSString::finishCreation):
(JSC::JSString::createHasOtherOwner):
(JSC::JSString::setLength):

  • runtime/JSStringInlines.h:

(JSC::jsMakeNontrivialString):

  • runtime/Operations.h:

(JSC::jsString):

Source/WTF:

  • wtf/text/StringConcatenate.h:

(WTF::tryMakeStringFromAdapters):
(WTF::sumWithOverflow): Deleted.

  • wtf/text/StringImpl.h:
  • wtf/text/WTFString.h:
3:56 PM Changeset in webkit [238972] by Chris Dumez
  • 2 edits in trunk/Tools

ProcessSwap.UseSessionCookiesAfterProcessSwapInPrivateBrowsing API test is failing
https://bugs.webkit.org/show_bug.cgi?id=192362
<rdar://problem/46460360>

Reviewed by Ryosuke Niwa.

Move the call to _setCookieAcceptPolicy *after* we've constructed a WKWebView and thus
*after* we know for sure we have a network process to communicate the policy to.
This should address the failures on iOS.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
3:38 PM Changeset in webkit [238971] by youenn@apple.com
  • 1 edit
    1 delete in trunk/Source/ThirdParty/libwebrtc

Update libwebrtc up to 0d007d7c4f
https://bugs.webkit.org/show_bug.cgi?id=192316
<rdar://problem/46563726>

Unreviewed.

  • Source/webrtc/data/voice_engine/stereo_rtp_files/rtpplay.exe: Removed.

Unneeded file.

3:14 PM Changeset in webkit [238970] by jiewen_tan@apple.com
  • 2 edits in trunk/Tools

Add keychain access entitlement to WebKitTestRunnerApp
https://bugs.webkit.org/show_bug.cgi?id=192489
<rdar://problem/45057952>

Reviewed by Alexey Proskuryakov.

  • WebKitTestRunner/Configurations/WebKitTestRunnerApp-iOS.entitlements:
2:35 PM Changeset in webkit [238969] by sbarati@apple.com
  • 5 edits
    3 adds in trunk

WKWebProcessPlugInLoadDelegate should have API for saying which rendering events it wants to listen for
https://bugs.webkit.org/show_bug.cgi?id=192473

Reviewed by Andy Estes.

Source/WebKit:

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(PageLoaderClient::layoutMilestones const):

Tools:

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

(-[DidFirstMeaningfulPaintRemoteObject didFirstMeaningfulPaint]):
(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/RenderingProgressPlugIn.mm: Added.

(-[RenderingProgressPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[RenderingProgressPlugIn webProcessPlugInBrowserContextControllerRenderingProgressEvents:]):
(-[RenderingProgressPlugIn webProcessPlugInBrowserContextController:renderingProgressDidChange:]):

  • TestWebKitAPI/Tests/WebKitCocoa/RenderingProgressProtocol.h: Added.
1:57 PM Changeset in webkit [238968] by justin_michaud@apple.com
  • 9 edits in trunk/Source/WebCore

CSS Painting API code cleanup
https://bugs.webkit.org/show_bug.cgi?id=192480

Reviewed by Dean Jackson.

No new tests, since the existing tests should cover it.

  • bindings/js/JSDOMWrapper.cpp:

(WebCore::outputConstraintSubspaceFor):
(WebCore::globalObjectOutputConstraintSubspaceFor):

  • bindings/js/JSWorkletGlobalScopeBase.cpp:

(WebCore::toJS):

  • css/CSSPaintCallback.h:
  • platform/graphics/CustomPaintImage.cpp:

(WebCore::CustomPaintImage::doCustomPaint):

  • platform/graphics/CustomPaintImage.h:
  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::addCustomPaintWatchProperty):
(WebCore::changedCustomPaintWatchedProperty):
(WebCore::RenderStyle::changeRequiresRepaint const):

  • worklets/PaintWorkletGlobalScope.cpp:

(WebCore::PaintWorkletGlobalScope::registerPaint):

  • worklets/PaintWorkletGlobalScope.h:
1:38 PM Changeset in webkit [238967] by youenn@apple.com
  • 1889 edits
    268 adds
    121 deletes in trunk/Source

Update libwebrtc up to 0d007d7c4f
https://bugs.webkit.org/show_bug.cgi?id=192316

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Updating to latest libwebrtc will allows cherry-picking important bug fixes.

  • Configurations/libwebrtc.iOS.exp:
  • Configurations/libwebrtc.iOSsim.exp:
  • Configurations/libwebrtc.mac.exp:
  • Source/third_party/abseil-cpp: refreshed.
  • Source/webrtc: refreshed.
  • WebKit/0001-libwebrtc-changes.patch: Removed.
  • libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

Update include according new libwebrtc.

  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

Source/WebKit:

Update code base according new libwebrtc backend
In particular, use directly int64_t for packet time.

  • Configurations/WebKit.xcconfig:
  • NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:

(WebKit::LibWebRTCSocketClient::signalReadPacket):

  • NetworkProcess/webrtc/LibWebRTCSocketClient.h:
  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:
  • NetworkProcess/webrtc/NetworkRTCSocket.h:
  • WebProcess/Network/webrtc/LibWebRTCSocket.cpp:

(WebKit::LibWebRTCSocket::signalReadPacket):

1:15 PM Changeset in webkit [238966] by jbedard@apple.com
  • 2 edits in trunk/Tools

REGRESSION: run-webkit-tests may fail when using booted simulators (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=192470
<rdar://problem/46532001>

Unreviewed infrastructure fix.

  • Scripts/webkitpy/port/device_port.py:

(DevicePort.setup_test_run): Check that the number of initialized devices matches the
number of child processes.

1:10 PM Changeset in webkit [238965] by dino@apple.com
  • 6 edits
    2 adds in trunk/Source/WebCore

[iOS] Make WebGPU work with remote layer hosting
https://bugs.webkit.org/show_bug.cgi?id=192508
<rdar://problem/46560649>

Reviewed by Tim Horton.

WebGPU wasn't working on iOS because we were not correctly
identifying the CALayers for remote hosting. Fix this by
adding a new CALayer type, WebGPULayer. This will also
eventually hold the code to render WebGPU into a canvas.

Covered by the existing reference tests (on device).

  • SourcesCocoa.txt: Add new files.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Recognise the WebGPULayer

class for remote hosting.
(WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
(WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):

  • platform/graphics/cocoa/WebGPULayer.h: Added. Very simple inheritance

from CAMetalLayer.

  • platform/graphics/cocoa/WebGPULayer.mm: Added.

(-[WebGPULayer init]):
(-[WebGPULayer copyImageSnapshotWithColorSpace:]):

  • platform/graphics/gpu/GPUSwapChain.h: Reference WebGPULayer rather

than CALayer.

  • platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm: Ensure that

the WebGPULayer has a reference back to this object, which it
will use in the future.
(WebCore::GPUSwapChain::create):
(WebCore::GPUSwapChain::GPUSwapChain):

12:41 PM Changeset in webkit [238964] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[ MacOS Debug ] Layout Test webgl/2.0.0/conformance2/textures/misc/tex-unpack-params.html is flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=190892

Unreviewed test gardening.

  • platform/mac/TestExpectations:
12:10 PM Changeset in webkit [238963] by Antti Koivisto
  • 26 edits
    2 moves in trunk/Source/WebCore

Rename LayoutState to RenderLayoutState
https://bugs.webkit.org/show_bug.cgi?id=192504

Reviewed by Zalan Bujtas.

The name is better used in LFC.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • page/FrameViewLayoutContext.cpp:

(WebCore::FrameViewLayoutContext::layoutState const):
(WebCore::FrameViewLayoutContext::pushLayoutState):
(WebCore::FrameViewLayoutContext::pushLayoutStateForPaginationIfNeeded):

  • page/FrameViewLayoutContext.h:
  • rendering/LayoutState.cpp: Removed.
  • rendering/LayoutState.h: Removed.
  • rendering/RenderBlock.cpp:
  • rendering/RenderBlock.h:
  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):

  • rendering/RenderBlockLineLayout.cpp:
  • rendering/RenderBox.cpp:
  • rendering/RenderEmbeddedObject.cpp:
  • rendering/RenderFragmentedFlow.cpp:
  • rendering/RenderGrid.cpp:
  • rendering/RenderImage.cpp:
  • rendering/RenderInline.cpp:
  • rendering/RenderLayoutState.cpp: Copied from Source/WebCore/rendering/LayoutState.cpp.

(WebCore::RenderLayoutState::RenderLayoutState):
(WebCore::RenderLayoutState::computeOffsets):
(WebCore::RenderLayoutState::computeClipRect):
(WebCore::RenderLayoutState::computePaginationInformation):
(WebCore::RenderLayoutState::pageLogicalOffset const):
(WebCore::RenderLayoutState::computeLineGridPaginationOrigin):
(WebCore::RenderLayoutState::propagateLineGridInfo):
(WebCore::RenderLayoutState::establishLineGrid):
(WebCore::RenderLayoutState::addLayoutDelta):
(WebCore::RenderLayoutState::layoutDeltaMatches const):
(WebCore::LayoutState::LayoutState): Deleted.
(WebCore::LayoutState::computeOffsets): Deleted.
(WebCore::LayoutState::computeClipRect): Deleted.
(WebCore::LayoutState::computePaginationInformation): Deleted.
(WebCore::LayoutState::pageLogicalOffset const): Deleted.
(WebCore::LayoutState::computeLineGridPaginationOrigin): Deleted.
(WebCore::LayoutState::propagateLineGridInfo): Deleted.
(WebCore::LayoutState::establishLineGrid): Deleted.
(WebCore::LayoutState::addLayoutDelta): Deleted.
(WebCore::LayoutState::layoutDeltaMatches const): Deleted.

  • rendering/RenderLayoutState.h: Copied from Source/WebCore/rendering/LayoutState.h.

(WebCore::RenderLayoutState::RenderLayoutState):
(WebCore::LayoutState::LayoutState): Deleted.
(WebCore::LayoutState::isPaginated const): Deleted.
(WebCore::LayoutState::pageLogicalHeight const): Deleted.
(WebCore::LayoutState::pageLogicalHeightChanged const): Deleted.
(WebCore::LayoutState::lineGrid const): Deleted.
(WebCore::LayoutState::lineGridOffset const): Deleted.
(WebCore::LayoutState::lineGridPaginationOrigin const): Deleted.
(WebCore::LayoutState::paintOffset const): Deleted.
(WebCore::LayoutState::layoutOffset const): Deleted.
(WebCore::LayoutState::pageOffset const): Deleted.
(WebCore::LayoutState::needsBlockDirectionLocationSetBeforeLayout const): Deleted.
(WebCore::LayoutState::renderer const): Deleted.
(WebCore::LayoutState::clipRect const): Deleted.
(WebCore::LayoutState::isClipped const): Deleted.
(WebCore::LayoutState::layoutDelta const): Deleted.

  • rendering/RenderListBox.cpp:
  • rendering/RenderMediaControlElements.cpp:
  • rendering/RenderMultiColumnFlow.cpp:
  • rendering/RenderTable.cpp:
  • rendering/RenderTableRow.cpp:
  • rendering/RenderTableSection.cpp:
  • rendering/RenderVTTCue.cpp:
  • rendering/RenderView.cpp:
  • rendering/RenderView.h:
  • rendering/RootInlineBox.cpp:
  • rendering/svg/RenderSVGRoot.cpp:

(WebCore::RenderSVGRoot::layout):

11:32 AM Changeset in webkit [238962] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Layout Test fast/css/counters/element-removal-crash.xhtml is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=183389

Unreviewed test gardening.

  • platform/mac/TestExpectations:
11:25 AM Changeset in webkit [238961] by Antti Koivisto
  • 11 edits in trunk/Source/WebCore

[LFC] Rename formattingContext() to createFormattingContext()
https://bugs.webkit.org/show_bug.cgi?id=192500

Reviewed by Zalan Bujtas.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):

  • layout/FormattingState.h:
  • layout/LayoutFormattingState.cpp:

(WebCore::Layout::LayoutState::layoutFormattingContextSubtree):

  • layout/blockformatting/BlockFormattingState.cpp:

(WebCore::Layout::BlockFormattingState::createFormattingContext):
(WebCore::Layout::BlockFormattingState::formattingContext): Deleted.

  • layout/blockformatting/BlockFormattingState.h:
  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):

  • layout/inlineformatting/InlineFormattingState.h:
10:53 AM Changeset in webkit [238960] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-app] Send bug id as a build property
https://bugs.webkit.org/show_bug.cgi?id=192494

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-app/ews/fetcher.py:

(BugzillaPatchFetcher.fetch):

10:51 AM Changeset in webkit [238959] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Builds should have a link to patch and bug
https://bugs.webkit.org/show_bug.cgi?id=192492

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/steps.py:

(ConfigureBuild.add_patch_id_url): Method to add Patch URL.
(ConfigureBuild.add_bug_id_url): Method to add Bug URL.
(ConfigureBuild.getPatchURL): Method to get Patch URL.
(ConfigureBuild.getBugURL): Method to get Bug URL.

10:51 AM Changeset in webkit [238958] by Truitt Savell
  • 10 edits in trunk/Source

Unreviewed, rolling out r238947.

Revision caused fast/visual-viewport/tiled-drawing/zoomed-
fixed-scrolling-layers-state.html to constantly fail

Reverted changeset:

"Allow control over child order when adding nodes to the
scrolling tree"
https://bugs.webkit.org/show_bug.cgi?id=176914
https://trac.webkit.org/changeset/238947

10:51 AM Changeset in webkit [238957] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-app] Configure logfile for ews-app logs
https://bugs.webkit.org/show_bug.cgi?id=192493

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-app/ews/init.py:
10:48 AM Changeset in webkit [238956] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Style queue exception on some security bugs
https://bugs.webkit.org/show_bug.cgi?id=190793

Reviewed by Lucas Forschler.

  • Scripts/webkitpy/tool/steps/applywatchlist.py:

(ApplyWatchList.run):

10:40 AM Changeset in webkit [238955] by aestes@apple.com
  • 2 edits in trunk/Source/WTF

[Cocoa] Add optional variants of SOFT_LINK_CLASS_FOR_SOURCE
https://bugs.webkit.org/show_bug.cgi?id=192498

Reviewed by Tim Horton.

Added SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL and SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT,
which behave like their non-optional variants but do not require their classes to exist.

  • wtf/cocoa/SoftLinking.h:
10:37 AM Changeset in webkit [238954] by wenson_hsieh@apple.com
  • 5 edits in trunk

[Attachment Support] Cloned attachment elements lose their unique identifiers
https://bugs.webkit.org/show_bug.cgi?id=192483

Reviewed by Tim Horton.

Source/WebCore:

This patch adds logic to ensure that the unique identifier of a cloned attachment element is the same as the
unique identifier of the original attachment element. If the cloned attachment is inserted into the same
document as the original attachment, then we will exercise the same codepath for copied-and-pasted attachments,
and assign a new unique identifier to the attachment element, while creating a new _WKAttachment in the client
that's backed by the same NSFileWrapper.

Test: WKAttachmentTests.AttachmentIdentifierOfClonedAttachment

  • html/HTMLAttachmentElement.cpp:

(WebCore::HTMLAttachmentElement::copyNonAttributePropertiesFromElement):

  • html/HTMLAttachmentElement.h:

Tools:

Introduce a new API test.

  • TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:

(TestWebKitAPI::TEST):

10:33 AM Changeset in webkit [238953] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebCore

Merge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
https://bugs.webkit.org/show_bug.cgi?id=192288

Patch by Rob Buis <rbuis@igalia.com> on 2018-12-07
Reviewed by Frédéric Wang.

Merge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
as they do the same thing. Also remove std::optional from parseAccessControlAllowList
since the function can't fail.

  • WebCore.order:
  • loader/CrossOriginAccessControl.cpp:

(WebCore::validatePreflightResponse):

  • loader/CrossOriginPreflightResultCache.cpp:

(WebCore::CrossOriginPreflightResultCacheItem::parse):

  • loader/CrossOriginPreflightResultCache.h:
  • platform/network/HTTPParsers.cpp:

(WebCore::parseAccessControlExposeHeadersAllowList): Deleted.

  • platform/network/HTTPParsers.h:

(WebCore::parseAccessControlAllowList):

  • platform/network/ResourceResponseBase.cpp:

(WebCore::ResourceResponseBase::filter):
(WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):

10:08 AM Changeset in webkit [238952] by eric.carlson@apple.com
  • 4 edits in trunk/Source/WebCore

[iOS] Don't update AVPlayerViewController currentTime while scrubbing
https://bugs.webkit.org/show_bug.cgi?id=192438
<rdar://problem/42977046>

Reviewed by Jer Noble.

No new tests, tested manually.

  • platform/ios/PlaybackSessionInterfaceAVKit.mm:

(WebCore::PlaybackSessionInterfaceAVKit::currentTimeChanged): Don't report change during scrubbing.

  • platform/ios/WebAVPlayerController.h:
  • platform/ios/WebAVPlayerController.mm:

(-[WebAVPlayerController beginScrubbing:]): Set _isScrubbing.
(-[WebAVPlayerController endScrubbing:]): Ditto.
(-[WebAVPlayerController isScrubbing]): Return _isScrubbing.

2:48 AM Changeset in webkit [238951] by commit-queue@webkit.org
  • 15 edits in trunk

[WPE][GTK] Implement WebAudioSourceProviderGStreamer to allow bridging MediaStream and the WebAudio APIs
https://bugs.webkit.org/show_bug.cgi?id=186933

Source/WebCore:

Reusing the AudioSourceProviderGStreamer itself as it was doing almost everything we needed,
just added a constructor to be able to create it from a MediaStreamTrackPrivate and made it a
WebAudioSourceProvider which only means it is now a ThreadSafeRefCounted.

Sensibily refactored GStreamerMediaStreamSource so that we could reuse it to track a single
MediaStreamTrack.

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-12-07
Reviewed by Philippe Normand.

Enabled all tests depending on that feature.

  • platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:

(WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer):
(WebCore::AudioSourceProviderGStreamer::~AudioSourceProviderGStreamer):
(WebCore::AudioSourceProviderGStreamer::setClient):

  • platform/audio/gstreamer/AudioSourceProviderGStreamer.h:
  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::audioSourceProvider):

  • platform/mediastream/gstreamer/GStreamerAudioCapturer.cpp:

(WebCore::GStreamerAudioCapturer::GStreamerAudioCapturer):

  • platform/mediastream/gstreamer/GStreamerAudioStreamDescription.h:
  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:

(WebCore::webkitMediaStreamSrcSetupSrc):
(WebCore::webkitMediaStreamSrcSetupAppSrc):
(WebCore::webkitMediaStreamSrcAddTrack):
(WebCore::webkitMediaStreamSrcSetStream):
(WebCore::webkitMediaStreamSrcNew):

  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.h:
  • platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:

(WebCore::WrappedMockRealtimeAudioSource::WrappedMockRealtimeAudioSource):
(WebCore::WrappedMockRealtimeAudioSource::start):
(WebCore::WrappedMockRealtimeAudioSource::addHum):
(WebCore::WrappedMockRealtimeAudioSource::render):
(WebCore::WrappedMockRealtimeAudioSource::settingsDidChange):
(WebCore::MockGStreamerAudioCaptureSource::startProducingData):

  • platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp:

(WebCore::RealtimeOutgoingAudioSourceLibWebRTC::pullAudioData): Handle the case where input buffers

are "big" and process all the data we can for each runs of the method.

LayoutTests:

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-12-07
Reviewed by Philippe Normand.

Enabled all tests depending on that feature.

  • platform/gtk/TestExpectations:
  • webrtc/clone-audio-track.html:
Note: See TracTimeline for information about the timeline view.