Timeline



Mar 9, 2021:

11:43 PM Changeset in webkit [274202] by Russell Epstein
  • 3 edits
    1 add in branches/safari-612.1.5-branch

Cherry-pick r273654. rdar://problem/75252578

Restoring App Highlight crashes if no range is found.
https://bugs.webkit.org/show_bug.cgi?id=222524

Reviewed by Tim Horton.

Source/WebCore:

Test: TestWebKitAPI.AppHighlights.AppHighlightRestoreFailure

  • Modules/highlight/AppHighlightStorage.cpp: (WebCore::AppHighlightStorage::restoreAppHighlight):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKAppHighlights.mm: (TestWebKitAPI::TEST):

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

11:36 PM Changeset in webkit [274201] by don.olmstead@sony.com
  • 24 edits in trunk

GLib JSC API headers should only include other GLib JSC API headers
https://bugs.webkit.org/show_bug.cgi?id=222803

Reviewed by Michael Catanzaro.

.:

GTK and WPE both build the JavaScriptCore GLib API. However they diverged with their CMake
variable names for the directory containing jsc. Declare a single variable for that
directory, DERIVED_SOURCES_JAVASCRIPTCORE_GLIB_DIR, that is shared between GLib ports.

Remove the GLIB_API_DIR variant which will just be replaced with
${DERIVED_SOURCES_JAVASCRIPTCORE_GLIB_DIR}/jsc in the CMake code.

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

Source/JavaScriptCore:

A number of private GLib JSC headers are directly including private JavaScriptCore headers.
To get this to compile ${FORWARDING_HEADERS_DIR}/JavaScriptCore was added to the list of
includes in targets that needed the JSC headers. This is incorrect because they are being
distributed in different directories.

The private JSC headers being used were replaced with forward declarations. The source
files were then updated accordingly.

Also the include directories that contained the <jsc/Foo.h> headers were added to
JavaScriptCore_INTERFACE_INCLUDE_DIRECTORIES so they're properly propagated to dependants.

  • API/glib/JSCClassPrivate.h:
  • API/glib/JSCContext.cpp:
  • API/glib/JSCContextPrivate.h:
  • API/glib/JSCVirtualMachine.cpp:
  • API/glib/JSCVirtualMachinePrivate.h:
  • API/glib/JSCWrapperMap.cpp:
  • GLib.cmake:
  • PlatformGTK.cmake:

Source/WebKit:

Update the includes and include directories.

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • WebProcess/InjectedBundle/API/glib/DOM/WebKitDOMNode.cpp:
  • WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp:

Tools:

Update the includes and include directories.

  • MiniBrowser/wpe/CMakeLists.txt:
  • TestWebKitAPI/PlatformGTK.cmake:
  • TestWebKitAPI/PlatformWPE.cmake:
  • TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
  • TestWebKitAPI/glib/PlatformGTK.cmake:
  • TestWebKitAPI/glib/PlatformWPE.cmake:
11:03 PM Changeset in webkit [274200] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Nullptr crash in Node::isTextNode() via ApplyBlockElementCommand::endOfNextParagraphSplittingTextNodesIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=222620

Patch by Venky Dass <yaranamavenkataramana@apple.com> on 2021-03-09
Reviewed by Ryosuke Niwa.
Source/WebCore:

When a text node does not have a previous sibling there is a crash. The fix is to check if there is a previous sibling
before we try to de-reference it.

Test: editing/inserting/indent-split-text-not-having-previous-sibling-crash.html

  • editing/ApplyBlockElementCommand.cpp:

(WebCore::ApplyBlockElementCommand::endOfNextParagraphSplittingTextNodesIfNeeded):

LayoutTests:

Adding a regression test.

  • editing/inserting/indent-split-text-not-having-previous-sibling-crash-expected.txt: Added.
  • editing/inserting/indent-split-text-not-having-previous-sibling-crash.html: Added.
10:39 PM Changeset in webkit [274199] by rniwa@webkit.org
  • 5 edits in trunk

Unreviewed, reverting r274054.

Broke http/tests/misc/empty-urls.html

Reverted changeset:

"Use counters for pending events"
https://bugs.webkit.org/show_bug.cgi?id=218556
https://commits.webkit.org/r274054

10:20 PM Changeset in webkit [274198] by graouts@webkit.org
  • 5 edits in trunk

Correctly blend the flex-basis CSS property
https://bugs.webkit.org/show_bug.cgi?id=222981

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Add an extra 14 PASS results. We now pass all the flex-basis interpolation tests.

  • web-platform-tests/css/css-flexbox/animation/flex-basis-composition-expected.txt:
  • web-platform-tests/css/css-flexbox/animation/flex-basis-interpolation-expected.txt:

Source/WebCore:

To correctly support blending of flex-basis we must ensure that negative values aren't
allowed but also ensure that "flex" doesn't interpolate if flex-basis can't either.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

9:30 PM Changeset in webkit [274197] by commit-queue@webkit.org
  • 8 edits in trunk

HTTPS upgrade should allow same-site redirects from HTTPS to HTTP
https://bugs.webkit.org/show_bug.cgi?id=222994
<rdar://75159643>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-03-09
Reviewed by Geoff Garen.

Source/WebCore:

Several sites support HTTPS, but have certain pages or resources that for some reason are only served over HTTP.
If you try to load the resource over HTTPS, it will simply redirect you to HTTP. In order to increase compatibility
with the web, we need to not do infinite redirect loops in this case.

The next version of this patch will have a test, but feel free to review the content of this code change before then.

  • contentextensions/ContentExtensionsBackend.cpp:

(WebCore::ContentExtensions::makeSecureIfNecessary):
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad):

  • contentextensions/ContentExtensionsBackend.h:
  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::willSendRequestInternal):

  • page/UserContentProvider.cpp:

(WebCore::UserContentProvider::processContentRuleListsForLoad):

  • page/UserContentProvider.h:

(WebCore::UserContentProvider::processContentRuleListsForLoad):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm:

(TEST):

9:19 PM Changeset in webkit [274196] by Ryan Haddad
  • 4 edits
    1 add in trunk/LayoutTests

Resync web-platform-tests/dom tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=222983

Unreviewed test gardening.

Rebaseline a few tests for iOS.

  • platform/ios-wk2/imported/w3c/web-platform-tests/dom/events/Event-dispatch-redispatch-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/dom/nodes/Document-createEvent.https-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/dom/slot-recalc-expected.txt: Added.
8:51 PM Changeset in webkit [274195] by Chris Dumez
  • 2 edits in trunk/Tools

[ BigSur wk2 arm64 ] quite a few fast/forms (Layout-Tests) are text failing on Apple Silicon
https://bugs.webkit.org/show_bug.cgi?id=222988
<rdar://problem/75230416>

Unreviewed, disable AppleLanguagesTest.UpdateAppleLanguages API test on Apple Silicon since
it is timing out there and not properly resetting the system language. This is causing
trouble on the bots.

  • TestWebKitAPI/Tests/WebKit/OverrideAppleLanguagesPreference.mm:
8:44 PM Changeset in webkit [274194] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

REGRESSION (r274174): ASSERTION FAILED: m_shouldBeCalledOnMainThread == isMainThread() under WebKit::RemoteSampleBufferDisplayLayerManager::createLayer
https://bugs.webkit.org/show_bug.cgi?id=223015
<rdar://problem/75248289>

Unreviewed, r274174 mistakenly replaced a call to dispatchToThread() with a call to callOnMainRunLoop().

  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp:

(WebKit::RemoteSampleBufferDisplayLayerManager::createLayer):

7:38 PM Changeset in webkit [274193] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Use RELEASE_ASSERT() for Deque bounds checks
https://bugs.webkit.org/show_bug.cgi?id=223008

Reviewed by Alex Christensen.

Use RELEASE_ASSERT() for Deque bounds checks instead of ASSERT(), similarly to what we did for Vector.

  • wtf/Deque.h:

(WTF::inlineCapacity>::removeFirst):
(WTF::inlineCapacity>::removeLast):

7:12 PM Changeset in webkit [274192] by weinig@apple.com
  • 12 edits in trunk/Source

Preferences do not need to be passed to the WebProcess via WebPageCreationParameters since the store already is
https://bugs.webkit.org/show_bug.cgi?id=222945

Reviewed by Simon Fraser.

Source/WebCore:

  • page/EventHandler.cpp:

(WebCore::EventHandler::mouseDownMayStartSelect const):
Get textInteractionEnabled state from preferences, rather than copying its state to the page.

  • page/Page.cpp:

(WebCore::m_shouldRelaxThirdPartyCookieBlocking):

  • page/Page.h:

(WebCore::Page::textInteractionEnabled const): Deleted.
(WebCore::Page::setTextInteractionEnabled): Deleted.

  • page/PageConfiguration.h:

Remove textInteractionEnabled state from Page/PageConfiguration have it use Settings like other settings.

Source/WebKit:

needsInAppBrowserPrivacyQuirks and textInteractionEnabled were both being passed to the WebProcess twice,
once via the preferences store, and once via explicit serialization.

Use the preferences infrastructure to do this for us instead, and remove a bunch of unneeded code.

  • Shared/WebPageCreationParameters.cpp:

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

  • Shared/WebPageCreationParameters.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::creationParameters):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_lastNavigationWasAppBound):
(WebKit::WebPage::updatePreferences):

Source/WTF:

  • Scripts/Preferences/WebPreferencesDebug.yaml:

NeedsInAppBrowserPrivacyQuirks is only ever accessed via the WebKit preferences store,
so does not need to be exposed in WebKitLegacy or WebCore. Achieve this by removing the
WebKitLegacy and WebCore defaults.

6:53 PM Changeset in webkit [274191] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

REGRESSION (r274109): Catalina Perf tests failing due to unexpected output (222993)
https://bugs.webkit.org/show_bug.cgi?id=222993
<rdar://75235585>

Reviewed by Alex Christensen.

NSURL generates a single line of console output when we use [NSURL init]. We can avoid hitting this
message by using the preferred default initializer.

Found by existing tests (e.g.: Animation/balls.html)

  • Shared/Cocoa/ArgumentCodersCocoa.mm:

(-[WKSecureCodingURLWrapper initWithCoder:]):
(-[WKSecureCodingURLWrapper initWithURL:]):

6:36 PM Changeset in webkit [274190] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ macOS wk 2 ] media/media-source/media-source-canplaythrough-event.html is a flakey text failure
https://bugs.webkit.org/show_bug.cgi?id=223012

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Updating test expectations to Pass Failure, until test can be fixed.
6:21 PM Changeset in webkit [274189] by Chris Dumez
  • 94 edits in trunk/Source/WebKit

Use UniqueRef<> instead of std::unique_ptr<> when passing IPC::Encoder to sendMessage()
https://bugs.webkit.org/show_bug.cgi?id=222992

Reviewed by Alex Christensen.

Use UniqueRef<> instead of std::unique_ptr<> when passing IPC::Encoder to sendMessage(), to
make it clear it cannot be null.

I had to update didReceiveSyncMessage() to return a boolean since we can no longer rely
on the function nulling out the encoder it is given (since I modified the type from
std::unique_ptr to WTF::UniqueRef).

  • Platform/IPC/Connection.cpp:

(IPC::Connection::dispatchMessageReceiverMessage):
(IPC::Connection::createSyncMessageEncoder):
(IPC::Connection::sendMessage):
(IPC::Connection::sendSyncReply):
(IPC::Connection::sendSyncMessage):
(IPC::Connection::sendOutgoingMessages):
(IPC::Connection::dispatchSyncMessage):

  • Platform/IPC/Connection.h:

(IPC::Connection::send):
(IPC::Connection::sendWithAsyncReply):
(IPC::Connection::sendSync):

  • Platform/IPC/Encoder.cpp:

(IPC::Encoder::wrapForTesting):

  • Platform/IPC/Encoder.h:
  • Platform/IPC/HandleMessage.h:

(IPC::handleMessageSynchronous):
(IPC::handleMessageSynchronousWantsConnection):
(IPC::handleMessageAsync):
(IPC::handleMessageAsyncWantsConnection):

  • Platform/IPC/MessageSender.cpp:

(IPC::MessageSender::sendMessage):

  • Platform/IPC/MessageSender.h:
  • Platform/IPC/StreamServerConnection.h:

(IPC::StreamServerConnectionBase::sendSyncReply):

  • Platform/IPC/cocoa/ConnectionCocoa.mm:

(IPC::Connection::open):
(IPC::Connection::sendOutgoingMessage):

  • Platform/IPC/unix/ConnectionUnix.cpp:

(IPC::Connection::sendOutgoingMessage):

  • Platform/IPC/win/ConnectionWin.cpp:

(IPC::Connection::sendOutgoingMessage):

  • Scripts/webkit/messages.py:
  • UIProcess/AuxiliaryProcessProxy.cpp:

(WebKit::AuxiliaryProcessProxy::sendMessage):

  • UIProcess/AuxiliaryProcessProxy.h:

(WebKit::AuxiliaryProcessProxy::send):
(WebKit::AuxiliaryProcessProxy::sendWithAsyncReply):

  • UIProcess/DrawingAreaProxy.cpp:

(WebKit::DrawingAreaProxy::sendMessage):

  • UIProcess/DrawingAreaProxy.h:
  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::sendMessage):

  • UIProcess/ProvisionalPageProxy.h:
  • UIProcess/SuspendedPageProxy.cpp:

(WebKit::SuspendedPageProxy::sendMessage):

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

(WebKit::WebPageProxy::sendMessage):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/IPCTestingAPI.cpp:

(WebKit::IPCTestingAPI::JSIPC::sendMessage):
(WebKit::IPCTestingAPI::JSIPC::sendSyncMessage):

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

(WebKit::RemoteLayerTreeDrawingArea::updateRendering):
(WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
(WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::BackingStoreFlusher):
(WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):

4:57 PM Changeset in webkit [274188] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[BigSur arm64] 4 canvas-color-fonts tests consistently failing
https://bugs.webkit.org/show_bug.cgi?id=223005

Unreviewed test gardening.

  • platform/mac/TestExpectations: Mark tests as failing.
4:43 PM Changeset in webkit [274187] by achristensen@apple.com
  • 5 edits in trunk/Source

Reduce unnecessary string copies in ParsedContentRange
https://bugs.webkit.org/show_bug.cgi?id=221769

Reviewed by Geoff Garen.

Source/WebCore:

  • platform/network/ParsedContentRange.cpp:

(WebCore::parseContentRange):
(WebCore::ParsedContentRange::ParsedContentRange):

  • platform/network/ParsedRequestRange.cpp:

(WebCore::ParsedRequestRange::parse):

  • platform/network/ParsedRequestRange.h:

(WebCore::ParsedRequestRange::parse):

Source/WTF:

  • wtf/text/StringView.h:

(WTF::StringView::toInt64Strict const):

  • wtf/text/WTFString.h:
4:40 PM Changeset in webkit [274186] by achristensen@apple.com
  • 8 edits in trunk/Source/WebKit
REGRESSION (r272376): [iOS] ASSERTION FAILED: sessionID.isEphemeral()
!path.isEmpty() in WebKit::NetworkProcess::swServerForSession

https://bugs.webkit.org/show_bug.cgi?id=222713

Reviewed by Geoff Garen.

Because NetworkProcess::CreateNetworkConnectionToWebProcess is sent with SendOption::DispatchMessageEvenWhenWaitingForSyncReply, it is possible
for two messages of type NetworkProcess::AddWebsiteDataStore and two messages of type NetworkProcess::CreateNetworkConnectionToWebProcess to be in the queue,
but the second NetworkProcess::CreateNetworkConnectionToWebProcess jumps to the front of the line while the UI process is waiting for the reply to the first.
Then, when calling NetworkProcess::swServerForSession we expect the session's parameters to have been initialized in the network process already, but we cut
ahead of the parameter initialization message. This is a realistically rare condition that can only be hit when using SPI, but it is hit in the
ResourceLoadStatistics.StoreSuspension API test. To fix this, we send the WebsiteDataStoreParameters from each WebsiteDataStore in the NetworkProcessCreationParameters.
To avoid doing extra work, we introduce an early return in NetworkProcessProxy::addSession if we have already added parameters from this session to the network process.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::addSessionStorageQuotaManager):

  • NetworkProcess/NetworkProcessCreationParameters.cpp:

(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):

  • NetworkProcess/NetworkProcessCreationParameters.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::sendCreationParametersToNewProcess):
(WebKit::NetworkProcessProxy::addSession):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::parametersFromEachWebsiteDataStore):

  • UIProcess/WebsiteData/WebsiteDataStore.h:
3:59 PM Changeset in webkit [274185] by Alan Coon
  • 1 delete in tags/Safari-611.1.21.1.6

Delete tag.

3:51 PM Changeset in webkit [274184] by commit-queue@webkit.org
  • 13 edits in trunk

Unreviewed, reverting r274171.
https://bugs.webkit.org/show_bug.cgi?id=223004

Broke canvas layout tests on Apple Silicon

Reverted changeset:

"[GPUP] Enable 2D Canvas in layout tests by default"
https://bugs.webkit.org/show_bug.cgi?id=222835
https://trac.webkit.org/changeset/274171

3:50 PM Changeset in webkit [274183] by mmaxfield@apple.com
  • 2 edits in trunk/Tools

MotionMark scores are super sensitive to a single long frame
https://bugs.webkit.org/show_bug.cgi?id=220847
<rdar://problem/74152743>

Unreviewed.

Update the plan.

  • Scripts/webkitpy/benchmark_runner/data/plans/motionmark1.1.plan:
3:42 PM Changeset in webkit [274182] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[Big Sur arm64] WebGL texture-copying-feedback-loops tests crashing in com.apple.AppleMetalOpenGLRenderer GLDContextRec::finishResource
https://bugs.webkit.org/show_bug.cgi?id=223002

Unreviewed test gardening.

  • platform/mac/TestExpectations: Skip tests for Big Sur arm64.
3:30 PM Changeset in webkit [274181] by keith_miller@apple.com
  • 3 edits
    1 add in trunk

JSC Crash in makeString() while creating Error object.
https://bugs.webkit.org/show_bug.cgi?id=222452

Reviewed by Mark Lam.

JSTests:

  • stress/large-string-should-not-crash-error-creation.js: Added.

Source/JavaScriptCore:

This patch clamps the user provided part of error messages to
2-KB of characters. Technically, it could actually be 4-KB of
data for 16-bit strings. This is a somewhat randomly picked length
but seems like it should be sufficient for any normal use case I
can think of.

  • runtime/ExceptionHelpers.cpp:

(JSC::clampErrorMessage):
(JSC::defaultApproximateSourceError):
(JSC::defaultSourceAppender):

3:22 PM Changeset in webkit [274180] by Ben Nham
  • 2 edits in trunk/Source/WebCore

REGRESSION: [BigSur] ASSERT NOT REACHED in WebCore::ResourceLoadPriority WebCore::toResourceLoadPriority
https://bugs.webkit.org/show_bug.cgi?id=222998

Unreviewed, fix the debug assert caused by r274161.

CFURLRequestGetRequestPriority can return -1 for requests with no priority set (e.g. some
requests from the media stack). We need to handle this case when transforming a
CFURLRequestPriority to a ResourceLoadPriority.

  • platform/network/cf/ResourceRequestCFNet.h:

(WebCore::toResourceLoadPriority):

3:08 PM Changeset in webkit [274179] by mmaxfield@apple.com
  • 2 edits in trunk/PerformanceTests

MotionMark scores are super sensitive to a single long frame
https://bugs.webkit.org/show_bug.cgi?id=220847
<rdar://problem/74152743>

Reviewed by Jon Lee.

Currently, "ramp" tests have three phases. The middle phase is where they try to determine a maximum reasonable
complexity, and the third one is where they try various complexities between 0 and the maximum. The calculation
of this maximum reasonable complexity is currently very sensitive to outlier frame times. If there is a single
outlier frame time, the failure mode is to assume that the maximum complexity is ~10. So, the solution is to
ignore outlier frame times during this first phase, and to ensure that there are at least 9 frames measured that
have non-outlier times.

This test also changes the speed of the middle phase. Previously, each interval during this phase had
a complexity that was 3.16x of the previous complexity. This patch changes that to 1.78x of the previous
complexity for complexities above 50, and 1.33x for complexities above 10,000.

  • MotionMark/tests/resources/main.js:

(filterOutOutliers):
(_measureAndResetInterval):
(update):
(registerFrameTime):
(intervalHasConcluded):
(start):
(didFinishInterval):

3:07 PM Changeset in webkit [274178] by Russell Epstein
  • 1 copy in releases/Apple/Safari Technology Preview/Safari Technology Preview 120

Added a tag for Safari Technology Preview release 120.

2:54 PM Changeset in webkit [274177] by Russell Epstein
  • 1 delete in releases/Apple/Safari Technology Preview/Safari Technology Preview 120

Delete release.

2:25 PM Changeset in webkit [274176] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Crash under WebViewImpl::flagsChanged()
https://bugs.webkit.org/show_bug.cgi?id=222989

Reviewed by Tim Horton.

Capture a WeakPtr for |this| in the lambda passed to interpretKeyEvent() and make sure |this|
is still alive before getting m_page. This is the same pattern that is used for other
interpretKeyEvent() calls in this file (but this one was missed).

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::flagsChanged):

2:17 PM Changeset in webkit [274175] by eric.carlson@apple.com
  • 3 edits in trunk/Source/WebCore

[GPU Process] MSE videos are unable to AirPlay
https://bugs.webkit.org/show_bug.cgi?id=222956
rdar://72798835

When a user picks an device from the AirPlay menu, WebKit fires a
'webkitcurrentplaybacktargetiswirelesschanged' event at the <video> element and
sets video.webkitCurrentPlaybackTargetIsWireless to true so script in the page
is aware that the user wants to use AirPlay. AirPlay requires a <video> element to
be backed by a url that an AppleTV can load and play, so this is also a signal for
a page's script to change the <video> source if it is currently backed by a source
that is incompatible with AirPlay, e.g. MSE, MediaStream, data:. If the current media engine
does not support AirPlay (m_player->canPlayToWirelessPlaybackTarget() returns false)
by the next runloop, HTMLMediaElement fires webkitcurrentplaybacktargetiswirelesschanged
again and sets video.webkitCurrentPlaybackTargetIsWireless to false to signal
that AirPlay is not active.

When media is played in the GPU Process, one turn of the runloop isn't long enough
for the new media engine to be set up, configured, and have the new state pushed
back to the web process, so HTMLMediaElement will now wait for up to 500ms for
m_player->canPlayToWirelessPlaybackTarget() to return true.

Reviewed by Jer Noble.

Tested manually, this requires and AppleTV to test.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::checkPlaybackTargetCompatablity):
(WebCore::HTMLMediaElement::setIsPlayingToWirelessTarget):

  • html/HTMLMediaElement.h:
2:07 PM Changeset in webkit [274174] by Chris Dumez
  • 50 edits in trunk

Stop using callOnMainThread() / isMainThread() in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=222986

Reviewed by Alex Christensen.

Source/WebKit:

Use callOnMainRunLoop() / callOnMainRunLoopAndWait() / isMainRunLoop() in WebKit2
instead of callOnMainThread() / callOnMainThreadAndWait() / isMainThread().
Using the "MainThread" variants doesn't do the right thing in the UIProcess when
an iOS app is using both WK1 (with WebThread) and WK2.

  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::RemoteGraphicsContextGL::copyTextureFromMedia):

  • GPUProcess/media/RemoteAudioDestinationManager.cpp:

(WebKit::RemoteAudioDestination::render):

  • GPUProcess/media/RemoteMediaResource.cpp:

(WebKit::RemoteMediaResource::~RemoteMediaResource):
(WebKit::RemoteMediaResource::responseReceived):

  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp:

(WebKit::RemoteSampleBufferDisplayLayerManager::close):
(WebKit::RemoteSampleBufferDisplayLayerManager::createLayer):
(WebKit::RemoteSampleBufferDisplayLayerManager::releaseLayer):

  • NetworkProcess/Downloads/Download.cpp:

(WebKit::Download::cancel):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::storageQuotaManager):

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::getDirectorySize):
(WebKit::CacheStorage::Engine::diskUsage):

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::resume):

  • NetworkProcess/webrtc/NetworkRTCMonitor.cpp:

(WebKit::NetworkManagerWrapper::onNetworksChanged):

  • NetworkProcess/webrtc/NetworkRTCProvider.cpp:

(WebKit::NetworkRTCProvider::createServerTCPSocket):
(WebKit::NetworkRTCProvider::createClientTCPSocket):
(WebKit::NetworkRTCProvider::createResolver):
(WebKit::NetworkRTCProvider::stopResolver):
(WebKit::NetworkRTCProvider::closeListeningSockets):

  • Platform/IPC/Connection.cpp:

(IPC::Connection::sendMessage):
(IPC::Connection::dispatchMessage):

  • Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:

(WebKit::AuthenticationManager::initializeConnection):

  • Shared/mac/MediaFormatReader/MediaFormatReader.cpp:

(WebKit::MediaFormatReader::startOnMainThread):
(WebKit::MediaFormatReader::parseByteSource):
(WebKit::MediaFormatReader::didParseTracks):
(WebKit::MediaFormatReader::didProvideMediaData):
(WebKit::MediaFormatReader::finishParsing):

  • Shared/mac/MediaFormatReader/MediaSampleByteRange.cpp:

(WebKit::MediaSampleByteRange::MediaSampleByteRange):

  • Shared/mac/MediaFormatReader/MediaTrackReader.cpp:

(WebKit::MediaTrackReader::MediaTrackReader):
(WebKit::MediaTrackReader::addSample):
(WebKit::MediaTrackReader::finishParsing):

  • Shared/mac/MediaFormatReader/MediaTrackReader.h:
  • UIProcess/API/glib/IconDatabase.cpp:

(WebKit::IconDatabase::IconDatabase):
(WebKit::IconDatabase::~IconDatabase):
(WebKit::IconDatabase::createTablesIfNeeded):
(WebKit::IconDatabase::populatePageURLToIconURLMap):
(WebKit::IconDatabase::clearStatements):
(WebKit::IconDatabase::pruneTimerFired):
(WebKit::IconDatabase::startPruneTimer):
(WebKit::IconDatabase::clearLoadedIconsTimerFired):
(WebKit::IconDatabase::startClearLoadedIconsTimer):
(WebKit::IconDatabase::iconIDForIconURL):
(WebKit::IconDatabase::setIconIDForPageURL):
(WebKit::IconDatabase::iconData):
(WebKit::IconDatabase::addIcon):
(WebKit::IconDatabase::updateIconTimestamp):
(WebKit::IconDatabase::deleteIcon):
(WebKit::IconDatabase::checkIconURLAndSetPageURLIfNeeded):
(WebKit::IconDatabase::loadIconForPageURL):
(WebKit::IconDatabase::iconURLForPageURL):
(WebKit::IconDatabase::setIconForPageURL):
(WebKit::IconDatabase::clear):

  • UIProcess/Cocoa/MediaPermissionUtilities.mm:

(WebKit::requestAVCaptureAccessForType):
(WebKit::requestSpeechRecognitionAccess):

  • UIProcess/Cocoa/PreferenceObserver.mm:

(-[WKUserDefaults _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:]):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::nonBrowserServices):
(WebKit::agxCompilerClasses):
(WebKit::agxCompilerServices):
(WebKit::diagnosticServices):

  • UIProcess/Inspector/socket/RemoteInspectorClient.cpp:

(WebKit::RemoteInspectorClient::sendWebInspectorEvent):
(WebKit::RemoteInspectorClient::didClose):

  • UIProcess/WebFramePolicyListenerProxy.cpp:

(WebKit::WebFramePolicyListenerProxy::didReceiveSafeBrowsingResults):

  • UIProcess/WebPageProxy.cpp:

(WebKit::gpuIOKitClasses):
(WebKit::gpuMachServices):
(WebKit::mediaRelatedMachServices):

  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView web_setContentProviderData:suggestedFilename:]):

  • UIProcess/mac/WKPrintingView.mm:

(-[WKPrintingView dealloc]):

  • WebProcess/Cache/WebCacheStorageConnection.cpp:

(WebKit::WebCacheStorageConnection::~WebCacheStorageConnection):

  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:

(WebKit::RemoteImageBufferProxy::waitForDidFlushOnSecondaryThread):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::load):

  • WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp:

(WebKit::RemoteAudioDestinationProxy::renderQuantum):

  • WebProcess/GPU/media/RemoteAudioSourceProvider.cpp:

(WebKit::RemoteAudioSourceProvider::RemoteAudioSourceProvider):
(WebKit::RemoteAudioSourceProvider::close):

  • WebProcess/GPU/media/RemoteImageDecoderAVF.cpp:

(WebKit::RemoteImageDecoderAVF::createFrameImageAtIndex):

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:

(WebKit::LibWebRTCCodecs::setCallbacks):
(WebKit::LibWebRTCCodecs::failedDecoding):
(WebKit::LibWebRTCCodecs::completedDecoding):
(WebKit::LibWebRTCCodecs::completedEncoding):

  • WebProcess/Network/webrtc/LibWebRTCResolver.cpp:

(WebKit::LibWebRTCResolver::sendOnMainThread):

  • WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:

(WebKit::LibWebRTCSocketFactory::createServerTcpSocket):
(WebKit::LibWebRTCSocketFactory::createUdpSocket):
(WebKit::LibWebRTCSocketFactory::createClientTcpSocket):

  • WebProcess/Network/webrtc/WebRTCMonitor.cpp:

(WebKit::WebRTCMonitor::sendOnMainThread):

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::pdfLog):
(WebKit::PDFPlugin::logStreamLoader):
(WebKit::PDFPlugin::verboseLog):
(WebKit::PDFPlugin::receivedNonLinearizedPDFSentinel):
(WebKit::dataProviderGetBytesAtPositionCallback):
(WebKit::dataProviderGetByteRangesCallback):
(WebKit::dataProviderReleaseInfoCallback):
(WebKit::PDFPlugin::threadEntry):
(WebKit::PDFPlugin::getResourceBytesAtPositionMainThread):
(WebKit::PDFPlugin::getResourceBytesAtPosition):
(WebKit::PDFPlugin::adoptBackgroundThreadDocument):
(WebKit::PDFPlugin::installPDFDocument):
(WebKit::PDFPlugin::tryRunScriptsInPDFDocument):

  • WebProcess/Storage/WebSWClientConnection.cpp:

(WebKit::WebSWClientConnection::didMatchRegistration):
(WebKit::WebSWClientConnection::didGetRegistrations):
(WebKit::WebSWClientConnection::matchRegistration):
(WebKit::WebSWClientConnection::getRegistrations):

  • WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:

(WebKit::WebServiceWorkerFetchTaskClient::didReceiveFormDataAndFinish):
(WebKit::WebServiceWorkerFetchTaskClient::cleanup):

  • WebProcess/WebPage/FindController.cpp:

(WebKit::FindController::drawRect):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::elementDidBlur):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::handleSyntheticClick):
(WebKit::WebPage::didFinishContentChangeObserving):
(WebKit::WebPage::updateInputContextAfterBlurringAndRefocusingElementIfNeeded):

  • WebProcess/WebPage/mac/DrawingAreaMac.cpp:

(WebKit::DisplayRefreshMonitorMac::displayLinkFired):

  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:

(-[WKAccessibilityWebPageObjectBase axObjectCache]):
(-[WKAccessibilityWebPageObjectBase accessibilityPluginObject]):
(-[WKAccessibilityWebPageObjectBase setWebPage:]):
(-[WKAccessibilityWebPageObjectBase setHasMainFramePlugin:]):
(-[WKAccessibilityWebPageObjectBase setRemoteParent:]):

  • WebProcess/cocoa/RemoteRealtimeAudioSource.cpp:

(WebKit::RemoteRealtimeAudioSource::remoteAudioSamplesAvailable):

  • WebProcess/cocoa/RemoteRealtimeMediaSourceProxy.cpp:

(WebKit::RemoteRealtimeMediaSourceProxy::connection):

Source/WTF:

  • wtf/MainThread.h:

Tools:

Add corresponding style checker rules.

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

(check_no_callonmainthread):
(check_no_ismainthread):
(check_style):
(CppChecker):

1:36 PM Changeset in webkit [274173] by Manuel Rego Casasnovas
  • 7 edits in trunk/Source/WebCore

[selectors] Move :focus-viisble & :focus-within flags from Node to UserActionElementSet
https://bugs.webkit.org/show_bug.cgi?id=222647

Reviewed by Antti Koivisto.

This patch avoids using flags in Node.h for :focus-visible and :focus-within pseudo classes,
and move them to UserActionElementSet.
This makes them consistent with :focus flag, and saves some bits in Node.h for other flags in the future.

On top of that this makes :focus-within SelectorCompiler implementation consistent with :focus and :focus-visible implementations.

  • css/SelectorCheckerTestFunctions.h:

(WebCore::matchesFocusWithinPseudoClass):

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::JSC_DEFINE_JIT_OPERATION):
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):

  • dom/Element.cpp:

(WebCore::Element::isUserActionElementHasFocusVisible const):
(WebCore::Element::isUserActionElementHasFocusWithin const):
(WebCore::Element::setHasFocusVisible):
(WebCore::Element::setHasFocusWithin):

  • dom/Element.h:

(WebCore::Element::hasFocusVisible const):
(WebCore::Element::hasFocusWithin const):

  • dom/Node.h:

(WebCore::Node::flagIsLink):

  • dom/UserActionElementSet.h:

(WebCore::UserActionElementSet::hasFocusVisible):
(WebCore::UserActionElementSet::hasFocusWithin):
(WebCore::UserActionElementSet::setHasFocusVisible):
(WebCore::UserActionElementSet::setHasFocusWithin):

1:27 PM Changeset in webkit [274172] by Chris Dumez
  • 53 edits in trunk/Source/WebKit

