Timeline



Oct 5, 2020:

11:31 PM Changeset in webkit [268037] by Ross Kirsling
  • 4 edits in trunk

%TypedArray%.from must do mapping and putting in lockstep
https://bugs.webkit.org/show_bug.cgi?id=217349

Reviewed by Yusuke Suzuki.

JSTests:

  • test262/expectations.yaml:

Mark two test cases as passing.

Source/JavaScriptCore:

%TypedArray%.from first turns the input iterator into a list to find the size for the resulting typed array,
then it fills the typed array with the list elements.

If a map function is provided, however, it must be called during the *second* phase, not the first,
because if an element throws upon valueOf, that should prevent all further calls of the map function.

  • builtins/TypedArrayConstructor.js:

(from):

10:33 PM Changeset in webkit [268036] by Peng Liu
  • 4 edits in trunk/LayoutTests

[Media in GPU Process] Enable some fullscreen and picture-in-picture tests
https://bugs.webkit.org/show_bug.cgi?id=217360

Unreviewed test gardening.

  • gpu-process/TestExpectations:
  • media/navigate-with-pip-should-not-crash.html:
  • media/pip-video-going-into-fullscreen.html:
10:32 PM Changeset in webkit [268035] by Peng Liu
  • 2 edits in trunk/Source/WebCore

MobileSafari crashes at WebCore: -[WebAVPlayerViewControllerDelegate playerViewControllerWillStartPictureInPicture:]
https://bugs.webkit.org/show_bug.cgi?id=217356

Reviewed by Alex Christensen.

Since we replaced the RefPtr of VideoFullscreenInterfaceAVKit with a WeakPtr in
WebAVPlayerViewControllerDelegate to fix a leak in r262185, self.fullscreenInterface
could be NULL and we need to add NULL checks.

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(-[WebAVPlayerViewControllerDelegate playerViewControllerWillStartPictureInPicture:]):
(-[WebAVPlayerViewControllerDelegate playerViewControllerDidStartPictureInPicture:]):
(-[WebAVPlayerViewControllerDelegate playerViewController:failedToStartPictureInPictureWithError:]):
(-[WebAVPlayerViewControllerDelegate playerViewControllerWillStopPictureInPicture:]):
(-[WebAVPlayerViewControllerDelegate playerViewControllerDidStopPictureInPicture:]):
(-[WebAVPlayerViewControllerDelegate playerViewController:shouldExitFullScreenWithReason:]):
(-[WebAVPlayerViewControllerDelegate playerViewController:restoreUserInterfaceForPictureInPictureStopWithCompletionHandler:]):

10:16 PM Changeset in webkit [268034] by Simon Fraser
  • 6 edits in trunk/Source/WebCore

Remove Page::scheduleImmediateRenderingUpdate()
https://bugs.webkit.org/show_bug.cgi?id=217361

Reviewed by Antti Koivisto.

There was only one remaining caller of Page::scheduleImmediateRenderingUpdate(), which
is RenderLayerCompositor::layerTreeAsText(). The immediate update here is necessary because
we flush compositing layers in layerTreeAsText(), and that can trigger a Core Animation commit
with painting, so we have to complete our rendering update first to ensure up-to-date layout.

However, this is a testing-only codepath, so have the naming reflect that.

  • page/Page.cpp:

(WebCore::Page::triggerRenderingUpdateForTesting):
(WebCore::Page::scheduleImmediateRenderingUpdate): Deleted.

  • page/Page.h:
  • page/RenderingUpdateScheduler.cpp:

(WebCore::RenderingUpdateScheduler::scheduleTimedRenderingUpdate):
(WebCore::RenderingUpdateScheduler::displayRefreshFired):
(WebCore::RenderingUpdateScheduler::triggerRenderingUpdateForTesting):
(WebCore::RenderingUpdateScheduler::triggerRenderingUpdate):
(WebCore::RenderingUpdateScheduler::scheduleImmediateRenderingUpdate): Deleted.

  • page/RenderingUpdateScheduler.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::layerTreeAsText):

9:42 PM Changeset in webkit [268033] by commit-queue@webkit.org
  • 4 edits in trunk

Don't NFC normalize strings from blobs
https://bugs.webkit.org/show_bug.cgi?id=217327

Patch by Alex Christensen <achristensen@webkit.org> on 2020-10-05
Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/FileAPI/unicode-expected.txt:

Source/WebCore:

This matches Chrome and Firefox.
Covered by newly passing web platform tests.

  • fileapi/BlobBuilder.cpp:

(WebCore::BlobBuilder::append):

9:41 PM Changeset in webkit [268032] by Lauro Moura
  • 3 edits in trunk/LayoutTests

[GLIB] Gardening some flaky crashes related to NetworkProcess

Unreviewed test gardening.

  • platform/gtk-wayland/TestExpectations:
  • platform/wpe/TestExpectations:
9:17 PM Changeset in webkit [268031] by Simon Fraser
  • 9 edits in trunk/Source/WebCore

Remove the unused Chrome::scheduleAnimation()
https://bugs.webkit.org/show_bug.cgi?id=217359

Reviewed by Sam Weinig.

Chrome::scheduleAnimation() and the tangentially related ScrollableArea::serviceScrollAnimations()
which are unused.

  • page/Chrome.h:
  • page/FrameView.cpp:

(WebCore::FrameView::scheduleAnimation): Deleted.

  • page/FrameView.h:
  • platform/HostWindow.h:
  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::serviceScrollAnimations): Deleted.

  • platform/ScrollAnimator.h:
  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::serviceScrollAnimations): Deleted.

  • platform/ScrollableArea.h:

(WebCore::ScrollableArea::scheduleAnimation): Deleted.

8:03 PM Changeset in webkit [268030] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebKit

Break reference cycle with NSURLSessionDataTask in NetworkDataTaskCocoa
https://bugs.webkit.org/show_bug.cgi?id=217347
<rdar://problem/69483575>

Reviewed by Geoffrey Garen.

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::applyCookiePolicyForThirdPartyCNAMECloaking):

7:55 PM Changeset in webkit [268029] by Aditya Keerthi
  • 2 edits in trunk/Tools

Unreviewed. Update my primary email address.

  • Scripts/webkitpy/common/config/contributors.json:
7:51 PM Changeset in webkit [268028] by Simon Fraser
  • 14 edits in trunk/Source

Use the "triggerRenderingUpdate" terminology in ChromeClient
https://bugs.webkit.org/show_bug.cgi?id=217355

Reviewed by Tim Horton.

ChromeClient confusingly had both scheduleRenderingUpdate() and scheduleTimedRenderingUpdate().
The former is for triggering an update soon, and the latter is a normal schedule, used by
SVGImages because they have their own Page.

Rename the one that the WebKits have to implement to triggerRenderingUpdate().

Source/WebCore:

  • loader/EmptyClients.h:
  • page/ChromeClient.h:
  • page/RenderingUpdateScheduler.cpp:

(WebCore::RenderingUpdateScheduler::scheduleImmediateRenderingUpdate):

Source/WebKit:

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::triggerRenderingUpdate):
(WebKit::WebChromeClient::scheduleRenderingUpdate): Deleted.

  • WebProcess/WebCoreSupport/WebChromeClient.h:

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::triggerRenderingUpdate):
(WebChromeClient::scheduleRenderingUpdate): Deleted.

Source/WebKitLegacy/win:

  • WebCoreSupport/WebChromeClient.cpp:

(WebChromeClient::triggerRenderingUpdate):
(WebChromeClient::scheduleRenderingUpdate): Deleted.

  • WebCoreSupport/WebChromeClient.h:
7:06 PM Changeset in webkit [268027] by Hector Lopez
  • 2 edits in trunk/LayoutTests

REGRESSION(iOS 14): http/wpt/cache-storage/cache-quota-after-restart.any.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=217357

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
6:57 PM Changeset in webkit [268026] by Chris Dumez
  • 22 edits in trunk/Source/WebCore

Improvements to VectorMath API
https://bugs.webkit.org/show_bug.cgi?id=217343

Reviewed by Alex Christensen.

The following improvements were made to the VectorMath API:

  • Use clearer names for the functions, e.g. VectorMath::vmul() -> VectorMath::multiply()
  • Drop stride parameters as the call sites always pass 1. This helps simplify the code.
  • Stop using out-parameters and have the functions return a value when needed.
  • Pass input scalar as 'float' instead of 'const float*'.

No new tests, no Web-facing behavior change.

  • Modules/webaudio/AudioParam.cpp:

(WebCore::AudioParam::calculateFinalValues):

  • Modules/webaudio/AudioParamTimeline.cpp:

(WebCore::AudioParamTimeline::valuesForTimeRange):
(WebCore::AudioParamTimeline::processLinearRamp):
(WebCore::AudioParamTimeline::processSetTarget):

  • Modules/webaudio/OscillatorNode.cpp:

(WebCore::OscillatorNode::calculateSampleAccuratePhaseIncrements):

  • Modules/webaudio/PeriodicWave.cpp:

(WebCore::PeriodicWave::createBandLimitedTables):

  • Modules/webaudio/RealtimeAnalyser.cpp:

(WebCore::RealtimeAnalyser::getFloatFrequencyData):

  • platform/audio/AudioBus.cpp:

(WebCore::AudioBus::speakersSumFromByDownMixing):
(WebCore::AudioBus::copyWithGainFrom):
(WebCore::AudioBus::copyWithSampleAccurateGainValuesFrom):

  • platform/audio/AudioChannel.cpp:

(WebCore::AudioChannel::scale):
(WebCore::AudioChannel::sumFrom):
(WebCore::AudioChannel::maxAbsValue const):

  • platform/audio/DirectConvolver.cpp:
  • platform/audio/FFTConvolver.cpp:

(WebCore::FFTConvolver::process):

  • platform/audio/FFTFrame.cpp:

(WebCore::FFTFrame::scaleFFT):
(WebCore::FFTFrame::multiply):

  • platform/audio/IIRFilter.cpp:

(WebCore::IIRFilter::tailTime):

  • platform/audio/Reverb.cpp:

(WebCore::calculateNormalizationScale):

  • platform/audio/ReverbAccumulationBuffer.cpp:

(WebCore::ReverbAccumulationBuffer::accumulate):

  • platform/audio/ReverbConvolver.cpp:
  • platform/audio/ReverbConvolverStage.cpp:

(WebCore::ReverbConvolverStage::ReverbConvolverStage):

  • platform/audio/VectorMath.cpp:

(WebCore::VectorMath::multiplyByScalar):
(WebCore::VectorMath::add):
(WebCore::VectorMath::addScalar):
(WebCore::VectorMath::multiply):
(WebCore::VectorMath::multiplyComplex):
(WebCore::VectorMath::multiplyThenAddScalar):
(WebCore::VectorMath::maximumMagnitude):
(WebCore::VectorMath::sumOfSquares):
(WebCore::VectorMath::clamp):
(WebCore::VectorMath::linearToDecibels):
(WebCore::VectorMath::is16ByteAligned):

  • platform/audio/VectorMath.h:
  • platform/audio/gstreamer/FFTFrameGStreamer.cpp:

(WebCore::FFTFrame::doInverseFFT):

  • platform/audio/mac/AudioDestinationMac.cpp:

(WebCore::AudioDestinationCocoa::processBusAfterRender):

  • platform/audio/mac/AudioSampleBufferList.cpp:
  • platform/audio/mac/FFTFrameMac.cpp:

(WebCore::FFTFrame::doFFT):
(WebCore::FFTFrame::doInverseFFT):

6:27 PM Changeset in webkit [268025] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

REGRESSION(r267915): Many layout tests are asserting under ~CompletionHandler()
https://bugs.webkit.org/show_bug.cgi?id=217345
<rdar://problem/69973775>

Reviewed by Tim Horton.

I did *not* intend to schedule an async task after every single image load in r267915. Apart from triggering
assertions on various tests, this also causes us to send excessive IPC messages to the UI process when loading
images, which can't be good for performance. Fix this by only calling into computeAndSendEditDragSnapshot()
when we've finished loading all dropped image elements.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::didFinishLoadingImageForElement):

6:22 PM Changeset in webkit [268024] by Hector Lopez
  • 2 edits in trunk/LayoutTests

Adjust test expectation for timeouts
https://bugs.webkit.org/show_bug.cgi?id=215324

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
6:21 PM Changeset in webkit [268023] by eric.carlson@apple.com
  • 3 edits in trunk/Tools

Disable media capture if an app's entitlements won't allow access to capture devices
https://bugs.webkit.org/show_bug.cgi?id=217319
<rdar://problem/69956112>

Unreviewed, address post-review comments.

  • MiniBrowser/mac/Info.plist: Update media capture usage strings.
  • MobileMiniBrowser/MobileMiniBrowser/Info.plist: Ditto.
5:52 PM Changeset in webkit [268022] by Simon Fraser
  • 7 edits in trunk/Source

ChromeClient::needsImmediateRenderingUpdate() only existing to work around a WebKit1 bug
https://bugs.webkit.org/show_bug.cgi?id=217338

Reviewed by Said Abou-Hallawa.

WebViewLayerFlushScheduler has a bug where scheduling inside the callback would fail
because the RunLoopObserver was always invalidate at the end of the callback.

If we fix this, we can remove ChromeClient::needsImmediateRenderingUpdate() which I believe
only existed to work around this bug.

Source/WebCore:

  • page/ChromeClient.h:

(WebCore::ChromeClient::scheduleTimedRenderingUpdate):
(WebCore::ChromeClient::needsImmediateRenderingUpdate const): Deleted.

  • page/RenderingUpdateScheduler.cpp:

(WebCore::RenderingUpdateScheduler::scheduleRenderingUpdate):

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebChromeClient.h:
  • WebView/WebViewData.h:
  • WebView/WebViewData.mm:

(WebViewLayerFlushScheduler::schedule):
(WebViewLayerFlushScheduler::layerFlushCallback):

5:44 PM Changeset in webkit [268021] by Simon Fraser
  • 9 edits in trunk/Source/WebCore

Rename scheduleTimedRenderingUpdate() functions related to images
https://bugs.webkit.org/show_bug.cgi?id=217352

Reviewed by Tim Horton.

ImageObserver and CachedImageClient have scheduleTimedRenderingUpdate() so that an SVG image's
Page and trigger rendering updates. Rename these to make it clearer they are image-related,
and remove the "timed" terminology.

  • html/ImageBitmap.cpp:
  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::CachedImageObserver::scheduleRenderingUpdate):
(WebCore::CachedImage::scheduleRenderingUpdate):
(WebCore::CachedImage::CachedImageObserver::scheduleTimedRenderingUpdate): Deleted.
(WebCore::CachedImage::scheduleTimedRenderingUpdate): Deleted.

  • loader/cache/CachedImage.h:
  • loader/cache/CachedImageClient.h:

(WebCore::CachedImageClient::scheduleRenderingUpdateForImage):
(WebCore::CachedImageClient::scheduleTimedRenderingUpdate): Deleted.

  • platform/graphics/ImageObserver.h:
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::scheduleRenderingUpdateForImage):
(WebCore::RenderElement::scheduleTimedRenderingUpdate): Deleted.

  • rendering/RenderElement.h:
  • svg/graphics/SVGImageClients.h:
5:28 PM Changeset in webkit [268020] by weinig@apple.com
  • 3 edits
    3 adds in trunk/Source/WTF

Add implementation of <filesystem> to WTF for macOS 10.14
https://bugs.webkit.org/show_bug.cgi?id=217302

Reviewed by Darin Adler.

Imports a copy of <filesystem> and its needed implementation files
from libc++ (r343838) and modifies them to build outside of libc++.
This is only needed and only built for versions of macOS < 10.15
and can be dropped when we require 10.15.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/StdFilesystem.cpp: Added.
  • wtf/StdFilesystem.h: Added.
  • LICENSE-libc++.txt: Added.
5:15 PM Changeset in webkit [268019] by beidson@apple.com
  • 2 edits in trunk/Source/WebKit

Change a PDF RELEASE_ASSERT to an early return.
rdar://problem/69805240 and https://bugs.webkit.org/show_bug.cgi?id=217346

Reviewed by Tim Horton.

No new tests (Wish they were possible)

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::installPDFDocument): This release assert is getting hit regularly.

Change to an early return while we continue tracking this down.

5:15 PM Changeset in webkit [268018] by Alan Coon
  • 8 edits in branches/safari-610-branch/Source

Versioning.

WebKit-7610.3.1

4:53 PM Changeset in webkit [268017] by achristensen@apple.com
  • 24 edits in trunk/Source/WebKit

Make DownloadID an ObjectIdentifier
https://bugs.webkit.org/show_bug.cgi?id=203962

Reviewed by Youenn Fablet and Geoffrey Garen.

Also deprecate the unused WKDownloadGetID because this identifier is internal.

  • NetworkProcess/Downloads/Download.cpp:

(WebKit::Download::Download):
(WebKit::Download::didReceiveData):
(WebKit::Download::didFinish):
(WebKit::Download::didFail):
(WebKit::Download::didCancel):
(WebKit::Download::messageSenderDestinationID const):

  • NetworkProcess/Downloads/DownloadID.h:

(WebKit::DownloadID::DownloadID): Deleted.
(WebKit::DownloadID::operator== const): Deleted.
(WebKit::DownloadID::operator!= const): Deleted.
(WebKit::DownloadID::downloadID const): Deleted.
(IPC::ArgumentCoder<WebKit::DownloadID>::encode): Deleted.
(IPC::ArgumentCoder<WebKit::DownloadID>::decode): Deleted.
(WTF::DownloadIDHash::hash): Deleted.
(WTF::DownloadIDHash::equal): Deleted.
(WTF::HashTraits<WebKit::DownloadID>::emptyValue): Deleted.
(WTF::HashTraits<WebKit::DownloadID>::constructDeletedValue): Deleted.
(WTF::HashTraits<WebKit::DownloadID>::isDeletedValue): Deleted.

  • NetworkProcess/Downloads/DownloadMonitor.cpp:

(WebKit::DownloadMonitor::applicationWillEnterForeground):
(WebKit::DownloadMonitor::applicationDidEnterBackground):
(WebKit::DownloadMonitor::timerFired):

  • NetworkProcess/Downloads/PendingDownload.cpp:

(WebKit::PendingDownload::messageSenderDestinationID const):

  • NetworkProcess/Downloads/PendingDownload.h:
  • NetworkProcess/NetworkDataTask.h:

(WebKit::NetworkDataTask::setPendingDownloadID):
(WebKit::NetworkDataTask::isDownload const):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::pendingDownloadCanceled):
(WebKit::NetworkProcess::findPendingDownloadLocation):

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

(WebKit::NetworkResourceLoader::convertToDownload):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
(-[WKNetworkSessionDelegate URLSession:downloadTask:didFinishDownloadingToURL:]):
(-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
(WebKit::NetworkSessionCocoa::continueDidReceiveChallenge):

  • Scripts/webkit/messages.py:
  • Shared/Authentication/AuthenticationManager.h:
  • UIProcess/API/C/WKDownload.cpp:

(WKDownloadGetID):

  • UIProcess/API/C/WKDownload.h:
  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::DownloadProxy::DownloadProxy):
(WebKit::generateDownloadID): Deleted.

  • UIProcess/Downloads/DownloadProxy.h:
  • UIProcess/Downloads/DownloadProxyMap.cpp:

(WebKit::DownloadProxyMap::createDownloadProxy):
(WebKit::DownloadProxyMap::downloadFinished):
(WebKit::DownloadProxyMap::invalidate):

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::startDownload):
(WebKit::WebFrame::convertMainResourceLoadToDownload):

  • WebProcess/WebPage/WebFrame.h:
  • WebProcess/WebPage/WebPage.h:
4:36 PM Changeset in webkit [268016] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'error.message')
https://bugs.webkit.org/show_bug.cgi?id=217232
<rdar://problem/69888156>

Patch by Federico Bucchi <Federico Bucchi> on 2020-10-05
Reviewed by Devin Rousso.

Add optional chaining for error to check its existence before using error.message

  • UserInterface/Models/Resource.js:
4:34 PM Changeset in webkit [268015] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix tvOS and watchOS build

  • NetworkProcess/NetworkProcess.cpp:

I noticed it was broken in an EWS build, and it is missing this include.

4:29 PM Changeset in webkit [268014] by Simon Fraser
  • 13 edits in trunk/Source/WebKit

Rename DrawingArea::scheduleRenderingUpdate()
https://bugs.webkit.org/show_bug.cgi?id=217337

Reviewed by Tim Horton.

DrawingArea::scheduleRenderingUpdate() always schedules an "immediate" update (either
on a zero-delay timer, or in the current runloop). To make this more clear, change
the terminology to "triggerRenderingUpdate()."

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::scheduleRenderingUpdate):

  • WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:

(WebKit::DrawingAreaCoordinatedGraphics::triggerRenderingUpdate):
(WebKit::DrawingAreaCoordinatedGraphics::scheduleRenderingUpdate): Deleted.

  • WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h:
  • WebProcess/WebPage/DrawingArea.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.mm:

(WebKit::RemoteLayerTreeDisplayRefreshMonitor::requestRefreshCallback):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
(WebKit::RemoteLayerTreeDrawingArea::updateGeometry):
(WebKit::RemoteLayerTreeDrawingArea::setExposedContentRect):
(WebKit::RemoteLayerTreeDrawingArea::triggerRenderingUpdate):
(WebKit::RemoteLayerTreeDrawingArea::didUpdate):
(WebKit::RemoteLayerTreeDrawingArea::addTransactionCallbackID):
(WebKit::RemoteLayerTreeDrawingArea::scheduleRenderingUpdate): Deleted.

  • WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm:

(WebKit::RemoteScrollingCoordinator::scheduleTreeStateCommit):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::scheduleFullEditorStateUpdate):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::dynamicViewportSizeUpdate):

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::triggerRenderingUpdate):
(WebKit::TiledCoreAnimationDrawingArea::attachViewOverlayGraphicsLayer):
(WebKit::TiledCoreAnimationDrawingArea::setShouldScaleViewToFitDocument):
(WebKit::TiledCoreAnimationDrawingArea::addTransactionCallbackID):
(WebKit::TiledCoreAnimationDrawingArea::activityStateDidChange):
(WebKit::TiledCoreAnimationDrawingArea::scheduleRenderingUpdate): Deleted.

4:29 PM Changeset in webkit [268013] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unrevewed, fix crash for ASan debug builds
https://bugs.webkit.org/show_bug.cgi?id=217261

Reviewed by Saam Barati.

This function touches memory region which ASan cannot understand whether this is safe.
And ASan makes pointer fat so that it will see some null pointers.

  • assembler/JITOperationList.cpp:

(JSC::addPointers):

4:15 PM Changeset in webkit [268012] by eric.carlson@apple.com
  • 8 edits in trunk

Disable media capture if an app's entitlements won't allow access to capture devices
https://bugs.webkit.org/show_bug.cgi?id=217319
<rdar://problem/69956112>

Reviewed by Youenn Fablet.

Source/WebKit:

No new tests, tested manually with MiniBrowser and Safari.

  • UIProcess/Cocoa/UserMediaPermissionRequestManagerProxy.mm:

(WebKit::UserMediaPermissionRequestManagerProxy::permittedToCaptureAudio): If the
app is sandboxed, check for the entitlement required for audio capture. Don't
bother checking for usage string if TCC has already authorized capture.
(WebKit::UserMediaPermissionRequestManagerProxy::permittedToCaptureVideo): Ditto
for video capture.

  • UIProcess/Cocoa/WebPreferencesCocoa.mm:

(WebKit::WebPreferences::platformInitializeStore): Initialize mediaDevicesEnabled
manually because its default value is always false in the WebProcess and may be
true in the UIProcess. WebPreferences assumes the default will always be the same
in both processes, and so has an optimization that only sends values to the
WebProcess if they differ from the default value. This means if the default in the
UIProcess is true it won't be pushed to the WebProcess, so capture won't work.

  • Platform/spi/ios/TCCSPI.h: Update TCCAccessPreflightResult.

Tools:

  • MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj:
  • MiniBrowser/mac/AppDelegate.m:

(-[BrowserAppDelegate defaultConfiguration]): Don't set configuration._mediaCaptureEnabled,
it should no longer be necessary.

  • MiniBrowser/mac/Info.plist: Remove unneeded keys.
  • MobileMiniBrowser/MobileMiniBrowser/Info.plist: Ditto. Add usage strings.
4:11 PM Changeset in webkit [268011] by Russell Epstein
  • 1 copy in tags/Safari-611.1.2

Tag Safari-611.1.2.

3:40 PM Changeset in webkit [268010] by Russell Epstein
  • 1 copy in tags/Safari-610.2.8.0.1

Tag Safari-610.2.8.0.1.

3:38 PM Changeset in webkit [268009] by Alan Coon
  • 8 edits
    2 adds in branches/safari-610-branch

Cherry-pick r266909. rdar://problem/69101091

Source/WebCore:
Text replacements at the beginning of a second line are replaced too early
https://bugs.webkit.org/show_bug.cgi?id=216327
<rdar://problem/68170353>

Reviewed by Darin Adler.

In the changes in r258871, using SimpleRanges instead of Range causing some side effects
when the replacements at the beginning of lines. The ranges that we are counting are backwards
and the return characters are being counted instead of being ignored. There is almost
certainly a better fix than this, but this patch restores the original logic that
was present when Range was being used, until a better fix can be worked out.

Test: editing/spelling/text-replacement-first-word-second-line.html

  • editing/Editor.cpp: (WebCore::Editor::markAndReplaceFor):
  • editing/TextCheckingHelper.cpp: (WebCore::TextCheckingParagraph::automaticReplacementStart const): (WebCore::TextCheckingParagraph::automaticReplacementLength const):
  • editing/TextCheckingHelper.h:

LayoutTests:
Overlapping text replacements at the beginning of a line are replaced too early
https://bugs.webkit.org/show_bug.cgi?id=216327

Reviewed by Darin Adler.

  • editing/spelling/text-replacement-first-word-second-line-expected.txt: Added.
  • editing/spelling/text-replacement-first-word-second-line.html: Added.

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

3:38 PM Changeset in webkit [268008] by achristensen@apple.com
  • 13 edits in trunk/Source/WebKit

Use sendWithAsyncReply for DecideDestinationWithSuggestedFilename
https://bugs.webkit.org/show_bug.cgi?id=209195

Reviewed by Tim Horton.

This makes the download flow more clear.
No change in behavior.

  • NetworkProcess/Downloads/DownloadID.h:
  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::downloadDestinationDecided):
(WebKit::DownloadManager::cancelDownload):
(WebKit::DownloadManager::willDecidePendingDownloadDestination): Deleted.
(WebKit::DownloadManager::continueDecidePendingDownloadDestination): Deleted.

  • NetworkProcess/Downloads/DownloadManager.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::findPendingDownloadLocation):
(WebKit::NetworkProcess::continueDecidePendingDownloadDestination): Deleted.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • Scripts/webkit/messages.py:
  • Shared/Authentication/AuthenticationManager.h:
  • UIProcess/API/APIDownloadClient.h:
  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync): Deleted.

  • UIProcess/Downloads/DownloadProxy.h:
  • UIProcess/Downloads/DownloadProxy.messages.in:
3:27 PM Changeset in webkit [268007] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed assertion fix after r268006.

  • platform/audio/VectorMath.cpp:

(WebCore::VectorMath::vsvesq):

3:03 PM Changeset in webkit [268006] by Chris Dumez
  • 11 edits in trunk

[Cocoa] Vectorize linear to decibels conversion in RealtimeAnalyser
https://bugs.webkit.org/show_bug.cgi?id=217322

Reviewed by Darin Adler.

Source/WebCore:

Vectorize linear to decibels conversion in RealtimeAnalyser on Cocoa ports for
performance.

No new tests, no web-facing behavior change.

  • Modules/webaudio/RealtimeAnalyser.cpp:

(WebCore::RealtimeAnalyser::getFloatFrequencyData):

  • platform/audio/VectorMath.cpp:

(WebCore::VectorMath::linearToDecibels):

  • platform/audio/VectorMath.h:

LayoutTests:

Slightly increase the error threshold in a few WebAudio tests because the vectorization
output for linear to decibels conversion is not quite identical to our previous output
(although very close).

  • webaudio/Analyser/realtimeanalyser-downmix-expected.txt:
  • webaudio/Analyser/realtimeanalyser-downmix.html:
  • webaudio/Analyser/realtimeanalyser-fftsize-reset-expected.txt:
  • webaudio/Analyser/realtimeanalyser-fftsize-reset.html:
  • webaudio/Analyser/realtimeanalyser-freq-data-expected.txt:
  • webaudio/Analyser/realtimeanalyser-freq-data.html:
2:44 PM Changeset in webkit [268005] by Peng Liu
  • 2 edits in trunk/LayoutTests

Update TestExpectations for layout tests related to GPU process features
https://bugs.webkit.org/show_bug.cgi?id=217326

Unreviewed test gardening.

  • gpu-process/TestExpectations:
2:35 PM Changeset in webkit [268004] by keith_miller@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Add JSC option to trigger a hardware breakpoint when debugger expressions are reached.
https://bugs.webkit.org/show_bug.cgi?id=217334

Reviewed by Yusuke Suzuki.

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::debug):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::defaultCodeGenerationMode const):

  • runtime/OptionsList.h:
2:34 PM Changeset in webkit [268003] by ddkilzer@apple.com
  • 6 edits in trunk/Source

Make NetscapePlugInStreamLoaderClient a weak pointer on NetscapePlugInStreamLoader
<https://webkit.org/b/217237>
<rdar://problem/69776714>

Reviewed by Alex Christensen.

Source/WebCore:

Could not write a test since reproducing a crash requires
rapidly reloading a URL to a PDF at random points during the
previous load.

Make NetscapePlugInStreamLoaderClient a WeakPtr on
NetscapePlugInStreamLoader, and add nullptr checks for
NetscapePlugInStreamLoader.m_client as needed.

  • loader/NetscapePlugInStreamLoader.cpp:

(WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
(WebCore::NetscapePlugInStreamLoader::willSendRequest):
(WebCore::NetscapePlugInStreamLoader::didReceiveResponse):
(WebCore::NetscapePlugInStreamLoader::didReceiveDataOrBuffer):
(WebCore::NetscapePlugInStreamLoader::didFinishLoading):
(WebCore::NetscapePlugInStreamLoader::didFail):
(WebCore::NetscapePlugInStreamLoader::willCancel):

  • loader/NetscapePlugInStreamLoader.h:

Source/WebKit:

Making NetscapePlugInStreamLoaderClient inherit from
CanMakeWeakPtr<> caused PDFPlugin to fail to compile because one
of its parent classes already inherited from CanMakeWeakPtr<>.
To fix this, extract a PDFPluginStreamLoaderClient class from
PDFPlugin and link the lifetime of PDFPluginStreamLoaderClient
to PDFPlugin.

After moving the NetscapePlugInStreamLoaderClient virtual
methods from PDFPlugin to PDFPluginStreamLoaderClient, add some
simple methods to PDFPlugin so that PDFPluginStreamLoaderClient
doesn't access the instance variables directly. Also make use
of these new methods in other parts of PDFPlugin.

  • WebProcess/Plugins/PDF/PDFPlugin.h:

(WebKit::PDFPlugin::documentFinishedLoading): Add.
(WebKit::PDFPlugin::identifierForLoader): Add.
(WebKit::PDFPlugin::removeOutstandingByteRangeRequest): Add.
(WebKit::PDFPlugin::PDFPluginStreamLoaderClient): Add class.

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::PDFPlugin):
(WebKit::PDFPlugin::receivedNonLinearizedPDFSentinel):
(WebKit::PDFPlugin::getResourceBytesAtPosition):
(WebKit::PDFPlugin::PDFPluginStreamLoaderClient::willSendRequest): Move from PDFPlugin.
(WebKit::PDFPlugin::PDFPluginStreamLoaderClient::didReceiveResponse): Ditto.
(WebKit::PDFPlugin::PDFPluginStreamLoaderClient::didReceiveData): Ditto.
(WebKit::PDFPlugin::PDFPluginStreamLoaderClient::didFail): Ditto.
(WebKit::PDFPlugin::PDFPluginStreamLoaderClient::didFinishLoading): Ditto.
(WebKit::PDFPlugin::byteRangeRequestForLoader):
(WebKit::PDFPlugin::forgetLoader):
(WebKit::PDFPlugin::willSendRequest): Move to PDFPluginStreamLoaderClient.
(WebKit::PDFPlugin::didReceiveResponse): Ditto.
(WebKit::PDFPlugin::didReceiveData): Ditto.
(WebKit::PDFPlugin::didFail): Ditto.
(WebKit::PDFPlugin::didFinishLoading): Ditto.

2:29 PM Changeset in webkit [268002] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Use memset to zero vectors in PeriodicWave::createBandLimitedTables()
https://bugs.webkit.org/show_bug.cgi?id=217328

Reviewed by Darin Adler.

Use memset to zero vectors in PeriodicWave::createBandLimitedTables() instead of a for
loop, for performance reasons.

No new tests, no Web-facing behavior change.

  • Modules/webaudio/PeriodicWave.cpp:

(WebCore::PeriodicWave::createBandLimitedTables):

2:15 PM Changeset in webkit [268001] by Chris Dumez
  • 25 edits in trunk/Source/WebCore

Use tryHoldLock() in WebAudio to simplify the code
https://bugs.webkit.org/show_bug.cgi?id=217332

Reviewed by Darin Adler.

Use tryHoldLock() in WebAudio to simplify the code a bit.

No new tests, no Web-facing behavior change.

  • Modules/webaudio/AudioBufferSourceNode.cpp:

(WebCore::AudioBufferSourceNode::process):
(WebCore::AudioBufferSourceNode::setBuffer):
(WebCore::AudioBufferSourceNode::startPlaying):
(WebCore::AudioBufferSourceNode::adjustGrainParameters):

  • Modules/webaudio/AudioBufferSourceNode.h:
  • Modules/webaudio/AudioParamTimeline.cpp:

(WebCore::AudioParamTimeline::setValueAtTime):
(WebCore::AudioParamTimeline::linearRampToValueAtTime):
(WebCore::AudioParamTimeline::exponentialRampToValueAtTime):
(WebCore::AudioParamTimeline::setTargetAtTime):
(WebCore::AudioParamTimeline::setValueCurveAtTime):
(WebCore::AudioParamTimeline::insertEvent):
(WebCore::AudioParamTimeline::cancelScheduledValues):
(WebCore::AudioParamTimeline::cancelAndHoldAtTime):
(WebCore::AudioParamTimeline::valueForContextTime):
(WebCore::AudioParamTimeline::valuesForTimeRange):

  • Modules/webaudio/AudioParamTimeline.h:
  • Modules/webaudio/ConvolverNode.cpp:

(WebCore::ConvolverNode::process):
(WebCore::ConvolverNode::setBuffer):

  • Modules/webaudio/ConvolverNode.h:
  • Modules/webaudio/MediaElementAudioSourceNode.cpp:

(WebCore::MediaElementAudioSourceNode::process):

  • Modules/webaudio/MediaStreamAudioSourceNode.cpp:

(WebCore::MediaStreamAudioSourceNode::setFormat):
(WebCore::MediaStreamAudioSourceNode::process):

  • Modules/webaudio/MediaStreamAudioSourceNode.h:
  • Modules/webaudio/OscillatorNode.cpp:

(WebCore::OscillatorNode::process):
(WebCore::OscillatorNode::setPeriodicWave):

  • Modules/webaudio/OscillatorNode.h:
  • Modules/webaudio/PannerNode.cpp:

(WebCore::PannerNode::process):
(WebCore::PannerNode::setPanningModel):
(WebCore::PannerNode::setPosition):
(WebCore::PannerNode::setOrientation):
(WebCore::PannerNode::setDistanceModel):
(WebCore::PannerNode::setRefDistance):
(WebCore::PannerNode::setMaxDistance):
(WebCore::PannerNode::setRolloffFactor):
(WebCore::PannerNode::setConeOuterGain):
(WebCore::PannerNode::setConeOuterAngle):
(WebCore::PannerNode::setConeInnerAngle):

  • Modules/webaudio/PannerNode.h:
  • Modules/webaudio/ScriptProcessorNode.cpp:

(WebCore::ScriptProcessorNode::process):

  • Modules/webaudio/WaveShaperProcessor.cpp:

(WebCore::WaveShaperProcessor::setCurve):
(WebCore::WaveShaperProcessor::setOversample):
(WebCore::WaveShaperProcessor::process):

  • Modules/webaudio/WaveShaperProcessor.h:
  • Modules/webaudio/WebKitAudioPannerNode.cpp:

(WebCore::WebKitAudioPannerNode::process):
(WebCore::WebKitAudioPannerNode::setPanningModel):

  • Modules/webaudio/WebKitAudioPannerNode.h:
  • platform/audio/ReverbConvolver.cpp:

(WebCore::ReverbConvolver::~ReverbConvolver):
(WebCore::ReverbConvolver::backgroundThreadEntry):
(WebCore::ReverbConvolver::process):

  • platform/audio/ReverbConvolver.h:
  • platform/audio/cocoa/AudioDestinationCocoa.cpp:

(WebCore::AudioDestinationCocoa::render):

  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:

(WebCore::AudioSourceProviderAVFObjC::~AudioSourceProviderAVFObjC):
(WebCore::AudioSourceProviderAVFObjC::provideInput):
(WebCore::AudioSourceProviderAVFObjC::finalizeCallback):
(WebCore::AudioSourceProviderAVFObjC::prepareCallback):
(WebCore::AudioSourceProviderAVFObjC::unprepareCallback):
(WebCore::AudioSourceProviderAVFObjC::processCallback):

  • platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h:
  • platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:

(WebCore::WebAudioSourceProviderAVFObjC::~WebAudioSourceProviderAVFObjC):
(WebCore::WebAudioSourceProviderAVFObjC::provideInput):
(WebCore::WebAudioSourceProviderAVFObjC::prepare):
(WebCore::WebAudioSourceProviderAVFObjC::unprepare):

1:55 PM Changeset in webkit [268000] by eocanha@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK][X11] WebProcess crash in WebCore::GLContextGLX::createPbufferContext() with NVidia proprietary drivers
https://bugs.webkit.org/show_bug.cgi?id=217323

Reviewed by Adrian Perez de Castro.

The returnedElements variable might remain uninitialized if the glXChooseFBConfig()
function call fails, leading to execution of the wrong code branch later.

  • platform/graphics/glx/GLContextGLX.cpp:

(WebCore::GLContextGLX::createPbufferContext): Initialized the returnedElements variable.

1:24 PM Changeset in webkit [267999] by commit-queue@webkit.org
  • 11 edits
    1 move
    1 add
    1 delete in trunk

REGRESSION(r267763) [SOUP] Some tests flaky crashing in NetworkSessionSoup::soupSession()
https://bugs.webkit.org/show_bug.cgi?id=217163

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2020-10-05
Reviewed by Alex Christensen.

Source/WebCore:

Stop using libsoup for DNS resolver. The libsoup APIs are actually using the GLib networking APIs, and the don't
really use the SoupSession. Rename DNSResolveQueueSoup as DNSResolveQueueGLib and use the GLib API instead.

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • platform/Soup.cmake:
  • platform/SourcesGLib.txt:
  • platform/SourcesSoup.txt:
  • platform/network/DNSResolveQueue.cpp:
  • platform/network/glib/DNSResolveQueueGLib.cpp: Added.

(WebCore::didResolveProxy):
(WebCore::proxyResolvedForHttpUriCallback):
(WebCore::proxyResolvedForHttpsUriCallback):
(WebCore::DNSResolveQueueGLib::updateIsUsingProxy):
(WebCore::DNSResolveQueueGLib::platformResolve):
(WebCore::DNSResolveQueueGLib::resolve):
(WebCore::DNSResolveQueueGLib::stopResolve):

  • platform/network/glib/DNSResolveQueueGLib.h: Renamed from Source/WebCore/platform/network/soup/DNSResolveQueueSoup.h.
  • platform/network/soup/DNSResolveQueueSoup.cpp: Removed.

Source/WebKit:

Remove code to set the SoupSession on DNSResolveQueue.

  • NetworkProcess/NetworkProcess.cpp:

LayoutTests:

Remove expectations for tests that should pass now.

  • platform/glib/TestExpectations:
1:03 PM Changeset in webkit [267998] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'breakpoint.disabled = true')
https://bugs.webkit.org/show_bug.cgi?id=217241

Reviewed by Brian Burg.

  • UserInterface/Controllers/DOMManager.js:

(WI.DOMManager.prototype.removeBreakpointForEventListener):
It's possible for there to not be a breakpoint for a given event listener.

12:57 PM Changeset in webkit [267997] by Darin Adler
  • 19 edits
    6 deletes in trunk/LayoutTests

Selection API: Fix more editing tests that rely on non-standard selection API behavior
https://bugs.webkit.org/show_bug.cgi?id=217301

Reviewed by Sam Weinig.

These changes do not change what the tests are testing. They remove
dependencies in these tests on "canonicalization" of selection points.
This is often always a change to the setup for the test, not the test substance.

In other cases, tests that are not trying to test selection are leaving unimportant
remnants of the selection in their results: clear the selection for those.

Patch also includes a few other expectations fixes so all the tests in the editing
directory pass for me on my development machine.

  • editing/pasteboard/copy-null-characters-expected.txt: Remove expected selection.
  • editing/pasteboard/copy-null-characters.html: Clear the selection after one part

of this test so the markup dump doesn't contain selection endpoints.

  • editing/pasteboard/paste-noscript-xhtml-expected.txt: Remove expected selection.
  • editing/pasteboard/paste-noscript-xhtml.xhtml: Clear the selection at two points

in this test so the markup dump doesn't contain selection endpoints.

  • editing/selection/extend-by-sentence-002.html: Check the selected string rather

than checking the DOM node and offset of the selection. Keeps the substance of this
test without depending on the selection object selecting differently than what we
tell it to do.

  • editing/selection/extend-selection-enclosing-block-mac.html: Set the position

at the start of a text node instead of before the text node.

  • editing/selection/extend-selection-enclosing-block-win.html: Ditto.
  • editing/selection/home-end.html: Added a setPositionAfterLeadingWhitespace

function and use it to set the position at the point the test results are
expecting. Before this change, the code relied on the Selection API to adjust the
selection to the first non-whitespace character, even though that is both non-standard
and not what we are testing. Doing this lets us keep the expected test results the same.

  • editing/selection/move-by-word-visually-multi-line-expected.txt: Updated to

expect moving across the word, even the one that was preceded by a collapsed newline.

  • editing/selection/move-by-word-visually-multi-line.html: Ditto.
  • editing/selection/resources/extend-selection.js:

(setPositionAfterLeadingWhitespace): Added.
(runSelectionTestsWithGranularity): Use setPositionAfterLeadingWhitespace here
for the same purpose as in home-end.html above, to preserve the existing tests
without relying on non-standard Selection API behavior.

  • editing/selection/resources/move-by-word-visually.js:

(setPositionAfterCollapsedLeadingWhitespace): Added.
(moveByWordForEveryPosition): Same as above, use the function.

  • editing/selection/setBaseAndExtent-revert-selection.html: Fix the output function

to properly write out the node ID when the node is a text node within the node with
the ID. Before, the test could fail if the anchor node returned the text node we
passed in, but that relies on non-standard Selection API changes to the passed-in node.

  • editing/selection/toString-1.html: Write out the unexpected result when the test

fails. It's not failing, but at one point it was, and this made it easier to diagnose.

  • editing/undo/undo-after-event-edited.html: Use the Delete command to do a deletion

that we later undo. The old code was using the Selection API extractContents method,
which is not an undoable editing operation.

  • platform/gtk/editing/pasteboard/drop-text-without-selection-expected.txt: Removed.
  • platform/ios/editing/pasteboard/drop-text-without-selection-expected.txt: Removed.
  • platform/mac-bigsur-wk1/editing/pasteboard/drop-text-without-selection-expected.txt: Removed.
  • platform/mac-bigsur/editing/pasteboard/drop-text-without-selection-expected.txt: Removed.
  • platform/win/editing/pasteboard/drop-text-without-selection-expected.txt: Removed.
  • platform/wincairo/editing/pasteboard/drop-text-without-selection-expected.txt: Removed.

These unused files were incorrectly left behind when we converted this into a reftest.

  • platform/mac-wk1/TestExpectations: Changed retro-correction-spelling-markers.html

to "[ Pass Failure ]" since it's a flaky test, not a reliable failure.

  • platform/mac/TestExpectations: Changed some flakiness expectations that were marked

Release-only to be in effect in Debug builds too. For autocorrection-contraction.html,
expect a timeout on BigSur+ Debug. Not sure exactly what is causing it, but it's happening
both locally for me and on the bots.

  • platform/wk2/TestExpectations: Expect a timeout in Debug builds for two tests that are

timing out both for me and on the Modern WebKit Debug bots, but not Legacy WebKit and not
Release bots.

12:56 PM Changeset in webkit [267996] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Unreviewed, reverting r267986.
https://bugs.webkit.org/show_bug.cgi?id=217329

Introduced layout test failures

Reverted changeset:

"[Cocoa] Reduce time waiting for Launch Services database"
https://bugs.webkit.org/show_bug.cgi?id=217253
https://trac.webkit.org/changeset/267986

12:36 PM Changeset in webkit [267995] by achristensen@apple.com
  • 47 edits in trunk

WebKit doesn't parse "#" as delimiter for fragment identifier in data URIs
https://bugs.webkit.org/show_bug.cgi?id=68089

Patch by Rob Buis <rbuis@igalia.com> on 2020-10-05
Reviewed by Alex Christensen, Ryosuke Niwa, and Darin Adler.

LayoutTests/imported/w3c:

Update improved test results.

  • web-platform-tests/fetch/data-urls/processing.any-expected.txt:
  • web-platform-tests/fetch/data-urls/processing.any.worker-expected.txt:
  • web-platform-tests/url/data-uri-fragment-expected.txt:

Source/WebCore:

To maintain compatibility with existing iOS and macOS apps, we only do this for apps linked
with the SDK after the change.

Covered by newly passing web platform tests (which Chrome and Firefox already passed).

  • loader/ResourceLoader.cpp:

(WebCore::shouldStripFragmentIdentifier):
(WebCore::ResourceLoader::loadDataURL):

  • platform/cocoa/VersionChecks.h:

Source/WTF:

  • wtf/URL.h:
  • wtf/spi/darwin/dyldSPI.h:

LayoutTests:

Adjusts tests thats use data URIs to escape the # character.

  • accessibility/ios-simulator/iframe-access.html:
  • accessibility/ios-simulator/unobscured-content-rect.html:
  • accessibility/resources/iframe.html:
  • accessibility/scroll-to-global-point-iframe.html:
  • accessibility/scroll-to-make-visible-iframe-offscreen.html:
  • accessibility/scroll-to-make-visible-iframe.html:
  • css3/blending/background-blend-mode-crossfade-image.html:
  • css3/blending/background-blend-mode-data-uri-svg-image.html:
  • css3/blending/background-blend-mode-tiled-layers.html:
  • css3/flexbox/flexitem.html:
  • css3/shapes/shape-outside/shape-image/shape-image-002.html:
  • css3/shapes/shape-outside/shape-image/shape-image-005.html:
  • editing/pasteboard/data-transfer-set-data-sanitize-url-when-copying-in-null-origin.html:
  • editing/pasteboard/data-transfer-set-data-sanitize-url-when-dragging-in-null-origin.html:
  • fast/css-grid-layout/grid-item-display.html:
  • fast/css/import-style-update.html:
  • fast/css/link-media-attr.html:
  • fast/dom/HTMLLinkElement/link-stylesheet-media-type.html:
  • fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html:
  • fast/events/attribute-listener-cloned-from-frameless-doc-context.html:
  • fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html:
  • fast/events/attribute-listener-extracted-from-frameless-doc-context.html:
  • fast/hidpi/image-srcset-data-escaped-srcset.html:
  • fast/html/link-rel-stylesheet.html:
  • fast/loader/data-url-encoding-html.html:
  • fast/loader/data-url-encoding-svg.html:
  • fast/spatial-navigation/resources/iframe.html:
  • http/tests/security/top-level-unique-origin.https.html:
  • platform/ios/css3/flexbox/flexitem-expected.txt:
  • platform/win/css3/flexbox/flexitem-expected.txt:
  • security/contentSecurityPolicy/link-with-data-url-allowed-by-style-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled.html:
  • svg/animations/css-animation-background-svg.html:
  • svg/animations/css-animation-embedded-svg.html:
  • svg/animations/css-animation-hover-svg.html:
  • svg/as-image/svg-canvas-data-url-svg-with-feimage-not-tainted.html:
  • svg/custom/object-data-href.html:
12:31 PM Changeset in webkit [267994] by svillar@igalia.com
  • 4 edits in trunk/LayoutTests

[css-flex] Fix expectations of a test which is actually passing
https://bugs.webkit.org/show_bug.cgi?id=217318

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-flexbox/padding-overflow-crash-expected.html: Added a missing " only"

to match the string used in the test.

LayoutTests:

  • TestExpectations: Removed a padding-overflow-crash.html which is actually passing.
12:23 PM Changeset in webkit [267993] by Alan Coon
  • 23 edits
    3 adds in branches/safari-610.2.8.0-branch

Cherry-pick r267869. rdar://problem/69963917

[iOS WK1] Crashes when using ANGLE WebGL from another thread
https://bugs.webkit.org/show_bug.cgi?id=216106
<rdar://problem/68602452>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-10-02
Reviewed by Kenneth Russell.

Source/ThirdParty/ANGLE:

Add two extensions for EAGL and CGL backends to declare the
underlying platform context being "volatile". It means that
the thread-global current context is being modified behind
ANGLE. If ANGLE context is marked volatile for a particular
API, it will sync the underlying context for every EGL
function that needs the context. Most intuitive use is
for the client to call eglMakeCurrent before calling any
gl function if the client knowns the platform state might
be dirty.

Implement eglReleaseThread for EAGL and CGL backends.
Releasing thread will unset the platform current context.

Fix a bug of omitting EGL_ANGLE_device_eagl from being
advertised.

  • extensions/EGL_ANGLE_platform_angle_device_context_volatile_cgl.txt: Added.
  • extensions/EGL_ANGLE_platform_angle_device_context_volatile_eagl.txt: Added.
  • include/EGL/eglext_angle.h:
  • src/libANGLE/Caps.cpp: (egl::DeviceExtensions::getStrings const): (egl::ClientExtensions::getStrings const):
  • src/libANGLE/Caps.h:
  • src/libANGLE/Display.cpp: (egl::Display::prepareForCall): (egl::Display::releaseThread): (egl::GenerateClientExtensions):
  • src/libANGLE/Display.h:
  • src/libANGLE/renderer/DisplayImpl.cpp: (rx::DisplayImpl::prepareForCall): (rx::DisplayImpl::releaseThread):
  • src/libANGLE/renderer/DisplayImpl.h:
  • src/libANGLE/renderer/gl/cgl/DisplayCGL.h:
  • src/libANGLE/renderer/gl/cgl/DisplayCGL.mm: (rx::DisplayCGL::initialize): (rx::DisplayCGL::terminate): (rx::DisplayCGL::prepareForCall): (rx::DisplayCGL::releaseThread): (rx::DisplayCGL::makeCurrent):
  • src/libANGLE/renderer/gl/eagl/DisplayEAGL.h:
  • src/libANGLE/renderer/gl/eagl/DisplayEAGL.mm: (rx::DisplayEAGL::initialize): (rx::DisplayEAGL::terminate): (rx::DisplayEAGL::prepareForCall): (rx::DisplayEAGL::releaseThread):
  • src/libANGLE/validationEGL.cpp:
  • src/libGLESv2/entry_points_egl.cpp:
  • src/libGLESv2/entry_points_egl_ext.cpp:

Source/WebCore:

Source of the bug comes from following:

  • WK1 might run WebKit code in client main thread.
  • WK1 might run Webkit code in web thread.
  • WebKit code might run WebGL payload, notably access GraphicsContextGL classes. Client is able to modify EAGL/CGL current context.

The change to ANGLE incurred two distinct behavior changes
compared to raw EAGL / CGL:
1) Before: context was set current before any GL call
After: context was set current only if EGL current context
had been changed. (Explicit code as well as ANGLE implementation
optimization.)

2) Before: context being used was able to be current in
multiple threads at the same time. (EAGL/CGL feature)
After: context cannot be current in multiple threads
at the same time. (EGL feature)

Change in behavior 1) caused ANGLE to sometimes use
the EAGL/CGL context of the client instead of
the real context that ANGLE created.
Fix this by introducing
EGL_ANGLE_platform_angle_device_context_volatile_eagl
and
EGL_ANGLE_platform_angle_device_context_volatile_cgl
which make ANGLE sync the context on each eglMakeCurrent
eglReleaseThread and eglTerminate.

Change in behavior 2) caused ANGLE to use uninitialized
context object from one thread, if the real context object
was current in another thread.
Fix this by considering "GraphicsContextGLOpenGL current context"
as part of "data that is owned by WebCoreThread lock".
The current context is set with lock held, implicitly.
The current context is released when lock is released.
When the lock is not held, GraphicsContextGLOpenGL current context
is nullptr.

Adds soft linking for EAGL for the purpose of testing this in
TestWebKitAPI. The case of Apple Silicon Mac may sometimes
use CGL and sometimes EAGL, and the test should test that
client overriding both contexts will not cause problems.

Fix ANGLE header include path:

  • Do not include ANGLE in the path, as files are included with ANGLE/
  • Add WK_ALTERNATE_FRAMEWORKS_DIR so that SDK_VARIANT=iosmac e.g. maccatalyst builds work

Previously the ANGLE was not included from ThirdParty/ANGLE, rather
"WebKit SDK".

  • Configurations/WebCore.xcconfig:
  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): (WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL): (WebCore::GraphicsContextGLOpenGL::makeContextCurrent): (WebCore::GraphicsContextGLOpenGL::releaseCurrentContext): (WebCore::GraphicsContextGLOpenGL::checkGPUStatus): (WebCore::GraphicsContextGLOpenGL::allowOfflineRenderers const):
  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/ios/wak/WebCoreThread.mm: (WebThreadUnlockFromAnyThread): (_WebThreadUnlock):

Tools:

Add a WK1 test which runs WebGL code both in
client main thread and in web thread.
This tests the case where ANGLE EGL context is
not being held current in one thread while the
other thread runs WebGL and thus ANGLE EGL code.

  • TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitLegacy/ios/WebGLNoCrashOnOtherThreadAccess.mm: Added. (-[WebGLNoCrashOnOtherThreadAccessWebViewDelegate webViewDidFinishLoad:]): (-[WebGLNoCrashOnOtherThreadAccessWebViewDelegate webView:shouldStartLoadWithRequest:navigationType:]): (TestWebKitAPI::TEST):

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

12:23 PM Changeset in webkit [267992] by Alan Coon
  • 45 edits
    1 move
    8 adds in branches/safari-610.2.8.0-branch/Source

Cherry-pick r267602. rdar://problem/69963917

WebGL should use GLES in iOS apps running on Apple Silicon
https://bugs.webkit.org/show_bug.cgi?id=216722
<rdar://problem/68976337>

Reviewed by Tim Horton and Ken Russell.

Source/ThirdParty/ANGLE:

Change ANGLE to dynamically load either EAGL (OpenGLES) or CGL (OpenGL) depending
on both compile and runtime configurations.

Intel Mac -> CGL
Intel Mac Catalyst -> CGL
Intel iOS Simulator -> EAGL
iOS Device -> EAGL
Apple Silicon Mac -> CGL
Apple Silicon Mac Catalyst (with Mac app) -> CGL
Apple Silicon Mac Catalyst (with iOS app) -> EAGL

The trickiest bit is Apple Silicon Mac Catalyst, which depends on the
type of the application it is attempting to run. In that case ANGLE must compile
both the CGL and EAGL interfaces and then pick one to use after launch.

  • ANGLE.xcodeproj/project.pbxproj: Add new files.
  • Configurations/ANGLE-dynamic.xcconfig: Remove all the OpenGL* linking.
  • Configurations/ANGLE-static.xcconfig:
  • GLESv2.cmake: New files.
  • src/common/platform.h: New definitions for CPU type on Apple Systems.
  • src/gpu_info_util/SystemInfo.h: Split SystemInfo for Apple into two files, for iOS and Mac. Added a field for isiOSAppOnMac that will only be true when running an iOS binary on Apple Silicon.
  • src/gpu_info_util/SystemInfo_apple.mm: Added. Decides which SystemInfo to call. (angle::GetSystemInfo):
  • src/gpu_info_util/SystemInfo_ios.cpp: (angle::GetSystemInfo_ios): (angle::GetSystemInfo): Deleted.
  • src/gpu_info_util/SystemInfo_macos.mm: (angle::GetSystemInfo_mac): (angle::GetSystemInfo): Deleted.
  • src/libANGLE/Caps.cpp: Can no longer just check for PLATFORM_IOS. This might still need a runtime check. (gl::DetermineDepthTextureANGLESupport): (gl::DetermineDepthTextureOESSupport):
  • src/libANGLE/Display.cpp: This is the main initialization point for ANGLE, which decides at compile/runtime which variant of Display to create.
  • src/libANGLE/formatutils.cpp: Add the correct formats. (gl::BuildInternalFormatInfoMap):
  • src/libANGLE/renderer/gl/SoftLinking_apple.h: Added. Macros to help soft-link functions and ObjC classes.
  • src/libANGLE/renderer/gl/cgl/CGLFunctions.cpp: Added. Where we soft-link all the OpenGL/CGL API.
  • src/libANGLE/renderer/gl/cgl/CGLFunctions.h: Added.
  • src/libANGLE/renderer/gl/cgl/DisplayCGL.mm: Use the soft-linked methods.
  • src/libANGLE/renderer/gl/cgl/IOSurfaceSurfaceCGL.cpp:
  • src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h:
  • src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm: Rename WebSwapLayer to WebSwapLayerCGL otherwise it clashes with the EAGL version. (rx::WindowSurfaceCGL::initialize): (-[WebSwapLayer initWithSharedState:withContext:withFunctions:]): Deleted. (-[WebSwapLayer copyCGLPixelFormatForDisplayMask:]): Deleted. (-[WebSwapLayer copyCGLContextForPixelFormat:]): Deleted. (-[WebSwapLayer canDrawInCGLContext:pixelFormat:forLayerTime:displayTime:]): Deleted. (-[WebSwapLayer drawInCGLContext:pixelFormat:forLayerTime:displayTime:]): Deleted.
  • src/libANGLE/renderer/gl/eagl/DeviceEAGL.cpp: Similar changes to the CGL implementation.
  • src/libANGLE/renderer/gl/eagl/DeviceEAGL.h:
  • src/libANGLE/renderer/gl/eagl/DisplayEAGL.h:
  • src/libANGLE/renderer/gl/eagl/DisplayEAGL.mm: (rx::DisplayEAGL::initialize): (rx::DisplayEAGL::terminate): (rx::WorkerContextEAGL::~WorkerContextEAGL): (rx::WorkerContextEAGL::makeCurrent): (rx::WorkerContextEAGL::unmakeCurrent): (rx::DisplayEAGL::createWorkerContext):
  • src/libANGLE/renderer/gl/eagl/EAGLFunctions.h: Added.
  • src/libANGLE/renderer/gl/eagl/EAGLFunctions.mm: Added.
  • src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm:
  • src/libANGLE/renderer/gl/eagl/PbufferSurfaceEAGL.cpp:
  • src/libANGLE/renderer/gl/eagl/RendererEAGL.cpp:
  • src/libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.h:
  • src/libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.mm: (-[WebSwapLayerEAGL display]): (rx::WindowSurfaceEAGL::initialize): (-[WebSwapLayer initWithSharedState:withContext:withFunctions:]): Deleted. (-[WebSwapLayer display]): Deleted.
  • src/libANGLE/renderer/gl/renderergl_utils.cpp: Runtime check. (rx::nativegl_gl::GenerateCaps):

Source/WebCore:

  • Configurations/WebCore.xcconfig: Remove all OpenGL/OpenGLES linking.
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/GraphicsContextGL.h: Change the ANGLE IOSurface texture binding enums into functions, because they have to be calculated at run-time.
  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: Use the new soft-linked functions from PAL. Also implement the IOSurface texture binding helpers that were previously enums.
  • platform/mac/PlatformScreenMac.mm:
  • platform/mac/WebGLBlocklist.mm:

Source/WebCore/PAL:

Add soft-linking content for OpenGL/OpenGLES.

  • PAL.xcodeproj/project.pbxproj:
  • pal/PlatformMac.cmake:
  • pal/cocoa/OpenGLSoftLinkCocoa.h: Added.
  • pal/cocoa/OpenGLSoftLinkCocoa.mm: Added.

Source/WebKit:

  • Configurations/WebKit.xcconfig: Remove OpenGL linking.
  • UIProcess/mac/HighPerformanceGPUManager.mm: Renamed to .mm. Use the PAL soft-linked OpenGL API.

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

12:14 PM Changeset in webkit [267991] by Alan Coon
  • 8 edits in branches/safari-610.2.8.0-branch/Source

Versioning.

WebKit-7610.2.8.0.1

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

[GLIB] Remove two WebGL tests crashing that are passing since r266809.

Unreviewed test gardening.

Also emit GLIB baseline for webgl/1.0.3/conformance/context/context-lost-restored.html.

  • platform/glib/TestExpectations:
  • platform/glib/webgl/1.0.3/conformance/context/context-lost-restored-expected.txt:
12:01 PM Changeset in webkit [267989] by Alan Coon
  • 1 copy in branches/safari-610.2.8.0-branch

New branch.

11:56 AM Changeset in webkit [267988] by Aditya Keerthi
  • 35 edits
    16 adds in trunk

[Contact Picker API] Introduce bindings for the Contact Picker API
https://bugs.webkit.org/show_bug.cgi?id=216793
<rdar://problem/69317957>

Reviewed by Wenson Hsieh.

Source/WebCore:

Added IDL for the Contact Picker API, with the exception of the address
and icon contact properties (which will be added after an initial
implemention is complete). See: https://wicg.github.io/contact-api/spec/
for more information.

Test: contact-picker/contacts-interfaces.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/contact-picker/ContactInfo.h: Added.
  • Modules/contact-picker/ContactInfo.idl: Added.
  • Modules/contact-picker/ContactProperty.h: Added.
  • Modules/contact-picker/ContactProperty.idl: Added.
  • Modules/contact-picker/ContactsManager.cpp: Added.

(WebCore::ContactsManager::create):
(WebCore::ContactsManager::ContactsManager):
(WebCore::ContactsManager::navigator):
(WebCore::ContactsManager::getProperties):
(WebCore::ContactsManager::select):

Stub out these API calls for now by immediately rejecting the given promise.

  • Modules/contact-picker/ContactsManager.h: Added.
  • Modules/contact-picker/ContactsManager.idl: Added.
  • Modules/contact-picker/ContactsSelectOptions.h: Added.
  • Modules/contact-picker/ContactsSelectOptions.idl: Added.
  • Modules/contact-picker/NavigatorContacts.cpp: Added.

(WebCore::NavigatorContacts::NavigatorContacts):
(WebCore::NavigatorContacts::contacts):
(WebCore::NavigatorContacts::from):
(WebCore::NavigatorContacts::supplementName):

  • Modules/contact-picker/NavigatorContacts.h: Added.
  • Modules/contact-picker/Navigator+Contacts.idl: Added.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h:
  • page/Settings.yaml:

Source/WebKit:

Added a new experimental feature flag. See WebCore Changelog for more details.

  • Shared/WebPreferencesExperimental.yaml:

Source/WebKitLegacy/mac:

Added plumbing to support the associated experimental test option.

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(-[WebPreferences contactPickerAPIEnabled]):
(-[WebPreferences setContactPickerAPIEnabled:]):

  • WebView/WebPreferencesPrivate.h:

Source/WebKitLegacy/win:

Added plumbing to support the associated experimental test option.

  • Interfaces/IWebPreferencesPrivate.idl:
  • WebPreferenceKeysPrivate.h:
  • WebPreferences.cpp:

(WebPreferences::initializeDefaultSettings):
(WebPreferences::contactPickerAPIEnabled):
(WebPreferences::setContactPickerAPIEnabled):

  • WebPreferences.h:
  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

Add experimental preference for the Contact Picker API.

Tools:

Added plumbing to support the associated experimental test option.

  • DumpRenderTree/TestOptions.cpp:

(TestOptions::TestOptions):

  • DumpRenderTree/TestOptions.h:
  • DumpRenderTree/mac/DumpRenderTree.mm:

(setWebPreferencesForTestOptions):

  • DumpRenderTree/win/DumpRenderTree.cpp:

(setWebPreferencesForTestOptions):

LayoutTests:

  • contact-picker/contacts-interfaces-expected.txt: Added.
  • contact-picker/contacts-interfaces.html: Added.

Added a new test to verify the new API interfaces.

  • fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/gtk/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/mac/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/win/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/wincairo/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/wpe/fast/dom/navigator-detached-no-crash-expected.txt:

Updated an existing test to include "navigator.contacts".

11:52 AM Changeset in webkit [267987] by youenn@apple.com
  • 10 edits
    2 adds in trunk

MediaRecorder should respect enabled and muted tracks
https://bugs.webkit.org/show_bug.cgi?id=217312

Reviewed by Eric Carlson.

Source/WebCore:

If track is muted, replace it by either silence (audio buffer filled with zeros) or black frames.
MediaRecorderPrivate will keep track of whether the selected track should be muted.
It is then the responsibility of the specialization to do the appropriate processing.

Test: http/wpt/mediarecorder/mute-tracks.html

  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::MediaRecorder::trackMutedChanged):
(WebCore::MediaRecorder::trackEnabledChanged):

  • Modules/mediarecorder/MediaRecorder.h:
  • platform/audio/cocoa/WebAudioBufferList.cpp:

(WebCore::WebAudioBufferList::zeroFlatBuffer):

  • platform/audio/cocoa/WebAudioBufferList.h:
  • platform/mediarecorder/MediaRecorderPrivate.cpp:

(WebCore::MediaRecorderPrivate::selectTracks):
(WebCore::MediaRecorderPrivate::checkTrackState):

  • platform/mediarecorder/MediaRecorderPrivate.h:

(WebCore::MediaRecorderPrivate::trackMutedChanged):
(WebCore::MediaRecorderPrivate::trackEnabledChanged):
(WebCore::MediaRecorderPrivate::shouldMuteAudio const):
(WebCore::MediaRecorderPrivate::shouldMuteVideo const):

  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:

(WebCore::MediaRecorderPrivateAVFImpl::create):
(WebCore::MediaRecorderPrivateAVFImpl::videoSampleAvailable):
(WebCore::MediaRecorderPrivateAVFImpl::audioSamplesAvailable):

  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:

LayoutTests:

  • http/wpt/mediarecorder/mute-tracks-expected.txt: Added.
  • http/wpt/mediarecorder/mute-tracks.html: Added.
11:43 AM Changeset in webkit [267986] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[Cocoa] Reduce time waiting for Launch Services database
https://bugs.webkit.org/show_bug.cgi?id=217253
<rdar://problem/68585497>

Reviewed by Brent Fulgham.

Currently, the WebContent process is waiting up to 5 seconds for the Launch Services database to be updated.
This is too long, since the process may be considered unresponsive by the system. This patch also addresses
an issue where the required entitlement 'com.apple.private.webkit.use-xpc-endpoint' is missing from the
WebContent development XPC service. This entitlement is required in order to receive the Launch Services
database XPC object in the WebContent process.

  • Scripts/process-entitlements.sh:
  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::platformDidReceiveLoadParameters):

11:42 AM Changeset in webkit [267985] by graouts@webkit.org
  • 25 edits
    16 adds in trunk

Add non-animated support for the CSS rotate property
https://bugs.webkit.org/show_bug.cgi?id=217320
<rdar://problem/69956248>

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

WPT progressions showing the correct parsing and computed style output of a non-animated "rotate" property.

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/css/css-transforms/animation/rotate-composition-expected.txt:
  • web-platform-tests/css/css-transforms/animation/rotate-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/parsing/rotate-parsing-valid-expected.txt:
  • web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:

Source/WebCore:

We add non-animated support for the CSS "rotate" property as specifed in by the CSS Transforms Level 2
specification (​​https://drafts.csswg.org/css-transforms-2/#propdef-rotate).

Tests: transforms/2d/rotate-and-scale-and-translate-order.html

transforms/2d/rotate-and-transform-attribute-in-svg-expected.svg
transforms/2d/rotate-and-transform-attribute-in-svg.svg
transforms/2d/rotate-and-transform-css-property-in-svg-expected.svg
transforms/2d/rotate-and-transform-css-property-in-svg.svg
transforms/2d/rotate-and-translate-in-svg-expected.svg
transforms/2d/rotate-and-translate-in-svg.svg
transforms/2d/rotate-and-translate-order.html
transforms/2d/rotate-in-svg-expected.svg
transforms/2d/rotate-in-svg.svg
transforms/2d/rotate-transform-order.html
transforms/2d/rotate-transform-origin-order.html

  • Headers.cmake:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::computedRotate): Create a CSSValueList to print out the computed value for the "rotate" property.
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSProperties.json: Define the "rotate" property with the condition that the runtime setting for individual

CSS transform properties is set.

  • css/CSSValueKeywords.in: Define the "z" value for the "rotate" property and ensure the "x" and "y" values are

defined as well since -webkit-scroll-snap-type may not be enabled.

  • css/TransformFunctions.cpp:

(WebCore::rotateForValue): Convert a CSSValue to a RotateTransformOperation when parsing a "rotate" property value.

  • css/TransformFunctions.h:
  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeRotate): Create a CSSValueList when parsing a "rotate" property value.
(WebCore::CSSPropertyParser::parseSingleValue):

  • platform/graphics/transforms/RotateTransformOperation.h:
  • rendering/RenderObject.h:

(WebCore::RenderObject::hasTransform const): Consider that having the "rotate" property is akin to having a "transform" property
in the render tree.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::setRotate):
(WebCore::RenderStyle::applyTransform const): Account for the RenderStyle::rotate() value in the right order, after applying the
transform origin and translate, but before applying the scale and main transform.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::rotate const):
(WebCore::RenderStyle::hasTransformRelatedProperty const):
(WebCore::RenderStyle::initialRotate):

  • rendering/style/StyleRareNonInheritedData.h:
  • rendering/style/WillChangeData.cpp:

(WebCore::WillChangeData::propertyCreatesStackingContext):

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertRotate):

  • svg/SVGGraphicsElement.cpp:

(WebCore::SVGGraphicsElement::animatedLocalTransform const): Account for the RenderStyle::rotate() value when rendering SVG, ensuring
that it is applied before the transform specified by either the "transform" CSS property or SVG attribute.

LayoutTests:

Add tests checking that the "rotate" CSS property is applied in the correct order related to
"transform-origin", "transform", "scale" and "translate". We also check that it is applied
in SVG as well.

  • platform/ios-13/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • transforms/2d/rotate-and-scale-and-translate-order-expected.html: Added.
  • transforms/2d/rotate-and-scale-and-translate-order.html: Added.
  • transforms/2d/rotate-and-transform-attribute-in-svg-expected.svg: Added.
  • transforms/2d/rotate-and-transform-attribute-in-svg.svg: Added.
  • transforms/2d/rotate-and-transform-css-property-in-svg-expected.svg: Added.
  • transforms/2d/rotate-and-transform-css-property-in-svg.svg: Added.
  • transforms/2d/rotate-and-translate-in-svg-expected.svg: Added.
  • transforms/2d/rotate-and-translate-in-svg.svg: Added.
  • transforms/2d/rotate-and-translate-order-expected.html: Added.
  • transforms/2d/rotate-and-translate-order.html: Added.
  • transforms/2d/rotate-in-svg-expected.svg: Added.
  • transforms/2d/rotate-in-svg.svg: Added.
  • transforms/2d/rotate-transform-order-expected.html: Added.
  • transforms/2d/rotate-transform-order.html: Added.
  • transforms/2d/rotate-transform-origin-order-expected.html: Added.
  • transforms/2d/rotate-transform-origin-order.html: Added.
11:39 AM Changeset in webkit [267984] by achristensen@apple.com
  • 1 edit
    2 deletes in trunk/LayoutTests/imported/w3c

Remove url-domainToUnicode web platform test as it was done upstream.

  • web-platform-tests/url/url-domainToUnicode-expected.txt: Removed.
  • web-platform-tests/url/url-domainToUnicode.html: Removed.
11:04 AM Changeset in webkit [267983] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

REGRESSION (r267602): editing/selection/ios/select-all-in-readonly-input-does-not-overflow.html fails
https://bugs.webkit.org/show_bug.cgi?id=217321

Reviewed by Dean Jackson.

Fixes an existing test by restoring the commented-out code.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _selectionClipRect]):

10:59 AM Changeset in webkit [267982] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests/imported/w3c

[WPE] Update baselines of two touch-events tests after r266649.

Unreviewed test gardening.

General baselines are updated because WPE is the only port running
these tests. They're skipped in all other ports.

  • web-platform-tests/touch-events/historical-expected.txt:
  • web-platform-tests/touch-events/idlharness.window-expected.txt:
10:41 AM Changeset in webkit [267981] by Alan Coon
  • 23 edits
    3 adds in branches/safari-610-branch

