Timeline



Jun 2, 2021:

11:50 PM Changeset in webkit [278397] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Make EndTransparancyLayer a potential no-op
https://bugs.webkit.org/show_bug.cgi?id=226523

Patch by Rob Buis <rbuis@igalia.com> on 2021-06-02
Reviewed by Simon Fraser.

Make EndTransparancyLayer a no-op if there is no
current transparency layer in place.

  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::EndTransparencyLayer::apply const):

11:26 PM Changeset in webkit [278396] by commit-queue@webkit.org
  • 12 edits in trunk

Split FillInlinePath/StrokeInlinePath
https://bugs.webkit.org/show_bug.cgi?id=225687

Patch by Rob Buis <rbuis@igalia.com> on 2021-06-02
Reviewed by Wenson Hsieh.

Source/WebCore:

Use specialized display list item types instead of
a Variant for FillInlinePath/StrokeInlinePath.

  • platform/graphics/displaylists/DisplayList.cpp:

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

  • platform/graphics/displaylists/DisplayListItemBuffer.cpp:

(WebCore::DisplayList::ItemHandle::apply):
(WebCore::DisplayList::ItemHandle::destroy):
(WebCore::DisplayList::ItemHandle::safeCopy const):

  • platform/graphics/displaylists/DisplayListItemType.cpp:

(WebCore::DisplayList::sizeOfItemInBytes):
(WebCore::DisplayList::isDrawingItem):
(WebCore::DisplayList::isInlineItem):

  • platform/graphics/displaylists/DisplayListItemType.h:
  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::FillLine::apply const):
(WebCore::DisplayList::operator<<):
(WebCore::DisplayList::FillArc::apply const):
(WebCore::DisplayList::FillQuadCurve::apply const):
(WebCore::DisplayList::FillBezierCurve::apply const):
(WebCore::DisplayList::StrokeArc::localBounds const):
(WebCore::DisplayList::StrokeArc::apply const):
(WebCore::DisplayList::StrokeQuadCurve::localBounds const):
(WebCore::DisplayList::StrokeQuadCurve::apply const):
(WebCore::DisplayList::StrokeBezierCurve::localBounds const):
(WebCore::DisplayList::StrokeBezierCurve::apply const):
(WebCore::DisplayList::FillInlinePath::apply const): Deleted.
(WebCore::DisplayList::StrokeInlinePath::localBounds const): Deleted.
(WebCore::DisplayList::StrokeInlinePath::apply const): Deleted.

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::FillLine::FillLine):
(WebCore::DisplayList::FillLine::path const):
(WebCore::DisplayList::FillLine::globalBounds const):
(WebCore::DisplayList::FillLine::localBounds const):
(WebCore::DisplayList::FillArc::FillArc):
(WebCore::DisplayList::FillArc::path const):
(WebCore::DisplayList::FillArc::globalBounds const):
(WebCore::DisplayList::FillArc::localBounds const):
(WebCore::DisplayList::FillQuadCurve::FillQuadCurve):
(WebCore::DisplayList::FillQuadCurve::path const):
(WebCore::DisplayList::FillQuadCurve::globalBounds const):
(WebCore::DisplayList::FillQuadCurve::localBounds const):
(WebCore::DisplayList::FillBezierCurve::FillBezierCurve):
(WebCore::DisplayList::FillBezierCurve::path const):
(WebCore::DisplayList::StrokeLine::StrokeLine):
(WebCore::DisplayList::StrokeArc::StrokeArc):
(WebCore::DisplayList::StrokeArc::path const):
(WebCore::DisplayList::StrokeArc::globalBounds const):
(WebCore::DisplayList::StrokeQuadCurve::StrokeQuadCurve):
(WebCore::DisplayList::StrokeQuadCurve::path const):
(WebCore::DisplayList::StrokeQuadCurve::globalBounds const):
(WebCore::DisplayList::StrokeBezierCurve::StrokeBezierCurve):
(WebCore::DisplayList::StrokeBezierCurve::path const):
(WebCore::DisplayList::InlinePathDataStorage::InlinePathDataStorage): Deleted.
(WebCore::DisplayList::InlinePathDataStorage::isValid const): Deleted.
(WebCore::DisplayList::InlinePathDataStorage::path const): Deleted.
(WebCore::DisplayList::FillInlinePath::FillInlinePath): Deleted.
(WebCore::DisplayList::FillInlinePath::globalBounds const): Deleted.
(WebCore::DisplayList::FillInlinePath::localBounds const): Deleted.
(WebCore::DisplayList::StrokeInlinePath::StrokeInlinePath): Deleted.
(WebCore::DisplayList::StrokeInlinePath::globalBounds const): Deleted.

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::fillPath):
(WebCore::DisplayList::Recorder::strokePath):

Source/WebKit:

Adjust to new display list item types.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::decodeItem):

Tools:

Adjust to API new display list items.

  • TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp:

(TestWebKitAPI::TEST):

10:09 PM Changeset in webkit [278395] by Chris Dumez
  • 5 edits in trunk/Source/WebKit

Stop using a RefPtr<IPC::Connection> as HashMap key in DisplayLink
https://bugs.webkit.org/show_bug.cgi?id=226561

Reviewed by Simon Fraser.

Stop using a RefPtr<IPC::Connection> as HashMap key in DisplayLink. Using a RefPtr as key is suboptimal
and could leak to memory leaks. The reason this needed a RefPtr<IPC::Connection> was because we needed
to send IPC from a background thread. To support this, I have added a static IPC::Connection::send()
function that takes an IPC::Connection::UniqueID and that is thread safe. The function looks up the
IPC::Connection from its UniqueID and sends the IPC while still holding the lock.

As a result, DisplayLink can use IPC::Connection::UniqueID as key instead.

Note that I am planning to use the new static IPC::Connection::send() in other cases where we could
send IPC directly from a background thread instead of having to hop to the main thread to look up
the IPC::Connection from its UniqueID. StorageArea::dispatchEvents() is an example of where this will
be useful.

  • Platform/IPC/Connection.cpp:

(IPC::Connection::Connection):
(IPC::Connection::~Connection):

  • Platform/IPC/Connection.h:

(IPC::Connection::send):

  • UIProcess/mac/DisplayLink.cpp:

(WebKit::DisplayLink::addObserver):
(WebKit::DisplayLink::removeObserver):
(WebKit::DisplayLink::removeObservers):
(WebKit::DisplayLink::removeInfoForConnectionIfPossible):
(WebKit::DisplayLink::incrementFullSpeedRequestClientCount):
(WebKit::DisplayLink::decrementFullSpeedRequestClientCount):
(WebKit::DisplayLink::setPreferredFramesPerSecond):
(WebKit::DisplayLink::notifyObserversDisplayWasRefreshed):

  • UIProcess/mac/DisplayLink.h:
9:59 PM Changeset in webkit [278394] by Wenson Hsieh
  • 11 edits
    1 add in trunk/Source/WebKit

[iOS] Show data detector context menu on long press inside image overlays
https://bugs.webkit.org/show_bug.cgi?id=226559
<rdar://problem/78789078>

Reviewed by Tim Horton.

Add additional support for data detectors that appear inside image overlays on iOS.

  • Shared/ImageExtractionUpdateResult.h: Added.

Turn the bool propagated back to the UI process when calling updateWithImageExtractionResult into a separate
three-state enum instead; see changes below for more details.

  • Shared/ios/InteractionInformationAtPosition.h:
  • Shared/ios/InteractionInformationAtPosition.mm:

(WebKit::InteractionInformationAtPosition::encode const):
(WebKit::InteractionInformationAtPosition::decode):

Make some minor adjustments to InteractionInformationAtPosition:

  • Add dataDetectorBounds, which determines the bounds in root view coordinates of the data detector result

corresponding to the hit-tested element.

  • Encode and decode dataDetectorResults, even if isDataDetectorLink is false. Unless the data detector

is inside an image overlay, this (effectively) has no impact, since dataDetectorResults was previously
only set if isDataDetectorLink was true.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::updateWithImageExtractionResult):

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

(-[WKContentView dataDetectionContextForPositionInformation:]):

Let dataDetectorResults take precedence over regular bounds when returning the context for the data
detector menu configuration.

(-[WKContentView positionInformationHasImageOverlayDataDetector]):

Add a helper method that returns YES in the case where the currently cached position information object
contains a text data detection result inside an image overlay.

(-[WKContentView _createTargetedContextMenuHintPreviewIfPossible]):

Use dataDetectorBounds instead of bounds when creating a fallback targeted preview for a data detection
result in an image overlay.

(-[WKContentView continueContextMenuInteraction:]):
(-[WKContentView continueContextMenuInteractionWithDataDetectors:]):

Adjust these codepaths so that we'll continue through to the data detector case instead of bailing early in the
case where both isImageOverlayText is set, and dataDetectionResults exist.

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::findDataDetectionResultElementInImageOverlay):

Add a static helper to locate a data detector element underneath the given point, inside the given element's
image overlay in the user agent shadow root. Note that we check each of the element's bounds instead of using
a hit-test because we normally just hit-test to the text containers instead of the data detector containers.

(WebKit::WebPage::updateWithImageExtractionResult):

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

(WebKit::dataDetectorLinkPositionInformation):
(WebKit::dataDetectorImageOverlayPositionInformation):

Add a static helper function to populate the given InteractionInformationAtPosition, if it's over a data
detection result inside an image overlay.

(WebKit::elementPositionInformation): Call the above helper function.

9:57 PM Changeset in webkit [278393] by sihui_liu@apple.com
  • 12 edits
    2 deletes in trunk/Source/WebCore

Introduce a shared IDB serialization thread
https://bugs.webkit.org/show_bug.cgi?id=226228
<rdar://problem/78725516>

Reviewed by Chris Dumez.

Currently each WebIDBServer has its own thread, and does serialization/deserialization on that thread. To
prepare for making WebIDBServer use WorkQueue, like the other storage manager classes, let's create a shared
thread for handling all serialization/deserialization operations, which cannot be done on WorkQueue as VM needs
to access thread-specific data. Now IDB tasks will call callOnIDBSerializationThreadAndWait to perform
serialization/deserialization operations synchronously.

  • Modules/indexeddb/server/IDBBackingStore.h:
  • Modules/indexeddb/server/IDBSerializationContext.cpp: Removed. Moved to IDBBindingUtilities.cpp as

IDBSerializationContext is only used by IDBSerialization thread now.

  • Modules/indexeddb/server/IDBSerializationContext.h: Removed.
  • Modules/indexeddb/server/MemoryIDBBackingStore.cpp:

(WebCore::IDBServer::MemoryIDBBackingStore::MemoryIDBBackingStore):
(WebCore::IDBServer::MemoryIDBBackingStore::serializationContext): Deleted.

  • Modules/indexeddb/server/MemoryIDBBackingStore.h:
  • Modules/indexeddb/server/MemoryObjectStore.cpp:

(WebCore::IDBServer::MemoryObjectStore::MemoryObjectStore):
(WebCore::IDBServer::MemoryObjectStore::addRecord):
(WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords):

  • Modules/indexeddb/server/MemoryObjectStore.h:
  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::updateOneIndexForAddRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::serializationContext): Deleted.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.h:
  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):

  • Sources.txt:
  • bindings/js/IDBBindingUtilities.cpp:

(WebCore::IDBSerializationContext::IDBSerializationContext):
(WebCore::IDBSerializationContext::~IDBSerializationContext):
(WebCore::IDBSerializationContext::globalObject):
(WebCore::IDBSerializationContext::initializeVM):
(WebCore::callOnIDBSerializationThreadAndWait): Create a IDBSerialization thread if not exists, and dispatch a
synchronous task to it.

  • bindings/js/IDBBindingUtilities.h:
6:54 PM Changeset in webkit [278392] by Chris Dumez
  • 19 edits in trunk/Source/WebCore

Port media code to the HTML event loop
https://bugs.webkit.org/show_bug.cgi?id=226543

Reviewed by Ryosuke Niwa.

Port media code to the HTML event loop so that event processing order is consistent
with non-media related events. To avoid having a very large patch, I made the following
changes:

  • Update MainThreadGenericEventQueue to be based on the HTML event loop instead of a global Timer.
  • Introduce a EventLoopDeferrableTask which has the same API as DeferrableTask<Timer> but uses the HTML event loop instead of a global Timer. Port media code to use EventLoopDeferrableTask instead of DeferrableTask.
  • Introduce an EventLoopTaskQueue which has the same API as GenericTaskQueue<Timer> but uses the HTML event loop instead of a global Timer. Port media code to use EventLoopTaskQueue instead of GenericTaskQueue<Timer>.

This effectively ports our entire media code to the HTML event loop. It allows new
media code to use the HTML event loop *directly* without fear of ordering issues. It also
allows us to refactor existing media code to use the HTML event loop *directly* when possible,
in an incremental fashion, without causing ordering issues.

  • Headers.cmake:
  • Modules/remoteplayback/RemotePlayback.cpp:

(WebCore::RemotePlayback::RemotePlayback):

  • Modules/remoteplayback/RemotePlayback.h:
  • animation/DocumentTimelinesController.cpp:

(WebCore::DocumentTimelinesController::DocumentTimelinesController):

  • animation/DocumentTimelinesController.h:
  • dom/FullscreenManager.cpp:
  • dom/FullscreenManager.h:
  • dom/GenericEventQueue.cpp:

(WebCore::MainThreadGenericEventQueue::MainThreadGenericEventQueue):
(WebCore::MainThreadGenericEventQueue::enqueueEvent):
(WebCore::MainThreadGenericEventQueue::close):
(WebCore::MainThreadGenericEventQueue::cancelAllEvents):
(WebCore::MainThreadGenericEventQueue::hasPendingEventsOfType const):

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

(WebCore::HTMLMediaElement::HTMLMediaElement):

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

(WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement):

  • html/shadow/MediaControlTextTrackContainerElement.h:
  • platform/DeferrableTask.h:

(WebCore::DeferrableTaskBase::close):
(WebCore::DeferrableTaskBase::cancelTask):
(WebCore::DeferrableTaskBase::hasPendingTask const):
(WebCore::DeferrableTaskBase::isClosed const):
(WebCore::DeferrableTaskBase::setHasPendingTask):

  • platform/GenericTaskQueue.h:

(WebCore::GenericTaskQueueBase::hasPendingTasks const):
(WebCore::GenericTaskQueueBase::isClosed const):
(WebCore::GenericTaskQueueBase::close):
(WebCore::GenericTaskQueueBase::cancelAllTasks):
(WebCore::GenericTaskQueueBase::incrementPendingTasks):
(WebCore::GenericTaskQueueBase::decremementPendingTasks):

6:25 PM Changeset in webkit [278391] by achristensen@apple.com
  • 59 edits
    10 adds
    3 deletes in trunk

Fix WPT test resource-timing/cross-origin-redirects.html
https://bugs.webkit.org/show_bug.cgi?id=190523
<rdar://45227788>

Reviewed by Brady Eidson.

LayoutTests/imported/w3c:

  • web-platform-tests/navigation-timing/nav2_test_redirect_server-expected.txt:
  • web-platform-tests/navigation-timing/nav2_test_redirect_server.html:

Sometimes, with our use of Performance::reduceTimeResolution, the event times are equal to each other.
Allow this.

  • web-platform-tests/resource-timing/cross-origin-redirects-expected.txt: Added.
  • web-platform-tests/resource-timing/cross-origin-redirects.html: Added.
  • web-platform-tests/resource-timing/resources/entry-invariants.js: Added.

(const.assert_all_equal_):
(const.assert_ordered_):
(const.assert_zeroed_):
(const.assert_not_negative_):
(const.assert_positive_):
(const.attribute_test_internal):
(async const):
(const.attribute_test_with_validator):

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

(const.load.font.path.return.document.fonts.ready.then):
(const.load.stylesheet.async path):
(const.load.iframe.async path):
(const.load.script.async path):
(const.load.xhr_sync.async path):

Source/WebCore:

Test: imported/w3c/web-platform-tests/resource-timing/cross-origin-redirects.html

This test took more to fix than I thought it would. We used to collect our timing data
from various sources into various structures, mostly based on Google's work from 2010 with
a few things tacked on to it. The timing specifications have changed considerably in the
last 11 years, and so should the shape of the structures we put the data into.

We used to have a LoadTiming structure in various places that claimed to contain the redirect times,
but markRedirectStart and markRedirectEnd were never called. Instead we tried to collect this data
from the SubResourceLoader and DocumentLoader reporting redirects in the web process. This wasn't great.
Redirect timing is best collected in the network process by the framework doing the redirecting,
and now we have the NSURLSessionTaskMetrics API to get the data we need.

I've made NetworkLoadMetrics the structure that contains all the network load metrics from the network process.
DocumentEventTiming is owned in the web process by the Document, and it contains the load event timing data.
ResourceLoadTiming is owned by the ResourceLoader, and it contains the fetch start and end times including the
parts of the fetch algorithm that happen in the web process.
DocumentLoadTiming inherits from it and is owned by the DocumentLoader, which reflects the fact that
PerformanceNavigationTiming inherits from PerformanceResourceTiming in the specs.
With these structures in place, we now have the infrastructure to collect timing data and expose it correctly.

Another thing that has changed is that these structures consistently store the timing data in the MonotonicTime type,
which is the number of seconds since the machine restarted. NetworkLoadMetrics used to confusingly store fetch
start time and then other network times as deltas from it, and we would pretend that fetch start time was the same
as the fetch start time in the web process and calculate everything from the deltas. This is an unfortunate
consequence of my younger self not realizing that the double values from NSURLConnection._timingData are values to
be put into [NSDate initWithTimeIntervalSinceReferenceDate] then pulled out with timeIntervalSince1970 to get
WallTime. I was confused because they weren't WallTime or MonotonicTime, so I only dealt with them as deltas
from each other. Consistently using MonotonicTime makes all this code much more straightforward.

I also use std::numeric_limits<uint64_t>::max() instead of std::numeric_limits<uint32_t>::max() as a sentinel value
for requestHeaderBytesSent and responseHeaderBytesReceived to make everything more sane. I'm not too worried about
the metrics of downloads of exactly 4GB, but they should also be fixed.

A consequence of collecting the redirect times in the network process is that we have to move the
SecurityOrigin::canRequest checks to see if the redirects are same-origin to ResourceHandle and NetworkDataTask.

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

(WebCore::Document::setReadyState):
(WebCore::Document::finishedParsing):
(WebCore::Document::monotonicTimestamp const):

  • dom/Document.h:

(WebCore::Document::eventTiming const):
(WebCore::Document::timing const): Deleted.

  • dom/DocumentEventTiming.h: Copied from Source/WebCore/dom/DocumentTiming.h.
  • inspector/agents/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::buildObjectForTiming):
(WebCore::InspectorNetworkAgent::buildObjectForMetrics):
(WebCore::InspectorNetworkAgent::buildObjectForResourceResponse):
(WebCore::InspectorNetworkAgent::didFinishLoading):

  • inspector/agents/InspectorNetworkAgent.h:
  • loader/DocumentLoadTiming.h: Renamed from Source/WebCore/loader/LoadTiming.h.

(WebCore::DocumentLoadTiming::timeOrigin const):
(WebCore::DocumentLoadTiming::markUnloadEventStart):
(WebCore::DocumentLoadTiming::markUnloadEventEnd):
(WebCore::DocumentLoadTiming::markLoadEventStart):
(WebCore::DocumentLoadTiming::markLoadEventEnd):
(WebCore::DocumentLoadTiming::setHasSameOriginAsPreviousDocument):
(WebCore::DocumentLoadTiming::unloadEventStart const):
(WebCore::DocumentLoadTiming::unloadEventEnd const):
(WebCore::DocumentLoadTiming::loadEventStart const):
(WebCore::DocumentLoadTiming::loadEventEnd const):
(WebCore::DocumentLoadTiming::hasSameOriginAsPreviousDocument const):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::finishedLoading):
(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::dataReceived):
(WebCore::DocumentLoader::startLoadingMainResource):

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::timing const):
(WebCore::DocumentLoader::timing):
(WebCore::DocumentLoader::resetTiming):

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::loadRequest):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::dispatchUnloadEvents):

  • loader/LoadTiming.cpp: Removed.
  • loader/ResourceLoadTiming.h: Renamed from Source/WebCore/dom/DocumentTiming.h.

(WebCore::ResourceLoadTiming::markStartTime):
(WebCore::ResourceLoadTiming::markEndTime):
(WebCore::ResourceLoadTiming::startTime const):
(WebCore::ResourceLoadTiming::endTime const):
(WebCore::ResourceLoadTiming::isolatedCopy const):

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::init):

  • loader/ResourceLoader.h:

(WebCore::ResourceLoader::loadTiming):

  • loader/ResourceTiming.cpp:

(WebCore::ResourceTiming::fromMemoryCache):
(WebCore::ResourceTiming::fromLoad):
(WebCore::ResourceTiming::fromSynchronousLoad):
(WebCore::ResourceTiming::ResourceTiming):
(WebCore::ResourceTiming::isolatedCopy const):
(WebCore::ResourceTiming::fromCache): Deleted.

  • loader/ResourceTiming.h:

(WebCore::ResourceTiming::resourceLoadTiming const):
(WebCore::ResourceTiming::ResourceTiming):
(WebCore::ResourceTiming::loadTiming const): Deleted.

  • loader/ResourceTimingInformation.cpp:
  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::willSendRequestInternal):
(WebCore::SubresourceLoader::didFinishLoading):

  • loader/cache/CachedResource.h:
  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::performance const):

  • page/Performance.cpp:

(WebCore::Performance::addNavigationTiming):

  • page/Performance.h:
  • page/PerformanceNavigation.cpp:

(WebCore::PerformanceNavigation::redirectCount const):

  • page/PerformanceNavigationTiming.cpp:

(WebCore::PerformanceNavigationTiming::PerformanceNavigationTiming):
(WebCore::PerformanceNavigationTiming::millisecondsSinceOrigin const):
(WebCore::PerformanceNavigationTiming::sameOriginCheckFails const):
(WebCore::PerformanceNavigationTiming::unloadEventStart const):
(WebCore::PerformanceNavigationTiming::unloadEventEnd const):
(WebCore::PerformanceNavigationTiming::domInteractive const):
(WebCore::PerformanceNavigationTiming::domContentLoadedEventStart const):
(WebCore::PerformanceNavigationTiming::domContentLoadedEventEnd const):
(WebCore::PerformanceNavigationTiming::domComplete const):
(WebCore::PerformanceNavigationTiming::loadEventStart const):
(WebCore::PerformanceNavigationTiming::loadEventEnd const):
(WebCore::PerformanceNavigationTiming::redirectCount const):

  • page/PerformanceNavigationTiming.h:
  • page/PerformanceResourceTiming.cpp:

(WebCore::networkLoadTimeToDOMHighResTimeStamp):
(WebCore::fetchStart):
(WebCore::entryStartTime):
(WebCore::entryEndTime):
(WebCore::PerformanceResourceTiming::redirectStart const):
(WebCore::PerformanceResourceTiming::redirectEnd const):
(WebCore::PerformanceResourceTiming::fetchStart const):
(WebCore::PerformanceResourceTiming::domainLookupStart const):
(WebCore::PerformanceResourceTiming::domainLookupEnd const):
(WebCore::PerformanceResourceTiming::connectStart const):
(WebCore::PerformanceResourceTiming::connectEnd const):
(WebCore::PerformanceResourceTiming::secureConnectionStart const):
(WebCore::PerformanceResourceTiming::requestStart const):
(WebCore::PerformanceResourceTiming::responseStart const):
(WebCore::PerformanceResourceTiming::responseEnd const):
(WebCore::monotonicTimeToDOMHighResTimeStamp): Deleted.
(WebCore::PerformanceResourceTiming::networkLoadTimeToDOMHighResTimeStamp const): Deleted.

  • page/PerformanceResourceTiming.h:
  • page/PerformanceTiming.cpp:

(WebCore::PerformanceTiming::navigationStart const):
(WebCore::PerformanceTiming::unloadEventStart const):
(WebCore::PerformanceTiming::unloadEventEnd const):
(WebCore::PerformanceTiming::redirectStart const):
(WebCore::PerformanceTiming::redirectEnd const):
(WebCore::PerformanceTiming::fetchStart const):
(WebCore::PerformanceTiming::domainLookupStart const):
(WebCore::PerformanceTiming::domainLookupEnd const):
(WebCore::PerformanceTiming::connectStart const):
(WebCore::PerformanceTiming::connectEnd const):
(WebCore::PerformanceTiming::secureConnectionStart const):
(WebCore::PerformanceTiming::requestStart const):
(WebCore::PerformanceTiming::responseStart const):
(WebCore::PerformanceTiming::responseEnd const):
(WebCore::PerformanceTiming::domLoading const):
(WebCore::PerformanceTiming::domInteractive const):
(WebCore::PerformanceTiming::domContentLoadedEventStart const):
(WebCore::PerformanceTiming::domContentLoadedEventEnd const):
(WebCore::PerformanceTiming::domComplete const):
(WebCore::PerformanceTiming::loadEventStart const):
(WebCore::PerformanceTiming::loadEventEnd const):
(WebCore::PerformanceTiming::documentLoader const):
(WebCore::PerformanceTiming::documentEventTiming const):
(WebCore::PerformanceTiming::documentLoadTiming const):
(WebCore::PerformanceTiming::networkLoadMetrics const):
(WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds const):
(WebCore::PerformanceTiming::documentTiming const): Deleted.
(WebCore::PerformanceTiming::loadTiming const): Deleted.
(WebCore::PerformanceTiming::resourceLoadTimeRelativeToFetchStart const): Deleted.

  • page/PerformanceTiming.h:
  • platform/network/NetworkLoadMetrics.h:

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

  • platform/network/ResourceHandle.cpp:

(WebCore::ResourceHandle::hasCrossOriginRedirect const):
(WebCore::ResourceHandle::setHasCrossOriginRedirect):
(WebCore::ResourceHandle::incrementRedirectCount):
(WebCore::ResourceHandle::redirectCount const):
(WebCore::ResourceHandle::startTimeBeforeRedirects const):
(WebCore::ResourceHandle::networkLoadMetrics):
(WebCore::ResourceHandle::setNetworkLoadMetrics):

  • platform/network/ResourceHandle.h:
  • platform/network/ResourceHandleInternal.h:
  • platform/network/cocoa/NetworkLoadMetrics.mm:

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

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(networkLoadMetricsDate):
(-[WebCoreNSURLSessionTaskTransactionMetrics fetchStartDate]):
(-[WebCoreNSURLSessionTaskTransactionMetrics domainLookupStartDate]):
(-[WebCoreNSURLSessionTaskTransactionMetrics domainLookupEndDate]):
(-[WebCoreNSURLSessionTaskTransactionMetrics connectStartDate]):
(-[WebCoreNSURLSessionTaskTransactionMetrics secureConnectionStartDate]):
(-[WebCoreNSURLSessionTaskTransactionMetrics connectEndDate]):
(-[WebCoreNSURLSessionTaskTransactionMetrics requestStartDate]):
(-[WebCoreNSURLSessionTaskTransactionMetrics responseStartDate]):
(-[WebCoreNSURLSessionTaskTransactionMetrics responseEndDate]):

  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::getNetworkLoadMetrics):

  • platform/network/curl/CurlContext.h:
  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::didCompleteTransfer):
(WebCore::CurlRequest::networkLoadMetrics):

  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::ResourceHandle::start):

  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:

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

Source/WebKit:

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

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

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup):
(WebKit::NetworkDataTaskSoup::clearRequest):
(WebKit::NetworkDataTaskSoup::resume):
(WebKit::NetworkDataTaskSoup::didSendRequest):
(WebKit::NetworkDataTaskSoup::dispatchDidCompleteWithError):
(WebKit::NetworkDataTaskSoup::continueHTTPRedirection):
(WebKit::NetworkDataTaskSoup::networkEvent):
(WebKit::NetworkDataTaskSoup::didStartRequest):
(WebKit::NetworkDataTaskSoup::didRestart):

LayoutTests:

  • http/tests/misc/webtiming-slow-load-expected.txt:
  • http/tests/misc/webtiming-slow-load.py:

Our new metrics gathering now matches Firefox instead of Chrome in PerformanceResourceTiming::responseEnd in this edge case of a deprecated API.
Update expectations accordingly.

  • platform/mac-wk1/TestExpectations:

Bringing this test to passing in WK2 makes it flaky in WK1 because we don't get good redirect timing data from CFNetwork through NSURLConnection.

  • platform/win/http/tests/misc/webtiming-one-redirect-expected.txt: Added.
  • platform/win/http/tests/misc/webtiming-slow-load-expected.txt: Copied from LayoutTests/http/tests/misc/webtiming-slow-load-expected.txt.
  • platform/win/http/tests/misc/webtiming-two-redirects-expected.txt: Added.

The network layer is now responsible for counting redirects and providing redirect timings.
Our friend CFURLConnection doesn't have that ability, so it doesn't pass these tests any more.
It never supported any timing APIs and other tests are skipped.

6:07 PM Changeset in webkit [278390] by rmorisset@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

B3MoveConstants should filter directly on Values, and only create ValueKeys when useful
https://bugs.webkit.org/show_bug.cgi?id=226420

Reviewed by Phil Pizlo.

I did a few runs of JetStream2 to measure results, the time spent in B3MoveConstants goes from 160-180ms to 100-110ms.
The total time spent in B3+Air is in the 6 to 8s range, so this is approximately a 1% speedup.

  • b3/B3MoveConstants.cpp:
5:33 PM Changeset in webkit [278389] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Remove redundant isChildHitTestCandidate in RenderBlock::positionForPoint
https://bugs.webkit.org/show_bug.cgi?id=226554
<rdar://problem/78782485>

Reviewed by Simon Fraser.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::positionForPoint):

5:09 PM Changeset in webkit [278388] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[MacOS] media/video-played-collapse.html is flaky timeout and failure
https://bugs.webkit.org/show_bug.cgi?id=226520

Unreviewed test gardening.

  • platform/mac/TestExpectations:
4:52 PM Changeset in webkit [278387] by Amir Mark Jr.
  • 2 edits in trunk/LayoutTests

[BigSur E Wk1 Release] media/media-event-listeners.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=226517

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
4:51 PM Changeset in webkit [278386] by Ruben Turcios
  • 4 edits in branches/safari-612.1.16-branch/Source/WebKit

Cherry-pick r278370. rdar://problem/78787261

[iOS] Fix IOKit sandbox violations
https://bugs.webkit.org/show_bug.cgi?id=226546
<rdar://78523469>

Reviewed by Tim Horton.

Fix IOKit sandbox violations in the WebContent process on iOS.

  • Configurations/SandboxProfiles.xcconfig:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
  • WebKit.xcodeproj/project.pbxproj:

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

4:51 PM Changeset in webkit [278385] by Ruben Turcios
  • 6 edits
    1 move in branches/safari-612.1.16-branch/Source/WebKit

Cherry-pick r278308. rdar://problem/78789128

[iOS] Preprocess the WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=226301
<rdar://problem/78575178>

Reviewed by Geoffrey Garen.

Run the WebContent sandbox through the preprocessor on iOS.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Removed.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in: Copied from Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.
  • WebKit.xcodeproj/project.pbxproj:

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

4:49 PM Changeset in webkit [278384] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Drop WTF::Vector overloads taking index as Checked<size_t>
https://bugs.webkit.org/show_bug.cgi?id=226553

Reviewed by Geoffrey Garen.

Drop WTF::Vector overloads taking index as Checked<size_t>. They are no longer needed now that
Checked<size_t> can implicitly get converted to size_t (r278338).

  • wtf/Vector.h:

(WTF::Vector::at const):
(WTF::Vector::operator[] const):

4:33 PM Changeset in webkit [278383] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

[Cocoa] Clean up notification_center message filters
https://bugs.webkit.org/show_bug.cgi?id=226555
<rdar://problem/77164076>

Reviewed by Per Arne Vollan.

We initially had two groups of mach-message-send filter rules for 'com.apple.system.notification_center' so we could
collect telemetry on a group of messages. Now that we have removed all the messages we do not need, there is no reason
to maintain two separate sets.

This patch just combines the two sets into a single list so we can easily conditionalize it for different OS releases
if needed.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
4:30 PM Changeset in webkit [278382] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

[iOS] Unreviewed test gardening.

  • platform/ios/TestExpectations:
4:28 PM Changeset in webkit [278381] by rmorisset@apple.com
  • 17 edits
    2 deletes in trunk/Source/JavaScriptCore

Merge B3::StackSlot and Air::StackSlot
https://bugs.webkit.org/show_bug.cgi?id=226362

Reviewed by Filip Pizlo.

This is a very simple and safe (although small) memory saving, since every B3StackSlot eventually becomes an AirStackSlot with an exact copy of all the same information.
Simply dropping the B3StackSlot past that point is tricky, because one of them might be retained by FTLState (and modified by Air).
It is much simpler to just use Air::StackSlot throughout. It saves us:

  • 16 bytes per B3StackSlot (for the structure itself)
  • another 8 bytes per B3StackSlot (for the pointer in the SparseCollection)
  • 8 bytes per AirStackSlot (for the pointer to the B3::StackSlot)

I also took the opportunity to save an extra 8 bytes per AirStackSlot, by shrinking the bytesize field to a uint16_t (with a RELEASE_ASSERT that we never overflow it) and moving the StackSlotKind in the hole this creates.
Total savings: 16 bytes per spill slot and 40 bytes per locked (by B3) slot.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • b3/B3LowerToAir.cpp:
  • b3/B3Procedure.cpp:

(JSC::B3::Procedure::addStackSlot):
(JSC::B3::Procedure::dump const):

  • b3/B3Procedure.h:
  • b3/B3ProcedureInlines.h:

(JSC::B3::Procedure::stackSlots):
(JSC::B3::Procedure::stackSlots const):

  • b3/B3SlotBaseValue.cpp:
  • b3/B3SlotBaseValue.h:
  • b3/B3StackSlot.cpp: Removed.
  • b3/B3StackSlot.h: Removed.
  • b3/B3Value.cpp:
  • b3/air/AirCode.cpp:

(JSC::B3::Air::Code::addStackSlot):

  • b3/air/AirCode.h:
  • b3/air/AirStackSlot.cpp:

(JSC::B3::Air::StackSlot::setOffsetFromFP):
(JSC::B3::Air::StackSlot::deepDump const):
(JSC::B3::Air::StackSlot::StackSlot):

  • b3/air/AirStackSlot.h:

(JSC::B3::Air::StackSlot::ensureSize):

  • b3/testb3.h:
  • ftl/FTLCompile.cpp:
  • ftl/FTLState.h:
4:10 PM Changeset in webkit [278380] by Jonathan Bedard
  • 5 edits in trunk/Tools

[webkitcorepy] TaskPool shouldn't fork when 1 process is needed
https://bugs.webkit.org/show_bug.cgi?id=226506
<rdar://problem/78724554>

Reviewed by Dewei Zhu.

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

