Timeline



Dec 7, 2021:

11:27 PM Changeset in webkit [286645] by mmaxfield@apple.com
  • 2 edits in trunk/Source/ThirdParty/ANGLE

[MacCatalyst] Fix build after r286603
https://bugs.webkit.org/show_bug.cgi?id=233977

Unreviewed.

Previously, TARGET_OS_IOS and TARGET_OS_MACCATALYST were never on at the same time.
Now, they're on at the same time, and ANGLE doesn't expect that. This patch turns
off TARGET_OS_IOS when TARGET_OS_MACCATALYST is on, just to get ANGLE to build.
The long-term fix is to either update all the sites to use correct macros, or to
use the ANGLE_PLATFORM_* defines instead.

  • src/common/platform.h:
10:43 PM Changeset in webkit [286644] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Add logging to RealtimeOutgoingVideoSource creation
https://bugs.webkit.org/show_bug.cgi?id=233929

Reviewed by Eric Carlson.

This will allow to identify when trying to start sending video.
No change of behavior.

  • platform/mediastream/RealtimeOutgoingVideoSource.cpp:

(WebCore::RealtimeOutgoingVideoSource::RealtimeOutgoingVideoSource):
(WebCore::RealtimeOutgoingVideoSource::setSource):

10:34 PM Changeset in webkit [286643] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

[Model] Only expose APIs on the IDL interface when the feature is enabled
https://bugs.webkit.org/show_bug.cgi?id=233942

Reviewed by Dean Jackson.

  • Modules/model-element/HTMLModelElement.idl:
10:28 PM Changeset in webkit [286642] by graouts@webkit.org
  • 5 edits in trunk/Source/WebCore

ActiveDOMObject::suspendIfNeeded() should not be called in the WebAnimation constructor
https://bugs.webkit.org/show_bug.cgi?id=233932

Reviewed by Chris Dumez.

It is not safe to call ActiveDOMObject::suspendIfNeeded() in a constructor. Since WebAnimation has several subclasses
(DeclarativeAnimation, and then CSSTransition and CSSAnimation deriving from DeclarativeAnimation) each with their own
create() methods, we add a new protected initialize() method which refactors code from the WebAnimation constructor
and is called from the two WebAnimation::create() methods.

DeclarativeAnimation already had an initialize method for common setup for the create() methods in CSSTransition and
CSS Animation, so we can simply call WebAnimation::initialize() from DeclarativeAnimation::initialize() and this guarantees
all create() methods for WebAnimation and all of its subclasses are correctly calling ActiveDOMObject::suspendIfNeeded().

  • animation/DeclarativeAnimation.cpp:

(WebCore::DeclarativeAnimation::initialize):

  • animation/DeclarativeAnimation.h:
  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::create):
(WebCore::WebAnimation::initialize):
(WebCore::WebAnimation::WebAnimation):

  • animation/WebAnimation.h:
9:30 PM Changeset in webkit [286641] by Aditya Keerthi
  • 17 edits in trunk

[iOS] Add initial support for find-in-page SPI
https://bugs.webkit.org/show_bug.cgi?id=233915
rdar://86140501

Reviewed by Wenson Hsieh.

Source/WebKit:

Expose new find-in-page SPI for use by clients.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView selectedTextRange]):
(-[WKWebView offsetFromPosition:toPosition:inDocument:]):
(-[WKWebView performTextSearchWithQueryString:usingOptions:resultAggregator:]):
(-[WKWebView decorateFoundTextRange:inDocument:usingStyle:]):
(-[WKWebView clearAllDecoratedFoundText]):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::findRectsForStringMatches):
(WebKit::WebPageProxy::hideFindIndicator):

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

(-[WKContentView offsetFromPosition:toPosition:]):

The implementation here is needed to determine the relative ordering of
two search results.

(-[WKContentView performTextSearchWithQueryString:usingOptions:resultAggregator:]):

Call into the WebProcess to perform the search, and asynchronously
mark the search as complete.

A search result is represented as a WKFoundTextRange, and contains
two pieces of information.

  1. A rect – so that clients can determine whether or not the result is visible.
  1. An index – to allow for highlighting of a result and to enable determining relative ordering between two results.

(-[WKContentView decorateFoundTextRange:usingStyle:]):
(-[WKContentView clearAllDecoratedFoundText]):
(+[WKFoundTextRange foundTextRangeWithRect:index:]):
(-[WKFoundTextRange start]):
(-[WKFoundTextRange end]):
(-[WKFoundTextRange isEmpty]):
(+[WKFoundTextPosition textPositionWithIndex:]):

  • WebProcess/WebPage/FindController.cpp:

(WebKit::FindController::findString):

Prevent Editor from revealing the selection on all platforms, as the
existing call to didFindString is now responsible for revealing
selection on all platforms.

(WebKit::FindController::findRectsForStringMatches):

Gather rects for all search results and return them to the UIProcess.

(WebKit::FindController::indicateFindMatch):

This method was previously unused on iOS, and required some changes
to work correctly.

Wrap the call to select the current match with calls to
{will|did}FindString to account for iOS specific selection behavior.
See the existing comment in didFindString for more details.

No behavior change on other platforms, since willFindString is empty,
and didFindString now reveals the selection.

(WebKit::FindController::didFindString):

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

(WebKit::WebPage::findRectsForStringMatches):
(WebKit::WebPage::hideFindIndicator):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Added two new WebPage messages.

  1. findRectsForStringMatches returns an vector of string match rects for use in the UIProcess.
  1. Expose hideFindIndicator via IPC so that the UIProcess can hide the indicator without dismissing the overlay entirely.

Source/WTF:

  • wtf/PlatformHave.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:

(-[TestSearchAggregator initWithCompletionHandler:]):
(-[TestSearchAggregator foundRange:forSearchString:inDocument:]):
(-[TestSearchAggregator finishedSearching]):
(TEST):

Added an API test to verify that search results are found correctly.

8:24 PM Changeset in webkit [286640] by Wenson Hsieh
  • 33 edits
    9 adds in trunk

Add support for navigator.requestCookieConsent() behind a disabled feature flag
https://bugs.webkit.org/show_bug.cgi?id=233890
rdar://86117718

Reviewed by Darin Adler.

Source/WebCore:

Add plumbing to support a new (internal-for-the-time-being) navigator API, requestCookieConsent(). This
returns a promise indicating whether or not the user (or the UA, on behalf of the user) consents to usage of
cookies that are not strictly necessary for page performance.

Paired with this web-facing API, we also introduce corresponding private WKUIDelegate methods that are invoked
as a result of calling navigator.requestCookieConsent();, which a WebKit embedder may implement in order to
present UI or otherwise respond appropriately to the request. See WebKit ChangeLog for more details.

Tests: CookieConsent.BasicDecisionHandler

CookieConsent.NotEnabled
CookieConsent.ThrowsExceptionWithoutDelegate

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Headers.cmake:
  • Modules/cookie-consent/CookieConsentDecisionResult.h: Added.
  • Modules/cookie-consent/Navigator+CookieConsent.idl: Added.
  • Modules/cookie-consent/NavigatorCookieConsent.cpp: Added.

Add a new partial interface on Navigator that implements the new API by calling into the chrome client hook (see
WebKit changes for more details). Note that in the case where the consent delegate method is not implemented by
the client, we will reject the promise with a NotSupportedError.

(WebCore::NavigatorCookieConsent::requestCookieConsent):
(WebCore::NavigatorCookieConsent::from):

  • Modules/cookie-consent/NavigatorCookieConsent.h: Added.

(WebCore::RequestCookieConsentOptions::RequestCookieConsentOptions):

  • Modules/cookie-consent/RequestCookieConsentOptions.h: Added.
  • Modules/cookie-consent/RequestCookieConsentOptions.idl: Added.
  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp:
  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.h:

Add some missing includes to fix the unified source build on Windows.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • loader/EmptyClients.cpp:

(WebCore::EmptyChromeClient::requestCookieConsent):

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

Source/WebKit:

Add plumbing for an async requestCookieConsent() method on ChromeClient that plumbs through the WebKit2 client
layer, into a new private (for the time being) UI delegate method. If the new delegate method is not implemented
(or there is no UI delegate at all), we immediately invoke the decision handler with a result of NotSupported,
allowing us to reject the promise with a NotSupportedError.

See WebCore ChangeLog for more details.

  • UIProcess/API/APIUIClient.h:

(API::UIClient::requestCookieConsent):

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

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::requestCookieConsent):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::requestCookieConsent):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::requestCookieConsent):

  • WebProcess/WebCoreSupport/WebChromeClient.h:

Source/WebKitLegacy/mac:

Add an implementation stub for the new chrome client hook, requestCookieConsent().

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

(WebChromeClient::requestCookieConsent):

Source/WebKitLegacy/win:

Add an implementation stub for the new chrome client hook, requestCookieConsent().

  • WebCoreSupport/WebChromeClient.cpp:

(WebChromeClient::requestCookieConsent):

  • WebCoreSupport/WebChromeClient.h:

Source/WTF:

Add the new feature flag (off by default). Note that this is also only an internal feature flag for the time
being (rather than an experimental feature flag), such that it cannot (yet) be turned on by non-Apple internal
users.

  • Scripts/Preferences/WebPreferencesInternal.yaml:

Tools:

Add several new API tests that enable the feature flag and exercise the API.

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

(-[CookieConsentDelegate _webView:requestCookieConsentWithMoreInfoHandler:decisionHandler:]):
(TestWebKitAPI::createWebViewForTestingCookieConsent):
(TestWebKitAPI::checkForString):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/cookie-consent-basic.html: Added.
7:59 PM Changeset in webkit [286639] by sbarati@apple.com
  • 6 edits
    3 adds in trunk

TypedArray prototype set should go down the fast path when using non clamped integer types of the same byte size
https://bugs.webkit.org/show_bug.cgi?id=233905

Reviewed by Keith Miller.

JSTests:

  • microbenchmarks/typed-array-prototype-set.js: Added.
  • microbenchmarks/typed-array-prototype-set-order.js: Added.
  • stress/typed-array-prototype-set.js: Added.

Source/JavaScriptCore:

We can use memmove in this scenario because the bitpattern of the
data between the signed and unsigned values will be the same.

This patch also fixes a bug where we were looking at the wrong
pointer when determining to do a forward or backwards loop in
our memmove. We were looking at the vector instead of vector+offset.

  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::set):

LayoutTests:

  • js/script-tests/typedarray-set-overlapping-elements-of-same-size.js:
  • js/typedarray-set-overlapping-elements-of-same-size-expected.txt:
6:49 PM Changeset in webkit [286638] by ysuzuki@apple.com
  • 3 edits in trunk/Source/ThirdParty/ANGLE

Unreviewed, these files are modified after building ANGLE
https://bugs.webkit.org/show_bug.cgi?id=220896
<rdar://problem/73539682>

  • src/libANGLE/renderer/metal/shaders/mtl_default_shaders_src_autogen.inc:
  • src/libANGLE/renderer/metal/shaders/mtl_default_shaders_src_autogen.metal:
6:11 PM Changeset in webkit [286637] by Cameron McCormack
  • 4 edits in trunk/Source/WebCore

Remove expandAroundIdeographs static variables
https://bugs.webkit.org/show_bug.cgi?id=233750

Reviewed by Myles Maxfield.

With OffscreenCanvas, we can call into
ComplexTextController::adjustGlyphsAndAdvances,
FontCascade::expansionOpportunityCountInternal, and
WidthIterator::calculateAdditionalWidth from worker threads.
These all have a static variable variable with an initializer
that calls FontCascade::canExpandAroundIdeographsInComplexText,
and such initializers are not safe under -fno-threadsafe-statics.

canExpandAroundIdeographsInComplexText is a simple enough function in
all ports (it just returns a constant bool) that it's not worth caching
the result in a static.

  • platform/graphics/ComplexTextController.cpp:

(WebCore::ComplexTextController::adjustGlyphsAndAdvances):

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::expansionOpportunityCountInternal):

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::calculateAdditionalWidth const):

6:09 PM Changeset in webkit [286636] by Lauro Moura
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Avoid noisy Wcomment warnings after ANGLE update in r286603
https://bugs.webkit.org/show_bug.cgi?id=233964

Unreviewed warning removal.

  • src/compiler/translator/tree_util/IntermTraverse.h:
5:43 PM Changeset in webkit [286635] by Ross Kirsling
  • 8 edits in trunk/Source/JavaScriptCore

[JSC] Add LLInt IC for try_get_by_id of own cacheable value
https://bugs.webkit.org/show_bug.cgi?id=233830

Reviewed by Yusuke Suzuki.

This patch adds an LLInt IC for the "own cacheable value" path of try_get_by_id;
this is the simplest case and basically the same as get_by_id_direct.

Performance is neutral with JIT enabled as well as on current uses of try_get_by_id in JSC
(e.g. hasObservableSideEffectsForRegexpSplit), but microbenchmarks of try_get_by_id itself see a 2x speedup:

Before After

try-get-by-id-polymorphic 123.8361+-0.4562 61.7586+-0.3770 definitely 2.0052x faster
try-get-by-id-basic 124.4437+-0.6091 61.0340+-0.1924 definitely 2.0389x faster

<geometric> 124.1207+-0.3130 61.3865+-0.2019 definitely 2.0220x faster

  • bytecode/BytecodeList.rb:
  • bytecode/CodeBlock.cpp:
  • bytecode/GetByStatus.cpp:
  • llint/LLIntSlowPaths.cpp:
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
5:35 PM Changeset in webkit [286634] by Cameron McCormack
  • 3 edits in trunk/Source/WebCore

Move shouldAutoActivateFontIfNeeded knownFamilies cache to FontCache
https://bugs.webkit.org/show_bug.cgi?id=233749

Reviewed by Myles Maxfield.

With OffscreenCanvas, we can call shouldAutoActivateFontIfNeeded on a
worker thread, and the knownFamilies HashSet is not thread safe. Also,
the AtomStrings it stores are thread-specific. Move it to FontCache, so
each thread has its own set.

  • platform/graphics/FontCache.h:
  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::FontCache::shouldAutoActivateFontIfNeeded):
(WebCore::shouldAutoActivateFontIfNeeded): Deleted.

5:32 PM Changeset in webkit [286633] by Yousuke.Kimoto@sony.com
  • 2 edits in trunk/Tools

[webkitcorepy] Fail to install python module when a working directory is not on C drive on Windows
https://bugs.webkit.org/show_bug.cgi?id=233936

Reviewed by Jonathan Bedard.

On Windows, autoinstall.py installs python modules to C drive even if
your working directory is on other drive (e.g. D drive). To install
python modules correctly on Windows, a drive letter where your working
directory exists needs to be given to "--root" option of "setup.py"
in autoinstall.py.

  • Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:

(Package.install): Added root_location to detect a right drive letter to isntall modules on Windows.

4:55 PM Changeset in webkit [286632] by Devin Rousso
  • 40 edits in trunk/Source

Add a DOMPasteAccessCategory to control which pasteboard the WebProcess is granted access to when pasting
https://bugs.webkit.org/show_bug.cgi?id=233939

Reviewed by Wenson Hsieh.

Implementing -pasteFont: <https://webkit.org/b/191379> requires that we read from the font
pasteboard instead of the general pasteboard. In order to allow web content to trigger this
(e.g. document.execCommand("PasteFont"))) we must have a way for the WebProcess to signal
that it wishes to read from the font pasteboard instead of the general pasteboard. As such,
create and pass along a DOMPasteAccessCategory to requestDOMPasteAccess.

No change in behavior.

Source/WebCore:

  • dom/DOMPasteAccess.h:

Create DOMPasteAccessCategory.

  • page/EditorClient.h:
  • page/Frame.h:
  • page/Frame.cpp:

(WebCore::Frame::requestDOMPasteAccess):

  • loader/EmptyClients.cpp:

(WebCore::EmptyEditorClient::requestDOMPasteAccess):
Pass along the DOMPasteAccessCategory.

Source/WebKit:

  • Scripts/webkit/messages.py:

(headers_for_type):
Indicate which header is associated with DOMPasteAccessCategory.

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

(-[WKDOMPasteMenuDelegate initWithWebViewImpl:pasteAccessCategory:]): Added.
(-[WKDOMPasteMenuDelegate menuDidClose:]):
(-[WKDOMPasteMenuDelegate _web_grantDOMPasteAccess]): Added.
(WebKit::WebViewImpl::handleProcessSwapOrExit):
(WebKit::pasteboardNameForAccessCategory): Added.
(WebKit::pasteboardForAccessCategory): Added.
(WebKit::WebViewImpl::requestDOMPasteAccess):
(WebKit::WebViewImpl::handleDOMPasteRequestForCategoryWithResult):
(WebKit::WebViewImpl::hideDOMPasteMenuWithResult): Added.
(-[WKDOMPasteMenuDelegate initWithWebViewImpl:]): Deleted.
(WebKit::WebViewImpl::handleDOMPasteRequestWithResult): Deleted.

  • UIProcess/API/mac/WKView.mm:

(-[WKView _web_grantDOMPasteAccess]): Deleted.

  • UIProcess/API/mac/WKWebViewMac.mm:

(-[WKWebView _web_grantDOMPasteAccess]): Deleted.
Pass the DOMPasteAccessCategory to the WKDOMPasteMenuDelegate and use it as the target
of the NSMenuItem so that we can pass along the DOMPasteAccessCategory in the action.

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

(-[WKContentView cleanUpInteraction]):
(-[WKContentView resignFirstResponderForWebView]):
(-[WKContentView _webTouchEventsRecognized:]):
(-[WKContentView _willHideMenu:]):
(-[WKContentView pasteForWebView:]):
(pasteboardNameForAccessCategory): Added.
(pasteboardForAccessCategory): Added.
(-[WKContentView _hidePasteMenuWithResult:]): Added.
(-[WKContentView _handleDOMPasteRequestForCategory:result:]): Added.
(-[WKContentView _willPerformAction:sender:]):
(-[WKContentView _didPerformAction:sender:]):
(-[WKContentView handleKeyWebEvent:withCompletionHandler:]):
(-[WKContentView _requestDOMPasteAccessForCategory:elementRect:originIdentifier:completionHandler:]): Added.
(-[WKContentView _handleDOMPasteRequestWithResult:]): Deleted.
(-[WKContentView _requestDOMPasteAccessWithElementRect:originIdentifier:completionHandler:]): Deleted.

  • UIProcess/PageClient.h:
  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::requestDOMPasteAccess):

  • UIProcess/API/wpe/PageClientImpl.h:
  • UIProcess/API/wpe/PageClientImpl.cpp:

(WebKit::PageClientImpl::requestDOMPasteAccess):

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

(WebKit::PageClientImpl::requestDOMPasteAccess):

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

(WebKit::PageClientImpl::requestDOMPasteAccess):

  • UIProcess/playstation/PageClientImpl.h:
  • UIProcess/playstation/PageClientImpl.cpp:

(WebKit::PageClientImpl::requestDOMPasteAccess):

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

(WebKit::PageClientImpl::requestDOMPasteAccess):

  • WebProcess/WebCoreSupport/WebEditorClient.h:
  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::requestDOMPasteAccess):

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

(WebKit::WebPage::requestDOMPasteAccess):
Pass along the DOMPasteAccessCategory.

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

(WebKit::pasteAccessCategoryForCommand): Added.
(WebKit::WebPageProxy::executeEditCommand):
(WebKit::WebPageProxy::requestDOMPasteAccess):
(WebKit::WebPageProxy::willPerformPasteCommand):
(WebKit::isPasteCommandName): Deleted.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::willPerformPasteCommand):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::willPerformPasteCommand)
Create a mapping between paste command name and DOMPasteAccessCategory.

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebEditorClient.h:

(WebEditorClient::requestDOMPasteAccess):

Source/WebKitLegacy/win:

  • WebCoreSupport/WebEditorClient.h:

(WebEditorClient::requestDOMPasteAccess):

4:44 PM Changeset in webkit [286631] by Simon Fraser
  • 2 edits in trunk/Source/WebKit

[Scroll Momentum Generator] Pages lose ability to momentum scroll after dragging between displays
https://bugs.webkit.org/show_bug.cgi?id=233948
rdar://86110813

Reviewed by Tim Horton.

This is a conservative fix for the bug. When a view moves to a new screen, WebPageProxy
needs to unregister for full speed updates using the old displayID, and register
using the new one.

Longer term, it would be better if "full speed updates" was a per-observer concept,
but that would mean registering an observer while wheel events are being received,
which needs a bit more thought.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::windowScreenDidChange):

4:40 PM Changeset in webkit [286630] by Devin Rousso
  • 7 edits
    1 copy
    1 add in trunk

Add helper methods to WebCore::FontShadow for serializing to CSS and converting to NSShadow
https://bugs.webkit.org/show_bug.cgi?id=233938

Source/WebCore:

Implementing -pasteFont: <https://webkit.org/b/191379> requires that we convert native
font attribute data into objects understandable by WebCore, one of which is a NSShadow.
These helpers will make it easier to parse the NSShadow and convert it to a CSS value that
we will use to override the selection's CSS text-shadow.

No change in behavior.

Reviewed by Wenson Hsieh.

Tests: FontShadow.InvalidColor

FontShadow.NoOffsetOrBlurRadius
FontShadow.NoOffset
FontShadow.NegativeOffset
FontShadow.NoBlurRadius
FontShadow.NegativeBlurRadius
FontShadow.AllNegative

  • editing/FontShadow.h:
  • editing/FontShadow.cpp: Added.

(WebCore::serializationForCSS):

  • editing/cocoa/FontShadowCocoa.mm:

(WebCore::fontShadowFromNSShadow): Added.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:

Tools:

Reviewed by Wenson Hsieh.

  • TestWebKitAPI/Tests/WebCore/FontShadowTests.cpp: Added.

(TestWebKitAPI::TEST.FontShadow.InvalidColor):
(TestWebKitAPI::TEST.FontShadow.NoOffsetOrBlurRadius):
(TestWebKitAPI::TEST.FontShadow.NoOffset):
(TestWebKitAPI::TEST.FontShadow.NegativeOffset):
(TestWebKitAPI::TEST.FontShadow.NoBlurRadius):
(TestWebKitAPI::TEST.FontShadow.NegativeBlurRadius):
(TestWebKitAPI::TEST.FontShadow.AllNegative):

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
4:24 PM Changeset in webkit [286629] by Jonathan Bedard
  • 2 edits in trunk/Tools

[commits.webkit.org] Fallback to remote repository (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=233904
<rdar://problem/86131927>

Reviewed by Dewei Zhu.

  • CISupport/ews-build/steps.py:

(PushCommitToWebKitRepo.evaluateCommand): Wait before querying commits.webkit.org

4:22 PM Changeset in webkit [286628] by yoshiaki.jitsukawa@sony.com
  • 7 edits
    5 adds in trunk

Support Animated JPEG-XL images
https://bugs.webkit.org/show_bug.cgi?id=233545
<rdar://problem/86077143>

Reviewed by Don Olmstead.

Source/WebCore:

Implement relevant API, such as frameCount() and support a positive
frame index for frameBufferAtIndex().

Introduce a query to count frames because JPEG XL code stream itself doesn't have frame
count metadata and we need to scan the code stream to the last frame.

Also introduce the Size query instead of the onlySize parameter of the decode() function.

With the DecodeImage query, the decoder decodes a single frame. To
specify which frame to decode, we make use of the JxlDecoderRewind()
and JxlDecoderSkipFrames() functions of libjxl.

To omit rewind and skip as much as possible, we record the query to
m_lastQuery and use it in shouldRewind().

Test: fast/images/animated-jpegxl-loop-count.html

  • platform/image-decoders/jpegxl/JPEGXLImageDecoder.cpp:

(WebCore::JPEGXLImageDecoder::~JPEGXLImageDecoder):
(WebCore::JPEGXLImageDecoder::frameCount const):
(WebCore::JPEGXLImageDecoder::repetitionCount const):
(WebCore::JPEGXLImageDecoder::frameBufferAtIndex):
(WebCore::JPEGXLImageDecoder::clearFrameBufferCache):
(WebCore::JPEGXLImageDecoder::setFailed):
(WebCore::JPEGXLImageDecoder::tryDecodeSize):
(WebCore::JPEGXLImageDecoder::hasAlpha const):
(WebCore::JPEGXLImageDecoder::hasAnimation const):
(WebCore::JPEGXLImageDecoder::ensureDecoderInitialized):
(WebCore::JPEGXLImageDecoder::shouldRewind const):
(WebCore::JPEGXLImageDecoder::rewind):
(WebCore::JPEGXLImageDecoder::updateFrameCount):
(WebCore::JPEGXLImageDecoder::decode):
(WebCore::JPEGXLImageDecoder::processInput):
(WebCore::JPEGXLImageDecoder::imageOut):
(WebCore::JPEGXLImageDecoder::clear): Deleted.

  • platform/image-decoders/jpegxl/JPEGXLImageDecoder.h:

LayoutTests:

Add test for animated JPEG XL, based on animated-gif-loop-count.

  • TestExpectations:
  • fast/images/animated-jpegxl-loop-count-expected.html: Added.
  • fast/images/animated-jpegxl-loop-count.html: Added.
  • fast/images/resources/animated-red-green-blue-repeat-1.jxl: Added.
  • fast/images/resources/animated-red-green-blue-repeat-2.jxl: Added.
  • fast/images/resources/animated-red-green-blue-repeat-infinite.jxl: Added.
  • platform/glib/TestExpectations:
  • platform/wincairo/TestExpectations:
4:06 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
4:01 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
3:36 PM Changeset in webkit [286627] by Robert Jenner
  • 2 edits in trunk/LayoutTests

REGRESSION(iOS 14): svg/W3C-I18N/tspan-direction-rtl.svg is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=217258

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
3:33 PM Changeset in webkit [286626] by Robert Jenner
  • 2 edits in trunk/LayoutTests

REGRESSION(iOS 14): svg/W3C-I18N/tspan-direction-rtl.svg is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=217258

Unreviewed test gardening. iOS 15 rebaseline.

  • platform/ios/svg/W3C-I18N/tspan-direction-rtl-expected.txt:
3:33 PM Changeset in webkit [286625] by Cameron McCormack
  • 40 edits in trunk/Source

Move FontCache singleton and instance on WorkerGlobalScope to ThreadGlobalData
https://bugs.webkit.org/show_bug.cgi?id=233747

Reviewed by Darin Adler.

Source/WebCore:

There are various places in font code where we need access to a
FontCache instance. Currently we:

  • assume that we're on the main thread and call FontCache::singleton(), or
  • get a FontCache off WorkerGlobalScope and pass it down (or store it) where it's needed, then pass it to fontCacheFallingBackToSingleton.

Having to thread through, or store, the FontCache pointer is
inconvenient, and there are some places where we don't have access to
a FontCache pointer, but we're on a worker, and we call
fontCacheFallingBackToSingleton and incorrectly get back the main
thread's instance.

I think it would be cleaner if we moved both the main thread FontCache
singleton, and the one stored on a WorkerGlobalScope, to
ThreadGlobalData, which is easily globally accessible. Performing a
TLS lookup is cheap these days.

  • css/CSSFontFace.h:
  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::font):
(WebCore::CSSFontFace::fontCacheFallingBackToSingleton):
Remove fontCacheFallingBackToSingleton and replace calls to it with
FontCache::forCurrentThread.

  • css/CSSFontFaceSet.cpp:

(WebCore::CSSFontFaceSet::ensureLocalFontFacesForFamilyRegistered):
Replace getting the FontCache from the ScriptExecutionContext with a
call to FontCache::forCurrentThread.

  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::load):
(WebCore::CSSFontFaceSource::font):

  • editing/cocoa/FontAttributeChangesCocoa.mm:

(WebCore::FontChanges::platformFontFamilyNameForCSS const):

  • inspector/agents/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::getSupportedSystemFontFamilyNames):

  • page/MemoryRelease.cpp:

(WebCore::releaseNoncriticalMemory):

  • page/ProcessWarming.cpp:

(WebCore::ProcessWarming::prewarmGlobally):
(WebCore::ProcessWarming::collectPrewarmInformation):
(WebCore::ProcessWarming::prewarmWithInformation):

  • page/SettingsBase.cpp:

(WebCore::invalidateAfterGenericFamilyChange):
Replace calls to FontCache::singleton with calls to
FontCache::forCurrentThread.

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

(WebCore::CSSFontSelector::CSSFontSelector):
(WebCore::CSSFontSelector::~CSSFontSelector):
(WebCore::CSSFontSelector::fontRangesForFamily):
(WebCore::CSSFontSelector::fallbackFontAt):
Remove CSSFontSelector::m_fontCache and use
FontCache::forCurrentThread instead. For the CSSFontSelector
destructor, we call forCurrentThreadIfNotDestroyed since it
can run after ThreadGlobalData::destroy has been called for
a worker, and we don't want to cause a fresh FontCache object to be
created at this point.

  • dom/ScriptExecutionContext.h:
  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::fontCache):
Remove the FontCache member.

  • platform/ThreadGlobalData.h:

(WebCore::ThreadGlobalData::ThreadGlobalData::cachedResourceRequestInitiators):
(WebCore::ThreadGlobalData::ThreadGlobalData::eventNames):
(WebCore::ThreadGlobalData::ThreadGlobalData::qualifiedNameCache):
(WebCore::ThreadGlobalData::ThreadGlobalData::mimeTypeRegistryThreadGlobalData):
(WebCore::ThreadGlobalData::ThreadGlobalData::fontCache):
(WebCore::ThreadGlobalData::ThreadGlobalData::fontCacheIfNotDestroyed):

  • platform/ThreadGlobalData.cpp:

(WebCore::ThreadGlobalData::destroy):
(WebCore::ThreadGlobalData::initializeFontCache):
Add accessors for a lazily created FontCache. Also record whether
destroy has been called on the ThreadGlobalData so that
fontCacheIfNotDestroyed can check it, and the other lazy object
creation methods can assert destroy hasn't been called yet.

  • platform/graphics/Font.h:
  • platform/graphics/Font.cpp:

(WebCore::Font::create):
(WebCore::Font::Font):
(WebCore::Font::systemFallbackFontForCharacter const):

  • platform/graphics/FontCache.cpp:

(WebCore::FontCache::fontForPlatformData):

  • workers/WorkerFontLoadRequest.cpp:

(WebCore::WorkerFontLoadRequest::createFont):
Remove FontCache arguments and use FontCache::forCurrentThread in
their place.

  • platform/graphics/FontCache.cpp:

(WebCore::FontCache::create): Removed.
(WebCore::FontCache::singleton):
(WebCore::FontCache::forCurrentThread):
Replace FontCache::singleton with FontCache::forCurrentThread, which
looks up the FontCache on ThreadGlobalData.
(WebCore::FontCache::invalidateAllFontCaches):
New function that will in the future invalidate the main thread and
all worker thread FontCaches.

  • platform/graphics/FontCache.h:

Remove refcounting from FontCache since we no longer need to store a
strong reference to it on other objects.
(WebCore::FontCache::fontCacheFallingBackToSingleton): Deleted.

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::isCurrent const):
(WebCore::FontCascade::update const):
Call FontCache::forCurrentThread instead of getting it from the
FontSelector.

  • platform/graphics/FontCascadeFonts.cpp:

(WebCore::FontCascadeFonts::FontCascadeFonts):
(WebCore::realizeNextFallback):
(WebCore::FontCascadeFonts::realizeFallbackRangesAt):
(WebCore::FontCascadeFonts::glyphDataForSystemFallback):

  • platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:

(WebCore::FontCascade::fontForCombiningCharacterSequence const):
Use FontCache::forCurrentThread.

  • platform/graphics/FontSelector.h:

Remove fontCache method.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
(WebCore::fontWithFamilySpecialCase):
(WebCore::FontCache::prewarmGlobally):

  • platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:

(WebCore::FontFamilySpecificationCoreText::fontRanges const):

  • platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:

(WebCore::SystemFontDatabaseCoreText::systemFontParameters):

  • platform/graphics/mac/ComplexTextControllerCoreText.mm:

(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setShouldMockBoldSystemFontForAccessibility):
Use FontCache::forCurrentThread.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::invalidateFontCache):

  • testing/Internals.cpp:

(WebCore::Internals::invalidateFontCache):
Call the new FontCache::invalidateAllFontCaches.

  • platform/graphics/win/FontCacheWin.cpp:

(WebCore::getCJKCodePageMasks):
(WebCore::FontCache::systemFallbackForCharacters):
Use the FontCache instance we have access to rather than call
FontCache::singleton.

  • workers/WorkerGlobalScope.h:
  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::fontCache):
Remove the FontCache member and accessor.

Source/WebKit:

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::terminate):
Update existing main threa callers of FontCache::singleton() to use
FontCache::forCurrentThread().

Source/WebKitLegacy/mac:

  • Misc/WebCoreStatistics.mm:

(+[WebCoreStatistics cachedFontDataCount]):
(+[WebCoreStatistics cachedFontDataInactiveCount]):
(+[WebCoreStatistics purgeInactiveFontData]):
Update existing main thread callers of FontCache::singleton() to use
FontCache::forCurrentThread().

Source/WebKitLegacy/win:

  • WebCoreStatistics.cpp:

(WebCoreStatistics::cachedFontDataCount):
(WebCoreStatistics::cachedFontDataInactiveCount):
(WebCoreStatistics::purgeInactiveFontData):
Update existing main thread callers of FontCache::singleton() to use
FontCache::forCurrentThread().

2:51 PM Changeset in webkit [286624] by Ben Nham
  • 5 edits
    2 adds
    1 delete in trunk/Source/WebKit

webpushd should run with regular user permissions
https://bugs.webkit.org/show_bug.cgi?id=233844

Reviewed by Brady Eidson.

Currently webpushd runs as root, which is unneessary. This patch makes it so that we run
with regular user permissions. This is done by specifying a UserName in the launchd plist on
iOS and by installing the plist to /System/Library/LaunchAgents on Mac. Since the plists now
differ based on platform, I changed the "Copy Daemon Plists" build phase in the WebKit
target to copy the appropriate plist to either /S/L/LaunchDaemons or /S/L/LaunchAgents.

Additionally, webpushd needs the aps-connection-initiate or
com.apple.private.aps-connection-initiate to receive pushes from apsd on iOS and Mac
respectively, so I gave the daemon those entitlements.

Finally, webpushd now registers for the com.apple.aps.webkit.webpushd.incoming-push Mach
service so that it can be launched on demand in response to a push. Right now we just
bootstrap_check_in to the service at launch time, but eventually we'll remove that and
use APSConnection to check in to the service instead. Since the bootstrap_check_in
call is temporary, I chose not to make a header file in wtf/spi and declared the prototype
in the implementation file instead.

  • Configurations/webpushd.xcconfig:
  • Scripts/process-entitlements.sh:
  • WebKit.xcodeproj/project.pbxproj:
  • webpushd/WebPushDaemonMain.mm:

(WebKit::WebPushDaemonMain):

  • webpushd/com.apple.webkit.webpushd.ios.plist: Added.
  • webpushd/com.apple.webkit.webpushd.mac.plist: Added.
  • webpushd/com.apple.webkit.webpushd.plist: Removed.
2:31 PM Changeset in webkit [286623] by Jonathan Bedard
  • 6 edits in trunk/Tools

[commits.webkit.org] Fallback to remote repository (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=233904
<rdar://problem/86131927>

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/init.py: Bump version.
  • Tools/Scripts/libraries/reporelaypy/reporelaypy/checkout.py:

(Checkout.Encoder.default):
(Checkout.init): Allow user to specify a remote fallback repository.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/checkoutroute.py:

(CheckoutRoute.commit): If no commit is found, query the fallback repository.

  • Tools/Scripts/libraries/reporelaypy/run: Add --fallback option.
  • Tools/Scripts/libraries/reporelaypy/setup.py: Bump version.

Canonical link: https://commits.webkit.org/244936@main

2:27 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
2:26 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
2:25 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
2:22 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
2:17 PM Changeset in webkit [286622] by Russell Epstein
  • 2 edits in branches/safari-613.1.11-branch/Source/WebKit

Cherry-pick r286563. rdar://problem/86175400

REGRESSION (r286527): Three API tests crashing under WebKit::ProcessLauncher::launchProcess()
https://bugs.webkit.org/show_bug.cgi?id=233882
<rdar://problem/86111726>

Reviewed by Brent Fulgham.

Correct the eventHandler to capture the process name, rather than using a raw pointer to the character string.

  • UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm: (WebKit::ProcessLauncher::launchProcess):

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

2:06 PM Changeset in webkit [286621] by Russell Epstein
  • 2 edits in branches/safari-613.1.11-branch/Source/WebKit

Cherry-pick r286574. rdar://problem/86174696

Regression(r286505) imported/w3c/web-platform-tests/html/cross-origin-opener-policy/javascript-url.https.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=233874

Reviewed by Darin Adler.

r286505 fixed ProvisionalPageProxy so that ProvisionalPageProxy::m_provisionalLoadURL gets properly initialized when the
ProvisionalPageProxy gets constructed *after* the provisional load has already started (COOP proces-swap case). One side
effect of this though is that ProvisionalPageProxy::cancel() no longer returns early and will try to notify the client
that the provisional load failed, dereferencing m_mainFrame in doing so. In the event where the main frame has not yet
been created in the new provisional process, this would do a null-dereference of m_mainFrame.

To address the issue, we now early return in ProvisionalPageProxy::cancel() if m_isProcessSwappingOnNavigationResponse
is true (i.e. The ProvisionalPageProxy was created after the provisional load had started). In such situations, we
don't want to ProvisionalPageProxy to be the one notifying the client of the provisional load failure anyway. The reason
is that there is still a provisional load going on in the committed process/page.

No new tests, covered by existing test that is flakily crashing.

  • UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::cancel):

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

1:58 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
1:58 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
1:57 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
1:49 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
1:46 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
1:38 PM Changeset in webkit [286620] by Russell Epstein
  • 1 copy in tags/Safari-613.1.9.2

Tag Safari-613.1.9.2.

1:32 PM Changeset in webkit [286619] by Russell Epstein
  • 9 edits in branches/safari-613.1.9-branch/Source

Versioning.

WebKit-7613.1.9.2

1:20 PM Changeset in webkit [286618] by Russell Epstein
  • 1 copy in tags/Safari-613.1.10.2

Tag Safari-613.1.10.2.

1:20 PM Changeset in webkit [286617] by Russell Epstein
  • 1 delete in tags/Safari-613.1.10.2

Remove tag.

1:19 PM Changeset in webkit [286616] by Russell Epstein
  • 6 edits
    2 copies in branches/safari-613.1.10-branch/Source/WebKit

Cherry-pick r286564. rdar://problem/86052131

Put webpushd code in WebKit.framework.
https://bugs.webkit.org/show_bug.cgi?id=233886

Reviewed by Alex Christensen.

This fixes some build/mastering/linking issues.

  • Configurations/webpushd.xcconfig:
  • Shared/API/Cocoa/WKMain.h:
  • Shared/API/Cocoa/WKMain.mm: (WKWebPushDaemonMain):
  • WebKit.xcodeproj/project.pbxproj:
  • webpushd/WebPushDaemonMain.h: Copied from Source/WebKit/Shared/API/Cocoa/WKMain.mm.
  • webpushd/WebPushDaemonMain.mm: (WebKit::WebPushDaemonMain): (main): Deleted.
  • webpushd/webpushd.cpp: Copied from Source/WebKit/Shared/API/Cocoa/WKMain.mm. (main):

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

1:19 PM Changeset in webkit [286615] by Russell Epstein
  • 2 edits
    7 adds in branches/safari-613.1.10-branch/Source/WebKit

Cherry-pick r286533. rdar://problem/86052131

Add command line webpushtool for daemon development and debugging.
https://bugs.webkit.org/show_bug.cgi?id=233845

Reviewed by Tim Horton.

No behavior change.

This utility will eventually be quite fleshed out.

For now, it can act as a terminal that prints debug messages from webpushd.

  • Configurations/webpushtool.xcconfig: Added.
  • Resources/webpushtool.entitlements: Added.
  • WebKit.xcodeproj/project.pbxproj:
  • WebKit.xcodeproj/xcshareddata/xcschemes/webpushtool.xcscheme: Added.
  • webpushd/webpushtool/WebPushToolConnection.h: Added.
  • webpushd/webpushtool/WebPushToolConnection.mm: Added. (WebPushTool::Connection::create): (WebPushTool::maybeConnectToService): (WebPushTool::Connection::Connection): (WebPushTool::Connection::connectToService): (WebPushTool::Connection::startAction): (WebPushTool::Connection::startDebugStreamAction): (WebPushTool::Connection::sendAuditToken): (WebPushTool::Connection::connectionDropped): (WebPushTool::Connection::messageReceived):
  • webpushd/webpushtool/WebPushToolMain.mm: Added. (printUsageAndTerminate): (main):

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

1:19 PM Changeset in webkit [286614] by Russell Epstein
  • 22 edits
    1 copy in branches/safari-613.1.10-branch

Cherry-pick r286355. rdar://problem/86052131

Add WKWebsiteDataStore configuration option to enable Mock app bundle testing.
https://bugs.webkit.org/show_bug.cgi?id=233679

Reviewed by Tim Horton.

Source/WebKit:

Covered by API tests.

We're about to land actual implementations of app permissions bundles.
But the mock bundles still have a place for testing.
We need a way to switch between Mock and Native.

This patch takes the opportunity to plumb out a WebPushDaemonConnectionConfiguration object
that can easily be augmented in future patches to add new options without messing with messaging directly.

  • NetworkProcess/NetworkSession.h: (WebKit::NetworkSession::webpushdUsesMockBundlesForTesting const):
  • NetworkProcess/NetworkSessionCreationParameters.cpp: (WebKit::NetworkSessionCreationParameters::encode const): (WebKit::NetworkSessionCreationParameters::decode):
  • NetworkProcess/NetworkSessionCreationParameters.h:
  • NetworkProcess/Notifications/NetworkNotificationManager.cpp: (WebKit::NetworkNotificationManager::maybeSendConnectionConfiguration const): (WebKit::NetworkNotificationManager::sendMessage const): (WebKit::NetworkNotificationManager::sendMessageWithReply const): (WebKit::NetworkNotificationManager::maybeSendHostAppAuditToken const): Deleted.
  • NetworkProcess/Notifications/NetworkNotificationManager.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
  • Shared/WebPushDaemonConnectionConfiguration.h: Copied from Source/WebKit/Shared/WebPushDaemonConstants.h. (WebKit::WebPushD::WebPushDaemonConnectionConfiguration::encode const): (WebKit::WebPushD::WebPushDaemonConnectionConfiguration::decode):
  • Shared/WebPushDaemonConstants.h: (WebKit::WebPushD::messageTypeSendsReply):
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm: (-[_WKWebsiteDataStoreConfiguration webpushdUsesMockBundlesForTesting]): (-[_WKWebsiteDataStoreConfiguration setWebpushdUsesMockBundlesForTesting:]):
  • UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::parameters):
  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: (WebKit::WebsiteDataStoreConfiguration::copy const): (WebKit::WebsiteDataStoreConfiguration::webPushDaemonConnectionConfiguration const):
  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h: (WebKit::WebsiteDataStoreConfiguration::webpushdUsesMockBundlesForTesting const): (WebKit::WebsiteDataStoreConfiguration::setWebpushdUsesMockBundlesForTesting):
  • WebKit.xcodeproj/project.pbxproj:
  • webpushd/AppBundleRequest.mm: (WebPushD::AppBundleRequest::AppBundleRequest): (WebPushD::AppBundleRequest::start):
  • webpushd/PushClientConnection.h: (WebPushD::ClientConnection::hasHostAppAuditToken const): (WebPushD::ClientConnection::useMockBundlesForTesting const):
  • webpushd/PushClientConnection.mm: (WebPushD::ClientConnection::updateConnectionConfiguration): (WebPushD::ClientConnection::setHostAppAuditTokenData):
  • webpushd/WebPushDaemon.h:
  • webpushd/WebPushDaemon.mm: (WebPushD::Daemon::decodeAndHandleMessage): (WebPushD::Daemon::getOriginsWithPushAndNotificationPermissions): (WebPushD::Daemon::setDebugModeIsEnabled): (WebPushD::Daemon::updateConnectionConfiguration): (WebPushD::Daemon::setHostAppAuditToken): Deleted.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:

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

1:19 PM Changeset in webkit [286613] by Russell Epstein
  • 9 edits
    4 copies
    4 adds in branches/safari-613.1.10-branch

Cherry-pick r286273. rdar://problem/86052131

Make webpushd "fake registration for testing" much more complicated by adding a "mock app bundle" install
https://bugs.webkit.org/show_bug.cgi?id=233454

Reviewed by Alex Christensen.

Covered by API tests.

Before this patch, webpushd remembered "registrations" using a simple in-memory HashMap.

In the near future, registrations will actually be represented with a placeholder app bundle on disk.

The process of installing placeholders (and checking for existing ones) is complicated and asynchronous.

This patch shifts the in-memory testing implementation from a simple HashMap to a "complicated and asynchronous"
registration mechanism that simulates how app-bundle installs will work.

Once the "real" mechanisms are in place there will be much more in-depth testing that we can do.
For now, this is a "no behavior change" patch.

  • NetworkProcess/Notifications/Cocoa/WebPushDaemonConnectionCocoa.mm: (WebKit::WebPushD::Connection::connectionReceivedEvent const):
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • WebKit.xcodeproj/project.pbxproj:

"PushAppBundle" is an abstract base class for representing a placeholder application bundle for a registration.
Eventually there will be a native one for each platform that actually does system operations.
For now, the concrete implementation is the in-memory "Mock" app bundle.

  • webpushd/PushAppBundle.h: Copied from Source/WebKit/webpushd/PushClientConnection.h.
  • webpushd/PushAppBundle.mm: Copied from Source/WebKit/webpushd/PushClientConnection.h. (WebPushD::PushAppBundleClient::~PushAppBundleClient): (WebPushD::PushAppBundle::PushAppBundle): (WebPushD::PushAppBundle::~PushAppBundle): (WebPushD::PushAppBundle::detachFromClient):

An "AppBundleRequest" is a queable operation meant to do something with an "App bundle".
For now the operations are "create" and "delete"

  • webpushd/AppBundleRequest.h: Added. (WebPushD::AppBundleRequestImpl::AppBundleRequestImpl): (WebPushD::AppBundleRequestImpl::~AppBundleRequestImpl): (WebPushD::AppBundleRequestImpl::callCompletionHandlerAndCleanup): (WebPushD::AppBundlePermissionsRequest::AppBundlePermissionsRequest): (WebPushD::AppBundleDeletionRequest::AppBundleDeletionRequest):
  • webpushd/AppBundleRequest.mm: Added. (WebPushD::AppBundleRequest::AppBundleRequest): (WebPushD::AppBundleRequest::~AppBundleRequest): (WebPushD::AppBundleRequest::start): (WebPushD::AppBundleRequest::cancel): (WebPushD::AppBundleRequest::cleanupAfterCompletionHandler): (WebPushD::AppBundlePermissionsRequest::startInternal): (WebPushD::AppBundlePermissionsRequest::didCheckForExistingBundle): (WebPushD::AppBundlePermissionsRequest::didCreateAppBundle): (WebPushD::AppBundleDeletionRequest::startInternal): (WebPushD::AppBundleDeletionRequest::didDeleteExistingBundleWithError):
  • webpushd/MockAppBundleForTesting.h: Copied from Source/WebKit/webpushd/PushClientConnection.h. (WebPushD::MockAppBundleForTesting::create):
  • webpushd/MockAppBundleForTesting.mm: Added. (WebPushD::MockAppBundleForTesting::MockAppBundleForTesting): (WebPushD::MockAppBundleForTesting::~MockAppBundleForTesting): (WebPushD::MockAppBundleForTesting::checkForExistingBundle): (WebPushD::MockAppBundleForTesting::deleteExistingBundle): (WebPushD::MockAppBundleForTesting::createBundle): (WebPushD::MockAppBundleForTesting::stop):
  • webpushd/MockAppBundleRegistry.h: Copied from Source/WebKit/webpushd/PushClientConnection.h.
  • webpushd/MockAppBundleRegistry.mm: Added. (WebPushD::MockAppBundleRegistry::singleton): (WebPushD::MockAppBundleRegistry::getOriginsWithRegistrations): (WebPushD::MockAppBundleRegistry::doesBundleExist): (WebPushD::MockAppBundleRegistry::createBundle): (WebPushD::MockAppBundleRegistry::deleteBundle):
  • webpushd/PushClientConnection.h:
  • webpushd/PushClientConnection.mm: (WebPushD::ClientConnection::create): (WebPushD::ClientConnection::enqueueAppBundleRequest): (WebPushD::ClientConnection::maybeStartNextAppBundleRequest): (WebPushD::ClientConnection::didCompleteAppBundleRequest): (WebPushD::ClientConnection::connectionClosed):
  • webpushd/WebPushDaemon.h:
  • webpushd/WebPushDaemon.mm: (WebPushD::Daemon::connectionAdded): (WebPushD::Daemon::connectionRemoved): (WebPushD::Daemon::requestSystemNotificationPermission): (WebPushD::Daemon::getOriginsWithPushAndNotificationPermissions): (WebPushD::Daemon::deletePushAndNotificationRegistration):

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

1:17 PM Changeset in webkit [286612] by Russell Epstein
  • 1 copy in tags/Safari-613.1.10.2

Tag Safari-613.1.10.2.

12:51 PM Changeset in webkit [286611] by Razvan Caliman
  • 19 edits
    3 adds in trunk

Web Inspector: Support fuzzy matching in CSS completions
https://bugs.webkit.org/show_bug.cgi?id=230351
<rdar://82976292>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Use fuzzy matching for identifying CSS completions in the Styles details sidebar.

There are three main parts to this patch:

  1. Introduce WI.CSSQueryController with logic to do fuzzy matching on provided values.
  2. Change WI.CompletionSuggestionsView to support both plain strings and WI.QueryResults.
  3. Change WI.SpreadsheetTextField so its value doesn't always return its element.textContent.

With fuzzy matching, completions are not guaranteed anymore to be prefixed with the query.
Therefore, it's no longer viable to rely on WI.SpreadsheetTextField.value being a concatenation of textContent of nodes within.

To adress this, there's now WI.SpreadsheetTextField._pendingValue which includes the prospective
completion regardless of whether the query is a completion prefix or at match at any other position.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/Setting.js:

Add a flag to enable the fuzzy matching feature.

  • UserInterface/Controllers/CSSQueryController.js: Added.

(WI.CSSQueryController):
(WI.CSSQueryController.prototype.addValues):
(WI.CSSQueryController.prototype.reset):
(WI.CSSQueryController.prototype.executeQuery):
(WI.CSSQueryController.prototype._findSpecialCharacterIndices):
Add a speclialized class to hold the logic for fuzzy matching of CSS properties and values.
It clones logic from WI.ResouceQueryController with adjustments specific to CSS; more to follow as the feature gets refined.

  • UserInterface/Main.html:
  • UserInterface/Models/CSSCompletions.js:

(WI.CSSCompletions):
(WI.CSSCompletions.prototype.addValues):
(WI.CSSCompletions.prototype.executeQuery):
Support both the current prefix matching approach as well as fuzzy matching.

  • UserInterface/Models/CSSKeywordCompletions.js:

(WI.CSSKeywordCompletions.forPartialPropertyName):
Opt into fuzzy matching when getting completions for property names and values.

  • UserInterface/Models/QueryResult.js:

(WI.QueryResult.prototype.get matches):

  • UserInterface/Test.html:
  • UserInterface/Views/CompletionSuggestionsView.css:

(.completion-suggestions-container > .item > .highlighted):
Highlight specific characters that matched in result identified by fuzzy matching.

  • UserInterface/Views/CompletionSuggestionsView.js:

(WI.CompletionSuggestionsView.prototype.selectNext):
(WI.CompletionSuggestionsView.prototype.selectPrevious):
(WI.CompletionSuggestionsView.prototype.update):
(WI.CompletionSuggestionsView.prototype.getCompletionText):
(WI.CompletionSuggestionsView.prototype._createHighlightedCompletionFragment):
Change WI.CompletionSuggestionsView to hold a list of completions,
either strings or WI.QueryResult, and return the appropriate completion text
instead of returning the textContent of the selected element.

WI.CompletionSuggestionsView is used elsewhere in the Console and Sources panel
so avoid impacting those consumers until they opt in to fuzzy matching as well.

  • UserInterface/Views/SettingsTabContentView.js:
  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype._handleNameChange):