Cherry-pick r267869. rdar://problem/69904332

[iOS WK1] Crashes when using ANGLE WebGL from another thread
https://bugs.webkit.org/show_bug.cgi?id=216106
<rdar://problem/68602452>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-10-02
Reviewed by Kenneth Russell.

Source/ThirdParty/ANGLE:

Add two extensions for EAGL and CGL backends to declare the
underlying platform context being "volatile". It means that
the thread-global current context is being modified behind
ANGLE. If ANGLE context is marked volatile for a particular
API, it will sync the underlying context for every EGL
function that needs the context. Most intuitive use is
for the client to call eglMakeCurrent before calling any
gl function if the client knowns the platform state might
be dirty.

Implement eglReleaseThread for EAGL and CGL backends.
Releasing thread will unset the platform current context.

Fix a bug of omitting EGL_ANGLE_device_eagl from being
advertised.

  • extensions/EGL_ANGLE_platform_angle_device_context_volatile_cgl.txt: Added.
  • extensions/EGL_ANGLE_platform_angle_device_context_volatile_eagl.txt: Added.
  • include/EGL/eglext_angle.h:
  • src/libANGLE/Caps.cpp: (egl::DeviceExtensions::getStrings const): (egl::ClientExtensions::getStrings const):
  • src/libANGLE/Caps.h:
  • src/libANGLE/Display.cpp: (egl::Display::prepareForCall): (egl::Display::releaseThread): (egl::GenerateClientExtensions):
  • src/libANGLE/Display.h:
  • src/libANGLE/renderer/DisplayImpl.cpp: (rx::DisplayImpl::prepareForCall): (rx::DisplayImpl::releaseThread):
  • src/libANGLE/renderer/DisplayImpl.h:
  • src/libANGLE/renderer/gl/cgl/DisplayCGL.h:
  • src/libANGLE/renderer/gl/cgl/DisplayCGL.mm: (rx::DisplayCGL::initialize): (rx::DisplayCGL::terminate): (rx::DisplayCGL::prepareForCall): (rx::DisplayCGL::releaseThread): (rx::DisplayCGL::makeCurrent):
  • src/libANGLE/renderer/gl/eagl/DisplayEAGL.h:
  • src/libANGLE/renderer/gl/eagl/DisplayEAGL.mm: (rx::DisplayEAGL::initialize): (rx::DisplayEAGL::terminate): (rx::DisplayEAGL::prepareForCall): (rx::DisplayEAGL::releaseThread):
  • src/libANGLE/validationEGL.cpp:
  • src/libGLESv2/entry_points_egl.cpp:
  • src/libGLESv2/entry_points_egl_ext.cpp:

Source/WebCore:

Source of the bug comes from following:

  • WK1 might run WebKit code in client main thread.
  • WK1 might run Webkit code in web thread.
  • WebKit code might run WebGL payload, notably access GraphicsContextGL classes. Client is able to modify EAGL/CGL current context.

The change to ANGLE incurred two distinct behavior changes
compared to raw EAGL / CGL:
1) Before: context was set current before any GL call
After: context was set current only if EGL current context
had been changed. (Explicit code as well as ANGLE implementation
optimization.)

2) Before: context being used was able to be current in
multiple threads at the same time. (EAGL/CGL feature)
After: context cannot be current in multiple threads
at the same time. (EGL feature)

Change in behavior 1) caused ANGLE to sometimes use
the EAGL/CGL context of the client instead of
the real context that ANGLE created.
Fix this by introducing
EGL_ANGLE_platform_angle_device_context_volatile_eagl
and
EGL_ANGLE_platform_angle_device_context_volatile_cgl
which make ANGLE sync the context on each eglMakeCurrent
eglReleaseThread and eglTerminate.

Change in behavior 2) caused ANGLE to use uninitialized
context object from one thread, if the real context object
was current in another thread.
Fix this by considering "GraphicsContextGLOpenGL current context"
as part of "data that is owned by WebCoreThread lock".
The current context is set with lock held, implicitly.
The current context is released when lock is released.
When the lock is not held, GraphicsContextGLOpenGL current context
is nullptr.

Adds soft linking for EAGL for the purpose of testing this in
TestWebKitAPI. The case of Apple Silicon Mac may sometimes
use CGL and sometimes EAGL, and the test should test that
client overriding both contexts will not cause problems.

Fix ANGLE header include path:

  • Do not include ANGLE in the path, as files are included with ANGLE/
  • Add WK_ALTERNATE_FRAMEWORKS_DIR so that SDK_VARIANT=iosmac e.g. maccatalyst builds work

Previously the ANGLE was not included from ThirdParty/ANGLE, rather
"WebKit SDK".

  • Configurations/WebCore.xcconfig:
  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): (WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL): (WebCore::GraphicsContextGLOpenGL::makeContextCurrent): (WebCore::GraphicsContextGLOpenGL::releaseCurrentContext): (WebCore::GraphicsContextGLOpenGL::checkGPUStatus): (WebCore::GraphicsContextGLOpenGL::allowOfflineRenderers const):
  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/ios/wak/WebCoreThread.mm: (WebThreadUnlockFromAnyThread): (_WebThreadUnlock):

Tools:

Add a WK1 test which runs WebGL code both in
client main thread and in web thread.
This tests the case where ANGLE EGL context is
not being held current in one thread while the
other thread runs WebGL and thus ANGLE EGL code.

  • TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitLegacy/ios/WebGLNoCrashOnOtherThreadAccess.mm: Added. (-[WebGLNoCrashOnOtherThreadAccessWebViewDelegate webViewDidFinishLoad:]): (-[WebGLNoCrashOnOtherThreadAccessWebViewDelegate webView:shouldStartLoadWithRequest:navigationType:]): (TestWebKitAPI::TEST):

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

10:41 AM Changeset in webkit [267980] by Alan Coon
  • 45 edits
    1 move
    8 adds in branches/safari-610-branch/Source

Cherry-pick r267602. rdar://problem/69904386

WebGL should use GLES in iOS apps running on Apple Silicon
https://bugs.webkit.org/show_bug.cgi?id=216722
<rdar://problem/68976337>

Reviewed by Tim Horton and Ken Russell.

Source/ThirdParty/ANGLE:

Change ANGLE to dynamically load either EAGL (OpenGLES) or CGL (OpenGL) depending
on both compile and runtime configurations.

Intel Mac -> CGL
Intel Mac Catalyst -> CGL
Intel iOS Simulator -> EAGL
iOS Device -> EAGL
Apple Silicon Mac -> CGL
Apple Silicon Mac Catalyst (with Mac app) -> CGL
Apple Silicon Mac Catalyst (with iOS app) -> EAGL

The trickiest bit is Apple Silicon Mac Catalyst, which depends on the
type of the application it is attempting to run. In that case ANGLE must compile
both the CGL and EAGL interfaces and then pick one to use after launch.

  • ANGLE.xcodeproj/project.pbxproj: Add new files.
  • Configurations/ANGLE-dynamic.xcconfig: Remove all the OpenGL* linking.
  • Configurations/ANGLE-static.xcconfig:
  • GLESv2.cmake: New files.
  • src/common/platform.h: New definitions for CPU type on Apple Systems.
  • src/gpu_info_util/SystemInfo.h: Split SystemInfo for Apple into two files, for iOS and Mac. Added a field for isiOSAppOnMac that will only be true when running an iOS binary on Apple Silicon.
  • src/gpu_info_util/SystemInfo_apple.mm: Added. Decides which SystemInfo to call. (angle::GetSystemInfo):
  • src/gpu_info_util/SystemInfo_ios.cpp: (angle::GetSystemInfo_ios): (angle::GetSystemInfo): Deleted.
  • src/gpu_info_util/SystemInfo_macos.mm: (angle::GetSystemInfo_mac): (angle::GetSystemInfo): Deleted.
  • src/libANGLE/Caps.cpp: Can no longer just check for PLATFORM_IOS. This might still need a runtime check. (gl::DetermineDepthTextureANGLESupport): (gl::DetermineDepthTextureOESSupport):
  • src/libANGLE/Display.cpp: This is the main initialization point for ANGLE, which decides at compile/runtime which variant of Display to create.
  • src/libANGLE/formatutils.cpp: Add the correct formats. (gl::BuildInternalFormatInfoMap):
  • src/libANGLE/renderer/gl/SoftLinking_apple.h: Added. Macros to help soft-link functions and ObjC classes.
  • src/libANGLE/renderer/gl/cgl/CGLFunctions.cpp: Added. Where we soft-link all the OpenGL/CGL API.
  • src/libANGLE/renderer/gl/cgl/CGLFunctions.h: Added.
  • src/libANGLE/renderer/gl/cgl/DisplayCGL.mm: Use the soft-linked methods.
  • src/libANGLE/renderer/gl/cgl/IOSurfaceSurfaceCGL.cpp:
  • src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h:
  • src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm: Rename WebSwapLayer to WebSwapLayerCGL otherwise it clashes with the EAGL version. (rx::WindowSurfaceCGL::initialize): (-[WebSwapLayer initWithSharedState:withContext:withFunctions:]): Deleted. (-[WebSwapLayer copyCGLPixelFormatForDisplayMask:]): Deleted. (-[WebSwapLayer copyCGLContextForPixelFormat:]): Deleted. (-[WebSwapLayer canDrawInCGLContext:pixelFormat:forLayerTime:displayTime:]): Deleted. (-[WebSwapLayer drawInCGLContext:pixelFormat:forLayerTime:displayTime:]): Deleted.
  • src/libANGLE/renderer/gl/eagl/DeviceEAGL.cpp: Similar changes to the CGL implementation.
  • src/libANGLE/renderer/gl/eagl/DeviceEAGL.h:
  • src/libANGLE/renderer/gl/eagl/DisplayEAGL.h:
  • src/libANGLE/renderer/gl/eagl/DisplayEAGL.mm: (rx::DisplayEAGL::initialize): (rx::DisplayEAGL::terminate): (rx::WorkerContextEAGL::~WorkerContextEAGL): (rx::WorkerContextEAGL::makeCurrent): (rx::WorkerContextEAGL::unmakeCurrent): (rx::DisplayEAGL::createWorkerContext):
  • src/libANGLE/renderer/gl/eagl/EAGLFunctions.h: Added.
  • src/libANGLE/renderer/gl/eagl/EAGLFunctions.mm: Added.
  • src/libANGLE/renderer/gl/eagl/IOSurfaceSurfaceEAGL.mm:
  • src/libANGLE/renderer/gl/eagl/PbufferSurfaceEAGL.cpp:
  • src/libANGLE/renderer/gl/eagl/RendererEAGL.cpp:
  • src/libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.h:
  • src/libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.mm: (-[WebSwapLayerEAGL display]): (rx::WindowSurfaceEAGL::initialize): (-[WebSwapLayer initWithSharedState:withContext:withFunctions:]): Deleted. (-[WebSwapLayer display]): Deleted.
  • src/libANGLE/renderer/gl/renderergl_utils.cpp: Runtime check. (rx::nativegl_gl::GenerateCaps):

Source/WebCore:

  • Configurations/WebCore.xcconfig: Remove all OpenGL/OpenGLES linking.
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/GraphicsContextGL.h: Change the ANGLE IOSurface texture binding enums into functions, because they have to be calculated at run-time.
  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: Use the new soft-linked functions from PAL. Also implement the IOSurface texture binding helpers that were previously enums.
  • platform/mac/PlatformScreenMac.mm:
  • platform/mac/WebGLBlocklist.mm:

Source/WebCore/PAL:

Add soft-linking content for OpenGL/OpenGLES.

  • PAL.xcodeproj/project.pbxproj:
  • pal/PlatformMac.cmake:
  • pal/cocoa/OpenGLSoftLinkCocoa.h: Added.
  • pal/cocoa/OpenGLSoftLinkCocoa.mm: Added.

Source/WebKit:

  • Configurations/WebKit.xcconfig: Remove OpenGL linking.
  • UIProcess/mac/HighPerformanceGPUManager.mm: Renamed to .mm. Use the PAL soft-linked OpenGL API.

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

10:37 AM Changeset in webkit [267979] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Sources: add a + to the Local Overrides section
https://bugs.webkit.org/show_bug.cgi?id=217235

Reviewed by Brian Burg.

  • UserInterface/Views/SourcesNavigationSidebarPanel.js:

(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateLocalOverrideContextMenu): Added.
(WI.SourcesNavigationSidebarPanel.prototype._populateCreateResourceContextMenu):

10:37 AM Changeset in webkit [267978] by commit-queue@webkit.org
  • 6 edits in trunk/Source

WebDriver Input clear/value commands fails when target is inside shadow dom
https://bugs.webkit.org/show_bug.cgi?id=209233

Patch by Nitzan Uziely <nitzan@testim.io> on 2020-10-05
Reviewed by Brian Burg.

Source/WebCore:

Add support for nested shadow DOM in isDescendantOrShadowDescendantOf,

  • dom/Node.cpp:

(WebCore::Node::isDescendantOrShadowDescendantOf const):

  • dom/Node.h:

(WebCore::Node::isDescendantOrShadowDescendantOf const):

Source/WebKit:

Fixed nodeIsElement which would return true for non-element nodes,
which caused an exception to be thrown when getComputedStyle was called
on non shadow elements.

Fixed computeElementLayout to consider shadow root descendants as descendants
when executing elementsAtPoint.

Test for WPT (https://github.com/web-platform-tests/wpt/pull/25962)

  • UIProcess/Automation/atoms/ElementDisplayed.js:

(isShown.nodeIsElement):
(isShown.enclosingNodeOrSelfMatchingPredicate):
(isShown.enclosingElementOrSelfMatchingPredicate):

  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::WebAutomationSessionProxy::computeElementLayout):

10:36 AM Changeset in webkit [267977] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: unable to create local override for resource that failed to load
https://bugs.webkit.org/show_bug.cgi?id=217234
<rdar://problem/69888143>

Reviewed by Brian Burg.

  • UserInterface/Models/Resource.js:

(WI.Resource.prototype.async createLocalResourceOverride):
Wrap the WI.SourceCode.prototype.requestContent call in a try in case the content is not
able to be fetched. If so, determine the MIME from the URL and fall back to "".

  • UserInterface/Views/ResourceContentView.js:

(WI.ResourceContentView.prototype.requestLocalResourceOverrideInitialContent):
(WI.ResourceContentView.prototype.async _getContentForLocalResourceOverrideFromFile):
Drive-by: drop initial from the parameter name as it's not really necessary.

  • UserInterface/Views/TextResourceContentView.js:

(WI.TextResourceContentView.prototype.requestLocalResourceOverrideInitialContent):
Drive-by: include the mimeType and base64Encoded of the related WI.Resource.

10:34 AM Changeset in webkit [267976] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(?): cannot edit Event Breakpoint
https://bugs.webkit.org/show_bug.cgi?id=217244

Reviewed by Brian Burg.

  • UserInterface/Models/EventBreakpoint.js:

(WI.EventBreakpoint.get supportsEditing):
(WI.EventBreakpoint.prototype.get editable):
Move the specific listener breakpoint logic to the prototype function as this won't
exist in the static function (not to mention it's not possible to create a specific
listener breakpoint "at will" like it is for global event breakpoints).

  • UserInterface/Models/URLBreakpoint.js:

(WI.URLBreakpoint.get supportsEditing): Added.
(WI.URLBreakpoint.prototype.get editable):
(WI.URLBreakpoint.get editable): Deleted.

  • UserInterface/Views/URLBreakpointPopover.js:

(WI.URLBreakpointPopover.get supportsEditing):
Drive-by: update naming to match WI.EventBreakpoint.

10:30 AM Changeset in webkit [267975] by achristensen@apple.com
  • 1 edit
    1 delete in trunk/LayoutTests/imported/w3c

Remove unused -expected.txt file

  • web-platform-tests/url/urlencoded-parser-expected.txt: Removed.
10:23 AM Changeset in webkit [267974] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Move tests also timing out in WPE to GLIB test expectations.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
9:42 AM Changeset in webkit [267973] by wilander@apple.com
  • 14 edits in trunk

Storage Access API: Enable per-page storage access scope and align test cases
https://bugs.webkit.org/show_bug.cgi?id=217077
<rdar://problem/69017878>

Reviewed by Brent Fulgham.

It was decided in https://github.com/privacycg/storage-access/issues/3 that
browsers should grant storage access for all same-site resources on the whole
page, not just the requesting iframe.

Source/WebCore:

No new tests. Existing tests aligned, including
LayoutTests/http/tests/storageAccess/request-and-grant-access-with-per-page-scope-access-from-another-frame.html
which no longer calls
internals.settings.setStorageAccessAPIPerPageScopeEnabled(true)
to opt in to the setting that is now the default.

  • dom/DocumentStorageAccess.cpp:

(WebCore::DocumentStorageAccess::requestStorageAccess):

Changed the settings check to do the reverse, i.e. assume
per-page access by default and per-frame access as the
exception.

  • dom/DocumentStorageAccess.h:

Changed the default setting for m_storageAccessScope to per-page.

  • page/Settings.yaml:

Changed the default to true for
storageAccessAPIPerPageScopeEnabled.

Source/WebKit:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::hasStorageAccess):

Added a call to WebPage::hasPageLevelStorageAccess()
and an early return if it returns true.

(WebKit::WebPage::clearPageLevelStorageAccess):

New function to clear the webpage's m_domainsWithPageLevelStorageAccess
map.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::clearResourceLoadStatistics):

Now clears all webpages' page level storage access maps.

LayoutTests:

  • http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction-and-access-from-right-frame.html:
  • http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction-but-access-from-wrong-frame.html:
  • http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html:
  • http/tests/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access.html:

All of the above now explicitly call
internals.settings.setStorageAccessAPIPerPageScopeEnabled(false)
to opt out of the new default setting.

  • http/tests/storageAccess/request-and-grant-access-with-per-page-scope-access-from-another-frame.html:

Changed to assume per-page is the default.

9:38 AM Changeset in webkit [267972] by ddkilzer@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Build fix: Use JSC_DEFINE_HOST_FUNCTION_WITH_ATTRIBUTES() with SUPPRESS_ASAN
<rdar://problem/69954783>

  • tools/JSDollarVM.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION_WITH_ATTRIBUTES):

  • Change SUPPRESS_ASAN JSC_DEFINE_HOST_FUNCTION() to JSC_DEFINE_HOST_FUNCTION_WITH_ATTRIBUTES(..., SUPPRESS_ASAN, ...) to fix the build.
9:36 AM Changeset in webkit [267971] by Nikita Vasilyev
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Make text selectable in CPU timeline content view
https://bugs.webkit.org/show_bug.cgi?id=216999

Reviewed by Brian Burg.

  • UserInterface/Views/CPUTimelineView.css:

(.timeline-view.cpu > .content > .overview .legend):

  • UserInterface/Views/CPUUsageCombinedView.css:

(.cpu-usage-combined-view > .details):

9:17 AM Changeset in webkit [267970] by weinig@apple.com
  • 21 edits in trunk

Remove support for enabling subpixel CSSOM values, it's off by default everywhere and known to be not-compatible with the web
https://bugs.webkit.org/show_bug.cgi?id=217300

Reviewed by Simon Fraser.

Source/WebCore:

Remove support for subpixel CSSOM values, and fixup Element interfaces that were
only out of spec, returning doubles, due to the conditional support.

  • dom/Element+CSSOMView.idl:
  • dom/Element.cpp:

(WebCore::adjustForLocalZoom):
(WebCore::convertToNonSubpixelValue):
(WebCore::adjustOffsetForZoomAndSubpixelLayout):
(WebCore::Element::offsetLeftForBindings):
(WebCore::Element::offsetLeft):
(WebCore::Element::offsetTopForBindings):
(WebCore::Element::offsetTop):
(WebCore::Element::offsetWidth):
(WebCore::Element::offsetHeight):
(WebCore::Element::clientLeft):
(WebCore::Element::clientTop):
(WebCore::Element::clientWidth):
(WebCore::Element::clientHeight):
(WebCore::subpixelMetricsEnabled): Deleted.
(WebCore::convertToNonSubpixelValueIfNeeded): Deleted.

  • dom/Element.h:
  • html/HTMLElement+CSSOMView.idl:
  • page/Settings.yaml:

Source/WebKit:

Deprecate SPI for enabling subpixel CSSOM values. It is not web compatible.

  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetSubpixelCSSOMElementMetricsEnabled):
(WKPreferencesGetSubpixelCSSOMElementMetricsEnabled):

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _setSubpixelCSSOMElementMetricsEnabled:]):
(-[WKPreferences _subpixelCSSOMElementMetricsEnabled]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:

Source/WebKitLegacy/mac:

Deprecate SPI for enabling subpixel CSSOM values. It is not web compatible.

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(-[WebPreferences setSubpixelCSSOMElementMetricsEnabled:]):
(-[WebPreferences subpixelCSSOMElementMetricsEnabled]):

  • WebView/WebPreferencesPrivate.h:

Source/WTF:

Remove preference for toggling subpixel CSSOM values.

  • Scripts/Preferences/WebPreferences.yaml:

Tools:

Remove support in MiniBrowser for toggling support for subpixel CSSOM values since it
is no longer supported in WebCore.

  • MiniBrowser/mac/SettingsController.h:
  • MiniBrowser/mac/SettingsController.m:

(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController toggleEnableSubPixelCSSOMMetrics:]): Deleted.
(-[SettingsController subPixelCSSOMMetricsEnabled]): Deleted.

  • MiniBrowser/mac/WK1BrowserWindowController.m:

(-[WK1BrowserWindowController didChangeSettings]):

8:43 AM Changeset in webkit [267969] by Antti Koivisto
  • 18 edits
    4 moves
    1 delete in trunk/Source/WebCore

[LFC][Integration] Move Display::InlineContent to LayoutIntegration namespace
https://bugs.webkit.org/show_bug.cgi?id=217310

Reviewed by Zalan Bujtas.

It is only used by the integration code

Also move the related classes and rename the path independent iterator run to PathRun

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • display/DisplayView.h:
  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):

  • layout/displaytree/DisplayRect.h: Removed.
  • layout/flexformatting/FlexFormattingContext.cpp:

(WebCore::Layout::FlexFormattingContext::sizeAndPlaceFlexItems):

  • layout/flexformatting/FlexFormattingState.h:

(WebCore::Layout::FlexFormattingState::lines const):
(WebCore::Layout::FlexFormattingState::addLine):

  • layout/integration/LayoutIntegrationInlineContent.cpp: Renamed from Source/WebCore/layout/displaytree/DisplayInlineContent.cpp.
  • layout/integration/LayoutIntegrationInlineContent.h: Renamed from Source/WebCore/layout/displaytree/DisplayInlineContent.h.
  • layout/integration/LayoutIntegrationLine.h: Renamed from Source/WebCore/layout/displaytree/DisplayLine.h.
  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::layout):
(WebCore::LayoutIntegration::LineLayout::constructContent):
(WebCore::LayoutIntegration::LineLayout::lineCount const):
(WebCore::LayoutIntegration::LineLayout::adjustForPagination):
(WebCore::LayoutIntegration::LineLayout::collectOverflow):
(WebCore::LayoutIntegration::LineLayout::ensureInlineContent):
(WebCore::LayoutIntegration::LineLayout::textRunsFor const):
(WebCore::LayoutIntegration::LineLayout::runFor const):
(WebCore::LayoutIntegration::LineLayout::paint):
(WebCore::LayoutIntegration::LineLayout::hitTest):
(WebCore::LayoutIntegration::LineLayout::constructDisplayContent): Deleted.
(WebCore::LayoutIntegration::LineLayout::ensureDisplayInlineContent): Deleted.

  • layout/integration/LayoutIntegrationLineLayout.h:

(WebCore::LayoutIntegration::LineLayout::inlineContent const):
(WebCore::LayoutIntegration::LineLayout::displayInlineContent const): Deleted.

  • layout/integration/LayoutIntegrationPagination.cpp:

(WebCore::LayoutIntegration::computeLineTopAndBottomWithOverflow):
(WebCore::LayoutIntegration::updateMinimumPageHeight):
(WebCore::LayoutIntegration::makeAdjustedContent):
(WebCore::LayoutIntegration::adjustLinePositionsForPagination):

  • layout/integration/LayoutIntegrationPagination.h:
  • layout/integration/LayoutIntegrationRun.h: Renamed from Source/WebCore/layout/displaytree/DisplayRun.h.
  • layout/integration/LayoutIntegrationRunIterator.cpp:

(WebCore::LayoutIntegration::RunIterator::RunIterator):
(WebCore::LayoutIntegration::TextRunIterator::TextRunIterator):
(WebCore::LayoutIntegration::LineRunIterator::LineRunIterator):
(WebCore::LayoutIntegration::PathRun::modernPath):
(WebCore::LayoutIntegration::PathRun::legacyPath):
(WebCore::LayoutIntegration::Run::modernPath): Deleted.
(WebCore::LayoutIntegration::Run::legacyPath): Deleted.

  • layout/integration/LayoutIntegrationRunIterator.h:

(WebCore::LayoutIntegration::PathTextRun::legacyInlineBox const):
(WebCore::LayoutIntegration::RunIterator::operator* const):
(WebCore::LayoutIntegration::RunIterator::operator-> const):
(WebCore::LayoutIntegration::TextRunIterator::operator* const):
(WebCore::LayoutIntegration::TextRunIterator::operator-> const):
(WebCore::LayoutIntegration::TextRunIterator::get const):
(WebCore::LayoutIntegration::PathRun::PathRun):
(WebCore::LayoutIntegration::PathRun::isText const):
(WebCore::LayoutIntegration::PathRun::rect const):
(WebCore::LayoutIntegration::PathRun::baseline const):
(WebCore::LayoutIntegration::PathRun::isHorizontal const):
(WebCore::LayoutIntegration::PathRun::dirOverride const):
(WebCore::LayoutIntegration::PathRun::isLineBreak const):
(WebCore::LayoutIntegration::PathRun::useLineBreakBoxRenderTreeDumpQuirk const):
(WebCore::LayoutIntegration::PathRun::minimumCaretOffset const):
(WebCore::LayoutIntegration::PathRun::maximumCaretOffset const):
(WebCore::LayoutIntegration::PathRun::bidiLevel const):
(WebCore::LayoutIntegration::PathRun::onSameLine const):
(WebCore::LayoutIntegration::PathRun::legacyInlineBox const):
(WebCore::LayoutIntegration::PathTextRun::hasHyphen const):
(WebCore::LayoutIntegration::PathTextRun::PathTextRun):
(WebCore::LayoutIntegration::PathTextRun::text const):
(WebCore::LayoutIntegration::PathTextRun::localStartOffset const):
(WebCore::LayoutIntegration::PathTextRun::localEndOffset const):
(WebCore::LayoutIntegration::PathTextRun::length const):
(WebCore::LayoutIntegration::PathTextRun::isLastTextRunOnLine const):
(WebCore::LayoutIntegration::PathTextRun::isLastTextRun const):
(isType):
(WebCore::LayoutIntegration::Run::leftmostCaretOffset const): Deleted.
(WebCore::LayoutIntegration::Run::rightmostCaretOffset const): Deleted.
(WebCore::LayoutIntegration::Run::direction const): Deleted.
(WebCore::LayoutIntegration::Run::isLeftToRightDirection const): Deleted.
(WebCore::LayoutIntegration::TextRun::legacyInlineBox const): Deleted.
(WebCore::LayoutIntegration::Run::Run): Deleted.
(WebCore::LayoutIntegration::Run::isText const): Deleted.
(WebCore::LayoutIntegration::Run::rect const): Deleted.
(WebCore::LayoutIntegration::Run::baseline const): Deleted.
(WebCore::LayoutIntegration::Run::isHorizontal const): Deleted.
(WebCore::LayoutIntegration::Run::dirOverride const): Deleted.
(WebCore::LayoutIntegration::Run::isLineBreak const): Deleted.
(WebCore::LayoutIntegration::Run::useLineBreakBoxRenderTreeDumpQuirk const): Deleted.
(WebCore::LayoutIntegration::Run::minimumCaretOffset const): Deleted.
(WebCore::LayoutIntegration::Run::maximumCaretOffset const): Deleted.
(WebCore::LayoutIntegration::Run::bidiLevel const): Deleted.
(WebCore::LayoutIntegration::Run::onSameLine const): Deleted.
(WebCore::LayoutIntegration::Run::legacyInlineBox const): Deleted.
(WebCore::LayoutIntegration::TextRun::hasHyphen const): Deleted.
(WebCore::LayoutIntegration::TextRun::TextRun): Deleted.
(WebCore::LayoutIntegration::TextRun::text const): Deleted.
(WebCore::LayoutIntegration::TextRun::localStartOffset const): Deleted.
(WebCore::LayoutIntegration::TextRun::localEndOffset const): Deleted.
(WebCore::LayoutIntegration::TextRun::length const): Deleted.
(WebCore::LayoutIntegration::TextRun::isLastTextRunOnLine const): Deleted.
(WebCore::LayoutIntegration::TextRun::isLastTextRun const): Deleted.

  • layout/integration/LayoutIntegrationRunIteratorModernPath.h:

(WebCore::LayoutIntegration::ModernPath::ModernPath):
(WebCore::LayoutIntegration::ModernPath::runs const):
(WebCore::LayoutIntegration::ModernPath::run const):
(WebCore::LayoutIntegration::ModernPath::line const):

  • layout/layouttree/LayoutTreeBuilder.cpp:
  • rendering/RenderTreeAsText.cpp:

(WebCore::write):
(WebCore::writeTextRun): Deleted.

  • rendering/TextPainter.cpp:

(WebCore::TextPainter::clearGlyphDisplayLists):

8:40 AM Changeset in webkit [267968] by Diego Pino Garcia
  • 9 edits
    2 copies
    1 move
    2 adds
    2 deletes in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Merge common GTK and WPE baselines and emit new baselines for WPE tests after r267960.

Also move webaudio/oscillator-sine.html failure to glib.

  • platform/glib/TestExpectations:
  • platform/glib/fetch/fetch-url-serialization-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/mathml/relations/css-styling/attribute-mapping-002-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/display-1-expected.txt:
  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/mathml/relations/html5-tree/display-1-expected.txt: Removed.
  • platform/gtk/imported/w3c/web-platform-tests/selection/selection-select-all-move-input-crash-expected.txt: Copied from LayoutTests/platform/glib/imported/w3c/web-platform-tests/selection/selection-select-all-move-input-crash-expected.txt.
  • platform/wpe/http/tests/storageAccess/aggregate-sorted-data-with-storage-access-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/css-sizing/percentage-height-in-flexbox-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/mathml/relations/css-styling/attribute-mapping-002-expected.txt: Renamed from LayoutTests/platform/gtk/imported/w3c/web-platform-tests/mathml/relations/css-styling/attribute-mapping-002-expected.txt.
  • platform/wpe/imported/w3c/web-platform-tests/selection/selection-select-all-move-input-crash-expected.txt: Renamed from LayoutTests/platform/glib/imported/w3c/web-platform-tests/selection/selection-select-all-move-input-crash-expected.txt.
8:28 AM Changeset in webkit [267967] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][Integration] Enable non-uniform line height content with floats
https://bugs.webkit.org/show_bug.cgi?id=217306

Reviewed by Antti Koivisto.

Expand coverage now that we support non-uniform line heights.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForLineLayoutWithReason):

7:57 AM Changeset in webkit [267966] by achristensen@apple.com
  • 48 edits
    2 adds
    2 deletes in trunk

Unify linkedOnOrAfter duplicate code and use SPI/WebCoreTestSupport instead of NSUserDefaults
https://bugs.webkit.org/show_bug.cgi?id=217239

Reviewed by Darin Adler.

Source/WebCore:

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/cocoa/VersionChecks.h: Renamed from Source/WebKit/UIProcess/Cocoa/VersionChecks.h.
  • platform/cocoa/VersionChecks.mm: Renamed from Source/WebKit/UIProcess/Cocoa/VersionChecks.mm.

(WebCore::linkedOnOrAfter):

  • testing/js/WebCoreTestSupport.cpp:

(WebCoreTestSupport::setLinkedOnOrAfterEverythingForTesting):

  • testing/js/WebCoreTestSupport.h:

Source/WebKit:

  • NetworkProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:
  • Shared/Cocoa/CompletionHandlerCallChecker.mm:

(WebKit::shouldThrowExceptionForDuplicateCompletionHandlerCall):

  • Shared/Cocoa/DefaultWebBrowserChecks.mm:

(WebKit::determineITPState):

  • Shared/Cocoa/WebKit2InitializeCocoa.mm:

(WebKit::InitializeWebKit2):

  • Shared/WebPreferencesDefaultValues.cpp:

(WebKit::defaultPassiveTouchListenersAsDefaultOnDocument):

  • SourcesCocoa.txt:
  • UIProcess/API/C/WKPage.cpp:

(WKPageReload):

  • UIProcess/API/Cocoa/WKProcessPool.mm:

(+[WKProcessPool _setLinkedOnOrAfterEverythingForTesting]):

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

(shouldAllowSettingAnyXHRHeaderFromFileURLs):
(shouldRestrictBaseURLSchemes):
(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _setupPageConfiguration:]):
(-[WKWebView reload]):
(-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(defaultShouldDecidePolicyBeforeLoadingQuickLookPreview):
(-[WKWebViewConfiguration init]):

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore init]):

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _computedObscuredInset]):

  • UIProcess/API/mac/WKWebViewMac.mm:

(-[WKWebView _web_dragDestinationActionForDraggingInfo:]):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):

  • UIProcess/Inspector/mac/WKInspectorViewController.mm:

(-[WKInspectorViewController inspectorWKWebViewReload:]):

  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:

(WebKit::RemoteScrollingCoordinatorProxy::hasScrollableOrZoomedMainFrame const):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::createWebPage):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::isMainThreadOrCheckDisabled):

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _commonInitializationWithProcessPool:configuration:]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _shouldUseContextMenus]):
(applicationIsKnownToIgnoreMouseEvents):

  • UIProcess/ios/WKScrollView.mm:

(-[WKScrollView _systemContentInset]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::desktopClassBrowsingRecommended):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/cocoa/WebProcessCocoa.mm:

Source/WebKitLegacy/mac:

  • DefaultDelegates/WebDefaultUIDelegate.mm:

(-[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]):

  • Misc/WebIconDatabase.mm:

(+[WebIconDatabase sharedIconDatabase]):

  • Misc/WebKitVersionChecks.h:
  • Misc/WebKitVersionChecks.mm:

(WebKitLinkTimeVersion):
(linkedOnOrAfter): Deleted.

  • WebView/WebPreferencesDefaultValues.mm:

(WebKit::defaultPassiveTouchListenersAsDefaultOnDocument):
(WebKit::defaultShouldRestrictBaseURLSchemes):

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(setDefaultsToConsistentValuesForTesting):
(DumpRenderTreeMain):

  • MiniBrowser/mac/main.m:

(main):

  • MobileMiniBrowser/MobileMiniBrowser/main.m:

(main):

  • TestWebKitAPI/Configurations/TestWTF.xcconfig:
  • TestWebKitAPI/ios/mainIOS.mm:

(main):

  • TestWebKitAPI/mac/mainMac.mm:

(main):

  • WebKitTestRunner/ios/mainIOS.mm:

(main):

  • WebKitTestRunner/mac/main.mm:

(setDefaultsToConsistentValuesForTesting):
(main):

7:51 AM Changeset in webkit [267965] by achristensen@apple.com
  • 9 edits in trunk

URLParser should fail to parse URLs with hosts containing invalid punycode encodings
https://bugs.webkit.org/show_bug.cgi?id=217285

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/failure-expected.txt:
  • web-platform-tests/url/toascii.window-expected.txt:
  • web-platform-tests/url/url-constructor-expected.txt:

Source/WTF:

URLParser has a fast path for parsing hosts that are all ASCII, but that does not validate hosts that are invalid punycode, such as "xn--".
Since all punycode encoded strings start with "xn--", if the input string starts with "xn--" then skip the fast path and let ICU decide if it's valid.

  • wtf/URLParser.cpp:

(WTF::URLParser::domainToASCII):
(WTF::URLParser::startsWithXNDashDash):
(WTF::URLParser::parseHostAndPort):

  • wtf/URLParser.h:
7:43 AM Changeset in webkit [267964] by achristensen@apple.com
  • 7 edits in trunk

When appending a Windows drive letter to a file URL, remove any path we may have copied from the base URL
https://bugs.webkit.org/show_bug.cgi?id=217284

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/resources/urltestdata.json:
  • web-platform-tests/url/url-constructor-expected.txt:

Source/WTF:

This fixes a web platform test and adds another to verify that we remove the entire path, not just the last segment like we do with ..
Edge has implemented this, and in order to have a platform-independent URL we should do it too.

  • wtf/URLParser.cpp:

(WTF::URLParser::isWindowsDriveLetter):
(WTF::URLParser::appendWindowsDriveLetter):
(WTF::URLParser::parse):

7:40 AM Changeset in webkit [267963] by achristensen@apple.com
  • 17 edits in trunk

Fix UTF-8 encoding in URL parsing
https://bugs.webkit.org/show_bug.cgi?id=217289

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-origin-expected.txt:
  • web-platform-tests/url/a-element-origin-xhtml-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/resources/urltestdata.json:
  • web-platform-tests/url/url-constructor-expected.txt:
  • web-platform-tests/url/url-origin-expected.txt:

Source/WTF:

This matches the behavior of Firefox and the Unicode and whatwg encoding specifications.

  • wtf/URLParser.cpp:

(WTF::URLParser::utf8PercentEncode):
(WTF::URLParser::utf8QueryEncode):
(WTF::URLParser::parseHostAndPort):

Tools:

  • TestWebKitAPI/Tests/WTF/URLParser.cpp:

(TestWebKitAPI::TEST_F):

LayoutTests:

  • fast/url/anchor-expected.txt:
  • fast/url/anchor.html:
  • fast/url/path-expected.txt:
  • fast/url/path.html:
7:39 AM Changeset in webkit [267962] by Antti Koivisto
  • 14 edits
    1 add in trunk/Source/WebCore

[LFC][Integration] Avoid ensureLineBoxes for some call sites of inlineBoxAndOffset
https://bugs.webkit.org/show_bug.cgi?id=217225

Reviewed by Zalan Bujtas.

Separate inlineRunAndOffset from inlineBoxAndOffset.
The formet returns iterator while the later forces the legacy path.

Use inlineRunAndOffset in a few places.

  • dom/Position.cpp:

(WebCore::Position::rendersInDifferentPosition const):
(WebCore::Position::inlineRunAndOffset const):
(WebCore::Position::inlineBoxAndOffset const):
(WebCore::Position::ensureLineBoxes const):
(WebCore::InlineBoxAndOffset::InlineBoxAndOffset): Deleted.

  • dom/Position.h:

(WebCore::InlineBoxAndOffset::InlineBoxAndOffset):

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::directionOfSelection):

  • editing/VisiblePosition.h:

(WebCore::VisiblePosition::inlineRunAndOffset const):

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForFontAndText):

  • layout/integration/LayoutIntegrationRunIterator.h:

(WebCore::LayoutIntegration::Run::onSameLine const):

  • layout/integration/LayoutIntegrationRunIteratorLegacyPath.h:

(WebCore::LayoutIntegration::LegacyPath::onSameLine const):
(WebCore::LayoutIntegration::LegacyPath::atEnd const):

  • layout/integration/LayoutIntegrationRunIteratorModernPath.h:

(WebCore::LayoutIntegration::ModernPath::onSameLine const):
(WebCore::LayoutIntegration::ModernPath::atEnd const):

  • platform/DragImage.cpp:
  • rendering/RenderTextLineBoxes.h:
7:35 AM Changeset in webkit [267961] by Simon Fraser
  • 7 edits in trunk/Source/WebKit

Clean up "rendering update" terminology in DrawingArea
https://bugs.webkit.org/show_bug.cgi?id=217307

Reviewed by Tim Horton.

DrawingArea doesn't know about "immediate" vs. "normal" rendering updates; for it,
all requests are for immediate rendering updates; the only difference is whether
layer tree freezing is respected.

This is the first step to correcting the naming; scheduleImmediateRenderingUpdate()
doesn't have to be exposed at all. A future patch will rename DrawingArea::scheduleRenderingUpdate()
to make it clear that it's not about timed updates.

  • WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h:
  • WebProcess/WebPage/DrawingArea.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::setLayerTreeStateIsFrozen):
(WebKit::RemoteLayerTreeDrawingArea::startRenderingUpdateTimer):
(WebKit::RemoteLayerTreeDrawingArea::scheduleRenderingUpdate):
(WebKit::RemoteLayerTreeDrawingArea::activityStateDidChange):
(WebKit::RemoteLayerTreeDrawingArea::scheduleImmediateRenderingUpdate): Deleted.

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::scheduleRenderingUpdate):
(WebKit::TiledCoreAnimationDrawingArea::scheduleImmediateRenderingUpdate): Deleted.

7:19 AM Changeset in webkit [267960] by pvollan@apple.com
  • 6 edits in trunk/Source/WebKit

[GPU Process] Make it possible to dynamically block IOKit in the WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=217129
<rdar://problem/69466039>

Reviewed by Geoffrey Garen.

We need to be able to enable IOKit blocking via the WebContent sandbox dynamically.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::gpuIOKitClasses):
(WebKit::WebProcessPool::platformInitializeWebProcess):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

3:30 AM Changeset in webkit [267959] by commit-queue@webkit.org
  • 5 edits in trunk

Make xhr.response more conforming to the specification
https://bugs.webkit.org/show_bug.cgi?id=217296

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

LayoutTests/imported/w3c:

Update improved test result.

  • web-platform-tests/xhr/overridemimetype-blob-expected.txt:

Source/WebCore:

Make xhr.response more conforming to the specification when dealing
with Blob type responses, the type for the Blob should be computed
by the "get a final MIME type" algorithm [1, 2].

Behavior matches Firefox.

Test: imported/w3c/web-platform-tests/xhr/overridemimetype-blob.html

[1] https://xhr.spec.whatwg.org/#ref-for-final-mime-type③
[2] https://xhr.spec.whatwg.org/#final-mime-type

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::createResponseBlob):
(WebCore::XMLHttpRequest::responseMIMEType const):

  • xml/XMLHttpRequest.h:
2:46 AM Changeset in webkit [267958] by graouts@webkit.org
  • 27 edits
    14 adds in trunk

Add non-animated support for the CSS scale property
https://bugs.webkit.org/show_bug.cgi?id=217291
<rdar://problem/69926254>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

WPT progressions showing the correct parsing and computed style output of a non-animated "scale" property.
We are also adding some more tests to the invalid "scale" parsing to check that we bail once we get junk
for optional values after valid values and move percentage values to invalid tests (also filed a WPT PR
at https://github.com/web-platform-tests/wpt/pull/25960).

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/css/css-transforms/animation/scale-composition-expected.txt:
  • web-platform-tests/css/css-transforms/animation/scale-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/parsing/scale-parsing-invalid-expected.txt:
  • web-platform-tests/css/css-transforms/parsing/scale-parsing-invalid.html:
  • web-platform-tests/css/css-transforms/parsing/scale-parsing-valid-expected.txt:
  • web-platform-tests/css/css-transforms/parsing/scale-parsing-valid.html:
  • web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:

Source/WebCore:

We add non-animated support for the CSS "scale" property as specifed in by the CSS Transforms Level 2
specification (​https://drafts.csswg.org/css-transforms-2/#propdef-scale).

Tests: transforms/2d/scale-and-transform-attribute-in-svg-expected.svg

transforms/2d/scale-and-transform-attribute-in-svg.svg
transforms/2d/scale-and-transform-css-property-in-svg-expected.svg
transforms/2d/scale-and-transform-css-property-in-svg.svg
transforms/2d/scale-and-translate-in-svg-expected.svg
transforms/2d/scale-and-translate-in-svg.svg
transforms/2d/scale-and-translate-order.html
transforms/2d/scale-in-svg-expected.svg
transforms/2d/scale-in-svg.svg
transforms/2d/scale-transform-order.html
transforms/2d/scale-transform-origin-order.html

  • Headers.cmake:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::computedTranslate): Remove the extraneous is<RenderInline> check which is already covered by rendererCanBeTransformed().
(WebCore::computedScale): Create a CSSValueList to print out the computed value for the "scale" property.
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSProperties.json: Define the "scale" property with the condition that the runtime setting for individual

CSS transform properties is set.

  • css/TransformFunctions.cpp:

(WebCore::scaleForValue): Convert a CSSValue to a TranslateTransformOperation when parsing a "scale" property value.

  • css/TransformFunctions.h:
  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeScale): Create a CSSValueList when parsing a "scale" property value.
(WebCore::CSSPropertyParser::parseSingleValue):

  • platform/graphics/transforms/ScaleTransformOperation.h:
  • rendering/RenderObject.h:

(WebCore::RenderObject::hasTransform const): Consider that having the "scale" property is akin to having a "transform" property
in the render tree.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::setScale):
(WebCore::RenderStyle::applyTransform const): Account for the RenderStyle::scale() value in the right order, after applying the
transform origin and translate, but before applying the main transform.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::scale const):
(WebCore::RenderStyle::hasTransformRelatedProperty const):
(WebCore::RenderStyle::initialScale):

  • rendering/style/StyleRareNonInheritedData.h:
  • rendering/style/WillChangeData.cpp:

(WebCore::WillChangeData::propertyCreatesStackingContext):

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertScale):

  • svg/SVGGraphicsElement.cpp:

(WebCore::SVGGraphicsElement::animatedLocalTransform const): Account for the RenderStyle::scale() value when rendering SVG, ensuring
that it is applied before the transform specified by either the "transform" CSS property or SVG attribute.

LayoutTests:

Add tests checking that the "scale" CSS property is applied in the correct order related to
"transform-origin" and "transform" and that it is applied in SVG as well.

  • platform/ios-13/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • transforms/2d/scale-and-transform-attribute-in-svg-expected.svg: Added.
  • transforms/2d/scale-and-transform-attribute-in-svg.svg: Added.
  • transforms/2d/scale-and-transform-css-property-in-svg-expected.svg: Added.
  • transforms/2d/scale-and-transform-css-property-in-svg.svg: Added.
  • transforms/2d/scale-and-translate-in-svg-expected.svg: Added.
  • transforms/2d/scale-and-translate-in-svg.svg: Added.
  • transforms/2d/scale-and-translate-order-expected.html: Added.
  • transforms/2d/scale-and-translate-order.html: Added.
  • transforms/2d/scale-in-svg-expected.svg: Added.
  • transforms/2d/scale-in-svg.svg: Added.
  • transforms/2d/scale-transform-order-expected.html: Added.
  • transforms/2d/scale-transform-order.html: Added.
  • transforms/2d/scale-transform-origin-order-expected.html: Added.
  • transforms/2d/scale-transform-origin-order.html: Added.
1:13 AM Changeset in webkit [267957] by commit-queue@webkit.org
  • 6 edits in trunk

MIME type parser should skip trailing HTTP whitespace
https://bugs.webkit.org/show_bug.cgi?id=217179

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

LayoutTests/imported/w3c:

Update test expectation.

  • web-platform-tests/xhr/overridemimetype-blob-expected.txt:

Source/WebCore:

MIME type parser should skip trailing HTTP whitespace in Mimesniff mode [1].

[1] https://mimesniff.spec.whatwg.org/#parse-a-mime-type (Steps 8 and 11.9.2)

  • platform/network/ParsedContentType.cpp:

(WebCore::parseToken):

Tools:

Add unit tests for trailing HTTP whitespace.

  • TestWebKitAPI/Tests/WebCore/ParsedContentType.cpp:

(TestWebKitAPI::TEST):

Oct 4, 2020:

11:57 PM Changeset in webkit [267956] by commit-queue@webkit.org
  • 7 edits
    2 adds in trunk

DataTransfer.setDragImage takes a non nullable Element parameter
https://bugs.webkit.org/show_bug.cgi?id=217283

Patch by Rob Buis <rbuis@igalia.com> on 2020-10-04
Reviewed by Sam Weinig.

Source/WebCore:

DataTransfer.setDragImage takes a non nullable Element parameter [1].

Behavior matches Firefox and Chrome.

Test: fast/events/setDragImage-element-non-nullable.html

[1] https://html.spec.whatwg.org/multipage/dnd.html#dom-datatransfer-setdragimage

  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::setDragImage):

  • dom/DataTransfer.h:
  • dom/DataTransfer.idl:
  • page/EventHandler.cpp:

(WebCore::EventHandler::handleDrag):

LayoutTests:

Add test to verify DataTransfer.setDragImage throws if a null
is passed for the Element parameter.

  • fast/events/setDragImage-element-non-nullable-expected.txt: Added.
  • fast/events/setDragImage-element-non-nullable.html: Added.
  • platform/ios/TestExpectations:
9:40 PM Changeset in webkit [267955] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[LFC][Floats] Do not assert when right aligned float overflows the containing block on the left
https://bugs.webkit.org/show_bug.cgi?id=217305

Reviewed by Antti Koivisto.

Source/WebCore:

It's okay for a float: right; to overflow the containing block on the left.
In such cases let's just constrain the logical right value by the logical left edge.

Test: fast/layoutformattingcontext/intrusive-floats-takes-entire-horizontal-space.html

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::constraintsForLine):

LayoutTests:

  • fast/layoutformattingcontext/intrusive-floats-takes-entire-horizontal-space-expected.html: Added.
  • fast/layoutformattingcontext/intrusive-floats-takes-entire-horizontal-space.html: Added.
9:19 PM Changeset in webkit [267954] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

[curl] WebSocket tests are failing since r267931
https://bugs.webkit.org/show_bug.cgi?id=217298

Reviewed by Darin Adler.

"http:" is a invalid URL since r267931. Change the way how to
construct a URL for libcurl.

  • platform/network/curl/CurlStream.cpp:

(WebCore::CurlStream::CurlStream): Construct the URL just by
replacing the scheme part. Removed a local variable
urlForConnection.

9:00 PM Changeset in webkit [267953] by weinig@apple.com
  • 21 edits in trunk/Source/WebCore

[WebIDL] Address consistency around [SameObject] extended attributes
https://bugs.webkit.org/show_bug.cgi?id=217303

Reviewed by Darin Adler.

There isn't any real value in keeping comments around in the IDLs saying:

FIXME: Add [SameObject] once it is supported

It's unclear what we would want the bindings generator to do with [SameObject],
perhaps for wrapper types, assert if the implementation doesn't return the same
object each time in a debug build, perhaps error out if a non-wrapper type doesn't
also have CachedAttribute or maybe just have SameObject imply it. Regardless,
in the mean time, there is no harm in just annotating the types with the attribute
and letting the generator do nothing while we think.

  • Modules/fetch/FetchRequest.idl:
  • Modules/fetch/FetchResponse.idl:
  • Modules/mediastream/MediaStreamTrackEvent.idl:
  • css/DocumentOrShadowRoot+CSSOM.idl:
  • css/ElementCSSInlineStyle.idl:
  • dom/DOMQuad.idl:
  • dom/DataTransfer.idl:
  • dom/Document+HTML.idl:
  • dom/Document+HTMLObsolete.idl:
  • dom/Document.idl:
  • dom/Element.idl:
  • dom/MutationRecord.idl:
  • dom/Node.idl:
  • dom/NodeIterator.idl:
  • dom/ParentNode.idl:
  • dom/TreeWalker.idl:
  • html/HTMLOrForeignElement.idl:
  • html/HTMLSelectElement.idl:
  • page/Location.idl:
  • svg/SVGFitToViewBox.idl:
8:25 PM Changeset in webkit [267952] by Lauro Moura
  • 3 edits in trunk/Source/WebKit

webkitpy: Update messages reference files after r267916
https://bugs.webkit.org/show_bug.cgi?id=217304

Reviewed by Simon Fraser.

Covered by existing tests.

  • Scripts/test-legacyMessageReceiver.cpp:
  • Scripts/testMessageReceiver.cpp:
5:28 PM Changeset in webkit [267951] by commit-queue@webkit.org
  • 5 edits
    7 adds in trunk

Presence of CSS variable causes a background url() to get resolved with a different base
https://bugs.webkit.org/show_bug.cgi?id=198512

Patch by Tyler Wilcock <Tyler Wilcock> on 2020-10-04
Reviewed by Darin Adler.

Source/WebCore:

Prior to this patch, url()s within CSSPendingSubstitutionValues
were resolved relative to the document root rather than the stylesheet
they were created from, which is wrong.

With this patch, when CSSPendingSubstitutionValues are created, they
now store the base URL that should be used when they are later
resolved in StyleBuilder.

Test: fast/css/variables/url-with-variable-is-sheet-relative.html

  • css/CSSPendingSubstitutionValue.h: Store baseURL for later

resolution.
(WebCore::CSSPendingSubstitutionValue::create): Add baseURL
parameter.
(WebCore::CSSPendingSubstitutionValue::baseURL const): Add m_baseURL
getter.
(WebCore::CSSPendingSubstitutionValue::CSSPendingSubstitutionValue):
Add baseURL parameter.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseValueStart): When creating a
CSSPendingSubstitutionValue, also pass along the baseURL from this
context for later resolution.

  • style/StyleBuilder.cpp:

(WebCore::Style::Builder::resolvedVariableValue): If the value
we are resolving is a CSSPendingSubstitutionValue, resolve it
relative to the baseURL it has stored.

LayoutTests:

Add test ensuring shorthands containing url() and CSS variable(s)
resolve the url() relative to the stylesheet the rule is present in,
not the document root.

  • fast/css/variables/support/images/600x600-green-square.png: Added.
  • fast/css/variables/support/styles/url-with-variable-is-sheet-relative.css: Added.
  • fast/css/variables/url-with-variable-is-sheet-relative-expected.html: Added.
  • fast/css/variables/url-with-variable-is-sheet-relative.html: Added.
2:47 PM Changeset in webkit [267950] by BJ Burg
  • 9 edits in trunk

[Cocoa] Add WKUIDelegate SPI to inform clients when a _WKInspector is about to close
https://bugs.webkit.org/show_bug.cgi?id=217233

Reviewed by Timothy Hatcher and Devin Rousso.

Source/WebKit:

This is complementary to _webView:didAttachLocalInspector: and works similarly.
Clients need to be careful in depending on this during teardown, because it won't
come if the UIDelegate has already been cleared out while the inspected page is being closed.

API test: WKInspectorDelegate.WillCloseLocalInspector

  • UIProcess/API/APIUIClient.h:

(API::UIClient::willCloseLocalInspector):

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::willCloseLocalInspector):

  • UIProcess/Inspector/WebInspectorProxy.h:
  • UIProcess/Inspector/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::closeFrontendPageAndWindow):
Add a guard for reentrant calls to close().

Tools:

Add new test case for -_webView:willCloseLocalInspector:.

  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm:

(-[InspectorDelegate inspectorDidEnableBrowserDomain:]):
(-[UIDelegate _webView:didAttachLocalInspector:]):
(-[UIDelegate _webView:willCloseLocalInspector:]):
(TEST):
Clean up how the other test case works so we don't call close from
inside a delegate callback. Let's keep our tests structured the same way.

2:09 PM Changeset in webkit [267949] by commit-queue@webkit.org
  • 10 edits in trunk

Submission failure with "make: * No rule to make target `installsrc'. Stop"
https://bugs.webkit.org/show_bug.cgi?id=214696
<rdar://problem/62268104>

Patch by Ryan Hostetler <rhost@apple.com> on 2020-10-04
Reviewed by Darin Adler.

.:

Add installsrc phase to support xbs submitproject for WebKit repository.
This change allows internal tools to submit and build in a single step.

  • Makefile:
  • Makefile.shared:
  • Source/Makefile:

Source/ThirdParty:

Add installsrc phase to support xbs submitproject for WebKit repository.
This change allows internal tools to submit and build in a single step.

  • Makefile:

Tools:

Add support for XBS single base project build for WebKit repository.
This change allows internal tools to submit and build from the repository root in a single step.

  • Makefile:

Tools does not need to be submitted, so we stub out the installsrc phase.

WebKitLibraries:

Add support for XBS single base project build for WebKit repository.
This change allows internal tools to submit and build from the repository root in a single step.

  • Makefile:

WebKitLibraries do not need to be submitted, so we stub out the installsrc phase.

10:06 AM Changeset in webkit [267948] by Alan Bujtas
  • 4 edits
    1 add
    2 deletes in trunk

[LFC][Integration] Enable soft hyphen
https://bugs.webkit.org/show_bug.cgi?id=217293

Reviewed by Antti Koivisto.

Source/WebCore:

Let's expand IFC coverage with soft hyphen rendering.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForText):

LayoutTests:

  • fast/parser/entities-in-html-expected.txt: Progression? Now soft hyphen "renders".
  • fast/text/softHyphen-expected.html: Added. Text-dumping soft hyphens seems defective in some cases.

In this test case there should not be any hyphenation triggered by soft hyphens,
so let's use a reftest instead (which should have been used the first place).

  • platform/mac/fast/text/softHyphen-expected.png: Removed.
  • platform/mac/fast/text/softHyphen-expected.txt: Removed.
9:12 AM Changeset in webkit [267947] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC][Soft hyphen] Fix the case when the first content overflows with hyphen
https://bugs.webkit.org/show_bug.cgi?id=217295

Reviewed by Antti Koivisto.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::rebuildLineForTrailingSoftHyphen):

5:23 AM Changeset in webkit [267946] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

[LFC][IFC] Remove Line::appendPartialTrailingTextItem special case
https://bugs.webkit.org/show_bug.cgi?id=217287

Reviewed by Antti Koivisto.

Use the newly added Line::addTrailingHyphen to display hyphen for partial content.

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::append):
(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::Run::Run):
(WebCore::Layout::Line::appendPartialTrailingTextItem): Deleted.
(WebCore::Layout::Line::appendWith): Deleted.

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

(WebCore::Layout::LineBuilder::commitPartialContent):

  • layout/inlineformatting/InlineLineRun.h:

(WebCore::Layout::LineRun::Text::Text):

5:22 AM Changeset in webkit [267945] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC][Soft hyphen] Reset Line::m_trailingSoftHyphenWidth when the text content does not end with a soft hyphen
https://bugs.webkit.org/show_bug.cgi?id=217292

Reviewed by Antti Koivisto.

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::appendTextContent):

5:13 AM Changeset in webkit [267944] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC][Soft hyphen] endsWithSoftWrapOpportunity should check if hyphenation is disabled
https://bugs.webkit.org/show_bug.cgi?id=217288

Reviewed by Antti Koivisto.

This is very similar InlineTextItem::createAndAppendTextItems where we
also construct a LazyLineBreakIterator to check for word wrap opportunities.

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::isTextContent): The trailing "only" is misleading since we can't have a mixture of text and non-text content
within a continuous content (there's always a word wrap opportunity between a text and a non-text content).
(WebCore::Layout::isVisuallyEmptyWhitespaceContent):
(WebCore::Layout::InlineContentBreaker::processInlineContent):
(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
(WebCore::Layout::isTextContentOnly): Deleted.
(WebCore::Layout::isVisuallyEmptyWhitespaceContentOnly): Deleted.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::endsWithSoftWrapOpportunity):

4:37 AM Changeset in webkit [267943] by Adrian Perez de Castro
  • 19 edits in releases/WebKitGTK/webkit-2.30/Source/WebCore

Merge r267934 - [GTK] Build broken with ENABLE_MEDIA_STREAM enabled and ENABLE_WEB_RTC_DISABLED
https://bugs.webkit.org/show_bug.cgi?id=217128

Remove USE(LIBWEBRTC) guards from media stream code, as it does not actually
depend on libwebrtc and can be built by itself. This allows using e.g. live
audio recording inputs with WebAudio.

Reviewed by Philippe Normand.

No new tests needed.

  • platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp:
  • platform/mediastream/gstreamer/GStreamerAudioCaptureSource.h:
  • platform/mediastream/gstreamer/GStreamerAudioCapturer.cpp:

(WebCore::GStreamerAudioCapturer::GStreamerAudioCapturer):

  • platform/mediastream/gstreamer/GStreamerAudioCapturer.h:
  • platform/mediastream/gstreamer/GStreamerAudioStreamDescription.h:
  • platform/mediastream/gstreamer/GStreamerCapturer.cpp:
  • platform/mediastream/gstreamer/GStreamerCapturer.h:
  • platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
  • platform/mediastream/gstreamer/GStreamerVideoCaptureSource.h:
  • platform/mediastream/gstreamer/GStreamerVideoCapturer.cpp:
  • platform/mediastream/gstreamer/GStreamerVideoCapturer.h:
  • platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.cpp:
  • platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.h:
  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp:
  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.h:
  • platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.cpp:
  • platform/mock/MockRealtimeAudioSource.cpp:
  • platform/mock/MockRealtimeVideoSource.cpp:
4:37 AM WebKitGTK/2.30.x edited by Adrian Perez de Castro
(diff)
4:37 AM Changeset in webkit [267942] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.30

Merge r267882 - [GTK] Build broken with ENABLE_MEDIA_STREAM enabled and ENABLE_WEB_RTC_DISABLED
https://bugs.webkit.org/show_bug.cgi?id=217128

Reviewed by Philippe Normand.

.:

  • Source/cmake/GStreamerChecks.cmake: Only enable USE_LIBWEBRTC when both

ENABLE_MEDIA_STREAM and ENABLE_WEB_RTC is defined. This prevents trying to
build code that uses libwebrtc types when ENABLE_WEB_RTC is disabled but
ENABLE_MEDIA_STREAM is enabled.

Source/WebCore:

No new tests needed.

  • platform/mediastream/gstreamer/GStreamerAudioData.h: Remove USE(LIBWEBRTC) guard, as

there is nothing specific to WebRTC in this file, and it is needed when building with
ENABLE_MEDIA_STREAM enabled.

4:34 AM WebKitGTK/2.30.x edited by Adrian Perez de Castro
(diff)
1:16 AM Changeset in webkit [267941] by youenn@apple.com
  • 10 edits in trunk

Make sure MediaRecorder does not call fetchData until the last fetchData is completed
https://bugs.webkit.org/show_bug.cgi?id=217276

Reviewed by Darin Adler.

Source/WebCore:

When fetchData is called while an existing fetchData is inflight, enqueue the callback in a deque.
When the inflight fetchData completes, call the enqueued callbacks in order with a null blob.

Add ASSERT in MediaRecorderPrivateWriter to make sure we do not call requestMediaDataWhenReadyOnQueue too many times.

Covered by updated http/wpt/mediarecorder/MediaRecorder-dataavailable.html.

  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::MediaRecorder::stopRecording):
(WebCore::MediaRecorder::requestData):
Do not enable the timer if MediaRecorder is not active as a small optimization.
(WebCore::MediaRecorder::fetchData):

  • Modules/mediarecorder/MediaRecorder.h:
  • platform/mediarecorder/MediaRecorderPrivateMock.cpp:

(WebCore::MediaRecorderPrivateMock::fetchData):

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

(WebCore::MediaRecorderPrivateWriter::flushCompressedSampleBuffers):

LayoutTests:

Add test to cover patch
Update some test expectations according bot results.

  • http/wpt/mediarecorder/MediaRecorder-dataavailable-expected.txt:
  • http/wpt/mediarecorder/MediaRecorder-dataavailable.html:
  • platform/mac/TestExpectations:

Oct 3, 2020:

6:58 PM Changeset in webkit [267940] by Oriol Brufau
  • 25 edits
    2 adds
    2 deletes in trunk

[css-lists] Implement list-style-type: <string>
https://bugs.webkit.org/show_bug.cgi?id=167729

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update test expectations, and await document.fonts.ready in a test with Ahem.

  • web-platform-tests/css/css-lists/parsing/list-style-type-computed-expected.txt:
  • web-platform-tests/css/css-lists/parsing/list-style-type-valid-expected.txt:
  • web-platform-tests/css/css-pseudo/marker-hit-testing-expected.txt:
  • web-platform-tests/css/css-pseudo/marker-intrinsic-contribution-001-expected.txt:
  • web-platform-tests/css/css-pseudo/marker-intrinsic-contribution-001.html:

Source/WebCore:

This patch extends the syntax of the list-style-type property to accept
arbitrary string values in order to customize the marker contents.
When a string is specified for list-style-type, the patch sets it to a
special ListStyleType::String, and the string value is stored in an
extra field.

It's a reland of r252076, which got reverted because in some platform
the number of bitfields in GreaterThanOrSameSizeAsStyleRareInheritedData
was actually smaller than in StyleRareInheritedData, due to padding
differences. Hopefully this will no longer be an issue.

Tests: imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-001a.html

imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-001b.html
imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-002.html
imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-003.html
imported/w3c/web-platform-tests/css/css-lists/list-style-type-string-007.html
imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-computed.html
imported/w3c/web-platform-tests/css/css-lists/parsing/list-style-type-valid.html
imported/w3c/web-platform-tests/css/css-pseudo/marker-hit-testing.html
imported/w3c/web-platform-tests/css/css-pseudo/marker-intrinsic-contribution-001.html

Some tests fail because mixed-bidi is not supported in markers
(https://bugs.webkit.org/show_bug.cgi?id=202849).

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):

  • css/CSSProperties.json:
  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isPartialKeywordPropertyID):

  • css/parser/CSSParserFastPaths.h:
  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):

  • rendering/RenderListMarker.cpp:

(WebCore::effectiveListMarkerType):
(WebCore::listMarkerSuffix):
(WebCore::listMarkerText):
(WebCore::RenderListMarker::styleDidChange):
(WebCore::RenderListMarker::paint):
(WebCore::RenderListMarker::updateContent):
(WebCore::RenderListMarker::computePreferredLogicalWidths):
(WebCore::RenderListMarker::updateMargins):
(WebCore::RenderListMarker::suffix const):
(WebCore::RenderListMarker::getRelativeMarkerRect):

  • rendering/style/CounterContent.h:

(WebCore::CounterContent::CounterContent):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::listStyleStringValue const):
(WebCore::RenderStyle::setListStyleStringValue):
(WebCore::RenderStyle::initialListStyleStringValue):

  • rendering/style/RenderStyleConstants.cpp:

(WebCore::operator<<):

  • rendering/style/RenderStyleConstants.h:
  • rendering/style/StyleRareInheritedData.cpp:

(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator== const):

  • rendering/style/StyleRareInheritedData.h:
  • style/StyleBuilderCustom.h:

(WebCore::Style::BuilderCustom::applyInheritListStyleType):
(WebCore::Style::BuilderCustom::applyInitialListStyleType):
(WebCore::Style::BuilderCustom::applyValueListStyleType):

LayoutTests:

Most tests for 'list-style-type: <string>' pass now, but some still fail
because mixed-bidi is not supported in markers
(https://bugs.webkit.org/show_bug.cgi?id=202849).

Various tests for the 'content' property in ::marker fail now. This is
expected because they were only passing by chance, since ::marker does
not support 'content' (https://bugs.webkit.org/show_bug.cgi?id=204163).

iOS and Mac have some extra failures due to subpixel differences for the
marker position.

  • TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/css/css-pseudo/marker-intrinsic-contribution-001-expected.txt: Removed.
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/mac/imported/w3c/web-platform-tests/css/css-pseudo/text-selection-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-pseudo/marker-intrinsic-contribution-001-expected.txt: Removed.
5:34 PM Changeset in webkit [267939] by commit-queue@webkit.org
  • 21 edits in trunk

Add onslotchange on ShadowRoot and GlobalEventHandlers
https://bugs.webkit.org/show_bug.cgi?id=191310

Patch by Tetsuharu Ohzeki <Tetsuharu Ohzeki> on 2020-10-03
Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaselined tests to pass more test cases.

  • web-platform-tests/dom/idlharness.window-expected.txt:
  • web-platform-tests/html/webappapis/scripting/events/event-handler-all-global-events-expected.txt:
  • web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt:
  • web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body-expected.txt:
  • web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:

Source/WebCore:

onslotchange attribute has been added to ShadowRoot and
GlobalEventHandlers by https://github.com/whatwg/html/issues/3487

This patch supports it.

Tests: imported/w3c/web-platform-tests/dom/idlharness.window.html:

imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-all-global-events.html
imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window.html
imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body.html
imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative.html

  • dom/GlobalEventHandlers.idl:
  • dom/ShadowRoot.idl:
  • html/HTMLAttributeNames.in:
  • html/HTMLElement.cpp:

(WebCore::HTMLElement::createEventHandlerNameMap):

LayoutTests:

Rebaselined tests to pass more test cases.

  • platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
4:51 PM Changeset in webkit [267938] by ysuzuki@apple.com
  • 60 edits
    4 copies
    2 adds in trunk/Source

[JSC] Introduce JITOperationList to validate JIT-caged pointers
https://bugs.webkit.org/show_bug.cgi?id=217261

Reviewed by Saam Barati.

Source/JavaScriptCore:

This patch adds JITOperationList, which manages all the host-function & jit-operation pointers.
And we can now query whether the given pointer is registered in this table.
Currently, as a test, we are verifying that host-function is registered in this table when creating NativeExecutable in debug build.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • assembler/JITOperationList.cpp: Added.

(JSC::JITOperationList::initialize):
(JSC::addPointers):
(JSC::JITOperationList::populatePointersInJavaScriptCore):
(JSC::JITOperationList::populatePointersInEmbedder):

  • assembler/JITOperationList.h: Added.

(JSC::JITOperationList::contains const):
(JSC::JITOperationList::assertIsHostFunction):
(JSC::JITOperationList::assertIsJITOperation):
(JSC::JITOperationList::instance):

  • assembler/MacroAssemblerARM64.cpp:
  • assembler/MacroAssemblerARMv7.cpp:
  • assembler/MacroAssemblerMIPS.cpp:
  • assembler/MacroAssemblerX86Common.cpp:
  • jsc.cpp:

(jscmain):

  • runtime/InitializeThreading.cpp:

(JSC::initialize):

  • runtime/JSGenericTypedArrayViewPrototypeFunctions.h:

(JSC::genericTypedArrayViewProtoFuncSet):
(JSC::genericTypedArrayViewProtoFuncCopyWithin):
(JSC::genericTypedArrayViewProtoFuncIncludes):
(JSC::genericTypedArrayViewProtoFuncIndexOf):
(JSC::genericTypedArrayViewProtoFuncJoin):
(JSC::genericTypedArrayViewProtoFuncLastIndexOf):
(JSC::genericTypedArrayViewProtoGetterFuncBuffer):
(JSC::genericTypedArrayViewProtoGetterFuncLength):
(JSC::genericTypedArrayViewProtoGetterFuncByteLength):
(JSC::genericTypedArrayViewProtoGetterFuncByteOffset):
(JSC::genericTypedArrayViewProtoFuncReverse):
(JSC::genericTypedArrayViewPrivateFuncSort):
(JSC::genericTypedArrayViewProtoFuncSlice):
(JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):
(JSC::JSC_DEFINE_HOST_FUNCTION): Deleted.

  • runtime/VM.cpp:

(JSC::VM::getHostFunction):

Source/WebCore:

We should have WebCore::initialize(). It is filed in https://bugs.webkit.org/show_bug.cgi?id=217270.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMBuiltinConstructor.h:
  • bindings/js/JSDOMConstructor.h:
  • bindings/js/JSDOMLegacyFactoryFunction.h:
  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::initializeMainThread):

  • bindings/js/WebCoreJITOperations.cpp: Copied from Source/WebKit/Shared/WebKit2Initialize.cpp.

(WebCore::populateJITOperations):

  • bindings/js/WebCoreJITOperations.h: Copied from Source/WebKit/Shared/WebKit2Initialize.cpp.
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateConstructorDefinitions):

  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
  • bridge/objc/WebScriptObject.mm:

(+[WebScriptObject initialize]):

  • domjit/JSDocumentDOMJIT.cpp:
  • platform/cocoa/SharedBufferCocoa.mm:

(+[WebCoreSharedBufferData initialize]):

  • platform/ios/wak/WebCoreThread.mm:

(RunWebThread):

Source/WebKit:

  • Shared/API/c/WKString.cpp:

(WKStringCopyJSString):

  • Shared/Cocoa/WebKit2InitializeCocoa.mm:

(WebKit::runInitializationCode):

  • Shared/WebKit2Initialize.cpp:

(WebKit::InitializeWebKit2):

  • Shared/WebKitJITOperations.cpp: Copied from Source/WebKit/Shared/WebKit2Initialize.cpp.

(WebKit::populateJITOperations):

  • Shared/WebKitJITOperations.h: Copied from Source/WebKit/Shared/WebKit2Initialize.cpp.
  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

  • History/WebBackForwardList.mm:

(+[WebBackForwardList initialize]):

  • History/WebHistoryItem.mm:

(+[WebHistoryItem initialize]):

  • Misc/WebCache.mm:

(+[WebCache initialize]):

  • Misc/WebElementDictionary.mm:

(+[WebElementDictionary initialize]):

  • Misc/WebIconDatabase.mm:
  • Misc/WebStringTruncator.mm:

(+[WebStringTruncator initialize]):

  • Plugins/Hosted/WebHostedNetscapePluginView.mm:

(+[WebHostedNetscapePluginView initialize]):

  • Plugins/WebBaseNetscapePluginView.mm:
  • Plugins/WebBasePluginPackage.mm:

(+[WebBasePluginPackage initialize]):

  • Plugins/WebNetscapePluginView.mm:

(+[WebNetscapePluginView initialize]):

  • WebCoreSupport/WebEditorClient.mm:

(+[WebUndoStep initialize]):

  • WebCoreSupport/WebFrameLoaderClient.mm:

(+[WebFramePolicyListener initialize]):

  • WebView/WebArchive.mm:

(+[WebArchivePrivate initialize]):

  • WebView/WebDataSource.mm:

(+[WebDataSource initialize]):

  • WebView/WebHTMLView.mm:

(+[WebHTMLViewPrivate initialize]):
(+[WebHTMLView initialize]):

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

  • WebView/WebResource.mm:

(+[WebResourcePrivate initialize]):

  • WebView/WebTextIterator.mm:

(+[WebTextIteratorPrivate initialize]):

  • WebView/WebView.mm:

(+[WebView initialize]):

  • WebView/WebViewData.mm:

(+[WebViewPrivate initialize]):

Source/WebKitLegacy/win:

  • WebKitClassFactory.cpp:

(WebKitClassFactory::WebKitClassFactory):

  • WebView.cpp:

(WebView::WebView):

Source/WTF:

  • wtf/PlatformCallingConventions.h:
  • wtf/PlatformEnable.h:
3:07 PM Changeset in webkit [267937] by graouts@webkit.org
  • 28 edits
    10 adds in trunk

Add non-animated support for the CSS translate property
https://bugs.webkit.org/show_bug.cgi?id=216997
<rdar://problem/69597083>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

WPT progressions showing the correct parsing and computed style output of a non-animated "translate" property.
We are also adding some more tests to the invalid "translate" parsing to check that we bail once we get junk
for optional values after valid values.

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/css/css-transforms/animation/translate-composition-expected.txt:
  • web-platform-tests/css/css-transforms/animation/translate-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/parsing/translate-parsing-invalid-expected.txt:
  • web-platform-tests/css/css-transforms/parsing/translate-parsing-invalid.html:
  • web-platform-tests/css/css-transforms/parsing/translate-parsing-valid-expected.txt:
  • web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:

Source/WebCore:

We add non-animated support for the CSS "translate" property as specifed in by the CSS Transforms Level 2
specification (​https://drafts.csswg.org/css-transforms-2/#propdef-translate).

Tests: transforms/2d/translate-and-transform-attribute-in-svg-expected.svg

transforms/2d/translate-and-transform-attribute-in-svg.svg
transforms/2d/translate-and-transform-css-property-in-svg-expected.svg
transforms/2d/translate-and-transform-css-property-in-svg.svg
transforms/2d/translate-in-svg-expected.svg
transforms/2d/translate-in-svg.svg
transforms/2d/translate-transform-order.html
transforms/2d/translate-transform-origin-order.html

  • Headers.cmake:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::rendererCanBeTransformed):
(WebCore::computedTransform):
(WebCore::computedTranslate): Create a CSSValueList to print out the computed value for the "translate" property.
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSProperties.json: Define the "translate" property with the condition that the runtime setting for individual

CSS transform properties is set.

  • css/TransformFunctions.cpp:

(WebCore::translateForValue): Convert a CSSValue to a TranslateTransformOperation when parsing a "translate" property value.

  • css/TransformFunctions.h:
  • css/parser/CSSParserContext.cpp:

(WebCore::CSSParserContext::CSSParserContext): Add a new flag indicating whether the runtime setting for individual
CSS transform properties is set.
(WebCore::operator==):

  • css/parser/CSSParserContext.h:

(WebCore::CSSParserContextHash::hash):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeTranslate): Create a CSSValueList when parsing a "translate" property value.
(WebCore::CSSPropertyParser::parseSingleValue):

  • platform/graphics/transforms/TranslateTransformOperation.h: Promote the apply() method to be public so that it can be called

from Style::ComputedStyleExtractor::valueForPropertyInStyle().

  • rendering/RenderObject.h:

(WebCore::RenderObject::hasTransform const): Consider that having the "translate" property is akin to having a "transform" property
in the render tree.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::setTranslate):
(WebCore::RenderStyle::applyTransform const): Account for the RenderStyle::translate() value in the right order, after applying the
transform origin, but before applying the main transform.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::translate const):
(WebCore::RenderStyle::hasTransformRelatedProperty const):
(WebCore::RenderStyle::initialTranslate):

  • rendering/style/StyleRareNonInheritedData.h:
  • rendering/style/WillChangeData.cpp:

(WebCore::WillChangeData::propertyCreatesStackingContext):

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertTranslate):

  • svg/SVGGraphicsElement.cpp:

(WebCore::SVGGraphicsElement::animatedLocalTransform const): Account for the RenderStyle::translate() value when rendering SVG, ensuring
that it is applied before the transform specified by either the "transform" CSS property or SVG attribute.

LayoutTests:

Add tests checking that the "translate" CSS property is applied in the correct order related to
"transform-origin" and "transform" and that it is applied in SVG as well.

  • platform/ios-13/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • transforms/2d/translate-and-transform-attribute-in-svg-expected.svg: Added.
  • transforms/2d/translate-and-transform-attribute-in-svg.svg: Added.
  • transforms/2d/translate-and-transform-css-property-in-svg-expected.svg: Added.
  • transforms/2d/translate-and-transform-css-property-in-svg.svg: Added.
  • transforms/2d/translate-in-svg-expected.svg: Added.
  • transforms/2d/translate-in-svg.svg: Added.
  • transforms/2d/translate-transform-order-expected.html: Added.
  • transforms/2d/translate-transform-order.html: Added.
  • transforms/2d/translate-transform-origin-order-expected.html: Added.
  • transforms/2d/translate-transform-origin-order.html: Added.
3:05 PM Changeset in webkit [267936] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC] showLayoutTree should group line runs under individual lines
https://bugs.webkit.org/show_bug.cgi?id=217282

Reviewed by Simon Fraser.

Let's improve inline run output by grouping runs:

line at (0.00,0.00) size 0.00x18.00 baseline at (14.00)

text run at (0.00,0.00) size 15.10x18.00 run(0, 2)
text run at (15.10,0.00) size 0.00x18.00 run(0, 1)

line at (0.00,18.00) size 0.00x18.00 baseline at (14.00)

text run at (0.00,0.00) size 39.09x18.00 run(0, 5)

instead of:

line at (0.00,0.00) size 0.00x18.00 baseline at (14.00)
line at (0.00,18.00) size 0.00x18.00 baseline at (14.00)

text run at (0.00,0.00) size 15.10x18.00 run(0, 2)
text run at (15.10,0.00) size 0.00x18.00 run(0, 1)
text run at (0.00,0.00) size 39.09x18.00 run(0, 5)

So that we can tell which run belongs to which line.

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::outputInlineRuns):

2:54 PM Changeset in webkit [267935] by weinig@apple.com
  • 15 edits
    1 move
    20 adds
    2 deletes in trunk/Source/WebCore

[WebIDL] Split more IDL files by spec
https://bugs.webkit.org/show_bug.cgi?id=217279

Reviewed by Darin Adler.

  • Splits out more partial and mixin interfaces from Element, Range, HTMLBodyElement, HTMLImageElement and DOMWindow.
  • Renames HTMLMediaElementAudioOutput.idl to HTMLMediaElement+AudioOutput.idl for consistency with all other partial interfaces.
  • Replace GlobalCrypto and GlobalPerformance with WindowOrWorkerGlobalScope partials as currently speced.
  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.idl:
  • dom/Element+CSSOMView.idl: Added.
  • dom/Element+Fullscreen.idl: Added.
  • dom/Element+PointerEvents.idl: Added.
  • dom/Element+PointerLock.idl: Added.
  • dom/Element.idl:
  • dom/Range+CSSOMView.idl: Added.
  • dom/Range+DOMParsing.idl: Added.
  • dom/Range.idl:
  • html/HTMLBodyElement+Compat.idl: Added.
  • html/HTMLBodyElement.idl:
  • html/HTMLImageElement+CSSOMView.idl: Added.
  • html/HTMLImageElement.idl:
  • html/HTMLMediaElement+AudioOutput.idl: Added.
  • html/HTMLMediaElementAudioOutput.idl: Removed.
  • page/DOMWindow+CSSOM.idl: Added.
  • page/DOMWindow+CSSOMView.idl: Added.
  • page/DOMWindow+Compat.idl: Added.
  • page/DOMWindow+DeviceMotion.idl: Added.
  • page/DOMWindow+DeviceOrientation.idl: Added.
  • page/DOMWindow+RequestIdleCallback.idl: Added.
  • page/DOMWindow+Selection.idl: Added.
  • page/DOMWindow+VisualViewport.idl: Added.
  • page/DOMWindow.idl:
  • page/GlobalCrypto.idl: Removed.
  • page/GlobalPerformance.idl: Removed.
  • page/WindowEventHandlers.idl:
  • page/WindowLocalStorage.idl: Added.
  • page/WindowOrWorkerGlobalScope+Crypto.idl: Added.
  • page/WindowOrWorkerGlobalScope+Performance.idl: Added.
  • page/WindowSessionStorage.idl: Added.
  • workers/WorkerGlobalScope.idl:
2:32 PM Changeset in webkit [267934] by Adrian Perez de Castro
  • 19 edits in trunk/Source/WebCore

[GTK] Build broken with ENABLE_MEDIA_STREAM enabled and ENABLE_WEB_RTC_DISABLED
https://bugs.webkit.org/show_bug.cgi?id=217128

Remove USE(LIBWEBRTC) guards from media stream code, as it does not actually
depend on libwebrtc and can be built by itself. This allows using e.g. live
audio recording inputs with WebAudio.

Reviewed by Philippe Normand.

No new tests needed.

  • platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp:
  • platform/mediastream/gstreamer/GStreamerAudioCaptureSource.h:
  • platform/mediastream/gstreamer/GStreamerAudioCapturer.cpp:

(WebCore::GStreamerAudioCapturer::GStreamerAudioCapturer):

  • platform/mediastream/gstreamer/GStreamerAudioCapturer.h:
  • platform/mediastream/gstreamer/GStreamerAudioStreamDescription.h:
  • platform/mediastream/gstreamer/GStreamerCapturer.cpp:
  • platform/mediastream/gstreamer/GStreamerCapturer.h:
  • platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
  • platform/mediastream/gstreamer/GStreamerVideoCaptureSource.h:
  • platform/mediastream/gstreamer/GStreamerVideoCapturer.cpp:
  • platform/mediastream/gstreamer/GStreamerVideoCapturer.h:
  • platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.cpp:
  • platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.h:
  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp:
  • platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.h:
  • platform/mediastream/gstreamer/RealtimeMediaSourceCenterLibWebRTC.cpp:
  • platform/mock/MockRealtimeAudioSource.cpp:
  • platform/mock/MockRealtimeVideoSource.cpp:
2:17 PM Changeset in webkit [267933] by achristensen@apple.com
  • 8 edits in trunk

Add extra slash after empty host copied from base URL if path is also empty
https://bugs.webkit.org/show_bug.cgi?id=217278

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/url-constructor-expected.txt:

Source/WTF:

  • wtf/URLParser.cpp:

(WTF::URLParser::parse):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
2:14 PM Changeset in webkit [267932] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][IFC][Soft hyphen] Mark the last run on the line when hyphenation is required.
https://bugs.webkit.org/show_bug.cgi?id=217281

Reviewed by Antti Koivisto.

In this patch we turn the trailing soft hyphen into an "real" hyphen when the content requires it.

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processInlineContent):

  • layout/inlineformatting/InlineContentBreaker.h:
  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::addTrailingHyphen):

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

(WebCore::Layout::LineBuilder::handleFloatsAndInlineContent):
(WebCore::Layout::LineBuilder::rebuildLineForTrailingSoftHyphen):

11:39 AM Changeset in webkit [267931] by achristensen@apple.com
  • 12 edits
    1 delete in trunk

"http:" should not be a valid URL
https://bugs.webkit.org/show_bug.cgi?id=217250

Reviewed by Brady Eidson.

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/url-constructor-expected.txt:

Source/WebCore:

  • workers/service/context/ServiceWorkerThreadProxy.cpp:

(WebCore::topOriginURL):
Fix strange code written in r226257 that relied on the ability to assemble URLs starting with the protocol only.

Source/WTF:

Same with https, ws, wss, and for some reason ftp.
This matches the URL specification and Chrome and Firefox.

  • wtf/URLParser.cpp:

(WTF::URLParser::parse):

Tools:

  • TestWebKitAPI/Tests/WTF/URLParser.cpp:

(TestWebKitAPI::TEST_F):

LayoutTests:

  • platform/mac-wk1/imported/w3c/web-platform-tests/url/failure-expected.txt: Removed.
10:31 AM Changeset in webkit [267930] by mmaxfield@apple.com
  • 18 edits
    5 adds in trunk

[GPU Process] Support drawing text in 2D canvas with font features
https://bugs.webkit.org/show_bug.cgi?id=206118

Reviewed by Wenson Hsieh.

Source/WebCore:

This patch simply serializes all the non-derived data in Font and FontPlatformData.

Serializing a CTFont involves serializing its font descriptor's attributes. However,
there's an extra step for web fonts, since the font descriptor's attributes don't include
the raw bytes of the font file. This was previously being saved in Font, but this patch
moves that into FontPlatformData because of layering, and adds the SharedBuffer to the
serialization routine for web fonts.

Test: fast/canvas/fill-text-with-font-features.html

  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::font): Fonts and FontPlatformDatas are supposed to be immutable, so
having a setter for the FontFaceData is incorrect. This object is moved into the constructor
instead.

  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::font): Deleting dead code.

  • platform/graphics/Font.cpp:

(WebCore::Font::setFontFaceData): Deleted.

  • platform/graphics/Font.h:

(WebCore::Font::fontFaceData const): Deleted. Moved to FontPlatformData

  • platform/graphics/FontPlatformData.cpp:

(WebCore::FontPlatformData::FontPlatformData):

  • platform/graphics/FontPlatformData.h:

(WebCore::FontPlatformData::creationData const): Moved from Font.

  • platform/graphics/coretext/FontPlatformDataCoreText.cpp:

(WebCore::FontPlatformData::FontPlatformData):

  • platform/graphics/mac/FontCustomPlatformData.cpp:

(WebCore::FontCustomPlatformData::fontPlatformData): FontCustomPlatformData is a struct, so
there's no need for the m_ prefixes.
(WebCore::createFontCustomPlatformData):

  • platform/graphics/mac/FontCustomPlatformData.h:

(WebCore::FontCustomPlatformData::FontCustomPlatformData): Ditto.

Source/WebKit:

Simply serialize and deserialize all the non-derived data in Font and PlatformFontData.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<Ref<Font>>::encodePlatformData):
(IPC::ArgumentCoder<Ref<Font>>::decodePlatformData):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<Ref<Font>>::encode):
(IPC::ArgumentCoder<Ref<Font>>::decode):

  • Shared/WebCoreArgumentCoders.h:

LayoutTests:

  • fast/canvas/fill-text-with-font-features-expected.html: Added.
  • fast/canvas/fill-text-with-font-features.html: Added.
  • fast/canvas/resources/FontWithFeatures.ttf: Added.
10:26 AM Changeset in webkit [267929] by Peng Liu
  • 6 edits in trunk/Source/WebKit

[Media in GPU Process] Web process is not allowed to set the AudioSession category
https://bugs.webkit.org/show_bug.cgi?id=217236

Reviewed by Eric Carlson.

We disabled setting the audio session category in the Web process when media is playing
in the GPU Process (r257367). But since RemoteAudioSession and RemoteAudioSessionProxy
are working now in the Web process and GPU process, we need to allow setting the audio
session category in the Web process.

This patch also includes an optimization to reduce the IPC traffic of the audio session
category changes.

  • GPUProcess/media/RemoteAudioSessionProxy.cpp:

(WebKit::RemoteAudioSessionProxy::setCategory):

  • GPUProcess/media/RemoteAudioSessionProxyManager.cpp:

(WebKit::RemoteAudioSessionProxyManager::setCategoryForProcess):
We need to check the category and policy in RemoteAudioSessionProxy instead of
RemoteAudioSessionProxyManager. Otherwise, the change will be ignored.

  • WebProcess/GPU/media/RemoteAudioSession.cpp:

(WebKit::RemoteAudioSession::setCategory):
Only send RemoteAudioSessionProxy::SetCategory message if the category or the policy
is changed.

  • WebProcess/GPU/media/RemoteAudioSession.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_limitsNavigationsToAppBoundDomains):
Revert the change in r257367.

10:02 AM Changeset in webkit [267928] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Simplify and harden idl_files.tmp generation
https://bugs.webkit.org/show_bug.cgi?id=217247

Reviewed by Darin Adler.

We sometimes see idl_files.tmp not getting deleted and on the next
compile things failing. Instead of relying on the delete happening,
we now just completely regenerate the file, now renamed to
IDLFileNamesList.txt, each time in one shot.

  • DerivedSources.make:
9:51 AM Changeset in webkit [267927] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Rename InlineContentBreaker::Result::Action::Push to Wrap
https://bugs.webkit.org/show_bug.cgi?id=217273

Reviewed by Antti Koivisto.

"Wrap" is a more suitable name in this context.

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::isWrappingAllowed):
(WebCore::Layout::InlineContentBreaker::processInlineContent):
(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):

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

(WebCore::Layout::LineBuilder::handleFloatsAndInlineContent):

9:21 AM Changeset in webkit [267926] by Aditya Keerthi
  • 4 edits in trunk

[macOS] Enable date, time, and datetime-local input types
https://bugs.webkit.org/show_bug.cgi?id=217229
<rdar://problem/69882757>

Reviewed by Sam Weinig.

Source/WTF:

  • Scripts/Preferences/WebPreferencesInternal.yaml:

Tools:

Update test expectations now that these input types no longer fallback
to text fields. Also removed the test for input type=datetime, as it
has been removed from the spec.

  • TestWebKitAPI/Tests/WebKitCocoa/InjectedBundleNodeHandleIsTextField.mm:

(-[InjectedBundleNodeHandleIsTextField webProcessPlugIn:didCreateBrowserContextController:]):

9:12 AM Changeset in webkit [267925] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC][Soft hyphen] Rebuild the line when need to revert to a previous wrap opportunity due to soft hyphens
https://bugs.webkit.org/show_bug.cgi?id=217272

Reviewed by Antti Koivisto.

This patch reverts the line to a previous wrap opportunity where

  1. the trailing soft hyphen fits or
  2. no need for soft hyphen (we reverted back to a non-text inline content, where we don't need a hyphen) or
  3. reverted all the way back to the beginning of the line.

(We still don't paint hyphens at the soft hyphen locations.)

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::handleFloatsAndInlineContent):
(WebCore::Layout::LineBuilder::rebuildLine):
(WebCore::Layout::LineBuilder::rebuildLineForTrailingSoftHyphen):

  • layout/inlineformatting/InlineLineBuilder.h:
8:12 AM Changeset in webkit [267924] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][IFC][Soft hyphen] InlineContentBreaker should return Action::Revert when the trailing soft hyphen does not fit
https://bugs.webkit.org/show_bug.cgi?id=217269

Reviewed by Antti Koivisto.

A trailing soft hyphen turns action "Push" to action "Revert" when the hyphen overflows.
e.g <div>1&shy;2&shy;3&shy;4</div>
line has: 123&shy; and when '4' overflows InlineContentBreaker normally returns with Action::Push ('4' is pushed over to the next line).
However Action::Push turns the trailing soft hyphen into a visible hyphen and now we need to check if 'Push' is actually a 'Revert' instead.

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::processInlineContent):
(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
(WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const):

  • layout/inlineformatting/InlineContentBreaker.h:
  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::initialize):
(WebCore::Layout::Line::appendWith):
(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::appendNonReplacedInlineBox):
(WebCore::Layout::Line::appendLineBreak):

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::trailingSoftHyphenWidth const):

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::handleFloatsAndInlineContent):

8:02 AM Changeset in webkit [267923] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Floating-point math causes shrink-wrapped content to line wrap sometimes
https://bugs.webkit.org/show_bug.cgi?id=217136
<rdar://problem/69801790>

Reviewed by Antti Koivisto.

Since the preferred width computation and the actual inline layout run though different codepaths,
they may compute slightly different content width due to the limited floating point precision.
Use WTF::areEssentiallyEqual when deciding if the content overflows the current line.

  • rendering/line/LineWidth.cpp:

(WebCore::LineWidth::fitsOnLineIncludingExtraWidth const):
(WebCore::LineWidth::fitsOnLineExcludingTrailingWhitespace const):
(WebCore::LineWidth::fitsOnLineExcludingTrailingCollapsedWhitespace const):

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

[LFC][IFC][Soft hyphen] Do not split InlineItems at soft hyphens when hyphenations is disabled
https://bugs.webkit.org/show_bug.cgi?id=217266

Reviewed by Antti Koivisto.

-webkit-hyphens: none; disables hyphenation. Soft hyphens are not wrap opportunities anymore.
<div>1&shy;2&shy;3&shy;4</div> generates one InlineTextItem: [1&shy;2&shy;3&shy;4].

  • layout/inlineformatting/InlineTextItem.cpp:

(WebCore::Layout::InlineTextItem::createAndAppendTextItems):

7:01 AM Changeset in webkit [267921] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC][Soft hyphen] LineBuilder should hold on to all the wrap opportunities
https://bugs.webkit.org/show_bug.cgi?id=217265

Reviewed by Antti Koivisto.

This is in preparation for adding support for reverting content when the soft hyphen
overflows the line so as the last wrap opportunity InlineTextItem.
In such cases we need to go further back(front) on the line and revert even more content.
e.g <div>1&shy;2&shy;3&shy;4</div>
Depending on the horizontal constraint the first line may be:
1-
12-
123-
1234
If character '4' overflows the line, we would go with '123-' by reverting to the last wrap opportunity.
However in case of a wide hyphen, '123-' may overflow the line as well and we have to revert
the content further back to e.g. '12-' or even '1-'.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::handleFloatsAndInlineContent):
(WebCore::Layout::LineBuilder::rebuildLine):

  • layout/inlineformatting/InlineLineBuilder.h:
6:22 AM Changeset in webkit [267920] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC][Soft hyphen] Soft hyphen is always the trailing character
https://bugs.webkit.org/show_bug.cgi?id=217264

Reviewed by Antti Koivisto.

Soft hyphen is a word wrap opportunity. An InlineTextItem can only have one trailing soft hyphen.
e.g <span>before&shy;after</span> generates 2 separate InlineTextItems: [before-][after].

InlineTextItem should be able to tell if it ends with a soft hyphen.

  • layout/inlineformatting/InlineItem.cpp:
  • layout/inlineformatting/InlineItem.h:
  • layout/inlineformatting/InlineTextItem.cpp:

(WebCore::Layout::InlineTextItem::createAndAppendTextItems):

  • layout/inlineformatting/InlineTextItem.h:

(WebCore::Layout::InlineTextItem::hasTrailingSoftHyphen const):
(WebCore::Layout::InlineTextItem::createWhitespaceItem):
(WebCore::Layout::InlineTextItem::createNonWhitespaceItem):
(WebCore::Layout::InlineTextItem::InlineTextItem):
(WebCore::Layout::InlineTextItem::left const):
(WebCore::Layout::InlineTextItem::right const):

Oct 2, 2020:

11:28 PM Changeset in webkit [267919] by Carlos Garcia Campos
  • 7 edits in trunk/Source

WebDriver: add support for same site cookies
https://bugs.webkit.org/show_bug.cgi?id=217222

Reviewed by Brian Burg.

Source/WebDriver:

  • Session.cpp:

(WebDriver::parseAutomationCookie): Parse sameSite.
(WebDriver::builtAutomationCookie): Add sameSite to cookie.
(WebDriver::serializeCookie): Serialize sameSite.

  • Session.h:
  • WebDriverService.cpp:

(WebDriver::deserializeCookie): Deserialize sameSite.

Source/WebKit:

  • UIProcess/Automation/Automation.json: Add CookieSameSitePolicy enum and sameSite member to Cookie object.
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::toProtocolSameSitePolicy): Convert WebCore same site policy to inspector protocol value.
(WebKit::toWebCoreSameSitePolicy): Convert inspector protocol same site policy to WebCore value.
(WebKit::buildObjectForCookie): Add sameSite.
(WebKit::WebAutomationSession::addSingleCookie): Set sameSite policy to cookie.

11:26 PM Changeset in webkit [267918] by Carlos Garcia Campos
  • 7 edits in trunk/Source

WebDriver: several issues when switching to new browser context
https://bugs.webkit.org/show_bug.cgi?id=217217

Reviewed by Brian Burg.

Source/WebDriver:

There are several issues to fix when switching to a browser context:

1- The spec has changed and now we should always keep the current parent browsing context.
2- The spec says we should focus the new frame after switching to a frame or parent frame, but we are just

resolving the frame and updating the handle internally.

3- We are keeping stale frame handles and ids in the automation session, they should be removed when frames

are destroyed.

4- We are clearing all frame references in the automation session when a navigation happens in any main

frame. We should only clear the frames of the page that completed the navigation.

All theses cases are covered by new tests added to imported/w3c/webdriver/tests/switch_to_parent_frame/

  • Session.cpp:

(WebDriver::Session::close): Close the current parent browsing context too.
(WebDriver::Session::switchToTopLevelBrowsingContext): Initialize the current parent browsing context too.
(WebDriver::Session::switchToBrowsingContext): Resolve the parent frame handle and set the current parent browsing context.
(WebDriver::Session::go): Pass completion handler to switchToBrowsingContext().
(WebDriver::Session::back): Ditto.
(WebDriver::Session::forward): Ditto.
(WebDriver::Session::refresh): Ditto.
(WebDriver::Session::closeWindow): Close the current parent browsing context too.
(WebDriver::Session::switchToBrowsingContext): Send switchToBrowsingContext message to the browser.
(WebDriver::Session::switchToWindow): Use switchToBrowsingContext() to send the message to the browser.
(WebDriver::Session::switchToFrame): Call switchToBrowsingContext() after the child frame handle is resolved.
(WebDriver::Session::switchToParentFrame): Check current parent browsing context is still open and call
switchToBrowsingContext() to switch to the current parent browsing context.
(WebDriver::Session::waitForNavigationToComplete): Close the current parent browsing context too when the window
is closed due to the navigation.

  • Session.h: Add m_currentParentBrowsingContext.

Source/WebKit:

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::didDestroyFrame): Remove the frame references from maps.
(WebKit::WebAutomationSession::navigationOccurredForFrame): Only clear the frame references from the maps for
the frames in the given frame's page.

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::didDestroyFrame): Notify automation session about frame being destroyed.

11:00 PM Changeset in webkit [267917] by ysuzuki@apple.com
  • 5 edits in trunk

std::once_flag must be allocated in static storage
https://bugs.webkit.org/show_bug.cgi?id=217271

Reviewed by Mark Lam.

Source/WebCore:

If the std::once_flag is a non-static variable, it will not prevent us from calling it multiple times.

  • platform/text/TextCodecSingleByte.cpp:

(WebCore::tableForEncoding):

Tools:

Added cpplint rule for non-static std::once_flag / dispatch_once_t.

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

(check_once_flag):
(check_style):
(CppChecker):

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

(WebKitStyleTest.test_once_flag):

8:55 PM Changeset in webkit [267916] by Simon Fraser
  • 48 edits
    4 adds in trunk/Source/WebKit

Move WebEvent subclass declarations to their own files
https://bugs.webkit.org/show_bug.cgi?id=217259

Reviewed by Tim Horton.

Make new header files for WebMouseEvent, WebKeyboardEvent, WebWheelEvent, WebTouchEvent and
fix the fallout.

  • Scripts/webkit/messages.py:
  • Shared/API/c/WKSharedAPICast.h:
  • Shared/NativeWebGestureEvent.h:
  • Shared/NativeWebKeyboardEvent.h:
  • Shared/NativeWebMouseEvent.h:
  • Shared/NativeWebTouchEvent.h:
  • Shared/NativeWebWheelEvent.h:
  • Shared/NavigationActionData.h:
  • Shared/WebEvent.cpp:

(WebKit::WebTouchEvent::allTouchPointsAreReleased const): Deleted.

  • Shared/WebEvent.h:

(WebKit::WebMouseEvent::button const): Deleted.
(WebKit::WebMouseEvent::buttons const): Deleted.
(WebKit::WebMouseEvent::position const): Deleted.
(WebKit::WebMouseEvent::globalPosition const): Deleted.
(WebKit::WebMouseEvent::deltaX const): Deleted.
(WebKit::WebMouseEvent::deltaY const): Deleted.
(WebKit::WebMouseEvent::deltaZ const): Deleted.
(WebKit::WebMouseEvent::clickCount const): Deleted.
(WebKit::WebMouseEvent::eventNumber const): Deleted.
(WebKit::WebMouseEvent::menuTypeForEvent const): Deleted.
(WebKit::WebMouseEvent::force const): Deleted.
(WebKit::WebMouseEvent::syntheticClickType const): Deleted.
(WebKit::WebWheelEvent::position const): Deleted.
(WebKit::WebWheelEvent::globalPosition const): Deleted.
(WebKit::WebWheelEvent::delta const): Deleted.
(WebKit::WebWheelEvent::wheelTicks const): Deleted.
(WebKit::WebWheelEvent::granularity const): Deleted.
(WebKit::WebWheelEvent::directionInvertedFromDevice const): Deleted.
(WebKit::WebWheelEvent::phase const): Deleted.
(WebKit::WebWheelEvent::momentumPhase const): Deleted.
(WebKit::WebWheelEvent::hasPreciseScrollingDeltas const): Deleted.
(WebKit::WebWheelEvent::scrollCount const): Deleted.
(WebKit::WebWheelEvent::unacceleratedScrollingDelta const): Deleted.
(WebKit::WebKeyboardEvent::text const): Deleted.
(WebKit::WebKeyboardEvent::unmodifiedText const): Deleted.
(WebKit::WebKeyboardEvent::key const): Deleted.
(WebKit::WebKeyboardEvent::code const): Deleted.
(WebKit::WebKeyboardEvent::keyIdentifier const): Deleted.
(WebKit::WebKeyboardEvent::windowsVirtualKeyCode const): Deleted.
(WebKit::WebKeyboardEvent::nativeVirtualKeyCode const): Deleted.
(WebKit::WebKeyboardEvent::macCharCode const): Deleted.
(WebKit::WebKeyboardEvent::handledByInputMethod const): Deleted.
(WebKit::WebKeyboardEvent::preeditUnderlines const): Deleted.
(WebKit::WebKeyboardEvent::preeditSelectionRange const): Deleted.
(WebKit::WebKeyboardEvent::commands const): Deleted.
(WebKit::WebKeyboardEvent::isAutoRepeat const): Deleted.
(WebKit::WebKeyboardEvent::isKeypad const): Deleted.
(WebKit::WebKeyboardEvent::isSystemKey const): Deleted.
(WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint): Deleted.
(WebKit::WebPlatformTouchPoint::identifier const): Deleted.
(WebKit::WebPlatformTouchPoint::location const): Deleted.
(WebKit::WebPlatformTouchPoint::phase const): Deleted.
(WebKit::WebPlatformTouchPoint::state const): Deleted.
(WebKit::WebPlatformTouchPoint::setRadiusX): Deleted.
(WebKit::WebPlatformTouchPoint::radiusX const): Deleted.
(WebKit::WebPlatformTouchPoint::setRadiusY): Deleted.
(WebKit::WebPlatformTouchPoint::radiusY const): Deleted.
(WebKit::WebPlatformTouchPoint::setRotationAngle): Deleted.
(WebKit::WebPlatformTouchPoint::rotationAngle const): Deleted.
(WebKit::WebPlatformTouchPoint::setForce): Deleted.
(WebKit::WebPlatformTouchPoint::force const): Deleted.
(WebKit::WebPlatformTouchPoint::setAltitudeAngle): Deleted.
(WebKit::WebPlatformTouchPoint::altitudeAngle const): Deleted.
(WebKit::WebPlatformTouchPoint::setAzimuthAngle): Deleted.
(WebKit::WebPlatformTouchPoint::azimuthAngle const): Deleted.
(WebKit::WebPlatformTouchPoint::setTouchType): Deleted.
(WebKit::WebPlatformTouchPoint::touchType const): Deleted.
(WebKit::WebTouchEvent::WebTouchEvent): Deleted.
(WebKit::WebTouchEvent::touchPoints const): Deleted.
(WebKit::WebTouchEvent::position const): Deleted.
(WebKit::WebTouchEvent::isPotentialTap const): Deleted.
(WebKit::WebTouchEvent::isGesture const): Deleted.
(WebKit::WebTouchEvent::gestureScale const): Deleted.
(WebKit::WebTouchEvent::gestureRotation const): Deleted.
(WebKit::WebTouchEvent::canPreventNativeGestures const): Deleted.
(WebKit::WebTouchEvent::setCanPreventNativeGestures): Deleted.
(WebKit::WebPlatformTouchPoint::id const): Deleted.
(WebKit::WebPlatformTouchPoint::screenPosition const): Deleted.
(WebKit::WebPlatformTouchPoint::position const): Deleted.
(WebKit::WebPlatformTouchPoint::radius const): Deleted.
(WebKit::WebPlatformTouchPoint::setState): Deleted.

  • Shared/WebEventConversion.cpp:
  • Shared/WebKeyboardEvent.cpp:
  • Shared/WebKeyboardEvent.h: Added.

(WebKit::WebKeyboardEvent::text const):
(WebKit::WebKeyboardEvent::unmodifiedText const):
(WebKit::WebKeyboardEvent::key const):
(WebKit::WebKeyboardEvent::code const):
(WebKit::WebKeyboardEvent::keyIdentifier const):
(WebKit::WebKeyboardEvent::windowsVirtualKeyCode const):
(WebKit::WebKeyboardEvent::nativeVirtualKeyCode const):
(WebKit::WebKeyboardEvent::macCharCode const):
(WebKit::WebKeyboardEvent::handledByInputMethod const):
(WebKit::WebKeyboardEvent::preeditUnderlines const):
(WebKit::WebKeyboardEvent::preeditSelectionRange const):
(WebKit::WebKeyboardEvent::commands const):
(WebKit::WebKeyboardEvent::isAutoRepeat const):
(WebKit::WebKeyboardEvent::isKeypad const):
(WebKit::WebKeyboardEvent::isSystemKey const):

  • Shared/WebMouseEvent.cpp:
  • Shared/WebMouseEvent.h: Added.

(WebKit::WebMouseEvent::button const):
(WebKit::WebMouseEvent::buttons const):
(WebKit::WebMouseEvent::position const):
(WebKit::WebMouseEvent::globalPosition const):
(WebKit::WebMouseEvent::deltaX const):
(WebKit::WebMouseEvent::deltaY const):
(WebKit::WebMouseEvent::deltaZ const):
(WebKit::WebMouseEvent::clickCount const):
(WebKit::WebMouseEvent::eventNumber const):
(WebKit::WebMouseEvent::menuTypeForEvent const):
(WebKit::WebMouseEvent::force const):
(WebKit::WebMouseEvent::syntheticClickType const):

  • Shared/WebTouchEvent.cpp:

(WebKit::WebTouchEvent::allTouchPointsAreReleased const):

  • Shared/WebTouchEvent.h: Added.

(WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint):
(WebKit::WebPlatformTouchPoint::identifier const):
(WebKit::WebPlatformTouchPoint::location const):
(WebKit::WebPlatformTouchPoint::phase const):
(WebKit::WebPlatformTouchPoint::state const):
(WebKit::WebPlatformTouchPoint::setRadiusX):
(WebKit::WebPlatformTouchPoint::radiusX const):
(WebKit::WebPlatformTouchPoint::setRadiusY):
(WebKit::WebPlatformTouchPoint::radiusY const):
(WebKit::WebPlatformTouchPoint::setRotationAngle):
(WebKit::WebPlatformTouchPoint::rotationAngle const):
(WebKit::WebPlatformTouchPoint::setForce):
(WebKit::WebPlatformTouchPoint::force const):
(WebKit::WebPlatformTouchPoint::setAltitudeAngle):
(WebKit::WebPlatformTouchPoint::altitudeAngle const):
(WebKit::WebPlatformTouchPoint::setAzimuthAngle):
(WebKit::WebPlatformTouchPoint::azimuthAngle const):
(WebKit::WebPlatformTouchPoint::setTouchType):
(WebKit::WebPlatformTouchPoint::touchType const):
(WebKit::WebTouchEvent::WebTouchEvent):
(WebKit::WebTouchEvent::touchPoints const):
(WebKit::WebTouchEvent::position const):
(WebKit::WebTouchEvent::isPotentialTap const):
(WebKit::WebTouchEvent::isGesture const):
(WebKit::WebTouchEvent::gestureScale const):
(WebKit::WebTouchEvent::gestureRotation const):
(WebKit::WebTouchEvent::canPreventNativeGestures const):
(WebKit::WebTouchEvent::setCanPreventNativeGestures):
(WebKit::WebPlatformTouchPoint::id const):
(WebKit::WebPlatformTouchPoint::screenPosition const):
(WebKit::WebPlatformTouchPoint::position const):
(WebKit::WebPlatformTouchPoint::radius const):
(WebKit::WebPlatformTouchPoint::setState):

  • Shared/WebWheelEvent.cpp:

(WebKit::WebWheelEvent::WebWheelEvent):

  • Shared/WebWheelEvent.h: Added.

(WebKit::WebWheelEvent::position const):
(WebKit::WebWheelEvent::globalPosition const):
(WebKit::WebWheelEvent::delta const):
(WebKit::WebWheelEvent::wheelTicks const):
(WebKit::WebWheelEvent::granularity const):
(WebKit::WebWheelEvent::directionInvertedFromDevice const):
(WebKit::WebWheelEvent::phase const):
(WebKit::WebWheelEvent::momentumPhase const):
(WebKit::WebWheelEvent::hasPreciseScrollingDeltas const):
(WebKit::WebWheelEvent::scrollCount const):
(WebKit::WebWheelEvent::unacceleratedScrollingDelta const):

  • Shared/ios/WebIOSEventFactory.h:
  • Shared/ios/WebPlatformTouchPointIOS.cpp:
  • Shared/ios/WebTouchEventIOS.cpp:
  • Shared/mac/NativeWebGestureEventMac.mm:
  • Shared/mac/WebEventFactory.h:
  • Shared/mac/WebGestureEvent.h:
  • UIProcess/API/APINavigationClient.h:
  • UIProcess/API/APIPolicyClient.h:
  • UIProcess/Automation/SimulatedInputDispatcher.h:
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/ios/WKMouseGestureRecognizer.mm:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
  • WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:
  • WebProcess/Plugins/PluginProxy.cpp:
  • WebProcess/Plugins/PluginView.cpp:
  • WebProcess/WebPage/EventDispatcher.cpp:
  • WebProcess/WebPage/EventDispatcher.h:
  • WebProcess/WebPage/PageBanner.h:
  • WebProcess/WebPage/WebPage.cpp:
  • WebProcess/WebPage/ios/WebPageIOS.mm:
  • WebProcess/WebPage/mac/WebPageMac.mm:
8:23 PM Changeset in webkit [267915] by Wenson Hsieh
  • 5 edits in trunk/Source

[ iOS ] ASSERTION FAILED: ScriptDisallowedScope::InMainThread::isEventDispatchAllowedInSubtree
https://bugs.webkit.org/show_bug.cgi?id=217203
<rdar://problem/69864747>

Reviewed by Tim Horton.

Source/WebCore:

  • page/DragController.cpp:

(WebCore::DragController::finalizeDroppedImagePlaceholder):

Instead of immediately removing dropped image placeholder attributes, schedule an async task to remove the
placeholder and invoke the given completion handler. See WebKit/ChangeLog for more details.

  • page/DragController.h:

Source/WebKit:

Refactor logic that removes drop placeholder attributes such that it runs as an asynchronously task rather than
underneath the scope of didFinishLoadingImageForElement. This is because the image load client call may occur
in the middle of a rendering update, during which it is not safe to change element attribute values, since that
may trigger script execution.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::didFinishLoadingImageForElement):

7:17 PM Changeset in webkit [267914] by Lauro Moura
  • 5 edits in trunk/LayoutTests

[GLIB] Gardening some failures and flakies

Unreviewed test gardening.

  • platform/glib/TestExpectations:
  • platform/glib/fast/mediacapturefromelement/CanvasCaptureMediaStream-offscreencanvas-expected.txt: Rebaselined after r267825.
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
6:59 PM Changeset in webkit [267913] by Hector Lopez
  • 2 edits in trunk/LayoutTests

REGRESSION(iOS 14): 2 imported/w3c/web-platform-tests/mathml/ tests are constant failures
https://bugs.webkit.org/show_bug.cgi?id=217268

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
6:46 PM Changeset in webkit [267912] by Ross Kirsling
  • 7 edits in trunk

[JSC] Add Array#item to @@unscopables
https://bugs.webkit.org/show_bug.cgi?id=217243

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/unscopables.js:

Update test.

Source/JavaScriptCore:

ES2015+ Array methods must be listed in Array.prototype[@@unscopables] per the note here:
https://tc39.es/ecma262/#sec-array.prototype-@@unscopables

The Array#item spec doesn't currently make this explicit, but I created an issue to ensure it isn't overlooked:
https://github.com/tc39/proposal-item-method/issues/30

  • runtime/ArrayPrototype.cpp:

(JSC::ArrayPrototype::finishCreation):

LayoutTests:

  • js/array-unscopables-properties-expected.txt:
  • js/script-tests/array-unscopables-properties.js:

Update test.

6:26 PM Changeset in webkit [267911] by Chris Dumez
  • 5 edits
    2 adds in trunk

Calling suspend() on audio context with no node does not prevent auto transition to running when first node is created
https://bugs.webkit.org/show_bug.cgi?id=216972
<rdar://problem/69878834>

Reviewed by Darin Adler.

Source/WebCore:

Add support for the suspended by user? flag in the WebAudio specification:

We set this flag when the script calls AudioContext.suspend():

We clear this flag when the script calls AudioContext.resume():

We then prevent automated transition of the AudioContext to "rendering" when this
flag is set:

Test: webaudio/suspend-context-before-first-node-creation.html

  • Modules/webaudio/BaseAudioContext.cpp:

(WebCore::BaseAudioContext::startRendering):
(WebCore::BaseAudioContext::suspendRendering):
(WebCore::BaseAudioContext::resumeRendering):

  • Modules/webaudio/BaseAudioContext.h:

LayoutTests:

Add layout test coverage.

  • webaudio/suspend-context-before-first-node-creation-expected.txt: Added.
  • webaudio/suspend-context-before-first-node-creation.html: Added.
6:23 PM Changeset in webkit [267910] by Alan Coon
  • 2 edits in branches/safari-610-branch/Source/WebKit

Cherry-pick r267792. rdar://problem/69904383

REGRESSION (r265009): Web Share API can no longer be invoked if a previous invocation was dismissed using the close button
https://bugs.webkit.org/show_bug.cgi?id=216913
<rdar://problem/69659878>

Reviewed by Darin Adler.

No new tests; not able to test without UI tests that actually use UIActivityViewController.

  • UIProcess/Cocoa/WKShareSheet.mm: (-[WKShareSheet presentWithShareDataArray:inRect:]): -presentationControllerDidDismiss is not called if the UIActivityViewController is programmatically dismissed, so we need to revert to observing completion via UIActivityViewController's -completionWithItemsHandler.

In order to avoid regressing bug 214894 by doing so, we also need to
make sure that we're actually not presented anymore, as -completionWithItemsHandler
can be called multiple times before the share sheet is actually dismissed.

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

6:23 PM Changeset in webkit [267909] by Alan Coon
  • 8 edits
    3 adds in branches/safari-610-branch

Cherry-pick r267753. rdar://problem/69904353

IndexedDB Index Corruption after upgrade from iOS 13 to iOS 14
https://bugs.webkit.org/show_bug.cgi?id=216962
<rdar://problem/69587004>

Reviewed by Brady Eidson.

Source/WebCore:

There is an implementation error in r255318, which updated index ID in database IndexInfo and IndexRecords
tables: it made changes to original table while iterating records of it. This means modified records can
be modified again, which leads to that two indices have the same index ID. As index ID is supposed to be unique,
some indices and index records cannot be populated and clients will find some indices are missing.

To fix this, we need to change the implementation of ID update and deal with already corrupted tables. For index
ID update, now we create a temporary table for storing the updated records, and replace the original table with
temporary table at the end of iteration. For the corruption issue, we check if IndexInfo table has duplicate
index IDs. If it has, we try recovering IndexInfo and IndexRecords table by removing records with duplicate
index IDs, assigning new IDs to duplicate indices, and adding records with updated index IDs.

API tests: IndexedDB.IndexUpgradeToV2WithMultipleIndices

IndexedDB.IndexUpgradeToV2WithMultipleIndicesHaveSameID

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: (WebCore::IDBServer::indexInfoTableSchema): (WebCore::IDBServer::SQLiteIDBBackingStore::createAndPopulateInitialDatabaseInfo): (WebCore::IDBServer::SQLiteIDBBackingStore::migrateIndexInfoTableForIDUpdate): (WebCore::IDBServer::SQLiteIDBBackingStore::migrateIndexRecordsTableForIDUpdate): (WebCore::IDBServer::SQLiteIDBBackingStore::removeExistingIndex): (WebCore::IDBServer::SQLiteIDBBackingStore::addExistingIndex): (WebCore::IDBServer::SQLiteIDBBackingStore::handleDuplicateIndexIDs): (WebCore::IDBServer::SQLiteIDBBackingStore::extractExistingDatabaseInfo): (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex): (WebCore::IDBServer::SQLiteIDBBackingStore::updateOneIndexForAddRecord):
  • Modules/indexeddb/server/SQLiteIDBBackingStore.h:
  • Modules/indexeddb/shared/IDBIndexInfo.h: (WebCore::IDBIndexInfo::setIdentifier):
  • Modules/indexeddb/shared/IDBObjectStoreInfo.cpp: (WebCore::IDBObjectStoreInfo::addExistingIndex):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm: (runMultipleIndicesTestWithDatabase): (TEST):
  • TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2WithMultipleIndices.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/IndexUpgradeWithMultipleIndices.sqlite3: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/IndexUpgradeWithMultipleIndicesHaveSameID.sqlite3: Added.

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

6:23 PM Changeset in webkit [267908] by Alan Coon
  • 5 edits in branches/safari-610-branch/Source

Cherry-pick r267612. rdar://problem/69904365

Crunchyroll playback controls do not work on iPad with trackpad
https://bugs.webkit.org/show_bug.cgi?id=217000
<rdar://problem/66362029>

Reviewed by Wenson Hsieh.

Source/WebCore:

  • platform/RuntimeApplicationChecks.h:
  • platform/cocoa/RuntimeApplicationChecksCocoa.mm: (WebCore::IOSApplication::isCrunchyroll):

Source/WebKit:

  • UIProcess/ios/WKContentViewInteraction.mm: (applicationIsKnownToIgnoreMouseEvents): Add it to the list.

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

6:23 PM Changeset in webkit [267907] by Alan Coon
  • 24 edits in branches/safari-610-branch

Cherry-pick r266028. rdar://problem/69904377

Move node geometry functions from Range to RenderObject
https://bugs.webkit.org/show_bug.cgi?id=215677

Reviewed by Zalan Bujtas.

Source/WebCore:

Moved functions that return quads and rectangles out of Range into RenderObject.
We could find another home for them, but for now they make sense as static member
functions there since RenderObject has the non-static member functions that they
call on multiple nodes. Mostly did not change the design of these functions much,
and was careful not to change behavior at all. But did change a few things:

  • Got rid of the functions that return a single unioned rectangle. Instead callers call unionRect at each call site.
  • Changed the "use selection height" boolean to a BoundingRectBehavior flag.
  • accessibility/AccessibilityRenderObject.cpp: (WebCore::boundsForRects): Call unionRect(RenderObject::absoluteTextRects) instead of Range::absoluteBoundingBox.
  • dom/DocumentMarkerController.cpp: (WebCore::updateRenderedRectsForMarker): Instead of passing "true", pass "RenderObject::BoundingRectBehavior::UseSelectionHeight".
  • dom/Range.cpp: (WebCore::Range::absoluteBoundingBox const): Deleted. (WebCore::Range::absoluteRectsForRangeInText const): Deleted. (WebCore::Range::absoluteTextRects const): Deleted. (WebCore::Range::getClientRects const): Call RenderObject::clientBorderAndTextRects. (WebCore::Range::getBoundingClientRect const): Call unionRect(RenderObject::clientBorderAndTextRects). (WebCore::Range::borderAndTextRects const): Deleted. (WebCore::Range::boundingRect const): Deleted. (WebCore::Range::absoluteBoundingRect const): Deleted.
  • dom/Range.h: Updated for above.
  • dom/SimpleRange.cpp: (WebCore::IntersectingNodeIterator::IntersectingNodeIterator): Fix bug affecting empty ranges by calling enforceEndInvariant. (WebCore::IntersectingNodeIterator::advance): Refactor to call enforceEndInvariant. (WebCore::IntersectingNodeIterator::advanceSkippingChildren): Ditto. (WebCore::IntersectingNodeIterator::enforceEndInvariant): Added.
  • dom/SimpleRange.h: Added enforceEndInvariant.
  • editing/FrameSelection.cpp: (WebCore::FrameSelection::getClippedVisibleTextRectangles const): Instead of passing a useSelectionHeight boolean, pass BoundingRectBehavior.
  • page/TextIndicator.cpp: (WebCore::absoluteBoundingRectForRange): Call unionRectIgnoringZeroRects(RenderObject::absoluteBorderAndTextRects). (WebCore::initializeIndicator): Call RenderObject::absoluteTextRects.
  • platform/graphics/GeometryUtilities.cpp: (WebCore::unionRectIgnoringZeroRects): Added.
  • platform/graphics/GeometryUtilities.h: Updated for above.
  • rendering/RenderLineBreak.h: Marked a lot of functions final. Added a default value for the absoluteQuads out argument.
  • rendering/RenderObject.cpp: (WebCore::RenderObject::addPDFURLRect): Tweaked code style a bit. (WebCore::RenderObject::absoluteTextQuads): Replaced boolean useSelectionHeight argument with a BoundingRectBehavior argument. Also added a downcast so the call to RenderLineBreak::absoluteQuads is a non-virtual function call. (WebCore::absoluteRectsForRangeInText): Added. (WebCore::RenderObject::absoluteTextRects): Replaced boolean useSelectionHeight argument with a BoundingRectBehavior argument. (WebCore::nodeBefore): Added. (WebCore::borderAndTextRects): Added. (WebCore::RenderObject::absoluteBorderAndTextRects): Added. (WebCore::RenderObject::clientBorderAndTextRects): Added.
  • rendering/RenderObject.h: Updated for above.

Source/WebKit:

  • WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp: (WebKit::InjectedBundleRangeHandle::boundingRectInWindowCoordinates const): Call unionRectIgnoringZeroRects(RenderObject::absoluteBorderAndTextRects). (WebKit::InjectedBundleRangeHandle::renderedImage): Call unionRectIgnoringZeroRects(RenderObject::absoluteBorderAndTextRects).
  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::requestEvasionRectsAboveSelection): Call unionRect(RenderObject::absoluteTextRects). (WebKit::WebPage::requestDocumentEditingContext): Call unionRect(RenderObject::absoluteTextRects).

Source/WebKitLegacy/mac:

  • DOM/DOM.mm: (-[DOMRange boundingBox]): Call unionRect(RenderObject::absoluteTextRects).

Source/WebKitLegacy/win:

  • AccessibleTextImpl.cpp: (AccessibleText::scrollSubstringTo): Call unionRect(RenderObject::absoluteTextRects) instead of Range::absoluteBoundingBox.

LayoutTests:

  • fast/dom/Range/scale-page-bounding-client-rect.html: Fix this test that accidentally depended on getting rects for an empty range (the contents of a div element with no text inside it) to instead get rects for a non-empty element (the div element, not just its contents). Test now works correctly, but results don't need to change.
  • fast/dom/Range/scale-page-client-rects.html: Ditto.

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

6:19 PM Changeset in webkit [267906] by Alan Coon
  • 8 edits in branches/safari-610-branch/Source

Versioning.

WebKit-7610.2.9

6:16 PM Changeset in webkit [267905] by Hector Lopez
  • 2 edits in trunk/LayoutTests

[ iOS ] 2 mediacapture-record tests are a constant failure
https://bugs.webkit.org/show_bug.cgi?id=217263

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
6:02 PM Changeset in webkit [267904] by Karl Rackler
  • 2 edits in trunk/LayoutTests

REGRESSION: [ Catalina wk2 ] imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-peerconnection.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=217262

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
5:53 PM Changeset in webkit [267903] by Alan Coon
  • 1 copy in tags/Safari-610.2.8

Tag Safari-610.2.8.

5:18 PM Changeset in webkit [267902] by Keith Rollin
  • 2 edits in trunk

Seeing "usage: basename string [suffix]" spam when using make to build
https://bugs.webkit.org/show_bug.cgi?id=217231
<rdar://problem/69889138>

Reviewed by Darin Adler.

The name of the project being built is no longer displayed when using
XCBuild. Therefore, https://bugs.webkit.org/show_bug.cgi?id=216865
taught the Makefile to perform this logging. The approach took
advantage of a make variable (PATH_FROM_ROOT) that tracks the
relative path from the root of the build hierarchy to the current
project. However, that variable may not be initialized if the build is
not initiated from the root. Therefore, don't count on that variable,
and get the name of the current project by invoking pwd.

  • Makefile.shared:
4:28 PM Changeset in webkit [267901] by Hector Lopez
  • 2 edits in trunk/LayoutTests

REGRESSION(iOS 14): svg/W3C-I18N/tspan-direction-rtl.svg is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=217258

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
4:24 PM Changeset in webkit [267900] by Hector Lopez
  • 2 edits in trunk/LayoutTests

REGRESSION(iOS 14): webgl/1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video.html is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=217257

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
4:15 PM Changeset in webkit [267899] by Kate Cheney
  • 7 edits in trunk

Multiple calls to suspend media playback for the same page may result in resuming media playback too soon
https://bugs.webkit.org/show_bug.cgi?id=217228
rdar://problem/69709346

Reviewed by Eric Carlson.

Source/WebKit:

Calls to suspend/resume media playback should always be called in
pairs. The current implementation resumes media playback on the first
call to resumeAllMediaPlayback even if multiple calls to suspendAllMediaPlayback
have been made. This patch adds a counter to track how many calls to
suspendAllMediaPlayback have occurred, and only resumes once the
counter reaches 0.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _suspendMediaPlaybackCounter]):
SPI for test purposes.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::suspendAllMediaPlayback):
(WebKit::WebPageProxy::resumeAllMediaPlayback):
Never let the counter get below 0.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::suspendMediaPlaybackCounter):

Tools:

Add API test coverage. Fix the existing SuspendResumeAllMediaPlayback
test which had a small JavaScript bug, and was missing a call to
TestWebKitAPI::Util::run(&didReject) which allowed the bug to go
unnoticed.

  • TestWebKitAPI/Tests/WebKitCocoa/StopSuspendResumeAllMedia.mm:

(TestWebKitAPI::TEST):

3:25 PM Changeset in webkit [267898] by Truitt Savell
  • 28 edits
    10 deletes in trunk

Unreviewed, reverting r267887.

Broke two tests on iOS and Mac

Reverted changeset:

"Add non-animated support for the CSS translate property"
https://bugs.webkit.org/show_bug.cgi?id=216997
https://trac.webkit.org/changeset/267887

2:53 PM Changeset in webkit [267897] by Truitt Savell
  • 12 edits in trunk

Unreviewed, reverting r267817.

Broke two tests on Mac

Reverted changeset:

"Storage Access API: Enable per-page storage access scope and
align test cases"
https://bugs.webkit.org/show_bug.cgi?id=217077
https://trac.webkit.org/changeset/267817

2:26 PM WebKitGTK/2.30.x edited by Adrian Perez de Castro
(diff)
1:59 PM Changeset in webkit [267896] by achristensen@apple.com
  • 7 edits in trunk

Copy host from base file URL
https://bugs.webkit.org/show_bug.cgi?id=217170

Reviewed by Brady Eidson.

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/resources/urltestdata.json:
  • web-platform-tests/url/url-constructor-expected.txt:

Source/WTF:

This matches Chrome and the URL specification.
Covered by newly passing web platform tests.

I also updated the web platform tests from https://github.com/web-platform-tests/wpt/pull/25716
which aligns with Safari in cases except copying of the host from base file URLs.

The implementation pushes copying from the base URL downstream in the parsing process to where it is in the URL specification
so that we can properly decide how much of the base URL to copy and so we can copy it into the right place in the result URL.

I also updated an assertion that makes sure that we re-use the input String if possible because there are cases where we copy
part of the parent URL, which is a "syntax violation" (meaning we copy the string parts and assemble a new one), then re-assemble
a new String that is equal to the input string. This is not a problem, it just needed to be reflected in the assertion.

  • wtf/URLParser.cpp:

(WTF::URLParser::URLParser):
(WTF::URLParser::parse):

1:44 PM Changeset in webkit [267895] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitscmpy] Remove "i" from canonical identifier
https://bugs.webkit.org/show_bug.cgi?id=217238
<rdar://problem/69888017>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitscmpy/webkitscmpy/commit.py:

(Commit):
(Commit.pretty_print): Remove "i" from canonical identifier, add branch point.
(Commit.repr): Remove "i" from canonical identifier.

  • Scripts/libraries/webkitscmpy/webkitscmpy/test/commit_unittest.py:

(TestCommit.test_parse_revision):
(TestCommit.test_parse_identifier):
(TestCommit.test_parse):
(TestCommit.test_pretty_print):

1:35 PM Changeset in webkit [267894] by Peng Liu
  • 2 edits in trunk/Source/WebKit

[Media in GPU Process] Remove requiresTextTrackRepresentation in RemoteMediaPlayerState
https://bugs.webkit.org/show_bug.cgi?id=217230

Reviewed by Jer Noble.

A Web process can figure out whether the fullscreen/picture-in-picture subtitle
layer (for text track representation) is required by itself, so it does not need
to get the information from the GPU process.

  • WebProcess/GPU/media/RemoteMediaPlayerState.h:

(WebKit::RemoteMediaPlayerState::encode const):
(WebKit::RemoteMediaPlayerState::decode):

1:30 PM Changeset in webkit [267893] by weinig@apple.com
  • 24 edits
    2 adds in trunk

Re-align HTMLElement with the HTML spec
https://bugs.webkit.org/show_bug.cgi?id=217202

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/html/dom/idlharness.https-expected.txt:
  • web-platform-tests/svg/types/scripted/event-handler-all-document-element-events-expected.txt:

Update more now passing results.

Source/WebCore:

  • Stops including DocumentAndElementEventHandlers in Element, and instead matches spec and other browsers by having HTMLElement, SVGElement and MathMLElement include it.
  • Splits out ElementContentEditable from HTMLElement and has HTMLElement include it.
  • Splits CSSOM View parts of HTMLElement out into HTMLElement+CSSOMView.idl
  • Re-orders includes to more closely match spec'd order. Has no real effect but made me happy.

Updates results to existing tests that are now passing, all due to the change to
include DocumentAndElementEventHandlers in the Element subclasses, not Element itself.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Element.idl:
  • dom/ElementContentEditable.idl: Added.
  • html/HTMLBodyElement.idl:
  • html/HTMLElement+CSSOMView.idl: Added.
  • html/HTMLElement.idl:
  • html/HTMLFrameSetElement.idl:
  • html/HTMLMediaElement+AudioOutput.idl: Added.
  • html/HTMLMediaElementAudioOutput.idl: Removed.
  • mathml/MathMLElement.idl:
  • svg/SVGElement.idl:

LayoutTests:

  • fast/events/DocumentAndElementEventHandlers-expected.txt:
  • fast/events/DocumentAndElementEventHandlers.html:

Update test to match spec by checking on the HTMLElement prototype, not the
Element prototype.

  • fast/dom/event-handler-attributes-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:

Update more now passing results.

12:23 PM Changeset in webkit [267892] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

[CMake] unused variable warning spam in UIScriptController.h
https://bugs.webkit.org/show_bug.cgi?id=217176

Patch by Philippe Normand <pnormand@igalia.com> on 2020-10-02
Reviewed by Adrian Perez de Castro.

  • DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm:

(_generateImplementationFile): Generate macros for unused variables.

  • TestRunnerShared/UIScriptContext/UIScriptController.h: Remove unused variable names declarations.

(WTR::UIScriptController::doAsyncTask):
(WTR::UIScriptController::ensurePositionInformationIsUpToDateAt):
(WTR::UIScriptController::overridePreference):
(WTR::UIScriptController::zoomToScale):
(WTR::UIScriptController::immediateZoomToScale):
(WTR::UIScriptController::setSafeAreaInsets):
(WTR::UIScriptController::propertiesOfLayerWithID const):
(WTR::UIScriptController::scrollToOffset):
(WTR::UIScriptController::immediateScrollToOffset):
(WTR::UIScriptController::immediateScrollElementAtContentPointToOffset):
(WTR::UIScriptController::touchDownAtPoint):
(WTR::UIScriptController::liftUpAtPoint):
(WTR::UIScriptController::singleTapAtPoint):
(WTR::UIScriptController::singleTapAtPointWithModifiers):
(WTR::UIScriptController::twoFingerSingleTapAtPoint):
(WTR::UIScriptController::doubleTapAtPoint):
(WTR::UIScriptController::dragFromPointToPoint):
(WTR::UIScriptController::longPressAtPoint):
(WTR::UIScriptController::activateAtPoint):
(WTR::UIScriptController::typeCharacterUsingHardwareKeyboard):
(WTR::UIScriptController::keyDown):
(WTR::UIScriptController::toggleCapsLock):
(WTR::UIScriptController::applyAutocorrection):
(WTR::UIScriptController::replaceTextAtRange):
(WTR::UIScriptController::stylusDownAtPoint):
(WTR::UIScriptController::stylusMoveToPoint):
(WTR::UIScriptController::stylusUpAtPoint):
(WTR::UIScriptController::stylusTapAtPoint):
(WTR::UIScriptController::stylusTapAtPointWithModifiers):
(WTR::UIScriptController::sendEventStream):
(WTR::UIScriptController::playBackEventStream):
(WTR::UIScriptController::dismissFilePicker):
(WTR::UIScriptController::setTimePickerValue):
(WTR::UIScriptController::setDefaultCalendarType):
(WTR::UIScriptController::findString):
(WTR::UIScriptController::simulateAccessibilitySettingsChangeNotification):
(WTR::UIScriptController::beginBackSwipe):
(WTR::UIScriptController::completeBackSwipe):
(WTR::UIScriptController::rectForMenuAction const):
(WTR::UIScriptController::attachmentInfo):
(WTR::UIScriptController::insertAttachmentForFilePath):

12:21 PM Changeset in webkit [267891] by Chris Dumez
  • 91 edits
    5 copies in trunk/Source/WebCore

Add stubs for AudioWorkletProcessor and AudioWorkletGlobalScope
https://bugs.webkit.org/show_bug.cgi?id=217194

Reviewed by Sam Weinig.

Add stubs for AudioWorkletProcessor and AudioWorkletGlobalScope:

I had to make some changes to the generated bindings to avoid a naming conflict because there was already a class
named JSAudioWorkletProcessorConstructor (the DOM constructor for JSAudioWorkletProcessor) before I introduced
AudioWorkletProcessorConstructor.idl. We now use "DOMConstructor" suffix in the generated bindings instead of
"Constructor" to avoid the naming conflict.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/webaudio/AudioWorkletGlobalScope.cpp:

(WebCore::AudioWorkletGlobalScope::registerProcessor):

  • Modules/webaudio/AudioWorkletGlobalScope.h:

(WebCore::AudioWorkletGlobalScope::currentFrame):
(WebCore::AudioWorkletGlobalScope::currentTime const):
(WebCore::AudioWorkletGlobalScope::sampleRate const):

  • Modules/webaudio/AudioWorkletGlobalScope.idl:
  • Modules/webaudio/AudioWorkletProcessor.cpp: Copied from Source/WebCore/Modules/webaudio/AudioWorkletGlobalScope.idl.

(WebCore::AudioWorkletProcessor::AudioWorkletProcessor):

  • Modules/webaudio/AudioWorkletProcessor.h: Copied from Source/WebCore/Modules/webaudio/AudioWorkletGlobalScope.idl.

(WebCore::AudioWorkletProcessor::create):
(WebCore::AudioWorkletProcessor::port):

  • Modules/webaudio/AudioWorkletProcessor.idl: Copied from Source/WebCore/Modules/webaudio/AudioWorkletGlobalScope.idl.
  • Modules/webaudio/AudioWorkletProcessorConstructor.h: Copied from Source/WebCore/Modules/webaudio/AudioWorkletGlobalScope.cpp.
  • Modules/webaudio/AudioWorkletProcessorConstructor.idl: Copied from Source/WebCore/Modules/webaudio/AudioWorkletGlobalScope.idl.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateRuntimeEnableConditionalStringForExposed):
(GenerateImplementation):
(GenerateCallbackImplementationContent):
(GenerateConstructorDeclaration):
(GenerateConstructorDefinitions):
(GenerateConstructorDefinition):
(GenerateConstructorHelperMethods):

12:12 PM Changeset in webkit [267890] by Russell Epstein
  • 12 edits
    1 delete in branches/safari-611.1.2-branch/Source

Revert r267539. rdar://problem/69891393

10:57 AM Changeset in webkit [267889] by BJ Burg
  • 2 edits in trunk/Source/WebKit

[Cocoa] Web Inspector: add an ObjC protocol for extension support
https://bugs.webkit.org/show_bug.cgi?id=217191
<rdar://problem/69797960>

Reviewed by Timothy Hatcher.

  • UIProcess/API/Cocoa/_WKInspector.h:
10:47 AM Changeset in webkit [267888] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

[GPU Process] fast/canvas/canvas-createPattern-video-loading.html times out
https://bugs.webkit.org/show_bug.cgi?id=217227

Reviewed by Eric Carlson.

Even after supporting createPattern with video elements using the GPU process for both media and canvas
rendering, we still fail this test due to a security error that is thrown when consulting
CanvasRenderingContext::wouldTaintOrigin. This, in turn, is due to the fact that we never attempt to update
cached wouldTaintDocumentSecurityOrigin state on MediaPlayerPrivateRemote, so it remains true.

This change will be covered by fast/canvas/canvas-createPattern-video-loading.html, which should now fail with a
text diff instead of timing out due to lack of support for creating a CanvasPattern out of a video element.

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::updateCachedState):

10:26 AM Changeset in webkit [267887] by graouts@webkit.org
  • 28 edits
    10 adds in trunk

Add non-animated support for the CSS translate property
https://bugs.webkit.org/show_bug.cgi?id=216997
<rdar://problem/69597083>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

WPT progressions showing the correct parsing and computed style output of a non-animated "translate" property.
We are also adding some more tests to the invalid "translate" parsing to check that we bail once we get junk
for optional values after valid values.

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/css/css-transforms/animation/translate-composition-expected.txt:
  • web-platform-tests/css/css-transforms/animation/translate-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/parsing/translate-parsing-invalid-expected.txt:
  • web-platform-tests/css/css-transforms/parsing/translate-parsing-invalid.html:
  • web-platform-tests/css/css-transforms/parsing/translate-parsing-valid-expected.txt:
  • web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:

Source/WebCore:

We add non-animated support for the CSS "translate" property as specifed in by the CSS Transforms Level 2
specification (https://drafts.csswg.org/css-transforms-2/#propdef-translate).

Tests: transforms/2d/translate-and-transform-attribute-in-svg.svg

transforms/2d/translate-and-transform-css-property-in-svg.svg
transforms/2d/translate-in-svg.svg
transforms/2d/translate-transform-order.html
transforms/2d/translate-transform-origin-order.html

  • Headers.cmake:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::computedTranslate): Create a CSSValueList to print out the computed value for the "translate" property.
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSProperties.json: Define the "translate" property with the condition that the runtime setting for individual

CSS transform properties is set.

  • css/TransformFunctions.cpp:

(WebCore::translateForValue): Convert a CSSValue to a TranslateTransformOperation when parsing a "translate" property value.

  • css/TransformFunctions.h:
  • css/parser/CSSParserContext.cpp:

(WebCore::CSSParserContext::CSSParserContext): Add a new flag indicating whether the runtime setting for individual
CSS transform properties is set.
(WebCore::operator==):

  • css/parser/CSSParserContext.h:

(WebCore::CSSParserContextHash::hash):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeTranslate): Create a CSSValueList when parsing a "translate" property value.
(WebCore::CSSPropertyParser::parseSingleValue):

  • platform/graphics/transforms/TranslateTransformOperation.h: Promote the apply() method to be public so that it can be called

from Style::ComputedStyleExtractor::valueForPropertyInStyle().

  • rendering/RenderObject.h:

(WebCore::RenderObject::hasTransform const): Consider that having the "translate" property is akin to having a "transform" property
in the render tree.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::setTranslate):
(WebCore::RenderStyle::applyTransform const): Account for the RenderStyle::translate() value in the right order, after applying the
transform origin, but before applying the main transform.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::translate const):
(WebCore::RenderStyle::hasTransformRelatedProperty const):
(WebCore::RenderStyle::initialTranslate):

  • rendering/style/StyleRareNonInheritedData.h:
  • rendering/style/WillChangeData.cpp:

(WebCore::WillChangeData::propertyCreatesStackingContext):

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertTranslate):

  • svg/SVGGraphicsElement.cpp:

(WebCore::SVGGraphicsElement::animatedLocalTransform const): Account for the RenderStyle::translate() value when rendering SVG, ensuring
that it is applied before the transform specified by either the "transform" CSS property or SVG attribute.

LayoutTests:

Add tests checking that the "translate" CSS property is applied in the correct order related to
"transform-origin" and "transform" and that it is applied in SVG as well.

  • imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • platform/ios-13/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt:
  • transforms/2d/translate-and-transform-attribute-in-svg-expected.svg: Added.
  • transforms/2d/translate-and-transform-attribute-in-svg.svg: Added.
  • transforms/2d/translate-and-transform-css-property-in-svg-expected.svg: Added.
  • transforms/2d/translate-and-transform-css-property-in-svg.svg: Added.
  • transforms/2d/translate-in-svg-expected.svg: Added.
  • transforms/2d/translate-in-svg.svg: Added.
  • transforms/2d/translate-transform-order-expected.html: Added.
  • transforms/2d/translate-transform-order.html: Added.
  • transforms/2d/translate-transform-origin-order-expected.html: Added.
  • transforms/2d/translate-transform-origin-order.html: Added.
10:24 AM Changeset in webkit [267886] by Jonathan Bedard
  • 2 edits in trunk/Tools

Update my information in contributors.json

Unreviewed.

  • Scripts/webkitpy/common/config/contributors.json:
9:39 AM Changeset in webkit [267885] by weinig@apple.com
  • 57 edits
    4 copies
    13 deletes in trunk

Remove code behind ENABLE(MEDIA_SESSION), no ports enable it
https://bugs.webkit.org/show_bug.cgi?id=216831

Reviewed by Alex Christensen.

.:

  • Source/cmake/OptionsFTW.cmake:
  • Source/cmake/WebKitFeatures.cmake:

Remove option to build with MEDIA_SESSION, no one was doing it.

Source/WebCore:

  • CMakeLists.txt:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:

Remove media session related files.

  • Modules/airplay/PlaybackTargetClientContextIdentifier.h: Added.
  • Modules/airplay/WebMediaSessionManager.cpp: Added.
  • Modules/airplay/WebMediaSessionManager.h: Added.
  • Modules/airplay/WebMediaSessionManagerClient.h: Added.
  • Modules/mediasession: Removed.
  • platform/mediasession: Removed.

Delete Modules/mediasession and platform/mediasession. Move files that
were actually used for the WIRELESS_PLAYBACK_TARGET feature to
Modules/airplay where other parts of that feature are implemented.

  • dom/Document.cpp:
  • dom/Document.h:
  • dom/EventTargetFactory.in:
  • html/HTMLMediaElement.cpp:
  • html/HTMLMediaElement.h:
  • page/ChromeClient.h:
  • page/Page.cpp:
  • page/Page.h:
  • testing/Internals.cpp:
  • testing/Internals.h:
  • testing/Internals.idl:

Remove all code inside ENABLE(MEDIA_SESSION).

Source/WebKit:

Removes all code in ENABLE(MEDIA_SESSION) and all media session
related SPI. It was never enabled and nothing ever adopted it.

  • Sources.txt:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:

Remove media session related files.

  • Shared/API/APIObject.h:
  • Shared/API/c/WKBase.h:
  • Shared/WebCoreArgumentCoders.cpp:
  • Shared/WebCoreArgumentCoders.h:
  • Shared/WebMediaSessionMetadata.cpp: Removed.
  • Shared/WebMediaSessionMetadata.h: Removed.
  • UIProcess/API/APIUIClient.h:
  • UIProcess/API/C/WKAPICast.h:
  • UIProcess/API/C/WKContext.cpp:
  • UIProcess/API/C/WKContext.h:
  • UIProcess/API/C/WKMediaSessionFocusManager.cpp: Removed.
  • UIProcess/API/C/WKMediaSessionFocusManager.h: Removed.
  • UIProcess/API/C/WKMediaSessionMetadata.cpp: Removed.
  • UIProcess/API/C/WKMediaSessionMetadata.h: Removed.
  • UIProcess/API/C/WKPage.cpp:
  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/API/C/WKPageUIClient.h:
  • UIProcess/WebMediaSessionFocusManager.cpp: Removed.
  • UIProcess/WebMediaSessionFocusManager.h: Removed.
  • UIProcess/WebMediaSessionFocusManagerClient.cpp: Removed.
  • UIProcess/WebMediaSessionFocusManagerClient.h: Removed.
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/WebProcessPool.cpp:
  • UIProcess/WebProcessPool.h:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:
  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.cpp:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Remove all code in ENABLE(MEDIA_SESSION).