[IPC Hardening] Protect against bad input in WebProcessProxy::createSpeechRecognitionServer() and MessageReceiverMap
https://bugs.webkit.org/show_bug.cgi?id=222948
<rdar://problem/75191472>

Reviewed by Alex Christensen.

Update MessageReceiverMap so that:

  1. Trying to remove a MessageReceiver that is not in the map does not do dangerous things.
  2. It stores weak pointers to the receivers instead of raw pointers. This would avoid doing bad things when trying to remove a message receiver that's already been destroyed.

Add a MESSAGE_CHECK() in WebProcessProxy::createSpeechRecognitionServer() to
make sure the identifier is not already in the map. There used to be a debug
assertion but we should MESSAGE_CHECK() too since the value is coming from
IPC.

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/GPUProcess.h:
  • GPUProcess/media/RemoteAudioSessionProxy.h:
  • GPUProcess/media/RemoteCDMFactoryProxy.h:
  • GPUProcess/media/RemoteCDMProxy.h:
  • GPUProcess/media/RemoteLegacyCDMFactoryProxy.h:
  • GPUProcess/media/RemoteLegacyCDMProxy.h:
  • GPUProcess/media/RemoteLegacyCDMSessionProxy.h:
  • GPUProcess/media/RemoteMediaEngineConfigurationFactoryProxy.h:
  • GPUProcess/media/RemoteMediaPlayerManagerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/RemoteMediaResourceManager.h:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h:
  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/ServiceWorker/WebSWServerConnection.h:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
  • Platform/IPC/MessageReceiver.h:
  • Platform/IPC/MessageReceiverMap.cpp:

(IPC::MessageReceiverMap::addMessageReceiver):
(IPC::MessageReceiverMap::removeMessageReceiver):
(IPC::MessageReceiverMap::dispatchMessage):
(IPC::MessageReceiverMap::dispatchSyncMessage):

  • Platform/IPC/MessageReceiverMap.h:
  • Shared/API/Cocoa/RemoteObjectRegistry.h:
  • Shared/ApplePay/WebPaymentCoordinatorProxy.h:
  • Shared/Authentication/AuthenticationManager.h:
  • Shared/AuxiliaryProcess.h:
  • UIProcess/GPU/GPUProcessProxy.h:
  • UIProcess/Inspector/WebInspectorProxy.h:
  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h:
  • UIProcess/Media/AudioSessionRoutingArbitratorProxy.h:
  • UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h:
  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/ProvisionalPageProxy.h:
  • UIProcess/SpeechRecognitionRemoteRealtimeMediaSourceManager.h:
  • UIProcess/SpeechRecognitionServer.h:
  • UIProcess/SuspendedPageProxy.h:
  • UIProcess/WebAuthentication/WebAuthnProcessProxy.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::createSpeechRecognitionServer):

  • UIProcess/WebProcessProxy.h:
  • WebAuthnProcess/WebAuthnProcess.h:
  • WebProcess/GPU/GPUProcessConnection.h:
  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
  • WebProcess/GPU/media/MediaSourcePrivateRemote.h:
  • WebProcess/GPU/media/SourceBufferPrivateRemote.h:
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h:
  • WebProcess/Inspector/WebInspectorUIExtensionController.h:
  • WebProcess/Network/WebSocketChannel.h:
  • WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
  • WebProcess/WebStorage/StorageAreaMap.h:
1:19 PM Changeset in webkit [274171] by Said Abou-Hallawa
  • 13 edits in trunk

[GPUP] Enable 2D Canvas in layout tests by default
https://bugs.webkit.org/show_bug.cgi?id=222835

Reviewed by Simon Fraser.

Source/WTF:

Move UseGPUProcessForCanvasRenderingEnabled from WebPreferencesInternal
to WebPreferencesExperimental so that the WebKitTestRunner will turn it
on by default.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
  • Scripts/Preferences/WebPreferencesInternal.yaml:

LayoutTests:

Some of the canvas layout tests are still failing when GPUP is enabled
for 2D Canvas. Skip these tests for now.

  • http/tests/canvas/color-fonts/fill-gradient-sbix-2.html:
  • http/tests/canvas/color-fonts/fill-gradient-sbix-3.html:
  • http/tests/canvas/color-fonts/fill-gradient-sbix-4.html:
  • http/tests/canvas/color-fonts/stroke-gradient-sbix-2.html:
  • http/tests/canvas/color-fonts/stroke-gradient-sbix-3.html:
  • http/tests/canvas/color-fonts/stroke-gradient-sbix-4.html:

webkit.org/b/222881

  • inspector/canvas/memory.html:

webkit.org/b/222880

1:17 PM Changeset in webkit [274170] by Antti Koivisto
  • 5 edits
    2 adds in trunk

REGRESSION (r273003): Animated style may lose original display property value
https://bugs.webkit.org/show_bug.cgi?id=222979
rdar://75056684

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: fast/animation/animation-display-style-adjustment.html

The original (non-blockified) display property value is saved in the beginning of Style::Adjuster::adjust.
It is needed to implement absolute positioning correctly in some situations. However with animations
the style adjustment code may run twice on the same style and the second run will clobber the saved original value.

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::adjustStyle):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::setDisplay):

Always save the original value when setting the property normally.

(WebCore::RenderStyle::setEffectiveDisplay):
(WebCore::RenderStyle::setOriginalDisplay): Deleted.

Add setEffectiveDisplay that doesn't affect the original value for adjuster use.

  • style/StyleAdjuster.cpp:

(WebCore::Style::Adjuster::adjust const):

Remove the saving of the original value.
Use setEffectiveDisplay in all adjuster code, preserving the original value.

(WebCore::Style::Adjuster::adjustDisplayContentsStyle const):
(WebCore::Style::Adjuster::adjustSVGElementStyle):
(WebCore::Style::Adjuster::adjustForSiteSpecificQuirks const):

LayoutTests:

  • fast/animation/animation-display-style-adjustment-expected.html: Added.
  • fast/animation/animation-display-style-adjustment.html: Added.
12:52 PM Changeset in webkit [274169] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

buildbot checkconfig is failing in ews after buildbot upgrade
https://bugs.webkit.org/show_bug.cgi?id=222974

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py:

(RunEWSBuildbotCheckConfig.start): Set LC_ALL environment variable on bots.

  • CISupport/ews-build/steps_unittest.py: Updated unit-tests accordingly.
12:41 PM Changeset in webkit [274168] by weinig@apple.com
  • 8 edits in trunk/Source

Remove CSSParserContext::enforcesCSSMIMETypeInNoQuirksMode as it is unused
https://bugs.webkit.org/show_bug.cgi?id=222949

Reviewed by Darin Adler.

At some point in the past we stoped doing anything with the enforcesCSSMIMETypeInNoQuirksMode
bit on CSSParserContext.

The only time it was ever disabled was when running ancient versions of iWeb, a product that
itself hasn't existed for over a decade, so I think we are ok to remove it.

Source/WebCore:

  • css/parser/CSSParserContext.cpp:

(WebCore::operator==):

  • css/parser/CSSParserContext.h:

(WebCore::CSSParserContextHash::hash):

Source/WebKitLegacy/mac:

  • WebView/WebPreferencesDefaultValues.h:
  • WebView/WebPreferencesDefaultValues.mm:

(WebKit::defaultEnforceCSSMIMETypeInNoQuirksMode): Deleted.

Source/WTF:

  • Scripts/Preferences/WebPreferences.yaml:
12:14 PM Changeset in webkit [274167] by Chris Dumez
  • 17 edits
    6 adds in trunk/LayoutTests/imported/w3c

Resync web-platform-tests/dom tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=222983

Reviewed by Geoffrey Garen.

Resync web-platform-tests/dom tests from upstream 7a9388b0f029e03.

  • web-platform-tests/dom/events/Event-dispatch-click-expected.txt:
  • web-platform-tests/dom/events/Event-dispatch-click.html:
  • web-platform-tests/dom/events/Event-dispatch-redispatch.html:
  • web-platform-tests/dom/events/Event-stopPropagation-cancel-bubbling-expected.txt: Added.
  • web-platform-tests/dom/events/Event-stopPropagation-cancel-bubbling.html: Added.
  • web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt:
  • web-platform-tests/dom/events/document-level-wheel-event-listener-passive-by-default-expected.txt: Added.
  • web-platform-tests/dom/events/document-level-wheel-event-listener-passive-by-default.html: Added.
  • web-platform-tests/dom/events/w3c-import.log:
  • web-platform-tests/dom/nodes/Document-createEvent.https-expected.txt:
  • web-platform-tests/dom/nodes/Document-createEvent.https.html:
  • web-platform-tests/dom/nodes/Document-createEvent.js:
  • web-platform-tests/dom/nodes/Element-matches-expected.txt:
  • web-platform-tests/dom/nodes/Element-webkitMatchesSelector-expected.txt:
  • web-platform-tests/dom/nodes/ParentNode-querySelector-All-expected.txt:
  • web-platform-tests/dom/nodes/ParentNode-querySelector-All-xht-expected.txt:
  • web-platform-tests/dom/nodes/aria-element-reflection.tentative-expected.txt:
  • web-platform-tests/dom/nodes/aria-element-reflection.tentative.html:
  • web-platform-tests/dom/nodes/selectors.js:
  • web-platform-tests/dom/slot-recalc-expected.txt: Added.
  • web-platform-tests/dom/slot-recalc.html: Added.
  • web-platform-tests/dom/w3c-import.log:
12:11 PM Changeset in webkit [274166] by commit-queue@webkit.org
  • 9 edits in trunk

.:
[GTK] Reenable -fvisibility=hidden
https://bugs.webkit.org/show_bug.cgi?id=181916

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-03-09
Reviewed by Don Olmstead.

In non-DEVELOPER_MODE builds, we rely on a linker version script to hide symbols that we
don't want to export. Building with hidden visibility might seem redundant with this, but
actually building with hidden visibility has advantages anyway. See
https://gcc.gnu.org/wiki/Visibility.

Note that I'm not confident GTK port can safely use -fvisibility-inlines-hidden, since it's
split between two shared objects. Also, because GTK is split into two shared objects, GTK
needs to build bmalloc and WTF as CMake OBJECT libraries, which is effectively the same as
using -Wl,--whole-archive to prevent symbols from being prematurely stripped away.

P.S. Major credit to Don Olmstead, who did most of the work to make this possible, which has
already landed in previous patches.

  • Source/cmake/OptionsGTK.cmake:

Source/WebCore:
[WPE][GTK] Reenable -fvisibility=hidden (and -fvisibility-inlines-hidden for WPE)
https://bugs.webkit.org/show_bug.cgi?id=181916

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-03-09
Reviewed by Don Olmstead.

We need to export the destructor of EventTarget.

  • PlatformGTK.cmake:
  • dom/EventTarget.cpp:
  • dom/EventTarget.h:

Tools:
[GTK] Reenable -fvisibility=hidden
https://bugs.webkit.org/show_bug.cgi?id=181916

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-03-09
Reviewed by Don Olmstead.

  • TestWebKitAPI/PlatformGTK.cmake:
  • TestWebKitAPI/glib/TestExpectations.json:
12:09 PM Changeset in webkit [274165] by graouts@webkit.org
  • 4 edits
    2 adds in trunk

[Web Animations] setKeyframes does not preserve animation's current offset
https://bugs.webkit.org/show_bug.cgi?id=222939
<rdar://problem/75207793>

Reviewed by Dean Jackson.

Source/WebCore:

Test: webanimations/set-keyframes-after-animation-completion.html

When setKeyframes() is called on a KeyframeEffect, it clears the existing blending keyframes
created for the style system which will be re-populated on the next style update.

When an animation completes, it becomes eligible for being removed unless its effect is the
top-most effect in the target element's effect stack affecting one of the CSS properties
animated by effects in the stack. To determine what properties an effect animates, the method
KeyframeEffect::animatedProperties() is used.

Until now, KeyframeEffect::animatedProperties() simply returned the properties from the
blending keyframes. As such, if blending keyframes are empty, that method returns an empty
set of properties.

Since blending keyframes are cleared by a call to setKeyframes(), calling this method on
the effect of an animation that just finished will remove that animation and the effect
will no longer be applied when updating styles.

To fix this, we add a new instance variable on KeyframeEffect to store the list of properties
affected by the effect from the keyframes parsed by setKeyframes() until we generate the
blending keyframes during the next style update.

As soon as we generate the blending keyframes and setBlendingKeyframes() is called, we clear
that new property. This guarantees that no matter how keyframes are specified – CSS Transitions,
CSS Animations or Web Animations JS API – the animatedProperties() method returns the set
of affected properties.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::animatedProperties):
(WebCore::KeyframeEffect::setBlendingKeyframes):

  • animation/KeyframeEffect.h:

(WebCore::KeyframeEffect::animatedProperties const): Deleted.

LayoutTests:

Add a new test that checks that updating keyframes after an animation has completed
correctly updates styles accounting for the new keyframes.

  • webanimations/set-keyframes-after-animation-completion-expected.html: Added.
  • webanimations/set-keyframes-after-animation-completion.html: Added.
12:03 PM Changeset in webkit [274164] by Said Abou-Hallawa
  • 2 edits in trunk/Source/WebCore

[GPU Process] ImageBitmap should release its ImageBuffer in the main thread
https://bugs.webkit.org/show_bug.cgi?id=222960

Reviewed by Simon Fraser.

The ImageBuffer of the ImageBitmap should be deleted on the main thread
only since its deletion may require sending messages to the GPUP.

Covered by existing test:

imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-in-worker-transfer.html

  • html/ImageBitmap.cpp:

(WebCore::ImageBitmap::~ImageBitmap):

11:57 AM Changeset in webkit [274163] by Fujii Hironori
  • 3 edits in trunk/Source/WebKit

[WinCairo] Deadlocks in WTF::Thread::ThreadHolder::~ThreadHolder while WebKitWebProcess.exe is shutting down
https://bugs.webkit.org/show_bug.cgi?id=222682

Reviewed by Don Olmstead.

WinCairo WebKit2 layout tests were observing deadlocks in
WTF::Thread::ThreadHolder::~ThreadHolder while
WebKitWebProcess.exe is shutting down in the IPC thread.
WebProcess calls _exit in IPC threads if a IPC connection is
disconnected.

r260911 (Bug 210955) fixed a similar deadlock by skipping the
destruction in ~ThreadHolder if the calling thread is the main
thread.

Microsoft Docs describe how a process is terminated and recommend
TerminateProcess API to avoid such deadlocks.
<https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-exitprocess>

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::callExitSoon): Use TerminateProcess instead of _exit.

  • WebProcess/WebProcess.cpp:

(WebKit::callExit): Ditto.

11:24 AM Changeset in webkit [274162] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix the ENABLE(APP_HIGHLIGHTS) build after r274155

  • Modules/highlight/AppHighlightStorage.h: Fix the signature of AppHighlightStorage::storeAppHighlight.
11:08 AM Changeset in webkit [274161] by Ben Nham
  • 8 edits in trunk/Source

Adopt new NSURLSessionConfiguration SPI for connection cache configuration
https://bugs.webkit.org/show_bug.cgi?id=222934

Reviewed by Geoffrey Garen.

Source/WebCore:

This uses the NSURLSessionConfiguration connection cache limit SPI introduced in Big Sur to
properly set the parameters we want for HTTP/1.1 connections. Previously we tried to do this
using _CFNetworkHTTPConnectionCacheSetLimit in NetworkProcessCocoa, but this didn't work
because that SPI only applies to NSURLConnection rather than NSURLSession.

In particular, this meant that the number of priority levels wasn't set correctly, which we
had to work around by constraining the number of priority levels when mapping WebKit
resource priorities to CFNetwork priorities (https://bugs.webkit.org/show_bug.cgi?id=203423).
This patch adopts the SPI and removes that workaround.

  • platform/network/cf/ResourceRequestCFNet.h:

(WebCore::toResourceLoadPriority):
(WebCore::toPlatformRequestPriority):

Source/WebCore/PAL:

Declare NSURLSessionConfiguration connection cache limit SPI when building using the public SDK.

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

This uses the NSURLSessionConfiguration connection cache limit SPI introduced in Big Sur to
properly set the parameters we want for HTTP/1.1 connections. Previously we tried to do this
using _CFNetworkHTTPConnectionCacheSetLimit in NetworkProcessCocoa, but this didn't work
because that SPI only applies to NSURLConnection rather than NSURLSession.

In particular, this meant that the number of priority levels wasn't set correctly, which we
had to work around by constraining the number of priority levels when mapping WebKit
resource priorities to CFNetwork priorities (https://bugs.webkit.org/show_bug.cgi?id=203423).
This patch adopts the SPI and removes that workaround.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::configurationForSessionID):

Source/WTF:

Add the HAVE_CFNETWORK_NSURLSESSION_CONNECTION_CACHE_LIMITS flag to control whether or not
to use the connection cache limit SPI on NSURLSessionConfiguration.

  • wtf/PlatformHave.h:
10:58 AM Changeset in webkit [274160] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

[IPC Hardening] IPC::decode(Decoder& decoder, RetainPtr<CFDictionaryRef>&) should make sure keys & values aren't null
https://bugs.webkit.org/show_bug.cgi?id=222980

Reviewed by Geoffrey Garen.

[NSMutableDictionary setObject:forKey:] throws an exception when the given object or key is nil. The dictionary decoder
should therefore fail nicely when either of these is nil, instead of crashing.

  • Shared/cf/ArgumentCodersCF.cpp:

(IPC::decode):

10:58 AM Changeset in webkit [274159] by mark.lam@apple.com
  • 4 edits in trunk

Use --verifyGC=true on some JSC stress test configurations.
https://bugs.webkit.org/show_bug.cgi?id=222289

Reviewed by Filip Pizlo.

JSTests:

  • stress/heap-analyzer-taking-lock.js:

Tools:

  • Scripts/run-jsc-stress-tests:
10:50 AM Changeset in webkit [274158] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

[IPC Hardening] SandboxExtension::HandleArray IPC decoder should not call Vector::resize()
https://bugs.webkit.org/show_bug.cgi?id=222977
<rdar://problem/75218451>

Reviewed by Anders Carlsson.

SandboxExtension::HandleArray IPC decoder should not call Vector::resize() with an untrusted size
coming from IPC. Instead, call Vector::append(), like the Vector IPC decoder does.

  • Shared/Cocoa/SandboxExtensionCocoa.mm:

(WebKit::SandboxExtension::HandleArray::append):
(WebKit::SandboxExtension::HandleArray::decode):

  • Shared/SandboxExtension.h:

(WebKit::SandboxExtension::append):

10:32 AM Changeset in webkit [274157] by Razvan Caliman
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Jump from Layout panel to grid container element
https://bugs.webkit.org/show_bug.cgi?id=222429
<rdar://problem/74751801>

Reviewed by Devin Rousso.

Add a button to inspect a CSS grid overlay's corresponding element.
Remove the similar functionality from the overloaded label.

  • UserInterface/Views/CSSGridSection.css:

(.css-grid-section .node-display-name,):
(.css-grid-section .node-overlay-list-item-container :is(.go-to-arrow, .inline-swatch)):
(.css-grid-section .node-overlay-list-item-container:not(:hover) .go-to-arrow):

  • UserInterface/Views/CSSGridSection.js:

(WI.CSSGridSection.prototype.layout):

10:15 AM Changeset in webkit [274156] by Peng Liu
  • 10 edits in trunk

[GPUP] Test fast/images/animated-image-mp4.html times out when media in GPU Process is enabled
https://bugs.webkit.org/show_bug.cgi?id=221795

Reviewed by Eric Carlson.

Source/WebCore:

No new tests. Fix test failures.

  • platform/graphics/cocoa/IOSurface.h:

Add an empty line to make the comment clear.

  • platform/graphics/cocoa/WebCoreDecompressionSession.mm:

(WebCore::WebCoreDecompressionSession::ensureDecompressionSessionForSample):
Fix an error in the attributes of a VTDecompressionSession.

Source/WebKit:

Pass the color space along with a MachSendRight created from an IOSurface to ensure
that we can recreate the image from the MachSendRight/IOSurface properly.

  • GPUProcess/media/RemoteImageDecoderAVFProxy.cpp:

(WebKit::RemoteImageDecoderAVFProxy::createFrameImageAtIndex):

  • GPUProcess/media/RemoteImageDecoderAVFProxy.h:
  • GPUProcess/media/RemoteImageDecoderAVFProxy.messages.in:
  • WebProcess/GPU/media/RemoteImageDecoderAVF.cpp:

(WebKit::RemoteImageDecoderAVF::createFrameImageAtIndex):
This functions needs to return a valid image when it is called in the main thread,
otherwise, the animation will pause.

LayoutTests:

  • platform/wk2/TestExpectations:
10:01 AM Changeset in webkit [274155] by Megan Gardner
  • 4 edits in trunk/Source/WebCore

Hold onto AppHighlights and restore them once the page is loaded.
https://bugs.webkit.org/show_bug.cgi?id=222640

Reviewed by Devin Rousso.

  • Modules/highlight/AppHighlightStorage.cpp:

(WebCore::AppHighlightStorage::restoreAppHighlight):
(WebCore::AppHighlightStorage::restoreUnrestoredAppHighlights):

  • Modules/highlight/AppHighlightStorage.h:
  • dom/Document.cpp:

(WebCore::Document::finishedParsing):

9:38 AM Changeset in webkit [274154] by youenn@apple.com
  • 6 edits in trunk

MediaRecorder.requestData() not returning all captured media after a pause
https://bugs.webkit.org/show_bug.cgi?id=222285
<rdar://problem/74884561>

Reviewed by Eric Carlson.

Source/WebCore:

Previously, when flushing, we are called on a background thread and we hop to the main thread to append data.
In some cases, we were resolving the completion handlers before appending all data.
To prevent this, we now append data from a background thread.
To do so, we lock when accessing m_data, either to append or take the data.
In addition, we cancel writing when clearing the writer.
This allows to clean the writer delegate without fearing that write operations are happening.

Covered by updated test.

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

(-[WebAVAssetWriterDelegate initWithWriter:]):
(-[WebAVAssetWriterDelegate assetWriter:didProduceFragmentedHeaderData:]):
(-[WebAVAssetWriterDelegate assetWriter:didProduceFragmentedMediaData:fragmentedMediaDataReport:]):
(WebCore::MediaRecorderPrivateWriter::initialize):
(WebCore::MediaRecorderPrivateWriter::clear):
(WebCore::MediaRecorderPrivateWriter::stopRecording):
(WebCore::MediaRecorderPrivateWriter::completeFetchData):
(WebCore::MediaRecorderPrivateWriter::appendData):
(WebCore::MediaRecorderPrivateWriter::takeData):

LayoutTests:

  • http/wpt/mediarecorder/pause-recording-expected.txt:
  • http/wpt/mediarecorder/pause-recording.html:
9:37 AM Changeset in webkit [274153] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

[IPC Hardening] Protect WebPageProxy::willSubmitForm() against bad Strings
https://bugs.webkit.org/show_bug.cgi?id=222955
<rdar://problem/75195062>

Reviewed by Anders Carlsson.

The Strings passed in textFieldValues are used as keys in a HashMap later on so we need
to validate them.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::willSubmitForm):

9:36 AM Changeset in webkit [274152] by youenn@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Duplicate headers in WebRTC
https://bugs.webkit.org/show_bug.cgi?id=222519
<rdar://problem/75137024>

Reviewed by Eric Carlson.

  • libwebrtc.xcodeproj/project.pbxproj:
9:35 AM Changeset in webkit [274151] by Razvan Caliman
  • 2 edits in trunk/Source/WebInspectorUI

[Cocoa] Web Inspector: Console search box is broken, advancing to next result instead pastes from system find pasteboard
https://bugs.webkit.org/show_bug.cgi?id=220773
<rdar://problem/73410423>

Reviewed by Devin Rousso.

Ensure FindBanner is always marked as shown in the Console
to prevent malfunction when advancing through search results.

  • UserInterface/Views/FindBanner.js:

(WI.FindBanner):
(WI.FindBanner.prototype.set targetElement):
(WI.FindBanner.prototype.hide):

8:55 AM Changeset in webkit [274150] by commit-queue@webkit.org
  • 5 edits in trunk

[WebRTC][GStreamer] webrtc/multi-video.html crashes
https://bugs.webkit.org/show_bug.cgi?id=222792

Patch by Philippe Normand <pnormand@igalia.com> on 2021-03-09
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Add safeguards preventing removal of a pad that was not yet added.

  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:

(webkitMediaStreamSrcAddPad):
(webkitMediaStreamSrcRemovePad):

LayoutTests:

Update expectations for webrtc/multi-video.html which is currently expected to fail.

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
8:53 AM Changeset in webkit [274149] by commit-queue@webkit.org
  • 6 edits in trunk

[GStreamer][WebRTC] VideoEncoder still doesn't comply with WebKit style
https://bugs.webkit.org/show_bug.cgi?id=222901

Patch by Philippe Normand <pnormand@igalia.com> on 2021-03-09
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Refactor the code to comply with WebKit's coding style. A new function allowing to set the
encoder element was also factored out, in preparation for the camerabin support.

  • platform/mediastream/libwebrtc/GStreamerVideoEncoder.cpp:

(Encoders::registerEncoder):
(webrtcVideoEncoderGetProperty):
(webrtcVideoEncoderSetBitrate):
(webrtcVideoEncoderSetEncoder):
(webrtcVideoEncoderSetFormat):
(webrtcVideoEncoderSetProperty):
(setBitrateKbitPerSec):
(setBitrateBitPerSec):
(webrtcVideoEncoderConstructed):
(webkit_webrtc_video_encoder_class_init):

  • platform/mediastream/libwebrtc/GStreamerVideoEncoder.h:
  • platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:

(WebCore::GStreamerVideoEncoderFactory::GStreamerVideoEncoderFactory):

Tools:

  • Scripts/webkitpy/style/checker.py: Move the GStreamer VideoEncoder to the list of custom

GStreamer elements complying with WebKit's coding style.

8:21 AM Changeset in webkit [274148] by Wenson Hsieh
  • 28 edits in trunk

[macOS] Add a way to trigger webpage translation via the context menu
https://bugs.webkit.org/show_bug.cgi?id=222953
<rdar://problem/73901967>

Reviewed by Devin Rousso.

Source/WebCore:

Introduce a WebCore enum for the new context menu item. Additionally, update Localizable.strings by re-running
Tools/Scripts/update-webkit-localizable-strings.

  • en.lproj/Localizable.strings:
  • page/ContextMenuContext.h:

(WebCore::ContextMenuContext::setSelectionBounds):
(WebCore::ContextMenuContext::selectionBounds const):

Add a new member to represent the text selection bounds in root view coordinates.

  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::contextMenuItemSelected):

Compute and set text selection bounds.

(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::checkOrEnableIfNeeded const):

  • platform/ContextMenuItem.cpp:

(WebCore::isValidContextMenuAction):

  • platform/ContextMenuItem.h:

Add the new enum value.

  • platform/LocalizedStrings.cpp:

(WebCore::truncatedStringForMenuItem):

Renamed this from truncatedStringForLookupMenuItem, since it's now used for this new translate menu item.

(WebCore::contextMenuItemTagLookUpInDictionary):
(WebCore::contextMenuItemTagTranslate):

Add a helper function to return the title for the new translate menu item, modeled after "Look Up".

(WebCore::truncatedStringForLookupMenuItem): Deleted.

  • platform/LocalizedStrings.h:

Source/WebKit:

Add support for the new context menu item in WebKit2. See below for more details.

  • Shared/API/c/WKContextMenuItemTypes.h:
  • Shared/API/c/WKSharedAPICast.h:

(WebKit::toAPI):
(WebKit::toImpl):

Add a C API value for the new WebCore enum.

  • Shared/ContextMenuContextData.cpp:

(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::encode const):
(WebKit::ContextMenuContextData::decode):

  • Shared/ContextMenuContextData.h:

(WebKit::ContextMenuContextData::selectionBounds const):

Add a rect, selectionBounds, to ContextMenuContextData that represents the rect of the current text
selection in root view coordinates.

  • UIProcess/API/Cocoa/WKMenuItemIdentifiers.mm:
  • UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h:
  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::canHandleContextMenuTranslation const):

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::canHandleContextMenuTranslation const):

Consult the class method to return whether or not the menu item should be present. If not, then we filter this
item out from the list of context menu items in WebContextMenuProxyMac below.

(WebKit::WebViewImpl::handleContextMenuTranslation):

Handle the translation action by using NSPopover to present an LTUITranslationViewController.

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

(WebKit::WebPageProxy::contextMenuItemSelected):

  • UIProcess/WebPageProxy.h:
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::canHandleContextMenuTranslation const):
(WebKit::PageClientImpl::handleContextMenuTranslation):

  • UIProcess/mac/WebContextMenuProxyMac.mm:

(WebKit::WebContextMenuProxyMac::getContextMenuFromItems):

Remove the translate menu item if we're already presented in the context of a popover, or if the system does not
support the feature (see WebViewImpl::canHandleContextMenuTranslation).

(WebKit::menuItemIdentifier):

Source/WebKitLegacy/mac:

Add (no-op) handling for the new enum value.

  • WebView/WebHTMLView.mm:

(toTag):

Tools:

Adjust an API test. This new enum value is now the new last valid item value.

  • TestWebKitAPI/Tests/WebCore/ContextMenuAction.cpp:

(TestWebKitAPI::TEST):

7:51 AM Changeset in webkit [274147] by graouts@webkit.org
  • 8 edits in trunk

Correctly blend column-width and column-count CSS properties
https://bugs.webkit.org/show_bug.cgi?id=222969

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add an extra 160 PASS results. We now pass all the column-width and column-count interpolation tests.

  • web-platform-tests/css/css-multicol/animation/column-count-interpolation-expected.txt:
  • web-platform-tests/css/css-multicol/animation/column-width-interpolation-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt:

Source/WebCore:

We used to simply blend column-width and column-count as float and unsigned short properties
with no minimum value and no accounting for the "auto" value which only blends discretely.

We generalize some of the code added for the z-index wrapper by creating a new AutoPropertyWrapper
which takes into two method arguments for the hasAuto() and setHasAuto() methods on RenderStyle
and an optional minimum value, which we set to 0 for column-width, 1 for column-count and don't
specify for z-index since it doesn't have a minimum value.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::AutoPropertyWrapper::AutoPropertyWrapper):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
(WebCore::ZIndexPropertyWrapper::ZIndexPropertyWrapper): Deleted.

7:10 AM Changeset in webkit [274146] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Suspend widget hierarchy updates while executing node insertion
https://bugs.webkit.org/show_bug.cgi?id=222719

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-03-09
Reviewed by Ryosuke Niwa.

  • dom/ContainerNode.cpp:

(WebCore::executeNodeInsertionWithScriptAssertion):

6:56 AM Changeset in webkit [274145] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

Increase resource load priority of async scripts from low to medium
https://bugs.webkit.org/show_bug.cgi?id=222966

Reviewed by Zalan Bujtas.

Low priority loads may be delayed during parsing. We want async script to be immediately available when parsing
completes so 'medium' is the appropriate priority

  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::load):

6:38 AM Changeset in webkit [274144] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[Multi-column] Adjust fragmented flow state of the out-of-flow descendants
https://bugs.webkit.org/show_bug.cgi?id=222958
<rdar://74865741>

Reviewed by Antti Koivisto.

When a block container's style change from positioned to non-positioned and it is part of a multi-column context,
we need to make sure that the out-of-flow positined descendants' flow state are updated accordingly (as
they may not be part of the multi-column context anymore).

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::adjustFragmentedFlowStateOnContainingBlockChangeIfNeeded):

4:05 AM Changeset in webkit [274143] by Chris Lord
  • 13 edits in trunk

Allow creation of a CSSFontSelector with a non-Document ScriptExecutionContext
https://bugs.webkit.org/show_bug.cgi?id=222735

Reviewed by Darin Adler.

Replace Document member of CSSFontSelector with a ScriptExecutionContext.
This also changes make_names.pl string header generation to allow for easier enumeration of font family strings.

No new tests as new behaviour is currently unused. Existing behaviour covered by existing tests.

  • bindings/scripts/StaticString.pm:

(GenerateStrings): Revert change from bug 222552

  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::CSSFontSelector):
(WebCore::m_version):
(WebCore::CSSFontSelector::fontFaceSet):
(WebCore::CSSFontSelector::addFontFaceRule):
(WebCore::CSSFontSelector::fontStyleUpdateNeeded):
(WebCore::CSSFontSelector::resolveGenericFamily):
(WebCore::CSSFontSelector::fontRangesForFamily):
(WebCore::CSSFontSelector::stopLoadingAndClearFonts):
(WebCore::CSSFontSelector::beginLoadingFontSoon):
(WebCore::CSSFontSelector::loadPendingFonts):
(WebCore::CSSFontSelector::fontLoadingTimerFired):
(WebCore::CSSFontSelector::fallbackFontCount):
(WebCore::CSSFontSelector::fallbackFontAt):

  • css/CSSFontSelector.h:
  • css/FontFaceSet.cpp:

(WebCore::FontFaceSet::create):
(WebCore::FontFaceSet::FontFaceSet):

  • css/FontFaceSet.h:
  • css/FontFaceSet.idl:
  • dom/Document.h:
  • dom/ScriptExecutionContext.h:
  • dom/make_names.pl:

(printNamesHeaderFile): Make global string data and names accessible via a Vector and add an enum of name indices.

  • platform/graphics/FontGenericFamilies.cpp:

(WebCore:: const):

  • platform/graphics/FontGenericFamilies.h:
3:20 AM Changeset in webkit [274142] by graouts@webkit.org
  • 9 edits in trunk