(WI.SpreadsheetStyleProperty.prototype._handleValueChange):
(WI.SpreadsheetStyleProperty.prototype._nameCompletionDataProvider):
(WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
On change, get the value of the WI.SpreadsheetTextField instead of
the corresponding element's textContent.

  • UserInterface/Views/SpreadsheetTextField.js:

Introduced SpreadsheetTextField._completionPrefix to hold the query a user is typing.

Introduced SpreadsheetTextField._completionText to hold the completion text of the selected but
not yet applied completion. This replaces the previous behavior of concatenating the query and suggestionHint
because with fuzzy matching the completion isn't guaranteed to be prefixed with the query.

Introduced SpreadsheetTextField._pendingValue to hold the result of applying the selected
completion. This replaces the previous behavior of WI.SpreadsheetTextField._combineEditorElementChildren.

(WI.SpreadsheetTextField):
(WI.SpreadsheetTextField.prototype.get value):
Change WI.SpreadsheetTextField so its value is divorced from its element's textContent.
While editing, WI.SpreadsheetTextField.value returns the pending value so that
a valid CSS string gets written to the stylesheet.

(WI.SpreadsheetTextField.prototype.set suggestionHint):
If the query is a prefix for the selected completion, keep the existing behavior of appending
the suggestion hint substring. Otherwise, hide the suggestion hint element because the
concatenation doesn't make sense.

(WI.SpreadsheetTextField.prototype.stopEditing):
(WI.SpreadsheetTextField.prototype.discardCompletion):
(WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion):
(WI.SpreadsheetTextField.prototype.completionSuggestionsClickedCompletion):
(WI.SpreadsheetTextField.prototype._discardChange):
(WI.SpreadsheetTextField.prototype._handleBlur):
(WI.SpreadsheetTextField.prototype._handleKeyDown):
(WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView):
(WI.SpreadsheetTextField.prototype._handleInput):
(WI.SpreadsheetTextField.prototype._updateCompletions):
(WI.SpreadsheetTextField.prototype._applyPendingValue):
After applying a completion, the value is replaced with WI.SpreadsheetTextField._pendingValue.
At this point, WI.SpreadsheetTextField.value and the textContent of the element converge.

(WI.SpreadsheetTextField.prototype._updatePendingValueWithCompletionText):
When presented with a completion, the query gets substituted with the full completion text in
WI.SpreadsheetTextField._pendingValue regardless of whether the query is a prefix or not.

(WI.SpreadsheetTextField.prototype._applyCompletionHint): Deleted.
(WI.SpreadsheetTextField.prototype._combineEditorElementChildren): Deleted.

LayoutTests:

Add test for WI.CSSQueryController to check fuzzy matching logic for CSS completions.
Follows prior example from LayoutTests/inspector/unit-tests/resource-query-controller.html
since WI.ResouceQueryController served as the model class that was adapted for CSS.

  • inspector/unit-tests/css-query-controller-expected.txt: Added.
  • inspector/unit-tests/css-query-controller.html: Added.
12:51 PM Changeset in webkit [286610] by Cameron McCormack
  • 2 edits in trunk/Websites/webkit.org

Puzzle feature detection followup
https://bugs.webkit.org/show_bug.cgi?id=233946

Unreviewed.

  • blog-files/wide-gamut-canvas/puzzle.html:
12:42 PM Changeset in webkit [286609] by Chris Dumez
  • 4 edits in trunk

ASSERTION FAILED: m_messagesBeingDispatched.isEmpty() on http/tests/resourceLoadStatistics/website-data-removal-for-site-with-user-interaction.html
https://bugs.webkit.org/show_bug.cgi?id=228164
<rdar://problem/80914914>

Reviewed by Darin Adler.

Source/WebKit:

dispatchMessagesAndResetDidScheduleDispatchMessagesForConnection() has an assertion to make sure that m_messagesBeingDispatched
was empty when getting called. However, in the case where there is a nested run loop, the call to
m_messagesBeingDispatched.takeFirst().dispatch() at the end of the function may cause the function to re-enter. When entering,
m_messagesBeingDispatched may not be empty so the assertion is wrong. Looking at the code, I think dropping the assertion is the
right thing to do as the implementation seems to be doing something sane upon re-entering. It will just append new messages to
m_messagesBeingDispatched and then try and dispatch them. Based on how it is implemented, message ordering would be preserved.

No new tests, unskipped existing test.

  • Platform/IPC/Connection.cpp:

(IPC::Connection::SyncMessageState::dispatchMessagesAndResetDidScheduleDispatchMessagesForConnection):

LayoutTests:

Unskip test that should no longer be crashing.

  • platform/ios-wk2/TestExpectations:
12:40 PM Changeset in webkit [286608] by Cameron McCormack
  • 2 edits in trunk/Websites/webkit.org

Tweak puzzle to use feature detection
https://bugs.webkit.org/show_bug.cgi?id=233946

Unreviewed.

  • blog-files/wide-gamut-canvas/puzzle.html:
12:33 PM Changeset in webkit [286607] by Russell Epstein
  • 9 edits in trunk/Source

Versioning.

WebKit-7613.1.12

12:29 PM Changeset in webkit [286606] by Russell Epstein
  • 6 edits
    2 copies in branches/safari-613.1.11-branch/Source/WebKit

Cherry-pick r286564. rdar://problem/86052131

Put webpushd code in WebKit.framework.
https://bugs.webkit.org/show_bug.cgi?id=233886

Reviewed by Alex Christensen.

This fixes some build/mastering/linking issues.

  • Configurations/webpushd.xcconfig:
  • Shared/API/Cocoa/WKMain.h:
  • Shared/API/Cocoa/WKMain.mm: (WKWebPushDaemonMain):
  • WebKit.xcodeproj/project.pbxproj:
  • webpushd/WebPushDaemonMain.h: Copied from Source/WebKit/Shared/API/Cocoa/WKMain.mm.
  • webpushd/WebPushDaemonMain.mm: (WebKit::WebPushDaemonMain): (main): Deleted.
  • webpushd/webpushd.cpp: Copied from Source/WebKit/Shared/API/Cocoa/WKMain.mm. (main):

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

12:16 PM WebKitGTK/GCCRequirement edited by clopez@igalia.com
(diff)
12:11 PM Changeset in webkit [286605] by Lauro Moura
  • 3 edits in trunk/Tools

[reporelaypy] Autoinstall missing lupa fakeredis dependency
https://bugs.webkit.org/show_bug.cgi?id=233934

Reviewed by Jonathan Bedard.

Using the same version as resultsdbpy. Avoids ImportErrors running the
webkitpy suite when they're not installed.

  • Scripts/libraries/reporelaypy/reporelaypy/init.py: Add lupa and

bump version.

  • Scripts/libraries/reporelaypy/setup.py: Bump version.
12:11 PM Changeset in webkit [286604] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Make WebLockRegistryProxy::processDidExit() return early if process never registered any locks
https://bugs.webkit.org/show_bug.cgi?id=233832

Reviewed by Darin Adler.

Make WebLockRegistryProxy::processDidExit() return early if process never registered any locks.
This avoids calling LocalWebLockRegistry::clientsAreGoingAway() (which can be expensive) in the
case we know for sure no locks were registered by this process.

  • UIProcess/WebLockRegistryProxy.cpp:

(WebKit::WebLockRegistryProxy::requestLock):
(WebKit::WebLockRegistryProxy::processDidExit):

  • UIProcess/WebLockRegistryProxy.h:
11:51 AM Changeset in webkit [286603] by dino@apple.com
  • 1370 edits
    615 adds
    262 deletes in trunk

Roll ANGLE to include upstreamed Metal backend
https://bugs.webkit.org/show_bug.cgi?id=220896
<rdar://problem/73539682>

Patch by Kyle Piddington <Kyle Piddington> on 2021-12-07
Reviewed by Ken Russell and Dean Jackson.

Source/ThirdParty/ANGLE:

Update ANGLE to ce854632690e505551414f80d01d864df6118882

The changelog has been intentionally deleted to preserve
readability

The following additional changes were made in the mergeup.

Update ShaderMtl get debug info to return translated source.

Fix crashes in webgl/2.0.y/conformance/extensions/webgl-compressed-texture-s3tc-srgb.html
Fix angle-instanced-arrays-out-of-bounds.html
Skip additional validation when primitive count in drawArraysInstanced is zero

Fix Clear-Invalidate-Render bug for multisample attachments.
Clearing a multisample texture, and then invalidating the render pass would lead
to the next pass not loading the cleared texture.

Fix exports and includes for egl_autogen.h files.

Fix webgl/2.0.0/deqp/functional/gles3/fboinvalidate/default.html
Add synchronization when reading pixels back from shared framebuffers

Source/WebCore:

Update ANGLE to ce854632690e505551414f80d01d864df6118882

Update OpenGL callsites to use the new
method names. Ideally, we should replace this with
a more robust function loader. For now, we call directly
into ANGLE's methods.

Fix exports and includes for egl_autogen.h files.

  • platform/graphics/angle/ANGLEHeaders.h:
  • platform/graphics/angle/ANGLEUtilities.h:

(WebCore::ScopedRestoreTextureBinding::ScopedRestoreTextureBinding):
(WebCore::ScopedRestoreTextureBinding::~ScopedRestoreTextureBinding):
(WebCore::ScopedBufferBinding::ScopedBufferBinding):
(WebCore::ScopedBufferBinding::~ScopedBufferBinding):
(WebCore::ScopedRestoreReadFramebufferBinding::bindFramebuffer):
(WebCore::ScopedRestoreReadFramebufferBinding::~ScopedRestoreReadFramebufferBinding):
(WebCore::ScopedPixelStorageMode::ScopedPixelStorageMode):
(WebCore::ScopedPixelStorageMode::~ScopedPixelStorageMode):
(WebCore::ScopedPixelStorageMode::pixelStore):
(WebCore::ScopedTexture::ScopedTexture):
(WebCore::ScopedTexture::~ScopedTexture):
(WebCore::ScopedFramebuffer::ScopedFramebuffer):
(WebCore::ScopedFramebuffer::~ScopedFramebuffer):
(WebCore::ScopedGLFence::reset):
(WebCore::ScopedGLFence::fenceSync):

  • platform/graphics/angle/ExtensionsGLANGLE.cpp:

(WebCore::ExtensionsGLANGLE::ensureEnabled):
(WebCore::ExtensionsGLANGLE::getTranslatedShaderSourceANGLE):
(WebCore::ExtensionsGLANGLE::initializeAvailableExtensions):
(WebCore::ExtensionsGLANGLE::drawBuffersEXT):
(WebCore::ExtensionsGLANGLE::getExtensions):

  • platform/graphics/angle/GraphicsContextGLANGLE.cpp:

(WebCore::GraphicsContextGLANGLE::releaseThreadResources):
(WebCore::GraphicsContextGLANGLE::readPixelsForPaintResults):
(WebCore::GraphicsContextGLANGLE::reshapeFBOs):
(WebCore::GraphicsContextGLANGLE::attachDepthAndStencilBufferIfNeeded):
(WebCore::GraphicsContextGLANGLE::resolveMultisamplingIfNecessary):
(WebCore::GraphicsContextGLANGLE::renderbufferStorage):
(WebCore::GraphicsContextGLANGLE::getIntegerv):
(WebCore::GraphicsContextGLANGLE::getShaderPrecisionFormat):
(WebCore::GraphicsContextGLANGLE::texImage2D):
(WebCore::GraphicsContextGLANGLE::texSubImage2D):
(WebCore::GraphicsContextGLANGLE::compressedTexImage2D):
(WebCore::GraphicsContextGLANGLE::compressedTexSubImage2D):
(WebCore::GraphicsContextGLANGLE::depthRange):
(WebCore::GraphicsContextGLANGLE::clearDepth):
(WebCore::GraphicsContextGLANGLE::readnPixelsImpl):
(WebCore::GraphicsContextGLANGLE::prepareTextureImpl):
(WebCore::GraphicsContextGLANGLE::reshape):
(WebCore::GraphicsContextGLANGLE::activeTexture):
(WebCore::GraphicsContextGLANGLE::attachShader):
(WebCore::GraphicsContextGLANGLE::bindAttribLocation):
(WebCore::GraphicsContextGLANGLE::bindBuffer):
(WebCore::GraphicsContextGLANGLE::bindFramebuffer):
(WebCore::GraphicsContextGLANGLE::bindRenderbuffer):
(WebCore::GraphicsContextGLANGLE::bindTexture):
(WebCore::GraphicsContextGLANGLE::blendColor):
(WebCore::GraphicsContextGLANGLE::blendEquation):
(WebCore::GraphicsContextGLANGLE::blendEquationSeparate):
(WebCore::GraphicsContextGLANGLE::blendFunc):
(WebCore::GraphicsContextGLANGLE::blendFuncSeparate):
(WebCore::GraphicsContextGLANGLE::bufferData):
(WebCore::GraphicsContextGLANGLE::bufferSubData):
(WebCore::GraphicsContextGLANGLE::getBufferSubData):
(WebCore::GraphicsContextGLANGLE::copyBufferSubData):
(WebCore::GraphicsContextGLANGLE::getInternalformativ):
(WebCore::GraphicsContextGLANGLE::renderbufferStorageMultisample):
(WebCore::GraphicsContextGLANGLE::texStorage2D):
(WebCore::GraphicsContextGLANGLE::texStorage3D):
(WebCore::GraphicsContextGLANGLE::texImage3D):
(WebCore::GraphicsContextGLANGLE::texSubImage3D):
(WebCore::GraphicsContextGLANGLE::compressedTexImage3D):
(WebCore::GraphicsContextGLANGLE::compressedTexSubImage3D):
(WebCore::GraphicsContextGLANGLE::getActiveUniforms):
(WebCore::GraphicsContextGLANGLE::checkFramebufferStatus):
(WebCore::GraphicsContextGLANGLE::clearColor):
(WebCore::GraphicsContextGLANGLE::clear):
(WebCore::GraphicsContextGLANGLE::clearStencil):
(WebCore::GraphicsContextGLANGLE::colorMask):
(WebCore::GraphicsContextGLANGLE::compileShader):
(WebCore::GraphicsContextGLANGLE::compileShaderDirect):
(WebCore::GraphicsContextGLANGLE::texImage2DDirect):
(WebCore::GraphicsContextGLANGLE::copyTexImage2D):
(WebCore::GraphicsContextGLANGLE::copyTexSubImage2D):
(WebCore::GraphicsContextGLANGLE::cullFace):
(WebCore::GraphicsContextGLANGLE::depthFunc):
(WebCore::GraphicsContextGLANGLE::depthMask):
(WebCore::GraphicsContextGLANGLE::detachShader):
(WebCore::GraphicsContextGLANGLE::disable):
(WebCore::GraphicsContextGLANGLE::disableVertexAttribArray):
(WebCore::GraphicsContextGLANGLE::drawArrays):
(WebCore::GraphicsContextGLANGLE::drawElements):
(WebCore::GraphicsContextGLANGLE::enable):
(WebCore::GraphicsContextGLANGLE::enableVertexAttribArray):
(WebCore::GraphicsContextGLANGLE::finish):
(WebCore::GraphicsContextGLANGLE::flush):
(WebCore::GraphicsContextGLANGLE::framebufferRenderbuffer):
(WebCore::GraphicsContextGLANGLE::framebufferTexture2D):
(WebCore::GraphicsContextGLANGLE::frontFace):
(WebCore::GraphicsContextGLANGLE::generateMipmap):
(WebCore::GraphicsContextGLANGLE::getActiveAttribImpl):
(WebCore::GraphicsContextGLANGLE::getActiveUniformImpl):
(WebCore::GraphicsContextGLANGLE::getAttachedShaders):
(WebCore::GraphicsContextGLANGLE::getAttribLocation):
(WebCore::GraphicsContextGLANGLE::moveErrorsToSyntheticErrorList):
(WebCore::GraphicsContextGLANGLE::getError):
(WebCore::GraphicsContextGLANGLE::getString):
(WebCore::GraphicsContextGLANGLE::hint):
(WebCore::GraphicsContextGLANGLE::isBuffer):
(WebCore::GraphicsContextGLANGLE::isEnabled):
(WebCore::GraphicsContextGLANGLE::isFramebuffer):
(WebCore::GraphicsContextGLANGLE::isProgram):
(WebCore::GraphicsContextGLANGLE::isRenderbuffer):
(WebCore::GraphicsContextGLANGLE::isShader):
(WebCore::GraphicsContextGLANGLE::isTexture):
(WebCore::GraphicsContextGLANGLE::lineWidth):
(WebCore::GraphicsContextGLANGLE::linkProgram):
(WebCore::GraphicsContextGLANGLE::pixelStorei):
(WebCore::GraphicsContextGLANGLE::polygonOffset):
(WebCore::GraphicsContextGLANGLE::sampleCoverage):
(WebCore::GraphicsContextGLANGLE::scissor):
(WebCore::GraphicsContextGLANGLE::shaderSource):
(WebCore::GraphicsContextGLANGLE::stencilFunc):
(WebCore::GraphicsContextGLANGLE::stencilFuncSeparate):
(WebCore::GraphicsContextGLANGLE::stencilMask):
(WebCore::GraphicsContextGLANGLE::stencilMaskSeparate):
(WebCore::GraphicsContextGLANGLE::stencilOp):
(WebCore::GraphicsContextGLANGLE::stencilOpSeparate):
(WebCore::GraphicsContextGLANGLE::texParameterf):
(WebCore::GraphicsContextGLANGLE::texParameteri):
(WebCore::GraphicsContextGLANGLE::uniform1f):
(WebCore::GraphicsContextGLANGLE::uniform1fv):
(WebCore::GraphicsContextGLANGLE::uniform2f):
(WebCore::GraphicsContextGLANGLE::uniform2fv):
(WebCore::GraphicsContextGLANGLE::uniform3f):
(WebCore::GraphicsContextGLANGLE::uniform3fv):
(WebCore::GraphicsContextGLANGLE::uniform4f):
(WebCore::GraphicsContextGLANGLE::uniform4fv):
(WebCore::GraphicsContextGLANGLE::uniform1i):
(WebCore::GraphicsContextGLANGLE::uniform1iv):
(WebCore::GraphicsContextGLANGLE::uniform2i):
(WebCore::GraphicsContextGLANGLE::uniform2iv):
(WebCore::GraphicsContextGLANGLE::uniform3i):
(WebCore::GraphicsContextGLANGLE::uniform3iv):
(WebCore::GraphicsContextGLANGLE::uniform4i):
(WebCore::GraphicsContextGLANGLE::uniform4iv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix2fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix3fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix4fv):
(WebCore::GraphicsContextGLANGLE::useProgram):
(WebCore::GraphicsContextGLANGLE::validateProgram):
(WebCore::GraphicsContextGLANGLE::vertexAttrib1f):
(WebCore::GraphicsContextGLANGLE::vertexAttrib1fv):
(WebCore::GraphicsContextGLANGLE::vertexAttrib2f):
(WebCore::GraphicsContextGLANGLE::vertexAttrib2fv):
(WebCore::GraphicsContextGLANGLE::vertexAttrib3f):
(WebCore::GraphicsContextGLANGLE::vertexAttrib3fv):
(WebCore::GraphicsContextGLANGLE::vertexAttrib4f):
(WebCore::GraphicsContextGLANGLE::vertexAttrib4fv):
(WebCore::GraphicsContextGLANGLE::vertexAttribPointer):
(WebCore::GraphicsContextGLANGLE::vertexAttribIPointer):
(WebCore::GraphicsContextGLANGLE::viewport):
(WebCore::GraphicsContextGLANGLE::createVertexArray):
(WebCore::GraphicsContextGLANGLE::deleteVertexArray):
(WebCore::GraphicsContextGLANGLE::isVertexArray):
(WebCore::GraphicsContextGLANGLE::bindVertexArray):
(WebCore::GraphicsContextGLANGLE::getBooleanv):
(WebCore::GraphicsContextGLANGLE::getBufferParameteri):
(WebCore::GraphicsContextGLANGLE::getFloatv):
(WebCore::GraphicsContextGLANGLE::getInteger64):
(WebCore::GraphicsContextGLANGLE::getInteger64i):
(WebCore::GraphicsContextGLANGLE::getFramebufferAttachmentParameteri):
(WebCore::GraphicsContextGLANGLE::getProgrami):
(WebCore::GraphicsContextGLANGLE::getProgramInfoLog):
(WebCore::GraphicsContextGLANGLE::getRenderbufferParameteri):
(WebCore::GraphicsContextGLANGLE::getShaderi):
(WebCore::GraphicsContextGLANGLE::getShaderInfoLog):
(WebCore::GraphicsContextGLANGLE::getTexParameterf):
(WebCore::GraphicsContextGLANGLE::getTexParameteri):
(WebCore::GraphicsContextGLANGLE::getUniformfv):
(WebCore::GraphicsContextGLANGLE::getUniformiv):
(WebCore::GraphicsContextGLANGLE::getUniformuiv):
(WebCore::GraphicsContextGLANGLE::getUniformLocation):
(WebCore::GraphicsContextGLANGLE::getVertexAttribOffset):
(WebCore::GraphicsContextGLANGLE::createBuffer):
(WebCore::GraphicsContextGLANGLE::createFramebuffer):
(WebCore::GraphicsContextGLANGLE::createProgram):
(WebCore::GraphicsContextGLANGLE::createRenderbuffer):
(WebCore::GraphicsContextGLANGLE::createShader):
(WebCore::GraphicsContextGLANGLE::createTexture):
(WebCore::GraphicsContextGLANGLE::deleteBuffer):
(WebCore::GraphicsContextGLANGLE::deleteFramebuffer):
(WebCore::GraphicsContextGLANGLE::deleteProgram):
(WebCore::GraphicsContextGLANGLE::deleteRenderbuffer):
(WebCore::GraphicsContextGLANGLE::deleteShader):
(WebCore::GraphicsContextGLANGLE::deleteTexture):
(WebCore::GraphicsContextGLANGLE::synthesizeGLError):
(WebCore::GraphicsContextGLANGLE::drawArraysInstanced):
(WebCore::GraphicsContextGLANGLE::drawElementsInstanced):
(WebCore::GraphicsContextGLANGLE::vertexAttribDivisor):
(WebCore::GraphicsContextGLANGLE::getUniformBlockIndex):
(WebCore::GraphicsContextGLANGLE::getActiveUniformBlockName):
(WebCore::GraphicsContextGLANGLE::uniformBlockBinding):
(WebCore::GraphicsContextGLANGLE::createQuery):
(WebCore::GraphicsContextGLANGLE::beginQuery):
(WebCore::GraphicsContextGLANGLE::endQuery):
(WebCore::GraphicsContextGLANGLE::getQueryObjectui):
(WebCore::GraphicsContextGLANGLE::createTransformFeedback):
(WebCore::GraphicsContextGLANGLE::deleteTransformFeedback):
(WebCore::GraphicsContextGLANGLE::isTransformFeedback):
(WebCore::GraphicsContextGLANGLE::bindTransformFeedback):
(WebCore::GraphicsContextGLANGLE::beginTransformFeedback):
(WebCore::GraphicsContextGLANGLE::endTransformFeedback):
(WebCore::GraphicsContextGLANGLE::transformFeedbackVaryings):
(WebCore::GraphicsContextGLANGLE::getTransformFeedbackVarying):
(WebCore::GraphicsContextGLANGLE::bindBufferBase):
(WebCore::GraphicsContextGLANGLE::blitFramebuffer):
(WebCore::GraphicsContextGLANGLE::framebufferTextureLayer):
(WebCore::GraphicsContextGLANGLE::invalidateFramebuffer):
(WebCore::GraphicsContextGLANGLE::invalidateSubFramebuffer):
(WebCore::GraphicsContextGLANGLE::readBuffer):
(WebCore::GraphicsContextGLANGLE::copyTexSubImage3D):
(WebCore::GraphicsContextGLANGLE::getFragDataLocation):
(WebCore::GraphicsContextGLANGLE::uniform1ui):
(WebCore::GraphicsContextGLANGLE::uniform2ui):
(WebCore::GraphicsContextGLANGLE::uniform3ui):
(WebCore::GraphicsContextGLANGLE::uniform4ui):
(WebCore::GraphicsContextGLANGLE::uniform1uiv):
(WebCore::GraphicsContextGLANGLE::uniform2uiv):
(WebCore::GraphicsContextGLANGLE::uniform3uiv):
(WebCore::GraphicsContextGLANGLE::uniform4uiv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix2x3fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix3x2fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix2x4fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix4x2fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix3x4fv):
(WebCore::GraphicsContextGLANGLE::uniformMatrix4x3fv):
(WebCore::GraphicsContextGLANGLE::vertexAttribI4i):
(WebCore::GraphicsContextGLANGLE::vertexAttribI4iv):
(WebCore::GraphicsContextGLANGLE::vertexAttribI4ui):
(WebCore::GraphicsContextGLANGLE::vertexAttribI4uiv):
(WebCore::GraphicsContextGLANGLE::drawRangeElements):
(WebCore::GraphicsContextGLANGLE::drawBuffers):
(WebCore::GraphicsContextGLANGLE::clearBufferiv):
(WebCore::GraphicsContextGLANGLE::clearBufferuiv):
(WebCore::GraphicsContextGLANGLE::clearBufferfv):
(WebCore::GraphicsContextGLANGLE::clearBufferfi):
(WebCore::GraphicsContextGLANGLE::deleteQuery):
(WebCore::GraphicsContextGLANGLE::isQuery):
(WebCore::GraphicsContextGLANGLE::getQuery):
(WebCore::GraphicsContextGLANGLE::createSampler):
(WebCore::GraphicsContextGLANGLE::deleteSampler):
(WebCore::GraphicsContextGLANGLE::isSampler):
(WebCore::GraphicsContextGLANGLE::bindSampler):
(WebCore::GraphicsContextGLANGLE::samplerParameteri):
(WebCore::GraphicsContextGLANGLE::samplerParameterf):
(WebCore::GraphicsContextGLANGLE::getSamplerParameterf):
(WebCore::GraphicsContextGLANGLE::getSamplerParameteri):
(WebCore::GraphicsContextGLANGLE::fenceSync):
(WebCore::GraphicsContextGLANGLE::isSync):
(WebCore::GraphicsContextGLANGLE::deleteSync):
(WebCore::GraphicsContextGLANGLE::clientWaitSync):
(WebCore::GraphicsContextGLANGLE::waitSync):
(WebCore::GraphicsContextGLANGLE::getSynci):
(WebCore::GraphicsContextGLANGLE::pauseTransformFeedback):
(WebCore::GraphicsContextGLANGLE::resumeTransformFeedback):
(WebCore::GraphicsContextGLANGLE::bindBufferRange):
(WebCore::GraphicsContextGLANGLE::getUniformIndices):
(WebCore::GraphicsContextGLANGLE::getActiveUniformBlockiv):
(WebCore::GraphicsContextGLANGLE::multiDrawArraysANGLE):
(WebCore::GraphicsContextGLANGLE::multiDrawArraysInstancedANGLE):
(WebCore::GraphicsContextGLANGLE::multiDrawElementsANGLE):
(WebCore::GraphicsContextGLANGLE::multiDrawElementsInstancedANGLE):
(WebCore::GraphicsContextGLANGLE::waitAndUpdateOldestFrame):

  • platform/graphics/angle/TemporaryANGLESetting.cpp:

(WebCore::TemporaryANGLESetting::TemporaryANGLESetting):
(WebCore::TemporaryANGLESetting::~TemporaryANGLESetting):

  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm:

(WebCore::GraphicsContextGLANGLE::GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLANGLE::~GraphicsContextGLANGLE):
(WebCore::GraphicsContextGLANGLE::bindDisplayBufferBacking):
(WebCore::GraphicsContextGLCocoa::attachIOSurfaceToSharedTexture):
(WebCore::GraphicsContextGLANGLE::prepareForDisplay):
(WebCore::GraphicsContextGLANGLE::readCompositedResults):

  • platform/graphics/cv/GraphicsContextGLCVCocoa.cpp:

(WebCore::GraphicsContextGLCVCocoa::~GraphicsContextGLCVCocoa):
(WebCore::GraphicsContextGLCVCocoa::GraphicsContextGLCVCocoa):
(WebCore::GraphicsContextGLCVCocoa::copyPixelBufferToTexture):

Tools:

Update script to take sources from main, instead of master.

  • Scripts/update-angle:

LayoutTests:

Update ANGLE to ce854632690e505551414f80d01d864df6118882

Update s3tc tests to adapt to new ANGLE validation
Update shaders-with-name-conflicts to pass, as it tests a valid
program.

  • webgl/1.0.3/resources/webgl_test_files/conformance/extensions/webgl-compressed-texture-s3tc.html:
  • webgl/1.0.3/resources/webgl_test_files/conformance/glsl/misc/shaders-with-name-conflicts.html:
  • webgl/2.0.0/resources/webgl_test_files/conformance/extensions/webgl-compressed-texture-s3tc-srgb.html:
  • webgl/2.0.0/resources/webgl_test_files/conformance/extensions/webgl-compressed-texture-s3tc.html:
  • webgl/2.0.0/resources/webgl_test_files/conformance/glsl/misc/shaders-with-name-conflicts.html:
  • webgl/pending/resources/webgl_test_files/conformance/context/context-attributes-alpha-depth-stencil-antialias.html:
  • webgl/resources/webgl_test_files/conformance/extensions/s3tc-and-rgtc.html:
  • webgl/resources/webgl_test_files/conformance/extensions/webgl-compressed-texture-s3tc-srgb.html:
11:35 AM Changeset in webkit [286602] by Chris Dumez
  • 8 edits in trunk/Source/WebKit

Reload web views when toggling the captive portal mode at system level
https://bugs.webkit.org/show_bug.cgi?id=233900

Reviewed by Brent Fulgham.

Reload web views when toggling the captive portal mode at system level, so that the views end up
being backed by WebProcesses with the proper captive portal mode.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::cachedCaptivePortalModeEnabledGlobally):
(WebKit::WebProcessPool::captivePortalModeStateChanged):
(WebKit::captivePortalModeEnabledBySystem):
(WebKit::WebProcessPool::notifyPreferencesChanged):

  • UIProcess/WebProcessPool.h:
11:33 AM Changeset in webkit [286601] by sihui_liu@apple.com
  • 29 edits
    1 add in trunk

Fetch and remove file system data via WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=233567
<rdar://problem/86029185>

Reviewed by Youenn Fablet.

Source/WebCore:

  • Modules/filesystemaccess/FileSystemStorageConnection.h:

Source/WebKit:

Introduce a new WebsiteDataType value FileSystem for FileSystemAccess data. Network process now can fetch and
delete this type of data when fetching and deleteing website data (if FileSystem type is included in target
types).

To track origins that have FileSystem data, this patch introduces a new file named origin in the origin's
directory. This file will be created when OriginStorageManager is created.

To delete existing FileSystem data, network process finds origins that are requested to be deleted and have data
on disk, closes active access handles, and deletes the files. The origin file mentioned above will be deleted if
there is no other file left in the same directory, and empty directories will be deleted.

New API tests: FileSystemAccess.FetchAndRemoveData

FileSystemAccess.RemoveDataByModificationTime
FileSystemAccess.FetchDataForThirdParty

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::monitoredDataTypes):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::registrableDomainsWithWebsiteData):

  • NetworkProcess/storage/FileSystemStorageHandle.h:

(WebKit::FileSystemStorageHandle::activeSyncAccessHandle const):

  • NetworkProcess/storage/FileSystemStorageManager.cpp:

(WebKit::FileSystemStorageManager::~FileSystemStorageManager):
(WebKit::FileSystemStorageManager::close):

  • NetworkProcess/storage/FileSystemStorageManager.h:
  • NetworkProcess/storage/NetworkStorageManager.cpp:

(WebKit::readOriginFromFile):
(WebKit::writeOriginToFileIfNecessary):
(WebKit::deleteOriginFileIfNecessary):
(WebKit::originDirectoryPath):
(WebKit::originFilePath):
(WebKit::NetworkStorageManager::localOriginStorageManager):
(WebKit::NetworkStorageManager::removeOriginStorageManagerIfPossible):
(WebKit::NetworkStorageManager::persist):
(WebKit::NetworkStorageManager::clearStorageForTesting): Only reset persisted state here as our test bot can run
tests in parallel. If one worker finishes a test and asks to clear storage, while another worker is running a
filesystem test; the test may fail as data is gone. (The workers are using the same network process.)
(WebKit::toWebsiteDataType):
(WebKit::NetworkStorageManager::forEachOriginDirectory):
(WebKit::NetworkStorageManager::fetchDataFromDisk):
(WebKit::NetworkStorageManager::fetchData):
(WebKit::NetworkStorageManager::deleteDataOnDisk):
(WebKit::NetworkStorageManager::deleteData):
(WebKit::NetworkStorageManager::deleteDataModifiedSince):
(WebKit::NetworkStorageManager::deleteDataForRegistrableDomains):
(WebKit::originPath): Deleted.

  • NetworkProcess/storage/NetworkStorageManager.h:
  • NetworkProcess/storage/OriginStorageManager.cpp:

(WebKit::OriginStorageManager::StorageBucket::toStorageIdentifier):
(WebKit::OriginStorageManager::StorageBucket::typeStoragePath const):
(WebKit::OriginStorageManager::StorageBucket::fileSystemStorageManager):
(WebKit::OriginStorageManager::StorageBucket::isActive):
(WebKit::OriginStorageManager::StorageBucket::deleteData):
(WebKit::OriginStorageManager::StorageBucket::deleteFileSystemStorageData):
(WebKit::OriginStorageManager::OriginStorageManager):
(WebKit::OriginStorageManager::fileSystemStorageManager):
(WebKit::OriginStorageManager::isActive):
(WebKit::OriginStorageManager::deleteData):
(WebKit::OriginStorageManager::setPersisted):
(WebKit::OriginStorageManager::persist): Deleted.

  • NetworkProcess/storage/OriginStorageManager.h:
  • Shared/WebsiteData/WebsiteData.cpp:

(WebKit::WebsiteData::ownerProcess):

  • Shared/WebsiteData/WebsiteDataType.h:
  • UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:

(dataTypesToString):

  • UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:

(WebKit::toWebsiteDataType):
(WebKit::toWKWebsiteDataTypes):

  • UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(+[WKWebsiteDataStore _allWebsiteDataTypesIncludingPrivate]):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::didReceiveMessage):

  • WebProcess/WebCoreSupport/WebFileSystemStorageConnection.messages.in: Added.

Source/WTF:

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::readEntireFile): Read whole file content into a Vector.
(WTF::FileSystemImpl::deleteAllFilesModifiedSince): Recursively delete files and folders modified after
specified time in a directory.

  • wtf/FileSystem.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm:
10:25 AM Changeset in webkit [286600] by Jonathan Bedard
  • 3 edits in trunk/Tools

[reporelaypy] Add implementation of commits.webkit.org (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=233734
<rdar://problem/85945101>

Unreviewed follow-up fix.

  • Scripts/libraries/reporelaypy/reporelaypy/init.py: Bump version, add sortedcontainers dependency.
  • Scripts/libraries/reporelaypy/setup.py: Bump version.
10:20 AM Changeset in webkit [286599] by Antti Koivisto
  • 3 edits
    2 adds in trunk

Assertion after removing stylesheet with loading @import rule
https://bugs.webkit.org/show_bug.cgi?id=233928

Reviewed by Alan Bujtas.

Source/WebCore:

Tests: fast/css/import-and-remove-assert.html

  • dom/InlineStyleSheetOwner.cpp:

(WebCore::InlineStyleSheetOwner::removedFromDocument):

Ensure we notify Style::Scope

LayoutTests:

  • fast/css/import-and-remove-assert-expected.txt: Added.
  • fast/css/import-and-remove-assert.html: Added.
9:49 AM Changeset in webkit [286598] by Antti Koivisto
  • 11 edits in trunk/Source/WebCore

Use more specific keys for pseudo-class invalidation
https://bugs.webkit.org/show_bug.cgi?id=233883

Reviewed by Simon Fraser.

Currently pseudo-class invalidation is keyed with pseudo-class type only. If we have rule like

.foo:hover { ... }

we end up considering this rule for every element whenever :hover state changes, whether the element has class 'foo' or not.

We can improve this by keying pseudo-class invalidation more narrowly with type/class, type/id or type/tag pairs.

  • css/CSSSelector.cpp:

(WebCore::CSSSelector::CSSSelector):
(WebCore::CSSSelector::firstInCompound const):

Add a function to find the start of a compound selector.

  • css/CSSSelector.h:

(WebCore::CSSSelector::tagHistory const):
(WebCore::CSSSelector::isFirstInTagHistory const):
(WebCore::CSSSelector::setNotFirstInTagHistory):

Add isFirstInTagHistory bit, similar to the isLastInTagHistory bit, to enable firstInCompound.

(WebCore::CSSSelector::CSSSelector):

  • css/CSSSelectorList.cpp:

(WebCore::CSSSelectorList::CSSSelectorList):

Set the bit.

  • style/PseudoClassChangeInvalidation.cpp:

(WebCore::Style::makePseudoClassInvalidationKeys):

Collect the id, tag and classes from the element and make keys out of them.

(WebCore::Style::PseudoClassChangeInvalidation::computeInvalidation):
(WebCore::Style::PseudoClassChangeInvalidation::collectRuleSets):

Use the keys to look up for matching invalidation rulesets.

  • style/PseudoClassChangeInvalidation.h:
  • style/RuleFeature.cpp:

(WebCore::Style::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):
(WebCore::Style::makePseudoClassInvalidationKey):

Make a key out of a selector.
Search the compound for id, classes or tag.

(WebCore::Style::RuleFeatureSet::collectFeatures):
(WebCore::Style::RuleFeatureSet::add):
(WebCore::Style::RuleFeatureSet::clear):

  • style/RuleFeature.h:
  • style/StyleScopeRuleSets.cpp:

(WebCore::Style::ScopeRuleSets::pseudoClassInvalidationRuleSets const):

  • style/StyleScopeRuleSets.h:
8:56 AM Changeset in webkit [286597] by commit-queue@webkit.org
  • 15 edits
    1 add in trunk/Source/JavaScriptCore

Unreviewed, reverting r286502 and r286580.
https://bugs.webkit.org/show_bug.cgi?id=233930

Speedometer2 0.7% regression

Reverted changesets:

"Remove StructureIDBlob"
https://bugs.webkit.org/show_bug.cgi?id=233723
https://commits.webkit.org/r286502

"TypeInfo should be materializable from Structures as a single
load."
https://bugs.webkit.org/show_bug.cgi?id=233875
https://commits.webkit.org/r286580

6:38 AM WebKitGTK/GCCRequirement edited by Lauro Moura
Update versions (diff)
4:22 AM Changeset in webkit [286596] by commit-queue@webkit.org
  • 64 edits
    1 copy
    1 move
    1 delete in trunk

Cocoa WebGL should support UI side compositing
https://bugs.webkit.org/show_bug.cgi?id=231009
<rdar://83437059>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-12-07
Reviewed by Simon Fraser.

Source/WebCore:

Implement Cocoa UI-side compositing for WebGL.

Make CanvasRenderingContext draw via GraphicsLayerContentsDisplayDelegate
instead of PlatformLayer. On Cocoa the GraphicsLayer contents can be
three different objects: CGImage, CALayer or content in "backing store"
of the underlying compositor layer.
For UI-side compositing for WebGL, we want it to be the latter.
As such, the object CanvasRenderingContext draws to cannot be a platform
layer (CALayer). So conceptually, WebGL does not draw into a platform
layer, it draws into backing store that can be put to (possibly many)
platform layers.

Add GraphicsLayerContentsDisplayDelegate interface, which can be
used to run client specific code during compositor layer contents update
phase (i.e. layer display phase).

WebGL will use new overloads of PlatformCALayer::setContents to set the
contents during delegated display. The contents is IOSurface for
in-process mode and MachSendRight of IOSurface in GPUP mode.
The IOSurface is set as the contents of the WebSimpleLayer instead
of the running the draw via display().
The MachSendRight is set as the contents of PlatformCALayerRemote
and be serialized to the UI process.

For non-Cocoa ports, add a simple GraphicsLayerContentsDisplayDelegate
that returns the platform layer to the GraphicsLayer inside the compositor.

No new tests, a refactor.

  • Headers.cmake:
  • PlatformMac.cmake:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.order:
  • WebCore.xcodeproj/project.pbxproj:
  • html/canvas/CanvasRenderingContext.cpp:

(WebCore::CanvasRenderingContext::layerContentsDisplayDelegate):

  • html/canvas/CanvasRenderingContext.h:

(WebCore::CanvasRenderingContext::platformLayer const): Deleted.

  • html/canvas/PlaceholderRenderingContext.cpp:

(WebCore::PlaceholderRenderingContext::layerContentsDisplayDelegate):
(WebCore::PlaceholderRenderingContext::platformLayer const): Deleted.

  • html/canvas/PlaceholderRenderingContext.h:
  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::layerContentsDisplayDelegate):
(WebCore::WebGLRenderingContextBase::platformLayer const): Deleted.

  • html/canvas/WebGLRenderingContextBase.h:
  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::setContentsDisplayDelegate):

  • platform/graphics/GraphicsLayer.h:
  • platform/graphics/GraphicsLayerContentsDisplayDelegate.cpp: Added.

(WebCore::GraphicsLayerContentsDisplayDelegate::prepareToDelegateDisplay):
(WebCore::GraphicsLayerContentsDisplayDelegate::orientation const):

  • platform/graphics/GraphicsLayerContentsDisplayDelegate.h: Added.
  • platform/graphics/ImageBufferPipe.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setContentsDisplayDelegate):
(WebCore::GraphicsLayerCA::layerDisplay):
(WebCore::GraphicsLayerCA::updateContentsPlatformLayer):

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/PlatformCALayerClient.h:

(WebCore::PlatformCALayerClient::platformCALayerLayerDisplay):

  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
(WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
(WebCore::PlatformCALayerCocoa::commonInit):
(WebCore::PlatformCALayerCocoa::setContents):

  • platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:

(WebCore::GraphicsContextGLOpenGL::displayBuffer):
(WebCore::GraphicsContextGLOpenGL::markDisplayBufferInUse):
(WebCore::GraphicsContextGLOpenGL::platformLayer const): Deleted.

  • platform/graphics/cocoa/WebGLLayer.mm: Removed.

(-[WebGLLayer initWithDevicePixelRatio:contentsOpaque:]): Deleted.
(-[WebGLLayer setTransform:]): Deleted.
(-[WebGLLayer setAnchorPoint:]): Deleted.
(-[WebGLLayer display]): Deleted.

  • platform/graphics/cocoa/WebProcessGraphicsContextGLOpenGLCocoa.mm:
  • platform/graphics/cv/CVUtilities.mm:
  • platform/graphics/mac/WebLayer.mm:

(-[WebSimpleLayer display]):

  • platform/graphics/nicosia/NicosiaImageBufferPipe.cpp:

(Nicosia::WebCore::NicosiaImageBufferPipeSource::layerContentsDisplayDelegate):
(Nicosia::WebCore::NicosiaImageBufferPipe::layerContentsDisplayDelegate):
(Nicosia::NicosiaImageBufferPipeSource::NicosiaImageBufferPipeSource): Deleted.
(Nicosia::NicosiaImageBufferPipeSource::~NicosiaImageBufferPipeSource): Deleted.
(Nicosia::NicosiaImageBufferPipeSource::handle): Deleted.
(Nicosia::NicosiaImageBufferPipeSource::platformLayer const): Deleted.
(Nicosia::NicosiaImageBufferPipeSource::swapBuffersIfNeeded): Deleted.
(Nicosia::NicosiaImageBufferPipe::NicosiaImageBufferPipe): Deleted.
(Nicosia::NicosiaImageBufferPipe::source const): Deleted.
(Nicosia::NicosiaImageBufferPipe::platformLayer const): Deleted.

  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:

(WebCore::GraphicsContextGLOpenGL::create):

  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayerTextureMapper::setContentsDisplayDelegate):

  • platform/graphics/texmap/GraphicsLayerTextureMapper.h:
  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::setContentsDisplayDelegate):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateConfiguration):

