Timeline



Jun 10, 2021:

10:29 PM Changeset in webkit [278755] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

CARingBuffer::frameOffset() makes incorrect assumptions about the frame count
https://bugs.webkit.org/show_bug.cgi?id=226253
<rdar://problem/78463453>

Reviewed by Eric Carlson.

CARingBuffer::frameOffset() was trying to avoid doing a frameNumber % m_frameCount
modulo operation by doing a frameNumber & (m_frameCount - 1). However, this bitwise
operation is only equivalent if m_frameCount is a power of 2. It isn't enforced
anywhere that the frameCount is a power of 2. As a matter of fact, we frequently use
2*sampleRate which is often 2*44100=88200, which is NOT a power of 2.

When adding logging, I saw frameOffset(512) returning 0 for a frameCount of 88200, which
made no sense. It was causing offset0 and offset1 in CARingBuffer::fetchInternal() to
be both 0 (even though startRead was 0 and endRead was 512) and it was leading the
function to make bad computations.

To address the issue, I updated CARingBuffer::frameOffset() to use a simple modulo
operation. It is safer as it makes no assumption on the frame count and it is more
readable. If we're worried about the performance, we could alternatively round up the
frameCount to the next power of 2 and keep using the bitwise operation, but I am
personally do not think it is worth it.

  • platform/audio/cocoa/CARingBuffer.cpp:

(WebCore::CARingBuffer::initializeAfterAllocation):

  • platform/audio/cocoa/CARingBuffer.h:

(WebCore::CARingBuffer::frameOffset):

10:03 PM Changeset in webkit [278754] by Said Abou-Hallawa
  • 2 edits in trunk/Source/WebKit

takeSnapshotWithConfiguration() should wait for the next flush before it does callSnapshotRect()
https://bugs.webkit.org/show_bug.cgi?id=226257
<rdar://76411685>

Reviewed by Simon Fraser.

This will ensure the latest IOSurfaces are pushed to backboardd before
taking the snapshot.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):

9:52 PM Changeset in webkit [278753] by clopez@igalia.com
  • 4 edits in trunk

[CMake][GTK][WPE] Improve error message when libsoup3 is not found
https://bugs.webkit.org/show_bug.cgi?id=226905

Reviewed by Adrian Perez de Castro.

When libsoup 3 is not found be more clear about the problem and
offer possible workaround to continue the build.

  • Source/cmake/FindLibSoup.cmake:
  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:
8:37 PM Changeset in webkit [278752] by yurys@chromium.org
  • 2 edits in trunk/Source/WebCore

[REGRESSION][Curl] Network::ResourceTiming are broken after r278391
https://bugs.webkit.org/show_bug.cgi?id=226901

Reviewed by Fujii Hironori.

Initialize fetchStart with startTime in Curl.

No new tests.

  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::getNetworkLoadMetrics):

8:22 PM Changeset in webkit [278751] by Chris Dumez
  • 5 edits in trunk/Source/WebKit

Unreviewed macOS build fix.

Add some missing header includes.

  • Shared/mac/MediaFormatReader/CoreMediaWrapped.h:
  • Shared/mac/MediaFormatReader/MediaSampleByteRange.h:
  • Shared/mac/MediaFormatReader/MediaSampleCursor.h:
  • Shared/mac/MediaFormatReader/MediaTrackReader.cpp:
8:00 PM Changeset in webkit [278750] by weinig@apple.com
  • 6 edits
    3 adds in trunk

Nothing is keeping navigator.xr alive during GC
https://bugs.webkit.org/show_bug.cgi?id=226898

Reviewed by Chris Dumez.

Source/WebCore:

Ensure the navigator.xr wrapper is kept alive when it has custom properties
by annotating it with GenerateIsReachable=ReachableFromNavigator.

Test: webxr/gc.html

  • Modules/webxr/NavigatorWebXR.cpp:

(WebCore::NavigatorWebXR::xr):

  • Modules/webxr/WebXRSystem.cpp:

(WebCore::WebXRSystem::create):
(WebCore::WebXRSystem::WebXRSystem):
(WebCore::WebXRSystem::navigator):

  • Modules/webxr/WebXRSystem.h:
  • Modules/webxr/WebXRSystem.idl:

LayoutTests:

Add test that ensure the navigator.xr wrapper is kept alive when it has
custom properties.

  • webxr: Added.
  • webxr/gc-expected.txt: Added.
  • webxr/gc.html: Added.
7:56 PM Changeset in webkit [278749] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Drop unnecessary call to StringView::toStringWithoutCopying() in shouldTreatAsPotentiallyTrustworthy()
https://bugs.webkit.org/show_bug.cgi?id=226907

Reviewed by Darin Adler.

Drop unnecessary call to StringView::toStringWithoutCopying() in shouldTreatAsPotentiallyTrustworthy() since
the function we're calling takes a StringView.

  • page/SecurityOrigin.cpp:

(WebCore::shouldTreatAsPotentiallyTrustworthy):

7:36 PM Changeset in webkit [278748] by Fujii Hironori
  • 2 edits in trunk/Source/WebKit

[WinCairo] Can't open WebInspector UI since r277787
https://bugs.webkit.org/show_bug.cgi?id=226908

Reviewed by Don Olmstead.

r277787 (Bug 226001) changed the return type of
WebURLSchemeTask::request() from const WebCore::ResourceRequest&
to WebCore::ResourceRequest.

InspectorResourceURLSchemeHandler::platformStartTask shouldn't
hold the reference of the temporary object.

  • UIProcess/Inspector/win/InspectorResourceURLSchemeHandler.cpp:

(WebKit::InspectorResourceURLSchemeHandler::platformStartTask):
Changed the type of requestURL from auto& to auto to copy the URL.

6:22 PM Changeset in webkit [278747] by Wenson Hsieh
  • 9 edits
    2 adds in trunk

[Live Text] Add a mechanism to regenerate text in an image element when it changes dimensions
https://bugs.webkit.org/show_bug.cgi?id=226858
rdar://77522786

Reviewed by Devin Rousso.

Source/WebCore:

Push m_elementsWithTextRecognitionResults from WebPage down to Page, and additionally keep track of a
TextRecognitionResult per element, as well as the size of the element at the time when we last injected text
recognition results. Use this information to tell elements to update their OCR text containers if their
dimenions have changed since the last update, after finishing a rendering update.

Test: fast/images/text-recognition/image-overlay-size-change.html

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::updateWithTextRecognitionResult):

Refactor this to take a const TextRecognitionResult& instead of a TextRecognitionResult&&, since this method
doesn't actually take ownership of the TextRecognitionResult. This allows us to avoid explicitly copying a
TextRecognitionResult when calling this method from Page::updateElementsWithTextRecognitionResults. Also, add
a CacheTextRecognitionResults enum flag as an argument, to avoid entering Page::cacheTextRecognitionResult
every time we update a resized element in Page::updateElementsWithTextRecognitionResults; since we know that
the dimensions are the only thing that changed, we simply update the cached dimensions.

Call into Page::cacheTextRecognitionResult to store per-element TextRecognitionResults when we
finish injecting the OCR text and data detectors into the image element.

  • html/HTMLElement.h:
  • page/Page.cpp:

(WebCore::Page::didCommitLoad):

Clear out both m_textRecognitionResultsByElement and m_elementsWithTextRecognitionResults.

(WebCore::Page::doAfterUpdateRendering):

At the end of each rendering update, go through m_elementsWithTextRecognitionResults and check if any of the
elements' dimensions have changed; if so, tell those elements to re-update their OCR text quads and data
detectors in the UA shadow tree.

(WebCore::Page::resetTextRecognitionResults):
(WebCore::Page::updateElementsWithTextRecognitionResults):
(WebCore::Page::hasCachedTextRecognitionResult const):
(WebCore::Page::cacheTextRecognitionResult):

Add the element to m_elementsWithTextRecognitionResults and m_textRecognitionResultsByElement, appending a
new entry to m_textRecognitionResultsByElement only if necessary.

  • page/Page.h:

Source/WebKit:

Push m_elementsWithTextRecognitionResults from WebKit::WebPage down to WebCore::Page. See WebCore
ChangeLog for more details.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didCommitLoad):
(WebKit::WebPage::requestTextRecognition):
(WebKit::WebPage::updateWithTextRecognitionResult):

  • WebProcess/WebPage/WebPage.h:

LayoutTests:

  • fast/images/text-recognition/image-overlay-size-change-expected.txt: Added.
  • fast/images/text-recognition/image-overlay-size-change.html: Added.
6:02 PM Changeset in webkit [278746] by Chris Dumez
  • 8 edits in trunk/Source/WebCore

REGRESSION: (r278544) [ Mac-wk1 ] media/media-continues-playing-after-replace-source.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=226899
<rdar://problem/79160701>

Reviewed by Ryosuke Niwa.

Have MediaPlayerPrivateAVFoundationObjC schedule tasks on the HTML event loop instead of simply using
callOnMainThread() to address flakiness issues, since the rest of the media code uses the HTML event
loop.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerQueueTaskOnEventLoop):

  • html/HTMLMediaElement.h:
  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::queueTaskOnEventLoop):

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayerClient::mediaPlayerQueueTaskOnEventLoop):

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:

(WebCore::MediaPlayerPrivateAVFoundation::queueTaskOnEventLoop):

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

(-[WebCoreAVFMovieObserver metadataLoaded]):
(-[WebCoreAVFMovieObserver didEnd:]):
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
(-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
(-[WebCoreAVFMovieObserver outputSequenceWasFlushed:]):
(-[WebCoreAVFMovieObserver metadataOutput:didOutputTimedMetadataGroups:fromPlayerItemTrack:]):
(-[WebCoreAVFMovieObserver metadataCollector:didCollectDateRangeMetadataGroups:indexesOfNewGroups:indexesOfModifiedGroups:]):
(-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]):
(-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]):

5:49 PM Changeset in webkit [278745] by pvollan@apple.com
  • 11 edits
    2 adds in trunk/Source/WebKit

[iOS] Sync Accessibility preferences
https://bugs.webkit.org/show_bug.cgi?id=226738
<rdar://77922839>

Reviewed by Brent Fulgham.

Implement Per-App Accessibility preferences on iOS. The Per-App Accessibility preferences in the WebContent process
should reflect the values in the UI process. This is addressed by syncing the values between the two processes on
startup of the WebContent process, and when the values change.

  • Platform/spi/Cocoa/AccessibilitySupportSPI.h:
  • Shared/WebProcessCreationParameters.cpp:

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

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

(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::accessibilityPreferencesChangedCallback):
(WebKit::WebProcessPool::registerNotificationObservers):
(WebKit::WebProcessPool::unregisterNotificationObservers):

  • UIProcess/WebProcessPool.h:
  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::accessibilityPreferencesDidChange):

5:31 PM Changeset in webkit [278744] by Ruben Turcios
  • 2 edits in branches/safari-612.1.18-branch/Source/WebKit

Cherry-pick r278741. rdar://problem/79169276

Regression(r278449): add null check for completionHandler in WebIDBServer::close
https://bugs.webkit.org/show_bug.cgi?id=226900
rdar://79160392

Reviewed by Chris Dumez.

  • NetworkProcess/IndexedDB/WebIDBServer.cpp: (WebKit::WebIDBServer::close):

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

5:28 PM Changeset in webkit [278743] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening, mark some WebGL tests as passing
https://bugs.webkit.org/show_bug.cgi?id=226847

These tests appear to pass consistently on both GTK and WPE now.

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-06-10

  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
4:58 PM Changeset in webkit [278742] by Chris Dumez
  • 5 edits in trunk/LayoutTests

REGRESSION: service-workers/service-worker/credentials.https.html and content-security-policy/reporting/report-only-in-meta.sub.html failing together constantly.
https://bugs.webkit.org/show_bug.cgi?id=226884
<rdar://problem/79148983>

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

Resync set-cookie.py from upsteam WPT 7f913d9d12a54858 as it had a hard-coded
expiration for the cookie (which has just passed).

  • web-platform-tests/content-security-policy/reporting/support/set-cookie.py:

(main):

  • web-platform-tests/cookies/resources/set-cookie.py:

(main):

LayoutTests:

Unskip tests that should no longer be failing.

4:55 PM Changeset in webkit [278741] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebKit

Regression(r278449): add null check for completionHandler in WebIDBServer::close
https://bugs.webkit.org/show_bug.cgi?id=226900
rdar://79160392

Reviewed by Chris Dumez.

  • NetworkProcess/IndexedDB/WebIDBServer.cpp:

(WebKit::WebIDBServer::close):

4:51 PM Changeset in webkit [278740] by eric.carlson@apple.com
  • 7 edits in trunk/Source/WebKit

[Cocoa] Remote video layer should respect video gravity when resizing
https://bugs.webkit.org/show_bug.cgi?id=226784

Reviewed by Jer Noble.

Tested manually.

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::prepareForPlayback): Pass specify video gravity
when creating remote layer.
(WebKit::MediaPlayerPrivateRemote::setVideoFullscreenGravity): Remember gravity.

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
  • WebProcess/GPU/media/VideoLayerRemote.h:
  • WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.h:
  • WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.mm:

(-[WKVideoLayerRemote videoGravity]):
(-[WKVideoLayerRemote setVideoGravity:]):
(-[WKVideoLayerRemote resizePreservingGravity]): Return true when in PiP, fullscreen,
or when video gravity is not "resize".
(-[WKVideoLayerRemote layoutSublayers]): Preserve aspect ration when appropriate.
(WebKit::createVideoLayerRemote):

4:32 PM Changeset in webkit [278739] by Devin Rousso
  • 2 edits in trunk/LayoutTests

(r278618) media/modern-media-controls/overflow-support/chapters.html is timing out since introduction
https://bugs.webkit.org/show_bug.cgi?id=226828
<rdar://problem/79084756>

Unreviewed followup for flaky test.

  • media/modern-media-controls/overflow-support/chapters.html:

Add manual timeouts for each await to see where exactly the test fails.

4:29 PM Changeset in webkit [278738] by achristensen@apple.com
  • 77 edits
    70 adds in trunk

Move Timing-Allow-Origin checks to the network process
https://bugs.webkit.org/show_bug.cgi?id=226678
<rdar://problem/45227788>

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/resource-timing/CodingConventions.md: Added.
  • web-platform-tests/resource-timing/SO-XO-SO-redirect-chain-tao.https-expected.txt: Added.
  • web-platform-tests/resource-timing/SO-XO-SO-redirect-chain-tao.https.html: Added.
  • web-platform-tests/resource-timing/SyntheticResponse.py:

(main):

  • web-platform-tests/resource-timing/TAO-match-expected.txt: Added.
  • web-platform-tests/resource-timing/TAO-match.html: Added.
  • web-platform-tests/resource-timing/TAO-null-opaque-origin-expected.txt: Added.
  • web-platform-tests/resource-timing/TAO-null-opaque-origin.html: Added.
  • web-platform-tests/resource-timing/TAO-port-mismatch-means-crossorigin-expected.txt: Added.
  • web-platform-tests/resource-timing/TAO-port-mismatch-means-crossorigin.html: Added.
  • web-platform-tests/resource-timing/init.py: Added.
  • web-platform-tests/resource-timing/buffer-full-add-after-full-event-expected.txt:
  • web-platform-tests/resource-timing/buffer-full-add-after-full-event.html:
  • web-platform-tests/resource-timing/buffer-full-add-entries-during-callback-expected.txt:
  • web-platform-tests/resource-timing/buffer-full-add-entries-during-callback-that-drop.html:
  • web-platform-tests/resource-timing/buffer-full-add-entries-during-callback.html:
  • web-platform-tests/resource-timing/buffer-full-add-then-clear-expected.txt:
  • web-platform-tests/resource-timing/buffer-full-add-then-clear.html:
  • web-platform-tests/resource-timing/buffer-full-decrease-buffer-during-callback.html:
  • web-platform-tests/resource-timing/buffer-full-increase-buffer-during-callback-expected.txt:
  • web-platform-tests/resource-timing/buffer-full-increase-buffer-during-callback.html:
  • web-platform-tests/resource-timing/buffer-full-inspect-buffer-during-callback-expected.txt:
  • web-platform-tests/resource-timing/buffer-full-inspect-buffer-during-callback.html:
  • web-platform-tests/resource-timing/buffer-full-set-to-current-buffer-expected.txt:
  • web-platform-tests/resource-timing/buffer-full-set-to-current-buffer.html:
  • web-platform-tests/resource-timing/buffer-full-store-and-clear-during-callback-expected.txt:
  • web-platform-tests/resource-timing/buffer-full-store-and-clear-during-callback.html:
  • web-platform-tests/resource-timing/buffer-full-then-increased-expected.txt:
  • web-platform-tests/resource-timing/buffer-full-then-increased.html:
  • web-platform-tests/resource-timing/buffer-full-when-populate-entries-expected.txt:
  • web-platform-tests/resource-timing/buffer-full-when-populate-entries.html:

All these buffer-full tests start failing when I update them.
That is an unrelated bug. Firefox has the same bug, and we had the same bug before and after this change.

  • web-platform-tests/resource-timing/connection-reuse-expected.txt: Added.
  • web-platform-tests/resource-timing/connection-reuse.html: Added.
  • web-platform-tests/resource-timing/connection-reuse.https-expected.txt: Added.
  • web-platform-tests/resource-timing/connection-reuse.https.html: Added.
  • web-platform-tests/resource-timing/cross-origin-start-end-time-with-redirects-expected.txt: Added.
  • web-platform-tests/resource-timing/cross-origin-start-end-time-with-redirects.html: Added.
  • web-platform-tests/resource-timing/cross-origin-status-codes.html:
  • web-platform-tests/resource-timing/document-domain-no-impact-opener-expected.txt: Added.
  • web-platform-tests/resource-timing/document-domain-no-impact-opener.html: Added.
  • web-platform-tests/resource-timing/entry-attributes-expected.txt: Added.
  • web-platform-tests/resource-timing/entry-attributes.html: Added.
  • web-platform-tests/resource-timing/fetch-cross-origin-redirect.https-expected.txt: Added.
  • web-platform-tests/resource-timing/fetch-cross-origin-redirect.https.html: Added.
  • web-platform-tests/resource-timing/font-timestamps-expected.txt: Added.
  • web-platform-tests/resource-timing/font-timestamps.html: Added.
  • web-platform-tests/resource-timing/iframe-failed-commit-expected.txt: Added.
  • web-platform-tests/resource-timing/iframe-failed-commit.html: Added.
  • web-platform-tests/resource-timing/initiator-type-for-script-expected.txt: Added.
  • web-platform-tests/resource-timing/initiator-type-for-script.html: Added.
  • web-platform-tests/resource-timing/nextHopProtocol-is-tao-protected.https-expected.txt: Added.
  • web-platform-tests/resource-timing/nextHopProtocol-is-tao-protected.https.html: Added.
  • web-platform-tests/resource-timing/object-not-found-after-TAO-cross-origin-redirect-expected.txt: Added.
  • web-platform-tests/resource-timing/object-not-found-after-TAO-cross-origin-redirect.html: Added.
  • web-platform-tests/resource-timing/object-not-found-after-cross-origin-redirect-expected.txt: Added.
  • web-platform-tests/resource-timing/object-not-found-after-cross-origin-redirect.html: Added.
  • web-platform-tests/resource-timing/redirects-expected.txt: Added.
  • web-platform-tests/resource-timing/redirects.html: Added.
  • web-platform-tests/resource-timing/resource-ignore-data-url-expected.txt: Added.
  • web-platform-tests/resource-timing/resource-ignore-data-url.html: Added.
  • web-platform-tests/resource-timing/resource_TAO_cross_origin_redirect_chain-expected.txt:

This apparent regression is actually a progression.
When this test is run from our test infrastructure, Chrome and Firefox fail the same tests that you see now failing here,
indicating that something is wrong with our test infrastructure. When run on wpt.live, all browsers pass this test
after this change.

  • web-platform-tests/resource-timing/resource_cached.html: Added.
  • web-platform-tests/resource-timing/resource_initiator_types.html:
  • web-platform-tests/resource-timing/resource_nested_dedicated_worker.worker.js:

(async_test):
(async_test.async const): Deleted.

  • web-platform-tests/resource-timing/resource_timing_content_length-expected.txt: Added.
  • web-platform-tests/resource-timing/resource_timing_content_length.html: Added.
  • web-platform-tests/resource-timing/resources/200_empty.asis: Added.
  • web-platform-tests/resource-timing/resources/TAOResponse.py:

(main):

  • web-platform-tests/resource-timing/resources/all_resource_types.html: Added.
  • web-platform-tests/resource-timing/resources/buffer-full-utilities.js:

(const.waitForNextTask):
(const.forceBufferFullEvent.async clearBufferAndSetSize):
(const.forceBufferFullEvent):
(const.fillUpTheBufferWithTwoResources.async clearBufferAndSetSize):
(async const.fillUpTheBufferWithSingleResource.async clearBufferAndSetSize):
(async const):
(let.appendScript): Deleted.
(let.waitForNextTask): Deleted.
(let.waitUntilConditionIsMet.cond.return.new.Promise.resolve.let.checkCondition): Deleted.
(let.waitForEventToFire.return.new.Promise): Deleted.
(let.waitForEventToFire): Deleted.
(let.fillUpTheBufferWithTwoResources.async src): Deleted.

  • web-platform-tests/resource-timing/resources/cacheable-and-validated.py: Added.

(main):

  • web-platform-tests/resource-timing/resources/connection-reuse-test.js: Added.

(attribute_test.async client):
(attribute_test):

  • web-platform-tests/resource-timing/resources/csp-default-none.html: Added.
  • web-platform-tests/resource-timing/resources/csp-default-none.html.headers: Added.
  • web-platform-tests/resource-timing/resources/document-domain-no-impact.html: Added.
  • web-platform-tests/resource-timing/resources/document-refreshed.html: Added.
  • web-platform-tests/resource-timing/resources/document-that-refreshes.html: Added.
  • web-platform-tests/resource-timing/resources/embed-refresh.html: Added.
  • web-platform-tests/resource-timing/resources/green-frame.html: Added.
  • web-platform-tests/resource-timing/resources/green.html: Added.
  • web-platform-tests/resource-timing/resources/green.html.headers: Added.
  • web-platform-tests/resource-timing/resources/gzip_xml.py:
  • web-platform-tests/resource-timing/resources/iframe-refresh.html: Added.
  • web-platform-tests/resource-timing/resources/iframe-reload-TAO.sub.html:
  • web-platform-tests/resource-timing/resources/multi_redirect.py:

(main):

  • web-platform-tests/resource-timing/resources/object-refresh.html: Added.
  • web-platform-tests/resource-timing/resources/redirect-cors.py: Added.

(main):

  • web-platform-tests/resource-timing/resources/resource-timing-content-length.py: Added.

(main):

  • web-platform-tests/resource-timing/resources/resource_timing_test0.xml:
  • web-platform-tests/resource-timing/resources/sizes-helper.js: Added.

(const.checkSizeFields):

  • web-platform-tests/resource-timing/resources/status-code.py:

(main):

  • web-platform-tests/resource-timing/resources/webperftestharness.js:

(test_namespace):
(test_attribute_exists):
(test_enum):

  • web-platform-tests/resource-timing/resources/webperftestharnessextension.js:

(test_method_exists):

  • web-platform-tests/resource-timing/same-origin-from-cross-origin-redirect-expected.txt: Added.
  • web-platform-tests/resource-timing/same-origin-from-cross-origin-redirect.html: Added.
  • web-platform-tests/resource-timing/sizes-cache.any.js: Added.

(const.accumulateEntries):
(const.checkResourceSizes.list.let.entry.of.entries.else):
(promise_test):

  • web-platform-tests/resource-timing/sizes-redirect-img-expected.txt: Added.
  • web-platform-tests/resource-timing/sizes-redirect-img.html: Added.
  • web-platform-tests/resource-timing/sizes-redirect.any.js: Added.

(const.accumulateEntry):
(const.checkResourceSizes):
(const.redirectUrl):
(promise_test):

  • web-platform-tests/resource-timing/status-codes-create-entry.html:
  • web-platform-tests/resource-timing/test_resource_timing-expected.txt:
  • web-platform-tests/resource-timing/test_resource_timing.https-expected.txt:
  • web-platform-tests/resource-timing/workerStart-tao-protected.https.html:

Source/WebCore:

We tried hard to do it in the web process by keeping track of whether the last redirect was cross-origin
and checking the final response and original security origin. We got many tests to pass, but to get the rest
and be correct, we need to check the Timing-Allow-Origin header field of each redirect against the original security origin.

Tests: imported/w3c/web-platform-tests/resource-timing/SO-XO-SO-redirect-chain-tao.https.html

imported/w3c/web-platform-tests/resource-timing/TAO-match.html
imported/w3c/web-platform-tests/resource-timing/TAO-null-opaque-origin.html
imported/w3c/web-platform-tests/resource-timing/TAO-port-mismatch-means-crossorigin.html
imported/w3c/web-platform-tests/resource-timing/connection-reuse.html
imported/w3c/web-platform-tests/resource-timing/connection-reuse.https.html
imported/w3c/web-platform-tests/resource-timing/cross-origin-start-end-time-with-redirects.html
imported/w3c/web-platform-tests/resource-timing/document-domain-no-impact-opener.html
imported/w3c/web-platform-tests/resource-timing/entry-attributes.html
imported/w3c/web-platform-tests/resource-timing/fetch-cross-origin-redirect.https.html
imported/w3c/web-platform-tests/resource-timing/font-timestamps.html
imported/w3c/web-platform-tests/resource-timing/iframe-failed-commit.html
imported/w3c/web-platform-tests/resource-timing/initiator-type-for-script.html
imported/w3c/web-platform-tests/resource-timing/nextHopProtocol-is-tao-protected.https.html
imported/w3c/web-platform-tests/resource-timing/object-not-found-after-TAO-cross-origin-redirect.html
imported/w3c/web-platform-tests/resource-timing/object-not-found-after-cross-origin-redirect.html
imported/w3c/web-platform-tests/resource-timing/redirects.html
imported/w3c/web-platform-tests/resource-timing/resource-ignore-data-url.html
imported/w3c/web-platform-tests/resource-timing/resource_cached.html
imported/w3c/web-platform-tests/resource-timing/resource_timing_content_length.html
imported/w3c/web-platform-tests/resource-timing/same-origin-from-cross-origin-redirect.html
imported/w3c/web-platform-tests/resource-timing/sizes-redirect-img.html

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::start):
Get a SecurityOrigin for our WebKitLegacy ResourceHandle use like we do in WebLoaderStrategy::scheduleLoadFromNetworkProcess

  • loader/ResourceTiming.cpp:

(WebCore::ResourceTiming::ResourceTiming):
(WebCore::ResourceTiming::initServerTiming):
(WebCore::ResourceTiming::isolatedCopy const):
(WebCore::passesTimingAllowCheck): Deleted.

  • loader/ResourceTiming.h:

(WebCore::ResourceTiming::networkLoadMetrics const):
(WebCore::ResourceTiming::ResourceTiming):
(WebCore::ResourceTiming::allowTimingDetails const): Deleted.
(): Deleted.

  • page/PerformanceNavigation.cpp:

(WebCore::PerformanceNavigation::redirectCount const):

  • page/PerformanceNavigationTiming.cpp:

(WebCore::PerformanceNavigationTiming::sameOriginCheckFails const):
(WebCore::PerformanceNavigationTiming::redirectCount const):

  • page/PerformanceResourceTiming.cpp:

(WebCore::entryStartTime):
(WebCore::entryEndTime):
(WebCore::PerformanceResourceTiming::redirectStart const):
(WebCore::PerformanceResourceTiming::redirectEnd const):
(WebCore::PerformanceResourceTiming::domainLookupStart const):
(WebCore::PerformanceResourceTiming::domainLookupEnd const):
(WebCore::PerformanceResourceTiming::connectStart const):
(WebCore::PerformanceResourceTiming::connectEnd const):
(WebCore::PerformanceResourceTiming::secureConnectionStart const):
(WebCore::PerformanceResourceTiming::requestStart const):
(WebCore::PerformanceResourceTiming::responseStart const):
(WebCore::PerformanceResourceTiming::transferSize const):
(WebCore::PerformanceResourceTiming::encodedBodySize const):
(WebCore::PerformanceResourceTiming::decodedBodySize const):

  • page/PerformanceTiming.cpp:

(WebCore::PerformanceTiming::unloadEventStart const):
(WebCore::PerformanceTiming::unloadEventEnd const):
(WebCore::PerformanceTiming::redirectStart const):
(WebCore::PerformanceTiming::redirectEnd const):

  • platform/network/BlobResourceHandle.cpp:

(WebCore::BlobResourceHandle::BlobResourceHandle):

  • platform/network/NetworkLoadMetrics.h:

(WebCore::NetworkLoadMetrics::isolatedCopy const):
(WebCore::NetworkLoadMetrics::operator== const):
(WebCore::NetworkLoadMetrics::encode const):
(WebCore::NetworkLoadMetrics::decode):

  • platform/network/ResourceHandle.cpp:

(WebCore::ResourceHandle::ResourceHandle):
(WebCore::ResourceHandle::create):
(WebCore::ResourceHandle::loadResourceSynchronously):
(WebCore::ResourceHandle::isCrossOriginWithoutTAO const):
(WebCore::ResourceHandle::markAsCrossOriginWithoutTAO):
(WebCore::ResourceHandle::sourceOrigin const):
(WebCore::ResourceHandle::hasCrossOriginRedirect const): Deleted.
(WebCore::ResourceHandle::setHasCrossOriginRedirect): Deleted.

  • platform/network/ResourceHandle.h:
  • platform/network/ResourceHandleInternal.h:

(WebCore::ResourceHandleInternal::ResourceHandleInternal):

  • platform/network/TimingAllowOrigin.cpp: Added.

(WebCore::passesTimingAllowOriginCheck):

  • platform/network/TimingAllowOrigin.h: Added.
  • platform/network/cocoa/NetworkLoadMetrics.mm:

(WebCore::packageTimingData):
(WebCore::copyTimingData):

  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::ResourceHandle::platformLoadResourceSynchronously):

  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:

(-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):

Source/WebKit:

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

(WebKit::sendReplyToSynchronousRequest):
Pass complete metrics with sync xhr responses. Many of the tests use sync xhr.
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::didFailLoading):
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):

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

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):

Source/WebKitLegacy:

  • WebCoreSupport/PingHandle.h:
  • WebCoreSupport/WebResourceLoadScheduler.cpp:

(WebResourceLoadScheduler::loadResourceSynchronously):

LayoutTests:

4:26 PM Changeset in webkit [278737] by achristensen@apple.com
  • 6 edits in trunk

Origin is null in http requests when baseURL has custom scheme on iOS 15.0
https://bugs.webkit.org/show_bug.cgi?id=226760
Source/WebCore:

<rdar://79027280>

Reviewed by Chris Dumez.

This fixes a regression from r272469 where I made two mistakes.

  1. I made schemes handled by a WKURLSchemeHandler able to create non-null origins to increase compatibility.

I forgot that one can also call loadHTMLString and pass a baseURL that can be a custom scheme.
In this case, the custom scheme is also treated as the "origin" so it should be non-null.

  1. When updateRequestForAccessControl is called in the Network Process, it uses SecurityOrigins that have been

serialized and deserialized then passed through the SecurityOrigin constructor, which doesn't know about the
registry of custom schemes that are handled for that WKWebView and may deserialize to a different (null) origin.
We want to deserialize the origin having been made with the rules of SecurityOrigins in the Web Process, so
set its data to be the same as the serialized data.

I added a unit test to prevent future regression.

  • page/SecurityOrigin.h:

(WebCore::SecurityOrigin::decode):

Source/WebKit:

Reviewed by Chris Dumez.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::loadData):

Tools:

Reviewed by Chris Dumez.

  • TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm:

(TEST):

4:10 PM Changeset in webkit [278736] by Ryan Haddad
  • 6 edits
    1 add in trunk

AX: TestWebKitAPI.WebKit.AccessibilityReduceMotion failing on iOS
https://bugs.webkit.org/show_bug.cgi?id=226758
<rdar://problem/78984253>

Patch by Chris Fleizach <Chris Fleizach> on 2021-06-10
Reviewed by Alex Christensen.

Source/WebKit:

For releases that don't have the accessibility update method, the direct setters need to be called
in order to update the cache.

  • Platform/spi/Cocoa/AccessibilitySupportSPI.h:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::increaseContrastPreferenceKey):
(WebKit::setPreferenceValue):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/AccessibilityIncreaseContrast.mm: Added.

(-[WKPreferenceObserverForTestingIncreaseContrast preferenceDidChange:key:encodedValue:]):
(TEST):

3:19 PM Changeset in webkit [278735] by Ruben Turcios
  • 3 edits in branches/safari-612.1.18-branch/Source/WebKit

Cherry-pick r278727. rdar://problem/79161529

REGRESSION (r277820): Trackpad interaction in Web Content is not working on iOS or macCatalyst
https://bugs.webkit.org/show_bug.cgi?id=226892
<rdar://79080057>

Patch by Tim Horton <timothy_horton@apple.com> on 2021-06-10
Reviewed by Wenson Hsieh.

  • UIProcess/ios/WKMouseGestureRecognizer.h:
  • UIProcess/ios/WKMouseGestureRecognizer.mm: Stop inheriting from UIHoverGestureRecognizer; since r277820 removed our override of _shouldReceiveTouch, and the default implementation always says NO, r277820 broke trackpad-origiating mouse events (but left hover working, since that is not a touch).

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

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

Shouldn't drain the micro task queue when calling out to ObjC
https://bugs.webkit.org/show_bug.cgi?id=161942

Reviewed by Saam Barati.

It looks like the issue is that we aren't checking for the
presence of dropped locks when deciding to drain microtasks during
JSLock::unlock. This meant that when we drop all locks when
calling out to API clients we would drain our microtasks at that
point. An alternative would be to pass an extra parameter to the
unlock function that says not to drain microtasks. I chose not to
do that since it seemed a bit less robust.

This patch is very likely to break existing API users. So I'm adding
a linked on or after check to protect existing Apps.

Lastly, change our Poker Bros check to use applicationSDKVersion too
so others trying to add a linked on or after check don't use
the dyld function directly too.

  • API/tests/testapi.cpp:

(TestAPI::promiseDrainDoesNotEatExceptions):
(testCAPIViaCpp):

  • API/tests/testapi.mm:

(testMicrotaskWithFunction):
(testObjectiveCAPI):

  • runtime/JSLock.cpp:

(JSC::JSLock::willReleaseLock):

  • runtime/ObjectPrototype.cpp:

(JSC::isPokerBros):

  • runtime/VM.cpp:

(JSC::VM::didExhaustMicrotaskQueue):

2:19 PM Changeset in webkit [278733] by Cameron McCormack
  • 3 edits
    4 copies
    4 adds
    1 delete in trunk/LayoutTests

Move some Mac MathML test expectation files around
https://bugs.webkit.org/show_bug.cgi?id=226868
<rdar://78786837>

Reviewed by Frédéric Wang.

This should give better forward compatibility for Mac platforms, by
making the mac/ directory the default correct one, and the
mac-catalina/ and mac-mojave/ ones be exceptions.

  • platform/mac-bigsur/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt: Removed.
  • platform/mac-bigsur/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-002-expected.txt: Removed.
  • platform/mac-catalina/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt: Copied from LayoutTests/platform/mac/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt.
  • platform/mac-catalina/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-002-expected.txt: Copied from LayoutTests/platform/mac/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-002-expected.txt.
  • platform/mac-mojave/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt: Copied from LayoutTests/platform/mac/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt.
  • platform/mac-mojave/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-002-expected.txt: Copied from LayoutTests/platform/mac/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-002-expected.txt.
  • platform/mac/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
  • platform/mac/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/padding-002-expected.txt:
2:11 PM Changeset in webkit [278732] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitcorepy] 6x performance improvement in Memoized
https://bugs.webkit.org/show_bug.cgi?id=226891
<rdar://problem/79151940>

Reviewed by Stephanie Lewis.

  • Scripts/libraries/webkitcorepy/setup.py: Bump version.
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Ditto.
  • Scripts/libraries/webkitcorepy/webkitcorepy/decorators.py:

(Memoize.call.decorator): inspect.getargspec retrieves many bits of
information about the function we don't care about. Retrieve arguments manually
(and only do it once) to increase performance of Memoized function calls.

2:03 PM Changeset in webkit [278731] by Aditya Keerthi
  • 5 edits in trunk/Source/WebKit

[iOS] VinylWall app crashes when tapping on 'format' dropdown menu in 'Add Record' menu
https://bugs.webkit.org/show_bug.cgi?id=226886
<rdar://problem/77207322>

Reviewed by Tim Horton.

The VinylWall app contains a WKWebView, and uses <select> to let users
choose options. With the new form controls on iOS, tapping on a <select>
presents a UIContextMenuInteraction, rather than a picker wheel or
popover. However, UIContextMenuInteraction is not supported on apps
linked against an SDK older than iOS 14, resulting in this crash.

To fix, perform a linked-on-or-after check before showing the new UI
for <select> and <input type=text> with a <datalist>. If the check
fails, fallback to the old UI. We already have this check in place for
other context menus in -[WKContentView _shouldUseContextMenus], so we
reuse that method.

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

(-[WKContentView _shouldShowAutomaticKeyboardUIIgnoringInputMode]):
(-[WKContentView _elementTypeRequiresAccessoryView:]):
(-[WKContentView _shouldUseContextMenusForFormControls]):

  • UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm:

(WebKit::WebDataListSuggestionsDropdownIOS::show):

  • UIProcess/ios/forms/WKFormSelectControl.mm:

(-[WKFormSelectControl initWithView:]):

1:56 PM Changeset in webkit [278730] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[Cairo] Fix Path::boundingRectSlowCase when the path is a single MoveTo
https://bugs.webkit.org/show_bug.cgi?id=226613

Cairo says there is no bounding rectangle in this case, whereas the SVG
standard says there it should be a zero-size rectangle at the moved-to
point. This fixes the recently added test
fast/svg/bounding-rect-for-path-with-only-move-command.html

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-06-10
Reviewed by Fujii Hironori.

  • platform/graphics/cairo/PathCairo.cpp:

(WebCore::Path::boundingRectSlowCase const):

1:53 PM Changeset in webkit [278729] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Fix incorrect check in AudioNode.disconnect()
https://bugs.webkit.org/show_bug.cgi?id=226818
<rdar://problem/79076999>

Reviewed by Eric Carlson.

  • Modules/webaudio/AudioNode.cpp:

(WebCore::AudioNode::disconnect):

1:50 PM Changeset in webkit [278728] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

[MSE] When currentTime is a large value, it takes time to process SourceBufferPrivate::evictCodedFrames().
https://bugs.webkit.org/show_bug.cgi?id=226867

Patch by Toshio Ogasawara <toshio.ogasawara@access-company.com> on 2021-06-10
Reviewed by Eric Carlson.

Source/WebCore:

SourceBufferPrivate::evictCodedFrames() now starts with the earliest PTS value
in trackBuffer instead of MediaTime::zeroTime() to avoid unnecessary loops.

Test: media/media-source/media-source-evict-codedframe-large-currenttime.html

  • platform/graphics/SourceBufferPrivate.cpp:

(WebCore::SourceBufferPrivate::evictCodedFrames):