Select CSS properties animating as float should not allow negative values
https://bugs.webkit.org/show_bug.cgi?id=222912

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Add an extra 57 PASS results. We now pass all the outline-width interpolation tests.

  • web-platform-tests/css/css-backgrounds/animations/border-width-interpolation-expected.txt:
  • web-platform-tests/css/css-multicol/animation/column-width-interpolation-expected.txt:
  • web-platform-tests/css/css-ui/animation/outline-width-composition-expected.txt:
  • web-platform-tests/css/css-ui/animation/outline-width-interpolation-expected.txt:

Source/WebCore:

The properties border-width, column-width, outline-width, perspective,
flex-grow and flex-shrink do not allow negative values. We create a new
animation wrapper specifically for these properties.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::NonNegativeFloatPropertyWrapper::NonNegativeFloatPropertyWrapper):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

LayoutTests:

Mark WPT progressions for a platform-specific result.

  • platform/ios/imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-width-interpolation-expected.txt:
12:53 AM Changeset in webkit [274141] by commit-queue@webkit.org
  • 6 edits in trunk

WebGL2: Red flickering when using copyTexImage2D()
https://bugs.webkit.org/show_bug.cgi?id=222790

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-03-09
Reviewed by Kenneth Russell.

Source/WebCore:

Reading non-full FBO rectangle with copyTexImage2D would
cause invalid operation on WebGL2.
This is probably due to misunderstanding between what was old
GL desktop + GLES mobile backends
"isGLES2Compatible() == runs on Desktop GL"
vs new ANGLE backend
"isGLES2Compatible() == !m_isForWebGL2".

Add testing to fast/canvas/webgl/copy-tex-image-and-sub-image-2d.html.

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLOpenGL::resolveMultisamplingIfNecessary):
Use BlitFramebuffer for WebGL2 non-full framebuffer copyTexImage2D calls.
On WebGL we use BlitFramebufferANGLE as before.

LayoutTests:

  • fast/canvas/webgl/copy-tex-image-and-sub-image-2d-expected.txt:
  • fast/canvas/webgl/copy-tex-image-and-sub-image-2d.html:

Change the test to test WebGL2 and copyTexImage2D with non-full framebuffer
rectangles.

  • fast/canvas/webgl/resources/webgl-test.js:

(create3DContext):
Fix logic error when trying to create WebGL2 context.

12:26 AM Changeset in webkit [274140] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Remove references to unimplemented and deprecated scroll-snap properties
https://bugs.webkit.org/show_bug.cgi?id=221746

Patch by Martin Robinson <mrobinson@igalia.com> on 2021-03-09
Reviewed by Simon Fraser.

No new tests. This should not change behavior in any way.

  • css/CSSProperties.json: Remove references to deprecated and unimplemented CSS properties.

Mar 8, 2021:

11:57 PM Changeset in webkit [274139] by graouts@webkit.org
  • 5 edits in trunk/LayoutTests

Unreviewed. Update border-width interpolation test after WPT PR #27934.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-backgrounds/animations/border-width-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/border-width-interpolation.html:

LayoutTests:

  • platform/ios/imported/w3c/web-platform-tests/css/css-backgrounds/animations/border-width-interpolation-expected.txt:
11:19 PM Changeset in webkit [274138] by youenn@apple.com
  • 3 edits in trunk/Source/WebKit

Allow access to more cmio services from Web/GPU processes
https://bugs.webkit.org/show_bug.cgi?id=222465

Reviewed by Per Arne Vollan.

These new services are used when getting camera access.
Manually tested.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
9:57 PM Changeset in webkit [274137] by Simon Fraser
  • 4 edits
    2 adds in trunk

REGRESSION(r274025-r273811): Crash under RenderLayerBacking::updateGeometry()
https://bugs.webkit.org/show_bug.cgi?id=222021
rdar://74414963

Reviewed by Zalan Bujtas.

When a RenderLayer gains or loses its scrollable area, we have to set the dirty
bit on the RenderLayer to ensure that RenderLayerBacking::updateConfiguration() runs,
which updates compositing layers for scrolling.

Source/WebCore:

Also add to logging the scrollableArea if present.

Test: fast/layers/remove-scrollable-area-crash.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects const):
(WebCore::outputPaintOrderTreeRecursive):

  • rendering/RenderTreeAsText.cpp:

LayoutTests:

  • fast/layers/remove-scrollable-area-crash.html: Added.
9:41 PM Changeset in webkit [274136] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebCore

<model>'s inner compositing layer is re-created every time it moves
https://bugs.webkit.org/show_bug.cgi?id=222950

Reviewed by Simon Fraser.

No new tests, just a performance optimization.

  • Modules/model-element/HTMLModelElement.cpp:

(WebCore::HTMLModelElement::model const):
(WebCore::HTMLModelElement::notifyFinished):

  • Modules/model-element/HTMLModelElement.h:

It turns out that we need Model's identity to be stable in order to make
the early return in setContentsToModel (called every time the layer's properties
change from RenderLayerBacking::updateConfiguration) work, otherwise
we re-create the inner layer over and over again.

9:40 PM Changeset in webkit [274135] by stephan.szabo@sony.com
  • 5 edits in trunk/Tools

[PlayStation] Various small fixes for TestWTF/TestWebKit tests on PlayStation
https://bugs.webkit.org/show_bug.cgi?id=222931

Reviewed by Don Olmstead.

  • TestWebKitAPI/PlatformPlayStation.cmake: Link to API for process termination
  • TestWebKitAPI/Tests/WTF/DataMutex.cpp: Turn off test using ASSERT_DEATH
  • TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp: Use PlayStation api to kill webprocess for this test
  • TestWebKitAPI/playstation/PlatformWebViewPlayStation.cpp: Set size in resizeTo
9:24 PM Changeset in webkit [274134] by rniwa@webkit.org
  • 3 edits in trunk/Websites/perf.webkit.org

[perf dashboard] Use async/await in tests for TimeSeriesChart and InteractiveTimeSeriesChart
https://bugs.webkit.org/show_bug.cgi?id=222876

Reviewed by Sam Weinig.

Use async/await instead of chaining promises manually in the browser tests for
TimeSeriesChart and InteractiveTimeSeriesChart for better readability.

  • browser-tests/interactive-time-series-chart-tests.js:
  • browser-tests/time-series-chart-tests.js:
8:17 PM Changeset in webkit [274133] by Russell Epstein
  • 1 copy in tags/Safari-611.1.21.1.7

Tag Safari-611.1.21.1.7.

8:14 PM Changeset in webkit [274132] by Russell Epstein
  • 8 edits in branches/safari-611.1.21.1-branch/Source

Versioning.

WebKit-7611.1.21.1.7

7:41 PM Changeset in webkit [274131] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Crash in in ReplaceSelectionCommand::mergeEndIfNeeded()
https://bugs.webkit.org/show_bug.cgi?id=222941

Patch by Julian Gonzalez <julian_a_gonzalez@apple.com> on 2021-03-08
Reviewed by Ryosuke Niwa.

Make a copy of Ref<HTMLBRElement> when inserting before start of paragraph.

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::mergeEndIfNeeded):

7:40 PM Changeset in webkit [274130] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

Simplify CallbackAggregator in WebsiteDataStore::fetchDataAndApply()
https://bugs.webkit.org/show_bug.cgi?id=222937

Reviewed by Darin Adler.

Simplify CallbackAggregator in WebsiteDataStore::fetchDataAndApply():

  1. Get rid of removePendingCallback() / addPendingCallback() / callIfNeeded() and instead rely on ref counting to determine when we need to call the apply function.
  2. Replaced removePendingCallback() with addWebsiteData() since it takes a WebsiteData as an object and make it so that it can be called on any thread for convenience.
  • Shared/WebsiteData/WebsiteData.cpp:

(WebKit::WebsiteData::isolatedCopy const):
(WebKit::WebsiteData::Entry::isolatedCopy const):

  • Shared/WebsiteData/WebsiteData.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::fetchDataAndApply):

7:07 PM Changeset in webkit [274129] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Regression(r273875): Potential over-release in WKRemoteObjectCoder's decodeObjCObject()
https://bugs.webkit.org/show_bug.cgi?id=222954
<rdar://75163359>

Reviewed by Darin Adler.

r273875 added an adoptNS() for the result of [allocation initWithCoder:decoder]. This would be
fine in general, except that we call awakeAfterUsingCoder on the result right after. As per the
awakeAfterUsingCoder documentation [1], it may return the receiver or a new object. When it
returns a new object, it takes care of releasing the receiver. This is an issue for us here since
we were holding the receiver in a smart pointer.

[1] https://developer.apple.com/documentation/objectivec/nsobject/1417074-awakeafterusingcoder

  • Shared/API/Cocoa/WKRemoteObjectCoder.mm:

(decodeObjCObject):

6:44 PM Changeset in webkit [274128] by stephan.szabo@sony.com
  • 3 edits in trunk/Tools

TestWebKitAPI WebKit.HitTestResultNodeHandle does not complete with ENABLE_CONTEXT_MENUS=OFF
https://bugs.webkit.org/show_bug.cgi?id=222938

Reviewed by Ross Kirsling.

Make the test only build with context menus are supported.

  • TestWebKitAPI/Tests/WebKit/HitTestResultNodeHandle.cpp:
  • TestWebKitAPI/Tests/WebKit/HitTestResultNodeHandle_Bundle.cpp:
6:10 PM Changeset in webkit [274127] by Jonathan Bedard
  • 5 edits in trunk/Tools

[webkitscmpy] Isolate dateutil imports
https://bugs.webkit.org/show_bug.cgi?id=222946
<rdar://problem/75191226>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/svn.py:

(Svn.request): Isolate dateutil imports.

5:49 PM Changeset in webkit [274126] by timothy_horton@apple.com
  • 2 edits in trunk/LayoutTests

REGRESSION (r274033): [ macOS/iOS ] model-element/model-element-ready-load-aborted.html is text failing
https://bugs.webkit.org/show_bug.cgi?id=222917
<rdar://problem/75173628>

Reviewed by Wenson Hsieh.

  • model-element/model-element-ready-load-aborted.html:

Fix this test; it could flakily fail if the load completed before unparenting the element,
which became more common after r274033 added a test that ran first and cached the resource.

Set the source just before unparenting to resolve this race.

5:12 PM Changeset in webkit [274125] by Alan Coon
  • 1 copy in tags/Safari-611.1.21.0.5

Tag Safari-611.1.21.0.5.

5:11 PM Changeset in webkit [274124] by Alan Coon
  • 1 delete in tags/Safari-611.1.21.0.5

Delete tag.

5:06 PM Changeset in webkit [274123] by Alan Coon
  • 1 copy in tags/Safari-611.1.21.1.6

Tag Safari-611.1.21.1.6.

4:55 PM Changeset in webkit [274122] by Andres Gonzalez
  • 6 edits in trunk

Enable accessibility/aria-invalid.html test on iOS.
https://bugs.webkit.org/show_bug.cgi?id=222942
<rdar://problem/75188832>

Reviewed by Chris Fleizach.

Tools:

Modified AccessibilityUIElement::stringAttributeValue to handle invalid
status, so that test JS can query for it.

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::stringAttributeValue):

LayoutTests:

Enabled this test on iOS.
Minor change in the order in which the invalid notification is logged.

  • accessibility/aria-invalid-expected.txt:
  • accessibility/aria-invalid.html:
  • platform/ios/TestExpectations:
4:45 PM Changeset in webkit [274121] by Alan Coon
  • 1 copy in tags/Safari-611.1.21.0.5

Create tag Safari-611.1.21.0.5.

4:33 PM Changeset in webkit [274120] by Adrian Perez de Castro
  • 11 edits in releases/WebKitGTK/webkit-2.32/Source

Unreviewed non-unified build fixes.

Source/JavaScriptCore:

  • wasm/WasmGlobal.h: Add missing SlotVisitorMacros.h header.
  • wasm/WasmTable.h: Ditto.

Source/WebCore:

  • CMakeLists.txt: Build ScrollingMomentumCalculator.cpp in the test support library.
  • dom/Event.cpp: Add missing TouchList.h header.
  • dom/EventContext.cpp: Add missing EventNames.h header.
  • page/scrolling/ScrollSnapOffsetsInfo.cpp: Add missing Logging.h header.
  • platform/network/soup/SoupNetworkSession.cpp: Add missing SoupVersioning.h header.
  • rendering/RenderLayerModelObject.cpp: Add missing RenderLayerScrollableArea.h header.
  • rendering/RenderModel.cpp: Move inclusion of "config.h" before ENABLE() check.
4:33 PM Changeset in webkit [274119] by Adrian Perez de Castro
  • 3 edits in releases/WebKitGTK/webkit-2.32/Source

Merge r272721 - Non unified build fixes for mid February 2021

https://bugs.webkit.org/show_bug.cgi?id=221749

Reviewed by Youenn Fablet.

Source/WebCore:

  • CMakeLists.txt:
  • Modules/mediastream/SFrameUtils.cpp:
  • Modules/mediastream/STUNMessageParsing.h:
  • bindings/js/WebCoreBuiltinNames.h:
  • dom/EventTargetFactory.in:
  • inspector/InspectorFrontendAPIDispatcher.cpp:

(WebCore::InspectorFrontendAPIDispatcher::evaluateOrQueueExpression):

  • workers/DedicatedWorkerGlobalScope.cpp:
  • workers/Worker.cpp:

Source/WebKit:

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:
  • GPUProcess/media/RemoteCDMInstanceProxy.cpp:
4:33 PM Changeset in webkit [274118] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.32/Tools

Merge r273551 - Unreviewed, WPE build fix after SDK r273544 deployment

  • TestWebKitAPI/PlatformWPE.cmake: GLib include path was missing in the TestJavaScriptCore

build.

4:15 PM Changeset in webkit [274117] by jer.noble@apple.com
  • 9 edits in trunk/Source/WebKit

[Cocoa][GPUP] Enable WebM/Vorbis/Opus in the GPU process
https://bugs.webkit.org/show_bug.cgi?id=222926

Reviewed by Eric Carlson.

The first time a GPUProcessProxy is created, and whenever a new WebPageProxy is created,
The GPUProcessProxy will query all existing WebPageGroups and their WebPreferences. If
any group enables "Media in the GPU Process", and also WebM, Vorbis, or Opus, those features
which are enabled will also be enabled inside the GPU process.

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::setWebMParserEnabled):
(WebKit::GPUProcess::setWebMFormatReaderEnabled):
(WebKit::GPUProcess::setOpusDecoderEnabled):
(WebKit::GPUProcess::setVorbisDecoderEnabled):

  • GPUProcess/GPUProcess.h:
  • GPUProcess/GPUProcess.messages.in:
  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::getOrCreate):
(WebKit::GPUProcessProxy::updatePreferences):

  • UIProcess/GPU/GPUProcessProxy.h:
  • UIProcess/WebPageGroup.cpp:

(WebKit::WebPageGroup::forEach):

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

(WebKit::WebProcessPool::createWebPage):

4:03 PM Changeset in webkit [274116] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests/imported/w3c

Unreviewed, reverting r274071.
https://bugs.webkit.org/show_bug.cgi?id=222951

Broke a test

Reverted changeset:

https://trac.webkit.org/changeset/274071

4:00 PM Changeset in webkit [274115] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Fix unified build due to missing header include.
https://bugs.webkit.org/show_bug.cgi?id=222782
<rdar://problem/75081020>

Patch by Jean-Yves Avenard <Jean-Yves Avenard> on 2021-03-08
Reviewed by Wenson Hsieh.

No change in functionality.

  • Modules/model-element/HTMLModelElement.cpp:

Add #include.

3:35 PM Changeset in webkit [274114] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Make Color threadsafe
https://bugs.webkit.org/show_bug.cgi?id=222886

Reviewed by Darin Adler.

Color is mostly threadsafe already and can really be used as an immutable
value type in most cases. Let's make that completely true by making the out
of line component case ThreadSafeRefCounted.

  • platform/graphics/Color.h:
3:21 PM Changeset in webkit [274113] by mark.lam@apple.com
  • 2 edits in trunk/Tools

JSC stress tests' $testSpecificRequiredOptions should be appended last.
https://bugs.webkit.org/show_bug.cgi?id=222936

Reviewed by Keith Miller.

This allows each test to get the last say on what options it needs.

  • Scripts/run-jsc-stress-tests:
3:06 PM Changeset in webkit [274112] by Patrick Angle
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION (r267038): Inspector fails to show any details about animations/transitions in the timeline
https://bugs.webkit.org/show_bug.cgi?id=222921

Reviewed by Devin Rousso.

Timeline views should always be updated with the time from the overview, but r267038 erroneously prevented the
end time from being updated while recording was stopping and prevented the current time from being updated while
recording was stopping or inactive, which meant after a recording finished (Stopping -> Inactive) the timeline
views would not be updated with the current time. Because _updateTimelineViewTimes can be called when a
different content view is selected, it was incorrect to gate setting these values based on the recording state.
The check for not being in the inactive state was particularly problematic as it is quite common that a
developer would open a specific timelime view for the first time after recording finishes, at which point all
values should be populated regardless of recording state. The source of the time values continues to be handled
in such a way as to prevent values from continuously jumping around as a recording is stopped but data continues
to arrive.

  • UserInterface/Views/TimelineRecordingContentView.js:

(WI.TimelineRecordingContentView.prototype._updateTimes):

  • Drive-by spelling correction.

(WI.TimelineRecordingContentView.prototype._updateTimelineViewTimes):

  • Remove checks for the current recording state.
2:47 PM Changeset in webkit [274111] by weinig@apple.com
  • 6 edits in trunk

Add preference reseting to WebKitLegacy Windows to simplify testing reset
https://bugs.webkit.org/show_bug.cgi?id=222865

Reviewed by Brent Fulgham.

Source/WebKitLegacy/win:

Add resetForTesting() function to allow easy reseting of all preferences
for testing, matching functionality added to Cocoa WebKitLegacy.

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

(WebPreferences::resetForTesting):

  • WebPreferences.h:

Tools:

  • DumpRenderTree/win/DumpRenderTree.cpp:

(resetWebPreferencesToConsistentValues):
Call the new resetForTesting() method to ensure all values are reset back
to defaults for each test without have to explicitly list them.

2:41 PM Changeset in webkit [274110] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r269359): TypeError: undefined is not an object (evaluating 'listenersForEventType')
https://bugs.webkit.org/show_bug.cgi?id=222940

Reviewed by BJ Burg.

  • UserInterface/Models/JavaScriptBreakpoint.js:

(WI.JavaScriptBreakpoint.prototype.get special):
The existing logic for get special checks if this is one of the specially saved objects
on WI.debuggerManager (e.g. assertionFailuresBreakpoint). When deleting a breakpoint,
WI.debuggerManager has already cleared out it's previously saved reference to that object,
so it won't match. Use the existing _isSpecial (which looks at the _sourceCodeLocation)
as a backup in case this doesn't directly match any of the saved objects.

2:39 PM Changeset in webkit [274109] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

REGRESSION (r273541): Payloads requiring NSURL in serialization fail
https://bugs.webkit.org/show_bug.cgi?id=222856
<rdar://problem/75036452>

Reviewed by Darin Adler.

In Bug 222145 I converted serialization of CFURLRequest to NSURLRequest. As part of that change,
I used a new encoder (WKSecureCodingURLWrapper) to wrap the NSURL to ensure proper handling of
encoded URLs.

The WKSecureCodingURLWrapper should have been declared as a subclass of NSURL, so that NSSecureCoding
would respect it as a valid way of serializing an NSURL.

This patch corrects that oversight.

  • Shared/Cocoa/ArgumentCodersCocoa.mm:
2:22 PM Changeset in webkit [274108] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews] Remove old Python 2 related code
https://bugs.webkit.org/show_bug.cgi?id=222933

Reviewed by Dewei Zhu.

  • CISupport/ews-build/steps.py:
  • CISupport/build-webkit-org/steps.py:
2:19 PM Changeset in webkit [274107] by Alan Coon
  • 5 edits in branches/safari-611.1.21.1-branch

Cherry-pick r273997. rdar://problem/75180339

Regression(r268097): WKWebView.URL is nil in the processDidTerminate delegate
https://bugs.webkit.org/show_bug.cgi?id=222809

Reviewed by Michael Catanzaro.

Source/WebKit:

There was a PageLoadState::Transaction in resetStateAfterProcessTermination() that
was previously making sure we would not clear the WebView's URL before calling the
processDidTerminate client delegate. Now that we call the client delegate in a
separate function (WebPageProxy::dispatchProcessDidTerminate), we need to make move
the PageLoadState::Transaction to the caller in
WebProcessProxy::processDidTerminateOrFailedToLaunch(), so that its scope covers
both resetStateAfterProcessTermination() & dispatchProcessDidTerminate() calls.

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::resetStateAfterProcessTermination):
  • UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm: (TEST):

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

2:10 PM Changeset in webkit [274106] by BJ Burg
  • 3 edits in trunk/Source/WebKit

[Cocoa] Changes in WebInspectorUI's appearance don't propagate to .effectiveAppearance while docked
https://bugs.webkit.org/show_bug.cgi?id=222925
<rdar://71201454>

Reviewed by Devin Rousso.

Update the appearance property for the underlying webView in addition to
setting it for the inspector NSWindow (undocked only).

This fix is needed for both local and remote inspector code paths.

  • UIProcess/Inspector/mac/RemoteWebInspectorProxyMac.mm:

(WebKit::RemoteWebInspectorProxy::platformSetForcedAppearance):

  • UIProcess/Inspector/mac/WebInspectorProxyMac.mm:

(WebKit::WebInspectorProxy::applyForcedAppearance):

2:09 PM Changeset in webkit [274105] by Ruben Turcios
  • 5 edits in branches/safari-611.1.21.0-branch

Cherry-pick r273997. rdar://problem/75180327

Regression(r268097): WKWebView.URL is nil in the processDidTerminate delegate
https://bugs.webkit.org/show_bug.cgi?id=222809

Reviewed by Michael Catanzaro.

Source/WebKit:

There was a PageLoadState::Transaction in resetStateAfterProcessTermination() that
was previously making sure we would not clear the WebView's URL before calling the
processDidTerminate client delegate. Now that we call the client delegate in a
separate function (WebPageProxy::dispatchProcessDidTerminate), we need to make move
the PageLoadState::Transaction to the caller in
WebProcessProxy::processDidTerminateOrFailedToLaunch(), so that its scope covers
both resetStateAfterProcessTermination() & dispatchProcessDidTerminate() calls.

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::resetStateAfterProcessTermination):
  • UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm: (TEST):

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

2:09 PM Changeset in webkit [274104] by Ruben Turcios
  • 2 edits in branches/safari-611.1.21.0-branch/Source/WebKit

Cherry-pick r274051. rdar://problem/75178467

[WebAuthn] Expand WebAuthn Process's sandbox profile on iOS
https://bugs.webkit.org/show_bug.cgi?id=222858
<rdar://problem/74772012>

Reviewed by Brent Fulgham.

Allows WebAuthn process to use AAA again.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb:

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

2:09 PM Changeset in webkit [274103] by Ruben Turcios
  • 2 edits in branches/safari-611.1.21.0-branch/Source/WebCore

Cherry-pick r273894. rdar://problem/75178487

AVAudioSessionCaptureDeviceManager::retrieveAudioSessionCaptureDevices is unnecessarily creating a NSArray twice
https://bugs.webkit.org/show_bug.cgi?id=222732

Reviewed by Eric Carlson.

Before the patch, [m_audioSession availableInputs] was called twice.
This creates two NSArray which is not create from a memory standpoint.
There is also the risk that the two NSArrays have two different size, in which case Vector::uncheckedAppend would fail.

Cannot be easily tested, no observable change expected.

  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm: (WebCore::AVAudioSessionCaptureDeviceManager::retrieveAudioSessionCaptureDevices const):

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

2:03 PM Changeset in webkit [274102] by sbarati@apple.com
  • 4 edits
    2 adds in trunk

Using an undeclared private field inside eval shouldn't crash
https://bugs.webkit.org/show_bug.cgi?id=222834
<rdar://75035388>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/declared-private-field-in-eval.js: Added.
  • stress/undeclared-private-field-in-eval.js: Added.

Source/JavaScriptCore:

The private methods patch regressed our behavior when using undeclared private
fields or methods from an inner eval inside a class. That patch made us crash.
This patch aligns us with the spec to throw a Syntax Error during eval parsing.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::parseMemberExpression):

  • parser/Parser.h:

(JSC::Parser<LexerType>::parse):

1:47 PM Changeset in webkit [274101] by Darin Adler
  • 28 edits
    1 delete in trunk

Fix inspector viewing of canvas save/restore stack, and tighten and simplify CanvasRenderingContext2DBase
https://bugs.webkit.org/show_bug.cgi?id=222532

Reviewed by Sam Weinig.

Source/WebCore:

The inspector code is the only client that looks into the graphics context and gets at
saved states in the save/restore state stack. It was doing so in an inconsistent way, and
in may cases ignoring the state in the stack and simply using the current state. This fixes
almost everything to actually use the state stack.

Separately did some related refactoring. This includes a bit more inlining and removing a
class that was being used in the interface to Path where we can more simply use a Function<>.

  • WebCore.xcodeproj/project.pbxproj: Removed StrokeStyleApplier.h.
  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::setFont): Use a global AtomString for the default font
family name so we don't potentially create a new one every time we call this function.
Call usesCSSCompatibilityParseMode so we don't have to get at private member
m_usesCSSCompatibilityParseMode.
(WebCore::CanvasRenderingContext2D::measureText): Call defaultFontFamily(), which returns
an AtomString so we don't have to look it up every time this function is called.
(WebCore::CanvasRenderingContext2D::drawTextInternal): Removed unnecessary allocation of a
TextMetrics object, which we don't use and then deallocate. Update since normalizedSpaces
now uses a return value instead of an in/out argument. Also use && instead of ?: and
update for name change of canDrawTextWithParams.

  • html/canvas/CanvasRenderingContext2D.h: Removed unneeded header includes, unneeded

override of webkitBackingStorePixelRatio and made the override of is2d private, since
no one should need to call it on a CanvasRenderingContext2D.

  • html/canvas/CanvasRenderingContext2DBase.cpp: Use constexpr for a file-local constant.

(WebCore::CanvasStrokeStyleApplier::CanvasStrokeStyleApplier): Deleted this entire class,
since we now use a function instead of an object.
(WebCore::toCanvasLineCap): Moved these functions to the top of the file since they are
now used in the State class.
(WebCore::fromCanvasLineCap): Ditto.
(WebCore::toCanvasLineJoin): Ditto.
(WebCore::fromCanvasLineJoin): Ditto.
(WebCore::toCanvasTextAlign): Ditto.
(WebCore::fromCanvasTextAlign): Ditto.
(WebCore::toCanvasTextBaseline): Ditto.
(WebCore::fromCanvasTextBaseline): Ditto.
(WebCore::CanvasRenderingContext2DBase::State::operator=): Deleted the copy constructor
and assignment operator since they are the default ones.
(WebCore::CanvasRenderingContext2DBase::State::fontString const): Added. Moved the code
here from the function named font, making it possible to use this in the inspector code.
(WebCore::CanvasRenderingContext2DBase::State::canvasLineCap const): Ditto.
(WebCore::CanvasRenderingContext2DBase::State::canvasLineJoin const): Ditto.
(WebCore::CanvasRenderingContext2DBase::State::canvasTextAlign const): Ditto.
(WebCore::CanvasRenderingContext2DBase::State::canvasTextBaseline const): Ditto.
(WebCore::CanvasRenderingContext2DBase::State::globalCompositeOperationString const): Ditto.
(WebCore::CanvasRenderingContext2DBase::State::shadowColorString const): Ditto.
(WebCore::CanvasRenderingContext2DBase::lineWidth const): Moved to the header.
(WebCore::CanvasRenderingContext2DBase::lineCap const): Ditto.
(WebCore::CanvasRenderingContext2DBase::lineJoin const): Ditto.
(WebCore::CanvasRenderingContext2DBase::miterLimit const): Ditto.
(WebCore::CanvasRenderingContext2DBase::shadowOffsetX const): Ditto.
(WebCore::CanvasRenderingContext2DBase::shadowOffsetY const): Ditto.
(WebCore::CanvasRenderingContext2DBase::shadowBlur const): Ditto.
(WebCore::CanvasRenderingContext2DBase::shadowColor const): Ditto.
(WebCore::CanvasRenderingContext2DBase::getLineDash const): Ditto.
(WebCore::CanvasRenderingContext2DBase::lineDashOffset const): Ditto.
(WebCore::CanvasRenderingContext2DBase::globalAlpha const): Ditto.
(WebCore::CanvasRenderingContext2DBase::globalCompositeOperation const): Ditto.
(WebCore::isFullCanvasCompositeMode): Made this file local, no longer a member function.
(WebCore::CanvasRenderingContext2DBase::isPointInPathInternal): Tweak style to match
the following function.
(WebCore::CanvasRenderingContext2DBase::isPointInStrokeInternal): Use a lambda for the
stroke style applier so we don't need a class.
(WebCore::CanvasRenderingContext2DBase::didDrawEntireCanvas): Updated since didDraw
now takes an OptionSet.
(WebCore::CanvasRenderingContext2DBase::didDraw): Updated to take an OptionSet.
(WebCore::CanvasRenderingContext2DBase::getImageData const): Use a single makeString
instead of a StringBuilder for an error message.
(WebCore::CanvasRenderingContext2DBase::putImageData): Updated since didDraw now
takes an OptionSet.
(WebCore::CanvasRenderingContext2DBase::imageSmoothingQuality const): Moved to the header.
(WebCore::CanvasRenderingContext2DBase::imageSmoothingEnabled const): Ditto.
(WebCore::CanvasRenderingContext2DBase::font const): Ditto. The bulk of the function is
now in CanvasRenderingContext2DBase::State::fontString.
(WebCore::CanvasRenderingContext2DBase::textAlign const): Deleted.
(WebCore::CanvasRenderingContext2DBase::textBaseline const): Deleted.
(WebCore::CanvasRenderingContext2DBase::canDrawText): Renamed from canDrawTextWithParams,
since the fact that a function has parameters doesn't need to be part of its name.
(WebCore::CanvasRenderingContext2DBase::normalizeSpaces): Use a return value instead of
an in/out argument for better clarity. This also matches the needs of all the call sites.
(WebCore::CanvasRenderingContext2DBase::drawText): Updated for changes to canDrawText
and normalizeSpaces.
(WebCore::CanvasRenderingContext2DBase::measureTextInternal): Ditto.

  • html/canvas/CanvasRenderingContext2DBase.h: Removed unneeded forward declarations.

Made the constructor protected. Moved the code for many simple getters here so they
can be inlined. The main call site is the JavaScript bindings. Removed unused getLineCap
and getLineJoin functions. Made the webkitBackingStorePixelRatio function static and
constexpr. Removed unused usesDisplayListDrawing function. Marked the FontProxy
class final. Removed the explicit copy constructor and assignment operator from the State
struct: letting the compiler generate it is better for our purposes. Made the state
function protected. Made most formerly-protected members private instead, since there
is no need for derived classes to use them. Made the enumeration CanvasDidDrawOption
into an enum class named DidDrawOption and use it with OptionSet instead of passing it
as an unsigned. Marked hasInvertibleTransform final instead of override.

  • html/canvas/OffscreenCanvasRenderingContext2D.cpp:

(WebCore::OffscreenCanvasRenderingContext2D::setFont): Call usesCSSCompatibilityParseMode
so we don't have to get at private member m_usesCSSCompatibilityParseMode.

  • html/canvas/OffscreenCanvasRenderingContext2D.h: Made isOffscreen2d private.
  • html/canvas/PaintRenderingContext2D.h: Made isPaint private.
  • inspector/InspectorCanvas.cpp:

(WebCore::InspectorCanvas::buildInitialState): When iterating the state stack, do not
get anything directly from the context, since it will give the value for the current
state, not the stack element we are iterating. Added a FIXME for the one case where
this was not easy to fix, "setPath", and left it broken as before.

  • platform/graphics/ImageBufferBackend.cpp:

(WebCore::ImageBufferBackend::getImageData const): Removed unneeded null check for
the data. ImageData::create will return nullptr, not an object with nullptr for data.

  • platform/graphics/Path.h: Use Function<void(GraphicsContext&)> instead of

StrkeStyleApplier.

  • platform/graphics/StrokeStyleApplier.h: Removed.
  • platform/graphics/cairo/PathCairo.cpp:

(WebCore::Path::strokeBoundingRect const): Use Function<void(GraphicsContext&)>.
(WebCore::Path::strokeContains const): Ditto.

  • platform/graphics/cg/PathCG.cpp:

(WebCore::Path::strokeContains const): Ditto.
(WebCore::Path::strokeBoundingRect const): Ditto.

  • platform/graphics/win/PathDirect2D.cpp:

(WebCore::Path::strokeContains const): Ditto.
(WebCore::Path::strokeBoundingRect const): Ditto.

  • rendering/svg/RenderSVGResourceGradient.cpp:

(WebCore::RenderSVGResourceGradient::applyResource): Pass a reference to
SVGRenderSupport::applyStrokeStyleToContext instead of a pointer.

  • rendering/svg/RenderSVGResourcePattern.cpp:

(WebCore::RenderSVGResourcePattern::applyResource): Ditto.

  • rendering/svg/RenderSVGResourceSolidColor.cpp:

(WebCore::RenderSVGResourceSolidColor::applyResource): Ditto.

  • rendering/svg/RenderSVGShape.cpp:

(WebCore::RenderSVGShape::shapeDependentStrokeContains): Use a lambda instead of
a StrokeStyleApplier object when calling strokeContainer.
(WebCore::RenderSVGShape::calculateStrokeBoundingBox const): Use a lambda instead
of a StrokeStyleApplier object when calling strokeBoundingRect.

  • rendering/svg/SVGRenderSupport.cpp:

(WebCore::SVGRenderSupport::applyStrokeStyleToContext): Take a reference rather
than a pointer.

  • rendering/svg/SVGRenderSupport.h: Updated for the above.