Source/WebKit:

Implement the capability to assign IOSurfaces
to PlatformCALayerRemote contents.

Make RemoteGraphicsContextGLProxyCocoa use the added
GraphicsLayerContentsDisplayDelegate.

  • GPUProcess/graphics/GPUProcessGraphicsContextGL.h:
  • GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:

(WebKit::RemoteGraphicsContextGLCocoa::prepareForDisplay):

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.h:

(WebKit::RemoteLayerBackingStore::hasFrontBuffer const):

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::clearBackingStore):
(WebKit::RemoteLayerBackingStore::encode const):
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
(WebKit::RemoteLayerBackingStore::setContents):
(WebKit::RemoteLayerBackingStore::display):
Change the contract of what RemoteLayerBackingStore serializes to
the transaction. Before, it serialized the front buffer.
After, it serializes the m_bufferHandle.
The buffer handle is produced by display() phase either by
delegated display setting the contents or drawing to
front buffer and then assigning the front buffer handle.

  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::description const):

  • UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:

(WebKit::RemoteLayerTreeHost::makeNode):

  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:

(WebKit::RemoteLayerTreeHost::makeNode):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/graphics/cocoa/RemoteGraphicsContextGLProxyCocoa.mm:

(WebKit::RemoteGraphicsContextGLProxy::create):

  • WebProcess/GPU/graphics/wc/RemoteGraphicsContextGLProxyWC.cpp:

(WebKit::RemoteGraphicsContextGLProxy::create): Deleted.

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
(WebKit::PlatformCALayerRemote::setContents):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.h:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm:

(WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
(WebKit::PlatformCALayerRemoteCustom::clone const):
(WebKit::PlatformCALayerRemoteCustom::setNeedsDisplayInRect):
(WebKit::PlatformCALayerRemoteCustom::setNeedsDisplay):

  • WebProcess/WebPage/wc/GraphicsLayerWC.cpp:

(WebKit::GraphicsLayerWC::setContentsDisplayDelegate):

Tools:

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

Add a dummy override of the new member function layerContentsDisplayDelegate.

3:36 AM Changeset in webkit [286595] by cathiechen
  • 1 edit
    1 add in trunk/PerformanceTests

[Performance test][css-contain] Add test large-grid.html
https://bugs.webkit.org/show_bug.cgi?id=233628

Reviewed by Rob Buis.

This test large-grid.html is imported from Chromium, and we change it a little bit.
This case tests the performance of getting gridContainer.offsetHeight which is the parent of
a large grid with contain: strict. The performance is improved when enable CSS contain,
because offsetHeight returns the value directly if the element doesn't need relayout, see
Document::updateLayoutIfDimensionsOutOfDate. contain: strict sets a relayout boundary to
the large grid, so when its subtree changes, the container of the large grid doesn't need
relayout.

  • Layout/large-grid.html: Added.
2:46 AM Changeset in webkit [286594] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebGPU

[WebGPU] Fix MacCatalyst build
https://bugs.webkit.org/show_bug.cgi?id=233920

Unreviewed.

Taken from JavaScriptCore.xcodeproj.

  • Configurations/WebGPU.xcconfig:
2:20 AM Changeset in webkit [286593] by svillar@igalia.com
  • 6 edits in trunk

[css-flexbox] Account for captions when flexing tables with specified sizes
https://bugs.webkit.org/show_bug.cgi?id=233814

Reviewed by Darin Adler.

Source/WebCore:

Flexing tables is complex because of the specifics of the table layout algorithms. There are
two interrelated issues that were causing some failures in flexbox WPT tests.

The first one is that tables interpret overriding sizes (flexed sizes) as the sizes of rows + captions.
However the specified height of a table only accounts for the heights of the rows, not the captions. That's
why when setting the flexed height of a table we must add up the specified height of the table and the height
of the captions. The table algorithm will properly substract the captions' size in order to compute the
available height for rows.

The second issue is that the table layout algorithm adds the size of the bottom border at the very end
of its execution after performing all the computations and it does it unconditionally. The thing is that
the flexbox code already takes into account the borders and paddings so we basically have to substract that
border when setting the height of the table, because the table layout will add it later.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::computeCaptionsLogicalHeight const): New method refactored from current code.
(WebCore::RenderTable::layout):

  • rendering/RenderTable.h: Expose computeCaptionsLogicalHeight.

LayoutTests:

2:01 AM Changeset in webkit [286592] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

[RISCV64] Add more MacroAssemblerRISCV64 helper infrastructure
https://bugs.webkit.org/show_bug.cgi?id=233805

Patch by Zan Dobersek <zdobersek@igalia.com> on 2021-12-07
Reviewed by Yusuke Suzuki.

Introduce RISCV64Assembler::ImmediateLoader, a helper class that
generates the operations necessary for loading any immediate value into
some register. This can be as simple as using ADDI to load 12-bit values
or a combination of LUI, ADDI and possibly additional combinations of
LSHIFT and ADDI instructions. There's also a placeholder mode which
generates no-ops for unused operation slots, in order to enable
future patching and repatching for other immediate values.

MacroAssemblerRISCV64::Imm is introduced as a private helper struct that
groups together validity and construction operations for the different
immediate types implemented in the RISCV64Instructions namespace.

In MacroAssemblerRISCV64, resolveAddress() overloads are provided to
help generate most optimal address loading sequencing. RISC-V addressing
mode utilizes a base register and a 12-bit signed offset. When needed,
additional computation is done on the address object's parameters and
stored in the destination register through which the load can then be
performed.

Helper TempRegister and LazyTempRegister structs are added to the
MacroAssemblerRISCV64 class, along with the respective temps() and
lazyTemp() methods. temps() returns the TempRegister object, with the
template parameters defining which of the two scratch register types
should be allowed for use through this object. Release-time assert
on the m_allowScratchRegister value is done at the point of calling
temps(). lazyTemp() only handles one scratch register, and the assert
is done only when the register is actually used, and not just reserved
for use. This enables simpler implementations that better handle both
modes of scratch register usage (allowed or disallowed).

To get things rolling, the first set of MacroAssemblerRISCV64 methods
is implemented. Addition, subtraction and multiplication definitions
are provided, with the templated no-op declarations removed.

  • assembler/MacroAssemblerRISCV64.h:

(JSC::MacroAssemblerRISCV64::TempRegister::data):
(JSC::MacroAssemblerRISCV64::TempRegister::memory):
(JSC::MacroAssemblerRISCV64::LazyTempRegister::LazyTempRegister):
(JSC::MacroAssemblerRISCV64::LazyTempRegister::operator RegisterID):
(JSC::MacroAssemblerRISCV64::temps):
(JSC::MacroAssemblerRISCV64::lazyTemp):
(JSC::MacroAssemblerRISCV64::add32):
(JSC::MacroAssemblerRISCV64::add64):
(JSC::MacroAssemblerRISCV64::sub32):
(JSC::MacroAssemblerRISCV64::sub64):
(JSC::MacroAssemblerRISCV64::mul32):
(JSC::MacroAssemblerRISCV64::mul64):
(JSC::MacroAssemblerRISCV64::Imm::isValid):
(JSC::MacroAssemblerRISCV64::Imm::I):
(JSC::MacroAssemblerRISCV64::Imm::S):
(JSC::MacroAssemblerRISCV64::Imm::B):
(JSC::MacroAssemblerRISCV64::Imm::U):
(JSC::MacroAssemblerRISCV64::Imm::J):
(JSC::MacroAssemblerRISCV64::resolveAddress):

  • assembler/RISCV64Assembler.h:

(JSC::RISCV64Assembler::ImmediateLoader::ImmediateLoader):
(JSC::RISCV64Assembler::ImmediateLoader::moveInto):

12:27 AM Changeset in webkit [286591] by Martin Robinson
  • 14 edits in trunk

perspective() <= 1px should be clamped to 1px
https://bugs.webkit.org/show_bug.cgi?id=232619
<rdar://problem/85197362>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-transforms/animation/transform-interpolation-verify-reftests-expected.txt: Update to show newly passing subtests.

Source/WebCore:

No new tests. This is covered by the newly passing WPT tests
in this change.

When the CSS 3D transform interoperability experimental feature is turned on,
round perspectives that are < 1 pixel to 1 pixel. This behavior is described
in the specification, but breaks backward compatibility. The reasoning provided
by the specification is:

As very small <length> values can produce bizarre rendering results and
stress the numerical accuracy of transform calculations, values less than
1px must be treated as 1px for rendering purposes.

  • platform/graphics/transforms/PerspectiveTransformOperation.h: When getting

the floating point perspective value, round to 1px.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::perspectiveTransform const): Use usedPerspective from
RenderSTyle.

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::getTransformFromContainer const): Ditto.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::usedPerspective const): Added this method which rounds
to 1px.

  • rendering/style/RenderStyle.h:

LayoutTests:

  • TestExpectations: Mark tests as passing.
  • transforms/3d/general/3dtransform-values.html:
  • transforms/3d/general/prefixed-3dtransform-values.html:
  • transforms/3d/general/3dtransform-values-expected.txt:
  • transforms/3d/general/prefixed-3dtransform-values-expected.txt:

Dec 6, 2021:

11:30 PM Changeset in webkit [286590] by pvollan@apple.com
  • 7 edits in trunk/Source/WebKit

[iOS] Remove mach service extensions for the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=232952
<rdar://problem/85259753>

Reviewed by Brent Fulgham.

Remove mach service extensions for the WebContent process, which we think are no longer needed, based on local testing.

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

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

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

(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::nonBrowserServices): Deleted.

  • UIProcess/WebPageProxy.cpp:

(WebKit::attachmentElementServices):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

11:19 PM Changeset in webkit [286589] by Said Abou-Hallawa
  • 56 edits in trunk

[GPU Process] [Filters] Make FilterEffect::externalRepresentation() and its overridable functions work iteratively
https://bugs.webkit.org/show_bug.cgi?id=233893

Reviewed by Cameron McCormack.

Source/WebCore:

This is a step towards removing the inputEffect() from FilterEffect.

-- The enum FliterEffect::RepresentationType is replaced by

FilterRepresentation.

-- CSSFilter calls its functions from left to right to dump their

externalRepresentation.

-- SVGFilter uses its expression to dump its graph of FilterEffects.

-- Since SourceAlpha is a built-in effect it does not need to dump

SourceGraphic as its input.

  • platform/graphics/filters/FEBlend.cpp:

(WebCore::FEBlend::externalRepresentation const):

  • platform/graphics/filters/FEBlend.h:
  • platform/graphics/filters/FEColorMatrix.cpp:

(WebCore::FEColorMatrix::externalRepresentation const):

  • platform/graphics/filters/FEColorMatrix.h:
  • platform/graphics/filters/FEComponentTransfer.cpp:

(WebCore::FEComponentTransfer::externalRepresentation const):

  • platform/graphics/filters/FEComponentTransfer.h:
  • platform/graphics/filters/FEComposite.cpp:

(WebCore::FEComposite::externalRepresentation const):

  • platform/graphics/filters/FEComposite.h:
  • platform/graphics/filters/FEConvolveMatrix.cpp:

(WebCore::FEConvolveMatrix::externalRepresentation const):

  • platform/graphics/filters/FEConvolveMatrix.h:
  • platform/graphics/filters/FEDiffuseLighting.cpp:

(WebCore::FEDiffuseLighting::externalRepresentation const):

  • platform/graphics/filters/FEDiffuseLighting.h:
  • platform/graphics/filters/FEDisplacementMap.cpp:

(WebCore::FEDisplacementMap::externalRepresentation const):

  • platform/graphics/filters/FEDisplacementMap.h:
  • platform/graphics/filters/FEDropShadow.cpp:

(WebCore::FEDropShadow::externalRepresentation const):

  • platform/graphics/filters/FEDropShadow.h:
  • platform/graphics/filters/FEFlood.cpp:

(WebCore::FEFlood::externalRepresentation const):

  • platform/graphics/filters/FEFlood.h:
  • platform/graphics/filters/FEGaussianBlur.cpp:

(WebCore::FEGaussianBlur::externalRepresentation const):

  • platform/graphics/filters/FEGaussianBlur.h:
  • platform/graphics/filters/FEMerge.cpp:

(WebCore::FEMerge::externalRepresentation const):

  • platform/graphics/filters/FEMerge.h:
  • platform/graphics/filters/FEMorphology.cpp:

(WebCore::FEMorphology::externalRepresentation const):

  • platform/graphics/filters/FEMorphology.h:
  • platform/graphics/filters/FEOffset.cpp:

(WebCore::FEOffset::externalRepresentation const):

  • platform/graphics/filters/FEOffset.h:
  • platform/graphics/filters/FESpecularLighting.cpp:

(WebCore::FESpecularLighting::externalRepresentation const):

  • platform/graphics/filters/FESpecularLighting.h:
  • platform/graphics/filters/FETile.cpp:

(WebCore::FETile::externalRepresentation const):

  • platform/graphics/filters/FETile.h:
  • platform/graphics/filters/FETurbulence.cpp:

(WebCore::FETurbulence::externalRepresentation const):

  • platform/graphics/filters/FETurbulence.h:
  • platform/graphics/filters/Filter.h:
  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::externalRepresentation const):
(WebCore::operator<<):

  • platform/graphics/filters/FilterEffect.h:
  • platform/graphics/filters/FilterFunction.h:
  • platform/graphics/filters/SourceAlpha.cpp:

(WebCore::SourceAlpha::externalRepresentation const):

  • platform/graphics/filters/SourceAlpha.h:
  • platform/graphics/filters/SourceGraphic.cpp:

(WebCore::SourceGraphic::externalRepresentation const):

  • platform/graphics/filters/SourceGraphic.h:
  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::externalRepresentation const):

  • rendering/CSSFilter.h:
  • rendering/svg/SVGRenderTreeAsText.cpp:

(WebCore::writeSVGResourceContainer):

  • svg/graphics/filters/SVGFEImage.cpp:

(WebCore::FEImage::externalRepresentation const):

  • svg/graphics/filters/SVGFEImage.h:
  • svg/graphics/filters/SVGFilter.cpp:

(WebCore::SVGFilter::externalRepresentation const):

  • svg/graphics/filters/SVGFilter.h:
  • svg/graphics/filters/SVGFilterBuilder.cpp:

(WebCore::effectGeometryFlagsForElement):
(WebCore::SVGFilterBuilder::buildFilterEffects):
(WebCore::SVGFilterBuilder::buildEffectExpression const):
(WebCore::SVGFilterBuilder::buildExpression const):
(WebCore::boundarySetFlagsForElement): Deleted.

  • svg/graphics/filters/SVGFilterBuilder.h:
  • svg/graphics/filters/SVGFilterExpression.h:

LayoutTests:

Add missing closing quotations in the expected results of some of the
filter layout tests.

  • svg/filters/feDropShadow-expected.txt:
  • svg/filters/feDropShadow-subregion-expected.txt:
  • svg/filters/feDropShadow-zero-deviation-expected.txt:
  • svg/repaint/filter-child-repaint-expected.txt:
10:20 PM Changeset in webkit [286588] by Patrick Angle
  • 7 edits in trunk/Source

[Cocoa] Web Inspector: Unify Grid overlay drawing code
https://bugs.webkit.org/show_bug.cgi?id=233773

Reviewed by Devin Rousso.

Source/WebCore:

Expose InspectorOverlay::drawGridOverlay as a static method so that it can be used for iOS overlay drawing and
clean up other related drawing methods to be private static instead of instance methods or public static methods.

  • inspector/InspectorOverlay.cpp:

(WebCore::drawLayoutHatching):
(WebCore::fontForLayoutLabel):
(WebCore::backgroundPathForLayoutLabel):
(WebCore::expectedSizeForLayoutLabel):
(WebCore::drawLayoutLabel):
(WebCore::InspectorOverlay::drawLayoutHatching): Deleted.
(WebCore::InspectorOverlay::fontForLayoutLabel): Deleted.
(WebCore::InspectorOverlay::backgroundPathForLayoutLabel): Deleted.
(WebCore::InspectorOverlay::drawLayoutLabel): Deleted.

  • inspector/InspectorOverlay.h:

Source/WebKit:

Remove the (almost) 1-to-1 duplicated logic currently being used to turn Grid Overlays into a layer hierarchy
and instead use a graphics context to draw the overlays straight into the view to take advantage of the existing
drawing code we use for macOS in WebCore::InspectorOverlay. To accommodate this, we now correctly set the
content scale factor of the view itself (so that our drawing does not appear blurry) and set the frame of the
view equal to the current visible portion of the parent scroll view, which helps us to avoid having an
incredibly large graphics context to draw into (which we would if the view's frame was just set to match the
frame of the webpage's view). This frame will not always be the same size, such as when zooming in where less of
the frame is visible. Combined with the current content scale, this actually means that on zoom the effective
number of pixels that need to be drawn is consistent.

  • UIProcess/Inspector/ios/WKInspectorHighlightView.h:
  • UIProcess/Inspector/ios/WKInspectorHighlightView.mm:

(-[WKInspectorHighlightView initWithFrame:]):

  • Explicitly set this view to be non-opaque so that page content can be seen below this view. This wasn't

previously necessary because the bounds of this view were a zero-rect, which meant the background was never
painted.

(-[WKInspectorHighlightView _removeAllLayers]):
(-[WKInspectorHighlightView _createLayers:]):

  • Because the view's frame origin is now offset, we need to create the node highlight layers offset by the

negation of the frame's origin so that they still line up correctly with page content.

(-[WKInspectorHighlightView drawRect:]):
(-[WKInspectorHighlightView update:scale:frame:]):
(-[WKInspectorHighlightView _createGridOverlayLayers:scale:]): Deleted.
(createLayoutHatchingLayer): Deleted.
(createLayoutLabelLayer): Deleted.
(-[WKInspectorHighlightView _createGridOverlayLayer:scale:]): Deleted.
(-[WKInspectorHighlightView update:scale:]): Deleted.

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _showInspectorHighlight:]):

9:52 PM Changeset in webkit [286587] by fpizlo@apple.com
  • 8 edits in trunk/Source/bmalloc

[libpas] Clean up what the machine code looks like under LTO
https://bugs.webkit.org/show_bug.cgi?id=233909

Reviewed by Yusuke Suzuki.

During the very painful perf burndown of libpas that got it to be a progression (rather than a
regression) versus bmalloc, I found that certain key fast paths - like fastMalloc and fastFree - perform
better when they do not have a stack frame. For this to happen, they must only make tail calls.

Sadly, LTO was inlining a slow path into fastFree (i.e. pas_deallocate), and this slow path had an
assertion, and the call to pas_assertion_failed was not a tail call.

This fixes the problem comprehensively:

  • We now compile pas_assertion_failed as a breakpoint, just like WebKit would do. This is better for code size and maybe it could sometimes be better for performance.
  • The slow path that was getting inlined is now marked PAS_NEVER_INLINE.
  • Inspecting the machine code, I found a couple other slow paths that were being inlined in a bunch of places, and also marked them NEVER_INLINE.

If my past experiences are right, this could be a tiny speed-up on malloc-heavy workloads.

  • libpas/src/libpas/pas_lock.c:

(pas_lock_lock_slow):

  • libpas/src/libpas/pas_lock.h:
  • libpas/src/libpas/pas_monotonic_time.c:

(get_timebase_info_slow):
(get_timebase_info):

  • libpas/src/libpas/pas_thread_local_cache.c:

(pas_thread_local_cache_append_deallocation_slow):

  • libpas/src/libpas/pas_thread_local_cache.h:
  • libpas/src/libpas/pas_utils.c:
  • libpas/src/libpas/pas_utils.h:

(pas_assertion_failed):
(pas_assertion_failed_noreturn_silencer):

8:12 PM Changeset in webkit [286586] by Lauro Moura
  • 3 edits in trunk/LayoutTests

[GLIB] Small gardening

Unreviewed test gardening.

  • platform/glib/TestExpectations:
  • platform/wpe/TestExpectations:
7:40 PM Changeset in webkit [286585] by Lauro Moura
  • 3 edits in trunk/Source/WebKit

REGRESSION(r286535) [GTK] Fix clean builds after DerivedSources/WebKit2 move
https://bugs.webkit.org/show_bug.cgi?id=233881

Reviewed by Don Olmstead.

Build fix. Covered by existing tests

The previous approach of this patch created the links to the header
derived sources into the target webkit2/ folder, which in turn was a
link to <repo>/Source/WebKit/UIProcess/API/gtk. So it ended up
actually creating the links inside the Source directory.

This commit instead links a different webkit2/ folder from the
generated webkit folder for the WebKitGTK/WPE derived sources headers.

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
5:57 PM Changeset in webkit [286584] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK][WPE] Mathml asserts with invisible operators
https://bugs.webkit.org/show_bug.cgi?id=215217

Unreviewed test gardening.

Remove test failures from expectations as the assert was removed.

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

  • platform/glib/TestExpectations:
5:52 PM Changeset in webkit [286583] by commit-queue@webkit.org
  • 5 edits in trunk/LayoutTests

[GLIB] Update test expectations and baselines. Unreviewed test gardening.
https://bugs.webkit.org/show_bug.cgi?id=233898

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

  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valid-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valueMissing-expected.txt:
5:19 PM Changeset in webkit [286582] by wilander@apple.com
  • 2 edits in trunk/Tools

Add WebCore::RegistrableDomain tests for duplicate sub domains
https://bugs.webkit.org/show_bug.cgi?id=233902
<rdar://problem/86130326>

Unreviewed expansion of the RegistrableDomain.MatchesURLs API test.

https://bugs.webkit.org/show_bug.cgi?id=233330 claims that duplicate sub domains
such as news.news.example.com causes WebKit's RegistrableDomain matching to fail
and treat same-site content as cross-site. This patch add tests of such duplicate
sub domains.

  • TestWebKitAPI/Tests/WebCore/RegistrableDomain.cpp:

(TestWebKitAPI::TEST):

5:15 PM Changeset in webkit [286581] by Chris Dumez
  • 12 edits in trunk

<input type="time">'s range should be reversible
https://bugs.webkit.org/show_bug.cgi?id=233835

Reviewed by Darin Adler.

Source/WebCore:

<input type="time">'s range should be reversible when checking for overflow / underflow:

No new tests, rebaselined existing tests.

  • html/InputType.cpp:

(WebCore::InputType::rangeUnderflow const):
(WebCore::InputType::rangeOverflow const):

  • html/StepRange.cpp:

(WebCore::StepRange::StepRange):

  • html/StepRange.h:

(WebCore::StepRange::isReversible const):

  • html/TimeInputType.cpp:

(WebCore::TimeInputType::createStepRange const):

LayoutTests:

Rebaseline WPT tests that are now passing.

  • platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeOverflow-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-rangeUnderflow-expected.txt:
5:13 PM Changeset in webkit [286580] by keith_miller@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

TypeInfo should be materializable from Structures as a single load.
https://bugs.webkit.org/show_bug.cgi?id=233875

Reviewed by Mark Lam.

This is mostly just the members of Structure and JSCell so that
JSType and InlineTypeFlags are at the end of the JSCell header.

  • assembler/testmasm.cpp:

(JSC::testBranchIfType):
(JSC::testBranchIfNotType):

  • ftl/FTLAbstractHeapRepository.cpp:

(JSC::FTL::AbstractHeapRepository::AbstractHeapRepository):

  • runtime/JSCell.h:
  • runtime/JSCellInlines.h:

(JSC::JSCell::JSCell):

  • runtime/Structure.h:

(JSC::Structure::typeInfo const):

4:38 PM Changeset in webkit [286579] by beidson@apple.com
  • 10 edits in trunk

webpushd/webpushtool debugging additions
https://bugs.webkit.org/show_bug.cgi?id=233864

Reviewed by Alex Christensen.

Source/WebKit:

Covered by API tests.

This patch:

  • Teaches webpushtool the ability to wait for a reconnect after losing its connection
  • Starts actually broadcasting meaningful debug messages from webpushd
  • webpushd/AppBundleRequest.mm:

(WebPushD::AppBundleRequest::start):
(WebPushD::AppBundlePermissionsRequest::didCheckForExistingBundle):
(WebPushD::AppBundlePermissionsRequest::didCreateAppBundle):
(WebPushD::AppBundleDeletionRequest::didDeleteExistingBundleWithError):

  • webpushd/PushClientConnection.h:
  • webpushd/PushClientConnection.mm:

(WebPushD::ClientConnection::setDebugModeIsEnabled):
(WebPushD::ClientConnection::broadcastDebugMessage):
(WebPushD::ClientConnection::connectionClosed):

  • webpushd/WebPushDaemon.mm:

(WebPushD::Daemon::connectionAdded):

  • webpushd/webpushtool/WebPushToolConnection.h:
  • webpushd/webpushtool/WebPushToolConnection.mm:

(WebPushTool::Connection::create):
(WebPushTool::Connection::Connection):
(WebPushTool::Connection::connectToService):
(WebPushTool::Connection::connectionDropped):

  • webpushd/webpushtool/WebPushToolMain.mm:

(printUsageAndTerminate):
(main):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:

(TestWebKitAPI::TEST): Adapt to debug message changes.

4:36 PM Changeset in webkit [286578] by Said Abou-Hallawa
  • 14 edits
    1 add in trunk/Source/WebCore

[GPU Process] Make FilterEffect calculate the primitive subregion only when needed
https://bugs.webkit.org/show_bug.cgi?id=232705
rdar://85290142

Reviewed by Cameron McCormack.

In this patch:

  1. resultColorSpace() will return colorSpace() from a FilterImageVector instead of returning the resultColorSpace() of the FilterEffect.
  1. Filter::clampFilterRegionIfNeeded() will clamp the filterRegion() instead of clamping the maxEffectRect of the lastEffect() since all the primitiveSubregions and the imageRects have to clipped to the filterRegion().
  1. determineFilterPrimitiveSubregion() is replaced by calculatePrimitiveSubregion() which will calculate the primitiveSubregion from a FilterImageVector and an optional FilterEffectGeometry.
  1. Many of FilterEffects are made protected instead of having them public.
  1. SVGFilterExpression will be defined as a Vector of SVGFilterExpressionTerm which is a struct of FilterEffect and optional FilterEffectGeometry.
  1. SVGFilter will replace the members whose types are FilterEffectVector and FilterEffectGeometryMap with a single member of type SVGFilterExpression.
  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/filters/FEDisplacementMap.cpp:

(WebCore::FEDisplacementMap::resultColorSpace const):

  • platform/graphics/filters/FEDisplacementMap.h:
  • platform/graphics/filters/Filter.cpp:

(WebCore::Filter::clampFilterRegionIfNeeded):

  • platform/graphics/filters/Filter.h:

(WebCore::Filter::effectGeometry const): Deleted.

  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::calculatePrimitiveSubregion const):
(WebCore::FilterEffect::apply):
(WebCore::FilterEffect::externalRepresentation const):
(WebCore::FilterEffect::determineFilterPrimitiveSubregion): Deleted.

  • platform/graphics/filters/FilterEffect.h:

(WebCore::FilterEffect::resultColorSpace const):
(WebCore::FilterEffect::filterPrimitiveSubregion const): Deleted.
(WebCore::FilterEffect::setFilterPrimitiveSubregion): Deleted.

  • platform/graphics/filters/FilterFunction.h:

(WebCore::FilterFunction::apply):

  • svg/graphics/filters/SVGFilter.cpp:

(WebCore::SVGFilter::create):
(WebCore::SVGFilter::supportsCoreImageRendering const):
(WebCore::SVGFilter::lastEffect const):
(WebCore::SVGFilter::apply):
(WebCore::SVGFilter::clearResult):
(WebCore::SVGFilter::effectGeometry const): Deleted.

  • svg/graphics/filters/SVGFilter.h:
  • svg/graphics/filters/SVGFilterBuilder.cpp:

(WebCore::SVGFilterBuilder::effectGeometry const):
(WebCore::SVGFilterBuilder::buildEffectExpression const):
(WebCore::SVGFilterBuilder::buildExpression const):
(WebCore::buildEffectExpression): Deleted.

  • svg/graphics/filters/SVGFilterBuilder.h:

(WebCore::SVGFilterBuilder::takeEffectGeometryMap): Deleted.

  • svg/graphics/filters/SVGFilterExpression.h: Added.
4:36 PM Changeset in webkit [286577] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[ iOS ] imported/w3c/web-platform-tests/content-security-policy/worker-src/service-* tests are consistently failing
https://bugs.webkit.org/show_bug.cgi?id=229875

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations: Add DumpJSConsoleLogInStdErr to address consistent failures.
4:18 PM Changeset in webkit [286576] by Jonathan Bedard
  • 8 edits
    6 copies
    9 adds in trunk/Tools

[reporelaypy] Add implementation of commits.webkit.org
https://bugs.webkit.org/show_bug.cgi?id=233734
<rdar://problem/85945101>

Reviewed by Dewei Zhu.

As commits.webkit.org becomes more important to WebKit development, we need to apply
our normal robust testing and review to the code backing it.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/init.py: Add entrypoint to library.
  • Tools/Scripts/libraries/reporelaypy/reporelaypy/checkout.py: Added.

(Checkout): Abstraction managing local repository checkout.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/checkoutroute.py: Added.

(Redirector): Generates redirects for certain SCM services.
(CheckoutRoute): http routes returning information based on a checkout.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/database.py: Added.

(Database): A connection to a true Redis or TinyRedis database.

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/tests/checkout_unittest.py:

(CheckoutUnittest):

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/tests/checkoutroute_unittest.py: Added.

(RedirectorUnittest):
(CheckoutRouteUnittest):

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/tests/database_unittest.py: Added.

(DatabaseUnittest):

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/webserver.py: Copied from Tools/Scripts/libraries/webkitflaskpy/setup.py.

(health):

  • Tools/Scripts/libraries/reporelaypy/run: Added.
  • Tools/Scripts/libraries/reporelaypy/setup.py: Added.
  • Tools/Scripts/libraries/resultsdbpy/resultsdbpy/init.py: Bump version.
  • Tools/Scripts/libraries/resultsdbpy/resultsdbpy/flask_support/flask_testcase.py:

(FlaskTestCase.run_with_mock_webserver.decorator.real_method):
(FlaskRequestsResponse): Moved to webkitflaskpy.

  • Tools/Scripts/libraries/webkitflaskpy/setup.py: Bump version, update library description.
  • Tools/Scripts/libraries/webkitflaskpy/webkitflaskpy/init.py: Bump version.
  • Tools/Scripts/libraries/webkitflaskpy/webkitflaskpy/mock_app.py: Added.

(mock_app): Setup a flask app for testing.

  • Tools/Scripts/libraries/webkitflaskpy/webkitflaskpy/response.py: Added.

(Response): Move FlaskRequestsResponse to more generic location.

  • Tools/Scripts/webkitpy/init.py: Include reporelaypy for testing.
  • Tools/Scripts/webkitpy/test/main.py:

(main): Include reporelaypy for testing.
(Tester._run_tests): Ditto.

Canonical link: https://commits.webkit.org/244901@main

4:06 PM Changeset in webkit [286575] by Ryan Haddad
  • 4 edits in branches/safari-612-branch

Unreviewed, fix the debug build.

3:37 PM Changeset in webkit [286574] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Regression(r286505) imported/w3c/web-platform-tests/html/cross-origin-opener-policy/javascript-url.https.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=233874

Reviewed by Darin Adler.

r286505 fixed ProvisionalPageProxy so that ProvisionalPageProxy::m_provisionalLoadURL gets properly initialized when the
ProvisionalPageProxy gets constructed *after* the provisional load has already started (COOP proces-swap case). One side
effect of this though is that ProvisionalPageProxy::cancel() no longer returns early and will try to notify the client
that the provisional load failed, dereferencing m_mainFrame in doing so. In the event where the main frame has not yet
been created in the new provisional process, this would do a null-dereference of m_mainFrame.