LayoutTests:

  • media/media-source/media-source-evict-codedframe-large-currenttime-expected.txt: Added.
  • media/media-source/media-source-evict-codedframe-large-currenttime.html: Added.
1:47 PM Changeset in webkit [278727] by Ryan Haddad
  • 3 edits in trunk/Source/WebKit

REGRESSION (r277820): Trackpad interaction in Web Content is not working on iOS or macCatalyst
https://bugs.webkit.org/show_bug.cgi?id=226892
<rdar://79080057>

Patch by Tim Horton <timothy_horton@apple.com> on 2021-06-10
Reviewed by Wenson Hsieh.

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

Stop inheriting from UIHoverGestureRecognizer; since r277820
removed our override of _shouldReceiveTouch, and the default implementation
always says NO, r277820 broke trackpad-origiating mouse events (but
left hover working, since that is not a touch).

1:17 PM Changeset in webkit [278726] by don.olmstead@sony.com
  • 4 edits in trunk/Source/ThirdParty/ANGLE

[CMake] Make ANGLE library types configurable
https://bugs.webkit.org/show_bug.cgi?id=226840

Reviewed by Kenneth Russell.

The type for ANGLE's libraries was being hard coded. Now the libraries can be set by
specifying the _LIBRARY_TYPE which defaults to STATIC. Windows platforms override this
and use SHARED libraries.

Additionally make compiling ANGLE's EGL library contingent on USE_ANGLE_EGL being enabled
since its not used otherwise.

  • CMakeLists.txt:
  • PlatformFTW.cmake:
  • PlatformWin.cmake:
1:13 PM Changeset in webkit [278725] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Skip tiled-drawing/scrolling/non-fast-region/wheel-event-plugin.html for arm64
https://bugs.webkit.org/show_bug.cgi?id=226896

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
12:43 PM Changeset in webkit [278724] by Russell Epstein
  • 1 copy in tags/Safari-612.1.15.4.4

Tag Safari-612.1.15.4.4.

12:42 PM Changeset in webkit [278723] by Russell Epstein
  • 2 edits in branches/safari-612.1.15.4-branch/Source/JavaScriptCore

Cherry-pick r278711. rdar://problem/79147214

Another speculative build fix for Win32.
https://bugs.webkit.org/show_bug.cgi?id=226880
rdar://79124858

Reviewed by Keith Miller.

We're getting reports of "warning C4206: nonstandard extension used: translation
unit is empty" turning into a build error on Win32 ports. By design, we rely on
#define flags to make some translation units empty. Hence, we don't want this
warning to turn into an error.

  • config.h:

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

12:41 PM Changeset in webkit [278722] by Russell Epstein
  • 8 edits in branches/safari-612.1.15.4-branch/Source

Versioning.

WebKit-7612.1.15.4.4

12:40 PM Changeset in webkit [278721] by Russell Epstein
  • 1 delete in tags/Safari-612.1.15.4.4

Delete tag.

12:39 PM Changeset in webkit [278720] by Russell Epstein
  • 1 copy in tags/Safari-612.1.15.4.4

Tag Safari-612.1.15.4.4.

12:24 PM Changeset in webkit [278719] by commit-queue@webkit.org
  • 5 edits in trunk

[WPE] Enable Cog for developer builds
https://bugs.webkit.org/show_bug.cgi?id=224360

Patch by Philippe Normand <pnormand@igalia.com> on 2021-06-10
Reviewed by Adrian Perez de Castro.

.:

Cog would be preferred over MiniBrowser for WPE developer builds because it provides a nicer
user experience, while keeping the same spirit as MiniBrowser. Pass -DENABLE_COG=NO to
CMake to disable it and fall back to MiniBrowser.

  • Source/cmake/OptionsWPE.cmake:

Tools:

  • PlatformWPE.cmake: Enable X11 support in Cog. Re-enable headless support in Cog. Map

libsoup configuration in Cog with the one used by the WebKit build.

12:08 PM Changeset in webkit [278718] by Andres Gonzalez
  • 11 edits in trunk/Source/WebCore

iOS - VoiceOver reads the programmatically associated label instead of the accessible name provided via the aria-label or aria-labelledby attribute
https://bugs.webkit.org/show_bug.cgi?id=226534
rdar://65935211

Reviewed by Chris Fleizach.

The problem is due to VoiceOver retrieving the titleUIElement for the
given object, and using the label of that title element as the label of
the object in question. The solution in this patch is to only return a
title element if the object can have title elements (if exposesTitleUIElement
is true). This check was missing in AccessibilityRenderObject::titleUIElement.

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::exposesTitleUIElement const):
This method is no longer necessary in the AXCoreObject interface,
instead is a virtual in the AXObject class hierarchy.

  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::titleUIElement const):
Checks whether this object can have a title element.

(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const):
(WebCore::AccessibilityRenderObject::accessibilityHitTest const):

  • accessibility/AccessibilityRenderObject.h:
  • accessibility/atk/WebKitAccessibleUtil.cpp:

(accessibilityTitle):

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):
No need to cache this value any more.

  • accessibility/isolatedtree/AXIsolatedObject.h:
  • accessibility/isolatedtree/AXIsolatedTree.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

  • accessibility/win/AccessibilityObjectWrapperWin.cpp:

(WebCore::AccessibilityObjectWrapper::accessibilityAttributeValue):

12:02 PM Changeset in webkit [278717] by Ben Nham
  • 18 edits
    3 adds in trunk

Only cache GET requests in the memory cache
https://bugs.webkit.org/show_bug.cgi?id=226359

Reviewed by Geoff Garen.

Source/WebCore:

Test: http/tests/cache/memory-cache-only-caches-get.html

We only cache GET requests at the disk cache level, but we don't have that same restriction
at the memory cache level. We should make the policies match. In particular, in long-running
webpages, we're accumulating POSTs from XMLHttpRequests in our memory cache and should stop
doing that, since POST response caching is generally not used or expected.

I also changed InspectorInstrumentation::willSendRequest to take an optional CachedResource
parameter because it currently uses InspectorPageAgent::cachedResource to find the resource,
which in turn expects to find the resource in the memory cache. That doesn't work anymore
for these non-GET requests, so we now pass down the CachedResource explicitly in the cases
where that's necessary.

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::willSendRequestImpl):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::willSendRequest):

  • inspector/agents/InspectorNetworkAgent.cpp:

(WebCore::resourceTypeForCachedResource):
(WebCore::InspectorNetworkAgent::willSendRequest):

  • inspector/agents/InspectorNetworkAgent.h:
  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::tryLoadingSubstituteData):
(WebCore::DocumentLoader::addSubresourceLoader):
(WebCore::DocumentLoader::loadMainResource):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::requestFromDelegate):

  • loader/ResourceLoadNotifier.cpp:

(WebCore::ResourceLoadNotifier::willSendRequest):
(WebCore::ResourceLoadNotifier::dispatchWillSendRequest):

  • loader/ResourceLoadNotifier.h:
  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::willSendRequestInternal):

  • loader/ResourceLoader.h:

(WebCore::ResourceLoader::cachedResource const):

  • loader/SubresourceLoader.cpp:
  • loader/SubresourceLoader.h:
  • loader/appcache/ApplicationCacheGroup.cpp:

(WebCore::ApplicationCacheGroup::update):
(WebCore::ApplicationCacheGroup::startLoadingEntry):

  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::add):

LayoutTests:

Added tests to make sure only GETs end up in the memory cache.

Also fixed a flaky test that was depending on a POST response in an iframe to be in the
memory cache when doing a history navigation.

  • http/tests/cache/memory-cache-only-caches-get-expected.txt: Added.
  • http/tests/cache/memory-cache-only-caches-get.html: Added.
  • http/tests/cache/resources/echo-cacheable.cgi: Added.
  • http/tests/navigation/post-frames-goback1.html:
  • platform/mac/TestExpectations:
11:54 AM Changeset in webkit [278716] by Chris Dumez
  • 5 edits in trunk/Source

Do some hardening in XPCServiceEventHandler()
https://bugs.webkit.org/show_bug.cgi?id=226860
<rdar://66837596>

Reviewed by Geoffrey Garen.

Do some hardening in XPCServiceEventHandler() to deal with unexpected values and add
some more logging as well.

  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:

(WebKit::XPCServiceEventHandler):

  • WebProcess/cocoa/HandleXPCEndpointMessages.h:
  • WebProcess/cocoa/HandleXPCEndpointMessages.mm:

(WebKit::handleXPCEndpointMessages):

11:53 AM Changeset in webkit [278715] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKitLegacy/mac

Re-enable legacy WebView plug-ins (but not NPAPI)
https://bugs.webkit.org/show_bug.cgi?id=226890
<rdar://79075349>

Reviewed by Tim Horton.

In r276720 I put the check in the wrong place.
This should also fix rdar://77179042 again, which I broke, fixed, broke, and am now fixing again.

  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::createPlugin):

11:53 AM Changeset in webkit [278714] by Chris Dumez
  • 11 edits
    1 delete in trunk/Source/WebCore

Replace ReadableStreamChunk struct with a WTF::Span
https://bugs.webkit.org/show_bug.cgi?id=226879

Reviewed by Alex Christensen.

Replace ReadableStreamChunk struct with a WTF::Span now that we support
Span and they are essentially the same thing.

  • Headers.cmake:
  • Modules/cache/DOMCache.cpp:

(WebCore::DOMCache::addAll):
(WebCore::DOMCache::put):

  • Modules/fetch/FetchBodyConsumer.cpp:

(WebCore::FetchBodyConsumer::resolve):

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::BodyLoader::didReceiveData):
(WebCore::FetchResponse::BodyLoader::consumeDataByChunk):

  • Modules/fetch/FetchResponse.h:
  • Modules/streams/ReadableStreamChunk.h: Removed.
  • Modules/streams/ReadableStreamSink.cpp:

(WebCore::ReadableStreamToSharedBufferSink::enqueue):

  • Modules/streams/ReadableStreamSink.h:
  • WebCore.xcodeproj/project.pbxproj:
  • workers/service/context/ServiceWorkerFetch.cpp:
11:26 AM Changeset in webkit [278713] by Truitt Savell
  • 2 edits in trunk/LayoutTests

REGRESSION: (r278650 - r278655) service-workers/service-worker/credentials.https.html and content-security-policy/reporting/report-only-in-meta.sub.html failing together constantly.
https://bugs.webkit.org/show_bug.cgi?id=226884

Unreviewed test gardening.

11:11 AM Changeset in webkit [278712] by Chris Dumez
  • 10 edits in trunk/Source

Enable WebPage's release logging in ephemeral sessions
https://bugs.webkit.org/show_bug.cgi?id=226510

Reviewed by Eric Carlson.

Enable WebPage's release logging in ephemeral sessions. Our release logging doesn't contain
anything sensitive and not having this logging makes it hard to debug issues in apps using
ephemeral sessions.

Source/WebCore:

  • Modules/applepay/PaymentCoordinator.cpp:

(WebCore::PaymentCoordinator::supportsVersion const):
(WebCore::PaymentCoordinator::canMakePayments):
(WebCore::PaymentCoordinator::canMakePaymentsWithActiveCard):
(WebCore::PaymentCoordinator::openPaymentSetup):
(WebCore::PaymentCoordinator::beginPaymentSession):
(WebCore::PaymentCoordinator::completeMerchantValidation):
(WebCore::PaymentCoordinator::completeShippingMethodSelection):
(WebCore::PaymentCoordinator::completeShippingContactSelection):
(WebCore::PaymentCoordinator::completePaymentMethodSelection):
(WebCore::PaymentCoordinator::completePaymentMethodModeChange):
(WebCore::PaymentCoordinator::completePaymentSession):
(WebCore::PaymentCoordinator::abortPaymentSession):
(WebCore::PaymentCoordinator::cancelPaymentSession):
(WebCore::PaymentCoordinator::validateMerchant):
(WebCore::PaymentCoordinator::didAuthorizePayment):
(WebCore::PaymentCoordinator::didSelectPaymentMethod):
(WebCore::PaymentCoordinator::didSelectShippingMethod):
(WebCore::PaymentCoordinator::didSelectShippingContact):
(WebCore::PaymentCoordinator::didChangePaymentMethodMode):
(WebCore::PaymentCoordinator::didCancelPaymentSession):
(WebCore::PaymentCoordinator::shouldEnableApplePayAPIs const):
(WebCore::PaymentCoordinator::setApplePayIsActiveIfAllowed const):
(WebCore::PaymentCoordinator::shouldAllowUserAgentScripts const):
(WebCore::PaymentCoordinator::getSetupFeatures):
(WebCore::PaymentCoordinator::beginApplePaySetup):
(WebCore::PaymentCoordinator::endApplePaySetup):

  • Modules/applepay/PaymentCoordinatorClient.h:
  • testing/MockPaymentCoordinator.h:

Source/WebKit:

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

(WebKit::m_lastNavigationWasAppBound):
(WebKit::WebPage::close):
(WebKit::WebPage::freezeLayerTree):
(WebKit::WebPage::unfreezeLayerTree):
(WebKit::WebPage::layerVolatilityTimerFired):
(WebKit::WebPage::markLayersVolatile):
(WebKit::WebPage::cancelMarkLayersVolatile):
(WebKit::WebPage::touchEventSync):
(WebKit::WebPage::didReceivePolicyDecision):
(WebKit::WebPage::setIsTakingSnapshotsForApplicationSuspension):
(WebKit::WebPage::suspend):
(WebKit::WebPage::resume):
(WebKit::WebPage::runJavaScript):
(WebKit::WebPage::runJavaScriptInFrameInScriptWorld):
(WebKit::WebPage::updatePreferences):
(WebKit::WebPage::registerURLSchemeHandler):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getPositionInformation):

10:18 AM Changeset in webkit [278711] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Another speculative build fix for Win32.
https://bugs.webkit.org/show_bug.cgi?id=226880
rdar://79124858

Reviewed by Keith Miller.

We're getting reports of "warning C4206: nonstandard extension used: translation
unit is empty" turning into a build error on Win32 ports. By design, we rely on
#define flags to make some translation units empty. Hence, we don't want this
warning to turn into an error.

  • config.h:
10:06 AM Changeset in webkit [278710] by youenn@apple.com
  • 7 edits in trunk

CountQueuingStrategy.constructor misses checking the type of init param
https://bugs.webkit.org/show_bug.cgi?id=226759

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/streams/queuing-strategies.any-expected.txt:
  • web-platform-tests/streams/queuing-strategies.any.worker-expected.txt:

Source/WebCore:

Now that streams are WebIDLed, add related parameter type checks.
Covered by rebased tests.

  • Modules/streams/CountQueuingStrategy.js:

(initializeCountQueuingStrategy):

LayoutTests:

  • streams/shadowing-defineProperty.html:
10:02 AM Changeset in webkit [278709] by Truitt Savell
  • 3 edits in trunk/Tools

Remove Ews179 and bot279 from configs
https://bugs.webkit.org/show_bug.cgi?id=226855

Reviewed by Jonathan Bedard.

  • CISupport/build-webkit-org/config.json:
  • CISupport/ews-build/config.json:
9:56 AM Changeset in webkit [278708] by Russell Epstein
  • 7 edits in branches/safari-611-branch

Cherry-pick r278177. rdar://problem/79144899

Increase NumberToStringBuffer to account for negative number
https://bugs.webkit.org/show_bug.cgi?id=226014

Patch by Mikhail R. Gadelha <mikhail.ramalho@gmail.com> on 2021-05-27
Reviewed by Robin Morisset.

In r250389, NumberToStringBuffer length was increased from 96 to 123 because:

<21 digits> + decimal point + <100 digits> + null char = 123.

however,

a = -100000000000000000000
a.toFixed(100)

is a valid conversion and it is 124 chars long, because of the "-" sign.

So this patch increases the length of NumberToStringBuffer to 124 and adds new
test cases.

Source/WTF:

Reviewed by Ryosuke Niwa.

  • wtf/dtoa.h:

LayoutTests:

  • js/dom/number-tofixed-expected.txt:
  • js/dom/script-tests/number-tofixed.js:
  • js/kde/Number-expected.txt:
  • js/kde/script-tests/Number.js:

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

9:55 AM Changeset in webkit [278707] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r278166. rdar://problem/79144884

Pass frame ref during navigationPolicyCompletionHandler
https://bugs.webkit.org/show_bug.cgi?id=226268
<rdar://problem/78512383>

Reviewed by Ryosuke Niwa.

Pass the active frame to the navigationPolicyCompletionHandler lambda as a Ref to
ensure it is kept alive during the policy check and subsequent steps.

  • loader/DocumentLoader.cpp: (WebCore::DocumentLoader::willSendRequest):

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

9:52 AM Changeset in webkit [278706] by Russell Epstein
  • 8 edits in branches/safari-611-branch/Source

Versioning.

WebKit-7611.3.8

9:41 AM Changeset in webkit [278705] by commit-queue@webkit.org
  • 4 edits
    4 copies
    2 moves in trunk

Treat intrinsic like *-content
https://bugs.webkit.org/show_bug.cgi?id=226790

Patch by Rob Buis <rbuis@igalia.com> on 2021-06-10
Reviewed by Sergio Villar Senin.

Source/WebCore:

Treat intrinsic like *-content for intrinsic logical
content calculations.

Tests: fast/flexbox/intrinsic-width-column-flow-crash.html

fast/flexbox/intrinsic-width-crash.html
fast/flexbox/min-intrinsic-width-crash.html

  • platform/Length.h:
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing const):
(WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing const):

LayoutTests:

Add tests for intrinsic and min-intrinsic and move relevant tests to fast/flexbox.

  • fast/flexbox/intrinsic-width-column-flow-crash-expected.txt: Copied from LayoutTests/fast/css/flex-box-intrinsic-width-crash-expected.txt.
  • fast/flexbox/intrinsic-width-column-flow-crash.html: Copied from LayoutTests/fast/css/flex-box-intrinsic-width-crash.html.
  • fast/flexbox/intrinsic-width-crash-expected.txt: Copied from LayoutTests/fast/css/flex-box-intrinsic-width-crash-expected.txt.
  • fast/flexbox/intrinsic-width-crash.html: Copied from LayoutTests/fast/css/flex-box-intrinsic-width-crash.html.
  • fast/flexbox/min-intrinsic-width-crash-expected.txt: Renamed from LayoutTests/fast/css/flex-box-intrinsic-width-crash-expected.txt.
  • fast/flexbox/min-intrinsic-width-crash.html: Renamed from LayoutTests/fast/css/flex-box-intrinsic-width-crash.html.
9:20 AM Changeset in webkit [278704] by achristensen@apple.com
  • 2 edits in trunk/LayoutTests

Mark a navigation timing test as flaky
https://bugs.webkit.org/show_bug.cgi?id=226629

8:15 AM Changeset in webkit [278703] by Ruben Turcios
  • 1 copy in branches/safari-612.1.18-branch

New branch.

8:08 AM Changeset in webkit [278702] by Chris Dumez
  • 36 edits in trunk/Source

Fix some inefficient uses of SharedBuffer
https://bugs.webkit.org/show_bug.cgi?id=226857

Reviewed by Darin Adler.

Fix some inefficient uses of SharedBuffer:

  • Avoid calling SharedBuffer::data() whenever possible since this function may have to combine internal segments of SharedBuffer. Added a convenience function on SharedBuffer (forEachSegment()) to get the data pointer / size of each segment.
  • Avoid some unnecessary construction of SharedBuffer simply to get a Vector. We should construct the Vector directly in such cases. I dropped the Blob factory that took in a SharedBuffer as it was inefficient and frequently called instead of the more efficient factory that takes in a Vector<uint8_t>.
  • Add convenience functions to SharedBuffer that return a Vector, including one named takeData() that avoids copying the data.
  • Add convenience functions to SharedBuffer for doing a prefix check or copying to a destination pointer.
  • Modules/async-clipboard/ClipboardItem.cpp:

(WebCore::ClipboardItem::blobFromString):

  • Modules/async-clipboard/ios/ClipboardImageReaderIOS.mm:

(WebCore::ClipboardImageReader::readBuffer):

  • Modules/async-clipboard/mac/ClipboardImageReaderMac.mm:

(WebCore::ClipboardImageReader::readBuffer):

  • Modules/fetch/FetchBodyConsumer.cpp:

(WebCore::blobFromData):
(WebCore::packageFormData):
(WebCore::resolveWithTypeAndData):
(WebCore::FetchBodyConsumer::takeAsBlob):

  • Modules/indexeddb/IDBGetResult.cpp:
  • Modules/indexeddb/IDBGetResult.h:
  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::createDataAvailableEvent):

  • Modules/mediastream/RTCDataChannel.cpp:

(WebCore::RTCDataChannel::didReceiveRawData):

  • editing/WebCorePasteboardFileReader.cpp:

(WebCore::WebCorePasteboardFileReader::readBuffer):

  • editing/cocoa/WebContentReaderCocoa.mm:

(WebCore::createFragmentForImageAttachment):
(WebCore::replaceRichContentWithAttachments):
(WebCore::createFragmentAndAddResources):
(WebCore::sanitizeMarkupWithArchive):
(WebCore::WebContentReader::readImage):
(WebCore::attachmentForData):

  • editing/gtk/WebContentReaderGtk.cpp:

(WebCore::WebContentReader::readImage):

  • fileapi/Blob.cpp:
  • fileapi/Blob.h:
  • fileapi/NetworkSendQueue.cpp:

(WebCore::NetworkSendQueue::processMessages):

  • html/HTMLAttachmentElement.cpp:

(WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):

  • inspector/agents/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::didReceiveResponse):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::continueAfterContentPolicy):

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::didFinishLoading):
(WebCore::DocumentThreadableLoader::loadRequest):

  • loader/NetscapePlugInStreamLoader.cpp:

(WebCore::NetscapePlugInStreamLoader::didReceiveDataOrBuffer):

  • loader/ResourceCryptographicDigest.cpp:

(WebCore::cryptographicDigestForSharedBuffer):

  • loader/ResourceCryptographicDigest.h:
  • loader/SubresourceIntegrity.cpp:

(WebCore::matchIntegrityMetadata):

  • loader/appcache/ApplicationCacheGroup.cpp:

(WebCore::ApplicationCacheGroup::didFinishLoadingManifest):

  • loader/appcache/ApplicationCacheStorage.cpp:

(WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory):

  • loader/cache/CachedRawResource.cpp:

(WebCore::CachedRawResource::didAddClient):

  • loader/icon/IconLoader.cpp:

(WebCore::IconLoader::notifyFinished):

  • platform/SharedBuffer.cpp:

(WebCore::combineSegmentsData):
(WebCore::SharedBuffer::combineIntoOneSegment const):
(WebCore::SharedBuffer::data const):
(WebCore::SharedBuffer::takeData):
(WebCore::SharedBuffer::toHexString const):
(WebCore::SharedBuffer::forEachSegment const):
(WebCore::SharedBuffer::startsWith const):
(WebCore::SharedBuffer::copyTo const):

  • platform/SharedBuffer.h:
  • platform/cf/SharedBufferCF.cpp:

(WebCore::SharedBuffer::createCFData const):

  • platform/graphics/displaylists/DisplayListItemBuffer.cpp:

(WebCore::DisplayList::ItemBuffer::append):

  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::dataChanged):

  • workers/ScriptBuffer.cpp:

(WebCore::ScriptBuffer::toString const):

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::createResponseBlob):

7:38 AM Changeset in webkit [278701] by youenn@apple.com
  • 1880 edits
    2 moves
    465 adds
    118 deletes in trunk

Update libwebrtc to M92
https://bugs.webkit.org/show_bug.cgi?id=226494

LayoutTests/imported/w3c:

Reviewed by Eric Carlson.

  • web-platform-tests/webrtc/datachannel-emptystring-expected.txt:
  • web-platform-tests/webrtc/protocol/rtp-payloadtypes-expected.txt:
  • web-platform-tests/webrtc/protocol/unknown-mediatypes-expected.txt:
  • web-platform-tests/webrtc/receiver-track-live.https-expected.txt:

Source/ThirdParty/libwebrtc:

Reviewed by Eric Carlson.

  • CMakeLists.txt:
  • Source/webrtc: Resynced.
  • libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

Reviewed by Eric Carlson.

Covered by existing tests.

  • Configurations/WebCore.xcconfig:
  • Configurations/WebCoreTestSupport.xcconfig:
  • Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp:

(WebCore::LibWebRTCRtpReceiverBackend::createSource):

  • Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:

(WebCore::fillInboundRtpStreamStats):
(WebCore::fillOutboundRtpStreamStats):
(WebCore::fillRTCIceCandidateStats):

  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

(WebCore::LibWebRTCProvider::signalingThread):
(WebCore::LibWebRTCProvider::createPeerConnectionFactory):
(WebCore::LibWebRTCProvider::setPeerConnectionFactory):
(WebCore::LibWebRTCProvider::createPeerConnection):

  • platform/mediastream/libwebrtc/LibWebRTCProvider.h:
  • testing/MockLibWebRTCPeerConnection.cpp:

(WebCore::createConnection):
(WebCore::MockLibWebRTCPeerConnectionFactory::CreatePeerConnectionOrError):

  • testing/MockLibWebRTCPeerConnection.h:

LayoutTests:

Reviewed by Eric Carlson.

  • webrtc/receiver-track-should-stay-live-even-if-receiver-is-inactive.html:

Update test since the backend is now fixed.

6:39 AM Changeset in webkit [278700] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

ASSERT NOT REACHED in webcore::Layout::LayoutContext::verifyAndOutputMismatchingLayoutTree()
https://bugs.webkit.org/show_bug.cgi?id=226866
<rdar://problem/79120482>

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
4:34 AM Changeset in webkit [278699] by ysuzuki@apple.com
  • 6 edits in trunk

[JSC] Remove useDataICInOptimizingJIT option
https://bugs.webkit.org/show_bug.cgi?id=226862

Reviewed by Mark Lam.

Source/JavaScriptCore:

Originally this option is added to fix performance problem when using DataIC in DFG / FTL.
But it turned out that that performance regression was caused due to disablement of InlineAccess when
using DataIC. With the configuration using DataIC and InlineAccess, we do not observe performance regression.
So, let's just drop this option.

  • jit/JITCode.h:

(JSC::JITCode::useDataIC):

  • runtime/Options.cpp:

(JSC::Options::recomputeDependentOptions):

  • runtime/OptionsList.h:

Tools:

  • Scripts/run-jsc-stress-tests:
1:36 AM Changeset in webkit [278698] by Adrian Perez de Castro
  • 22 edits in trunk/Source

Non-unified build fixes, early May 2021 edition
https://bugs.webkit.org/show_bug.cgi?id=226763

Unreviewed non-unified build fixes.

Source/JavaScriptCore:

  • bytecode/InlineAccess.h: Add missing forward declaration for the CodeBlock type.
  • jit/JITInlineCacheGenerator.cpp: Add missing CCallHelpers.h header.
  • runtime/Intrinsic.h: Add missing <optional> header.
  • yarr/YarrUnicodeProperties.h: Ditto.

Source/WebCore:

  • css/calc/CSSCalcValue.cpp: Add missing CSSCalcSymbolTable.h header.
  • layout/formattingContexts/inline/text/TextUtil.h: Add missing forward declaration for

InlineTextBox class.

  • loader/MixedContentChecker.h: Add missing <optional> header.
  • page/FrameSnapshotting.cpp: Remove unneeded inclusion of DestinationColorSpace.h and

wtf/OptionSet.h headers.

  • page/FrameSnapshotting.h: Add mission DestinationColorSpace.h and wtf/OptionSet.h headers,

remove now unneeded wtf/Forward.h heeder and forward declaration for the
DestinationColorSpace class.

  • platform/DateComponents.h: Add missing <optional> header, remove unneeded <limits> header.
  • platform/Theme.h: Add missin <optional> header.
  • platform/graphics/HEVCUtilities.h: Ditto.
  • rendering/HighlightData.h: Add missing forward declaration for the RenderText class.
  • rendering/MarkedText.cpp: Add missing HighlightData.h header.
  • rendering/RenderLineBoxList.cpp: Add missing inclusion of the LegacyInlineElementBox.h

header.

  • style/StyleAdjuster.cpp: Add missing ShadowRoot.h header.
  • svg/SVGToOTFFontConversion.h: Add missing <optional> header.
  • workers/service/ServiceWorkerClientQueryOptions.h: Ditto.

Source/WebKit:

  • Shared/WebPageNetworkParameters.cpp: Add missing inclusion of the ArgumentCoders.h header.
1:06 AM Changeset in webkit [278697] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Ignore Intl.NumberFormat feature options when linked-ICU is old
https://bugs.webkit.org/show_bug.cgi?id=226861
rdar://77393100

Reviewed by Ross Kirsling.

Let's just ignore the option when Intl.NumberFormat features cannot be implemented since the linked ICU is old.
There is no way not to expose these features since Intl.NumberFormat's these changes are additional ones and Intl.NumberFormat existed before.

  • runtime/IntlNumberFormat.cpp:

(JSC::IntlNumberFormat::initializeNumberFormat):

Jun 9, 2021:

11:26 PM Changeset in webkit [278696] by Ross Kirsling
  • 20 edits
    6 moves in trunk/Source/JavaScriptCore

[JSC] Rename *ByIdVariant to *ByVariant and *ByKind::Normal to *ByKind::ById
https://bugs.webkit.org/show_bug.cgi?id=226750

Reviewed by Yusuke Suzuki.

Cleanup patch following r278445.

  1. {Get, Delete, In}ByStatus (but not Put) have had Id removed from their names; likewise, remove Id from the names of {Get, Delete, In}ByIdVariant. These are used *before* ByVal has been converted to ById.
  1. The {Get, Del, In}ByKind enum classes shouldn't really call ById Normal -- let's say ById explicitly.
  1. Bonus: In DFGBytecodeParser, move some *Status::computeFor calls inside the conditional that uses them.
  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/DeleteByStatus.cpp:

(JSC::DeleteByStatus::appendVariant):
(JSC::DeleteByStatus::computeForStubInfoWithoutExitSiteFeedback):
(JSC::DeleteByStatus::visitAggregateImpl):
(JSC::DeleteByStatus::markIfCheap):

  • bytecode/DeleteByStatus.h:
  • bytecode/DeleteByVariant.cpp: Renamed from Source/JavaScriptCore/bytecode/DeleteByIdVariant.cpp.

(JSC::DeleteByVariant::DeleteByVariant):
(JSC::DeleteByVariant::~DeleteByVariant):
(JSC::DeleteByVariant::operator=):
(JSC::DeleteByVariant::attemptToMerge):
(JSC::DeleteByVariant::writesStructures const):
(JSC::DeleteByVariant::visitAggregateImpl):
(JSC::DeleteByVariant::markIfCheap):
(JSC::DeleteByVariant::dump const):
(JSC::DeleteByVariant::finalize):
(JSC::DeleteByVariant::dumpInContext const):

  • bytecode/DeleteByVariant.h: Renamed from Source/JavaScriptCore/bytecode/DeleteByIdVariant.h.

(JSC::DeleteByVariant::overlaps):

  • bytecode/GetByStatus.cpp:

(JSC::GetByStatus::appendVariant):
(JSC::GetByStatus::computeFromLLInt):
(JSC::GetByStatus::computeForStubInfoWithoutExitSiteFeedback):
(JSC::GetByStatus::computeFor):
(JSC::GetByStatus::merge):
(JSC::GetByStatus::visitAggregateImpl):
(JSC::GetByStatus::markIfCheap):
(JSC::GetByStatus::finalize):

  • bytecode/GetByStatus.h:
  • bytecode/GetByVariant.cpp: Renamed from Source/JavaScriptCore/bytecode/GetByIdVariant.cpp.

(JSC::GetByVariant::GetByVariant):
(JSC::GetByVariant::~GetByVariant):
(JSC::GetByVariant::operator=):
(JSC::GetByVariant::canMergeIntrinsicStructures const):
(JSC::GetByVariant::attemptToMerge):
(JSC::GetByVariant::visitAggregateImpl):
(JSC::GetByVariant::markIfCheap):
(JSC::GetByVariant::finalize):
(JSC::GetByVariant::dump const):
(JSC::GetByVariant::dumpInContext const):

  • bytecode/GetByVariant.h: Renamed from Source/JavaScriptCore/bytecode/GetByIdVariant.h.

(JSC::GetByVariant::overlaps):

  • bytecode/InByStatus.cpp:

(JSC::InByStatus::appendVariant):
(JSC::InByStatus::computeForStubInfoWithoutExitSiteFeedback):
(JSC::InByStatus::merge):
(JSC::InByStatus::markIfCheap):
(JSC::InByStatus::finalize):

  • bytecode/InByStatus.h:
  • bytecode/InByVariant.cpp: Renamed from Source/JavaScriptCore/bytecode/InByIdVariant.cpp.

(JSC::InByVariant::InByVariant):
(JSC::InByVariant::attemptToMerge):
(JSC::InByVariant::markIfCheap):
(JSC::InByVariant::finalize):
(JSC::InByVariant::dump const):
(JSC::InByVariant::dumpInContext const):

  • bytecode/InByVariant.h: Renamed from Source/JavaScriptCore/bytecode/InByIdVariant.h.

(JSC::InByVariant::overlaps):

  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::reset):

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicGetter):
(JSC::DFG::ByteCodeParser::handleDOMJITGetter):
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::handleGetPrivateNameById):
(JSC::DFG::ByteCodeParser::handleDeleteById):
(JSC::DFG::ByteCodeParser::handleInById):
(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):
(JSC::DFG::ConstantFoldingPhase::emitGetByOffset):
(JSC::DFG::ConstantFoldingPhase::emitDeleteByOffset):

  • dfg/DFGNode.h:
  • dfg/DFGValidate.cpp:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileDelBy):
(JSC::FTL::DFG::LowerDFGToB3::compileDeleteById):
(JSC::FTL::DFG::LowerDFGToB3::compileDeleteByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileMultiDeleteByOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

  • jit/JITOperations.cpp:

(JSC::JSC_DEFINE_JIT_OPERATION):

  • jit/Repatch.cpp:

(JSC::appropriateOptimizingGetByFunction):
(JSC::appropriateGetByFunction):
(JSC::tryCacheGetBy):
(JSC::repatchDeleteBy):
(JSC::tryCacheInBy):
(JSC::repatchInBy):
(JSC::resetGetBy):
(JSC::resetDelBy):
(JSC::resetInBy):

  • jit/Repatch.h:
10:27 PM Changeset in webkit [278695] by Russell Epstein
  • 1 copy in tags/Safari-612.1.17.10.2

Tag Safari-612.1.17.10.2.

10:24 PM Changeset in webkit [278694] by Russell Epstein
  • 8 edits in branches/safari-612.1.17.10-branch/Source

Versioning.

WebKit-7612.1.17.10.2

9:59 PM Changeset in webkit [278693] by svillar@igalia.com
  • 2 edits in trunk/Tools

Add email address for Igalia's WebKit layout team to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=226829

Reviewed by Simon Fraser.

  • Scripts/webkitpy/common/config/contributors.json:
9:52 PM Changeset in webkit [278692] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Null check page in generateCertificate
https://bugs.webkit.org/show_bug.cgi?id=226798

Patch by Rob Buis <rbuis@igalia.com> on 2021-06-09
Reviewed by Youenn Fablet.

Source/WebCore:

Null check page in generateCertificate.

Test: http/wpt/webrtc/RTCPeerConnection-generateCertificate-crash.html

  • Modules/mediastream/PeerConnectionBackend.cpp:

(WebCore::PeerConnectionBackend::generateCertificate):

LayoutTests:

  • http/wpt/webrtc/RTCPeerConnection-generateCertificate-crash-expected.txt: Added.
  • http/wpt/webrtc/RTCPeerConnection-generateCertificate-crash.html: Added.
9:41 PM Changeset in webkit [278691] by Megan Gardner
  • 3 edits
    1 add in trunk/Source/WebKit

Create SPI file for Synapse so external builds will work.
https://bugs.webkit.org/show_bug.cgi?id=226844

Reviewed by Tim Horton.

  • Platform/spi/Cocoa/SynapseSPI.h: Added.
  • UIProcess/Cocoa/WebPageProxyCocoa.mm:
  • WebKit.xcodeproj/project.pbxproj:
8:23 PM Changeset in webkit [278690] by Cameron McCormack
  • 4 edits in trunk/Source/WebCore

Add window.internals.log()
https://bugs.webkit.org/show_bug.cgi?id=226403

Reviewed by Tim Horton.

window.internals.log() writes output to stderr using WTFLogAlways.
This may be useful for interleaving some output generated from within a
test with WebCore logging, which also goes to stderr. console.log()
doesn't work for this, since that goes to stdout and is captured as
the test output.

  • testing/Internals.cpp:

(WebCore::Internals::log):

  • testing/Internals.h:
  • testing/Internals.idl:
8:17 PM Changeset in webkit [278689] by cathiechen
  • 6 edits in trunk

Aspect ratio from width and height attribute is not compatible to string with invalid ends
https://bugs.webkit.org/show_bug.cgi?id=226469

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img-aspect-ratio-expected.txt:

Source/WebCore:

The patch follows the steps defined in [1] to parse the dimension values from the attribute values.
It adds HTMLDimension to present the dimension value which has two types, Percentage and Pixel.
And parseHTMLDimension() follows the specification steps to check validation and parse the dimension
value. Currently, it is only used by parsing aspect-ratio from width and height attributes. It will
apply to other attributes length parse in the future patch.

[1] https://html.spec.whatwg.org/#rules-for-parsing-dimension-values

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::applyAspectRatioFromWidthAndHeightAttributesToStyle): Call parseHTMLDimension to get the length values.

  • html/parser/HTMLParserIdioms.cpp:

(WebCore::parseHTMLDimensionNumber):
(WebCore::parseHTMLDimension):

  • html/parser/HTMLParserIdioms.h:
8:10 PM Changeset in webkit [278688] by Chris Gambrell
  • 2 edits in trunk/Tools

Add personal email to Tools/Scripts/webkitpy/common/config/contributors.json
https://bugs.webkit.org/show_bug.cgi?id=226845
<rdar://problem/79095492>

Reviewed by Jonathan Bedard.

  • Scripts/webkitpy/common/config/contributors.json:
6:32 PM Changeset in webkit [278687] by Fujii Hironori
  • 2 edits in trunk/Source/JavaScriptCore

clang-cl: JIT.h(966,67): error: no viable conversion from 'JSC::AbstractMacroAssembler<JSC::X86Assembler>::Address' to 'FunctionPtr<CFunctionPtrTag>'
https://bugs.webkit.org/show_bug.cgi?id=226850

Reviewed by Yusuke Suzuki.

WinCairo clang-cl builds got broken since r278656 (Bug 226072).

  • jit/JIT.h: Use the common callOperation(Address, Args...) for

x64 Windows. Added static_assert to check the return type.

6:15 PM Changeset in webkit [278686] by Russell Epstein
  • 1 copy in tags/Safari-612.1.15.4.3

Tag Safari-612.1.15.4.3.

6:13 PM Changeset in webkit [278685] by Russell Epstein
  • 2 edits in branches/safari-612.1.15.4-branch/Source/JavaScriptCore

Cherry-pick r278672. rdar://problem/79111918

Speculative build fix for Win32.
https://bugs.webkit.org/show_bug.cgi?id=226793
rdar://79032803

Reviewed by Saam Barati.

  • API/JSCallbackObject.h:

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

6:12 PM Changeset in webkit [278684] by Russell Epstein
  • 8 edits in branches/safari-612.1.15.4-branch/Source