LayoutTests:

  • inspector/canvas/recording-2d-frameCount-expected.txt: Update since the state stack value of

the direction property is now correctly saved.

  • inspector/canvas/recording-2d-full-expected.txt: Ditto.
  • inspector/canvas/recording-2d-memoryLimit-expected.txt: Ditto.
  • inspector/canvas/recording-2d-saves-expected.txt: Updated.
  • inspector/canvas/recording-2d-saves.html: Added tests of setting all the properties

that the inspector canvas state machinery serializes, rather than just testing fillStyle.

  • inspector/canvas/resources/recording-2d.js:

(performSavePreActions.saveAndSet): Ditto.
(performSavePreActions): Ditto.

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

[macCatalyst] Assertion Failed: this.visible in _pinchGestureRecognizerStateDidChange
https://bugs.webkit.org/show_bug.cgi?id=222927
<rdar://problem/75178415>

Reviewed by Eric Carlson.

  • Modules/modern-media-controls/controls/ios-inline-media-controls.js:

(IOSInlineMediaControls.prototype.gestureRecognizerStateDidChange):
(IOSInlineMediaControls.prototype._pinchGestureRecognizerStateDidChange): Drive-by: Rename for clarity.

1:12 PM Changeset in webkit [274099] by commit-queue@webkit.org
  • 5 edits
    6 adds in trunk

Fix replaced element definiteness as a grid-item
https://bugs.webkit.org/show_bug.cgi?id=221337

Patch by Ziran Sun <Ziran Sun> on 2021-03-08
Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

The test is imported from WPT.

  • web-platform-tests/css/css-grid/grid-items/percentage-size-indefinite-replaced-expected.html: Added.
  • web-platform-tests/css/css-grid/grid-items/percentage-size-indefinite-replaced.html: Added.
  • web-platform-tests/css/css-grid/grid-item-percentage-quirk-001-expected.html: Added.
  • web-platform-tests/css/css-grid/grid-item-percentage-quirk-001.html: Added.
  • web-platform-tests/css/css-grid/grid-item-percentage-quirk-002-expected.html: Added.
  • web-platform-tests/css/css-grid/grid-item-percentage-quirk-002.html: Added.

Source/WebCore:

When resolving indefinite percentage sizes against an intrinsic size for replaced grid item, if 'height'
has a computed value of 'auto', and the element has an intrinsic ratio then the used value of 'height'is:
(used width) / (intrinsic ratio) according to http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height
(10.6.2 Inline, replaced elements).

This changes makes RenderReplaced::hasReplacedLogicalHeight to return false when a replaced grid-item
has an indefinite containing-block override logical-height. This is to make sure
RenderReplaced::computeReplacedLogicalHeight() handles cases described correctly.

It is an import of chromium CL at https://chromium-review.googlesource.com/c/chromium/src/+/2562558
This change only picks parts that is applicable for WebKit from the chromium CL. It also fix test
css/css-grid/grid-item-percentage-quirk-001.html in WPT.

Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/percentage-size-indefinite-replaced.html
Test: imported/w3c/web-platform-tests/css/css-grid/grid-item-percentage-quirk-001.html
Test: imported/w3c/web-platform-tests/css/css-grid/grid-item-percentage-quirk-002.html

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight const):

1:12 PM Changeset in webkit [274098] by Ryan Haddad
  • 12 edits in trunk/Source/WebCore

Unreviewed, reverting r274069.

Caused an assertion failure with
TestWebKitAPI.DocumentOrder.Positions

Reverted changeset:

"Allow creation of a CSSFontSelector with a non-Document
ScriptExecutionContext"
https://bugs.webkit.org/show_bug.cgi?id=222735
https://commits.webkit.org/r274069

1:09 PM Changeset in webkit [274097] by Ryan Haddad
  • 2 edits in trunk/Tools

Move WebGL test bot to Big Sur
https://bugs.webkit.org/show_bug.cgi?id=222501

Unreviewed infrastructure fix.

  • CISupport/build-webkit-org/config.json: Add missing architecture.
12:55 PM Changeset in webkit [274096] by Patrick Angle
  • 5 edits
    2 adds in trunk/Source/WebCore

Web Inspector: Grid overlay does not adjust for element transforms (rotation, scale, etc.)
https://bugs.webkit.org/show_bug.cgi?id=222565

Reviewed by BJ Burg & Devin Rousso.

Added support throughout the grid drawing code to support grids that have been translated/rotated/scaled by
passing all coordinates through the renderGrid's transform before drawing.

Relative directions/lengths throughout (e.g. left, width, and column) are expressed as if there was no
transform applied to the grid in order to help with readability and reasoning with the code in the future.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • inspector/InspectorOverlay.cpp:
  • Added variant that doesn't resize bounds as a side effect.

(WebCore::quadToPath):
(WebCore::InspectorOverlay::drawLayoutHatching):

  • Support drawing hatching in a FloatQuad instead of a FloatRect.

(WebCore::InspectorOverlay::drawGridOverlay):

  • Use the renderGrid to transform known points into drawing coordinates.
  • inspector/InspectorOverlay.h:
  • platform/graphics/FloatLine.cpp: Added.

(WebCore::FloatLine::pointAtAbsoluteDistance const):

  • Finds the point that is the given absolute distance from the start point. The distance may be less than 0 or

greater than the length of the line.
(WebCore::FloatLine::pointAtRelativeDistance const):

  • Finds the point that is the given relative distance from the start point, where 0 is the start point and 1.0

is the end point. The distance may be less than zero or greater than 1.
(WebCore::FloatLine::extendedToBounds const):

  • Creates a new FloatLine that at least covers the provided bounds such that the new line's points will either

be outside or on the bounds.
(WebCore::FloatLine::intersectionWith const):

  • Finds the FloatPoint at the intersection of this FloatLine and another FloatLine.
  • platform/graphics/FloatLine.h: Added.
  • Introduced FloatLine class to store two points that conceptually form a line.

(WebCore::FloatLine::FloatLine):
(WebCore::FloatLine::start const):
(WebCore::FloatLine::end const):
(WebCore::FloatLine::length const):

12:33 PM Changeset in webkit [274095] by Jonathan Bedard
  • 2 edits in trunk/Tools

[run-webkit-tests] Delete old results server code (Follow-up)
https://bugs.webkit.org/show_bug.cgi?id=222393
<rdar://problem/74722220>

Unreviewed follow-up fix.

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(parse_args): Re-add allowed-host.

12:33 PM Changeset in webkit [274094] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Make sure AudioDestination::hardwareSampleRate() returns a valid sample rate
https://bugs.webkit.org/show_bug.cgi?id=222915

Reviewed by Eric Carlson.

Make sure AudioDestination::hardwareSampleRate() returns a valid sample rate. Returning a sample
rate of 0 would end up doing bad things because WebAudio code sometimes needs to divide values
by the sample rate.

  • Modules/webaudio/DefaultAudioDestinationNode.cpp:

(WebCore::DefaultAudioDestinationNode::DefaultAudioDestinationNode):
Add assertion to make sure the hardware sample rate is valid.

  • platform/audio/mac/AudioSessionMac.mm:

(WebCore::AudioSession::sampleRate const):
Log an error message and return 44100 as sample rate in case of error, instead of 0.

12:29 PM Changeset in webkit [274093] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

Don't override previously found IDL files in the bindings generator
https://bugs.webkit.org/show_bug.cgi?id=222922

Reviewed by Sam Weinig.