To address the issue, we now early return in ProvisionalPageProxy::cancel() if m_isProcessSwappingOnNavigationResponse
is true (i.e. The ProvisionalPageProxy was created after the provisional load had started). In such situations, we
don't want to ProvisionalPageProxy to be the one notifying the client of the provisional load failure anyway. The reason
is that there is still a provisional load going on in the committed process/page.

No new tests, covered by existing test that is flakily crashing.

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::cancel):

2:53 PM Changeset in webkit [286573] by ysuzuki@apple.com
  • 8 edits in trunk/Source/bmalloc

[libpas] Set pthread_setspecific with marker in TLS destructor to detect TLS is destroyed
https://bugs.webkit.org/show_bug.cgi?id=233851

Reviewed by Mark Lam.

TLS has lifetime problem that,

  1. TLS is destroyed
  2. The other TLS is destroyed, and the destructor is called
  3. The destructor touches (1)'s TLS, then revive TLS of (1) (e.g. libpas's thread local cache).

To handle these cases, pthread library (libc) repeatedly calls destructor PAS_THREAD_LOCAL_CACHE_DESTROYED times
so that we clean up revived TLS again.

By using this mechanism, we can emulate pthread_self_is_exiting_np so that we can avoid reviving TLS.

  1. When destroying TLS, we set a marker (PAS_THREAD_LOCAL_CACHE_DESTROYED in this case) in TLS.
  2. During the other destructor calls, we can detect that TLS is destroyed by checking pthread_getspecific(...) == PAS_THREAD_LOCAL_CACHE_DESTROYED.
  3. We repeatedly calls the destructor of TLS, but every time, we set PAS_THREAD_LOCAL_CACHE_DESTROYED. So after PAS_THREAD_LOCAL_CACHE_DESTROYED times, it is left, and we achieve the goal (1) offering the way to detect the destroyed TLS and (2) avoiding reviving of TLS.

This patch implements it when pthread_self_is_exiting_np does not exist.

  • libpas/src/libpas/pas_segregated_page_inlines.h:

(pas_segregated_page_switch_lock_with_mode):

  • libpas/src/libpas/pas_thread_local_cache.c:

(destructor):
(pas_thread_local_cache_create):
(pas_thread_local_cache_destroy):
(pas_thread_local_cache_get_local_allocator_slow):
(pas_thread_local_cache_for_all):

  • libpas/src/libpas/pas_thread_local_cache.h:

(pas_thread_local_cache_try_get_impl):
(pas_thread_local_cache_try_get):
(pas_thread_local_cache_can_set):
(pas_thread_local_cache_set_impl):
(pas_thread_local_cache_set):
(pas_thread_local_cache_is_guaranteed_to_destruct): Deleted.

  • libpas/src/libpas/pas_try_reallocate.h:

(pas_try_reallocate):

  • libpas/src/libpas/pas_utils.h:
  • libpas/src/test/IsoHeapPageSharingTests.cpp:

(std::addAllTests):

  • libpas/src/test/IsoHeapPartialAndBaselineTests.cpp:

(addIsoHeapPartialAndBaselineTests):

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

Remove unneeded virtual allocator methods from Subspace.
https://bugs.webkit.org/show_bug.cgi?id=233891
rdar://86117970

Reviewed by Yusuke Suzuki.

Since the virtual allocate() and allocateFor() methods are now deleted, we can
also rename the inline allocateNonVirtual() and allocatorForNonVirtual() methods
to simply allocate() and allocateFor(). Similarly, rename
allocatorForNonVirtualConcurrently() to allocatorForConcurrently().

There are 2 places that still invokes the non-inline version of
CompleteSubspace::allocatorFor(). For this reason, we introduce a
CompleteSubsace::allocatorForNonInline() to keep the linkage the same. There's a
chance that the compiler/linker may already inline the method in 1 or both of
these places, but we'll offer allocatorForNonInline() to keep the code expressing
the same thing and let the compiler/linker decide whether to inline it or not just
as before.

This is purely a re-factoring patch. There are no behavior changes, except for
the removal of those 2 entries from the vtbls.

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateImpl):

  • bytecode/ObjectAllocationProfileInlines.h:

(JSC::ObjectAllocationProfileBase<Derived>::initializeProfile):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::emitAllocateRawObject):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileMakeRope):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

  • heap/CompleteSubspace.cpp:

(JSC::CompleteSubspace::allocatorForNonInline):
(JSC::CompleteSubspace::tryAllocateSlow):
(JSC::CompleteSubspace::allocatorFor): Deleted.
(JSC::CompleteSubspace::allocate): Deleted.

  • heap/CompleteSubspace.h:

(JSC::CompleteSubspace::allocatorFor):
(JSC::CompleteSubspace::allocatorForNonVirtual): Deleted.

  • heap/CompleteSubspaceInlines.h:

(JSC::CompleteSubspace::allocate):
(JSC::CompleteSubspace::allocateNonVirtual): Deleted.

  • heap/IsoSubspace.cpp:

(JSC::IsoSubspace::allocatorFor): Deleted.
(JSC::IsoSubspace::allocate): Deleted.

  • heap/IsoSubspace.h:

(JSC::IsoSubspace::allocatorFor):
(JSC::IsoSubspace::allocatorForNonVirtual): Deleted.

  • heap/IsoSubspaceInlines.h:

(JSC::IsoSubspace::allocate):
(JSC::IsoSubspace::allocateNonVirtual): Deleted.

  • heap/Subspace.h:
  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitAllocateJSObjectWithKnownSize):

  • runtime/ButterflyInlines.h:

(JSC::Butterfly::tryCreateUninitialized):
(JSC::Butterfly::createUninitialized):
(JSC::Butterfly::tryCreate):
(JSC::Butterfly::growArrayRight):
(JSC::Butterfly::reallocArrayRightIfPossible):

  • runtime/DirectArguments.cpp:

(JSC::DirectArguments::overrideThings):

  • runtime/GenericArgumentsInlines.h:

(JSC::GenericArguments<Type>::initModifiedArgumentsDescriptor):

  • runtime/HashMapImpl.h:

(JSC::HashMapBuffer::create):

  • runtime/JSArray.cpp:

(JSC::JSArray::tryCreateUninitializedRestricted):

  • runtime/JSArray.h:

(JSC::JSArray::tryCreate):

  • runtime/JSArrayBufferView.cpp:

(JSC::JSArrayBufferView::ConstructionContext::ConstructionContext):

  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::createWithLength):

  • runtime/JSCellInlines.h:

(JSC::allocatorForConcurrently):
(JSC::tryAllocateCellHelper):
(JSC::allocatorForNonVirtualConcurrently): Deleted.

  • runtime/JSPropertyNameEnumerator.cpp:

(JSC::JSPropertyNameEnumerator::create):

  • runtime/ScopedArguments.cpp:

(JSC::ScopedArguments::createUninitialized):

  • runtime/StructureChain.cpp:

(JSC::StructureChain::create):

2:24 PM Changeset in webkit [286571] by Adrian Perez de Castro
  • 1 copy in releases/WPE WebKit/webkit-2.34.2

WPE WebKit 2.34.2

2:23 PM Changeset in webkit [286570] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.34

Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.34.2 release

.:

  • Source/cmake/OptionsWPE.cmake: Bump version numbers.

Source/WebKit:

  • wpe/NEWS: Add release notes for 2.34.2.
2:17 PM Changeset in webkit [286569] by Ryan Haddad
  • 29 edits
    1 delete in trunk

REGRESSION (r286507): [macOS] Many file system access layout tests became flaky failures
https://bugs.webkit.org/show_bug.cgi?id=233892

Unreviewed, revert r286507.

Source/WebCore:

  • Modules/filesystemaccess/FileSystemStorageConnection.h:

Source/WebKit:

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::monitoredDataTypes):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::registrableDomainsWithWebsiteData):

  • NetworkProcess/storage/FileSystemStorageHandle.h:

(WebKit::FileSystemStorageHandle::activeSyncAccessHandle const): Deleted.

  • NetworkProcess/storage/FileSystemStorageManager.cpp:

(WebKit::FileSystemStorageManager::~FileSystemStorageManager):
(WebKit::FileSystemStorageManager::close): Deleted.

  • NetworkProcess/storage/FileSystemStorageManager.h:
  • NetworkProcess/storage/NetworkStorageManager.cpp:

(WebKit::originPath):
(WebKit::NetworkStorageManager::localOriginStorageManager):
(WebKit::readOriginFromFile): Deleted.
(WebKit::writeOriginToFileIfNecessary): Deleted.
(WebKit::deleteOriginFileIfNecessary): Deleted.
(WebKit::originDirectoryPath): Deleted.
(WebKit::originFilePath): Deleted.
(WebKit::NetworkStorageManager::removeOriginStorageManagerIfPossible): Deleted.
(WebKit::toWebsiteDataType): Deleted.
(WebKit::NetworkStorageManager::forEachOriginDirectory): Deleted.
(WebKit::NetworkStorageManager::fetchDataFromDisk): Deleted.
(WebKit::NetworkStorageManager::fetchData): Deleted.
(WebKit::NetworkStorageManager::deleteDataOnDisk): Deleted.
(WebKit::NetworkStorageManager::deleteData): Deleted.
(WebKit::NetworkStorageManager::deleteDataModifiedSince): Deleted.
(WebKit::NetworkStorageManager::deleteDataForRegistrableDomains): Deleted.

  • NetworkProcess/storage/NetworkStorageManager.h:
  • NetworkProcess/storage/OriginStorageManager.cpp:

(WebKit::OriginStorageManager::StorageBucket::typeStoragePath const):
(WebKit::OriginStorageManager::StorageBucket::fileSystemStorageManager):
(WebKit::OriginStorageManager::OriginStorageManager):
(WebKit::OriginStorageManager::StorageBucket::toStorageIdentifier): Deleted.
(WebKit::OriginStorageManager::StorageBucket::isActive): Deleted.
(WebKit::OriginStorageManager::StorageBucket::deleteData): Deleted.
(WebKit::OriginStorageManager::StorageBucket::deleteFileSystemStorageData): Deleted.
(WebKit::OriginStorageManager::isActive): Deleted.
(WebKit::OriginStorageManager::deleteData): Deleted.

  • NetworkProcess/storage/OriginStorageManager.h:
  • Shared/WebsiteData/WebsiteData.cpp:

(WebKit::WebsiteData::ownerProcess):

  • Shared/WebsiteData/WebsiteDataType.h:
  • UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:

(dataTypesToString):

  • UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:

(WebKit::toWebsiteDataType):
(WebKit::toWKWebsiteDataTypes):

  • UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(+[WKWebsiteDataStore _allWebsiteDataTypesIncludingPrivate]):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::didReceiveMessage):

  • WebProcess/WebCoreSupport/WebFileSystemStorageConnection.messages.in: Removed.

Source/WTF:

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::readEntireFile): Deleted.
(WTF::FileSystemImpl::deleteAllFilesModifiedSince): Deleted.

  • wtf/FileSystem.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm:
1:58 PM Changeset in webkit [286568] by weinig@apple.com
  • 10 edits
    1 add in trunk

[CSS Color 5] Update color-mix() to support srgb-linear and alpha premultiplication
https://bugs.webkit.org/show_bug.cgi?id=233862

Reviewed by Cameron McCormack.

Source/WebCore:

  • Updates color-mix() to support srgb-linear interpolation.
  • Updates color-mix() to interpolate using alpha premultiplied colors.
  • Moves interpolation normalization to ColorInterpolation.h so that it can be shared in the future. Adds AlphaPremulitplied parameter to ColorInterpolationMethod to allow specifying the behavior desired. Also adds encoding/decoding of ColorInterpolationMethod which will be needed shortly.
  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:

Add new files.

  • css/CSSValueKeywords.in:

Add reference (commented out, since it is also defined above) for srgb-linear in the color-mix section.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeColorInterpolationMethod):
Add support for parsing srgb-linear as a color-interpolation-method color space.

(WebCore::CSSPropertyParserHelpers::makeCanonicalColor):
(WebCore::CSSPropertyParserHelpers::makeCanonicalColor<HWBA<float>>):
(WebCore::CSSPropertyParserHelpers::makeCanonicalColor<HSLA<float>>):
With much of makeColorTypeByNormalizingComponentsAfterMix moving to ColorNormalization,
the CSS specific parts are still needed here, which just convert HWBA and HSLA colors
to SRGBA<uint8_t> to match parsing.

(WebCore::CSSPropertyParserHelpers::mixColorComponentsUsingColorInterpolationMethod):
Utilize new interpolateColorComponents<> function to do the interpolation.

(WebCore::CSSPropertyParserHelpers::normalizeHue): Deleted.
(WebCore::CSSPropertyParserHelpers::normalizeWhitenessBlackness): Deleted.
(WebCore::CSSPropertyParserHelpers::makeColorTypeByNormalizingComponentsAfterMix): Deleted.
(WebCore::CSSPropertyParserHelpers::makeColorTypeByNormalizingComponentsAfterMix<HWBA<float>>): Deleted.
(WebCore::CSSPropertyParserHelpers::makeColorTypeByNormalizingComponentsAfterMix<HSLA<float>>): Deleted.
(WebCore::CSSPropertyParserHelpers::makeColorTypeByNormalizingComponentsAfterMix<LCHA<float>>): Deleted.
(WebCore::CSSPropertyParserHelpers::makeColorTypeByNormalizingComponentsAfterMix<OKLCHA<float>>): Deleted.
Moved to ColorNormalization.h

  • platform/graphics/ColorInterpolation.h:

(WebCore::preInterpolationNormalizationForComponent):
(WebCore::preInterpolationNormalization):
(WebCore::postInterpolationNormalizationForComponent):
(WebCore::postInterpolationNormalization):
(WebCore::interpolateColorComponents):
Move complete interpolation here from CSSPropertyParserHelpers and add support for optionally
interpolating using alpha premultiplied colors.

(WebCore::ColorInterpolationMethod::encode const):
(WebCore::ColorInterpolationMethod::decode):
Add encode/decode for ColorInterpolationMethod so it can be used over IPC. Not currently needed
but will be needed soon for use with Gradient.

  • platform/graphics/ColorModels.h:

Add coordinateSystem constexpr property to each model. Used mostly to identify which color models have
special behavior due to a hue component.

  • platform/graphics/ColorNormalization.h: Added.

(WebCore::normalizeWhitenessBlackness):
(WebCore::normalizeHue):
(WebCore::makeColorTypeByNormalizingComponents):
(WebCore::makeColorTypeByNormalizingComponents<HWBA<float>>):
(WebCore::makeColorTypeByNormalizingComponents<HSLA<float>>):
(WebCore::makeColorTypeByNormalizingComponents<LCHA<float>>):
(WebCore::makeColorTypeByNormalizingComponents<OKLCHA<float>>):
Split out of CSSPropertyParserHelpers so it can be used by the interpolation code.

LayoutTests:

Update test and results to also test the srgb-linear color space and also to
specifically test colors with and without alpha, updating the results for the
new premuliplied results.

  • fast/css/parsing-color-mix-expected.txt:
  • fast/css/parsing-color-mix.html:
1:36 PM Changeset in webkit [286567] by mark.lam@apple.com
  • 2 edits in trunk/Source/WebKit

Reverting local test code that should not have been landed.

Not reviewed.

  • UIProcess/Cocoa/ModelElementControllerCocoa.mm:
1:31 PM Changeset in webkit [286566] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Momentum Event Dispatcher: Momentum phase runs backwards with natural scrolling disabled
https://bugs.webkit.org/show_bug.cgi?id=233894
<rdar://problem/86111948>

Reviewed by Simon Fraser.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp:

(WebKit::MomentumEventDispatcher::consumeDeltaForCurrentTime):
Only flip the deltas if the trackpad is configured to use "natural"
scrolling (in which "directionInvertedFromDevice" is true).

(WebKit::MomentumEventDispatcher::computeNextDelta):
Fix initial queue state logging to log both axes before setting the "did log" bit.

1:15 PM Changeset in webkit [286565] by Simon Fraser
  • 4 edits in trunk/Source

Add a call to os_signpost to tag a momentum scroll animation
https://bugs.webkit.org/show_bug.cgi?id=233885

Reviewed by Tim Horton.

Source/WebCore:

Use the momentum "Began" and "Ended" events to mark the start/end of a momentum scroll
as an animation via os_signost.

Put the code in ScrollingEffectsController rather than MomentumEventDispatcher so that
non-generated momentum gets marked too.

  • platform/mac/ScrollingEffectsController.mm:

(WebCore::ScrollingEffectsController::handleWheelEvent):

Source/WTF:

  • wtf/SystemTracing.h:
1:06 PM Changeset in webkit [286564] by beidson@apple.com
  • 6 edits
    2 copies in trunk/Source/WebKit

Put webpushd code in WebKit.framework.
https://bugs.webkit.org/show_bug.cgi?id=233886

Reviewed by Alex Christensen.

This fixes some build/mastering/linking issues.

  • Configurations/webpushd.xcconfig:
  • Shared/API/Cocoa/WKMain.h:
  • Shared/API/Cocoa/WKMain.mm:

(WKWebPushDaemonMain):

  • WebKit.xcodeproj/project.pbxproj:
  • webpushd/WebPushDaemonMain.h: Copied from Source/WebKit/Shared/API/Cocoa/WKMain.mm.
  • webpushd/WebPushDaemonMain.mm:

(WebKit::WebPushDaemonMain):
(main): Deleted.

  • webpushd/webpushd.cpp: Copied from Source/WebKit/Shared/API/Cocoa/WKMain.mm.

(main):

1:03 PM Changeset in webkit [286563] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

REGRESSION (r286527): Three API tests crashing under WebKit::ProcessLauncher::launchProcess()
https://bugs.webkit.org/show_bug.cgi?id=233882
<rdar://problem/86111726>

Reviewed by Brent Fulgham.

Correct the eventHandler to capture the process name, rather than using a raw pointer to the character string.

  • UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm:

(WebKit::ProcessLauncher::launchProcess):

1:01 PM Changeset in webkit [286562] by commit-queue@webkit.org
  • 2 edits in trunk/PerformanceTests

[RAMification] Add support for dumping smaps rollups on Linux
https://bugs.webkit.org/show_bug.cgi?id=233867

Patch by Zan Dobersek <zdobersek@igalia.com> on 2021-12-06
Reviewed by Yusuke Suzuki.

Add the option to dump smaps rollup after the end of each RAMification
test case. This mirrors the vmmap functionality and is implemented
alongside that option.

Once the jsc binary is left idle after the test case run, the
smaps_rollup output for the given jsc process is collected from the
proc filesystem. This material is then printed out after the test
is done, following the memory footprint dump.

For now this prefers the smaps_rollup instead of the complete smaps.
In this form, it already gives a good insight into the balance between
the proportional and residential set size amounts. Complete smaps could
be beneficial later, especially if we can implement differentiation
between allocations of different types and/or purposes.

  • JetStream2/RAMification.py:

(parseArgs):
(BaseRunner.init):
(BaseRunner.getResults):
(LocalRunner.runOneTest):
(main):
(main.runTestList):

12:52 PM Changeset in webkit [286561] by Russell Epstein
  • 1 copy in branches/safari-613.1.11-branch

New branch.

12:04 PM Changeset in webkit [286560] by Devin Rousso
  • 22 edits in trunk/Source

Change IDL Date to be backed by WallTime to avoid confusion when converting to native dates
https://bugs.webkit.org/show_bug.cgi?id=233781

Reviewed by Darin Adler.

JS Date is milliseconds-based, but some native dates (e.g. NSDate) are seconds-based.
WallTime will help avoid confusion since not a generic type (e.g. double) and instead
has explicitly defined conversion methods to seconds, milliseconds, etc..

Source/WebCore:

  • bindings/IDLTypes.h:

(WebCore::IDLDate::nullValue):
(WebCore::IDLDate::isNullValue):
(WebCore::IDLDate::extractValueFromNullable):

  • bindings/js/JSDOMConvertDate.h:

(WebCore::Converter<IDLDate>::convert):
(WebCore::JSConverter<IDLDate>::convert):

  • bindings/js/JSDOMConvertDate.cpp:

(WebCore::jsDate):
(WebCore::valueToDate):

  • Modules/applepay/ApplePayLineItem.h:

(WebCore::ApplePayLineItem::decode):

  • Modules/applepay/cocoa/PaymentSummaryItemsCocoa.mm:

(WebCore::toDate):

  • bindings/js/IDBBindingUtilities.cpp:

(WebCore::get):
(WebCore::toJS):
(WebCore::createIDBKeyFromValue):

  • html/BaseDateAndTimeInputType.h:
  • html/DateTimeLocalInputType.cpp:

(WebCore::DateTimeLocalInputType::valueAsDate const):
(WebCore::DateTimeLocalInputType::setValueAsDate const):

  • html/BaseDateAndTimeInputType.cpp:

(WebCore::BaseDateAndTimeInputType::valueAsDate const):
(WebCore::BaseDateAndTimeInputType::setValueAsDate const):

  • html/DateTimeLocalInputType.h:
  • html/HTMLInputElement.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::valueAsDate const):
(WebCore::HTMLInputElement::setValueAsDate):

  • html/InputType.h:
  • html/InputType.cpp:

(WebCore::InputType::valueAsDate const):
(WebCore::InputType::setValueAsDate const):

  • html/MonthInputType.h:
  • html/MonthInputType.cpp:

(WebCore::MonthInputType::valueAsDate const):

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

(WebCore::HTMLMediaElement::getStartDate const):
This also fixes an apparently longstanding bug in that MediaTime::toDouble is apparently a
seconds-based value, so this is the one case that doesn't need Seconds::fromMilliseconds.

Source/WebKitLegacy/mac:

  • DOM/DOMInternal.h:

(kit):
(core):

  • DOM/DOMHTMLMediaElement.mm:

(-[DOMHTMLMediaElement getStartDate]):

12:02 PM Changeset in webkit [286559] by Russell Epstein
  • 9 edits in branches/safari-613.1.10-branch/Source

Versioning.

WebKit-7613.1.10.2

11:45 AM Changeset in webkit [286558] by Patrick Angle
  • 17 edits
    3 adds in trunk

Web Inspector: Support Cascade Layers in the Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=233208

Reviewed by Devin Rousso.

Source/JavaScriptCore:

Add new values to CSS.Grouping's type enum for cascade layers and make the text optional since an
anonymous layer will not have a name or other text.

  • inspector/protocol/CSS.json:

Source/WebCore:

Test: inspector/css/getMatchedStylesForNodeLayerGrouping.html

Add support for parsing and grouping CSS @layer rules in InspectorStyleSheet to the existing paths for
handling other groupings so that the frontend is made aware of rules wrapped inside a layer or multiple layers.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • CompiledSelector.h needs to be exported as a private header to include in WebKitLegacy's build, since it is

imported by StyleRule.h, which is now imported by CSSImportRule.h, which is imported in WebKitLegacy.

  • css/CSSImportRule.cpp:

(WebCore::CSSImportRule::cascadeLayerName const):

  • css/CSSImportRule.h:
  • css/CSSLayerRule.cpp:

(WebCore::CSSLayerRule::cssText const):
(WebCore::CSSLayerRule::layerName const):
(WebCore::CSSLayerRule::stringFromCascadeLayerName):

  • css/CSSLayerRule.h:
  • inspector/InspectorStyleSheet.cpp:

(flattenSourceData):
(WebCore::asCSSRuleList):
(WebCore::buildArrayForGroupings):

  • style/InspectorCSSOMWrappers.cpp:

(WebCore::Style::InspectorCSSOMWrappers::collect):

Source/WebInspectorUI:

  • UserInterface/Models/CSSGrouping.js:

(WI.CSSGrouping):
(WI.CSSGrouping.prototype.get isLayer):
(WI.CSSGrouping.prototype.get prefix):

  • Update CSSGrouping to support @layer rules, and make text optional for a grouping, since anonymous layers

will not have a name.

  • UserInterface/Models/CSSStyleDeclaration.js:

(WI.CSSStyleDeclaration.prototype.generateFormattedText):

  • Ensure that spacing remains correct and "null" isn't shown for groupings without text.
  • UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:

(WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):

  • When merging layer groups, ensure that a "." is used as a separator, and that each group has a name (to

prevent having a hanging period or the "null" text appearing).

LayoutTests:

Add new test cases for CSS.getMatchesStyleForNode to make sure that layer groupings are correctly determined,
and that rules nested in @layer rules and @import layer()s are correctly represented and sorted by the order
they are applied to an element.

  • inspector/css/getMatchedStylesForNode-expected.txt:
  • Re-baseline to account for change in order of CSSGrouping properties in the protocol due to text now being

optional.

  • inspector/css/getMatchedStylesForNodeLayerGrouping-expected.txt: Added.
  • inspector/css/getMatchedStylesForNodeLayerGrouping.html: Added.
  • inspector/css/resources/external-layers.css: Added.
11:45 AM Changeset in webkit [286557] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[iOS][WP] Block access to unused IOKit class
https://bugs.webkit.org/show_bug.cgi?id=233866
<rdar://problem/86086475>

Reviewed by Brent Fulgham.

Block access to IOKit class IOMobileFramebufferUserClient in the WebContent process' sandbox on iOS,
which is unused according to telemetry.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
  • UIProcess/WebPageProxy.cpp:

(WebKit::gpuIOKitClasses):

11:45 AM Changeset in webkit [286556] by Wenson Hsieh
  • 4 edits in trunk/Source/WebCore

Unreviewed, add some missing #includes in WebCore

Add several missing #include-s, which currently aren't causing any issues due to unified sources (but will
once I introduce several new source files in WebCore/Modules in a future patch).

  • Modules/web-locks/WebLockRegistry.cpp:
  • page/Page.cpp:
  • page/PageConfiguration.h:
11:30 AM Changeset in webkit [286555] by graouts@webkit.org
  • 17 edits
    6 copies
    6 adds in trunk

[Web Animations] Add a way to run scripted animations
https://bugs.webkit.org/show_bug.cgi?id=233869
rdar://85983542

Reviewed by Dean Jackson.

Source/WebCore:

Tests: webanimations/custom-effect/custom-effect.html

webanimations/custom-effect/document-timeline-animate.html

This patch adds two new Web-exposed features to allow authors to write callback-based animations
leveraging the full power of the Web Animations model.

First, we add a new AnimationEffect subclass which wraps a callback to be executed on every tick
of the associated animation's timeline: CustomEffect. It can be constructed by providing a JS function
as its first parameter, and either a number or a dictionary to provide timing properties for the effect.
This is similar to how KeyframeEffect will accept a keyframes object and then timing data. The callback
is provided the effect progress as its sole parameter. Web authors can use this new interface as follows:

const animation = new Animation;
animation.effect = new CustomEffect(progress => { … }, 1000);
animation.play();

Second, to make starting callback-based animations more straightforward and in a very similar fashion
to how keyframe animations can be initiated on an element using Element.animate(), we introduce a new
animate() method on DocumentTimeline, allowing the previous exmaple to be written as:

const animation = document.timeline.animate(progress => { … }, 1000);

This simple approach allows Web authors to move past the simple use of requestAnimationFrame() and harness
the Web Animations timing model which will let them pause and resume animations, seek them, control their
playback rate, apply easing, respond to the "finished" promise, etc.

The code itself is very simple, CustomEffect is simply an AnimationEffect subclass that indicates that it's
always interested in scheduling updates while active using the ticksContinouslyWhileActive() method. This
means that all the scheduling logic contained in WebAnimation and AnimationEffect applies, allowing callbacks
to not be fired when the animation is paused or when the page is suspended, or fired sparingly when a steps()
timing function is specified.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/AnimationEffect.h:

(WebCore::AnimationEffect::isCustomEffect const):

  • animation/CustomAnimationOptions.h: Added.
  • animation/CustomAnimationOptions.idl: Added.
  • animation/CustomEffect.cpp: Added.

(WebCore::CustomEffect::create):
(WebCore::CustomEffect::CustomEffect):
(WebCore::CustomEffect::animationDidTick):

  • animation/CustomEffect.h: Added.

(WebCore::CustomEffect::~CustomEffect):

  • animation/CustomEffect.idl: Added.
  • animation/CustomEffectCallback.h: Added.
  • animation/CustomEffectCallback.idl: Added.
  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::animate):

  • animation/DocumentTimeline.h:
  • animation/DocumentTimeline.idl:
  • bindings/js/WebCoreBuiltinNames.h:

Source/WTF:

Add a new experimental feature for the CustomEffect interface.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

LayoutTests:

Add tests for the new CustomEffect interface and the document.timeline.animate() method.
These are written using WPT libraries such that they may be upstreamed to the WPT repository
in the future if and when the CustomEffect interface is standardized.

  • platform/win/TestExpectations:
  • webanimations/custom-effect/custom-effect-expected.txt: Added.
  • webanimations/custom-effect/custom-effect.html: Added.
  • webanimations/custom-effect/document-timeline-animate-expected.txt: Added.
  • webanimations/custom-effect/document-timeline-animate.html: Added.
11:22 AM Changeset in webkit [286554] by jonlee@apple.com
  • 6 edits in trunk

Update GPU Process feature flags
https://bugs.webkit.org/show_bug.cgi?id=232547
rdar://83905400

Reviewed by Wenson Hsieh.

Source/WTF:

Move features enabled by default to internal. DOM and WebGL are experimental.

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

Tools:

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(parse_args): Update features that are set when using run-webkit-tests --use-gpu-process.

  • WebKitTestRunner/TestOptions.cpp:

(WTR::TestOptions::defaults): Turn off DOM Rendering on layout test bots for the time being.

11:13 AM Changeset in webkit [286553] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Null check in shouldUseBreakElement
https://bugs.webkit.org/show_bug.cgi?id=229275

Patch by Rob Buis <rbuis@igalia.com> on 2021-12-06
Reviewed by Ryosuke Niwa.

Source/WebCore:

Need to null check node in shouldUseBreakElement.
Also bail out early in InsertLineBreakCommand::doApply
in case position is not editable.

Test: editing/execCommand/insert-line-break-crash.html

  • editing/InsertLineBreakCommand.cpp:

(WebCore::InsertLineBreakCommand::shouldUseBreakElement):
(WebCore::InsertLineBreakCommand::doApply):

LayoutTests:

  • editing/execCommand/insert-line-break-crash-expected.txt: Added.
  • editing/execCommand/insert-line-break-crash.html: Added.
11:00 AM Changeset in webkit [286552] by commit-queue@webkit.org
  • 6 edits in trunk

[iOS] Allow WKWebView clients to override undoManager
https://bugs.webkit.org/show_bug.cgi?id=233297
<rdar://problem/85526549>

Patch by Matt Gilligan <matthew_gilligan@apple.com> on 2021-12-06
Reviewed by Wenson Hsieh.

Source/WebKit:

Move WKContentView's undoManager up the responder chain to WKWebView so web view
subclasses can customize the undo manager used when WKContentView is first responder.

Test: KeyboardInputTests.OverrideUndoManager

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView undoManager]):
Return the undo manager provided by _contentView when it is current.

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

(-[WKContentView undoManagerForWebView]):
Provide the view's undo manager via this property so that -undoManager will look up the
responder chain to WKWebView.

(-[WKContentView undoManager]): Deleted.

Tools:

  • TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:

(-[CustomUndoManagerWebView undoManager]):
(TestWebKitAPI::TEST):

10:49 AM Changeset in webkit [286551] by Russell Epstein
  • 1 copy in tags/Safari-613.1.10.1

Tag Safari-613.1.10.1.

10:46 AM Changeset in webkit [286550] by Tadeu Zagallo
  • 28 edits
    2 adds in trunk

Restore navigator.hardwareConcurrency
https://bugs.webkit.org/show_bug.cgi?id=233381
<rdar://85023911>

Reviewed by Saam Barati.

LayoutTests/imported/w3c:

  • web-platform-tests/html/dom/idlharness.https-expected.txt:
  • web-platform-tests/html/dom/idlharness.worker-expected.txt:
  • web-platform-tests/workers/WorkerNavigator-hardware-concurrency.any.worker-expected.txt:

Source/WebCore:

Navigator.hardwareConcurrency was removed in r219379, but it is now used
by emscripten to implement std::thread::hardware_concurrency()

Test: fast/dom/navigator-hardwareConcurrency.html

  • page/Navigator.idl:
  • page/NavigatorBase.cpp:

(WebCore::NavigatorBase::hardwareConcurrency):

  • page/NavigatorBase.h:
  • page/WorkerNavigator.idl:

LayoutTests:

  • fast/dom/Window/resources/window-property-collector.js:

(emitExpectedResult):

  • fast/dom/navigator-detached-no-crash-expected.txt:
  • fast/dom/navigator-hardwareConcurrency-expected.txt: Added.
  • fast/dom/navigator-hardwareConcurrency.html: Added.
  • fast/workers/resources/worker-navigator.js:
  • fast/workers/worker-navigator-expected.txt:
  • platform/glib/imported/w3c/web-platform-tests/html/dom/idlharness.worker-expected.txt:
  • platform/gtk/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/ipad/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/win/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/wincairo/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/wpe/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
10:40 AM Changeset in webkit [286549] by Lauro Moura
  • 2 edits in trunk/Source/WebKit

REGRESSION(r286535) [GTK] Fix clean builds after DerivedSources/WebKit2 move
https://bugs.webkit.org/show_bug.cgi?id=233881

Reviewed by Žan Doberšek.

Build fix. Covered by exiting tests.

  • PlatformGTK.cmake: Add symbolic links for the public generated like

we do for the regular headers. It happened to work before because they
were created already in a webkit2 folder.

10:35 AM Changeset in webkit [286548] by Russell Epstein
  • 9 edits in branches/safari-613.1.10-branch/Source

Versioning.

WebKit-7613.1.10.1

10:27 AM Changeset in webkit [286547] by Wenson Hsieh
  • 2 edits in trunk/Tools

[iOS] AppHighlights.AppHighlightCreateAndRestoreAndScroll is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=233828

Reviewed by Tim Horton.

This test began to sometimes fail on iOS 15 API test runners in EWS after enabling APP_HIGHLIGHTS in non-
internal builds. Make this test more robust by waiting for scrolling to the restored highlight.

  • TestWebKitAPI/Tests/WebKitCocoa/WKAppHighlights.mm:

(TestWebKitAPI::TEST):

10:20 AM Changeset in webkit [286546] by Said Abou-Hallawa
  • 14 edits in trunk

[GPU Process] (REGRESSION r285597): Set the filterRegion of the CSSFilter after it is created
https://bugs.webkit.org/show_bug.cgi?id=233849

Reviewed by Cameron McCormack.

Source/WebCore:

In this patch:

  1. sourceImageRect is no longer passed as an argument to SVGFilter. It should be passed only when SVGFilter::apply() is called.
  1. CSSFilter::create() will create and build the FilterFunctions from the FilterOperations. So we have to pass the targetBoundingBox since the FilterEffects will need it when calculating the outsets.
  1. The steps in RenderLayerFilters::beginFilterEffect() are: a) Recreate the CSSFilter if the targetBoundingBox changes. b) Calculate the filterRegion = targetBoundingBox + outsets c) Clamp the filterRegion if needed. This will change the filterScale. d) Set sourceImageRect = filterRegion. e) Recreate the sourceImage if needed. f) setup the context for drawing the target renderer.
  1. Managing the targetBoundingBox and the filterRegion is moved from CSSFilter to RenderLayerFilters.
  • css/CSSFilterImageValue.cpp:

(WebCore::CSSFilterImageValue::image):

  • platform/graphics/filters/Filter.cpp:

(WebCore::Filter::Filter):

  • platform/graphics/filters/Filter.h:

(WebCore::Filter::Filter):

  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::create):
(WebCore::CSSFilter::CSSFilter):
(WebCore::createSVGFilter):
(WebCore::CSSFilter::buildFilterFunctions):
(WebCore::CSSFilter::apply):
(WebCore::CSSFilter::setFilterRegion):
(WebCore::m_hasFilterThatShouldBeRestrictedBySecurityOrigin): Deleted.
(WebCore::CSSFilter::updateBackingStoreRect): Deleted.
(WebCore::CSSFilter::computeSourceImageRectForDirtyRect): Deleted.
(WebCore::CSSFilter::setSourceImageRect): Deleted.

  • rendering/CSSFilter.h:
  • rendering/RenderLayerFilters.cpp:

(WebCore::RenderLayerFilters::buildFilter):
(WebCore::RenderLayerFilters::allocateBackingStoreIfNeeded):
(WebCore::RenderLayerFilters::beginFilterEffect):
(WebCore::RenderLayerFilters::applyFilterEffect):
(WebCore::RenderLayerFilters::allocateBackingStore): Deleted.

  • rendering/RenderLayerFilters.h:
  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::applyResource):

  • rendering/svg/SVGRenderTreeAsText.cpp:

(WebCore::writeSVGResourceContainer):

  • svg/graphics/filters/SVGFilter.cpp:

(WebCore::SVGFilter::create):
(WebCore::SVGFilter::SVGFilter):

  • svg/graphics/filters/SVGFilter.h:

LayoutTests:

Unskip layout tests which were skipped in r285597.

9:46 AM Changeset in webkit [286545] by commit-queue@webkit.org
  • 12 edits in trunk

WKWebpagePreferences._activeContentRuleListActionPatterns should be an NSDictionary of identifier to allowed patterns
https://bugs.webkit.org/show_bug.cgi?id=233842

Patch by Alex Christensen <achristensen@webkit.org> on 2021-12-06
Reviewed by Timothy Hatcher.

Source/WebCore:

There's no need for nil to match everything because a pattern can be written to quickly match everything.
There is a need for different extensions (with different identifiers) to have different active action permissions, though.

  • contentextensions/ContentExtensionsBackend.cpp:

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

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::DocumentLoader):
(WebCore::DocumentLoader::setActiveContentRuleListActionPatterns):
(WebCore::DocumentLoader::allowsActiveContentRuleListActionsForURL const):

  • loader/DocumentLoader.h:

Source/WebKit:

  • Shared/WebsitePoliciesData.cpp:

(WebKit::WebsitePoliciesData::decode):

  • Shared/WebsitePoliciesData.h:
  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/Cocoa/WKWebpagePreferences.mm:

(-[WKWebpagePreferences _setActiveContentRuleListActionPatterns:]):
(-[WKWebpagePreferences _activeContentRuleListActionPatterns]):

  • UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm:

(navigationDelegateAllowingActiveActionsOnTestHost):
(TEST_F):

9:20 AM Changeset in webkit [286544] by graouts@webkit.org
  • 6 edits in trunk/Source/WebCore

Clean up virtual methods on AnimationEffect
https://bugs.webkit.org/show_bug.cgi?id=233868

Reviewed by Simon Fraser.

To this day, the only concrete subclass of AnimationEffect has been KeyframeEffect. Soon, we'll introduce
another concrete subclass for callback-based animations leveraging the Web Animations mode: CustomEffect.
To prepare for this new class, we clean up the virtual methods on AnimationEffect such that they make a
bit more sense:

  • much of the implementation of timeToNextTick() is brought from KeyframeEffect to AnimationEffect to

account for the cases which are purely based on timing properties shared by any potential AnimationEffect
subclass,

  • we add a new ticksContinouslyWhileActive() method which allows subclasses to indicate whether they require

continuous scheduling while active, which is true for KeyframeEffect unless it has no keyframes, no CSS
properties set on its keyframes or is running fully accelerated,

  • much of the implementation of setAnimation() is brought from KeyframeEffect to AnimationEffect since

updating the relevance of the animation based on a change of effect should apply to any AnimationEffect,

  • the apply() and invalidate() methods are moved from AnimationEffect to KeyframeEffect alone since they

really are specific to KeyframeEffect's interaction with style resolution,

  • all the other virtual methods on AnimationEffect have stub implementations such that new subclasses

only need to override them as required: animationDidTick(), animationDidPlay(),
animationDidChangeTimingProperties(), animationWasCanceled(), animationSuspensionStateDidChange(bool)
and animationTimelineDidChange(AnimationTimeline*).

  • animation/AnimationEffect.cpp:

(WebCore::AnimationEffect::setAnimation):
(WebCore::AnimationEffect::timeToNextTick const):

  • animation/AnimationEffect.h:

(WebCore::AnimationEffect::animationDidTick):
(WebCore::AnimationEffect::animationDidPlay):
(WebCore::AnimationEffect::animationDidChangeTimingProperties):
(WebCore::AnimationEffect::animationWasCanceled):
(WebCore::AnimationEffect::animationSuspensionStateDidChange):
(WebCore::AnimationEffect::animationTimelineDidChange):
(WebCore::AnimationEffect::ticksContinouslyWhileActive const):
(WebCore::AnimationEffect::setAnimation): Deleted.
(WebCore::AnimationEffect::timeToNextTick const): Deleted.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::setAnimation):
(WebCore::KeyframeEffect::ticksContinouslyWhileActive const):
(WebCore::KeyframeEffect::timeToNextTick const):

  • animation/KeyframeEffect.h:
  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::invalidateEffect):
(WebCore::WebAnimation::resolve):
(WebCore::WebAnimation::timeToNextTick const):

6:35 AM Changeset in webkit [286543] by Nikolas Zimmermann
  • 5 edits in trunk/Source

[LBSE] Toggling the Settings -> Enabled LBSE flag has no immediate effect
https://bugs.webkit.org/show_bug.cgi?id=233871

Reviewed by Rob Buis.

Toggling "Enable layer-based SVG engine" in e.g. MiniBrowser or from JS has no immediate effect.
A relayout is not enough: a full style / render tree rebuild is needed.

Source/WebCore:

Covered by existing tests.

  • page/SettingsBase.cpp:

(WebCore::SettingsBase::layerBasedSVGEngineEnabledChanged): Rebuild style / renderers upon changes.

  • page/SettingsBase.h:

Source/WTF:

  • Scripts/Preferences/WebPreferencesInternal.yaml: When "LayerBasedSVGEngineEnabled" changes call

WebCore::SettingsBase::layerBasedSVGEngineEnabledChanged() to assure the switch from legacy to
LBSE engine and vice-versa is live and doesn't need reloads to take effect.

6:28 AM Changeset in webkit [286542] by Nikolas Zimmermann
  • 17 edits in trunk/Source/WebCore

[LBSE] Add RenderObject::isSVGRootOrLegacySVGRoot() helper
https://bugs.webkit.org/show_bug.cgi?id=233870

Reviewed by Rob Buis.

Preparations to begin a new RenderSVGRoot implementation for the
layer-based SVG engine (LBSE).

Add a helper function to identify either legacy SVG or LBSE root
render objects (LegacyRenderSVGRoot and the upcoming RenderSVGRoot).

Covered by existing tests, no change in behavior.

  • accessibility/AXObjectCache.cpp:

(WebCore::createFromRenderer):

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::boundingBoxRect const):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):

  • dom/Element.cpp:

(WebCore::Element::boundingAbsoluteRectWithoutLayout):

  • inspector/InspectorOverlay.cpp:

(WebCore::buildRendererHighlight):

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForChild):

  • rendering/RenderGeometryMap.cpp:

(WebCore::canMapBetweenRenderersViaLayers):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::beginTransparencyLayers):
(WebCore::RenderLayer::calculateClipRects const):

  • rendering/RenderLayer.h:

(WebCore::RenderLayer::canUseOffsetFromAncestor const):

  • rendering/RenderObject.cpp:

(WebCore::objectIsRelayoutBoundary):

  • rendering/RenderObject.h:

(WebCore::RenderObject::isLegacySVGRoot const):
(WebCore::RenderObject::isSVGRootOrLegacySVGRoot const):

  • rendering/RenderReplaced.cpp:

(WebCore::hasIntrinsicSize):

  • rendering/RenderView.cpp:

(WebCore::RenderView::layout):

  • rendering/svg/LegacyRenderSVGRoot.h:
  • rendering/svg/SVGRenderSupport.cpp:

(WebCore::layoutSizeOfNearestViewportChanged):

  • rendering/svg/SVGRenderingContext.cpp:

(WebCore::SVGRenderingContext::prepareToRenderSVGContent):
(WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):

  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::reportVisuallyNonEmptyContent):

12:13 AM Changeset in webkit [286541] by Antti Koivisto
  • 6 edits in trunk/Source/WebCore

[LFC][Integration] Use end bits in text box iterator
https://bugs.webkit.org/show_bug.cgi?id=233858

Reviewed by Alan Bujtas.

Make text box traversal work correctly in bidi context where encountering a different
layout box does not necessarily mean there are no further text boxes for the layout box.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):
(WebCore::Layout::InlineDisplayContentBuilder::computeIsFirstIsLastBoxForInlineContent):

Set the bits for all box types.

  • layout/formattingContexts/inline/display/InlineDisplayBox.h:

(WebCore::InlineDisplay::Box::Box):
(WebCore::InlineDisplay::Box::isTextOrSoftLineBreak const):
(WebCore::InlineDisplay::Box::isFirstForLayoutBox const):
(WebCore::InlineDisplay::Box::isLastForLayoutBox const):
(WebCore::InlineDisplay::Box::setIsFirstForLayoutBox):
(WebCore::InlineDisplay::Box::setIsLastForLayoutBox):
(WebCore::InlineDisplay::Box::isFirstBox const): Deleted.
(WebCore::InlineDisplay::Box::isLastBox const): Deleted.
(WebCore::InlineDisplay::Box::setIsLastBox): Deleted.
(WebCore::InlineDisplay::Box::setIsFirstBox): Deleted.

Renamed for clarity and correctness.

  • layout/integration/InlineIteratorBoxModernPath.h:

(WebCore::InlineIterator::BoxModernPath::isText const):
(WebCore::InlineIterator::BoxModernPath::traverseNextTextBox):

Use the isLastForLayoutBox bit to end the traversal.

(WebCore::InlineIterator::BoxModernPath::traverseNextInlineBox):
(WebCore::InlineIterator::BoxModernPath::traversePreviousInlineBox):
(WebCore::InlineIterator::BoxModernPath::traverseNextWithSameLayoutBox):
(WebCore::InlineIterator::BoxModernPath::traversePreviousWithSameLayoutBox):

Factor into helpers.

  • layout/integration/InlineIteratorTextBox.h:
12:13 AM Changeset in webkit [286540] by youenn@apple.com
  • 2 edits in trunk/Source/WTF

Enable NavigationPreloadManager by default
https://bugs.webkit.org/show_bug.cgi?id=233755

Reviewed by Chris Dumez.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
12:05 AM Changeset in webkit [286539] by youenn@apple.com
  • 3 edits in trunk/Source/ThirdParty/libwebrtc

Close WebRTC allocation sequence shared socket in case of sequence network failure
https://bugs.webkit.org/show_bug.cgi?id=233808

Reviewed by Geoffrey Garen.

  • Source/webrtc/p2p/client/basic_port_allocator.cc:
  • Source/webrtc/p2p/client/basic_port_allocator.h:

Dec 5, 2021:

9:49 PM Changeset in webkit [286538] by Said Abou-Hallawa
  • 59 edits
    1 add in trunk

[GPU Process] Add the encoding/decoding for Filter and FilterEffect
https://bugs.webkit.org/show_bug.cgi?id=232844

Reviewed by Wenson Hsieh.

Source/WebCore:

This patch adds the encoding and decoding for the FilterEffect and the
Filter objects. Because these objects have super-classes, we are going
to do the encoding and decoding through a new IPC class called
FilterReference.

The encoding and decoding of these classes will be needed in two cases:

1) DisplayList::Recorder::drawFilteredImageBuffer()
2) RemoteImageBufferProxy::filteredImage()

A few things have not be done this patch yet:

1) LightSource has not been encoded/decoded
2) FELighting classes have not been encoded/decoded
3) FEImage has not been encoded/decoded
4) SVGFilter has not been encoded/decoded

This patch does not change any behavior even if the GPU Process for DOM
rendering is enabled. The sourceImage for the filter and the filter image
need to be of type of RemoteImageBufferProxy to this code to be called.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/ConcreteImageBuffer.h:
  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::drawFilteredImageBuffer):

  • platform/graphics/GraphicsContext.h:
  • 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::DrawFilteredImageBuffer::DrawFilteredImageBuffer):
(WebCore::DisplayList::DrawFilteredImageBuffer::apply const):
(WebCore::DisplayList::DrawFilteredImageBuffer::apply):
(WebCore::DisplayList::operator<<):

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::DrawFilteredImageBuffer::sourceImageIdentifier const):
(WebCore::DisplayList::DrawFilteredImageBuffer::sourceImageRect const):
(WebCore::DisplayList::DrawFilteredImageBuffer::globalBounds const):
(WebCore::DisplayList::DrawFilteredImageBuffer::localBounds const):

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::drawFilteredImageBuffer):

  • platform/graphics/displaylists/DisplayListRecorder.h:
  • platform/graphics/displaylists/DisplayListRecorderImpl.cpp:

(WebCore::DisplayList::RecorderImpl::recordDrawFilteredImageBuffer):

  • platform/graphics/displaylists/DisplayListRecorderImpl.h:
  • platform/graphics/filters/FEBlend.h:

(WebCore::FEBlend::encode const):
(WebCore::FEBlend::decode):

  • platform/graphics/filters/FEColorMatrix.h:

(WebCore::FEColorMatrix::encode const):
(WebCore::FEColorMatrix::decode):

  • platform/graphics/filters/FEComponentTransfer.h:

(WebCore::ComponentTransferFunction::encode const):
(WebCore::ComponentTransferFunction::decode):
(WebCore::FEComponentTransfer::encode const):
(WebCore::FEComponentTransfer::decode):

  • platform/graphics/filters/FEComposite.h:

(WebCore::FEComposite::encode const):
(WebCore::FEComposite::decode):

  • platform/graphics/filters/FEConvolveMatrix.h:

(WebCore::FEConvolveMatrix::encode const):
(WebCore::FEConvolveMatrix::decode):

  • platform/graphics/filters/FEDiffuseLighting.h:

(WebCore::FEDiffuseLighting::decode):

  • platform/graphics/filters/FEDisplacementMap.h:

(WebCore::FEDisplacementMap::encode const):
(WebCore::FEDisplacementMap::decode):

  • platform/graphics/filters/FEDropShadow.h:

(WebCore::FEDropShadow::encode const):
(WebCore::FEDropShadow::decode):

  • platform/graphics/filters/FEFlood.h:

(WebCore::FEFlood::encode const):
(WebCore::FEFlood::decode):

  • platform/graphics/filters/FEGaussianBlur.h:

(WebCore::FEGaussianBlur::encode const):
(WebCore::FEGaussianBlur::decode):

  • platform/graphics/filters/FELighting.h:

(WebCore::FELighting::encode const):
(WebCore::FELighting::decode):

  • platform/graphics/filters/FEMerge.cpp:

(WebCore::FEMerge::create):
(WebCore::FEMerge::FEMerge):

  • platform/graphics/filters/FEMerge.h:

(WebCore::FEMerge::encode const):
(WebCore::FEMerge::decode):

  • platform/graphics/filters/FEMorphology.h:

(WebCore::FEMorphology::encode const):
(WebCore::FEMorphology::decode):

  • platform/graphics/filters/FEOffset.h:

(WebCore::FEOffset::encode const):
(WebCore::FEOffset::decode):

  • platform/graphics/filters/FESpecularLighting.h:

(WebCore::FESpecularLighting::decode):

  • platform/graphics/filters/FETile.h:
  • platform/graphics/filters/FETurbulence.h:

(WebCore::FETurbulence::encode const):
(WebCore::FETurbulence::decode):

  • platform/graphics/filters/Filter.cpp:

(WebCore::Filter::apply):

  • platform/graphics/filters/Filter.h:

(WebCore::Filter::setClipOperation):

  • platform/graphics/filters/SourceGraphic.h:
  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::create):
(WebCore::CSSFilter::CSSFilter):

  • rendering/CSSFilter.h:
  • rendering/RenderLayerFilters.cpp:

(WebCore::RenderLayerFilters::applyFilterEffect):

  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::postApplyResource):

  • svg/SVGFEMergeElement.cpp:

(WebCore::SVGFEMergeElement::build const):

Source/WebKit:

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::drawFilteredImageBuffer):

  • GPUProcess/graphics/RemoteDisplayListRecorder.h:
  • GPUProcess/graphics/RemoteDisplayListRecorder.messages.in:
  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::getFilteredImageForImageBuffer):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/graphics/RemoteRenderingBackend.messages.in:
  • Platform/IPC/FilterReference.h: Added.

(IPC::FilterReference::FilterReference):
(IPC::FilterReference::takeFilter):
(IPC::FilterReference::encodeFilterEffect):
(IPC::FilterReference::decodeFilterEffect):
(IPC::FilterReference::encodeSVGFilter):
(IPC::FilterReference::decodeSVGFilter):
(IPC::FilterReference::encodeCSSFilter):
(IPC::FilterReference::decodeCSSFilter):
(IPC::FilterReference::encodeFilter):
(IPC::FilterReference::decodeFilter):
(IPC::FilterReference::encode const):
(IPC::FilterReference::decode):

  • Scripts/webkit/messages.py:

(types_that_cannot_be_forward_declared):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:

(WebKit::RemoteDisplayListRecorderProxy::recordDrawFilteredImageBuffer):

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:

(WebKit::RemoteRenderingBackendProxy::getFilteredImage):

  • WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp:
  • TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:
8:40 PM Changeset in webkit [286537] by Simon Fraser
  • 6 edits in trunk

Add trace points for generated momentum events
https://bugs.webkit.org/show_bug.cgi?id=233857

Reviewed by Tim Horton.

Source/WebKit:

Add start/end points for synthetic momentum, and a trace point for each generated event.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp:

(WebKit::MomentumEventDispatcher::dispatchSyntheticMomentumEvent):
(WebKit::MomentumEventDispatcher::didStartMomentumPhase):
(WebKit::MomentumEventDispatcher::didEndMomentumPhase):

Source/WTF:

  • wtf/SystemTracing.h:

Tools:

Add start/end points for synthetic momentum, and a trace point for each generated event.

  • Tracing/SystemTracePoints.plist:

Dec 4, 2021:

8:14 PM Changeset in webkit [286536] by Andres Gonzalez
  • 3 edits in trunk/Tools

Change WTR::AccessibilityUIElement::descriptionOfValue(id) to return a RetainPtr.
https://bugs.webkit.org/show_bug.cgi?id=233815
<rdar://problem/86019373>

Reviewed by Chris Fleizach.

This fixes several tests in isolated tree mode, in particular:
accessibility/mac/focus-crash.html
accessibility/mac/search-predicate.html

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::descriptionOfValue const):
(WTR::AccessibilityUIElement::allAttributes):
(WTR::AccessibilityUIElement::stringDescriptionOfAttributeValue):
(WTR::AccessibilityUIElement::role):
(WTR::AccessibilityUIElement::subrole):
(WTR::AccessibilityUIElement::roleDescription):
(WTR::AccessibilityUIElement::computedRoleString):
(WTR::AccessibilityUIElement::title):
(WTR::AccessibilityUIElement::description):
(WTR::AccessibilityUIElement::orientation const):
(WTR::AccessibilityUIElement::stringValue):
(WTR::AccessibilityUIElement::language):
(WTR::AccessibilityUIElement::helpText const):
(WTR::AccessibilityUIElement::embeddedImageDescription const):

7:51 PM Changeset in webkit [286535] by mmaxfield@apple.com
  • 9 edits in trunk

Rename DerivedSources/WebKit2 to DerivedSources/WebKit
https://bugs.webkit.org/show_bug.cgi?id=233803

Reviewed by Tim Horton.

Mechanical rename.

No new tests because there is no behavior change.

  • Configurations/BaseTarget.xcconfig:
  • DerivedSources-output.xcfilelist:
  • PlatformGTK.cmake:
  • Scripts/generate-derived-sources.sh:
  • Scripts/generate-unified-sources.sh:
  • UnifiedSources-output.xcfilelist:
  • WebKit.xcodeproj/project.pbxproj:
8:51 AM Changeset in webkit [286534] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Compute isFirstBox/isLastBox for text content
https://bugs.webkit.org/show_bug.cgi?id=233850

Reviewed by Antti Koivisto.

This is in preparation for helping the iterator interface to compute renderer (layout box) boundaries for text content.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::appendTextDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::computeIsFirstIsLastBoxForInlineContent):

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.h:
  • layout/formattingContexts/inline/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
(WebCore::Layout::InlineFormattingContext::lineLayoutForIntergration):

  • layout/formattingContexts/inline/display/InlineDisplayBox.h:

(WebCore::InlineDisplay::Box::setIsFirstBox):

8:08 AM Changeset in webkit [286533] by beidson@apple.com
  • 2 edits
    7 adds in trunk/Source/WebKit

Add command line webpushtool for daemon development and debugging.
https://bugs.webkit.org/show_bug.cgi?id=233845

Reviewed by Tim Horton.

No behavior change.

This utility will eventually be quite fleshed out.

For now, it can act as a terminal that prints debug messages from webpushd.

  • Configurations/webpushtool.xcconfig: Added.
  • Resources/webpushtool.entitlements: Added.
  • WebKit.xcodeproj/project.pbxproj:
  • WebKit.xcodeproj/xcshareddata/xcschemes/webpushtool.xcscheme: Added.
  • webpushd/webpushtool/WebPushToolConnection.h: Added.
  • webpushd/webpushtool/WebPushToolConnection.mm: Added.

(WebPushTool::Connection::create):
(WebPushTool::maybeConnectToService):
(WebPushTool::Connection::Connection):
(WebPushTool::Connection::connectToService):
(WebPushTool::Connection::startAction):
(WebPushTool::Connection::startDebugStreamAction):
(WebPushTool::Connection::sendAuditToken):
(WebPushTool::Connection::connectionDropped):
(WebPushTool::Connection::messageReceived):

  • webpushd/webpushtool/WebPushToolMain.mm: Added.

(printUsageAndTerminate):
(main):

7:28 AM Changeset in webkit [286532] by graouts@webkit.org
  • 5 edits
    2 adds in trunk

CSS animation sorting may crash due to AnimationList copy upon CSS Animation removal
https://bugs.webkit.org/show_bug.cgi?id=233819
rdar://85596065

Reviewed by Dean Jackson and Darin Adler.

Source/WebCore:

Test: webanimations/css-animation-sorting-crash-2.html

When resolving animations during style resolution, we sort them to ensure they're in the right
composite order as defined by the Web Animations and related specifications, in this case the
CSS Animations specification defining how CSS Animations set on a given element are sorted.

Indeed, a given element may have multiple animations specified on it, and in fact it may have
multiple instances of the same animation. For instance, setting animation-name: anim, anim, anim
would create three separate CSS Animations all with the same keyframes and timing properties.

The CSS machinery within WebKit creates an AnimationList to reference the animations parsed from
CSS. Each animation is an Animation object. These Animation objects are ref-counted.

When we update animations, using Styleable::updateCSSAnimations(), we compare the current AnimationList
for this style resolution, with the previous AnimationList specified when this method was last called
for this element. The outcome of this comparison will yield new CSSAnimation objects, the removal of
such objects or the update of existing objects by setting the Animation object as its "backing animation".

When we're done we keep a reference to the current AnimationList on the element's KeyframeEffectStack.

Later, when we resolve animations during style resolution and we get to sort the animations, we will
use the AnimationList which contains the Animation objects in the order they were specified in the
animation-list property to establish the order in which the CSSAnimation objects should be ordered
relative to one another, based on their "backing animation" which must be an Animation object found
in the AnimationList.

If we fail to find matching Animation objects, we crash due to a call to RELEASE_ASSERT_NOT_REACHED()
in compareCSSAnimations(const CSSAnimation&, const CSSAnimation&).

So, why would we ever get in a situation where we reach this RELEASE_ASSERT_NOT_REACHED? Well, there is
a situation where we manipulate the AnimationList set on the KeyframeEffectStack in Styleable::updateCSSAnimations().
That case is when Styleable::cancelDeclarativeAnimations() is called, and we call the static function
removeCSSAnimationCreatedByMarkup(). In this function, we actually make a copy of the previously recorded
AnimationList because that list is const so we can't manipulate it directly. To make this copy we call
AnimationList::copy() which creates a new AnimationList object, which itself is not the issue, but also
makes copies of each Animation object within. Now, that's the problem, because at this point our pointer
comparisons in compareCSSAnimations() will fail since the Animation objects we recorded in
Styleable::updateCSSAnimations() will no longer be the same instances as those in the manipulated AnimationList.

To fix this, we add a new AnimationList::shallowCopy() method to specify whether we want clones or references
of the Animation members, and when calling removeCSSAnimationCreatedByMarkup(), we use this new method such
that we get references and not clones. This ensures that removing an animation from the list will indeed
create a new AnimationList, but the two lists will have references to the same Animation objects.

  • platform/animation/AnimationList.cpp:

(WebCore::AnimationList::AnimationList):

  • platform/animation/AnimationList.h:

(WebCore::AnimationList::copy const):
(WebCore::AnimationList::shallowCopy const):

  • style/Styleable.cpp:

(WebCore::removeCSSAnimationCreatedByMarkup):

LayoutTests:

Add a test that used to crash before this patch.

  • webanimations/css-animation-sorting-crash-2-expected.txt: Added.
  • webanimations/css-animation-sorting-crash-2.html: Added.
7:24 AM Changeset in webkit [286531] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

Fix parentNode in CompositeEditCommand::splitTreeToNode
https://bugs.webkit.org/show_bug.cgi?id=230710

Patch by Rob Buis <rbuis@igalia.com> on 2021-12-04
Reviewed by Ryosuke Niwa.

Source/WebCore:

Fix parentNode handling in CompositeEditCommand::splitTreeToNode and
also a few more IndentOutdentCommand methods to support the test case.

Test: editing/execCommand/outdent-cut-crash.html

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::moveParagraphs):

  • editing/IndentOutdentCommand.cpp:

(WebCore::IndentOutdentCommand::indentIntoBlockquote): do not call positionInParentAfterNode
if insertNodeBefore failed.
(WebCore::IndentOutdentCommand::outdentParagraph): need to check for null positions
before calling moveParagraphs.

LayoutTests:

  • editing/execCommand/outdent-cut-crash-expected.txt: Added.
  • editing/execCommand/outdent-cut-crash.html: Added.
7:22 AM Changeset in webkit [286530] by Tyler Wilcock
  • 7 edits in trunk/LayoutTests

AX: Make ellipsis-text.html, aria-roledescription.html, and aria-switch-checked.html pass in isolated tree mode
https://bugs.webkit.org/show_bug.cgi?id=233790

Reviewed by Chris Fleizach.

  • accessibility/aria-roledescription-expected.txt:
  • accessibility/aria-roledescription.html:
  • accessibility/aria-switch-checked-expected.txt:
  • accessibility/aria-switch-checked.html:

Make these tests async. They must be made async to pass in
isolated tree mode as they dynamically change page content using JS.

  • accessibility/ellipsis-text.html:

Make this test isolated-tree-friendly by selecting elements with accessibleElementById instead
document.getElementById("id").focus() and accessibilityController.focusedElement

  • platform/glib/accessibility/aria-roledescription-expected.txt:

Update platform-specfic expectation for the new version of this test.

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

[LFC][IFC] Set BoxGeometry for bidi inline boxes
https://bugs.webkit.org/show_bug.cgi?id=233616

Reviewed by Antti Koivisto.

In this patch we compute the BoxGeometry values for the bidi inline boxes.
BoxGeometry is mostly used for boundingClientRect/offsetWidth(left etc).

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

1:13 AM Changeset in webkit [286528] by commit-queue@webkit.org
  • 12 edits in trunk/Source/WebCore

Prepare for SharedWorker implementation
https://bugs.webkit.org/show_bug.cgi?id=233848

Patch by Alex Christensen <achristensen@webkit.org> on 2021-12-04
Reviewed by Chris Dumez.

This splits off the parts of bug 230382 that don't change behavior.

  • workers/AbstractWorker.cpp:

(WebCore::AbstractWorker::workerFetchOptions):

  • workers/AbstractWorker.h:
  • workers/DedicatedWorkerThread.h:
  • workers/Worker.cpp:

(WebCore::Worker::Worker):
(WebCore::Worker::create):
(WebCore::Worker::notifyFinished):

  • workers/Worker.h:
  • workers/WorkerOptions.h:
  • workers/WorkerOrWorkletScriptController.cpp:
  • workers/WorkerOrWorkletScriptController.h:
  • workers/WorkerThread.cpp:

(WebCore::WorkerThread::createThread):

  • workers/WorkerThread.h:

(WebCore::WorkerThread::isServiceWorkerThread const): Deleted.

  • workers/service/context/ServiceWorkerThread.h:
12:28 AM Changeset in webkit [286527] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

[Cocoa] Launch Captive Portal WebContent process when requested
https://bugs.webkit.org/show_bug.cgi?id=233824
<rdar://problem/86023898>

Reviewed by Darin Adler.

When the WebKit client requests a Captive Portal process, launch the dedicated XPC service
with Captive Portal entitlements.

  • UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm:

(WebKit::webContentServiceName): New helper function.
(WebKit::serviceName): Update to use new helper.
(WebKit::ProcessLauncher::launchProcess): Log errors when launching.

  • WebKit.xcodeproj/project.pbxproj: Include the CaptivePortal xpc service when creating

development symlinks.

Dec 3, 2021:

10:12 PM Changeset in webkit [286526] by Said Abou-Hallawa
  • 13 edits in trunk

[GPU Process] (REGRESSION r285597): Fix SVGFilter clamping calculation
https://bugs.webkit.org/show_bug.cgi?id=233843

Reviewed by Simon Fraser.

Source/WebCore:

In this patch:

  1. lastEffect() is made virtual function of Filter and it's already implemented as non-virtual function in both CSSFilter and SVGFilter.
  1. The clamping calculations for SVGFilter and CSSFilter are merged in one function called Filter::clampFilterRegionIfNeeded(). This merge makes the new function is the only caller to FilterEffect::maxEffectRect().
  1. Remove FilterEffect::maxEffectRect() . It can be calculated by clipping the FilterEffect::filterPrimitiveSubregion() to filterRegion() and then scaling the result by filterScale().
  1. In RenderSVGResourceFilter::applyResource() we need to pass the non- scaled drawingRegion to ImageBuffer::sizeNeedsClamping() because this function starts by scaling the argument 'size' by the argument 'scale'. So we were doubling the scaling by passing 'absoluteDrawingRegion'
  1. SVGRenderingContext::createImageBuffer() needs to use ImageBuffer:: sizeNeedsClamping() instead of using ImageBuffer::clampedSize(). The former function clamps the size to the MaxClampedArea. But the later function shrinks the size to { MaxClampedLength, MaxClampedLength }.
When calling createImageBuffer() from RenderSVGResourceFilter
applyResource() we do not expect any further clamping. But if we pass a size with a side greater than MaxClampedLength to clampedSize(), it will be clamped even if the area is less than MaxClampedArea. And for filters we clamp to the area.
  • platform/graphics/filters/Filter.cpp:

(WebCore::Filter::clampFilterRegionIfNeeded):

  • platform/graphics/filters/Filter.h:
  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::determineFilterPrimitiveSubregion):
(WebCore::FilterEffect::apply):

  • platform/graphics/filters/FilterEffect.h:

(WebCore::FilterEffect::maxEffectRect const): Deleted.
(WebCore::FilterEffect::setMaxEffectRect): Deleted.

  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::lastEffect const):
(WebCore::CSSFilter::lastEffect): Deleted.
(WebCore::CSSFilter::determineFilterPrimitiveSubregion): Deleted.

  • rendering/CSSFilter.h:
  • rendering/RenderLayerFilters.cpp:

(WebCore::RenderLayerFilters::beginFilterEffect):

  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::applyResource):

  • rendering/svg/SVGRenderingContext.cpp:

(WebCore::SVGRenderingContext::createImageBuffer):

  • svg/graphics/filters/SVGFilter.h:

LayoutTests:

Unskip two layout tests which were skipped in r285597.

7:30 PM Changeset in webkit [286525] by Lauro Moura
  • 3 edits in trunk/LayoutTests

[GLIB] Gardening some consistent timeouts

Unreviewed test gardening.

  • platform/glib/TestExpectations:
  • platform/wpe/TestExpectations:
7:08 PM Changeset in webkit [286524] by Russell Epstein
  • 1 copy in tags/Safari-612.4.2

Tag Safari-612.4.2.

7:05 PM Changeset in webkit [286523] by Russell Epstein
  • 8 edits in branches/safari-612-branch/Source

Versioning.

WebKit-7612.4.2

5:35 PM Changeset in webkit [286522] by Wenson Hsieh
  • 4 edits in trunk

[iOS] Web content process sometimes crashes under WebPage::positionInformation()
https://bugs.webkit.org/show_bug.cgi?id=233841
rdar://85917212

Reviewed by Geoffrey Garen.

Source/WebKit:

Add a missing null check in the case where the hit-tested node is null in WebPage::positionInformation. This
can happen in a number of ways (one of which is exercised by the new API test).

Test: ImageAnalysisTests.DoNotCrashWhenHitTestingOutsideOfWebView

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::positionInformation):

Tools:

Add a test that exercises hit-testing for Live Text, but induces this crash by hit-testing outside of the bounds
of the web view (such that the hit-tested node ends up as null).

  • TestWebKitAPI/Tests/WebKitCocoa/ImageAnalysisTests.mm:

(TestWebKitAPI::swizzledLocationInView):
(TestWebKitAPI::TEST):

5:14 PM Changeset in webkit [286521] by Russell Epstein
  • 1 copy in tags/Safari-612.4.1

Tag Safari-612.4.1.

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

Add BroadcastChannel, COOP, COEP and Web Locks to features.json
https://bugs.webkit.org/show_bug.cgi?id=233839

Reviewed by Alex Christensen.

  • features.json:
4:02 PM Changeset in webkit [286519] by wilander@apple.com
  • 24 edits in trunk

PCM: Unlinkable tokens for triggering event to prevent fraud
https://bugs.webkit.org/show_bug.cgi?id=233673
<rdar://79426347>

Reviewed by Alex Christensen.

Source/WebCore:

This patch allows triggering events to have an optional query parameter like this:
https://destination.example/.well-known/private-click-measurement/trigger-attribution/11?attributionDestinationNonce=ABCDEFabcdef0123456789

The presence of an attributionDestinationNonce triggers PrivateClickMeasurementManager to
ask the server to sign an unlinkable token for the triggering event and then stores the
corresponding secret token plus the signature for later inclusion in the attribution report.

The WebCore changes introduce these new structs and data fields in
WebCore::PrivateClickMeasurement:

  • EphemeralDestinationNonce
  • UnlinkableToken (base class for the specific ones for source and destination)
  • SourceUnlinkableToken
  • DestinationUnlinkableToken
  • SecretToken (base class for the specific ones for source and destination)
  • SourceSecretToken
  • DestinationSecretToken

WebCore::PrivateClickMeasurement::AttributionTriggerData now has these optional fields:

  • ephemeralDestinationNonce
  • destinationUnlinkableToken
  • destinationSecretToken
  • destinationSite

The remaining changes are setters/getters and creator functions for those data fields.

New API/unit test PrivateClickMeasurement.DestinationClickFraudPrevention.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::parsePrivateClickMeasurement const):

  • loader/PrivateClickMeasurement.cpp:

(WebCore::PrivateClickMeasurement::SecretToken::isolatedCopy const):
(WebCore::PrivateClickMeasurement::SourceSecretToken::isolatedCopy const):
(WebCore::PrivateClickMeasurement::DestinationSecretToken::isolatedCopy const):
(WebCore::PrivateClickMeasurement::EphemeralNonce::isolatedCopy const):
(WebCore::PrivateClickMeasurement::UnlinkableToken::isolatedCopy const):
(WebCore::PrivateClickMeasurement::SourceUnlinkableToken::isolatedCopy const):
(WebCore::PrivateClickMeasurement::DestinationUnlinkableToken::isolatedCopy const):
(WebCore::PrivateClickMeasurement::parseAttributionRequestQuery):
(WebCore::PrivateClickMeasurement::parseAttributionRequest):
(WebCore::PrivateClickMeasurement::attributionReportJSON const):
(WebCore::PrivateClickMeasurement::EphemeralNonce::isValid const):
(WebCore::PrivateClickMeasurement::setEphemeralSourceNonce):
(WebCore::PrivateClickMeasurement::tokenPublicKeyURL):
(WebCore::PrivateClickMeasurement::tokenPublicKeyURL const):
(WebCore::PrivateClickMeasurement::tokenSignatureURL):
(WebCore::PrivateClickMeasurement::tokenSignatureURL const):
(WebCore::PrivateClickMeasurement::AttributionTriggerData::tokenSignatureJSON const):
(WebCore::PrivateClickMeasurement::SecretToken::isValid const):
(WebCore::PrivateClickMeasurement::setDestinationSecretToken):
(WebCore::PrivateClickMeasurement::EphemeralSourceNonce::isolatedCopy const): Deleted.
(WebCore::PrivateClickMeasurement::EphemeralSourceNonce::isValid const): Deleted.
(WebCore::PrivateClickMeasurement::SourceSecretToken::isValid const): Deleted.

  • loader/PrivateClickMeasurement.h:

(WebCore::PrivateClickMeasurement::AttributionTriggerData::AttributionTriggerData):
(WebCore::PrivateClickMeasurement::AttributionTriggerData::setDestinationUnlinkableTokenValue):
(WebCore::PrivateClickMeasurement::AttributionTriggerData::setDestinationSecretToken):
(WebCore::PrivateClickMeasurement::AttributionTriggerData::tokenPublicKeyURL const):
(WebCore::PrivateClickMeasurement::AttributionTriggerData::tokenSignatureURL const):
(WebCore::PrivateClickMeasurement::ephemeralSourceNonce const):
(WebCore::PrivateClickMeasurement::sourceUnlinkableToken):
(WebCore::PrivateClickMeasurement::decode):
(WebCore::PrivateClickMeasurement::EphemeralNonce::encode const):
(WebCore::PrivateClickMeasurement::EphemeralNonce::decode):
(WebCore::PrivateClickMeasurement::AttributionTriggerData::encode const):
(WebCore::PrivateClickMeasurement::AttributionTriggerData::decode):
(WebCore::PrivateClickMeasurement::EphemeralSourceNonce::encode const): Deleted.
(WebCore::PrivateClickMeasurement::EphemeralSourceNonce::decode): Deleted.

  • loader/cocoa/PrivateClickMeasurementCocoa.mm:

(WebCore::PrivateClickMeasurement::calculateAndUpdateSourceUnlinkableToken):
(WebCore::PrivateClickMeasurement::calculateAndUpdateDestinationUnlinkableToken):
(WebCore::PrivateClickMeasurement::calculateAndUpdateUnlinkableToken):
(WebCore::PrivateClickMeasurement::calculateAndUpdateSourceSecretToken):
(WebCore::PrivateClickMeasurement::calculateAndUpdateDestinationSecretToken):
(WebCore::PrivateClickMeasurement::calculateAndUpdateSecretToken):

Source/WebKit:

This patch allows triggering events to have an optional query parameter like this:
https://destination.example/.well-known/private-click-measurement/trigger-attribution/11?attributionDestinationNonce=ABCDEFabcdef0123456789

The presence of an attributionDestinationNonce triggers PrivateClickMeasurementManager to
ask the server to sign an unlinkable token for the triggering event and then stores the
corresponding secret token plus the signature for later inclusion in the attribution report.

New API/unit test PrivateClickMeasurement.DestinationClickFraudPrevention.

  • NetworkProcess/DatabaseUtilities.cpp:

(WebKit::DatabaseUtilities::buildPrivateClickMeasurementFromDatabase const):

Now handles destination tokens.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::willSendRedirectedRequest):

Now sets destinationSite in WebCore::PrivateClickMeasurement::AttributionTriggerData.

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.cpp:

(WebKit::PCM::Database::Database):

Now calls addDestinationTokenColumnsIfNecessary().

(WebKit::PCM::Database::insertPrivateClickMeasurement):

Now does insertion of optional destination tokens.

(WebKit::PCM::Database::addDestinationTokenColumnsIfNecessary):

Database migration.

(WebKit::PCM::Database::addBundleIDColumnIfNecessary): Deleted.

Temporary migration function for non-customer builds. No longer needed.

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.h:
  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManager.cpp:

(WebKit::PrivateClickMeasurementManager::storeUnattributed):

Just name changes.

(WebKit::PrivateClickMeasurementManager::getTokenPublicKey):

Not changed afaik. Seems like the diff is confused.

(WebKit::PrivateClickMeasurementManager::configureForTokenSigning):

New function to extract shared code.

(WebKit::PrivateClickMeasurementManager::getSignatureBase64URLFromTokenSignatureResponse):

New function to extract shared code.

(WebKit::PrivateClickMeasurementManager::getSignedUnlinkableTokenForSource):

Renamed to add "ForSource" and all shared code extracted.

(WebKit::PrivateClickMeasurementManager::getSignedUnlinkableTokenForDestination):

Different than for the source in that it results in an attribution call.

(PrivateClickMeasurementManager::handleAttribution):

Now does signing of destination token if the optional nonce is in the triggering event.

(PrivateClickMeasurementManager::fireConversionRequest):
(WebKit::PrivateClickMeasurementManager::setPCMFraudPreventionValuesForTesting):

Added empty initializer strings for the destination test token values not in use yet.

(WebKit::PrivateClickMeasurementManager::getSignedUnlinkableToken): Deleted.

Renamed PrivateClickMeasurementManager::getSignedUnlinkableTokenForSource().

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementManager.h:

Tools:

New test PrivateClickMeasurement.DestinationClickFraudPrevention.
The other changes are a report version bump 2->3 and a name change
FraudPrevention–>SourceClickFraudPrevention.

  • TestWebKitAPI/Tests/WebCore/PrivateClickMeasurement.cpp:

(TestWebKitAPI::TEST):

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

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:

(TestWebKitAPI::runBasicPCMTest):
(TestWebKitAPI::triggerAttributionWithSubresourceRedirect):

Extracted shared code.

(TestWebKitAPI::runDestinationWebView):

Extracted shared code.

(TestWebKitAPI::signUnlinkableTokenAndSendSecretToken):

Extracted shared code.

(TestWebKitAPI::TEST):

New test PrivateClickMeasurement.DestinationClickFraudPrevention.
Extracted shared code from PrivateClickMeasurement.SourceClickFraudPrevention.

LayoutTests:

These changes are a report version bump 2->3.

  • http/tests/privateClickMeasurement/attribution-conversion-through-fetch-keepalive-expected.txt:
  • http/tests/privateClickMeasurement/expired-attribution-report-gets-sent-on-session-start-expected.txt:
  • http/tests/privateClickMeasurement/multiple-app-bundle-ids-expected.txt:
  • http/tests/privateClickMeasurement/send-attribution-conversion-request-expected.txt:
  • http/tests/privateClickMeasurement/store-private-click-measurement-with-source-nonce-expected.txt:
  • http/tests/privateClickMeasurement/triggering-event-with-attribution-source-through-fetch-keepalive-expected.txt:
  • platform/ios/http/tests/privateClickMeasurement/attribution-conversion-through-fetch-keepalive-expected.txt:
3:42 PM Changeset in webkit [286518] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Move the (bidi)display boxes horizontally by the inline box margin, border and padding end as needed
https://bugs.webkit.org/show_bug.cgi?id=233744

Reviewed by Antti Koivisto.

Keep track of the inline box range in the context of display boxes so that we can adjust the content horizontally
with the margin/border/padding end of the "last" inline box.
We also set the width of the (fragmented inline box type of) display boxes here based on their content right position.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

  • layout/formattingContexts/inline/display/InlineDisplayBox.h:

(WebCore::InlineDisplay::Box::setLogicalRight):

  • layout/layouttree/LayoutBoxGeometry.h:

(WebCore::Layout::BoxGeometry::borderAndPaddingEnd const):

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

Fix playstation build after r286484
https://bugs.webkit.org/show_bug.cgi?id=233823

unreviewed build fix.

Patch by ujwal koneru <ujwal.koneru@sony.com> on 2021-12-03

  • UIProcess/playstation/WebProcessPoolPlayStation.cpp:

(WebKit::WebProcessPool::platformInitializeWebProcess):

  • WebProcess/playstation/WebProcessPlayStation.cpp:

(WebKit::WebProcess::platformInitializeWebProcess):

2:48 PM Changeset in webkit [286516] by fpizlo@apple.com
  • 5 edits
    1 add in trunk/Source/bmalloc

[libpas] Bitfit allocator has a wrong assertion when a page's max_free is enough for the size of an allocation, not enough for that allocation's size class, and the object of that size is not aligned to the currently requested alignment
https://bugs.webkit.org/show_bug.cgi?id=233831

Reviewed by Yusuke Suzuki.

What a combination of conditions:

  • We just failed bitfit allocation in a page, which gives us some max_free (aka largest_available), and the allocation had nontrivial alignment.
  • The max_free is smaller than the size class.
  • The max_free is larger than the requested size.
  • The max_free object is not aligned to the requested alignment.


The code handles this fine, but has a wrong assertion about it.

This change fixes the assertion and adds a test that deterministically reproduced the issue.

  • libpas/libpas.xcodeproj/project.pbxproj:
  • libpas/src/libpas/pas_bitfit_allocator.c:

(pas_bitfit_allocator_finish_failing):

  • libpas/src/libpas/pas_bitfit_allocator_inlines.h:

(pas_bitfit_allocator_try_allocate):

  • libpas/src/test/BitfitTests.cpp: Added.

(std::getBitfitSizeClasses):
(std::assertSizeClasses):
(std::testAllocateAlignedSmallerThanSizeClassAndSmallerThanLargestAvailable):
(addBitfitTests):

  • libpas/src/test/TestHarness.cpp:

(main):

1:58 PM Changeset in webkit [286515] by Russell Epstein
  • 1 copy in tags/Safari-613.1.10

Tag Safari-613.1.10.

1:46 PM Changeset in webkit [286514] by Chris Dumez
  • 2 edits in trunk/Source/WTF

[WK2] Turn on Web Locks API support
https://bugs.webkit.org/show_bug.cgi?id=233816

Reviewed by Darin Adler.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
1:14 PM Changeset in webkit [286513] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Fix the build

  • NetworkProcess/storage/NetworkStorageManager.cpp:
1:10 PM Changeset in webkit [286512] by timothy_horton@apple.com
  • 4 edits in trunk/Source/WebKit

Add more logging for MomentumEventDispatcher
https://bugs.webkit.org/show_bug.cgi?id=233811

Reviewed by Simon Fraser.

Add a temporary event log to MomentumEventDispatcher, to debug delta/offset/curve issues.

  • WebProcess/WebPage/EventDispatcher.h:

(WebKit::EventDispatcher::queue):

  • WebProcess/WebPage/MomentumEventDispatcher.cpp:

(WebKit::MomentumEventDispatcher::handleWheelEvent):
Accumulate event deltas. Also accumulate event deltas for the
fingers-down phase in the "generated" offset. Store the phase and
momentum phase smooshed into a single field.

(WebKit::MomentumEventDispatcher::dispatchSyntheticMomentumEvent):
Accumulate generated deltas.

(WebKit::MomentumEventDispatcher::didEndMomentumPhase):
Attempt to dump the log 1 second after each momentum phase. We'll skip
it if another scroll has started since.

(WebKit::MomentumEventDispatcher::setScrollingAccelerationCurve):
(WebKit::MomentumEventDispatcher::startDisplayLink):
(WebKit::MomentumEventDispatcher::stopDisplayLink):
(WebKit::MomentumEventDispatcher::consumeDeltaForCurrentTime):
(WebKit::MomentumEventDispatcher::buildOffsetTableWithInitialDelta):
(WebKit::MomentumEventDispatcher::computeNextDelta):
Adopt more MOMENTUM_EVENT_DISPATCHER_TEMPORARY_LOGGING. Error logging
we leave outside of this, because that we'll keep around.

(WebKit::MomentumEventDispatcher::pushLogEntry):
(WebKit::MomentumEventDispatcher::flushLog):
Dump the event log in an easy-to-copy-into-a-CSV format.

  • WebProcess/WebPage/MomentumEventDispatcher.h:
12:37 PM Changeset in webkit [286511] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

Fix internal Apple builds

Unreviewed.

Turns out -weak_framework works if the framework isn't present at runtime, but
still requires the framework to be present at build time.

No new tests because there is no behavior change.

  • Configurations/WebCore.xcconfig:
12:29 PM Changeset in webkit [286510] by Russell Epstein
  • 11 edits in branches/safari-612-branch

Cherry-pick r286505. rdar://problem/85918531

Follow-up to r286479 to add API test and address issues found by the test
https://bugs.webkit.org/show_bug.cgi?id=233798

Reviewed by Darin Adler.

Source/WebKit:

Add functionality needed for API testing and fix issues found by the API test.

  • UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
  • UIProcess/API/Cocoa/WKWebViewTesting.mm: (-[WKWebView _isLayerTreeFrozenForTesting:]):
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::destroyProvisionalPage): (WebKit::WebPageProxy::isLayerTreeFrozen):
  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::isLayerTreeFrozen):
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in: Add new SPI to check if the layer tree is frozen in the WebProcess so that I could write an API test for this.
  • UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::ProvisionalPageProxy): Make sure m_provisionalLoadURL gets initialized when the ProvisionalPageProxy gets constructed *after* the provisional load has already started (which is the case when the process swap is triggered by COOP).

(WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
If the provisional load load fails in the provisional process, and the ProvisionalPageProxy
was constructed on resource response (COOP case), then no longer forward the
didFailProvisionalLoadForFrame() to the WebPageProxy. Instead, we destroy the
ProvisionalPageProxy. This is to avoid duplicate calls to didFailProvisionalLoadForFrame().
In this case, there is still a provisional load ongoing in the committed process and the
ProvisionalPageProxy destructor will take care of stopping that provisional load (due to
r286479), which will cause the committed process to send its own
didFailProvisionalLoadForFrame IPC.

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

12:29 PM Changeset in webkit [286509] by Russell Epstein
  • 4 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r286479. rdar://problem/85918531

Regression(r283179) Google Drive freezes after downloading a folder
https://bugs.webkit.org/show_bug.cgi?id=233783
<rdar://85918531>

Reviewed by Darin Adler.

When process-swapping on a navigation response due to COOP, we create a new ProvisionalPageProxy
to trigger a provisional load in a new WebProcess. In the common case, the ProvisionalPageProxy
gets committed, we process-swap and everything works fine. However, if the client decides to
convert the navigation into a download (like in the Google Drive case), then the
ProvisionalPageProxy gets destroyed without being committed. The issue is that the committed
process still thinks at this point that it is in the middle of a navigation and its layer
tree is thus frozen with reason=PageTransition. This is what makes Google Drive look frozen
after the download. This is not an issue with PSON because the process-swap happens in
decidePolicyForNavigationAction() and we tell the previous process to ignore the navigation
when we process-swap.

To address the issue, we now tell the committed process to cancel its navigation if the
ProvisionalPageProxy ends up getting destroyed without being committed. This lets the
committed process know there is no point in waiting for this navigation to happen and allows
it to unfreeze its layer tree.

  • UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::ProvisionalPageProxy): (WebKit::ProvisionalPageProxy::~ProvisionalPageProxy):
  • UIProcess/ProvisionalPageProxy.h: (WebKit::ProvisionalPageProxy::isProcessSwappingOnNavigationResponse const): (WebKit::ProvisionalPageProxy::shouldClosePreviousPageAfterCommit const): Deleted.
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::commitProvisionalPage): (WebKit::WebPageProxy::continueNavigationInNewProcess):

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

12:23 PM Changeset in webkit [286508] by Robert Jenner
  • 6 edits in trunk/Source/WebKit

Unreviewed, reverting r286487.

Broke multiple builds.

Reverted changeset:

"Rename DerivedSources/WebKit2 to DerivedSources/WebKit"
https://bugs.webkit.org/show_bug.cgi?id=233803
https://commits.webkit.org/r286487

12:17 PM Changeset in webkit [286507] by sihui_liu@apple.com
  • 29 edits
    1 add in trunk

Fetch and remove file system data via WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=233567

Reviewed by Youenn Fablet.

Source/WebCore:

  • Modules/filesystemaccess/FileSystemStorageConnection.h:

Source/WebKit:

Introduce a new WebsiteDataType value FileSystem for FileSystemAccess data. Network process now can fetch and
delete this type of data when fetching and deleteing website data (if FileSystem type is included in target
types).

To track origins that have FileSystem data, this patch introduces a new file named origin in the origin's
directory. This file will be created when OriginStorageManager is created.

To delete existing FileSystem data, network process finds origins that are requested to be deleted and have data
on disk, closes active access handles, and deletes the files. The origin file mentioned above will be deleted if
there is no other file left in the same directory, and empty directories will be deleted.

New API tests: FileSystemAccess.FetchAndRemoveData

FileSystemAccess.RemoveDataByModificationTime
FileSystemAccess.FetchDataForThirdParty

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::monitoredDataTypes):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::registrableDomainsWithWebsiteData):

  • NetworkProcess/storage/FileSystemStorageHandle.h:

(WebKit::FileSystemStorageHandle::activeSyncAccessHandle const):

  • NetworkProcess/storage/FileSystemStorageManager.cpp:

(WebKit::FileSystemStorageManager::~FileSystemStorageManager):
(WebKit::FileSystemStorageManager::close):

  • NetworkProcess/storage/FileSystemStorageManager.h:
  • NetworkProcess/storage/NetworkStorageManager.cpp:

(WebKit::readOriginFromFile):
(WebKit::writeOriginToFileIfNecessary):
(WebKit::deleteOriginFileIfNecessary):
(WebKit::originDirectoryPath):
(WebKit::originFilePath):
(WebKit::NetworkStorageManager::localOriginStorageManager):
(WebKit::NetworkStorageManager::removeOriginStorageManagerIfPossible):
(WebKit::toWebsiteDataType):
(WebKit::NetworkStorageManager::forEachOriginDirectory):
(WebKit::NetworkStorageManager::fetchDataFromDisk):
(WebKit::NetworkStorageManager::fetchData):
(WebKit::NetworkStorageManager::deleteDataOnDisk):
(WebKit::NetworkStorageManager::deleteData):
(WebKit::NetworkStorageManager::deleteDataModifiedSince):
(WebKit::NetworkStorageManager::deleteDataForRegistrableDomains):
(WebKit::originPath): Deleted.

  • NetworkProcess/storage/NetworkStorageManager.h:
  • NetworkProcess/storage/OriginStorageManager.cpp:

(WebKit::OriginStorageManager::StorageBucket::toStorageIdentifier):
(WebKit::OriginStorageManager::StorageBucket::typeStoragePath const):
(WebKit::OriginStorageManager::StorageBucket::fileSystemStorageManager):
(WebKit::OriginStorageManager::StorageBucket::isActive):
(WebKit::OriginStorageManager::StorageBucket::deleteData):
(WebKit::OriginStorageManager::StorageBucket::deleteFileSystemStorageData):
(WebKit::OriginStorageManager::OriginStorageManager):
(WebKit::OriginStorageManager::isActive):
(WebKit::OriginStorageManager::deleteData):

  • NetworkProcess/storage/OriginStorageManager.h:
  • Shared/WebsiteData/WebsiteData.cpp:

(WebKit::WebsiteData::ownerProcess):

  • Shared/WebsiteData/WebsiteDataType.h:
  • UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:

(dataTypesToString):

  • UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:

(WebKit::toWebsiteDataType):
(WebKit::toWKWebsiteDataTypes):

  • UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(+[WKWebsiteDataStore _allWebsiteDataTypesIncludingPrivate]):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::didReceiveMessage):

  • WebProcess/WebCoreSupport/WebFileSystemStorageConnection.messages.in: Added.

Source/WTF:

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::readEntireFile): Read whole file content into a Vector.
(WTF::FileSystemImpl::deleteAllFilesModifiedSince): Recursively delete files and folders modified after
specified time in a directory.

  • wtf/FileSystem.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm:
11:52 AM Changeset in webkit [286506] by Russell Epstein
  • 8 edits in branches/safari-613.1.8-branch/Source

Versioning.

WebKit-7613.1.8.4

11:39 AM Changeset in webkit [286505] by Chris Dumez
  • 11 edits in trunk

Follow-up to r286479 to add API test and address issues found by the test
https://bugs.webkit.org/show_bug.cgi?id=233798

Reviewed by Darin Adler.

Source/WebKit:

Add functionality needed for API testing and fix issues found by the API test.

  • UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
  • UIProcess/API/Cocoa/WKWebViewTesting.mm:

(-[WKWebView _isLayerTreeFrozenForTesting:]):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::destroyProvisionalPage):
(WebKit::WebPageProxy::isLayerTreeFrozen):

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

(WebKit::WebPage::isLayerTreeFrozen):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Add new SPI to check if the layer tree is frozen in the WebProcess so that I could
write an API test for this.

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::ProvisionalPageProxy):
Make sure m_provisionalLoadURL gets initialized when the ProvisionalPageProxy gets
constructed *after* the provisional load has already started (which is the case
when the process swap is triggered by COOP).

(WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
If the provisional load load fails in the provisional process, and the ProvisionalPageProxy
was constructed on resource response (COOP case), then no longer forward the
didFailProvisionalLoadForFrame() to the WebPageProxy. Instead, we destroy the
ProvisionalPageProxy. This is to avoid duplicate calls to didFailProvisionalLoadForFrame().
In this case, there is still a provisional load ongoing in the committed process and the
ProvisionalPageProxy destructor will take care of stopping that provisional load (due to
r286479), which will cause the committed process to send its own
didFailProvisionalLoadForFrame IPC.

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
11:21 AM Changeset in webkit [286504] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WTF

Enable Momentum Event Generator by default
https://bugs.webkit.org/show_bug.cgi?id=233807
<rdar://problem/85262515>

Reviewed by Simon Fraser.

  • Scripts/Preferences/WebPreferencesInternal.yaml:

Turn it on for modern WebKit. Adjust the description slightly.

11:06 AM Changeset in webkit [286503] by Lauro Moura
  • 2 edits in trunk/LayoutTests

[GLIB] WPT css-transform transform-interpolation-rotate-slerp.html is flaky img failing after updated in r286002

Unreviewed test gardening.

  • platform/glib/TestExpectations:
10:30 AM Changeset in webkit [286502] by keith_miller@apple.com
  • 11 edits
    1 delete in trunk/Source/JavaScriptCore

Remove StructureIDBlob
https://bugs.webkit.org/show_bug.cgi?id=233723

Reviewed by Yusuke Suzuki.

StructureIDBlob isn't very useful now that StructureIDs are just the
bottom bits of the pointer on 64 bit platforms. In a follow up patch
I'll change the layout of JSCell and Structure so that TypeInfo creation
can be a single load platforms that allow (and don't penalize) misaligned loads.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitStoreStructureWithTypeInfo):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_put_to_scope):

  • runtime/Structure.cpp:

(JSC::Structure::Structure):
(JSC::Structure::addNewPropertyTransition):
(JSC::Structure::removeNewPropertyTransition):
(JSC::Structure::attributeChangeTransition):
(JSC::Structure::nonPropertyTransitionSlow):
(JSC::Structure::setBrandTransition):

  • runtime/Structure.h:

(JSC::Structure::id const):
(JSC::Structure::objectInitializationBlob const):
(JSC::Structure::idBlob const):
(JSC::Structure::isProxy const):
(JSC::Structure::typeInfo const):
(JSC::Structure::indexingType const):
(JSC::Structure::indexingMode const):
(JSC::Structure::fencedIndexingMode):
(JSC::Structure::indexingModeIncludingHistory const):
(JSC::Structure::indexingModeIncludingHistoryOffset):
(JSC::Structure::structureIDOffset): Deleted.

  • runtime/StructureIDBlob.h: Removed.
  • runtime/StructureInlines.h:

(JSC::Structure::hasIndexingHeader const):

  • tools/VMInspectorInlines.h:

(JSC::VMInspector::verifyCellSize):

10:29 AM Changeset in webkit [286501] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

[ Monterey wk2 ] http/tests/media/video-webm-stall.html (layout-test) is a constant text failure
https://bugs.webkit.org/show_bug.cgi?id=233717
rdar://85933254

Reviewed by Peng Liu.

After r274117, we call PlatformMediaSessionManager::setWebMFormatReaderEnabled in GPUProcess with
m_webMParserEnabled instead of the value of m_webMFormatReaderEnabled. Since we (arbitrarily) update WebM
parser enablement before WebM format reader enablement, this means that the first call to update preferences
leaves the WebM format reader disabled on PlatformMediaSessionManager even though it should be enabled. Prior to
the more recent change in r285477, this would be corrected on subsequent calls into
GPUProcessProxy::updatePreferences(), which previously sent GPUProcess::SetWebMFormatReaderEnabled()
messages even if the value of the preference hadn't changed.

r285477 removed those redundant IPC messages when the enablement value hasn't changed, so we can no longer
rely on PlatformMediaSessionManager being eventually updated to true due to m_webMParserEnabled being set to
true. Simply fix this by using m_webMFormatReaderEnabled instead of m_webMParserEnabled.

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::setWebMFormatReaderEnabled):

10:15 AM Changeset in webkit [286500] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Set the first/last box flag on the (bidi fragmented) inline box type of display boxes
https://bugs.webkit.org/show_bug.cgi?id=233743

Reviewed by Antti Koivisto.

Keep track of the last constructed inline box type of display box position so that when we
happen to create another fragment for this same inline box, we can change the 'isLastBox' box to false.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::insertInlineBoxDisplayBoxForBidiBoundary):
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.h:
10:00 AM Changeset in webkit [286499] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Introduce WorkerGlobalScope::type() function
https://bugs.webkit.org/show_bug.cgi?id=233793