Versioning.

WebKit-7612.1.15.4.3

5:11 PM Changeset in webkit [278683] by Andres Gonzalez
  • 3 edits
    4 adds in trunk

iOS - VoiceOver reads the old heading text when updated with heading.firstChild.data.
https://bugs.webkit.org/show_bug.cgi?id=226754
Source/WebCore:

rdar://44949563

Reviewed by Chris Fleizach.

Tests: accessibility/ios-simulator/heading-text-updates.html

accessibility/mac/heading-text-updates.html

The problem was caused by [WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]
setting the value and label of static text inside headings. since this
method is called only on the initialization of the object, the label is
never updated when the text changes.
The solution is to move the logic to return the label and value of
static text inside headings to the accessibilityLabel and accessibilityValue
respectively.

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
(-[WebAccessibilityObjectWrapper accessibilityLabel]):
(-[WebAccessibilityObjectWrapper accessibilityValue]):

LayoutTests:

Reviewed by Chris Fleizach.

  • accessibility/ios-simulator/heading-text-updates-expected.txt: Added.
  • accessibility/ios-simulator/heading-text-updates.html: Added.
  • accessibility/mac/heading-text-updates-expected.txt: Added.
  • accessibility/mac/heading-text-updates.html: Added.
4:44 PM Changeset in webkit [278682] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebKit

[GTK] Duplicate WebKitWebView::show-option-menu confuses introspection, should use --warn-error when building gir
https://bugs.webkit.org/show_bug.cgi?id=222985

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-06-09
Reviewed by Adrian Perez de Castro.

WebKitWebView::show-option-menu has different parameters for GTK than it does for WPE. It
seems g-ir-scanner is taking the WPE documentation and merging it with the GTK parameters.
We can fix this by moving the introspection comment into platform-specific files.

Additionally, let's use --warn-error to turn warnings into errors to prevent this from ever
happening again, as we already do when generating introspection for JavaScriptCore.

  • PlatformGTK.cmake:
  • UIProcess/API/glib/WebKitWebView.cpp:

(webkit_web_view_class_init):

  • UIProcess/API/glib/WebKitWebViewPrivate.h:
  • UIProcess/API/gtk/WebKitWebViewGtk.cpp:

(createShowOptionMenuSignal):

  • UIProcess/API/wpe/WebKitWebViewWPE.cpp:

(createShowOptionMenuSignal):

4:41 PM Changeset in webkit [278681] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

Nullptr crash in MediaSource::updateBufferedIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=226851
rdar://79059134

Reviewed by Devin Rousso.

No new tests, I was unable to come up with a reproducible case.

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::updateBufferedIfNeeded): NULL-check m_private.

3:46 PM Changeset in webkit [278680] by Russell Epstein
  • 1 copy in tags/Safari-612.1.17.10.1

Tag Safari-612.1.17.10.1.

3:45 PM Changeset in webkit [278679] by Russell Epstein
  • 8 edits in branches/safari-612.1.17.10-branch/Source

Versioning.

WebKit-7612.1.17.10.1

3:42 PM Changeset in webkit [278678] by Devin Rousso
  • 6 edits in trunk/LayoutTests

(r278618) media/modern-media-controls/overflow-support/chapters.html is timing out since introduction
https://bugs.webkit.org/show_bug.cgi?id=226828
<rdar://problem/79084756>

Unreviewed text fix.

  • media/modern-media-controls/overflow-support/chapters.html:
  • media/modern-media-controls/overflow-support/chapters-expected.txt:

Wait for the <track kind="chapters"> to load before clicking on the overflow button as
otherwise there won't be any chapter cues to display in the contextmenu, meaning that the
contextmenu would be empty and therefore not be shown.

  • http/tests/resources/js-test-pre.js:

(shouldBecomeEqual):
(shouldBecomeDifferent):

  • resources/js-test-pre.js:

(shouldBecomeEqual):
(shouldBecomeDifferent):

  • resources/js-test.js:

(shouldBecomeEqual):
(shouldBecomeDifferent):
Allow for completionHandler to not be provided, which will cause the function to return a Promise.

3:41 PM Changeset in webkit [278677] by Russell Epstein
  • 1 copy in branches/safari-612.1.17.10-branch

New branch.

2:44 PM Changeset in webkit [278676] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

REGRESSION (r278630?): [iOS 14] http/tests/ssl/applepay/ApplePayButton.html is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=226826

Unreviewed test gardening.

Updating expectations while EWS is being updated with patch.

  • platform/ios-wk2/TestExpectations:
2:34 PM Changeset in webkit [278675] by Russell Epstein
  • 8 edits in branches/safari-612.1.16.10-branch/Source

Versioning.

WebKit-7612.1.16.10.1

2:28 PM Changeset in webkit [278674] by Ryan Haddad
  • 2 edits in trunk/Tools

[test-webkit-lldb] 3 dump_class_layout_unittest.TestDumpClassLayout tests failing with Xcode 12.5
https://bugs.webkit.org/show_bug.cgi?id=226540

Unreviewed test gardening.

  • lldb/dump_class_layout_unittest.py: Rebaseline tests.
2:23 PM Changeset in webkit [278673] by Russell Epstein
  • 1 copy in branches/safari-612.1.16.10-branch

New branch.

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

Speculative build fix for Win32.
https://bugs.webkit.org/show_bug.cgi?id=226793
rdar://79032803

Reviewed by Saam Barati.

  • API/JSCallbackObject.h:
2:03 PM Changeset in webkit [278671] by Fujii Hironori
  • 39 edits in trunk/LayoutTests

LayoutTests: Use os.path.dirname() instead of split('/') for Windows Python
https://bugs.webkit.org/show_bug.cgi?id=226802

Reviewed by Jonathan Bedard.

Windows Python uses backlash for path separator. Use
os.path.dirname() to get a parent directory.

  • http/tests/appcache/resources/scope1/cookie-protected-manifest.py:
  • http/tests/appcache/resources/scope2/cookie-protected-script.py:
  • http/tests/cache/disk-cache/resources/make-sha1-collision.py:
  • http/tests/cache/resources/load-and-check-referer.py:
  • http/tests/cache/resources/post-image-to-verify.py:
  • http/tests/cookies/multiple-redirect-and-set-cookie.py:

(redirect_url):

  • http/tests/cookies/same-site/resources/fetch-after-navigating-iframe-in-cross-origin-page.py:
  • http/tests/cookies/same-site/resources/fetch-after-top-level-cross-origin-redirect.py:
  • http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-from-cross-origin-page.py:
  • http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.py:
  • http/tests/cookies/same-site/resources/fetch-after-top-level-same-origin-redirect.py:
  • http/tests/cookies/same-site/resources/fetch-in-same-origin-service-worker.py:
  • http/tests/gzip-content-encoding/resources/echo-data-encoding-with-gzip.py:
  • http/tests/media/resources/serve_video.py:
  • http/tests/misc/resources/404image.py:
  • http/tests/misc/resources/image-checks-for-accept.py:
  • http/tests/misc/resources/protected/protected-image.py:
  • http/tests/multipart/resources/multipart-nodashes.py:
  • http/tests/multipart/resources/multipart.py:
  • http/tests/quicklook/resources/word-document-with-csp-block-frame-ancestors.py:
  • http/tests/referrer-policy/resources/image.py:
  • http/tests/security/contentSecurityPolicy/resources/image-document-default-src-none-iframe.py:
  • http/tests/security/mixedContent/resources/subresource/protected-image.py:
  • http/tests/security/mixedContent/resources/subresource/protected-script.py:
  • http/tests/security/mixedContent/resources/subresource/protected-stylesheet.py:
  • http/tests/security/mixedContent/resources/subresource2/protected-image.py:
  • http/tests/security/resources/abe-allow-credentials.py:
  • http/tests/security/resources/abe-allow-star.py:
  • http/tests/security/resources/allow-if-origin.py:
  • http/tests/security/resources/captions-with-access-control-headers.py:
  • http/tests/security/resources/image-access-control.py:
  • http/tests/security/resources/image-credential-check.py:
  • http/tests/security/resources/loading-subresources.py:
  • http/tests/security/resources/reference-movie-cross-origin-allow.py:
  • http/tests/security/resources/subresource1/protected-image.py:
  • http/tests/security/resources/subresource2/protected-image.py:
  • http/tests/security/resources/xorigincss1-allow-star.py:
  • platform/wincairo/TestExpectations:
1:54 PM Changeset in webkit [278670] by Dewei Zhu
  • 2 edits in trunk/Tools

HTTP server should run with the same python executable as run-benchmark script.
https://bugs.webkit.org/show_bug.cgi?id=226834

Reviewed by Jonathan Bedard.

'SimpleHTTPServerDriver._ensure_http_server_dependencies' will not work if the
python version used by run-benchmark is not the same as the one invokes http server.

Remove python modules no longer needed by http server.

  • Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:

(SimpleHTTPServerDriver.serve):
(SimpleHTTPServerDriver._ensure_http_server_dependencies):

1:46 PM Changeset in webkit [278669] by Chris Dumez
  • 34 edits in trunk/Source

Avoid some calls to StringView::toString() / StringView::toStringWithoutCopying()
https://bugs.webkit.org/show_bug.cgi?id=226803

Reviewed by Darin Adler.

Source/WebCore:

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFontVariationTag):

  • page/FrameView.cpp:

(WebCore::FrameView::scrollToFragmentInternal):

  • platform/text/hyphen/HyphenationLibHyphen.cpp:

(WebCore::lastHyphenLocation):

  • rendering/RenderTreeAsText.cpp:

(WebCore::writeDebugInfo):

Source/WTF:

Add support to TextStream for printing a StringView directly, without having to convert
it to a String first.

  • wtf/text/TextStream.cpp:

(WTF::TextStream::operator<<):

  • wtf/text/TextStream.h:
12:53 PM Changeset in webkit [278668] by Fujii Hironori
  • 2 edits in trunk/Tools

CISupport/test-result-archive script reports "SyntaxError: invalid syntax" with Python 3
https://bugs.webkit.org/show_bug.cgi?id=226797

Reviewed by Jonathan Bedard.

  • CISupport/test-result-archive:

(archive_test_results): Replaced the old syntax with 'as' for
'except' clauses.

11:33 AM Changeset in webkit [278667] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[css-counter-styles] Mark counter-style descriptors as "descriptor-only"
https://bugs.webkit.org/show_bug.cgi?id=226792

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-06-09
Reviewed by Simon Fraser.

  • css/CSSProperties.json:

Mark @counter-style rule descriptors (additive-symbols, fallback, pad,
symbols, negative, prefix, range, suffix, system) as "descriptor-only".

Note that while speak-as is also a valid descriptor for
@counter-style rules, it is deliberately excluded from this change as
it is also a property in the CSS Speech specification.

https://www.w3.org/TR/css-speech-1/#speaking-props-speak-as

10:36 AM Changeset in webkit [278666] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Skip http/tests/contentextensions/plugin-doesnt-crash.html on arm64
https://bugs.webkit.org/show_bug.cgi?id=226783

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
10:01 AM Changeset in webkit [278665] by achristensen@apple.com
  • 8 edits in trunk

Performance API: Implement performance.timeOrigin
https://bugs.webkit.org/show_bug.cgi?id=174862

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

  • web-platform-tests/hr-time/idlharness.any-expected.txt:
  • web-platform-tests/hr-time/idlharness.any.worker-expected.txt:
  • web-platform-tests/hr-time/window-worker-timeOrigin.window-expected.txt:

Source/WebCore:

  • page/Performance.cpp:

(WebCore::Performance::timeOrigin const):

  • page/Performance.h:
  • page/Performance.idl:
9:55 AM Changeset in webkit [278664] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Unreviewed Windows build fix.

  • rendering/RenderLayerScrollableArea.cpp:
9:33 AM Changeset in webkit [278663] by Peng Liu
  • 2 edits in trunk/Source/WebKit

[iOS] UIDelegate::UIClient::fullscreenMayReturnToInline() is not called when a video exits fullscreen
https://bugs.webkit.org/show_bug.cgi?id=226785

Reviewed by Eric Carlson.

On iOS, UIDelegate::UIClient::fullscreenMayReturnToInline() is called when
a video exits picture-in-picture, but not when a video exits fullscreen.
This patch fixes that.

We cannot add a regression test for this patch before fixing webkit.org/b/212654.

  • UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:

(WebKit::VideoFullscreenManagerProxy::exitFullscreen):

9:31 AM Changeset in webkit [278662] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Fix incorrect register reuse in 32bit after r278568
https://bugs.webkit.org/show_bug.cgi?id=226817

Patch by Xan Lopez <Xan Lopez> on 2021-06-09
Reviewed by Caio Araujo Neponoceno de Lima.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNotDoubleNeitherDoubleNorHeapBigIntNorStringStrictEquality):
The JSVALUE32_64 branch potentially needs both the tag and payload
registers for both left/right nodes, so we cannot reuse any of
them for the result since the first thing the code does is set it
zero. Just remove the Reuse construction.

9:02 AM Changeset in webkit [278661] by Simon Fraser
  • 4 edits in trunk/Source/WebCore

Clean up scrollbar creation code in RenderLayerScrollableArea
https://bugs.webkit.org/show_bug.cgi?id=226805

Reviewed by Alan Bujtas.

Share code between updateScrollbarsAfterStyleChange() and updateScrollbarsAfterLayout() which
had a lot of common logic. updateScrollbarPresenceAndState() takes two optionals, indicating
whether information about overflow is available (which is only the case after layout).

Also make lots of member function declarations private in RenderLayerScrollableArea.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateScrollingNodeLayers):

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::updateScrollbarPresenceAndState):
(WebCore::RenderLayerScrollableArea::updateScrollbarsAfterStyleChange):
(WebCore::RenderLayerScrollableArea::updateScrollbarsAfterLayout):

  • rendering/RenderLayerScrollableArea.h:
8:21 AM Changeset in webkit [278660] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Fix inadvertent tag corruption in functionAddressOf
https://bugs.webkit.org/show_bug.cgi?id=226503

Patch by Mikhail R. Gadelha <Mikhail R. Gadelha> on 2021-06-09
Reviewed by Darin Adler.

Original patch by Angelos Oikonomopoulos.

The cast was sign-extending the JSValue address in 32 bits, so that addresses
that had the most significant set gave us a sign-extended result in
asNumber which was then converted to an invalid NaN by the bitcast.

Instead, cast the address to uintptr_t, and the result will be promoted
uint64_t without sign-extending the address.

  • jsc.cpp:

(JSC_DEFINE_HOST_FUNCTION):

7:47 AM Changeset in webkit [278659] by Alan Bujtas
  • 5 edits
    2 adds in trunk

[Flexbox] FlexItem stays invisible after initial layout
https://bugs.webkit.org/show_bug.cgi?id=226778

Reviewed by Simon Fraser.

Source/WebCore:

RenderFlexibleBox::layoutAndPlaceChildren() initiates repaint() on newly constructed flex items by checking their everHadLayout bit.
This is similar to what we do for regular block layout when block level boxes appear.
However flexitems are laid out multiple times, first right after they are constructed in constructFlexItem. This initial layout
sets everHadLayout bit to true which makes the check in layoutAndPlaceChildren somewhat late.

Test: fast/flexbox/repaint-issue-when-flex-item-appears.html

  • rendering/FlexibleBoxAlgorithm.cpp:

(WebCore::FlexItem::FlexItem):

  • rendering/FlexibleBoxAlgorithm.h:
  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::constructFlexItem):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):

LayoutTests:

  • fast/flexbox/repaint-issue-when-flex-item-appears-expected.txt: Added.
  • fast/flexbox/repaint-issue-when-flex-item-appears.html: Added.
6:40 AM Changeset in webkit [278658] by Diego Pino Garcia
  • 2 edits in trunk/Source/WebKit

[GTK] Do not depend on resources provided by the GNOME icon theme
https://bugs.webkit.org/show_bug.cgi?id=186767

Reviewed by Adrian Perez de Castro.

Covered by existing tests.

  • PlatformGTK.cmake:
5:36 AM Changeset in webkit [278657] by commit-queue@webkit.org
  • 11 edits
    1 copy
    1 move in trunk/Source

[GTK4] Add support for navigation gestures
https://bugs.webkit.org/show_bug.cgi?id=212327

Patch by Alexander Mikhaylenko <Alexander Mikhaylenko> on 2021-06-09
Reviewed by Michael Catanzaro.

Source/WebCore:

Support GskRenderNode for GRefPtr.

  • platform/gtk/GRefPtrGtk.cpp:

(WTF::refGPtr):
(WTF::derefGPtr):

  • platform/gtk/GRefPtrGtk.h:

Source/WebKit:

Make ViewSnapshotStore store GdkTexture instead of Cairo surfaces
for GTK4. Split ViewSnapshotStoreGtk.cpp into GTK3 and GTK4 versions
since they don't have much in common.

When taking a view snapshot, render the web view into a texture.

When starting a navigation gesture, create a render node from
either the texture, or a fallback color, then render that instead
of using Cairo.

Implement the same dimming+shadow as in GTK3. This time don't bother
with CSS, the approach we used in GTK3 doesn't work anymore, and since
elements like scrollbars aren't themeable anyway it's not very important
to preserve that.

  • SourcesGTK.txt:
  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseTakeViewSnapshot):

  • UIProcess/Automation/cairo/WebAutomationSessionCairo.cpp:

(WebKit::WebAutomationSession::platformGetBase64EncodedPNGData):

  • UIProcess/ViewGestureController.h:
  • UIProcess/ViewSnapshotStore.cpp:

(WebKit::ViewSnapshotStore::didAddImageToSnapshot):
(WebKit::ViewSnapshotStore::willRemoveImageFromSnapshot):

  • UIProcess/ViewSnapshotStore.h:

(WebKit::ViewSnapshot::estimatedImageSizeInBytes const):
(WebKit::ViewSnapshot::texture const):
(WebKit::ViewSnapshot::imageSizeInBytes const): Renamed to estimatedImageSizeInBytes().

  • UIProcess/gtk/ViewGestureControllerGtk.cpp:

(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::snapshot):
(WebKit::ViewGestureController::removeSwipeSnapshot):

  • UIProcess/gtk/ViewSnapshotStoreGtk3.cpp: Copied from Source/WebKit/UIProcess/gtk/ViewSnapshotStoreGtk.cpp.

(WebKit::ViewSnapshot::create):
(WebKit::ViewSnapshot::ViewSnapshot):
(WebKit::ViewSnapshot::hasImage const):
(WebKit::ViewSnapshot::clearImage):
(WebKit::ViewSnapshot::estimatedImageSizeInBytes const):
(WebKit::ViewSnapshot::size const):

  • UIProcess/gtk/ViewSnapshotStoreGtk4.cpp: Renamed from Source/WebKit/UIProcess/gtk/ViewSnapshotStoreGtk.cpp.

(WebKit::ViewSnapshot::create):
(WebKit::ViewSnapshot::ViewSnapshot):
(WebKit::ViewSnapshot::hasImage const):
(WebKit::ViewSnapshot::clearImage):
(WebKit::ViewSnapshot::estimatedImageSizeInBytes const):
(WebKit::ViewSnapshot::size const):

4:17 AM Changeset in webkit [278656] by ysuzuki@apple.com
  • 66 edits in trunk

[JSC] Use DataIC for AccessCase
https://bugs.webkit.org/show_bug.cgi?id=226072

Reviewed by Saam Barati and Filip Pizlo.

Source/JavaScriptCore:

This patch adds non-repatching IC for Baseline JIT in ARM64.
This does not work in non-ARM64 architectures (including X64) due to the use of link-register.

  1. We add non-repatching IC, which is enabled only in Baseline due to performance reason. We are using the existing IC in DFG and FTL. Non-repatching includes fast-path, and slow-path's operation function.
  2. We still keep InlineAccess in all tiers. Removing that causes 0.3 ~ 1.0% regression in Speedometer2. This means that we still need some repatching when we first introduce stubs.
  3. We add a mechanism to share generated code stubs in non-repatching IC. Currently, getter / setter / custom accessors are excluded since their code relies on JSGlobalObject, CodeBlock etc. which are not included in AccessCase's data structure.
  4. This patch still relies on that CodeBlock will be destroyed synchronously since we need to ensure that sharing-hash-table does not include already-dead JIT code stubs. We can fix it (e.g. annotating epoch to these stubs, bump them in finalizeUnconditionally), but we avoid doing that to prevent from further enlarging this patch. This patch is already significant in its size.
  5. Added callOperation(Address) support in CCallHelpers, which can save the target in nonArgGPR0, and call it so that we can use Address including GPR which is also used for arguments.

Performance is neutral in JetStream2 and Speedometer2. But it offers the way to remove some code generation in Baseline.

  • assembler/MacroAssemblerARM64E.h:

(JSC::MacroAssemblerARM64E::call):

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::create):
(JSC::AccessCase::createTransition):
(JSC::AccessCase::createDelete):
(JSC::AccessCase::createCheckPrivateBrand):
(JSC::AccessCase::createSetPrivateBrand):
(JSC::AccessCase::fromStructureStubInfo):
(JSC::AccessCase::clone const):
(JSC::AccessCase::generateWithGuard):
(JSC::AccessCase::generateImpl):
(JSC::AccessCase::canBeShared):

  • bytecode/AccessCase.h:

(JSC::AccessCase::hash const):
(JSC::AccessCase::AccessCase):
(JSC::SharedJITStubSet::Hash::Key::Key):
(JSC::SharedJITStubSet::Hash::Key::isHashTableDeletedValue const):
(JSC::SharedJITStubSet::Hash::Key::operator==):
(JSC::SharedJITStubSet::Hash::hash):
(JSC::SharedJITStubSet::Hash::equal):
(JSC::SharedJITStubSet::Searcher::Translator::hash):
(JSC::SharedJITStubSet::Searcher::Translator::equal):
(JSC::SharedJITStubSet::PointerTranslator::hash):
(JSC::SharedJITStubSet::PointerTranslator::equal):
(JSC::SharedJITStubSet::add):
(JSC::SharedJITStubSet::remove):
(JSC::SharedJITStubSet::find):

  • bytecode/ByValInfo.h:

(JSC::ByValInfo::setUp):
(JSC::ByValInfo::offsetOfSlowOperation):
(JSC::ByValInfo::offsetOfNotIndexJumpTarget):
(JSC::ByValInfo::offsetOfBadTypeJumpTarget):

  • bytecode/CallLinkInfo.cpp:

(JSC::CallLinkInfo::initializeDirectCall):
(JSC::CallLinkInfo::setDirectCallTarget):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::useDataIC const):

  • bytecode/GetterSetterAccessCase.cpp:

(JSC::GetterSetterAccessCase::create):
(JSC::GetterSetterAccessCase::clone const):
(JSC::GetterSetterAccessCase::emitDOMJITGetter):

  • bytecode/GetterSetterAccessCase.h:
  • bytecode/InlineAccess.cpp:

(JSC::getScratchRegister):
(JSC::InlineAccess::rewireStubAsJumpInAccessNotUsingInlineAccess):
(JSC::InlineAccess::rewireStubAsJumpInAccess):
(JSC::InlineAccess::resetStubAsJumpInAccess):
(JSC::InlineAccess::resetStubAsJumpInAccessNotUsingInlineAccess):
(JSC::InlineAccess::rewireStubAsJump): Deleted.

  • bytecode/InlineAccess.h:
  • bytecode/InstanceOfAccessCase.cpp:

(JSC::InstanceOfAccessCase::create):
(JSC::InstanceOfAccessCase::clone const):

  • bytecode/InstanceOfAccessCase.h:
  • bytecode/IntrinsicGetterAccessCase.cpp:

(JSC::IntrinsicGetterAccessCase::create):
(JSC::IntrinsicGetterAccessCase::clone const):

  • bytecode/IntrinsicGetterAccessCase.h:
  • bytecode/ModuleNamespaceAccessCase.cpp:

(JSC::ModuleNamespaceAccessCase::create):
(JSC::ModuleNamespaceAccessCase::clone const):

  • bytecode/ModuleNamespaceAccessCase.h:
  • bytecode/ObjectPropertyConditionSet.h:

(JSC::ObjectPropertyConditionSet::hash const):
(JSC::ObjectPropertyConditionSet::operator==):
(JSC::ObjectPropertyConditionSet::operator!=):

  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessGenerationState::installWatchpoint):
(JSC::AccessGenerationState::succeed):
(JSC::AccessGenerationState::preserveLiveRegistersToStackForCallWithoutExceptions):
(JSC::PolymorphicAccess::addCases):
(JSC::PolymorphicAccess::addCase):
(JSC::PolymorphicAccess::visitWeak const):
(JSC::PolymorphicAccess::regenerate):

  • bytecode/PolymorphicAccess.h:

(JSC::AccessGenerationState::AccessGenerationState):
(JSC::AccessGenerationState::preserveLiveRegistersToStackForCallWithoutExceptions):

  • bytecode/ProxyableAccessCase.cpp:

(JSC::ProxyableAccessCase::create):
(JSC::ProxyableAccessCase::clone const):

  • bytecode/ProxyableAccessCase.h:
  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::StructureStubInfo):
(JSC::StructureStubInfo::addAccessCase):
(JSC::StructureStubInfo::reset):

  • bytecode/StructureStubInfo.h:

(JSC::StructureStubInfo::offsetOfCodePtr):
(JSC::StructureStubInfo::offsetOfSlowPathStartLocation):
(JSC::StructureStubInfo::offsetOfSlowOperation):
(JSC::StructureStubInfo::patchableJump): Deleted.

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::appendCall):

  • dfg/DFGSlowPathGenerator.h:

(JSC::DFG::slowPathICCall):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetById):
(JSC::DFG::SpeculativeJIT::compileGetByIdFlush):
(JSC::DFG::SpeculativeJIT::compileDeleteById):
(JSC::DFG::SpeculativeJIT::compileDeleteByVal):
(JSC::DFG::SpeculativeJIT::compileInById):
(JSC::DFG::SpeculativeJIT::compileInByVal):
(JSC::DFG::SpeculativeJIT::compileGetPrivateNameByVal):
(JSC::DFG::SpeculativeJIT::compileGetPrivateNameById):
(JSC::DFG::SpeculativeJIT::compilePutPrivateNameById):
(JSC::DFG::SpeculativeJIT::compileCheckPrivateBrand):
(JSC::DFG::SpeculativeJIT::compileSetPrivateBrand):
(JSC::DFG::SpeculativeJIT::compileInstanceOfForCells):
(JSC::DFG::SpeculativeJIT::compileInstanceOf):
(JSC::DFG::SpeculativeJIT::compilePutByIdFlush):
(JSC::DFG::SpeculativeJIT::compilePutById):
(JSC::DFG::SpeculativeJIT::compilePutByIdDirect):
(JSC::DFG::SpeculativeJIT::cachedPutById):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):
(JSC::DFG::SpeculativeJIT::appendCall):
(JSC::DFG::SpeculativeJIT::appendCallSetResult):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis):
(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::getPrivateName):
(JSC::FTL::DFG::LowerDFGToB3::compilePrivateBrandAccess):
(JSC::FTL::DFG::LowerDFGToB3::cachedPutById):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileDelBy):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

  • ftl/FTLSlowPathCall.cpp:

(JSC::FTL::SlowPathCallContext::SlowPathCallContext):
(JSC::FTL::SlowPathCallContext::keyWithTarget const):
(JSC::FTL::SlowPathCallContext::makeCall):

  • ftl/FTLSlowPathCall.h:

(JSC::FTL::callOperation):

  • ftl/FTLSlowPathCallKey.cpp:

(JSC::FTL::SlowPathCallKey::dump const):

  • ftl/FTLSlowPathCallKey.h:

(JSC::FTL::SlowPathCallKey::SlowPathCallKey):
(JSC::FTL::SlowPathCallKey::indirectOffset const):
(JSC::FTL::SlowPathCallKey::withCallTarget):
(JSC::FTL::SlowPathCallKey::operator== const):
(JSC::FTL::SlowPathCallKey::hash const):

  • ftl/FTLThunks.cpp:

(JSC::FTL::genericGenerationThunkGenerator):
(JSC::FTL::slowPathCallThunkGenerator):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::emitVirtualCall):

  • jit/CCallHelpers.cpp:

(JSC::CCallHelpers::emitJITCodeOver):

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::ArgCollection::ArgCollection):
(JSC::CCallHelpers::ArgCollection::pushRegArg):
(JSC::CCallHelpers::ArgCollection::pushExtraRegArg):
(JSC::CCallHelpers::ArgCollection::pushNonArg):
(JSC::CCallHelpers::ArgCollection::addGPRArg):
(JSC::CCallHelpers::ArgCollection::addGPRExtraArg):
(JSC::CCallHelpers::ArgCollection::addStackArg):
(JSC::CCallHelpers::ArgCollection::addPoke):
(JSC::CCallHelpers::calculatePokeOffset):
(JSC::CCallHelpers::pokeForArgument):
(JSC::CCallHelpers::stackAligned):
(JSC::CCallHelpers::marshallArgumentRegister):
(JSC::CCallHelpers::setupArgumentsImpl):
(JSC::CCallHelpers::pokeArgumentsAligned):
(JSC::CCallHelpers::std::is_integral<CURRENT_ARGUMENT_TYPE>::value):
(JSC::CCallHelpers::std::is_pointer<CURRENT_ARGUMENT_TYPE>::value):
(JSC::CCallHelpers::setupArgumentsEntryImpl):
(JSC::CCallHelpers::setupArguments):
(JSC::CCallHelpers::setupArgumentsForIndirectCall):

  • jit/GCAwareJITStubRoutine.cpp:

(JSC::GCAwareJITStubRoutine::GCAwareJITStubRoutine):
(JSC::GCAwareJITStubRoutine::makeGCAware):
(JSC::GCAwareJITStubRoutine::observeZeroRefCount):
(JSC::PolymorphicAccessJITStubRoutine::PolymorphicAccessJITStubRoutine):
(JSC::PolymorphicAccessJITStubRoutine::observeZeroRefCount):
(JSC::PolymorphicAccessJITStubRoutine::computeHash):
(JSC::MarkingGCAwareJITStubRoutine::MarkingGCAwareJITStubRoutine):
(JSC::GCAwareJITStubRoutineWithExceptionHandler::GCAwareJITStubRoutineWithExceptionHandler):
(JSC::createICJITStubRoutine):
(JSC::createJITStubRoutine): Deleted.

  • jit/GCAwareJITStubRoutine.h:

(JSC::GCAwareJITStubRoutine::create):
(JSC::PolymorphicAccessJITStubRoutine::cases const):
(JSC::PolymorphicAccessJITStubRoutine::weakStructures const):
(JSC::PolymorphicAccessJITStubRoutine::hash const):

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

(JSC::JIT::link):

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

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

  • jit/JITCall32_64.cpp:

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

  • jit/JITCode.h:

(JSC::JITCode::useDataIC):

  • jit/JITInlineCacheGenerator.cpp:

(JSC::JITInlineCacheGenerator::JITInlineCacheGenerator):
(JSC::JITInlineCacheGenerator::finalize):
(JSC::JITByIdGenerator::JITByIdGenerator):
(JSC::JITByIdGenerator::finalize):
(JSC::JITByIdGenerator::generateFastCommon):
(JSC::JITGetByIdGenerator::JITGetByIdGenerator):
(JSC::JITGetByIdWithThisGenerator::JITGetByIdWithThisGenerator):
(JSC::JITPutByIdGenerator::JITPutByIdGenerator):
(JSC::JITDelByValGenerator::JITDelByValGenerator):
(JSC::JITDelByValGenerator::generateFastPath):
(JSC::JITDelByValGenerator::finalize):
(JSC::JITDelByIdGenerator::JITDelByIdGenerator):
(JSC::JITDelByIdGenerator::generateFastPath):
(JSC::JITDelByIdGenerator::finalize):
(JSC::JITInByValGenerator::JITInByValGenerator):
(JSC::JITInByValGenerator::generateFastPath):
(JSC::JITInByValGenerator::finalize):
(JSC::JITInByIdGenerator::JITInByIdGenerator):
(JSC::JITInstanceOfGenerator::JITInstanceOfGenerator):
(JSC::JITInstanceOfGenerator::generateFastPath):
(JSC::JITInstanceOfGenerator::finalize):
(JSC::JITGetByValGenerator::JITGetByValGenerator):
(JSC::JITGetByValGenerator::generateFastPath):
(JSC::JITGetByValGenerator::finalize):
(JSC::JITPrivateBrandAccessGenerator::JITPrivateBrandAccessGenerator):
(JSC::JITPrivateBrandAccessGenerator::generateFastPath):
(JSC::JITPrivateBrandAccessGenerator::finalize):

  • jit/JITInlineCacheGenerator.h:

(JSC::JITGetByIdGenerator::JITGetByIdGenerator): Deleted.
(JSC::JITGetByIdWithThisGenerator::JITGetByIdWithThisGenerator): Deleted.
(JSC::JITPutByIdGenerator::JITPutByIdGenerator): Deleted.
(JSC::JITDelByValGenerator::JITDelByValGenerator): Deleted.
(JSC::JITDelByValGenerator::slowPathJump const): Deleted.
(JSC::JITDelByIdGenerator::JITDelByIdGenerator): Deleted.
(JSC::JITDelByIdGenerator::slowPathJump const): Deleted.
(JSC::JITInByIdGenerator::JITInByIdGenerator): Deleted.
(JSC::JITInstanceOfGenerator::JITInstanceOfGenerator): Deleted.
(JSC::JITGetByValGenerator::JITGetByValGenerator): Deleted.
(JSC::JITGetByValGenerator::slowPathJump const): Deleted.
(JSC::JITPrivateBrandAccessGenerator::JITPrivateBrandAccessGenerator): Deleted.
(JSC::JITPrivateBrandAccessGenerator::slowPathJump const): Deleted.

  • jit/JITInlines.h:

(JSC::JIT::emitLoadForArrayMode):
(JSC::JIT::appendCallWithExceptionCheck):
(JSC::JIT::appendCallWithExceptionCheckSetJSValueResult):
(JSC::JIT::appendCallWithExceptionCheckSetJSValueResultWithProfile):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof):
(JSC::JIT::privateCompileHasIndexedProperty):
(JSC::JIT::emit_op_has_enumerable_indexed_property):
(JSC::JIT::emitSlow_op_has_enumerable_indexed_property):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_instanceof):
(JSC::JIT::privateCompileHasIndexedProperty):
(JSC::JIT::emit_op_has_enumerable_indexed_property):

  • jit/JITOperations.cpp:

(JSC::JSC_DEFINE_JIT_OPERATION):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emitSlow_op_get_by_val):
(JSC::JIT::slow_op_get_by_val_prepareCallGenerator):
(JSC::JIT::emit_op_get_private_name):
(JSC::JIT::emitSlow_op_get_private_name):
(JSC::JIT::slow_op_get_private_name_prepareCallGenerator):
(JSC::JIT::emit_op_set_private_brand):
(JSC::JIT::emitSlow_op_set_private_brand):
(JSC::JIT::emit_op_check_private_brand):
(JSC::JIT::emitSlow_op_check_private_brand):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emitArrayStoragePutByVal):
(JSC::JIT::emitPutByValWithCachedId):
(JSC::JIT::emitSlow_op_put_by_val):
(JSC::JIT::slow_op_put_by_val_prepareCallGenerator):
(JSC::JIT::emit_op_put_private_name):
(JSC::JIT::emitSlow_op_put_private_name):
(JSC::JIT::slow_op_put_private_name_prepareCallGenerator):
(JSC::JIT::emit_op_del_by_id):
(JSC::JIT::emitSlow_op_del_by_id):
(JSC::JIT::slow_op_del_by_id_prepareCallGenerator):
(JSC::JIT::emit_op_del_by_val):
(JSC::JIT::emitSlow_op_del_by_val):
(JSC::JIT::slow_op_del_by_val_prepareCallGenerator):
(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emitSlow_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emitSlow_op_get_by_id_direct):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::slow_op_get_by_id_prepareCallGenerator):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
(JSC::JIT::slow_op_get_by_id_with_this_prepareCallGenerator):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::slow_op_put_by_id_prepareCallGenerator):
(JSC::JIT::emit_op_in_by_id):
(JSC::JIT::emitSlow_op_in_by_id):
(JSC::JIT::emit_op_in_by_val):
(JSC::JIT::emitSlow_op_in_by_val):
(JSC::JIT::privateCompilePutByVal):
(JSC::JIT::privateCompilePutPrivateNameWithCachedId):
(JSC::JIT::privateCompilePutByValWithCachedId):
(JSC::JIT::emitDoubleLoad):
(JSC::JIT::emitContiguousLoad):
(JSC::JIT::emitArrayStorageLoad):
(JSC::JIT::emitIntTypedArrayPutByVal):
(JSC::JIT::emitFloatTypedArrayPutByVal):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_del_by_id):
(JSC::JIT::emit_op_del_by_val):
(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_get_private_name):
(JSC::JIT::emit_op_set_private_brand):
(JSC::JIT::emit_op_check_private_brand):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emitArrayStoragePutByVal):
(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emit_op_in_by_id):
(JSC::JIT::emit_op_in_by_val):

  • jit/JITStubRoutine.h:
  • jit/PolymorphicCallStubRoutine.cpp:

(JSC::PolymorphicCallStubRoutine::PolymorphicCallStubRoutine):

  • jit/Repatch.cpp:

(JSC::readPutICCallTarget):
(JSC::repatchSlowPathCall):
(JSC::tryCacheGetBy):
(JSC::repatchGetBy):
(JSC::tryCacheArrayGetByVal):
(JSC::repatchArrayGetByVal):
(JSC::tryCachePutByID):
(JSC::repatchPutByID):
(JSC::tryCacheDeleteBy):
(JSC::repatchDeleteBy):
(JSC::tryCacheInBy):
(JSC::repatchInBy):
(JSC::tryCacheCheckPrivateBrand):
(JSC::repatchCheckPrivateBrand):
(JSC::tryCacheSetPrivateBrand):
(JSC::repatchSetPrivateBrand):
(JSC::tryCacheInstanceOf):
(JSC::repatchInstanceOf):
(JSC::linkSlowFor):
(JSC::linkVirtualFor):
(JSC::resetGetBy):
(JSC::resetPutByID):
(JSC::resetDelBy):
(JSC::resetInBy):
(JSC::resetInstanceOf):
(JSC::resetCheckPrivateBrand):
(JSC::resetSetPrivateBrand):
(JSC::resetPatchableJump): Deleted.

  • jit/Repatch.h:
  • runtime/Options.cpp:

(JSC::Options::recomputeDependentOptions):

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

(JSC::VM::VM):
(JSC::VM::~VM):

  • runtime/VM.h:

Tools:

  • Scripts/run-jsc-stress-tests:
3:58 AM Changeset in webkit [278655] by aboya@igalia.com
  • 6 edits in trunk/Source

[WTF][GStreamer] Add RAII lockers for 3rd party locks
https://bugs.webkit.org/show_bug.cgi?id=225650

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

This patch introduces RAII locker classes that wrap GST_OBJECT_LOCK
and GST_PAD_STREAM_LOCK to match the style, safety and convenience of
locks from WTF.

This patch also changes all usages of GStreamer locks in the WebKit
codebase to use these new lockers.

This patch introduces no behavior changes.

  • platform/graphics/gstreamer/GStreamerCommon.h:

(gstObjectLock):
(gstObjectUnlock):
(gstPadStreamLock):
(gstPadStreamUnlock):
(holdGstObjectLock):
(holdGstPadStreamLock):

  • platform/graphics/gstreamer/TextCombinerPadGStreamer.cpp:

(webkitTextCombinerPadGetProperty):
(webkitTextCombinerPadSetProperty):

  • platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:

(webKitMediaSrcWaitForPadLinkedOrFlush):
(webKitMediaSrcLoop):
(webKitMediaSrcStreamFlush):
(webKitMediaSrcGetUri):
(webKitMediaSrcSetUri):

Source/WTF:

This patch introduces WTF::ExternalLocker, which allows to lock 3rd
party mutexes in a RAII fashion, very similar to WTF::Locker.

This is used also in WebCore to provide RAII lockers for GStreamer.

  • wtf/Locker.h:

(WTF::unlockFunction):

1:35 AM Changeset in webkit [278654] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests

[GLIB][GTK] Unreviewed test gardening. Mark flakey tests as timeout only.

Several tests marked as flakey have been timing out consistently for
the last 4000 revisions. Mark state accordingly.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
1:25 AM Changeset in webkit [278653] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GTK] Unreviewed test failures. Switch WPT's WOFF2 tests from flakey to image only failure.

  • platform/gtk/TestExpectations:
1:11 AM Changeset in webkit [278652] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Update test expectations.

  • Mark editing/execCommand/switch-list-type-with-orphaned-li.html as flakey.
  • Create new bug for imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiocontext-interface/processing-after-resume.https.html
  • platform/glib/TestExpectations:
12:02 AM Changeset in webkit [278651] by Chris Dumez
  • 5 edits in trunk/Source

Rely on SQLiteDatabase::setMaximumSize() for quota management in LocalStorageDatabase
https://bugs.webkit.org/show_bug.cgi?id=226788

Reviewed by Sihui Liu.

Source/WebCore:

Export SQLiteDatabase::setMaximumSize() so it can be used from WebKit2.

  • platform/sql/SQLiteDatabase.h:

Source/WebKit:

Rely on SQLiteDatabase::setMaximumSize() for quota management in LocalStorageDatabase.
It simplifies the code a bit.

No new test, covered by storage/domstorage/quota.html that is still passing.

  • NetworkProcess/WebStorage/LocalStorageDatabase.cpp:

(WebKit::LocalStorageDatabase::openDatabase):
(WebKit::LocalStorageDatabase::removeItem):
(WebKit::LocalStorageDatabase::setItem):
(WebKit::LocalStorageDatabase::clear):

  • NetworkProcess/WebStorage/LocalStorageDatabase.h:

Jun 8, 2021:

10:48 PM Changeset in webkit [278650] by Diego Pino Garcia
  • 3 edits in trunk/LayoutTests

[GLIB][GTK] Unreviewed test gardening. Update status of flaky tests failing to Failure.

All the tests changed were reported as 'Failure' by the GTK post-commit
bot for the last 4000 revisions.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
10:08 PM Changeset in webkit [278649] by commit-queue@webkit.org
  • 9 edits in trunk/Source

Move PrivacyStance code from WebKitAdditions
https://bugs.webkit.org/show_bug.cgi?id=226774

Patch by Alex Christensen <achristensen@webkit.org> on 2021-06-08
Reviewed by Jer Noble.

Source/WebCore:

  • platform/network/NetworkLoadMetrics.h:

(WebCore::NetworkLoadMetrics::isolatedCopy const):
(WebCore::NetworkLoadMetrics::operator== const):
(WebCore::NetworkLoadMetrics::encode const):
(WebCore::NetworkLoadMetrics::decode):

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(-[WebCoreNSURLSessionTaskTransactionMetrics _privacyStance]):

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(toPrivacyStance):
(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):

Source/WTF:

  • wtf/PlatformHave.h:
10:07 PM Changeset in webkit [278648] by commit-queue@webkit.org
  • 9 edits in trunk

CSSOM test for serializing counter() fails
https://bugs.webkit.org/show_bug.cgi?id=184256

Patch by Rob Buis <rbuis@igalia.com> on 2021-06-08
Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Update improved test result.

  • web-platform-tests/css/cssom/serialize-values-expected.txt:

Source/WebCore:

The last CSS component value should be omitted if it is "decimal" [1].

Behavior matches Firefox and Chrome.

[1] https://drafts.csswg.org/cssom/#serialize-a-css-component-value

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):

LayoutTests:

Adapt to serialization change.

  • fast/css/counters/counter-cssText-expected.txt:
  • fast/css/counters/counter-cssText.html:
  • fast/css/serialization-with-double-quotes-expected.txt:
  • fast/css/serialization-with-double-quotes.html:
10:03 PM Changeset in webkit [278647] by weinig@apple.com
  • 9 edits in trunk/Source

Adopt WTF::Span in SQLiteStatement
https://bugs.webkit.org/show_bug.cgi?id=226773

Reviewed by Alex Christensen.

Source/WebCore:

Do some initial adoption of WTF::Span by adopting it in SQLiteStatement.

  • Removes class BlobView.
  • Renames columnBlobView to columnBlobAsSpan() (mirrors columnBlobAsString() naming) and have it return a Span<const uint8_t>.
  • Replace bindBlob(int index, const void* blob, int size) with bindBlob(int index, Span<const uint8_t>).

Due to implicit construction for types with data() and size() functions (actually anything
that std::data() and std::size() can reason about), Vector and SharedBuffer cleanly work
to convert to Span of the same underlying type. This means that many callers of bindBlob
are now simpler, as instead of doing:

bindBlob(1, foo->data(), foo->size());

we instead do:

bindBlob(1, *foo);

There is much much more to do to take advantage of this new type, but this is
kept intentionally small, as the pulling back the onion can go very deep.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::migrateIndexInfoTableForIDUpdate):
(WebCore::IDBServer::SQLiteIDBBackingStore::migrateIndexRecordsTableForIDUpdate):
(WebCore::IDBServer::SQLiteIDBBackingStore::addExistingIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::extractExistingDatabaseInfo):
(WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedHasIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):
(WebCore::IDBServer::SQLiteIDBBackingStore::getCount):

  • Modules/indexeddb/server/SQLiteIDBCursor.cpp:

(WebCore::IDBServer::SQLiteIDBCursor::bindArguments):
(WebCore::IDBServer::SQLiteIDBCursor::resetAndRebindPreIndexStatementIfNecessary):
(WebCore::IDBServer::SQLiteIDBCursor::internalFetchNextRecord):

  • loader/appcache/ApplicationCacheStorage.cpp:

(WebCore::ApplicationCacheStorage::store):

  • platform/sql/SQLiteStatement.cpp:

(WebCore::SQLiteStatement::bindBlob):
(WebCore::SQLiteStatement::columnBlob):
(WebCore::SQLiteStatement::columnBlobAsSpan):
(WebCore::SQLiteStatement::columnBlobView): Deleted.

  • platform/sql/SQLiteStatement.h:

(WebCore::SQLiteStatement::BlobView::BlobView): Deleted.
(WebCore::SQLiteStatement::BlobView::data): Deleted.
(WebCore::SQLiteStatement::BlobView::size): Deleted.
(): Deleted.

  • workers/service/server/RegistrationDatabase.cpp:

(WebCore::RegistrationDatabase::doPushChanges):
(WebCore::RegistrationDatabase::importRecords):

Source/WebKit:

  • UIProcess/API/glib/IconDatabase.cpp:

(WebKit::IconDatabase::addIcon):
Adopt new bindBlob() signature.

9:55 PM BuildingCairoOnWindows edited by Fujii Hironori
(diff)
9:38 PM Changeset in webkit [278646] by Jean-Yves Avenard
  • 10 edits in trunk/Source

MediaPlayerPrivateRemote::didLoadingProgress should not send synchronous message to GPU process
https://bugs.webkit.org/show_bug.cgi?id=226761
rdar://78834312

Reviewed by Eric Carlson.

Source/WebCore:

Make MediaPlayer::didLoadingProgress method asynchronous. This method is particularly well
suited to be made async as there's only one calling point from the HTMLMediaElement that
occurs when the progressEventTimer gets fired. As such, when the operation is precisely run
isn't particularly relevant as per spec:
"While the load is not suspended (see below), every 350ms (±200ms) or for every byte received,

whichever is least frequent, queue a media element task given the media element to fire an
event named progress at the element.".

This allows to make the query to the GPU process async.
While we can expect the time to query the GPU process to take less than 200ms on average,
there will be no change in the obversable behaviour compare to the previous implementation
where the call to the GPU process was synchronous.
Covered by existing tests.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::progressEventTimerFired): Use new method definition.

  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::didLoadingProgress const):

  • platform/graphics/MediaPlayer.h:
  • platform/graphics/MediaPlayerPrivate.h:

(WebCore::MediaPlayerPrivateInterface::didLoadingProgressAsync const): Add default implementation
that calls the old sync didLoadingProgress method.

Source/WebKit:

  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::didLoadingProgress): Forward call to the actual
proxied MediaPlayer.

  • GPUProcess/media/RemoteMediaPlayerProxy.messages.in: Make message async.
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::didLoadingProgress const): This method should no
longer ever be called, but is required as it's pure-virtual.
(WebKit::MediaPlayerPrivateRemote::didLoadingProgressAsync const):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h: Add new didLoadingProgressAsync method.
9:33 PM Changeset in webkit [278645] by Chris Dumez
  • 25 edits
    2 deletes in trunk/Source/WebCore

Drop legacy EventLoopEventQueue class
https://bugs.webkit.org/show_bug.cgi?id=226748

Reviewed by Darin Adler.

Drop legacy EventLoopEventQueue class which was used by HTMLMediaElement. I added a
queueCancellableTaskToDispatchEvent() convenience function on ActiveDOMObject to
schedule cancellable events directly on the HTML event loop. The function takes
care of keeping the object and its wrapper alive until the event has fired.

Note that the previous code was using EventLoopEventQueue to dispatch events on
other objects than the HTMLMediaElement. This was wrong as it wouldn't take
care of keeping the real target's JS wrapper alive to actually dispatch the
event. As a result, I had to update a couple of media classes to subclass
ActiveDOMObject and the HTMLMediaElement now calls
queueCancellableTaskToDispatchEvent() directly on the target.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/ActiveDOMObject.cpp:

(WebCore::ActiveDOMObjectEventDispatchTask::ActiveDOMObjectEventDispatchTask):
(WebCore::ActiveDOMObject::queueTaskToDispatchEventInternal):
(WebCore::ActiveDOMObject::queueCancellableTaskToDispatchEventInternal):

  • dom/ActiveDOMObject.h:
  • dom/EventLoopEventQueue.cpp: Removed.
  • dom/EventLoopEventQueue.h: Removed.
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::scheduleEvent):
(WebCore::HTMLMediaElement::updateActiveTextTrackCues):
(WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
(WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
(WebCore::HTMLMediaElement::mediaPlayerInitializationDataEncountered):
(WebCore::HTMLMediaElement::closeTaskQueues):
(WebCore::HTMLMediaElement::virtualHasPendingActivity const):
(WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent):
(WebCore::HTMLMediaElement::scheduleEventOn):

  • html/HTMLMediaElement.h:
  • html/track/InbandTextTrack.cpp:

(WebCore::InbandTextTrack::create):

  • html/track/LoadableTextTrack.cpp:

(WebCore::LoadableTextTrack::create):

  • html/track/TextTrack.cpp:

(WebCore::TextTrack::TextTrack):
(WebCore::TextTrack::create):
(WebCore::TextTrack::activeDOMObjectName const):

  • html/track/TextTrack.h:
  • html/track/TextTrack.idl:
  • html/track/TextTrackCue.cpp:

(WebCore::TextTrackCue::create):
(WebCore::TextTrackCue::TextTrackCue):
(WebCore::TextTrackCue::activeDOMObjectName const):

  • html/track/TextTrackCue.h:
  • html/track/TextTrackCue.idl:
8:29 PM Changeset in webkit [278644] by Megan Gardner
  • 4 edits in trunk/Source/WebKit

Upstream AppHighlight Observer code
https://bugs.webkit.org/show_bug.cgi?id=226794

Reviewed by Tim Horton.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::appHighlightsVisibility):
(WebKit::WebPageProxy::setUpHighlightsObserver):

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

(-[WKContentView setUpAppHighlightMenusIfNeeded]):

8:04 PM Changeset in webkit [278643] by Diego Pino Garcia
  • 2 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Update test expectation status of imported/w3c/web-platform-tests/media-source/mediasource-changetype-play.html.

  • platform/glib/TestExpectations:
7:32 PM Changeset in webkit [278642] by rmorisset@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix speculated type in speculateNeitherDoubleNorHeapBigIntNorString
https://bugs.webkit.org/show_bug.cgi?id=226786

Reviewed by Mark Lam.

I had forgotten the HeapBigInt part.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::speculateNeitherDoubleNorHeapBigIntNorString):

7:26 PM Changeset in webkit [278641] by Ben Nham
  • 4 edits in trunk/Source/WTF

Use access instead of stat in some filesystem functions
https://bugs.webkit.org/show_bug.cgi?id=226667

Reviewed by Chris Dumez.

We are spending a bit more time in WTF::FileSystemImpl functions after the move to
std::filesystem (https://bugs.webkit.org/show_bug.cgi?id=225255). In particular, several
std::filesystem functions (like the ones called by fileExists and makeAllDirectories) prefer
to use stat() over access() for file existence checks. Since our sandbox has a fast path for
access(path, F_OK) but not for stat, we ended up spending more time in sandbox evaluation in
the kernel after the move to std::filesystem.

Note that the two checks don't do exactly the same thing. access(path, F_OK) only checks for
path existence, while stat(path) additionally fetches metadata, which requires checking the
file-read-metadata permission. But in practice our code was written to be fine with just
checking for existence.

To work around this, I've re-introduced some of the old WTF::FileSystemImpl functions from
FileSystemPosix.cpp. They are the ones that are called by NetworkCache, which seems to be
the biggest consumer of these functions. The rest of the functions are still implemented
using std::filesystem.

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::fileExists):
(WTF::FileSystemImpl::deleteFile):
(WTF::FileSystemImpl::makeAllDirectories):
(WTF::FileSystemImpl::pathByAppendingComponent):
(WTF::FileSystemImpl::pathByAppendingComponents):

  • wtf/PlatformEnableCocoa.h:
  • wtf/posix/FileSystemPOSIX.cpp:

(WTF::FileSystemImpl::fileExists):
(WTF::FileSystemImpl::deleteFile):
(WTF::FileSystemImpl::makeAllDirectories):
(WTF::FileSystemImpl::pathByAppendingComponent):
(WTF::FileSystemImpl::pathByAppendingComponents):

7:23 PM Changeset in webkit [278640] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

Unreviewed, followup to r278630

  • Modules/applepay/ApplePaySession.h:

Remove mentions of file that doesn't exist anymore.

6:48 PM Changeset in webkit [278639] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix new -Wreturn-type warning
https://bugs.webkit.org/show_bug.cgi?id=226718
<rdar://problem/78947485>

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-06-08

  • rendering/HighlightData.cpp:

(WebCore::HighlightData::rangeForTextBox):

6:12 PM Changeset in webkit [278638] by Dewei Zhu
  • 3 edits in trunk/Tools

Increase http server launch timeout on run-benchmark script.
https://bugs.webkit.org/show_bug.cgi?id=226801

Reviewed by Ryosuke Niwa.

Installing twisted module in http server may take longer than 7.5 seconds.
Increase the timeout to be 31.5 seconds and add an early terminate if http server
process is not running.

  • Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:

Removed unused import.

  • Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:

(SimpleHTTPServerDriver.serve):

6:10 PM Changeset in webkit [278637] by Diego Pino Garcia
  • 1 edit
    8 adds in trunk/LayoutTests

[GTK] Unreviewed test gardening. Emit GTK baselines for several SVG tests.

Other platforms have specific baselines for these tests, including WPE.

The GTK post-commit bot reports these tests have been consistently
failing for the last 4000 revisions, so emiting baselines is the first
step to check if these tests are actually passing.

  • platform/gtk/svg/W3C-SVG-1.1/animate-elem-03-t-expected.txt: Added.
  • platform/gtk/svg/W3C-SVG-1.1/animate-elem-22-b-expected.txt: Added.
  • platform/gtk/svg/text/select-textLength-spacing-squeeze-3-expected.txt: Added.
  • platform/gtk/svg/text/select-textLength-spacing-stretch-1-expected.txt: Added.
  • platform/gtk/svg/text/select-textLength-spacingAndGlyphs-squeeze-1-expected.txt: Added.
  • platform/gtk/svg/text/select-textLength-spacingAndGlyphs-stretch-1-expected.txt: Added.
  • platform/gtk/svg/text/select-x-list-1-expected.txt: Added.
  • platform/gtk/svg/text/select-x-list-with-tspans-1-expected.txt: Added.
6:09 PM Changeset in webkit [278636] by Russell Epstein
  • 1 copy in tags/Safari-612.1.17

Tag Safari-612.1.17.

6:02 PM Changeset in webkit [278635] by Jean-Yves Avenard
  • 3 edits
    2 adds in trunk

[MSE] Assertion if attempting to perform eviction before playback starts.
https://bugs.webkit.org/show_bug.cgi?id=226720
<rdar://problem/78943223>

Reviewed by Eric Carlson.

Source/WebCore:

Handle the case where the buffered range doesn't yet exist as we haven't parsed
an init segment yet.
Test: media/media-source/media-source-append-buffer-full-quota-exceeded-error-onstart.html

  • platform/graphics/SourceBufferPrivate.cpp:

(WebCore::SourceBufferPrivate::evictCodedFrames): Exit early if the buffered range is empty
and handle the case where a buffered range index wasn't found.

LayoutTests:

  • media/media-source/media-source-append-buffer-full-quota-exceeded-error-onstart-expected.txt: Added.
  • media/media-source/media-source-append-buffer-full-quota-exceeded-error-onstart.html: Added.
5:00 PM Changeset in webkit [278634] by Diego Pino Garcia
  • 1 edit
    1 move
    1 add in trunk/LayoutTests

[GLIB][WPE] Unreviewed test gardening. Move WPE baseline for WPT test 'report-same-origin-with-cookies.html' to GLIB.

  • platform/glib/imported/w3c/web-platform-tests/content-security-policy/reporting/report-same-origin-with-cookies-expected.txt: Renamed from LayoutTests/platform/wpe/imported/w3c/web-platform-tests/content-security-policy/reporting/report-same-origin-with-cookies-expected.txt.
4:30 PM Changeset in webkit [278633] by Wenson Hsieh
  • 4 edits
    2 adds in trunk

[iOS] Safari tab pill should toggle visibility when tapping on article text on adventure.com
https://bugs.webkit.org/show_bug.cgi?id=226775
rdar://78826820

Reviewed by Tim Horton and Devin Rousso.

Source/WebKit:

Adjust the meaningful click heuristic to account for click event listeners added to the document node. See below
for more details.

Test: fast/events/ios/non-meaningful-click-when-tapping-document.html

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getPlatformEditorState const):
(WebKit::isProbablyMeaningfulClick):

Remove a check for whether or not the clicked node is an Element; this existed because the call to
rootViewBoundsForElement below takes an Element rather than just a Node; however, this method doesn't do
anything that requires an Element instead of a Node, so we can just remove the check and refactor these static
methods to accept Nodes. This allows us to bail early if the clicked node is *either* the body or the document
node, instead of just the body.

(WebKit::WebPage::insertDroppedImagePlaceholders):
(WebKit::elementBoundsInFrame):
(WebKit::WebPage::rootViewBounds):
(WebKit::WebPage::absoluteInteractionBounds):
(WebKit::WebPage::rootViewInteractionBounds):

Drive-by refactoring: drop the -ForElement suffixes on these helper methods, and additionally make them accept
a Node instead of requiring an Element. This allows us to remove the is<Element>() check from the meaningful
click heuristic above.

Also deploy RefPtr in a few more places.

(WebKit::WebPage::dispatchSyntheticMouseEventsForSelectionGesture):
(WebKit::WebPage::focusedElementInformation):
(WebKit::WebPage::rootViewBoundsForElement): Deleted.
(WebKit::WebPage::absoluteInteractionBoundsForElement): Deleted.
(WebKit::WebPage::rootViewInteractionBoundsForElement): Deleted.

LayoutTests:

  • fast/events/ios/non-meaningful-click-when-tapping-document-expected.txt: Added.
  • fast/events/ios/non-meaningful-click-when-tapping-document.html: Added.
3:48 PM Changeset in webkit [278632] by Diego Pino Garcia
  • 8 edits in trunk/LayoutTests

[GTK] Unreviewed test gardening. Update GTK baselines of several ARIA tests.

These tests are marked as flaky under bug webkit.org/b/182761.

The GTK post-commit bot reports these tests have been consistently
failing for the last 4000 revisions, so at least their baselines
should be updated. I won't remove the tests from test expectations for
now.

  • accessibility/gtk/aria-busy-changed-notification-expected.txt:
  • accessibility/gtk/aria-current-changed-notification-expected.txt:
  • accessibility/gtk/aria-disabled-changed-notification-expected.txt:
  • accessibility/gtk/aria-expanded-changed-notification-expected.txt:
  • accessibility/gtk/aria-pressed-changed-notification-expected.txt:
  • accessibility/gtk/aria-readonly-changed-notification-expected.txt:
  • accessibility/gtk/aria-required-changed-notification-expected.txt:
3:19 PM Changeset in webkit [278631] by Diego Pino Garcia
  • 2 edits
    1 delete in trunk/LayoutTests

[GTK] Unreviewed test gardening. Remove obsolete GTK baseline for WPT test 'createImageBitmap-serializable.html'.

  • platform/glib/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-serializable-expected.txt: Removed.
3:15 PM Changeset in webkit [278630] by Devin Rousso
  • 64 edits
    9 copies
    8 moves
    14 adds in trunk

[Payment Request] upstream new features
https://bugs.webkit.org/show_bug.cgi?id=226740
<rdar://problem/78963132>

Reviewed by Andy Estes.

Source/WebCore:

  • recurring line items (HAVE_PASSKIT_RECURRING_SUMMARY_ITEM and ENABLE_APPLE_PAY_RECURRING_LINE_ITEM)
  • deferred line items (HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM and ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM)
  • estimated shipping dates (HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE and ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE)
  • coupon code entry (HAVE_PASSKIT_COUPON_CODE and ENABLE_APPLE_PAY_COUPON_CODE)
  • shipped vs in-store pickup (HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE and ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE)

Tests: http/tests/paymentrequest/ApplePayModifier-additionalLineItems.https.html

http/tests/paymentrequest/ApplePayModifier-additionalShippingMethods.https.html
http/tests/paymentrequest/ApplePayModifier-total.https.html
http/tests/paymentrequest/paymentmethodchange-couponCode.https.html
http/tests/paymentrequest/paymentrequest-couponCode.https.html
http/tests/paymentrequest/paymentrequest-shippingContactEditingMode.https.html
http/tests/paymentrequest/paymentrequest-supportsCouponCode.https.html

  • Modules/applepay/ApplePayCouponCodeUpdate.idl: Copied from Source/WebCore/Modules/applepay/ApplePayPaymentMethodModeUpdate.idl.
  • Modules/applepay/ApplePayCouponCodeUpdate.h: Renamed from Source/WebCore/Modules/applepay/ApplePayPaymentMethodModeUpdate.h.

(WebCore::ApplePayCouponCodeUpdate::encode const):
(WebCore::ApplePayCouponCodeUpdate::decode):
Object used to update the payment request via ApplePaySession.prototype.completeCouponCodeChange
when responding to the user modifying the coupon code.

  • Modules/applepay/ApplePayErrorCode.idl:
  • Modules/applepay/ApplePayErrorCode.h:

Add "couponCodeInvalid" and "couponCodeExpired".

  • Modules/applepay/ApplePayLineItem.idl:
  • Modules/applepay/ApplePayLineItem.h:

(WebCore::ApplePayLineItem::encode const):
(WebCore::ApplePayLineItem::decode):

  • Modules/applepay/ApplePayPaymentTiming.idl: Added.
  • Modules/applepay/ApplePayPaymentTiming.h: Added.
  • Modules/applepay/ApplePayRecurringPaymentDateUnit.idl: Added.
  • Modules/applepay/ApplePayRecurringPaymentDateUnit.h: Added.

Add members that indicate whether this line item is immediate, recurring, or deferred.
Depending on that timing, additional members are added for further configuration (e.g. the
start and/or end date of a recurring payment, it's frequency, etc.).

  • Modules/applepay/ApplePayShippingMethod.idl:
  • Modules/applepay/ApplePayShippingMethod.h:

(WebCore::ApplePayShippingMethod::encode const):
(WebCore::ApplePayShippingMethod::decode):

  • Modules/applepay/ApplePayDateComponentsRange.idl: Added.
  • Modules/applepay/ApplePayDateComponentsRange.h: Added.

(WebCore::ApplePayDateComponentsRange::encode const):
(WebCore::ApplePayDateComponentsRange::decode):

  • Modules/applepay/ApplePayDateComponents.idl: Added.
  • Modules/applepay/ApplePayDateComponents.h: Added.

(WebCore::ApplePayDateComponents::encode const):
(WebCore::ApplePayDateComponents::decode):
Add members that can be used to indicate the estimated shipping dates for this shipping method.

  • Modules/applepay/ApplePayRequestBase.idl:
  • Modules/applepay/ApplePayRequestBase.h:
  • Modules/applepay/ApplePayRequestBase.cpp:

(WebCore::convertAndValidate):

  • Modules/applepay/ApplePaySessionPaymentRequest.h:

(WebCore::ApplePaySessionPaymentRequest::supportsCouponCode const): Added.
(WebCore::ApplePaySessionPaymentRequest::setSupportsCouponCode): Added.
(WebCore::ApplePaySessionPaymentRequest::couponCode const): Added.
(WebCore::ApplePaySessionPaymentRequest::setCouponCode): Added.
(WebCore::ApplePaySessionPaymentRequest::shippingContactEditingMode const): Added.
(WebCore::ApplePaySessionPaymentRequest::setShippingContactEditingMode): Added.

  • Modules/applepay/ApplePayShippingContactEditingMode.idl: Added.
  • Modules/applepay/ApplePayShippingContactEditingMode.h: Added.

Add members that indicate:

  • whether this payment request supports a coupon code at all
  • the initial coupon code (assuming the above)
  • whether this payment request allows editing the shipping contact (i.e. in-store pickup does not)
  • dom/EventNames.h:
  • dom/EventNames.in:
  • Modules/applepay/ApplePayCouponCodeChangedEvent.idl: Added.
  • Modules/applepay/ApplePayCouponCodeChangedEvent.h: Added.
  • Modules/applepay/ApplePayCouponCodeChangedEvent.cpp: Added.

(WebCore::ApplePayCouponCodeChangedEvent::ApplePayCouponCodeChangedEvent):
(WebCore::ApplePayCouponCodeChangedEvent::eventInterface const):
Add a "couponcodechange" event that is dispatched whenever the user modifies the coupon code for an ApplePaySession.

  • Modules/applepay/ApplePayCouponCodeDetails.idl: Copied from Source/WebCore/Modules/applepay/ApplePayPaymentMethodModeDetails.idl.
  • Modules/applepay/ApplePayCouponCodeDetails.h: Copied from Source/WebCore/Modules/applepay/ApplePayPaymentMethodModeUpdate.idl.

Used as the object methodData when a PaymentMethodChangeEvent is dispatched for a PaymentRequest.

  • Modules/applepay/ApplePaySession.idl:
  • Modules/applepay/ApplePaySession.h:
  • Modules/applepay/ApplePaySession.cpp:

(WebCore::convertAndValidate):
(WebCore::ApplePaySession::completeCouponCodeChange): Added.
(WebCore::ApplePaySession::didChangeCouponCode): Renamed from WebCore::ApplePaySession::didChangePaymentMethodMode.
(WebCore::ApplePaySession::canSuspendWithoutCanceling const):
(WebCore::ApplePaySession::canBegin const):
(WebCore::ApplePaySession::canAbort const):
(WebCore::ApplePaySession::canCancel const):
(WebCore::ApplePaySession::canCompleteShippingMethodSelection const):
(WebCore::ApplePaySession::canCompleteShippingContactSelection const):
(WebCore::ApplePaySession::canCompletePaymentMethodSelection const):
(WebCore::ApplePaySession::canCompleteCouponCodeChange const): Renamed from WebCore::ApplePaySession::canCompletePaymentMethodModeChange const.
(WebCore::ApplePaySession::canCompletePayment const):
(WebCore::ApplePaySession::isFinalState const):

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:

(WebCore::ApplePayPaymentHandler::paymentMethodUpdated):
(WebCore::ApplePayPaymentHandler::didChangeCouponCode): Renamed from WebCore::ApplePayPaymentHandler::didChangePaymentMethodMode.
Add methods for JS to call and state logic to handle coupon code changes.

  • Modules/applepay/PaymentCoordinator.h:
  • Modules/applepay/PaymentCoordinator.cpp:

(WebCore::PaymentCoordinator::completeCouponCodeChange): Renamed from WebCore::PaymentCoordinator::completePaymentMethodModeChange.
(WebCore::PaymentCoordinator::didChangeCouponCode): Renamed from WebCore::PaymentCoordinator::didChangePaymentMethodMode.

  • Modules/applepay/PaymentCoordinatorClient.h:
  • loader/EmptyClients.cpp:

(WebCore::EmptyPaymentCoordinatorClient::completeCouponCodeChange): Renamed from WebCore::EmptyPaymentCoordinatorClient::completePaymentMethodModeChange.
Plumbing up to WebKit.

  • Modules/applepay/cocoa/PaymentSummaryItemsCocoa.mm:

(WebCore::toDate): Added.
(WebCore::toCalendarUnit): Added.
(WebCore::toPKPaymentSummaryItem):
Convert WebCore objects to PassKit objects.

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

(WebCore::MockPaymentCoordinator::showPaymentUI):
(WebCore::MockPaymentCoordinator::completeCouponCodeChange): Renamed from WebCore::MockPaymentCoordinator::completePaymentMethodModeChange.
(WebCore::MockPaymentCoordinator::changeCouponCode): Added.

  • Modules/applepay/cocoa/PaymentAPIVersionCocoa.mm:

(WebCore::PaymentAPIVersion::current):

  • Modules/applepay/PaymentHeaders.h:
  • Modules/applepay/PaymentSession.h:
  • Modules/applepay/ApplePayLineItemData.idl: Removed.
  • Modules/applepay/ApplePayLineItemData.h: Removed.
  • Modules/applepay/ApplePayShippingMethodData.idl: Removed.
  • Modules/applepay/ApplePayShippingMethodData.h: Removed.

Remove unnecessary base types after r275169.

  • PlatformMac.cmake:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:

Source/WebCore/PAL:

  • recurring line items (HAVE_PASSKIT_RECURRING_SUMMARY_ITEM and ENABLE_APPLE_PAY_RECURRING_LINE_ITEM)
  • deferred line items (HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM and ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM)
  • estimated shipping dates (HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE and ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE)
  • coupon code entry (HAVE_PASSKIT_COUPON_CODE and ENABLE_APPLE_PAY_COUPON_CODE)
  • shipped vs in-store pickup (HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE and ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE)
  • pal/cocoa/PassKitSoftLink.h:
  • pal/cocoa/PassKitSoftLink.mm:
  • pal/spi/cocoa/PassKitSPI.h:

Source/WebKit:

  • recurring line items (HAVE_PASSKIT_RECURRING_SUMMARY_ITEM and ENABLE_APPLE_PAY_RECURRING_LINE_ITEM)
  • deferred line items (HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM and ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM)
  • estimated shipping dates (HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE and ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE)
  • coupon code entry (HAVE_PASSKIT_COUPON_CODE and ENABLE_APPLE_PAY_COUPON_CODE)
  • shipped vs in-store pickup (HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE and ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE)
  • Platform/cocoa/PaymentAuthorizationViewController.mm: (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didChangeCouponCode:handler:]): Added.
  • Platform/ios/PaymentAuthorizationController.mm: (-[WKPaymentAuthorizationControllerDelegate paymentAuthorizationController:didChangeCouponCode:handler:]): Added.
  • Platform/cocoa/PaymentAuthorizationPresenter.h:
  • Platform/cocoa/PaymentAuthorizationPresenter.mm:

(WebKit::toPKPaymentErrorCode):
(WebKit::PaymentAuthorizationPresenter::completeCouponCodeChange): Renamed from WebKit::PaymentAuthorizationPresenter::completePaymentMethodModeChange.

  • Platform/cocoa/WKPaymentAuthorizationDelegate.h:
  • Platform/cocoa/WKPaymentAuthorizationDelegate.mm:

(-[WKPaymentAuthorizationDelegate completeCouponCodeChange:]): Added.
(toDateComponents): Added.
(toDateComponentsRange): Added.
(toShippingMethod):
(-[WKPaymentAuthorizationDelegate _didChangeCouponCode:completion:]): Added.
Add plumbing from/to PassKit for coupon code changes.

  • Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in:
  • Shared/ApplePay/WebPaymentCoordinatorProxy.h:
  • Shared/ApplePay/WebPaymentCoordinatorProxy.cpp:

(WebKit::WebPaymentCoordinatorProxy::completeCouponCodeChange): Renamed from WebKit::WebPaymentCoordinatorProxy::completePaymentMethodModeChange.
(WebKit::WebPaymentCoordinatorProxy::presenterDidChangeCouponCode): Renamed from WebKit::WebPaymentCoordinatorProxy::presenterDidChangePaymentMethodMode.
(WebKit::WebPaymentCoordinatorProxy::canBegin const):
(WebKit::WebPaymentCoordinatorProxy::canCancel const):
(WebKit::WebPaymentCoordinatorProxy::canCompletePayment const):
(WebKit::WebPaymentCoordinatorProxy::canAbort const):

  • Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::toNSDateComponents): Added.
(WebKit::toPKDateComponentsRange): Added.
(WebKit::toPKShippingMethod):
(WebKit::toPKShippingContactEditingMode): Added.
(WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest):
(WebKit::WebPaymentCoordinatorProxy::platformCompleteCouponCodeChange): Renamed from WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentMethodModeChange.
Convert PassKit objects to/from WebCore objects.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<WebCore::ApplePaySessionPaymentRequest>::encode):
(IPC::ArgumentCoder<WebCore::ApplePaySessionPaymentRequest>::decode):

  • WebProcess/ApplePay/WebPaymentCoordinator.messages.in:
  • WebProcess/ApplePay/WebPaymentCoordinator.h:
  • WebProcess/ApplePay/WebPaymentCoordinator.cpp:

(WebKit::WebPaymentCoordinator::completeCouponCodeChange): Renamed from WebKit::WebPaymentCoordinator::completePaymentMethodModeChange.
(WebKit::WebPaymentCoordinator::didChangeCouponCode): Renamed from WebKit::WebPaymentCoordinator::didChangePaymentMethodMode.
Plumbing into/from WebCore.

Source/WebKitLegacy/mac:

  • recurring line items (HAVE_PASSKIT_RECURRING_SUMMARY_ITEM and ENABLE_APPLE_PAY_RECURRING_LINE_ITEM)
  • deferred line items (HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM and ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM)
  • estimated shipping dates (HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE and ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE)
  • coupon code entry (HAVE_PASSKIT_COUPON_CODE and ENABLE_APPLE_PAY_COUPON_CODE)
  • shipped vs in-store pickup (HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE and ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE)
  • WebCoreSupport/WebPaymentCoordinatorClient.h:
  • WebCoreSupport/WebPaymentCoordinatorClient.mm:

(WebPaymentCoordinatorClient::completeCouponCodeChange): Renamed from WebPaymentCoordinatorClient::completePaymentMethodModeChange.

Source/WTF:

  • recurring line items (HAVE_PASSKIT_RECURRING_SUMMARY_ITEM and ENABLE_APPLE_PAY_RECURRING_LINE_ITEM)
  • deferred line items (HAVE_PASSKIT_DEFERRED_SUMMARY_ITEM and ENABLE_APPLE_PAY_DEFERRED_LINE_ITEM)
  • estimated shipping dates (HAVE_PASSKIT_SHIPPING_METHOD_DATE_COMPONENTS_RANGE and ENABLE_APPLE_PAY_SHIPPING_METHOD_DATE_COMPONENTS_RANGE)
  • coupon code entry (HAVE_PASSKIT_COUPON_CODE and ENABLE_APPLE_PAY_COUPON_CODE)
  • shipped vs in-store pickup (HAVE_PASSKIT_SHIPPING_CONTACT_EDITING_MODE and ENABLE_APPLE_PAY_SHIPPING_CONTACT_EDITING_MODE)
  • wtf/PlatformHave.h:
  • wtf/PlatformEnableCocoa.h:

LayoutTests:

  • http/tests/paymentrequest/ApplePayModifier-additionalLineItems.https.html: Added.
  • http/tests/paymentrequest/ApplePayModifier-additionalLineItems.https-expected.txt: Added.
  • http/tests/paymentrequest/ApplePayModifier-additionalShippingMethods.https.html: Added.
  • http/tests/paymentrequest/ApplePayModifier-additionalShippingMethods.https-expected.txt: Added.
  • http/tests/paymentrequest/ApplePayModifier-total.https.html: Added.
  • http/tests/paymentrequest/ApplePayModifier-total.https-expected.txt: Added.
  • http/tests/paymentrequest/paymentmethodchange-couponCode.https.html: Added.
  • http/tests/paymentrequest/paymentmethodchange-couponCode.https-expected.txt: Added.
  • http/tests/paymentrequest/paymentrequest-couponCode.https.html: Added.
  • http/tests/paymentrequest/paymentrequest-couponCode.https-expected.txt: Added.
  • http/tests/paymentrequest/paymentrequest-shippingContactEditingMode.https.html: Added.
  • http/tests/paymentrequest/paymentrequest-shippingContactEditingMode.https-expected.txt: Added.
  • http/tests/paymentrequest/paymentrequest-supportsCouponCode.https.html: Added.
  • http/tests/paymentrequest/paymentrequest-supportsCouponCode.https-expected.txt: Added.
  • http/tests/ssl/applepay/ApplePayError-expected.txt:
  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
2:39 PM Changeset in webkit [278629] by Truitt Savell
  • 3 edits in trunk/LayoutTests

Fix test expectations for plugin tests on arm64
https://bugs.webkit.org/show_bug.cgi?id=226783

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
2:26 PM Changeset in webkit [278628] by Russell Epstein
  • 1 copy in tags/Safari-612.1.16.5

Tag Safari-612.1.16.5.

1:44 PM Changeset in webkit [278627] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix build after r278621
https://bugs.webkit.org/show_bug.cgi?id=226731
<rdar://problem/79021715>

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-06-08

  • rendering/MarkedText.cpp:
1:18 PM Changeset in webkit [278626] by Devin Rousso
  • 3 edits in trunk/LayoutTests

Unreviewed, followup to r278622

Skip http/tests/media/modern-media-controls/overflow-support on non-WK2 macOS and iOS
since those tests rely on macOS functionality and new iOS features.

12:59 PM Changeset in webkit [278625] by Russell Epstein
  • 8 edits in branches/safari-612.1.16-branch/Source

Versioning.

WebKit-7612.1.16.5

12:58 PM Changeset in webkit [278624] by Fujii Hironori
  • 3 edits in trunk/Tools