If the same IDL file exists in

  • $(BUILT_PRODUCTS_DIR)/usr/local/include/WebKitAdditions
  • $(SDKROOT)/usr/local/include/WebKitAdditions
  • $(WebCore)/*/*.idl

then IDLFileForInterface should return the first one found, not the last one found.

  • bindings/scripts/CodeGenerator.pm:

(IDLFileForInterface):

12:18 PM Changeset in webkit [274092] by Megan Gardner
  • 2 edits in trunk/Source/WebCore

Localizable.string.txt fix
https://bugs.webkit.org/show_bug.cgi?id=222025
rdar://74262934

Reviewed by Tim Horton.

  • DerivedSources.make:
12:16 PM Changeset in webkit [274091] by Simon Fraser
  • 7 edits
    2 adds in trunk

Trackpad scrolling in the web inspector timeline is broken
https://bugs.webkit.org/show_bug.cgi?id=222853
rdar://73509018

Reviewed by Sam Weinig.
Source/WebCore:

Commit r266333 or thereabouts broke trackpad scrolling in the inspector timeline.

This scrolling works via a wheel event handler on a non-scrollable element that
dispatches a copy of the wheel event to a proxy overflow:scroll in script. This
broke the default wheel event handling path.

Fix by having EventHandler::defaultWheelEventHandler() only respect latching and
m_currentWheelEventAllowsScrolling (which is set based on WheelEventProcessingSteps
from the scrolling thread) for user events, i.e. those with an underlying native event.

Also make Event loggable, and add some braces.

Test: fast/events/wheel/redispatched-wheel-event.html

  • dom/Event.cpp:

(WebCore::Event::debugDescription const):
(WebCore::operator<<):

  • dom/Event.h:
  • dom/EventDispatcher.cpp:

(WebCore::EventDispatcher::dispatchEvent):

  • dom/Node.cpp:

(WebCore::Node::defaultEventHandler): This clause needs braces.

  • page/EventHandler.cpp:

(WebCore::EventHandler::defaultWheelEventHandler):

LayoutTests:

  • fast/events/wheel/redispatched-wheel-event-expected.txt: Added.
  • fast/events/wheel/redispatched-wheel-event.html: Added.
12:10 PM Changeset in webkit [274090] by Ruben Turcios
  • 8 edits in branches/safari-611.1.21.1-branch/Source

Versioning.

WebKit-7611.1.21.1.6

12:09 PM Changeset in webkit [274089] by stephan.szabo@sony.com
  • 7 edits in trunk/Source

[WinCairo] Builds with ENABLE_CONTEXT_MENUS=OFF fail
https://bugs.webkit.org/show_bug.cgi?id=222771

Reviewed by Don Olmstead.

Build fix for turning off context menus adding ifdefs as necessary.

Source/WebKit:

  • UIProcess/win/PageClientImpl.h:
  • UIProcess/win/WebView.cpp:

Source/WebKitLegacy/win:

  • WebCoreSupport/WebContextMenuClient.cpp:
  • WebCoreSupport/WebContextMenuClient.h:
  • WebView.cpp:
11:55 AM Changeset in webkit [274088] by ChangSeok Oh
  • 2 edits in trunk/LayoutTests

[GTK] avif tests failing
https://bugs.webkit.org/show_bug.cgi?id=222882

Reviewed by Philippe Normand.

Skip avif related tests since the avif support is disabled as default.
We will enable them when activating the avif support as default.

  • platform/gtk/TestExpectations:
11:51 AM Changeset in webkit [274087] by wilander@apple.com
  • 29 edits
    1 move in trunk

PCM: Align fraud prevention token naming with issue 73 in the Privacy CG repo
https://bugs.webkit.org/show_bug.cgi?id=222838
<rdar://75115427>

Reviewed by Brent Fulgham.

This patch doesn't change functionality and only aligns naming to this W3C Privacy CG issue:
https://github.com/privacycg/private-click-measurement/issues/73

Source/WebCore:

Naming for PCM fraud prevention is updated like this:

/.well-known/private-click-measurement/sign-secret-token/ changed to
/.well-known/private-click-measurement/sign-unlinkable-token/

/.well-known/private-click-measurement/get-unlinkable-token-public-key/ changed to
/.well-known/private-click-measurement/get-token-public-key/

source_secret_token in requests for token signature changed to source_unlinkable_token

source_unlinkable_token in attribution reports changed to source_secret_token

Variable, member, and function names are being renamed similarly.

  • loader/PrivateClickMeasurement.cpp:

(WebCore::PrivateClickMeasurement::attributionReportJSON const):
(WebCore::PrivateClickMeasurement::tokenSignatureJSON const):
(WebCore::PrivateClickMeasurement::setSourceSecretToken):
(WebCore::PrivateClickMeasurement::SourceSecretToken::isValid const):
(WebCore::PrivateClickMeasurement::setSourceUnlinkableToken): Deleted.
(WebCore::PrivateClickMeasurement::SourceUnlinkableToken::isValid const): Deleted.

  • loader/PrivateClickMeasurement.h:

(WebCore::PrivateClickMeasurement::setSourceUnlinkableTokenValue):
(WebCore::PrivateClickMeasurement::sourceUnlinkableToken const):
(WebCore::PrivateClickMeasurement::setSourceSecretTokenValue): Deleted.

  • loader/cocoa/PrivateClickMeasurementCocoa.mm:

(WebCore::PrivateClickMeasurement::calculateAndUpdateSourceUnlinkableToken):
(WebCore::PrivateClickMeasurement::calculateAndUpdateSourceSecretToken):

Source/WebKit:

Naming for PCM fraud prevention is updated like this:

/.well-known/private-click-measurement/sign-secret-token/ changed to
/.well-known/private-click-measurement/sign-unlinkable-token/

/.well-known/private-click-measurement/get-unlinkable-token-public-key/ changed to
/.well-known/private-click-measurement/get-token-public-key/

source_secret_token in requests for token signature changed to source_unlinkable_token

source_unlinkable_token in attribution reports changed to source_secret_token

Variable, member, and function names are being renamed similarly.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::buildPrivateClickMeasurementFromDatabase):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::setPCMFraudPreventionValuesForTesting):
(WebKit::NetworkProcess::setFraudPreventionValuesForTesting): Deleted.

Renamed setPCMFraudPreventionValuesForTesting() to make it more clear.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::setPCMFraudPreventionValuesForTesting):
(WebKit::NetworkSession::setFraudPreventionValuesForTesting): Deleted.

Renamed setPCMFraudPreventionValuesForTesting() to make it more clear.

  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/PrivateClickMeasurementManager.cpp:

(WebKit::PrivateClickMeasurementManager::storeUnattributed):
(WebKit::PrivateClickMeasurementManager::getTokenPublicKey):
(WebKit::PrivateClickMeasurementManager::getSignedUnlinkableToken):
(WebKit::PrivateClickMeasurementManager::setPCMFraudPreventionValuesForTesting):
(WebKit::PrivateClickMeasurementManager::getSignedSecretToken): Deleted.
(WebKit::PrivateClickMeasurementManager::setFraudPreventionValuesForTesting): Deleted.

Renamed setPCMFraudPreventionValuesForTesting() to make it more clear.

  • NetworkProcess/PrivateClickMeasurementManager.h:
  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPCMFraudPreventionValuesForTesting):
(WKPageSetFraudPreventionValuesForTesting): Deleted.

Renamed WKPageSetPCMFraudPreventionValuesForTesting() to make it more clear.

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setPCMFraudPreventionValuesForTesting):
(WebKit::WebPageProxy::setFraudPreventionValuesForTesting): Deleted.

Renamed setPCMFraudPreventionValuesForTesting() to make it more clear.

  • UIProcess/WebPageProxy.h:

Tools:

Naming for PCM fraud prevention is updated like this:

/.well-known/private-click-measurement/sign-secret-token/ changed to
/.well-known/private-click-measurement/sign-unlinkable-token/

/.well-known/private-click-measurement/get-unlinkable-token-public-key/ changed to
/.well-known/private-click-measurement/get-token-public-key/

source_secret_token in requests for token signature changed to source_unlinkable_token

source_unlinkable_token in attribution reports changed to source_secret_token

Variable, member, and function names are being renamed similarly.

  • TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm:

(TestWebKitAPI::TEST):

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setPrivateClickMeasurementFraudPreventionValuesForTesting):
(WTR::TestRunner::setFraudPreventionValuesForTesting): Deleted.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::setPCMFraudPreventionValuesForTesting):
(WTR::TestController::setFraudPreventionValuesForTesting): Deleted.

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

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • http/tests/privateClickMeasurement/resources/fraudPreventionTestURL.php: Renamed from LayoutTests/http/tests/privateClickMeasurement/resources/signToken.php.

The way this PHP file is used goes beyond signing tokens so it now has a generic name.

  • http/tests/privateClickMeasurement/store-private-click-measurement-with-source-nonce-expected.txt:

Re-baselined to reflect the new naming.

  • http/tests/privateClickMeasurement/store-private-click-measurement-with-source-nonce.html:
11:36 AM Changeset in webkit [274086] by Ruben Turcios
  • 8 edits in branches/safari-611.1.21.0-branch/Source

Versioning.

WebKit-7611.1.21.0.5

11:12 AM Changeset in webkit [274085] by Aditya Keerthi
  • 2 edits in trunk/Source/WebKit

[iOS] <select multiple> group headers are illegible in dark mode
https://bugs.webkit.org/show_bug.cgi?id=222914
<rdar://problem/75020326>

Reviewed by Tim Horton.

  • UIProcess/ios/forms/WKFormSelectPicker.mm:

(-[WKSelectPickerTableViewController tableView:heightForHeaderInSection:]):

Do not specify a textColor for the header label. This ensures the default
semantic label color is used, which automatically adapts when dark mode
is enabled.

11:12 AM Changeset in webkit [274084] by Jonathan Bedard
  • 26 edits
    1 delete in trunk/Tools

[resultsdbpy] Adopt webkitscmpy
https://bugs.webkit.org/show_bug.cgi?id=222754
<rdar://problem/75049209>

Reviewed by Dewei Zhu.

Adopting webkitscmpy's remote repositories requires using the unit testing paradigms from
those objects, which requires considerable adjustment of testing code.

  • Scripts/libraries/resultsdbpy/resultsdbpy/init.py: Bump version, include webkitscmpy.
  • Scripts/libraries/resultsdbpy/resultsdbpy/controller/archive_controller_unittest.py:
  • Scripts/libraries/resultsdbpy/resultsdbpy/controller/ci_controller_unittest.py:
  • Scripts/libraries/resultsdbpy/resultsdbpy/controller/commit_controller.py:

(CommitController.register): Use webkitscmpy's exceptions.

  • Scripts/libraries/resultsdbpy/resultsdbpy/controller/commit_controller_unittest.py:

(CommitControllerTest.test_register_via_post): Deleted.

  • Scripts/libraries/resultsdbpy/resultsdbpy/controller/failure_controller_unittest.py:
  • Scripts/libraries/resultsdbpy/resultsdbpy/controller/suite_controller_unittest.py:
  • Scripts/libraries/resultsdbpy/resultsdbpy/controller/test_controller_unittest.py:
  • Scripts/libraries/resultsdbpy/resultsdbpy/controller/upload_controller_unittest.py:
  • Scripts/libraries/resultsdbpy/resultsdbpy/model/archive_context_unittest.py:
  • Scripts/libraries/resultsdbpy/resultsdbpy/model/ci_context_unittest.py:
  • Scripts/libraries/resultsdbpy/resultsdbpy/model/commit_context.py:

(CommitContext.branch_keys_for_commits):
(CommitContext.find_commits_by_id): default_branch is now an instance variable.
(CommitContext.find_commits_by_uuid): Ditto.
(CommitContext.find_commits_by_timestamp): Ditto.
(CommitContext.find_commits_in_range): Ditto.
(CommitContext.sibling_commits): Ditto.
(CommitContext.register_commit_with_repo_and_id): webkitscmpy repositories compute branch.

  • Scripts/libraries/resultsdbpy/resultsdbpy/model/commit_context_unittest.py:
  • Scripts/libraries/resultsdbpy/resultsdbpy/model/failure_context_unittest.py:
  • Scripts/libraries/resultsdbpy/resultsdbpy/model/mock_model_factory.py:

(MockModelFactory):
(MockModelFactory.safari): Use shared webkitscmpy mocks.
(MockModelFactory.webkit): Ditto.
(MockModelFactory.create): Timestamps in webkitscmpy are just integers.
(MockModelFactory.iterate_all_commits): webkitscmpy and resultsdbpy have slightly different
commit representations, so the mechanics of registering commits are different.

  • Scripts/libraries/resultsdbpy/resultsdbpy/model/mock_repository.py: Removed.
  • Scripts/libraries/resultsdbpy/resultsdbpy/model/model_unittest.py:
  • Scripts/libraries/resultsdbpy/resultsdbpy/model/repository.py:

(Repository):
(Repository.init): default_branch is now an instance variable.
(Repository.commit_for_id): webkitscmpy does not require the branch, given a hash or revision.
(StashRepository): Retrieve commit from webkitscmpy's remote BitBucket object.
(WebKitRepository): Hard-code WebKit's Subversion URL. This is temporary, since WebKit will shortly
become a GitHub repository.
(SCMException): Deleted.
(HTTPRepository): Deleted.
(SVNRepository): Deleted.
(WebKitRepository.commit_for_id.diff_changelogs): Deleted.

  • Scripts/libraries/resultsdbpy/resultsdbpy/model/repository_unittest.py:
  • Scripts/libraries/resultsdbpy/resultsdbpy/model/suite_context_unittest.py:
  • Scripts/libraries/resultsdbpy/resultsdbpy/model/test_context_unittest.py:
  • Scripts/libraries/resultsdbpy/resultsdbpy/model/upload_context_unittest.py:
  • Scripts/libraries/resultsdbpy/resultsdbpy/view/archive_view_unittest.py:
  • Scripts/libraries/resultsdbpy/resultsdbpy/view/commit_view_unittest.py:
  • Scripts/libraries/resultsdbpy/resultsdbpy/view/view_routes_unittest.py:
  • Scripts/libraries/resultsdbpy/setup.py: Bump version.
11:07 AM Changeset in webkit [274083] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

REGRESSION (r269627?): ASSERTION FAILED: &layoutState().establishedFormattingState(layoutBox.formattingContextRoot()) == this in WebCore::Layout::FormattingState::boxGeometry
https://bugs.webkit.org/show_bug.cgi?id=219905

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Skip the test.
11:07 AM Changeset in webkit [274082] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

REGRESSION (r272842): [iOS] security/contentSecurityPolicy/video-with-data-url-allowed-by-media-src-star.html is consistently failing
https://bugs.webkit.org/show_bug.cgi?id=222840

Unreviewed test gardening.

  • platform/ios/TestExpectations: Mark test as failing.
11:04 AM Changeset in webkit [274081] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Simplify CallbackAggregator in WebsiteDataStore::removeData()
https://bugs.webkit.org/show_bug.cgi?id=222837

Reviewed by Geoffrey Garen.

Simplify CallbackAggregator in WebsiteDataStore::removeData(). We don't need an explicit
counter data member or explicit calls to addPendingCallback() / removePendingCallback().
We can simply rely on the ref count of the CallbackAggregator.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::removeData):

10:09 AM Changeset in webkit [274080] by Jonathan Bedard
  • 14 edits in trunk/Tools

[webkitscmpy] Add repository_id
https://bugs.webkit.org/show_bug.cgi?id=222827
<rdar://problem/75111000>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/commit.py:

(Commit.Encoder.default): Add repository_id.
(Commit.init): Ditto.

  • Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:

(Git.init): Allow caller to specify repository id.
(Git.commit): Pass repository id to commit.

  • Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py:

(Scm.init): Allow caller to specify repository id.

  • Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:

(Svn.init): Allow caller to specify repository id.
(Svn.commit): Pass repository id to commit.

  • Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py:

(BitBucket.init): Allow caller to specify repository id, infer from url.
(BitBucket.commit): Pass repository id to commit.

  • Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:

(GitHub.init): Allow caller to specify repository id, infer from url.
(GitHub.commit): Pass repository id to commit.

  • Scripts/libraries/webkitscmpy/webkitscmpy/remote/scm.py:

(Scm.init): Allow caller to specify repository id.

  • Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py:

(Svn.init): Allow caller to specify repository id, infer from url.
(Svn.commit): Pass repository id to commit.

  • Scripts/libraries/webkitscmpy/webkitscmpy/scm_base.py:

(ScmBase.init): Allow caller to specify repository id.

  • Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:

(TestGitHub.test_id):
(TestBitBucket.test_id):

  • Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py:

(TestRemoteSvn.test_id):

10:05 AM Changeset in webkit [274079] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

webkitbot should stop saying "<revision> broke the build" when we revert commits
https://bugs.webkit.org/show_bug.cgi?id=222906

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-03-08
Reviewed by Jonathan Bedard.

Instead of saying the patch "broke the build," let's say it "introduced a regression." This
is more generic, since we revert patches for lots of reasons that are not build failures.
Build failures count as regressions.

  • Scripts/webkitpy/tool/commands/download.py:

(CreateRevert._prepare_state):

  • Scripts/webkitpy/tool/commands/download_unittest.py:
10:02 AM Changeset in webkit [274078] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

[Web Animations] imported/w3c/web-platform-tests/css/css-transitions/before-load-001.html is a failure
https://bugs.webkit.org/show_bug.cgi?id=203416

Unreviewed.

This test now passes reliably on iOS according to
https://results.webkit.org/?suite=layout-tests&test=imported%2Fw3c%2Fweb-platform-tests%2Fcss%2Fcss-transitions%2Fbefore-load-001.html

  • platform/ios/TestExpectations:
9:56 AM Changeset in webkit [274077] by graouts@webkit.org
  • 3 edits
    2 deletes in trunk/LayoutTests

Unreviewed. Remove a test supporting code that was removed from the WPT suite (see issue #27923).

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-transitions/properties-value-auto-001-expected.txt: Removed.
  • web-platform-tests/css/css-transitions/properties-value-auto-001.html: Removed.
  • web-platform-tests/css/css-transitions/support/properties.js:

(values.string_appeared_here):
(root.getAutoPropertyTests): Deleted.

LayoutTests:

  • platform/glib/TestExpectations:
  • platform/ios/TestExpectations:
9:51 AM Changeset in webkit [274076] by Peng Liu
  • 9 edits in trunk

[GPUP] Some media tests related to canvas fail when media in GPU Process is enabled
https://bugs.webkit.org/show_bug.cgi?id=221820

Reviewed by Jer Noble.

Source/WebCore:

When "GPU Process: Media" is enabled and "GPU Process: Canvas Rendering" is disabled,
MediaPlayerPrivateAVFoundationObjC::nativeImageForCurrentTime() will be called
to get native images (video frames) from a video player. This function will copy
pixel buffers from CoreVideo, and we may need to rotate the pixel buffers before
converting them to native images. The process to copy pixel buffers from CoreVideo
and rotate them is implemented in MediaPlayerPrivateAVFoundationObjC::updateLastPixelBuffer().
It rotates pixel buffers with an ImageRotationSessionVT object (m_imageRotationSession).

With the current implementation of ImageRotationSessionVT, we can rotate pixel buffers
with following two approaches:

  • Construct an uninitialized instance, and call `ImageRotationSessionVT::rotate(

MediaSample&, const RotationProperties&, IsCGImageCompatible). The rotate` function
will initialize the object if needed.

  • Construct an instance with given rotation properties, size, pixel buffer format,

and CGImage compatibility, then call ImageRotationSessionVT::rotate(CVPixelBufferRef).
When we call the rotate function, we need to make sure the pixel buffer's format
is consistent with the ImageRotationSessionVT instance. Otherwise, the rotation will
fail and the caller will get an empty pixel buffer (this bug).

In order to use the second approach in MediaPlayerPrivateAVFoundationObjC, we need to
figure out the pixel buffer format to construct an ImageRotationSessionVT instance.
But that can only be done after we get a pixel buffer from CoreVideo.

This patch refactors ImageRotationSessionVT to better support the aforementioned
second approach. MediaPlayerPrivateAVFoundationObjC constructs an ImageRotationSessionVT
instance without pixel buffer format, and the ImageRotationSessionVT instance
will figure out the pixel buffer format by itself and configures its CVPixelBufferPool
properly when we call rotate function.

No new tests. Fix a test failure:

  • media/video-orientation-canvas.html
  • platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:

(WebCore::ImageDecoderAVFObjC::readTrackMetadata):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::updateRotationSession):
(WebCore::MediaPlayerPrivateAVFoundationObjC::nativeImageForCurrentTime):
We have to update the image synchronously to ensure that the caller gets the correct image.

  • platform/graphics/cv/ImageRotationSessionVT.h:

Remove isMatching() because it is not defined/used.

  • platform/graphics/cv/ImageRotationSessionVT.mm:

(WebCore::ImageRotationSessionVT::ImageRotationSessionVT):
(WebCore::ImageRotationSessionVT::initialize):
(WebCore::ImageRotationSessionVT::rotate):

  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:

(WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):

LayoutTests:

  • media/video-orientation-canvas.html:
  • platform/wk2/TestExpectations:
9:27 AM Changeset in webkit [274075] by Chris Gambrell
  • 2 edits in trunk/LayoutTests

REGRESSION: [iOS] http/tests/security/strip-referrer-to-origin-for-third-party-redirects-in-private-mode.html is failing
https://bugs.webkit.org/show_bug.cgi?id=222823
<rdar://problem/75133450>

Reviewed by Darin Adler.

  • http/tests/security/strip-referrer-to-origin-for-third-party-redirects-in-private-mode.html:
8:57 AM Changeset in webkit [274074] by weinig@apple.com
  • 14 edits in trunk/Source

Remove quirks for the no longer supported iAd Producer
https://bugs.webkit.org/show_bug.cgi?id=222894

Reviewed by Chris Dumez.

Source/WebCore:

Remove two quirks that were only for iAd Producer, which is no longer
supported on the latest macOS operating systems.

By removing one quirk, we can also remove some indirection in CSSStyleDeclaration.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateAttributeSetterBodyDefinition):

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

(WebCore::setJSTestCSSProperty_propertySetter):

  • css/CSSStyleDeclaration.cpp:

(WebCore::CSSStyleDeclaration::setNamedItem):
(WebCore::CSSStyleDeclaration::setPropertyValueInternal): Deleted.

  • css/CSSStyleDeclaration.h:
  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::isLoadingInAPISense const):

  • page/DeprecatedGlobalSettings.cpp:

(WebCore::DeprecatedGlobalSettings::setShouldRespectPriorityInCSSAttributeSetters): Deleted.
(WebCore::DeprecatedGlobalSettings::shouldRespectPriorityInCSSAttributeSetters): Deleted.

  • page/DeprecatedGlobalSettings.h:

Source/WebKitLegacy/mac:

Remove two quirks that were only for iAd Producer, which is no longer
supported on the latest macOS operating systems.

  • WebView/WebPreferencesDefaultValues.h:
  • WebView/WebPreferencesDefaultValues.mm:

(WebKit::defaultNeedsIsLoadingInAPISenseQuirk): Deleted.

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(shouldRespectPriorityInCSSAttributeSetters): Deleted.

Source/WTF:

  • Scripts/Preferences/WebPreferences.yaml:

Remove NeedsIsLoadingInAPISenseQuirk preference which only existed to enable
a quirk for iAd Producer.

8:27 AM WebKitGTK/Debugging edited by Philippe Normand
(diff)
8:05 AM WebKitGTK/2.32.x edited by Michael Catanzaro
(diff)
8:01 AM Changeset in webkit [274073] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Unreviewed, reverting r273197.
https://bugs.webkit.org/show_bug.cgi?id=222909

Revert of r273084 broke building on Linux platforms

Reverted changeset:

"Remove unused isGoogle function"
https://bugs.webkit.org/show_bug.cgi?id=222227
https://trac.webkit.org/changeset/273197

7:28 AM Changeset in webkit [274072] by graouts@webkit.org
  • 4 edits in trunk/LayoutTests

[Web Animations] Some tests under web-animations/timing-model/animations are ImageOnlyFailure
https://bugs.webkit.org/show_bug.cgi?id=207260

Reviewed by Sam Weinig.

These three tests have been passing reliably on most plaforms for a while now and should no longer
be marked as ImageOnlyFailure:

  • imported/w3c/web-platform-tests/web-animations/timing-model/animations/reverse-running-animation.html
  • imported/w3c/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-fast.html
  • imported/w3c/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-slow.html

The first of those three tests is still an ImageOnlyFailure on GTK and WPE, so we add that expectation
to the platform-specific files.

  • TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
7:20 AM Changeset in webkit [274071] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations

Unreviewed. Update border-width interpolation test after WPT PR #27934.

  • web-platform-tests/css/css-backgrounds/animations/border-width-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/border-width-interpolation.html:
6:45 AM WebKitGTK/2.32.x edited by Michael Catanzaro
(diff)
6:38 AM Changeset in webkit [274070] by commit-queue@webkit.org
  • 5 edits in trunk

Unreviewed, reverting r273084.
https://bugs.webkit.org/show_bug.cgi?id=222905

User agent quirks still needed after all

Reverted changeset:

"[GTK] Remove all Google user agent quirks except for Google
Docs"
https://bugs.webkit.org/show_bug.cgi?id=222039
https://trac.webkit.org/changeset/273084

5:53 AM Changeset in webkit [274069] by Chris Lord
  • 12 edits in trunk/Source/WebCore

Allow creation of a CSSFontSelector with a non-Document ScriptExecutionContext
https://bugs.webkit.org/show_bug.cgi?id=222735

Reviewed by Darin Adler.

Replace Document member of CSSFontSelector with a ScriptExecutionContext.
This also changes make_names.pl string header generation to allow for easier enumeration of font family strings.

No new tests as new behaviour is currently unused. Existing behaviour covered by existing tests.

  • bindings/scripts/StaticString.pm:

(GenerateStrings): Revert change from bug 222552

  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::CSSFontSelector):
(WebCore::m_version):
(WebCore::CSSFontSelector::fontFaceSet):
(WebCore::CSSFontSelector::addFontFaceRule):
(WebCore::CSSFontSelector::fontStyleUpdateNeeded):
(WebCore::CSSFontSelector::resolveGenericFamily):
(WebCore::CSSFontSelector::fontRangesForFamily):
(WebCore::CSSFontSelector::stopLoadingAndClearFonts):
(WebCore::CSSFontSelector::beginLoadingFontSoon):
(WebCore::CSSFontSelector::loadPendingFonts):
(WebCore::CSSFontSelector::fontLoadingTimerFired):
(WebCore::CSSFontSelector::fallbackFontCount):
(WebCore::CSSFontSelector::fallbackFontAt):

  • css/CSSFontSelector.h:
  • css/FontFaceSet.cpp:

(WebCore::FontFaceSet::create):
(WebCore::FontFaceSet::FontFaceSet):

  • css/FontFaceSet.h:
  • css/FontFaceSet.idl:
  • dom/Document.h:
  • dom/ScriptExecutionContext.h:
  • dom/make_names.pl:

(printNamesHeaderFile): Make global string data and names accessible via a Vector and add an enum of name indices.

  • platform/graphics/FontGenericFamilies.cpp:

(WebCore:: const):

  • platform/graphics/FontGenericFamilies.h:
4:37 AM Changeset in webkit [274068] by commit-queue@webkit.org
  • 6 edits in trunk

Support aspect-ratio in intrinsic sizing
https://bugs.webkit.org/show_bug.cgi?id=220861

Patch by Rob Buis <rbuis@igalia.com> on 2021-03-08
Reviewed by Antti Koivisto.

Source/WebCore:

Support aspect-ratio in intrinsic sizing calculations.
The values min-content/max-content/fit-content
get set a value through aspect-ratio [1].
However min-width:auto is special, it should take content
into account [2]. In order to support this, compute
logical (intrinsic) width using MinIntrinsic, since staying
with MinContent/MaxContent would cause an infinite loop.

Behavior matches Firefox and Chrome.

[1] https://www.w3.org/TR/css-sizing-4/#propdef-aspect-ratio
[2] https://www.w3.org/TR/css-sizing-4/#aspect-ratio-minimum

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::computePreferredLogicalWidths):
Compute child min/max pref widths from aspect-ratio if it applies.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::constrainLogicalWidthInFragmentByMinMax const):
Add an allowIntrinsic parameter to prevent recursion.
(WebCore::RenderBox::computeIntrinsicLogicalWidthUsing const):
Compute intrinsic logical width from aspect ratio if possible.
(WebCore::RenderBox::computeLogicalWidthInFragmentUsing const):
(WebCore::RenderBox::shouldComputeLogicalHeightFromAspectRatio const):
min/max/fit-content in the block axis is treated as auto.
(WebCore::RenderBox::computeLogicalWidthFromAspectRatio const):
Prevent recursion by passing false for allowIntrinsic.

  • rendering/RenderBox.h:

LayoutTests:

Enable tests that pass now.

3:55 AM Changeset in webkit [274067] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[Web Animations] Don't update animation playback rate if timeline is inactive
https://bugs.webkit.org/show_bug.cgi?id=222839

Patch by Ian Gilbert <iang@apple.com> on 2021-03-08
Reviewed by Antoine Quint.

An inactive timeline will return WTF::nullopt for an unresolved time value.
Added nullopt check to abort setting playback rate when we cannot calculate a new start time.

No new tests as reproducing requires navigating to a new document while updating the playback
rate and I was unable to make a reliable test case.

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::updatePlaybackRate):

2:43 AM Changeset in webkit [274066] by commit-queue@webkit.org
  • 19 edits
    4 adds in trunk

WebGL asserts after GPU process times out
https://bugs.webkit.org/show_bug.cgi?id=222546

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-03-08
Reviewed by Wenson Hsieh.

Source/WebCore:

Add a trigger internals.simulateEventForWebGLContext("timeout", context)
to trigger timeout for calls to a WebGL context.

Tests: fast/canvas/webgl/lose-context-on-timeout-async.html

fast/canvas/webgl/lose-context-on-timeout.html

  • testing/Internals.cpp:

(WebCore::Internals::simulateEventForWebGLContext):

Source/WebKit:

IPC::StreamClientConnection::tryAcquire would assert on

ASSERT(untrustedLimit < (dataSize() - 1));

The untrustedLimit value would be then:

StreamConnectionBuffer::serverOffsetClientIsWaitingTag.

This would be equivalent of assertion added in this commit:

ASSERT(clientLimit != ClientLimit::clientIsWaitingTag);

This would happen in case of timeout, because upon entering
the wait sequence:

1) The client itself would first write the tag value to the

offset variable.

2) Wait and timeout the wait.
3) run the next iteration of the acquire loop.

The next iteration would load the tag value written before,
e.g. serverOffsetClientIsWaitingTag.
This would be then used in clampedLimit() call.

Fix this by taking it into account that the variable might be
ClientLimit::clientIsWaitingTag within the acquire loop.

Possibly fix future similar problems by not treating the value as
size_t, rather treat it as enum class ClientOffset : size_t. This
enables the compiler to enforce that when checking for the various tag
values, the holder must hold the enum class. When intending to interpret
the value as size_t, holder must explicitly convert.

Do the above change for the ServerOffset.

Tests: fast/canvas/webgl/lose-context-on-timeout-async.html

fast/canvas/webgl/lose-context-on-timeout.html

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::releaseGraphicsContextGL):
Do not assert that the release message actually releases the context.
For testing, the induce the timeout by releasing the context prematurely
and treating the subsequent messages as if they were non-legit messages.
That should be just skipped.

(WebKit::GPUConnectionToWebProcess::releaseGraphicsContextGLForTesting):
Add a public function to invoke from "ForTesting" codepaths.

(WebKit::GPUConnectionToWebProcess::dispatchMessage):
(WebKit::GPUConnectionToWebProcess::dispatchSyncMessage):
Skip RemoteGraphicsContextGL messages that do not get routed to any
instance. These messages can be "non-legit", ones that are sent before
the "context was lost" message reached the sender, or ones that are
sent during simulated timeout.
These do not contain asserts as it is expected that these will occur in
above situations.

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::RemoteGraphicsContextGL::simulateEventForTesting):

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:
  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h:

Add the simulateEventForTesting function to simulate the
timeout. Simulate via just removing the context, which causes
left-over messages to skipped.
Currently we do not simulate the timeout with an infinite loop
in GPU process threads as that is not supported.
Currently we do not simulate the timeout with a gpu process
crash since it is not supported to be tested (will cause a
reload).

  • Platform/IPC/StreamClientConnection.cpp:

(IPC::StreamClientConnection::StreamClientConnection):

  • Platform/IPC/StreamClientConnection.h:

(IPC::StreamClientConnection::sendSync):
(IPC::StreamClientConnection::release):
Change size_t usage to -> ClientOffset, ServerOffset

(IPC::StreamClientConnection::tryAcquire):
Fix the assertion of equivalent of ASSERT(clientLimit != ClientLimit::clientIsWaitingTag);
by reorganizing the acquire loop.

(IPC::StreamClientConnection::toLimit const):
Fix the off-by-one in assertion error
( < dataSize() - 1 vs <= dataSize() - 1)

Rename from clampedLimit() to toLimit(), as the
clamping is confusing as the client trusts the
server.

  • Platform/IPC/StreamConnectionBuffer.cpp:

(IPC::StreamConnectionBuffer::StreamConnectionBuffer):
(IPC::StreamConnectionBuffer::operator=):
(IPC::StreamConnectionBuffer::encode const):

  • Platform/IPC/StreamConnectionBuffer.h:

(IPC::StreamConnectionBuffer::clientOffset):
(IPC::StreamConnectionBuffer::serverOffset):
(IPC::StreamConnectionBuffer::clientWaitSemaphore):
(IPC::StreamConnectionBuffer::maximumSize):

  • Platform/IPC/StreamServerConnection.cpp:

(IPC::StreamServerConnectionBase::tryAquire):
(IPC::StreamServerConnectionBase::release):
Change size_t usage to -> ClientOffset, ServerOffset

(IPC::StreamServerConnectionBase::clampedLimit const):
Fix the off-by-one in assertion error
( < dataSize() - 1 vs <= dataSize() - 1)

  • Platform/IPC/StreamServerConnection.h:

(IPC::StreamServerConnectionBase::sharedServerLimit):
(IPC::StreamServerConnectionBase::sharedServerOffset):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::synthesizeGLError):
(WebKit::RemoteGraphicsContextGLProxy::getError):
For the cases where the timeout would happen in these two functions,
call the markContextLost() instead of wasLost(). This is to clarify
all the context lost handling to use the same pattern.

(WebKit::RemoteGraphicsContextGLProxy::simulateEventForTesting):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:

LayoutTests:

Add tests to test the case where a WebGL call times out.
Add two variants: one which most probably times out on
synchronous call, and one which most probably times out on
asynchronous call.

  • fast/canvas/webgl/lose-context-on-status-failure.html:

The testing APIs were changed, so replace use of
Internals.setFailNextGPUStatusCheck()
with Internals.simulateEventForWebGLContext()

  • fast/canvas/webgl/lose-context-on-timeout-async-expected.txt: Added.
  • fast/canvas/webgl/lose-context-on-timeout-async.html: Added.
  • fast/canvas/webgl/lose-context-on-timeout-expected.txt: Added.
  • fast/canvas/webgl/lose-context-on-timeout.html: Added.
  • fast/canvas/webgl/webglcontextchangedevent.html:
1:37 AM Changeset in webkit [274065] by commit-queue@webkit.org
  • 15 edits in trunk

WebGL context screen change events should work with GPU process
https://bugs.webkit.org/show_bug.cgi?id=219669
<rdar://problem/72373371>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-03-08
Reviewed by Per Arne Vollan.

Source/WebKit:

Pass display configuration change notification from UI
process to GPU process.

Fixes

fast/canvas/webgl/webglcontextchangedevent.html
fast/canvas/webgl/context-update-on-display-configuration.html

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::displayConfigurationChanged):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::displayConfigurationChanged):

  • GPUProcess/GPUProcess.h:
  • GPUProcess/GPUProcess.messages.in:
  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::RemoteGraphicsContextGL::displayWasReconfigured):

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:
  • Platform/IPC/ScopedActiveMessageReceiveQueue.h:

(IPC::ScopedActiveMessageReceiveQueue::operator-> const):

  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::displayConfigurationChanged):

  • UIProcess/GPU/GPUProcessProxy.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::displayReconfigurationCallBack):
(WebKit::WebProcessPool::sendDisplayConfigurationChangedMessageForTesting):

LayoutTests:

  • fast/canvas/webgl/webglcontextchangedevent.html:

Make manually testable.

  • gpu-process/TestExpectations:

Remove two tests that now pass.

12:59 AM Changeset in webkit [274064] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

REGRESSION(r272900): Nullptr crash in ComposedTreeIterator::traverseNextInShadowTree() via ShadowRoot::hostChildElementDidChange
https://bugs.webkit.org/show_bug.cgi?id=222720

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-03-08
Reviewed by Ryosuke Niwa.

Source/WebCore:

The list of assigned nodes contains weak pointers, we should check the node hasn't been destroyed.

Test: fast/html/details-set-inner-text-crash.html

  • dom/ComposedTreeIterator.cpp:

(WebCore::ComposedTreeIterator::traverseNextInShadowTree):

LayoutTests:

  • fast/html/details-set-inner-text-crash-expected.txt: Added.
  • fast/html/details-set-inner-text-crash.html: Added.
12:52 AM Changeset in webkit [274063] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore/platform/gtk/po

[GTK] Update Simplified Chinese translation
https://bugs.webkit.org/show_bug.cgi?id=222845

Patch by Dingzhong Chen <wsxy162@gmail.com> on 2021-03-08
Reviewed by Carlos Garcia Campos.

  • zh_CN.po:
12:28 AM Changeset in webkit [274062] by Diego Pino Garcia
  • 19 edits
    2 adds
    4 deletes in trunk/LayoutTests

[GTK] Unreviewed test gardening. Update baselines.

  • platform/glib/fast/css/getComputedStyle/computed-style-expected.txt: After r273882.
  • platform/glib/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: After r273882.
  • platform/glib/fast/table/table-display-types-strict-expected.txt: After r273386.
  • platform/glib/http/tests/navigation/redirect-to-fragment2-expected.txt: Added. Passing since r273781.
  • platform/glib/imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https-expected.txt: After r273644.
  • platform/glib/svg/css/getComputedStyle-basic-expected.txt: After r273882.
  • platform/gtk/compositing/geometry/clipping-foreground-expected.png: After r271348.
  • platform/gtk/compositing/geometry/clipping-foreground-expected.txt: After r271348.
  • platform/gtk/css1/text_properties/vertical_align-expected.txt: After r273386.
  • platform/gtk/fast/dom/HTMLMeterElement/meter-element-expected.txt: After r271110.
  • platform/gtk/fast/dom/HTMLMeterElement/meter-styles-changing-pseudo-expected.txt: After r271110.
  • platform/gtk/fast/dom/HTMLMeterElement/meter-styles-expected.png: After r271110.
  • platform/gtk/fast/dom/HTMLMeterElement/meter-styles-expected.txt: After r271110.
  • platform/gtk/fast/forms/input-disabled-color-expected.png: After r271021.
  • platform/gtk/fast/forms/input-disabled-color-expected.txt: After r271021.
  • platform/gtk/fast/forms/linebox-overflow-in-textarea-padding-expected.png: After r271348.
  • platform/gtk/fast/forms/linebox-overflow-in-textarea-padding-expected.txt: After r271348.
  • platform/gtk/fast/inline-block/inline-block-vertical-align-expected.txt: After r271110.
  • platform/gtk/fast/scrolling/overflow-scrollable-after-back-expected.txt: Removed. Stale baseline.
  • platform/gtk/http/tests/navigation/redirect-to-fragment2-expected.txt: Removed. Moved to GLib baseline.
  • platform/gtk/imported/w3c/web-platform-tests/css/css-color/animation/opacity-interpolation-expected.txt: Removed. Stale baseline.
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt: After r273072.
  • platform/wpe/http/tests/navigation/redirect-to-fragment2-expected.txt: Removed. Moved to GLib baseline.

Mar 7, 2021:

7:45 PM Changeset in webkit [274061] by Lauro Moura
  • 3 edits
    2 adds in trunk/LayoutTests

[GLIB] Gardening and updating baselines

Unreviewed test gardening.

  • platform/glib/TestExpectations:
  • platform/glib/imported/w3c/web-platform-tests/shadow-dom/nested-slot-remove-crash-expected.txt: Added.
  • platform/wpe/TestExpectations:
6:02 PM Changeset in webkit [274060] by Lauro Moura
  • 2 edits in trunk/Source/WebCore

Unreviewed. Fix -Wunused-parameter warning after r274033

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::requiresCompositingForModel const):

5:48 PM Changeset in webkit [274059] by Lauro Moura
  • 2 edits in trunk/Source/WebCore

Unreviewed. Fix -Wreturn-type warning after r273891

  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::trackMatchesKind):

2:45 PM Changeset in webkit [274058] by Wenson Hsieh
  • 6 edits in trunk

[iOS] maild hits a simulated crash when ENABLE(APP_HIGHLIGHTS) is defined
https://bugs.webkit.org/show_bug.cgi?id=222893
<rdar://problem/74230060>

Reviewed by Tim Horton.

Source/WebKit:

Fix the simulated crash by not initializing the shared callout bar and installing menu items for new app
highlight actions in the case where the web view is unparented. Additionally, avoid this work in the case where
the selection is not a range.

Test: AppHighlights.AvoidForcingCalloutBarInitialization

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView didMoveToWindow]):

Call -setUpAppHighlightMenusIfNeeded to ensure that we still add app highlight menu items in the case where
we avoided it previously, due to the web view being unparented. Note that if we're being unparented (i.e.
self.window has just become nil), we will return early from -setUpAppHighlightMenusIfNeeded.

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

(-[WKContentView _selectionChanged]):
(-[WKContentView setUpAppHighlightMenusIfNeeded]):
(-[WKContentView setUpAppHighlightMenus]): Deleted.

Rename setUpAppHighlightMenus to setUpAppHighlightMenusIfNeeded, and declare it in the header so that we
can call into it from -didMoveToWindow above.

Tools:

Add an API test to verify that we don't attempt to initialize the platform callout bar.

  • TestWebKitAPI/Tests/WebKitCocoa/WKAppHighlights.mm:
12:32 PM Changeset in webkit [274057] by Said Abou-Hallawa
  • 6 edits in trunk

[GPU Process] Recording transparency layer should reset the alpha of lastDrawingState
https://bugs.webkit.org/show_bug.cgi?id=222855

Reviewed by Simon Fraser.

Source/WebCore:

After appending BeginTransparencyLayer item, the alpha of lastDrawingState
should be reset. So any subsequent setAlpha() should be accumulated even
if the new alpha equals to the last alpha which was set in lastDrawingState.

  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::beginTransparencyLayer):
(WebCore::GraphicsContext::endTransparencyLayer):

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::beginTransparencyLayer):
(WebCore::DisplayList::Recorder::endTransparencyLayer):

  • platform/graphics/displaylists/DisplayListRecorder.h:

(WebCore::DisplayList::Recorder::ContextState::cloneForTransparencyLayer const):

LayoutTests:

  • gpu-process/TestExpectations:
12:26 PM Changeset in webkit [274056] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

[Mojave] webanimations/accelerated-transform-related-animation-property-order.html is failing
https://bugs.webkit.org/show_bug.cgi?id=220018

Reviewed by Sam Weinig.

Mojave is no longer supported on ToT and this test has been passing reliably on the bots.

  • platform/mac-wk2/TestExpectations:
12:16 PM Changeset in webkit [274055] by graouts@webkit.org
  • 8 edits in trunk

Correctly handle "auto" values when blending z-index
https://bugs.webkit.org/show_bug.cgi?id=222870

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Add an extra 72 PASS results. We now pass all the z-index interpolation tests.

Another test has new failures, but this is expected, this test behaves the same way
across Firefox and Chrome as well.

  • web-platform-tests/css/css-transitions/animations/z-index-interpolation-expected.txt:
  • web-platform-tests/css/css-transitions/properties-value-auto-001-expected.txt:

Source/WebCore:

Create a dedicated wrapper for z-index such that we can handle "auto" values
instead of just blending an int.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::ZIndexPropertyWrapper::ZIndexPropertyWrapper):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

LayoutTests:

Fix the test animations/stacking-context-unchanged-while-running.html which made the
wrong assumption about blending of z-index with auto values. We now make this test
expect an "auto" value and update the helper to know how to deal with "auto" values
for "z-index".

  • animations/resources/animation-test-helpers.js:

(getPropertyValue):
(comparePropertyValue):

  • animations/stacking-context-unchanged-while-running.html:
11:50 AM Changeset in webkit [274054] by commit-queue@webkit.org
  • 5 edits in trunk

Use counters for pending events
https://bugs.webkit.org/show_bug.cgi?id=218556

Patch by Rob Buis <rbuis@igalia.com> on 2021-03-07
Reviewed by Ryosuke Niwa.

Source/WebCore:

Use counters for pending events instead of flags since
it is allowed to schedule multiple events:
https://html.spec.whatwg.org/multipage/images.html#update-the-image-data

  • loader/ImageLoader.cpp:

(WebCore::ImageLoader::ImageLoader):
(WebCore::ImageLoader::~ImageLoader):
(WebCore::ImageLoader::clearImageWithoutConsideringPendingLoadEvent):
(WebCore::ImageLoader::updateFromElement):
(WebCore::ImageLoader::notifyFinished):
(WebCore::ImageLoader::updatedHasPendingEvent):
(WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
(WebCore::ImageLoader::dispatchPendingLoadEvent):
(WebCore::ImageLoader::dispatchPendingErrorEvent):

  • loader/ImageLoader.h:

(WebCore::ImageLoader::hasPendingBeforeLoadEvent const):
(WebCore::ImageLoader::hasPendingActivity const):

LayoutTests:

The onerror can be called multiple times, after the first call
container will have no parent, so protect against that in
subsequent calls.

  • fast/dom/modify-node-and-while-in-the-callback-too-crash.html:
10:16 AM Changeset in webkit [274053] by weinig@apple.com
  • 6 edits in trunk/Source

Move new color(), lab() and lch() color functions behind runtime settings.
https://bugs.webkit.org/show_bug.cgi?id=222869

Reviewed by Simon Fraser.

Source/WebCore:

Add checking for new experimental feature flag for the new CSS Color 4 color types.

As the flag is on by default, there is no change in behavior. This is just to allow
ports to disable the feature if they need to.

  • css/parser/CSSParserContext.cpp:

(WebCore::operator==):

  • css/parser/CSSParserContext.h:

(WebCore::CSSParserContextHash::hash):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseHWBParameters):
(WebCore::CSSPropertyParserHelpers::parseLabParameters):
(WebCore::CSSPropertyParserHelpers::parseLCHParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForRGBTypes):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForLabParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForXYZParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunction):

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

Add experimental feature flag for the new CSS Color 4 color types.

9:41 AM Changeset in webkit [274052] by weinig@apple.com
  • 4 edits in trunk/Tools

Transition Cocoa DumpRenderTree to allow any preference keys, not just hard coded supported ones
https://bugs.webkit.org/show_bug.cgi?id=222868

Reviewed by Simon Fraser.

This allows any preference key in a WebPreference*.yaml to be used for Cocoa WebKitLegacy
tests in the comment header command, just like WebKitTestRunner.

  • DumpRenderTree/TestOptions.cpp:

(WTR::TestOptions::defaults):
Update defaults to only the default values that don't match
defaults in WebPreference*.yaml files and experimental features
that are not supported in but still declare support in the file.

  • DumpRenderTree/TestRunner.h:

Remove unimplemented function declaration.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(setWebPreferencesForTestOptions):
(setDefaultsToConsistentValuesForTesting):
(prepareConsistentTestingEnvironment):
(resetWebPreferencesToConsistentValues): Deleted.
(webPreferenceFeatureValue): Deleted.
Replace most explicit reseting with the combination of _resetForTesting, automatic
enabling experimental features, and use of _set<type>PreferenceForTestingWithValue
from TestOptions.

Mar 6, 2021:

9:35 PM Changeset in webkit [274051] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebKit

[WebAuthn] Expand WebAuthn Process's sandbox profile on iOS
https://bugs.webkit.org/show_bug.cgi?id=222858
<rdar://problem/74772012>

Reviewed by Brent Fulgham.

Allows WebAuthn process to use AAA again.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb:
9:11 PM Changeset in webkit [274050] by Alan Bujtas
  • 5 edits
    2 adds in trunk

Only positive integers are allowed as values of orphans and widows
https://bugs.webkit.org/show_bug.cgi?id=222875
<rdar://problem/72996948>

Reviewed by Ryosuke Niwa.

Source/WebCore:

See https://drafts.csswg.org/css-break-3/#widows-orphans

Test: fast/multicol/negative-widow-value-crash.html

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::widows const):
(WebCore::RenderStyle::orphans const):
(WebCore::RenderStyle::setWidows):
(WebCore::RenderStyle::setOrphans):
(WebCore::RenderStyle::initialWidows):
(WebCore::RenderStyle::initialOrphans):

  • rendering/style/StyleRareInheritedData.h:

LayoutTests:

  • fast/multicol/negative-widow-value-crash-expected.txt: Added.
  • fast/multicol/negative-widow-value-crash.html: Added.
9:04 PM Changeset in webkit [274049] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION(r274033) [GLIB] Bots exiting early after lots of failures due to render tree differences
https://bugs.webkit.org/show_bug.cgi?id=222878

Reviewed by Wenson Hsieh.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::requiresCompositingForModel const):
Invert the logic (to the sane direction, I have no idea why I typed it this way),
so that we don't require compositing for everything if ENABLE(MODEL_ELEMENT) is false.

6:37 PM Changeset in webkit [274048] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

[LFC][IFC] Provide a better estimate on the number of inline level boxes per line for LineBox.
https://bugs.webkit.org/show_bug.cgi?id=222821

Reviewed by Antti Koivisto.

Let's counting the number of inline level box on the line. It is a much better estimate than the number of runs even
if it misses some inline boxes when they span over multiple lines (the fail rate is ~1% on nytimes.com).

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::LineBoxBuilder::build):

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::initialize):
(WebCore::Layout::Line::appendInlineBoxStart):
(WebCore::Layout::Line::appendNonReplacedInlineLevelBox):
(WebCore::Layout::Line::appendLineBreak):

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::inlineLevelBoxCount const):

  • layout/inlineformatting/InlineLineBox.cpp:

(WebCore::Layout::LineBox::LineBox):

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

(WebCore::Layout::LineBuilder::layoutInlineContent):

  • layout/inlineformatting/InlineLineBuilder.h:
6:28 PM Changeset in webkit [274047] by rniwa@webkit.org
  • 2 edits in trunk/Websites/perf.webkit.org

[perf dashboard] Modernize TimeSeries and TimeSeriesView
https://bugs.webkit.org/show_bug.cgi?id=222872

Reviewed by Dewei Zhu.

Declare instance fields in class declarations, use const/let instead of var, and use generators
for forward and backward iterations instead of manually implementing the iterator protocol.

This patch also splits FilteredTimeSeriesView out of TimeSeriesView.

  • public/v3/models/time-series.js:

(TimeSeries): Moved the declaration of _data instance field to the class declaration.
(TimeSeries.prototype.constructor): Deleted.
(TimeSeries.prototype.extendToFuture):
(TimeSeries.prototype.valuesBetweenRange):
(TimeSeries.prototype.findById):
(TimeSeries.prototype.findPointAfterTime):
(TimeSeriesView): Declared the instance fields in the class declaration.
(TimeSeriesView.prototype.constructor): Removed filteredData from the argument since it's split
out to FilteredTimeSeriesView now.
(TimeSeriesView.prototype.get _data): Added. An abstraction needed for FilteredTimeSeriesView.
(TimeSeriesView.prototype._findIndexForPoint): Ditto. Moved out of the constructor.
(TimeSeriesView.prototype.filter): Return a FilteredTimeSeriesView.
(TimeSeriesView.prototype.viewTimeRange): Use _subRange to return either TimeSeriesView or
FilteredTimeSeriesView which ever is needed.
(TimeSeriesView.prototype._subRange): An abstraction needed for FilteredTimeSeriesView.
(TimeSeriesView.prototype.Symbol.iterator): Made this a generator instead of implementing
the iterator protocol directly.
(TimeSeriesView.prototype._reverse): Ditto.
(FilteredTimeSeriesView): Added.
(FilteredTimeSeriesView.prototype.constructor): Added. Assert that afterEndingIndex is less than
the length of the filtered data. This assertion was missing in TimeSeries prior to this patch
when filteredData is specified.
(FilteredTimeSeriesView.prototype.get _data): Added.
(FilteredTimeSeriesView.prototype._subRange): Added. Instantiate FilteredTimeSeriesView with
the same filtered data.
(FilteredTimeSeriesView.prototype._findIndexForPoint): Moved from TimeSeriesView's constructor.
(FilteredTimeSeriesView.prototype._buildPointIndexMap): Moved from TimeSeriesView.

6:25 PM Changeset in webkit [274046] by rniwa@webkit.org
  • 3 edits in trunk/Websites/perf.webkit.org

[perf dashboard] Some browser tests are flaky or failing
https://bugs.webkit.org/show_bug.cgi?id=222874

Reviewed by Dewei Zhu.

There were two tests in TimeSeriesChart tests that were intermittently failing due to the test
not reliably waiting for the iframe's resize to take effect and not waiting for the time series'
fetching logic to run 'til completion before waiting for canvas charts to be re-drawn. Fixing
these by adding code to wait for these conditons.

All browser tests for markup-component.js was broken in r274036 as require function is not
available in browsers. Added a workaround in BrowsingContext to add a make assert.ok function
using expect(~).to.be.true().

  • browser-tests/index.html:

(BrowsingContext.prototype.constructor):
(waitForElementResize): Added.

  • browser-tests/time-series-chart-tests.js: Fixed bugs in the tests.
5:02 PM Changeset in webkit [274045] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, reverting r274041.
https://bugs.webkit.org/show_bug.cgi?id=222873

Broke the build instead of fixing it

Reverted changeset:

"Fix the build"
https://trac.webkit.org/changeset/274041

4:27 PM Changeset in webkit [274044] by rniwa@webkit.org
  • 2 edits in trunk/Websites/perf.webkit.org

[perf dashboard] Modernize DataModelObject and LabeledObject
https://bugs.webkit.org/show_bug.cgi?id=222871

Reviewed by Dewei Zhu.

Use const/let instead of var, async/await instead of Promise.then, and Map instead
of a regular object for a dictionary.

Also define instance fields in the class declaration instead of simply adding them
in the class constructors, and set the default parameter values instead of relying
on the unspecified argument being undefined.

  • public/v3/models/data-model.js:

(DataModelObject.ensureSingleton):
(DataModelObject.namedStaticMap):
(DataModelObject.ensureNamedStaticMap):
(DataModelObject.findById):
(DataModelObject.listForStaticMap):
(DataModelObject.async cachedFetch):
(DataModelObject):
(LabeledObject.sortByName):
(DataModelObject.cachedFetch): Deleted.

4:25 PM Changeset in webkit [274043] by rniwa@webkit.org
  • 4 edits in trunk/Websites/perf.webkit.org

[perf dashboard] Modernize MeasurementSet
https://bugs.webkit.org/show_bug.cgi?id=222857

Reviewed by Dewei Zhu.

Modernized MeasurementSet by using new instance field syntax, let/const instead of var,
async/await instead of then/catch, and Map instead of an object as a dictionary.

  • public/v3/models/measurement-set.js:

(Array.prototype.includes): Deleted this polyfill which was needed for an old node.js.
(MeasurementSet): Moved the initialization of instance variables here. Also use Map
for this._allFetches instead of using a regular object as a dictionary.
(MeasurementSet.findSet): Use Map for MeasurementSet mapping.
(MeasurementSet.prototype.findClusters): Use const and let instead of var.
(MeasurementSet.prototype.async fetchBetween): Use async & await instead of Promise.then.
(MeasurementSet.prototype._ensureClusterPromise): Use let/const instead of var.
(MeasurementSet.prototype._urlForCache): Renamed from _constructUrl and removed the argument
for useCache since this function is now only used for feteching JSON caches.
(MeasurementSet.async _fetchPrimaryCluster): Use async/await and let/const. Consolidated
the API call to re-generate new JSON files and inlined API path here.
(MeasurementSet.async _fetchSecondaryCluster): Use async/await.
(MeasurementSet._addFetchedCluster): Use let/const instead of var.
(MeasurementSet.async fetchSegmentation): Use async/await and let/const.
(MeasurementSet.async _cachedClusterSegmentation): Ditto.
(MeasurementSet.prototype.async _invokeSegmentationAlgorithm): Ditto.

  • unit-tests/measurement-set-tests.js:

(beforeEach): Updated the logic to reset measurement sets since the static variable was
renamed in MeasurementSet.findSet above.

  • unit-tests/resources/mock-v3-models.js:

(MockModels.inject): Ditto.

11:09 AM Changeset in webkit [274042] by ddkilzer@apple.com
  • 3 edits in trunk/Tools

webkit-patch won't parse rdar://nnnnnnnn URLs in ChangeLogs
<https://webkit.org/b/222863>

Reviewed by Simon Fraser.

  • Scripts/webkitpy/common/checkout/changelog.py:

(ChangeLogEntry):

  • Update regex.
  • Scripts/webkitpy/common/checkout/changelog_unittest.py:

(test_fuzzy_radar_matchnone):

  • Move test cases that used to fail into another test.

(test_fuzzy_radar_match_format_without_context): Add.

  • Rename from test_fuzzy_radar_match_format_1().

(test_fuzzy_radar_match_format_1):

  • Rename to test_fuzzy_radar_match_format_without_context().

(test_fuzzy_radar_match_format_2):

  • Combine with test_fuzzy_radar_match_format_without_context().

(test_fuzzy_radar_match_format_with_context): Add.

  • Rename from test_fuzzy_radar_match_format_3().

(test_fuzzy_radar_match_format_3):

  • Rename to test_fuzzy_radar_match_format_with_context().
11:03 AM Changeset in webkit [274041] by mmaxfield@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix the build

Unreviewed.

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

10:45 AM Changeset in webkit [274040] by weinig@apple.com
  • 5 edits in trunk

Simplify DumpRenderTree WebPreferences reset
https://bugs.webkit.org/show_bug.cgi?id=218024
<rdar://problem/70764568>

Reviewed by Simon Fraser.

Source/WebKitLegacy/mac:

  • WebView/WebPreferences.mm:

(WebPreferencesPrivate::WebPreferencesPrivate):
(-[WebPreferences encodeWithCoder:]):
(-[WebPreferences _valueForKey:]):
(-[WebPreferences _setStringValue:forKey:]):
(-[WebPreferences _setStringArrayValueForKey:forKey:]):
(-[WebPreferences _setIntegerValue:forKey:]):
(-[WebPreferences _setUnsignedIntValue:forKey:]):
(-[WebPreferences _setFloatValue:forKey:]):
(-[WebPreferences _setBoolValue:forKey:]):
(-[WebPreferences _setLongLongValue:forKey:]):
(-[WebPreferences _setUnsignedLongLongValue:forKey:]):
(-[WebPreferences _startBatchingUpdates]):
(-[WebPreferences _stopBatchingUpdates]):
(-[WebPreferences _batchUpdatePreferencesInBlock:]):
(-[WebPreferences _resetForTesting]):
(-[WebPreferences _postPreferencesChangedNotification]):
(-[WebPreferences _postPreferencesChangedAPINotification]):
(-[WebPreferences _invalidateCachedPreferences]):
(WebPreferencesPrivate::~WebPreferencesPrivate): Deleted.

  • WebView/WebPreferencesPrivate.h:

Add new helpers for testing to reset and batch updates.

Tools:

Use new _batchUpdatePreferencesInBlock and _resetForTesting to simplify and
improve the performance of resetting preferences.

_batchUpdatePreferencesInBlock makes it so we only trigger the recalculation
of WebCore::Settings once per test, rather than linearly with the number of
settings that we reset.

_resetForTesting will allow us to remove explicit resetting of preferences
that use the existing default value (though this change does not utilize
that yet, to limit the number of changes in this commit).

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebPreferencesToConsistentValues):
(setWebPreferencesForTestOptions):
(resetWebViewToConsistentState):

10:21 AM Changeset in webkit [274039] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[RenderTreeBuilder] Invalidate beforeChild when parent changes to RubyBase
https://bugs.webkit.org/show_bug.cgi?id=222862
<rdar://problem/73659871>

Reviewed by Antti Koivisto.

Source/WebCore:

The beforeChild value becomes invalid when the ruby subtree requires a ruby base and the child is going to
be attached under this newly constrcuted ruby base (the child and the beforeChild will not end up in the same subtree).

Test: fast/ruby/crash-when-attaching-to-base.html

  • rendering/updating/RenderTreeBuilderRuby.cpp:

(WebCore::RenderTreeBuilder::Ruby::attach):

LayoutTests:

  • fast/ruby/crash-when-attaching-to-base-expected.txt: Added.
  • fast/ruby/crash-when-attaching-to-base.html: Added.
8:28 AM Changeset in webkit [274038] by graouts@webkit.org
  • 38 edits in trunk

Improve blending of Length and other Length-related types
https://bugs.webkit.org/show_bug.cgi?id=222816

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add an extra 153 PASS results. We now pass all the column-gap, row-gap, border-image-slice,
max-height and max-width interpolation tests.

  • web-platform-tests/css/css-align/animation/column-gap-composition-expected.txt:
  • web-platform-tests/css/css-align/animation/column-gap-interpolation-expected.txt:
  • web-platform-tests/css/css-align/animation/row-gap-composition-expected.txt:
  • web-platform-tests/css/css-align/animation/row-gap-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/background-position-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/background-position-origin-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/background-size-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/border-image-slice-interpolation-expected.txt:
  • web-platform-tests/css/css-backgrounds/animations/border-radius-interpolation-expected.txt:
  • web-platform-tests/css/css-box/animation/margin-bottom-composition-expected.txt:
  • web-platform-tests/css/css-box/animation/margin-left-composition-expected.txt:
  • web-platform-tests/css/css-box/animation/margin-right-composition-expected.txt:
  • web-platform-tests/css/css-box/animation/margin-top-composition-expected.txt:
  • web-platform-tests/css/css-box/animation/padding-bottom-composition-expected.txt:
  • web-platform-tests/css/css-box/animation/padding-left-composition-expected.txt:
  • web-platform-tests/css/css-box/animation/padding-right-composition-expected.txt:
  • web-platform-tests/css/css-box/animation/padding-top-composition-expected.txt:
  • web-platform-tests/css/css-flexbox/animation/flex-basis-composition-expected.txt:
  • web-platform-tests/css/css-position/animations/bottom-composition-expected.txt:
  • web-platform-tests/css/css-position/animations/left-composition-expected.txt:
  • web-platform-tests/css/css-position/animations/right-composition-expected.txt:
  • web-platform-tests/css/css-position/animations/top-composition-expected.txt:
  • web-platform-tests/css/css-shapes/animation/shape-margin-composition-expected.txt:
  • web-platform-tests/css/css-sizing/animation/max-height-composition-expected.txt:
  • web-platform-tests/css/css-sizing/animation/max-height-interpolation-expected.txt:
  • web-platform-tests/css/css-sizing/animation/max-width-composition-expected.txt:
  • web-platform-tests/css/css-sizing/animation/max-width-interpolation-expected.txt:
  • web-platform-tests/css/css-values/animations/calc-interpolation-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-001-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:

Source/WebCore:

We improve the blending behavior of a number of CSS properties that are represented as Length
or a type built upon Length, such as LengthSize, LengthBox or GapLength.

We remove the NonNegativeLengthPropertyWrapper class and instead allow LengthPropertyWrapper to
be passed some flags: one that indicates whether the CSS property supports <length-percentage>
values and one that indicates whether negative values are supported. We use those flags to
several CSS properties that are using LengthPropertyWrapper to ensure they have the correct
blending behavior.

We also take the code from the canInterpolateBetweenLengths lambda in LengthBoxPropertyWrapper's
canInterpolate override and refactor it into the canInterpolateLengths static method so that we
may use it across LengthPropertyWrapper and LengthVariantPropertyWrapper.

As for LengthVariantPropertyWrapper, we also update its canInterpolate() override to call into
type-specific static canInterpolateLengthVariants() methods which are implemented for LengthSize
and GapLength.

Finally, we update the blend() method for Length to return the from/to values as-is when progress
is 0 or 1, respectively.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):
(WebCore::canInterpolateLengths):
(WebCore::LengthPropertyWrapper::LengthPropertyWrapper):
(WebCore::canInterpolateLengthVariants):
(WebCore::LengthVariantPropertyWrapper::LengthVariantPropertyWrapper):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
(WebCore::NonNegativeLengthPropertyWrapper::NonNegativeLengthPropertyWrapper): Deleted.

  • platform/Length.cpp:

(WebCore::blend):

LayoutTests:

Adjust expectations of a couple of WPT tests with platform-specific results.

We also add console logging for a non-WPT test, transitions/transition-to-from-undefined.html, which tests
transitions between properties that cannot be interpolated and thus don't yield a transition.

  • platform/ios-wk2/imported/w3c/web-platform-tests/css/css-box/animation/padding-bottom-composition-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/css-box/animation/padding-top-composition-expected.txt:
  • transitions/transition-to-from-undefined-expected.txt:
6:42 AM Changeset in webkit [274037] by Alexey Shvayka
  • 18 edits
    3 adds
    4 deletes in trunk

BooleanConstructor should be inlined in DFG / FTL
https://bugs.webkit.org/show_bug.cgi?id=220322

Reviewed by Yusuke Suzuki.

JSTests:

Reorganize tests so the every UseKind / needsTypeCheck / invert combination is covered.

  • microbenchmarks/array-filter-boolean-constructor.js: Added.
  • stress/dfg-branch.js: Added.
  • stress/dfg-to-boolean.js: Added.
  • stress/logical-not-masquerades-as-undefined.js: Removed.
  • stress/logical-not-masquerades.js: Removed.
  • stress/logical-not.js: Removed.
  • stress/value-to-boolean.js: Removed.

Source/JavaScriptCore:

array.filter(Boolean) is a rather popular idiom for removing falsy items from an array.
Also, Boolean(X) is sometimes used for explicit type casting.

This patch introduces ToBoolean DFG node and reorganizes compileLogicalNot(node) into
compileToBoolean(node, bool invert), leveraging already existing emitConvertValueToBoolean().

This approach is better than emitting LogicalNot<KnownBooleanUse>(LogicalNot(X)) as it results
in cleaner DFG node tree and is ~7% faster w/o FTL. Also, it enables adding a op_to_boolean
bytecode that will be generated for very common !!X patterns, reducing instruction count.

Just as LogicalNot, BooleanConstructor should handle masquerader objects, because Annex B
patches ToBoolean abstract op [1], preventing us from emitting simpler code.

This change advances provided microbenchmark by 110%, and is neutral for other ToBoolean cases.

[1]: https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-to-boolean

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

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

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileToBooleanString):
(JSC::DFG::SpeculativeJIT::compileToBooleanStringOrOther):
(JSC::DFG::SpeculativeJIT::compileStringZeroLength): Deleted.
(JSC::DFG::SpeculativeJIT::compileLogicalNotStringOrOther): Deleted.

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

(JSC::DFG::SpeculativeJIT::compileToBooleanObjectOrOther):
(JSC::DFG::SpeculativeJIT::compileToBoolean):
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot): Deleted.
(JSC::DFG::SpeculativeJIT::compileLogicalNot): Deleted.

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compileToBooleanObjectOrOther):
(JSC::DFG::SpeculativeJIT::compileToBoolean):
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot): Deleted.
(JSC::DFG::SpeculativeJIT::compileLogicalNot): Deleted.

  • dfg/DFGWatchpointCollectionPhase.cpp:

(JSC::DFG::WatchpointCollectionPhase::handle):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileToBoolean):

6:31 AM Changeset in webkit [274036] by zhifei_fang@apple.com
  • 32 edits
    1 add in trunk/Websites/perf.webkit.org

Make server test run with new node version
https://bugs.webkit.org/show_bug.cgi?id=222463

Change assert.equal to assert.strictEqual since node deprecated this API
Add a new function console.assert to make sure it will throw an error

Reviewed by Ryosuke Niwa.

  • public/v3/models/repository.js:

(Repository.sortByNamePreferringOnesWithURL):
(Repository):

  • server-tests/admin-platforms-tests.js:
  • server-tests/admin-reprocess-report-tests.js:
  • server-tests/api-build-requests-tests.js:

(return.TestServer.remoteAPI.getJSON.string_appeared_here.then):

  • server-tests/api-commits-tests.js:

(assertCommitIsSameAsOneSubmitted):
(return.TestServer.remoteAPI.getJSON.string_appeared_here.then):

  • server-tests/api-manifest-tests.js:

(return.TestServer.remoteAPI.getJSON.string_appeared_here.then):

  • server-tests/api-measurement-set-tests.js:
  • server-tests/api-report-commits-tests.js:

(emptyReport.then):
(async initialReportCommits):
(async setUpTestsWithExpectedStatus):
(async testWithExpectedFailure):

  • server-tests/api-report-tests.js:

(emptyReport.then):

  • server-tests/api-test-groups.js:
  • server-tests/api-update-triggerable-tests.js:

(update.then):
(then.response.db.selectAll.string_appeared_here.then):
(then.db.selectAll.string_appeared_here.then):
(then.Manifest.fetch.then):

  • server-tests/api-upload-root-tests.js:
  • server-tests/api-uploaded-file-tests.js:

(return.TestServer.remoteAPI.getJSON.string_appeared_here.then):

  • server-tests/privileged-api-add-build-requests-tests.js:

(async createAnalysisTask):
(const.commitSet.of.updatedGroups.0.requestedCommitSets):

  • server-tests/privileged-api-create-analysis-task-tests.js:
  • server-tests/privileged-api-create-test-group-tests.js:

(createAnalysisTask):
(return.createAnalysisTask.string_appeared_here.then):
(return.addTriggerableAndCreateTask.string_appeared_here.then):
(string_appeared_here.then):

  • server-tests/privileged-api-upate-run-status.js:
  • server-tests/privileged-api-update-test-group-tests.js:

(async createAnalysisTask):

  • server-tests/privileged-api-upload-file-tests.js:

(TestServer.testConfig.uploadFileLimitInMB.1.then):

  • server-tests/resources/common-operations.js:

(async assertThrows):

  • server-tests/resources/temporary-file.js:

(TemporaryFile.makeTemporaryFileOfSizeInMB):

  • server-tests/tools-buildbot-triggerable-tests.js:

(assertRequestAndResolve):
(then.refetchManifest.then):
(getBuilderNameToIDMapPromise.then):

  • server-tests/tools-os-build-fetcher-tests.js:
  • server-tests/tools-sync-buildbot-integration-tests.js:

(assertAndResolveRequest):

  • tools/js/assert-override.js: Added.

(makeConsoleAssertThrow):

  • tools/js/buildbot-syncer.js:

(BuildbotBuildEntry.prototype.initialize):
(BuildbotBuildEntry.prototype.buildRequestStatusIfUpdateIsNeeded):
(BuildbotBuildEntry):
(BuildbotSyncer.prototype.scheduleRequest):
(BuildbotSyncer._loadConfig):
(BuildbotSyncer._parseRepositoryGroup):
(BuildbotSyncer._validateAndMergeConfig):
(BuildbotSyncer):

  • tools/js/buildbot-triggerable.js:

(BuildbotTriggerable.prototype._validateRequests):

  • tools/js/markup-component.js:

(const.MarkupDocument.new.MarkupDocument.prototype._idForClone):
(const.MarkupDocument.new.MarkupDocument.prototype.markup):

  • tools/js/os-build-fetcher.js:

(prototype._addOwnedCommitsForBuild):

  • tools/js/remote.js:

(NodeRemoteAPI.prototype.configure):

  • tools/js/v3-models.js:
  • unit-tests/commit-set-tests.js:
4:59 AM Changeset in webkit [274035] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[RenderTreeBuilder] Readjust the first child when it is the multicolumn container
https://bugs.webkit.org/show_bug.cgi?id=222851
<rdar://problem/73392642>

Reviewed by Simon Fraser.

Source/WebCore:

When a newly constructed renderer is supposed to be first child of its soon-to-be parent but
the parent establishes a multicolumn context (so its first child is a RenderMultiColumnFlow) this
renderer should be attached under the column container instead.

Test: fast/multicol/readjust-first-child-on-attach.html

  • rendering/updating/RenderTreeBuilderBlockFlow.cpp:

(WebCore::RenderTreeBuilder::BlockFlow::attach):

LayoutTests:

  • fast/multicol/readjust-first-child-on-attach-expected.txt: Added.
  • fast/multicol/readjust-first-child-on-attach.html: Added.
4:53 AM Changeset in webkit [274034] by dino@apple.com
  • 6 edits in trunk/Source

dlopen_preflight is failing (temporarily) but obsolete
https://bugs.webkit.org/show_bug.cgi?id=222829

Reviewed by Jer Noble.

I hit a bug where dlopen_preflight was failing in a particular build.
That is now fixed, but as I was discussing it with the dyld team
they said we should stop using it. The rationale was that it only
made sense during the PowerPC to Intel transition, and it is as
expensive as dlopen now.

Source/WebCore:

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

(WebCore::AVAssetMIMETypeCache::isAvailable const): Remove the preflight opening
of the AVFoundation framework.

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

(WebCore::AVStreamDataParserMIMETypeCache::isAvailable const):

Source/WTF:

  • wtf/PlatformUse.h: No need for preflight linking code.
  • wtf/cocoa/SoftLinking.h:
3:13 AM Changeset in webkit [274033] by timothy_horton@apple.com
  • 43 edits
    1 copy
    5 adds in trunk

<model> should create a model-owning compositing layer
https://bugs.webkit.org/show_bug.cgi?id=222798

Reviewed by Simon Fraser.

Source/JavaScriptCore:

  • inspector/protocol/LayerTree.json:

Add a compositing reason for <model>.

Source/WebCore:

Test: model-element/model-element-graphics-layers.html

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::setContentsToModel):

  • platform/graphics/Model.cpp: Added.

(WebCore::Model::create):
(WebCore::Model::Model):
(WebCore::operator<<):

  • platform/graphics/Model.h: Added.

(WebCore::Model::encode const):
(WebCore::Model::decode):
Add Model, a wrapper for the model.
For now, it just wraps a SharedBuffer.
In the future, it may contain other things, like file paths, identifiers, etc.

  • Modules/model-element/HTMLModelElement.cpp:

(WebCore::HTMLModelElement::model const):

  • Modules/model-element/HTMLModelElement.h:

HTMLModelElement can now vend a Model instead of just a SharedBuffer.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::createPlatformCALayer):
(WebCore::GraphicsLayerCA::setContentsToModel):

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

(WebCore::operator<<):

  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
Allow a GraphicsLayer to be given a Model as contents (as we do for e.g. Image and other things).
For simplicity's sake, and because anything more is unnecessary, just re-create
the ModelLayer when the model changes.

  • rendering/RenderBoxModelObject.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::contentChanged):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::RenderLayerBacking::contentChanged):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::requiresCompositingLayer const):
(WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
(WebCore::RenderLayerCompositor::reasonsForCompositing const):
(WebCore::RenderLayerCompositor::logReasonsForCompositing):
(WebCore::RenderLayerCompositor::requiresCompositingForModel const):

  • rendering/RenderLayerCompositor.h:
  • rendering/RenderModel.cpp:

(WebCore::RenderModel::requiresLayer const):
(WebCore::RenderModel::updateFromElement):
(WebCore::RenderModel::update):

  • rendering/RenderModel.h:

Require compositing for <model>, and add a custom layer type.

  • inspector/agents/InspectorLayerTreeAgent.cpp:

(WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
Add a compositing reason for <model>.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/LayerTreeDetailsSidebarPanel.js:

(WI.LayerTreeDetailsSidebarPanel.prototype._populateListOfCompositingReasons):
(WI.LayerTreeDetailsSidebarPanel):

  • UserInterface/Views/Layers3DContentView.js:

(WI.Layers3DContentView.prototype._updateReasonsList):
(WI.Layers3DContentView):
Add a compositing reason for <model>.

Source/WebKit:

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::display):

  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::encode const):
(WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::decode):
(WebKit::RemoteLayerTreeTransaction::description const):

  • SourcesCocoa.txt:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:

(WebKit::RemoteLayerTreeHost::makeNode):

  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:

(WebKit::RemoteLayerTreeHost::makeNode):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/RemoteLayerTree/GraphicsLayerCARemote.cpp:

(WebKit::GraphicsLayerCARemote::createPlatformCALayer):

  • WebProcess/WebPage/RemoteLayerTree/GraphicsLayerCARemote.h:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::create):
(WebKit::PlatformCALayerRemote::populateCreationProperties):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.h:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm:

(WebKit::PlatformCALayerRemoteCustom::populateCreationProperties):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteModelHosting.h: Added.
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteModelHosting.mm: Added.

(WebKit::PlatformCALayerRemoteModelHosting::create):
(WebKit::PlatformCALayerRemoteModelHosting::PlatformCALayerRemoteModelHosting):
(WebKit::PlatformCALayerRemoteModelHosting::clone const):
(WebKit::PlatformCALayerRemoteModelHosting::populateCreationProperties):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:

(WebKit::RemoteLayerTreeContext::layerDidEnterContext):
Create a new PlatformCALayerRemote subclass that knows about Model, and
passes its model along in the layer creation properties.

For now, the special model layer type will just make a plain layer.
Future patches will replace it with model-specific rendering.

LayoutTests:

  • model-element/model-element-graphics-layers-expected.txt: Added.
  • model-element/model-element-graphics-layers.html: Added.
  • model-element/model-element-renderer-expected.txt:
  • model-element/model-element-renderer-no-source-expected.txt:

Add a test ensuring that we make a compositing layer via layer dump, and update
existing tests that also happen to reveal this via render tree dump as well.

Mar 5, 2021:

11:52 PM Changeset in webkit [274032] by Said Abou-Hallawa
  • 2 edits in trunk/LayoutTests

[GPU Process] Tests under imported/blink/fast/canvas are now fixed by r273956
https://bugs.webkit.org/show_bug.cgi?id=222341

Reviewed by Said Abou-Hallawa.

  • gpu-process/TestExpectations:
10:33 PM Changeset in webkit [274031] by Wenson Hsieh
  • 8 edits in trunk/Source

[iOS] Implement additional accessibility support for image overlays
https://bugs.webkit.org/show_bug.cgi?id=222811
<rdar://problem/73203775>

Reviewed by Tim Horton and Devin Rousso.

Source/WebCore:

Add a helper method to check whether a given Node is a text node inside an image overlay. See WebKit ChangeLog
for more detail.

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::isImageOverlayText):

  • html/HTMLElement.h:

Source/WebKit:

Adds additional support for accessible image extraction. See below for more details.

  • UIProcess/ios/WKContentViewInteraction.h:

(WebKit::SuppressInteractionToken::SuppressInteractionToken): Deleted.
(WebKit::SuppressInteractionToken::~SuppressInteractionToken): Deleted.

Remove SuppressInteractionToken, along with its only use as a member on WKContentView. This was used to
temporarily suppress the image extraction interaction when editing, but is now no longer necessary, since we're
removing all dependence on this interaction object.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView setIsEditable:]):

Remove _suppressImageExtractionToken.

(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):

There's no need to cancel the regular text interaction in favor of the image extraction interaction after this
patch, since the former will be used for both. However, we do need to temporarily suppress regular text
interaction while image extraction is still pending, to avoid prematurely selecting the entire image element.

To do this, we keep track of the element pending image extraction (_elementPendingImageExtraction), and avoid
allowing text interactions to begin if we're over this exact element.

(-[WKContentView _singleTapIdentified:]):

We don't need to explicitly cancel the image extraction interaction on single tap anymore; this behavior will
automatically fall out of using default text interactions for image extraction.

(-[WKContentView _didStartProvisionalLoadForMainFrame]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):

Remove explicit image extraction cancellation here as well, and instead bail from the drag only if we're about
to proceed with the image extraction gesture (which is indicated by the argument to the completion handler).
See comment below.

(-[WKContentView _doAfterPendingImageExtraction:]):

Add an enum flag to the completion handler block here, to determine whether or not we'll want to immediately
proceed with image extraction. The value of this flag will be determined by the hit-test after updating the page
with image extraction results in WebPage::updateWithImageExtractionResult.

(-[WKContentView _invokeAllActionsToPerformAfterPendingImageExtraction:]):
(-[WKContentView _contextMenuInteraction:configurationForMenuAtLocation:completion:]):
(-[WKContentView _invokeAllActionsToPerformAfterPendingImageExtraction]): Deleted.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updateWithImageExtractionResult):

Remove a FIXME and implement hit-testing logic, to return whether or not the given location hit-tests to the
image overlay we've just injected.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::setFocusedFrameBeforeSelectingTextAtLocation):
(WebKit::elementPositionInformation):

Avoid extracting image data for a position information request, if the hit-tested node is actually a text node
in an image overlay, instead of an image.

(WebKit::selectionPositionInformation):
(WebKit::WebPage::positionInformation):

Allow text interactions to begin in user-agent shadow roots. This matches behavior on macOS, and was
(presumably) initially disallowed on iOS to avoid activating the editable text interaction
(UIWKTextInteractionAssistant), as opposed to block text selection interactions, when long pressing text
inside textareas and text fields. However, since we only use the normal text interaction assistant now for both
non-editable and editable text, this distinction no longer matters.

7:28 PM Changeset in webkit [274030] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, suppress warning as it is done in DFGOperations.cpp

We are intentionally using this feature to reduce size of JIT memory.

  • dfg/DFGOSRExit.cpp:
7:28 PM Changeset in webkit [274029] by rniwa@webkit.org
  • 3 edits in trunk/Source/WebCore

Inline isDisabledFormControl() in isDisabledOrReadOnly() by making it final rather than duplicating code
https://bugs.webkit.org/show_bug.cgi?id=222783

Reviewed by Simon Fraser.

Inline isDisabledFormControl into isDisabledOrReadOnly by making it final and defining in the header file
instead of manually duplicating the code as done in r272299.

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::isDisabledFormControl const): Deleted.

  • html/HTMLFormControlElement.h:

(WebCore::HTMLFormControlElement::isDisabledFormControl const): Moved the definition here.
(WebCore::HTMLFormControlElement::isDisabledOrReadOnly const): Call isDisabledFormControl instead of
duplicating the code as done in r272299.

7:14 PM Changeset in webkit [274028] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Replaced and non-replaced inline level box should not be called inline boxes.
https://bugs.webkit.org/show_bug.cgi?id=222817

Reviewed by Darin Adler.

Not every inline level box is an inline box (but every inline box is an inline level box).

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::append):
(WebCore::Layout::Line::appendNonReplacedInlineLevelBox):
(WebCore::Layout::Line::appendReplacedInlineLevelBox):
(WebCore::Layout::Line::appendNonReplacedInlineBox): Deleted.
(WebCore::Layout::Line::appendReplacedInlineBox): Deleted.

  • layout/inlineformatting/InlineLine.h:
6:56 PM Changeset in webkit [274027] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

[IPC Hardening] Protect against bad navigationID in WebPageProxy::didDestroyNavigation()
https://bugs.webkit.org/show_bug.cgi?id=222842
<rdar://problem/75119560>

Reviewed by Darin Adler.

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

(WebKit::WebPageProxy::didDestroyNavigation):

6:55 PM Changeset in webkit [274026] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Potential crash under NotificationPermissionRequestManagerProxy::invalidateRequests()
https://bugs.webkit.org/show_bug.cgi?id=222841

Reviewed by Darin Adler.

Make sure we copy the HashMap before iterating over it and calling deny() on the requests.

  • UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp:

(WebKit::NotificationPermissionRequestManagerProxy::invalidateRequests):

6:26 PM Changeset in webkit [274025] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

CanvasRenderingContext2DBase::canDrawTextWithParams() needs to resolve styles before using the drawingContext
https://bugs.webkit.org/show_bug.cgi?id=221257
<rdar://problem/73878095>

Reviewed by Ryosuke Niwa.

Simply call fontProxy() (which internally resolves styles) before calling drawingContext().

Test: fast/text/canvas-synchronous-events.html

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::canDrawTextWithParams):

6:25 PM Changeset in webkit [274024] by ysuzuki@apple.com
  • 10 edits in trunk/Source/JavaScriptCore

[JSC] Simplify OSRExit side state materialization
https://bugs.webkit.org/show_bug.cgi?id=222648

Reviewed by Keith Miller.

Currently, JIT probe with lambda function has memory leaking issue. So we must not use it in production code.
To avoid the future use, we rename probe to probeDebug.

And to avoid using probe function in OSR exit side state materialization, we simplify the OSRExit side state materialization code,
and making it just a function call. To achieve that, we materialize exit values into scratch buffer before restoring them to
the stack. This aligns DFG to what FTL is doing. And DFG and FTL can use the same materialization operation function.

Caio helped me to fix 32bit issue in DFG.

  • assembler/MacroAssembler.cpp:

(JSC::MacroAssembler::probeDebug):
(JSC::MacroAssembler::probe): Deleted.

  • assembler/MacroAssembler.h:
  • assembler/testmasm.cpp:

(JSC::testClearBits64WithMask):
(JSC::testClearBits64WithMaskTernary):
(JSC::testShiftAndAdd):
(JSC::testProbeReadsArgumentRegisters):
(JSC::testProbeWritesArgumentRegisters):
(JSC::testProbePreservesGPRS):
(JSC::testProbeModifiesStackPointer):
(JSC::testProbeModifiesProgramCounter):
(JSC::testProbeModifiesStackValues):

  • b3/air/testair.cpp:
  • dfg/DFGOSRExit.cpp:

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

  • dfg/DFGOSRExit.h:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::validateAIState):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • jit/JIT.cpp:

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

6:07 PM Changeset in webkit [274023] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore/PAL

[Win] Fix compile error
https://bugs.webkit.org/show_bug.cgi?id=222802
<rdar://problem/75052309>

Reviewed by Dean Jackson.

Declare CTFontTransformOptions if associated header file has not been included.

  • pal/spi/win/CoreTextSPIWin.h:
5:23 PM Changeset in webkit [274022] by Chris Dumez
  • 10 edits in trunk/Source

Update ApplicationCacheStorage::originsWithCache() to return a HashSet<SecurityOriginData> instead of a Vector<Ref<SecurityOrigin>>
https://bugs.webkit.org/show_bug.cgi?id=222828

Reviewed by Darin Adler.

Update ApplicationCacheStorage::originsWithCache() to return a HashSet<SecurityOriginData> instead of a Vector<Ref<SecurityOrigin>>.
Using a HashSet makes sure we do not return duplicates (which do occur as per ApplicationCacheStorage implementation) and makes typing
more consistent with other similar storage functions. Using SecurityOriginData is more lightweight and sufficient for our use cases.
It also takes care of a FIXME comment in WebsiteDataStore::fetchDataAndApply about switching to SecurityOriginData.

Source/WebCore:

  • loader/appcache/ApplicationCacheStorage.cpp:

(WebCore::ApplicationCacheStorage::calculateUsageForOrigin):
(WebCore::ApplicationCacheStorage::originsWithCache):
(WebCore::ApplicationCacheStorage::deleteCacheForOrigin):
(WebCore::ApplicationCacheStorage::diskUsageForOrigin):

  • loader/appcache/ApplicationCacheStorage.h:

Source/WebKit:

This patch also updates WebsiteDataStore::fetchDataAndApply() to crossThreadCopy() the securityOriginData before sending them from
the data store queue to the main thread. The previous code as sending SecurityOrigins and WebsiteData to the main thread without
any isolated copy, which was fragile and would not have been thread-safe if ApplicationCacheStorage::originsWithCache() had cached
the origins it returned for example.

Also update WebsiteDataStore::removeData() to make sure we crossThreadCopy() the origins before sending them from the main thread
to the data store queue. This code did not look thread-safe.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::fetchDataAndApply):
(WebKit::WebsiteDataStore::removeData):

  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:

(WKBundlePageClearApplicationCacheForOrigin):
(WKBundlePageGetAppCacheUsageForOrigin):
(WKBundlePageCopyOriginsWithApplicationCache):

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebApplicationCache.mm:

(+[WebApplicationCache diskUsageForOrigin:]):
(+[WebApplicationCache deleteCacheForOrigin:]):
(+[WebApplicationCache originsWithCache]):

  • WebCoreSupport/WebApplicationCacheQuotaManager.mm:

(-[WebApplicationCacheQuotaManager usage]):

5:03 PM Changeset in webkit [274021] by Chris Dumez
  • 15 edits in trunk/Source

Make HTMLMediaElement::clearMediaCacheForOrigins() take in SecurityOriginData objects
https://bugs.webkit.org/show_bug.cgi?id=222832

Reviewed by Geoffrey Garen.

Make HTMLMediaElement::clearMediaCacheForOrigins() take in SecurityOriginData instead of
SecurityOrigin objects. The call site has SecurityOriginData objects and there was a FIXME
comment about switching clearMediaCacheForOrigins() to SecurityOriginData.

SecurityOriginData also has the benefits of being lighter weight, and it can be sent over
IPC, while being sufficient for our use cases here.

Source/WebCore:

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::clearMediaCacheForOrigins):

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

(WebCore::MediaPlayer::clearMediaCacheForOrigins):

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayerFactory::clearMediaCacheForOrigins const):

  • platform/graphics/MediaPlayerPrivate.h:

(WebCore::MediaPlayerPrivateInterface::clearMediaCacheForOrigins):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins):

Source/WebKit:

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:

(WebKit::RemoteMediaPlayerManagerProxy::clearMediaCacheForOrigins):

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::removeData):

  • WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:

(WebKit::RemoteMediaPlayerManager::clearMediaCacheForOrigins):

  • WebProcess/GPU/media/RemoteMediaPlayerManager.h:
4:11 PM Changeset in webkit [274020] by rniwa@webkit.org
  • 5 edits in trunk/LayoutTests

Add leak tests for Range and StaticRange
https://bugs.webkit.org/show_bug.cgi?id=222786

Reviewed by Dean Jackson.

Added test cases for Range and StaticRange.

  • fast/dom/reference-cycle-leaks-expected.txt
  • fast/dom/reference-cycle-leaks.html:
  • platform/ios-wk2/fast/dom/reference-cycle-leaks-expected.txt:
  • platform/mac-wk2/fast/dom/reference-cycle-leaks-expected.txt:
4:10 PM Changeset in webkit [274019] by Chris Dumez
  • 15 edits in trunk/Source

Update HTMLMediaElement::originsInMediaCache() to return SecurityOriginData instead of SecurityOrigin objects
https://bugs.webkit.org/show_bug.cgi?id=222820

Reviewed by Darin Adler.

Update HTMLMediaElement::originsInMediaCache() to return SecurityOriginData instead of SecurityOrigin
objects. The caller only needs SecurityOriginData objects and there was a FIXME comment about switching
to SecurityOriginData. SecurityOriginData is beneficial here because it is a smaller object and it
can be easily passed over IPC.

Source/WebCore:

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::originsInMediaCache):

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

(WebCore::MediaPlayer::originsInMediaCache):

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayerFactory::originsInMediaCache const):

  • platform/graphics/MediaPlayerPrivate.h:

(WebCore::MediaPlayerPrivateInterface::originsInMediaCache):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::originsInMediaCache):

Source/WebKit:

Also update the code at WebsiteDataStore::fetchDataAndApply() to crossThreadCopy() the originDatas
before sending them to the main thread. The previous code was passing both the SecurityOrigins
and the WebsiteDatas from the data store queue to the main thread without isolated copy, which was
fragile. For example, if HTMLMediaElement::originsInMediaCache() was caching the security origins
it returned, the code would not have been thread safe.

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:

(WebKit::RemoteMediaPlayerManagerProxy::originsInMediaCache):

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::fetchDataAndApply):

  • WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:

(WebKit::RemoteMediaPlayerManager::originsInMediaCache):

  • WebProcess/GPU/media/RemoteMediaPlayerManager.h:
4:08 PM Changeset in webkit [274018] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Use WTF::DestructionThread::MainRunLoop for CallbackAggregators in WebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=222831

Reviewed by Geoffrey Garen.

Use WTF::DestructionThread::MainRunLoop for CallbackAggregators in WebsiteDataStore to make sure
the CallbackAggregators get destroyed on the main thread. Previously, the code was letting the
CallbackAggregators get destroyed on any thread and then dispatching to the main thread in their
destructor their WebsiteDataStore data member to make sure it gets destroyed on the main thread.

It is simpler and safer to have the CallbackAggregators get destroyed on the main thread.

Also add threading assertions whenever the pendingCallbacks is used since this counter is not
atomic.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::removeData):

4:08 PM Changeset in webkit [274017] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Fix potential thread safety issue in WebsiteDataStore::fetchDataAndApply()
https://bugs.webkit.org/show_bug.cgi?id=222830

Reviewed by Geoffrey Garen.

The previous code was passing SecurityOriginData objects from the data store queue to the main
thread without isolated copy. This code would not be thread-safe if the function we got the
origins from would keep a copy of the origins (e.g. caching). To make this more robust from a
thread-safety standpoint, we now crossThreadCopy() to origins before passing them to the main
thread.

I also updated these to construct the WebsiteData on the data store queue instead of the main
thread for consistency with other cases inside WebsiteDataStore::fetchDataAndApply().

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::fetchDataAndApply):

4:02 PM Changeset in webkit [274016] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Change test to not ASSERT in Debug
https://bugs.webkit.org/show_bug.cgi?id=221442

Patch by Rob Buis <rbuis@igalia.com> on 2021-03-05
Reviewed by Ryosuke Niwa.

Change test to not ASSERT in Debug.

  • ipc/pasteboard-write-custom-data.html:
3:49 PM Changeset in webkit [274015] by Devin Rousso
  • 3 edits in trunk/Source/WebCore

[Payment Request] expose dispatchIfShowing in MockPaymentCoordinator.cpp for WebKitAdditions
https://bugs.webkit.org/show_bug.cgi?id=222833
<rdar://problem/74525927>

Reviewed by Wenson Hsieh.

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

(WebCore::MockPaymentCoordinator::dispatchIfShowing): added.
(WebCore::dispatchIfShowing): Deleted.

3:47 PM Changeset in webkit [274014] by Russell Epstein
  • 5 edits in branches/safari-612.1.5-branch

Cherry-pick r273997. rdar://problem/75115235

Regression(r268097): WKWebView.URL is nil in the processDidTerminate delegate
https://bugs.webkit.org/show_bug.cgi?id=222809

Reviewed by Michael Catanzaro.

Source/WebKit:

There was a PageLoadState::Transaction in resetStateAfterProcessTermination() that
was previously making sure we would not clear the WebView's URL before calling the
processDidTerminate client delegate. Now that we call the client delegate in a
separate function (WebPageProxy::dispatchProcessDidTerminate), we need to make move
the PageLoadState::Transaction to the caller in
WebProcessProxy::processDidTerminateOrFailedToLaunch(), so that its scope covers
both resetStateAfterProcessTermination() & dispatchProcessDidTerminate() calls.

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::resetStateAfterProcessTermination):
  • UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm: (TEST):

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

3:47 PM Changeset in webkit [274013] by Russell Epstein
  • 2 edits in branches/safari-612.1.5-branch/Source/WebCore

Cherry-pick r273866. rdar://problem/75115229

Nulllptr crash in DeleteSelectionCommand::handleGeneralDelete()
https://bugs.webkit.org/show_bug.cgi?id=222681

Reviewed by Wenson Hsieh.

Skip the loop when m_downstreamEnd.isNull() or im_downstreamEnd.isOrphan() is true
to avoid dereferencing a nullptr.

No new tests since we don't have any reproduction for this crash,
and it's not obvious how we're getting into that state.

  • editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::handleGeneralDelete):

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

3:29 PM Changeset in webkit [274012] by Devin Rousso
  • 8 edits in trunk

[Payment Request] if requestShipping: false then we should not show any PaymentShippingOption in the Apple Pay sheet
https://bugs.webkit.org/show_bug.cgi?id=222810
<rdar://problem/74550889>

Reviewed by Andy Estes and Tim Horton.

Source/WebCore:

When constructing a PaymentRequest, the spec has logic for ensuring that shippingOptions
is an array by overriding [[details]].shippingOptions if requestShipping: true [1]. It
also won't update [[details]].shippingOptions unless update.ShippingOptions is provided
and requestShipping: true [2]. Currently, this means that if requestShipping: false, we
don't perform any validation of [[details]].shippingOptions and even provide that data to
the Apple Pay sheet. Since there is no way to look at the selected (or even the list of)
shipping option without requestShipping: true, we now clear [[details]].shippingOptions
if requestShipping: false.

[1]: https://www.w3.org/TR/payment-request/#constructor
[2]: https://www.w3.org/TR/payment-request/#update-a-paymentrequest-s-details-algorithm

  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::checkAndCanonicalizeDetails):

LayoutTests:

  • http/tests/inspector/paymentrequest/payment-request-internal-properties.https.html:
  • http/tests/inspector/paymentrequest/payment-request-internal-properties.https-expected.txt:
  • http/tests/paymentrequest/updateWith-shippingOptions.https.html:
  • http/tests/ssl/applepay/PaymentRequest.https.html:
  • http/tests/ssl/applepay/PaymentRequest.https-expected.txt:
3:07 PM Changeset in webkit [274011] by commit-queue@webkit.org
  • 9 edits
    4 moves in trunk

[GTK] Clean up GTK-specific text checker stuff
https://bugs.webkit.org/show_bug.cgi?id=222818

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-03-05
Reviewed by Don Olmstead.

Source/WebKit:

This moves the GTK-specific classes WebTextChecker and WebTextCheckerClient into
GTK-specific directories.

This also moves most of WKTextChecker, except for WKTextCheckerSetTestingMode, which is
cross-platform. This is not quite how we normally do it -- normally we try to have one
cross-platform header with platform-specific conditionals and only separate out platform-
specific source files -- but in this case the header is almost entirely GTK-specific, so it
makes sense to do it this way.

This also exposes WKTextCheckerSetContinuousSpellCheckingEnabled and uses it in
UIScriptControllerGtk, which is needed for bug #181916.

This code is all pretty messy, especially the WKTextCheckerClient (which actually has its
own WKTextCheckerSetContinuousSpellCheckingEnabled!), but now it's a *platform-specific*
mess, which is a small improvement.

  • SourcesGTK.txt:
  • UIProcess/API/C/WKTextChecker.cpp:

(WKTextCheckerSetTestingMode):
(WKTextCheckerSetClient): Deleted.
(WKTextCheckerContinuousSpellCheckingEnabledStateChanged): Deleted.
(WKTextCheckerGrammarCheckingEnabledStateChanged): Deleted.
(WKTextCheckerCheckSpelling): Deleted.
(WKTextCheckerChangeSpellingToWord): Deleted.

  • UIProcess/API/C/WKTextChecker.h:
  • UIProcess/API/C/gtk/WKTextCheckerGtk.cpp:

(WKTextCheckerSetClient):
(WKTextCheckerContinuousSpellCheckingEnabledStateChanged):
(WKTextCheckerGrammarCheckingEnabledStateChanged):
(WKTextCheckerCheckSpelling):
(WKTextCheckerChangeSpellingToWord):
(WKTextCheckerSetContinuousSpellCheckingEnabled):

  • UIProcess/API/C/gtk/WKTextCheckerGtk.h:
  • UIProcess/gtk/WebTextChecker.cpp: Renamed from Source/WebKit/UIProcess/WebTextChecker.cpp.

(WebKit::WebTextChecker::singleton):
(WebKit::WebTextChecker::WebTextChecker):
(WebKit::WebTextChecker::setClient):
(WebKit::updateStateForAllContexts):
(WebKit::WebTextChecker::continuousSpellCheckingEnabledStateChanged):
(WebKit::WebTextChecker::grammarCheckingEnabledStateChanged):
(WebKit::WebTextChecker::checkSpelling):
(WebKit::WebTextChecker::changeSpellingToWord):

  • UIProcess/gtk/WebTextChecker.h: Renamed from Source/WebKit/UIProcess/WebTextChecker.h.

(WebKit::WebTextChecker::client):

  • UIProcess/gtk/WebTextCheckerClient.cpp: Renamed from Source/WebKit/UIProcess/WebTextCheckerClient.cpp.

(WebKit::WebTextCheckerClient::continuousSpellCheckingAllowed):
(WebKit::WebTextCheckerClient::continuousSpellCheckingEnabled):
(WebKit::WebTextCheckerClient::setContinuousSpellCheckingEnabled):
(WebKit::WebTextCheckerClient::grammarCheckingEnabled):
(WebKit::WebTextCheckerClient::setGrammarCheckingEnabled):
(WebKit::WebTextCheckerClient::uniqueSpellDocumentTag):
(WebKit::WebTextCheckerClient::closeSpellDocumentWithTag):
(WebKit::WebTextCheckerClient::checkSpellingOfString):
(WebKit::WebTextCheckerClient::checkGrammarOfString):
(WebKit::WebTextCheckerClient::spellingUIIsShowing):
(WebKit::WebTextCheckerClient::toggleSpellingUIIsShowing):
(WebKit::WebTextCheckerClient::updateSpellingUIWithMisspelledWord):
(WebKit::WebTextCheckerClient::updateSpellingUIWithGrammarString):
(WebKit::WebTextCheckerClient::guessesForWord):
(WebKit::WebTextCheckerClient::learnWord):
(WebKit::WebTextCheckerClient::ignoreWord):

  • UIProcess/gtk/WebTextCheckerClient.h: Renamed from Source/WebKit/UIProcess/WebTextCheckerClient.h.

Tools:

  • WebKitTestRunner/gtk/TestControllerGtk.cpp:
  • WebKitTestRunner/gtk/UIScriptControllerGtk.cpp:

(WTR::UIScriptControllerGtk::setContinuousSpellCheckingEnabled):

2:56 PM Changeset in webkit [274010] by commit-queue@webkit.org
  • 4 edits in trunk

[GTK] Remove ADD_WHOLE_ARCHIVE_TO_LIBRARIES
https://bugs.webkit.org/show_bug.cgi?id=222826

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-03-05
Reviewed by Don Olmstead.

.:

I don't know why it's no longer needed, but GTK links without it, so it can go away.

  • Source/cmake/OptionsGTK.cmake:

Tools:

  • TestWebKitAPI/PlatformGTK.cmake:
2:34 PM Changeset in webkit [274009] by Jonathan Bedard
  • 2 edits in trunk/Tools

[webkitscmpy] Standardize timezone of mock svn server (Follow-up)
https://bugs.webkit.org/show_bug.cgi?id=222762
<rdar://problem/75058478>

Unreviewed follow-up fix.

  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/svn.py:

(Svn.request): Only import dateutils when using it.

2:31 PM Changeset in webkit [274008] by Alan Bujtas
  • 4 edits
    2 adds in trunk

word-wrap/overflow-wrap "overwrite" hyphens
https://bugs.webkit.org/show_bug.cgi?id=222548
<rdar://problem/75061741>

Reviewed by Antti Koivisto.

Source/WebCore:

According to https://drafts.csswg.org/css-text-3/#overflow-wrap-property

"overflow-wrap/word-wrap property specifies whether the UA may break at otherwise disallowed points within a line to prevent overflow,
when an otherwise-unbreakable string is too long to fit within the line box."

which means that in case of "hyphen: auto", we should only try to break the content at arbitrary position when there's no prior hyphenation opportunity.
This patch turns WordBreakRule into and OptionSet so that we can put both the hyphenation and arbitrary position break runles in there and prioritize them
in tryBreakingTextRun (check for the hyphenation value first/break the content at hyphenation position and do arbitrary position only
if no hyphenation opportunities are found).

Test: fast/inline/hyphenation-when-overflow-wrap-is-break-word.html

  • layout/inlineformatting/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::wordBreakBehavior const):
(WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const):

  • layout/inlineformatting/InlineContentBreaker.h:

LayoutTests:

  • fast/inline/hyphenation-when-overflow-wrap-is-break-word-expected.html: Added.
  • fast/inline/hyphenation-when-overflow-wrap-is-break-word.html: Added.
2:28 PM Changeset in webkit [274007] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

REGRESSION (r269627?): ASSERTION FAILED: &layoutState().establishedFormattingState(layoutBox.formattingContextRoot()) == this in WebCore::Layout::FormattingState::boxGeometry
https://bugs.webkit.org/show_bug.cgi?id=219905

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Skip this test on debug since it frequently asserts.
1:37 PM Changeset in webkit [274006] by Russell Epstein
  • 1 copy in tags/Safari-612.1.6.1

Tag Safari-612.1.6.1.

1:35 PM Changeset in webkit [274005] by Russell Epstein
  • 8 edits in branches/safari-612.1.6-branch/Source

Versioning.

WebKit-7612.1.6.1

1:21 PM WebKitGTK/2.32.x edited by Michael Catanzaro
(diff)
1:21 PM Changeset in webkit [274004] by Russell Epstein
  • 1 copy in tags/Safari-612.1.6

Tag Safari-612.1.6.

1:18 PM Changeset in webkit [274003] by Russell Epstein
  • 1 delete in tags/Safari-612.1.6

Delete tag.

1:16 PM Changeset in webkit [274002] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ macOS wk2 ] fast/selectors/selection-window-inactive-text-shadow.html flakey image failure
https://bugs.webkit.org/show_bug.cgi?id=221011

Uneviewed test gardening.

  • platform/mac-wk2/TestExpectations: Updating test expectations to Pass ImageOnlyFailure until test is fixed.
1:15 PM Changeset in webkit [274001] by Russell Epstein
  • 1 copy in branches/safari-612.1.6-branch

New branch.

1:11 PM Changeset in webkit [274000] by Russell Epstein
  • 1 copy in tags/Safari-612.1.6

Tag Safari-612.1.6.

1:11 PM Changeset in webkit [273999] by Jonathan Bedard
  • 6 edits in trunk/Tools

[run-webkit-tests] Delete old results server code
https://bugs.webkit.org/show_bug.cgi?id=222393
<rdar://problem/74722220>

Rubber-stamped by Alexey Proskuryakov.

  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager._end_test_run): Remove upload code.
(Manager._save_json_files): Renamed from _upload_json_files.
(Manager._upload_json_files): Renamed to _save_json_files.
(Manager.upload_results): Deleted.

  • Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:

(JSONLayoutResultsGenerator.init): Remove buildbot arguments.

  • Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:

(JSONResultsGenerator):
(JSONResultsGenerator.init): Remove buildbot arguments.
(JSONResultsGenerator.get_json): Remove concept of builder.
(JSONResultsGenerator.upload_json_files): Deleted.
(JSONResultsGenerator._get_svn_revision): Deleted.
(JSONResultsGenerator._get_archived_json_results): Deleted.
(JSONResultsGenerator._insert_generic_metadata): Deleted.
(JSONResultsGenerator._convert_json_to_current_version): Deleted.
(JSONResultsGenerator._convert_tests_to_trie): Deleted.
(JSONResultsGenerator._remove_items_over_max_number_of_builds): Deleted.
(JSONResultsGenerator._normalize_results_json): Deleted.
(JSONResultsGenerator._is_results_all_of_type): Deleted.

  • Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py:

(JSONGeneratorTest.setUp):
(JSONGeneratorTest._test_json_generation):
(JSONGeneratorTest._verify_json_results):

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(parse_args): Remove arguments used to upload to old results database.

1:09 PM Changeset in webkit [273998] by Russell Epstein
  • 8 edits in trunk/Source

Versioning.

WebKit-7612.1.7

12:53 PM Changeset in webkit [273997] by Chris Dumez
  • 5 edits in trunk

Regression(r268097): WKWebView.URL is nil in the processDidTerminate delegate
https://bugs.webkit.org/show_bug.cgi?id=222809

Reviewed by Michael Catanzaro.

Source/WebKit:

There was a PageLoadState::Transaction in resetStateAfterProcessTermination() that
was previously making sure we would not clear the WebView's URL before calling the
processDidTerminate client delegate. Now that we call the client delegate in a
separate function (WebPageProxy::dispatchProcessDidTerminate), we need to make move
the PageLoadState::Transaction to the caller in
WebProcessProxy::processDidTerminateOrFailedToLaunch(), so that its scope covers
both resetStateAfterProcessTermination() & dispatchProcessDidTerminate() calls.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::resetStateAfterProcessTermination):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:

(TEST):

12:49 PM Changeset in webkit [273996] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

Fix potential thread-safety issue in WebsiteDataStore::fetchDataAndApply()
https://bugs.webkit.org/show_bug.cgi?id=222807

Reviewed by Geoffrey Garen.

Fix an issue when WebsiteDataStore::fetchDataAndApply() failed to create an isolated
copy of the WebsiteDataRecords before passing them to its internal dispatch queue.
Also add more threading assertions to help catch issues since we have crashes in this
area of the code.

  • UIProcess/WebsiteData/WebsiteDataRecord.cpp:

(WebKit::WebsiteDataRecord::isolatedCopy const):

  • UIProcess/WebsiteData/WebsiteDataRecord.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::fetchDataAndApply):

12:47 PM Changeset in webkit [273995] by Ryan Haddad
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix the build with recent SDKs.

  • UIProcess/ios/fullscreen/WKFullScreenViewController.mm:

(-[WKFullScreenViewController loadView]):

12:24 PM Changeset in webkit [273994] by Robert Jenner
  • 3 edits in trunk/LayoutTests

[ iOS/macOS wk2 ] imported/w3c/web-platform-tests/webrtc/protocol/candidate-exchange.https.html is a flakey text failure
https://bugs.webkit.org/show_bug.cgi?id=222808

Uneviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations: Updating test expectations as Pass Failure unti test can be fixed.
  • platform/mac-wk2/TestExpectations: Updating test expectations as Pass Failure unti test can be fixed.
12:00 PM Changeset in webkit [273993] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

Don't open a new window in MiniBrowser if already opening a file from the command line
https://bugs.webkit.org/show_bug.cgi?id=222776

Patch by Cameron McCormack <Cameron McCormack> on 2021-03-05
Reviewed by Dean Jackson.

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

(-[BrowserAppDelegate init]):
(-[BrowserAppDelegate applicationDidFinishLaunching:]):
(-[BrowserAppDelegate application:openFile:]):

11:54 AM Changeset in webkit [273992] by Nikita Vasilyev
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: border color of "grid" badge should match color of corresponding outline
https://bugs.webkit.org/show_bug.cgi?id=222747
<rdar://problem/75042342>

Reviewed by BJ Burg.

  • UserInterface/Views/DOMTreeElement.css:

(.tree-outline.dom .badge-css-grid):
Drive-by: decrease the font size and align the badge in the middle of the selected tree element (i.e. keep 1px space
above and below the badge).

(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.selected .badge-css-grid):
(@media (prefers-color-scheme: dark) .tree-outline.dom .badge-css-grid):

  • UserInterface/Views/DOMTreeElement.js:

(WI.DOMTreeElement.prototype._updateGridBadgeStatus):
For text and background color, only use the hue of the selected color to keep "grid" text always readable.

11:51 AM Changeset in webkit [273991] by Ruben Turcios
  • 11 edits in branches/safari-612.1.5-branch/Source/WebCore

Cherry-pick r273935. rdar://problem/75101642

"precustomized" state of custom elements can become HTMLUnknownElement
https://bugs.webkit.org/show_bug.cgi?id=221652

Reviewed by Darin Adler.

The bug was caused by createJSHTMLWrapper in JSHTMLElementWrapperFactory.cpp relying on
!isCustomElementUpgradeCandidate() to create HTMLUnknownElement as JS wrapper of the element.

This is problematic after r266269 since that change re-purposes CustomElementState::Failed
on a custom element as "precustomized" state instead of introducing another enum value in
CustomElementState as RareDataBitFields has no more bits available.

This patch fixes the problem by introducing a new NodeFlag::IsUnknownElement and using that
to check whether JSHTMLUnknownElement should be created for a given element or not. Note that
HTMLElement had a virtual function, isHTMLUnknownElement, to check this condition but invoking
a virtual function proved to incur too much runtime cost.

  • dom/Node.h: (WebCore::Node::isUnknownElement const): Added. (WebCore::Node::isHTMLUnknownElement const): Added. (WebCore::Node::isSVGUnknownElement const): Added. (WebCore::Node::isMathMLUnknownElement const): Added. (WebCore::Node::NodeFlag): Added NodeFlag::IsUnknownElement.
  • dom/make_names.pl: (printWrapperFactoryCppFile): Treat the element as HTMLUnknownElement only if isUnknownElement returns true instead of isCustomElementUpgradeCandidate returning false.
  • html/HTMLElement.h: (WebCore::HTMLElement::isHTMLUnknownElement const): Deleted.
  • html/HTMLUnknownElement.h:
  • mathml/MathMLElement.cpp: (WebCore::MathMLElement::MathMLElement): Added ConstructionType as an argument.
  • mathml/MathMLElement.h:
  • mathml/MathMLUnknownElement.h: (WebCore::MathMLUnknownElement::MathMLUnknownElement): Set NodeFlag::IsUnknownElement.
  • svg/SVGElement.cpp: (WebCore::SVGElement::SVGElement): Added ConstructionType as an argument.
  • svg/SVGElement.h:
  • svg/SVGUnknownElement.h: (WebCore::SVGUnknownElement::SVGUnknownElement): Set NodeFlag::IsUnknownElement.

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

11:51 AM Changeset in webkit [273990] by Ruben Turcios
  • 2 edits in branches/safari-612.1.5-branch/Source/WebKit

Cherry-pick r273543. rdar://problem/75101709

REGRESSION (r269824): macCatalyst WKWebView shows chunks of other tiles in the middle of content
https://bugs.webkit.org/show_bug.cgi?id=222460
<rdar://problem/74102753>

Reviewed by Simon Fraser.

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer): Reinstate some code that was accidentally deleted in r269824 that ensures that we do not use an in-use IOSurface as our front buffer, so that we don't paint into it while it's being composited in the render server.

Also, add some comments, since this code is all a little confusing
with its fronts and backs.

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

11:51 AM Changeset in webkit [273989] by Ruben Turcios
  • 2 edits in branches/safari-612.1.5-branch/Source/WebCore

Cherry-pick r273498. rdar://problem/75101801

[iOS] Crash when playing Dolby Atmos audio tracks with AVAudioTimePitchAlgorithmTimeDomain
https://bugs.webkit.org/show_bug.cgi?id=222420
<rdar://74612532>

Reviewed by Eric Carlson.

CoreAudio throws an assertion when using the TimeDomain pitch-correction algorithm on tracks
with > 2 channels. To work around this assertion for now, only set the pitch-correction
algorithm when the playbackRate is set to a non 0 or 1 value.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::audioTimePitchAlgorithmForMediaPlayerPitchCorrectionAlgorithm): (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): (WebCore::MediaPlayerPrivateAVFoundationObjC::setPlayerRate): (WebCore::MediaPlayerPrivateAVFoundationObjC::setPreservesPitch): (WebCore::MediaPlayerPrivateAVFoundationObjC::setPitchCorrectionAlgorithm): (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatusDidChange):

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

11:51 AM Changeset in webkit [273988] by Ruben Turcios
  • 5 edits in branches/safari-612.1.5-branch/Source/WebKit

Cherry-pick r273286. rdar://problem/75101889

[Cocoa] Send sandbox extensions for Network Extension services in load parameters
https://bugs.webkit.org/show_bug.cgi?id=222284
<rdar://problem/74402532>

Reviewed by Brent Fulgham.

Currently, sandbox extensions for Network Extension services are sent from the UI process to the WebContent process when the
policy decision is made, but that is not soon enough in all cases. They should also be sent as part of the load parameters.

  • Shared/Cocoa/LoadParametersCocoa.mm: (WebKit::LoadParameters::platformEncode const): (WebKit::LoadParameters::platformDecode):
  • Shared/LoadParameters.h:
  • UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::addPlatformLoadParameters):
  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm: (WebKit::WebPage::platformDidReceiveLoadParameters):

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

11:49 AM Changeset in webkit [273987] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews] Add python 3 support in send_email
https://bugs.webkit.org/show_bug.cgi?id=222806

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/send_email.py:

(send_email):

11:26 AM Changeset in webkit [273986] by Lauro Moura
  • 2 edits in trunk/Source/WebCore

Canvas: drawImage should normalize srcRect before checking if it's empty
https://bugs.webkit.org/show_bug.cgi?id=222774

Reviewed by Dean Jackson.

From 4.12.5.1.14 Drawing images, step 4:

"The source rectangle is the rectangle whose corners are the four
points (sx, sy), (sx+sw, sy), (sx+sw, sy+sh), (sx, sy+sh)."

When a negative height/width is given, e.g. y:100 and height:-50, it
should be treated like the rect with y:50, height: 50 (i.e. normalized), to
avoid FloatRect:isEmpty returning true.

Covered by existing test:

imported/w3c/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.html

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::drawImage):

11:19 AM Changeset in webkit [273985] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[GPUP] Test platform/mac/media/encrypted-media/fps-encrypted-event.html times out when media in GPU Process is enabled
https://bugs.webkit.org/show_bug.cgi?id=221847

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: The test is frequently failing on EWS, so re-add a timeout expectation.
11:12 AM Changeset in webkit [273984] by don.olmstead@sony.com
  • 13 edits in trunk

[CMake] Bump cmake_minimum_required version to 3.12 or later
https://bugs.webkit.org/show_bug.cgi?id=221727
<rdar://problem/74454980>

Reviewed by Konstantin Tokarev.

.:

Updates the minimum version to 3.12. In CMake 3.12 OBJECT library functionality was
expanded to the point where they can successfully be used as a replacement for
--whole-archive within WebKit. The check in JSCOnly for the minimum version before
using hidden visibility was removed accordingly.

  • CMakeLists.txt:
  • Source/cmake/OptionsJSCOnly.cmake:

Source/JavaScriptCore:

Sync cmake_minimum_required version for AppleWin internal builds.

  • CMakeLists.txt:

Source/WebCore:

Sync cmake_minimum_required version for AppleWin internal builds.

  • CMakeLists.txt:

Source/WebKitLegacy:

Sync cmake_minimum_required version for AppleWin internal builds.

  • CMakeLists.txt:

Source/WebKitLegacy/win:

Sync cmake_minimum_required version for AppleWin internal builds.

  • WebKitQuartzCoreAdditions/CMakeLists.txt:

Source/WTF:

Sync cmake_minimum_required version for AppleWin internal builds.

  • CMakeLists.txt:
10:53 AM Changeset in webkit [273983] by Matt Lewis
  • 2 edits in trunk/Tools

Unreviewed Dashboard Fix.

  • CISupport/build-webkit-org/public_html/dashboard/Scripts/WebKitBuildbot.js:

(WebKitBuildbot):

10:51 AM Changeset in webkit [273982] by Simon Fraser
  • 3 edits
    2 adds in trunk

sticky position incorrect behavior in table with dir=RTL
https://bugs.webkit.org/show_bug.cgi?id=221624
<rdar://problem/74403616>

Reviewed by Zalan Bujtas.
Source/WebCore:

We use scroll offsets when computing sticky constraints, so we should also use them
when computing layer positions in the scrolling tree.

Test: fast/css/sticky/sticky-in-rtl-overflow.html

  • page/scrolling/cocoa/ScrollingTreeStickyNode.mm:

(WebCore::ScrollingTreeStickyNode::computeLayerPosition const):

LayoutTests:

  • fast/css/sticky/sticky-in-rtl-overflow-expected.html: Added.
  • fast/css/sticky/sticky-in-rtl-overflow.html: Added.
10:34 AM Changeset in webkit [273981] by jonlee@apple.com
  • 2 edits in trunk/LayoutTests

[GPUP] Test fast/mediacapturefromelement/CanvasCaptureMediaStream-webgl-events.html times out when media in GPU Process is enabled
https://bugs.webkit.org/show_bug.cgi?id=221794

Reviewed by Dean Jackson.

  • platform/wk2/TestExpectations: Remove expectation now that it passes on the bots.
10:15 AM Changeset in webkit [273980] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews] Run ews unit-tests with Python 3
https://bugs.webkit.org/show_bug.cgi?id=222800

Reviewed by Jonathan Bedard.

  • CISupport/ews-build/steps.py:

(RunEWSUnitTests):

  • CISupport/ews-build/steps_unittest.py: Updated unit-tests.
10:07 AM Changeset in webkit [273979] by Razvan Caliman
  • 2 edits in trunk/Tools

Mark myself as committer in contributors.json.

Unreviewed.

  • Scripts/webkitpy/common/config/contributors.json:
9:55 AM Changeset in webkit [273978] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ Big Sur Wk2 ] imported/w3c/web-platform-tests/server-timing/server_timing_header-parsing.https.html is flakey text failing
https://bugs.webkit.org/show_bug.cgi?id=221487

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations: Updating flakey test expectations to Pass Failure until test can be fixed.
9:43 AM Changeset in webkit [273977] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

Refactor CSSPropertyAnimation to specify fewer wrappers and use value() functions
https://bugs.webkit.org/show_bug.cgi?id=222751

Reviewed by Dean Jackson.

We clean up CSSPropertyAnimation by removing a few dedicated wrappers which added little value
over passing in parameters to existing wrappers: PropertyWrapperColor, PropertyWrapperAcceleratedOpacity,
PropertyWrapperAcceleratedTransform, PropertyWrapperScale, PropertyWrapperRotate and PropertyWrapperTranslate
are out. For most of those we introduce the new AcceleratedPropertyWrapper to replace them.

Additionally, there is a value() method that can be used instead of using m_getter in lots of places,
which makes the code much more readable.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::AcceleratedPropertyWrapper::AcceleratedPropertyWrapper):
(WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
(WebCore::PropertyWrapperColor::PropertyWrapperColor): Deleted.
(WebCore::PropertyWrapperAcceleratedOpacity::PropertyWrapperAcceleratedOpacity): Deleted.
(WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform): Deleted.

9:38 AM Changeset in webkit [273976] by Jonathan Bedard
  • 5 edits in trunk/Tools

[webkitscmpy] Correct BitBucket timestamp conversion
https://bugs.webkit.org/show_bug.cgi?id=222766
<rdar://problem/75063548>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/bitbucket.py:

(BitBucket.request): Bitbucket timestamps are in milliseconds.

  • Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py:

(BitBucket.commit): Bitbucket timestamps are in milliseconds.

9:20 AM Changeset in webkit [273975] by jonlee@apple.com
  • 2 edits in trunk/LayoutTests

[GPUP] Test fast/mediastream/media-element-current-time.html fails when media in GPU Process is enabled
https://bugs.webkit.org/show_bug.cgi?id=221826

Reviewed by Dean Jackson.

  • platform/mac-wk2/TestExpectations: Remove expectation since the test passes on the bots.
9:16 AM Changeset in webkit [273974] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

[LFC][IFC] Transition LineBox::InlineLevelBoxList from a list of std::unique_ptr<InlineLevelBox> to a list of InlineLevelBox objects
https://bugs.webkit.org/show_bug.cgi?id=222761

Reviewed by Antti Koivisto.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::LineBoxBuilder::constructAndAlignInlineLevelBoxes):
(WebCore::Layout::LineBoxBuilder::computeLineBoxHeightAndAlignInlineLevelBoxesVertically):

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp:

(WebCore::Layout::InlineFormattingContext::Quirks::inlineLevelBoxAffectsLineBox const):

  • layout/inlineformatting/InlineLineBox.cpp:

(WebCore::Layout::LineBox::addInlineLevelBox):

  • layout/inlineformatting/InlineLineBox.h:

(WebCore::Layout::LineBox::nonRootInlineLevelBoxes):
(WebCore::Layout::LineBox::inlineLevelBoxForLayoutBox):
(WebCore::Layout::LineBox::InlineLevelBox::createAtomicInlineLevelBox):
(WebCore::Layout::LineBox::InlineLevelBox::createInlineBox):
(WebCore::Layout::LineBox::InlineLevelBox::createLineBreakBox):
(WebCore::Layout::LineBox::InlineLevelBox::createGenericInlineLevelBox):

  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

(WebCore::LayoutIntegration::InlineContentBuilder::computeLineLevelVisualAdjustmentsForRuns const):
(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayNonRootInlineBoxes const):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::showInlineTreeAndRuns):

8:33 AM Changeset in webkit [273973] by Jonathan Bedard
  • 7 edits in trunk/Tools

[webkitscmpy] Standardize timezone of mock svn server
https://bugs.webkit.org/show_bug.cgi?id=222762
<rdar://problem/75058478>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitcorepy/setup.py: Bump version.
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Bump version, add dateutils.
  • Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/svn.py:

(Svn.request): Lock timezone of SVN server.

  • Scripts/webkitpy/init.py: Move dateutils to webkitcorepy.
8:24 AM Changeset in webkit [273972] by Tadeu Zagallo
  • 4 edits
    1 add in trunk

OpGetPrivateName needs to be listed in FOR_EACH_OPCODE_WITH_VALUE_PROFILE
https://bugs.webkit.org/show_bug.cgi?id=222775
<rdar://74982634>

Reviewed by Michael Saboff.

JSTests:

  • stress/private-name-assignment-in-constructor.js: Added.

(Foo):

Source/JavaScriptCore:

Right now valueProfileForBytecodeIndex incorrectly returns null for op_get_private_name.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::valueProfileForBytecodeIndex):

  • bytecode/Opcode.h:
8:20 AM Changeset in webkit [273971] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed Windows build fix after r273966.

  • platform/win/DragImageCGWin.cpp:

(WebCore::scaleDragImage):

8:15 AM Changeset in webkit [273970] by ChangSeok Oh
  • 12 edits
    12 adds in trunk

AVIF decoding support
https://bugs.webkit.org/show_bug.cgi?id=207750

Reviewed by Philippe Normand.

This patch brings an initial support of AVIF image format to the gtk port.
AVIF is a new royalty-free image format derived from the keyframes of AV1 video.
FireFox and Chromium-variant browsers already support it. Its specification can be found
at https://rawcdn.githack.com/AOMediaCodec/av1-avif/67a92add6cd642a8863e386fa4db87954a6735d1/index.html
This patch aims to land a build option for AVIF and a basic decoding ability
for still images by using libavif. Animated AVIF images will be covered later.

.:

  • Source/cmake/FindAVIF.cmake: Added to find libavif.
  • Source/cmake/OptionsGTK.cmake: A build option, USE_AVIF is added.

Source/WebCore:

A mimetype and a decoder for AVIF are newly added. The new tests verify
if an avif image can be decoded and properly rendered. Only the gtk port performs
these tests for now.

Tests: fast/images/avif-as-image.html

fast/images/avif-image-decoding.html

  • PlatformGTK.cmake: Add AVIFImageDecoder.cpp and AVIFImageReader.cpp as build targets
  • platform/MIMETypeRegistry.cpp: avif mimetype added.

(WebCore::MIMETypeRegistry::supportedImageMIMETypes):

  • platform/image-decoders/ScalableImageDecoder.cpp:

(WebCore::ScalableImageDecoder::create): AVIF file signature added.

  • platform/image-decoders/avif/AVIFImageDecoder.cpp: Added.

(WebCore::AVIFImageDecoder::AVIFImageDecoder):
(WebCore::AVIFImageDecoder::frameBufferAtIndex): Decode a frame of avif image.
The first frame is decoded for now.
(WebCore::AVIFImageDecoder::setFailed):
(WebCore::AVIFImageDecoder::tryDecodeSize): Parses header of avif images.
(WebCore::AVIFImageDecoder::decode):

  • platform/image-decoders/avif/AVIFImageDecoder.h: Added.
  • platform/image-decoders/avif/AVIFImageReader.cpp: Added.

(WebCore::AVIFImageReader::AVIFImageReader):
(WebCore::AVIFImageReader::~AVIFImageReader):
(WebCore::AVIFImageReader::parseHeader): Actual parsing of the header with libavif
(WebCore::AVIFImageReader::decodeFrame): Actual decoding of an avif frame.

  • platform/image-decoders/avif/AVIFImageReader.h: Added.
  • platform/image-decoders/avif/AVIFUniquePtr.h: Added a smart pointer template for avifDecoder.

(WebCore::AVIFPtrDeleter<avifDecoder>::operator() const):

Tools:

  • gtk/install-dependencies: Add dependencies of libavif for jhbuild
  • gtk/jhbuild.modules: Add libavif for jhbuild

LayoutTests:

The new tests verify if an avif image can be decoded and properly rendered.
Only the gtk port performs these tests for now.

  • TestExpectations: Skip avif tests for non-gtk ports
  • fast/images/avif-as-image-expected.html: Added.
  • fast/images/avif-as-image.html: Added.
  • fast/images/avif-image-decoding-expected.txt: Added.
  • fast/images/avif-image-decoding.html: Added.
  • fast/images/resources/green-313x313.avif: Added.
  • platform/gtk/TestExpectations: The gtk port should pass the tests.
8:10 AM Changeset in webkit [273969] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed Windows build fix after r273966.

  • platform/win/DragImageCGWin.cpp:

(WebCore::scaleDragImage):

8:10 AM Changeset in webkit [273968] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore/PAL

Fix my iOS Simulator build.
https://bugs.webkit.org/show_bug.cgi?id=222041

  • pal/spi/cocoa/AVStreamDataParserSPI.h:

My build couldn't find what CMSampleBufferRef was supposed to mean, so I include CoreMedia.h.
I have no idea why all the bots build successfully.

7:50 AM Changeset in webkit [273967] by eric.carlson@apple.com
  • 21 edits in trunk/Source

[GPU Process] Remote control command should only go to the current NowPlaying session
https://bugs.webkit.org/show_bug.cgi?id=222759
<rdar://problem/75053393>

Reviewed by Jer Noble.

Source/WebCore:

Don't register a remote command listener for every web process, or every remote control
commands will go to every web process. Instead, register a single listener for the
GPU process and route commands to only the current NowPlaying process.

Tested manually.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::didReceiveRemoteControlCommand): Drive-by: SkipForward
and SkipBackwards should seek relative to current time.

  • platform/NowPlayingManager.cpp:

(WebCore::NowPlayingManager::setSupportedRemoteCommands): New, pass through to the
command listener.

  • platform/NowPlayingManager.h:
  • platform/RemoteCommandListener.cpp:

(WebCore::RemoteCommandListener::addSupportedCommand): m_registeredCommands -> m_supportedCommands.
(WebCore::RemoteCommandListener::removeSupportedCommand): Ditto.
(WebCore::RemoteCommandListener::setSupportedCommands): Ditto. Schedule update.
(WebCore::RemoteCommandListener::updateSupportedCommands):

  • platform/RemoteCommandListener.h:
  • platform/audio/NowPlayingInfo.h:

(WebCore::NowPlayingInfo::operator== const): Add operator so we can avoid updating
when nothing has changed.
(WebCore::NowPlayingInfo::operator!= const):

  • platform/audio/cocoa/MediaSessionManagerCocoa.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.mm:

(WebCore::MediaSessionManagerCocoa::setNowPlayingInfo): Always set string properties
so we don't show stale information after switching to a session that doesn't provide
all of the same properties.
(WebCore::MediaSessionManagerCocoa::updateNowPlayingInfo): Only update when we have
new state.

  • platform/mac/MediaRemoteSoftLink.h:
  • platform/mac/MediaRemoteSoftLink.mm: Soft link kMRMediaRemoteCommandInfoPreferredIntervalsKey.

Source/WebKit:

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::clearNowPlayingInfo): Track being the active
NowPlaying process.
(WebKit::GPUConnectionToWebProcess::setNowPlayingInfo): Ditto.
(WebKit::GPUConnectionToWebProcess::updateSupportedRemoteCommands): Pass supported
commands and seeking to NowPlayingManager so it can pass them to the remote command
listener.
(WebKit::GPUConnectionToWebProcess::createRemoteCommandListener): We only ever need
one listener.
(WebKit::GPUConnectionToWebProcess::releaseRemoteCommandListener): Ditto.
(WebKit::GPUConnectionToWebProcess::dispatchMessage): Dispatch RemoteRemoteCommandListenerProxy
messages.

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/media/RemoteRemoteCommandListenerProxy.cpp:

(WebKit::RemoteRemoteCommandListenerProxy::RemoteRemoteCommandListenerProxy): Don't
create a remote command listener, we only need one for the GPU process.
(WebKit::RemoteRemoteCommandListenerProxy::updateSupportedCommands): New.
(WebKit::RemoteRemoteCommandListenerProxy::didReceiveRemoteControlCommand): Deleted.

  • GPUProcess/media/RemoteRemoteCommandListenerProxy.h:

(WebKit::RemoteRemoteCommandListenerProxy::create):
(WebKit::RemoteRemoteCommandListenerProxy::supportsSeeking const):
(WebKit::RemoteRemoteCommandListenerProxy::supportedCommands const):
(WebKit::RemoteRemoteCommandListenerProxy::identifier const):

  • GPUProcess/media/RemoteRemoteCommandListenerProxy.messages.in:
  • WebProcess/GPU/media/RemoteRemoteCommandListener.cpp:

(WebKit::RemoteRemoteCommandListener::RemoteRemoteCommandListener): Use m_process
instead of calling WebProcess::singleton().
(WebKit::RemoteRemoteCommandListener::~RemoteRemoteCommandListener): Ditto.
(WebKit::RemoteRemoteCommandListener::didReceiveRemoteControlCommand): Use client(),
m_client is now private.
(WebKit::RemoteRemoteCommandListener::updateSupportedCommands):

  • WebProcess/GPU/media/RemoteRemoteCommandListener.h:
7:44 AM Changeset in webkit [273966] by Chris Dumez
  • 92 edits in trunk

Reduce use of CFRetain() / CFRelease() / CFAutoRelease() in WebKit
https://bugs.webkit.org/show_bug.cgi?id=222760

Reviewed by Darin Adler.

Reduce use of CFRetain() / CFRelease() / CFAutoRelease() in WebKit by using RetainPtr<>.

Source/JavaScriptCore:

  • API/JSContext.mm:

(-[JSContext name]):

  • API/JSValue.mm:

(valueToObjectWithoutCopy):
(valueToString):

  • inspector/remote/cocoa/RemoteInspectorXPCConnection.mm:

(Inspector::RemoteInspectorXPCConnection::deserializeMessage):

Source/WebCore:

  • accessibility/mac/AXObjectCacheMac.mm:

(WebCore::AXTextMarkerRange):
(WebCore::AXTextMarkerRangeStart):
(WebCore::AXTextMarkerRangeEnd):
(WebCore::textMarkerForVisiblePosition):
(WebCore::textMarkerForCharacterOffset):
(WebCore::startOrEndTextMarkerForRange):

  • accessibility/mac/WebAccessibilityObjectWrapperBase.mm:

(-[WebAccessibilityObjectWrapperBase updateObjectBackingStore]):
(-[WebAccessibilityObjectWrapperBase convertPathToScreenSpace:]):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(nextTextMarkerForCharacterOffset):
(previousTextMarkerForCharacterOffset):
(-[WebAccessibilityObjectWrapper textMarkerForFirstPositionInTextControl:]):
(AXAttributeStringSetElement):

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::_processText):

  • loader/cocoa/DiskCacheMonitorCocoa.mm:

(WebCore::DiskCacheMonitor::DiskCacheMonitor):

  • page/mac/EventHandlerMac.mm:

(WebCore::selfRetainingNSScrollViewScrollWheel):

  • page/win/FrameCGWin.cpp:

(WebCore::imageFromRect):

  • platform/cf/MainThreadSharedTimerCF.cpp:

(WebCore::sharedTimer):
(WebCore::MainThreadSharedTimer::restartSharedTimer):
(WebCore::MainThreadSharedTimer::invalidate):
(WebCore::MainThreadSharedTimer::setFireInterval):
(WebCore::MainThreadSharedTimer::stop):

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

(WebCore::exernalDeviceDisplayNameForPlayer):

  • platform/graphics/ca/win/CACFLayerTreeHost.cpp:

(WebCore::CACFLayerTreeHost::initialize):

  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::patternReleaseCallback):
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::strokeRect):

  • platform/graphics/cg/PatternCG.cpp:

(WebCore::patternReleaseCallback):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::autoActivateFont):

  • platform/graphics/win/FontCGWin.cpp:

(WebCore::FontCascade::getPlatformGlyphAdvances):

  • platform/graphics/win/GraphicsContextCGWin.cpp:

(WebCore::GraphicsContext::releaseWindowsContext):
(WebCore::GraphicsContext::drawFocusRing):

  • platform/graphics/win/ImageCGWin.cpp:

(WebCore::BitmapImage::getHBITMAPOfSize):

  • platform/ios/UserAgentIOS.mm:

(WebCore::standardUserAgentWithApplicationName):

  • platform/ios/wak/WebCoreThread.mm:

(SendDelegateMessage):
(RunWebThread):
(WebThreadUnlockGuardForMail):

  • platform/mac/PlatformSpeechSynthesizerMac.mm:

(WebCore::speechSynthesisGetVoiceIdentifiers):
(WebCore::speechSynthesisGetDefaultVoiceIdentifierForLocale):
(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):

  • platform/mac/PluginBlocklist.mm:

(WebCore::PluginBlocklist::create):

  • platform/mac/WebGLBlocklist.mm:

(WebCore::WebGLBlocklist::create):

  • platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm:

(WebCore::AudioSampleBufferCompressor::attachPrimingTrimsIfNeeded):
(WebCore::AudioSampleBufferCompressor::provideSourceDataNumOutputPackets):

  • platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm:

(WebCore::setCompressionSessionProperty):

  • platform/network/cf/FormDataStreamCFNet.cpp:

(WebCore::closeCurrentStream):
(WebCore::advanceCurrentStream):
(WebCore::openNextStream):
(WebCore::formRead):
(WebCore::formCanRead):
(WebCore::formSchedule):
(WebCore::formUnschedule):

  • platform/network/cf/NetworkStorageSessionCFNetWin.cpp:

(WebCore::createPrivateStorageSession):

  • platform/network/cf/ResourceHandleCFNet.cpp:

(WebCore::setClientCertificateInSSLProperties):
(WebCore::ResourceHandle::createCFURLConnection):

  • platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:

(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):

  • platform/network/cf/ResourceRequestCFNet.cpp:

(WebCore::ResourceRequest::doUpdateResourceRequest):

  • platform/win/DragImageCGWin.cpp:

(WebCore::createCgContextFromBitmap):
(WebCore::scaleDragImage):

  • platform/win/WebCoreBundleWin.cpp:

(WebCore::createWebKitBundle):
(WebCore::webKitBundle):

  • rendering/RenderThemeMac.mm:

(-[WebCoreTextFieldCell _adjustedCoreUIDrawOptionsForDrawingBordersOnly:]):

  • testing/cocoa/WebArchiveDumpSupport.h:
  • testing/cocoa/WebArchiveDumpSupport.mm:

(WebCoreTestSupport::createXMLStringFromWebArchiveData):

  • testing/cocoa/WebViewVisualIdentificationOverlay.mm:

(identificationFont):

Source/WebKit:

  • Platform/mac/StringUtilities.mm:

(WebKit::nsStringFromWebCoreString):
(WebKit::formattedPhoneNumberString):

  • PluginProcess/mac/PluginProcessMac.mm:

(WebKit::initializeCocoaOverrides):

  • Shared/mac/PasteboardTypes.mm:

(WebKit::PasteboardTypes::forEditing):
(WebKit::PasteboardTypes::forURL):
(WebKit::PasteboardTypes::forImages):
(WebKit::PasteboardTypes::forImagesWithArchive):
(WebKit::PasteboardTypes::forSelection):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::acceptsFirstMouse):
(WebKit::WebViewImpl::shouldDelayWindowOrderingForEvent):
(WebKit::WebViewImpl::validAttributesForMarkedText):
(WebKit::WebViewImpl::performKeyEquivalent):

  • UIProcess/Inspector/ios/WKInspectorHighlightView.mm:

(layerPathWithHole):
(layerPath):

  • UIProcess/_WKTouchEventGenerator.mm:

(-[_WKTouchEventGenerator dealloc]):
(-[_WKTouchEventGenerator _sendHIDEvent:]):

  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:

(-[WKFullScreenWindowController _EVOrganizationName]):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::webProcessLoaderAccessibilityBundlePath):

Source/WebKitLegacy/ios:

  • Misc/WebUIKitSupport.mm:

(LoadWebLocalizedStrings):

  • WebView/WebPDFViewIOS.mm:

(-[WebPDFView finishedLoadingWithDataSource:]):

  • WebView/WebPDFViewPlaceholder.mm:

(-[WebPDFViewPlaceholder finishedLoadingWithDataSource:]):

Source/WebKitLegacy/mac:

  • Misc/WebLocalizableStrings.mm:
  • Misc/WebNSDataExtras.mm:

(-[NSString _web_capitalizeRFC822HeaderFieldName]):

  • Plugins/Hosted/NetscapePluginHostManager.mm:

(WebKit::preferredBundleLocalizationName):

  • Plugins/WebNetscapePluginView.mm:

(-[WebNetscapePluginView status:]):

  • WebCoreSupport/WebProgressTrackerClient.mm:

(WebProgressTrackerClient::progressEstimateChanged):

  • WebInspector/WebNodeHighlightView.mm:

(layerPathWithHole):
(layerPath):

  • WebView/WebFrame.mm:

(createUniqueWebDataURL):

  • WebView/WebView.mm:

(+[WebView _setCacheModel:]):

Source/WebKitLegacy/win:

  • CFDictionaryPropertyBag.cpp:

(ConvertVariantToCFType):
(CFDictionaryPropertyBag::Read):
(CFDictionaryPropertyBag::Write):

  • MarshallingHelpers.cpp:

(MarshallingHelpers::PathStringToFileCFURLRef):
(MarshallingHelpers::FileCFURLRefToPathString):
(MarshallingHelpers::BSTRToCFURLRef):
(MarshallingHelpers::BSTRToCFStringRef):
(MarshallingHelpers::LPCOLESTRToCFStringRef):
(MarshallingHelpers::intToCFNumberRef):
(MarshallingHelpers::safeArrayToStringArray):
(MarshallingHelpers::safeArrayToIntArray):
(MarshallingHelpers::safeArrayToIUnknownArray):

  • MarshallingHelpers.h:
  • WebApplicationCache.cpp:

(WebApplicationCache::originsWithCache):

  • WebCoreSupport/WebFrameLoaderClient.cpp:

(WebFrameLoaderClient::dispatchDidFailToStartPlugin const):

  • WebDownloadCFNet.cpp:

(WebDownload::initToResumeWithBundle):
(WebDownload::setDestination):
(WebDownload::willSendRequest):

  • WebHistory.cpp:

(createUserInfoFromArray):

  • WebLocalizableStrings.cpp:

(createWebKitBundle):

Source/WTF:

  • wtf/cocoa/NSURLExtras.mm:

(WTF::decodePercentEscapes):
(WTF::URLByTruncatingOneCharacterBeforeComponent):
(WTF::URLWithData):
(WTF::URLByRemovingComponentAndSubsequentCharacter):

Tools:

  • DumpRenderTree/TestNetscapePlugIn/PluginObjectMac.mm:

(createCoreAnimationLayer):

  • DumpRenderTree/mac/AccessibilityCommonMac.mm:

(+[NSString stringWithJSStringRef:]):

  • DumpRenderTree/mac/DumpRenderTree.mm:

(activateFontIOS):
(dumpRenderTree):
(invalidateAnyPreviousWaitToDumpWatchdog):
(setWaitToDumpWatchdog):
(dump):
(runTest):

  • DumpRenderTree/mac/DumpRenderTreeMac.h:
  • DumpRenderTree/mac/EventSendingController.mm:

(-[EventSendingController mouseScrollByX:andY:continuously:]):
(-[EventSendingController mouseScrollByX:andY:withWheel:andMomentumPhases:]):

  • DumpRenderTree/mac/PixelDumpSupportMac.mm:

(takeWindowSnapshot):
(createBitmapContextFromWebView):

  • DumpRenderTree/mac/ResourceLoadDelegate.mm:

(-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]):

  • DumpRenderTree/mac/TestRunnerMac.mm:

(TestRunner::addDisallowedURL):
(TestRunner::setWaitToDump):

  • FontWithFeatures/FontWithFeatures/main.cpp:

(constructFontWithTrueTypeFeature):
(constructFontWithOpenTypeFeature):
(drawText):
(main):

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::dumpDOMAsWebArchive):

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(+[NSString stringWithJSStringRef:]):

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm:

(+[NSString stringWithJSStringRef:]):

  • WebKitTestRunner/ios/HIDEventGenerator.mm:

(-[HIDEventGenerator _createIOHIDEventWithInfo:]):

  • WebKitTestRunner/mac/EventSenderProxy.mm:

(-[EventSenderSyntheticEvent initPressureEventAtLocation:globalLocation:stage:pressure:stageTransition:phase:time:eventNumber:window:]):

  • WebKitTestRunner/mac/UIScriptControllerMac.mm:

(WTR::cfString):
(WTR::UIScriptControllerMac::replaceTextAtRange):

7:31 AM Changeset in webkit [273965] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[GTK] Bubblewrap sandbox should not break X11 forwarding
https://bugs.webkit.org/show_bug.cgi?id=221990

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-03-05
Reviewed by Carlos Alberto Lopez Perez.

If $DISPLAY points to a TCP socket, or a Unix socket on a different host, then we cannot
isolate the web process from the network and must grant access to the host network
namespace.

Also, clean up some related code by adding PLATFORM(X11) guards where appropriate and
removing a redundant display type check.

  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::bindWayland):
(WebKit::shouldUnshareNetwork):
(WebKit::bubblewrapSpawn):

7:05 AM Changeset in webkit [273964] by Chris Lord
  • 14 edits in trunk

Allow CSS font-styling for canvas without RenderStyle
https://bugs.webkit.org/show_bug.cgi?id=222665

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fontface.notinpage-expected.txt: Now passes

Source/WebCore:

Refactor CSSPrimitiveValue::computeNonCalcLengthDouble to allow for
its use without requiring CSSToLengthConversionData and RenderStyle.

No new tests, already covered by existing tests.

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::computeUnzoomedNonCalcLengthDouble):
(WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):

  • css/CSSPrimitiveValue.h:
  • css/CSSToLengthConversionData.h:

(WebCore::CSSToLengthConversionData::propertyToCompute const):
(WebCore::CSSToLengthConversionData::renderView const):

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::setFont):

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::FontProxy::initialize):

  • html/canvas/CanvasRenderingContext2DBase.h:
  • html/canvas/OffscreenCanvasRenderingContext2D.cpp:

(WebCore::OffscreenCanvasRenderingContext2D::setFont):

  • style/StyleFontSizeFunctions.cpp:

(WebCore::Style::computedFontSizeFromSpecifiedSize):
(WebCore::Style::computedFontSizeFromSpecifiedSizeForSVGInlineText):
(WebCore::Style::fontSizeForKeyword):

  • style/StyleFontSizeFunctions.h:
  • style/StyleResolveForFontRaw.cpp:

(WebCore::Style::resolveForFontRaw):

  • style/StyleResolveForFontRaw.h:
5:15 AM Changeset in webkit [273963] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

[GTK] Clang warnings in MiniBrowser build
https://bugs.webkit.org/show_bug.cgi?id=222797

Patch by Philippe Normand <pnormand@igalia.com> on 2021-03-05
Reviewed by Carlos Garcia Campos.

Fix unused-value warnings.

  • MiniBrowser/gtk/BrowserCellRendererVariant.c:

(browser_cell_renderer_variant_init):

  • MiniBrowser/gtk/BrowserTab.c:

(runColorChooserCallback):

4:16 AM Changeset in webkit [273962] by commit-queue@webkit.org
  • 16 edits in trunk

[WASM-Function-References] Update ref.func to produce (ref $t)
https://bugs.webkit.org/show_bug.cgi?id=222779

Patch by Dmitry Bezhetskov <dbezhetskov> on 2021-03-05
Reviewed by Yusuke Suzuki.

Make ref.func to produce non nullable reference type which
incorporates signature index. Since in JSC signature index represents
type of the function from Type section we use it instead of type_idx
for representing type of function references.

JSTests:

  • wasm/wasm.json:

Source/JavaScriptCore:

  • runtime/OptionsList.h:
  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::addTableGrow):
(JSC::Wasm::AirIRGenerator::addTableFill):
(JSC::Wasm::AirIRGenerator::unify):

  • wasm/WasmFormat.h:

(JSC::Wasm::isValueType):
(JSC::Wasm::isSubtype):
(JSC::Wasm::isRefType):

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::checkBranchTarget):
(JSC::Wasm::FunctionParser<Context>::unify):
(JSC::Wasm::FunctionParser<Context>::parseExpression):

  • wasm/WasmLLIntGenerator.cpp:

(JSC::Wasm::LLIntGenerator::callInformationForCaller):
(JSC::Wasm::LLIntGenerator::callInformationForCallee):
(JSC::Wasm::LLIntGenerator::addArguments):

  • wasm/WasmSectionParser.cpp:

(JSC::Wasm::SectionParser::parseGlobal):

  • wasm/generateWasmOpsHeader.py:
  • wasm/js/WasmToJS.cpp:

(JSC::Wasm::wasmToJS):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • wasm/wasm.json:
4:05 AM Changeset in webkit [273961] by commit-queue@webkit.org
  • 5 edits
    1 add in trunk

XRFrame getViewerPose has emulatedPosition set properly
https://bugs.webkit.org/show_bug.cgi?id=222785

Patch by Imanol Fernandez <imanol> on 2021-03-05
Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

Update getViewerPose_emulatedPosition test expectations.

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

Source/WebCore:

emulatedPosition in set in WebXR DOM code and OpenXR platform, but not set in FakeWebXRDevice.

Tested by getViewerPose_emulatedPosition.html.

  • testing/WebFakeXRDevice.cpp:

(WebCore::SimulatedXRDevice::frameTimerFired): set emulatedPosition

LayoutTests:

Update getViewerPose_emulatedPosition test expectations.

  • platform/wpe/TestExpectations:
3:53 AM Changeset in webkit [273960] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Add support for gstreamer's h264 stateless codecs
https://bugs.webkit.org/show_bug.cgi?id=222787

Patch by Guido Günther <agx@sigxcpu.org> on 2021-03-05
Reviewed by Philippe Normand.

Manually tested, there is currently no automatic tests for it

  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::bindV4l):

3:15 AM Changeset in webkit [273959] by Philippe Normand
  • 3 edits in trunk/Source/WebCore

Unreviewed, final (hopefully) WPE/GTK follow-up to r273951

Rubber-stamped by Xabier Rodriguez-Calvar.

  • platform/mediastream/gstreamer/GStreamerVideoFrameLibWebRTC.cpp:

(WebCore::GStreamerSampleFromLibWebRTCVideoFrame): Move WARN_UNUSED_RETURN to header file
and fix pessimizing-move warning.

  • platform/mediastream/gstreamer/GStreamerVideoFrameLibWebRTC.h:
2:54 AM Changeset in webkit [273958] by svillar@igalia.com
  • 4 edits in trunk

[css-flexbox] Fix mainAxisLengthIsDefinite for orthogonal items with percentage sizes
https://bugs.webkit.org/show_bug.cgi?id=222684

Reviewed by Javier Fernandez.

Source/WebCore:

r260055 fixed a crash in flexbox code by not caching the definiteness of the logical height of the flexbox
container in case of having orthogonal items because in that case, the logical heights of the flex container
and the flex item are not in the same axis. That made a lot of sense, however we should still let the method
return whether or not the child main axis is definite instead of unconditionally return false.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::childMainSizeIsDefinite const):

LayoutTests:

  • TestExpectations: Unskipped flexbox-basic-canvas-vert-001v.xhtml which is now passing.
2:50 AM Changeset in webkit [273957] by commit-queue@webkit.org
  • 18 edits
    3 adds in trunk

Implement WebXRBoundedReferenceSpace bounds geometry
https://bugs.webkit.org/show_bug.cgi?id=222737

Patch by Imanol Fernandez <imanol> on 2021-03-05
Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

Update WebXRBoundedReferenceSpace test expectations.

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

Source/WebCore:

Having bounds geometry in WebXRBoundedReferenceSpace enables WebXR room-scale applications. XR systems may have limited
real world spatial ranges in which users can freely move around while remaining tracked. WebXR Applications can query
these boundaries and alter application behavior or content placement to ensure the user can complete the experience while
remaining within the boundary.

Tested by WebXR WPT tests.

  • Modules/webxr/WebXRBoundedReferenceSpace.cpp:

(WebCore::WebXRBoundedReferenceSpace::boundsGeometry): Call updateIfNeeded
(WebCore::WebXRBoundedReferenceSpace::getOffsetReferenceSpace): Use Exception instead of null RefPtr<>
(WebCore::WebXRBoundedReferenceSpace::updateIfNeeded): Updates boundsGeometry vector when data changed.
(WebCore::WebXRBoundedReferenceSpace::quantize): Utility method to avoid fingerprinting.

  • Modules/webxr/WebXRBoundedReferenceSpace.h:
  • Modules/webxr/WebXRBoundedReferenceSpace.idl: Add CustomToJSObject
  • Modules/webxr/WebXRReferenceSpace.cpp:

(WebCore::WebXRReferenceSpace::getOffsetReferenceSpace): Use Exception instead of null RefPtr<>

  • Modules/webxr/WebXRReferenceSpace.h:
  • Modules/webxr/WebXRReferenceSpace.idl: Add CustomToJSObject
  • Modules/webxr/WebXRSpace.idl: Add CustomToJSObject
  • Sources.txt: Add CustomToJSObject implementations
  • bindings/js/JSWebXRReferenceSpaceCustom.cpp: Added.

(WebCore::toJSNewlyCreated):
(WebCore::toJS):

  • bindings/js/JSWebXRSpaceCustom.cpp: Added.

(WebCore::toJSNewlyCreated):
(WebCore::toJS):

  • platform/xr/PlatformXR.h: Add StageParameters to FrameData.
  • platform/xr/openxr/PlatformXROpenXR.cpp: Implement boundsGeometry using OpenXR.

(PlatformXR::OpenXRDevice::initializeReferenceSpace):
(PlatformXR::OpenXRDevice::requestFrame):
(PlatformXR::OpenXRDevice::collectEnabledFeatures):
(PlatformXR::OpenXRDevice::pollEvents):
(PlatformXR::OpenXRDevice::resetSession):
(PlatformXR::OpenXRDevice::updateStageParameters):

  • platform/xr/openxr/PlatformXROpenXR.h:
  • testing/WebFakeXRDevice.cpp: Implement boundsGeometry for tests.

(WebCore::SimulatedXRDevice::setNativeBoundsGeometry):
(WebCore::SimulatedXRDevice::frameTimerFired):
(WebCore::WebFakeXRDevice::setBoundsGeometry):

  • testing/WebFakeXRDevice.h:

LayoutTests:

Update WebXRBoundedReferenceSpace test expectations.

  • platform/wpe/TestExpectations:
2:18 AM Changeset in webkit [273956] by Said Abou-Hallawa
  • 9 edits in trunk

[GPU Process] RemoteImageBuffer recording GraphicsContext should report its backend RenderingMode
https://bugs.webkit.org/show_bug.cgi?id=222772

Reviewed by Simon Fraser.

Source/WebCore:

This will allow compositing the 2D canvas elements when GPU rendering is
enabled for 2D canvas.

  • platform/graphics/GraphicsContextImpl.h:

(WebCore::GraphicsContextImpl::renderingMode const):

  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::GraphicsContext::setIsCALayerContext):
(WebCore::GraphicsContext::isCALayerContext const):
(WebCore::GraphicsContext::setIsAcceleratedContext):
(WebCore::GraphicsContext::isAcceleratedContext const):

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::renderingMode const):

  • platform/graphics/displaylists/DisplayListRecorder.h:

(WebCore::DisplayList::Recorder::Delegate::renderingMode const):

Source/WebKit:

  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:

LayoutTests:

  • gpu-process/TestExpectations:
2:14 AM Changeset in webkit [273955] by svillar@igalia.com
  • 4 edits in trunk

WPT test css/css-flexbox/flex-minimum-height-flex-items-023.html fails
https://bugs.webkit.org/show_bug.cgi?id=214292

Reviewed by Javier Fernandez.

Source/WebCore:

CSS flex specs define how to compute the main axis automatic minimum size of a flex item in order to
provide a more reasonable minimum size (as grid does). So far we've considered "automatic minimum size"
as either min-{width|height}:auto. However the css-sizing-3 specs mention that for the block size
either min-content, max-content or fit-content are (unless otherwise specified) equivalent to the
automatic size (see https://drafts.csswg.org/css-sizing-3/#valdef-width-min-content).

This means that we need to expand our check to consider those intrinsic sizes as automatic whenever the
block axis of the flex item is the flexbible box main size.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::shouldApplyMinSizeAutoForChild const): Consider intrinsic sizes as automatic
in case the child block axis is the flex container main axis.
(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax): Let intrinsic sizes be handled by the code
that computes min-size:auto.

LayoutTests:

2:07 AM Changeset in webkit [273954] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

Unreviewed, WPE/GTK build fix after r273953

  • platform/mediastream/gstreamer/GStreamerVideoFrameLibWebRTC.cpp:

(WebCore::GStreamerSampleFromLibWebRTCVideoFrame):

1:54 AM Changeset in webkit [273953] by Philippe Normand
  • 3 edits in trunk/Source/WebCore

[GStreamer] Unreviewed follow-up to r273951

  • platform/mediastream/gstreamer/GStreamerVideoFrameLibWebRTC.cpp:

(WebCore::GStreamerSampleFromLibWebRTCVideoFrame): Add &&, forgotten during review cycle.

  • platform/mediastream/gstreamer/GStreamerVideoFrameLibWebRTC.h:
1:50 AM Changeset in webkit [273952] by commit-queue@webkit.org
  • 4 edits in trunk

Fix flex-aspect-ratio-009.html
https://bugs.webkit.org/show_bug.cgi?id=222780

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

Source/WebCore:

Since CSS aspect-ratio does not rely on intrinsic size for
calculating the ratio, the check for intrinsic height should
not apply to it.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::childCrossSizeShouldUseContainerCrossSize const):

LayoutTests:

Enable test that passes now.

1:38 AM Changeset in webkit [273951] by commit-queue@webkit.org
  • 9 edits in trunk

REGRESSION(r273309) [GStreamer] webrtc/captureCanvas-webrtc-software-h264-baseline.html is flaky crashing inside libwebrtc
https://bugs.webkit.org/show_bug.cgi?id=222451

Patch by Philippe Normand <pnormand@igalia.com> on 2021-03-05
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

The main issue here was related with bad memory management in the VideoFrameLibWebRTC
implementation, the video converter was writing to a buffer allocated by the libwebrtc
aligned-malloc allocator and that was triggering various issues. There's little benefit of
using a buffer pool anyway since we end-up doing buffer copies.

The patch also includes a bunch of coding style fixes, a few smart-pointer improvements, and
improved error handling in the decoder factory, which was previously handling warnings only.

  • platform/mediastream/gstreamer/GStreamerVideoFrameLibWebRTC.cpp:

(WebCore::GStreamerSampleFromLibWebRTCVideoFrame):
(WebCore::GStreamerVideoFrameLibWebRTC::create):
(WebCore::LibWebRTCVideoFrameFromGStreamerSample):
(WebCore::GStreamerVideoFrameLibWebRTC::ToI420):

  • platform/mediastream/gstreamer/GStreamerVideoFrameLibWebRTC.h:

(WebCore::GStreamerVideoFrameLibWebRTC::GStreamerVideoFrameLibWebRTC):
(WebCore::GStreamerVideoFrameLibWebRTC::takeSample):

  • platform/mediastream/gstreamer/RealtimeIncomingVideoSourceLibWebRTC.cpp:

(WebCore::RealtimeIncomingVideoSourceLibWebRTC::OnFrame):

  • platform/mediastream/gstreamer/RealtimeOutgoingVideoSourceLibWebRTC.cpp:

(WebCore::RealtimeOutgoingVideoSourceLibWebRTC::videoSampleAvailable):

  • platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:

(WebCore::GStreamerVideoDecoder::handleError):
(WebCore::GStreamerVideoDecoder::pullSample):

  • platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:

(WebCore::GStreamerEncodedImageBuffer::create):
(WebCore::GStreamerEncodedImageBuffer::getBuffer const):
(WebCore::GStreamerEncodedImageBuffer::getVideoResolution const):
(WebCore::GStreamerEncodedImageBuffer::GStreamerEncodedImageBuffer):

LayoutTests:

  • platform/glib/TestExpectations: Update expectations for webrtc h264 tests that are

slightly less broken now.

Note: See TracTimeline for information about the timeline view.