Reviewed by Alex Christensen.

Introduce WorkerGlobalScope::type() function to replace isDedicatedWorkerGlobalScope() / isServiceWorkerGlobalScope()
/ isSharedWorkerGlobalScope(). This is extracted from Alex's large patch at Bug 230382.

  • workers/shared/SharedWorkerGlobalScope.h:

(isType):

9:45 AM Changeset in webkit [286498] by BJ Burg
  • 3 edits in trunk/Source/WebKit

Web Inspector: Web Inspector2 crashes after closing if Web Inspector1 closed first
https://bugs.webkit.org/show_bug.cgi?id=233293
<rdar://problem/85526508>

Reviewed by Devin Rousso.

Cache the inspected page's identifier. During frontend teardown, use the cached indentifier
to remove the message receiver that was added to receive messages from the inspected page.

Other operations using m_inspectedPage should be guarded in case that the inspected
page already been closed and destroyed.

  • UIProcess/Inspector/WebInspectorUIProxy.cpp:

(WebKit::WebInspectorUIProxy::createFrontendPage):
(WebKit::WebInspectorUIProxy::closeFrontendPageAndWindow):

  • UIProcess/Inspector/WebInspectorUIProxy.h:
9:36 AM Changeset in webkit [286497] by BJ Burg
  • 3 edits in trunk/Source/WebKit

[Cocoa] Web Inspector: fix completion handler type signature for _WKInspectorExtension methods
https://bugs.webkit.org/show_bug.cgi?id=233792
<rdar://problem/85995314>

Reviewed by Devin Rousso.

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

(-[_WKInspectorExtension evaluateScript:frameURL:contextSecurityOrigin:useContentScriptContext:completionHandler:]):
(-[_WKInspectorExtension evaluateScript:inTabWithIdentifier:completionHandler:]):
Replace the completionHandler's NSDictionary argument type with id.

A dictionary is not necessarily returned here because the implementation deserializes a SerializedScriptValue.
This could be a string, number, array, dictionary, or other serializable values.

While the frontend does return a dictionary payload, this is unpacked on the WebProcess-side
before being sent back out via the _WKInspectorExtension APi.

9:35 AM Changeset in webkit [286496] by Chris Dumez
  • 6 edits in trunk/Source/WebCore

Improve dictionary-based DOMPromiseDeferred::settle
https://bugs.webkit.org/show_bug.cgi?id=233751

Patch by Youenn Fablet <youenn@apple.com> on 2021-12-03
Reviewed by Chris Dumez.

Make settle a templated function so that it can adapt to any ExceptionOr based type.
Update call sites that use settle for non ExceptionOr types as they should either use reject or resolve directly.
Covered by existing tests.

  • Modules/applepay/ApplePaySetup.cpp:

(WebCore::ApplePaySetup::getSetupFeatures):
(WebCore::ApplePaySetup::begin):
(WebCore::ApplePaySetup::stop):

  • Modules/filesystemaccess/FileSystemDirectoryHandle.cpp:

(WebCore::FileSystemDirectoryHandle::getFileHandle):
(WebCore::FileSystemDirectoryHandle::getDirectoryHandle):
(WebCore::FileSystemDirectoryHandle::resolve):

  • Modules/filesystemaccess/FileSystemFileHandle.cpp:

(WebCore::FileSystemFileHandle::createSyncAccessHandle):

  • bindings/js/JSDOMPromiseDeferred.h:

(WebCore::DOMPromiseDeferred::settle):
(WebCore::DOMPromiseDeferred<IDLDictionary<T>>::resolve): Deleted.
(WebCore::DOMPromiseDeferred<IDLDictionary<T>>::settle): Deleted.
(WebCore::DOMPromiseDeferred<IDLInterface<T>>::resolve): Deleted.
(WebCore::DOMPromiseDeferred<IDLInterface<T>>::settle): Deleted.

  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::getNavigationPreloadState):

9:19 AM Changeset in webkit [286495] by Antti Koivisto
  • 2 edits in trunk/Source/WTF

[:has() pseudo-class] Enable by default
https://bugs.webkit.org/show_bug.cgi?id=233809

Reviewed by Simon Fraser.

Flip the switch.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
9:10 AM Changeset in webkit [286494] by Antti Koivisto
  • 3 edits in trunk/Source/WebCore

[:has() pseudo-class] Improve result caching
https://bugs.webkit.org/show_bug.cgi?id=233806

Reviewed by Simon Fraser.

Improve caching to to avoid O(n2) cases during invalidation and style resolution.

  • css/SelectorChecker.cpp:

(WebCore::SelectorChecker::matchHasPseudoClass const):

Cache matches as well as failures.
Cache failures that don't apply to subtrees.
Check cached matches and failures for all :has() match element types.

  • style/SelectorMatchingState.h:
9:08 AM Changeset in webkit [286493] by fpizlo@apple.com
  • 76 edits
    7 adds in trunk/Source/bmalloc

[libpas] Update to 96f9f4c28dc119695311c7c6bd81ed1f3f4e260c (allow more specialization of partial versus exclusive allocation)
https://bugs.webkit.org/show_bug.cgi?id=233782

Reviewed by Yusuke Suzuki.

Libpas's main optimization for lots of isoheaps is partial views of shared pages: a single page may get
chopped up so that different heaps get different ranges of the page. This works out, in a not-too-gross
way, by reusing the segregated heap page management logic.

But previously, pages used exclusively versus pages that were shared looked largely the same; the only
way to tell them apart is that they had a different owner. Notably, those pages would get allocated out
of the same megapages, so a megapage lookup could not tell you if you were exclusive or shared.

This change introduces the concept of pas_segregated_page_role, which is this distinction between
exclusive and shared, and spreads it across all page management logic. So:

-> Page allocation knows the page's role, so it can use different megapages for exclusive or shared.

This enables exclusive and shared to have different deallocation fast paths.

-> Page_kind is now different depending on whether the page is exclusive or shared.

-> Many of the entrypoints into segregated_page that are required to know page_config are now also

required to know page_role. This makes sense, because the combination of megapages and page_kinds
knowing about roles means that anyone who ends up calling segregated_page API will now typically
know the role.

-> It's still possible to dynamically deduce the role using the page's owner, but hardly any code does

that.

This is leveraged in this patch to introduce some tiny space-saving optimizations to isoheaps:

-> Partial deallocation no longer uses the deallocation log.

-> Partial deallocation no longer uses the empty_word_eligibility_optimization.

This change is a stepping stone for introducing more different kinds of roles in the future.

  • CMakeLists.txt:
  • bmalloc.xcodeproj/project.pbxproj:
  • libpas/libpas.xcodeproj/project.pbxproj:
  • libpas/src/libpas/bmalloc_heap_config.h:
  • libpas/src/libpas/hotbit_heap_config.h:
  • libpas/src/libpas/iso_heap_config.h:
  • libpas/src/libpas/iso_test_heap_config.h:
  • libpas/src/libpas/jit_heap_config.c:

(jit_heap_config_dump_shared_page_directory_arg):

  • libpas/src/libpas/jit_heap_config.h:
  • libpas/src/libpas/minalign32_heap_config.h:
  • libpas/src/libpas/pagesize64k_heap_config.h:
  • libpas/src/libpas/pas_basic_heap_page_caches.h:
  • libpas/src/libpas/pas_bitfit_allocator.c:

(pas_bitfit_allocator_commit_view):
(pas_bitfit_allocator_finish_failing):

  • libpas/src/libpas/pas_bitfit_allocator.h:
  • libpas/src/libpas/pas_bitfit_allocator_inlines.h:

(pas_bitfit_allocator_try_allocate):
(pas_bitfit_allocator_reset): Deleted.
(pas_bitfit_allocator_assert_reset): Deleted.

  • libpas/src/libpas/pas_bitfit_heap.c:

(pas_bitfit_heap_construct_and_insert_size_class):
(pas_bitfit_heap_ensure_size_class): Deleted.

  • libpas/src/libpas/pas_bitfit_heap.h:
  • libpas/src/libpas/pas_bitfit_page.c:

(pas_bitfit_page_construct):

  • libpas/src/libpas/pas_bitfit_page_config.h:
  • libpas/src/libpas/pas_bitfit_page_config_inlines.h:
  • libpas/src/libpas/pas_bitfit_page_config_kind.c:

(pas_bitfit_page_config_kind_get_string):

  • libpas/src/libpas/pas_bitfit_page_config_kind.h:

(pas_bitfit_page_config_kind_get_string): Deleted.

  • libpas/src/libpas/pas_bitfit_page_inlines.h:

(pas_bitfit_page_allocate):

  • libpas/src/libpas/pas_bitfit_size_class.c:

(pas_bitfit_size_class_create): Deleted.

  • libpas/src/libpas/pas_bitfit_size_class.h:
  • libpas/src/libpas/pas_create_basic_heap_page_caches_with_reserved_memory.c:

(pas_create_basic_heap_page_caches_with_reserved_memory):

  • libpas/src/libpas/pas_deallocate.c:

(deallocate_segregated):
(pas_try_deallocate_slow_no_cache):

  • libpas/src/libpas/pas_deallocate.h:

(pas_deallocate_known_segregated):
(pas_try_deallocate_not_small_exclusive_segregated):
(pas_try_deallocate_impl):
(pas_deallocate_known_segregated_impl): Deleted.
(pas_try_deallocate_not_small): Deleted.

  • libpas/src/libpas/pas_enumerate_segregated_heaps.c:

(pas_enumerate_segregated_heaps):

  • libpas/src/libpas/pas_fast_megapage_kind.h:

(pas_fast_megapage_kind_get_string):

  • libpas/src/libpas/pas_fast_megapage_table.c:

(pas_fast_megapage_table_set_by_index):

  • libpas/src/libpas/pas_fast_megapage_table.h:

(pas_fast_megapage_table_get_by_index):

  • libpas/src/libpas/pas_get_allocation_size.h:

(pas_get_allocation_size):

  • libpas/src/libpas/pas_get_heap.h:

(pas_get_heap):
(pas_get_heap_known_segregated): Deleted.

  • libpas/src/libpas/pas_get_object_kind.h:

(pas_get_object_kind):

  • libpas/src/libpas/pas_get_page_base.h:

(pas_get_page_base):

  • libpas/src/libpas/pas_get_page_base_and_kind_for_small_other_in_fast_megapage.h: Added.

(pas_get_page_base_and_kind_for_small_other_in_fast_megapage):

  • libpas/src/libpas/pas_has_object.h:

(pas_has_object):

  • libpas/src/libpas/pas_heap_config.h:
  • libpas/src/libpas/pas_heap_config_inlines.h:
  • libpas/src/libpas/pas_heap_config_kind.c:

(pas_heap_config_kind_get_string):

  • libpas/src/libpas/pas_heap_config_kind.h:

(pas_heap_config_kind_get_string): Deleted.

  • libpas/src/libpas/pas_heap_config_utils.h:
  • libpas/src/libpas/pas_heap_config_utils_inlines.h:
  • libpas/src/libpas/pas_internal_config.h:
  • libpas/src/libpas/pas_local_allocator.c:

(pas_local_allocator_construct):
(pas_local_allocator_refill_with_bitfit): Deleted.
(pas_local_allocator_finish_refill_with_bitfit): Deleted.

  • libpas/src/libpas/pas_local_allocator_inlines.h:

(pas_local_allocator_scan_bits_to_set_up_free_bits):
(pas_local_allocator_set_up_free_bits):
(pas_local_allocator_set_up_primordial_bump):
(pas_local_allocator_start_allocating_in_primordial_partial_view):
(pas_local_allocator_bless_primordial_partial_view_before_stopping):
(pas_local_allocator_try_allocate_in_primordial_partial_view):
(pas_local_allocator_refill_with_known_config):
(pas_local_allocator_return_memory_to_page_set_bit_callback):
(pas_local_allocator_return_memory_to_page_for_role):
(pas_local_allocator_return_memory_to_page):
(pas_local_allocator_try_allocate_small_segregated_slow_impl):
(pas_local_allocator_try_allocate_out_of_line_cases):
(pas_local_allocator_try_allocate_slow_impl):

  • libpas/src/libpas/pas_object_kind.h:

(pas_object_kind_for_page_kind):

  • libpas/src/libpas/pas_page_base_and_kind.h: Added.

(pas_page_base_and_kind_create):
(pas_page_base_and_kind_create_empty):

  • libpas/src/libpas/pas_page_base_config.c: Added.

(pas_page_base_config_get_kind_string):

  • libpas/src/libpas/pas_page_base_config.h:

(pas_page_base_config_is_segregated):
(pas_page_base_config_is_bitfit):
(pas_page_base_config_get_config_kind): Deleted.

  • libpas/src/libpas/pas_page_kind.h:

(pas_page_kind_get_string):
(pas_page_kind_get_config_kind):
(pas_page_kind_get_segregated_variant):
(pas_page_kind_get_segregated_role):
(pas_page_kind_for_segregated_variant_and_role):
(pas_page_kind_for_bitfit_variant):

  • libpas/src/libpas/pas_segregated_deallocation_logging_mode.h: Added.

(pas_segregated_deallocation_logging_mode_does_logging):
(pas_segregated_deallocation_logging_mode_is_size_aware):
(pas_segregated_deallocation_logging_mode_is_checked):

  • libpas/src/libpas/pas_segregated_heap.c:

(max_object_size_for_page_config):
(pas_segregated_heap_ensure_size_directory_for_size):

  • libpas/src/libpas/pas_segregated_page.c:

(pas_segregated_page_construct):
(pas_segregated_page_and_config_for_address_and_heap_config):

  • libpas/src/libpas/pas_segregated_page_config.h:

(pas_segregated_page_config_enable_empty_word_eligibility_optimization_for_role):
(pas_segregated_page_config_logging_mode_for_role):

  • libpas/src/libpas/pas_segregated_page_config_inlines.h:
  • libpas/src/libpas/pas_segregated_page_config_kind.c:

(pas_segregated_page_config_kind_get_string):

  • libpas/src/libpas/pas_segregated_page_config_kind.def:
  • libpas/src/libpas/pas_segregated_page_config_kind.h:

(pas_segregated_page_config_kind_get_string): Deleted.

  • libpas/src/libpas/pas_segregated_page_config_kind_and_role.c: Added.

(pas_segregated_page_config_kind_and_role_get_string):

  • libpas/src/libpas/pas_segregated_page_config_kind_and_role.h: Added.

(pas_segregated_page_config_kind_and_role_create):

  • libpas/src/libpas/pas_segregated_page_config_utils.h:

(pas_segregated_page_config_verify_dealloc): Deleted.

  • libpas/src/libpas/pas_segregated_page_inlines.h:

(pas_segregated_page_deallocate_with_page):
(pas_segregated_page_deallocate):
(pas_segregated_page_get_directory_for_address_in_page):
(pas_segregated_page_get_directory_for_address_and_page_config):
(pas_segregated_page_get_object_size_for_address_in_page):
(pas_segregated_page_get_object_size_for_address_and_page_config):
(pas_segregated_page_log_or_deallocate):

  • libpas/src/libpas/pas_segregated_page_role.h: Added.

(pas_segregated_page_role_get_string):

  • libpas/src/libpas/pas_segregated_shared_view.c:

(pas_segregated_shared_view_commit_page):

  • libpas/src/libpas/pas_segregated_size_directory.c:

(pas_segregated_size_directory_create):

  • libpas/src/libpas/pas_segregated_size_directory.h:

(pas_segregated_size_directory_is_bitfit):
(pas_segregated_size_directory_get_bitfit_size_class):

  • libpas/src/libpas/pas_segregated_view.c:

(should_be_eligible):

  • libpas/src/libpas/pas_segregated_view.h:

(pas_segregated_view_get_page_role_for_owner):
(pas_segregated_view_get_page_role_for_allocator):

  • libpas/src/libpas/pas_segregated_view_allocator_inlines.h:

(pas_segregated_view_will_start_allocating):

  • libpas/src/libpas/pas_segregated_view_kind.h:

(pas_segregated_view_kind_get_role_for_owner):
(pas_segregated_view_kind_get_role_for_allocator):

  • libpas/src/libpas/pas_thread_local_cache.c:

(process_deallocation_log_with_config):
(flush_deallocation_log):
(pas_thread_local_cache_append_deallocation_slow):

  • libpas/src/libpas/pas_thread_local_cache.h:

(pas_thread_local_cache_encode_object):
(pas_thread_local_cache_append_deallocation):
(pas_thread_local_cache_append_deallocation_with_size):

  • libpas/src/libpas/pas_try_reallocate.h:

(pas_try_reallocate_table_segregated_case):
(pas_try_reallocate):

  • libpas/src/libpas/pas_try_shrink.h:

(pas_try_shrink):

  • libpas/src/libpas/pas_utility_heap.c:

(pas_utility_heap_deallocate):

  • libpas/src/libpas/pas_utility_heap_config.c:

(pas_utility_heap_allocate_page):
(pas_utility_heap_shared_page_directory_selector):
(pas_utility_heap_config_for_each_shared_page_directory):
(pas_utility_heap_config_dump_shared_page_directory_arg):

  • libpas/src/libpas/pas_utility_heap_config.h:

(pas_utility_heap_shared_page_directory_selector): Deleted.

  • libpas/src/libpas/pas_utils.h:

(pas_assertion_failed_noreturn_silencer):

  • libpas/src/libpas/thingy_heap_config.h:
  • libpas/src/test/ThingyAndUtilityHeapAllocationTests.cpp:

(std::addMargeBitfitTests):

8:50 AM Changeset in webkit [286492] by achristensen@apple.com
  • 15 edits in trunk

Add room for more bytecode in WKContentRuleList file format
https://bugs.webkit.org/show_bug.cgi?id=233780

Reviewed by Tim Hatcher.

Source/WebCore:

For rdar://72203352 we will need more bytecode. This adds room for it without putting anything there yet.
As long as we are updating the version number and forcing a recompile, I'm making the string serialization
more like the other action serializations to be able to simplify the interpreter later. I'm also shifting
around a few bits in the bytecode to be more organized and reasonable.

  • contentextensions/CompiledContentExtension.h:
  • contentextensions/ContentExtensionStringSerialization.cpp:

(WebCore::ContentExtensions::deserializeString):
(WebCore::ContentExtensions::serializeString):
(WebCore::ContentExtensions::stringSerializedLength):

  • contentextensions/DFABytecode.h:

(WebCore::ContentExtensions::smallestPossibleJumpSize): Deleted.

  • contentextensions/DFABytecodeCompiler.cpp:

(WebCore::ContentExtensions::smallestPossibleJumpSize):

Source/WebKit:

  • Shared/WebCompiledContentRuleList.cpp:

(WebKit::WebCompiledContentRuleList::frameURLFiltersBytecode const):

  • Shared/WebCompiledContentRuleList.h:
  • Shared/WebCompiledContentRuleListData.cpp:

(WebKit::WebCompiledContentRuleListData::encode const):
(WebKit::WebCompiledContentRuleListData::decode):

  • Shared/WebCompiledContentRuleListData.h:

(WebKit::WebCompiledContentRuleListData::WebCompiledContentRuleListData):

  • UIProcess/API/APIContentRuleListStore.cpp:

(API::ContentRuleListMetaData::fileSize const):
(API::encodeContentRuleListMetaData):
(API::decodeContentRuleListMetaData):
(API::compiledToFile):
(API::createExtension):
(API::getContentRuleListSourceFromMappedFile):

  • UIProcess/API/APIContentRuleListStore.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
8:35 AM Changeset in webkit [286491] by eric.carlson@apple.com
  • 20 edits
    2 adds in trunk

DisplayCaptureSource doesn't initialize base class correctly
https://bugs.webkit.org/show_bug.cgi?id=233722

Reviewed by Youenn Fablet.

Source/WebCore:

Test: fast/mediastream/get-display-media-settings.html

  • platform/mediastream/RealtimeMediaSourceCenter.cpp:

(WebCore::RealtimeMediaSourceCenter::createMediaStream): Pass hashSalt through.
(WebCore::RealtimeMediaSourceCenter::getDisplayMediaDevices): Ditto.
(WebCore::RealtimeMediaSourceCenter::validateRequestConstraintsAfterEnumeration): Ditto.

  • platform/mediastream/RealtimeMediaSourceCenter.h:
  • platform/mediastream/RealtimeMediaSourceFactory.h:
  • platform/mediastream/cocoa/DisplayCaptureSourceCocoa.cpp:

(WebCore::DisplayCaptureSourceCocoa::create): Ditto.
(WebCore::DisplayCaptureSourceCocoa::DisplayCaptureSourceCocoa): Ditto.

  • platform/mediastream/cocoa/DisplayCaptureSourceCocoa.h:
  • platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.h:
  • platform/mediastream/gstreamer/GStreamerDisplayCaptureDeviceManager.cpp:

(WebCore::GStreamerDisplayCaptureDeviceManager::createDisplayCaptureSource): Ditto.

  • platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
  • platform/mock/MockRealtimeMediaSourceCenter.cpp:
  • platform/mock/MockRealtimeMediaSourceCenter.cpp:
  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::settings):

Source/WebKit:

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
Pass the hash salt to the factory.

  • WebProcess/cocoa/RemoteRealtimeDisplaySource.cpp:

(WebKit::RemoteRealtimeDisplaySource::create): Remove 'name' parameter because
CaptureDevice already has the name.
(WebKit::RemoteRealtimeDisplaySource::RemoteRealtimeDisplaySource): Pass name to
base class from device.label().
(WebKit::RemoteRealtimeDisplaySource::createRemoteMediaSource): Don't call setName
with settings, it was already set in the constructor.

  • WebProcess/cocoa/RemoteRealtimeDisplaySource.h:
  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::DisplayFactory::createDisplayCaptureSource): Pass
hash salt to RemoteRealtimeDisplaySource::create.

  • WebProcess/cocoa/UserMediaCaptureManager.h:

LayoutTests:

  • fast/mediastream/get-display-media-settings-expected.txt: Added.
  • fast/mediastream/get-display-media-settings.html: Added.
7:30 AM Changeset in webkit [286490] by svillar@igalia.com
  • 9 edits
    2 adds in trunk/LayoutTests

[css-flexbox] WPT import. December 2021 edition
https://bugs.webkit.org/show_bug.cgi?id=233810

Reviewed by Rob Buis.

LayoutTests/imported/w3c:

  • resources/resource-files.json:
  • web-platform-tests/css/css-flexbox/negative-available-size-crash-expected.txt: Added.
  • web-platform-tests/css/css-flexbox/negative-available-size-crash.html: Added.
  • web-platform-tests/css/css-flexbox/scrollbars-auto-expected.html:
  • web-platform-tests/css/css-flexbox/scrollbars-expected.html:
  • web-platform-tests/css/css-flexbox/table-as-item-inflexible-in-column-2.html:
  • web-platform-tests/css/css-flexbox/table-as-item-inflexible-in-row-2.html:
  • web-platform-tests/css/css-flexbox/w3c-import.log:

LayoutTests:

  • TestExpectations: Unskipped a test that works fine after the changes in the import.
6:12 AM Changeset in webkit [286489] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Move the (bidi)display boxes horizontally by the inline box margin, border and padding start as needed
https://bugs.webkit.org/show_bug.cgi?id=233742

Reviewed by Antti Koivisto.

Re-visit the newly constructed display boxes and move them horizontally using the inline box margin, border and padding start values.
Note that in this patch we don't yet handle the end side of the inline boxes.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

6:01 AM Changeset in webkit [286488] by youenn@apple.com
  • 16 edits in trunk

Persist NavigationPreloadState in service worker registration database
https://bugs.webkit.org/show_bug.cgi?id=233698
Source/WebCore:

Reviewed by Chris Dumez.

Whenever changing a service worker registration navigation state, trigger storing of the changes in the database.
To do so, we add this state to ServiceWorkerContextData.
When creating a SWServerRegistration, we set default values to false and "true"
as per https://w3c.github.io/ServiceWorker/#service-worker-registration-navigation-preload-header-value.

Covered by updated test.

  • workers/service/ServiceWorkerContextData.cpp:
  • workers/service/ServiceWorkerContextData.h:
  • workers/service/server/RegistrationDatabase.cpp:
  • workers/service/server/RegistrationStore.h:
  • workers/service/server/SWServer.cpp:
  • workers/service/server/SWServer.h:
  • workers/service/server/SWServerJobQueue.cpp:
  • workers/service/server/SWServerRegistration.cpp:
  • workers/service/server/SWServerRegistration.h:
  • workers/service/server/SWServerWorker.cpp:

Tools:

<rdar://problem/85963120>

Reviewed by Chris Dumez.

Increase counter from 7 to 8.

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:

LayoutTests:

Reviewed by Chris Dumez.

  • http/wpt/service-workers/service-worker-networkprocess-crash-expected.txt:
  • http/wpt/service-workers/service-worker-networkprocess-crash.html:
1:31 AM Changeset in webkit [286487] by mmaxfield@apple.com
  • 6 edits in trunk/Source/WebKit

Rename DerivedSources/WebKit2 to DerivedSources/WebKit
https://bugs.webkit.org/show_bug.cgi?id=233803

Reviewed by Tim Horton.

Mechanical rename.

No new tests because there is no behavior change.

  • Configurations/BaseTarget.xcconfig:
  • Scripts/generate-derived-sources.sh:
  • Scripts/generate-unified-sources.sh:
  • UnifiedSources-output.xcfilelist:
  • WebKit.xcodeproj/project.pbxproj:
12:50 AM Changeset in webkit [286486] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GStreamer] test http/tests/security/webaudio-render-remote-audio-allowed-crossorigin.html fails
https://bugs.webkit.org/show_bug.cgi?id=233737

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2021-12-03
Reviewed by Philippe Normand.

Give some more time to the frequency analyzer to detect activity.

  • http/tests/security/webaudio-render-remote-audio-allowed-crossorigin.html:
12:25 AM Changeset in webkit [286485] by aboya@igalia.com
  • 3 edits
    2 adds in trunk

[MSE] Fix erase range to prevent accidental deletion in files with changing durations
https://bugs.webkit.org/show_bug.cgi?id=233528

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

In didReceiveSample(), eraseBeginTime was being set to
highestPresentationTimestamp minus a tolerance. The tolerance is not
needed since highestPresentationTimestamp is loaded from exact frame
timestamps, and can cause accidental frame erasure in situations where
there are frames with frames smaller than the tolerance, which is the
case for certain MP4 files.

Test: media/media-source/media-source-append-tiny-durations.html

  • platform/graphics/SourceBufferPrivate.cpp:

(WebCore::SourceBufferPrivate::didReceiveSample):

LayoutTests:

  • media/media-source/media-source-append-tiny-durations-expected.txt: Added.
  • media/media-source/media-source-append-tiny-durations.html: Added.
12:06 AM Changeset in webkit [286484] by commit-queue@webkit.org
  • 29 edits
    2 copies in trunk/Source

Network process does not seem to initialize logging
https://bugs.webkit.org/show_bug.cgi?id=233360
<rdar://problem/85765854>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-12-03
Reviewed by Fujii Hironori.

Source/WebCore:

Export WebCore::logLevelString(), it's the canonical
method to obtain WebCore log configuration string.
It's already used in WebKit, but not on Cocoa platform
where the export matters.

  • platform/LogInitialization.h:

Source/WebKit:

Move GPUProcess and WebProcess process creation arguments
related to logging strings to new AuxiliaryProcessCreationParameters.
Use this in all auxiliary processes GPUProcess, WebProcess,
AuthnProcess and NetworkProcess.

Use the canonical WTF::logLevelString(), WebCore::logLevelString(),
WebKit::logLevelString() to initialize Cocoa WebKit2 logging settings
for process creation arguments.

Fixes bugs where

Tools/Scripts/run-minibrowser --debug -WebKit2Logging IPCMessages

would not print IPCMessages logging for NetworkProcess.

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::initializeGPUProcess):

  • GPUProcess/GPUProcessCreationParameters.cpp:

(WebKit::GPUProcessCreationParameters::encode const):
(WebKit::GPUProcessCreationParameters::decode):

  • GPUProcess/GPUProcessCreationParameters.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):

  • NetworkProcess/NetworkProcessCreationParameters.cpp:

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

  • NetworkProcess/NetworkProcessCreationParameters.h:
  • Shared/AuxiliaryProcess.cpp:

(WebKit::AuxiliaryProcess::applyProcessCreationParameters):

  • Shared/AuxiliaryProcess.h:
  • Shared/AuxiliaryProcessCreationParameters.cpp: Copied from Source/WebKit/WebAuthnProcess/WebAuthnProcessCreationParameters.cpp.

(WebKit::AuxiliaryProcessCreationParameters::encode const):
(WebKit::AuxiliaryProcessCreationParameters::decode):

  • Shared/AuxiliaryProcessCreationParameters.h: Copied from Source/WebKit/WebAuthnProcess/WebAuthnProcessCreationParameters.h.
  • Shared/WebProcessCreationParameters.cpp:

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

  • Shared/WebProcessCreationParameters.h:
  • Sources.txt:
  • UIProcess/AuxiliaryProcessProxy.cpp:

(WebKit::AuxiliaryProcessProxy::auxiliaryProcessParameters):

  • UIProcess/AuxiliaryProcessProxy.h:
  • UIProcess/Cocoa/GPUProcessProxyCocoa.mm:

(WebKit::GPUProcessProxy::platformInitializeGPUProcessParameters):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::GPUProcessProxy):
(WebKit::GPUProcessProxy::platformInitializeGPUProcessParameters):

  • UIProcess/GPU/GPUProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::sendCreationParametersToNewProcess):

  • UIProcess/WebAuthentication/WebAuthnProcessProxy.cpp:

(WebKit::WebAuthnProcessProxy::singleton):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::initializeNewWebProcess):

  • WebAuthnProcess/WebAuthnProcess.cpp:

(WebKit::WebAuthnProcess::initializeWebAuthnProcess):

  • WebAuthnProcess/WebAuthnProcessCreationParameters.cpp:

(WebKit::WebAuthnProcessCreationParameters::encode const):
(WebKit::WebAuthnProcessCreationParameters::decode):

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

(WebKit::WebProcess::platformInitializeWebProcess):

  • WebProcess/playstation/WebProcessPlayStation.cpp:

(WebKit::WebProcess::platformInitializeWebProcess):

Note: See TracTimeline for information about the timeline view.