run-webkit-tests: TaskPool reports PicklingError for Windows Python
https://bugs.webkit.org/show_bug.cgi?id=226710

Reviewed by Jonathan Bedard.

Since r278454 changed run-webkit-tests to use TaskPool,
run-webkit-tests reported PicklingError for Windows Python. It
couldn't pickle Port object. This issue happened on multi-core PC,
but on single CPU tester bot machines.

WrappedPopen couldn't be pickled because it was defined as an
inner class. It should be defined at the top-level.

The instance variables _web_platform_test_server,
_websocket_server_temporary_directory, and
_websocket_secure_server of Port object aren't pickleable. Make
them class variables.

  • Scripts/webkitpy/common/system/executive.py:

(WrappedPopen):
(Executive.WrappedPopen):

  • Scripts/webkitpy/port/base.py:

(Port):
(Port.init):
(Port.ports_to_forward):
(Port.is_websocket_server_running):
(Port.is_wpt_server_running):
(Port.start_websocket_server):
(Port.start_web_platform_test_server):
(Port.stop_websocket_server):
(Port.stop_web_platform_test_server):

12:16 PM Changeset in webkit [278623] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed Windows build fix after r278619.

  • platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:

(WebCore::CDMSessionAVFoundationCF::generateKeyRequest):

11:39 AM Changeset in webkit [278622] by Devin Rousso
  • 3 edits
    3 adds in trunk

[Modern Media Controls] Don't show Playback Speed when up-to-date Live Boadcasts
https://bugs.webkit.org/show_bug.cgi?id=226744

Reviewed by Eric Carlson.

Source/WebCore:

Test: http/tests/media/modern-media-controls/overflow-support/playback-speed-live-broadcast.html

  • Modules/modern-media-controls/media/overflow-support.js:

(OverflowSupport.prototype.get mediaEvents):
(OverflowSupport.prototype.syncControl):
(OverflowSupport.prototype.get _includePlaybackRates): Added.
Rework existing logic that determines whether to include "Playback Speed" into a separate
function for clarity.

LayoutTests:

  • http/tests/media/modern-media-controls/overflow-support/playback-speed-live-broadcast.html: Added.
  • http/tests/media/modern-media-controls/overflow-support/playback-speed-live-broadcast-expected.txt: Added.
11:02 AM Changeset in webkit [278621] by Antti Koivisto
  • 8 edits in trunk

Factor MarkedText collection out of LegacyInlineTextBox
https://bugs.webkit.org/show_bug.cgi?id=226731

Reviewed by Sam Weinig.

Source/WebCore:

Move more code out from the legacy inline classes.

  • rendering/LegacyInlineTextBox.cpp:

(WebCore::LegacyInlineTextBox::paint):
(WebCore::LegacyInlineTextBox::hasMarkers const):
(WebCore::LegacyInlineTextBox::paintPlatformDocumentMarkers):
(WebCore::LegacyInlineTextBox::calculateUnionOfAllDocumentMarkerBounds const):
(WebCore::LegacyInlineTextBox::paintMarkedTexts):
(WebCore::LegacyInlineTextBox::highlightStartEnd const): Deleted.
(WebCore::LegacyInlineTextBox::collectMarkedTextsForDraggedContent): Deleted.
(WebCore::LegacyInlineTextBox::collectMarkedTextsForDocumentMarkers const): Deleted.
(WebCore::LegacyInlineTextBox::collectMarkedTextsForHighlights const): Deleted.

  • rendering/LegacyInlineTextBox.h:

(WebCore::LegacyInlineTextBox::paintMarkedTexts):

  • rendering/MarkedText.cpp:

(WebCore::MarkedText::subdivide):
(WebCore::MarkedText::collectForHighlights):
(WebCore::MarkedText::collectForDocumentMarkers):
(WebCore::MarkedText::collectForDraggedContent):
(WebCore::subdivide): Deleted.

  • rendering/MarkedText.h:

(WebCore::MarkedText::operator== const):

  • rendering/MarkedTextStyle.cpp:

(WebCore::subdivideAndResolveStyle):

Tools:

  • TestWebKitAPI/Tests/WebCore/MarkedText.cpp:

(TestWebKitAPI::TEST):

11:01 AM Changeset in webkit [278620] by Truitt Savell
  • 1880 edits
    2 moves
    119 adds
    171 deletes in trunk

Unreviewed, reverting r278609.

Broke builds with a linker error.

Reverted changeset:

"Update libwebrtc to M92"
https://bugs.webkit.org/show_bug.cgi?id=226494
https://commits.webkit.org/r278609

10:35 AM Changeset in webkit [278619] by Chris Dumez
  • 77 edits in trunk/Source

Reduce use of reinterpret_cast<> in the codebase
https://bugs.webkit.org/show_bug.cgi?id=226743

Reviewed by Darin Adler.

Source/WebCore:

  • Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:

(WebCore::CDMSessionClearKey::generateKeyRequest):

  • Modules/fetch/FetchBody.cpp:

(WebCore::FetchBody::take):

  • Modules/fetch/FetchBodyConsumer.cpp:

(WebCore::FetchBodyConsumer::resolve):
(WebCore::FetchBodyConsumer::takeAsBlob):
(WebCore::FetchBodyConsumer::takeAsText):

  • Modules/mediastream/RTCDataChannelRemoteHandler.cpp:

(WebCore::RTCDataChannelRemoteHandler::readyToSend):
(WebCore::RTCDataChannelRemoteHandler::sendStringData):
(WebCore::RTCDataChannelRemoteHandler::sendRawData):

  • Modules/webaudio/MediaStreamAudioSourceGStreamer.cpp:

(WebCore::copyBusData):

  • Modules/webauthn/AuthenticatorResponseData.h:

(WebCore::encodeArrayBuffer):
(WebCore::decodeArrayBuffer):

  • Modules/websockets/WebSocketChannel.cpp:

(WebCore::WebSocketChannel::startClosingHandshake):
(WebCore::WebSocketChannel::processOutgoingFrameQueue):

  • Modules/websockets/WebSocketHandshake.cpp:

(WebCore::WebSocketHandshake::getExpectedWebSocketAccept):
(WebCore::headerHasValidHTTPVersion):

  • bindings/js/ScriptBufferSourceProvider.h:
  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneDeserializer::readString):

  • contentextensions/SerializedNFA.cpp:

(WebCore::ContentExtensions::SerializedNFA::pointerAtOffsetInFile const):

  • dom/Node.cpp:

(WebCore::hashPointer):

  • dom/TextEncoder.cpp:

(WebCore::TextEncoder::encode const):

  • dom/TextEncoderStreamEncoder.cpp:

(WebCore::TextEncoderStreamEncoder::flush):

  • editing/cocoa/WebContentReaderCocoa.mm:

(WebCore::sanitizeMarkupWithArchive):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::texImageArrayBufferViewHelper):

  • inspector/DOMPatchSupport.cpp:

(WebCore::addStringToSHA1):

  • loader/TextResourceDecoder.cpp:

(WebCore::TextResourceDecoder::textFromUTF8):

  • loader/cache/CachedScript.cpp:

(WebCore::CachedScript::script):

  • page/cocoa/ResourceUsageOverlayCocoa.mm:

(WebCore::showText):

  • platform/SharedBufferChunkReader.cpp:

(WebCore::SharedBufferChunkReader::nextChunk):

  • platform/cf/SharedBufferCF.cpp:

(WebCore::SharedBuffer::createCFData const):

  • platform/generic/KeyedEncoderGeneric.cpp:

(WebCore::KeyedEncoderGeneric::encodeString):

  • platform/graphics/GraphicsContextGL.cpp:

(WebCore::GraphicsContextGL::packImageData):

  • platform/graphics/ImageBufferBackend.cpp:

(WebCore::ImageBufferBackend::getPixelBuffer const):
(WebCore::ImageBufferBackend::putPixelBuffer):

  • platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:

(WebCore::InbandTextTrackPrivateAVF::processNativeSamples):

  • platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:

(WebCore::CDMSessionAVFoundationCF::generateKeyRequest):
(WebCore::CDMSessionAVFoundationCF::update):

  • platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:

(WebCore::InbandTextTrackPrivateAVCF::readNativeSampleBuffer):

  • platform/graphics/displaylists/DisplayListItemBuffer.cpp:

(WebCore::DisplayList::ItemBuffer::createItemBuffer):

  • platform/graphics/displaylists/DisplayListIterator.cpp:

(WebCore::DisplayList::DisplayList::Iterator::updateCurrentItem):

  • platform/image-decoders/gif/GIFImageReader.h:

(GIFImageReader::data const):

  • platform/mac/SSLKeyGeneratorMac.mm:

(WebCore::signedPublicKeyAndChallengeString):

  • platform/mediastream/RealtimeMediaSourceCenter.cpp:

(WebCore::addStringToSHA1):

  • platform/network/FormDataBuilder.cpp:

(WebCore::FormDataBuilder::encodeStringAsFormData):

  • platform/network/SocketStreamHandle.cpp:

(WebCore::SocketStreamHandle::sendHandshake):

  • platform/network/cf/ResourceRequestCFNet.cpp:

(WebCore::ResourceRequest::doUpdatePlatformRequest):

  • platform/network/cf/ResourceRequestCFNet.h:

(WebCore::httpHeaderValueUsingSuitableEncoding):

  • platform/network/cf/SocketStreamHandleImplCFNet.cpp:

(WebCore::SocketStreamHandleImpl::platformSendInternal):

  • platform/network/curl/CurlCacheEntry.cpp:

(WebCore::CurlCacheEntry::generateBaseFilename):

  • platform/sql/SQLiteStatement.cpp:

(WebCore::SQLiteStatement::columnBlobView):

  • testing/MockCDMFactory.cpp:

(WebCore::MockCDM::sanitizeResponse const):

Source/WebDriver:

  • socket/HTTPParser.cpp:

(WebDriver::HTTPParser::readLine):

  • socket/SessionHostSocket.cpp:

(WebDriver::SessionHost::sendWebInspectorEvent):

Source/WebKit:

  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::mediaPlayerInitializationDataEncountered):

  • GPUProcess/media/RemoteTextTrackProxy.cpp:

(WebKit::RemoteTextTrackProxy::addDataCue):

  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:

(WebKit::RemoteMediaRecorder::fetchData):

  • NetworkProcess/cache/NetworkCacheDataCurl.cpp:

(WebKit::NetworkCache::Data::apply const):

  • NetworkProcess/cache/NetworkCacheKey.cpp:

(WebKit::NetworkCache::hashString):

  • NetworkProcess/soup/WebKitDirectoryInputStream.cpp:

(webkitDirectoryInputStreamRead):

  • Platform/IPC/ArgumentCoders.cpp:

(IPC::ArgumentCoder<CString>::encode):
(IPC::ArgumentCoder<String>::encode):

  • Shared/API/c/cf/WKStringCF.mm:

(WKStringCopyCFString):

  • Shared/API/c/cf/WKURLCF.mm:

(WKURLCopyCFURL):

  • Shared/ShareableResource.cpp:

(WebKit::ShareableResource::wrapInSharedBuffer):

  • Shared/SharedDisplayListHandle.h:

(WebKit::SharedDisplayListHandle::data const):

  • Shared/WebCompiledContentRuleList.cpp:

(WebKit::WebCompiledContentRuleList::conditionsApplyOnlyToDomain const):

  • UIProcess/API/APIWebAuthenticationAssertionResponse.cpp:

(API::WebAuthenticationAssertionResponse::userHandle const):

  • UIProcess/API/C/WKPage.cpp:

(dataFrom):

  • UIProcess/Cocoa/SOAuthorization/RedirectSOAuthorizationSession.mm:

(WebKit::RedirectSOAuthorizationSession::completeInternal):

  • UIProcess/Inspector/socket/RemoteInspectorClient.cpp:

(WebKit::RemoteInspectorClient::sendWebInspectorEvent):

  • WebProcess/Network/WebSocketChannel.cpp:

(WebKit::WebSocketChannel::createMessageQueue):
(WebKit::WebSocketChannel::didReceiveText):

  • WebProcess/Network/webrtc/RTCDataChannelRemoteManager.cpp:

(WebKit::RTCDataChannelRemoteManager::sendData):
(WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::didReceiveStringData):

  • WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:

(WebKit::NetscapePluginStream::sendJavaScriptStream):

Source/WTF:

  • wtf/CryptographicallyRandomNumber.cpp:
  • wtf/FastMalloc.h:

(WTF::FastAllocator::allocate):

  • wtf/SHA1.h:

(WTF::SHA1::addBytes):

  • wtf/StackCheck.h:

(WTF::StackCheck::Scope::Scope):
(WTF::StackCheck::StackCheck):

  • wtf/URLHelpers.cpp:

(WTF::URLHelpers::userVisibleURL):

  • wtf/URLParser.cpp:

(WTF::URLParser::formURLDecode):

  • wtf/cf/URLCF.cpp:

(WTF::URL::createCFURL const):

  • wtf/cocoa/URLCocoa.mm:

(WTF::URL::createCFURL const):

  • wtf/persistence/PersistentCoders.cpp:

(WTF::Persistence::Coder<CString>::encode):
(WTF::Persistence::Coder<String>::encode):

  • wtf/text/CString.h:
  • wtf/text/WTFString.cpp:

(WTF::String::latin1 const):

  • wtf/text/cf/StringImplCF.cpp:

(WTF::StringImpl::createCFString):

10:27 AM Changeset in webkit [278618] by Devin Rousso
  • 21 edits
    8 adds in trunk

[Modern Media Controls] upstream new features
https://bugs.webkit.org/show_bug.cgi?id=226736
<rdar://problem/78957464>

Reviewed by Eric Carlson.

Source/WebCore:

  • bring the "Audio"/"Languages" tracks menu to iOS
  • add a new "Playback Speed" menu in the overflow menu on iOS and macOS
  • add support for showing the most relevant <track kind="chapters"> in the overflow menu on iOS and macOS

Tests: media/modern-media-controls/overflow-button/overflow-button.html

media/modern-media-controls/overflow-support/chapters.html
media/modern-media-controls/overflow-support/playback-speed.html

  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsHost::showMediaControlsContextMenu):

  • Modules/modern-media-controls/media/overflow-support.js:

(OverflowSupport.prototype.get mediaEvents):
(OverflowSupport.prototype.get tracksToMonitor):
(OverflowSupport.prototype.syncControl):

  • en.lproj/Localizable.strings:
  • rendering/RenderTheme.h:

(WebCore::RenderTheme::mediaControlsScripts):

  • rendering/RenderThemeAdwaita.cpp:

(WebCore::RenderThemeAdwaita::mediaControlsScripts):

  • rendering/RenderThemeAdwaita.h:
  • rendering/RenderThemeCocoa.h:
  • rendering/RenderThemeCocoa.mm:

(WebCore::RenderThemeCocoa::purgeCaches):
(WebCore::RenderThemeCocoa::mediaControlsScripts):

  • rendering/RenderThemeWin.h:
  • rendering/RenderThemeWin.cpp:

(WebCore::RenderThemeWin::mediaControlsScripts):
Drop the "additional script" and lower the inline capacity of the Vector.

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

(WebCore::Internals::setMediaControlsHidePlaybackRates): Added.

  • html/HTMLMediaElement.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::setMediaControlsHidePlaybackRates): Added.
Since Playback Rates is always shown, provide a way for tests to turn it off.

Source/WTF:

  • bring the "Audio"/"Languages" tracks menu to iOS
  • add a new "Playback Speed" menu on iOS and macOS in the overflow menu
  • add support for showing the most relevant <track kind="chapters"> in the overflow menu
  • wtf/PlatformEnableCocoa.h:

LayoutTests:

  • media/modern-media-controls/overflow-button/overflow-button.html: Added.
  • media/modern-media-controls/overflow-button/overflow-button-expected.txt: Added.
  • media/modern-media-controls/overflow-support/chapters.html: Added.
  • media/modern-media-controls/overflow-support/chapters-expected.txt: Added.
  • media/modern-media-controls/overflow-support/playback-speed.html: Added.
  • media/modern-media-controls/overflow-support/playback-speed-expected.txt: Added.
10:09 AM Changeset in webkit [278617] by Russell Epstein
  • 1 copy in tags/Safari-607.3.14

Tag Safari-607.3.14.

9:54 AM Changeset in webkit [278616] by weinig@apple.com
  • 6 edits
    3 adds in trunk

Add copy of std::span so that we can use it pre-moving to c++20
https://bugs.webkit.org/show_bug.cgi?id=226351

Reviewed by Alex Christensen.

Source/WTF:

Imports a copy of Tristan Brindle's Boost licensed implementation of std::span
from 5d8d366eca918d0ed3d2d196cbeae6abfd874736 of https://github.com/tcbrindle/span.

It has been further modified to rename tcb::span to WTF::Span.

  • LICENSE_1_0-Boost.txt: Added.
  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/Span.h: Added.

Tools:

Add basic WTF::Span test to make sure things compile and work.

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/Span.cpp: Added.
9:54 AM Changeset in webkit [278615] by Russell Epstein
  • 1 edit in branches/safari-607-branch/Source/WebCore/css/FontFace.cpp

Apply patch. rdar://problem/78789795

9:53 AM Changeset in webkit [278614] by Devin Rousso
  • 9 edits in trunk/Source

Require that callsites of SnapshotOptions specify a PixelFormat and DestinationColorSpace
https://bugs.webkit.org/show_bug.cgi?id=226756

Reviewed by Sam Weinig.

Don't wrap PixelFormat or DestinationColorSpace with std::optional as we want each
callsite to explicity configure them. This makes it easier to find where values for each
are used as there's no implicit behavior.

No behavior change. Followup after r278565.

Source/WebCore:

  • page/FrameSnapshotting.h:
  • page/FrameSnapshotting.cpp:

(WebCore::snapshotFrameRect):
(WebCore::snapshotFrameRectWithClip):
(WebCore::snapshotNode):
(WebCore::snapshotSelection):

  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::snapshotNode):
(WebCore::InspectorPageAgent::snapshotRect):

  • page/PageConsoleClient.cpp:

(WebCore::PageConsoleClient::screenshot):

  • page/TextIndicator.cpp:

(WebCore::snapshotOptionsForTextIndicatorOptions):
(WebCore::takeSnapshots):

  • platform/DragImage.cpp:

(WebCore::createDragImageForNode):
(WebCore::createDragImageForSelection):
(WebCore::createDragImageForRange):
(WebCore::createDragImageForImage):

Source/WebKit:

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::createSelectionSnapshot const):

9:51 AM Changeset in webkit [278613] by Russell Epstein
  • 2 edits in branches/safari-607-branch/Source/JavaScriptCore

Apply patch. rdar://problem/78628017

9:45 AM Changeset in webkit [278612] by Russell Epstein
  • 7 edits in branches/safari-607-branch/Source

Versioning.

WebKit-7607.3.14

9:35 AM Changeset in webkit [278611] by weinig@apple.com
  • 6 edits in trunk

Move some hand rolled CSSProperty predicates to be generated based on new CSSProperties.json properties
https://bugs.webkit.org/show_bug.cgi?id=226768

Reviewed by Antti Koivisto.

Source/WebCore:

Replace hand rolled isDescriptorOnly, isDirectionAwareProperty and isColorProperty
functions with generated versions using new "color-property", "direction-aware-property"
and "descriptor-only" properties in CSSProperties.json.

  • css/CSSProperties.json:
  • css/CSSProperty.cpp:

(WebCore::CSSProperty::isDescriptorOnly): Deleted.
(WebCore::CSSProperty::isDirectionAwareProperty): Deleted.
(WebCore::CSSProperty::isColorProperty): Deleted.

  • css/makeprop.pl:

(addProperty):

Tools:

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

(JSONCSSPropertiesChecker.check_codegen_properties):
Add new codegen properties to the checker.

9:27 AM Changeset in webkit [278610] by graouts@webkit.org
  • 3 edits
    2 adds in trunk

REGRESSION (r256095): Adding a border-radius, border, or box-shadow breaks animations from scale(0)
https://bugs.webkit.org/show_bug.cgi?id=218371
<rdar://problem/70906316>

Reviewed by Simon Fraser.

Source/WebCore:

When computing an animation's transform extent, we must account for implicit keyframes.

Test: webanimations/accelerated-transform-animation-to-scale-zero-with-implicit-from-keyframe.html

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::computeExtentOfTransformAnimation const):

LayoutTests:

Add a test where we have an animation on an element with a a border and a transform animation to scale(0) where the
first keyframe is implicit. This test would fail prior to this patch.

  • webanimations/accelerated-transform-animation-to-scale-zero-with-implicit-from-keyframe-expected.html: Added.
  • webanimations/accelerated-transform-animation-to-scale-zero-with-implicit-from-keyframe.html: Added.
9:14 AM Changeset in webkit [278609] by youenn@apple.com
  • 1880 edits
    2 moves
    465 adds
    117 deletes in trunk

Update libwebrtc to M92
https://bugs.webkit.org/show_bug.cgi?id=226494

LayoutTests/imported/w3c:

Reviewed by Eric Carlson.

  • web-platform-tests/webrtc/datachannel-emptystring-expected.txt:
  • web-platform-tests/webrtc/protocol/rtp-payloadtypes-expected.txt:
  • web-platform-tests/webrtc/protocol/unknown-mediatypes-expected.txt:
  • web-platform-tests/webrtc/receiver-track-live.https-expected.txt:

Source/ThirdParty/libwebrtc:

Reviewed by Eric Carlson.

  • CMakeLists.txt:
  • Source/webrtc: Resynced.
  • libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

Reviewed by Eric Carlson.

Covered by existing tests.

  • Configurations/WebCore.xcconfig:
  • Configurations/WebCoreTestSupport.xcconfig:
  • Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp:

(WebCore::LibWebRTCRtpReceiverBackend::createSource):

  • Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:

(WebCore::fillInboundRtpStreamStats):
(WebCore::fillOutboundRtpStreamStats):
(WebCore::fillRTCIceCandidateStats):

  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

(WebCore::LibWebRTCProvider::signalingThread):
(WebCore::LibWebRTCProvider::createPeerConnectionFactory):
(WebCore::LibWebRTCProvider::setPeerConnectionFactory):
(WebCore::LibWebRTCProvider::createPeerConnection):

  • platform/mediastream/libwebrtc/LibWebRTCProvider.h:
  • testing/MockLibWebRTCPeerConnection.cpp:

(WebCore::createConnection):
(WebCore::MockLibWebRTCPeerConnectionFactory::CreatePeerConnectionOrError):

  • testing/MockLibWebRTCPeerConnection.h:

LayoutTests:

Reviewed by Eric Carlson.

  • webrtc/receiver-track-should-stay-live-even-if-receiver-is-inactive.html:

Update test since the backend is now fixed.

8:58 AM Changeset in webkit [278608] by achristensen@apple.com
  • 1 edit
    1 add in trunk/LayoutTests

Update Windows PerformanceResourceTiming test expectations after r278477
https://bugs.webkit.org/show_bug.cgi?id=226737

  • platform/win/performance-api/resource-timing-apis-expected.txt: Added.
8:57 AM Changeset in webkit [278607] by Razvan Caliman
  • 9 edits
    4 adds in trunk

Web Inspector: Styles panel slow to render when inspecting node with many inherited CSS variables
https://bugs.webkit.org/show_bug.cgi?id=225972
<rdar://problem/78211185>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Do not show unused inherited CSS variables in the Styles details sidebar.

When aggregating styles for the selected node in WI.DOMNodeStyles, collect a list of names of CSS variables used in CSS property values.
In the Styles details sidebar, skip rendering declarations of inherited CSS variables that are not found in this list.

Always show inherited variables that are used, either directly inherited or via reference (variables using other variables in their value).
Always show inherited variables used as values of inheritable properties like color, font-size, etc.

When a CSS rule contains hidden inherited variables, offer a button to request disclosing them for that rule.
Option-click to show unused inherited variables in all matching rules.

Clicking the "Go to variable" button automatically renders all the unused variables in the CSS rule where the target variable is declared.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Models/CSSProperty.js:

(WI.CSSProperty.findVariableNames):

  • UserInterface/Models/DOMNodeStyles.js:

(WI.DOMNodeStyles):
(WI.DOMNodeStyles.prototype.get usedCSSVariables):
(WI.DOMNodeStyles.prototype._updateStyleCascade):
(WI.DOMNodeStyles.prototype._collectUsedCSSVariables):

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:

(.spreadsheet-style-declaration-editor .property):
(.spreadsheet-style-declaration-editor > .hidden-variables-button):

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:

(WI.SpreadsheetCSSStyleDeclarationEditor):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get propertiesToRender):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.highlightProperty):

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:

(WI.SpreadsheetCSSStyleDeclarationSection.prototype.set propertyVisibilityMode):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetCSSStyleDeclarationEditorSetAllPropertyVisibilityMode):

  • UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:

(WI.SpreadsheetRulesStyleDetailsPanel.prototype.spreadsheetCSSStyleDeclarationSectionSetAllPropertyVisibilityMode):

LayoutTests:

Add tests for logic to aggregate used CSS variables in Web Inspector.

  • inspector/css/findVariableNames-expected.txt: Added.
  • inspector/css/findVariableNames.html: Added.
  • inspector/css/usedCSSVariables-expected.txt: Added.
  • inspector/css/usedCSSVariables.html: Added.
7:16 AM Changeset in webkit [278606] by Philippe Normand
  • 2 edits in trunk/Tools

[Flatpak SDK] Enable network access in the WPE build sandbox
https://bugs.webkit.org/show_bug.cgi?id=225914

Reviewed by Michael Catanzaro.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.run_in_sandbox): Allow network access for WPE build jobs, so that CMake is
able to git checkout Cog from github.

7:02 AM Changeset in webkit [278605] by Alan Bujtas
  • 5 edits
    2 adds in trunk

[LFC][TFC] Add initial percent value support for columns
https://bugs.webkit.org/show_bug.cgi?id=226751

Reviewed by Simon Fraser.

Source/WebCore:

This patch adds the initial support for content like this:
<table>

<tr>

<td style="width: 10%"></td><td style="width: 90%"></td>

</tr>

</table>

Percent values work in mysterious ways in cases when the table has no fixed width.

  1. The smaller the percent value is, the wider the table may become.

Percent values are resolved against the cell's border box (so essentially they are resolved
against their own content as opposed to the table/containing block) and the formula is slightly different.

<td style="padding: 5px; width: 20%;"></td> : produces a 10px wide border box (horizontal border: 0px, padding: 10px, content: 0px).

The maximum constraint is resolved to 50px (width / percent * 100)

<td style="padding: 5px; width: 100%;"></td> : produces a 10px wide border box and the maximum constraint is resolved to 10px.

This maximum constraint value turns into the available width for the table content and becomes the final table width.

  1. With multiple rows, we pick the highest _percent_ value for each column (as opposed to the resolved values).

<tr><td style="width: 20%"></td></tr> (assum same 5px padding on both sides)
<tr><td style="width: 80%"></td></tr>

While the second row's cell has a higher maximum constraint value (50px see #1) since we only look at the raw percent values,
this content only produces a 12.5px wide table.

  1. The percent values do not accumulate across columns but instead we pick the largest one to represent the entire table's max constraint width.

<tr><td style="width: 60%"></td><td style="width: 40%"></td></tr>

60% resolves to 16.6px
40% resolves to 25px and we use the 25px value as the width for the entire table (and not 16.6px + 25px).

  1. Since we pick the highest percent values across rows for each columns, we may end up with > 100%. In such cases we start dropping percent values for subsequent columns:

<tr><td style="width: 20%;"></td><td style="width: 80%;"></td></tr>
<tr><td style="width: 60%;"></td><td style="width: 10%;"></td></tr>