Tools:

  • Scripts/webkitperl/FeatureList.pm:

Remove support for building with MEDIA_SESSION enabled.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):
Update names to new 'unused' naming.

LayoutTests:

Remove always skipped Media Session tests.

9:36 AM commit-identifiers edited by Jonathan Bedard
(diff)
9:31 AM commit-identifiers edited by Jonathan Bedard
(diff)
9:30 AM commit-identifiers edited by Jonathan Bedard
(diff)
9:01 AM Changeset in webkit [267884] by weinig@apple.com
  • 5 edits
    7 deletes in trunk/LayoutTests

Remove unhelpful dom-static-property-for-in-iteration.html test
https://bugs.webkit.org/show_bug.cgi?id=217204

Reviewed by Chris Dumez.

Iteration order for builtin attributes, operations and constants of WebIDL
objects is not currently defined, so the test dom-static-property-for-in-iteration.html,
is just testing what we happen to currently do. This is largely unhelpful
and frustrating to maintain as different ports enabling/disabling features
means each port needed a seperate result, and any time something was added, removed
or moved, all the results need to be updated. There are plenty of other tests
that ensure we have these properties, so removing this is not a loss.

  • js/dom/dom-static-property-for-in-iteration-expected.txt: Removed.
  • js/dom/dom-static-property-for-in-iteration.html: Removed.
  • platform/gtk/js/dom/dom-static-property-for-in-iteration-expected.txt: Removed.
  • platform/ios-wk2/TestExpectations:
  • platform/ios-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt: Removed.
  • platform/ios/TestExpectations:
  • platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt: Removed.
  • platform/win/TestExpectations:
  • platform/win/js/dom/dom-static-property-for-in-iteration-expected.txt: Removed.
  • platform/wincairo/TestExpectations:
  • platform/wpe/js/dom/dom-static-property-for-in-iteration-expected.txt: Removed.
9:00 AM Changeset in webkit [267883] by Karl Rackler
  • 57 edits
    10 copies
    4 moves
    49 adds in trunk

Unreviewed, reverting r267796.

This change is breaking the build on AzulE debug bots.

Reverted changeset:

"Remove code behind ENABLE(MEDIA_SESSION), no ports enable it"
https://bugs.webkit.org/show_bug.cgi?id=216831
https://trac.webkit.org/changeset/267796

8:58 AM commit-identifiers created by Jonathan Bedard
8:58 AM WikiStart edited by Jonathan Bedard
(diff)
8:57 AM WikiStart edited by Jonathan Bedard
Add link to Commit Identifiers (diff)
8:54 AM Changeset in webkit [267882] by Adrian Perez de Castro
  • 4 edits in trunk

[GTK] Build broken with ENABLE_MEDIA_STREAM enabled and ENABLE_WEB_RTC_DISABLED
https://bugs.webkit.org/show_bug.cgi?id=217128

Reviewed by Philippe Normand.

.:

  • Source/cmake/GStreamerChecks.cmake: Only enable USE_LIBWEBRTC when both

ENABLE_MEDIA_STREAM and ENABLE_WEB_RTC is defined. This prevents trying to
build code that uses libwebrtc types when ENABLE_WEB_RTC is disabled but
ENABLE_MEDIA_STREAM is enabled.

Source/WebCore:

No new tests needed.

  • platform/mediastream/gstreamer/GStreamerAudioData.h: Remove USE(LIBWEBRTC) guard, as

there is nothing specific to WebRTC in this file, and it is needed when building with
ENABLE_MEDIA_STREAM enabled.

8:48 AM Changeset in webkit [267881] by Megan Gardner
  • 4 edits in trunk/Source/WebCore

Rename repaint to repaintSelection in HighlightData for clarity
https://bugs.webkit.org/show_bug.cgi?id=217205

Reviewed by Tim Horton.

No behavior change, covered by existing tests.

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::focusedOrActiveStateChanged):

  • rendering/HighlightData.cpp:

(WebCore::HighlightData::repaintSelection const):
(WebCore::HighlightData::repaint const): Deleted.

  • rendering/HighlightData.h:
8:45 AM Changeset in webkit [267880] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Do not use simplified text measuring when soft hyphen is present
https://bugs.webkit.org/show_bug.cgi?id=217224

Reviewed by Antti Koivisto.

Specifically the monospaced fast codepath computes incorrect widht value when soft hyphens are present.

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::canUseSimplifiedTextMeasuring):

  • rendering/RenderText.cpp:

(WebCore::RenderText::computeCanUseSimplifiedTextMeasuring const):

8:29 AM Changeset in webkit [267879] by Adrian Perez de Castro
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed. [GTK] Add missing locale.h header needed for setlocale()

  • jsc.cpp: Add missing locale.h header for the GTK port, which is needed to get the

definition for setlocale() in scope.

8:27 AM Changeset in webkit [267878] by Andres Gonzalez
  • 10 edits in trunk

Layout Test accessibility/mac/html5-input-number.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=180560
<rdar://problem/36029379>

Reviewed by Chris Fleizach.

Source/WebCore:

Fix for this test in both isolated tree mode on and off.

  • accessibility/AccessibilitySpinButton.h:

AccessibilitySpinButtonPart::roleValue now returns SpinButtonPart role
as it should.

  • accessibility/mac/AccessibilityObjectMac.mm:

(WebCore::Accessibility::createPlatformRoleMap):
Appropriate platform role string for SpinButtonPart role.

Tools:

Dispatch the computation of the role and subrole to secondary AX thread in isolated tree mode = 2.

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::role):
(WTR::AccessibilityUIElement::subrole):

LayoutTests:

SpinButtonPart platform role string is "AXIncrementorArrow".

  • accessibility/mac/html5-input-number-expected.txt:
  • accessibility/mac/html5-input-number.html:

Eliminated flakiness by making test deterministic using Promises. Works
in both isolated tree mode on and off.

  • accessibility/spinbutton-crash-expected.txt:
  • platform/mac/TestExpectations: Test no longer flaky.
7:27 AM Changeset in webkit [267877] by Antti Koivisto
  • 7 edits in trunk/Source/WebCore

[LFC][Integration] Convert rest of Position::inlineBoxAndOffset to use iterator
https://bugs.webkit.org/show_bug.cgi?id=217214

Reviewed by Zalan Bujtas.

Progress towards allowing Position construction in all cases without forcing legacy inline layout.

  • dom/Position.cpp:

(WebCore::InlineBoxAndOffset::InlineBoxAndOffset):
(WebCore::Position::inlineBoxAndOffset const):

  • dom/Position.h:
  • layout/integration/LayoutIntegrationRunIterator.cpp:

(WebCore::LayoutIntegration::RunIterator::setAtEnd):
(WebCore::LayoutIntegration::RunIterator::previousOnLine const):
(WebCore::LayoutIntegration::RunIterator::nextOnLineIgnoringLineBreak const):
(WebCore::LayoutIntegration::RunIterator::previousOnLineIgnoringLineBreak const):
(WebCore::LayoutIntegration::LineRunIterator::traversePreviousOnLine):
(WebCore::LayoutIntegration::LineRunIterator::traverseNextOnLineIgnoringLineBreak):
(WebCore::LayoutIntegration::LineRunIterator::traversePreviousOnLineIgnoringLineBreak):

  • layout/integration/LayoutIntegrationRunIterator.h:

(WebCore::LayoutIntegration::Run::leftmostCaretOffset const):
(WebCore::LayoutIntegration::Run::rightmostCaretOffset const):
(WebCore::LayoutIntegration::Run::direction const):
(WebCore::LayoutIntegration::Run::isLeftToRightDirection const):
(WebCore::LayoutIntegration::Run::bidiLevel const):

  • layout/integration/LayoutIntegrationRunIteratorLegacyPath.h:

(WebCore::LayoutIntegration::LegacyPath::bidiLevel const):
(WebCore::LayoutIntegration::LegacyPath::traversePreviousOnLine):
(WebCore::LayoutIntegration::LegacyPath::setAtEnd):
(WebCore::LayoutIntegration::LegacyPath::isLeftToRightDirection const): Deleted.

  • layout/integration/LayoutIntegrationRunIteratorModernPath.h:

(WebCore::LayoutIntegration::ModernPath::bidiLevel const):
(WebCore::LayoutIntegration::ModernPath::traverseNextOnLine):
(WebCore::LayoutIntegration::ModernPath::traversePreviousOnLine):
(WebCore::LayoutIntegration::ModernPath::setAtEnd):
(WebCore::LayoutIntegration::ModernPath::line const):
(WebCore::LayoutIntegration::ModernPath::isLeftToRightDirection const): Deleted.

6:51 AM Changeset in webkit [267876] by Adrian Perez de Castro
  • 3 edits in trunk/Source/WebCore

Unreviewed non-unified build fix.

No new tests needed.

  • Modules/webaudio/AudioWorkletMessagingProxy.cpp: Add missing AudioWorkletGlobalScope.h header.
  • worklets/WorkletPendingTasks.cpp: Add missing Worklet.h header.
6:35 AM Changeset in webkit [267875] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[GTK] WPE and backend versions are mixed up in webkit://gpu
https://bugs.webkit.org/show_bug.cgi?id=217210

Patch by Alexander Mikhaylenko <Alexander Mikhaylenko> on 2020-10-02
Reviewed by Adrian Perez de Castro.

  • UIProcess/API/glib/WebKitProtocolHandler.cpp:

(WebKit::WebKitProtocolHandler::handleGPU):

6:08 AM WikiStart edited by aakash_jain@apple.com
Updated link to EWS (diff)
5:25 AM Changeset in webkit [267874] by commit-queue@webkit.org
  • 18 edits
    5 deletes in trunk

Unreviewed, reverting r267864.
https://bugs.webkit.org/show_bug.cgi?id=217220

Added broken tests

Reverted changeset:

"[GPU Process] Support drawing text in 2D canvas with font
features"
https://bugs.webkit.org/show_bug.cgi?id=206118
https://trac.webkit.org/changeset/267864

5:03 AM Changeset in webkit [267873] by Carlos Garcia Campos
  • 2 edits in trunk/WebDriverTests

Unreviewed Gardening. Remove expectations for tests fixed in r267872

4:54 AM Changeset in webkit [267872] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebDriver

WebDriver: check the right browser context is open in all commands
https://bugs.webkit.org/show_bug.cgi?id=217177

Reviewed by Carlos Alberto Lopez Perez.

We currently check the top level browsing context for all commands, but the current browsing context should be
checked instead in some of them. New tests added to check this are now failing. This patch changes the way we
were handling the current browsing context, considering nullopt to be the main frame of the current top level
browsing context. Now the null string is used for that, matching what automation expects in the browser and
nullopt means the browser context is closed. That way we can check if the current browser context has been
closed.

  • Session.cpp:

(WebDriver::Session::close): Also close the current browsing context.
(WebDriver::Session::switchToTopLevelBrowsingContext): Initialize the current browsing context to null string.
(WebDriver::Session::switchToBrowsingContext): Just set the given context now.
(WebDriver::Session::go): Pass null string to switchToBrowsingContext().
(WebDriver::Session::back): Ditto.
(WebDriver::Session::forward): Ditto.
(WebDriver::Session::refresh): Ditto.
(WebDriver::Session::closeWindow): Close the current browsing context too.
(WebDriver::Session::switchToFrame): If frame is null check top level browsing context is open, otherwise check
current browsing context.
(WebDriver::Session::findElements): Check current browsing context is open instead of toplevel one.
(WebDriver::Session::getActiveElement): Ditto.
(WebDriver::Session::isElementSelected): Ditto.
(WebDriver::Session::getElementText): Ditto.
(WebDriver::Session::getElementTagName): Ditto.
(WebDriver::Session::getElementRect): Ditto.
(WebDriver::Session::isElementEnabled): Ditto.
(WebDriver::Session::getElementAttribute): Ditto.
(WebDriver::Session::getElementProperty): Ditto.
(WebDriver::Session::getElementCSSValue): Ditto.
(WebDriver::Session::waitForNavigationToComplete): Ditto. Also close the current browsing context when the
window or the frame are closed to do the navigation.
(WebDriver::Session::elementClick): Check current browsing context is open instead of toplevel one.
(WebDriver::Session::elementClear): Ditto.
(WebDriver::Session::elementSendKeys): Ditto.
(WebDriver::Session::getPageSource): Ditto.
(WebDriver::Session::executeScript): Ditto.
(WebDriver::Session::getAllCookies): Ditto.
(WebDriver::Session::addCookie): Ditto.
(WebDriver::Session::deleteCookie): Ditto.
(WebDriver::Session::deleteAllCookies): Ditto.
(WebDriver::Session::performActions): Ditto.
(WebDriver::Session::takeScreenshot): Check current browsing context is open instead of toplevel one when an
element is given.

  • Session.h:
4:44 AM Changeset in webkit [267871] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

[GTK] Fix MiniBrowser compilation warnings
https://bugs.webkit.org/show_bug.cgi?id=217208

Patch by Philippe Normand <pnormand@igalia.com> on 2020-10-02
Reviewed by Carlos Garcia Campos.

webkit_web_context_set_network_proxy_settings() is deprecated in favor of
webkit_website_data_manager_set_network_proxy_settings().
webkit_web_context_set_tls_errors_policy() is deprecated in favor of
webkit_website_data_manager_set_tls_errors_policy().

  • MiniBrowser/gtk/main.c:

(activate):

  • MiniBrowser/wpe/main.cpp:

(main):

2:38 AM Changeset in webkit [267870] by youenn@apple.com
  • 11 edits
    1 add in trunk

Add AVAssetWriter SPI header
https://bugs.webkit.org/show_bug.cgi?id=217169
<rdar://problem/69793050>

Reviewed by Eric Carlson.

Source/WebCore:

No change of behavior, include SPI header instead of private SDK header.

  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/spi/cocoa/AVAssetWriterSPI.h: Added.

Source/WTF:

  • wtf/PlatformHave.h:

Remove dependency on AVAssetWriter_private.h.
Introduce HAVE_AVASSETWRITERDELEGATE_API for older OSes that only have delegate as SPI.

LayoutTests:

Enable tests by default on Catalina+, disable them on Mojave and WK1.
Disable tests for iOS13.

  • TestExpectations:
  • platform/ios-13/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/mac-wk1/TestExpectations:
12:05 AM Changeset in webkit [267869] by commit-queue@webkit.org
  • 23 edits
    3 adds in trunk

[iOS WK1] Crashes when using ANGLE WebGL from another thread
https://bugs.webkit.org/show_bug.cgi?id=216106
<rdar://problem/68602452>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-10-02
Reviewed by Kenneth Russell.

Source/ThirdParty/ANGLE:

Add two extensions for EAGL and CGL backends to declare the
underlying platform context being "volatile". It means that
the thread-global current context is being modified behind
ANGLE. If ANGLE context is marked volatile for a particular
API, it will sync the underlying context for every EGL
function that needs the context. Most intuitive use is
for the client to call eglMakeCurrent before calling any
gl function if the client knowns the platform state might
be dirty.

Implement eglReleaseThread for EAGL and CGL backends.
Releasing thread will unset the platform current context.

Fix a bug of omitting EGL_ANGLE_device_eagl from being
advertised.

  • extensions/EGL_ANGLE_platform_angle_device_context_volatile_cgl.txt: Added.
  • extensions/EGL_ANGLE_platform_angle_device_context_volatile_eagl.txt: Added.
  • include/EGL/eglext_angle.h:
  • src/libANGLE/Caps.cpp:

(egl::DeviceExtensions::getStrings const):
(egl::ClientExtensions::getStrings const):

  • src/libANGLE/Caps.h:
  • src/libANGLE/Display.cpp:

(egl::Display::prepareForCall):
(egl::Display::releaseThread):
(egl::GenerateClientExtensions):

  • src/libANGLE/Display.h:
  • src/libANGLE/renderer/DisplayImpl.cpp:

(rx::DisplayImpl::prepareForCall):
(rx::DisplayImpl::releaseThread):

  • src/libANGLE/renderer/DisplayImpl.h:
  • src/libANGLE/renderer/gl/cgl/DisplayCGL.h:
  • src/libANGLE/renderer/gl/cgl/DisplayCGL.mm:

(rx::DisplayCGL::initialize):
(rx::DisplayCGL::terminate):
(rx::DisplayCGL::prepareForCall):
(rx::DisplayCGL::releaseThread):
(rx::DisplayCGL::makeCurrent):

  • src/libANGLE/renderer/gl/eagl/DisplayEAGL.h:
  • src/libANGLE/renderer/gl/eagl/DisplayEAGL.mm:

(rx::DisplayEAGL::initialize):
(rx::DisplayEAGL::terminate):
(rx::DisplayEAGL::prepareForCall):
(rx::DisplayEAGL::releaseThread):

  • src/libANGLE/validationEGL.cpp:
  • src/libGLESv2/entry_points_egl.cpp:
  • src/libGLESv2/entry_points_egl_ext.cpp:

Source/WebCore:

Source of the bug comes from following:

  • WK1 might run WebKit code in client main thread.
  • WK1 might run Webkit code in web thread.
  • WebKit code might run WebGL payload, notably access GraphicsContextGL classes. Client is able to modify EAGL/CGL current context.

The change to ANGLE incurred two distinct behavior changes
compared to raw EAGL / CGL:
1) Before: context was set current before any GL call
After: context was set current only if EGL current context
had been changed. (Explicit code as well as ANGLE implementation
optimization.)

2) Before: context being used was able to be current in
multiple threads at the same time. (EAGL/CGL feature)
After: context cannot be current in multiple threads
at the same time. (EGL feature)

Change in behavior 1) caused ANGLE to sometimes use
the EAGL/CGL context of the client instead of
the real context that ANGLE created.
Fix this by introducing
EGL_ANGLE_platform_angle_device_context_volatile_eagl
and
EGL_ANGLE_platform_angle_device_context_volatile_cgl
which make ANGLE sync the context on each eglMakeCurrent
eglReleaseThread and eglTerminate.

Change in behavior 2) caused ANGLE to use uninitialized
context object from one thread, if the real context object
was current in another thread.
Fix this by considering "GraphicsContextGLOpenGL current context"
as part of "data that is owned by WebCoreThread lock".
The current context is set with lock held, implicitly.
The current context is released when lock is released.
When the lock is not held, GraphicsContextGLOpenGL current context
is nullptr.

Adds soft linking for EAGL for the purpose of testing this in
TestWebKitAPI. The case of Apple Silicon Mac may sometimes
use CGL and sometimes EAGL, and the test should test that
client overriding both contexts will not cause problems.

Fix ANGLE header include path:

  • Do not include ANGLE in the path, as files are included with ANGLE/
  • Add WK_ALTERNATE_FRAMEWORKS_DIR so that SDK_VARIANT=iosmac e.g. maccatalyst builds work

Previously the ANGLE was not included from ThirdParty/ANGLE, rather
"WebKit SDK".

  • Configurations/WebCore.xcconfig:
  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):
(WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL):
(WebCore::GraphicsContextGLOpenGL::makeContextCurrent):
(WebCore::GraphicsContextGLOpenGL::releaseCurrentContext):
(WebCore::GraphicsContextGLOpenGL::checkGPUStatus):
(WebCore::GraphicsContextGLOpenGL::allowOfflineRenderers const):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/ios/wak/WebCoreThread.mm:

(WebThreadUnlockFromAnyThread):
(_WebThreadUnlock):

Tools:

Add a WK1 test which runs WebGL code both in
client main thread and in web thread.
This tests the case where ANGLE EGL context is
not being held current in one thread while the
other thread runs WebGL and thus ANGLE EGL code.

  • TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitLegacy/ios/WebGLNoCrashOnOtherThreadAccess.mm: Added.

(-[WebGLNoCrashOnOtherThreadAccessWebViewDelegate webViewDidFinishLoad:]):
(-[WebGLNoCrashOnOtherThreadAccessWebViewDelegate webView:shouldStartLoadWithRequest:navigationType:]):
(TestWebKitAPI::TEST):

Oct 1, 2020:

11:47 PM Changeset in webkit [267868] by Lauro Moura
  • 2 edits in trunk/WebDriverTests

[WebDriver] Gardening no_browsing_context failures.

Unreviewed test gardening.

11:14 PM Changeset in webkit [267867] by ysuzuki@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

[JSC] Masm probe should invoke JIT operation function
https://bugs.webkit.org/show_bug.cgi?id=217199

Reviewed by Mark Lam.

Masm probe function should be invoked via OperationPtrTag since it is invoked from JIT code, and it is native code.
And we should register probe trampoline as JIT operation.

  • assembler/MacroAssemblerARM64.cpp:

(JSC::MacroAssembler::probe):

  • assembler/MacroAssemblerARMv7.cpp:
  • assembler/MacroAssemblerMIPS.cpp:
  • assembler/MacroAssemblerX86Common.cpp:
  • runtime/JSCPtrTag.h:
11:06 PM Changeset in webkit [267866] by commit-queue@webkit.org
  • 4 edits in trunk

update FormData to latest spec webidl
https://bugs.webkit.org/show_bug.cgi?id=171589

Patch by Rob Buis <rbuis@igalia.com> on 2020-10-01
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Update improved test result.

  • web-platform-tests/xhr/formdata-expected.txt:

Source/WebCore:

Change FormData contructor to not take optional, nullable
parameter.

Test: imported/w3c/web-platform-tests/xhr/formdata.html

  • html/DOMFormData.cpp:

(WebCore::DOMFormData::DOMFormData):

  • html/DOMFormData.h:

(WebCore::DOMFormData::create):

  • html/DOMFormData.idl:
6:42 PM Changeset in webkit [267865] by weinig@apple.com
  • 8 edits in trunk

[WebIDL] Add support for non-nullable optional wrapper type arguments to operations
https://bugs.webkit.org/show_bug.cgi?id=217162

Reviewed by Chris Dumez.
Source/WebCore:

The bindings currently treat both nullable and optional wrapper types as
having type WrapperType* (or RefPtr<WrapperType> for callbacks), whereas
non-nullable, non-optional wrapper types are treated as having type WrapperType&
(or Ref<WrapperType> for callbacks). This parallels non wrapper types
which use Optional<Type> for both nullable and optional vs Type for the
non-nullable non-optional variant. In both these cases, there is possibility
for ambiguity, should we ever need to disambiguate between nullable and
optional, but thus far it hasn't come up.

This change adds a missing case where we weren't supporting non-nullable
optional wrapper type arguments to operations. We solve this by expecting
the wrapped implementation to take the optional wrapper type argument the
same way it would take an optional wrapper type argument, with a WrapperType*,
(or RefPtr<WrapperType> for callbacks) that gets passed a nullptr if the
parameter was ommited.

Adopt this in Geolocation.idl, which has had a FIXME for this for a long
time.

  • Modules/geolocation/Geolocation.idl:
  • bindings/scripts/CodeGeneratorJS.pm:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/TestObj.idl:

LayoutTests:

  • fast/dom/Geolocation/argument-types.html:
  • fast/dom/Geolocation/argument-types-expected.txt:

Update tests now that the second argument to Geolocation.getCurrentPosition
and Geolocation.watchPosition are non-nullable.

6:16 PM Changeset in webkit [267864] by mmaxfield@apple.com
  • 18 edits
    5 adds in trunk

[GPU Process] Support drawing text in 2D canvas with font features
https://bugs.webkit.org/show_bug.cgi?id=206118

Reviewed by Wenson Hsieh.

Source/WebCore:

This patch simply serializes all the non-derived data in Font and FontPlatformData.

Serializing a CTFont involves serializing its font descriptor's attributes. However,
there's an extra step for web fonts, since the font descriptor's attributes don't include
the raw bytes of the font file. This was previously being saved in Font, but this patch
moves that into FontPlatformData because of layering, and adds the SharedBuffer to the
serialization routine for web fonts.

Test: fast/canvas/fill-text-with-font-features.html

  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::font): Fonts and FontPlatformDatas are supposed to be immutable, so
having a setter for the FontFaceData is incorrect. This object is moved into the constructor
instead.

  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::font): Deleting dead code.

  • platform/graphics/Font.cpp:

(WebCore::Font::setFontFaceData): Deleted.

  • platform/graphics/Font.h:

(WebCore::Font::fontFaceData const): Deleted. Moved to FontPlatformData

  • platform/graphics/FontPlatformData.cpp:

(WebCore::FontPlatformData::FontPlatformData):

  • platform/graphics/FontPlatformData.h:

(WebCore::FontPlatformData::creationData const): Moved from Font.

  • platform/graphics/coretext/FontPlatformDataCoreText.cpp:

(WebCore::FontPlatformData::FontPlatformData):

  • platform/graphics/mac/FontCustomPlatformData.cpp:

(WebCore::FontCustomPlatformData::fontPlatformData): FontCustomPlatformData is a struct, so
there's no need for the m_ prefixes.
(WebCore::createFontCustomPlatformData):

  • platform/graphics/mac/FontCustomPlatformData.h:

(WebCore::FontCustomPlatformData::FontCustomPlatformData): Ditto.

Source/WebKit:

Simply serialize and deserialize all the non-derived data in Font and PlatformFontData.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<Ref<Font>>::encodePlatformData):
(IPC::ArgumentCoder<Ref<Font>>::decodePlatformData):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<Ref<Font>>::encode):
(IPC::ArgumentCoder<Ref<Font>>::decode):

  • Shared/WebCoreArgumentCoders.h:

LayoutTests:

  • fast/canvas/fill-text-with-font-features-expected.html: Added.
  • fast/canvas/fill-text-with-font-features.html: Added.
  • fast/canvas/resources/FontWithFeatures.ttf: Added.
6:10 PM Changeset in webkit [267863] by Megan Gardner
  • 3 edits
    6 adds in trunk

Repaint as needed when adding and removing highlights
https://bugs.webkit.org/show_bug.cgi?id=217116
Source/WebCore:

<rdar://problem/59076190>

Reviewed by Simon Fraser.

When adding and removing psudo highlights, make sure that the
right areas are repainted.

Test: http/wpt/css/css-highlight-api/highlight-text-repaint.html

  • Modules/highlight/HighlightRangeGroup.cpp:

(WebCore::repaintRange):
(WebCore::HighlightRangeGroup::removeFromSetLike):
(WebCore::HighlightRangeGroup::clearFromSetLike):
(WebCore::HighlightRangeGroup::addToSetLike):

LayoutTests:

Reviewed by Simon Fraser.

  • http/wpt/css/css-highlight-api/highlight-text-repaint-expected.txt: Added.
  • http/wpt/css/css-highlight-api/highlight-text-repaint.html: Added.
  • http/wpt/css/css-highlight-api/highlight-text-replace-expected.html: Removed.
5:18 PM Changeset in webkit [267862] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Limit number of tests to log in case of large number of API test failures
https://bugs.webkit.org/show_bug.cgi?id=217181

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(AnalyzeAPITestsResults.analyzeResults):

4:56 PM Changeset in webkit [267861] by Alan Coon
  • 2 edits in branches/safari-611.1.2-branch/Source/WebCore

Cherry-pick r267848. rdar://problem/69862200

REGRESSION(r267249): Crash in WebPage::updatePreferences() when libwebrtc is not available.
https://bugs.webkit.org/show_bug.cgi?id=217186
<rdar://problem/69817170>

Reviewed by Eric Carlson.

Always check for the presence of libwebrtc before calling into it.

  • platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp: (WebCore::LibWebRTCProvider::setH264HardwareEncoderAllowed): (WebCore::LibWebRTCProviderCocoa::createDecoderFactory): (WebCore::LibWebRTCProviderCocoa::createEncoderFactory): (WebCore::LibWebRTCProviderCocoa::setActive):

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

4:41 PM Changeset in webkit [267860] by Chris Dumez
  • 2 edits in trunk/Tools

[DRT] imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffersourcenode-interface/active-processing.https.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=217187

Reviewed by Eric Carlson.

The test sometimes fails with DRT only because window.AudioWorkletNode does not exist. The thing is that
window.AudioWorkletNode only exists in secure contexts. DumpRenderTree::resetWebViewToConsistentState()
was calling [WebFrame globalContext] before each test, which would eagerly create the Window JS wrapper
if it did not exist yet. Because the wrapper would get created too early, its security origin upon
creation was null and we would decide NOT to expose window.AudioWorkletNode.

To address the issue, I updated DumpRenderTree::resetWebViewToConsistentState() to only call
WebCoreTestSupport::resetInternalsObject([mainFrame globalContext]) after each test, instead of doing
it both before AND after. This new behavior is also more consistent with WebKitTestRunner.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebViewToConsistentState):
(runTest):

4:21 PM Changeset in webkit [267859] by Chris Dumez
  • 61 edits
    12 copies
    4 adds in trunk

Add basic infrastructure for AudioWorklet
https://bugs.webkit.org/show_bug.cgi?id=217153

Reviewed by Sam Weinig.

Source/WebCore:

Add basic infrastructure for AudioWorklet:

In particular, this adds a partial but spec-compliant implementation of
Worklet.addModule(), as per:

When Worklet.addModule() is called, we create a AudioWorket thread and
a AudioWorkletGlobalScope with its VM. We then ask the AudioWorkletGlobalScope
to fetch and invoke the worklet script. Note that AudioWorkletGlobalScope
does NOT fetch or invoke the worklet script yet to reduce patch size.

Calling Worklet.addModule() activates the AudioWorklet and causes audio rendering
to occur on the AudioWorkletThread.

A few important things that are still missing in this patch:

  • Fetching & invoking worklet scripts
  • Pretty much all API exposed to AudioWorkletGlobalScopes
  • AudioWorkletProcessor support

No new tests, no Web-facing behavior change yet.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:

Add new files to projets.

  • Modules/webaudio/AudioWorklet.cpp:

(WebCore::AudioWorklet::create):
(WebCore::AudioWorklet::AudioWorklet):
(WebCore::AudioWorklet::createGlobalScopes):
(WebCore::AudioWorklet::proxy const):

  • Modules/webaudio/AudioWorklet.h:

When the Worklet needs to create a GlobalScope, AudioWorklet takes care of creating a AudioWorkletMessagingProxy.
The AudioWorkletMessagingProxy starts the AudioWorkletThread, which creates the AudioWorkletGlobalScope.
AudioWorkletMessagingProxy takes care of posting tasks from the main thread to the AudioWorkletThread as well.

  • Modules/webaudio/AudioWorkletGlobalScope.cpp: Added.
  • Modules/webaudio/AudioWorkletGlobalScope.h: Added.
  • Modules/webaudio/AudioWorkletGlobalScope.idl: Added.

Add basic implementation for AudioWorkletGlobalScope:

None of the Web API is exposed on the AudioWorkletGlobalScope yet.

  • Modules/webaudio/AudioWorkletMessagingProxy.cpp: Added.
  • Modules/webaudio/AudioWorkletMessagingProxy.h: Added.

Add new AudioWorkletMessagingProxy class (Similar to WorkerMessagingProxy) which starts to AudioWorkletThread
(which constructs the AudioWorkletGlobalScope on that thread) and takes care of posting tasks from the main
thread to the AudioWorkletThread.

  • Modules/webaudio/AudioWorkletThread.cpp: Added.
  • Modules/webaudio/AudioWorkletThread.h: Added.

Add new class which wraps the AudioThread used by AudioWorkets.

  • Modules/webaudio/BaseAudioContext.cpp:

(WebCore::BaseAudioContext::BaseAudioContext):
Pass document when constructing the AudioWorklet since it is now an ActiveDOMObject.

  • Modules/webaudio/DefaultAudioDestinationNode.cpp:

(WebCore::DefaultAudioDestinationNode::enableInput):
(WebCore::Function<void):
(WebCore::DefaultAudioDestinationNode::startRendering):
(WebCore::DefaultAudioDestinationNode::resume):
(WebCore::DefaultAudioDestinationNode::setChannelCount):

  • Modules/webaudio/DefaultAudioDestinationNode.h:

If AudioWorklet is active, pass a function to AudioDestination::start() that dispatches to the
AudioWorkletThread, so that the AudioDestination can do rendering on the AudioWorkletThead instead
of the device's rendering thread.

  • Modules/webaudio/OfflineAudioDestinationNode.cpp:

(WebCore::OfflineAudioDestinationNode::startRendering):
If AudioWorklet is active, use the AudioWorklet's AudioWorkletThread instead of a new audio thread
to do the offline rendering.

  • bindings/js/WebCoreBuiltinNames.h:

Add AudioWorkletGlobalScope since it is exposed conditionally at runtime to AudioWorkets.

  • bindings/js/WebCoreJSClientData.cpp:

(WebCore::JSVMClientData::JSVMClientData):

  • bindings/js/WebCoreJSClientData.h:

Add code to support AudioWorkletGlobalScope as a GlobalScope in our JS bindings.

  • bindings/js/WorkerScriptController.h:

We now subclass WorkerOrWorkletScriptController interface. This allows WorkletScriptController
to reuse WorkerRunLoop.

  • bindings/scripts/CodeGeneratorJS.pm:

(ShouldUseGlobalObjectPrototype):

  • bindings/scripts/preprocess-idls.pl:

Add support for AudioWorkletGlobalScope as global scope in our JS bindings.

  • css/DOMCSSPaintWorklet.cpp:

(WebCore::PaintWorklet::addModule):
(WebCore::PaintWorklet::createGlobalScopes):

  • css/DOMCSSPaintWorklet.h:
  • dom/Document.cpp:

(WebCore::Document::ensurePaintWorklet):
Update PaintWorklet code so that it keeps building.

  • platform/MediaStrategy.h:
  • platform/audio/AudioDestination.h:

Make AudioDestination ThreadSafeRefCounted so that it can keep itself alive
when dispatching to the AudioWorkletThread for rendering.

  • platform/audio/cocoa/AudioDestinationCocoa.cpp:

(WebCore::AudioDestination::create):
(WebCore::AudioDestinationCocoa::start):
(WebCore::AudioDestinationCocoa::stop):
(WebCore::AudioDestinationCocoa::setIsPlaying):
(WebCore::AudioDestinationCocoa::render):
(WebCore::AudioDestinationCocoa::renderOnRenderingThead):

  • platform/audio/cocoa/AudioDestinationCocoa.h:

When we get a request to render audio, we now use the function provided by
the DefaultAudioDestinationNode to dispatch to the AudioWorkletThread when
needed (AudioWorklet is active) before doing the rendering.

  • platform/audio/gstreamer/AudioDestinationGStreamer.cpp:

(WebCore::AudioDestinationGStreamer::start):

  • platform/audio/gstreamer/AudioDestinationGStreamer.h:
  • platform/mock/MockAudioDestinationCocoa.cpp:

(WebCore::MockAudioDestinationCocoa::start):

  • platform/mock/MockAudioDestinationCocoa.h:

Update code so that it keeps building.

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::underlyingThread const):

  • workers/WorkerGlobalScope.h:
  • workers/WorkerOrWorkletGlobalScope.h: Added.
  • workers/WorkerOrWorkletScriptController.h: Added.

Add new interfaces that are subclassed by Worker and Worklet implementation
classes in order to promote code sharing.

  • workers/WorkerRunLoop.cpp:
  • workers/WorkerRunLoop.h:

Update WorkerRunLoop to use WorkerOrWorkletGlobalScope so that it can be
reused by AudioWorkletThread.

  • worklets/Worklet.cpp:

(WebCore::Worklet::Worklet):
(WebCore::Worklet::document):
(WebCore::Worklet::addModule):
(WebCore::Worklet::finishPendingTasks):
(WebCore::Worklet::activeDOMObjectName const):

  • worklets/Worklet.h:

(WebCore::Worklet::proxies const):

  • worklets/Worklet.idl:

Add initial implementation for addModule():

Make Worklet an ActiveDOMObject since it needs to resolve a JS promise asynchronously.

  • worklets/WorkletGlobalScope.cpp:

(WebCore::WorkletGlobalScope::WorkletGlobalScope):
(WebCore::WorkletGlobalScope::evaluate):
(WebCore::WorkletGlobalScope::completeURL const):
(WebCore::WorkletGlobalScope::fetchAndInvokeScript):

  • worklets/WorkletGlobalScope.h:

(WebCore::WorkletGlobalScope::isAudioWorkletGlobalScope const):

  • worklets/WorkletGlobalScope.idl:

Update WorkletGlobalScope so that it can be subclassed by AudioWorkletGlobalScope and not
be PaintWorklet-specific.

  • worklets/WorkletGlobalScopeProxy.h: Added.

Add WorkletGlobalScopeProxy interface to interact with the WorkletGlobalScope interface.
The purpose of this class is to post tasks to the WorkletGlobalScope, abstracting away
potential threading complexity. Note that AudioWorkets use threading while PaintWorklets
do not.

  • worklets/WorkletPendingTasks.cpp: Added.

(WebCore::WorkletPendingTasks::WorkletPendingTasks):
(WebCore::WorkletPendingTasks::abort):
(WebCore::WorkletPendingTasks::decrementCounter):

  • worklets/WorkletPendingTasks.h: Added.

(WebCore::WorkletPendingTasks::create):
Add implementation for:

While it is not strictly needed right for AudioWorklet (because there is always a single
WorkletGlobalScope), it will be needed once we have proper support for PaintWorklets.
PaintWorklets can have several WorkletGlobalScopes. In the mean time, it allows us to
have code that matches the specification text more closely.

  • worklets/WorkletScriptController.cpp:

(WebCore::WorkletScriptController::WorkletScriptController):
(WebCore::WorkletScriptController::initScript):
(WebCore::WorkletScriptController::releaseHeapAccess):
(WebCore::WorkletScriptController::acquireHeapAccess):
(WebCore::WorkletScriptController::addTimerSetNotification):
(WebCore::WorkletScriptController::removeTimerSetNotification):
(WebCore::WorkletScriptController::scheduleExecutionTermination):
(WebCore::WorkletScriptController::isTerminatingExecution const):

  • worklets/WorkletScriptController.h:

Update WorkletScriptController so that it can be used by AudioWorklets and not just
PaintWorklets.

Source/WebKit:

Update RemoteAudioDestinationProxy to match what was done in AudioDestinationCocoa.
RemoteAudioDestinationProxy is used when the GPU process is enabled.

  • GPUProcess/media/RemoteAudioDestinationManager.cpp:

(WebKit::RemoteAudioDestination::start):

  • WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:

(WebKit::RemoteAudioDestinationProxy::create):
(WebKit::RemoteAudioDestinationProxy::start):
(WebKit::RemoteAudioDestinationProxy::stop):
(WebKit::RemoteAudioDestinationProxy::renderBuffer):

  • WebProcess/GPU/media/RemoteAudioDestinationProxy.h:
  • WebProcess/GPU/media/WebMediaStrategy.cpp:

(WebKit::WebMediaStrategy::createAudioDestination):

  • WebProcess/GPU/media/WebMediaStrategy.h:

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebPlatformStrategies.mm:

Source/WebKitLegacy/win:

  • WebCoreSupport/WebPlatformStrategies.cpp:
4:12 PM Changeset in webkit [267858] by don.olmstead@sony.com
  • 18 edits in trunk/Source

Non-unified build fixes, early October 2020 edition
https://bugs.webkit.org/show_bug.cgi?id=217165

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

  • llint/LLIntEntrypoint.h:
  • llint/LLIntSlowPaths.cpp:

Source/WebCore:

  • css/parser/CSSSelectorParser.cpp:
  • display/DisplayTreeBuilder.h:
  • display/DisplayView.cpp:
  • editing/TextManipulationController.cpp:
  • layout/flexformatting/FlexFormattingContext.cpp:
  • layout/flexformatting/FlexFormattingContextGeometry.cpp:
  • layout/inlineformatting/InlineLine.cpp:
  • layout/integration/LayoutIntegrationCoverage.cpp:
  • layout/integration/LayoutIntegrationCoverage.h:
  • platform/graphics/displaylists/DisplayListItems.cpp:
  • platform/graphics/displaylists/DisplayListRecorder.cpp:

Source/WebKit:

  • WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h:
  • WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.cpp:
4:10 PM Changeset in webkit [267857] by don.olmstead@sony.com
  • 2 edits in trunk/Source/WebCore

[PlayStation] Fix build break after r267753
https://bugs.webkit.org/show_bug.cgi?id=217188

Reviewed by Fujii Hironori.

After r267753 the PlayStation builds started failing with an error around a structured
binding declaration of a tuple type.

No new tests. No change in behavior.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::handleDuplicateIndexIDs):

3:40 PM Changeset in webkit [267856] by Karl Rackler
  • 2 edits in trunk/LayoutTests

REGRESSION (r267814): [ Mojave+ release wk2 ] inspector/console/queryHolders.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=217193

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:40 PM Changeset in webkit [267855] by Peng Liu
  • 2 edits in trunk/Source/WebCore

Handle deprecation warnings from libwebrtc headers
https://bugs.webkit.org/show_bug.cgi?id=217126

Reviewed by Tim Horton.

(A follow-up patch) Disable deprecation warnings coming from libwebrtc headers.

  • Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.h:
3:18 PM Changeset in webkit [267854] by msaboff@apple.com
  • 2 edits in trunk/LayoutTests

[macOS/iOS WK2] storage/indexeddb/IDBKey-create-array-buffer-view-oom.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=216960

Reviewed by Saam Barati.

Speculative fix to stop the test from timing out.

  • storage/indexeddb/IDBKey-create-array-buffer-view-oom.html:
2:52 PM Changeset in webkit [267853] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitscmpy] Support git-svn committers
https://bugs.webkit.org/show_bug.cgi?id=217151
<rdar://problem/69812996>

Rubber-stamped by Aakash Jain.

  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Bump version number.
  • Scripts/libraries/webkitscmpy/webkitscmpy/contributor.py:

(Contributor):
(Contributor.from_scm_log): Handle case where a commit does not contain an author.

  • Scripts/libraries/webkitscmpy/webkitscmpy/test/contributor_unittest.py:

(TestContributor):
(TestContributor.test_git_no_author):
(TestContributor.test_git_svn_no_author):

2:20 PM Changeset in webkit [267852] by Lauro Moura
  • 2 edits in trunk/LayoutTests

[GLib] Garden webaudio/Convolver/unmmodified-buffer.html flakiness

Unreviewed test gardening.

  • platform/glib/TestExpectations:
1:47 PM Changeset in webkit [267851] by aakash_jain@apple.com
  • 4 edits in trunk/Tools

[build.webkit.org] Rename type to factory in config.json
https://bugs.webkit.org/show_bug.cgi?id=217127

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/build.webkit.org-config/config.json:
  • BuildSlaveSupport/build.webkit.org-config/loadConfig.py:

(loadBuilderConfig):

  • BuildSlaveSupport/build.webkit.org-config/loadConfig_unittest.py:
1:22 PM Changeset in webkit [267850] by weinig@apple.com
  • 2 edits in trunk/Source/WebKitLegacy/mac

Remove duplicate definitions of @property (nonatomic) BOOL CSSIndividualTransformPropertiesEnabled
https://bugs.webkit.org/show_bug.cgi?id=217182

Reviewed by Alex Christensen.

When the fix for ​https://webkit.org/b/216271 was landed, it added two definitions of
the CSSIndividualTransformPropertiesEnabled property (though one getter was misnamed), leading
to linker warnings. This removes one of them.

  • WebView/WebPreferences.mm:

(-[WebPreferences cssIndividualTransformPropertiesEnabled]): Deleted.

1:05 PM Changeset in webkit [267849] by Truitt Savell
  • 11 edits
    1 delete in trunk

Unreviewed, reverting r267841.

Broke Catalina Builds

Reverted changeset:

"Add AVAssetWriter SPI header"
https://bugs.webkit.org/show_bug.cgi?id=217169
https://trac.webkit.org/changeset/267841

1:01 PM Changeset in webkit [267848] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION(r267249): Crash in WebPage::updatePreferences() when libwebrtc is not available.
https://bugs.webkit.org/show_bug.cgi?id=217186
<rdar://problem/69817170>

Reviewed by Eric Carlson.

Always check for the presence of libwebrtc before calling into it.

  • platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:

(WebCore::LibWebRTCProvider::setH264HardwareEncoderAllowed):
(WebCore::LibWebRTCProviderCocoa::createDecoderFactory):
(WebCore::LibWebRTCProviderCocoa::createEncoderFactory):
(WebCore::LibWebRTCProviderCocoa::setActive):

12:59 PM Changeset in webkit [267847] by Antti Koivisto
  • 6 edits in trunk/Source/WebCore

[LFC][Integration] Partially convert Position::inlineBoxAndOffset to use iterator
https://bugs.webkit.org/show_bug.cgi?id=217180

Reviewed by Zalan Bujtas.

This still forces the legacy path as the return type currently requires it.

  • dom/Position.cpp:

(WebCore::searchAheadForBetterMatch):
(WebCore::Position::inlineBoxAndOffset const):

  • layout/integration/LayoutIntegrationRunIterator.cpp:

(WebCore::LayoutIntegration::RunIterator::nextOnLine const):
(WebCore::LayoutIntegration::TextRunIterator::traverseNextTextRun):
(WebCore::LayoutIntegration::lineLayoutSystemFlowForRenderer):
(WebCore::LayoutIntegration::runFor):
(WebCore::LayoutIntegration::TextRunIterator::traverseNextTextRunInVisualOrder): Deleted.

  • layout/integration/LayoutIntegrationRunIterator.h:

(WebCore::LayoutIntegration::TextRunIterator::operator++):
(WebCore::LayoutIntegration::TextRunIterator::nextTextRun const):
(WebCore::LayoutIntegration::TextRunIterator::nextTextRunInTextOrder const):

  • layout/integration/LayoutIntegrationRunIteratorLegacyPath.h:

(WebCore::LayoutIntegration::LegacyPath::traverseNextTextRun):
(WebCore::LayoutIntegration::LegacyPath::traverseNextTextRunInVisualOrder): Deleted.

  • layout/integration/LayoutIntegrationRunIteratorModernPath.h:

(WebCore::LayoutIntegration::ModernPath::traverseNextTextRun):
(WebCore::LayoutIntegration::ModernPath::traverseNextTextRunInTextOrder):
(WebCore::LayoutIntegration::ModernPath::traverseNextTextRunInVisualOrder): Deleted.

11:52 AM Changeset in webkit [267846] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

stress/put-private-name-invalid-define.js.ftl-eager is getting flaky failure
https://bugs.webkit.org/show_bug.cgi?id=217164

Reviewed by Mark Lam.

JIT operations need to use JITOperationPrologueCallFrameTracer to configure top call frame correctly.
But putById private field JIT operations miss them or use wrong frame tracer. Since we are not setting top frame correctly,
exception object creation from this JIT operations can be broken, and leading to stress/put-private-name-invalid-define.js.ftl-eager crash.
This patch configures top call frame via JITOperationPrologueCallFrameTracer appropriately.

  • jit/JITOperations.cpp:
11:32 AM Changeset in webkit [267845] by Aditya Keerthi
  • 2 edits in trunk/Source/WebKitLegacy/mac

[macCatalyst] Crash when attempting to display a select dropdown in a UIWebView
https://bugs.webkit.org/show_bug.cgi?id=217148
<rdar://problem/64004677>

Reviewed by Darin Adler.

When clicking on a select element in a Catalyst UIWebView, WebKit calls
into UIKit to present a popover. On Catalyst, UIKit popovers call
resignFirstResponder on the current first responder, when presented.
Consequently, when an attempt to display the select dropdown is made,
[WebHTMLView resignFirstResponder] is invoked. This method blurs the
currently focused element, which tells UIKit to destroy the popover.
Destroying the popover while its attempting to become first responder
is not safe, leading to a crash.

In [WebHTMLView resignFirstResponder], clearFocus is only called if
[WebView _isPerformingProgrammaticFocus] is false. UIKit can take
advantage of this to prevent blurring an element if the first
responder is being resigned due to presenting a view associated with
the same element.

However, [WebHTMLView resignFirstResponder] also clears focus on the
current page's FocusController, which can also cause the element to be
blurred. To prevent this, guard the call on the same check as
clearFocus.

Note that this approach to preventing resignFirstResponder from blurring
the focused element is similar to the approach taken in WebKit2.

This change is made for all Cocoa platforms, since _isPerformingProgrammaticFocus
is internal to WebKit and the only time it is true is within a call to
WebChromeClient::makeFirstResponder. That method calls
[WebUIDelegate webView:makeFirstResponder], which states in its
documentation: "responder will always be a view that is in the view
subhierarchy of the top-level web view for this WebView". Consequently,
nextResponderIsInWebView will be true when _isPerformingProgrammaticFocus
is true, meaning the change doesn't affect existing behavior.

No new tests as the functionality is dependent on a UIKit change.

  • WebView/WebHTMLView.mm:

(-[WebHTMLView resignFirstResponder]):

11:28 AM Changeset in webkit [267844] by eric.carlson@apple.com
  • 10 edits
    1 add in trunk

Prevent media capture unless the application has correct data for system permission prompt
https://bugs.webkit.org/show_bug.cgi?id=217104
<rdar://problem/69761929>

Reviewed by Darin Adler.

Source/WebKit:

Tested manually with MiniBrowser.

  • SourcesCocoa.txt:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::requestAVCaptureAccessForMediaType): Renamed from requestAccessForMediaType.
(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest): Deny
requests of the application is not permitted to capture. Restructure logic to
make it easier to understand.
(WebKit::requestAccessForMediaType): Deleted.

  • UIProcess/Cocoa/UserMediaPermissionRequestManagerProxy.mm: Added.

(WebKit::UserMediaPermissionRequestManagerProxy::permittedToCaptureAudio): Check
for required Info.plist string.
(WebKit::UserMediaPermissionRequestManagerProxy::permittedToCaptureVideo): Ditto.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm: Update for unified build.
  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::permittedToCaptureAudio):
(WebKit::UserMediaPermissionRequestManagerProxy::permittedToCaptureVideo):

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • WebKit.xcodeproj/project.pbxproj:

Tools:

  • MiniBrowser/mac/Info.plist: Add necessary entitlements and usage strings.
  • MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.m:

(-[WebViewController createWebView]): Setting the private capture preference is
not necessary because we set configuration._mediaCaptureEnabled.

11:23 AM Changeset in webkit [267843] by Karl Rackler
  • 2 edits in trunk/LayoutTests

[ iOS 13 wk2 ews ]: 2 in-app-browser-privacy and 1 WPT are constant failures slowing down ews
https://bugs.webkit.org/show_bug.cgi?id=217184

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
10:42 AM Changeset in webkit [267842] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

REGRESSION(r267781): ASSERTION FAILED: Optional.h(525) : T *WTF::Optional<WebCore::Layout::LineRun::Text>::operator->() on 16 fast/layoutformattingcontext/* tests
https://bugs.webkit.org/show_bug.cgi?id=217143

Reviewed by Zalan Bujtas.

Need to test the Optional<> text() in dumping code.

  • display/css/DisplayTextBox.cpp:

(WebCore::Display::TextBox::debugDescription const):

10:28 AM Changeset in webkit [267841] by youenn@apple.com
  • 11 edits
    1 add in trunk

Add AVAssetWriter SPI header
https://bugs.webkit.org/show_bug.cgi?id=217169
<rdar://problem/69793050>

Reviewed by Eric Carlson.

Source/WebCore:

No change of behavior, include SPI header instead of private SDK header.

  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/spi/cocoa/AVAssetWriterSPI.h: Added.

Source/WTF:

  • wtf/PlatformHave.h:

Remove dependency on AVAssetWriter_private.h

LayoutTests:

Enable tests by default on Catalina+, disable them on Mojave and WK1.
Disable tests for iOS13.

  • TestExpectations:
  • platform/ios-13/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/mac-wk1/TestExpectations:
10:26 AM Changeset in webkit [267840] by Peng Liu
  • 6 edits
    1 delete in trunk/Source/WebKit

[Media in GPU Process] Enable IPC message handlers of RemoteAudioSession
https://bugs.webkit.org/show_bug.cgi?id=217144

Reviewed by Jer Noble.

This patch enables the RemoteAudioSession in the Web process to handle
IPC messages from the GPU process. It also fixes a bug preventing the
audio playback to start.

No new tests, no functional change.

  • GPUProcess/media/RemoteAudioSessionProxyManager.cpp:

(WebKit::RemoteAudioSessionProxyManager::tryToSetActiveForProcess):
Don't interrupt the audio session trying to start.

  • GPUProcess/media/RemoteAudioSessionProxyManager.messages.in: Removed.
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::dispatchMessage): Clean-up.

  • WebProcess/GPU/media/RemoteAudioSession.cpp:

(WebKit::RemoteAudioSession::RemoteAudioSession):
(WebKit::RemoteAudioSession::~RemoteAudioSession):
We need to remove the "destinationID" parameter, otherwise, RemoteAudioSession
won't receive the IPC messages.

  • WebProcess/GPU/media/RemoteAudioSession.h: Clean-up.
  • WebProcess/GPU/media/WebMediaStrategy.h: Clean-up.
10:20 AM Changeset in webkit [267839] by youenn@apple.com
  • 4 edits
    2 adds in trunk

RealtimeMediaSource should ignore ideal values outside the min/max range
https://bugs.webkit.org/show_bug.cgi?id=217178

Reviewed by Eric Carlson.

Source/WebCore:

Make valueForDiscreteCapabilityValues returns an Optional in case no valid value can be selected from the constraint.
This basically means the constraint will be ignored.
Before the patch, in case of no valid value, 0 will be set, which is a bad value for sample rate.

Test: fast/mediastream/audio-bad-sampleRate.html

  • platform/mediastream/MediaConstraints.h:

(WebCore::NumericConstraint::valueForDiscreteCapabilityValues const):

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::applyNumericConstraint):

LayoutTests:

  • fast/mediastream/audio-bad-sampleRate-expected.txt: Added.
  • fast/mediastream/audio-bad-sampleRate.html: Added.
10:07 AM Changeset in webkit [267838] by youenn@apple.com
  • 6 edits
    2 adds in trunk

getUserMedia with sampleRate constraints may fail
https://bugs.webkit.org/show_bug.cgi?id=217147
<rdar://problem/69831144>

Reviewed by Eric Carlson.

In case of new capture, make sure to reset sample rate and volume to default values.
This ensures that a sample rate that will fail the capture will not stick for other pages.
Manually tested.

  • platform/mediastream/mac/BaseAudioSharedUnit.cpp:

(WebCore::BaseAudioSharedUnit::prepareForNewCapture):

10:05 AM Changeset in webkit [267837] by achristensen@apple.com
  • 12 edits in trunk

Non-special URLs are not idempotent
https://bugs.webkit.org/show_bug.cgi?id=215762

Reviewed by Tim Horton.

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/url-constructor-expected.txt:
  • web-platform-tests/url/url-setters-expected.txt:

Source/WTF:

https://github.com/whatwg/url/pull/505 added an interesting edge case to the URL serialization:
"If url’s host is null, url’s path’s size is greater than 1, and url’s path[0] is the empty string, then append U+002F (/) followed by U+002E (.) to output."
The problem was that URLs like "a:/a/..//a" would be parsed into "a://a" with a pathname of "a" and an empty host. If "a://a" was then reparsed, it would again have an href of "a://a"
but its host would be "a" and it would have an empty path. There is consensus that URL parsing should be idempotent, so we need to do something different here.
According to https://github.com/whatwg/url/issues/415#issuecomment-419197290 this follows what Edge did (and then subsequently abandoned when they switched to Chromium)
to make URL parsing idempotent by adding "/." before the path in the edge case of a URL with a non-special scheme (not http, https, wss, etc.) and a null host and a non-empty path that
has an empty first segment. All the members of the URL remain unchanged except the full serialization (href). This is not important in practice, but important in theory.

Our URL parser tries very hard to use the exact same WTF::String object given as input if it can. However, this step is better implemented as a post-processing step that will almost never happen
because otherwise we would have to parse the entire path twice to find out if we need to add "./" or if the "./" that may have already been there needs to stay. This is illustrated with the test URL
"t:/.//p/../../../..//x" which does need the "./".

In the common case, this adds one well-predicted branch to URL parsing, so I expect performance to be unaffected. Since this is such a rare edge case of URLs, I expect no compatibility problems.

  • wtf/URL.cpp:

(WTF::URL::pathStart const):

  • wtf/URL.h:

(WTF::URL::pathStart const): Deleted.

  • wtf/URLParser.cpp:

(WTF::URLParser::copyURLPartsUntil):
(WTF::URLParser::URLParser):
(WTF::URLParser::needsNonSpecialDotSlash const):
(WTF::URLParser::addNonSpecialDotSlash):

  • wtf/URLParser.h:

Tools:

  • TestWebKitAPI/Tests/WTF/URLParser.cpp:

(TestWebKitAPI::TEST_F):

10:03 AM Changeset in webkit [267836] by youenn@apple.com
  • 3 edits in trunk/LayoutTests

http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=217171
<rdar://problem/65085139>

Reviewed by Eric Carlson.

  • http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html:

Setting the video currentTime too close to the end makes it render transparent frames.
Make it so that we try using the middle of the video content where we expect green content.

8:29 AM EarlyWarningSystem edited by aakash_jain@apple.com
(diff)
8:05 AM Changeset in webkit [267835] by Adrian Perez de Castro
  • 3 edits in trunk/Source/WebCore

Unreviewed. Add missing guard around ModernPath usage.

No new tests needed.

  • layout/integration/LayoutIntegrationRunIterator.cpp: Add ENABLE(LAYOUT_FORMATTING_CONTEXT)

guard around usage of the ModernPath type.

  • layout/integration/LayoutIntegrationRunIterator.h: Ditto.
7:41 AM Changeset in webkit [267834] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Remove redundant "needs hyphen" flag from LineContent::PartialContent
https://bugs.webkit.org/show_bug.cgi?id=217155

Reviewed by Antti Koivisto.

The last run already had this information. This is also in preparation for adding support for soft-hyphen where
the run with the hyphen is not partial at all.
(This patch also changes Optional<size_t> partialContentLength to just size_t. Optional<> may suggest that 0 is a valid overflow length.)

  • display/css/DisplayTextBox.cpp:

(WebCore::Display::TextBox::debugDescription const):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::lineLayout):

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::layoutInlineContent):
(WebCore::Layout::LineBuilder::placeInlineContent):
(WebCore::Layout::LineBuilder::close):
(WebCore::Layout::LineBuilder::nextContentForLine):
(WebCore::Layout::LineBuilder::handleFloatsAndInlineContent):

  • layout/inlineformatting/InlineLineBuilder.h:
7:09 AM Changeset in webkit [267833] by youenn@apple.com
  • 15 edits in trunk

MediaRecorder should support MediaRecorderOptions.mimeType
https://bugs.webkit.org/show_bug.cgi?id=215018
<rdar://problem/66681508>

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/mediacapture-record/MediaRecorder-mimetype-expected.txt:

Source/WebCore:

Instead of setting mime type right away, set it just before firing start event as per spec.
This will allow in the future to populate exact codec parameters if proven useful.

Covered by rebased and updated tests.

  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::MediaRecorder::create):
(WebCore::MediaRecorder::startRecording):

  • platform/mediarecorder/MediaRecorderPrivate.h:

(WebCore::MediaRecorderPrivate::startRecording):

  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:

Source/WebKit:

Update code to pass mimeType as part of startRecording callback.

  • GPUProcess/webrtc/RemoteMediaRecorder.h:

(WebKit::RemoteMediaRecorder::mimeType const):

  • GPUProcess/webrtc/RemoteMediaRecorderManager.cpp:

(WebKit::RemoteMediaRecorderManager::createRecorder):

  • GPUProcess/webrtc/RemoteMediaRecorderManager.h:
  • GPUProcess/webrtc/RemoteMediaRecorderManager.messages.in:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:

(WebKit::MediaRecorderPrivate::startRecording):

  • WebProcess/GPU/webrtc/MediaRecorderPrivate.h:

LayoutTests:

Update test to expect setting of the mime type after start event.

  • http/wpt/mediarecorder/mimeType.html:
5:33 AM Changeset in webkit [267832] by Andres Gonzalez
  • 8 edits in trunk

Make AXLoadingEvent notifications asynchronous.
https://bugs.webkit.org/show_bug.cgi?id=217157

Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/loading-iframe-sends-notification-expected.html.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::frameLoadingEventNotification):
Removed the isolated tree update from the frame loading notification
handler. This avoids updating the isolated tree synchronously.

  • accessibility/AXObjectCache.h:

Added AXNotification::AXFrameLoadComplete.

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::updateChildren):

  • accessibility/mac/AXObjectCacheMac.mm:

(WebCore::AXPostNotificationWithUserInfo):
Do not ignore AXLoadCompleteNotifications during LayoutTest.

(WebCore::AXObjectCache::postPlatformNotification):
Handle AXFrameLoadComplete notification as a AXLoadComplete notification.

(WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
Loading finished event is now mapped to either AXLoadComplete or AXFrameLoadComplete.

LayoutTests:

  • accessibility/loading-iframe-sends-notification-expected.txt:
  • accessibility/loading-iframe-sends-notification.html:
5:17 AM Changeset in webkit [267831] by Carlos Garcia Campos
  • 175 edits
    1 copy
    2 moves
    22 adds
    2 deletes in trunk

Unreviewed. Update W3C WebDriver imported tests.

Tools:

  • Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py:

(WebKitDriverProtocol):
(WebDriverW3CExecutor.init):
(WebDriverW3CExecutor.setup):

WebDriverTests:

  • TestExpectations.json:
  • imported/w3c/importer.json:
  • imported/w3c/tools/webdriver/:
  • imported/w3c/tools/wptrunner/:
  • imported/w3c/webdriver/:
5:16 AM Changeset in webkit [267830] by Antti Koivisto
  • 7 edits in trunk/Source/WebCore

[LFC][Integration] Add LineRunIterator
https://bugs.webkit.org/show_bug.cgi?id=217125

Reviewed by Zalan Bujtas.

Add LineRunIterator iterating line content.
Also remove end offset from modern path, instead set index to the content end position
in traversal functions.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::textRunsFor const):
(WebCore::LayoutIntegration::LineLayout::runFor const):

  • layout/integration/LayoutIntegrationRunIterator.cpp:

(WebCore::LayoutIntegration::TextRunIterator::traverseNextTextRunInVisualOrder):
(WebCore::LayoutIntegration::TextRunIterator::traverseNextTextRunInTextOrder):
(WebCore::LayoutIntegration::LineRunIterator::LineRunIterator):
(WebCore::LayoutIntegration::LineRunIterator::traverseNextOnLine):
(WebCore::LayoutIntegration::lineRun):
(WebCore::LayoutIntegration::RunIterator::traverseNextTextRunInVisualOrder): Deleted.
(WebCore::LayoutIntegration::RunIterator::traverseNextTextRunInTextOrder): Deleted.

  • layout/integration/LayoutIntegrationRunIterator.h:

(WebCore::LayoutIntegration::TextRun::legacyInlineBox const):
(WebCore::LayoutIntegration::LineRunIterator::LineRunIterator):
(WebCore::LayoutIntegration::LineRunIterator::operator++):
(WebCore::LayoutIntegration::Run::legacyInlineBox const):

  • layout/integration/LayoutIntegrationRunIteratorLegacyPath.h:

(WebCore::LayoutIntegration::LegacyPath::traverseNextOnLine):
(WebCore::LayoutIntegration::LegacyPath::legacyInlineBox const):

  • layout/integration/LayoutIntegrationRunIteratorModernPath.h:

(WebCore::LayoutIntegration::ModernPath::ModernPath):
(WebCore::LayoutIntegration::ModernPath::isLastTextRunOnLine const):
(WebCore::LayoutIntegration::ModernPath::isLastTextRun const):
(WebCore::LayoutIntegration::ModernPath::traverseNextTextRunInVisualOrder):
(WebCore::LayoutIntegration::ModernPath::traverseNextTextRunInTextOrder):
(WebCore::LayoutIntegration::ModernPath::traverseNextOnLine):
(WebCore::LayoutIntegration::ModernPath::atEnd const):
(WebCore::LayoutIntegration::ModernPath::legacyInlineBox const):
(WebCore::LayoutIntegration::ModernPath::setAtEnd):

4:32 AM Changeset in webkit [267829] by svillar@igalia.com
  • 9 edits in trunk

[css-flexbox] Implement row-gap and column-gap for flex layout
https://bugs.webkit.org/show_bug.cgi?id=206767

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-flexbox/gap-017-expected.txt: Replaced FAIL by PASS expectation.

Source/WebCore:

Implement row/column-gap for flexboxes which allow authors to define gutters between flex items and also between flex lines.

Inspired by Blink's crrev.com/c/2162149 and crrev.com/c/2172758 by <dgrogan@chromium.org>

  • rendering/FlexibleBoxAlgorithm.cpp:

(WebCore::FlexLayoutAlgorithm::FlexLayoutAlgorithm): Takes two new parameters with row/column gap lengths.
(WebCore::FlexLayoutAlgorithm::computeNextFlexLine): Add gaps to hypothetical and flex base sizes in between items.

  • rendering/FlexibleBoxAlgorithm.h: Added two new attributes to store gaps.
  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths const): Add gaps to the intrinsic width.
(WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): Take gap between lines as argument.
(WebCore::RenderFlexibleBox::layoutFlexItems): Take gap between lines as argument.
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Compute gaps to reduce the remaining free space.
(WebCore::RenderFlexibleBox::alignFlexLines): Add gap between lines to the line offset.
(WebCore::RenderFlexibleBox::computeGap const): Returns either the row-gap or the column-gap depending on the flex direction.

  • rendering/RenderFlexibleBox.h:

LayoutTests:

4:25 AM Changeset in webkit [267828] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

[iOS] MediaRecorder incorrect screen orientation handling
https://bugs.webkit.org/show_bug.cgi?id=198912
<rdar://problem/51802521>

Reviewed by Eric Carlson.

We were setting the transform to the writer input too soon.
Buffer the transform when receiving the first frame and set it at creation of the writer input.

Covered by http/wpt/mediarecorder/video-rotation.html now actually passing.

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

(WebCore::MediaRecorderPrivateWriter::startAssetWriter):
(WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):

4:03 AM Changeset in webkit [267827] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Define Array#sort's implementation functions as globalPrivate
https://bugs.webkit.org/show_bug.cgi?id=217168

Reviewed by Ross Kirsling.

Now, these Array#sort's implementation functions are not capturing any heap variables. So we can make them @globalPrivate,
this avoids function allocations in LLInt / Baseline / DFG in Array#sort.

  • builtins/ArrayPrototype.js:

(globalPrivate.sortMin):
(globalPrivate.sortStringComparator):
(globalPrivate.sortCompact):
(globalPrivate.sortCommit):
(globalPrivate.sortMerge):
(globalPrivate.sortMergeSort):
(globalPrivate.sortBucketSort):
(sort):
(sort.min): Deleted.
(sort.stringComparator): Deleted.
(sort.compact): Deleted.
(sort.commit): Deleted.
(sort.merge): Deleted.
(sort.mergeSort): Deleted.
(sort.bucketSort): Deleted.

3:51 AM Changeset in webkit [267826] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Do not use std::function in setPrivateField and definePrivateField
https://bugs.webkit.org/show_bug.cgi?id=217167

Reviewed by Ross Kirsling.

std::function can potentially allocate an object in heap. We should should just pass lambda with a templatized parameter instead.

  • jit/JITOperations.cpp:

(JSC::setPrivateField):
(JSC::definePrivateField):

3:38 AM Changeset in webkit [267825] by youenn@apple.com
  • 27 edits
    2 adds in trunk

MediaRecorder should support isTypeSupported
https://bugs.webkit.org/show_bug.cgi?id=216856
LayoutTests/imported/w3c:

Reviewed by Darin Adler.

  • web-platform-tests/mediacapture-record/MediaRecorder-mimetype-expected.txt:
  • web-platform-tests/mediacapture-record/MediaRecorder-peerconnection.https-expected.txt:
  • web-platform-tests/mediacapture-record/idlharness.window-expected.txt:
  • web-platform-tests/mediacapture-record/passthrough/MediaRecorder-passthrough.https-expected.txt:
  • web-platform-tests/mediacapture-record/passthrough/MediaRecorder-passthrough.https.html:

Remove JS console log error line.

Source/WebCore:

<rdar://problem/69767695>

Reviewed by Darin Adler.

Introduce MediaRecorder::isMimeTypeSupported whose result is exposed as MediaRecoder.isTypeSupported.
Cocoa port allows mp4 audio and video mime types, with H264 and AAC codecs.
Add a routine to get the mime type from the MediaRecorderPrivate.
Store it in MediaRecorder and add a mimeType getter.

Test: http/wpt/mediarecorder/mimeType.html

  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::MediaRecorder::isTypeSupported):
(WebCore::MediaRecorder::create):

  • Modules/mediarecorder/MediaRecorder.h:
  • Modules/mediarecorder/MediaRecorder.idl:
  • Modules/mediarecorder/MediaRecorderProvider.cpp:

(WebCore::MediaRecorderProvider::isSupported):

  • Modules/mediarecorder/MediaRecorderProvider.h:
  • platform/mediarecorder/MediaRecorderPrivate.h:
  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:

(WebCore::MediaRecorderPrivateAVFImpl::mimeType const):

  • platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
  • platform/mediarecorder/MediaRecorderPrivateMock.cpp:

(WebCore::MediaRecorderPrivateMock::mimeType const):

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

(WebCore::MediaRecorderPrivateWriter::mimeType const):

  • platform/mediastream/MediaStreamPrivate.h:

Source/WebKit:

<rdar://problem/69767695>

Reviewed by Darin Adler.

Stop passing mimeType for each data blob.
Instead, compute it on WebProcess side.

  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:

(WebKit::RemoteMediaRecorder::fetchData):

  • GPUProcess/webrtc/RemoteMediaRecorder.h:
  • GPUProcess/webrtc/RemoteMediaRecorder.messages.in:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:

(WebKit::MediaRecorderPrivate::MediaRecorderPrivate):
(WebKit::MediaRecorderPrivate::fetchData):
(WebKit::MediaRecorderPrivate::mimeType const):

  • WebProcess/GPU/webrtc/MediaRecorderPrivate.h:

LayoutTests:

Reviewed by Darin Adler.

  • http/wpt/mediarecorder/mimeType-expected.txt: Added.
  • http/wpt/mediarecorder/mimeType.html: Added.
1:10 AM Changeset in webkit [267824] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[Flatpak] Nightly runner requires user interaction
https://bugs.webkit.org/show_bug.cgi?id=217092

Patch by Philippe Normand <pnormand@igalia.com> on 2020-10-01
Reviewed by Carlos Alberto Lopez Perez.

  • Scripts/webkit-flatpak-run-nightly: The most recent version is 0.3 currently, this is the

branch that should be installed. At some point we could add a new option to override this
though.

12:53 AM Changeset in webkit [267823] by sihui_liu@apple.com
  • 5 edits in trunk/Source/WebCore

Drop some unnecessary code in SQLiteIDBBackingStore and IDBServer
https://bugs.webkit.org/show_bug.cgi?id=214992
<rdar://problem/66648514>

Reviewed by Brady Eidson.

No behavior change. Paths of SQLiteIDBBackingStore and IDBServer are only accessed from one thread now, so we
don't need to make isolated copy.

  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::createBackingStore):
(WebCore::IDBServer::IDBServer::getAllDatabaseNamesAndVersions):
(WebCore::IDBServer::IDBServer::removeDatabasesModifiedSinceForVersion):
(WebCore::IDBServer::IDBServer::removeDatabasesWithOriginsForVersion):
(WebCore::IDBServer::IDBServer::renameOrigin):
(WebCore::IDBServer::IDBServer::upgradeFilesIfNecessary):

  • Modules/indexeddb/server/IDBServer.h:

(WebCore::IDBServer::IDBServer::databaseDirectoryPathIsolatedCopy const): Deleted.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::fullDatabaseDirectoryWithUpgrade):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::databaseNameFromEncodedFilename): Deleted.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.h:
12:34 AM Changeset in webkit [267822] by youenn@apple.com
  • 5 edits in trunk

MediaRecorder should allow setting low bit rates for audio
https://bugs.webkit.org/show_bug.cgi?id=216688
<rdar://problem/69129142>

Reviewed by Eric Carlson.

Source/WebCore:

When setting the bitrate provided by the web app fails, we now use default bit rate values that are expected to work properly.
Covered by updated tests.

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

(WebCore::AudioSampleBufferCompressor::setBitsPerSecond):
(WebCore::AudioSampleBufferCompressor::defaultOutputBitRate const):
(WebCore::AudioSampleBufferCompressor::initAudioConverterForSourceFormatDescription):

LayoutTests:

Add more bitrate tests.

  • http/wpt/mediarecorder/MediaRecorder-audio-bitrate.html:
Note: See TracTimeline for information about the timeline view.