(TaskPool.init): Allow user to force fork, even with a single process.
(TaskPool.enter): If only a single worker is needed and the caller is not forcing
a fork, run the setup function in the parent process.
(TaskPool.do): If no queue has been constructed, we're running in the parent process.
(TaskPool.wait): Nothing to wait for if we're running in the parent process.
(TaskPool.exit): If no queue has been constructed, we're running in the parent process,
so run the teardown in this process and reset the process name.

  • Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py:

(TaskPoolUnittest.test_single): Force fork.
(TaskPoolUnittest.test_single_no_fork):
(TaskPoolUnittest.test_exception): Force fork.
(TaskPoolUnittest.test_exception_no_fork):
(TaskPoolUnittest.test_invalid_shutdown): Force fork.

3:31 PM Changeset in webkit [278379] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Incorrect selection when tall float is present
https://bugs.webkit.org/show_bug.cgi?id=226552
<rdar://problem/78781056>

Reviewed by Simon Fraser.

Source/WebCore:

While floats may end up at the bottom of their containers, they do not necessarily stretch the container by their full height.
e.g. <div><div style="float: left; height: 10px; width: 10px;"></div>some<br>text<br>here</div>
The [some text here] content wraps around the float and stretches the containing block <div>.

Test: editing/selection/select-out-of-floated-non-editable-13.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::positionForPoint):

LayoutTests:

  • editing/selection/select-out-of-floated-non-editable-07.html:
  • editing/selection/select-out-of-floated-non-editable-13-expected.txt: Added.
  • editing/selection/select-out-of-floated-non-editable-13.html: Added.
3:29 PM Changeset in webkit [278378] by commit-queue@webkit.org
  • 5 edits in trunk/Tools

[resultsdbpy] "legend" is misspelled as "lengend"
https://bugs.webkit.org/show_bug.cgi?id=226436

Patch by W.D. Xiong <w_xiong@apple.com> on 2021-06-02
Reviewed by Darin Adler.

Corrected said misspelling in resultsdbpy

  • Scripts/libraries/resultsdbpy/resultsdbpy/view/static/js/timeline.js:
  • Scripts/libraries/resultsdbpy/resultsdbpy/view/static/library/css/docs.yaml:
  • Scripts/libraries/resultsdbpy/resultsdbpy/view/static/library/css/index.html:
  • Scripts/libraries/resultsdbpy/resultsdbpy/view/static/library/css/webkit.css:

(.legend, .timeline>.content .legend):
(.legend.horizontal, .timeline>.header .legend):
(.legend>.item):
(.legend>.item .dot):
(.legend>.item .dot img, .legend>.item .dot .text):
(.legend>.item .dot>img, .legend>.item .dot>.text):
(.timeline.legend>.item .dot::before):
(.timeline.legend>.item .dot::after):
(.legend>.item .label):
(.lengend, .timeline>.content .lengend): Deleted.
(.lengend.horizontal, .timeline>.header .lengend): Deleted.
(.lengend>.item): Deleted.
(.lengend>.item .dot): Deleted.
(.lengend>.item .dot img, .lengend>.item .dot .text): Deleted.
(.lengend>.item .dot>img, .lengend>.item .dot>.text): Deleted.
(.timeline.lengend>.item .dot::before): Deleted.
(.timeline.lengend>.item .dot::after): Deleted.
(.lengend>.item .label): Deleted.

3:00 PM Changeset in webkit [278377] by graouts@webkit.org
  • 3 edits
    4 adds in trunk

Hit-testing does not account for clip-path set on parent of <iframe>
https://bugs.webkit.org/show_bug.cgi?id=226499
<rdar://problem/77317612>

Reviewed by Simon Fraser.

Source/WebCore:

Before considering hit-testing children layers, we should ensure that the current RenderLayer doesn't have styles
set on its renderer that would clip the layer in such a way that the hit test location wouldn't yield a positive
result.

Tests: css3/masking/clip-path-hit-test-on-absolute-position-iframe-parent.html

css3/masking/clip-path-hit-test-on-iframe-parent.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::hitTestLayer):

LayoutTests:

Add new tests checking that we don't hit-tests elements when the location is
part of an <iframe> clipped by the clip-path property set on a parent element.
We test the case where the <iframe> has position: absolute as well as the
default position.or https://bugs.webkit.org/show_bug.cgi?id=226499

  • css3/masking/clip-path-hit-test-on-absolute-position-iframe-parent-expected.txt: Added.
  • css3/masking/clip-path-hit-test-on-absolute-position-iframe-parent.html: Added.
  • css3/masking/clip-path-hit-test-on-iframe-parent-expected.txt: Added.
  • css3/masking/clip-path-hit-test-on-iframe-parent.html: Added.
2:51 PM Changeset in webkit [278376] by graouts@webkit.org
  • 4 edits
    2 adds in trunk

REGRESSION (r275227): Check boxes on V-Safe site flicker when selected
https://bugs.webkit.org/show_bug.cgi?id=226549
<rdar://problem/77722651>

Reviewed by Simon Fraser.

Source/WebCore:

When checking equality for StyleCachedImage, check whether the backing CSSImageValue is equal even if the pointer is different.

Test: webanimations/background-image-css-variable-no-transition.html

  • rendering/style/StyleCachedImage.cpp:

(WebCore::StyleCachedImage::operator== const):

LayoutTests:

Check that a background-image set to a CSS variable doesn't yield a transition when another style property changes.

  • webanimations/background-image-css-variable-no-transition-expected.txt: Added.
  • webanimations/background-image-css-variable-no-transition.html: Added.
  • webanimations/empty-keyframes-crash.html: motify this existing test which relie on the buggy behavior to trigger

a transition.

2:47 PM Changeset in webkit [278375] by Pablo Saavedra
  • 2 edits in trunk/Source/JavaScriptCore

Fix build error with ENABLE_DFG_JIT=OFF
https://bugs.webkit.org/show_bug.cgi?id=226550

Reviewed by Mark Lam.

  • jit/JITPlan.cpp:

(JSC::JITPlan::compileInThread):

2:35 PM Changeset in webkit [278374] by jer.noble@apple.com
  • 14 edits in trunk/Source

REGRESSION(r276993): 5 TestWebKitAPI.AudioRoutingArbitration (api-tests) are constant failures
https://bugs.webkit.org/show_bug.cgi?id=226104
<rdar://77998049>

Reviewed by Eric Carlson.

Source/WebCore:

Add a mechanism for a client to wait until an AudioSession is created or changed before taking
an action.

  • platform/audio/AudioSession.cpp:

(WebCore::audioSessionChangedObservers):
(WebCore::AudioSession::sharedSession):
(WebCore::AudioSession::setSharedSession):
(WebCore::AudioSession::addAudioSessionChangedObserver):

  • platform/audio/AudioSession.h:

Source/WebKit:

In r276993, AudioSessionRoutingArbitration was moved from being initiated in the WebContent process
and dispatched to the UIProcess, to being dispatched to the GPU process. However two problems occurred:

1) The UIProcess no longer knows about routing arbitration, which is reasonable for the feature, but

breaks an API test that queries arbitration status in the UIProcess.

2) A sandbox violation causes routing arbitration to fail in the GPU process regardless.

We could open up the sandbox to allow routing arbitration to succeed (and come up with a way to push
state changes up to the UIProcess for testing purposes), but it's not technically necessary for
arbitration to occur there. Instead, just revert to the status-quo-ante behavior of having arbitration
take place in the UIProcess, and just add a new set of messages from the GPUConnoctionToWebProcess to
the GPUProcessConnection to facilitate arbitration.

Drive-by fix: AudioSessionRoutingArbitrator is a supplement to WebProcess, and as such it's created
at WebProcess creation time. However, it also causes an AudioSession to be created by attempting to
add itself as a client. This is bad on iOS, where it could cause hangs due to AVAudioSession calls.
So, add a mechanism to be notified when an AudioSession eventually does get created, and add the
arbitrator as a client then.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::GPUConnectionToWebProcess):

  • GPUProcess/mac/LocalAudioSessionRoutingArbitrator.cpp:

(WebKit::LocalAudioSessionRoutingArbitrator::create):
(WebKit::LocalAudioSessionRoutingArbitrator::LocalAudioSessionRoutingArbitrator):
(WebKit::LocalAudioSessionRoutingArbitrator::processDidTerminate):
(WebKit::LocalAudioSessionRoutingArbitrator::beginRoutingArbitrationWithCategory):
(WebKit::LocalAudioSessionRoutingArbitrator::leaveRoutingAbritration):

  • GPUProcess/mac/LocalAudioSessionRoutingArbitrator.h:
  • GPUProcess/media/RemoteAudioSessionProxyManager.h:

(WebKit::RemoteAudioSessionProxyManager::session):

  • UIProcess/GPU/GPUProcessProxy.h:
  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::beginRoutingArbitrationWithCategory):
(WebKit::GPUProcessConnection::endRoutingArbitration):

  • WebProcess/GPU/GPUProcessConnection.h:
  • WebProcess/GPU/GPUProcessConnection.messages.in:
  • WebProcess/cocoa/AudioSessionRoutingArbitrator.cpp:

(WebKit::AudioSessionRoutingArbitrator::AudioSessionRoutingArbitrator):

  • WebProcess/cocoa/AudioSessionRoutingArbitrator.h:
2:33 PM Changeset in webkit [278373] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION(r277217?): ASSERTION FAILED: Unhandled message RemoteLegacyCDMSession_SendError to 10 assertionFailureDueToUnreachableCode
https://bugs.webkit.org/show_bug.cgi?id=226545
<rdar://78001450>

Reviewed by Eric Carlson.

Add message handlers for RemoteLegacyCDMProxy and RemoteLegacyCDMSessionProxy.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::dispatchMessage):
(WebKit::GPUConnectionToWebProcess::dispatchSyncMessage):

2:09 PM Changeset in webkit [278372] by Chris Dumez
  • 11 edits in trunk/Source/WebCore

Drop legacy ActiveDOMObject::setPendingActivity() / unsetPendingActivity()
https://bugs.webkit.org/show_bug.cgi?id=226544

Reviewed by Darin Adler.

Drop legacy ActiveDOMObject::setPendingActivity() / unsetPendingActivity(). They are too leak-prone. The modern
way to do this is to either override ActiveDOMObject::virtualHasPendingActivity() or use
ActiveDOMObject::makePendingActivity().

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::ApplePaySession::begin):
(WebCore::ApplePaySession::abort):
(WebCore::ApplePaySession::completePayment):
(WebCore::ApplePaySession::didCancelPaymentSession):
(WebCore::ApplePaySession::stop):
(WebCore::ApplePaySession::suspend):
(WebCore::ApplePaySession::virtualHasPendingActivity const):
(WebCore::ApplePaySession::didReachFinalState): Deleted.

  • Modules/applepay/ApplePaySession.h:
  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::addedToRegistry):
(WebCore::MediaSource::removedFromRegistry):
(WebCore::MediaSource::virtualHasPendingActivity const):

  • Modules/mediasource/MediaSource.h:
  • Modules/mediastream/RTCDataChannel.cpp:

(WebCore::RTCDataChannel::create):
(WebCore::RTCDataChannel::close):
(WebCore::RTCDataChannel::virtualHasPendingActivity const):

  • Modules/mediastream/RTCDataChannel.h:
  • dom/ActiveDOMObject.h:
  • page/EventSource.cpp:

(WebCore::EventSource::create):
(WebCore::EventSource::networkRequestEnded):
(WebCore::EventSource::close):
(WebCore::EventSource::abortConnectionAttempt):
(WebCore::EventSource::virtualHasPendingActivity const):

  • page/EventSource.h:
  • workers/Worker.cpp:

(WebCore::Worker::create):
(WebCore::Worker::virtualHasPendingActivity const):
(WebCore::Worker::notifyFinished):

1:45 PM Changeset in webkit [278371] by rmorisset@apple.com
  • 12 edits in trunk/Source/JavaScriptCore

We should drop B3 values while running Air
https://bugs.webkit.org/show_bug.cgi?id=226187

Reviewed by Saam Barati.

We must keep the following values:

  • WasmBoundsCheck, to know whether it is Pinned or Maximum, and if it is pinned find its argument.
  • CCall/Patch/Check/CheckAdd/CheckSub/CheckMul and all of their children, because all of these are lowered to Air::Patchpoint, which needs to know the type of its arguments, and does so by looking at the children of its origin.

I intend to fix these in later patches if possible.

Finally we must preserve all B3 values in the following cases:

  • if we dump the disassembly or the Air graph: because otherwise we cannot print the origins
  • if we are using the sampling profiler, because it relies on PCToCodeOriginMap which we cannot accurately fill without these origins.

We must also keep m_tuples alive, as it is used by Patchpoints in Air to understand the types of their arguments.
We also don't touch StackSlots (in this patch), because one of them is captured by FTL::State.

Also now PCToOriginMap has a Vector with no inline capacity, since it is either quite large (if needed) or empty (otherwise).

The performance impact of this is a progression on various RAMification subtests on Mac, but is more mitigated on iPhone7, with various regressions.
I suspect these to be noise, and will monitor the performance bots post-landing to make sure of it.

  • b3/B3LowerToAir.cpp:

(JSC::B3::lowerToAir):

  • b3/B3Procedure.cpp:

(JSC::B3::Procedure::freeUnneededB3ValuesAfterLowering):

  • b3/B3Procedure.h:

(JSC::B3::Procedure::releasePCToOriginMap):
(JSC::B3::Procedure::setNeedsPCToOriginMap):
(JSC::B3::Procedure::needsPCToOriginMap):

  • b3/B3SparseCollection.h:

(JSC::B3::SparseCollection::clearAll):
(JSC::B3::SparseCollection::filterAndTransfer):

  • b3/air/AirCode.cpp:

(JSC::B3::Air::Code::Code):

  • b3/air/AirCode.h:

(JSC::B3::Air::Code::shouldPreserveB3Origins const):

  • b3/air/AirGenerate.cpp:

(JSC::B3::Air::generateWithAlreadyAllocatedRegisters):

  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • ftl/FTLState.cpp:

(JSC::FTL::State::State):

1:34 PM Changeset in webkit [278370] by pvollan@apple.com
  • 4 edits in trunk/Source/WebKit

[iOS] Fix IOKit sandbox violations
https://bugs.webkit.org/show_bug.cgi?id=226546
<rdar://78523469>

Reviewed by Tim Horton.

Fix IOKit sandbox violations in the WebContent process on iOS.

  • Configurations/SandboxProfiles.xcconfig:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
  • WebKit.xcodeproj/project.pbxproj:
12:02 PM Changeset in webkit [278369] by Chris Dumez
  • 13 edits in trunk

Drop Checked::safeGet()
https://bugs.webkit.org/show_bug.cgi?id=226537

Reviewed by Geoffrey Garen.

Drop Checked::safeGet() and replace with uses of Checked::operator T() or Checked::value().
safeGet() is a bit akward, having both a return value and an out-parameter.

Source/JavaScriptCore:

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • runtime/JSArray.cpp:

(JSC::JSArray::appendMemcpy):
(JSC::JSArray::unshiftCountWithAnyIndexingType):

  • runtime/JSStringJoiner.cpp:

(JSC::JSStringJoiner::joinedLength const):

  • wasm/WasmFormat.cpp:

(JSC::Wasm::Segment::create):

  • wasm/WasmOperations.cpp:

(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):

  • wasm/WasmTable.cpp:

(JSC::Wasm::Table::grow):

Source/WebKit:

  • UIProcess/mac/TextCheckerMac.mm:

(WebKit::TextChecker::updateSpellingUIWithGrammarString):

Source/WTF:

  • wtf/CheckedArithmetic.h:

(WTF::Checked::value const):
(WTF::operator+):
(WTF::operator-):
(WTF::operator*):
(WTF::operator/):

Tools:

  • TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp:

(TestWebKitAPI::CheckedArithmeticTester::run):

11:42 AM Changeset in webkit [278368] by Alan Coon
  • 8 edits in branches/safari-612.1.16-branch/Source

Versioning.

WebKit-7612.1.16.2

11:26 AM Changeset in webkit [278367] by Alan Coon
  • 1 copy in tags/Safari-612.1.16.1

Tag Safari-612.1.16.1.

11:14 AM Changeset in webkit [278366] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Add globalObject API set property test
https://bugs.webkit.org/show_bug.cgi?id=226542
<rdar://78287979>

Reviewed by Alexey Shvayka.

  • API/tests/testapi.cpp:

(TestAPI::testJSObjectSetOnGlobalObjectSubclassDefinition):
(testCAPIViaCpp):

10:40 AM Changeset in webkit [278365] by Alan Coon
  • 8 edits in branches/safari-612.1.16-branch/Source

Versioning.

WebKit-7612.1.16.1

10:38 AM Changeset in webkit [278364] by weinig@apple.com
  • 5 edits in trunk

Add support for "relative color syntax" for color()
https://bugs.webkit.org/show_bug.cgi?id=226513

Reviewed by Darin Adler.

Source/WebCore:

CSS Color 5 has recently been update to support relative color syntax for
the color() function in addition to the existing rgb(), hsl(), hwb(), lab()
and lch().

Took the opertunity to refactor other relative color syntax parsing to share
more code between relative and non-relative parsers using a shared function
with lambdas to differentiate the component consumers. This was done for all
the color types except rgb() and hsl(), which have notable differences in
parsing between the relative and non-relative version.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseNonRelativeRGBParameters):
(WebCore::CSSPropertyParserHelpers::parseRGBParameters):
(WebCore::CSSPropertyParserHelpers::colorByNormalizingHSLComponents):
(WebCore::CSSPropertyParserHelpers::parseRelativeHSLParameters):
(WebCore::CSSPropertyParserHelpers::parseNonRelativeHSLParameters):
(WebCore::CSSPropertyParserHelpers::parseHSLParameters):
(WebCore::CSSPropertyParserHelpers::parseHWBParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeHWBParameters):
(WebCore::CSSPropertyParserHelpers::parseNonRelativeHWBParameters):
(WebCore::CSSPropertyParserHelpers::parseLabParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeLabParameters):
(WebCore::CSSPropertyParserHelpers::parseNonRelativeLabParameters):
(WebCore::CSSPropertyParserHelpers::parseLCHParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeLCHParameters):
(WebCore::CSSPropertyParserHelpers::parseNonRelativeLCHParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForRGBTypes):
(WebCore::CSSPropertyParserHelpers::parseRelativeColorFunctionForRGBTypes):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForXYZParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeColorFunctionForXYZParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeColorFunctionParameters):
(WebCore::CSSPropertyParserHelpers::parseNonRelativeColorFunctionParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters):

LayoutTests:

Updated test and results now that we support relative color syntax
for color(srgb ...), color(a98-rgb ...), color(rec2020 ...),
color(prophoto-rgb ...) and color(xyz ...).

  • fast/css/parsing-relative-color-syntax-expected.txt:
  • fast/css/parsing-relative-color-syntax.html:
10:07 AM Changeset in webkit [278363] by Jean-Yves Avenard
  • 2 edits in trunk/Tools

MediaSessionCoordinator API test is failing,
https://bugs.webkit.org/show_bug.cgi?id=226460
rdar://78680005

Reviewed by Eric Carlson.

When leaving a MediaSessionCoordinator from the JS side; there's no callback
occurring from the MediaSessionCoordinatorPrivate to the MediaSessionCoordinator
(which is what this test was about). A state change callback should only occur
when it's the MediaSessionCoordinatorPrivate that leaves.

  • TestWebKitAPI/Tests/WebKit/MediaSessionCoordinatorTest.mm:

(TestWebKitAPI::TEST_F):

10:01 AM Changeset in webkit [278362] by Kyle Piddington
  • 4 edits
    2 adds in trunk

Add 'mix' override with bool-vectors to MSL translator
https://bugs.webkit.org/show_bug.cgi?id=226366

Source/ThirdParty/ANGLE:

Reviewed by Dean Jackson.

Add in 'mix' overrides, and logic for selecting mix with bool when necessary.

  • src/compiler/translator/TranslatorMetalDirect/EmitMetal.cpp:

(GetOperatorString):
(GenMetalTraverser::visitAggregate):

  • src/compiler/translator/TranslatorMetalDirect/ProgramPrelude.cpp:

LayoutTests:

Add a short test to ensure bool-vectors can be used in mix.
Reviewed by Dean Jackson.

  • fast/canvas/webgl/shader-mix-with-bool-expected.txt: Added.
9:59 AM Changeset in webkit [278361] by Alan Coon
  • 1 copy in tags/Safari-612.1.16

Tag Safari-612.1.16.

9:53 AM Changeset in webkit [278360] by Alan Coon
  • 2 edits in branches/safari-612.1.16-branch/Source/WebKit

Cherry-pick r278317. rdar://problem/78768874

Resume WebIDBServer when it is about to be closed
https://bugs.webkit.org/show_bug.cgi?id=226502
rdar://78691498

Reviewed by Chris Dumez.

We started to acquire m_serverLock in WebIDBServer::close() in r278179 to stop database activities on the main
thread. However, m_serverLock may already be held for suspension, and WebIDBServer::close() may be called
before resume(). We need to resume WebIDBServer so m_serverLock can be acquired for stopping database activities.
This also makes sure background thread is resumed before WebIDBServer is removed from NetworkProcess.

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

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

9:44 AM Changeset in webkit [278359] by youenn@apple.com
  • 8 edits
    2 adds in trunk

HTMLMediaElement::virtualHasPendingActivity may keep objects alive unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=226529
<rdar://78726921>

Reviewed by Eric Carlson.

Source/WebCore:

In case a media element srcObject is set, its media player is no longer null, even if its srcObject is set back to null later on.
Its ended state is set to false so the media element is kept alive if an event listener is set on the element.
To prevent this, add a check to:

  • keep the media element alive if its resource selection queue is not empty
  • allow GC of a media element if its media player has no engine

A follow-up patch should allow GC a media element with an ended MediaStream.

Test: fast/mediastream/mediaElement-gc.html

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::virtualHasPendingActivity const):

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

(WebCore::Internals::mediaElementCount const):

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

LayoutTests:

  • fast/mediastream/mediaElement-gc-expected.txt: Added.
  • fast/mediastream/mediaElement-gc.html: Added.
9:42 AM Changeset in webkit [278358] by commit-queue@webkit.org
  • 38 edits in trunk

[Cocoa] _WKAuthenticatorAssertionResponse should specify the attachment type used
https://bugs.webkit.org/show_bug.cgi?id=225519
<rdar://problem/76554090>

Source/WebCore:

Patch by Garrett Davidson <garrett_davidson@apple.com> on 2021-06-02
Reviewed by Brent Fulgham.

Allow WebAuthn authenticators to pass back their attachment type and continue
plumbing through up to the authenticator coordinator.

Covered by manual tests.

  • Modules/webauthn/AuthenticatorAssertionResponse.cpp:

(WebCore::AuthenticatorAssertionResponse::create):
(WebCore::AuthenticatorAssertionResponse::AuthenticatorAssertionResponse):

  • Modules/webauthn/AuthenticatorAssertionResponse.h:
  • Modules/webauthn/AuthenticatorAttestationResponse.cpp:

(WebCore::AuthenticatorAttestationResponse::create):
(WebCore::AuthenticatorAttestationResponse::AuthenticatorAttestationResponse):

  • Modules/webauthn/AuthenticatorAttestationResponse.h:
  • Modules/webauthn/AuthenticatorCoordinator.cpp:

(WebCore::AuthenticatorCoordinator::create const):
(WebCore::AuthenticatorCoordinator::discoverFromExternalSource const):

  • Modules/webauthn/AuthenticatorCoordinatorClient.h:
  • Modules/webauthn/AuthenticatorResponse.cpp:

(WebCore::AuthenticatorResponse::tryCreate):
(WebCore::AuthenticatorResponse::attachment const):
(WebCore::AuthenticatorResponse::AuthenticatorResponse):

  • Modules/webauthn/AuthenticatorResponse.h:
  • Modules/webauthn/fido/DeviceResponseConverter.cpp:

(fido::readCTAPMakeCredentialResponse):
(fido::readCTAPGetAssertionResponse):

  • Modules/webauthn/fido/DeviceResponseConverter.h:
  • Modules/webauthn/fido/U2fResponseConverter.cpp:

(fido::readU2fRegisterResponse):
(fido::readU2fSignResponse):

  • Modules/webauthn/fido/U2fResponseConverter.h:

Source/WebKit:

Patch by Garrett Davidson <garrett_davidson@apple.com> on 2021-06-02
Reviewed by Brent Fulgham.

Have WebAuthn authenticators start passing back their attachment type, and plumb
it up through to the calling process.

  • UIProcess/API/Cocoa/_WKAuthenticatorAssertionResponse.mm:

(-[_WKAuthenticatorAssertionResponse initWithClientDataJSON:rawId:extensions:authenticatorData:signature:userHandle:attachment:]):
(-[_WKAuthenticatorAssertionResponse initWithClientDataJSON:rawId:extensions:authenticatorData:signature:userHandle:]): Deleted.

  • UIProcess/API/Cocoa/_WKAuthenticatorAssertionResponseInternal.h:
  • UIProcess/API/Cocoa/_WKAuthenticatorAttestationResponse.mm:

(-[_WKAuthenticatorAttestationResponse initWithClientDataJSON:rawId:extensions:attestationObject:attachment:]):
(-[_WKAuthenticatorAttestationResponse initWithClientDataJSON:rawId:extensions:attestationObject:]): Deleted.

  • UIProcess/API/Cocoa/_WKAuthenticatorAttestationResponseInternal.h:
  • UIProcess/API/Cocoa/_WKAuthenticatorResponse.h:
  • UIProcess/API/Cocoa/_WKAuthenticatorResponse.mm:

(-[_WKAuthenticatorResponse initWithClientDataJSON:rawId:extensions:attachment:]):
(-[_WKAuthenticatorResponse initWithClientDataJSON:rawId:extensions:]): Deleted.

  • UIProcess/API/Cocoa/_WKAuthenticatorResponseInternal.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:

(authenticatorAttachmentToWKAuthenticatorAttachment):
(wkAuthenticatorAttestationResponse):
(-[_WKWebAuthenticationPanel makeCredentialWithChallenge:origin:options:completionHandler:]):
(wkAuthenticatorAssertionResponse):
(-[_WKWebAuthenticationPanel getAssertionWithChallenge:origin:options:completionHandler:]):

  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:

(WebKit::LocalAuthenticatorInternal::getExistingCredentials):
(WebKit::LocalAuthenticator::continueMakeCredentialAfterUserVerification):
(WebKit::LocalAuthenticator::continueMakeCredentialAfterAttested):

  • UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp:

(WebKit::WebAuthenticatorCoordinatorProxy::handleRequest):

  • UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h:
  • UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.messages.in:
  • UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:

(WebKit::CtapAuthenticator::continueMakeCredentialAfterResponseReceived):
(WebKit::CtapAuthenticator::continueGetAssertionAfterResponseReceived):
(WebKit::CtapAuthenticator::continueGetNextAssertionAfterResponseReceived):

  • UIProcess/WebAuthentication/fido/U2fAuthenticator.cpp:

(WebKit::U2fAuthenticator::continueRegisterCommandAfterResponseReceived):
(WebKit::U2fAuthenticator::continueSignCommandAfterResponseReceived):

  • WebAuthnProcess/WebAuthnConnectionToWebProcess.cpp:

(WebKit::WebAuthnConnectionToWebProcess::handleRequest):

  • WebAuthnProcess/WebAuthnConnectionToWebProcess.h:
  • WebAuthnProcess/WebAuthnConnectionToWebProcess.messages.in:

Tools:

Patch by Garrett Davidson <davidson.garrettm@gmail.com> on 2021-06-02
Reviewed by Brent Fulgham.

Update the CTAP tests to specify the new attachment parameter. All of these tests
assume a cross platform authenticator.

  • TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp:

(TestWebKitAPI::TEST):

9:34 AM WebKitFlatpakSDK/DebugWithRR edited by eocanha@igalia.com
(diff)
9:29 AM Changeset in webkit [278357] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Reduce logging in MediaElementSession::playbackStateChangePermitted
https://bugs.webkit.org/show_bug.cgi?id=226531

Reviewed by Eric Carlson.

Downgrade logging to INFO level for the regular code path.
Keep logging more rare case as before.

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::playbackStateChangePermitted const):

9:26 AM Changeset in webkit [278356] by keith_miller@apple.com
  • 7 edits in trunk

Convert small JIT pool tests into executable fuzzing
https://bugs.webkit.org/show_bug.cgi?id=226279

Source/JavaScriptCore:

Right now, we try to test our engine on a small JIT pool. This isn't a known configuration for any
actual ports and causes issues if we run out of JIT memory when we need to compile an OSR exit.
Instead of testing such a small pool we should just fuzz each executable allocation that says it
can fail.

The current fuzzing doesn't do a good job tracking the number of DFG/FTL compiles when allocations
fail, so when enabled those tests will just exit early. Also, right now we use a random seed picked
by the engine for these tests, which makes it hard to reproduce crashes on the bots. If we see
flakiness on the bots we can have the harness pass in a number so it gets logged in the repro command.

Reviewed by Michael Saboff.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::numberOfDFGCompiles):

  • jit/ExecutableAllocationFuzz.cpp:

(JSC::doExecutableAllocationFuzzing):

  • jsc.cpp:

(runJSC):

Tools:

Reviewed by Michael Saboff.

Right now, we try to test our engine on a small JIT pool. This isn't a known configuration for any
actual ports and causes issues if we run out of JIT memory when we need to compile an OSR exit.
Instead of testing such a small pool we should just fuzz each executable allocation that says it
can fail.

The current fuzzing doesn't do a good job tracking the number of DFG/FTL compiles when allocations
fail, so when enabled those tests will just exit early. Also, right now we use a random seed picked
by the engine for these tests, which makes it hard to reproduce crashes on the bots. If we see
flakiness on the bots we can have the harness pass in a number so it gets logged in the repro command.

  • Scripts/jsc-stress-test-helpers/js-executable-allocation-fuzz:
  • Scripts/run-jsc-stress-tests:
9:21 AM Changeset in webkit [278355] by Antti Koivisto
  • 5 edits in trunk/Source

Style::Scope should use CheckedPtr
https://bugs.webkit.org/show_bug.cgi?id=226530

Reviewed by Sam Weinig.

Source/WebCore:

Instead of WeakPtr.

  • style/StyleScope.cpp:

(WebCore::Style::Scope::collectResolverScopes):

  • style/StyleScope.h:

Source/WTF:

  • wtf/CMakeLists.txt:
9:20 AM Changeset in webkit [278354] by Antti Koivisto
  • 44 edits
    2 moves in trunk/Source/WebCore

Rename RootInlineBox to LegacyRootInlineBox
https://bugs.webkit.org/show_bug.cgi?id=226533

Reviewed by Sam Weinig.

More legacy line layout path renaming.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/ContainerNode.cpp:
  • html/HTMLTextFormControlElement.cpp:

(WebCore::getNextSoftBreak):
(WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks const):

  • layout/integration/LayoutIntegrationLineIterator.h:

(WebCore::LayoutIntegration::LineIterator::LineIterator):
(WebCore::LayoutIntegration::PathLine::legacyRootInlineBox const):

  • layout/integration/LayoutIntegrationLineIteratorLegacyPath.h:

(WebCore::LayoutIntegration::LineIteratorLegacyPath::LineIteratorLegacyPath):
(WebCore::LayoutIntegration::LineIteratorLegacyPath::selectionTopForHitTesting const):
(WebCore::LayoutIntegration::LineIteratorLegacyPath::legacyRootInlineBox const):

  • layout/integration/LayoutIntegrationLineIteratorModernPath.h:

(WebCore::LayoutIntegration::LineIteratorModernPath::legacyRootInlineBox const):

  • layout/integration/LayoutIntegrationRunIteratorLegacyPath.h:

(WebCore::LayoutIntegration::RunIteratorLegacyPath::RunIteratorLegacyPath):
(WebCore::LayoutIntegration::RunIteratorLegacyPath::rootInlineBox const):

  • rendering/EllipsisBox.cpp:

(WebCore::EllipsisBox::markupBox const):
(WebCore::EllipsisBox::selectionRect):
(WebCore::EllipsisBox::paintSelection):

  • rendering/FloatingObjects.cpp:
  • rendering/FloatingObjects.h:

(WebCore::FloatingObject::originatingLine const):
(WebCore::FloatingObject::setOriginatingLine):

  • rendering/HitTestResult.cpp:

(WebCore::HitTestResult::innerTextIfTruncated const):

  • rendering/InlineFlowBox.cpp:

(WebCore::InlineFlowBox::computeLogicalBoxHeights):
(WebCore::InlineFlowBox::nodeAtPoint):
(WebCore::InlineFlowBox::constrainToLineTopAndBottomIfNeeded const):

  • rendering/InlineFlowBox.h:
  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::paintMarkedTextBackground):

  • rendering/LegacyInlineBox.cpp:

(WebCore::LegacyInlineBox::root const):
(WebCore::LegacyInlineBox::root):

  • rendering/LegacyInlineBox.h:
  • rendering/LegacyLineLayout.cpp:

(WebCore::LegacyLineLayout::createRootInlineBox):
(WebCore::LegacyLineLayout::createAndAppendRootInlineBox):
(WebCore::LegacyLineLayout::constructLine):
(WebCore::setLogicalWidthForTextRun):
(WebCore::LegacyLineLayout::updateRubyForJustifiedText):
(WebCore::LegacyLineLayout::updateLogicalWidthForAlignment):
(WebCore::LegacyLineLayout::computeInlineDirectionPositionsForLine):
(WebCore::LegacyLineLayout::computeInlineDirectionPositionsForSegment):
(WebCore::LegacyLineLayout::removeInlineBox const):
(WebCore::LegacyLineLayout::computeBlockDirectionPositionsForLine):
(WebCore::LegacyLineLayout::createLineBoxesFromBidiRuns):
(WebCore::deleteLineRange):
(WebCore::LegacyLineLayout::layoutRunsAndFloats):
(WebCore::LegacyLineLayout::layoutRunsAndFloatsInRange):
(WebCore::LegacyLineLayout::reattachCleanLineFloats):
(WebCore::LegacyLineLayout::checkFloatInCleanLine):
(WebCore::LegacyLineLayout::determineStartPosition):
(WebCore::LegacyLineLayout::determineEndPosition):
(WebCore::LegacyLineLayout::checkPaginationAndFloatsAtEndLine):
(WebCore::LegacyLineLayout::lineWidthForPaginatedLineChanged const):
(WebCore::LegacyLineLayout::matchedEndLine):
(WebCore::LegacyLineLayout::addOverflowFromInlineChildren):
(WebCore::LegacyLineLayout::lineCountUntil const):
(WebCore::LegacyLineLayout::deleteEllipsisLineBoxes):
(WebCore::LegacyLineLayout::checkLinesForTextOverflow):
(WebCore::LegacyLineLayout::updateFragmentForLine const):

  • rendering/LegacyLineLayout.h:

(WebCore::LegacyLineLayout::firstRootBox const):
(WebCore::LegacyLineLayout::lastRootBox const):

  • rendering/LegacyRootInlineBox.cpp: Renamed from Source/WebCore/rendering/RootInlineBox.cpp.

(WebCore::containingFragmentMap):
(WebCore::LegacyRootInlineBox::LegacyRootInlineBox):
(WebCore::LegacyRootInlineBox::~LegacyRootInlineBox):
(WebCore::LegacyRootInlineBox::detachEllipsisBox):
(WebCore::LegacyRootInlineBox::clearTruncation):
(WebCore::LegacyRootInlineBox::isHyphenated const):
(WebCore::LegacyRootInlineBox::baselinePosition const):
(WebCore::LegacyRootInlineBox::lineHeight const):
(WebCore::LegacyRootInlineBox::lineCanAccommodateEllipsis):
(WebCore::LegacyRootInlineBox::placeEllipsis):
(WebCore::LegacyRootInlineBox::placeEllipsisBox):
(WebCore::LegacyRootInlineBox::paintEllipsisBox const):
(WebCore::LegacyRootInlineBox::paint):
(WebCore::LegacyRootInlineBox::nodeAtPoint):
(WebCore::LegacyRootInlineBox::adjustPosition):
(WebCore::LegacyRootInlineBox::childRemoved):
(WebCore::LegacyRootInlineBox::containingFragment const):
(WebCore::LegacyRootInlineBox::clearContainingFragment):
(WebCore::LegacyRootInlineBox::setContainingFragment):
(WebCore::LegacyRootInlineBox::alignBoxesInBlockDirection):
(WebCore::LegacyRootInlineBox::beforeAnnotationsAdjustment const):
(WebCore::LegacyRootInlineBox::lineSnapAdjustment const):
(WebCore::LegacyRootInlineBox::lineSelectionGap):
(WebCore::LegacyRootInlineBox::selectionState):
(WebCore::LegacyRootInlineBox::firstSelectedBox):
(WebCore::LegacyRootInlineBox::lastSelectedBox):
(WebCore::LegacyRootInlineBox::selectionTop const):
(WebCore::blockBeforeWithinSelectionRoot):
(WebCore::LegacyRootInlineBox::selectionTopAdjustedForPrecedingBlock const):
(WebCore::LegacyRootInlineBox::selectionBottom const):
(WebCore::LegacyRootInlineBox::blockFlow const):
(WebCore::LegacyRootInlineBox::lineBreakBidiStatus const):
(WebCore::LegacyRootInlineBox::setLineBreakInfo):
(WebCore::LegacyRootInlineBox::ellipsisBox const):
(WebCore::LegacyRootInlineBox::removeLineBoxFromRenderObject):
(WebCore::LegacyRootInlineBox::extractLineBoxFromRenderObject):
(WebCore::LegacyRootInlineBox::attachLineBoxToRenderObject):
(WebCore::LegacyRootInlineBox::paddedLayoutOverflowRect const):
(WebCore::setAscentAndDescent):
(WebCore::LegacyRootInlineBox::ascentAndDescentForBox const):
(WebCore::LegacyRootInlineBox::verticalPositionForBox):
(WebCore::LegacyRootInlineBox::includeLeadingForBox const):
(WebCore::LegacyRootInlineBox::includeFontForBox const):
(WebCore::LegacyRootInlineBox::includeGlyphsForBox const):
(WebCore::LegacyRootInlineBox::includeInitialLetterForBox const):
(WebCore::LegacyRootInlineBox::includeMarginForBox const):
(WebCore::LegacyRootInlineBox::fitsToGlyphs const):
(WebCore::LegacyRootInlineBox::includesRootLineBoxFontOrLeading const):
(WebCore::LegacyRootInlineBox::outputLineBox const):
(WebCore::LegacyRootInlineBox::boxName const):

  • rendering/LegacyRootInlineBox.h: Renamed from Source/WebCore/rendering/RootInlineBox.h.

(WebCore::LegacyRootInlineBox::lineTop const):
(WebCore::LegacyRootInlineBox::lineBottom const):
(WebCore::LegacyRootInlineBox::lineBoxTop const):
(WebCore::LegacyRootInlineBox::lineBoxBottom const):
(WebCore::LegacyRootInlineBox::lineBoxHeight const):
(WebCore::LegacyRootInlineBox::paginationStrut const):
(WebCore::LegacyRootInlineBox::setPaginationStrut):
(WebCore::LegacyRootInlineBox::isFirstAfterPageBreak const):
(WebCore::LegacyRootInlineBox::setIsFirstAfterPageBreak):
(WebCore::LegacyRootInlineBox::paginatedLineWidth const):
(WebCore::LegacyRootInlineBox::setPaginatedLineWidth):
(WebCore::LegacyRootInlineBox::selectionHeight const):
(WebCore::LegacyRootInlineBox::selectionHeightAdjustedForPrecedingBlock const):
(WebCore::LegacyRootInlineBox::setLineTopBottomPositions):
(WebCore::LegacyRootInlineBox::lineBreakObj const):
(WebCore::LegacyRootInlineBox::lineBreakPos const):
(WebCore::LegacyRootInlineBox::setLineBreakPos):
(WebCore::LegacyRootInlineBox::appendFloat):
(WebCore::LegacyRootInlineBox::removeFloat):
(WebCore::LegacyRootInlineBox::floatsPtr):
(WebCore::LegacyRootInlineBox::baselineType const):
(WebCore::LegacyRootInlineBox::hasAnnotationsBefore const):
(WebCore::LegacyRootInlineBox::hasAnnotationsAfter const):
(WebCore::LegacyRootInlineBox::logicalTopVisualOverflow const):
(WebCore::LegacyRootInlineBox::logicalBottomVisualOverflow const):
(WebCore::LegacyRootInlineBox::logicalTopLayoutOverflow const):
(WebCore::LegacyRootInlineBox::logicalBottomLayoutOverflow const):
(WebCore::LegacyRootInlineBox::isTrailingFloatsRootInlineBox const):
(WebCore::LegacyRootInlineBox::nextRootBox const):
(WebCore::LegacyRootInlineBox::prevRootBox const):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::simplifiedNormalFlowLayout):

  • rendering/RenderBlockFlow.cpp:

(WebCore::calculateMinimumPageHeight):
(WebCore::needsAppleMailPaginationQuirk):
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
(WebCore::RenderBlockFlow::layoutLineGridBox):
(WebCore::RenderBlockFlow::markLinesDirtyInBlockRange):
(WebCore::RenderBlockFlow::inlineSelectionGaps):
(WebCore::shouldIncludeLinesForParentLineCount):
(WebCore::RenderBlockFlow::lineCount const):
(WebCore::RenderBlockFlow::clearTruncation):
(WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):
(WebCore::RenderBlockFlow::outputLineTreeAndMark const):
(WebCore::shouldCheckLines): Deleted.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::lineGridBox const):
(WebCore::RenderBlockFlow::setLineGridBox):
(WebCore::RenderBlockFlow::firstRootBox const):
(WebCore::RenderBlockFlow::lastRootBox const):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::positionLineBox):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintMaskForTextFillBox):

  • rendering/RenderDeprecatedFlexibleBox.cpp:

(WebCore::lineAtIndex):
(WebCore::getHeightForLineCount):
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
(WebCore::shouldCheckLines): Deleted.

  • rendering/RenderFragmentedFlow.cpp:

(WebCore::RenderFragmentedFlow::checkLinesConsistency const):

  • rendering/RenderFragmentedFlow.h:
  • rendering/RenderInline.cpp:

(WebCore::RenderInline::generateCulledLineBoxRects const):
(WebCore::RenderInline::linesVisualOverflowBoundingBox const):
(WebCore::RenderInline::linesVisualOverflowBoundingBoxInFragment const):
(WebCore::RenderInline::paintOutline):

  • rendering/RenderLineBoxList.cpp:

(WebCore::RenderLineBoxList::anyLineIntersectsRect const):
(WebCore::RenderLineBoxList::lineIntersectsDirtyRect const):
(WebCore::RenderLineBoxList::paint const):
(WebCore::RenderLineBoxList::hitTest const):
(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):

  • rendering/RenderLineBreak.cpp:
  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::localSelectionRect):
(WebCore::RenderListMarker::addOverflowFromListMarker):
(WebCore::RenderListMarker::selectionRectForRepaint):

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::shouldPaint):
(WebCore::RenderReplaced::localSelectionRect const):

  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::layoutBlock):
(WebCore::RenderRubyRun::getOverhang const):

  • rendering/RenderTextLineBoxes.cpp:

(WebCore::RenderTextLineBoxes::dirtyRange):

  • rendering/TrailingFloatsRootInlineBox.h:
  • rendering/line/LineLayoutState.h:

(WebCore::LineLayoutState::endLine const):
(WebCore::LineLayoutState::setEndLine):
(WebCore::LineLayoutState::updateRepaintRangeFromBox):

  • rendering/mathml/RenderMathMLBlock.cpp:

(WebCore::RenderMathMLBlock::baselinePosition const):

  • rendering/svg/RenderSVGText.cpp:

(WebCore::RenderSVGText::positionForPoint):

  • rendering/svg/SVGRootInlineBox.cpp:

(WebCore::SVGRootInlineBox::SVGRootInlineBox):

  • rendering/svg/SVGRootInlineBox.h:
  • style/InlineTextBoxStyle.cpp:

(WebCore::computeUnderlineOffset):

9:10 AM Changeset in webkit [278353] by Jonathan Bedard
  • 1 edit
    2 deletes in trunk/Tools

[GitHub] Delete unused scripts
https://bugs.webkit.org/show_bug.cgi?id=226519

Reviewed by Aakash Jain.

  • Scripts/configure-github-as-upstream: Removed.
  • Scripts/sync-master-with-upstream: Removed.
8:56 AM Changeset in webkit [278352] by youenn@apple.com
  • 334 edits
    7 copies
    2 moves
    32 adds
    11 deletes in trunk/Source/ThirdParty/libwebrtc

Update boringssl to M92
https://bugs.webkit.org/show_bug.cgi?id=226486

Reviewed by Alex Christensen.

  • CMakeLists.txt:
  • Source/third_party/boringssl/BUILD.generated.gni: Resynced.
  • libwebrtc.xcodeproj/project.pbxproj:
8:42 AM Changeset in webkit [278351] by Chris Dumez
  • 38 edits in trunk/Source

Use Checked aliases instead of Checked<T, RecordOverflow>
https://bugs.webkit.org/show_bug.cgi?id=226535

Reviewed by Keith Miller.

Source/JavaScriptCore:

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • ftl/FTLOperations.cpp:

(JSC::FTL::JSC_DEFINE_JIT_OPERATION):

  • runtime/JSArray.cpp:

(JSC::JSArray::appendMemcpy):
(JSC::JSArray::unshiftCountWithAnyIndexingType):

  • runtime/JSStringJoiner.cpp:

(JSC::JSStringJoiner::joinedLength const):

  • runtime/JSStringJoiner.h:
  • runtime/StringPrototype.cpp:

(JSC::jsSpliceSubstringsWithSeparators):

  • wasm/WasmFormat.cpp:

(JSC::Wasm::Segment::create):

  • wasm/WasmOperations.cpp:

(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):

  • wasm/WasmTable.cpp:

(JSC::Wasm::Table::grow):

  • yarr/YarrInterpreter.cpp:

(JSC::Yarr::ByteCompiler::emitDisjunction):

  • yarr/YarrParser.h:

(JSC::Yarr::Parser::consumeNumber):

  • yarr/YarrPattern.cpp:

Source/WebCore:

  • html/ImageData.cpp:

(WebCore::computeDataSize):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::validateTexFuncData):
(WebCore::WebGLRenderingContextBase::validateCompressedTexFuncData):

  • platform/graphics/GraphicsContextGL.cpp:

(WebCore::GraphicsContextGL::computeImageSizeInBytes):

  • platform/graphics/IntRect.cpp:

(WebCore::IntRect::isValid const):

  • platform/graphics/PixelBuffer.cpp:

(WebCore::PixelBuffer::computeBufferSize):

  • platform/graphics/PixelBuffer.h:
  • platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.cpp:

(WebCore::ISOFairPlayStreamingKeyRequestInfoBox::parse):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::updateBackdropFilters):

  • platform/graphics/cg/ImageBufferCGBitmapBackend.cpp:

(WebCore::ImageBufferCGBitmapBackend::calculateSafeBackendSize):

  • platform/graphics/win/Direct2DUtilities.cpp:

(WebCore::Direct2D::createDirect2DImageSurfaceWithData):

  • platform/graphics/win/ImageBufferDirect2DBackend.cpp:

(WebCore::ImageBufferDirect2DBackend::copyNativeImage const):
(WebCore::ImageBufferDirect2DBackend::compatibleBitmap):

Source/WebKit:

  • Shared/ShareableBitmap.cpp:

(WebKit::ShareableBitmap::numBytesForSize):

  • Shared/ShareableBitmap.h:
  • Shared/cairo/ShareableBitmapCairo.cpp:

(WebKit::ShareableBitmap::calculateBytesPerRow):
(WebKit::ShareableBitmap::calculateBytesPerPixel):

  • Shared/cg/ShareableBitmapCG.cpp:

(WebKit::ShareableBitmap::calculateBytesPerRow):
(WebKit::ShareableBitmap::calculateBytesPerPixel):

  • Shared/win/ShareableBitmapDirect2D.cpp:

(WebKit::ShareableBitmap::calculateBytesPerRow):
(WebKit::ShareableBitmap::calculateBytesPerPixel):

  • UIProcess/mac/TextCheckerMac.mm:

(WebKit::TextChecker::updateSpellingUIWithGrammarString):

  • WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp:

(WebKit::ImageBufferShareableBitmapBackend::calculateSafeBackendSize):

Source/WTF:

  • wtf/URLHelpers.cpp:

(WTF::URLHelpers::userVisibleURL):

  • wtf/URLParser.cpp:

(WTF::URLParser::parseIPv4Piece):

  • wtf/cocoa/NSURLExtras.mm:

(WTF::dataWithUserTypedString):

  • wtf/glib/SocketConnection.cpp:

(WTF::SocketConnection::sendMessage):

5:37 AM Changeset in webkit [278350] by commit-queue@webkit.org
  • 15 edits
    1 delete in trunk

[css-scroll-snap] Scroll snap is broken with non-horizontal writing modes
https://bugs.webkit.org/show_bug.cgi?id=226010

Patch by Martin Robinson <mrobinson@igalia.com> on 2021-06-02
Reviewed by Frédéric Wang.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-scroll-snap/scroll-snap-type-on-root-element-expected.txt: Update expectations to mark tests as passing.
  • web-platform-tests/css/css-scroll-snap/snap-inline-block-expected.txt: Ditto.

Source/WebCore:

Fix issues related to vertical writing modes and scroll snap.

This change fixes three existing WPT tests.

imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-snap-type-on-root-element.html
imported/w3c/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode-vertical-lr.html
imported/w3c/web-platform-tests/css/css-scroll-snap/snap-inline-block.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::valueForScrollSnapAlignment): Update to reflect new member names of ScrollSnapAlign.

  • page/FrameView.cpp:

(WebCore::FrameView::updateSnapOffsets): Pass in the text direction and writing mode of the
container, allowing the values specified on the body to override those specified on the root
element.

  • page/scrolling/ScrollSnapOffsetsInfo.cpp:

(WebCore::updateSnapOffsetsForScrollableArea): Properly handle the writing mode and the
text direction of the container.

  • page/scrolling/ScrollSnapOffsetsInfo.h: Update function signature.
  • rendering/RenderLayerModelObject.cpp:

(WebCore::scrollSnapContainerRequiresUpdateForStyleUpdate): Pass in the writing mode and
text direction of the scrolling container.

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::updateSnapOffsets): Update to reflect new member names
of ScrollSnapAlign.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::hasSnapPosition const): Ditto.

  • rendering/style/StyleScrollSnapPoints.h: Change the name of the members of ScrollSnapAlign

to match what is described in the specification. The values provided are for block and
inline directions, but depending on the scroll container.
(WebCore::operator==): Ditto.

  • style/StyleBuilderConverter.h:

(WebCore::Style::BuilderConverter::convertScrollSnapAlign): Ditto.

LayoutTests:

  • TestExpectations: Mark one test as passing.
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-snap-type-on-root-element-expected.txt: Removed.
  • platform/ios/imported/w3c/web-platform-tests/css/css-scroll-snap/snap-inline-block-expected.txt:
5:17 AM Changeset in webkit [278349] by youenn@apple.com
  • 2 edits
    1 add in trunk/Source/ThirdParty/libwebrtc

Update pffft to M92
https://bugs.webkit.org/show_bug.cgi?id=226491

Reviewed by Alex Christensen.

  • Source/third_party/pffft/BUILD.gn:
  • Source/third_party/pffft/DIR_METADATA: Added.
5:17 AM Changeset in webkit [278348] by youenn@apple.com
  • 48 edits
    5 moves
    19 adds
    1 delete in trunk/Source/ThirdParty/libwebrtc

Update opus to M92
https://bugs.webkit.org/show_bug.cgi?id=226490

Reviewed by Alex Christensen.

  • Source/third_party: Resynced.
5:08 AM Changeset in webkit [278347] by youenn@apple.com
  • 2 edits
    1 add in trunk/Source/ThirdParty/libwebrtc

Update to rnnoise to M92
https://bugs.webkit.org/show_bug.cgi?id=226492

Reviewed by Alex Christensen.

  • Source/third_party/rnnoise/DIR_METADATA: Added.
  • Source/third_party/rnnoise/OWNERS:
2:41 AM Changeset in webkit [278346] by Antti Koivisto
  • 7 edits in trunk

REGRESSION(r276882): Style not invalidated correctly for media queries in shadow trees that share style
https://bugs.webkit.org/show_bug.cgi?id=226369
<rdar://problem/78684562>

Reviewed by Sam Weinig.

Source/WebCore:

Style resolvers are stateful in respect to media queries. We would only invalidate in the first shadow tree
because that evaluation flipped the state and the second evaluation would see nothing changing in media query
state.

  • style/StyleScope.cpp:

(WebCore::Style::Scope::collectResolverScopes):

Add a helper to collect all scopes associated with a resolver.

(WebCore::Style::Scope::evaluateMediaQueries):

Only evaluate each resolver once, then invalidate all associated scopes if needed.

  • style/StyleScope.h:

LayoutTests:

Expand the existing test to have multiple shadow trees sharing style.

  • fast/shadow-dom/media-query-in-shadow-style-expected.html:
  • fast/shadow-dom/media-query-in-shadow-style.html:
  • fast/shadow-dom/resources/media-query-in-shadow-style-frame.html:
2:07 AM Changeset in webkit [278345] by youenn@apple.com
  • 2 edits in trunk/LayoutTests

Fix race condition in binary_wsh.py
https://bugs.webkit.org/show_bug.cgi?id=226464
<rdar://77356905>

Reviewed by Alex Christensen.

The web socket server was implemented to send 4 messages as soon as connection is opened and close the connection.
The client expects to correctly send a message before the connection is closed.
This is not guaranteed by the web socket server, in case the server is very fast closing the connection and the client very slow at sending its message.
Given the focus of the test is to validate binary data, change the web socket server to remove the potential race.

  • http/tests/websocket/tests/hybi/inspector/binary_wsh.py:

(web_socket_transfer_data):

1:43 AM Changeset in webkit [278344] by rniwa@webkit.org
  • 4 edits
    2 adds in trunk

Add CheckedPtr
https://bugs.webkit.org/show_bug.cgi?id=226158

Reviewed by Antti Koivisto.

Source/WTF:

This patch introduces a new type of smart pointer, CheckedPtr, which behaves like RefPtr and
let each object keep track of pointers pointing to the object. Unlike CheckedPtr, the purpose of
this internal counter is to release assert that there is no outstanding pointer at the time
of destruction instead of keeping the object alive when there is one.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CheckedPtr.h: Added.

(WTF::CheckedPtr): Added.
(WTF::CheckedPtr::CheckedPtr): Added.
(WTF::CheckedPtr::~CheckedPtr): Added.
(WTF::CheckedPtr::isHashTableDeletedValue const): Added.
(WTF::CheckedPtr::operator UnspecifiedBoolType const): Added.
(WTF::CheckedPtr::operator! const): Added.
(WTF::CheckedPtr::get const): Added.
(WTF::CheckedPtr::get): Added.
(WTF::CheckedPtr::operator* const): Added.
(WTF::CheckedPtr::operator*): Added.
(WTF::CheckedPtr::operator-> const): Added.
(WTF::CheckedPtr::operator->): Added.
(WTF::CheckedPtr::operator== const): Added.
(WTF::CheckedPtr::operator=): Added.
(WTF::CheckedPtr::unspecifiedBoolTypeInstance const): Added.
(WTF::CheckedPtr::refIfNotNull): Added.
(WTF::CheckedPtr::derefIfNotNull): Added.
(WTF::makeCheckedPtr): Added.
(WTF::is): Added.
(WTF::CanMakeCheckedPtr): Added.
(WTF::CanMakeCheckedPtr::~CanMakeCheckedPtr): Added. Release assert that m_ptrCount is 0.
(WTF::CanMakeCheckedPtr::ptrCount const): Added.
(WTF::CanMakeCheckedPtr::incrementPtrCount): Added.
(WTF::CanMakeCheckedPtr::decrementPtrCount): Added. Note that we don't do anything when m_ptrCount
becomes 0 unlike RefPtr.
(WTF::HashTraits<CheckedPtr<P>>): Added.
(WTF::HashTraits<CheckedPtr<P>>::emptyValue): Added.
(WTF::HashTraits<CheckedPtr<P>>::peek): Added.
(WTF::HashTraits<CheckedPtr<P>>::customDeleteBucket): Added.

Tools:

Added basic tests.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/CheckedPtr.cpp: Added.

(TestWebKitAPI::CheckedObject): Added.
(TestWebKitAPI::DerivedCheckedObject): Added.
(WTF_CheckedPtr.Basic):
(WTF_CheckedPtr.DerivedClass):
(WTF_CheckedPtr.HashSet):

1:28 AM Changeset in webkit [278343] by graouts@webkit.org
  • 5 edits
    4 adds in trunk

Hit-testing does not account for clip-path on <iframe>
https://bugs.webkit.org/show_bug.cgi?id=226380
<rdar://problem/78621486>

Reviewed by Antti Koivisto.

Source/WebCore:

The logic to account for the clip-path property during hit-testing was only found in RenderBlock::nodeAtPoint()
although other types of RenderBox objects may need this, such as RenderIFrame. So we move some of the logic
from RenderBlock::nodeAtPoint() to dedicated methods on RenderBox such that RenderBox::nodeAtPoint() may call them
but also allow for RenderBlock::nodeAtPoint() to call them.

Test: css3/masking/clip-path-hit-test-iframe.html

css3/masking/clip-path-hit-test-img.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::nodeAtPoint):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::hitTestVisualOverflow const):
(WebCore::RenderBox::hitTestClipPath const):
(WebCore::RenderBox::hitTestBorderRadius const):
(WebCore::RenderBox::nodeAtPoint):

  • rendering/RenderBox.h:

LayoutTests:

Add a new test which checks that we hit-test correctly in part of an
<iframe> or <img> clipped by the clip-path property.

  • css3/masking/clip-path-hit-test-iframe-expected.txt: Added.
  • css3/masking/clip-path-hit-test-iframe.html: Added.
  • css3/masking/clip-path-hit-test-img-expected.txt: Added.
  • css3/masking/clip-path-hit-test-img.html: Added.
1:11 AM Changeset in webkit [278342] by youenn@apple.com
  • 890 edits
    2 copies
    1 move
    55 adds
    7 deletes in trunk/Source/ThirdParty/libwebrtc

Update abseil-cpp to M92
https://bugs.webkit.org/show_bug.cgi?id=226485

Reviewed by Alex Christensen.

  • Source/third_party/abseil-cpp: Resynced.
1:01 AM Changeset in webkit [278341] by youenn@apple.com
  • 5 edits in trunk/Source/WebCore

Improve AudioMediaStreamTrackRendererUnit logging to know which source is being played
https://bugs.webkit.org/show_bug.cgi?id=226466

Reviewed by Eric Carlson.

Log AudioSampleDataSource identifier when using it with the render unit.
Set AudioSampleDataSource identifier to its MediaStreamTrack/RealtimeMediaSource identifier.
This allows identifying which tracks are being played.

No change of behavior.

  • platform/mediastream/AudioTrackPrivateMediaStream.cpp:

(WebCore::AudioTrackPrivateMediaStream::createRenderer):
(WebCore::AudioTrackPrivateMediaStream::setLogger): Deleted.

  • platform/mediastream/AudioTrackPrivateMediaStream.h:
  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererCocoa.cpp:

(WebCore::AudioMediaStreamTrackRendererCocoa::pushSamples):

  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.cpp:

(WebCore::AudioMediaStreamTrackRendererUnit::addSource):
(WebCore::AudioMediaStreamTrackRendererUnit::removeSource):

Jun 1, 2021:

11:45 PM Changeset in webkit [278340] by Darin Adler
  • 489 edits in trunk

Remove <wtf/Optional.h>
https://bugs.webkit.org/show_bug.cgi?id=226437

Reviewed by Chris Dumez.

Source/JavaScriptCore:

  • <many files>: Remove include of <wtf/Optional.h>.
  • inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py:

(CppBackendDispatcherHeaderGenerator._generate_secondary_header_includes): Don't generate
an include of wtf/Optional.h; including WTFString.h takes care of this anyway.

  • inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py:

(CppFrontendDispatcherHeaderGenerator._generate_secondary_header_includes): Ditto.

  • inspector/scripts/codegen/generate_cpp_protocol_types_header.py:

(CppProtocolTypesHeaderGenerator._generate_secondary_header_includes): Ditto.

  • inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py:

(CppProtocolTypesImplementationGenerator.generate_output): Generate an include of <optional>
instead of <wtf/Optional.h>.

  • inspector/scripts/tests/expected/*: Regenerate.

Source/WebCore:

  • <many files>: Removed include of <wtf/Optional.h>.
  • platform/graphics/Font.h: Tweaked style a bit.
  • Modules/geolocation/GeolocationClient.h: Added include of <optional>.
  • Modules/mediastream/DoubleRange.h: Ditto.
  • Modules/mediastream/LongRange.h: Ditto.
  • Modules/webauthn/AuthenticationExtensionsClientOutputs.h: Ditto.
  • css/CSSToLengthConversionData.h: Ditto.
  • css/DOMMatrix2DInit.h: Ditto.
  • dom/AddEventListenerOptions.h: Ditto.
  • dom/DeviceMotionData.h: Ditto.
  • dom/DeviceOrientationData.h: Ditto.
  • dom/SuccessOr.h: Ditto.
  • html/DateTimeFieldsState.h: Ditto.
  • html/ImageBitmapOptions.h: Ditto.
  • html/canvas/PredefinedColorSpace.h: Ditto.
  • layout/LayoutPhase.h: Ditto.
  • layout/MarginTypes.h: Ditto.
  • loader/ResourceLoadNotifier.h: Ditto.
  • page/RuntimeEnabledFeatures.h: Ditto.
  • page/ScrollOptions.h: Ditto.
  • platform/MediaCapabilitiesInfo.h: Ditto.
  • platform/cocoa/SystemBattery.h: Ditto.
  • platform/graphics/DecodingOptions.h: Ditto.
  • platform/graphics/DestinationColorSpace.h: Ditto.
  • platform/graphics/DisplayRefreshMonitorClient.h: Ditto.
  • platform/graphics/FloatLine.h: Ditto.
  • platform/graphics/gpu/GPURequestAdapterOptions.h: Ditto.
  • platform/graphics/x11/PlatformDisplayX11.h: Ditto.
  • platform/ios/SelectionGeometry.h: Ditto.
  • platform/mac/NSScrollerImpDetails.h: Ditto.
  • platform/network/DNS.h: Ditto.
  • platform/text/EncodingTables.h: Ditto.
  • platform/text/TextCodecCJK.h: Ditto.
  • platform/text/TextCodecUTF16.h: Ditto.
  • platform/text/TextFlags.h: Ditto.

Source/WebCore/PAL:

  • pal/SessionID.h: Include <optional>.
  • pal/crypto/gcrypt/Utilities.h: Ditto.
  • pal/crypto/tasn1/Utilities.cpp: Removed include of <wtf/Optional.h>.

Source/WebDriver:

  • SessionHost.h: Removed include of <wtf/Optional.h>.

Source/WebKit:

  • <many files>: Removed include of <wtf/Optional.h>.

Source/WebKitLegacy/mac:

  • DOM/DOMRangeInternal.h: Added import of <optional>.
  • WebView/WebGeolocationPosition.mm: Removed import of <wtf/Optional.h>.
  • WebView/WebGeolocationPositionInternal.h: Added import of <optional>.

Source/WTF:

  • <many files>: Removed include of <wtf/Optional.h>.
  • WTF.xcodeproj/project.pbxproj: Removed Optional.h.
  • wtf/Markable.h: Added include of <optional>.
  • wtf/OptionSet.h: Ditto.
  • wtf/Optional.h: Emptied this file. On the Windows build system, we can't

seem to build successfully without an empty file here. The copied forwarding
header seems to linger even if we remove the original. Until we fix the
Windows build system, if we want to support incremental builds, we need
to keep this empty file around.

  • wtf/PrintStream.h: Added include of <optional>.
  • wtf/Seconds.h: Ditto.
  • wtf/StackTrace.h: Ditto.
  • wtf/StdLibExtras.h: Moved the valueOrCompute function here from Optional.h.

Re-sorted the "using" at the bottom of the file.

  • wtf/URLHelpers.h: Added include of <optional>.
  • wtf/Vector.h: Ditto.

Tools:

  • <many files>: Removed include of <wtf/Optional.h>.
11:45 PM Changeset in webkit [278339] by Ryan Haddad
  • 2 edits in branches/safari-611-branch/Source/WebCore

Cherry-pick r273486. rdar://problem/75902605

Unreviewed. GLib debug buildfix after r273477

  • dom/EventContext.cpp: (WebCore::EventContext::handleLocalEvents const):

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

10:21 PM Changeset in webkit [278338] by Chris Dumez
  • 134 edits in trunk

Rename Checked::unsafeGet() to Checked::value()
https://bugs.webkit.org/show_bug.cgi?id=226514

Reviewed by Darin Adler.

Rename Checked::unsafeGet() to Checked::value(). The "unsafeGet" naming is confusing as this
function isn't really unsafe since it will crash if the value has overflowed. Also add an
operator T() to implicitly convert a Checked to its underlying type without needing to
call value().

Source/JavaScriptCore:

  • b3/B3Const32Value.cpp:

(JSC::B3::Const32Value::checkAddConstant const):
(JSC::B3::Const32Value::checkSubConstant const):
(JSC::B3::Const32Value::checkMulConstant const):

  • b3/B3Const64Value.cpp:

(JSC::B3::Const64Value::checkAddConstant const):
(JSC::B3::Const64Value::checkSubConstant const):
(JSC::B3::Const64Value::checkMulConstant const):

  • bytecompiler/BytecodeGenerator.h:

(JSC::FinallyContext::numberOfBreaksOrContinues const):

  • dfg/DFGConstantFoldingPhase.cpp:

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

  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileForwardVarargsWithSpread):

  • ftl/FTLOperations.cpp:

(JSC::FTL::JSC_DEFINE_JIT_OPERATION):

  • heap/Heap.cpp:

(JSC::Heap::deprecatedReportExtraMemorySlowCase):
(JSC::Heap::extraMemorySize):
(JSC::Heap::updateAllocationLimits):
(JSC::Heap::reportExtraMemoryVisited):

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::propagateExternalMemoryVisitedIfNecessary):

  • runtime/ArgList.cpp:

(JSC::MarkedArgumentBuffer::slowEnsureCapacity):
(JSC::MarkedArgumentBuffer::expandCapacity):

  • runtime/ArrayPrototype.cpp:

(JSC::concatAppendOne):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/CommonSlowPaths.cpp:

(JSC::JSC_DEFINE_COMMON_SLOW_PATH):

  • runtime/DirectArguments.h:
  • runtime/HashMapImpl.h:

(JSC::HashMapBuffer::allocationSize):
(JSC::HashMapImpl::HashMapImpl):

  • runtime/HashMapImplInlines.h:

(JSC::nextCapacity):
(JSC::HashMapImpl<HashMapBucketType>::finishCreation):

  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::parseInt):

  • runtime/JSImmutableButterfly.h:

(JSC::JSImmutableButterfly::tryCreate):

  • runtime/JSLexicalEnvironment.h:

(JSC::JSLexicalEnvironment::offsetOfVariable):
(JSC::JSLexicalEnvironment::allocationSizeForScopeSize):

  • runtime/JSObject.h:
  • runtime/JSPropertyNameEnumerator.cpp:

(JSC::JSPropertyNameEnumerator::create):

  • runtime/JSString.h:
  • runtime/ScopedArguments.cpp:

(JSC::ScopedArguments::createUninitialized):

  • runtime/StringPrototype.cpp:

(JSC::jsSpliceSubstrings):
(JSC::jsSpliceSubstringsWithSeparators):

  • runtime/StructureChain.cpp:

(JSC::StructureChain::create):

  • runtime/VM.h:

(JSC::ScratchBuffer::allocationSize):

  • runtime/WeakMapImpl.h:

(JSC::WeakMapBuffer::allocationSize):

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::AirIRGenerator):
(JSC::Wasm::AirIRGenerator::emitCallPatchpoint):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):

  • wasm/WasmInstance.cpp:
  • wasm/WasmInstance.h:

(JSC::Wasm::Instance::allocationSize):

  • wasm/WasmLLIntGenerator.cpp:

(JSC::Wasm::LLIntGenerator::push):
(JSC::Wasm::LLIntGenerator::getDropKeepCount):
(JSC::Wasm::LLIntGenerator::walkExpressionStack):
(JSC::Wasm::LLIntGenerator::finalize):
(JSC::Wasm::LLIntGenerator::callInformationForCaller):
(JSC::Wasm::LLIntGenerator::addLoop):
(JSC::Wasm::LLIntGenerator::addTopLevel):
(JSC::Wasm::LLIntGenerator::addBlock):
(JSC::Wasm::LLIntGenerator::addIf):
(JSC::Wasm::LLIntGenerator::addElseToUnreachable):

  • wasm/WasmSignature.h:

(JSC::Wasm::Signature::allocatedSize):

  • wasm/WasmStreamingParser.cpp:

(JSC::Wasm::StreamingParser::addBytes):

  • wasm/WasmTable.cpp:

(JSC::Wasm::Table::Table):
(JSC::Wasm::Table::grow):
(JSC::Wasm::FuncRefTable::FuncRefTable):

  • yarr/YarrInterpreter.cpp:

(JSC::Yarr::Interpreter::DisjunctionContext::allocationSize):
(JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::allocationSize):
(JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
(JSC::Yarr::ByteCompiler::atomCharacterClass):
(JSC::Yarr::ByteCompiler::atomBackReference):
(JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
(JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
(JSC::Yarr::ByteCompiler::emitDisjunction):

  • yarr/YarrInterpreter.h:

(JSC::Yarr::ByteTerm::ByteTerm):
(JSC::Yarr::ByteTerm::CheckInput):
(JSC::Yarr::ByteTerm::UncheckInput):

  • yarr/YarrJIT.cpp:
  • yarr/YarrParser.h:

(JSC::Yarr::Parser::consumeNumber):

  • yarr/YarrPattern.cpp:

(JSC::Yarr::PatternTerm::dumpQuantifier):

Source/WebCore:

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneDeserializer::readTerminal):

  • dom/TextEncoderStreamEncoder.cpp:

(WebCore::TextEncoderStreamEncoder::encode):

  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::takeResults):

  • html/FileInputType.cpp:

(WebCore::FileInputType::saveFormControlState const):

  • html/ImageData.cpp:

(WebCore::ImageData::create):
(WebCore::ImageData::createUninitialized):

  • html/MediaElementSession.cpp:

(WebCore::isElementRectMostlyInMainFrame):

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::sliceArrayBufferView):
(WebCore::WebGL2RenderingContext::copyBufferSubData):
(WebCore::WebGL2RenderingContext::getBufferSubData):
(WebCore::WebGL2RenderingContext::validateClearBuffer):

  • html/canvas/WebGLBuffer.cpp:

(WebCore::WebGLBuffer::associateBufferSubDataImpl):
(WebCore::WebGLBuffer::associateCopyBufferSubData):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::clip2D):
(WebCore::WebGLRenderingContextBase::validateDrawArrays):
(WebCore::WebGLRenderingContextBase::validateDrawElements):
(WebCore::WebGLRenderingContextBase::validateTexFuncData):
(WebCore::WebGLRenderingContextBase::validateCompressedTexFuncData):
(WebCore::WebGLRenderingContextBase::validateSimulatedVertexAttrib0):

  • html/canvas/WebGLRenderingContextBase.h:

(WebCore::WebGLRenderingContextBase::validateTexImageSubRectangle):
(WebCore::WebGLRenderingContextBase::checkedAddAndMultiply):

  • page/FrameView.h:

(WebCore::FrameView::incrementVisuallyNonEmptyPixelCount):

  • page/History.cpp:

(WebCore::History::stateObjectAdded):

  • platform/audio/AudioArray.h:

(WebCore::AudioArray::resize):

  • platform/audio/cocoa/AudioFileReaderCocoa.cpp:

(WebCore::tryCreateAudioBufferList):

  • platform/audio/cocoa/CARingBuffer.cpp:

(WebCore::CARingBuffer::adoptStorage):
(WebCore::CARingBuffer::initializeAfterAllocation):
(WebCore::CARingBuffer::allocate):

  • platform/audio/cocoa/WebAudioBufferList.cpp:

(WebCore::WebAudioBufferList::WebAudioBufferList):

  • platform/graphics/FormatConverter.h:

(WebCore::FormatConverter::FormatConverter):

  • platform/graphics/GraphicsContextGL.cpp:

(WebCore::GraphicsContextGL::computeImageSizeInBytes):

  • platform/graphics/ImageBackingStore.h:

(WebCore::ImageBackingStore::setSize):
(WebCore::ImageBackingStore::clear):

  • platform/graphics/ImageBufferBackend.cpp:

(WebCore::ImageBufferBackend::calculateMemoryCost):

  • platform/graphics/ImageFrame.h:

(WebCore::ImageFrame::frameBytes const):

  • platform/graphics/ImageSource.cpp:

(WebCore::ImageSource::maximumSubsamplingLevel):

  • platform/graphics/PixelBuffer.cpp:

(WebCore::PixelBuffer::tryCreateForDecoding):
(WebCore::PixelBuffer::tryCreate):

  • platform/graphics/PixelBuffer.h:

(WebCore::PixelBuffer::encode const):
(WebCore::PixelBuffer::decode):

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

(WebCore::ImageDecoderAVFObjC::frameBytesAtIndex const):

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

(WebCore::MediaSampleAVFObjC::setByteRangeOffset):
(WebCore::MediaSampleAVFObjC::byteRangeForAttachment const):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::updateBackdropFilters):

  • platform/graphics/ca/LayerPool.cpp:

(WebCore::LayerPool::backingStoreBytesForSize):

  • platform/graphics/cg/GraphicsContextGLCG.cpp:

(WebCore::GraphicsContextGLImageExtractor::extractImage):

  • platform/graphics/cg/ImageBufferCGBackend.cpp:

(WebCore::ImageBufferCGBackend::calculateBytesPerRow):

  • platform/graphics/cg/ImageDecoderCG.cpp:

(WebCore::ImageDecoderCG::frameBytesAtIndex const):

  • platform/graphics/cocoa/SourceBufferParser.cpp:

(WebCore::SourceBufferParser::Segment::read const):

  • platform/graphics/filters/FEColorMatrix.cpp:

(WebCore::effectApplyAccelerated):

  • platform/graphics/filters/FEGaussianBlur.cpp:

(WebCore::FEGaussianBlur::platformApplySoftware):

  • platform/graphics/filters/FETurbulence.cpp:

(WebCore::FETurbulence::platformApplySoftware):

  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::unmultipliedResult):
(WebCore::FilterEffect::premultipliedResult):
(WebCore::copyPremultiplyingAlpha):
(WebCore::copyUnpremultiplyingAlpha):

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

(WebCore::GPUBindGroupAllocator::allocateAndSetEncoders):
(WebCore::GPUBindGroupAllocator::reallocate):

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

(WebCore::GPUCommandBuffer::copyBufferToBuffer):

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

(WebCore::GPURenderPassEncoder::drawIndexed):

  • platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:

(WebCore::ImageDecoderGStreamer::frameBytesAtIndex const):

  • platform/graphics/nicosia/NicosiaBuffer.cpp:

(Nicosia::Buffer::Buffer):

  • platform/graphics/win/Direct2DUtilities.cpp:

(WebCore::Direct2D::createDirect2DImageSurfaceWithData):

  • platform/graphics/win/ImageBufferDirect2DBackend.cpp:

(WebCore::ImageBufferDirect2DBackend::compatibleBitmap):

  • platform/graphics/win/ImageDecoderDirect2D.cpp:

(WebCore::ImageDecoderDirect2D::frameBytesAtIndex const):

  • platform/image-decoders/ScalableImageDecoder.cpp:

(WebCore::ScalableImageDecoder::frameBytesAtIndex const):

  • platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.cpp:

(WebCore::sycc444ToRGB):
(WebCore::sycc422ToRGB):
(WebCore::sycc420ToRGB):

  • platform/ios/LegacyTileLayerPool.mm:

(WebCore::LegacyTileLayerPool::bytesBackingLayerWithPixelSize):

  • platform/text/TextCodecUTF16.cpp:

(WebCore::TextCodecUTF16::encode const):

  • platform/text/TextCodecUTF8.cpp:

(WebCore::TextCodecUTF8::encodeUTF8):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::requiresCompositingForCanvas const):

  • rendering/shapes/Shape.cpp:

(WebCore::Shape::createRasterShape):

  • storage/StorageMap.cpp:

(WebCore::StorageMap::setItem):

  • xml/XSLStyleSheetLibxslt.cpp:

(WebCore::XSLStyleSheet::parseString):

  • xml/XSLTProcessorLibxslt.cpp:

(WebCore::xsltParamArrayFromParameterMap):

  • xml/parser/CharacterReferenceParserInlines.h:

(WebCore::consumeCharacterReference):

Source/WebKit:

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::nextDestinationImageBufferAfterApplyingDisplayLists):

  • NetworkProcess/WebStorage/LocalStorageDatabase.cpp:

(WebKit::LocalStorageDatabase::setItem):

  • NetworkProcess/cache/CacheStorageEngineCache.cpp:

(WebKit::CacheStorage::Cache::put):

  • Platform/IPC/ArgumentCoders.h:
  • Platform/IPC/cocoa/ConnectionCocoa.mm:

(IPC::Connection::sendOutgoingMessage):
(IPC::createMessageDecoder):

  • Platform/IPC/cocoa/MachMessage.cpp:

(IPC::MachMessage::create):

  • Shared/ShareableBitmap.cpp:

(WebKit::ShareableBitmap::Handle::encode const):
(WebKit::ShareableBitmap::create):
(WebKit::ShareableBitmap::createShareable):

  • Shared/ShareableBitmap.h:

(WebKit::ShareableBitmap::bytesPerRow const):
(WebKit::ShareableBitmap::sizeInBytes const):

  • Shared/ShareableResource.cpp:

(WebKit::ShareableResource::create):

  • Shared/cg/ShareableBitmapCG.cpp:

(WebKit::ShareableBitmap::calculateBytesPerRow):
(WebKit::ShareableBitmap::createGraphicsContext):
(WebKit::ShareableBitmap::createCGImage const):

  • Shared/mac/MediaFormatReader/MediaFormatReader.cpp:

(WebKit::MediaFormatReader::copyTrackArray):

  • Shared/mac/MediaFormatReader/MediaSampleCursor.cpp:

(WebKit::MediaSampleCursor::copySampleLocation const):

  • WebProcess/GPU/graphics/DisplayListWriterHandle.cpp:

(WebKit::DisplayListWriterHandle::advance):

  • WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp:

(WebKit::ImageBufferShareableBitmapBackend::calculateBytesPerRow):

  • WebProcess/GPU/media/RemoteImageDecoderAVF.cpp:

(WebKit::RemoteImageDecoderAVF::frameBytesAtIndex const):

  • WebProcess/Network/WebSocketChannel.cpp:

(WebKit::WebSocketChannel::increaseBufferedAmount):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::requestEvasionRectsAboveSelection):
(WebKit::WebPage::updateSelectionWithDelta):

Source/WTF:

  • wtf/CheckedArithmetic.h:

(WTF::Checked::operator! const):
(WTF::Checked::operator bool const):
(WTF::Checked::operator T const):
(WTF::Checked::value const):
(WTF::Checked::operator==):
(WTF::Checked::operator< const):
(WTF::Checked::operator<= const):
(WTF::Checked::operator> const):
(WTF::Checked::operator>= const):

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

(WTF::fastCalloc):
(WTF::tryFastCalloc):

  • wtf/Gigacage.cpp:

(Gigacage::tryMallocArray):

  • wtf/URLHelpers.cpp:

(WTF::URLHelpers::userVisibleURL):

  • wtf/URLParser.cpp:

(WTF::URLParser::parseIPv4Piece):

  • wtf/UniqueArray.h:
  • wtf/cocoa/NSURLExtras.mm:

(WTF::dataWithUserTypedString):

  • wtf/glib/SocketConnection.cpp:

(WTF::SocketConnection::readMessage):
(WTF::SocketConnection::sendMessage):

  • wtf/text/CString.cpp:

(WTF::CStringBuffer::createUninitialized):

  • wtf/text/StringBuffer.h:

(WTF::StringBuffer::StringBuffer):

  • wtf/text/StringBuilderJSON.cpp:

(WTF::StringBuilder::appendQuotedJSONString):

  • wtf/text/StringConcatenate.h:

(WTF::tryMakeStringFromAdapters):

  • wtf/text/StringImpl.h:

(WTF::StringImpl::allocationSize):

  • wtf/text/StringToIntegerConversion.h:

(WTF::parseInteger):

Tools:

  • TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp:

(TestWebKitAPI::CheckedArithmeticTester::run):
(TestWebKitAPI::AllowMixedSignednessTest::run):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/IntRectTests.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/IntSizeTests.cpp:

(TestWebKitAPI::TEST):

10:20 PM Changeset in webkit [278337] by Lauro Moura
  • 2 edits in trunk/LayoutTests

[WPE] Garden imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/source-media-outside-doc.html flakiness

Unreviewed test gardening.

  • platform/wpe/TestExpectations:
6:20 PM Changeset in webkit [278336] by Jean-Yves Avenard
  • 20 edits in trunk

LayoutTests/imported/w3c:
MediaSession.coordinator should not be optional, relying on coordinator state change instead
https://bugs.webkit.org/show_bug.cgi?id=226328
rdar://77461335

Reviewed by Eric Carlson.

  • web-platform-tests/mediasession/idlharness.window-expected.txt:

Source/WebCore:
MediaSession.coordinator should not be optional, relying on coordinator state change instead
https://bugs.webkit.org/show_bug.cgi?id=226328
rdar://77461335

Reviewed by Eric Carlson.

The coordinator was a read-only optional attribute of the MediaSession element.
Testing if the attribute was to be used to determine if a MediaSessionCoordinator
was now available and for the MediaSession to join it. This made the use of an external
polyfill difficult and enforcing the validity of an user created custom
MediaSessionCoordinator due to IDL semantics limitations hard.
We instead always create a MediaSessionCoordinator which in its default state is Closed.
Once this state is changed to Waiting and an event is fire the MediaSession can now
join it.

  • Modules/mediasession/MediaSession.cpp:

(WebCore::MediaSession::MediaSession): MediaSession no longer needs to fire event.
Remove no longer necessary inheritance and async event queue.
(WebCore::MediaSession::create): Drive-by fix, don't call suspendIfNeeded() in the constructor.
(WebCore::MediaSession::createCoordinator): Make method private.

  • Modules/mediasession/MediaSession.h:

(WebCore::MediaSession::coordinator const): MediaSessionCoordinator always exists. Return reference instead.

  • Modules/mediasession/MediaSession.idl: Amend definition, remove EventHandler
  • Modules/mediasession/MediaSessionCoordinator.cpp:

(WebCore::MediaSessionCoordinator::create):
(WebCore::MediaSessionCoordinator::MediaSessionCoordinator):
(WebCore::MediaSessionCoordinator::setMediaSessionCoordinatorPrivate):
(WebCore::MediaSessionCoordinator::virtualHasPendingActivity const):
(WebCore::MediaSessionCoordinator::join):
(WebCore::MediaSessionCoordinator::close):
(WebCore::MediaSessionCoordinator::coordinatorStateChanged):

  • Modules/mediasession/MediaSessionCoordinator.h:
  • Modules/mediasession/MediaSessionCoordinator.idl: Added new EventHandler attribute.
  • Modules/mediasession/MediaSessionCoordinatorMixin.idl: Update for new API definition.
  • dom/EventNames.h:
  • dom/EventTargetFactory.in:
  • page/Page.cpp:

(WebCore::Page::setMediaSessionCoordinator):
(WebCore::Page::invalidateMediaSessionCoordinator):

  • testing/Internals.cpp:

(WebCore::Internals::registerMockMediaSessionCoordinator):

Tools:
MediaSession.coordinator should not be optional, relying on coordinator readyState change instead
https://bugs.webkit.org/show_bug.cgi?id=226328
rdar://77461335

Reviewed by Eric Carlson.

  • TestWebKitAPI/Tests/WebKit/MediaSessionCoordinatorTest.mm:

(TestWebKitAPI::MediaSessionCoordinatorTest::createCoordinator): Change test to match new API,
using coordinatorstatechange event instead.

  • TestWebKitAPI/Tests/WebKitCocoa/media-remote.html:

LayoutTests:
MediaSession.coordinator should not be optional, relying on coordinator readyState change instead
https://bugs.webkit.org/show_bug.cgi?id=226328
rdar://77461335

Reviewed by Eric Carlson.

  • media/media-session/mock-coordinator-expected.txt:
  • media/media-session/mock-coordinator.html: Change test to match new API.
6:01 PM Changeset in webkit [278335] by Kyle Piddington
  • 4 edits in trunk/Source/ThirdParty/ANGLE

[Metal ANGLE] transformFeedback samples on webglsamples.org do not render correctly
https://bugs.webkit.org/show_bug.cgi?id=226285
<rdar://78524773>

Reviewed by Dean Jackson.

Metal ANGLE does not render these samples correctly, for a number of reasons.
For transform_feedback_interleaved and seperated, We need to start a new renderEncoder to get the results from the transform feedback.
for transform_feedback-seperated_2, we need to invalidate the current render pass descriptor in order to switch to the rasterizer-enabled version of the shader.
Testing: Ran all transform feedback tests from deqp suite to ensure no regressions are present.

  • src/libANGLE/renderer/metal/ContextMtl.h:
  • src/libANGLE/renderer/metal/ContextMtl.mm:

(rx::ContextMtl::drawTriFanArraysWithBaseVertex):
(rx::ContextMtl::drawArraysImpl):
(rx::ContextMtl::drawTriFanElements):
(rx::ContextMtl::prepareForTransformFeedbackPassTwo):
(rx::ContextMtl::drawLineLoopElements):
(rx::ContextMtl::drawElementsImpl):
(rx::ContextMtl::onEndTransformFeedback):

  • src/libANGLE/renderer/metal/TransformFeedbackMtl.mm:

(rx::TransformFeedbackMtl::end):

5:27 PM Changeset in webkit [278334] by Chris Fleizach
  • 2 edits in trunk/Tools

REGRESSION: (r277971) TestWebKitAPI.WebKit.AccessibilityReduceMotion is timing out
https://bugs.webkit.org/show_bug.cgi?id=226505
<rdar://problem/78721462>

Reviewed by Darin Adler.

The distributed notification for RM is no longer re-posted within WebKit, so we don't need to listen for it.

  • TestWebKitAPI/Tests/WebKit/AccessibilityReduceMotion.mm:

(TEST):
(notificationCallback): Deleted.

5:14 PM Changeset in webkit [278333] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Drop unused AudioChannel::resizeSmaller()
https://bugs.webkit.org/show_bug.cgi?id=226516

Reviewed by Sam Weinig.

  • platform/audio/AudioBus.cpp:
  • platform/audio/AudioBus.h:
  • platform/audio/AudioChannel.cpp:
  • platform/audio/AudioChannel.h:
4:23 PM Changeset in webkit [278332] by Jonathan Bedard
  • 4 edits in trunk/Tools

[run-webkit-tests] Move helper out of Port instance
https://bugs.webkit.org/show_bug.cgi?id=226344
<rdar://problem/78575542>

Reviewed by Dewei Zhu.

The "helper" is a popen object, which are not pickleable, and cannot
belong to an instantiated port object.

  • Scripts/webkitpy/port/base.py:

(Port): Make helper class variable.
(Port.init):
(Port.stop_helper): All classes should share the same code to stop the helper process.

  • Scripts/webkitpy/port/mac.py:

(MacPort.start_helper): Use class variable.
(MacPort.stop_helper): Moved to base class..

3:36 PM Changeset in webkit [278331] by Wenson Hsieh
  • 8 edits in trunk/Source/WebCore

[macOS] Data detector highlights should appear when hovering inside image overlays
https://bugs.webkit.org/show_bug.cgi?id=226507

Reviewed by Tim Horton.

Refactor some logic in ImageOverlayController, such that the overlay is installed if _either_ selection painting
is required, or data detector highlights for the image overlay host element exist; additionally, add plumbing to
allow the ImageOverlayController to install a page overlay when the element under the mouse is inside an image
overlay.

  • dom/Document.cpp:

(WebCore::Document::willBeRemovedFromFrame):

Drive-by fix: use imageOverlayControllerIfExists instead of imageOverlayController to avoid unnecessarily
creating a new ImageOverlayController when detaching a Document.

  • page/EventHandler.cpp:

(WebCore::EventHandler::clear):

Refactor logic for clearing out m_elementUnderMouse into a separate helper, and call it from these two places.
This new helper clears out m_elementUnderMouse and additionally notifies the page's image overlay controller
(only if it has already been constructed).

(WebCore::EventHandler::updateMouseEventTargetNode):

Call out to the page's image overlay controller when changing m_elementUnderMouse.

(WebCore::EventHandler::clearElementUnderMouse):

  • page/EventHandler.h:
  • page/ImageOverlayController.cpp:

(WebCore::ImageOverlayController::selectionQuadsDidChange):

Refactor ImageOverlayController so that it only installs its page overlay if either:

  1. Selection painting is needed for selected text inside an image overlay, or...
  2. The cursor is over an image overlay host element with data detection results.

To achieve this, we maintain a weak pointer to the image overlay host that contains the selection separately
from the weak pointer to the image overlay host that contains data detectors, and is the element currently under
the mouse cursor.

Drive-by fix: also ignore selection updates due to temporary selections triggered as a result of gathering
dictionary popup info.

(WebCore::ImageOverlayController::documentDetached):
(WebCore::ImageOverlayController::uninstallPageOverlay):
(WebCore::ImageOverlayController::uninstallPageOverlayIfNeeded):

Split this into two functions: uninstallPageOverlayIfNeeded, which removes and destroys the PageOverlay if
it is no longer needed (i.e. the overlay is required for neither selection painting nor data detectors).

(WebCore::ImageOverlayController::willMoveToPage):
(WebCore::ImageOverlayController::drawRect):
(WebCore::ImageOverlayController::elementUnderMouseDidChange):

  • page/ImageOverlayController.h:

Rename m_imageOverlayBounds to m_selectionClipRect to make it clear that this is only used during selection
painting, and rename m_overlaySelectionQuads to just m_selectionQuads for conciseness.

  • page/Page.h:

(WebCore::Page::imageOverlayControllerIfExists):

Add a version of this getter that does not initialize the ImageOverlayController if it didn't already exist. See
call sites in EventHandler and Document.

  • page/mac/ImageOverlayControllerMac.mm:

(WebCore::ImageOverlayController::clearDataDetectorHighlights):

Additionally clear out m_hostElementForDataDetectors.

(WebCore::ImageOverlayController::elementUnderMouseDidChange):

Update data detector highlights whenever the element under the mouse is over content inside an image overlay.
Note that we effectively ignore this method call in the case where we're clearing out m_elementUnderMouse for
a different Document than the one containing m_hostElementForDataDetectors, which prevents us from erroneously
hiding data detectors when m_elementUnderMouse is removed or otherwise cleared out in a different Document.

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

Adopt Reveal for phone numbers
https://bugs.webkit.org/show_bug.cgi?id=226383
rdar://78482517
Source/WebCore/PAL:

Patch by Dana Estra <destra@apple.com> on 2021-06-01
Reviewed by Tim Horton.

Add declaration for RVItem method initWithURL.

  • pal/spi/cocoa/RevealSPI.h:

Source/WebKit:

Patch by Dana Estra <destra@apple.com> on 2021-06-01
Reviewed by Tim Horton.

Manually tested by selecting text containing phone numbers in Safari and viewing dropdown menu.

Switch to Reveal framework to show a dropdown menu for telephone numbers with more options.

  • Platform/mac/MenuUtilities.mm:

(-[WKEmptyPresenterHighlightDelegate revealContext:rectsForItem:]):
(WebKit::menuForTelephoneNumber):

3:03 PM Changeset in webkit [278329] by Chris Dumez
  • 7 edits
    4 adds in trunk

Fix unsafe access to m_upload in XMLHttpRequest::virtualHasPendingActivity()
https://bugs.webkit.org/show_bug.cgi?id=226508

Reviewed by Geoffrey Garen.

Source/WebCore:

Fix unsafe access to m_upload in XMLHttpRequest::virtualHasPendingActivity() as virtualHasPendingActivity()
may get called off the main thread and m_upload gets initialized lazily on the main thread.

Tests: fast/xmlhttprequest/xmlhttprequest-upload-sameobject.html

http/tests/xmlhttprequest/upload-progress-events-gc.html

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::updateHasRelevantEventListener):
(WebCore::XMLHttpRequest::eventListenersDidChange):
(WebCore::XMLHttpRequest::virtualHasPendingActivity const):

  • xml/XMLHttpRequest.h:
  • xml/XMLHttpRequest.idl:
  • xml/XMLHttpRequestUpload.cpp:

(WebCore::XMLHttpRequestUpload::eventListenersDidChange):
(WebCore::XMLHttpRequestUpload::hasRelevantEventListener const):

  • xml/XMLHttpRequestUpload.h:

LayoutTests:

Improve layout test coverage to make sure that XMLHttpRequest.upload always returns
the same object and that progress events on XMLHttpRequest.upload still get fired
after GC.

  • fast/xmlhttprequest/xmlhttprequest-upload-sameobject-expected.txt: Added.
  • fast/xmlhttprequest/xmlhttprequest-upload-sameobject.html: Added.
  • http/tests/xmlhttprequest/upload-progress-events-gc-expected.txt: Added.
  • http/tests/xmlhttprequest/upload-progress-events-gc.html: Added.
2:04 PM Changeset in webkit [278328] by Fujii Hironori
  • 3 edits in trunk/Source/WebCore

[Win] Remove unused GraphicsContext::hdc()
https://bugs.webkit.org/show_bug.cgi?id=226309

Reviewed by Anders Carlsson.

  • platform/graphics/GraphicsContext.h:
  • platform/graphics/win/GraphicsContextWin.cpp:

(WebCore::GraphicsContext::hdc const): Deleted.

2:04 PM Changeset in webkit [278327] by Ruben Turcios
  • 1 copy in tags/Safari-611.3.6.1.4

Tag Safari-611.3.6.1.4.

2:01 PM Changeset in webkit [278326] by Ruben Turcios
  • 8 edits in branches/safari-611.3.6.1-branch/Source

Versioning.

WebKit-7611.3.6.1.4

2:01 PM Changeset in webkit [278325] by Cameron McCormack
  • 2 edits in trunk/Source/WebCore

Remove duplicate "behavior for fixed" entry from scrolling state tree logging
https://bugs.webkit.org/show_bug.cgi?id=226479

Reviewed by Frédéric Wang.

  • page/scrolling/ScrollingStateFrameScrollingNode.cpp:

(WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):

1:48 PM Changeset in webkit [278324] by Ruben Turcios
  • 2 edits in branches/safari-611.3.6.1-branch/Source/WTF

Cherry-pick r278321. rdar://problem/78718570

Unreviewed build fix after r277881.

Silence unused parameter warnings.

  • wtf/cocoa/FileSystemCocoa.mm: (WTF::FileSystemImpl::setAllowsMaterializingDatalessFiles): (WTF::FileSystemImpl::allowsMaterializingDatalessFiles): Deleted. (WTF::FileSystemImpl::isSafeToUseMemoryMapForPath): Deleted. (WTF::FileSystemImpl::makeSafeToUseMemoryMapForPath): Deleted.

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

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

[WinCairo] GraphicsContextCairo::GraphicsContextCairo(HDC, bool) leaks cairo_t
https://bugs.webkit.org/show_bug.cgi?id=226317

Reviewed by Don Olmstead.

  • platform/graphics/win/GraphicsContextCairoWin.cpp:

(WebCore::createCairoContextWithHDC): Changed the return type from cairo_t* to RefPtr<cairo_t>.
(WebCore::GraphicsContextCairo::GraphicsContextCairo):

1:04 PM Changeset in webkit [278322] by Fujii Hironori
  • 2 edits in trunk/Tools

Sync Tools/win/DLLLauncher/DLLLauncherMain.cpp with Source/JavaScriptCore/shell/DLLLauncherMain.cpp
https://bugs.webkit.org/show_bug.cgi?id=226451

Reviewed by Don Olmstead.

Tools/win/DLLLauncher/DLLLauncherMain.cpp and
Source/JavaScriptCore/shell/DLLLauncherMain.cpp should be same.
But, r231403 changed only JavaScriptCore's one. r178530 changed
only Tools's one.

r178530 added flags for Debug CRT Heap. However, WebKit isn't
using Debug CRT Heap nowadays. And, using _CRTDBG_CHECK_ALWAYS_DF
flag makes WebKit unbearably slow.

Just copied JavaScriptCore's one to overwrite Tools's one.

  • win/DLLLauncher/DLLLauncherMain.cpp:

(copyEnvironmentVariable):
(getStringValue):
(applePathFromRegistry):
(appleApplicationSupportDirectory):
(iTunesDirectory):
(prependPath):
(fatalError):
(directoryExists):
(modifyPath):
(getLastErrorString):
(wWinMain):

12:24 PM Changeset in webkit [278321] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Unreviewed build fix after r277881.

Silence unused parameter warnings.

  • wtf/cocoa/FileSystemCocoa.mm:

(WTF::FileSystemImpl::setAllowsMaterializingDatalessFiles):
(WTF::FileSystemImpl::allowsMaterializingDatalessFiles): Deleted.
(WTF::FileSystemImpl::isSafeToUseMemoryMapForPath): Deleted.
(WTF::FileSystemImpl::makeSafeToUseMemoryMapForPath): Deleted.

12:09 PM Changeset in webkit [278320] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed build fix after r278253.

Revert changes to WebKitTests.swift as this is Swift's Optional<> not WTF's.

  • SwiftOverlay/Tests/WebKitTests.swift:

(WebKitTests.testWKPDFConfigurationRect):

12:04 PM Changeset in webkit [278319] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed build fix after r278253.

Revert changes to ObjectiveCBlockConversions.swift and this is Swift's Optional<> not WTF's.

  • SwiftOverlay/SwiftOverlay/ObjectiveCBlockConversions.swift:

(ObjCBlockConversion.boxingNilAsAnyForCompatibility(_:Error:Error:)):

12:02 PM Changeset in webkit [278318] by Chris Dumez
  • 6 edits in trunk

REGRESSION (iOS 14.5): Can't go back and render previous page properly after "location.href"
https://bugs.webkit.org/show_bug.cgi?id=226323
<rdar://problem/78623536>

Reviewed by Alex Christensen.

Source/WebKit:

A while back, we did an optimization to allow several WebPage objects associated with the
same WebPageProxy to live in the same WebProcess. This allowed us to reuse a process from
a SuspendedPageProxy for a forward navigation, without destroying the SuspendedPageProxy.
However, this added quite a bit of complexity and this broke some same-process back/forward
navigations like in this bug. In particular, it is really hard to get do our history
management right (with the current model) if there is more than more WebPage in a process
for the same WebPageProxy.

To address issues, we go back to the older model with one WebPage per WebProcess for a
given WebPageProxy. To achieve this, we make sure to destroy of SuspendedPageProxy objects
for the current page and destination process before we process-swap (like we used to do).

  • UIProcess/WebBackForwardCache.cpp:

(WebKit::WebBackForwardCache::removeEntriesForPageAndProcess):

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

(WebKit::WebPageProxy::receivedNavigationPolicyDecision):

Tools:

New API test written by Alex Christensen to cover this case.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
11:57 AM Changeset in webkit [278317] by sihui_liu@apple.com
  • 2 edits in trunk/Source/WebKit

Resume WebIDBServer when it is about to be closed
https://bugs.webkit.org/show_bug.cgi?id=226502
rdar://78691498

Reviewed by Chris Dumez.

We started to acquire m_serverLock in WebIDBServer::close() in r278179 to stop database activities on the main
thread. However, m_serverLock may already be held for suspension, and WebIDBServer::close() may be called
before resume(). We need to resume WebIDBServer so m_serverLock can be acquired for stopping database activities.
This also makes sure background thread is resumed before WebIDBServer is removed from NetworkProcess.

  • NetworkProcess/IndexedDB/WebIDBServer.cpp:

(WebKit::WebIDBServer::~WebIDBServer):
(WebKit::WebIDBServer::close):

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

[EME][Thunder] Build broken since r278244
https://bugs.webkit.org/show_bug.cgi?id=226498

Patch by Philippe Normand <pnormand@igalia.com> on 2021-06-01
Reviewed by Alex Christensen.

  • platform/graphics/gstreamer/eme/CDMThunder.cpp:

(WebCore::CDMInstanceSessionThunder::cdmInstanceThunder const): Cast raw pointer instead of
its smart pointer container.

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

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

Reviewed by Geoff Garen.

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

  • UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm:

(WebKit::SOAuthorizationSession::shouldStart):
(WebKit::SOAuthorizationSession::start):
(WebKit::SOAuthorizationSession::continueStartAfterGetAuthorizationHints):
(WebKit::SOAuthorizationSession::continueStartAfterDecidePolicy):
(WebKit::SOAuthorizationSession::fallBackToWebPath):
(WebKit::SOAuthorizationSession::abort):
(WebKit::SOAuthorizationSession::complete):
(WebKit::SOAuthorizationSession::presentViewController):
(WebKit::SOAuthorizationSession::dismissViewController):

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::ProvisionalPageProxy):
(WebKit::ProvisionalPageProxy::processDidTerminate):
(WebKit::ProvisionalPageProxy::cancel):
(WebKit::ProvisionalPageProxy::loadData):
(WebKit::ProvisionalPageProxy::loadRequest):
(WebKit::ProvisionalPageProxy::goToBackForwardItem):
(WebKit::ProvisionalPageProxy::didCreateMainFrame):
(WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame):
(WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
(WebKit::ProvisionalPageProxy::didCommitLoadForFrame):
(WebKit::ProvisionalPageProxy::didCreateContextInWebProcessForVisibilityPropagation):
(WebKit::ProvisionalPageProxy::didCreateContextInGPUProcessForVisibilityPropagation):

  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::isAlwaysOnLoggingAllowed const):

  • UIProcess/WebPageProxy.cpp:

(WebKit::m_limitsNavigationsToAppBoundDomains):
(WebKit::WebPageProxy::~WebPageProxy):
(WebKit::WebPageProxy::launchProcess):
(WebKit::WebPageProxy::suspendCurrentPageIfPossible):
(WebKit::WebPageProxy::swapToProvisionalPage):
(WebKit::WebPageProxy::launchProcessForReload):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::tryClose):
(WebKit::WebPageProxy::tryCloseTimedOut):
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadRequestWithNavigationShared):
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadDataWithNavigationShared):
(WebKit::WebPageProxy::loadSimulatedRequest):
(WebKit::WebPageProxy::loadAlternateHTML):
(WebKit::WebPageProxy::loadWebArchiveData):
(WebKit::WebPageProxy::navigateToPDFLinkWithSimulatedClick):
(WebKit::WebPageProxy::stopLoading):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::tryRestoreScrollPosition):
(WebKit::WebPageProxy::updateActivityState):
(WebKit::WebPageProxy::updateThrottleState):
(WebKit::WebPageProxy::clearAudibleActivity):
(WebKit::WebPageProxy::stopMakingViewBlankDueToLackOfRenderingUpdate):
(WebKit::WebPageProxy::makeViewBlankIfUnpaintedSinceLastLoadCommit):
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::commitProvisionalPage):
(WebKit::WebPageProxy::continueNavigationInNewProcess):
(WebKit::WebPageProxy::suspend):
(WebKit::WebPageProxy::resume):
(WebKit::WebPageProxy::restoreFromSessionState):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didExplicitOpenForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::willPerformClientRedirectForFrame):
(WebKit::WebPageProxy::didCancelClientRedirectForFrame):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::didNavigateWithNavigationDataShared):
(WebKit::WebPageProxy::didPerformClientRedirectShared):
(WebKit::WebPageProxy::didPerformServerRedirectShared):
(WebKit::WebPageProxy::closePage):
(WebKit::WebPageProxy::processDidBecomeUnresponsive):
(WebKit::WebPageProxy::processDidBecomeResponsive):
(WebKit::WebPageProxy::resetStateAfterProcessTermination):
(WebKit::WebPageProxy::dispatchProcessDidTerminate):
(WebKit::WebPageProxy::tryReloadAfterProcessTermination):
(WebKit::WebPageProxy::requestStorageSpace):
(WebKit::WebPageProxy::updateReportedMediaCaptureState):
(WebKit::WebPageProxy::didExceedInactiveMemoryLimitWhileActive):
(WebKit::WebPageProxy::didExceedBackgroundCPULimitWhileInForeground):
(WebKit::WebPageProxy::logger):

  • UIProcess/WebPageProxy.h:
10:36 AM Changeset in webkit [278314] by Alan Coon
  • 1 copy in branches/safari-612.1.16-branch

New branch.

10:22 AM Changeset in webkit [278313] by Antti Koivisto
  • 39 edits
    2 moves in trunk/Source

Rename InlineBox to LegacyInlineBox
https://bugs.webkit.org/show_bug.cgi?id=226501

Reviewed by Alan Bujtas.

Source/WebCore:

More legacy line layout path renaming.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Position.h:
  • layout/Verification.cpp:

(WebCore::Layout::checkForMatchingNonTextRuns):
(WebCore::Layout::collectFlowBoxSubtree):
(WebCore::Layout::collectInlineBoxes):
(WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):

  • layout/integration/LayoutIntegrationRunIterator.cpp:

(WebCore::LayoutIntegration::firstTextRunInTextOrderFor):

  • layout/integration/LayoutIntegrationRunIterator.h:

(WebCore::LayoutIntegration::PathRun::legacyInlineBox const):

  • layout/integration/LayoutIntegrationRunIteratorLegacyPath.h:

(WebCore::LayoutIntegration::RunIteratorLegacyPath::RunIteratorLegacyPath):
(WebCore::LayoutIntegration::RunIteratorLegacyPath::legacyInlineBox const):

  • layout/integration/LayoutIntegrationRunIteratorModernPath.h:

(WebCore::LayoutIntegration::RunIteratorModernPath::legacyInlineBox const):

  • rendering/BidiRun.cpp:
  • rendering/BidiRun.h:

(WebCore::BidiRun::box):
(WebCore::BidiRun::setBox):

  • rendering/CaretRectComputation.cpp:

(WebCore::computeCaretRectForInline):

  • rendering/EllipsisBox.cpp:

(WebCore::EllipsisBox::EllipsisBox):
(WebCore::EllipsisBox::markupBox const):
(WebCore::EllipsisBox::paintMarkupBox):
(WebCore::EllipsisBox::nodeAtPoint):

  • rendering/EllipsisBox.h:
  • rendering/InlineElementBox.h:

(WebCore::InlineElementBox::InlineElementBox):
(WebCore::InlineElementBox::renderer const):

  • rendering/InlineFlowBox.cpp:

(WebCore::InlineFlowBox::setHasBadChildList):
(WebCore::InlineFlowBox::getFlowSpacingLogicalWidth):
(WebCore::InlineFlowBox::addToLine):
(WebCore::InlineFlowBox::removeChild):
(WebCore::InlineFlowBox::deleteLine):
(WebCore::InlineFlowBox::extractLine):
(WebCore::InlineFlowBox::attachLine):
(WebCore::InlineFlowBox::adjustPosition):
(WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
(WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
(WebCore::InlineFlowBox::requiresIdeographicBaseline const):
(WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
(WebCore::InlineFlowBox::computeLogicalBoxHeights):
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine const):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine const):
(WebCore::InlineFlowBox::flipLinesInBlockDirection):
(WebCore::InlineFlowBox::addReplacedChildOverflow):
(WebCore::InlineFlowBox::computeOverflow):
(WebCore::InlineFlowBox::nodeAtPoint):
(WebCore::InlineFlowBox::paint):
(WebCore::InlineFlowBox::firstLeafDescendant const):
(WebCore::InlineFlowBox::lastLeafDescendant const):
(WebCore::InlineFlowBox::canAccommodateEllipsis const):
(WebCore::InlineFlowBox::placeEllipsisBox):
(WebCore::InlineFlowBox::clearTruncation):
(WebCore::InlineFlowBox::computeOverAnnotationAdjustment const):
(WebCore::InlineFlowBox::computeUnderAnnotationAdjustment const):
(WebCore::InlineFlowBox::collectLeafBoxesInLogicalOrder const):
(WebCore::InlineFlowBox::outputLineTreeAndMark const):
(WebCore::InlineFlowBox::checkConsistency const):

  • rendering/InlineFlowBox.h:

(WebCore::InlineFlowBox::InlineFlowBox):
(WebCore::InlineFlowBox::renderer const):
(WebCore::InlineFlowBox::firstChild const):
(WebCore::InlineFlowBox::lastChild const):

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::markDirty):

  • rendering/InlineTextBox.h:

(WebCore::InlineTextBox::InlineTextBox):
(WebCore::InlineTextBox::renderer const):

  • rendering/LegacyInlineBox.cpp: Renamed from Source/WebCore/rendering/InlineBox.cpp.

(WebCore::LegacyInlineBox::assertNotDeleted const):
(WebCore::LegacyInlineBox::~LegacyInlineBox):
(WebCore::LegacyInlineBox::setHasBadParent):
(WebCore::LegacyInlineBox::invalidateParentChildList):
(WebCore::LegacyInlineBox::removeFromParent):
(WebCore::LegacyInlineBox::boxName const):
(WebCore::LegacyInlineBox::showNodeTreeForThis const):
(WebCore::LegacyInlineBox::showLineTreeForThis const):
(WebCore::LegacyInlineBox::outputLineTreeAndMark const):
(WebCore::LegacyInlineBox::outputLineBox const):
(WebCore::LegacyInlineBox::logicalHeight const):
(WebCore::LegacyInlineBox::baselinePosition const):
(WebCore::LegacyInlineBox::lineHeight const):
(WebCore::LegacyInlineBox::caretMinOffset const):
(WebCore::LegacyInlineBox::caretMaxOffset const):
(WebCore::LegacyInlineBox::dirtyLineBoxes):
(WebCore::LegacyInlineBox::adjustPosition):
(WebCore::LegacyInlineBox::root const):
(WebCore::LegacyInlineBox::root):
(WebCore::LegacyInlineBox::nextOnLineExists const):
(WebCore::LegacyInlineBox::previousOnLineExists const):
(WebCore::LegacyInlineBox::nextLeafOnLine const):
(WebCore::LegacyInlineBox::previousLeafOnLine const):
(WebCore::LegacyInlineBox::selectionState):
(WebCore::LegacyInlineBox::canAccommodateEllipsis const):
(WebCore::LegacyInlineBox::placeEllipsisBox):
(WebCore::LegacyInlineBox::clearKnownToHaveNoOverflow):
(WebCore::LegacyInlineBox::locationIncludingFlipping const):
(WebCore::LegacyInlineBox::flipForWritingMode const):
(showNodeTree):
(showLineTree):

  • rendering/LegacyInlineBox.h: Renamed from Source/WebCore/rendering/InlineBox.h.

(WebCore::LegacyInlineBox::nextOnLine const):
(WebCore::LegacyInlineBox::previousOnLine const):
(WebCore::LegacyInlineBox::setNextOnLine):
(WebCore::LegacyInlineBox::setPreviousOnLine):
(WebCore::LegacyInlineBox::LegacyInlineBox):
(WebCore::LegacyInlineBox::~LegacyInlineBox):
(WebCore::LegacyInlineBox::assertNotDeleted const):

  • rendering/LegacyLineLayout.cpp:

(WebCore::LegacyLineLayout::createInlineBoxForRenderer):
(WebCore::LegacyLineLayout::createLineBoxes):
(WebCore::LegacyLineLayout::constructLine):
(WebCore::inlineAncestorHasStartBorderPaddingOrMargin):
(WebCore::inlineAncestorHasEndBorderPaddingOrMargin):
(WebCore::LegacyLineLayout::computeInlineDirectionPositionsForSegment):
(WebCore::LegacyLineLayout::layoutRunsAndFloats):

  • rendering/LegacyLineLayout.h:
  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::outputLineTreeAndMark const):

  • rendering/RenderBlockFlow.h:
  • rendering/RenderDeprecatedFlexibleBox.cpp:

(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::offsetLeft const):
(WebCore::RenderInline::offsetTop const):
(WebCore::RenderInline::culledInlineFirstLineBox const):
(WebCore::RenderInline::culledInlineLastLineBox const):

  • rendering/RenderInline.h:

(WebCore::RenderInline::firstLineBoxIncludingCulling const):
(WebCore::RenderInline::lastLineBoxIncludingCulling const):

  • rendering/RenderLineBoxList.cpp:

(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):

  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::localSelectionRect):

  • rendering/RenderObject.h:
  • rendering/RootInlineBox.cpp:

(WebCore::RootInlineBox::isHyphenated const):
(WebCore::RootInlineBox::placeEllipsis):
(WebCore::RootInlineBox::childRemoved):
(WebCore::RootInlineBox::lineSelectionGap):
(WebCore::RootInlineBox::selectionState):
(WebCore::RootInlineBox::firstSelectedBox):
(WebCore::RootInlineBox::lastSelectedBox):
(WebCore::RootInlineBox::ascentAndDescentForBox const):
(WebCore::RootInlineBox::verticalPositionForBox):
(WebCore::RootInlineBox::includeLeadingForBox const):
(WebCore::RootInlineBox::includeFontForBox const):
(WebCore::RootInlineBox::includeGlyphsForBox const):
(WebCore::RootInlineBox::includeInitialLetterForBox const):
(WebCore::RootInlineBox::includeMarginForBox const):
(WebCore::RootInlineBox::outputLineBox const):

  • rendering/RootInlineBox.h:
  • rendering/svg/RenderSVGText.cpp:

(WebCore::RenderSVGText::positionForPoint):

  • rendering/svg/SVGInlineFlowBox.cpp:

(WebCore::SVGInlineFlowBox::paintSelectionBackground):
(WebCore::SVGInlineFlowBox::paint):

  • rendering/svg/SVGRootInlineBox.cpp:

(WebCore::SVGRootInlineBox::paint):
(WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
(WebCore::SVGRootInlineBox::layoutChildBoxes):
(WebCore::SVGRootInlineBox::layoutRootBox):
(WebCore::SVGRootInlineBox::closestLeafChildForPosition):
(WebCore::SVGRootInlineBox::nodeAtPoint):
(WebCore::reverseInlineBoxRangeAndValueListsIfNeeded):
(WebCore::SVGRootInlineBox::reorderValueLists):

  • rendering/svg/SVGRootInlineBox.h:
  • rendering/svg/SVGTextQuery.cpp:

(WebCore::SVGTextQuery::collectTextBoxesInFlowBox):

Source/WebKitLegacy/mac:

  • DOM/DOMUIKitExtensions.mm:
10:19 AM Changeset in webkit [278312] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

[WebXR] Attach IOSurface to WebXROpaqueFramebuffer
https://bugs.webkit.org/show_bug.cgi?id=225896
<rdar://problem/78128289>

Add a null check to fix a test crash.

  • Modules/webxr/WebXROpaqueFramebuffer.cpp:

(WebCore::WebXROpaqueFramebuffer::startFrame):

9:49 AM Changeset in webkit [278311] by weinig@apple.com
  • 3 edits in trunk/Source/WebCore

Factor out token-type dependent CSS property parsing functions to allow more code sharing
https://bugs.webkit.org/show_bug.cgi?id=226473

Reviewed by Darin Adler.

As a step toward reducing duplicate code and making CSSPropertyParserHelpers a bit
easier to follow, this change extracts the token type specific parts of the primitive
consume functions (e.g. the part of consumeNumberRaw where the token is known to be
a FunctionToken) into their own functions. This allows sharing between functions that
both need that logic (e.g. consumeNumberRaw and consumeNumberRawOrPercentRaw can share)
without extra branches, rechecking the token type, or duplication. It also has the
benefit of creating a strict pattern for primitive consumers going forward.

The new names are rather long to make it very clear what they do, but they are unlikely
to stay for very long. Future changes will try to generalize through templates to allow
programatic combinations of the consumers without always haveing to write the boilerplate.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::shouldAcceptUnitlessValue):
(WebCore::CSSPropertyParserHelpers::consumeIntegerTypeRawWithKnownTokenTypeFunction):
(WebCore::CSSPropertyParserHelpers::consumeIntegerTypeRawWithKnownTokenTypeNumber):
(WebCore::CSSPropertyParserHelpers::consumeIntegerTypeCSSPrimitiveValueWithCalcWithKnownTokenTypeFunction):
(WebCore::CSSPropertyParserHelpers::consumeIntegerTypeCSSPrimitiveValueWithCalcWithKnownTokenTypeNumber):
(WebCore::CSSPropertyParserHelpers::validatedNumberRaw):
(WebCore::CSSPropertyParserHelpers::consumeNumberRawWithKnownTokenTypeFunction):
(WebCore::CSSPropertyParserHelpers::consumeNumberRawWithKnownTokenTypeNumber):
(WebCore::CSSPropertyParserHelpers::consumeNumberRawWithKnownTokenTypeIdent):
(WebCore::CSSPropertyParserHelpers::consumeNumberCSSPrimitiveValueWithCalcWithKnownTokenTypeFunction):
(WebCore::CSSPropertyParserHelpers::consumeNumberCSSPrimitiveValueWithCalcWithKnownTokenTypeNumber):
(WebCore::CSSPropertyParserHelpers::validatedPercentRaw):
(WebCore::CSSPropertyParserHelpers::consumePercentRawWithKnownTokenTypeFunction):
(WebCore::CSSPropertyParserHelpers::consumePercentRawWithKnownTokenTypePercentage):
(WebCore::CSSPropertyParserHelpers::consumePercentRawWithKnownTokenTypeIdent):
(WebCore::CSSPropertyParserHelpers::consumePercentCSSPrimitiveValueWithCalcWithKnownTokenTypeFunction):
(WebCore::CSSPropertyParserHelpers::consumePercentCSSPrimitiveValueWithCalcWithKnownTokenTypePercentage):
(WebCore::CSSPropertyParserHelpers::validatedLengthRaw):
(WebCore::CSSPropertyParserHelpers::consumeLengthRawWithKnownTokenTypeFunction):
(WebCore::CSSPropertyParserHelpers::consumeLengthRawWithKnownTokenTypeDimension):
(WebCore::CSSPropertyParserHelpers::consumeLengthRawWithKnownTokenTypeNumber):
(WebCore::CSSPropertyParserHelpers::consumeLengthCSSPrimitiveValueWithCalcWithKnownTokenTypeFunction):
(WebCore::CSSPropertyParserHelpers::consumeLengthCSSPrimitiveValueWithCalcWithKnownTokenTypeDimension):
(WebCore::CSSPropertyParserHelpers::consumeLengthCSSPrimitiveValueWithCalcWithKnownTokenTypeNumber):
(WebCore::CSSPropertyParserHelpers::consumeAngleRawWithKnownTokenTypeFunction):
(WebCore::CSSPropertyParserHelpers::consumeAngleRawWithKnownTokenTypeDimension):
(WebCore::CSSPropertyParserHelpers::consumeAngleRawWithKnownTokenTypeNumber):
(WebCore::CSSPropertyParserHelpers::consumeAngleCSSPrimitiveValueWithCalcWithKnownTokenTypeFunction):
(WebCore::CSSPropertyParserHelpers::consumeAngleCSSPrimitiveValueWithCalcWithKnownTokenTypeDimension):
(WebCore::CSSPropertyParserHelpers::consumeAngleCSSPrimitiveValueWithCalcWithKnownTokenTypeNumber):
(WebCore::CSSPropertyParserHelpers::consumeTimeCSSPrimitiveValueWithCalcWithKnownTokenTypeFunction):
(WebCore::CSSPropertyParserHelpers::consumeTimeCSSPrimitiveValueWithCalcWithKnownTokenTypeDimension):
(WebCore::CSSPropertyParserHelpers::consumeTimeCSSPrimitiveValueWithCalcWithKnownTokenTypeNumber):
(WebCore::CSSPropertyParserHelpers::consumeResolutionCSSPrimitiveValueWithKnownTokenTypeDimension):
(WebCore::CSSPropertyParserHelpers::consumeIntegerTypeRaw):
(WebCore::CSSPropertyParserHelpers::consumeIntegerType):
(WebCore::CSSPropertyParserHelpers::consumeIntegerRaw):
(WebCore::CSSPropertyParserHelpers::consumeInteger):
(WebCore::CSSPropertyParserHelpers::consumePositiveIntegerRaw):
(WebCore::CSSPropertyParserHelpers::consumePositiveInteger):
(WebCore::CSSPropertyParserHelpers::consumeNumberRaw):
(WebCore::CSSPropertyParserHelpers::consumeNumber):
(WebCore::CSSPropertyParserHelpers::consumeLengthRaw):
(WebCore::CSSPropertyParserHelpers::consumeLength):
(WebCore::CSSPropertyParserHelpers::consumePercentRaw):
(WebCore::CSSPropertyParserHelpers::consumePercent):
(WebCore::CSSPropertyParserHelpers::consumePercentWorkerSafe):
(WebCore::CSSPropertyParserHelpers::canConsumeCalcValue):
(WebCore::CSSPropertyParserHelpers::consumeAngleRaw):
(WebCore::CSSPropertyParserHelpers::consumeAngle):
(WebCore::CSSPropertyParserHelpers::consumeAngleWorkerSafe):
(WebCore::CSSPropertyParserHelpers::consumeTime):
(WebCore::CSSPropertyParserHelpers::consumeResolution):
(WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
(WebCore::CSSPropertyParserHelpers::consumeLengthOrPercentRaw):
(WebCore::CSSPropertyParserHelpers::consumeLengthOrPercent):
(WebCore::CSSPropertyParserHelpers::consumeNumberAllowingSymbolTableIdent):
(WebCore::CSSPropertyParserHelpers::consumePercentAllowingSymbolTableIdent):
(WebCore::CSSPropertyParserHelpers::consumeAngleRawOrNumberRaw):
(WebCore::CSSPropertyParserHelpers::consumeAngleRawOrNumberRawAllowingSymbolTableIdent):
(WebCore::CSSPropertyParserHelpers::consumeNumberRawOrPercentRaw):
(WebCore::CSSPropertyParserHelpers::consumeNumberRawOrPercentDividedBy100Raw):
(WebCore::CSSPropertyParserHelpers::consumeNumberRawOrPercentRawAllowingSymbolTableIdent):
(WebCore::CSSPropertyParserHelpers::consumeNumberRawOrPercentDividedBy100RawAllowingSymbolTableIdent):
(WebCore::CSSPropertyParserHelpers::divisibleBy100):
(WebCore::CSSPropertyParserHelpers::consumeFontWeightNumberRaw):
(WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):
(WebCore::CSSPropertyParserHelpers::consumeFontWeightNumberWorkerSafe):
(WebCore::CSSPropertyParserHelpers::consumeIdentRaw):
(WebCore::CSSPropertyParserHelpers::consumeIdent):
(WebCore::CSSPropertyParserHelpers::consumeIdentWorkerSafe):
(WebCore::CSSPropertyParserHelpers::consumeUrlAsStringView):
(WebCore::CSSPropertyParserHelpers::consumeOptionalAlpha):
(WebCore::CSSPropertyParserHelpers::consumeOptionalAlphaAllowingSymbolTableIdent):
(WebCore::CSSPropertyParserHelpers::normalizeRGBComponentNumber):
(WebCore::CSSPropertyParserHelpers::normalizeRGBComponentPercentage):
(WebCore::CSSPropertyParserHelpers::consumeRelativeRGBComponent):
(WebCore::CSSPropertyParserHelpers::clampRGBComponent):
(WebCore::CSSPropertyParserHelpers::consumeRGBOrHSLOptionalAlpha):
(WebCore::CSSPropertyParserHelpers::parseRelativeRGBParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeHSLParameters):
(WebCore::CSSPropertyParserHelpers::parseHSLParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeHWBParameters):
(WebCore::CSSPropertyParserHelpers::parseHWBParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeLabParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeLCHParameters):
(WebCore::CSSPropertyParserHelpers::parseLCHParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForRGBTypes):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradientColorStop):
(WebCore::CSSPropertyParserHelpers::consumeCrossFade):
(WebCore::CSSPropertyParserHelpers::consumeNumberOrPercentDividedBy100Raw): Deleted.
(WebCore::CSSPropertyParserHelpers::consumeOptionalAlphaOrIdent): Deleted.
(WebCore::CSSPropertyParserHelpers::consumeHue): Deleted.
(WebCore::CSSPropertyParserHelpers::consumeHueOrIdent): Deleted.
(WebCore::CSSPropertyParserHelpers::consumeNumberOrIdent): Deleted.
(WebCore::CSSPropertyParserHelpers::consumePercentOrIdent): Deleted.
(WebCore::CSSPropertyParserHelpers::consumeNumberOrPercentOrIdentNormalizedForRelativeRGB): Deleted.

9:28 AM Changeset in webkit [278310] by aakash_jain@apple.com
  • 4 edits in trunk/Tools

Print bot configuration in build.webkit.org builds
https://bugs.webkit.org/show_bug.cgi?id=226353

Reviewed by Jonathan Bedard.

  • CISupport/build-webkit-org/factories.py:

(Factory.init): Added PrintConfiguration step.

  • CISupport/build-webkit-org/steps.py:

(PrintConfiguration): Copied from ews code, step to print configuration.
(PrintConfiguration.init):
(PrintConfiguration.run):
(PrintConfiguration.convert_build_to_os_name):
(PrintConfiguration.getResultSummary):

  • CISupport/build-webkit-org/steps_unittest.py: Added unit-tests.
8:34 AM Changeset in webkit [278309] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Fix thread safety issues in MediaStreamAudioSourceNode
https://bugs.webkit.org/show_bug.cgi?id=226476

Reviewed by Youenn Fablet.

Adopt thread safety analysis annotations in MediaStreamAudioSourceNode and fix
bugs found by clang. In particular, the following issues were fixed:

  • setFormat() could modify m_sourceNumberOfChannels before locking on the main thread.
  • process() was accessing m_sourceNumberOfChannels / m_sourceSampleRate on the rendering thread *before* locking.
  • Modules/webaudio/MediaStreamAudioSourceNode.cpp:

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

  • Modules/webaudio/MediaStreamAudioSourceNode.h:
8:19 AM Changeset in webkit [278308] by pvollan@apple.com
  • 6 edits
    1 move in trunk/Source/WebKit

[iOS] Preprocess the WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=226301
<rdar://problem/78575178>

Reviewed by Geoffrey Garen.

Run the WebContent sandbox through the preprocessor on iOS.

  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Removed.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in: Copied from Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.
  • WebKit.xcodeproj/project.pbxproj:
8:09 AM Changeset in webkit [278307] by Chris Dumez
  • 9 edits in trunk/Source/WebCore

Fix thread safety issues in WaveShaperProcessor
https://bugs.webkit.org/show_bug.cgi?id=226478

Reviewed by Youenn Fablet.

Adopt thread safety analysis annotations in WaveShaperProcessor and fix bugs
found by clang. In particular, the following issues were fixed:

  • WaveShaperDSPKernel::latencyTime() was failing to grab the lock before accessing the WaveShaperProcessor's oversample on the rendering thread, even though oversample gets modified on the main thread.
  • WaveShaperNode::propagatesSilence() was failing to grab the lock before accessing the WaveShaperProcessor's curve on the rendering thread, even though the curve gets modified on the main thread.
  • Modules/webaudio/AudioBasicProcessorNode.h:

(WebCore::AudioBasicProcessorNode::processor const):

  • Modules/webaudio/WaveShaperDSPKernel.cpp:

(WebCore::WaveShaperDSPKernel::process):
(WebCore::WaveShaperDSPKernel::processCurve):
(WebCore::WaveShaperDSPKernel::latencyTime const):

  • Modules/webaudio/WaveShaperDSPKernel.h:
  • Modules/webaudio/WaveShaperNode.cpp:

(WebCore::WaveShaperNode::create):
(WebCore::WaveShaperNode::setCurveForBindings):
(WebCore::WaveShaperNode::curveForBindings):
(WebCore::WaveShaperNode::setOversampleForBindings):
(WebCore::WaveShaperNode::oversampleForBindings const):
(WebCore::WaveShaperNode::propagatesSilence const):

  • Modules/webaudio/WaveShaperNode.h:
  • Modules/webaudio/WaveShaperNode.idl:
  • Modules/webaudio/WaveShaperProcessor.cpp:

(WebCore::WaveShaperProcessor::setCurveForBindings):
(WebCore::WaveShaperProcessor::setOversampleForBindings):
(WebCore::WaveShaperProcessor::process):

  • Modules/webaudio/WaveShaperProcessor.h:
7:56 AM Changeset in webkit [278306] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Fix thread safety issues in MediaElementAudioSourceNode
https://bugs.webkit.org/show_bug.cgi?id=226475

Reviewed by Youenn Fablet.

Adopt thread safety analysis annotations in MediaElementAudioSourceNode and fix
bugs found by clang. In particular, the following issues were fixed:

  • setFormat() was modifying m_muted / m_sourceNumberOfChannels / m_sourceSampleRate on the main thread without locking, even though those data members are accessed from the rendering thread.
  • process() was accessing m_muted / m_sourceNumberOfChannels / m_sourceSampleRate on the rendering thread *before* locking.
  • Modules/webaudio/MediaElementAudioSourceNode.cpp:

(WebCore::MediaElementAudioSourceNode::setFormat):
(WebCore::MediaElementAudioSourceNode::process):

  • Modules/webaudio/MediaElementAudioSourceNode.h:
6:58 AM Changeset in webkit [278305] by Antti Koivisto
  • 13 edits
    2 moves in trunk/Source/WebCore

Rename ComplexLineLayout to LegacyLineLayout
https://bugs.webkit.org/show_bug.cgi?id=226482

Reviewed by Alan Bujtas.

Since we now handle most inline content with LFC, rename the legacy path as "legacy".

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

(WebCore::LayoutIntegration::lineOverflowWidth):

  • rendering/InlineIterator.h:

(WebCore::IsolateTracker::addFakeRunIfNecessary):
(WebCore::InlineBidiResolver::appendRunInternal):

  • rendering/LegacyLineLayout.cpp: Renamed from Source/WebCore/rendering/ComplexLineLayout.cpp.

(WebCore::LegacyLineLayout::LegacyLineLayout):
(WebCore::LegacyLineLayout::~LegacyLineLayout):
(WebCore::determineDirectionality):
(WebCore::createRun):
(WebCore::LegacyLineLayout::appendRunsForObject):
(WebCore::LegacyLineLayout::createRootInlineBox):
(WebCore::LegacyLineLayout::createAndAppendRootInlineBox):
(WebCore::LegacyLineLayout::createInlineBoxForRenderer):
(WebCore::dirtyLineBoxesForRenderer):
(WebCore::parentIsConstructedOrHaveNext):
(WebCore::LegacyLineLayout::createLineBoxes):
(WebCore::endsWithHTMLSpaces):
(WebCore::reachedEndOfTextRenderer):
(WebCore::LegacyLineLayout::constructLine):
(WebCore::LegacyLineLayout::textAlignmentForLine const):
(WebCore::updateLogicalWidthForLeftAlignedBlock):
(WebCore::updateLogicalWidthForRightAlignedBlock):
(WebCore::updateLogicalWidthForCenterAlignedBlock):
(WebCore::LegacyLineLayout::setMarginsForRubyRun):
(WebCore::setLogicalWidthForTextRun):
(WebCore::LegacyLineLayout::updateRubyForJustifiedText):
(WebCore::LegacyLineLayout::computeExpansionForJustifiedText):
(WebCore::LegacyLineLayout::updateLogicalWidthForAlignment):
(WebCore::updateLogicalInlinePositions):
(WebCore::LegacyLineLayout::computeInlineDirectionPositionsForLine):
(WebCore::expansionBehaviorForInlineTextBox):
(WebCore::applyExpansionBehavior):
(WebCore::inlineAncestorHasStartBorderPaddingOrMargin):
(WebCore::inlineAncestorHasEndBorderPaddingOrMargin):
(WebCore::isLastInFlowRun):
(WebCore::LegacyLineLayout::computeInlineDirectionPositionsForSegment):
(WebCore::LegacyLineLayout::removeInlineBox const):
(WebCore::LegacyLineLayout::computeBlockDirectionPositionsForLine):
(WebCore::isCollapsibleSpace):
(WebCore::findFirstTrailingSpace):
(WebCore::LegacyLineLayout::handleTrailingSpaces):
(WebCore::LegacyLineLayout::appendFloatingObjectToLastLine):
(WebCore::notifyResolverToResumeInIsolate):
(WebCore::setUpResolverToResumeInIsolate):
(WebCore::constructBidiRunsForSegment):
(WebCore::LegacyLineLayout::createLineBoxesFromBidiRuns):
(WebCore::deleteLineRange):
(WebCore::repaintDirtyFloats):
(WebCore::LegacyLineLayout::layoutRunsAndFloats):
(WebCore::LegacyLineLayout::restartLayoutRunsAndFloatsInRange):
(WebCore::LegacyLineLayout::layoutRunsAndFloatsInRange):
(WebCore::LegacyLineLayout::reattachCleanLineFloats):
(WebCore::LegacyLineLayout::linkToEndLineIfNeeded):
(WebCore::LegacyLineLayout::layoutLineBoxes):
(WebCore::LegacyLineLayout::checkFloatInCleanLine):
(WebCore::LegacyLineLayout::determineStartPosition):
(WebCore::LegacyLineLayout::determineEndPosition):
(WebCore::LegacyLineLayout::checkPaginationAndFloatsAtEndLine):
(WebCore::LegacyLineLayout::lineWidthForPaginatedLineChanged const):
(WebCore::LegacyLineLayout::matchedEndLine):
(WebCore::LegacyLineLayout::addOverflowFromInlineChildren):
(WebCore::LegacyLineLayout::lineCount const):
(WebCore::LegacyLineLayout::lineCountUntil const):
(WebCore::LegacyLineLayout::deleteEllipsisLineBoxes):
(WebCore::LegacyLineLayout::checkLinesForTextOverflow):
(WebCore::LegacyLineLayout::positionNewFloatOnLine):
(WebCore::LegacyLineLayout::updateFragmentForLine const):
(WebCore::LegacyLineLayout::style const):
(WebCore::LegacyLineLayout::layoutContext const):

  • rendering/LegacyLineLayout.h: Renamed from Source/WebCore/rendering/ComplexLineLayout.h.

(WebCore::LegacyLineLayout::lineBoxes):
(WebCore::LegacyLineLayout::lineBoxes const):
(WebCore::LegacyLineLayout::firstRootBox const):
(WebCore::LegacyLineLayout::lastRootBox const):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::willBeDestroyed):
(WebCore::RenderBlockFlow::layoutInlineChildren):
(WebCore::RenderBlockFlow::startAlignedOffsetForLine):
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
(WebCore::RenderBlockFlow::styleDidChange):
(WebCore::RenderBlockFlow::hitTestInlineChildren):
(WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
(WebCore::RenderBlockFlow::inlineBlockBaseline const):
(WebCore::RenderBlockFlow::lineCount const):
(WebCore::RenderBlockFlow::paintInlineChildren):
(WebCore::RenderBlockFlow::hasLines const):
(WebCore::RenderBlockFlow::ensureLineBoxes):

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::firstRootBox const):
(WebCore::RenderBlockFlow::lastRootBox const):
(WebCore::RenderBlockFlow::hasLegacyLineLayout const):
(WebCore::RenderBlockFlow::legacyLineLayout const):
(WebCore::RenderBlockFlow::legacyLineLayout):
(WebCore::RenderBlockFlow::hasComplexLineLayout const): Deleted.
(WebCore::RenderBlockFlow::complexLineLayout const): Deleted.
(WebCore::RenderBlockFlow::complexLineLayout): Deleted.

  • rendering/RenderText.cpp:

(WebCore::RenderText::usesLegacyLineLayoutPath const):
(WebCore::RenderText::usesComplexLineLayoutPath const): Deleted.

  • rendering/RenderText.h:
  • rendering/RootInlineBox.cpp:

(WebCore::RootInlineBox::removeLineBoxFromRenderObject):
(WebCore::RootInlineBox::extractLineBoxFromRenderObject):
(WebCore::RootInlineBox::attachLineBoxToRenderObject):

  • rendering/line/LineBreaker.cpp:

(WebCore::LineBreaker::skipLeadingWhitespace):

  • rendering/line/LineBreaker.h:

(WebCore::LineBreaker::positionNewFloatOnLine):

6:50 AM Changeset in webkit [278304] by weinig@apple.com
  • 12 edits
    2 copies in trunk

Support calc() on components inside relative color syntax colors
https://bugs.webkit.org/show_bug.cgi?id=226272

Reviewed by Darin Adler.

Source/WebCore:

Added new and updated test cases to fast/css/parsing-relative-color-syntax.html.

Updates support for the CSS Color 5 "Relative Color Syntax" to support
both calc() on components and component permutations within the syntax.

This allows for things like:

background: lch(from var(--primary-color) 60% calc(c * 0.8) h);

or

background: lch(from rebeccapurple g b r);

To make this work, the calc() infrastructure now supports passing a CSSCalcSymbolTable
which allows the logic in the parser to lookup unknown identifiers when parsing a value.
The relative color syntax parsers can then build an appropriate CSSCalcSymbolTable filled
with the components of the origin color.

Since these calc() values are not serialized, this can all happen in the parser, but if
we to be able serialize them in the future, CSSCalcPrimitiveValueNode could be updated
to store the symbol name in addition to storing the value and type (or we could we could
add a new node for it).

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/calc/CSSCalcSymbolTable.cpp: Added.
  • css/calc/CSSCalcSymbolTable.h: Added.

Add CSSCalcSymbolTable which contains a mapping from CSSValueID to CSSUnitType/double pairs.

  • css/calc/CSSCalcExpressionNodeParser.cpp:

(WebCore::CSSCalcExpressionNodeParser::parseValue):
When trying to construct a value node, if the token is a identifier, use the new
symbol table to look up a type/value to use instead. Use a switch to make things
a bit more clear that differentiation is being done based on token type.

  • css/calc/CSSCalcExpressionNodeParser.h:

Add reference to a CSSCalcSymbolTable to the parser. The parser should only ever be used
on the stack, so this works well and allows us to avoid copying the table.

  • css/calc/CSSCalcValue.cpp:

(WebCore::CSSCalcValue::create):

  • css/calc/CSSCalcValue.h:

Pass the CSSCalcSymbolTable to the parser if one is provided. An overload was used
to avoid #including CSSCalcSymbolTable.h in the header just to add a default value.

  • css/makevalues.pl:

Give a concrete base of uint16_t to allow it to be forward declared and add DefaultHash
and HashTraits to allow it to be used with HashTable. These match the definition of
CSSPropertyID.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::CalcParser::CalcParser):
(WebCore::CSSPropertyParserHelpers::consumeNumberRaw):
(WebCore::CSSPropertyParserHelpers::consumePercentWorkerSafe):
(WebCore::CSSPropertyParserHelpers::consumeAngleRaw):
(WebCore::CSSPropertyParserHelpers::consumeAngleWorkerSafe):
(WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
(WebCore::CSSPropertyParserHelpers::consumeOptionalAlphaOrIdent):
(WebCore::CSSPropertyParserHelpers::consumeHueOrIdent):
(WebCore::CSSPropertyParserHelpers::consumeNumberOrIdent):
(WebCore::CSSPropertyParserHelpers::consumePercentOrIdent):
(WebCore::CSSPropertyParserHelpers::consumeNumberOrPercentOrIdentNormalizedForRelativeRGB):
(WebCore::CSSPropertyParserHelpers::parseRelativeRGBParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeHSLParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeHWBParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeLabParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeLCHParameters):
(WebCore::CSSPropertyParserHelpers::extractChannelValue): Deleted.
(WebCore::CSSPropertyParserHelpers::resolveRelativeColorChannel): Deleted.
Rework relative color syntax parsing to allow permutation of channel symbols
and use of the calc() symbol table support to allow passing in the channels.
This makes the relatative color syntax variants much closer to the normal
variants (with the exception of passing the symbol table) and a subsequent
change will attempt to merge them further.

LayoutTests:

Updated test and results for update support including calc()
and compoment permutation.

  • fast/css/parsing-relative-color-syntax-expected.txt:
  • fast/css/parsing-relative-color-syntax.html:
6:43 AM Changeset in webkit [278303] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][TFC][Quirks] heightValueOfNearestContainingBlockWithFixedHeight should not need to cross formatting context boundary
https://bugs.webkit.org/show_bug.cgi?id=226470

Reviewed by Antti Koivisto.

Now that the incoming vertical constraint is applied properly for the cell layout, we don't need to cross
the formatting context boundary in heightValueOfNearestContainingBlockWithFixedHeight to check if the table
box has fixed height value.

  • layout/formattingContexts/table/TableFormattingQuirks.cpp:

(WebCore::Layout::TableFormattingQuirks::heightValueOfNearestContainingBlockWithFixedHeight const):

6:27 AM WebKitGTK/2.32.x edited by Michael Catanzaro
(diff)
6:01 AM Changeset in webkit [278302] by Adrian Perez de Castro
  • 4 edits in trunk/Source

[WPE][GTK] Support building against uClibc
https://bugs.webkit.org/show_bug.cgi?id=226244

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

  • assembler/MacroAssemblerARM64.cpp:

(getauxval): Provide a fallback implementation of getauxval() for
systems which do not provide <sys/auxv.h>, like those using uClibc
as their C library.

Source/WTF:

  • wtf/PlatformRegisters.h: Use the <sys/ucontext.h> header instead of

<ucontext.h>, which is enough to gain access to the type definitions
for CPU registers and is available on every libc. On the other hand,
uClibc does not have <ucontext.h>, so this fixes the build in that
case.

5:28 AM WebKitGTK/2.32.x edited by Michael Catanzaro
(diff)
4:59 AM Changeset in webkit [278301] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebKit

[GTK] Try harder to find initial WebKitWebView size
https://bugs.webkit.org/show_bug.cgi?id=226320

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

Currently we base the viewport size on the drawing area size. The
drawing area is created with an initial size based on the viewport
size, which will be (0, 0) because the drawing area is still null
by that point.

Then, later, during the widget allocation, the drawing area receives
its proper size.

There are 2 issues here. First, this approach guarantees that the
initial viewport size will always be (0, 0), and then there's no
guarantee the widget will be allocated any time soon - for example,
while GtkNotebook in GTK3 does allocate children that aren't currently
visible, GtkStack doesn't (and that means that GtkNotebook in GTK4 and
HdyTabView don't either). This leads to a situation where a page opened
in background will load with 0, 0 size and if a page depends on that,
it won't load correctly.

The first issue can be fixed by basing the viewport size on the view
allocation as well, and then if the widget isn't allocated, we instead
try to use the size of a parent as an estimation, so that the initial
size is at least not 0 even if not fully accurate.

See https://gitlab.gnome.org/GNOME/epiphany/-/issues/1532

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::viewSize):

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseGetViewSize):

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
3:52 AM Changeset in webkit [278300] by svillar@igalia.com
  • 2 edits in trunk/Source/WebCore

Improve if condition in RenderReplaced::computeReplacedLogicalWidth
https://bugs.webkit.org/show_bug.cgi?id=226325

Reviewed by Darin Adler.

Removed the check for intrinsicRatio as we're already inside a block in which intrinsicRatio
is true. Also switched the position of the two conditions in the OR clause as it allows us
to remove the check for computedHeightIsAuto. Last but not least, used a ternary operator
to initialize the value of boxSizing instead of the if clause.

No new tests as there is no change in functionality.

  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::computeReplacedLogicalWidth const):

1:42 AM Changeset in webkit [278299] by cathiechen
  • 7 edits in trunk/LayoutTests/imported/w3c

Update tests of mapping width and height attributes to aspect-ratio from WPT
https://bugs.webkit.org/show_bug.cgi?id=226472

Reviewed by Rob Buis.

Base commit: https://github.com/web-platform-tests/wpt/commit/da6406b38dae07a8a69c384b72ddd89b48d5194a

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

(test_computed_style_aspect_ratio):

  • web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-aspect-ratio.html:
1:01 AM Changeset in webkit [278298] by commit-queue@webkit.org
  • 5 edits in trunk/Source/ThirdParty/ANGLE

ANGLE Metal translator pre-rotation code is unused and it asserts when used
https://bugs.webkit.org/show_bug.cgi?id=226262

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-06-01
Reviewed by Dean Jackson.

Remove the pre-rotation code. It is Android specific and most likely it is useful
only when ANGLE is used as the drawing mechanism for the primary app window picture.
Thus most likely it is not useful in WebKit on Cocoa platforms where the window
server does the compositing.

  • src/compiler/translator/TranslatorMetalDirect.cpp:

(sh::TranslatorMetalDirect::translateImpl):

  • src/compiler/translator/TranslatorMetalDirect.h:
  • src/libANGLE/renderer/metal/ContextMtl.h:
  • src/libANGLE/renderer/metal/ContextMtl.mm:

(rx::ContextMtl::handleDirtyDriverUniforms):

May 31, 2021:

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

[GLIB] Unreviewed test gardening. Update baselines after r277970.

  • platform/glib/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-stretch-properties-dynamic-001-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-stretchy-003-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-symmetric-001-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-symmetric-006-expected.txt:
11:18 PM Changeset in webkit [278296] by commit-queue@webkit.org
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Cherry-pick ANGLE: Add array bounds checks for WebGL shaders
https://bugs.webkit.org/show_bug.cgi?id=226397

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-05-31
Reviewed by Dean Jackson.

Cherry-pick ANGLE commit b0d39ba2aba218402ff2f32f6e16f18cf4975ff4
At the moment does not affect any WebKit client.
Makes the code consistent with OpenGL.
Makes it easier to understand same change in Metal backend.

Upstream description:
Add array bounds checks for WebGL shaders
WebGL shaders may contain OOB array accesses which in turn
cause undefined behavior, which may result in security
issues. This was detected as an UNKNOWN READ by UBSAN while
testing with SwANGLE.

  • src/libANGLE/renderer/vulkan/ShaderVk.cpp:

(rx::ShaderVk::compile):

9:52 PM Changeset in webkit [278295] by dino@apple.com
  • 3 edits in trunk/Source/WebCore

[WebXR] Attach IOSurface to WebXROpaqueFramebuffer
https://bugs.webkit.org/show_bug.cgi?id=225896
<rdar://problem/78128289>

Reviewed by Sam Weinig.

Implement binding of incoming IOSurfaces (via FrameData)
into the WebGL framebuffer that the page will use as
a rendering target.

Currently only single-sample (non-antialiased) buffers
are supported and the canvas context must be WebGL 2.

  • Modules/webxr/WebXROpaqueFramebuffer.cpp:

(WebCore::WebXROpaqueFramebuffer::startFrame): Create a texture if necessary, then
bind its backing store to the incoming IOSurface, then hook it up to the framebuffer.
(WebCore::WebXROpaqueFramebuffer::endFrame): Release the Pbuffer we used in startFrame.
(WebCore::WebXROpaqueFramebuffer::setupFramebuffer): Add Cocoa+ANGLE specific implementation.

  • Modules/webxr/WebXROpaqueFramebuffer.h: Keep a member variable for the Pbuffer.
9:31 PM Changeset in webkit [278294] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][TFC] Decouple stretching and final cell layouts
https://bugs.webkit.org/show_bug.cgi?id=226452

Reviewed by Antti Koivisto.

Stretching layout is slightly different from the final cell layout.

  • layout/formattingContexts/table/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::setUsedGeometryForCells):
(WebCore::Layout::TableFormattingContext::computeAndDistributeExtraSpace):
(WebCore::Layout::TableFormattingContext::layoutCell): Deleted.

  • layout/formattingContexts/table/TableFormattingContext.h:
  • layout/formattingContexts/table/TableFormattingGeometry.cpp:

(WebCore::Layout::TableFormattingGeometry::horizontalSpaceForCellContent const):
(WebCore::Layout::TableFormattingGeometry::verticalSpaceForCellContent const):

  • layout/formattingContexts/table/TableFormattingGeometry.h:
7:55 PM Changeset in webkit [278293] by Chris Dumez
  • 2 edits in trunk/LayoutTests/imported/w3c

Unreviewed, rebaseline web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/active-processing.https.html after r278233.

The test progressed slightly even though it still isn't fully passing.

  • web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/active-processing.https-expected.txt:
7:41 PM Changeset in webkit [278292] by Alan Bujtas
  • 20 edits
    2 adds in trunk/Source/WebCore

[LFC] Tighten the constraint classes (ConstraintsForInFlowContent/ConstraintsForOutOfFlowContent)
https://bugs.webkit.org/show_bug.cgi?id=226435

Reviewed by Antti Koivisto.

While logical height should always be available for out of flow content by design,
the base inflow layout can't necessarily provide it. This height constraint is not even required/used in most of the layout systems,
so let's move it to the derived class(es).

  • layout/LayoutContext.cpp:

(WebCore::Layout::LayoutContext::layoutFormattingContextSubtree):

  • layout/LayoutUnits.h:
  • layout/formattingContexts/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):

  • layout/formattingContexts/FormattingGeometry.cpp:

(WebCore::Layout::FormattingGeometry::outOfFlowNonReplacedVerticalGeometry const):
(WebCore::Layout::FormattingGeometry::outOfFlowReplacedVerticalGeometry const):
(WebCore::Layout::FormattingGeometry::inlineReplacedContentHeightAndMargin const):
(WebCore::Layout::FormattingGeometry::inlineReplacedContentWidthAndMargin const):
(WebCore::Layout::FormattingGeometry::constraintsForInFlowContent const):

  • layout/formattingContexts/block/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::layoutInFlowContent):
(WebCore::Layout::BlockFormattingContext::computeStaticVerticalPosition):
(WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForBoxAndAncestors):
(WebCore::Layout::BlockFormattingContext::verticalPositionWithMargin const):

  • layout/formattingContexts/block/BlockFormattingContext.h:
  • layout/formattingContexts/block/BlockFormattingGeometry.cpp:

(WebCore::Layout::BlockFormattingGeometry::staticVerticalPosition const):
(WebCore::Layout::BlockFormattingGeometry::staticPosition const): Deleted.

  • layout/formattingContexts/block/BlockFormattingGeometry.h:
  • layout/formattingContexts/block/tablewrapper/TableWrapperBlockFormattingContext.cpp:

(WebCore::Layout::TableWrapperBlockFormattingContext::layoutTableBox):
(WebCore::Layout::TableWrapperBlockFormattingContext::computeHeightAndMarginForTableBox):

  • layout/formattingContexts/flex/FlexFormattingContext.cpp:

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

  • layout/formattingContexts/inline/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::lineLayout):

  • layout/formattingContexts/table/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::layoutInFlowContent):
(WebCore::Layout::TableFormattingContext::setUsedGeometryForCells):
(WebCore::Layout::TableFormattingContext::setUsedGeometryForSections):
(WebCore::Layout::TableFormattingContext::layoutCell):

  • layout/formattingContexts/table/TableFormattingContext.h:
  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::layout):

6:35 PM Changeset in webkit [278291] by aakash_jain@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION(r278261): Broke windows build - follow-up fix
https://bugs.webkit.org/show_bug.cgi?id=226477

Unreviewed build fix.

  • css/calc/CSSCalcValue.cpp:
6:17 PM Changeset in webkit [278290] by commit-queue@webkit.org
  • 12 edits
    2 deletes in trunk

Unreviewed, reverting r278261.
https://bugs.webkit.org/show_bug.cgi?id=226477

Broke windows build

Reverted changeset:

"Support calc() on components inside relative color syntax
colors"
https://bugs.webkit.org/show_bug.cgi?id=226272
https://trac.webkit.org/changeset/278261

5:09 PM Changeset in webkit [278289] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

Fix thread safety issues in ConvolverNode
https://bugs.webkit.org/show_bug.cgi?id=226449

Reviewed by Darin Adler.

Adopt thread safety annotations in ConvolverNode and fix bugs found by clang.
In particular, the following issues were found and fixed:

  • tailTime() / latencyTime() were accessing m_reverb on the audio thread without locking even though m_reverb gets modified on the main thread.
  • checkNumberOfChannelsForInput() was accessing m_buffer on the audio thread without locking even though m_buffer gets modified on the main thread.
  • Modules/webaudio/ConvolverNode.cpp:

(WebCore::ConvolverNode::create):
(WebCore::ConvolverNode::setBufferForBindings):
(WebCore::ConvolverNode::setNormalizeForBindings):
(WebCore::ConvolverNode::tailTime const):
(WebCore::ConvolverNode::latencyTime const):
(WebCore::ConvolverNode::checkNumberOfChannelsForInput):

  • Modules/webaudio/ConvolverNode.h:
  • Modules/webaudio/ConvolverNode.idl:
5:08 PM Changeset in webkit [278288] by Chris Dumez
  • 7 edits in trunk/Source/WebCore

Drop PendingActivity data member from BaseAudioContext
https://bugs.webkit.org/show_bug.cgi?id=226445

Reviewed by Darin Adler.

Drop PendingActivity data member from BaseAudioContext and instead have AudioContext / OfflineAudioContext
override virtualHasPendingActivity() to keep their JS wrapper alive. I find that PendingActivity data members
are too error prone and a frequent cause of leaks.

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::AudioContext):
(WebCore::AudioContext::startRendering):
(WebCore::AudioContext::mayResumePlayback):
(WebCore::AudioContext::suspendPlayback):
(WebCore::AudioContext::virtualHasPendingActivity const):

  • Modules/webaudio/AudioContext.h:
  • Modules/webaudio/BaseAudioContext.cpp:

(WebCore::BaseAudioContext::clear):
(WebCore::BaseAudioContext::clearPendingActivity): Deleted.
(WebCore::BaseAudioContext::setPendingActivity): Deleted.

  • Modules/webaudio/BaseAudioContext.h:
  • Modules/webaudio/OfflineAudioContext.cpp:

(WebCore::OfflineAudioContext::startRendering):
(WebCore::OfflineAudioContext::resumeRendering):
(WebCore::OfflineAudioContext::didSuspendRendering):
(WebCore::OfflineAudioContext::finishedRendering):
(WebCore::OfflineAudioContext::virtualHasPendingActivity const):
(WebCore::OfflineAudioContext::dispatchEvent): Deleted.

  • Modules/webaudio/OfflineAudioContext.h:
5:07 PM Changeset in webkit [278287] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

Fix thread safety issues in AudioBufferSourceNode
https://bugs.webkit.org/show_bug.cgi?id=226448

Reviewed by Darin Adler.

Adopt thread safety analysis annotations in AudioBufferSourceNode and fix the bugs
that were found by clang:

  • We were failing to grab the processLock when setting the loop / loopStart / loopEnd attributes on the main thread (Those are set by JS at any time).
  • propagatesSilence() was failing to grab the lock when checking m_buffer on the audio thread.
  • Modules/webaudio/AudioBufferSourceNode.cpp:

(WebCore::AudioBufferSourceNode::process):
(WebCore::AudioBufferSourceNode::renderSilenceAndFinishIfNotLooping):
(WebCore::AudioBufferSourceNode::renderFromBuffer):
(WebCore::AudioBufferSourceNode::setBuffer):
(WebCore::AudioBufferSourceNode::setLoop):
(WebCore::AudioBufferSourceNode::setLoopStart):
(WebCore::AudioBufferSourceNode::setLoopEnd):
(WebCore::AudioBufferSourceNode::adjustGrainParameters):
(WebCore::AudioBufferSourceNode::totalPitchRate):
(WebCore::AudioBufferSourceNode::propagatesSilence const):

  • Modules/webaudio/AudioBufferSourceNode.h:
5:04 PM Changeset in webkit [278286] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Stop using WTF_IGNORES_THREAD_SAFETY_ANALYSIS in MediaRecorderPrivateWriter code
https://bugs.webkit.org/show_bug.cgi?id=226446

Reviewed by Darin Adler.

Fold MediaRecorderPrivateWriter::clear() into the destructor since this is the
only place it is called. This allows us to stop using WTF_IGNORES_THREAD_SAFETY_ANALYSIS
since thread safety checks do not apply to destructors.

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

(WebCore::MediaRecorderPrivateWriter::~MediaRecorderPrivateWriter):
(): Deleted.

5:03 PM Changeset in webkit [278285] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

Fix thread safety issues in OscillatorNode
https://bugs.webkit.org/show_bug.cgi?id=226450

Reviewed by Darin Adler.

Adopt thread safety annotations in OscillatorNode and fix bugs found by clang.
In particular, propagatesSilence() was failing to grab the lock before accessing
m_periodicWave, which gets modified on the main thread.

  • Modules/webaudio/OscillatorNode.cpp:

(WebCore::OscillatorNode::create):
(WebCore::OscillatorNode::setTypeForBindings):
(WebCore::OscillatorNode::propagatesSilence const):

  • Modules/webaudio/OscillatorNode.h:
  • Modules/webaudio/OscillatorNode.idl:
5:03 PM Changeset in webkit [278284] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Fix thread safety issues in PannerNode
https://bugs.webkit.org/show_bug.cgi?id=226455

Reviewed by Darin Adler.

Adopt thread safety annotations in PannerNode and fix bugs found by clang.
In particular, the following issues were fixed:

  • tailTime() / latencyTime() were accessing m_panner on the audio thread without locking even though m_panner gets modified on the main thread.
  • process() was accessing panningModel and m_panner before locking, on the audio thread, even though those get modified on the main thread.
  • processOnlyAudioParams() was failing to grab the process lock.
  • requiresTailProcessing() may get called on the audio thread and was failing to grab the processLock before accessing m_panner, which gets modified on the main thread.
  • Modules/webaudio/PannerNode.cpp:

(WebCore::PannerNode::create):
(WebCore::PannerNode::PannerNode):
(WebCore::PannerNode::process):
(WebCore::PannerNode::processOnlyAudioParams):
(WebCore::PannerNode::setPanningModelForBindings):
(WebCore::PannerNode::setDistanceModelForBindings):
(WebCore::PannerNode::setRefDistanceForBindings):
(WebCore::PannerNode::setMaxDistanceForBindings):
(WebCore::PannerNode::setRolloffFactorForBindings):
(WebCore::PannerNode::setConeOuterGainForBindings):
(WebCore::PannerNode::setConeOuterAngleForBindings):
(WebCore::PannerNode::setConeInnerAngleForBindings):
(WebCore::PannerNode::requiresTailProcessing const):
(WebCore::PannerNode::tailTime const):
(WebCore::PannerNode::latencyTime const):

  • Modules/webaudio/PannerNode.h:
  • Modules/webaudio/PannerNode.idl:
  • platform/audio/Distance.h:
2:14 PM Changeset in webkit [278283] by Adrian Perez de Castro
  • 7 edits in trunk/Source/WebCore

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

Unreviewed non-unified build fixes.

No new tests needed.

  • css/calc/CSSCalcOperationNode.cpp: Add missing CSSCalcValua.h, CSSPrimitiveValue.h,

CSSUnits.h, and wtf/text/TextStream.h headers.

  • css/calc/CSSCalcOperationNode.h: Add missing CalcOperator.h header.
  • css/calc/CSSCalcValue.cpp: Add missing CSSCalcSymbolTable.h, CalcExpressionInversion.h,

CalcExpressionNumber.h, and CalcExpressionOperation.h headers.

  • platform/calc/CalcExpressionInversion.h: Add missing wtf/TypeCasts.h header, remove

unneeded <memory> header.

  • platform/calc/CalcExpressionNegation.h: Ditto.
  • platform/calc/CalcExpressionNumber.h: Add missing wtf/TypeCasts.h header.
11:28 AM Changeset in webkit [278282] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening. The media/video-playsinline.html failure has been fixed
https://bugs.webkit.org/show_bug.cgi?id=226308

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-05-31

  • platform/glib/TestExpectations:
11:03 AM Changeset in webkit [278281] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GLIB] Unreviewed test gardening, skip a test that uses WebGL2
https://bugs.webkit.org/show_bug.cgi?id=226341

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-05-31

  • platform/glib/TestExpectations:
9:18 AM Changeset in webkit [278280] by svillar@igalia.com
  • 6 edits
    12 adds in trunk

Enable <summary> to be a flex container
https://bugs.webkit.org/show_bug.cgi?id=190065

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Imported several WPT tests adding coverage for <summary> as grid/flex.

  • resources/import-expectations.json:
  • resources/resource-files.json:
  • web-platform-tests/html/rendering/the-details-element/details-blockification-expected.txt: Added.
  • web-platform-tests/html/rendering/the-details-element/details-blockification.html: Added.
  • web-platform-tests/html/rendering/the-details-element/summary-display-flex-expected.html: Added.
  • web-platform-tests/html/rendering/the-details-element/summary-display-flex.html: Added.
  • web-platform-tests/html/rendering/the-details-element/summary-display-grid-expected.html: Added.
  • web-platform-tests/html/rendering/the-details-element/summary-display-grid.html: Added.
  • web-platform-tests/html/rendering/the-details-element/summary-display-inline-flex-expected.html: Added.
  • web-platform-tests/html/rendering/the-details-element/summary-display-inline-flex.html: Added.
  • web-platform-tests/html/rendering/the-details-element/summary-display-inline-grid-expected.html: Added.
  • web-platform-tests/html/rendering/the-details-element/summary-display-inline-grid.html: Added.
  • web-platform-tests/html/rendering/the-details-element/summary-in-ol-expected.html: Added.
  • web-platform-tests/html/rendering/the-details-element/summary-in-ol.html: Added.
  • web-platform-tests/html/rendering/the-details-element/w3c-import.log:

Source/WebCore:

Create grid or flex renderers for <summary> elements whenever display: {inline}-{grid|flex}
is specified. All vendors but WebKit allowed it so it should be good for interoperability.

  • html/HTMLSummaryElement.cpp:

(WebCore::HTMLSummaryElement::createElementRenderer): create the renderer specifying
RenderElement::OnlyCreateBlockAndFlexboxRenderers.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::createFor): do not create a RenderListItem for <summary> if display:list-item
is used because they're already list items. Let it fallthrough to RenderBlockFlow creation.

8:47 AM Changeset in webkit [278279] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][TFC] Move ensureTableGrid to TableFormattingState
https://bugs.webkit.org/show_bug.cgi?id=226424

Reviewed by Antti Koivisto.

We can certainly have this much logic in a formatting state class.

  • layout/formattingContexts/table/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::ensureTableGrid): Deleted.

  • layout/formattingContexts/table/TableFormattingContext.h:
  • layout/formattingContexts/table/TableFormattingState.cpp:

(WebCore::Layout::ensureTableGrid):
(WebCore::Layout::TableFormattingState::TableFormattingState):

8:04 AM Changeset in webkit [278278] by msaboff@apple.com
  • 14 edits in trunk/Source/bmalloc

[bmalloc] Make adaptive scavenging more precise
https://bugs.webkit.org/show_bug.cgi?id=226237

Reviewed by Geoffrey Garen.

This patch re-enables the adaptive scavenger for macOS.
It is much more precise when calling madvise() by keeping track of the
maximum extent of physically mapped memory in a LargeRange. For example,
in the prior code, we'd return a small range back to a Gigacage LargeRange
whithout any physical pages. When we scavenge that LargeRange, we madvise()
the whole Gigacage range. Although this didn't cause correctness issues,
it was quite wasteful.

In the tests I did with this patch compared to the earlier adaptive change,
the number of madvise calls we made drops by ~18% and the time spent in those
calls dropped ~13% on an Apple silicon mac and ~30% on an x86 mac.
This was measured using dtrace running JetStream2 from the command line.
RAMification results improved ~1% over the adptive change.

There is the possible future optimization where we also keep track of the
first address of physically mapped memory in a LargeRange. Since bmalloc
allocates memory from lower addresses first, it is thought that the change
in this patch is sufficient to reduce not only the number of madvise calls,
but the time it takes to make those calls.

  • bmalloc/BPlatform.h:
  • bmalloc/Heap.cpp:

(bmalloc::Heap::decommitLargeRange):
(bmalloc::Heap::scavenge):
(bmalloc::Heap::allocateSmallChunk):
(bmalloc::Heap::deallocateSmallChunk):
(bmalloc::Heap::allocateSmallPage):
(bmalloc::Heap::splitAndAllocate):
(bmalloc::Heap::allocateLarge):
(bmalloc::Heap::tryAllocateLargeChunk):
(bmalloc::Heap::shrinkLarge):
(bmalloc::Heap::deallocateLarge):
(bmalloc::Heap::scavengeToHighWatermark): Deleted.

  • bmalloc/Heap.h:
  • bmalloc/IsoDirectory.h:
  • bmalloc/IsoDirectoryInlines.h:

(bmalloc::passedNumPages>::takeFirstEligible):
(bmalloc::passedNumPages>::scavenge):
(bmalloc::passedNumPages>::scavengeToHighWatermark): Deleted.

  • bmalloc/IsoHeapImpl.h:
  • bmalloc/IsoHeapImplInlines.h:

(bmalloc::IsoHeapImpl<Config>::scavengeToHighWatermark): Deleted.

  • bmalloc/LargeMap.cpp:

(bmalloc::LargeMap::add):

  • bmalloc/LargeRange.h:

(bmalloc::LargeRange::LargeRange):
(bmalloc::LargeRange::physicalExtent const):
(bmalloc::LargeRange::setPhysicalExtent):
(bmalloc::LargeRange::resetPhysicalExtent):
(bmalloc::LargeRange::setUsedSinceLastScavenge):
(bmalloc::merge):
(bmalloc::LargeRange::split const):
(): Deleted.

  • bmalloc/Scavenger.cpp:

(bmalloc::Scavenger::Scavenger):
(bmalloc::Scavenger::scavenge):
(bmalloc::Scavenger::threadRunLoop):
(bmalloc::Scavenger::timeSinceLastPartialScavenge): Deleted.
(bmalloc::Scavenger::partialScavenge): Deleted.

  • bmalloc/Scavenger.h:
  • bmalloc/SmallPage.h:

(bmalloc::SmallPage::setUsedSinceLastScavenge):

8:02 AM Changeset in webkit [278277] by Antti Koivisto
  • 88 edits in trunk/Source/WebCore

Rename presentationAttributeStyle to presentationalHintStyle to match spec language
https://bugs.webkit.org/show_bug.cgi?id=226467

Reviewed by Sam Weinig.

The HTML specification calls these "presentational hints", https://html.spec.whatwg.org/#presentational-hints.

  • dom/Attr.cpp:

(WebCore::Attr::style):

  • dom/Element.cpp:

(WebCore::Element::cloneAttributesFromElement):

  • dom/ElementData.cpp:

(WebCore::ShareableElementData::ShareableElementData):
(WebCore::UniqueElementData::UniqueElementData):

  • dom/ElementData.h:

(WebCore::ElementData::presentationalHintStyleIsDirty const):
(WebCore::ElementData::setPresentationalHintStyleIsDirty const):
(WebCore::ElementData::presentationalHintStyle const):
(WebCore::ElementData::presentationAttributeStyleIsDirty const): Deleted.
(WebCore::ElementData::setPresentationAttributeStyleIsDirty const): Deleted.
(WebCore::ElementData::presentationAttributeStyle const): Deleted.

  • dom/StyledElement.cpp:

(WebCore::StyledElement::attributeChanged):
(WebCore::StyledElement::rebuildPresentationalHintStyle):
(WebCore::StyledElement::addPropertyToPresentationalHintStyle):
(WebCore::StyledElement::rebuildPresentationAttributeStyle): Deleted.
(WebCore::StyledElement::addPropertyToPresentationAttributeStyle): Deleted.

  • dom/StyledElement.h:

(WebCore::StyledElement::collectPresentationalHintsForAttribute):
(WebCore::StyledElement::additionalPresentationalHintStyle const):
(WebCore::StyledElement::hasPresentationalHintsForAttribute const):
(WebCore::StyledElement::presentationalHintStyle const):
(WebCore::StyledElement::additionalPresentationAttributeStyle const): Deleted.
(WebCore::StyledElement::collectStyleForPresentationAttribute): Deleted.
(WebCore::StyledElement::isPresentationAttribute const): Deleted.
(WebCore::StyledElement::presentationAttributeStyle const): Deleted.

  • html/HTMLBRElement.cpp:

(WebCore::HTMLBRElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLBRElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLBRElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLBRElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLBRElement.h:
  • html/HTMLBodyElement.cpp:

(WebCore::HTMLBodyElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLBodyElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLBodyElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLBodyElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLBodyElement.h:
  • html/HTMLButtonElement.cpp:

(WebCore::HTMLButtonElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLButtonElement::isPresentationAttribute const): Deleted.

  • html/HTMLButtonElement.h:
  • html/HTMLDivElement.cpp:

(WebCore::HTMLDivElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLDivElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLDivElement.h:
  • html/HTMLElement.cpp:

(WebCore::HTMLElement::applyBorderAttributeToStyle):
(WebCore::HTMLElement::mapLanguageAttributeToLocale):
(WebCore::HTMLElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLElement::applyAlignmentAttributeToStyle):
(WebCore::HTMLElement::addHTMLLengthToStyle):
(WebCore::HTMLElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLElement.h:
  • html/HTMLEmbedElement.cpp:

(WebCore::HTMLEmbedElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLEmbedElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLEmbedElement.h:
  • html/HTMLFontElement.cpp:

(WebCore::HTMLFontElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLFontElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLFontElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLFontElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLFontElement.h:
  • html/HTMLFrameSetElement.cpp:

(WebCore::HTMLFrameSetElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLFrameSetElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLFrameSetElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLFrameSetElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLFrameSetElement.h:
  • html/HTMLHRElement.cpp:

(WebCore::HTMLHRElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLHRElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLHRElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLHRElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLHRElement.h:
  • html/HTMLIFrameElement.cpp:

(WebCore::HTMLIFrameElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLIFrameElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLIFrameElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLIFrameElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLIFrameElement.h:
  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLImageElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLImageElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLImageElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLImageElement.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLInputElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLInputElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLInputElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLInputElement.h:
  • html/HTMLLIElement.cpp:

(WebCore::HTMLLIElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLLIElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLLIElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLLIElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLLIElement.h:
  • html/HTMLMarqueeElement.cpp:

(WebCore::HTMLMarqueeElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLMarqueeElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLMarqueeElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLMarqueeElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLMarqueeElement.h:
  • html/HTMLOListElement.cpp:

(WebCore::HTMLOListElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLOListElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLOListElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLOListElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLOListElement.h:
  • html/HTMLObjectElement.cpp:

(WebCore::HTMLObjectElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLObjectElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLObjectElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLObjectElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLObjectElement.h:
  • html/HTMLParagraphElement.cpp:

(WebCore::HTMLParagraphElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLParagraphElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLParagraphElement.h:
  • html/HTMLPlugInElement.cpp:

(WebCore::HTMLPlugInElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLPlugInElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLPlugInElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLPlugInElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLPlugInElement.h:
  • html/HTMLPreElement.cpp:

(WebCore::HTMLPreElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLPreElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLPreElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLPreElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLPreElement.h:
  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLSelectElement::isPresentationAttribute const): Deleted.

  • html/HTMLSelectElement.h:
  • html/HTMLTableCaptionElement.cpp:

(WebCore::HTMLTableCaptionElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLTableCaptionElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLTableCaptionElement.h:
  • html/HTMLTableCellElement.cpp:

(WebCore::HTMLTableCellElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLTableCellElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLTableCellElement::additionalPresentationalHintStyle const):
(WebCore::HTMLTableCellElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLTableCellElement::collectStyleForPresentationAttribute): Deleted.
(WebCore::HTMLTableCellElement::additionalPresentationAttributeStyle const): Deleted.

  • html/HTMLTableCellElement.h:
  • html/HTMLTableColElement.cpp:

(WebCore::HTMLTableColElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLTableColElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLTableColElement::additionalPresentationalHintStyle const):
(WebCore::HTMLTableColElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLTableColElement::collectStyleForPresentationAttribute): Deleted.
(WebCore::HTMLTableColElement::additionalPresentationAttributeStyle const): Deleted.

  • html/HTMLTableColElement.h:
  • html/HTMLTableElement.cpp:

(WebCore::HTMLTableElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLTableElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLTableElement::additionalPresentationalHintStyle const):
(WebCore::HTMLTableElement::collectStyleForPresentationAttribute): Deleted.
(WebCore::HTMLTableElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLTableElement::additionalPresentationAttributeStyle const): Deleted.

  • html/HTMLTableElement.h:
  • html/HTMLTablePartElement.cpp:

(WebCore::HTMLTablePartElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLTablePartElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLTablePartElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLTablePartElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLTablePartElement.h:
  • html/HTMLTableSectionElement.cpp:

(WebCore::HTMLTableSectionElement::additionalPresentationalHintStyle const):
(WebCore::HTMLTableSectionElement::additionalPresentationAttributeStyle const): Deleted.

  • html/HTMLTableSectionElement.h:
  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLTextAreaElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLTextAreaElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLTextAreaElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLTextAreaElement.h:
  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::adjustInnerTextStyle const):

  • html/HTMLUListElement.cpp:

(WebCore::HTMLUListElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLUListElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLUListElement::isPresentationAttribute const): Deleted.
(WebCore::HTMLUListElement::collectStyleForPresentationAttribute): Deleted.

  • html/HTMLUListElement.h:
  • html/HTMLVideoElement.cpp:

(WebCore::HTMLVideoElement::collectPresentationalHintsForAttribute):
(WebCore::HTMLVideoElement::hasPresentationalHintsForAttribute const):
(WebCore::HTMLVideoElement::collectStyleForPresentationAttribute): Deleted.
(WebCore::HTMLVideoElement::isPresentationAttribute const): Deleted.

  • html/HTMLVideoElement.h:
  • inspector/agents/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):

  • mathml/MathMLElement.cpp:

(WebCore::MathMLElement::hasPresentationalHintsForAttribute const):
(WebCore::MathMLElement::collectPresentationalHintsForAttribute):
(WebCore::MathMLElement::isPresentationAttribute const): Deleted.
(WebCore::MathMLElement::collectStyleForPresentationAttribute): Deleted.

  • mathml/MathMLElement.h:
  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::matchAllRules):

  • style/MatchedDeclarationsCache.cpp:

(WebCore::Style::MatchedDeclarationsCache::sweep):

  • style/StyleSharingResolver.cpp:

(WebCore::Style::SharingResolver::canShareStyleWithElement const):
(WebCore::Style::SharingResolver::sharingCandidateHasIdenticalStyleAffectingAttributes const):

  • svg/SVGCircleElement.cpp:

(WebCore::SVGCircleElement::svgAttributeChanged):

  • svg/SVGElement.cpp:

(WebCore::SVGElement::hasPresentationalHintsForAttribute const):
(WebCore::SVGElement::collectPresentationalHintsForAttribute):
(WebCore::SVGElement::isPresentationAttribute const): Deleted.
(WebCore::SVGElement::collectStyleForPresentationAttribute): Deleted.

  • svg/SVGElement.h:

(WebCore::SVGElement::invalidateSVGPresentationalHintStyle):
(WebCore::SVGElement::invalidateSVGPresentationAttributeStyle): Deleted.

  • svg/SVGEllipseElement.cpp:

(WebCore::SVGEllipseElement::svgAttributeChanged):

  • svg/SVGFilterElement.cpp:

(WebCore::SVGFilterElement::svgAttributeChanged):

  • svg/SVGForeignObjectElement.cpp:

(WebCore::SVGForeignObjectElement::svgAttributeChanged):

  • svg/SVGImageElement.cpp:

(WebCore::SVGImageElement::svgAttributeChanged):

  • svg/SVGMaskElement.cpp:

(WebCore::SVGMaskElement::svgAttributeChanged):

  • svg/SVGPatternElement.cpp:

(WebCore::SVGPatternElement::svgAttributeChanged):

  • svg/SVGRectElement.cpp:

(WebCore::SVGRectElement::svgAttributeChanged):

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::svgAttributeChanged):

  • svg/SVGTextContentElement.cpp:

(WebCore::SVGTextContentElement::hasPresentationalHintsForAttribute const):
(WebCore::SVGTextContentElement::collectPresentationalHintsForAttribute):
(WebCore::SVGTextContentElement::isPresentationAttribute const): Deleted.
(WebCore::SVGTextContentElement::collectStyleForPresentationAttribute): Deleted.

  • svg/SVGTextContentElement.h:
  • svg/SVGTextPositioningElement.cpp:

(WebCore::SVGTextPositioningElement::collectPresentationalHintsForAttribute):
(WebCore::SVGTextPositioningElement::hasPresentationalHintsForAttribute const):
(WebCore::SVGTextPositioningElement::collectStyleForPresentationAttribute): Deleted.
(WebCore::SVGTextPositioningElement::isPresentationAttribute const): Deleted.

  • svg/SVGTextPositioningElement.h:
  • svg/properties/SVGAttributeAnimator.cpp:

(WebCore::SVGAttributeAnimator::invalidateStyle):

6:33 AM Changeset in webkit [278276] by magomez@igalia.com
  • 12 edits
    3 adds in trunk

[GStreamer] Incorrect rendering of VP9 with transparency
https://bugs.webkit.org/show_bug.cgi?id=225961

Reviewed by Žan Doberšek.

Source/WebCore:

Fix the rendering of videos with transparency. This is done both AC and non AC modes and
with and without GSTREAMER_GL enabled.

On AC mode and using GSTREAMER_GL, a new option is added to TextureMapperGL and TextureMapperShaderProgram
to support premultiplying the components of a pixel. This is required because GStreamer uses straight alpha,
and we need it premultiplied in order to perform the correct blending blending of the video frames. Then we
use that new option to render video frames. This new option is also used when copying the video frame into
an external texture if premultiplyAlpha is requested.

On non AC mode, or when GStreamer-gl is disabled, add support to ImageGStreamerCairo to premultiply the alpha
of the video frame before creating the cairo surface to paint, and pass the appropriate composite operator when
drawing with alpha.

Test: media/video-with-alpha.html

  • platform/graphics/gstreamer/GStreamerVideoFrameHolder.cpp:

(WebCore::GstVideoFrameHolder::GstVideoFrameHolder):

  • platform/graphics/gstreamer/ImageGStreamerCairo.cpp:

(WebCore::ImageGStreamer::ImageGStreamer):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::pushTextureToCompositor):
(WebCore::MediaPlayerPrivateGStreamer::paint): update the caps of the conversion to make them match the format
expected by cairo, so we can avoid a component swap.
(WebCore::MediaPlayerPrivateGStreamer::copyVideoTextureToPlatformTexture):

  • platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:

(WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture):

  • platform/graphics/gstreamer/VideoTextureCopierGStreamer.h:
  • platform/graphics/texmap/TextureMapperGL.cpp:

(WebCore::TextureMapperGL::drawTexture):

  • platform/graphics/texmap/TextureMapperGL.h:
  • platform/graphics/texmap/TextureMapperShaderProgram.cpp:

(WebCore::TextureMapperShaderProgram::create):

  • platform/graphics/texmap/TextureMapperShaderProgram.h:

LayoutTests:

Add a test for the playback of transparent videos. This is initially skipped because it's not supported
on Apple ports and won't be working on GTK and WPE until GStreamer is bumped to 1.20.

  • TestExpectations:
  • media/content/video-with-alpha.webm: Added.
  • media/video-with-alpha-expected.html: Added.
  • media/video-with-alpha.html: Added.
2:22 AM Changeset in webkit [278275] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Source/WebCore:
Treat width: intrinsic as non definite
https://bugs.webkit.org/show_bug.cgi?id=226367

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

Treat width: intrinsic as non definite in
childMainSizeIsDefinite.

Test: fast/css/flex-box-intrinsic-width-crash.html

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::childMainSizeIsDefinite):

LayoutTests:
Release assert in RenderFlexibleBox::computeInnerFlexBaseSizeForChild via RenderFlexibleBox::layoutFlexItems
https://bugs.webkit.org/show_bug.cgi?id=226367

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

Add test for this.

  • fast/css/flex-box-intrinsic-width-crash-expected.txt: Added.
  • fast/css/flex-box-intrinsic-width-crash.html: Added.
1:29 AM Changeset in webkit [278274] by youenn@apple.com
  • 8 edits
    3 adds in trunk

Go to network in case fetch event is not yet responded when being destroyed instead of failing the load
https://bugs.webkit.org/show_bug.cgi?id=226374
<rdar://78298472>

Reviewed by Alex Christensen.

Source/WebCore:

In case worker is terminated, instead of failing fetch events that are pending a response, we should go to the network.
This mirrors what is already done in ServiceWorkerFetchTask.

This can for instance happen in case a lot of fetches are done in parallel on the same service worker.
The service worker will do the fetch itself but given there are lots of fetches, some fetch might not start until other loads are complete.
This may trigger the fetch timeout which might then trigger terminating the worker.
We should probably revisit our fetch timeout policy now that we have added worker spin detection.

Test: http/wpt/service-workers/fetch-worker-terminate.https.html

  • testing/ServiceWorkerInternals.cpp:

(WebCore::ServiceWorkerInternals::terminate):
(WebCore::ServiceWorkerInternals::waitForFetchEventToFinish):

  • testing/ServiceWorkerInternals.h:
  • testing/ServiceWorkerInternals.idl:
  • workers/service/FetchEvent.cpp:

(WebCore::FetchEvent::~FetchEvent):
Update logging to only log the case where respondWith is called but fetch event is destroyed before processing the response.
Otherwise, we would log the case of respondWith being never called, which is happening often and leads to go to the network.
(WebCore::FetchEvent::processResponse):

  • workers/service/FetchEvent.h:
  • workers/service/context/ServiceWorkerFetch.cpp:

(WebCore::ServiceWorkerFetch::processResponse):

LayoutTests:

  • http/wpt/service-workers/fetch-worker-terminate-worker.js: Added.

(doTest):

  • http/wpt/service-workers/fetch-worker-terminate.https-expected.txt: Added.
  • http/wpt/service-workers/fetch-worker-terminate.https.html: Added.
12:51 AM Changeset in webkit [278273] by commit-queue@webkit.org
  • 2 edits in trunk/Tools/buildstream

[Flatpak SDK] Update to libsoup3 2.99.7
https://bugs.webkit.org/show_bug.cgi?id=226457

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2021-05-31
Reviewed by Philippe Normand.

  • elements/sdk/libsoup3.bst:
12:28 AM Changeset in webkit [278272] by youenn@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Use tighter bitrate allocation rules for WebRTC H264 software encoder
https://bugs.webkit.org/show_bug.cgi?id=226319
<rdar://73150695>

Reviewed by Eric Carlson.

Software H264 encoder is sometimes overshooting target bitrate in which case WebRTC backend will start dropping frames.
The encoder might then think it is on target and will not try to increase compression.
This makes it possible to be locked in a very low frame rate but high quality image situation.
It is often better to preserve frame rate and lower quality, the application could always lower frame rate if desired.

To do so, we detect whether the encoder is using software code path or not.
If so, we compute the actual frame rate and compare it with the expected frame rate.
If the actual frame rate is twice smaller or even below, we enter in a low frame rate mode.
Otherwise, we are in a regular frame rate mode where we apply the normal bitrate rules.
In the low frame rate mode, we divide the target bitrate by 3 so as to quickly recover frame rate.

This works well in situations where motion increases from time to time.
It is still not perfect for instance in case the video is muted and gets unmuted or when the scene is completely still and suddenly large motion happens.
In those cases, frame rate is recovered after a minute or so according my testing.

  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm:

(-[RTCVideoEncoderH264 initWithCodecInfo:]):
(-[RTCVideoEncoderH264 encode:codecSpecificInfo:frameTypes:]):
(-[RTCVideoEncoderH264 resetCompressionSessionWithPixelFormat:]):
(-[RTCVideoEncoderH264 setEncoderBitrateBps:frameRate:]):
(-[RTCVideoEncoderH264 updateBitRateAccordingActualFrameRate]):

May 30, 2021:

11:39 PM Changeset in webkit [278271] by Wenson Hsieh
  • 3 edits
    2 adds in trunk

REGRESSION (r258118): SVG paths that contain a single move command incorrect client bounding rects
https://bugs.webkit.org/show_bug.cgi?id=226447
rdar://72112744

Reviewed by Alan Bujtas.

Source/WebCore:

r258118 introduced a fast path for computing the bounding rect of a WebCore::Path without having to
materialize a platform path object (e.g. CGPathRef on platforms that use CoreGraphics). To do this, we
introduce InlinePathData -- a variant capable of representing several types of simple Path objects without
allocating a platform path.

However, in the case where a Path only consists of a single moveTo command, this fast path for computing the
bounding rect currently returns the zero rect (an empty rect at the origin), rather than an empty rect at the
location we've moved to. This causes the offset of the bounding rect of an SVG path element that contains only a
single M drawing command to be incorrect.

Simply fix this by returning an empty rect that is offset by the moveTo location, rather than the origin.

Test: fast/svg/bounding-rect-for-path-with-only-move-command.html

  • platform/graphics/Path.cpp:

(WebCore::Path::boundingRectFromInlineData const):

LayoutTests:

Add a layout test to exercise the bug.

  • fast/svg/bounding-rect-for-path-with-only-move-command-expected.txt: Added.
  • fast/svg/bounding-rect-for-path-with-only-move-command.html: Added.
11:20 PM Changeset in webkit [278270] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

Add logging to allow relating a HTMLMediaElement to a MediaStream
https://bugs.webkit.org/show_bug.cgi?id=226373

Reviewed by Eric Carlson.

Update logging to print the ID of the MediaStream being played by the HTMLMediaElement.

  • Modules/mediastream/MediaStream.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::loadResource):

9:22 PM Changeset in webkit [278269] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Use SortedArrayMap in parseColorContrastFunctionParameters
https://bugs.webkit.org/show_bug.cgi?id=226444

Reviewed by Darin Adler.

Use SortedArrayMap to remove some boilerplate and allow for a future where
this list gets big and the map can switch to a binary search automatically.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseColorContrastFunctionParameters):

8:44 PM Changeset in webkit [278268] by weinig@apple.com
  • 8 edits in trunk

Remove support for no longer specific color(lab ...) syntax
https://bugs.webkit.org/show_bug.cgi?id=226439

Reviewed by Darin Adler.

Source/WebCore:

Remove support for parsing the color(lab ...) syntax.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters):
(WebCore::CSSPropertyParserHelpers::parseColorFunctionForLabParameters): Deleted.

LayoutTests:

Remove test cases for color(lab) (keeping one to ensure it doesn't
work) and update uses of color(lab ...) to use lab(...) instead.

  • fast/css/parsing-lab-colors-expected.txt:
  • fast/css/parsing-lab-colors.html:
  • fast/css/parsing-relative-color-syntax-expected.txt:
  • fast/css/parsing-relative-color-syntax.html:
  • TestExpectations:
8:09 PM Changeset in webkit [278267] by Cameron McCormack
  • 5 edits in trunk/Source/WebCore

Fix some comment typos
https://bugs.webkit.org/show_bug.cgi?id=226443

Reviewed by Sam Weinig.

Trivial fixes for comment typos I noticed over the past couple of
months.

  • page/scrolling/ScrollingStateTree.h:
  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::GraphicsContext::drawPlatformImage):
(WebCore::GraphicsContext::drawPlatformPattern):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::hitTestList):

  • rendering/RenderLayer.h:
8:02 PM Changeset in webkit [278266] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Drop PendingActivity from ScriptProcessorNode
https://bugs.webkit.org/show_bug.cgi?id=226442

Reviewed by Darin Adler.

ScriptProcessorNode already has a virtualHasPendingActivity() implementation that keeps
the JS wrapper alive as long has the audio context is running and there is an "audioprocess"
event listener registered on the node. Therefore, there is no need for an additional
PendingActivity data member.

  • Modules/webaudio/AudioNode.cpp:

(WebCore::AudioNode::markNodeForDeletionIfNecessary):

  • Modules/webaudio/AudioNode.h:

(WebCore::AudioNode::didBecomeMarkedForDeletion): Deleted.

  • Modules/webaudio/ScriptProcessorNode.cpp:

(WebCore::ScriptProcessorNode::ScriptProcessorNode):
(WebCore::ScriptProcessorNode::didBecomeMarkedForDeletion): Deleted.

  • Modules/webaudio/ScriptProcessorNode.h:
7:57 PM Changeset in webkit [278265] by Darin Adler
  • 9 edits
    3 deletes in trunk/Source/WebKitLegacy

Remove some of the unneeded WebKitLegacy Windows-specific plug-in code
https://bugs.webkit.org/show_bug.cgi?id=226410

Reviewed by Chris Dumez.

Source/WebKitLegacy:

  • PlatformFTW.cmake: Removed all the code in the win/Plugins directory,

and EmbeddedWidget.h/cpp.

  • PlatformWin.cmake: Ditto.

Source/WebKitLegacy/win:

  • Plugins/PaintHooks.asm: Removed.
  • Plugins/PlatformModule.h: Removed.
  • Plugins/PluginDatabase.cpp: Removed.
  • Plugins/PluginDatabase.h: Removed.
  • Plugins/PluginDatabaseWin.cpp: Removed.
  • Plugins/PluginDebug.cpp: Removed.
  • Plugins/PluginDebug.h: Removed.
  • Plugins/PluginMainThreadScheduler.cpp: Removed.
  • Plugins/PluginMainThreadScheduler.h: Removed.
  • Plugins/PluginMessageThrottlerWin.cpp: Removed.
  • Plugins/PluginMessageThrottlerWin.h: Removed.
  • Plugins/PluginPackage.cpp: Removed.
  • Plugins/PluginPackage.h: Removed.
  • Plugins/PluginPackageWin.cpp: Removed.
  • Plugins/PluginQuirkSet.h: Removed.
  • Plugins/PluginStream.cpp: Removed.
  • Plugins/PluginStream.h: Removed.
  • Plugins/PluginView.cpp: Removed.
  • Plugins/PluginView.h: Removed.
  • Plugins/PluginViewWin.cpp: Removed.
  • Plugins/npapi.cpp: Removed.
  • WebCoreSupport/EmbeddedWidget.cpp: Removed.
  • WebCoreSupport/EmbeddedWidget.h: Removed.
  • WebCoreSupport/WebFrameLoaderClient.cpp: Removed includes of

PluginDatabase.h, PluginPackage.h, PluginView.h.
(WebFrameLoaderClient::WebFrameLoaderClient): Removed m_manualLoader and
m_hasSetnResponseToPlugin.
(WebFrameLoaderClient::setMainDocumentError): Removed all the code here,
which was only used for m_manualLoader.
(WebFrameLoaderClient::committedLoad): Removed code that runs only if
m_manualLoader is non-null.
(WebFrameLoaderClient::finishedLoading): Removed all the code here, which
was only used for m_manualLoader.
(WebFrameLoaderClient::objectContentType): Removed call to plug-in database
to figure out MIME type and select a plug-in to load.
(WebFrameLoaderClient::dispatchDidFailToStartPlugin const): Deleted.
(WebFrameLoaderClient::createPlugin): Return nullptr. No longer support
Netscape-style plug-ins, nor call the embeddedViewWithArguments function.
(WebFrameLoaderClient::redirectDataToPlugin): Removed all the code here.

  • WebCoreSupport/WebFrameLoaderClient.h: Removed dispatchDidFailToStartPlugin,

m_manualLoader, and m_hasSentResponseToPlugin.

  • WebCoreSupport/WebPluginInfoProvider.cpp: Removed include of PluginDatabase.h.

(WebPluginInfoProvider::refreshPlugins): Removed all the code here.
(WebPluginInfoProvider::pluginInfo): Ditto.
(WebPluginInfoProvider::webVisiblePluginInfo): Ditto.

  • WebFrame.cpp: Removed includes of PluginDatabase.h and PluginView.h.
  • WebView.cpp: Ditto.

(WebView::WebViewWndProc): Removed workaround specifically for the
Windows Media Player plug-in.
(WebView::addAdditionalPluginDirectory): Removed all the code here.

7:02 PM Changeset in webkit [278264] by Chris Dumez
  • 6 edits in trunk/Source/WebCore

Remove some dead code from BaseAudioContext / AudioContext
https://bugs.webkit.org/show_bug.cgi?id=226441

Reviewed by Sam Weinig.

  • Modules/webaudio/AudioContext.h:
  • Modules/webaudio/AudioNode.cpp:

(WebCore::AudioNode::connect):

  • Modules/webaudio/AudioScheduledSourceNode.cpp:

(WebCore::AudioScheduledSourceNode::updateSchedulingInfo):
(WebCore::AudioScheduledSourceNode::finish):

  • Modules/webaudio/BaseAudioContext.cpp:

(WebCore::BaseAudioContext::sourceNodeWillBeginPlayback):
(WebCore::BaseAudioContext::refSourceNode): Deleted.
(WebCore::BaseAudioContext::derefSourceNode): Deleted.
(WebCore::BaseAudioContext::incrementActiveSourceCount): Deleted.
(WebCore::BaseAudioContext::decrementActiveSourceCount): Deleted.

  • Modules/webaudio/BaseAudioContext.h:

(WebCore::BaseAudioContext::sampleRate const):
(WebCore::BaseAudioContext::activeSourceCount const): Deleted.
(WebCore::BaseAudioContext::incrementConnectionCount): Deleted.
(WebCore::BaseAudioContext::connectionCount const): Deleted.

5:57 PM Changeset in webkit [278263] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed, tweak slightly incorrect assertion added in r278233.

The assertion was hitting flakily on the bots.

  • Modules/webaudio/BaseAudioContext.cpp:

(WebCore::BaseAudioContext::addTailProcessingNode):

5:52 PM Changeset in webkit [278262] by weinig@apple.com
  • 6 edits in trunk

Add additional target luminance keywords for color-contrast() added for https://github.com/w3c/csswg-drafts/issues/6311
https://bugs.webkit.org/show_bug.cgi?id=226438

Reviewed by Chris Dumez.

Source/WebCore:

Add newly spec'd target luminance keywords.

  • css/CSSValueKeywords.in:

Add AAA and AAA-large keywords.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseColorContrastFunctionParameters):
Add target luminance mappings for "AAA" -> 7 and "AAA-large" -> 4.5

LayoutTests:

Update test and results for new AAA and AAA-large target luminance keywords.

  • fast/css/parsing-color-contrast-expected.txt:
  • fast/css/parsing-color-contrast.html:
5:29 PM Changeset in webkit [278261] by weinig@apple.com
  • 12 edits
    2 copies in trunk

Support calc() on components inside relative color syntax colors
https://bugs.webkit.org/show_bug.cgi?id=226272

Reviewed by Darin Adler.

Source/WebCore:

Added new and updated test cases to fast/css/parsing-relative-color-syntax.html.

Updates support for the CSS Color 5 "Relative Color Syntax" to support
both calc() on components and component permutations within the syntax.

This allows for things like:

background: lch(from var(--primary-color) 60% calc(c * 0.8) h);

or

background: lch(from rebeccapurple g b r);

To make this work, the calc() infrastructure now supports passing a CSSCalcSymbolTable
which allows the logic in the parser to lookup unknown identifiers when parsing a value.
The relative color syntax parsers can then build an appropriate CSSCalcSymbolTable filled
with the components of the origin color.

Since these calc() values are not serialized, this can all happen in the parser, but if
we to be able serialize them in the future, CSSCalcPrimitiveValueNode could be updated
to store the symbol name in addition to storing the value and type (or we could we could
add a new node for it).

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/calc/CSSCalcSymbolTable.cpp: Added.
  • css/calc/CSSCalcSymbolTable.h: Added.

Add CSSCalcSymbolTable which contains a mapping from CSSValueID to CSSUnitType/double pairs.

  • css/calc/CSSCalcExpressionNodeParser.cpp:

(WebCore::CSSCalcExpressionNodeParser::parseValue):
When trying to construct a value node, if the token is a identifier, use the new
symbol table to look up a type/value to use instead. Use a switch to make things
a bit more clear that differentiation is being done based on token type.

  • css/calc/CSSCalcExpressionNodeParser.h:

Add reference to a CSSCalcSymbolTable to the parser. The parser should only ever be used
on the stack, so this works well and allows us to avoid copying the table.

  • css/calc/CSSCalcValue.cpp:

(WebCore::CSSCalcValue::create):

  • css/calc/CSSCalcValue.h:

Pass the CSSCalcSymbolTable to the parser if one is provided. An overload was used
to avoid #including CSSCalcSymbolTable.h in the header just to add a default value.

  • css/makevalues.pl:

Give a concrete base of uint16_t to allow it to be forward declared and add DefaultHash
and HashTraits to allow it to be used with HashTable. These match the definition of
CSSPropertyID.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::CalcParser::CalcParser):
(WebCore::CSSPropertyParserHelpers::consumeNumberRaw):
(WebCore::CSSPropertyParserHelpers::consumePercentWorkerSafe):
(WebCore::CSSPropertyParserHelpers::consumeAngleRaw):
(WebCore::CSSPropertyParserHelpers::consumeAngleWorkerSafe):
(WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
(WebCore::CSSPropertyParserHelpers::consumeOptionalAlphaOrIdent):
(WebCore::CSSPropertyParserHelpers::consumeHueOrIdent):
(WebCore::CSSPropertyParserHelpers::consumeNumberOrIdent):
(WebCore::CSSPropertyParserHelpers::consumePercentOrIdent):
(WebCore::CSSPropertyParserHelpers::consumeNumberOrPercentOrIdentNormalizedForRelativeRGB):
(WebCore::CSSPropertyParserHelpers::parseRelativeRGBParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeHSLParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeHWBParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeLabParameters):
(WebCore::CSSPropertyParserHelpers::parseRelativeLCHParameters):
(WebCore::CSSPropertyParserHelpers::extractChannelValue): Deleted.
(WebCore::CSSPropertyParserHelpers::resolveRelativeColorChannel): Deleted.
Rework relative color syntax parsing to allow permutation of channel symbols
and use of the calc() symbol table support to allow passing in the channels.
This makes the relatative color syntax variants much closer to the normal
variants (with the exception of passing the symbol table) and a subsequent
change will attempt to merge them further.

LayoutTests:

Updated test and results for update support including calc()
and compoment permutation.

  • fast/css/parsing-relative-color-syntax-expected.txt:
  • fast/css/parsing-relative-color-syntax.html:
3:46 PM Changeset in webkit [278260] by dino@apple.com
  • 3 edits in trunk/Source/WebCore

[WebXR] Provide a way to bind and unbind IOSurfaces to ANGLE Pbuffers
https://bugs.webkit.org/show_bug.cgi?id=226423
<rdar://problem/78652783>

Reviewed by Sam Weinig.

WebXR on Cocoa platforms gets framebuffer texture targets via
IOSurfaces. Those must be attached to ANGLE Pbuffers, which are
then bound to GL textures. There is already some code in
GraphicsContextGL (and in the CoreVideo classes) to do this, but
this is an attempt to make a generic function that will handle all
cases.

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::createPbufferAndAttachIOSurface):
(WebCore::GraphicsContextGLOpenGL::destroyPbufferAndDetachIOSurface):

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
3:26 PM Changeset in webkit [278259] by dino@apple.com
  • 4 edits in trunk/Source/WebCore

[WebXR] No need for opaqueTexture when USE(IOSURFACE_FOR_XR_LAYER_DATA)
https://bugs.webkit.org/show_bug.cgi?id=226405
<rdar://problem/78636950>

Reviewed by Tim Horton.

When USE(IOSURFACE_FOR_XR_LAYER_DATA) is true, we'll get our
textures via a different method - we'll create them based on an
IOSurface we receive. This means that when we're in a
USE(IOSURFACE_FOR_XR_LAYER_DATA) configuration, we don't need the
opaqueTexture property on FrameData.

  • platform/xr/PlatformXR.h: Put opaqueTexture in the #else clause.

(PlatformXR::Device::FrameData::LayerData::encode const):
(PlatformXR::Device::FrameData::LayerData::decode):

  • testing/WebFakeXRDevice.cpp:

(WebCore::SimulatedXRDevice::frameTimerFired):

  • Modules/webxr/WebXROpaqueFramebuffer.cpp: Guard use of opaqueTexture.
2:36 PM Changeset in webkit [278258] by dino@apple.com
  • 5 edits in trunk/Source/WebKit

[WebXR] Send recommendedResolution using DeviceProxy
https://bugs.webkit.org/show_bug.cgi?id=226402
<rdar://problem/78635475>

Reviewed by Tim Horton.

Add a recommendedResolution field to DeviceInfo and send
it across processes using the XRDeviceProxy.

  • Shared/Cocoa/XRDeviceInfo.h:
  • Shared/Cocoa/XRDeviceInfo.mm:

(WebKit::XRDeviceInfo::encode const):
(WebKit::XRDeviceInfo::decode):

  • Shared/Cocoa/XRDeviceProxy.h:
  • Shared/Cocoa/XRDeviceProxy.mm:

(WebKit::XRDeviceProxy::XRDeviceProxy):

1:35 PM Changeset in webkit [278257] by Chris Dumez
  • 8 edits in trunk/Source

Drop UncheckedCondition / UncheckedLock
https://bugs.webkit.org/show_bug.cgi?id=226432

Reviewed by Darin Adler.

Source/JavaScriptCore:

Drop one remaining use of UncheckedLock in favor of Lock.

  • jit/JITSafepoint.cpp:
  • jit/JITWorklistThread.h:

Source/WTF:

Drop UncheckedCondition / UncheckedLock now that the whole codebase has been ported to
Condition / Lock, which support Clang thread safety analysis.

  • wtf/Condition.h:
  • wtf/Forward.h:
  • wtf/Lock.cpp:

(WTF::Lock::lockSlow):
(WTF::Lock::unlockSlow):
(WTF::Lock::unlockFairlySlow):
(WTF::Lock::safepointSlow):

  • wtf/Lock.h:

(WTF::assertIsHeld):
(WTF::WTF_ASSERTS_ACQUIRED_LOCK):

12:45 PM Changeset in webkit [278256] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

[WebXR] invalidateFramebuffer is not the same as clearing contents
https://bugs.webkit.org/show_bug.cgi?id=226422
<rdar://problem/78652351>

Reviewed by Sam Weinig.

The WebXR specification says that buffer contents must be cleared
before each frame. The code currently does glInvalidateFramebuffer
to wipe the attachments, which isn't the same thing (and produces
an error since it tries to invalidate attachments that don't exist).

Remove the call to invalidateFramebuffer for the moment since it
causes a glError. Add a FIXME to replace it with explicit calls
to glClear. I expect most content does this already, so it is unlikely
anything will break.

  • Modules/webxr/WebXROpaqueFramebuffer.cpp:

(WebCore::WebXROpaqueFramebuffer::startFrame): Remove the call to
invalidateFramebuffer.

12:41 PM Changeset in webkit [278255] by dino@apple.com
  • 3 edits in trunk/Source/WebCore

[WebXR] Recommended framebuffer width incorrectly scaled
https://bugs.webkit.org/show_bug.cgi?id=226408
<rdar://problem/78638309>

Reviewed by Tim Horton.

When WebXRWebGLLayer creates the WebXROpaqueFramebuffer, it asks
the session for the recommended framebuffer size. It then
multiplies the width by 2 - I assume because there are two eyes.
However, the specification [1] says that it is a "best estimate of
the WebGL framebuffer resolution large enough to contain all of the
session’s XRViews". So it should be the session that makes account
for the multiple views, not the framebuffer.

Since this would almost certainly break existing content using the OpenXR
backend, I edited the implementation to include the 2x width scale.

  • Modules/webxr/WebXRWebGLLayer.cpp:

(WebCore::createOpaqueFramebuffer): Remove the "* 2".

  • platform/xr/openxr/PlatformXROpenXR.cpp: Add a "* 2" to not break content.
12:18 PM Changeset in webkit [278254] by Wenson Hsieh
  • 7 edits
    2 adds in trunk

[iOS] UI process crashes when deallocating WKWebView in a script message handler during an active touch event
https://bugs.webkit.org/show_bug.cgi?id=226426
rdar://75425319

Reviewed by Darin Adler.

Source/WebKit:

It's possible for the UI process to crash upon being notified that asynchronous, active touch events have been
handled in the web process via the async IPC replay block in WebPageProxy::handlePreventableTouchEvent(). This
happens if the client posts a message from the web process to UI process while handling an active touch event
and deallocates the WKWebView currently handling the touch event in the script message handler.

This is because the async replay block inside WebPageProxy::handlePreventableTouchEvent() strongly captures a
reference to the WebPageProxy, thus keeping it alive; however, the WebPageProxy's weak pointer to the page
client is nulled out, which causes WebPageProxy::pageClient() to crash with a null dereference.

To fix this, we weakly capture WebPageProxy instead and return early if it has already been destroyed by the
time we process the completion handler, and also add a null check for m_pageClient before attempting to call
into it. Note that it's unnecessary to call into doneDeferringTouch(Start|End) to unblock any deferred
gestures here, because the process of destroying the content view will call -cleanUpInteraction and remove all
deferring gestures from the view, regardless of whether they're still in Possible state.

Test: TouchEventTests.DestroyWebViewWhileHandlingTouchEnd

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::handlePreventableTouchEvent):

Tools:

Add a new API test that exercises the crash.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/ios/TouchEventTests.mm: Added.

(-[TouchEventScriptMessageHandler userContentController:didReceiveScriptMessage:]):
(-[WKWebView touchEventGestureRecognizer]):
(TestWebKitAPI::updateSimulatedTouchEvent):
(TestWebKitAPI::simulatedTouchEvent):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/ios/active-touch-events.html: Added.
  • TestWebKitAPI/cocoa/TestWKWebView.h:
  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[WKWebView textInputContentView]):
(-[TestWKWebView textInputContentView]): Deleted.

  • TestWebKitAPI/ios/UIKitSPI.h:
9:11 AM Changeset in webkit [278253] by Darin Adler
  • 2951 edits in trunk

Remove WTF::Optional synonym for std::optional, using that class template directly instead
https://bugs.webkit.org/show_bug.cgi?id=226433

Reviewed by Chris Dumez.

Source/JavaScriptCore:

  • <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>.
  • inspector/scripts/codegen/generate_objc_protocol_types_implementation.py:

(ObjCProtocolTypesImplementationGenerator._generate_init_method_for_payload): Use auto instead
of Optional<>. Also use * instead of value() and nest the definition of the local inside an if
statement in the case where it's an optional.

  • inspector/scripts/tests/expected/*: Regenerated these results.

Source/WebCore:

  • <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>.

Source/WebCore/PAL:

  • <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>.

Source/WebDriver:

  • <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>.

Source/WebKit:

  • <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>.
  • Scripts/webkit/tests: Regenerated expected results, by running the command "python

Scripts/webkit/messages_unittest.py -r". (How am I supposed to know to do that?)

Source/WebKitLegacy/ios:

  • WebCoreSupport/WebChromeClientIOS.h: Let the do-webcore-rename script rename

Optional<> to std::optional<>.

Source/WebKitLegacy/mac:

  • <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>.

Source/WebKitLegacy/win:

  • <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>.

Source/WTF:

  • <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>.
  • wtf/Optional.h: Remove WTF::Optional.

Tools:

  • <many files>: Let the do-webcore-rename script rename Optional<> to std::optional<>.
4:43 AM Changeset in webkit [278252] by Jean-Yves Avenard
  • 2 edits in trunk/Tools

REGRESSION (r274460): [macOS] TestWebKitAPI.Fullscreen.WKViewDelegate is timing out
https://bugs.webkit.org/show_bug.cgi?id=223282
rdar://75495585

Reviewed by Darin Adler.

Remove WKViewDelegate test. This test specifically tests the old, C-API
delegate callback that’s not exposed as API and no one uses. This feature
is explicitly deprecated and no-one uses it.

  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm: Delete test
3:17 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)

May 29, 2021:

11:51 PM Changeset in webkit [278251] by Chris Dumez
  • 8 edits in trunk/Source

Stop using UncheckedLock in JSC::VMInspector
https://bugs.webkit.org/show_bug.cgi?id=226427

Reviewed by Mark Lam.

Source/JavaScriptCore:

Stop using UncheckedLock in JSC::VMInspector, as it is being phased out in favor
of Lock, which supports Clang thread safety analysis.

  • tools/HeapVerifier.cpp:

(JSC::HeapVerifier::checkIfRecorded):

  • tools/SigillCrashAnalyzer.cpp:

(JSC::SigillCrashAnalyzer::analyze):

  • tools/VMInspector.cpp:

(JSC::VMInspector::isValidExecutableMemory):
(JSC::VMInspector::codeBlockForMachinePC):
(JSC::VMInspector::lock): Deleted.

  • tools/VMInspector.h:

(JSC::VMInspector::WTF_RETURNS_LOCK):
(JSC::VMInspector::WTF_REQUIRES_LOCK):
(JSC::VMInspector::getLock): Deleted.
(JSC::VMInspector::iterate): Deleted.

Source/WTF:

Add Lock::tryLockWithTimeout(), similar to tryLock() but gives up after a
specified timeout. This used to be implemented in VMInspector but I think
Lock is a better place for it.

  • wtf/Lock.cpp:

(WTF::Lock::tryLockWithTimeout):

  • wtf/Lock.h:
11:13 PM Changeset in webkit [278250] by Ryan Haddad
  • 2 edits in trunk/Tools

[webkitpy] Add a delay between successive iOS simulator boots
https://bugs.webkit.org/show_bug.cgi?id=226376

Reviewed by Darin Adler.

In certain configurations, rapidly attempting to boot multiple
iOS simulators can cause them to fail to boot. Add a 10 second
delay to ensure that each one has a chance to initialize before
moving to the next one.

  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDeviceManager._boot_device):

10:35 PM Changeset in webkit [278249] by Chris Dumez
  • 6 edits in trunk/Source/JavaScriptCore

Stop using UncheckedLock in JSC::ConcurrentJSLock
https://bugs.webkit.org/show_bug.cgi?id=226428

Reviewed by Darin Adler.

Stop using UncheckedLock in JSC::ConcurrentJSLock as it is being phased out in
favor of Lock, which supports Clang thread safety analysis.

  • runtime/ConcurrentJSLock.h:

(JSC::ConcurrentJSLockerBase::ConcurrentJSLockerBase):

  • runtime/Structure.cpp:

(JSC::Structure::findStructuresAndMapForMaterialization):
(JSC::Structure::materializePropertyTable):

  • runtime/Structure.h:
  • runtime/StructureInlines.h:

(JSC::Structure::forEachPropertyConcurrently):

  • yarr/YarrInterpreter.cpp:
10:22 PM Changeset in webkit [278248] by Chris Dumez
  • 11 edits in trunk

Adopt clang thread safety annotations in WTF::DataMutex
https://bugs.webkit.org/show_bug.cgi?id=226431

Reviewed by Darin Adler.

Source/WebCore:

Update code base due to DataMutex API changes.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::performTaskAtMediaTime):
(WebCore::MediaPlayerPrivateGStreamer::triggerRepaint):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(webKitWebSrcConstructed):
(webKitWebSrcGetProperty):
(webKitWebSrcSetContext):
(webKitWebSrcCreate):
(webKitWebSrcMakeRequest):
(webKitWebSrcStop):
(webKitWebSrcGetSize):
(webKitWebSrcIsSeekable):
(webKitWebSrcDoSeek):
(webKitWebSrcQuery):
(webKitWebSrcUnLock):
(webKitWebSrcUnLockStop):
(webKitWebSrcSetMediaPlayer):
(webKitSrcPassedCORSAccessCheck):
(CachedResourceStreamingClient::responseReceived):
(CachedResourceStreamingClient::dataReceived):
(CachedResourceStreamingClient::accessControlCheckFailed):
(CachedResourceStreamingClient::loadFailed):
(CachedResourceStreamingClient::loadFinished):
(webKitSrcWouldTaintOrigin):

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

(WebCore::MediaSourceTrackGStreamer::isReadyForMoreSamples):
(WebCore::MediaSourceTrackGStreamer::notifyWhenReadyForMoreSamples):
(WebCore::MediaSourceTrackGStreamer::enqueueObject):
(WebCore::MediaSourceTrackGStreamer::clearQueue):

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

(webKitMediaSrcActivateMode):
(webKitMediaSrcPadLinked):
(webKitMediaSrcLoop):
(webKitMediaSrcStreamFlush):

Source/WTF:

Adopt clang thread safety annotations in WTF::DataMutex. This allows us to
stop using UncheckedCondition in a few places.

  • wtf/DataMutex.h:

(WTF::DataMutex::DataMutex):

Tools:

Update API test due to DataMutex API changes.

  • TestWebKitAPI/Tests/WTF/DataMutex.cpp:

(TestWebKitAPI::TEST):

9:39 PM Changeset in webkit [278247] by weinig@apple.com
  • 2 edits in trunk/Source/ThirdParty

Remove selective compilation of libwebrtc as TestWebKitAPI depends on it for boringssl, so it is always needed
https://bugs.webkit.org/show_bug.cgi?id=226430

Reviewed by Tim Horton.

r244568 made TestWebKitAPI require linking the built boringssl from
the libwebrtc, so it really can't be selectively compiled. Over time,
we have re-enabled essentially all the platforms, when the intent of
disabling it at all originally was to avoid double building it for
Mac Catalyst, which we retain.

  • Makefile:
5:51 PM Changeset in webkit [278246] by weinig@apple.com
  • 14 edits
    38 adds
    4 deletes in trunk

Split calc() related files into 1-class per file structure
https://bugs.webkit.org/show_bug.cgi?id=226421

Reviewed by Chris Dumez.

Source/WebCore:

It's bothered me for a while that the calc related classes (both in css/
and in platform/) were bundled all in two big files. This change splits
them all out into their own header and implementation files that match
their name, and puts them in new calc/ subdirectories (css/calc/... and
platform/calc/...). This should hopefully make the modifications I need
to make to calc() to support relative color syntax a little easier.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSCalculationValue.cpp: Removed.
  • css/CSSCalculationValue.h: Removed.
  • css/CSSGradientValue.cpp:
  • css/CSSPrimitiveValue.cpp:
  • css/CSSPrimitiveValueMappings.h:
  • css/CSSValue.cpp:
  • css/calc: Added.
  • css/calc/CSSCalcCategoryMapping.cpp: Added.

(WebCore::calcUnitCategory):
(WebCore::calculationCategoryForCombination):
(WebCore::canonicalUnitTypeForCalculationCategory):
(WebCore::hasDoubleValue):

  • css/calc/CSSCalcCategoryMapping.h: Added.
  • css/calc/CSSCalcExpressionNode.cpp: Added.

(WebCore::operator<<):
(WebCore::prettyPrintNode):
(WebCore::prettyPrintNodes):

  • css/calc/CSSCalcExpressionNode.h: Added.

(WebCore::CSSCalcExpressionNode::equals const):
(WebCore::CSSCalcExpressionNode::category const):
(WebCore::CSSCalcExpressionNode::CSSCalcExpressionNode):

  • css/calc/CSSCalcExpressionNodeParser.cpp: Added.

(WebCore::CSSCalcExpressionNodeParser::parseCalc):
(WebCore::CSSCalcExpressionNodeParser::operatorValue):
(WebCore::checkDepthAndIndex):
(WebCore::CSSCalcExpressionNodeParser::parseCalcFunction):
(WebCore::CSSCalcExpressionNodeParser::parseValue):
(WebCore::CSSCalcExpressionNodeParser::parseCalcValue):
(WebCore::CSSCalcExpressionNodeParser::parseCalcProduct):
(WebCore::CSSCalcExpressionNodeParser::parseCalcSum):

  • css/calc/CSSCalcExpressionNodeParser.h: Added.

(WebCore::CSSCalcExpressionNodeParser::CSSCalcExpressionNodeParser):

  • css/calc/CSSCalcInvertNode.cpp: Added.

(WebCore::CSSCalcInvertNode::createCalcExpression const):
(WebCore::CSSCalcInvertNode::doubleValue const):
(WebCore::CSSCalcInvertNode::computeLengthPx const):
(WebCore::CSSCalcInvertNode::dump const):

  • css/calc/CSSCalcInvertNode.h: Added.
  • css/calc/CSSCalcNegateNode.cpp: Added.

(WebCore::CSSCalcNegateNode::createCalcExpression const):
(WebCore::CSSCalcNegateNode::dump const):

  • css/calc/CSSCalcNegateNode.h: Added.
  • css/calc/CSSCalcOperationNode.cpp: Added.

(WebCore::determineCategory):
(WebCore::categoryForInvert):
(WebCore::resolvedTypeForMinOrMaxOrClamp):
(WebCore::isSamePair):
(WebCore::sortingCategoryForType):
(WebCore::sortingCategory):
(WebCore::primitiveTypeForCombination):
(WebCore::conversionToAddValuesWithTypes):
(WebCore::functionFromOperator):
(WebCore::CSSCalcOperationNode::create):
(WebCore::CSSCalcOperationNode::createSum):
(WebCore::CSSCalcOperationNode::createProduct):
(WebCore::CSSCalcOperationNode::createMinOrMaxOrClamp):
(WebCore::CSSCalcOperationNode::hoistChildrenWithOperator):
(WebCore::CSSCalcOperationNode::canCombineAllChildren const):
(WebCore::CSSCalcOperationNode::combineChildren):
(WebCore::CSSCalcOperationNode::simplify):
(WebCore::CSSCalcOperationNode::simplifyRecursive):
(WebCore::CSSCalcOperationNode::simplifyNode):
(WebCore::CSSCalcOperationNode::primitiveType const):
(WebCore::CSSCalcOperationNode::createCalcExpression const):
(WebCore::CSSCalcOperationNode::doubleValue const):
(WebCore::CSSCalcOperationNode::computeLengthPx const):
(WebCore::CSSCalcOperationNode::collectDirectComputationalDependencies const):
(WebCore::CSSCalcOperationNode::collectDirectRootComputationalDependencies const):
(WebCore::CSSCalcOperationNode::buildCSSText):
(WebCore::functionPrefixForOperator):
(WebCore::CSSCalcOperationNode::buildCSSTextRecursive):
(WebCore::CSSCalcOperationNode::dump const):
(WebCore::CSSCalcOperationNode::equals const):
(WebCore::CSSCalcOperationNode::evaluateOperator):

  • css/calc/CSSCalcOperationNode.h: Added.
  • css/calc/CSSCalcPrimitiveValueNode.cpp: Added.

(WebCore::CSSCalcPrimitiveValueNode::create):
(WebCore::CSSCalcPrimitiveValueNode::customCSSText const):
(WebCore::CSSCalcPrimitiveValueNode::primitiveType const):
(WebCore::CSSCalcPrimitiveValueNode::CSSCalcPrimitiveValueNode):
(WebCore::CSSCalcPrimitiveValueNode::isNumericValue const):
(WebCore::CSSCalcPrimitiveValueNode::isNegative const):
(WebCore::CSSCalcPrimitiveValueNode::negate):
(WebCore::CSSCalcPrimitiveValueNode::invert):
(WebCore::CSSCalcPrimitiveValueNode::add):
(WebCore::CSSCalcPrimitiveValueNode::multiply):
(WebCore::CSSCalcPrimitiveValueNode::convertToUnitType):
(WebCore::CSSCalcPrimitiveValueNode::canonicalizeUnit):
(WebCore::CSSCalcPrimitiveValueNode::createCalcExpression const):
(WebCore::CSSCalcPrimitiveValueNode::doubleValue const):
(WebCore::CSSCalcPrimitiveValueNode::computeLengthPx const):
(WebCore::CSSCalcPrimitiveValueNode::collectDirectComputationalDependencies const):
(WebCore::CSSCalcPrimitiveValueNode::collectDirectRootComputationalDependencies const):
(WebCore::CSSCalcPrimitiveValueNode::isZero const):
(WebCore::CSSCalcPrimitiveValueNode::equals const):
(WebCore::CSSCalcPrimitiveValueNode::dump const):

  • css/calc/CSSCalcPrimitiveValueNode.h: Added.
  • css/calc/CSSCalcValue.cpp: Added.

(WebCore::createBlendHalf):
(WebCore::createCSS):
(WebCore::CSSCalcValue::CSSCalcValue):
(WebCore::CSSCalcValue::category const):
(WebCore::CSSCalcValue::primitiveType const):
(WebCore::CSSCalcValue::createCalculationValue const):
(WebCore::CSSCalcValue::setPermittedValueRange):
(WebCore::CSSCalcValue::collectDirectComputationalDependencies const):
(WebCore::CSSCalcValue::collectDirectRootComputationalDependencies const):
(WebCore::CSSCalcValue::customCSSText const):
(WebCore::CSSCalcValue::equals const):
(WebCore::CSSCalcValue::clampToPermittedRange const):
(WebCore::CSSCalcValue::doubleValue const):
(WebCore::CSSCalcValue::computeLengthPx const):
(WebCore::CSSCalcValue::isCalcFunction):
(WebCore::CSSCalcValue::dump const):
(WebCore::CSSCalcValue::create):
(WebCore::operator<<):

  • css/calc/CSSCalcValue.h: Added.
  • css/parser/CSSPropertyParserHelpers.cpp:
  • platform/CalculationValue.cpp: Removed.
  • platform/CalculationValue.h: Removed.
  • platform/Length.cpp:
  • platform/calc: Added.
  • platform/calc/CalcExpressionBlendLength.cpp: Added.

(WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength):
(WebCore::CalcExpressionBlendLength::evaluate const):
(WebCore::CalcExpressionBlendLength::operator== const):
(WebCore::CalcExpressionBlendLength::dump const):

  • platform/calc/CalcExpressionBlendLength.h: Added.

(WebCore::operator==):

  • platform/calc/CalcExpressionInversion.cpp: Added.

(WebCore::CalcExpressionInversion::evaluate const):
(WebCore::CalcExpressionInversion::dump const):
(WebCore::CalcExpressionInversion::operator== const):
(WebCore::operator==):

  • platform/calc/CalcExpressionInversion.h: Added.
  • platform/calc/CalcExpressionLength.cpp: Added.

(WebCore::CalcExpressionLength::evaluate const):
(WebCore::CalcExpressionLength::operator== const):
(WebCore::CalcExpressionLength::dump const):

  • platform/calc/CalcExpressionLength.h: Added.

(WebCore::CalcExpressionLength::CalcExpressionLength):
(WebCore::operator==):

  • platform/calc/CalcExpressionNegation.cpp: Added.

(WebCore::CalcExpressionNegation::evaluate const):
(WebCore::CalcExpressionNegation::operator== const):
(WebCore::CalcExpressionNegation::dump const):
(WebCore::operator==):

  • platform/calc/CalcExpressionNegation.h: Added.
  • platform/calc/CalcExpressionNode.cpp: Added.

(WebCore::operator<<):

  • platform/calc/CalcExpressionNode.h: Added.

(WebCore::CalcExpressionNode::type const):
(WebCore::CalcExpressionNode::CalcExpressionNode):

  • platform/calc/CalcExpressionNumber.cpp: Added.

(WebCore::CalcExpressionNumber::evaluate const):
(WebCore::CalcExpressionNumber::dump const):
(WebCore::CalcExpressionNumber::operator== const):

  • platform/calc/CalcExpressionNumber.h: Added.

(WebCore::CalcExpressionNumber::CalcExpressionNumber):
(WebCore::operator==):

  • platform/calc/CalcExpressionOperation.cpp: Added.

(WebCore::CalcExpressionOperation::evaluate const):
(WebCore::CalcExpressionOperation::operator== const):
(WebCore::operator==):
(WebCore::CalcExpressionOperation::dump const):

  • platform/calc/CalcExpressionOperation.h: Added.

(WebCore::CalcExpressionOperation::CalcExpressionOperation):

  • platform/calc/CalcOperator.cpp: Added.

(WebCore::operator<<):

  • platform/calc/CalcOperator.h: Added.
  • platform/calc/CalculationCategory.cpp: Added.

(WebCore::operator<<):

  • platform/calc/CalculationCategory.h: Added.
  • platform/calc/CalculationValue.cpp: Added.

(WebCore::CalculationValue::create):
(WebCore::CalculationValue::CalculationValue):
(WebCore::CalculationValue::evaluate const):
(WebCore::operator==):
(WebCore::operator<<):

  • platform/calc/CalculationValue.h: Added.

(WebCore::CalculationValue::shouldClampToNonNegative const):
(WebCore::CalculationValue::expression const):

  • style/StyleBuilderConverter.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/CalculationValue.cpp:

Update test to include additonal header now needed.

4:29 PM Changeset in webkit [278245] by Cameron McCormack
  • 14 edits in trunk

Rename Internals.mainThreadScrollingReasons to synchronousScrollingReasons
https://bugs.webkit.org/show_bug.cgi?id=226415

Reviewed by Simon Fraser.

Source/WebCore:

Brings the name into accordance with the term the C++ code uses.

  • testing/Internals.cpp:

(WebCore::Internals::synchronousScrollingReasons const):

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

LayoutTests:

  • compositing/layer-creation/fixed-position-in-view-dynamic.html:
  • compositing/layer-creation/fixed-position-no-content-scroll-reason-expected.txt:
  • compositing/layer-creation/fixed-position-no-content-scroll-reason.html:
  • compositing/layer-creation/fixed-position-out-of-view-dynamic.html:
  • compositing/layer-creation/fixed-position-out-of-view-scroll-reason.html:
  • compositing/layer-creation/no-compositing-for-fixed-position-under-transform.html:
  • tiled-drawing/scrolling/slow-scrolling-background-toggle.html:
  • tiled-drawing/scrolling/slow-scrolling-hidden-background-toggle.html:
  • tiled-drawing/scrolling/slow-scrolling.html:
3:08 PM Changeset in webkit [278244] by Darin Adler
  • 85 edits in trunk

Clients of optional should use has_value instead of relying on hasValue macro
https://bugs.webkit.org/show_bug.cgi?id=226395

Reviewed by Chris Dumez.

Source/JavaScriptCore:

  • bytecompiler/NodesCodegen.cpp:

(JSC::RegExpNode::emitBytecode): Don't use hasValue.

Source/WebCore:

In some files we are touching, moved from Optional to std::optional, but doing
that consistently in files we are not otherwise modifying is out of scope here.

In some places, use has_value instead of hasValue. In others, improved further
by not using has_value explicitly when it's clearer to do so. Wasn't 100%
consistent about that, but did aim to cover 100% of the hasValue call sites.

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::create): Don't use hasValue.

  • Modules/webxr/WebXRFrame.cpp:

(WebCore::WebXRFrame::getViewerPose): Ditto.
(WebCore::WebXRFrame::getPose): Ditto.

  • Modules/webxr/WebXRGamepad.cpp:

(WebCore::WebXRGamepad::WebXRGamepad): Ditto.

  • Modules/webxr/WebXRInputSource.cpp:

(WebCore::WebXRInputSource::requiresInputSourceChange): Use has_value.

  • bindings/js/DOMPromiseProxy.h:

(WebCore::DOMPromiseProxy<IDLType>::isFulfilled const): Ditto.
(WebCore::DOMPromiseProxy<IDLUndefined>::isFulfilled const): Ditto.
(WebCore::DOMPromiseProxyWithResolveCallback<IDLType>::isFulfilled const): Ditto.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneDeserializer::readTerminal): Ditto.

  • css/CSSFontFaceSet.cpp:

(WebCore::CSSFontFaceSet::addToFacesLookupTable): Removed unneeded double check
of optional value. !x and !x.has_value() check the same thing.
(WebCore::CSSFontFaceSet::remove): Ditto.
(WebCore::CSSFontFaceSet::fontFace): Simplified code with extra local variables
to use an idiom that does not use hasValue. Since using *, ->, or value() on an
optional already asserts, there is no need to explicitly assert in the caller.

  • css/CSSGradientValue.cpp:

(WebCore::GradientStop::isSpecified const): Use has_value.

  • css/CSSSegmentedFontFace.cpp:

(WebCore::CSSSegmentedFontFace::fontRanges): Removed unneeded calls to hasValue.

  • css/FontFace.cpp:

(WebCore::FontFace::family const): Use has_value.
(WebCore::FontFace::style const): Ditto.
(WebCore::FontFace::weight const): Ditto.
(WebCore::FontFace::stretch const): Ditto.
(WebCore::FontFace::unicodeRange const): Ditto.
(WebCore::FontFace::featureSettings const): Ditto.
(WebCore::FontFace::display const): Ditto.

  • css/parser/CSSSelectorParser.cpp:

(WebCore::consumeANPlusB): Ditto.

  • display/css/DisplayStyle.h: Ditto.
  • dom/DataTransferItemList.h: Ditto.
  • dom/Document.cpp:

(WebCore::Document::updateHighlightPositions): Ditto.

  • dom/EventTarget.cpp:

(WebCore::EventTarget::addEventListener): Ditto.

  • editing/AlternativeTextController.cpp:

(WebCore::AlternativeTextController::hasPendingCorrection const): Ditto.

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::applyInlineStyle): Don't call hasValue.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::captionDisplayMode): Ditto.

  • html/ImageBitmap.h: Ditto.
  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::setScreenSizeOverride): Use has_value.

  • layout/LayoutPhase.cpp:

(WebCore::Layout::PhaseScope::PhaseScope): Ditto.

  • layout/formattingContexts/inline/InlineContentBreaker.cpp:

(WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const): Ditto.

  • layout/formattingContexts/inline/InlineLine.h: Ditto.
  • loader/CrossOriginPreflightResultCache.cpp:

(WebCore::parseAccessControlMaxAge): Ditto.

  • page/EventHandler.cpp:

(WebCore::EventHandler::defaultWheelEventHandler): Ditto.

  • page/ios/ContentChangeObserver.cpp:

(WebCore::ContentChangeObserver::StyleChangeScope::~StyleChangeScope): Ditto.

  • page/scrolling/ScrollSnapOffsetsInfo.cpp:

(WebCore::closestSnapOffsetWithInfoAndAxis): Ditto.

  • platform/ScrollController.cpp:

(WebCore::ScrollController::adjustScrollDestination): Don't use hasValue.

  • platform/cocoa/SystemBattery.mm:

(WebCore::systemHasBattery): Use has_value.
(WebCore::systemHasAC): Use has_value.

  • platform/graphics/Gradient.h: Ditto.
  • platform/graphics/ImageSource.h: Ditto.
  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::wouldTaintOrigin const): Changed idiom to not use hasValue.

  • platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:

(setGLContext): Do not use hasValue.

  • platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:

(WebCore::GStreamerRegistryScanner::ElementFactories::hasElementForMediaType const): Ditto.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::playbackPosition const): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::performTaskAtMediaTime): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::triggerRepaint): Ditto.

  • platform/graphics/gstreamer/eme/CDMProxyThunder.cpp:

(WebCore::CDMProxyThunder::getDecryptionSession const): Use has_value.

  • platform/graphics/gstreamer/eme/CDMThunder.cpp:

(WebCore::ParsedResponseMessage::hasType const): Use has_value.
(WebCore::CDMInstanceSessionThunder::cdmInstanceThunder const): Use
a pointer for the erturn value instead of Optional<&>. This hasn't
compiled since we switched to std::optional so I suspect this code is
not compiled by EWS or the buildbot.

  • platform/graphics/gstreamer/eme/CDMThunder.h: Updated to match above.
  • platform/graphics/gstreamer/mse/AppendPipeline.cpp:

(WebCore::AppendPipeline::parseDemuxerSrcPadCaps): Use value_or.
(WebCore::AppendPipeline::appsinkCapsChanged): Do not use has_value.

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

(WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected): Ditto.

  • platform/graphics/transforms/TransformState.h: Use has_value.
  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(WebCore::supportsPictureInPicture): Ditto.

  • platform/mac/NSScrollerImpDetails.mm:

(WebCore::ScrollerStyle::recommendedScrollerStyle): Ditto.

  • platform/network/ResourceRequestBase.cpp:

(WebCore::ResourceRequestBase::isSystemPreview const): Ditto.

  • platform/xr/openxr/OpenXRInputSource.cpp:

(PlatformXR::OpenXRInputSource::getInputSource const): Ditto.

  • rendering/EventRegion.h: Ditto.
  • rendering/GridTrackSizingAlgorithm.h: Remove unnecessary assertion, since

the * operator already does the assertion.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::canComputePercentageFlexBasis): Use has_value.

  • rendering/RenderListItem.cpp:

(WebCore::RenderListItem::setExplicitValue): Ditto.

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::systemFocusRingColor): Ditto.

  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::removeAnonymousWrappersForInlineChildrenIfNeeded): Ditto.

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::createSVGTransformFromMatrix): Changed idiom to not
call hasValue.

  • svg/SVGTransform.h: Ditto.
  • testing/WebFakeXRDevice.cpp:

(WebCore::WebFakeXRDevice::setViews): Ditto.

Source/WebDriver:

  • socket/SessionHostSocket.cpp:

(WebDriver::SessionHost::isConnected const): Use has_value.

Source/WebKit:

  • Platform/IPC/ArgumentCoders.h: Use std::optional; there was no hasValue

in here and I edited it by mistake, but we want to do this eventually.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm: Removed using namespace WebCore.

(IPC::ArgumentCoder<Ref<WebCore::Font>>::decodePlatformData): Use has_value.

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

(WebKit::XPCServiceInitializerDelegate::getClientSDKVersion): Ditto.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::decodeImage): Changed idiom to not call hasValue.
(IPC::ArgumentCoder<Ref<Font>>::decode): Ditto.

  • Shared/mac/MediaFormatReader/MediaFormatReader.cpp:

(WebKit::MediaFormatReader::finishParsing): Use has_value.
(WebKit::MediaFormatReader::copyProperty): Ditto.
(WebKit::MediaFormatReader::copyTrackArray): Ditto.

  • Shared/win/WebCoreArgumentCodersWin.cpp:

(IPC::ArgumentCoder<Ref<Font>>::decodePlatformData): Do not call hasValue.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration encodeWithCoder:]): Changed idiom to not use hasValue.

  • UIProcess/API/glib/InputMethodFilter.cpp:

(WebKit::InputMethodFilter::setState): Use has_value.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::AutomationCommandError::toProtocolString): Changed idiom to not use hasValue.

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:

(WebKit::WebPasteboardProxy::determineDataOwner const): Use has_value.

  • UIProcess/Inspector/socket/RemoteInspectorClient.cpp:

(WebKit::RemoteInspectorClient::sendWebInspectorEvent): Changed idiom to not use hasValue.

  • UIProcess/glib/UserMediaPermissionRequestManagerProxyGLib.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::platformValidateUserMediaRequestConstraints): Ditto.

  • WebProcess/GPU/media/MediaSourcePrivateRemote.cpp:

(WebKit::MediaSourcePrivateRemote::addSourceBuffer): Use has_value.

  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::platformDidReceiveLoadParameters): Ditto.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::notifyPreferencesChanged): Changed idiom to not
call hasValue.

Source/WTF:

  • wtf/Hasher.h: Use has_value.
  • wtf/Optional.h: Remove hasValue macro. Not needed any more, but also a bit

dangerous because of how widespread the use of hasValue is for things other
than WTF::Optional.

Tools:

  • TestWebKitAPI/Tests/WebCore/CBORReaderTest.cpp: Use has_value.
  • TestWebKitAPI/Tests/WebCore/CBORWriterTest.cpp: Ditto.
  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitPolicyClient.cpp: Ditto.
  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:

(AudioRenderingWebViewTest::handleStart): Ditto.

  • WebKitTestRunner/GeolocationProviderMock.cpp:

(WTR::GeolocationProviderMock::setPosition): Ditto.

  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView canPerformAction:withSender:]): Ditto.

2:14 PM Changeset in webkit [278243] by Chris Dumez
  • 6 edits in trunk/Source/JavaScriptCore

Stop using UncheckedLock in JSC::SamplingProfiler
https://bugs.webkit.org/show_bug.cgi?id=226414

Reviewed by Darin Adler.

Stop using UncheckedLock in JSC::SamplingProfiler as it is being phased out in favor of Lock,
which supports clang thread safety analysis.

  • heap/Heap.cpp:

(JSC::visitSamplingProfiler):

  • inspector/agents/InspectorScriptProfilerAgent.cpp:

(Inspector::InspectorScriptProfilerAgent::startTracking):
(Inspector::InspectorScriptProfilerAgent::trackingComplete):
(Inspector::InspectorScriptProfilerAgent::stopSamplingWhenDisconnecting):

  • runtime/JSGlobalObject.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::createThreadIfNecessary):
(JSC::SamplingProfiler::timerLoop):
(JSC::SamplingProfiler::takeSample):
(JSC::SamplingProfiler::processUnverifiedStackTraces):
(JSC::SamplingProfiler::start):
(JSC::SamplingProfiler::startWithLock):
(JSC::SamplingProfiler::pause):
(JSC::SamplingProfiler::noticeCurrentThreadAsJSCExecutionThreadWithLock):
(JSC::SamplingProfiler::noticeCurrentThreadAsJSCExecutionThread):
(JSC::SamplingProfiler::noticeJSLockAcquisition):
(JSC::SamplingProfiler::noticeVMEntry):
(JSC::SamplingProfiler::clearData):
(JSC::SamplingProfiler::releaseStackTraces):
(JSC::SamplingProfiler::stackTracesAsJSON):
(JSC::SamplingProfiler::reportTopFunctions):
(JSC::SamplingProfiler::reportTopBytecodes):

  • runtime/SamplingProfiler.h:

(JSC::SamplingProfiler::WTF_RETURNS_LOCK):
(JSC::SamplingProfiler::WTF_REQUIRES_LOCK):

2:09 PM Changeset in webkit [278242] by Chris Dumez
  • 2 edits in trunk/Source/JavaScriptCore

Stop using UncheckedLock in JSC::dumpJITMemory()
https://bugs.webkit.org/show_bug.cgi?id=226413

Reviewed by Darin Adler.

Stop using UncheckedLock in JSC::dumpJITMemory() as it is being phased out in favor of Lock,
which supports Clang thread safety analysis.

  • jit/ExecutableAllocator.cpp:

(JSC::dumpJITMemory):

2:08 PM Changeset in webkit [278241] by Chris Dumez
  • 4 edits in trunk/Source/JavaScriptCore

Stop using UncheckedLock in JSC::WasmCalleeRegistry
https://bugs.webkit.org/show_bug.cgi?id=226412

Reviewed by Darin Adler.

Stop using UncheckedLock in JSC::WasmCalleeRegistry, as it is being phased out in favor of
Lock, which supports Clang thread safety analysis.

  • runtime/SamplingProfiler.cpp:

(JSC::FrameWalker::FrameWalker):
(JSC::FrameWalker::recordJITFrame):
(JSC::CFrameWalker::CFrameWalker):
(JSC::SamplingProfiler::takeSample):

  • wasm/WasmCalleeRegistry.h:

(JSC::Wasm::CalleeRegistry::WTF_RETURNS_LOCK):
(JSC::Wasm::CalleeRegistry::WTF_REQUIRES_LOCK):
(JSC::Wasm::CalleeRegistry::getLock): Deleted.
(JSC::Wasm::CalleeRegistry::isValidCallee): Deleted.

  • wasm/WasmFaultSignalHandler.cpp:

(JSC::Wasm::trapHandler):

9:59 AM Changeset in webkit [278240] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

VM::isTerminationException() should only be run on a non-null exception value.
https://bugs.webkit.org/show_bug.cgi?id=226417
rdar://78646170

Reviewed by Filip Pizlo.

  • jsc.cpp:

(runInteractive):

6:38 AM Changeset in webkit [278239] by Alan Bujtas
  • 9 edits
    2 adds in trunk

[LFC][TFC] Do not include vertical spacing when resolving percent height for table content
https://bugs.webkit.org/show_bug.cgi?id=226365

Source/WebCore:

Reviewed by Antti Koivisto.

<table style="height: 100px; border-spacing: 10px;"><tr><td style="height: 100%"></td></tr></table>
The <td>'s 100% height is resolved against 100px - (2 * 10px) -> 80px;

Test: fast/layoutformattingcontext/table-with-percent-columns-and-spacing.html

  • layout/formattingContexts/table/TableFormattingContext.cpp:

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

  • layout/formattingContexts/table/TableFormattingContext.h:
  • layout/formattingContexts/table/TableFormattingGeometry.cpp:

(WebCore::Layout::TableFormattingGeometry::TableFormattingGeometry):
(WebCore::Layout::TableFormattingGeometry::computedCellBorder const):

  • layout/formattingContexts/table/TableFormattingGeometry.h:

(WebCore::Layout::TableFormattingGeometry::formattingContext const):

  • layout/formattingContexts/table/TableFormattingQuirks.cpp:

(WebCore::Layout::TableFormattingQuirks::heightValueOfNearestContainingBlockWithFixedHeight const):

  • layout/formattingContexts/table/TableFormattingQuirks.h:

(WebCore::Layout::TableFormattingQuirks::formattingContext const):

LayoutTests:

Reviewed by Antti Koivisto.

  • TestExpectations: WebKit table layout don't resolve the height percent properly when border spacing is present.
  • fast/layoutformattingcontext/table-with-percent-columns-and-spacing-expected.html: Added.
  • fast/layoutformattingcontext/table-with-percent-columns-and-spacing.html: Added.
5:12 AM Changeset in webkit [278238] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

[LFC] Transition containing block for loops to range loops
https://bugs.webkit.org/show_bug.cgi?id=226315

Reviewed by Antti Koivisto.

Add support for stayWithin.

  • layout/floats/FloatingContext.cpp:

(WebCore::Layout::FloatingContext::mapTopLeftToFloatingStateRoot const):

  • layout/formattingContexts/FormattingGeometry.cpp:

(WebCore::Layout::FormattingGeometry::computedHeightValue const):

  • layout/formattingContexts/block/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider):

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::isDescendantOf const):

  • layout/layouttree/LayoutBox.h:
  • layout/layouttree/LayoutContainingBlockChainIterator.h:

(WebCore::Layout::LayoutContainingBlockChainIteratorAdapter::begin):
(WebCore::Layout::LayoutContainingBlockChainIteratorAdapter::end):
(WebCore::Layout::LayoutContainingBlockChainIterator::LayoutContainingBlockChainIterator):
(WebCore::Layout::LayoutContainingBlockChainIteratorAdapter::LayoutContainingBlockChainIteratorAdapter):
(WebCore::Layout::containingBlockChain):

3:09 AM Changeset in webkit [278237] by Adrian Perez de Castro
  • 3 edits in trunk/Source/JavaScriptCore

Non-unified build fixes, late-ish May 2021 edition redux
https://bugs.webkit.org/show_bug.cgi?id=226401

Unreviewed non-unified build fixes.

  • jit/JITSizeStatistics.cpp: Add missing LinkBuffer.h header.
  • jit/JITSizeStatistics.h: Add missing CCallHelpers.h and wtf/text/WTFString.h headers;

remove unneeded CCallHelpers forward declaration.

Note: See TracTimeline for information about the timeline view.