First column width is max(20%, 60%) -> 60%
Second column width is max(80%, 10%) -> 80%
As we limit the accumulated percent value to 100%, the final column percent values are 60% and 40% (and not 80%).
Now the 60% is resolved to 16.6px and the 40% is resolved to 25px and since we don't accumulate these values (see #3)
the final table width is 25px (based on a percent value which is not even in the markup).

  1. While the smaller percent values produce wider tables (see #1), during the available space distribution columns with smaller percent values get assigned less space.

<tr><td style="width: 1%"></td><td style="width: 99%"></td></tr>

This content produces a 1000px wide table due to the small (1%) percent value (see #1 #2 and #3).
When we distribute the available space (1000px), the first cell gets only 10px (1%) while the second cell ends up with 990px (99%).

(and this is the cherry on top (not included in this patch):

Imagine the following scenario:

  1. the accumulated column percent value > 100% (let's say 80% and 30%)
  2. as we reach the 100% while walking the columns one by one (see #4), the remaining percent value becomes 0%.
  3. In order to avoid division by 0, we pick a very small epsilon value to run the formula.
  4. Now this very small percent value produces a large resolved value (see #2) which means

<tr><td style="width: 100%"></td></tr>

produces a 10px wide table

<tr><td style="width: 100%"></td><td style="width: 1%"></td></tr> <- note the 1%

produces a very very very wide table.

)

Test: fast/layoutformattingcontext/table-with-percent-columns-only-no-content.html

  • layout/formattingContexts/table/TableFormattingContext.cpp:

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

  • layout/formattingContexts/table/TableGrid.h:

(WebCore::Layout::TableGrid::Column::percent const):
(WebCore::Layout::TableGrid::Column::setFixedWidth):
(WebCore::Layout::TableGrid::Column::setPercent):

  • layout/formattingContexts/table/TableLayout.cpp:

(WebCore::Layout::TableFormattingContext::TableLayout::distributedHorizontalSpace):

LayoutTests:

  • fast/layoutformattingcontext/table-with-percent-columns-only-no-content-expected.html: Added.
  • fast/layoutformattingcontext/table-with-percent-columns-only-no-content.html: Added.
6:53 AM Changeset in webkit [278604] by Diego Pino Garcia
  • 32 edits
    1 move
    3 deletes in trunk/LayoutTests

[GTK] Unreviewed test gardening. Update baselines of tests marked a text flaky.

Removed tests that are now passing from test expectations.

  • platform/glib/TestExpectations:
  • platform/glib/fast/css/acid2-pixel-expected.txt: Renamed from LayoutTests/platform/wpe/fast/css/acid2-pixel-expected.txt.
  • platform/glib/http/tests/websocket/tests/hybi/workers/close-expected.txt: Removed.
  • platform/glib/imported/w3c/web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.https.worker-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-serializable-expected.txt:
  • platform/gtk/TestExpectations:
  • platform/gtk/editing/input/caret-at-the-edge-of-contenteditable-expected.txt:
  • platform/gtk/editing/pasteboard/4989774-expected.txt:
  • platform/gtk/editing/pasteboard/paste-4038267-fix-expected.txt:
  • platform/gtk/editing/pasteboard/paste-line-endings-001-expected.txt:
  • platform/gtk/editing/pasteboard/paste-line-endings-002-expected.txt:
  • platform/gtk/editing/pasteboard/paste-line-endings-006-expected.txt:
  • platform/gtk/fast/css/acid2-expected.txt:
  • platform/gtk/fast/css/acid2-pixel-expected.txt: Removed.
  • platform/gtk/fast/css/resize-corner-tracking-expected.txt:
  • platform/gtk/fast/forms/validation-message-appearance-expected.txt:
  • platform/gtk/fast/overflow/hit-test-overflow-controls-expected.txt:
  • platform/gtk/http/tests/security/video-cross-origin-accessfailure-expected.txt:
  • platform/gtk/svg/W3C-SVG-1.1/animate-elem-07-t-expected.txt:
  • platform/gtk/svg/W3C-SVG-1.1/animate-elem-12-t-expected.txt:
  • platform/gtk/svg/W3C-SVG-1.1/animate-elem-15-t-expected.txt:
  • platform/gtk/svg/W3C-SVG-1.1/animate-elem-16-t-expected.txt:
  • platform/gtk/svg/W3C-SVG-1.1/animate-elem-17-t-expected.txt:
  • platform/gtk/svg/W3C-SVG-1.1/animate-elem-19-t-expected.txt:
  • platform/gtk/svg/W3C-SVG-1.1/animate-elem-30-t-expected.txt:
  • platform/gtk/svg/W3C-SVG-1.1/animate-elem-33-t-expected.txt:
  • platform/gtk/svg/W3C-SVG-1.1/animate-elem-36-t-expected.txt:
  • platform/gtk/svg/W3C-SVG-1.1/animate-elem-37-t-expected.txt:
  • platform/gtk/svg/W3C-SVG-1.1/animate-elem-40-t-expected.txt:
  • platform/gtk/svg/W3C-SVG-1.1/animate-elem-41-t-expected.txt:
  • platform/gtk/svg/W3C-SVG-1.1/animate-elem-46-t-expected.txt:
  • platform/gtk/svg/W3C-SVG-1.1/animate-elem-82-t-expected.txt:
  • platform/gtk/svg/W3C-SVG-1.1/struct-dom-06-b-expected.txt:
  • platform/gtk/svg/custom/circular-marker-reference-4-expected.txt: Removed.
  • platform/gtk/tables/mozilla/bugs/bug4527-expected.txt:
5:29 AM Changeset in webkit [278603] by Jean-Yves Avenard
  • 10 edits in trunk/Source

[MSE] Rework handling of SourceBuffer's buffer full.
https://bugs.webkit.org/show_bug.cgi?id=226711
<rdar://problem/78937909>

Reviewed by Jer Noble.

Source/WebCore:

Bug 225630 modified the handling of the Source Buffer "buffer full" algorithm.
Per spec, we are to reject a buffer only once we know that the source buffer is full.
The first appendBuffer should always complete.
https://w3c.github.io/media-source/#sourcebuffer-buffer-full-flag
"The buffer full flag keeps track of whether appendBuffer() is allowed to accept

more bytes. It is set to false when the SourceBuffer object is created and gets
updated as data is appended and removed."

"buffer full flag" only gets modified to true in the 3.5.1 Segment Parser Loop
algorithm, step 6.3
https://w3c.github.io/media-source/#sourcebuffer-segment-parser-loop
"If this SourceBuffer is full and cannot accept more media data, then set the

buffer full flag to true."

On the 2nd call to the appendBuffer, in the Prepare Append algorithm, step 3.5.4.6:
https://w3c.github.io/media-source/#sourcebuffer-prepare-append

"If the buffer full flag equals true, then throw a QuotaExceededError exception

and abort these steps."

This change moves the check of the source buffer size back into SourceBufferPrivate
so that checking if we have sufficient space or not is hidden from the SourceBuffer.
Rather than deal with a single "buffer full" flag, we use instead a isBufferFullFor()
method which allows to easily swap between the previous per-spec behaviour and the
one introduced by bug 225630 as it does present some advantages.
We can always determine if we have sufficient space by checking the current source
buffer memory size and the requested limit.
The previous algorithm took into consideration the allocated capacity of the
temporary SourceBuffer::m_pendingAppendData ; this approach was flawed in that we
always checked if m_pendingAppendData.capacity + newDataSize would fit in the
source buffer. However newDataSize would always happen to fit within the existing
capacity, so it was accounted for twice.
We remove check on the capacity allocated as it simplifies the code a great deal,
and avoid the piggy-backing of unrelated methods (such as
SourceBufferPrivate::reenqueueMediaIfNeeded that ended up also checking capacity)

This change is already covered with existing tests.

  • Modules/mediasource/SourceBuffer.cpp: call new isBufferFullFor to check if

sufficient is available.
(WebCore::SourceBuffer::appendBufferInternal):
(WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):

  • platform/graphics/SourceBufferPrivate.h: Add isBufferFullFor method

remove m_bufferFull member.

  • platform/graphics/SourceBufferPrivate.cpp:

(WebCore::SourceBufferPrivate::reenqueueMediaIfNeeded): remove reference to
buffer capacity
(WebCore::SourceBufferPrivate::evictCodedFrames): remove reference to
buffer capacity
(WebCore::SourceBufferPrivate::isBufferFullFor): To get per-spec behaviour
we only need to stop checking the value of the requiredSize argument.

Source/WebKit:

  • GPUProcess/media/RemoteSourceBufferProxy.cpp:

(WebKit::RemoteSourceBufferProxy::evictCodedFrames):
(WebKit::RemoteSourceBufferProxy::reenqueueMediaIfNeeded):

  • GPUProcess/media/RemoteSourceBufferProxy.h:
  • GPUProcess/media/RemoteSourceBufferProxy.messages.in: Remove capacity and

buffer full references from all methods; relying on the totalTrackBufferSizeInBytes
instead.

  • WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:

(WebKit::SourceBufferPrivateRemote::evictCodedFrames):
(WebKit::SourceBufferPrivateRemote::reenqueueMediaIfNeeded):

  • WebProcess/GPU/media/SourceBufferPrivateRemote.h:
5:11 AM Changeset in webkit [278602] by Antti Koivisto
  • 3 edits
    2 adds in trunk

text-decoration: underline is not applied to web component
https://bugs.webkit.org/show_bug.cgi?id=226724
<rdar://problem/78987286>

Reviewed by Ryosuke Niwa.

Source/WebCore:

'text-decoration' is not an inherited property in itself but its effective value
behaves as it was. We fail to inherit this effective value into author shadow trees.

Test case by Jeroen Zwartepoorte.

Test: fast/shadow-dom/effective-text-decoration-inheritance.html

  • style/StyleAdjuster.cpp:

(WebCore::Style::shouldInheritEffectiveTextDecorations):

Test for user agent shadow tree, not a shadow tree in general.
Also inverse the logic and refactor a bit.

(WebCore::Style::Adjuster::adjust const):
(WebCore::Style::isAtShadowBoundary): Deleted.
(WebCore::Style::doesNotInheritTextDecoration): Deleted.

LayoutTests:

  • fast/shadow-dom/effective-text-decoration-inheritance-expected.html: Added.
  • fast/shadow-dom/effective-text-decoration-inheritance.html: Added.
5:02 AM Changeset in webkit [278601] by Jean-Yves Avenard
  • 2 edits in trunk/Tools

Update jya's email address
https://bugs.webkit.org/show_bug.cgi?id=226752

Reviewed by Tim Horton.

  • Scripts/webkitpy/common/config/contributors.json:
3:31 AM Changeset in webkit [278600] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[Flatpak SDK] Allow custom build directories
https://bugs.webkit.org/show_bug.cgi?id=226142

Patch by Philippe Normand <pnormand@igalia.com> on 2021-06-08
Reviewed by Adrian Perez de Castro.

By default the build directory remains WebKitBuild/{GTK,WPE}/{Release,Debug}. Builds done
with the Flatpak SDK now support the standard WEBKIT_OUTPUTDIR environment variable, eg.
setting $WEBKIT_OUTPUTDIR to "/path/to/somewhere", the built files will end up in
/path/to/somewhere/{GTK,WPE}/Release.

  • flatpak/flatpakutils.py:

(WebkitFlatpak.clean_args):

2:27 AM Changeset in webkit [278599] by youenn@apple.com
  • 27 edits
    2 adds in trunk/Source/ThirdParty/libwebrtc

Update usrsctp to M92
https://bugs.webkit.org/show_bug.cgi?id=226493

Patch by Youenn Fablet <youenn@apple.com> on 2021-06-08
Reviewed by Alex Christensen.

  • Source/third_party/usrsctp: Resynced.
  • Source/third_party/usrsctp/usrsctplib/.gitattributes: Added.
2:09 AM Changeset in webkit [278598] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.33.2

WebKitGTK 2.33.2

2:08 AM Changeset in webkit [278597] by Carlos Garcia Campos
  • 4 edits in trunk

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.33.2 release

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.33.2.
1:00 AM Changeset in webkit [278596] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[SOUP] Several timing tests failing since r278477
https://bugs.webkit.org/show_bug.cgi?id=226728

Reviewed by Michael Catanzaro.

responseBodyBytesReceived and responseBodyDecodedSize are expected to be always filled, and not only when
shouldCaptureExtraNetworkLoadMetrics() returns true.

Fixes: imported/w3c/web-platform-tests/navigation-timing/test_document_onload.html

imported/w3c/web-platform-tests/navigation-timing/nav2_test_attributes_values.html
imported/w3c/web-platform-tests/resource-timing/cors-preflight.any.worker.html

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::createRequest):

12:57 AM Changeset in webkit [278595] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

REGRESSION(r278391): [SOUP] Test fast/dom/webtiming.html is failing
https://bugs.webkit.org/show_bug.cgi?id=226726

Reviewed by Michael Catanzaro.

We need to set network metrics on response even for non HTTP loads now.

Fixes fast/dom/webtiming.html

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::resume):
(WebKit::NetworkDataTaskSoup::didSendRequest):
(WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse):

12:47 AM Changeset in webkit [278594] by Fujii Hironori
  • 2 edits in trunk/LayoutTests

[WinCairo] Unreviewed test gardening

  • platform/wincairo/TestExpectations:
12:35 AM Changeset in webkit [278593] by commit-queue@webkit.org
  • 3 edits
    4 adds in trunk

Crash in InsertParagraphSeparatorCommand::doApply
https://bugs.webkit.org/show_bug.cgi?id=226527

Patch by Frédéric Wang <fwang@igalia.com> on 2021-06-08
Reviewed by Ryosuke Niwa.

Source/WebCore:

After r273375 and r278002, it is possible that InsertParagraphSeparatorCommand::doApply is
confused by a display: table start block, leading to nullptr crash in the rest of the
function. This patch just excludes that case in order to work around that kind of issue.

Test: fast/editing/insert-paragraph-with-img-in-table-crash.html

  • editing/InsertParagraphSeparatorCommand.cpp:

(WebCore::InsertParagraphSeparatorCommand::doApply):

LayoutTests:

Add regression test.

  • fast/editing/insert-paragraph-with-img-in-table-crash-expected.txt: Added.
  • fast/editing/insert-paragraph-with-img-in-table-crash.html: Added. Note that not having a

new line at the end of the HTML file is required to make the test crash without the patch.

  • fast/editing/insert-paragraph-with-text-in-table-crash-expected.txt: Added.
  • fast/editing/insert-paragraph-with-text-in-table-crash.html: Added.

Jun 7, 2021:

9:57 PM Changeset in webkit [278592] by Jean-Yves Avenard
  • 2 edits in trunk/Tools

Update jya's email address
https://bugs.webkit.org/show_bug.cgi?id=226752

Reviewed by Tim Horton.

  • Scripts/webkitpy/common/config/contributors.json:
8:22 PM Changeset in webkit [278591] by ysuzuki@apple.com
  • 19 edits
    2 adds in trunk

[JSC] Use ResolvedClosureVar to get brand from scope
https://bugs.webkit.org/show_bug.cgi?id=226677
rdar://78802869

Reviewed by Saam Barati.

JSTests:

  • stress/private-access-nested-eval.js: Added.

(shouldThrow):
(shouldThrow.prototype.x):
(shouldThrow.prototype.m.C.prototype.z):
(shouldThrow.prototype.m.C.prototype.a):
(shouldThrow.prototype.m.C):
(shouldThrow.prototype.m):

  • stress/private-access-nested.js: Added.

(shouldThrow):
(shouldThrow.prototype.x):
(shouldThrow.prototype.m.C.prototype.z):
(shouldThrow.prototype.m.C.prototype.a):
(shouldThrow.prototype.m.C):
(shouldThrow.prototype.m):

Source/JavaScriptCore:

Private brand lookup is doing wrong way to get scope.

  1. op_resolve_scope with private name (e.g. #x)
  2. then, doing op_get_from_scope with (1)'s scope with different name (e.g. @privateBrand)

This is wrong in JSC. We resolve scope at link-time in CodeBlock. So we need to ensure that both op_resolve_scope and op_get_from_scope
starts with the current scope-register. As a result, private-brand lookup is broken right now. Let's see the buggy case.

class D {

#x() {}
m() {

class C {

#yy;
#z() { }
a() {

this.#x(); <===== This point.

}

}
let c = new C();
c.a();

}

}

In the above point, we first lookup the scope with #x, and we get the D's class-scope. But our get_from_scope is using privateBrand, and
privateBrand property exists too in C's class-scope too since C also has #yy and #z. As a result, CodeBlock linking configures the offset for
C's class-scope in get_from_scope. And this offset is different from D's class-scope's privateBrand.

Only allowed case for the above usage is ResolvedClosureVar. And generatorification uses it too. In this patch,

  1. We ensure that class-scope (with private name) must have @privateBrand and @privateClassBrand with offset 1 and 0.
  2. Use ResolvedClosureVar with the above pre-defined offset

Since CodeBlock's linking does not resolve the scope for get_from_scope if it is ResolvedClosureVar, we can just perform the desired ResolvedClosureVar lookup
with the given scope with the compiled offset.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::instantiateLexicalVariables):
(JSC::BytecodeGenerator::pushLexicalScope):
(JSC::BytecodeGenerator::pushLexicalScopeInternal):
(JSC::BytecodeGenerator::emitCreatePrivateBrand):
(JSC::BytecodeGenerator::emitGetPrivateBrand):

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

(JSC::BaseDotNode::emitGetPropertyValue):
(JSC::BaseDotNode::emitPutProperty):
(JSC::PostfixNode::emitDot):
(JSC::PrefixNode::emitDot):
(JSC::InNode::emitBytecode):
(JSC::BlockNode::emitBytecode):
(JSC::ForNode::emitBytecode):
(JSC::ForInNode::emitBytecode):
(JSC::ForOfNode::emitBytecode):
(JSC::SwitchNode::emitBytecode):
(JSC::ClassExprNode::emitBytecode):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseClass):

  • parser/VariableEnvironment.h:
7:25 PM Changeset in webkit [278590] by commit-queue@webkit.org
  • 11 edits in trunk

Adopt SecTrustGetCertificateAtIndex replacement where available
https://bugs.webkit.org/show_bug.cgi?id=225893

Patch by Alex Christensen <achristensen@webkit.org> on 2021-06-07
Reviewed by Chris Dumez.

Source/WebCore:

  • platform/network/cf/CertificateInfoCFNet.cpp:

(WebCore::certificatesMatch):
(WebCore::CertificateInfo::certificateChainFromSecTrust):
(WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate const):

  • platform/network/cocoa/CertificateInfoCocoa.mm:

(WebCore::CertificateInfo::dump const):

Source/WebKit:

  • Shared/mac/WebCoreArgumentCodersMac.mm:

(IPC::encodeNSError):

  • UIProcess/Authentication/mac/WebCredentialMac.mm:

(WebKit::leafCertificate):
(WebKit::chain):
(WebKit::WebCredential::WebCredential):

Source/WTF:

rdar://74752046 introduced a new way to access the same thing.

  • wtf/PlatformHave.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:

(verifyCertificateAndPublicKey):

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
6:53 PM Changeset in webkit [278589] by Alexey Shvayka
  • 103 edits
    15 adds in trunk

Unreviewed, reland r276592 with a fix for put() override in prototype chain of a JSProxy
https://bugs.webkit.org/show_bug.cgi?id=226185

JSTests:

  • microbenchmarks/put-slow-no-cache-array.js: Added.
  • microbenchmarks/put-slow-no-cache-function.js: Added.
  • microbenchmarks/put-slow-no-cache-js-proxy.js: Added.
  • microbenchmarks/put-slow-no-cache-long-prototype-chain.js: Added.
  • microbenchmarks/put-slow-no-cache.js: Added.
  • microbenchmarks/reflect-set-with-receiver.js: Added.
  • stress/custom-get-set-proto-chain-put.js:
  • stress/module-namespace-access-set-fails.js: Added.
  • stress/put-non-reified-static-accessor-or-custom.js: Added.
  • stress/put-non-reified-static-function-or-custom.js: Added.
  • stress/put-to-primitive-non-reified-static-custom.js: Added.
  • stress/put-to-primitive.js: Added.
  • stress/put-to-proto-chain-overrides-put.js:

Rework to always test new objects, add JSProxy coverage, and assert that receiver has own property.

  • stress/typed-array-canonical-numeric-index-string-set.js: Added.

LayoutTests/imported/w3c:

  • web-platform-tests/WebIDL/ecmascript-binding/global-object-implicit-this-value.any-expected.txt:
  • web-platform-tests/WebIDL/ecmascript-binding/interface-object-set-receiver-expected.txt: Added.
  • web-platform-tests/WebIDL/ecmascript-binding/interface-object-set-receiver.html: Added.
  • web-platform-tests/WebIDL/ecmascript-binding/interface-prototype-constructor-set-receiver-expected.txt:
  • web-platform-tests/WebIDL/ecmascript-binding/interface-prototype-constructor-set-receiver.html:

Source/JavaScriptCore:

The API test added in r278366 revealed a flaw in JSObject::definePropertyOnReceiver()
that caused putDirectInternal() to be performed on a JSProxy instead of it's target.
Remedies that via a type check, ensuring the test and iOS apps are functional.

The issue was originally missed because the prototype chain of a global object is immutable
and none of the global object's prototypes override put(). OpaqueJSClass::prototype() sets
the Prototype? directly, ignoring the IsImmutablePrototypeExoticObject type info flag.

Also, excludes an invariant from the original patch that required put() to be overriden
when implementing custom DefineOwnProperty?. It is now broken by WindowProperties object.

  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h:

(JSC::JSCallbackObject<Parent>::put):

  • API/tests/testapiScripts/testapi.js:
  • debugger/DebuggerScope.h:
  • runtime/ClassInfo.h:
  • runtime/ClonedArguments.h:
  • runtime/CustomGetterSetter.cpp:

(JSC::callCustomSetter): Deleted.

  • runtime/CustomGetterSetter.h:
  • runtime/ErrorConstructor.h:
  • runtime/ErrorInstance.h:
  • runtime/GenericArguments.h:
  • runtime/GenericArgumentsInlines.h:

(JSC::GenericArguments<Type>::put):

  • runtime/GetterSetter.h:
  • runtime/JSArray.cpp:

(JSC::JSArray::put):

  • runtime/JSArray.h:
  • runtime/JSArrayBufferView.cpp:

(JSC::JSArrayBufferView::put): Deleted.

  • runtime/JSArrayBufferView.h:
  • runtime/JSCJSValue.cpp:

(JSC::JSValue::putToPrimitive):

  • runtime/JSCell.cpp:

(JSC::JSCell::doPutPropertySecurityCheck): Deleted.

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

(JSC::JSFunction::put):

  • runtime/JSFunction.h:
  • runtime/JSGenericTypedArrayView.h:
  • runtime/JSGlobalLexicalEnvironment.h:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::put):

  • runtime/JSGlobalObject.h:
  • runtime/JSLexicalEnvironment.h:
  • runtime/JSModuleEnvironment.h:
  • runtime/JSModuleNamespaceObject.h:
  • runtime/JSObject.cpp:

(JSC::JSObject::getOwnPropertySlot):
(JSC::JSObject::putInlineSlow):
(JSC::definePropertyOnReceiverSlow):
(JSC::JSObject::definePropertyOnReceiver):
(JSC::JSObject::putInlineFastReplacingStaticPropertyIfNeeded):
(JSC::JSObject::doPutPropertySecurityCheck): Deleted.
(JSC::JSObject::prototypeChainMayInterceptStoreTo): Deleted.

  • runtime/JSObject.h:

(JSC::JSObject::putByIndexInline):
(JSC::JSObject::hasNonReifiedStaticProperties):
(JSC::JSObject::getOwnPropertySlot):
(JSC::JSObject::putDirect):
(JSC::JSObject::doPutPropertySecurityCheck): Deleted.

  • runtime/JSObjectInlines.h:

(JSC::JSObject::canPerformFastPutInlineExcludingProto):
(JSC::JSObject::putInlineForJSObject):
(JSC::JSObject::putInlineFast):
(JSC::JSObject::putDirectInternal):

  • runtime/JSProxy.h:
  • runtime/JSTypeInfo.h:

(JSC::TypeInfo::hasStaticPropertyTable const):
(JSC::TypeInfo::overridesPut const):
(JSC::TypeInfo::getOwnPropertySlotMayBeWrongAboutDontEnum const):
(JSC::TypeInfo::hasPutPropertySecurityCheck const): Deleted.

  • runtime/Lookup.h:

(JSC::putEntry): Deleted.
(JSC::lookupPut): Deleted.

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

(JSC::ProxyObject::put):

  • runtime/ProxyObject.h:
  • runtime/PutPropertySlot.h:

(JSC::PutPropertySlot::PutPropertySlot):
(JSC::PutPropertySlot::context const):
(JSC::PutPropertySlot::isTaintedByOpaqueObject const):
(JSC::PutPropertySlot::setIsTaintedByOpaqueObject):

  • runtime/ReflectObject.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/RegExpObject.cpp:

(JSC::RegExpObject::put):

  • runtime/RegExpObject.h:
  • runtime/StringObject.cpp:

(JSC::StringObject::put):

  • runtime/StringObject.h:
  • runtime/StringPrototype.cpp:

(JSC::StringPrototype::finishCreation):
(JSC::StringPrototype::create):

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

(JSC::Structure::validateFlags):

  • runtime/Structure.h:

(JSC::Structure::hasNonReifiedStaticProperties const):

  • tools/JSDollarVM.cpp:

Source/WebCore:

Tests: js/dom/script-tests/reflect-set-onto-dom.js

imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/interface-object-set-receiver.html
http/tests/security/cross-frame-access-object-getPrototypeOf-in-put.html

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::put):
(WebCore::JSDOMWindow::doPutPropertySecurityCheck): Deleted.

  • bindings/js/JSLocationCustom.cpp:

(WebCore::JSLocation::doPutPropertySecurityCheck): Deleted.

  • bindings/js/JSRemoteDOMWindowCustom.cpp:

(WebCore::JSRemoteDOMWindow::put):

  • bindings/scripts/CodeGeneratorJS.pm:

(GeneratePut):
(GenerateHeader):

  • bindings/scripts/test/JS/*: Updated.
  • bridge/objc/objc_runtime.h:
  • bridge/runtime_array.h:
  • bridge/runtime_object.h:

Source/WebKit:

  • WebProcess/Plugins/Netscape/JSNPObject.h:

LayoutTests:

  • http/tests/security/cross-frame-access-object-getPrototypeOf-in-put-expected.txt:
  • http/tests/security/cross-frame-access-object-getPrototypeOf-in-put.html:
  • js/dom/reflect-set-onto-dom-expected.txt:
  • js/dom/script-tests/reflect-set-onto-dom.js:
6:43 PM Changeset in webkit [278588] by Alexey Shvayka
  • 25 edits in trunk/Source/JavaScriptCore

Introduce LexicalScopeFeatures to enable future bytecode optimizations
https://bugs.webkit.org/show_bug.cgi?id=224072

Reviewed by Keith Miller.

Before this patch, BytecodeGenerator was capable of reasoning about the presence of with
statements, direct eval, or any other code features only within the current executable:

`
with (foo) {

(function() {

There was no way to detect WithScope during generation of this function.

})();

}
`

This change is required for op_to_this rewrite (#225397): if FunctionCallResolveNode and
friends knew there is no WithScope, op_call could be emitted with |this| value of
undefined as per spec [1], instead of resolved scope. This would:

  • simplify op_to_this on all tiers, likely resulting in minor perf boost;
  • save 1 instruction per strict function by removing op_to_this;
  • remove toThis() from the method table and ~30 its call sites from built-ins;
  • fix built-in methods that were observably lacking toThis();
  • fix proto getter / setter called on global scope;
  • fix WebIDL accessors called with |this| value of undefined and null.

Also, if ResolveNode knew that unforgeable global properties are not shadowed and there
is no with statement or sloppy mode direct eval, then undefined / Infinity / NaN
lookups could be constant-folded. This would save up to 3 bytecode ops per each usage
and allow emitting op_is_undefined_or_null for x === undefined || x === null.
V8 performs this optimization [2].

This patch introduces LexicalScopeFeatures to allow passing such information from Parser
to BytecodeGenerator with a minimal code diff. These features are kept separate from
CodeFeature to simplify reasoning about feature's scope and because we need to propagate
lexical features from parent to child scope.

Strict mode is the first use case of LexicalScopeFeatures, which this change carefully
fits into existing abstractions without increasing their memory usage even by 1 byte.

[1]: https://tc39.es/ecma262/#sec-evaluatecall (step 2)
[2]: https://medium.com/@bmeurer/sometimes-undefined-is-defined-7701e1c9eff8

  • builtins/BuiltinExecutables.cpp:

(JSC::BuiltinExecutables::createExecutable):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::recordParse):
(JSC::UnlinkedCodeBlock::lexicalScopeFeatures const):

  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::generateUnlinkedFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::UnlinkedFunctionExecutable::setInvalidTypeProfilingOffsets):

  • bytecode/UnlinkedFunctionExecutable.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitNewClassFieldInitializerFunction):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::lexicalScopeFeatures const):
(JSC::BytecodeGenerator::generate):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createFunctionMetadata):

  • parser/Nodes.cpp:

(JSC::ScopeNode::ScopeNode):
(JSC::ProgramNode::ProgramNode):
(JSC::ModuleProgramNode::ModuleProgramNode):
(JSC::EvalNode::EvalNode):
(JSC::FunctionMetadataNode::FunctionMetadataNode):
(JSC::FunctionMetadataNode::operator== const):
(JSC::FunctionMetadataNode::dump const):
(JSC::FunctionNode::FunctionNode):

  • parser/Nodes.h:

(JSC::ScopeNode::lexicalScopeFeatures):
(JSC::ScopeNode::isStrictMode const):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::parseGeneratorFunctionSourceElements):
(JSC::Parser<LexerType>::parseAsyncFunctionSourceElements):
(JSC::Parser<LexerType>::parseAsyncGeneratorFunctionSourceElements):
(JSC::Parser<LexerType>::parseFunctionBody):
(JSC::Parser<LexerType>::parseFunctionInfo):

  • parser/Parser.h:

(JSC::Scope::Scope):
(JSC::Scope::lexicalScopeFeatures const):
(JSC::Scope::setStrictMode):
(JSC::Scope::strictMode const):
(JSC::Scope::fillParametersForSourceProviderCache):
(JSC::Scope::restoreFromSourceProviderCache):
(JSC::Parser::pushScope):
(JSC::Parser::lexicalScopeFeatures):
(JSC::Parser<LexerType>::parse):

  • parser/ParserModes.h:
  • parser/SourceProviderCacheItem.h:

(JSC::SourceProviderCacheItem::lexicalScopeFeatures const):
(JSC::SourceProviderCacheItem::SourceProviderCacheItem):

  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::createFunctionMetadata):

  • runtime/CachedBytecode.cpp:

(JSC::CachedBytecode::addFunctionUpdate):

  • runtime/CachedTypes.cpp:

(JSC::CachedFunctionExecutable::lexicalScopeFeatures const):
(JSC::CachedCodeBlock::lexicalScopeFeatures const):
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
(JSC::CachedFunctionExecutable::encode):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::CachedCodeBlock<CodeBlockType>::encode):
(JSC::CachedFunctionExecutable::isInStrictContext const): Deleted.

  • runtime/CachedTypes.h:
  • runtime/CodeCache.cpp:

(JSC::generateUnlinkedCodeBlockImpl):
(JSC::CodeCache::getUnlinkedGlobalCodeBlock):

  • runtime/ECMAMode.h:

(JSC::ECMAMode::fromBool):

  • runtime/FunctionExecutable.cpp:

(JSC::FunctionExecutable::FunctionExecutable):

  • runtime/GlobalExecutable.h:

(JSC::GlobalExecutable::recordParse):
(JSC::GlobalExecutable::GlobalExecutable):

  • runtime/ScriptExecutable.cpp:

(JSC::ScriptExecutable::ScriptExecutable):
(JSC::ScriptExecutable::newCodeBlockFor):
(JSC::ScriptExecutable::recordParse):

  • runtime/ScriptExecutable.h:

(JSC::ScriptExecutable::isInStrictContext const):
(JSC::ScriptExecutable::recordParse):

6:29 PM Changeset in webkit [278587] by commit-queue@webkit.org
  • 17 edits in trunk/Source/JavaScriptCore

Unreviewed, reverting r278371 and r278463.
https://bugs.webkit.org/show_bug.cgi?id=226749

Break dumpDisassembly in JetStream2

Reverted changesets:

"We should drop B3 values while running Air"
https://bugs.webkit.org/show_bug.cgi?id=226187
https://trac.webkit.org/changeset/278371

"Drop the FTL(DFG) graph after lowering to B3"
https://bugs.webkit.org/show_bug.cgi?id=226556
https://trac.webkit.org/changeset/278463

6:28 PM Changeset in webkit [278586] by Devin Rousso
  • 3 edits in trunk/Source/WebCore

Fix localized strings after r278202
https://bugs.webkit.org/show_bug.cgi?id=226742

Reviewed by Eric Carlson.

  • Scripts/extract-localizable-strings.pl:

Add support for WEB_UI_CFSTRING_KEY.

  • en.lproj/Localizable.strings:
6:10 PM Changeset in webkit [278585] by Alexey Shvayka
  • 23 edits
    2 adds in trunk

Window should behave like a legacy platform object without indexed setter
https://bugs.webkit.org/show_bug.cgi?id=225894

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/html/browsers/the-window-object/window-indexed-properties-delete-no-cache-expected.txt: Added.
  • web-platform-tests/html/browsers/the-window-object/window-indexed-properties-delete-no-cache.html: Added.
  • web-platform-tests/html/browsers/the-window-object/window-indexed-properties-expected.txt:
  • web-platform-tests/html/browsers/the-window-object/window-indexed-properties-strict-expected.txt:
  • web-platform-tests/html/browsers/the-window-object/window-indexed-properties-strict.html:
  • web-platform-tests/html/browsers/the-window-object/window-indexed-properties.html:

Source/JavaScriptCore:

  • runtime/TypeError.h:

(JSC::typeError):

Source/WebCore:

This change fixes major interop issue by disallowing expando indexed properties on WindowProxy,
raising TypeError only when needed, which aligns WebKit with Blink and Gecko.

While DefineOwnProperty? [1] and Delete? [2] methods of WindowProxy are implemented
precisely per spec, current Set? [3] algorithm seems to allow invoking setters from
the prototype chain. Blink and Gecko implement stricter semantics by failing early rather
than traversing the prototype chain, as does this patch.

To avoid breaking native apps that either add expando indexed properties to WindowProxy, or
more likely read / write indices of sloppy function's |this| value, which accidently happens
to be a WindowProxy, the new behavior is introduced only for web content and newly-built apps.

Since unlike putByIndex(), deletePropertyByIndex() might be invoked with UINT_MAX, which is
not an array index [4], isIndex() check is required. In future, JSC will be fixed to remove
such checks from all indexed overrides.

DeletePropertySlot::disableCaching() is not called because indexed deletes are not currently
repatched, and once they are, cacheability should be inferred from added type info flags.

Also, removes extra jsDOMWindowGetOwnPropertySlotRestrictedAccess() call for indices, which
is missing from the spec [5]; this is unobservable.

[1] https://html.spec.whatwg.org/multipage/window-object.html#windowproxy-defineownproperty (step 2.1)
[2] https://html.spec.whatwg.org/multipage/window-object.html#windowproxy-delete (step 2.1)
[3] https://html.spec.whatwg.org/multipage/window-object.html#windowproxy-set (step 3)
[4] https://tc39.es/ecma262/#array-index
[5] https://html.spec.whatwg.org/multipage/window-object.html#windowproxy-getownproperty (step 2.5.2)

Tests: imported/w3c/web-platform-tests/html/browsers/the-window-object/window-indexed-properties-delete-no-cache.html

imported/w3c/web-platform-tests/html/browsers/the-window-object/window-indexed-properties.html
imported/w3c/web-platform-tests/html/browsers/the-window-object/window-indexed-properties-strict.html

  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::makeUnsupportedIndexedSetterErrorMessage):

  • bindings/js/JSDOMExceptionHandling.h:
  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::allowsLegacyExpandoIndexedProperties):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex): Remove outdated comments.
(WebCore::JSDOMWindow::put):
(WebCore::JSDOMWindow::putByIndex): Release scope when calling Base::putByIndex(), which could throw.
(WebCore::JSDOMWindow::deleteProperty):
(WebCore::JSDOMWindow::deletePropertyByIndex):
(WebCore::JSDOMWindow::defineOwnProperty):

  • platform/cocoa/VersionChecks.h:

LayoutTests:

  • fast/dom/Window/orphaned-frame-access.html:
  • fast/frames/iframe-detached-window-still-writable-eval-expected.txt:
  • fast/frames/iframe-detached-window-still-writable-eval.html:
  • http/tests/security/cross-frame-access-delete-expected.txt:
  • http/tests/security/resources/cross-frame-iframe-for-delete-test.html:
  • js/dom/dfg-ensure-array-storage-on-window-expected.txt:
  • js/dom/indexed-setter-on-global-object-expected.txt:
  • js/dom/script-tests/dfg-ensure-array-storage-on-window.js:
  • js/dom/script-tests/dfg-ensure-non-array-array-storage-on-window.js:
  • js/dom/script-tests/indexed-setter-on-global-object.js:
6:04 PM Changeset in webkit [278584] by Russell Epstein
  • 1 copy in tags/Safari-611.3.7

Tag Safari-611.3.7.

5:41 PM Changeset in webkit [278583] by Russell Epstein
  • 1 copy in tags/Safari-612.1.15.4.2

Tag Safari-612.1.15.4.2.

5:40 PM Changeset in webkit [278582] by Russell Epstein
  • 2 edits in branches/safari-612.1.15.4-branch

Cherry-pick r278501. rdar://problem/78973538

[AppleWin] JSC build failure
https://bugs.webkit.org/show_bug.cgi?id=226659
<rdar://78844190>

Reviewed by Brent Fulgham.

WTF scripts location is not being correctly identified.

  • Source/cmake/OptionsAppleWin.cmake:

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

5:38 PM Changeset in webkit [278581] by Russell Epstein
  • 8 edits in branches/safari-612.1.15.4-branch/Source

Versioning.

WebKit-7612.1.15.4.2

5:29 PM Changeset in webkit [278580] by Chris Dumez
  • 20 edits
    1 delete in trunk/Source

Drop legacy MainThreadTaskQueue & EventLoopTaskQueue classes
https://bugs.webkit.org/show_bug.cgi?id=226734

Reviewed by Ryosuke Niwa.

Source/WebCore:

Drop legacy MainThreadTaskQueue & EventLoopTaskQueue classes. Code that was using MainThreadTaskQueue
is now calling callOnMainThread() directly. Call that was using EventLoopTaskQueue is now using the
HTML event loop directly. If said code needed to cancel tasks or check if a previously scheduled task
is still pending, it now relies on WTF::CancellableTask / WTF::TaskCancellationGroup to do so.

  • Headers.cmake:
  • Modules/encryptedmedia/MediaKeySystemAccess.cpp:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/DocumentTimelinesController.cpp:

(WebCore::DocumentTimelinesController::cacheCurrentTime):
(WebCore::DocumentTimelinesController::maybeClearCachedCurrentTime):

  • animation/DocumentTimelinesController.h:
  • dom/ActiveDOMObject.h:
  • dom/Document.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::scheduleNextSourceChild):
(WebCore::HTMLMediaElement::scheduleCheckPlaybackTargetCompatability):
(WebCore::HTMLMediaElement::seekWithTolerance):
(WebCore::HTMLMediaElement::setVolume):
(WebCore::HTMLMediaElement::scheduleConfigureTextTracks):
(WebCore::HTMLMediaElement::scheduleMediaEngineWasUpdated):
(WebCore::HTMLMediaElement::scheduleUpdatePlayState):
(WebCore::HTMLMediaElement::cancelPendingTasks):
(WebCore::HTMLMediaElement::clearMediaPlayer):
(WebCore::HTMLMediaElement::closeTaskQueues):
(WebCore::HTMLMediaElement::suspend):
(WebCore::HTMLMediaElement::resume):
(WebCore::HTMLMediaElement::virtualHasPendingActivity const):
(WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured):
(WebCore::HTMLMediaElement::mediaPlayerBufferedTimeRangesChanged):
(WebCore::HTMLMediaElement::scheduleUpdateMediaState):
(WebCore::HTMLMediaElement::playbackControlsManagerBehaviorRestrictionsTimerFired):

  • html/HTMLMediaElement.h:
  • platform/GenericTaskQueue.h: Removed.
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(-[WebCoreAVFMovieObserver metadataLoaded]):
(-[WebCoreAVFMovieObserver didEnd:]):
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
(-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
(-[WebCoreAVFMovieObserver outputSequenceWasFlushed:]):
(-[WebCoreAVFMovieObserver metadataOutput:didOutputTimedMetadataGroups:fromPlayerItemTrack:]):
(-[WebCoreAVFMovieObserver metadataCollector:didCollectDateRangeMetadataGroups:indexesOfNewGroups:indexesOfModifiedGroups:]):
(-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]):
(-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]):

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

(WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::didParseInitializationData):
(WebCore::SourceBufferPrivateAVFObjC::abort):

  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.h:

Source/WTF:

We recently introduced the WTF::CancellableTask in order to be able to cancel
a pending task in the event loop, and/or check if the task is still pending.
It worked great as a replacement for EventLoopDeferrableTask. However, it was
insufficient as a replacement for task queues (such as MainThreadTaskQueue &
EventLoopTaskQueue) since there was no convenient way to cancel a group of
tasks. To address this, I am introducing WTF::TaskCancellationGroup. Whenever one
needs to create a CancellableTask, it now needs to provide a TaskCancellationGroup.
Several CancellableTask objects can share the same TaskCancellationGroup. Code now
now schedule one or more CancellableTasks on the event loop and hold on
to a TaskCancellationGroup. If they need to cancel those tasks, they can simply
call cancel() on the TaskCancellationGroup. They can also check if previously
scheduled tasks are still pending via TaskCancellationGroup::hasPendingTask().

  • wtf/CancellableTask.h:

(WTF::TaskCancellationGroup::TaskCancellationGroup):
(WTF::TaskCancellationGroup::cancel):
(WTF::TaskCancellationGroup::hasPendingTask const):
(WTF::TaskCancellationGroup::Impl::cancel):
(WTF::TaskCancellationGroup::Impl::hasPendingTask const):
(WTF::TaskCancellationGroup::Handle::isCancelled const):
(WTF::TaskCancellationGroup::Handle::Handle):
(WTF::TaskCancellationGroup::createHandle):
(WTF::CancellableTask::CancellableTask):
(WTF::CancellableTask::operator()):

  • wtf/WeakPtr.h:

(WTF::WeakPtrFactory::weakPtrCount const):

5:05 PM Changeset in webkit [278579] by Russell Epstein
  • 1 copy in tags/Safari-612.1.16.4

Tag Safari-612.1.16.4.

4:26 PM Changeset in webkit [278578] by sbarati@apple.com
  • 4 edits
    1 add in trunk

Short circuit read modify write nodes emit byte code that uses the wrong locals
https://bugs.webkit.org/show_bug.cgi?id=226576
<rdar://problem/78810362>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/short-circuit-read-modify-should-use-the-write-virtual-registers.js: Added.

(eval):

Source/JavaScriptCore:

It's never a good idea to use the wrong local :-)

This patch also adds support for dumping predecessors of basic blocks
in the bytecode dump.

  • bytecode/BytecodeDumper.cpp:

(JSC::CodeBlockBytecodeDumper<Block>::dumpGraph):

  • bytecompiler/NodesCodegen.cpp:

(JSC::ShortCircuitReadModifyResolveNode::emitBytecode):
(JSC::ShortCircuitReadModifyDotNode::emitBytecode):
(JSC::ShortCircuitReadModifyBracketNode::emitBytecode):

4:07 PM Changeset in webkit [278577] by Russell Epstein
  • 8 edits in branches/safari-612.1.16-branch/Source

Versioning.

WebKit-7612.1.16.4

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

Put the Baseline JIT prologue and op_loop_hint code in JIT thunks.
https://bugs.webkit.org/show_bug.cgi?id=226375

Reviewed by Keith Miller and Robin Morisset.

Baseline JIT prologue code varies in behavior based on several variables. These
variables include (1) whether the prologue does any arguments value profiling,
(2) whether the prologue is for a constructor, and (3) whether the compiled
CodeBlock will have such a large frame that it is greater than the stack reserved
zone (aka red zone) which would require additional stack check logic.

The pre-existing code would generate specialized code based on these (and other
variables). In converting to using thunks for the prologue, we opt not to
convert these specializations into runtime checks. Instead, the implementation
uses 1 of 8 possible specialized thunks to reduce the need to pass arguments for
runtime checks. The only needed argument passed to the prologue thunks is the
codeBlock pointer.

There are 8 possible thunks because we specialize based on 3 variables:

  1. doesProfiling
  2. isConstructor
  3. hasHugeFrame

23 yields 8 permutations of prologue thunk specializations.

Similarly, there are also 8 analogous arity fixup prologues that work similarly.

The op_loop_hint thunk only takes 1 runtime argument: the bytecode offset.

We've tried doing the loop_hint optimization check in the thunk (in order to move
both the fast and slow path into the thunk for maximum space savings). However,
this seems to have some slight negative impact on benchmark performance. We ended
up just keeping the fast path and instead have the slow path call a thunk to do
its work. This realizes the bulk of the size savings without the perf impact.

This patch also optimizes op_enter a bit more by eliminating the need to pass any
arguments to the thunk. The thunk previously took 2 arguments: localsToInit and
canBeOptimized. localsToInit is now computed in the thunk at runtime, and
canBeOptimized is used as a specialization argument to generate 2 variants of the
op_enter thunk: op_enter_canBeOptimized_Generator and op_enter_cannotBeOptimized_Generator,
thereby removing the need to pass it as a runtime argument.

LinkBuffer size results (from a single run of Speedometer2):

BaselineJIT: 93319628 (88.996532 MB) => 83851824 (79.967331 MB) 0.90x

ExtraCTIThunk: 5992 (5.851562 KB) => 6984 (6.820312 KB) 1.17x

...

Total: 197530008 (188.379295 MB) => 188459444 (179.728931 MB) 0.95x

Speedometer2 and JetStream2 results (as measured on an M1 Mac) are neutral.

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::untagReturnAddressWithoutExtraValidation):

  • assembler/MacroAssemblerARM64E.h:

(JSC::MacroAssemblerARM64E::untagReturnAddress):
(JSC::MacroAssemblerARM64E::untagReturnAddressWithoutExtraValidation):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::branchAdd32):

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::branchAdd32):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::offsetOfNumCalleeLocals):
(JSC::CodeBlock::offsetOfNumVars):
(JSC::CodeBlock::offsetOfArgumentValueProfiles):
(JSC::CodeBlock::offsetOfShouldAlwaysBeInlined):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitSaveCalleeSavesFor):
(JSC::AssemblyHelpers::emitSaveCalleeSavesForBaselineJIT):
(JSC::AssemblyHelpers::emitRestoreCalleeSavesForBaselineJIT):

  • jit/JIT.cpp:

(JSC::JIT::compileAndLinkWithoutFinalizing):
(JSC::JIT::prologueGenerator):
(JSC::JIT::arityFixupPrologueGenerator):
(JSC::JIT::privateCompileExceptionHandlers):

  • jit/JIT.h:
  • jit/JITInlines.h:

(JSC::JIT::emitNakedNearCall):

  • jit/JITOpcodes.cpp:

(JSC::JIT::op_ret_handlerGenerator):
(JSC::JIT::emit_op_enter):
(JSC::JIT::op_enter_Generator):
(JSC::JIT::op_enter_canBeOptimized_Generator):
(JSC::JIT::op_enter_cannotBeOptimized_Generator):
(JSC::JIT::emit_op_loop_hint):
(JSC::JIT::emitSlow_op_loop_hint):
(JSC::JIT::op_loop_hint_Generator):
(JSC::JIT::op_enter_handlerGenerator): Deleted.

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_enter):

  • jit/ThunkGenerators.cpp:

(JSC::popThunkStackPreservesAndHandleExceptionGenerator):

3:11 PM Changeset in webkit [278575] by Wenson Hsieh
  • 60 edits
    38 copies
    7 moves
    4 adds
    2 deletes in trunk

Upstream WebKit support for Live Text
https://bugs.webkit.org/show_bug.cgi?id=226706
<rdar://problem/78933684>

Reviewed by Tim Horton.

Source/WebCore:

Upstream WebKit support for the family of "live text" and visual intelligence features from WebKitAdditions.
This encompasses the following features on macOS 12 and iOS 15:

  • Text selection and interaction in images.
  • Data detectors in images.
  • Visual search (Look Up) via context menu in images.

To do this, we rename the IMAGE_EXTRACTION feature flag (and any other similar symbol names that reference
"image extraction" in some capacity) to their real names in macOS and iOS:

  • "Text recognition", in code that supports automatic OCR and data detectors in images.
  • "Look Up", in code that references the context menu action to invoke visual search.
  • "Visual Search", in code that manages QuickLook integration for invoking visual search.
  • "Image analysis", in code that directly integrates with VKImageAnalyzer and VKImageAnalyzerRequest.

Tests: fast/images/text-recognition/basic-image-overlay.html

fast/images/text-recognition/click-link-with-image-overlay.html
fast/images/text-recognition/image-overlay-creation-is-idempotent.html
fast/images/text-recognition/image-overlay-in-image-with-zero-font-size.html
fast/images/text-recognition/image-overlay-with-selection-styles.html
fast/images/text-recognition/ios/coalesce-selection-rects-in-image-overlay.html
fast/images/text-recognition/ios/reselect-word-in-image-overlay.html
fast/images/text-recognition/ios/select-word-in-image-overlay-inside-link.html
fast/images/text-recognition/ios/select-word-in-image-overlay.html
fast/images/text-recognition/ios/selection-rects-in-image-overlay.html
fast/images/text-recognition/mac/copy-image-overlay-text-with-context-menu.html
fast/images/text-recognition/mac/image-overlay-text-disables-app-highlight-menu-items.html
fast/images/text-recognition/mac/select-image-overlay-in-link-with-mouse-drag.html
fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-2.html
fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-does-not-fire-click.html
fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag.html
fast/images/text-recognition/mac/select-rotated-transparent-image-overlay.html
fast/images/text-recognition/mac/select-word-in-draggable-image-overlay.html
fast/images/text-recognition/mac/select-word-in-transparent-image-overlay.html

  • WebCore.xcodeproj/project.pbxproj:
  • editing/cocoa/DataDetection.h:
  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::createElementForImageOverlay):

  • en.lproj/Localizable.strings:
  • html/HTMLElement.cpp:

(WebCore::HTMLElement::updateWithTextRecognitionResult):
(WebCore::HTMLElement::updateWithImageExtractionResult): Deleted.

  • html/HTMLElement.h:
  • page/ChromeClient.h:

(WebCore::ChromeClient::requestTextRecognition):
(WebCore::ChromeClient::requestImageExtraction): Deleted.

  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::checkOrEnableIfNeeded const):

  • page/EventHandler.cpp:

(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::clear):
(WebCore::EventHandler::mouseMoved):
(WebCore::EventHandler::updateMouseEventTargetNode):
(WebCore::EventHandler::m_textRecognitionHoverTimerFired):
(WebCore::EventHandler::imageExtractionTimerFired): Deleted.

  • page/EventHandler.h:
  • page/Quirks.cpp:
  • page/Quirks.h:
  • platform/ContextMenuItem.cpp:

(WebCore::isValidContextMenuAction):

  • platform/ContextMenuItem.h:
  • platform/LocalizedStrings.h:
  • platform/TextRecognitionResult.h: Renamed from Source/WebCore/platform/ImageExtractionResult.h.

Rename the following:

  • ImageExtractionResult => TextRecognitionResult
  • ImageExtractionTextData => TextRecognitionWordData
  • ImageExtractionLineData => TextRecognitionLineData
  • ImageExtractionDataDetectorInfo => TextRecognitionDataDetector

(WebCore::TextRecognitionWordData::TextRecognitionWordData):
(WebCore::TextRecognitionWordData::encode const):
(WebCore::TextRecognitionWordData::decode):
(WebCore::TextRecognitionLineData::TextRecognitionLineData):
(WebCore::TextRecognitionDataDetector::TextRecognitionDataDetector):
(WebCore::TextRecognitionLineData::encode const):
(WebCore::TextRecognitionLineData::decode):
(WebCore::TextRecognitionResult::isEmpty const):
(WebCore::TextRecognitionResult::encode const):
(WebCore::TextRecognitionResult::decode):

  • platform/cocoa/LocalizedStringsCocoa.mm:

(WebCore::contextMenuItemTagLookUpImage):
(WebCore::contextMenuItemTagRevealImage): Deleted.

  • testing/Internals.cpp:

(WebCore::makeDataForLine):
(WebCore::Internals::installImageOverlay):

Source/WebKit:

See WebCore/ChangeLog for more details.

  • Platform/cocoa/ImageExtractionUtilities.mm: Removed.
  • Platform/cocoa/TextRecognitionUtilities.h: Renamed from Source/WebKit/Platform/cocoa/ImageExtractionUtilities.h.
  • Platform/cocoa/TextRecognitionUtilities.mm: Added.

Rename ImageExtractionUtilities to TextRecognitionUtilities.

(WebKit::floatQuad):
(WebKit::floatQuads):
(WebKit::makeTextRecognitionResult):
(WebKit::isLiveTextEnabled):

  • Shared/API/c/WKSharedAPICast.h:

(WebKit::toAPI):
(WebKit::toImpl):

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<WebCore::TextRecognitionDataDetector>::encodePlatformData):
(IPC::ArgumentCoder<WebCore::TextRecognitionDataDetector>::decodePlatformData):
(IPC::ArgumentCoder<WebCore::ImageExtractionDataDetectorInfo>::encodePlatformData): Deleted.
(IPC::ArgumentCoder<WebCore::ImageExtractionDataDetectorInfo>::decodePlatformData): Deleted.

  • Shared/TextRecognitionUpdateResult.h: Renamed from Source/WebKit/Shared/ImageExtractionUpdateResult.h.
  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<TextRecognitionDataDetector>::encode):
(IPC::ArgumentCoder<TextRecognitionDataDetector>::decode):
(IPC::ArgumentCoder<ImageExtractionDataDetectorInfo>::encode): Deleted.
(IPC::ArgumentCoder<ImageExtractionDataDetectorInfo>::decode): Deleted.

  • Shared/WebCoreArgumentCoders.h:
  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/_WKElementAction.mm:

(+[_WKElementAction _elementActionWithType:customTitle:assistant:]):
(+[_WKElementAction imageForElementActionType:]):

Note that we need to keep the _WKElementActionTypeRevealImage SPI symbol, to avoid breaking MobileMail.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::handleContextMenuLookUpImage):
(WebKit::WebPageProxy::handleContextMenuRevealImage): Deleted.

Rename handleContextMenuRevealImage to handleContextMenuLookUpImage.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::ensureImageAnalyzer):
(WebKit::createImageAnalysisRequest):
(WebKit::WebViewImpl::requestTextRecognition):
(WebKit::WebViewImpl::computeHasVisualSearchResults):

Rename computeCanRevealImage to computeHasVisualSearchResults.

(WebKit::WebViewImpl::acceptsPreviewPanelControl):

  • UIProcess/PageClient.h:

(WebKit::PageClient::requestTextRecognition):
(WebKit::PageClient::computeHasVisualSearchResults):
(WebKit::PageClient::requestImageExtraction): Deleted.
(WebKit::PageClient::computeCanRevealImage): Deleted.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::contextMenuItemSelected):
(WebKit::WebPageProxy::requestTextRecognition):
(WebKit::WebPageProxy::computeHasVisualSearchResults):
(WebKit::WebPageProxy::updateWithTextRecognitionResult):
(WebKit::WebPageProxy::requestImageExtraction): Deleted.
(WebKit::WebPageProxy::computeCanRevealImage): Deleted.
(WebKit::WebPageProxy::updateWithImageExtractionResult): Deleted.

Rename updateWithImageExtractionResult to updateWithTextRecognitionResult.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::requestTextRecognition):
(WebKit::PageClientImpl::requestImageExtraction): Deleted.

Rename requestImageExtraction to requestTextRecognition.

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

(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
(-[WKActionSheetAssistant defaultActionsForImageSheet:]):
(-[WKActionSheetAssistant handleElementActionWithType:element:needsInteraction:]):

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

(-[WKContentView setUpInteraction]):
(-[WKContentView cleanUpInteraction]):
(-[WKContentView deferringGestures]):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView gestureRecognizer:shouldRequireFailureOfGestureRecognizer:]):
(-[WKContentView gestureRecognizer:shouldBeRequiredToFailByGestureRecognizer:]):
(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView targetForAction:withSender:]):
(-[WKContentView _didStartProvisionalLoadForMainFrame]):
(-[WKContentView shouldDeferGestureDueToImageAnalysis:]):
(-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView _endImageAnalysisGestureDeferral:]):
(-[WKContentView _doAfterPendingImageAnalysis:]):
(-[WKContentView _invokeAllActionsToPerformAfterPendingImageAnalysis:]):
(-[WKContentView presentVisualSearchPreviewControllerForImage:imageURL:title:imageBounds:appearanceActions:]):
(-[WKContentView previewController:frameForPreviewItem:inSourceView:]):
(-[WKContentView previewController:transitionImageForPreviewItem:contentRect:]):
(-[WKContentView previewControllerDidDismiss:]):
(-[WKContentView numberOfPreviewItemsInPreviewController:]):
(-[WKContentView previewController:previewItemAtIndex:]):
(-[WKContentView provideDataForItem:]):
(-[WKContentView actionSheetAssistant:shouldIncludeShowTextActionForElement:]):
(-[WKContentView actionSheetAssistant:showTextForImage:imageURL:title:imageBounds:]):
(-[WKContentView actionSheetAssistant:shouldIncludeLookUpImageActionForElement:]):
(-[WKContentView actionSheetAssistant:lookUpImage:imageURL:title:imageBounds:]):
(-[WKContentView imageAnalyzer]):
(-[WKContentView hasPendingImageAnalysisRequest]):
(-[WKContentView _setUpImageAnalysis]):
(-[WKContentView _tearDownImageAnalysis]):
(-[WKContentView _cancelImageAnalysis]):
(-[WKContentView createImageAnalysisRequest:image:imageURL:]):
(-[WKContentView createImageAnalysisRequest:image:]):
(-[WKContentView validateImageAnalysisRequestIdentifier:]):
(-[WKContentView requestTextRecognition:imageData:completionHandler:]):
(-[WKContentView imageAnalysisGestureDidBegin:]):
(-[WKContentView imageAnalysisGestureDidFail:]):
(-[WKContentView imageAnalysisGestureDidTimeOut:]):
(-[WKContentView _insertTextFromCameraForWebView:]):
(-[WKContentView captureTextFromCameraForWebView:]):
(-[WKContentView _contextMenuInteraction:configurationForMenuAtLocation:completion:]):
(-[WKContentView continueContextMenuInteraction:]):
(-[WKContentView contextMenuInteraction:willEndForConfiguration:animator:]):
(-[WKContentView shouldDeferGestureDueToImageExtraction:]): Deleted.
(-[WKContentView _endImageExtractionGestureDeferral:]): Deleted.
(-[WKContentView _doAfterPendingImageExtraction:]): Deleted.
(-[WKContentView _invokeAllActionsToPerformAfterPendingImageExtraction:]): Deleted.

  • UIProcess/ios/WKImageAnalysisGestureRecognizer.h: Renamed from Source/WebKit/UIProcess/ios/WKImageExtractionGestureRecognizer.h.
  • UIProcess/ios/WKImageAnalysisGestureRecognizer.mm: Renamed from Source/WebKit/UIProcess/ios/WKImageExtractionGestureRecognizer.mm.

(-[WKImageAnalysisGestureRecognizer initWithImageAnalysisGestureDelegate:]):
(-[WKImageAnalysisGestureRecognizer setState:]):

Rename WKImageExtractionGestureRecognizer to WKImageAnalysisGestureRecognizer (along with all adjacent classes).

  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::requestTextRecognition):
(WebKit::PageClientImpl::computeHasVisualSearchResults):
(WebKit::PageClientImpl::requestImageExtraction): Deleted.
(WebKit::PageClientImpl::computeCanRevealImage): Deleted.

  • UIProcess/mac/WKVisualSearchPreviewController.h: Renamed from Source/WebKit/UIProcess/mac/WKImageExtractionPreviewController.h.
  • UIProcess/mac/WKVisualSearchPreviewController.mm: Renamed from Source/WebKit/UIProcess/mac/WKImageExtractionPreviewController.mm.

(-[WKVisualSearchPreviewController initWithPage:imageData:title:imageURL:]):
(-[WKVisualSearchPreviewController beginControl:]):
(-[WKVisualSearchPreviewController endControl:]):
(-[WKVisualSearchPreviewController closePanelIfNecessary]):
(-[WKVisualSearchPreviewController isControlling:]):
(-[WKVisualSearchPreviewController provideDataForItem:]):
(-[WKVisualSearchPreviewController numberOfPreviewItemsInPreviewPanel:]):
(-[WKVisualSearchPreviewController previewPanel:previewItemAtIndex:]):
(-[WKVisualSearchPreviewController previewPanel:initialActivityForItem:]):

Rename WKImageExtractionPreviewController to WKVisualSearchPreviewController.

  • UIProcess/mac/WebContextMenuProxyMac.mm:

(WebKit::menuItemIdentifier):
(WebKit::WebContextMenuProxyMac::getContextMenuFromItems):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::beginPreviewPanelControl):
(WebKit::WebPageProxy::endPreviewPanelControl):
(WebKit::WebPageProxy::closeSharedPreviewPanelIfNecessary):
(WebKit::WebPageProxy::showImageInVisualSearchPreviewPanel):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::requestTextRecognition):
(WebKit::WebChromeClient::requestImageExtraction): Deleted.

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

(WebKit::WebPage::didCommitLoad):
(WebKit::WebPage::requestTextRecognition):
(WebKit::WebPage::updateWithTextRecognitionResult):
(WebKit::WebPage::requestImageExtraction): Deleted.
(WebKit::WebPage::updateWithImageExtractionResult): Deleted.

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

Source/WebKitLegacy/mac:

  • WebView/WebHTMLView.mm: Replace IMAGE_EXTRACTION with IMAGE_ANALYSIS.

Source/WTF:

  • wtf/PlatformEnableCocoa.h:

Move the feature flag out of WebKitAdditions and into OpenSource as IMAGE_ANALYSIS.

Tools:

Replace IMAGE_EXTRACTION with IMAGE_ANALYSIS.

  • TestWebKitAPI/Tests/WebKit/InjectedBundleHitTest.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm:
  • TestWebKitAPI/Tests/mac/ImmediateActionTests.mm:

LayoutTests:

Rename fast/images/image-extraction to fast/images/text-recognition.

  • TestExpectations:
  • fast/images/text-recognition/basic-image-overlay-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/basic-image-overlay-expected-mismatch.html.
  • fast/images/text-recognition/basic-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/basic-image-overlay.html.
  • fast/images/text-recognition/click-link-with-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/click-link-with-image-overlay-expected.txt.
  • fast/images/text-recognition/click-link-with-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/click-link-with-image-overlay.html.
  • fast/images/text-recognition/image-overlay-creation-is-idempotent-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-creation-is-idempotent-expected.txt.
  • fast/images/text-recognition/image-overlay-creation-is-idempotent.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-creation-is-idempotent.html.
  • fast/images/text-recognition/image-overlay-in-image-with-zero-font-size-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-in-image-with-zero-font-size-expected-mismatch.html.
  • fast/images/text-recognition/image-overlay-in-image-with-zero-font-size.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-in-image-with-zero-font-size.html.
  • fast/images/text-recognition/image-overlay-with-selection-styles-expected.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-with-selection-styles-expected.html.
  • fast/images/text-recognition/image-overlay-with-selection-styles.html: Renamed from LayoutTests/fast/images/image-extraction/image-overlay-with-selection-styles.html.
  • fast/images/text-recognition/ios/coalesce-selection-rects-in-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/coalesce-selection-rects-in-image-overlay-expected.txt.
  • fast/images/text-recognition/ios/coalesce-selection-rects-in-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/ios/coalesce-selection-rects-in-image-overlay.html.
  • fast/images/text-recognition/ios/reselect-word-in-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/reselect-word-in-image-overlay-expected.txt.
  • fast/images/text-recognition/ios/reselect-word-in-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/ios/reselect-word-in-image-overlay.html.
  • fast/images/text-recognition/ios/select-word-in-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/select-word-in-image-overlay-expected.txt.
  • fast/images/text-recognition/ios/select-word-in-image-overlay-inside-link-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/select-word-in-image-overlay-inside-link-expected.txt.
  • fast/images/text-recognition/ios/select-word-in-image-overlay-inside-link.html: Renamed from LayoutTests/fast/images/image-extraction/ios/select-word-in-image-overlay-inside-link.html.
  • fast/images/text-recognition/ios/select-word-in-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/ios/select-word-in-image-overlay.html.
  • fast/images/text-recognition/ios/selection-rects-in-image-overlay-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/ios/selection-rects-in-image-overlay-expected.txt.
  • fast/images/text-recognition/ios/selection-rects-in-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/ios/selection-rects-in-image-overlay.html.
  • fast/images/text-recognition/mac/copy-image-overlay-text-with-context-menu-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/mac/copy-image-overlay-text-with-context-menu-expected.txt.
  • fast/images/text-recognition/mac/copy-image-overlay-text-with-context-menu.html: Renamed from LayoutTests/fast/images/image-extraction/mac/copy-image-overlay-text-with-context-menu.html.
  • fast/images/text-recognition/mac/image-overlay-text-disables-app-highlight-menu-items-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/mac/image-overlay-text-disables-app-highlight-menu-items-expected.txt.
  • fast/images/text-recognition/mac/image-overlay-text-disables-app-highlight-menu-items.html: Renamed from LayoutTests/fast/images/image-extraction/mac/image-overlay-text-disables-app-highlight-menu-items.html.
  • fast/images/text-recognition/mac/select-image-overlay-in-link-with-mouse-drag-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-in-link-with-mouse-drag-expected.txt.
  • fast/images/text-recognition/mac/select-image-overlay-in-link-with-mouse-drag.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-in-link-with-mouse-drag.html.
  • fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-2-expected.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-2-expected.html.
  • fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-2.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-2.html.
  • fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-does-not-fire-click-expected.txt: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-does-not-fire-click-expected.txt.
  • fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-does-not-fire-click.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-does-not-fire-click.html.
  • fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-expected-mismatch.html.
  • fast/images/text-recognition/mac/select-image-overlay-with-mouse-drag.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag.html.
  • fast/images/text-recognition/mac/select-rotated-transparent-image-overlay-expected.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-rotated-transparent-image-overlay-expected.html.
  • fast/images/text-recognition/mac/select-rotated-transparent-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-rotated-transparent-image-overlay.html.
  • fast/images/text-recognition/mac/select-word-in-draggable-image-overlay-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-word-in-draggable-image-overlay-expected-mismatch.html.
  • fast/images/text-recognition/mac/select-word-in-draggable-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-word-in-draggable-image-overlay.html.
  • fast/images/text-recognition/mac/select-word-in-transparent-image-overlay-expected-mismatch.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-word-in-transparent-image-overlay-expected-mismatch.html.
  • fast/images/text-recognition/mac/select-word-in-transparent-image-overlay.html: Renamed from LayoutTests/fast/images/image-extraction/mac/select-word-in-transparent-image-overlay.html.
2:20 PM Changeset in webkit [278574] by mmaxfield@apple.com
  • 2 edits in trunk/Websites/browserbench.org

Release MotionMark 1.2!!! 🎉
https://bugs.webkit.org/show_bug.cgi?id=226741

Reviewed by Geoff Garen.

Simply update the link to point to it.

  • index.html:
2:17 PM Changeset in webkit [278573] by Ruben Turcios
  • 8 edits in branches/safari-612.1.17-branch/Source

Versioning.

WebKit-7612.1.17

2:11 PM Changeset in webkit [278572] by Ruben Turcios
  • 1 copy in branches/safari-612.1.17-branch

New branch.

1:27 PM Changeset in webkit [278571] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Compile error by trying to fit a GCGLint64* to a GLint64*
https://bugs.webkit.org/show_bug.cgi?id=226639

Patch by Eleni Maria Stea <hikiko> on 2021-06-07
Reviewed by Kenneth Russell.

ANGLE functions GetInteger64vRobustANGLE and
GetInteger64i_vRobustANGLE expect a value of GLint64* aka
long int * but we try to fit a pointer to a long long int.
Fixed compile errors.

  • platform/graphics/GraphicsTypesGL.h:
1:09 PM Changeset in webkit [278570] by Fujii Hironori
  • 2 edits in trunk/Tools

Windows Python 2.7 fails to install tblib-1.7.0 due to "TypeError: environment can only contain strings"
https://bugs.webkit.org/show_bug.cgi?id=226707

Reviewed by Jonathan Bedard.

WinCairo port is still using Python 2.7 that has ascii strings and
unicode strings. WinPort.setup_crash_log_saving modifies
_NT_SYMBOL_PATH env var to have a unicode string. So, after
setup_crash_log_saving, AutoInstall failed due to the unicode
string in os.environ.

  • Scripts/webkitpy/port/win.py:

(WinPort.setup_crash_log_saving): Convert self._build_path() to a
ascii string with str().

1:05 PM Changeset in webkit [278569] by Fujii Hironori
  • 2 edits in trunk/Tools

run-webkit-test should use python2 for wpt serve until the latest will be imported
https://bugs.webkit.org/show_bug.cgi?id=226703

Reviewed by Jonathan Bedard.

The current imported wpt.py doesn't support Python 3 yet. Use
Python 2 temporarily.

  • Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:

(WebPlatformTestServer.init):

12:55 PM Changeset in webkit [278568] by rmorisset@apple.com
  • 14 edits
    3 adds in trunk

Optimize compareStrictEq when neither side is a double and at least one is neither a string nor a BigInt
https://bugs.webkit.org/show_bug.cgi?id=226676

Reviewed by Filip Pizlo.

JSTests:

I made two variants of the already existing poly-stricteq microbenchmarks with different types in the array.
I also tweaked all three so that we more reliably reach the FTL.
Finally I added a stress-test to verify that I did not introduce an OSR exit bug.

  • microbenchmarks/poly-stricteq-not-double-nor-string.js: Added.

(foo):
(test):

  • microbenchmarks/poly-stricteq-not-double.js: Added.

(foo):
(test):

  • microbenchmarks/poly-stricteq.js:

(foo):
(test):

  • stress/poly-stricteq-not-double-nor-string-fail.js: Added.

(foo):
(test):

Source/JavaScriptCore:

There is exactly one case where x === y must return false despite x and y being JSValues with the same bits:

NaN === NaN

There are a few cases where x === y must return true despite x and y being JSValues with potentially different bits:

Double === Int32
String === String
HeapBigInt === HeapBigInt
HeapBigInt === BigInt32 (if they are enabled)

If we don't have a double on either side, at least one side has neither a String nor a HeapBigInt, and BigInt32 are disabled, we can clearly ignore all of these pathological cases.

This optimization was decided based on looking at DFG graphs of Speedometer2; here is a sample of the compareStrictEq(Untyped, Untyped), courtesy of Phil:

Final|Array|String|Bool, Final|Array|String|Bool
Array|String|Bool, String|Bool (twice)
Array|String|Bool, String|Int32 (once in DFG, once in FTL)

! Array|String|Bool, Array|Bool
! Final|Other, Final|Other
! Int32|Other, Int32

Final|StringIdent, Final|StringIdent (3 times)
Final|StringIdent|BoolInt32, StringIdent|BoolInt32 (twice)
String|Bool, String|Bool (4 times)
DoublePureNaN, String|Bool

! Other, Function|Other
! Final|Other, Final|Function|Other (twice)

Final|String|Bool|Other, Final|String|Bool|Other (3 times, two in the FTL)
Final|String|Int32, String|Int32 (four times)
String|Int32|Bool, Function|String|Int32|Bool (twice)
String|DoublePureNaN, String|Bool (twice)

! Final|Bool|Other, Final|Function|Other (four times, twice in FTL)
I marked with a ! those for which this optimization should apply.

The only slightly interesting part of this patch is DFG::SpeculativeJIT::speculateNeitherDoubleNorHeapBigIntNorString where I took care to skip every test whose result we can predict from the abstract interpreter.

Results on microbenchmarks:

poly-stricteq-not-double 45.5793+-0.5304 ? 46.0306+-0.5621 ?
poly-stricteq-not-double-nor-string 45.5829+-0.5750 16.9089+-0.3070 definitely 2.6958x faster
poly-stricteq 49.9719+-0.6450 48.9855+-0.5227 might be 1.0201x faster

I also measured the amount of code that we generate in the DFG on JetStream2.
The results here are disappointing but still measurable. Before:

DFG_fast_CompareStrictEq totalBytes: 468425 count: 10951 avg: 42.774632
DFG_fast_CompareStrictEq totalBytes: 468020 count: 10917 avg: 42.870752
DFG_fast_CompareStrictEq totalBytes: 467424 count: 10888 avg: 42.930198

After:

DFG_fast_CompareStrictEq totalBytes: 463946 count: 10917 avg: 42.497573
DFG_fast_CompareStrictEq totalBytes: 474492 count: 11138 avg: 42.601185
DFG_fast_CompareStrictEq totalBytes: 467138 count: 10970 avg: 42.583227

  • bytecode/SpeculatedType.h:

(JSC::isNeitherDoubleNorHeapBigIntNorStringSpeculation):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupCompareStrictEqAndSameValue):

  • dfg/DFGNode.h:

(JSC::DFG::Node::shouldSpeculateNeitherDoubleNorHeapBigIntNorString):

  • dfg/DFGSafeToExecute.h:

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

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileStrictEq):
(JSC::DFG::SpeculativeJIT::compileNotDoubleNeitherDoubleNorHeapBigIntNorStringStrictEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleNotDoubleNeitherDoubleNorHeapBigIntNorStringStrictEquality):
(JSC::DFG::SpeculativeJIT::speculateNotDouble):
(JSC::DFG::SpeculativeJIT::speculateNeitherDoubleNorHeapBigIntNorString):
(JSC::DFG::SpeculativeJIT::speculate):

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

(WTF::printInternal):

  • dfg/DFGUseKind.h:

(JSC::DFG::typeFilterFor):
(JSC::DFG::checkMayCrashIfInputIsEmpty):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
(JSC::FTL::DFG::LowerDFGToB3::speculate):
(JSC::FTL::DFG::LowerDFGToB3::speculateNeitherDoubleNorHeapBigIntNorString):

12:46 PM Changeset in webkit [278567] by Ruben Turcios
  • 8 edits in trunk/Source

Versioning.

WebKit-7612.1.18

12:44 PM Changeset in webkit [278566] by graouts@webkit.org
  • 4 edits
    2 adds in trunk

REGRESSION (r272201): iPad render flashing on load
https://bugs.webkit.org/show_bug.cgi?id=226216
<rdar://problem/78466306>

Reviewed by Simon Fraser.

Source/WebCore:

When we switched to wrapping all animations in animation groups for bug 219894, we neglected to update GraphicsLayerCA::moveOrCopyAnimations().
We now iterate over m_animationGroups which contain the animation groups that are current and in the order they were added, and also ensure
we preserve the original begin time for each group.

Test: webanimations/accelerated-animation-tiled-while-running.html

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::moveOrCopyLayerAnimation):
(WebCore::GraphicsLayerCA::moveOrCopyAnimations):

  • platform/graphics/ca/GraphicsLayerCA.h:

LayoutTests:

Add a test that runs the same accelerated animation on two container elements, stack one above the other.
The bottom container has a red background while the top container has a green background, the whole body
being green. After the animation has started, we set the bottom element to have a very large size such
that its layer becomes tiled. Before this patch the bottom element would stop animation and its red
background would start appearing as the top element would keep animating. After this patch both elements
are animated and no red should appear.

  • webanimations/accelerated-animation-tiled-while-running-expected.html: Added.
  • webanimations/accelerated-animation-tiled-while-running.html: Added.
11:53 AM Changeset in webkit [278565] by Devin Rousso
  • 10 edits in trunk/Source

Convert WebCore::SnapshotOptions into an enum class
https://bugs.webkit.org/show_bug.cgi?id=226730

Reviewed by Wenson Hsieh.

Convert SnapshotOptions into an enum class SnapshotFlags and create a container `struct
SnapshotOptions that also allows for changing the DestinationColorSpace` (defaults to sRGB)
and PixelFormat (defaults to BGRA8).

No behavior change.

Source/WebCore:

  • page/FrameSnapshotting.h:
  • page/FrameSnapshotting.cpp:

(WebCore::snapshotFrameRect):
(WebCore::snapshotFrameRectWithClip):
(WebCore::snapshotSelection):
(WebCore::snapshotNode):

  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::snapshotRect):

  • page/PageColorSampler.cpp:

(WebCore::sampleColor):

  • page/PageConsoleClient.cpp:

(WebCore::PageConsoleClient::screenshot):

  • page/TextIndicator.cpp:

(WebCore::snapshotOptionsForTextIndicatorOptions):
(WebCore::takeSnapshot):
(WebCore::takeSnapshots):

  • platform/DragImage.cpp:

(WebCore::createDragImageForSelection):
(WebCore::createDragImageForRange):

Source/WebKit:

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::createSelectionSnapshot const):

11:10 AM Changeset in webkit [278564] by youenn@apple.com
  • 274 edits
    32 adds
    8 deletes in trunk/Source/ThirdParty/libwebrtc

Update libvpx to M92
https://bugs.webkit.org/show_bug.cgi?id=226488

Reviewed by Eric Carlson.

  • CMakeLists.txt:
  • Source/third_party/libvpx: Resynced.
  • libwebrtc.xcodeproj/project.pbxproj:
10:00 AM Changeset in webkit [278563] by imanol
  • 2 edits in trunk/Source/WebCore

Change WebXRSpace::efectiveOrigin() matrix multiplication order
https://bugs.webkit.org/show_bug.cgi?id=224364
<rdar://problem/76754680>

Reviewed by Sergio Villar Senin.

The current multiplication order is not working correctly when combining local-floor space and getOfffsetReferenceSpace().
The reference space is out of sync with input ray pose after some teleportations:
https://github.com/immersive-web/webxr-samples/blob/main/teleportation.html

Tested using WebXR WPT tests.

  • Modules/webxr/WebXRSpace.cpp:

(WebCore::WebXRSpace::effectiveOrigin const):

8:37 AM Changeset in webkit [278562] by imanol
  • 6 edits in trunk

Use 3D points to map the WebXRBoundedReferenceSpace bounds transform
https://bugs.webkit.org/show_bug.cgi?id=224365
<rdar://problem/76754927>

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

Update WebXR test expectations.

  • web-platform-tests/webxr/xrReferenceSpace_originOffsetBounded.https-expected.txt:

Source/WebCore:

WebXRBoundedReferenceSpace is currently using Point2D mapping to transfom the bounds geometry.
This is not correct because the originOffset is a 3D transform and it expects the bounds depth
coordinates to be on the z axis instead of the y axis.

Tested by WebXR WPT tests.

  • Modules/webxr/WebXRBoundedReferenceSpace.cpp:

(WebCore::WebXRBoundedReferenceSpace::updateIfNeeded):

LayoutTests:

Update WebXR test expectations.

  • platform/wpe/TestExpectations:
8:06 AM Changeset in webkit [278561] by Antti Koivisto
  • 8 edits in trunk/Source/WebCore

Factor selection state computation out of LegacyInlineTextBox
https://bugs.webkit.org/show_bug.cgi?id=226718

Reviewed by Alan Bujtas.

Move the code to SelectionRangeData.

  • layout/integration/LayoutIntegrationRunIteratorModernPath.h:

(WebCore::LayoutIntegration::RunIteratorModernPath::selectableRange const):

  • rendering/HighlightData.cpp:

(WebCore::HighlightData::highlightStateForRenderer):
(WebCore::HighlightData::highlightStateForTextBox):
(WebCore::HighlightData::rangeForTextBox):

  • rendering/HighlightData.h:

(WebCore::HighlightData::HighlightData):

  • rendering/LegacyInlineTextBox.cpp:

(WebCore::LegacyInlineTextBox::selectionState):
(WebCore::LegacyInlineTextBox::selectableRange const):
(WebCore::LegacyInlineTextBox::selectionStartEnd const):
(WebCore::LegacyInlineTextBox::highlightStartEnd const):
(WebCore::LegacyInlineTextBox::verifySelectionState const): Deleted.
(WebCore::LegacyInlineTextBox::clampedStartEndForState const): Deleted.

  • rendering/LegacyInlineTextBox.h:
  • rendering/SelectionRangeData.cpp:

(WebCore::SelectionRangeData::SelectionRangeData):

  • rendering/TextBoxSelectableRange.h:
6:45 AM Changeset in webkit [278560] by Wenson Hsieh
  • 8 edits in trunk

[Cocoa] Find-in-page should match text inside image overlays
https://bugs.webkit.org/show_bug.cgi?id=226704

Reviewed by Tim Horton.

Source/WebCore:

Add a new TextIteratorBehavior to allow TextIterator to descend into image overlay content, and use this option
when creating TextIterators for find-in-page. See WebKit/ChangeLog for more details.

Test: WebKit.FindTextInImageOverlay

  • editing/TextIterator.cpp:

(WebCore::TextIterator::handleReplacedElement):
(WebCore::findIteratorOptions):

  • editing/TextIteratorBehavior.h:

Source/WebKit:

Add the PaintAllContent and PaintBackgrounds text indicator options when generating a TextIndicator for
selected content inside an image overlay. See WebCore/ChangeLog for more details.

  • WebProcess/WebPage/FindController.cpp:

(WebKit::FindController::updateFindIndicator):

  • WebProcess/WebPage/ios/FindControllerIOS.mm:

(WebKit::findTextIndicatorOptions):
(WebKit::FindIndicatorOverlayClientIOS::drawRect):
(WebKit::FindController::updateFindIndicator):

Tools:

Add an API test to verify that text inside image overlays is visible to find-in-page.

  • TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:
6:26 AM Changeset in webkit [278559] by Aditya Keerthi
  • 3 edits
    2 adds in trunk

[iOS] Unexpected scrolling when switching focus from a text input to a select element
https://bugs.webkit.org/show_bug.cgi?id=226657
<rdar://problem/78290515>

Reviewed by Tim Horton.

Source/WebKit:

When switching focus from a text input to a select element, UIKit makes
deferred calls to -[WKWebView inputView] after the keyboard dismissal.
This method calls -[WKContentView inputViewForWebView], which calls
-[WKContentView _zoomToRevealFocusedElement]. Consequently, these
methods can get invoked while the context menu (dropdown) is displayed
for a focused select element.

In this instance, the call should be idempotent, since the focused element
is fully visible in the viewport. However, since the context menu is visible
and overlaps the element, our logic incorrectly determines that the element
is obscured, leading to unexpected zooming/scrolling. To fix, we need to
correct the logic that determines the visible portion of the view.

Test: fast/forms/ios/form-control-refresh/select/focus-select-after-textfield.html

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):

Always use the window to determine the portion of the webview that is
visible, rather than relying on the root view controller's top-most
full-screen view controller's view.

The old logic worked fine in most cases, since the root view controller
and the top-most full-screen view controller are almost always the same.
Furthermore, the root view controller's view usually takes up the entire
window.

However, when the context menu is on screen, the top-most full-screen
view controller is an internal UIKit view controller
(_UIContextMenuActionsOnlyViewController), and the associated view
is the context menu view. This exposed a flaw in the existing logic, as
visibility detection could be performed by intersecting with an
incorrect view. In general, the top-most full-screen view is not a
reliable way to determine the visible portion of the webview.

LayoutTests:

Add a layout test to exercise the bug.

  • fast/forms/ios/form-control-refresh/select/focus-select-after-textfield-expected.txt: Added.
  • fast/forms/ios/form-control-refresh/select/focus-select-after-textfield.html: Added.
4:45 AM Changeset in webkit [278558] by aboya@igalia.com
  • 2 edits in trunk/Source/WTF

[WTF][GStreamer] Fix clang TSA warnings in WTF::DataMutex
https://bugs.webkit.org/show_bug.cgi?id=226719

Reviewed by Xabier Rodriguez-Calvar.

Fix the remaning clang thread safety warnings in WTF::DataMutex.

The goal of this patch is to reduce the number of warnings in the
GStreamer codebase. Whether DataMutex should be deprecated in favor of
Locker with the clang TSA annotations is outside of the scope of this
patch.

  • wtf/DataMutex.h:
4:43 AM Changeset in webkit [278557] by aboya@igalia.com
  • 2 edits in trunk/Source/WebCore

[GStreamer] Add clang TSA annotations: MainThreadNotifier
https://bugs.webkit.org/show_bug.cgi?id=226717

Reviewed by Xabier Rodriguez-Calvar.

Adds clang thread safety annotations to
MainThreadNotifier.h

  • platform/graphics/gstreamer/MainThreadNotifier.h:
4:43 AM Changeset in webkit [278556] by aboya@igalia.com
  • 2 edits in trunk/Source/WebCore

[GStreamer] Add clang TSA annotations: InbandTextTrackPrivateGStreamer
https://bugs.webkit.org/show_bug.cgi?id=226716

Reviewed by Xabier Rodriguez-Calvar.

Adds clang thread safety annotations to
InbandTextTrackPrivateGStreamer.h.

  • platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
4:40 AM Changeset in webkit [278555] by aboya@igalia.com
  • 2 edits in trunk/Source/WTF

[GStreamer] Remove spurious assert in WTF::DataMutex
https://bugs.webkit.org/show_bug.cgi?id=226714

Reviewed by Michael Catanzaro.

Remove DATA_MUTEX_CHECK(!mutex().isHeld()); from the DataMutexLocker
constructor, introduced in r278248.

Trying to lock a currently held mutex is not an error condition that
should crash the process, it will just wait for its turn to lock it.

  • wtf/DataMutex.h:
4:40 AM Changeset in webkit [278554] by aboya@igalia.com
  • 2 edits in trunk/Source/WebCore

[GStreamer] Fix clang TSA warning in AbortableTaskQueue
https://bugs.webkit.org/show_bug.cgi?id=226715

Reviewed by Michael Catanzaro.

Fixes a clang thread safety analysis warning in AbortableTaskQueue.

  • platform/AbortableTaskQueue.h:
4:11 AM Changeset in webkit [278553] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

$vm should have a function for checking if security assertions are enabled similar to $vm.assertEnabled
https://bugs.webkit.org/show_bug.cgi?id=226020
<rdar://problem/78567619>

Patch by Tuomas Karkkainen <tuomas.webkit@apple.com> on 2021-06-07
Reviewed by Mark Lam.

Add method $vm.securityAssertEnabled() which parallels $vm.assertEnabled(), and allows
checking at runtime whether the current JavaScriptCore build has security assertions enabled.

  • tools/JSDollarVM.cpp:
3:43 AM Changeset in webkit [278552] by commit-queue@webkit.org
  • 3 edits in trunk

[GTK][WPE] Bump libsoup3 version to 2.99.8
https://bugs.webkit.org/show_bug.cgi?id=226713

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-06-07
Reviewed by Philippe Normand.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:
1:53 AM Changeset in webkit [278551] by vjaquez@igalia.com
  • 94 edits
    13 adds
    1 delete in trunk/Source/ThirdParty/libwebrtc

Update libyuv to M92
https://bugs.webkit.org/show_bug.cgi?id=226489

Reviewed by Eric Carlson.

  • CMakeLists.txt:
  • Source/third_party/libyuv: Resynced.
  • Source/webrtc/sdk/WebKit/WebKitUtilities.mm:

Updated 10 bits frame conversion routine to use new libyuv routines (covered by webrtc/vp9-profile2.html)

  • libwebrtc.xcodeproj/project.pbxproj:
1:37 AM Changeset in webkit [278550] by Philippe Normand
  • 2 edits in trunk/Tools/buildstream

Unreviewed, fix libsoup3 build in Flatpak SDK

  • elements/sdk/libsoup3.bst:
1:28 AM Changeset in webkit [278549] by commit-queue@webkit.org
  • 2 edits in trunk/Tools/buildstream

[Flatpak SDK] Update to libsoup3 2.99.8
https://bugs.webkit.org/show_bug.cgi?id=226712

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-06-07
Reviewed by Philippe Normand.

  • elements/sdk/libsoup3.bst:
1:21 AM Changeset in webkit [278548] by Carlos Garcia Campos
  • 5 edits in trunk

[GTK][WPE] Signal "window-object-cleared" not emitted unless frame js context is get before
https://bugs.webkit.org/show_bug.cgi?id=221771

Reviewed by Michael Catanzaro.

Source/WebKit:

This is because when FrameLoader::dispatchDidClearWindowObjectInWorld() is called, the JSWindowProxy for the
world hasn't been created yet, so it returns early. But we want to dispatch it always for worlds created by the
API, to ensure that WebKitScriptWorld::window-object-cleared is emmitted.

  • WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp: Implement globalObjectIsAvailableForFrame() to force the

creation of the JavaScript context for existing WebKitScriptWorlds.

Tools:

Update window-object-cleared test to check that the signal is emitted for the WebKitScriptWorld objects created
by the extension.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:

(UserMessageTest::sendMessage):
(UserMessageTest::viewUserMessageReceived):
(UserMessageTest::waitUntilViewMessagesReceived):
(UserMessageTest::waitUntilViewMessageReceived):
(testWebExtensionWindowObjectCleared):
(beforeAll):

  • TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:

(windowObjectCleared):
(isolatedWorldWindowObjectCleared):
(webkit_web_extension_initialize_with_user_data):

Jun 6, 2021:

11:59 PM Changeset in webkit [278547] by youenn@apple.com
  • 38 edits
    1 copy
    2 moves
    1 add in trunk/Source/ThirdParty/libwebrtc

Update libsrtp to M92
https://bugs.webkit.org/show_bug.cgi?id=226487

Reviewed by Eric Carlson.

  • Configurations/libsrtp.xcconfig:
  • Source/third_party/libsrtp: Resynced.
  • libwebrtc.xcodeproj/project.pbxproj:
11:31 PM Changeset in webkit [278546] by commit-queue@webkit.org
  • 5 edits in trunk/Source

Unreviewed, reverting r277464.
https://bugs.webkit.org/show_bug.cgi?id=226709

No longer necessary

Reverted changeset:

"Work around WebCore failing to build due to NDEBUG getting
undefined in release"
https://bugs.webkit.org/show_bug.cgi?id=225782
https://trac.webkit.org/changeset/277464

11:19 PM Changeset in webkit [278545] by Antti Koivisto
  • 9 edits
    1 add in trunk/Source/WebCore

Factor selection clamping into a type
https://bugs.webkit.org/show_bug.cgi?id=226697

Reviewed by Sam Weinig.

TextBoxSelectableRange will be helpful for moving selection code out of the legacy inline boxes.
It also allows some code sharing already in this patch.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/integration/LayoutIntegrationRunIteratorLegacyPath.h:

(WebCore::LayoutIntegration::RunIteratorLegacyPath::isSelectable const):

  • layout/integration/LayoutIntegrationRunIteratorModernPath.h:

(WebCore::LayoutIntegration::RunIteratorModernPath::positionForOffset const):
(WebCore::LayoutIntegration::RunIteratorModernPath::isSelectable const):
(WebCore::LayoutIntegration::RunIteratorModernPath::selectionRect const):
(WebCore::LayoutIntegration::RunIteratorModernPath::selectableRange const):
(WebCore::LayoutIntegration::RunIteratorModernPath::clampedOffset const): Deleted.

  • rendering/LegacyInlineTextBox.cpp:

(WebCore::LegacyInlineTextBox::isSelectable const):
(WebCore::LegacyInlineTextBox::localSelectionRect const):
(WebCore::LegacyInlineTextBox::paint):
(WebCore::LegacyInlineTextBox::selectableRange const):
(WebCore::LegacyInlineTextBox::clampedStartEndForState const):
(WebCore::LegacyInlineTextBox::calculateDocumentMarkerBounds const):
(WebCore::LegacyInlineTextBox::collectMarkedTextsForDraggedContent):
(WebCore::LegacyInlineTextBox::collectMarkedTextsForDocumentMarkers const):
(WebCore::LegacyInlineTextBox::paintCompositionBackground):
(WebCore::LegacyInlineTextBox::positionForOffset const):
(WebCore::LegacyInlineTextBox::isSelected const): Deleted.
(WebCore::LegacyInlineTextBox::clampedOffset const): Deleted.

  • rendering/LegacyInlineTextBox.h:
  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::inlineSelectionGaps):

  • rendering/TextBoxSelectableRange.h: Added.

(WebCore::TextBoxSelectableRange::clamp const):
(WebCore::TextBoxSelectableRange::intersects const):

  • rendering/svg/SVGInlineTextBox.cpp:

(WebCore::SVGInlineTextBox::localSelectionRect const):

11:16 PM Changeset in webkit [278544] by Chris Dumez
  • 5 edits
    1 delete in trunk/Source/WebCore

Drop MainThreadTaskDispatcher and use callOnMainThread() instead
https://bugs.webkit.org/show_bug.cgi?id=226701

Reviewed by Darin Adler.

Drop MainThreadTaskDispatcher and use callOnMainThread() instead. There is a no need for a
global Timer or a Deque of tasks.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/DeferrableTask.h:

(WebCore::MainThreadDeferrableTask::scheduleTask):

  • platform/GenericTaskQueue.cpp: Removed.
  • platform/GenericTaskQueue.h:

(WebCore::MainThreadTaskQueue::MainThreadTaskQueue):
(WebCore::MainThreadTaskQueue::enqueueTask):

9:22 PM Changeset in webkit [278543] by Chris Dumez
  • 10 edits
    1 add in trunk/Source

Stop using legacy EventLoopDeferrableTask
https://bugs.webkit.org/show_bug.cgi?id=226700

Reviewed by Darin Adler.

Source/WebCore:

Stop using legacy EventLoopDeferrableTask and drop the class entirely. Call sites are
now using the HTML event loop directly and using WTF::CancellableTask to wrap the task
they schedule. This achieves the same result as EventLoopDeferrableTask but is more
lightweight and flexible.

  • animation/DocumentTimelinesController.cpp:

(WebCore::DocumentTimelinesController::DocumentTimelinesController):
(WebCore::DocumentTimelinesController::detachFromDocument):
(WebCore::DocumentTimelinesController::cacheCurrentTime):

  • animation/DocumentTimelinesController.h:
  • dom/ActiveDOMObject.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::scheduleCheckPlaybackTargetCompatability):
(WebCore::HTMLMediaElement::seekWithTolerance):
(WebCore::HTMLMediaElement::setVolume):
(WebCore::HTMLMediaElement::scheduleConfigureTextTracks):
(WebCore::HTMLMediaElement::scheduleMediaEngineWasUpdated):
(WebCore::HTMLMediaElement::scheduleUpdatePlayState):
(WebCore::HTMLMediaElement::cancelPendingTasks):
(WebCore::HTMLMediaElement::closeTaskQueues):
(WebCore::HTMLMediaElement::suspend):
(WebCore::HTMLMediaElement::resume):
(WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured):
(WebCore::HTMLMediaElement::mediaPlayerBufferedTimeRangesChanged):
(WebCore::HTMLMediaElement::scheduleUpdateMediaState):
(WebCore::HTMLMediaElement::playbackControlsManagerBehaviorRestrictionsTimerFired):

  • html/HTMLMediaElement.h:
  • platform/DeferrableTask.h:

Source/WTF:

Introduce new WTF::CancellableTask type which is a wrapper around a WTF::Function.
It can create a handle for the task and this handle can be used to check if the
task is still pending and to cancel it. This is useful when scheduling tasks in the
event loop for example as there are cases where we need to know if a task we
scheduled is still pending (to avoid double scheduling) or where we need to cancel
a previously scheduled task.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/CancellableTask.h: Added.

(WTF::CancellableTask::CancellableTask):
(WTF::CancellableTask::operator()):
(WTF::CancellableTask::isPending const):
(WTF::CancellableTask::cancel):
(WTF::CancellableTask::Handle::Handle):
(WTF::CancellableTask::Handle::isPending const):
(WTF::CancellableTask::Handle::cancel):
(WTF::CancellableTask::createHandle):

9:11 PM Changeset in webkit [278542] by Wenson Hsieh
  • 29 edits in trunk/Source

Turn TextIteratorBehaviorFlag into an enum class and wrap it in OptionSet
https://bugs.webkit.org/show_bug.cgi?id=226691

Reviewed by Darin Adler.

Source/WebCore:

Modernize some editing code by turning TextIteratorBehaviorFlag into an enum class, TextIteratorBehavior,
with an explicit width of 16 bits. Additionally, since this is a bitmask, refactor various codepaths to use
OptionSet<TextIteratorBehavior> instead of the underlying type.

This gives us improved type safety when using this enum, and also narrows the width of this enum to 16 bits
(from 32). No change in behavior.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::traverseToOffsetInRange):
(WebCore::AXObjectCache::rangeMatchesTextNearRange):
(WebCore::AXObjectCache::nextBoundary):

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::textIteratorBehaviorForTextRange const):

  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/atk/WebKitAccessibleHyperlink.cpp:

(rangeLengthForObject):

  • accessibility/atk/WebKitAccessibleInterfaceText.cpp:

(getSelectionOffsetsForObject):

  • accessibility/atk/WebKitAccessibleUtil.cpp:

(objectFocusedAndCaretOffsetUnignored):

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::textIteratorBehaviorForTextRange const):

Fix this method to return the empty (default) option set instead of false (which was previously implicitly
converted to TextIteratorDefaultBehavior).

  • accessibility/isolatedtree/AXIsolatedObject.h:
  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::applyBlockStyle):

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::moveParagraphs):

  • editing/Editing.cpp:

(WebCore::indexForVisiblePosition):
(WebCore::visiblePositionForIndex):

  • editing/Editor.cpp:

(WebCore::Editor::selectedText const):
(WebCore::Editor::selectedTextForDataTransfer const):

  • editing/Editor.h:
  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplacementFragment::ReplacementFragment):

  • editing/TextIterator.cpp:

(WebCore::isClippedByFrameAncestor):
(WebCore::TextIterator::TextIterator):
(WebCore::TextIterator::init):
(WebCore::firstChild):
(WebCore::nextSibling):
(WebCore::nextNode):
(WebCore::isDescendantOf):
(WebCore::parentNodeOrShadowHost):
(WebCore::TextIterator::advance):
(WebCore::TextIterator::handleTextNode):
(WebCore::TextIterator::handleTextRun):
(WebCore::TextIterator::handleTextNodeFirstLetter):
(WebCore::TextIterator::handleReplacedElement):
(WebCore::TextIterator::shouldRepresentNodeOffsetZero):
(WebCore::TextIterator::shouldEmitSpaceBeforeAndAfterNode):
(WebCore::TextIterator::handleNonTextNode):
(WebCore::TextIterator::exitNode):
(WebCore::TextIterator::emitText):
(WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode):
(WebCore::SimplifiedBackwardsTextIterator::exitNode):
(WebCore::CharacterIterator::CharacterIterator):
(WebCore::characterCount):
(WebCore::resolveCharacterRange):
(WebCore::hasAnyPlainText):
(WebCore::plainText):
(WebCore::plainTextReplacingNoBreakSpace):
(WebCore::findIteratorOptions):

  • editing/TextIterator.h:

(WebCore::characterCount):
(WebCore::characterRange):
(WebCore::resolveCharacterLocation):
(WebCore::resolveCharacterRange):
(WebCore::plainText):
(WebCore::hasAnyPlainText):
(WebCore::plainTextReplacingNoBreakSpace):
(WebCore::TextIterator::TextIterator):
(WebCore::CharacterIterator::CharacterIterator):

  • editing/TextIteratorBehavior.h:

Add an alias for OptionSet<TextIteratorBehavior>, TextIteratorBehaviors, to help with readability when
specifying or consulting these flags. Additionally remove the TextIteratorDefaultBehavior enum value
altogether, since we can now just use the default constructor (OptionSet<TextIteratorBehavior> { }) to get a
set of empty options.

  • editing/TextManipulationController.cpp:

(WebCore::ParagraphContentIterator::ParagraphContentIterator):

  • editing/VisibleSelection.cpp:

(WebCore::VisibleSelection::appendTrailingWhitespace):

  • editing/VisibleUnits.cpp:

(WebCore::nextBoundary):

  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::renderedTextRespectingRange):

  • page/EventHandler.cpp:

(WebCore::textDistance):

Source/WebKit:

See WebCore/ChangeLog for more information.

  • WebProcess/WebPage/ViewGestureGeometryCollector.cpp:

(WebKit::ViewGestureGeometryCollector::computeTextLegibilityScales):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::plainTextForDisplay):
(WebKit::rangeNearPositionMatchesText):

Source/WebKitLegacy/mac:

See WebCore/ChangeLog for more information.

  • WebView/WebFrame.mm:

(-[WebFrame _stringForRange:]):

8:53 PM Changeset in webkit [278541] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Flaky assertion hit in AudioSessionRoutingArbitratorProxy::endRoutingArbitration()
https://bugs.webkit.org/show_bug.cgi?id=226699

Reviewed by Darin Adler.

If m_setupArbitrationOngoing is true, then beginRoutingArbitrationForToken() only adds the token to
m_tokens once the setup is done, asynchronously. As a result, if endRoutingArbitrationForToken() during
setup, the isInRoutingArbitrationForToken(token) assertion will hit, because the token wasn't added
to m_tokens yet. Tweak the assertion so that it doesn't hit when m_setupArbitrationOngoing is true.

This is a speculative fix as I wasn't able to reproduce the assertion hit locally.

  • platform/audio/mac/SharedRoutingArbitrator.mm:

(WebCore::SharedRoutingArbitrator::endRoutingArbitrationForToken):

7:39 PM Changeset in webkit [278540] by Darin Adler
  • 66 edits in trunk

Handle custom identifiers and strings separately, so we can quote strings correctly consistently
https://bugs.webkit.org/show_bug.cgi?id=226694

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-animations/parsing/animation-name-valid-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-negative-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-pad-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-prefix-suffix-syntax-expected.txt:
  • web-platform-tests/css/css-counter-styles/counter-style-symbols-syntax-expected.txt:
  • web-platform-tests/css/css-grid/parsing/grid-area-computed-expected.txt:
  • web-platform-tests/css/css-grid/parsing/grid-area-shorthand-expected.txt:
  • web-platform-tests/css/css-grid/parsing/grid-area-valid-expected.txt:
  • web-platform-tests/css/css-lists/parsing/content-invalid-expected.txt:
  • web-platform-tests/css/css-transitions/transition-property-002-expected.txt:
  • web-platform-tests/css/cssom/getComputedStyle-pseudo-expected.txt:
  • web-platform-tests/css/cssom/serialize-values-expected.txt:

Rebased to reflect progressions. In some cases the entire test passes, in other cases we still
have failures, but the string serialization part of the test has progressed.

Source/WebCore:

Progressions in a number of WPT tests.

  • animation/CSSAnimation.cpp:

(WebCore::CSSAnimation::CSSAnimation): Update since Animation::name() now
returns a struct.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes): Ditto.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::OrderedNamedLinesCollector::appendLines const): Use
createCustomIdent for line names.
(WebCore::valueForGridPosition): Use createCustomIdent for grid line name.
(WebCore::createTransitionPropertyValue): Use createCustomIdent for
animation property names.
(WebCore::counterToCSSValue): Use createCustomIdent for counter names.
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle): Use
createCustomIdent for list-style-type, locale, animation names if they
were created from a custom-ident, and line-grid.

  • css/CSSCustomIdentValue.cpp: Emptied out this file; we can delete it soon.
  • css/CSSCustomIdentValue.h: Ditto.
  • css/CSSMarkup.cpp:

(WebCore::serializeCharacterAsCodePoint): Optimized to do a single
StringBuilder::append call.
(WebCore::serializeAsStringOrCustomIdent): Deleted.

  • css/CSSMarkup.h: Removed serializeAsStringOrCustomIdent.
  • css/CSSPrimitiveValue.cpp:

(WebCore::isValidCSSUnitTypeForDoubleConversion): Added a case for
CustomIdent. Changed CSS_IDENT to assert not reached, since it should
never be passed to this function. More cleanup of CSSUnitType is needed,
but for now mostly leaving it alone.
(WebCore::isStringType): Added a case for CustomIdent. Moved CSS_DIMENSION,
which was incorrectly returning true, to return false. Pretty sure there's
no way to create one of these with CSS_DIMENSION, but this is less peculiar.
(WebCore::CSSPrimitiveValue::primitiveType const): Added transformation
from CustomIdent to CSS_IDENT as we do with CSS_PROPERTY_ID and CSS_VALUE_ID.
(WebCore::CSSPrimitiveValue::cleanup): Added a case for CustomIdent.
Moved CSS_DIMENSION to the correct section. Pretty sure there's no way to
create one of these with CSS_DIMENSION, but this is less peculiar.
(WebCore::CSSPrimitiveValue::setFloatValue): Deleted.
(WebCore::CSSPrimitiveValue::setStringValue): Deleted.
(WebCore::CSSPrimitiveValue::getStringValue const): Deleted.
(WebCore::CSSPrimitiveValue::stringValue const): Added a case for CustomIdent.
(WebCore::CSSPrimitiveValue::unitTypeString): Added a case for CustomIdent
and an ASSERT_NOT_REACHED for invalid enumeration values.
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
Removed inaccurate FIXME comment for CSS_DIMENSION and changed it to do
something less wrong, but still incorrect. Pretty sure there's no way to
create one of these with CSS_DIMENSION, but this is less peculiar. Changed
CSS_STRING case to always serializeAsString. Added a CustomIdent case
that always serializes as an identifier.
(WebCore::CSSPrimitiveValue::equals const): Moved the CSS_DIMENSION to
the correct part of this switch statement. Pretty sure there's no way to
create one of these with CSS_DIMENSION, but this is less peculiar.
Added case for CustomIdent.

  • css/CSSPrimitiveValue.h: Made isFontRelativeLength, isResolution,

and isViewportPercentageLength private. Made those plus isLength all
constexpr. Removed WEBCORE_EXPORT from primitiveType and getFloatValue:
those needed to be exported when this was the web-exposed class, but
that is now DeprecatedCSSOMPrimitiveValue. Deleted setFloatValue,
setStringValue, and getStringValue for the same reason: those functions
are now in DeprecatedCSSOMPrimitiveValue and don't need to be here.

  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::mapAnimationName): Updated to pass a boolean
in to the animation name to keep track of whether it was created with
a string or a custom-ident so we it can properly round-trip in computed
style. This is required to pass some of the WPT tests, although I could
not find clear guidance in the specification that this behavior is required.
The same name with a string and custom-ident are equivalent in other ways.

  • css/CSSUnits.cpp:

(WebCore::operator<<): Added a case for CustomIdent.

  • css/CSSUnits.h: Added CustomIdent. Added some FIXME about how we can

change this in the future. It's a remnant of the past when these were part
of our web-facing API, and this can be greatly cleaned up.

  • css/CSSValue.cpp:

(WebCore::CSSValue::cssText const): Removed CSSCustomIdentValue.h,
CustomIdentClass, CSSCustomIdentValue. We are not going to use a separate
class for custom-ident, just a separate type of primitive value.
(WebCore::CSSValue::destroy): Ditto.

  • css/CSSValue.h: Deleted isCustomIdentValue and CustomIdentClass.
  • css/CSSValueList.cpp:

(WebCore::CSSValueList::customCSSText const): Tweaked algorithm
to be slightly more efficient.

  • css/CSSValuePool.h: Added createCustomIdent. Later should remove

the create function that takes a string value and a type and use
separate named functions for the few different cases, but doing the
new one this way for now.

  • css/DeprecatedCSSOMPrimitiveValue.cpp:

(WebCore::DeprecatedCSSOMPrimitiveValue::primitiveType const):
Rewrote this to be a switch that preserves the current behavior
but no longer relies on the numeric values of CSSUnitType values.
Added a FIXME about using CSS_UNKNOWN more: some of the numbers
we are exposing to the web are doing no good.
(WebCore::DeprecatedCSSOMPrimitiveValue::setFloatValue): Moved this
function to the header.
(WebCore::DeprecatedCSSOMPrimitiveValue::getFloatValue const):
Rewrote this to be a switch as above. Preserves current behavior
but stops relying on CSSUnitType numeric values.
(WebCore::DeprecatedCSSOMPrimitiveValue::setStringValue): Moved this
function to the header.
(WebCore::DeprecatedCSSOMPrimitiveValue::getStringValue const):
Ditto. By putting a switch on primitiveType here, we can enforce
the desired exception behavior here, instead of getting it from
CSSPrimitiveValue, and it's better for this class to deal with
the legacy bindings issues.
(WebCore::DeprecatedCSSOMPrimitiveValue::getCounterValue const): Ditto.
(WebCore::DeprecatedCSSOMPrimitiveValue::getRectValue const): Ditto.
(WebCore::DeprecatedCSSOMPrimitiveValue::getRGBColorValue const): Ditto.

  • css/DeprecatedCSSOMPrimitiveValue.h: Removed unneeded cssValueType

function. Made both setFloatValue and setStringValue simpler since
they always raise an exception and we do not intend to change that.
Also stop using protected since we have no classes derived from this.
Could do more cleanup, but this is a start.

  • css/DeprecatedCSSOMValue.cpp:

(WebCore::DeprecatedCSSOMValue::cssValueType const): Put the constant
values, CSS_PRIMITIVE_VALUE and CSS_VALUE_LIST, here rather than
calling member functions.

  • css/DeprecatedCSSOMValueList.cpp:

(WebCore::DeprecatedCSSOMValueList::cssText const): Tweaked to make
the code more efficient.

  • css/DeprecatedCSSOMValueList.h: Removed unneeded cssValueType

function and const overload of item function. Also stop using protected
since we have no classes derived from this.

  • css/MediaQueryExpression.cpp:

(WebCore::featureWithValidIdent): Fixed indentation to match WebKit style.
(WebCore::featureWithValidDensity): Ditto.
(WebCore::featureWithValidPositiveLength): Ditto.
(WebCore::featureExpectingPositiveInteger): Ditto.
(WebCore::featureWithPositiveNumber): Ditto.

  • css/calc/CSSCalcCategoryMapping.cpp:

(WebCore::hasDoubleValue): Added a case for CustomIdent.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeWillChange): Removed comment saying we should use
CSSCustomIdentValue since using a property ID for the value is great.
(WebCore::consumeAnimationName): Removed comment saying we should use
CSSCustomIdentValue here because that would be incorrect: we need to
preserve and round-trip the fact that this was string, not custom-ident.
(WebCore::consumeTransitionProperty): Remove special case for
CSSValueAll that wasn't doing anything. Removed comment saying we should
use CSSCustomIdentValue since using a value ID for the value is great.
(WebCore::consumeAttr): Updated comment.
(WebCore::isCustomIdentValue): Updated to work with the new primitive value.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeCustomIdent):
Use the new createCustomIdent and removed an outdated comment. While we
might some day want to implement custom-ident differently, we won't need
to change the code here to make that happen.

  • platform/animation/Animation.cpp:

(WebCore::Animation::animationsMatch const): Update since m_name now is a
struct.
(WebCore::Animation::initialName): Update to return Name instead of String.
(WebCore::operator<<): Update since name() now returns a struct.

  • platform/animation/Animation.h: Added the Name struct so we can store a

boolean to indicate whether it's a string or custom-ident for round tripping.
Update types and implementations of function and data members accordingly.

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::createGridPosition): Update code to expect
custom-ident instead of string; they used to both be the same thing.

  • style/Styleable.cpp:

(WebCore::shouldConsiderAnimation): Update since Animation::name() now
returns a struct. Also got rid of unsuccessful attempt to optimize comparison
againt the string "none"; later might be good to clean out that special case.
(WebCore::Styleable::updateCSSAnimations const): Ditto.

Tools:

  • TestRunnerShared/TestFeatures.cpp:

(WTR::parseTestHeader): Fixed a missing quote that made a log message read strangely.

LayoutTests:

  • TestExpectations: Removed expected failures from 13 css-counter-styles tests that are not

currently failing. I had planned to work on making more of these pass, but first found I could
fix them with a corrected custom-ident implementation.

  • css3/supports-expected.txt: Rebased.
  • css3/supports.html: Updated to expect the value of the content property to be a quoted string,

rather than the old behavior, which was to leave the string unquoted if it happened to be a
string with all characters legal for a custom-ident. New expectation is the correct behavior.

  • fast/css/alt-inherit-initial-expected.txt: Rebased.
  • fast/css/alt-inherit-initial.html: Updated to expect the value of the language property to be

a custom-ident, and serialize unusual cases with custom-ident rules, not as a quoted string. New
expectation is the correct behavior.

  • fast/css/content-language-comma-separated-list-expected.txt: Ditto.
  • fast/css/content-language-empty-expected.txt: Ditto.
  • fast/css/content-language-only-whitespace-expected.txt: Ditto.
  • fast/css/content-language-with-whitespace-expected.txt: Ditto.
  • fast/css/getComputedStyle/computed-style-properties-expected.txt: Rebased.
  • fast/css/getComputedStyle/computed-style-properties.html: Expect content string (see above).
  • fast/css/lang-mapped-to-webkit-locale-expected.txt: Rebased.
  • fast/css/lang-mapped-to-webkit-locale.xhtml: Expect language custom-ident (see above).
  • fast/css/nested-at-rules-expected.txt: Rebased.
  • fast/css/nested-at-rules.html: Expect content string (see above).
  • fast/css/parsing-text-emphasis-expected.txt: Rebased.
  • fast/css/parsing-text-emphasis.html: Updated to expect strings to remaing quoted strings in

the text-emphasis property, not change into custom-ident if all characters happen to fit.

  • fast/encoding/css-charset-default-expected.txt: Expect content string (see above).
  • inspector/css/pseudo-element-matches-for-pseudo-element-node-expected.txt: Ditto.
5:01 PM Changeset in webkit [278539] by Jean-Yves Avenard
  • 10 edits in trunk/Source

[GPUP][MSE] QuotaExceededError Exception not thrown even if the sum of totalTrackBufferSize and appendBuffer size exceeds maximumBufferSize
https://bugs.webkit.org/show_bug.cgi?id=226034
rdar://78579904

Reviewed by Eric Carlson.

Source/WebCore:

Existing media-source-append-buffer-full-quota-exceeded-error.html test will
be exercising this code once bug 225367 has been fixed.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::appendBufferInternal): fly-by fix, use size of pending
buffer rather than the capacity of the holding vector.

  • platform/graphics/SourceBufferPrivate.h: Make totalTrackBufferSizeInBytes method virtual.

Source/WebKit:

Cache the size of the remote source buffer's track size. We pass an extra
totalTrackBufferSizeInBytes argument to each method that could impact
a source buffer size.

  • GPUProcess/media/RemoteSourceBufferProxy.cpp:

(WebKit::RemoteSourceBufferProxy::sourceBufferPrivateAppendComplete):
(WebKit::RemoteSourceBufferProxy::removeCodedFrames):
(WebKit::RemoteSourceBufferProxy::evictCodedFrames):

  • GPUProcess/media/RemoteSourceBufferProxy.h:
  • GPUProcess/media/RemoteSourceBufferProxy.messages.in:
  • WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:

(WebKit::SourceBufferPrivateRemote::abort): Add comment explaining on why
getting an up to date totalTrackBufferSizeInBytes isn't necessary at this point.
(WebKit::SourceBufferPrivateRemote::removeCodedFrames):
(WebKit::SourceBufferPrivateRemote::evictCodedFrames):
(WebKit::SourceBufferPrivateRemote::clearTrackBuffers):
(WebKit::SourceBufferPrivateRemote::sourceBufferPrivateAppendComplete):
(WebKit::SourceBufferPrivateRemote::totalTrackBufferSizeInBytes const):

  • WebProcess/GPU/media/SourceBufferPrivateRemote.h:
  • WebProcess/GPU/media/SourceBufferPrivateRemote.messages.in:
12:13 PM Changeset in webkit [278538] by Chris Dumez
  • 22 edits in trunk/Source/WebCore

Reduce use of legacy EventLoopEventQueue and EventLoopTaskQueue
https://bugs.webkit.org/show_bug.cgi?id=226692

Reviewed by Darin Adler.

Reduce use of legacy EventLoopEventQueue and EventLoopTaskQueue, and use the HTML event
loop directly instead. Those are very simple cases, they really don't need any of the
features the queue was providing (such as cancelling events).

To get rid of the remaining usage of EventLoopEventQueue / EventLoopTaskQueue, I believe
we'll need a way to cancel tasks scheduled in the HTML event loop.

  • Modules/mediasession/MediaSessionCoordinator.cpp:

(WebCore::MediaSessionCoordinator::MediaSessionCoordinator):
(WebCore::MediaSessionCoordinator::coordinatorStateChanged):

  • Modules/mediasession/MediaSessionCoordinator.h:
  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::MediaSource):
(WebCore::MediaSource::virtualHasPendingActivity const):
(WebCore::MediaSource::scheduleEvent):

  • Modules/mediasource/MediaSource.h:
  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::SourceBuffer):
(WebCore::SourceBuffer::virtualHasPendingActivity const):
(WebCore::SourceBuffer::scheduleEvent):

  • Modules/mediasource/SourceBuffer.h:
  • Modules/mediasource/SourceBufferList.cpp:

(WebCore::SourceBufferList::SourceBufferList):
(WebCore::SourceBufferList::scheduleEvent):

  • Modules/mediasource/SourceBufferList.h:
  • Modules/remoteplayback/RemotePlayback.cpp:

(WebCore::RemotePlayback::RemotePlayback):
(WebCore::RemotePlayback::watchAvailability):
(WebCore::RemotePlayback::cancelWatchAvailability):
(WebCore::RemotePlayback::prompt):
(WebCore::RemotePlayback::setState):
(WebCore::RemotePlayback::disconnect):
(WebCore::RemotePlayback::availabilityChanged):
(WebCore::RemotePlayback::stop): Deleted.

  • Modules/remoteplayback/RemotePlayback.h:
  • animation/DocumentTimelinesController.cpp:

(WebCore::DocumentTimelinesController::DocumentTimelinesController):
(WebCore::DocumentTimelinesController::detachFromDocument):
(WebCore::DocumentTimelinesController::cacheCurrentTime):
(WebCore::DocumentTimelinesController::maybeClearCachedCurrentTime):

  • animation/DocumentTimelinesController.h:
  • dom/FullscreenManager.cpp:

(WebCore::FullscreenManager::FullscreenManager):
(WebCore::FullscreenManager::requestFullscreenForElement):
(WebCore::FullscreenManager::exitFullscreen):
(): Deleted.

  • dom/FullscreenManager.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::removedFromAncestor):
(WebCore::HTMLMediaElement::scheduleResolvePendingPlayPromises):
(WebCore::HTMLMediaElement::scheduleRejectPendingPlayPromises):
(WebCore::HTMLMediaElement::scheduleNotifyAboutPlaying):
(WebCore::HTMLMediaElement::setMediaKeys):
(WebCore::HTMLMediaElement::closeTaskQueues):
(WebCore::HTMLMediaElement::virtualHasPendingActivity const):
(WebCore::HTMLMediaElement::setIsPlayingToWirelessTarget):
(WebCore::HTMLMediaElement::enterFullscreen):
(WebCore::HTMLMediaElement::isVisibleInViewportChanged):

  • html/HTMLMediaElement.h:
  • html/shadow/MediaControlTextTrackContainerElement.cpp:

(WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement):
(WebCore::MediaControlTextTrackContainerElement::updateSizes):

  • html/shadow/MediaControlTextTrackContainerElement.h:
  • html/track/TrackListBase.cpp:

(WebCore::TrackListBase::TrackListBase):
(WebCore::TrackListBase::scheduleChangeEvent):
(WebCore::TrackListBase::isChangeEventScheduled const):
(WebCore::TrackListBase::virtualHasPendingActivity const): Deleted.

  • html/track/TrackListBase.h:
  • platform/network/curl/CurlMultipartHandle.cpp:

(WebCore::CurlMultipartHandle::processContent):
(WebCore::CurlMultipartHandle::matchedLength):

  • platform/network/curl/CurlMultipartHandle.h:
  • testing/MockMediaSessionCoordinator.h:
8:15 AM Changeset in webkit [278537] by Alan Bujtas
  • 9 edits
    2 adds in trunk

[LFC][TFC] Adopt a less quirky fixed column width space distribution
https://bugs.webkit.org/show_bug.cgi?id=226696

Reviewed by Antti Koivisto.

Source/WebCore:

This patch adopts a less quirky space distribution model where any fixed cell width
makes the column fixed (as opposed to just when <col> has fixed with).
This distribution model matches both Chrome and Firefox.
It also enables us to simplify some of the distribution logic by using the same set of values (min vs max)
as the base for the distribution ratio.

Test: fast/layoutformattingcontext/table-fixed-width-variations-simple.html

  • layout/formattingContexts/table/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::computedPreferredWidthForColumns): Collect the fixed with values from the cells too now.

  • layout/formattingContexts/table/TableFormattingGeometry.cpp:

(WebCore::Layout::TableFormattingGeometry::intrinsicWidthConstraintsForCellContent const):
(WebCore::Layout::TableFormattingGeometry::intrinsicWidthConstraintsForCell const): Deleted.

  • layout/formattingContexts/table/TableFormattingGeometry.h:
  • layout/formattingContexts/table/TableGrid.cpp:

(WebCore::Layout::TableGrid::appendCell):
(WebCore::Layout::TableGrid::Column::isFixedWidth const): Deleted.
(WebCore::Layout::TableGrid::Columns::hasFixedColumnsOnly const): Deleted.
(WebCore::Layout::TableGrid::Cell::isFixedWidth const): Deleted.

  • layout/formattingContexts/table/TableGrid.h:

(WebCore::Layout::TableGrid::Column::setFixedWidth):
(WebCore::Layout::TableGrid::Column::fixedWidth const):
(WebCore::Layout::TableGrid::Columns::logicalWidth const):
(WebCore::Layout::TableGrid::Column::setHasFixedWidthCell): Deleted.
(WebCore::Layout::TableGrid::Column::hasFixedWidthCell const): Deleted.

  • layout/formattingContexts/table/TableLayout.cpp:

(WebCore::Layout::TableFormattingContext::TableLayout::distributedHorizontalSpace): Adjust the distribution values based on whether
the column has fixed width and use max/max in both fixed and non-fixed cases.

LayoutTests:

  • TestExpectations: We don't match current WebKit space distribution anymore.
  • fast/layoutformattingcontext/table-fixed-width-variations-simple-expected.html: Added.
  • fast/layoutformattingcontext/table-fixed-width-variations-simple.html: Added.
7:47 AM Changeset in webkit [278536] by ddkilzer@apple.com
  • 3 edits in trunk/Tools

Unexport llvm coverage symbols to fix build
<https://webkit.org/b/226684>
<rdar://problem/78906691>

Reviewed by Darin Adler.

  • Scripts/check-for-weak-vtables-and-externals:
  • Revert change from r278444. That fixes errors when this script is run, but the Generate TAPI build phase for some projects still fails due to the new weak external symbols.
  • coverage/coverage.xcconfig:

(UNEXPORTED_SYMBOL_LDFLAGS_FOR_COVERAGE): Add.

  • Linker flags to unexport llvm symbols added by the compiler for coverage.

(OTHER_LDFLAGS):

  • Add $(UNEXPORTED_SYMBOL_LDFLAGS_FOR_COVERAGE) to list of switches to unexport the symbols during linking.
7:44 AM Changeset in webkit [278535] by ddkilzer@apple.com
  • 9 edits
    2 adds in trunk/Source/WebKit

Weak external symbols found in WebKit.framework with Release+Coverage configuration
<https://webkit.org/b/226668>
<rdar://problem/78890081>

Reviewed by Darin Adler.

  • Configurations/WebKit.xcconfig:

(UNEXPORTED_SYMBOL_LDFLAGS):

  • Remove std::function<> symbols as those were replaced by WTF::Function<> a while ago.
  • Shared/Cocoa/DefaultWebBrowserChecks.mm:

(WebKit::determineITPStateInternal):
(WebKit::doesParentProcessHaveITPEnabled):

  • Switch to use TCCSoftLink.h.
  • Shared/Cocoa/TCCSoftLink.h: Add.
  • Shared/Cocoa/TCCSoftLink.mm: Add.
  • Implement a single place for soft-linking to TCC.framework.
  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm:

(WebKit::XPCServiceInitializerDelegate::getProcessIdentifier):

  • Change ProcessIdentifier to WebCore::ProcessIdentifier to fix the build since this source file no longer gets using namespace WebCore; from another source file after changes to SourcesCocoa.txt.
  • SourcesCocoa.txt:
  • Add DefaultWebBrowserChecks.mm since it no longer contains any SOFT_LINK macros.
  • Add new TCCSoftLink.mm file.
  • UIProcess/Cocoa/MediaPermissionUtilities.mm:

(WebKit::checkUsageDescriptionStringForType):

  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:

(WebKit::WebProcessProxy::isAXAuthenticated):

  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
(-[WKActionSheetAssistant defaultActionsForImageSheet:]):

  • Switch to use TCCSoftLink.h.
  • WebKit.xcodeproj/project.pbxproj:
  • Add TCCSoftLink.{h,mm} to the project.
  • Remove DefaultWebBrowserChecks.mm from the WebKit.framework target after adding it to SourcesCocoa.txt.
7:41 AM Changeset in webkit [278534] by Antti Koivisto
  • 28 edits
    4 moves in trunk/Source/WebCore

Rename InlineElementBox to LegacyInlineElementBox
https://bugs.webkit.org/show_bug.cgi?id=226695

Reviewed by Sam Weinig.

Also EllipsisBox -> LegacyEllipsisBox.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • accessibility/AXObjectCache.cpp:
  • dom/Position.cpp:
  • layout/integration/LayoutIntegrationRunIterator.h:
  • rendering/LegacyEllipsisBox.cpp: Renamed from Source/WebCore/rendering/EllipsisBox.cpp.

(WebCore::LegacyEllipsisBox::LegacyEllipsisBox):
(WebCore::LegacyEllipsisBox::paint):
(WebCore::LegacyEllipsisBox::markupBox const):
(WebCore::LegacyEllipsisBox::paintMarkupBox):
(WebCore::LegacyEllipsisBox::selectionRect):
(WebCore::LegacyEllipsisBox::paintSelection):
(WebCore::LegacyEllipsisBox::nodeAtPoint):

  • rendering/LegacyEllipsisBox.h: Renamed from Source/WebCore/rendering/EllipsisBox.h.
  • rendering/LegacyInlineElementBox.cpp: Renamed from Source/WebCore/rendering/InlineElementBox.cpp.

(WebCore::LegacyInlineElementBox::deleteLine):
(WebCore::LegacyInlineElementBox::extractLine):
(WebCore::LegacyInlineElementBox::attachLine):
(WebCore::LegacyInlineElementBox::paint):
(WebCore::LegacyInlineElementBox::nodeAtPoint):

  • rendering/LegacyInlineElementBox.h: Renamed from Source/WebCore/rendering/InlineElementBox.h.

(WebCore::LegacyInlineElementBox::LegacyInlineElementBox):

  • rendering/LegacyInlineFlowBox.cpp:

(WebCore::LegacyInlineFlowBox::nodeAtPoint):

  • rendering/LegacyInlineTextBox.cpp:

(WebCore::LegacyInlineTextBox::selectionState):

  • rendering/LegacyLineLayout.cpp:

(WebCore::LegacyLineLayout::computeBlockDirectionPositionsForLine):

  • rendering/LegacyRootInlineBox.cpp:

(WebCore::LegacyRootInlineBox::placeEllipsis):
(WebCore::LegacyRootInlineBox::ellipsisBox const):

  • rendering/LegacyRootInlineBox.h:
  • rendering/RenderBlock.cpp:
  • rendering/RenderBlock.h:
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::createInlineBox):
(WebCore::RenderBox::positionLineBox):

  • rendering/RenderBox.h:

(WebCore::RenderBox::inlineBoxWrapper const):
(WebCore::RenderBox::setInlineBoxWrapper):

  • rendering/RenderFragmentedFlow.cpp:

(WebCore::RenderFragmentedFlow::computedFragmentRangeForBox const):

  • rendering/RenderImage.cpp:
  • rendering/RenderInline.cpp:
  • rendering/RenderLineBoxList.cpp:
  • rendering/RenderLineBreak.cpp:

(WebCore::RenderLineBreak::createInlineBox):
(WebCore::RenderLineBreak::setInlineBoxWrapper):
(WebCore::RenderLineBreak::replaceInlineBoxWrapper):

  • rendering/RenderLineBreak.h:
  • rendering/RenderListItem.cpp:
  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::createInlineBox):

  • rendering/RenderListMarker.h:
  • rendering/RenderReplaced.cpp:
  • rendering/RenderText.cpp:
  • rendering/RenderTextLineBoxes.cpp:
Note: See TracTimeline for information about the timeline view.