Timeline



Dec 14, 2021:

10:53 PM Changeset in webkit [287063] by jh718.park@samsung.com
  • 11 edits
    2 adds in trunk

Fix that height is calculated incorrectly when using display:table, box-sizing:border-box and padding.
https://bugs.webkit.org/show_bug.cgi?id=196175

Reviewed by Darin Adler.

Currently, box sizing type check is missing, so the height of display:table element's percent height child
is subtracted by its border and padding even when its 'box-sizing' is not 'content-box'.

This patch adds the missing box sizing type check.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-sizing/table-child-percentage-height-with-border-box-expected.html: Added.
  • web-platform-tests/css/css-sizing/table-child-percentage-height-with-border-box.html: Added.

Source/WebCore:

Test: imported/w3c/web-platform-tests/css/css-sizing/table-child-percentage-height-with-border-box.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computePercentageLogicalHeight const):

LayoutTests:

  • platform/gtk/fast/table/003-expected.txt:
  • platform/gtk/tables/mozilla/bugs/bug30692-expected.txt:
  • platform/ios/tables/mozilla/bugs/bug30692-expected.txt:
  • platform/mac-catalina/tables/mozilla/bugs/bug30692-expected.txt:
  • platform/mac-mojave/tables/mozilla/bugs/bug30692-expected.txt:
  • platform/mac/fast/table/003-expected.txt:
  • platform/mac/tables/mozilla/bugs/bug30692-expected.txt:
9:44 PM Changeset in webkit [287062] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[IFC][Integration] Use logical margin/border/padding values in layout
https://bugs.webkit.org/show_bug.cgi?id=234305

Reviewed by Antti Koivisto.

Can't use RenderBoxModelObject::borderStart/End logical values as they return values based on the _renderer_'s
direction and not the direction the renderer is aligned within.

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::updateLayoutBoxDimensions):
(WebCore::LayoutIntegration::LineLayout::updateInlineBoxDimensions):

7:28 PM Changeset in webkit [287061] by Russell Epstein
  • 261 edits in branches/safari-613.1.12-branch

Revert "Distinguish contiguous SharedBuffer from non-contiguous one and guarantee immutability"

This reverts commit r286937.

7:00 PM Changeset in webkit [287060] by don.olmstead@sony.com
  • 11 edits
    1 add in trunk/Tools

[CMake] Modernize WPEToolingBackend
https://bugs.webkit.org/show_bug.cgi?id=234307

Reviewed by Adrian Perez de Castro.

Use WEBKIT_FRAMEWORK to build WPEToolingBackend and follow its conventions. Also support
different platform definitions so other ports using libwpe can also use this library.

Update includes to use <WPEToolingBackend/*.h>.

  • MiniBrowser/wpe/CMakeLists.txt:
  • MiniBrowser/wpe/main.cpp:
  • TestWebKitAPI/PlatformWPE.cmake:
  • TestWebKitAPI/glib/PlatformWPE.cmake:
  • TestWebKitAPI/glib/WebKitGLib/TestMain.h:
  • TestWebKitAPI/wpe/PlatformWebViewWPE.cpp:
  • WebKitTestRunner/PlatformWPE.cmake:
  • WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
  • WebKitTestRunner/wpe/PlatformWebViewWPE.cpp:
  • wpe/backends/CMakeLists.txt:
  • wpe/backends/PlatformWPE.cmake: Added.
5:25 PM Changeset in webkit [287059] by Jean-Yves Avenard
  • 14 edits in trunk/Source

Source/WebCore:
SourceBufferParser should be using contiguous SharedBuffer
https://bugs.webkit.org/show_bug.cgi?id=233865
rdar://problem/86085253

Reviewed by Eric Carlson.

The SharedBuffer sent to the SourceBufferParser can only ever contain one
DataSegment and we had assertions to that effect. The SharedBuffer class
type now guarantees how the data is structured and allow for more explicit
code which improves readability.
We also had some workarounds for the fact that SharedBuffer didn't use
thread-safe refcounting and instead we referenced the inner DataSegment.
This can be removed.

Covered by existing tests, no observable differences.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::appendBufferTimerFired):

  • Modules/mediasource/SourceBuffer.h:
  • platform/audio/cocoa/AudioFileReaderCocoa.cpp:
  • platform/graphics/SourceBufferPrivate.cpp:

(WebCore::SourceBufferPrivate::append):

  • platform/graphics/SourceBufferPrivate.h:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

(WebCore::SourceBufferPrivateAVFObjC::append):

  • platform/graphics/cocoa/SourceBufferParser.cpp:

(WebCore::SourceBufferParser::Segment::Segment):
(WebCore::SourceBufferParser::Segment::size const):
(WebCore::SourceBufferParser::Segment::read const):
(WebCore::SourceBufferParser::Segment::takeSharedBuffer):
(WebCore::SourceBufferParser::Segment::getSharedBuffer const):

  • platform/graphics/cocoa/SourceBufferParser.h:
  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:

Source/WebKit:
SourceBufferParser should be using contiguous shared buffer
https://bugs.webkit.org/show_bug.cgi?id=233865
rdar://problem/86085253

Reviewed by Eric Carlson.

  • WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:

(WebKit::SourceBufferPrivateRemote::append):

  • WebProcess/GPU/media/SourceBufferPrivateRemote.h:
5:23 PM Changeset in webkit [287058] by Ross Kirsling
  • 9 edits in trunk/Source/JavaScriptCore

[JSC] OpInstanceofCustom should be in CommonSlowPaths
https://bugs.webkit.org/show_bug.cgi?id=234316

Reviewed by Alexey Shvayka.

No tier has a fast path for OpInstanceofCustom and this is unlikely to change anytime soon.
As such, we should not be having LLInt and Baseline implement *separate* slow paths for this operation;
this patch straightforwardly makes use of CommonSlowPaths instead.

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):

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

(JSC::JIT::emit_op_instanceof_custom): Deleted.
(JSC::JIT::emitSlow_op_instanceof_custom): Deleted.

  • llint/LLIntSlowPaths.cpp:
  • llint/LLIntSlowPaths.h:
  • llint/LowLevelInterpreter.asm:
  • runtime/CommonSlowPaths.cpp:

(JSC::JSC_DEFINE_COMMON_SLOW_PATH):

  • runtime/CommonSlowPaths.h:
4:46 PM Changeset in webkit [287057] by Ryan Haddad
  • 3 edits in trunk/Tools

Bring up another iOS GPU Processes tester
https://bugs.webkit.org/show_bug.cgi?id=234016

Reviewed by Jonathan Bedard.

  • CISupport/build-webkit-org/config.json: Put the Catalina GPUP bot back and

use a different machine for the new iOS tester.

  • CISupport/build-webkit-org/factories_unittest.py: Update unit tests.

(TestExpectedBuildSteps):

3:48 PM Changeset in webkit [287056] by commit-queue@webkit.org
  • 8 edits in trunk

Remove properties set by NSURLProtocol on NSURLRequest before serializing
https://bugs.webkit.org/show_bug.cgi?id=232332
<rdar://79227845>

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

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

NSURLRequest encodeWithCoder: encodes the protocol properties, which are not used by WebKit.
They exist to be used by NSURLProtocol. Serializing them can serialize a large amount of data,
so to be more efficient and hopefully run out of memory less, remove the properties before serializing.

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

(IPC::ArgumentCoder<WebCore::ResourceRequest>::encodePlatformData):

Source/WTF:

  • wtf/PlatformHave.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm:

(TestWebKitAPI::TEST):

3:31 PM Changeset in webkit [287055] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

REGRESSION (r286982): ASSERTION FAILED: clipRectsContext.rootLayer == m_clipRectsCache->m_clipRectsRoot[clipRectsType]
https://bugs.webkit.org/show_bug.cgi?id=234315

Unreviewed test gardening.

3:09 PM Changeset in webkit [287054] by Jonathan Bedard
  • 4 edits in trunk/Tools

[reporelaypy] Update checkout with hook instead of polling (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=234243
<rdar://problem/86413065>

Unreviewed follow-up fix.

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

(Checkout.update_for): main is not a recognized production branch, so handle
default branch first.

  • Scripts/libraries/reporelaypy/setup.py: Bump version.
3:04 PM Changeset in webkit [287053] by Jean-Yves Avenard
  • 5 edits in trunk/Source/WebCore

Make PreviewConverterProvider not modify the SharedBuffer once returned
https://bugs.webkit.org/show_bug.cgi?id=233923
rdar://problem/86149850

Reviewed by Youenn Fablet.

Covered by existing API tests.

  • loader/ios/LegacyPreviewLoader.h:
  • loader/ios/LegacyPreviewLoader.mm:

(WebCore::LegacyPreviewLoader::previewConverterDidStartConverting):
(WebCore::LegacyPreviewLoader::provideMainResourceForPreviewConverter):

  • platform/PreviewConverter.cpp:

(WebCore::PreviewConverter::updateMainResource):

  • platform/PreviewConverterProvider.h:
3:00 PM Changeset in webkit [287052] by Alan Coon
  • 1 copy in tags/Safari-612.4.4

Tag Safari-612.4.4.

2:38 PM Changeset in webkit [287051] by basuke.suzuki@sony.com
  • 2 edits in trunk/Source/WebCore

[Playstation] Fix build break after r286908
https://bugs.webkit.org/show_bug.cgi?id=234311

Unreviewed, build fix for PlayStation platform after r286908.
https://trac.webkit.org/changeset/286908/webkit

  • platform/graphics/PlatformVideoColorSpace.h:
2:36 PM Changeset in webkit [287050] by jer.noble@apple.com
  • 3 edits
    2 adds in trunk

Safari intermittently stopping playing Spotify Web Player (currentTime goes backwards)
https://bugs.webkit.org/show_bug.cgi?id=233257
<rdar://problem/85504967>

Reviewed by Eric Carlson.

Source/WebKit:

Test: media/video-currentTime-duration.html

Clamp currentMediaTime() to [0, durationMediaTime()].

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::currentMediaTime const):

LayoutTests:

  • media/video-currentTime-duration-expected.txt: Added.
  • media/video-currentTime-duration.html: Added.
2:20 PM Changeset in webkit [287049] by commit-queue@webkit.org
  • 8 edits in trunk

Revert r284816
https://bugs.webkit.org/show_bug.cgi?id=234308
LayoutTests/imported/w3c:

Patch by Alex Christensen <achristensen@webkit.org> on 2021-12-14
Reviewed by Eric Carlson.

  • web-platform-tests/service-workers/service-worker/fetch-audio-tainting.https-expected.txt:

Source/WebCore:

<rdar://86294293>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-12-14
Reviewed by Eric Carlson.

I made it so that resources without a Content-Length header wait until the whole resource finishes downloading
then we deliver it to CoreMedia to play with a known length. This works great, except it completely breaks
live streaming, which would just wait forever. Back to the status quo. We need to convince CoreMedia to accept
byte ranges with an unknown end to fix videos such as our test video when hosted by trac, which has no Content-Length at
https://trac.webkit.org/export/284633/webkit/trunk/Tools/TestWebKitAPI/Tests/WebKit/test.mp4

  • platform/network/cocoa/RangeResponseGenerator.mm:

(WebCore::synthesizedResponseForRange):
(WebCore::RangeResponseGenerator::giveResponseToTaskIfBytesInRangeReceived):

Source/WebKit:

Patch by Alex Christensen <achristensen@webkit.org> on 2021-12-14
Reviewed by Eric Carlson.

  • UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:

(WebKit::PlaybackSessionManagerProxy::seekableRangesVectorChanged):

Tools:

Patch by Alex Christensen <achristensen@webkit.org> on 2021-12-14
Reviewed by Eric Carlson.

  • TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm:

(TestWebKitAPI::TEST):

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

Adhere to DisplayList iterator's API contract in MemoryDisplayList::~InMemoryDisplayList()
https://bugs.webkit.org/show_bug.cgi?id=234264

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2021-12-14
Reviewed by Myles C. Maxfield.

The client is not adhearing to the DisplayList Iterator's API contract in MemoryDisplayList::~InMemoryDisplayList():
"Part of the iterator's API contract is that if the item is nullopt, you're not allowed to keep
iterating - doing this will lead to an infinite loop."

Here we now do so by breaking out of iteration if the item is nullopt.

  • platform/graphics/displaylists/InMemoryDisplayList.cpp:

(WebCore::DisplayList::InMemoryDisplayList::~InMemoryDisplayList):

2:10 PM Changeset in webkit [287047] by Alan Bujtas
  • 13 edits in trunk/Source/WebCore

[LFC] Let BoxGeometry have logical values only
https://bugs.webkit.org/show_bug.cgi?id=234304

Reviewed by Antti Koivisto.

This helps when converting logical (layout) values to physical (display) values.

  • display/css/DisplayFillLayerImageGeometry.cpp:

(WebCore::Display::geometryForLayer):

  • layout/formattingContexts/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):

  • layout/formattingContexts/FormattingGeometry.cpp:

(WebCore::Layout::FormattingGeometry::outOfFlowNonReplacedVerticalGeometry const):
(WebCore::Layout::FormattingGeometry::outOfFlowNonReplacedHorizontalGeometry const):
(WebCore::Layout::FormattingGeometry::outOfFlowReplacedVerticalGeometry const):
(WebCore::Layout::FormattingGeometry::outOfFlowReplacedHorizontalGeometry const):
(WebCore::Layout::FormattingGeometry::computedPadding const):

  • layout/formattingContexts/FormattingQuirks.cpp:

(WebCore::Layout::FormattingQuirks::heightValueOfNearestContainingBlockWithFixedHeight const):

  • layout/formattingContexts/block/BlockFormattingGeometry.cpp:

(WebCore::Layout::BlockFormattingGeometry::inFlowNonReplacedContentHeightAndMargin const):
(WebCore::Layout::BlockFormattingGeometry::inFlowNonReplacedContentWidthAndMargin const):

  • layout/formattingContexts/inline/InlineLine.cpp:

(WebCore::Layout::Line::initialize):
(WebCore::Layout::Line::addBorderAndPaddingEndForInlineBoxDecorationClone):

  • layout/formattingContexts/inline/InlineLineBox.cpp:

(WebCore::Layout::LineBox::logicalBorderBoxForInlineBox const):

  • layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:

(WebCore::Layout::LineBoxBuilder::constructAndAlignInlineLevelBoxes):

  • layout/formattingContexts/inline/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::inlineItemWidth const):

  • layout/formattingContexts/table/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::setUsedGeometryForCells):

  • layout/layouttree/LayoutBoxGeometry.cpp:

(WebCore::Layout::BoxGeometry::paddingBox const):

  • layout/layouttree/LayoutBoxGeometry.h:

(WebCore::Layout::BoxGeometry::verticalBorder const):
(WebCore::Layout::BoxGeometry::horizontalBorder const):
(WebCore::Layout::BoxGeometry::borderAndPaddingStart const):
(WebCore::Layout::BoxGeometry::borderAndPaddingEnd const):
(WebCore::Layout::BoxGeometry::contentBoxTop const):
(WebCore::Layout::BoxGeometry::contentBoxLeft const):
(WebCore::Layout::BoxGeometry::paddingBoxTop const):
(WebCore::Layout::BoxGeometry::paddingBoxLeft const):
(WebCore::Layout::BoxGeometry::paddingBoxHeight const):
(WebCore::Layout::BoxGeometry::paddingBoxWidth const):
(WebCore::Layout::BoxGeometry::borderBoxHeight const):
(WebCore::Layout::BoxGeometry::borderBoxWidth const):
(WebCore::Layout::BoxGeometry::paddingBefore const):
(WebCore::Layout::BoxGeometry::paddingStart const):
(WebCore::Layout::BoxGeometry::paddingAfter const):
(WebCore::Layout::BoxGeometry::paddingEnd const):
(WebCore::Layout::BoxGeometry::verticalPadding const):
(WebCore::Layout::BoxGeometry::horizontalPadding const):
(WebCore::Layout::BoxGeometry::borderBefore const):
(WebCore::Layout::BoxGeometry::borderStart const):
(WebCore::Layout::BoxGeometry::borderAfter const):
(WebCore::Layout::BoxGeometry::borderEnd const):
(WebCore::Layout::BoxGeometry::paddingTop const): Deleted.
(WebCore::Layout::BoxGeometry::paddingLeft const): Deleted.
(WebCore::Layout::BoxGeometry::paddingBottom const): Deleted.
(WebCore::Layout::BoxGeometry::paddingRight const): Deleted.
(WebCore::Layout::BoxGeometry::borderTop const): Deleted.
(WebCore::Layout::BoxGeometry::borderLeft const): Deleted.
(WebCore::Layout::BoxGeometry::borderBottom const): Deleted.
(WebCore::Layout::BoxGeometry::borderRight const): Deleted.

2:04 PM Changeset in webkit [287046] by Patrick Angle
  • 2 edits in trunk/Source/WebCore

Web Inspector: After r286657, anonymous layers are providing an empty string for their grouping text
https://bugs.webkit.org/show_bug.cgi?id=234012

Reviewed by Devin Rousso.

Covered by existing test: LayoutTests/inspector/css/getMatchedStylesForNodeLayerGrouping.html

For anonymous layers, we should not provide the text property to the frontend, as there is technically no
text, not an empty string, provided by the author. This is effectively a minor optimization, as the frontend
does correctly handle an empty string the same way it handles no string.

  • inspector/InspectorStyleSheet.cpp:

(WebCore::buildArrayForGroupings):

1:31 PM Changeset in webkit [287045] by Jonathan Bedard
  • 7 edits
    2 adds in trunk/Tools

[reporelaypy] Update checkout with hook instead of polling
https://bugs.webkit.org/show_bug.cgi?id=234243
<rdar://problem/86413065>

Reviewed by Dewei Zhu.

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

export HookProcessor and HookReceiver.

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

(Checkout.update_for): If a branch is new, we need to track it.

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

(Database.init): Use self.host and self.password.

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

(HookProcessor): Class to process received hooks.
(HookReceiver): Class to receive hooks and queue them for processing.

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

(HooksUnittest):
(HooksUnittest.setUp):
(HooksUnittest.test_receive):
(HooksUnittest.test_invalid):
(HooksUnittest.test_process):
(HooksUnittest.test_hmac):
(HooksUnittest.test_invalid_hmac):

  • Tools/Scripts/libraries/reporelaypy/reporelaypy/webserver.py: Add hook routes,

if hooks are enabled.

  • Tools/Scripts/libraries/reporelaypy/run: Allow caller to enable hooks.
  • Tools/Scripts/libraries/reporelaypy/setup.py: Bump version.

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

1:16 PM Changeset in webkit [287044] by Russell Epstein
  • 4 edits in branches/safari-613.1.12-branch/Source/ThirdParty/ANGLE

Cherry-pick r286964. rdar://problem/86413146

[MacCatalyst] fix iOSMac after refactor in r286899
https://bugs.webkit.org/show_bug.cgi?id=234250

Reviewed by Dean Jackson.

Also includes a longer term fix for
https://bugs.webkit.org/show_bug.cgi?id=233977

Tested builds on mac, iOS, TV SDKs, plus iOSMac

  • src/common/platform.h:
  • src/libANGLE/renderer/metal/gen_mtl_format_table.py: (gen_image_map_switch_string):
  • src/libANGLE/renderer/metal/mtl_format_table_autogen.mm: (rx::mtl::Format::init):

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

12:57 PM Changeset in webkit [287043] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Take text-align offset into account when computing the RTL display box geometry
https://bugs.webkit.org/show_bug.cgi?id=234287

Reviewed by Antti Koivisto.

Use LineBox::rootInlineBoxAlignmentOffset to offset the visual start position for RTL display boxes.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::processNonBidiContent):
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

12:23 PM Changeset in webkit [287042] by Russell Epstein
  • 2 edits in branches/safari-613.1.12-branch/Source/WebCore

Cherry-pick r287011. rdar://problem/86438924

WebContent process crashes at ContentSecurityPolicySourceList::matchesAll
https://bugs.webkit.org/show_bug.cgi?id=234288
rdar://problem/86438924

Reviewed by Simon Fraser.

  • page/csp/ContentSecurityPolicyDirectiveList.cpp: (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForScript const):

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

12:11 PM Changeset in webkit [287041] by Russell Epstein
  • 9 edits in trunk/Source

Versioning.

WebKit-7613.1.13

12:11 PM Changeset in webkit [287040] by achristensen@apple.com
  • 13 edits in trunk

Add _WKContentRuleListAction.redirected and .modifiedHeaders
https://bugs.webkit.org/show_bug.cgi?id=234289

Reviewed by Tim Hatcher.

Source/WebCore:

These inform the UI process about new actions taken by the extension.

  • contentextensions/ContentExtensionsBackend.cpp:

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

  • contentextensions/ContentRuleListResults.h:

(WebCore::ContentRuleListResults::shouldNotifyApplication const):
(WebCore::ContentRuleListResults::Result::encode const):
(WebCore::ContentRuleListResults::Result::decode):
(WebCore::ContentRuleListResults::Result::shouldNotifyApplication const): Deleted.

Source/WebKit:

  • UIProcess/API/APIContentRuleListAction.cpp:

(API::ContentRuleListAction::redirected const):
(API::ContentRuleListAction::modifiedHeaders const):

  • UIProcess/API/APIContentRuleListAction.h:
  • UIProcess/API/Cocoa/_WKContentRuleListAction.h:
  • UIProcess/API/Cocoa/_WKContentRuleListAction.mm:

(-[_WKContentRuleListAction redirected]):
(-[_WKContentRuleListAction modifiedHeaders]):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::contentRuleListNotification):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKContentExtensionStore.mm:

(checkURLs):
(TEST_F):

  • TestWebKitAPI/cocoa/TestNavigationDelegate.h:
  • TestWebKitAPI/cocoa/TestNavigationDelegate.mm:

(-[TestNavigationDelegate _webView:contentRuleListWithIdentifier:performedAction:forURL:]):

12:06 PM Changeset in webkit [287039] by achristensen@apple.com
  • 15 edits in trunk

Move FTP disabling from NetworkLoad::start to NetworkDataTask::NetworkDataTask
https://bugs.webkit.org/show_bug.cgi?id=234280
Source/WebKit:

<rdar://85015428>

Reviewed by Brady Eidson.

A NetworkLoad synchronously failing has caused several issues.
This issue is when a WKDownload is prevented in this way, we don't have a WKDownload in the UI process yet,
and we haven't assigned it an identifier in the network process yet either, so we dereference null and send
unreceived messages in many places. To fix this issue, I move the FTP check to the NetworkDataTask constructor
like we do with blocked port checks and invalid URL checks. I also found that there is a race condition with
CFNetwork also failing to load an empty FTP URL, so we need to prevent us from asking CFNetwork to start a load
for which we have scheduled a failure.

Covered by an API test which used to hit all the horrible failures and now passes reliably.

  • NetworkProcess/NetworkCORSPreflightChecker.cpp:

(WebKit::NetworkCORSPreflightChecker::wasBlockedByDisabledFTP):

  • NetworkProcess/NetworkCORSPreflightChecker.h:
  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::NetworkDataTask):
(WebKit::NetworkDataTask::scheduleFailure):

  • NetworkProcess/NetworkDataTask.h:
  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::start):
(WebKit::NetworkLoad::wasBlockedByDisabledFTP):

  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/PingLoad.cpp:

(WebKit::PingLoad::wasBlockedByDisabledFTP):

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

(WebKit::NetworkDataTaskCocoa::resume):

  • Shared/WebErrors.cpp:

(WebKit::ftpDisabledError):

  • Shared/WebErrors.h:

Tools:

Reviewed by Brady Eidson.

  • TestWebKitAPI/Tests/WebKitCocoa/Download.mm:
11:59 AM Changeset in webkit [287038] by Tyler Wilcock
  • 6 edits
    2 adds in trunk

Web Inspector: test webpage keeps reloading when Inspector is open
https://bugs.webkit.org/show_bug.cgi?id=234076

Reviewed by Chris Fleizach.

Source/WebCore:

https://trac.webkit.org/changeset/284335/webkit introduced the
potential for infinite recursion in AccessibilityObjectMac::shouldIgnoreGroup:

From accessibilityIsIgnored to computeAccessibilityIsIgnored to
defaultObjectInclusion to accessibilityPlatformIncludesObject to
shouldIgnoreGroup to accessibilityText to titleElementText to
exposesTitleUIElement to accessibilityIsIgnored to ...

shouldIgnoreGroup returns true if the group has one static text
child with the same content as the group's AX text. We fix the
recursion by making this check more conservative.

Rather than checking all of the AX text (which includes title text, alt text, help text,
visible text, placeholder text), only check the group's alt text and help text. This
accomplishes the original problem statement laid out in
https://bugs.webkit.org/show_bug.cgi?id=169924#c0 while avoiding
infinite recursion, as nothing in AccessibilityNodeObject::alternativeText or
AccessibilityNodeObject::helpText calls accessibilityIsIgnored.

Test: accessibility/mac/ignore-redundant-groups-crash.html

  • accessibility/AccessibilityNodeObject.h:

Move alternativeText and helpText method definitions from private to public
so they can be called by the static shouldIgnoreGroup method in AccessibilityObjectMac.

  • accessibility/mac/AccessibilityObjectMac.mm:

(WebCore::shouldIgnoreGroup):
Check only alt text and help text rather than all
AX text when deciding if a group should be ignored.

LayoutTests:

This patch fixes the potential for infinite recursion introduced by
https://trac.webkit.org/changeset/284335/webkit. See corresponding
Source/WebCore/ChangeLog for full details.

  • accessibility/mac/ignore-redundant-accessibility-text-groups-expected.txt:
  • accessibility/mac/ignore-redundant-accessibility-text-groups.html:

Add an aria-describedby testcase.

  • accessibility/mac/ignore-redundant-groups-crash-expected.txt: Added.
  • accessibility/mac/ignore-redundant-groups-crash.html:

Added. Exercises the crash testcase raised in
https://bugs.webkit.org/show_bug.cgi?id=234076 along with other
branches in AccessibilityNodeObject::alternativeText to prevent future
problems.

11:48 AM Changeset in webkit [287037] by Russell Epstein
  • 1 copy in branches/safari-613.1.12-branch

New branch.

11:45 AM Changeset in webkit [287036] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Take inline axis direction into account when computing horizontal alignment offset
https://bugs.webkit.org/show_bug.cgi?id=234286

Reviewed by Antti Koivisto.

This is in preparation for computing the content visual start when text-align is non-initial.

  • layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:

(WebCore::Layout::horizontalAlignmentOffset):
(WebCore::Layout::LineBoxBuilder::build):

11:33 AM Changeset in webkit [287035] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Fix the build

  • Configurations/webpushtool.xcconfig:
11:23 AM Changeset in webkit [287034] by Megan Gardner
  • 2 edits in trunk/Source/WebKit

Attachment does not update after markup.
https://bugs.webkit.org/show_bug.cgi?id=234266

Reviewed by Wenson Hsieh.

If we don't call the deligate to inform Mail about the new attachment data,
it will not update and the original image will be sent.

  • UIProcess/mac/WKSharingServicePickerDelegate.mm:

(-[WKSharingServicePickerDelegate sharingService:didShareItems:]):

11:05 AM Changeset in webkit [287033] by Russell Epstein
  • 1 copy in tags/Safari-613.1.11.6

Tag Safari-613.1.11.6.

11:01 AM Changeset in webkit [287032] by Russell Epstein
  • 9 edits in branches/safari-613.1.11-branch/Source

Versioning.

WebKit-7613.1.11.6

10:30 AM Changeset in webkit [287031] by Alan Coon
  • 3 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r286999. rdar://problem/86425321

Momentum Event Dispatcher: Excessive "kick" at the beginning of scrolling (especially on 60fps displays)
https://bugs.webkit.org/show_bug.cgi?id=234279
<rdar://problem/86425321>

Reviewed by Simon Fraser.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::handleWheelEvent): (WebKit::MomentumEventDispatcher::didStartMomentumPhase): Instead of back-dating the animation to try to acquire a momentum-start delta, pass the one we got from the event through, and start the animation curve at momentum-start time. Also, critically, inset ourselves along the curve by the amount of that initial delta (since the time starts now).

Tested at both 60fps and 120fps, this significantly smooths out the
transition from fingers-down phase to the generated momentum phase,
avoiding the overly large initial delta.

  • WebProcess/WebPage/MomentumEventDispatcher.h:

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

10:20 AM Changeset in webkit [287030] by dino@apple.com
  • 16 edits
    1 add in trunk

Allow override of system's preferred color scheme
https://bugs.webkit.org/show_bug.cgi?id=234199
<rdar://problem/86366044>

Reviewed by Tim Horton.

Source/WebCore:

Use a user-specified preference for color-scheme before reading
the system value.

  • css/MediaQueryEvaluator.cpp:

(WebCore::prefersColorSchemeEvaluate): If the document loader was given
a preference, use that when evaluating the media query.

  • loader/DocumentLoader.cpp: New property - colorSchemePreference.

(WebCore::DocumentLoader::colorSchemePreference const):

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::setColorSchemePreference):

  • dom/Document.cpp:

(WebCore::Document::useDarkAppearance const): Check the DocumentLoader here too.

Source/WebKit:

Expose new Private API that allows the user to give an explicit per-page preference
for light or dark color schemes rather than reading the system value.

  • Scripts/webkit/messages.py:

(headers_for_type): Add header for DocumentLoader.

  • Shared/WebsitePoliciesData.cpp: Encode the new value in the policies sent

to the Web Process.
(WebKit::WebsitePoliciesData::encode const):
(WebKit::WebsitePoliciesData::decode):
(WebKit::WebsitePoliciesData::applyToDocumentLoader):

  • Shared/WebsitePoliciesData.h:
  • UIProcess/API/APIWebsitePolicies.cpp: Expose a new policy "colorSchemePreference".

(API::WebsitePolicies::copy const):
(API::WebsitePolicies::data):

  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/Cocoa/WKWebpagePreferences.mm: Expose a new private API "_colorSchemePreference".

(-[WKWebpagePreferences _colorSchemePreference]):
(-[WKWebpagePreferences _setColorSchemePreference:]):

  • UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h:

Tools:

New API test that checks the color-scheme after
explicitly setting it.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/color-scheme.html: Added. Note: Xcode was

being difficult and wouldn't let me put this file in the right order
for the Copy Build Phase :(

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
10:03 AM Changeset in webkit [287029] by commit-queue@webkit.org
  • 1 edit
    2 adds in trunk/LayoutTests

Add test case for execCommand to verify inserting an ordered list and deletion
https://bugs.webkit.org/show_bug.cgi?id=234113
<rdar://85926354>

Patch by Brandon Stewart <Brandon> on 2021-12-14
Reviewed by Chris Dumez.

Add test to verify correct execution of execCommand when inserting an ordered
list and calling delete.

  • editing/execCommand/insert-ordered-list-and-delete-expected.txt: Added.
  • editing/execCommand/insert-ordered-list-and-delete.html: Added.
9:20 AM Changeset in webkit [287028] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Make the LineBox content (text runs and inline level boxes) relative to the root inline box.
https://bugs.webkit.org/show_bug.cgi?id=234285

Reviewed by Antti Koivisto.

Let's decouple the root inline box's logical left and the text-align based horizontal offset and
also make the content inside the root inline box relative to it.
This is in preparation for handling text-align with non-RTL content.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::processNonBidiContent):
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):

  • layout/formattingContexts/inline/InlineLineBox.cpp:

(WebCore::Layout::LineBox::LineBox):
(WebCore::Layout::LineBox::logicalRectForTextRun const):

  • layout/formattingContexts/inline/InlineLineBox.h:

(WebCore::Layout::LineBox::rootInlineBoxAlignmentOffset const):

  • layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:

(WebCore::Layout::LineBoxBuilder::build):

9:05 AM Changeset in webkit [287027] by Russell Epstein
  • 1 copy in tags/Safari-613.1.11.5

Tag Safari-613.1.11.5.

9:05 AM Changeset in webkit [287026] by Russell Epstein
  • 1 delete in tags/Safari-613.1.11.5

Delete tag.

8:43 AM Changeset in webkit [287025] by Angelos Oikonomopoulos
  • 2 edits in trunk/Tools

[JSC] Fix LocalJumpError in run-jsc-stress-tests
https://bugs.webkit.org/show_bug.cgi?id=234295

Reviewed by Michael Catanzaro.

Ruby code cannot return from a Proc; use an if/else instead. This fixes
the LocalJumpError reported in https://bugs.webkit.org/show_bug.cgi?id=233926.

  • Scripts/run-jsc-stress-tests:
8:29 AM Changeset in webkit [287024] by commit-queue@webkit.org
  • 7 edits in trunk

TextDecoder doesn't detect invalid UTF-8 sequences early enough
https://bugs.webkit.org/show_bug.cgi?id=233921

Patch by Andreu Botella <andreu@andreubotella.com> on 2021-12-14
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Import WPT tests from
https://github.com/web-platform-tests/wpt/pull/31537.

  • web-platform-tests/encoding/textdecoder-eof.any.js:

(test):

  • web-platform-tests/encoding/textdecoder-streaming.any-expected.txt:
  • web-platform-tests/encoding/textdecoder-streaming.any.js:

(string_appeared_here.forEach.):
(string_appeared_here.forEach.test):
(string_appeared_here.forEach):

  • web-platform-tests/encoding/textdecoder-streaming.any.worker-expected.txt:

Source/WebCore/PAL:

In streaming mode, when TextCodecUTF8 found a lead byte for which a
valid sequence would span longer than the currently available bytes, it
used to defer any processing of that sequence until all such bytes were
available, even if errors could be detected earlier. Additionally, if
the stream was flushed at that point, it would emit a single replacement
character, regardless of whether the remaining bytes formed a valid
sequence, even if they had lead bytes, resulting in skipped characters.
Both issues are solved by always checking the validity of partial
sequences.

The approach used in this patch uses decodeNonASCIISequence to find
the length of the maximal subpart of a partial sequence, and if the
length is equal to the partial sequence size and we're not at EOF, we
don't emit the error. This is enough to handle the missing characters at
EOF, and when combined with changing the condition of the outer do-while
loops in the decode method from flush && m_partialSequenceSize to
only m_partialSequenceSize, it also fixes the streaming issue.

This patch is a port of
https://chromium-review.googlesource.com/c/chromium/src/+/3263938

Tests: imported/w3c/web-platform-tests/encoding/textdecoder-eof.any.html

imported/w3c/web-platform-tests/encoding/textdecoder-stream.any.html

  • pal/text/TextCodecUTF8.cpp:

(PAL::TextCodecUTF8::handlePartialSequence): Changed to always process
partial sequences.
(PAL::TextCodecUTF8::decode): Changed the loop condition of the outer
do-while loops to not depend on flush.

8:20 AM Changeset in webkit [287023] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Incorrect aspect ratio size
https://bugs.webkit.org/show_bug.cgi?id=234148

Patch by Rob Buis <rbuis@igalia.com> on 2021-12-14
Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-036-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-036.html: Added.

Source/WebCore:

We previously did a LayoutUnit conversion for the aspect ratio parameter, possibly because
blockSizeFromAspectRatio/inlineSizeFromAspectRatio changed the parameter type over time.
Since this conversion loses precision, just pass as double.

Test: imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-036.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::constrainLogicalHeightByMinMax const):
(WebCore::RenderBox::computeLogicalHeight const):
(WebCore::RenderBox::availableLogicalHeightUsing const):
(WebCore::RenderBox::computePositionedLogicalHeightUsing const):
(WebCore::RenderBox::computeLogicalWidthFromAspectRatioInternal const):
(WebCore::RenderBox::computeMinMaxLogicalWidthFromAspectRatio const):

7:49 AM Changeset in webkit [287022] by Razvan Caliman
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Computed Panel: Adjust color of CSS Variables grouping mode control
https://bugs.webkit.org/show_bug.cgi?id=234246
<rdar://problem/86414682>

Reviewed by Devin Rousso.

Change color of CSS variables grouping mode scope bar from the system accent color to transparent
so it doesn't draw disproportionate attention to itself.

  • UserInterface/Views/ComputedStyleDetailsPanel.css:

(.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .scope-bar.computed-style-variables-grouping-mode:not(:hover)):
(.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .scope-bar.computed-style-variables-grouping-mode.default-item-selected:not(:hover)): Deleted.
(.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .scope-bar.computed-style-variables-grouping-mode.default-item-selected:hover): Deleted.

2:48 AM Changeset in webkit [287021] by Jean-Yves Avenard
  • 498 edits in trunk

PerformanceTests:
Distinguish contiguous SharedBuffer from non-contiguous one and guarantee immutability: part 3
https://bugs.webkit.org/show_bug.cgi?id=233677

Reviewed by Youenn Fablet.

  • DecoderTest/DecoderTest/main.mm:

(main):

Source/JavaScriptCore:
Rename SharedBuffer classes.
https://bugs.webkit.org/show_bug.cgi?id=233677
rdar://problem/85963900

Reviewed by Youenn Fablet.

SharedBuffer are renamed FragmentedSharedBuffer and
ContiguousSharedBuffer to SharedBuffer to better reflect their actual
types.

  • runtime/ArrayBuffer.h:

Source/WebCore:
Rename SharedBuffer classes.
https://bugs.webkit.org/show_bug.cgi?id=233677
rdar://problem/85963900

Reviewed by Youenn Fablet.

SharedBuffer are renamed FragmentedSharedBuffer and
ContiguousSharedBuffer to SharedBuffer to better reflect their actual
types.

Rename only, no change in behaviour.

  • Modules/async-clipboard/ClipboardImageReader.cpp:
  • Modules/async-clipboard/ClipboardImageReader.h:
  • Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:
  • Modules/async-clipboard/ClipboardItemBindingsDataSource.h:
  • Modules/async-clipboard/ios/ClipboardImageReaderIOS.mm:
  • Modules/async-clipboard/mac/ClipboardImageReaderMac.mm:
  • Modules/cache/CacheStorageConnection.cpp:
  • Modules/cache/DOMCache.cpp:
  • Modules/cache/DOMCache.h:
  • Modules/cache/DOMCacheEngine.cpp:
  • Modules/cache/DOMCacheEngine.h:
  • Modules/encryptedmedia/CDM.cpp:
  • Modules/encryptedmedia/CDM.h:
  • Modules/encryptedmedia/CDMClient.h:
  • Modules/encryptedmedia/InitDataRegistry.cpp:
  • Modules/encryptedmedia/InitDataRegistry.h:
  • Modules/encryptedmedia/MediaKeySession.cpp:
  • Modules/encryptedmedia/MediaKeySession.h:
  • Modules/encryptedmedia/MediaKeyStatusMap.cpp:
  • Modules/encryptedmedia/MediaKeyStatusMap.h:
  • Modules/encryptedmedia/MediaKeys.cpp:
  • Modules/encryptedmedia/MediaKeys.h:
  • Modules/fetch/FetchBody.cpp:
  • Modules/fetch/FetchBody.h:
  • Modules/fetch/FetchBodyConsumer.cpp:
  • Modules/fetch/FetchBodyConsumer.h:
  • Modules/fetch/FetchLoader.cpp:
  • Modules/fetch/FetchLoader.h:
  • Modules/fetch/FetchResponse.cpp:
  • Modules/fetch/FetchResponse.h:
  • Modules/highlight/AppHighlight.h:
  • Modules/highlight/AppHighlightRangeData.cpp:
  • Modules/highlight/AppHighlightRangeData.h:
  • Modules/highlight/AppHighlightStorage.cpp:
  • Modules/highlight/AppHighlightStorage.h:
  • Modules/indexeddb/server/IDBSerialization.cpp:
  • Modules/indexeddb/server/IDBSerialization.h:
  • Modules/mediarecorder/MediaRecorder.cpp:
  • Modules/mediarecorder/MediaRecorder.h:
  • Modules/mediasession/MediaMetadata.cpp:
  • Modules/mediasource/SourceBuffer.cpp:
  • Modules/mediasource/SourceBuffer.h:
  • Modules/mediastream/RTCDataChannelRemoteHandler.h:
  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:
  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
  • Modules/streams/ReadableStreamSink.h:
  • bindings/js/JSDOMGlobalObject.cpp:
  • bindings/js/ScriptBufferSourceProvider.h:
  • bindings/js/SerializedScriptValue.h:
  • css/CSSFontFaceSource.cpp:
  • css/CSSFontFaceSource.h:
  • dom/DataTransfer.cpp:
  • editing/Editor.cpp:
  • editing/Editor.h:
  • editing/SerializedAttachmentData.h:
  • editing/WebContentReader.h:
  • editing/WebCorePasteboardFileReader.cpp:
  • editing/WebCorePasteboardFileReader.h:
  • editing/cocoa/EditorCocoa.mm:
  • editing/cocoa/HTMLConverter.mm:
  • editing/cocoa/WebContentReaderCocoa.mm:
  • editing/gtk/WebContentReaderGtk.cpp:
  • editing/mac/EditorMac.mm:
  • fileapi/Blob.h:
  • fileapi/NetworkSendQueue.cpp:
  • fileapi/NetworkSendQueue.h:
  • html/FTPDirectoryDocument.cpp:
  • html/HTMLAttachmentElement.cpp:
  • html/HTMLAttachmentElement.h:
  • html/HTMLMediaElement.cpp:
  • html/HTMLMediaElement.h:
  • html/ImageDocument.cpp:
  • inspector/InspectorInstrumentation.cpp:
  • inspector/InspectorInstrumentation.h:
  • inspector/InspectorInstrumentationWebKit.cpp:
  • inspector/InspectorInstrumentationWebKit.h:
  • inspector/NetworkResourcesData.cpp:
  • inspector/NetworkResourcesData.h:
  • inspector/agents/InspectorNetworkAgent.cpp:
  • inspector/agents/InspectorNetworkAgent.h:
  • inspector/agents/InspectorPageAgent.cpp:
  • inspector/agents/InspectorPageAgent.h:
  • loader/ContentFilter.cpp:
  • loader/CrossOriginPreflightChecker.cpp:
  • loader/DocumentLoader.cpp:
  • loader/DocumentLoader.h:
  • loader/DocumentThreadableLoader.cpp:
  • loader/EmptyClients.cpp:
  • loader/FrameLoader.cpp:
  • loader/FrameLoader.h:
  • loader/FrameLoaderClient.h:
  • loader/LoaderStrategy.h:
  • loader/NetscapePlugInStreamLoader.cpp:
  • loader/NetscapePlugInStreamLoader.h:
  • loader/ResourceCryptographicDigest.cpp:
  • loader/ResourceCryptographicDigest.h:
  • loader/ResourceLoader.cpp:
  • loader/ResourceLoader.h:
  • loader/SubresourceLoader.cpp:
  • loader/SubresourceLoader.h:
  • loader/SubstituteData.h:
  • loader/SubstituteResource.h:
  • loader/appcache/ApplicationCacheHost.cpp:
  • loader/appcache/ApplicationCacheHost.h:
  • loader/appcache/ApplicationCacheResource.cpp:
  • loader/appcache/ApplicationCacheResource.h:
  • loader/appcache/ApplicationCacheStorage.cpp:
  • loader/appcache/ApplicationCacheStorage.h:
  • loader/archive/ArchiveFactory.cpp:
  • loader/archive/ArchiveFactory.h:
  • loader/archive/ArchiveResource.cpp:
  • loader/archive/ArchiveResource.h:
  • loader/archive/cf/LegacyWebArchive.cpp:
  • loader/archive/cf/LegacyWebArchive.h:
  • loader/archive/mhtml/MHTMLArchive.cpp:
  • loader/archive/mhtml/MHTMLArchive.h:
  • loader/archive/mhtml/MHTMLParser.cpp:
  • loader/archive/mhtml/MHTMLParser.h:
  • loader/cache/CachedApplicationManifest.cpp:
  • loader/cache/CachedApplicationManifest.h:
  • loader/cache/CachedCSSStyleSheet.cpp:
  • loader/cache/CachedCSSStyleSheet.h:
  • loader/cache/CachedFont.cpp:
  • loader/cache/CachedFont.h:
  • loader/cache/CachedImage.cpp:
  • loader/cache/CachedImage.h:
  • loader/cache/CachedRawResource.cpp:
  • loader/cache/CachedRawResource.h:
  • loader/cache/CachedResource.cpp:
  • loader/cache/CachedResource.h:
  • loader/cache/CachedSVGDocument.cpp:
  • loader/cache/CachedSVGDocument.h:
  • loader/cache/CachedSVGFont.cpp:
  • loader/cache/CachedSVGFont.h:
  • loader/cache/CachedScript.cpp:
  • loader/cache/CachedScript.h:
  • loader/cache/CachedTextTrack.cpp:
  • loader/cache/CachedTextTrack.h:
  • loader/cache/CachedXSLStyleSheet.cpp:
  • loader/cache/CachedXSLStyleSheet.h:
  • loader/cocoa/DiskCacheMonitorCocoa.h:
  • loader/cocoa/DiskCacheMonitorCocoa.mm:
  • loader/ios/LegacyPreviewLoader.h:
  • loader/ios/LegacyPreviewLoader.mm:
  • page/EditorClient.h:
  • page/Page.cpp:
  • page/PageSerializer.cpp:
  • page/PageSerializer.h:
  • page/ShareData.h:
  • page/ShareDataReader.cpp:
  • platform/KeyedCoding.h:
  • platform/NowPlayingManager.h:
  • platform/Pasteboard.cpp:
  • platform/Pasteboard.h:
  • platform/PasteboardCustomData.cpp:
  • platform/PasteboardCustomData.h:
  • platform/PasteboardStrategy.h:
  • platform/PasteboardWriterData.h:
  • platform/PlatformContentFilter.h:
  • platform/PlatformPasteboard.h:
  • platform/PreviewConverter.cpp:
  • platform/PreviewConverter.h:
  • platform/PreviewConverterClient.h:
  • platform/PreviewConverterProvider.h:
  • platform/PromisedAttachmentInfo.h:
  • platform/SharedBuffer.cpp:
  • platform/SharedBuffer.h:
  • platform/SharedBufferChunkReader.cpp:
  • platform/SharedBufferChunkReader.h:
  • platform/StaticPasteboard.cpp:
  • platform/StaticPasteboard.h:
  • platform/audio/NowPlayingInfo.h:
  • platform/audio/cocoa/AudioFileReaderCocoa.cpp:
  • platform/cf/KeyedEncoderCF.cpp:
  • platform/cf/KeyedEncoderCF.h:
  • platform/cf/SharedBufferCF.cpp:
  • platform/cocoa/NetworkExtensionContentFilter.h:
  • platform/cocoa/NetworkExtensionContentFilter.mm:
  • platform/cocoa/ParentalControlsContentFilter.h:
  • platform/cocoa/ParentalControlsContentFilter.mm:
  • platform/cocoa/PasteboardCocoa.mm:
  • platform/cocoa/SharedBufferCocoa.mm:
  • platform/encryptedmedia/CDMInstance.h:
  • platform/encryptedmedia/CDMInstanceSession.h:
  • platform/encryptedmedia/CDMPrivate.h:
  • platform/encryptedmedia/CDMProxy.cpp:
  • platform/encryptedmedia/CDMProxy.h:
  • platform/encryptedmedia/CDMUtilities.cpp:
  • platform/encryptedmedia/CDMUtilities.h:
  • platform/encryptedmedia/clearkey/CDMClearKey.cpp:
  • platform/encryptedmedia/clearkey/CDMClearKey.h:
  • platform/generic/KeyedEncoderGeneric.cpp:
  • platform/generic/KeyedEncoderGeneric.h:
  • platform/glib/KeyedEncoderGlib.cpp:
  • platform/glib/KeyedEncoderGlib.h:
  • platform/glib/SharedBufferGlib.cpp:
  • platform/graphics/Font.cpp:
  • platform/graphics/Font.h:
  • platform/graphics/FontPlatformData.h:
  • platform/graphics/Image.cpp:
  • platform/graphics/Image.h:
  • platform/graphics/ImageBackingStore.h:
  • platform/graphics/ImageDecoder.cpp:
  • platform/graphics/ImageDecoder.h:
  • platform/graphics/ImageSource.cpp:
  • platform/graphics/ImageSource.h:
  • platform/graphics/Model.cpp:
  • platform/graphics/Model.h:
  • platform/graphics/PlatformMediaResourceLoader.h:
  • platform/graphics/SourceBufferPrivate.cpp:
  • platform/graphics/SourceBufferPrivate.h:
  • platform/graphics/WOFFFileFormat.cpp:
  • platform/graphics/WOFFFileFormat.h:
  • platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
  • platform/graphics/avfoundation/CDMFairPlayStreaming.h:
  • platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
  • platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
  • platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
  • platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
  • platform/graphics/cairo/FontCustomPlatformData.h:
  • platform/graphics/cg/ImageDecoderCG.cpp:
  • platform/graphics/cg/ImageDecoderCG.h:
  • platform/graphics/cocoa/FontPlatformDataCocoa.mm:
  • platform/graphics/cocoa/SourceBufferParser.cpp:
  • platform/graphics/cocoa/SourceBufferParser.h:
  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:
  • platform/graphics/coretext/FontPlatformDataCoreText.cpp:
  • platform/graphics/displaylists/DisplayListItemBuffer.cpp:
  • platform/graphics/displaylists/DisplayListItemBuffer.h:
  • platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:
  • platform/graphics/gstreamer/GStreamerCommon.cpp:
  • platform/graphics/gstreamer/GStreamerCommon.h:
  • platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:
  • platform/graphics/gstreamer/ImageDecoderGStreamer.h:
  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
  • platform/graphics/gstreamer/eme/CDMProxyClearKey.h:
  • platform/graphics/gstreamer/eme/CDMThunder.cpp:
  • platform/graphics/gstreamer/eme/CDMThunder.h:
  • platform/graphics/gstreamer/eme/GStreamerEMEUtilities.cpp:
  • platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h:
  • platform/graphics/mac/FontCustomPlatformData.cpp:
  • platform/graphics/mac/FontCustomPlatformData.h:
  • platform/graphics/opentype/OpenTypeMathData.cpp:
  • platform/graphics/opentype/OpenTypeMathData.h:
  • platform/graphics/opentype/OpenTypeTypes.h:
  • platform/graphics/opentype/OpenTypeUtilities.cpp:
  • platform/graphics/opentype/OpenTypeUtilities.h:
  • platform/graphics/opentype/OpenTypeVerticalData.cpp:
  • platform/graphics/win/DirectWriteUtilities.h:
  • platform/graphics/win/FontCustomPlatformData.cpp:
  • platform/graphics/win/FontCustomPlatformData.h:
  • platform/graphics/win/FontCustomPlatformDataCairo.cpp:
  • platform/graphics/win/FontPlatformDataCairoWin.cpp:
  • platform/graphics/win/FontPlatformDataWin.cpp:
  • platform/graphics/win/ImageDecoderDirect2D.cpp:
  • platform/graphics/win/ImageDecoderDirect2D.h:
  • platform/graphics/win/ImageWin.cpp:
  • platform/gtk/SelectionData.h:
  • platform/image-decoders/ScalableImageDecoder.cpp:
  • platform/image-decoders/ScalableImageDecoder.h:
  • platform/image-decoders/avif/AVIFImageReader.cpp:
  • platform/image-decoders/avif/AVIFImageReader.h:
  • platform/image-decoders/bmp/BMPImageDecoder.cpp:
  • platform/image-decoders/bmp/BMPImageDecoder.h:
  • platform/image-decoders/bmp/BMPImageReader.h:
  • platform/image-decoders/cairo/ImageBackingStoreCairo.cpp:
  • platform/image-decoders/gif/GIFImageDecoder.cpp:
  • platform/image-decoders/gif/GIFImageDecoder.h:
  • platform/image-decoders/gif/GIFImageReader.h:
  • platform/image-decoders/ico/ICOImageDecoder.cpp:
  • platform/image-decoders/ico/ICOImageDecoder.h:
  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
  • platform/image-decoders/jpeg/JPEGImageDecoder.h:
  • platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.cpp:
  • platform/image-decoders/png/PNGImageDecoder.cpp:
  • platform/image-decoders/webp/WEBPImageDecoder.cpp:
  • platform/image-decoders/webp/WEBPImageDecoder.h:
  • platform/ios/PasteboardIOS.mm:
  • platform/ios/PlatformPasteboardIOS.mm:
  • platform/mac/PasteboardMac.mm:
  • platform/mac/PlatformPasteboardMac.mm:
  • platform/mediarecorder/MediaRecorderPrivate.h:
  • platform/mediarecorder/MediaRecorderPrivateMock.cpp:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
  • platform/network/DataURLDecoder.h:
  • platform/network/FormData.cpp:
  • platform/network/FormData.h:
  • platform/network/ResourceHandle.h:
  • platform/network/ResourceHandleClient.cpp:
  • platform/network/ResourceHandleClient.h:
  • platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
  • platform/network/cocoa/RangeResponseGenerator.mm:
  • platform/network/cocoa/WebCoreNSURLSession.h:
  • platform/network/cocoa/WebCoreNSURLSession.mm:
  • platform/network/curl/CurlDownload.cpp:
  • platform/network/curl/CurlDownload.h:
  • platform/network/curl/CurlMultipartHandle.cpp:
  • platform/network/curl/CurlMultipartHandle.h:
  • platform/network/curl/CurlMultipartHandleClient.h:
  • platform/network/curl/CurlRequest.cpp:
  • platform/network/curl/CurlRequest.h:
  • platform/network/curl/CurlRequestClient.h:
  • platform/network/curl/CurlResourceHandleDelegate.cpp:
  • platform/network/curl/CurlResourceHandleDelegate.h:
  • platform/network/ios/LegacyPreviewLoaderClient.h:
  • platform/posix/SharedBufferPOSIX.cpp:
  • platform/win/PasteboardWin.cpp:
  • platform/win/SharedBufferWin.cpp:
  • testing/MockCDMFactory.cpp:
  • testing/MockCDMFactory.h:
  • testing/MockContentFilter.cpp:
  • testing/MockContentFilter.h:
  • workers/ScriptBuffer.h:
  • workers/WorkerFontLoadRequest.cpp:
  • workers/service/context/ServiceWorkerFetch.cpp:
  • workers/service/context/ServiceWorkerFetch.h:
  • workers/service/server/SWScriptStorage.cpp:
  • xml/XSLTProcessorLibxslt.cpp:
  • xml/parser/XMLDocumentParserLibxml2.cpp:

Source/WebKit:
Rename SharedBuffer classes.
https://bugs.webkit.org/show_bug.cgi?id=233677
rdar://problem/85963900

Reviewed by Youenn Fablet.

SharedBuffer are renamed FragmentedSharedBuffer and
ContiguousSharedBuffer to SharedBuffer to better reflect their actual
types.

  • GPUProcess/media/RemoteCDMInstanceProxy.cpp:
  • GPUProcess/media/RemoteCDMInstanceProxy.h:
  • GPUProcess/media/RemoteCDMInstanceSessionProxy.cpp:
  • GPUProcess/media/RemoteCDMInstanceSessionProxy.h:
  • GPUProcess/media/RemoteCDMProxy.cpp:
  • GPUProcess/media/RemoteCDMProxy.h:
  • GPUProcess/media/RemoteLegacyCDMProxy.h:
  • GPUProcess/media/RemoteLegacyCDMSessionProxy.cpp:
  • GPUProcess/media/RemoteLegacyCDMSessionProxy.h:
  • GPUProcess/media/RemoteMediaResource.cpp:
  • GPUProcess/media/RemoteMediaResource.h:
  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:
  • NetworkProcess/Downloads/PendingDownload.h:
  • NetworkProcess/NetworkCORSPreflightChecker.cpp:
  • NetworkProcess/NetworkCORSPreflightChecker.h:
  • NetworkProcess/NetworkDataTask.h:
  • NetworkProcess/NetworkLoad.cpp:
  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/NetworkLoadClient.h:
  • NetworkProcess/NetworkResourceLoader.cpp:
  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/PingLoad.cpp:
  • NetworkProcess/PingLoad.h:
  • NetworkProcess/PreconnectTask.cpp:
  • NetworkProcess/PreconnectTask.h:
  • NetworkProcess/ServiceWorker/ServiceWorkerNavigationPreloader.cpp:
  • NetworkProcess/ServiceWorker/ServiceWorkerNavigationPreloader.h:
  • NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp:
  • NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.h:
  • NetworkProcess/cache/CacheStorageEngineCache.cpp:
  • NetworkProcess/cache/NetworkCache.cpp:
  • NetworkProcess/cache/NetworkCache.h:
  • NetworkProcess/cache/NetworkCacheEntry.cpp:
  • NetworkProcess/cache/NetworkCacheEntry.h:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
  • NetworkProcess/cache/PrefetchCache.cpp:
  • NetworkProcess/cache/PrefetchCache.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:
  • NetworkProcess/curl/NetworkDataTaskCurl.h:
  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:
  • NetworkProcess/webrtc/NetworkRTCProvider.h:
  • Platform/IPC/SharedBufferCopy.cpp:
  • Platform/IPC/SharedBufferCopy.h:
  • Platform/IPC/SharedBufferDataReference.h:
  • Platform/SharedMemory.cpp:
  • Platform/SharedMemory.h:
  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
  • Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.cpp:
  • Shared/ShareableResource.cpp:
  • Shared/ShareableResource.h:
  • Shared/WebCoreArgumentCoders.cpp:
  • Shared/WebCoreArgumentCoders.h:
  • Shared/WebHitTestResultData.cpp:
  • Shared/gtk/ArgumentCodersGtk.cpp:
  • Shared/win/WebCoreArgumentCodersWin.cpp:
  • UIProcess/API/APIAttachment.cpp:
  • UIProcess/API/APIAttachment.h:
  • UIProcess/API/APIContentRuleListStore.cpp:
  • UIProcess/API/APIContentRuleListStore.h:
  • UIProcess/API/APINavigationClient.h:
  • UIProcess/API/Cocoa/APIAttachmentCocoa.mm:
  • UIProcess/API/gtk/DropTargetGtk3.cpp:
  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm:
  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:
  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebURLSchemeTask.cpp:
  • UIProcess/WebURLSchemeTask.h:
  • UIProcess/gtk/Clipboard.h:
  • UIProcess/gtk/ClipboardGtk3.cpp:
  • UIProcess/gtk/ClipboardGtk4.cpp:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:
  • UIProcess/ios/WKContentViewInteraction.mm:
  • UIProcess/ios/WebPageProxyIOS.mm:
  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:
  • UIProcess/mac/WebPageProxyMac.mm:
  • WebProcess/GPU/media/RemoteCDM.cpp:
  • WebProcess/GPU/media/RemoteCDM.h:
  • WebProcess/GPU/media/RemoteCDMInstance.cpp:
  • WebProcess/GPU/media/RemoteCDMInstance.h:
  • WebProcess/GPU/media/RemoteCDMInstanceSession.cpp:
  • WebProcess/GPU/media/RemoteCDMInstanceSession.h:
  • WebProcess/GPU/media/RemoteImageDecoderAVF.cpp:
  • WebProcess/GPU/media/RemoteImageDecoderAVF.h:
  • WebProcess/GPU/media/RemoteImageDecoderAVFManager.cpp:
  • WebProcess/GPU/media/RemoteImageDecoderAVFManager.h:
  • WebProcess/GPU/media/RemoteLegacyCDMSession.cpp:
  • WebProcess/GPU/media/SourceBufferPrivateRemote.cpp:
  • WebProcess/GPU/media/SourceBufferPrivateRemote.h:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.h:
  • WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h:
  • WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
  • WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
  • WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
  • WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
  • WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
  • WebProcess/Network/NetworkProcessConnection.cpp:
  • WebProcess/Network/WebResourceLoader.cpp:
  • WebProcess/Plugins/PDF/PDFPlugin.h:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:
  • WebProcess/Plugins/Plugin.h:
  • WebProcess/Plugins/PluginView.cpp:
  • WebProcess/Plugins/PluginView.h:
  • WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
  • WebProcess/Storage/WebServiceWorkerFetchTaskClient.h:
  • WebProcess/WebCoreSupport/WebEditorClient.cpp:
  • WebProcess/WebCoreSupport/WebEditorClient.h:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:
  • WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.cpp:
  • WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.h:
  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
  • WebProcess/WebPage/WebFrame.cpp:
  • WebProcess/WebPage/WebPage.cpp:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:
  • WebProcess/WebPage/mac/WebPageMac.mm:
  • WebProcess/win/WebProcessWin.cpp:

Source/WebKitLegacy:
Rename SharedBuffer classes.
https://bugs.webkit.org/show_bug.cgi?id=233677
rdar://problem/85963900

Reviewed by Youenn Fablet.

SharedBuffer are renamed FragmentedSharedBuffer and
ContiguousSharedBuffer to SharedBuffer to better reflect their actual
types.

  • WebCoreSupport/PingHandle.h:

Source/WebKitLegacy/mac:
Rename SharedBuffer classes.
https://bugs.webkit.org/show_bug.cgi?id=233677
rdar://problem/85963900

Reviewed by Youenn Fablet.

SharedBuffer are renamed FragmentedSharedBuffer and
ContiguousSharedBuffer to SharedBuffer to better reflect their actual
types.

  • WebCoreSupport/WebEditorClient.h:
  • WebCoreSupport/WebEditorClient.mm:
  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:
  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:
  • WebView/WebDataSource.mm:
  • WebView/WebHTMLView.mm:
  • WebView/WebResource.mm:

Source/WebKitLegacy/win:
Rename SharedBuffer classes.
https://bugs.webkit.org/show_bug.cgi?id=233677
rdar://problem/85963900

Reviewed by Youenn Fablet.

SharedBuffer are renamed FragmentedSharedBuffer and
ContiguousSharedBuffer to SharedBuffer to better reflect their actual
types.

  • MemoryStream.cpp:
  • MemoryStream.h:
  • WebArchive.cpp:
  • WebCoreSupport/WebEditorClient.cpp:
  • WebCoreSupport/WebEditorClient.h:
  • WebFrame.cpp:
  • WebFrame.h:
  • WebKitDLL.cpp:
  • WebResource.cpp:
  • WebResource.h:

Tools:
Rename SharedBuffer classes.
https://bugs.webkit.org/show_bug.cgi?id=233677
rdar://problem/85963900

Reviewed by Youenn Fablet.

SharedBuffer are renamed FragmentedSharedBuffer and
ContiguousSharedBuffer to SharedBuffer to better reflect their actual
types.

  • TestWebKitAPI/Tests/WTF/FileSystem.cpp:
  • TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp:
  • TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:
  • TestWebKitAPI/Tests/WebCore/SharedBufferTest.cpp:
  • TestWebKitAPI/Tests/WebCore/SharedBufferTest.h:
  • TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp:
  • TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm:
  • TestWebKitAPI/win/TestWebCoreStubs.cpp:
2:43 AM Changeset in webkit [287020] by Carlos Garcia Campos
  • 9 edits in trunk/Source/WebCore

[GTK][a11y] Register the wrappers tree when org.a11y.atspi.Cache.GetItems() is called
https://bugs.webkit.org/show_bug.cgi?id=234292

Reviewed by Joanmarie Diggs.

This ensures wrappers always have a reference before being added to the cache.

  • accessibility/AXObjectCache.h:
  • accessibility/atspi/AXObjectCacheAtspi.cpp:

(WebCore::AXObjectCache::attachWrapper): Defer the set parent call to next cache update.
(WebCore::AXObjectCache::platformPerformDeferredCacheUpdate): Do the set parent call here.

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::registerObject): Do not call addAccessible from here, since it needs the path,
it's now called from the caller of registerObject().
(WebCore::AccessibilityAtspi::parentChanged): Notify about parent property change.
(WebCore::AccessibilityAtspi::childrenChanged): Always emit ChildrenChanged when the tree is registered because
the atspi cache always consumes it.
(WebCore::AccessibilityAtspi::addAccessible): We no longer need to dispath addAccessible in the next run loop iteration.

  • accessibility/atspi/AccessibilityAtspi.h:
  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::registerObject): Helper to register the object when path is not needed. Also
ensure the isolated tree is created before registering the object.
(WebCore::AccessibilityObjectAtspi::path): Call registerObject().
(WebCore::AccessibilityObjectAtspi::hyperlinkReference): Use registerObject() instead of path().
(WebCore::AccessibilityObjectAtspi::setParent): Call AccessibilityAtspi::parentChanged() if the wrapper is still
and attached and not ignored.
(WebCore::AccessibilityObjectAtspi::parentReference const): Use the parent member instead of asking the main
thread again.
(WebCore::AccessibilityObjectAtspi::isDefunct const): Return true if wrapper has been detached.
(WebCore::AccessibilityObjectAtspi::childAdded): We no longer need to dispatch childrenChanged in next run loop iteration.

  • accessibility/atspi/AccessibilityObjectAtspi.h:
  • accessibility/atspi/AccessibilityRootAtspi.cpp:

(WebCore::registerSubtree): Helper to register the wrappers tree recursively.
(WebCore::AccessibilityRootAtspi::registerTree): Register the wrappers tree.

  • accessibility/atspi/AccessibilityRootAtspi.h:
2:29 AM Changeset in webkit [287019] by Darin Adler
  • 12 edits in trunk/Source

Automatically generate event handler content attribute maps so they are easier to maintain
https://bugs.webkit.org/show_bug.cgi?id=234254

Reviewed by Alexey Shvayka.

Source/WebCore:

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader): Declare forEachEventHandlerContentAttribute
and forEachWindowEventHandlerContentAttribute as needed.
(GenerateImplementation): Call GenerateForEachEventHandlerContentAttribute
as needed.
(GenerateForEachEventHandlerContentAttribute): Define
forEachEventHandlerContentAttribute or forEachWindowEventHandlerContentAttribute.

  • bindings/scripts/IDLAttributes.json: Added

GenerateForEachEventHandlerContentAttribute and
GenerateForEachWindowEventHandlerContentAttribute. Even though each
is used in only one class, it's still better to not hard-code the class names.

  • html/HTMLAttributeNames.in: Added oncuechange, onrejectionhandled, and

onunhandledrejection even though we are not yet implementing any of them in
this behavior-preserving patch. They need to be present so the automatically
generated code compiles. But added explicit exceptions as mentioned below to
make sure no changes are implemented in this patch, and will take those exceptions
out later in a patch intended to produce a progression, likely with new test cases.
Re-sorted alphabetically, rather an arbitrary semi-sorted order.

  • html/HTMLBodyElement.cpp:

(WebCore::HTMLBodyElement::createWindowEventHandlerNameMap): Deleted.
(WebCore::HTMLBodyElement::eventNameForWindowEventHandlerAttribute): Use
JSHTMLBodyElement::forEachWindowEventHandlerContentAttribute to create the map.
Use a lambda instead of a separate function and take advantage of the
deduction guide for NeverDestroyed. Added exceptions for onrejectionhandled
and onunhandledrejection, which are both in the IDL file but were not handled
here, along with a FIXME suggesting we remove the exceptions.

  • html/HTMLElement.h: Removed createWindowEventHandlerNameMap.
  • html/HTMLBodyElement.idl: Added GenerateForEachWindowEventHandlerContentAttribute.
  • html/HTMLElement.cpp:

(WebCore::HTMLElement::createEventHandlerNameMap): Deleted.
(WebCore::HTMLElement::populateEventHandlerNameMap): Deleted.
(WebCore::HTMLElement::eventNameForEventHandlerAttribute): Use
JSHTMLElement::forEachEventHandlerContentAttribute to create the map.
Use a lambda instead of a separate function and take advantage of the
deduction guide for NeverDestroyed. Added exception for oncuechange,
which is in the IDL file but was not handled here, and for 19 other attributes,
which are not in the IDL file but were handled here, along with two FIXMEs
suggesting we remove the exceptions.

  • html/HTMLElement.h: Removed populateEventHandlerNameMap and

createEventHandlerNameMap.

  • html/HTMLElement.idl: Added GenerateForEachEventHandlerContentAttribute.

Source/WTF:

  • wtf/NeverDestroyed.h: Add a deduction guide for NeverDestroyed.

In the future we can use this instead of makeNeverDestroyed or writing
out the entire template class type including template arguments.

2:13 AM Changeset in webkit [287018] by Antti Koivisto
  • 9 edits in trunk

[CSS Cascade Layers] revert-layer should revert style attribute to regular author style
https://bugs.webkit.org/show_bug.cgi?id=234082

Reviewed by Simon Fraser.

Source/WebCore:

If 'revert-layer' keyword is used in style attribute it should revert to regular author style
on the default cascade level.

  • style/PropertyCascade.cpp:

(WebCore::Style::PropertyCascade::PropertyCascade):

Make the maximum level (used for revert cascades) an std::optional.

(WebCore::Style::PropertyCascade::setPropertyInternal):
(WebCore::Style::PropertyCascade::addMatch):

Factor the revert test into a lambda.
We can never revert to an attribute style so always skip them.

  • style/PropertyCascade.h:

(WebCore::Style::PropertyCascade::PropertyCascade):
(WebCore::Style::PropertyCascade::maximumCascadeLevel const): Deleted.
(WebCore::Style::PropertyCascade::maximumCascadeLayerPriority const): Deleted.

  • style/RuleSet.h:
  • style/StyleBuilder.cpp:

(WebCore::Style::Builder::applyCustomProperty):
(WebCore::Style::Builder::applyCascadeProperty):
(WebCore::Style::Builder::applyRollbackCascadeProperty):

Keep a pointer to the current property being applied in state instead of individual priority values.

(WebCore::Style::Builder::applyProperty):
(WebCore::Style::Builder::ensureRollbackCascadeForRevert):
(WebCore::Style::Builder::ensureRollbackCascadeForRevertLayer):

If the current property is from attribute style it reverts to the same layer.

  • style/StyleBuilder.h:
  • style/StyleBuilderState.h:

(WebCore::Style::BuilderState::styleScopeOrdinal const):

LayoutTests:

1:35 AM Changeset in webkit [287017] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Null pointer crash in FetchResponse::clone
https://bugs.webkit.org/show_bug.cgi?id=234236
<rdar://86327601>

Reviewed by Alex Christensen.

From the log, we are most probably getting a null globalObject from a ScriptExecutionContext in FetchResponse::clone.
This may happen in case the document is navigated away but we still execute some code for it.
Add a null check to ensure we do not crash.

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::clone):

1:03 AM Changeset in webkit [287016] by ysuzuki@apple.com
  • 2 edits in trunk/Source/bmalloc

Unreviewed, fix Xcode build of libpas
https://bugs.webkit.org/show_bug.cgi?id=233821

r286934 broke build.sh for Xcode. This patch fixes it.

  • libpas/build.sh:
12:18 AM Changeset in webkit [287015] by Ben Nham
  • 8 edits
    6 adds in trunk/Source/WebCore

Add web push message decryption routines
https://bugs.webkit.org/show_bug.cgi?id=233903

Reviewed by Brady Eidson.

Source/WebCore:

This adds routines to decrypt push payloads encoded with the aes128gcm and aesgcm schemes.
The crypto primitives that we depend are implemented in PushCrypto, while the logic to use
those primitives to decrypt message payloads is in PushMessageCrypto.

Test: TestWebKitAPI.PushMessageCrypto

  • Headers.cmake:
  • Modules/push-api/PushCrypto.cpp: Added.

(WebCore::PushCrypto::P256DHKeyPair::generate):
(WebCore::PushCrypto::validateP256DHPublicKey):
(WebCore::PushCrypto::computeP256DHSharedSecret):
(WebCore::PushCrypto::hmacSHA256):
(WebCore::PushCrypto::decryptAES128GCM):

  • Modules/push-api/PushCrypto.h: Added.
  • Modules/push-api/PushManager.cpp:

(WebCore::PushManager::subscribe):

  • Modules/push-api/PushMessageCrypto.cpp: Added.

(WebCore::PushCrypto::ClientKeys::generate):
(WebCore::PushCrypto::areClientKeyLengthsValid):
(WebCore::PushCrypto::computeAES128GCMPaddingLength):
(WebCore::PushCrypto::decryptAES128GCMPayload):
(WebCore::PushCrypto::computeAESGCMPaddingLength):
(WebCore::PushCrypto::decryptAESGCMPayload):

  • Modules/push-api/PushMessageCrypto.h: Added.
  • Modules/push-api/cocoa/PushCryptoCocoa.cpp: Added.

(WebCore::PushCrypto::P256DHKeyPair::generate):
(WebCore::PushCrypto::validateP256DHPublicKey):
(WebCore::PushCrypto::computeP256DHSharedSecret):
(WebCore::PushCrypto::hmacSHA256):
(WebCore::PushCrypto::decryptAES128GCM):

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

Source/WebCore/PAL:

  • pal/spi/cocoa/CommonCryptoSPI.h: Add AES-GCM decryption SPI.
12:12 AM Changeset in webkit [287014] by Carlos Garcia Campos
  • 15 edits in trunk/Source

[GTK][a11y] Handle the Embedded method sent by AtkSocket from AccessibilityRootAtspi
https://bugs.webkit.org/show_bug.cgi?id=234233

Reviewed by Adrian Perez de Castro.

Source/WebCore:

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::registerRoot):

  • accessibility/atspi/AccessibilityRootAtspi.cpp:

(WebCore::AccessibilityRootAtspi::registerObject):
(WebCore::AccessibilityRootAtspi::embedded):
(WebCore::AccessibilityRootAtspi::setParentPath): Deleted.

  • accessibility/atspi/AccessibilityRootAtspi.h:
  • accessibility/atspi/xml/Socket.xml:

Source/WebKit:

I added some hacks to send the socket path to the web process using WebKit IPC because Embedded message is not
in the DBus interface. We can simply add the message to the interface definition and handle it instead to
simplify everything.

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::bindAccessibilityTree):
(WebKit::ProvisionalPageProxy::didReceiveMessage):

  • UIProcess/ProvisionalPageProxy.h:

(WebKit::ProvisionalPageProxy::accessibilityPlugID):
(WebKit::ProvisionalPageProxy::CompletionHandler<void): Deleted.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::swapToProvisionalPage):

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

(WebKit::WebPageProxy::bindAccessibilityTree):

  • UIProcess/wpe/WebPageProxyWPE.cpp:

(WebKit::WebPageProxy::bindAccessibilityTree):

  • WebProcess/WebPage/gtk/WebPageGtk.cpp:

(WebKit::WebPage::platformInitialize):

Dec 13, 2021:

11:56 PM Changeset in webkit [287013] by wilander@apple.com
  • 16 edits in trunk

PCM: Remove old DB update and migration code, and add a unit test for destination token DB columns
https://bugs.webkit.org/show_bug.cgi?id=234281
<rdar://86347439>

Reviewed by Alex Christensen and Kate Cheney.

Source/WebKit:

WebKit::Database::needsUpdatedSchema() in PrivateClickMeasurement.cpp has a comment saying it
should be removed late 2021. WebKit::DatabaseUtilities::migrateDataToNewTablesIfNecessary()
returns directly if WebKit::Database::needsUpdatedSchema() returns false so always returning
false for WebKit::Database::needsUpdatedSchema() in PrivateClickMeasurement.cpp effectively
disables WebKit::DatabaseUtilities::migrateDataToNewTablesIfNecessary() for PCM.

New unit/API test PrivateClickMeasurement.MigrateWithDestinationToken added.

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.cpp:

(WebKit::PCM::Database::Database):

No longer calls the deleted DatabaseUtilities::migrateDataToNewTablesIfNecessary().

(WebKit::PCM::Database::attributionToStringForTesting const):

Now outputs destination token info.

(WebKit::PCM::Database::needsUpdatedSchema): Deleted.

  • NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.h:

needsUpdatedSchema() now always returns false.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:

(addAttributedPCMv5):
(pollUntilPCMIsMigrated):

Now takes a parameter UsingDestinationToken and handles its expectation
accordingly.

(TEST):

New test PrivateClickMeasurement.MigrateWithDestinationToken.

LayoutTests:

These expect files are just updated with destination token dump output.

  • http/tests/privateClickMeasurement/attribution-conversion-through-fetch-keepalive-expected.txt:
  • http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-ephemeral-expected.txt:
  • http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-in-new-window-expected.txt:
  • http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-with-priority-expected.txt:
  • http/tests/privateClickMeasurement/attribution-conversion-through-image-redirect-without-priority-expected.txt:
  • http/tests/privateClickMeasurement/second-attribution-converted-with-higher-priority-expected.txt:
  • http/tests/privateClickMeasurement/second-attribution-converted-with-lower-priority-expected.txt:
  • http/tests/privateClickMeasurement/second-conversion-with-higher-priority-expected.txt:
  • http/tests/privateClickMeasurement/second-conversion-with-lower-priority-expected.txt:
  • http/tests/privateClickMeasurement/triggering-event-with-attribution-source-through-fetch-keepalive-expected.txt:
11:07 PM Changeset in webkit [287012] by sbarati@apple.com
  • 6 edits
    2 adds in trunk/Source/JavaScriptCore

WasmB3IRGenerator should estimate static execution counts
https://bugs.webkit.org/show_bug.cgi?id=234284

Reviewed by Filip Pizlo.

This enables the register allocator to make better decisions.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • b3/B3BasicBlock.h:

(JSC::B3::BasicBlock::setFrequency):

  • b3/B3EstimateStaticExecutionCounts.cpp: Added.

(JSC::B3::estimateStaticExecutionCounts):

  • b3/B3EstimateStaticExecutionCounts.h: Added.
  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::parseAndCompile):

8:55 PM Changeset in webkit [287011] by Kate Cheney
  • 2 edits in trunk/Source/WebCore

WebContent process crashes at ContentSecurityPolicySourceList::matchesAll
https://bugs.webkit.org/show_bug.cgi?id=234288
rdar://problem/86438924

Reviewed by Simon Fraser.

  • page/csp/ContentSecurityPolicyDirectiveList.cpp:

(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForScript const):

8:26 PM Changeset in webkit [287010] by commit-queue@webkit.org
  • 33 edits
    4 adds in trunk

Allow WKContentRuleList to run regexes on current frame's URL, not just top frame's URL
https://bugs.webkit.org/show_bug.cgi?id=233889

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

Source/WebCore:

In 2015, my younger self implemented if-top-url and unless-top-url by running the current URL
through multiple sets of regexes, those with and those without such conditions. This wasn't
really able to be expanded. In order to implement if-frame-url, I moved the condition type to
the set of flags stored in the bytecode itself. Now, we only interpret the bytecode once on the
currently-requested URL, up to once on the frame URL, and up to once on the top URL, and the latter
two can be cached because they don't change as often.

Covered by existing and additional API and layout tests.

  • contentextensions/CompiledContentExtension.h:
  • contentextensions/ContentExtension.cpp:

(WebCore::ContentExtensions::ContentExtension::ContentExtension):
(WebCore::ContentExtensions::ContentExtension::compileGlobalDisplayNoneStyleSheet):
(WebCore::ContentExtensions::ContentExtension::populateTopURLActionCacheIfNeeded const):
(WebCore::ContentExtensions::ContentExtension::populateFrameURLActionCacheIfNeeded const):
(WebCore::ContentExtensions::ContentExtension::topURLActions const):
(WebCore::ContentExtensions::ContentExtension::frameURLActions const):
(WebCore::ContentExtensions::ContentExtension::populateConditionCacheIfNeeded): Deleted.
(WebCore::ContentExtensions::ContentExtension::topURLActions): Deleted.
(WebCore::ContentExtensions::ContentExtension::universalActionsWithConditions): Deleted.

  • contentextensions/ContentExtension.h:

(WebCore::ContentExtensions::ContentExtension::universalActions const):
(WebCore::ContentExtensions::ContentExtension::universalActionsWithoutConditions): Deleted.

  • contentextensions/ContentExtensionCompiler.cpp:

(WebCore::ContentExtensions::serializeActions):
(WebCore::ContentExtensions::compileRuleList):

  • contentextensions/ContentExtensionCompiler.h:
  • contentextensions/ContentExtensionParser.cpp:

(WebCore::ContentExtensions::loadTrigger):

  • contentextensions/ContentExtensionRule.cpp:

(WebCore::ContentExtensions::Trigger::isolatedCopy const):

  • contentextensions/ContentExtensionRule.h:

(WebCore::ContentExtensions::Trigger::~Trigger):
(WebCore::ContentExtensions::Trigger::isEmpty const):
(WebCore::ContentExtensions::Trigger::operator== const):

  • contentextensions/ContentExtensionsBackend.cpp:

(WebCore::ContentExtensions::ContentExtensionsBackend::actionsFromContentRuleList const):
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad const):
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad):
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForPingLoad):

  • contentextensions/ContentExtensionsBackend.h:
  • contentextensions/DFABytecode.h:
  • contentextensions/DFABytecodeCompiler.cpp:

(WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):

  • contentextensions/DFABytecodeInterpreter.cpp:

(WebCore::ContentExtensions::getBits):
(WebCore::ContentExtensions::hasFlags):
(WebCore::ContentExtensions::hasAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::actionsMatchingEverything):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
(WebCore::ContentExtensions::matchesCondition): Deleted.
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretWithConditions): Deleted.

  • contentextensions/DFABytecodeInterpreter.h:

(): Deleted.

  • loader/ResourceLoadInfo.cpp:
  • loader/ResourceLoadInfo.h:

Source/WebKit:

  • NetworkProcess/NetworkLoadChecker.cpp:

(WebKit::NetworkLoadChecker::processContentRuleListsForLoad):

  • NetworkProcess/NetworkLoadChecker.h:

(WebKit::NetworkLoadChecker::setContentExtensionController):

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

(WebKit::PingLoad::initialize):

  • Shared/WebCompiledContentRuleList.cpp:

(WebKit::WebCompiledContentRuleList::urlFiltersBytecode const):
(WebKit::WebCompiledContentRuleList::filtersWithoutConditionsBytecode const): Deleted.
(WebKit::WebCompiledContentRuleList::filtersWithConditionsBytecode const): Deleted.

  • 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:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::startPingLoad):

Tools:

  • TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:

(TestWebKitAPI::mainDocumentRequest):
(TestWebKitAPI::subResourceRequest):
(TestWebKitAPI::TEST_F):

LayoutTests:

  • http/tests/contentextensions/frame-url-expected.txt: Added.
  • http/tests/contentextensions/frame-url.html: Added.
  • http/tests/contentextensions/frame-url.html.json: Added.
  • http/tests/contentextensions/resources/iframe.html: Added.
8:23 PM Changeset in webkit [287009] by beidson@apple.com
  • 20 edits in trunk

Teach webpushtool to register and "host" the daemon.
https://bugs.webkit.org/show_bug.cgi?id=234265

Reviewed by Tim Horton.

Source/JavaScriptCore:

  • inspector/ConsoleMessage.h: Remove using JSC::MessageType because it makes it hard for others to also have a MessageType type.
  • inspector/JSGlobalObjectConsoleClient.h:
  • runtime/ConsoleTypes.h:

Source/WebCore:

  • page/PageConsoleClient.h:

Source/WebKit:

Covered by API tests verifying hosting mode operation.

As various engineers work on various parts of the project, it's become apparent that it's super useful
to have a tool handle the "setting up" of the daemon itself, to avoid launchctl, etc.

Implement that, as well as a few other niceties found while testing.

  • Configurations/webpushtool.xcconfig:
  • Resources/webpushtool.entitlements:
  • Shared/Daemon/DaemonUtilities.mm:

(WebKit::startListeningForMachServiceConnections):

  • webpushd/AppBundleRequest.mm:

(WebPushD::AppBundleRequest::start):

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

(WebPushD::ClientConnection::setHostAppAuditTokenData):
(WebPushD::ClientConnection::broadcastDebugMessage):

  • webpushd/WebPushDaemon.h:
  • webpushd/WebPushDaemon.mm:

(WebPushD::Daemon::broadcastAllConnectionIdentities):

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

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

  • webpushd/webpushtool/WebPushToolMain.mm:

(printUsageAndTerminate):
(registerDaemonWithLaunchD):
(main):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:

(TestWebKitAPI::shouldSetupWebPushD): Add a command line argument to skip the "install the daemon" step,

so an engineer can handle that part themselves.

(TestWebKitAPI::setUpTestWebPushD):
(TestWebKitAPI::cleanUpTestWebPushD):

7:28 PM Changeset in webkit [287008] by Russell Epstein
  • 112 edits
    2 adds
    5 deletes in branches/safari-613.1.11-branch/Source

Cherry-pick r286994. rdar://problem/86445989

Roll back r286345, r286387, r286471, r286667, r286849
https://bugs.webkit.org/show_bug.cgi?id=234268

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/AccessCase.cpp: (JSC::AccessCase::AccessCase): (JSC::AccessCase::forEachDependentCell const): (JSC::AccessCase::dump const): (JSC::AccessCase::propagateTransitions const): (JSC::AccessCase::generateWithGuard): (JSC::AccessCase::canBeShared):
  • bytecode/AccessCase.h: (JSC::AccessCase::structure const): (JSC::AccessCase::newStructure const): (JSC::AccessCase::hash const): (JSC::AccessCase::AccessCase):
  • bytecode/ArrayProfile.cpp: (JSC::ArrayProfile::computeUpdatedPrediction):
  • bytecode/ArrayProfile.h:
  • bytecode/CheckPrivateBrandStatus.cpp: (JSC::CheckPrivateBrandStatus::computeForStubInfoWithoutExitSiteFeedback):
  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::propagateTransitions): (JSC::CodeBlock::determineLiveness): (JSC::CodeBlock::finalizeLLIntInlineCaches): (JSC::CodeBlock::stronglyVisitWeakReferences):
  • bytecode/DeleteByStatus.cpp: (JSC::DeleteByStatus::computeForStubInfoWithoutExitSiteFeedback):
  • bytecode/GetByIdMetadata.h: (JSC::GetByIdModeMetadata::GetByIdModeMetadata): (JSC::GetByIdModeMetadata::clearToDefaultModeWithoutCache):
  • bytecode/GetByStatus.cpp: (JSC::GetByStatus::computeFromLLInt): (JSC::GetByStatus::computeForStubInfoWithoutExitSiteFeedback):
  • bytecode/InByStatus.cpp: (JSC::InByStatus::computeForStubInfoWithoutExitSiteFeedback):
  • bytecode/InlineAccess.cpp: (JSC::InlineAccess::rewireStubAsJumpInAccess): (JSC::InlineAccess::resetStubAsJumpInAccess):
  • bytecode/InstanceOfStatus.cpp: (JSC::InstanceOfStatus::computeForStubInfo):
  • bytecode/InternalFunctionAllocationProfile.h: (JSC::InternalFunctionAllocationProfile::offsetOfStructure): (JSC::InternalFunctionAllocationProfile::structure): (JSC::InternalFunctionAllocationProfile::clear): (JSC::InternalFunctionAllocationProfile::visitAggregate): (JSC::InternalFunctionAllocationProfile::createAllocationStructureFromBase): (JSC::InternalFunctionAllocationProfile::offsetOfStructureID): Deleted.
  • bytecode/PolyProtoAccessChain.cpp: (JSC::PolyProtoAccessChain::needImpurePropertyWatchpoint const):
  • bytecode/PolyProtoAccessChain.h:
  • bytecode/PolymorphicAccess.cpp: (JSC::PolymorphicAccess::visitWeak const):
  • bytecode/PutByIdFlags.h:
  • bytecode/PutByStatus.cpp: (JSC::PutByStatus::computeFromLLInt): (JSC::PutByStatus::computeForStubInfo):
  • bytecode/SetPrivateBrandStatus.cpp: (JSC::SetPrivateBrandStatus::computeForStubInfoWithoutExitSiteFeedback):
  • bytecode/SpeculatedType.cpp: (JSC::speculationFromCell):
  • bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::initGetByIdSelf): (JSC::StructureStubInfo::initPutByIdReplace): (JSC::StructureStubInfo::initInByIdSelf): (JSC::StructureStubInfo::deref): (JSC::StructureStubInfo::aboutToDie): (JSC::StructureStubInfo::addAccessCase): (JSC::StructureStubInfo::reset): (JSC::StructureStubInfo::visitAggregateImpl): (JSC::StructureStubInfo::visitWeakReferences): (JSC::StructureStubInfo::propagateTransitions): (JSC::StructureStubInfo::summary const): (JSC::StructureStubInfo::containsPC const):
  • bytecode/StructureStubInfo.h: (JSC::StructureStubInfo::offsetOfByIdSelfOffset): (JSC::StructureStubInfo::offsetOfInlineAccessBaseStructure): (JSC::StructureStubInfo::inlineAccessBaseStructure): (JSC::StructureStubInfo::offsetOfInlineAccessBaseStructureID): Deleted.
  • dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
  • dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::parseBlock):
  • dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump):
  • dfg/DFGJITCompiler.h: (JSC::DFG::JITCompiler::branchWeakStructure):
  • dfg/DFGPlan.cpp: (JSC::DFG::Plan::finalize):
  • dfg/DFGSpeculativeJIT.cpp:
  • dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNullOrUndefined): (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNullOrUndefined): (JSC::DFG::SpeculativeJIT::compileToBooleanObjectOrOther): (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch): (JSC::DFG::SpeculativeJIT::emitUntypedBranch): (JSC::DFG::SpeculativeJIT::compile):
  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileCreatePromise): (JSC::FTL::DFG::LowerDFGToB3::compileCreateInternalFieldObject): (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
  • heap/AbstractSlotVisitor.h:
  • heap/AbstractSlotVisitorInlines.h:
  • heap/Heap.cpp: (JSC::Heap::Heap): (JSC::Heap::runEndPhase):
  • heap/Heap.h: (JSC::Heap::structureIDTable):
  • heap/IsoAlignedMemoryAllocator.cpp: (JSC::IsoAlignedMemoryAllocator::IsoAlignedMemoryAllocator): (JSC::IsoAlignedMemoryAllocator::~IsoAlignedMemoryAllocator): (JSC::IsoAlignedMemoryAllocator::tryAllocateAlignedMemory): (JSC::IsoAlignedMemoryAllocator::freeAlignedMemory): (JSC::IsoAlignedMemoryAllocator::tryMallocBlock): Deleted. (JSC::IsoAlignedMemoryAllocator::freeBlock): Deleted. (JSC::IsoAlignedMemoryAllocator::commitBlock): Deleted. (JSC::IsoAlignedMemoryAllocator::decommitBlock): Deleted.
  • heap/IsoAlignedMemoryAllocator.h:
  • heap/IsoMemoryAllocatorBase.cpp: Removed.
  • heap/IsoMemoryAllocatorBase.h: Removed.
  • heap/IsoSubspace.cpp: (JSC::IsoSubspace::IsoSubspace): (JSC::IsoSubspace::tryAllocateFromLowerTier):
  • heap/IsoSubspace.h:
  • heap/PreciseAllocation.cpp: (JSC::PreciseAllocation::createForLowerTier): (JSC::PreciseAllocation::tryCreateForLowerTier): Deleted.
  • heap/PreciseAllocation.h:
  • heap/SlotVisitor.cpp: (JSC::SlotVisitor::appendJSCellOrAuxiliary):
  • heap/SlotVisitor.h:
  • heap/SlotVisitorInlines.h:
  • heap/StructureAlignedMemoryAllocator.cpp: Removed.
  • heap/StructureAlignedMemoryAllocator.h: Removed.
  • jit/AssemblyHelpers.cpp: (JSC::AssemblyHelpers::emitStoreStructureWithTypeInfo): (JSC::AssemblyHelpers::emitLoadStructure): (JSC::AssemblyHelpers::emitLoadPrototype): (JSC::AssemblyHelpers::emitRandomThunk): (JSC::AssemblyHelpers::emitConvertValueToBoolean): (JSC::AssemblyHelpers::branchIfValue): (JSC::AssemblyHelpers::emitNonNullDecodeStructureID): Deleted.
  • jit/AssemblyHelpers.h: (JSC::AssemblyHelpers::branchStructure): (JSC::AssemblyHelpers::nukeStructureAndStoreButterfly):
  • jit/GCAwareJITStubRoutine.cpp: (JSC::PolymorphicAccessJITStubRoutine::computeHash):
  • jit/JITInlineCacheGenerator.cpp: (JSC::generateGetByIdInlineAccess): (JSC::JITPutByIdGenerator::generateBaselineDataICFastPath): (JSC::JITInByIdGenerator::generateBaselineDataICFastPath):
  • jit/JITOpcodes.cpp: (JSC::JIT::emit_op_typeof_is_undefined): (JSC::JIT::emit_op_jeq_null): (JSC::JIT::emit_op_jneq_null): (JSC::JIT::emit_op_eq_null): (JSC::JIT::emit_op_neq_null): (JSC::JIT::emit_op_get_prototype_of):
  • jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_get_property_enumerator):
  • jit/JITStubRoutine.h:
  • llint/LLIntSlowPaths.cpp: (JSC::LLInt::LLINT_SLOW_PATH_DECL): (JSC::LLInt::performLLIntGetByID):
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/ArrayPrototype.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION):
  • runtime/BigIntPrototype.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION):
  • runtime/BooleanPrototype.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION):
  • runtime/CommonSlowPaths.cpp: (JSC::JSC_DEFINE_COMMON_SLOW_PATH):
  • runtime/DatePrototype.cpp: (JSC::formateDateInstance): (JSC::JSC_DEFINE_HOST_FUNCTION):
  • runtime/ErrorInstance.cpp: (JSC::ErrorInstance::sanitizedMessageString): (JSC::ErrorInstance::sanitizedNameString): (JSC::ErrorInstance::sanitizedToString):
  • runtime/ErrorPrototype.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION):
  • runtime/FunctionExecutable.cpp: (JSC::FunctionExecutable::visitChildrenImpl):
  • runtime/FunctionExecutable.h:
  • runtime/FunctionPrototype.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION):
  • runtime/FunctionRareData.cpp: (JSC::FunctionRareData::visitChildrenImpl):
  • runtime/FunctionRareData.h:
  • runtime/HasOwnPropertyCache.h:
  • runtime/InitializeThreading.cpp: (JSC::initialize):
  • runtime/JSCConfig.h:
  • runtime/JSCJSValue.cpp: (JSC::JSValue::dumpInContextAssumingStructure const): (JSC::JSValue::dumpForBacktrace const):
  • runtime/JSCell.cpp: (JSC::JSCell::toObjectSlow const):
  • runtime/JSCell.h: (JSC::JSCell::clearStructure):
  • runtime/JSCellInlines.h: (JSC::JSCell::structure const): (JSC::JSCell::setStructure):
  • runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::visitChildrenImpl):
  • runtime/JSGlobalObject.h:
  • runtime/JSObject.cpp: (JSC::JSObject::visitButterflyImpl): (JSC::JSObject::createInitialUndecided): (JSC::JSObject::createInitialInt32): (JSC::JSObject::createInitialDouble): (JSC::JSObject::createInitialContiguous): (JSC::JSObject::createArrayStorage): (JSC::JSObject::convertUndecidedToArrayStorage): (JSC::JSObject::convertInt32ToArrayStorage): (JSC::JSObject::convertDoubleToArrayStorage): (JSC::JSObject::convertContiguousToArrayStorage): (JSC::JSObject::putDirectCustomGetterSetterWithoutTransition): (JSC::JSObject::putDirectNonIndexAccessorWithoutTransition):
  • runtime/JSObject.h: (JSC::JSObject::nukeStructureAndSetButterfly): (JSC::JSObject::getPropertySlot):
  • runtime/JSObjectInlines.h: (JSC::JSObject::getPropertySlot): (JSC::JSObject::getNonIndexPropertySlot): (JSC::JSObject::putDirectWithoutTransition): (JSC::JSObject::putDirectInternal):
  • runtime/JSPropertyNameEnumerator.cpp: (JSC::JSPropertyNameEnumerator::JSPropertyNameEnumerator): (JSC::JSPropertyNameEnumerator::visitChildrenImpl):
  • runtime/JSPropertyNameEnumerator.h:
  • runtime/NumberPrototype.cpp: (JSC::toThisNumber):
  • runtime/ObjectPrototype.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): (JSC::objectPrototypeToString):
  • runtime/RegExpPrototype.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION):
  • runtime/StringPrototype.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION):
  • runtime/Structure.cpp: (JSC::Structure::Structure): (JSC::Structure::~Structure): (JSC::Structure::flattenDictionaryStructure): (JSC::Structure::dump const): (JSC::Structure::canCachePropertyNameEnumerator const):
  • runtime/Structure.h: (JSC::Structure::id const):
  • runtime/StructureChain.cpp: (JSC::StructureChain::create): (JSC::StructureChain::visitChildrenImpl):
  • runtime/StructureID.h: Removed.
  • runtime/StructureIDBlob.h: (JSC::StructureIDBlob::StructureIDBlob):
  • runtime/StructureIDTable.cpp: Added. (JSC::StructureIDTable::StructureIDTable): (JSC::StructureIDTable::makeFreeListFromRange): (JSC::StructureIDTable::resize): (JSC::StructureIDTable::flushOldTables): (JSC::StructureIDTable::allocateID): (JSC::StructureIDTable::deallocateID):
  • runtime/StructureIDTable.h: Added. (JSC::nukedStructureIDBit): (JSC::nuke): (JSC::isNuked): (JSC::decontaminate): (JSC::StructureIDTable::base): (JSC::StructureIDTable::size const): (JSC::StructureIDTable::table const): (JSC::StructureIDTable::decode): (JSC::StructureIDTable::encode): (JSC::StructureIDTable::get): (JSC::StructureIDTable::tryGet): (JSC::StructureIDTable::validate): (JSC::StructureIDTable::deallocateID): (JSC::StructureIDTable::allocateID): (JSC::StructureIDTable::flushOldTables):
  • runtime/StructureRareData.cpp: (JSC::StructureRareData::StructureRareData):
  • runtime/StructureRareData.h:
  • runtime/StructureRareDataInlines.h: (JSC::StructureRareData::tryCachePropertyNameEnumeratorViaWatchpoint):
  • runtime/SymbolPrototype.cpp: (JSC::JSC_DEFINE_CUSTOM_GETTER): (JSC::JSC_DEFINE_HOST_FUNCTION):
  • runtime/TypeProfilerLog.cpp: (JSC::TypeProfilerLog::processLogEntries): (JSC::TypeProfilerLog::visit):
  • runtime/VM.h: (JSC::VM::getStructure): (JSC::VM::tryGetStructure):
  • runtime/WriteBarrier.h: (JSC::WriteBarrierStructureID::WriteBarrierStructureID): Deleted. (JSC::WriteBarrierStructureID::get const): Deleted. (JSC::WriteBarrierStructureID::operator* const): Deleted. (JSC::WriteBarrierStructureID::operator-> const): Deleted. (JSC::WriteBarrierStructureID::clear): Deleted. (JSC::WriteBarrierStructureID::operator bool const): Deleted. (JSC::WriteBarrierStructureID::operator! const): Deleted. (JSC::WriteBarrierStructureID::setWithoutWriteBarrier): Deleted. (JSC::WriteBarrierStructureID::unvalidatedGet const): Deleted. (JSC::WriteBarrierStructureID::value const): Deleted.
  • runtime/WriteBarrierInlines.h: (JSC::WriteBarrierStructureID::set): Deleted. (JSC::WriteBarrierStructureID::setMayBeNull): Deleted. (JSC::WriteBarrierStructureID::setEarlyValue): Deleted.
  • tools/HeapVerifier.cpp: (JSC::HeapVerifier::validateJSCell):
  • tools/Integrity.cpp:
  • tools/Integrity.h:
  • tools/IntegrityInlines.h: (JSC::Integrity::auditStructureID):
  • tools/JSDollarVM.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): (JSC::JSDollarVM::finishCreation): (JSC::JSDollarVM::visitChildrenImpl):
  • tools/JSDollarVM.h:
  • wasm/js/WebAssemblyFunction.cpp: (JSC::WebAssemblyFunction::jsCallEntrypointSlow):
  • wasm/js/WebAssemblyGlobalPrototype.cpp: (JSC::getGlobal):

Source/WTF:

  • wtf/OSAllocator.h:
  • wtf/posix/OSAllocatorPOSIX.cpp: (WTF::OSAllocator::reserveUncommittedAligned): Deleted.

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

7:28 PM Changeset in webkit [287007] by Russell Epstein
  • 2 edits in branches/safari-613.1.11-branch/Source/WTF

Cherry-pick r286849. rdar://problem/86445989

Reduce maximum mmap size for Structure regions to help placate ios
https://bugs.webkit.org/show_bug.cgi?id=234091

Reviewed by Saam Barati.

Use mach_vm_map since that supports memory alignement so we don't have to map 2x desired address space then free then trim.

  • wtf/PlatformHave.h:
  • wtf/posix/OSAllocatorPOSIX.cpp: (WTF::OSAllocator::reserveUncommittedAligned):

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

7:28 PM Changeset in webkit [287006] by Russell Epstein
  • 38 edits in branches/safari-613.1.11-branch/Source/JavaScriptCore

Cherry-pick r286667. rdar://problem/86445989

[JSC] Introduce WriteBarrierStructureID
https://bugs.webkit.org/show_bug.cgi?id=233918

Reviewed by Mark Lam.

This patch adds WriteBarrierStructureID class, which is similar to WriteBarrier<Structure>, but internally,
it holds StructureID, so sizeof(WriteBarrierStructureID) is 4. This class is useful to use StructureID for
memory saving while keeping WriteBarrier<Structure>'s useful features (automatically inserts write-barrier when
setting etc.). This also paves the way to introducing DOMStructures array with WriteBarrierStructureID instead
of costly HashMap<ClassInfo*, WriteBarrier<Structure>>.

  • bytecode/AccessCase.cpp: (JSC::AccessCase::AccessCase): (JSC::AccessCase::forEachDependentCell const): (JSC::AccessCase::dump const): (JSC::AccessCase::propagateTransitions const): (JSC::AccessCase::canBeShared):
  • bytecode/AccessCase.h: (JSC::AccessCase::structure const): (JSC::AccessCase::newStructure const): (JSC::AccessCase::hash const): (JSC::AccessCase::AccessCase):
  • bytecode/CheckPrivateBrandStatus.cpp: (JSC::CheckPrivateBrandStatus::computeForStubInfoWithoutExitSiteFeedback):
  • bytecode/DeleteByStatus.cpp: (JSC::DeleteByStatus::computeForStubInfoWithoutExitSiteFeedback):
  • bytecode/GetByStatus.cpp: (JSC::GetByStatus::computeForStubInfoWithoutExitSiteFeedback):
  • bytecode/InByStatus.cpp: (JSC::InByStatus::computeForStubInfoWithoutExitSiteFeedback):
  • bytecode/InlineAccess.cpp: (JSC::InlineAccess::rewireStubAsJumpInAccess): (JSC::InlineAccess::resetStubAsJumpInAccess):
  • bytecode/InstanceOfStatus.cpp: (JSC::InstanceOfStatus::computeForStubInfo):
  • bytecode/InternalFunctionAllocationProfile.h: (JSC::InternalFunctionAllocationProfile::offsetOfStructureID): (JSC::InternalFunctionAllocationProfile::structure): (JSC::InternalFunctionAllocationProfile::clear): (JSC::InternalFunctionAllocationProfile::visitAggregate): (JSC::InternalFunctionAllocationProfile::createAllocationStructureFromBase): (JSC::InternalFunctionAllocationProfile::offsetOfStructure): Deleted.
  • bytecode/PutByStatus.cpp: (JSC::PutByStatus::computeForStubInfo):
  • bytecode/SetPrivateBrandStatus.cpp: (JSC::SetPrivateBrandStatus::computeForStubInfoWithoutExitSiteFeedback):
  • bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::initGetByIdSelf): (JSC::StructureStubInfo::initPutByIdReplace): (JSC::StructureStubInfo::initInByIdSelf): (JSC::StructureStubInfo::deref): (JSC::StructureStubInfo::aboutToDie): (JSC::StructureStubInfo::addAccessCase): (JSC::StructureStubInfo::reset): (JSC::StructureStubInfo::visitAggregateImpl): (JSC::StructureStubInfo::visitWeakReferences): (JSC::StructureStubInfo::propagateTransitions): (JSC::StructureStubInfo::summary const): (JSC::StructureStubInfo::containsPC const):
  • bytecode/StructureStubInfo.h: (JSC::StructureStubInfo::inlineAccessBaseStructure): (JSC::StructureStubInfo::offsetOfByIdSelfOffset): (JSC::StructureStubInfo::offsetOfInlineAccessBaseStructureID): (JSC::StructureStubInfo::offsetOfInlineAccessBaseStructure): Deleted.
  • dfg/DFGSpeculativeJIT.cpp:
  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileCreatePromise): (JSC::FTL::DFG::LowerDFGToB3::compileCreateInternalFieldObject): (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
  • heap/AbstractSlotVisitor.h:
  • heap/AbstractSlotVisitorInlines.h: (JSC::AbstractSlotVisitor::append): (JSC::AbstractSlotVisitor::appendHidden):
  • heap/SlotVisitor.h:
  • heap/SlotVisitorInlines.h: (JSC::SlotVisitor::append): (JSC::SlotVisitor::appendHidden):
  • jit/AssemblyHelpers.cpp: (JSC::AssemblyHelpers::emitNonNullDecodeStructureID): (JSC::AssemblyHelpers::emitLoadStructure):
  • jit/AssemblyHelpers.h:
  • jit/JITInlineCacheGenerator.cpp: (JSC::generateGetByIdInlineAccess): (JSC::JITPutByIdGenerator::generateBaselineDataICFastPath): (JSC::JITInByIdGenerator::generateBaselineDataICFastPath):
  • runtime/FunctionExecutable.cpp: (JSC::FunctionExecutable::visitChildrenImpl):
  • runtime/FunctionExecutable.h:
  • runtime/FunctionRareData.cpp: (JSC::FunctionRareData::visitChildrenImpl):
  • runtime/FunctionRareData.h:
  • runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::visitChildrenImpl):
  • runtime/JSGlobalObject.h:
  • runtime/JSPropertyNameEnumerator.cpp: (JSC::JSPropertyNameEnumerator::JSPropertyNameEnumerator): (JSC::JSPropertyNameEnumerator::visitChildrenImpl):
  • runtime/JSPropertyNameEnumerator.h:
  • runtime/StructureRareData.cpp: (JSC::StructureRareData::StructureRareData):
  • runtime/StructureRareData.h:
  • runtime/WriteBarrier.h: (JSC::WriteBarrierStructureID::WriteBarrierStructureID): (JSC::WriteBarrierStructureID::get const): (JSC::WriteBarrierStructureID::operator* const): (JSC::WriteBarrierStructureID::operator-> const): (JSC::WriteBarrierStructureID::clear): (JSC::WriteBarrierStructureID::operator bool const): (JSC::WriteBarrierStructureID::operator! const): (JSC::WriteBarrierStructureID::setWithoutWriteBarrier): (JSC::WriteBarrierStructureID::unvalidatedGet const): (JSC::WriteBarrierStructureID::value const):
  • runtime/WriteBarrierInlines.h: (JSC::WriteBarrierStructureID::set): (JSC::WriteBarrierStructureID::setMayBeNull): (JSC::WriteBarrierStructureID::setEarlyValue):
  • tools/JSDollarVM.cpp: (JSC::JSDollarVM::finishCreation): (JSC::JSDollarVM::visitChildrenImpl):
  • tools/JSDollarVM.h:

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

7:27 PM Changeset in webkit [287005] by Russell Epstein
  • 15 edits
    1 add in branches/safari-613.1.11-branch/Source/JavaScriptCore

Cherry-pick r286597. rdar://problem/86445989

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

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

7:27 PM Changeset in webkit [287004] by Russell Epstein
  • 6 edits in branches/safari-613.1.11-branch/Source/JavaScriptCore

Cherry-pick r286580. rdar://problem/86445989

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):

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

7:27 PM Changeset in webkit [287003] by Russell Epstein
  • 2 edits in branches/safari-613.1.11-branch/Source/JavaScriptCore

Revert "Revert r286382. rdar://problem/86408710"

This reverts commit r286996.

6:42 PM Changeset in webkit [287002] by J Pascoe
  • 18 edits
    1 delete in trunk

Unreviewed, reverting r286993.
https://bugs.webkit.org/show_bug.cgi?id=234283

Reverted changeset:

"[WebAuthn] Allow same-site, cross-origin iframe get()"
https://bugs.webkit.org/show_bug.cgi?id=234180
https://commits.webkit.org/r286993

Patch by Commit Queue <commit-queue@webkit.org> on 2021-12-13

6:20 PM Changeset in webkit [287001] by Russell Epstein
  • 1 copy in tags/Safari-613.1.11.5

Tag Safari-613.1.11.5.

5:52 PM Changeset in webkit [287000] by chris.reid@sony.com
  • 8 edits
    16 adds in trunk

[Curl] Improve curl's cookie conformance in WPT
https://bugs.webkit.org/show_bug.cgi?id=232722

Reviewed by Fujii Hironori.

Source/WebCore:

Fix some cases where CookieJarDB differs from WPT expectations.

  • platform/network/curl/CookieJarDB.cpp:

Secure and Host prefixes are now stricter.
Don't allow empty cookies to be set.

  • platform/network/curl/CookieUtil.cpp:

Empty paths should override previous paths in the cookie list.

  • platform/network/curl/NetworkStorageSessionCurl.cpp:

Tools:

  • WebKitTestRunner/TestController.cpp: Use a unique cookie file for each test on windows

LayoutTests:

Add baseline for wpt cookie tests on wincairo

  • platform/wincairo/TestExpectations:
5:50 PM Changeset in webkit [286999] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit

Momentum Event Dispatcher: Excessive "kick" at the beginning of scrolling (especially on 60fps displays)
https://bugs.webkit.org/show_bug.cgi?id=234279
<rdar://problem/86425321>

Reviewed by Simon Fraser.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp:

(WebKit::MomentumEventDispatcher::handleWheelEvent):
(WebKit::MomentumEventDispatcher::didStartMomentumPhase):
Instead of back-dating the animation to try to acquire a momentum-start
delta, pass the one we got from the event through, and start the animation
curve at momentum-start time. Also, critically, inset ourselves along
the curve by the amount of that initial delta (since the time starts now).

Tested at both 60fps and 120fps, this significantly smooths out the
transition from fingers-down phase to the generated momentum phase,
avoiding the overly large initial delta.

  • WebProcess/WebPage/MomentumEventDispatcher.h:
5:38 PM Changeset in webkit [286998] by ysuzuki@apple.com
  • 10 edits in trunk/JSTests

[JSC] Update Intl tests based on ICU 69~
https://bugs.webkit.org/show_bug.cgi?id=234276

Reviewed by Mark Lam.

Rebaseline Intl tests based on ICU 69~'s CLDR update.

  • stress/array-toLocaleString.js:
  • stress/date-toLocaleString.js:
  • stress/intl-canonical-locale-alias-mapping.js:

(Intl.getCanonicalLocales):

  • stress/intl-datetimeformat-formatrange-relevant-extensions-ja.js:

(vm.icuVersion):

  • stress/intl-datetimeformat-formatrangetoparts-relevant-extensions-ja.js:
  • stress/intl-datetimeformat.js:
  • stress/intl-enumeration.js:
  • stress/intl-locale-info.js:

(shouldBe):

  • stress/intl-locale.js:
5:06 PM Changeset in webkit [286997] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ iOS ] 8 imported/w3c/web-platform-tests/fetch/api (layout-tests) are flaky text failures
https://bugs.webkit.org/show_bug.cgi?id=234278

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
5:00 PM Changeset in webkit [286996] by Russell Epstein
  • 2 edits in branches/safari-613.1.11-branch/Source/JavaScriptCore

Revert r286382. rdar://problem/86408710

4:44 PM Changeset in webkit [286995] by Russell Epstein
  • 9 edits in branches/safari-613.1.11-branch/Source

Versioning.

WebKit-7613.1.11.5

4:27 PM Changeset in webkit [286994] by sbarati@apple.com
  • 112 edits
    2 adds
    5 deletes in trunk/Source

Roll back r286345, r286387, r286471, r286667, r286849
https://bugs.webkit.org/show_bug.cgi?id=234268

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/AccessCase.cpp:

(JSC::AccessCase::AccessCase):
(JSC::AccessCase::forEachDependentCell const):
(JSC::AccessCase::dump const):
(JSC::AccessCase::propagateTransitions const):
(JSC::AccessCase::generateWithGuard):
(JSC::AccessCase::canBeShared):

  • bytecode/AccessCase.h:

(JSC::AccessCase::structure const):
(JSC::AccessCase::newStructure const):
(JSC::AccessCase::hash const):
(JSC::AccessCase::AccessCase):

  • bytecode/ArrayProfile.cpp:

(JSC::ArrayProfile::computeUpdatedPrediction):

  • bytecode/ArrayProfile.h:
  • bytecode/CheckPrivateBrandStatus.cpp:

(JSC::CheckPrivateBrandStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::determineLiveness):
(JSC::CodeBlock::finalizeLLIntInlineCaches):
(JSC::CodeBlock::stronglyVisitWeakReferences):

  • bytecode/DeleteByStatus.cpp:

(JSC::DeleteByStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/GetByIdMetadata.h:

(JSC::GetByIdModeMetadata::GetByIdModeMetadata):
(JSC::GetByIdModeMetadata::clearToDefaultModeWithoutCache):

  • bytecode/GetByStatus.cpp:

(JSC::GetByStatus::computeFromLLInt):
(JSC::GetByStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/InByStatus.cpp:

(JSC::InByStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/InlineAccess.cpp:

(JSC::InlineAccess::rewireStubAsJumpInAccess):
(JSC::InlineAccess::resetStubAsJumpInAccess):

  • bytecode/InstanceOfStatus.cpp:

(JSC::InstanceOfStatus::computeForStubInfo):

  • bytecode/InternalFunctionAllocationProfile.h:

(JSC::InternalFunctionAllocationProfile::offsetOfStructure):
(JSC::InternalFunctionAllocationProfile::structure):
(JSC::InternalFunctionAllocationProfile::clear):
(JSC::InternalFunctionAllocationProfile::visitAggregate):
(JSC::InternalFunctionAllocationProfile::createAllocationStructureFromBase):
(JSC::InternalFunctionAllocationProfile::offsetOfStructureID): Deleted.

  • bytecode/PolyProtoAccessChain.cpp:

(JSC::PolyProtoAccessChain::needImpurePropertyWatchpoint const):

  • bytecode/PolyProtoAccessChain.h:
  • bytecode/PolymorphicAccess.cpp:

(JSC::PolymorphicAccess::visitWeak const):

  • bytecode/PutByIdFlags.h:
  • bytecode/PutByStatus.cpp:

(JSC::PutByStatus::computeFromLLInt):
(JSC::PutByStatus::computeForStubInfo):

  • bytecode/SetPrivateBrandStatus.cpp:

(JSC::SetPrivateBrandStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/SpeculatedType.cpp:

(JSC::speculationFromCell):

  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::initGetByIdSelf):
(JSC::StructureStubInfo::initPutByIdReplace):
(JSC::StructureStubInfo::initInByIdSelf):
(JSC::StructureStubInfo::deref):
(JSC::StructureStubInfo::aboutToDie):
(JSC::StructureStubInfo::addAccessCase):
(JSC::StructureStubInfo::reset):
(JSC::StructureStubInfo::visitAggregateImpl):
(JSC::StructureStubInfo::visitWeakReferences):
(JSC::StructureStubInfo::propagateTransitions):
(JSC::StructureStubInfo::summary const):
(JSC::StructureStubInfo::containsPC const):

  • bytecode/StructureStubInfo.h:

(JSC::StructureStubInfo::offsetOfByIdSelfOffset):
(JSC::StructureStubInfo::offsetOfInlineAccessBaseStructure):
(JSC::StructureStubInfo::inlineAccessBaseStructure):
(JSC::StructureStubInfo::offsetOfInlineAccessBaseStructureID): Deleted.

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::branchWeakStructure):

  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::finalize):

  • dfg/DFGSpeculativeJIT.cpp:
  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNullOrUndefined):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNullOrUndefined):
(JSC::DFG::SpeculativeJIT::compileToBooleanObjectOrOther):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::emitUntypedBranch):
(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCreatePromise):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateInternalFieldObject):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

  • heap/AbstractSlotVisitor.h:
  • heap/AbstractSlotVisitorInlines.h:
  • heap/Heap.cpp:

(JSC::Heap::Heap):
(JSC::Heap::runEndPhase):

  • heap/Heap.h:

(JSC::Heap::structureIDTable):

  • heap/IsoAlignedMemoryAllocator.cpp:

(JSC::IsoAlignedMemoryAllocator::IsoAlignedMemoryAllocator):
(JSC::IsoAlignedMemoryAllocator::~IsoAlignedMemoryAllocator):
(JSC::IsoAlignedMemoryAllocator::tryAllocateAlignedMemory):
(JSC::IsoAlignedMemoryAllocator::freeAlignedMemory):
(JSC::IsoAlignedMemoryAllocator::tryMallocBlock): Deleted.
(JSC::IsoAlignedMemoryAllocator::freeBlock): Deleted.
(JSC::IsoAlignedMemoryAllocator::commitBlock): Deleted.
(JSC::IsoAlignedMemoryAllocator::decommitBlock): Deleted.

  • heap/IsoAlignedMemoryAllocator.h:
  • heap/IsoMemoryAllocatorBase.cpp: Removed.
  • heap/IsoMemoryAllocatorBase.h: Removed.
  • heap/IsoSubspace.cpp:

(JSC::IsoSubspace::IsoSubspace):
(JSC::IsoSubspace::tryAllocateFromLowerTier):

  • heap/IsoSubspace.h:
  • heap/PreciseAllocation.cpp:

(JSC::PreciseAllocation::createForLowerTier):
(JSC::PreciseAllocation::tryCreateForLowerTier): Deleted.

  • heap/PreciseAllocation.h:
  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::appendJSCellOrAuxiliary):

  • heap/SlotVisitor.h:
  • heap/SlotVisitorInlines.h:
  • heap/StructureAlignedMemoryAllocator.cpp: Removed.
  • heap/StructureAlignedMemoryAllocator.h: Removed.
  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::emitStoreStructureWithTypeInfo):
(JSC::AssemblyHelpers::emitLoadStructure):
(JSC::AssemblyHelpers::emitLoadPrototype):
(JSC::AssemblyHelpers::emitRandomThunk):
(JSC::AssemblyHelpers::emitConvertValueToBoolean):
(JSC::AssemblyHelpers::branchIfValue):
(JSC::AssemblyHelpers::emitNonNullDecodeStructureID): Deleted.

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::branchStructure):
(JSC::AssemblyHelpers::nukeStructureAndStoreButterfly):

  • jit/GCAwareJITStubRoutine.cpp:

(JSC::PolymorphicAccessJITStubRoutine::computeHash):

  • jit/JITInlineCacheGenerator.cpp:

(JSC::generateGetByIdInlineAccess):
(JSC::JITPutByIdGenerator::generateBaselineDataICFastPath):
(JSC::JITInByIdGenerator::generateBaselineDataICFastPath):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_typeof_is_undefined):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emit_op_get_prototype_of):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_property_enumerator):

  • jit/JITStubRoutine.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::performLLIntGetByID):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/ArrayPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/BigIntPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/BooleanPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/CommonSlowPaths.cpp:

(JSC::JSC_DEFINE_COMMON_SLOW_PATH):

  • runtime/DatePrototype.cpp:

(JSC::formateDateInstance):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::sanitizedMessageString):
(JSC::ErrorInstance::sanitizedNameString):
(JSC::ErrorInstance::sanitizedToString):

  • runtime/ErrorPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/FunctionExecutable.cpp:

(JSC::FunctionExecutable::visitChildrenImpl):

  • runtime/FunctionExecutable.h:
  • runtime/FunctionPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/FunctionRareData.cpp:

(JSC::FunctionRareData::visitChildrenImpl):

  • runtime/FunctionRareData.h:
  • runtime/HasOwnPropertyCache.h:
  • runtime/InitializeThreading.cpp:

(JSC::initialize):

  • runtime/JSCConfig.h:
  • runtime/JSCJSValue.cpp:

(JSC::JSValue::dumpInContextAssumingStructure const):
(JSC::JSValue::dumpForBacktrace const):

  • runtime/JSCell.cpp:

(JSC::JSCell::toObjectSlow const):

  • runtime/JSCell.h:

(JSC::JSCell::clearStructure):

  • runtime/JSCellInlines.h:

(JSC::JSCell::structure const):
(JSC::JSCell::setStructure):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::visitChildrenImpl):

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

(JSC::JSObject::visitButterflyImpl):
(JSC::JSObject::createInitialUndecided):
(JSC::JSObject::createInitialInt32):
(JSC::JSObject::createInitialDouble):
(JSC::JSObject::createInitialContiguous):
(JSC::JSObject::createArrayStorage):
(JSC::JSObject::convertUndecidedToArrayStorage):
(JSC::JSObject::convertInt32ToArrayStorage):
(JSC::JSObject::convertDoubleToArrayStorage):
(JSC::JSObject::convertContiguousToArrayStorage):
(JSC::JSObject::putDirectCustomGetterSetterWithoutTransition):
(JSC::JSObject::putDirectNonIndexAccessorWithoutTransition):

  • runtime/JSObject.h:

(JSC::JSObject::nukeStructureAndSetButterfly):
(JSC::JSObject::getPropertySlot):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::getPropertySlot):
(JSC::JSObject::getNonIndexPropertySlot):
(JSC::JSObject::putDirectWithoutTransition):
(JSC::JSObject::putDirectInternal):

  • runtime/JSPropertyNameEnumerator.cpp:

(JSC::JSPropertyNameEnumerator::JSPropertyNameEnumerator):
(JSC::JSPropertyNameEnumerator::visitChildrenImpl):

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

(JSC::toThisNumber):

  • runtime/ObjectPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::objectPrototypeToString):

  • runtime/RegExpPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/StringPrototype.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/Structure.cpp:

(JSC::Structure::Structure):
(JSC::Structure::~Structure):
(JSC::Structure::flattenDictionaryStructure):
(JSC::Structure::dump const):
(JSC::Structure::canCachePropertyNameEnumerator const):

  • runtime/Structure.h:

(JSC::Structure::id const):

  • runtime/StructureChain.cpp:

(JSC::StructureChain::create):
(JSC::StructureChain::visitChildrenImpl):

  • runtime/StructureID.h: Removed.
  • runtime/StructureIDBlob.h:

(JSC::StructureIDBlob::StructureIDBlob):

  • runtime/StructureIDTable.cpp: Added.

(JSC::StructureIDTable::StructureIDTable):
(JSC::StructureIDTable::makeFreeListFromRange):
(JSC::StructureIDTable::resize):
(JSC::StructureIDTable::flushOldTables):
(JSC::StructureIDTable::allocateID):
(JSC::StructureIDTable::deallocateID):

  • runtime/StructureIDTable.h: Added.

(JSC::nukedStructureIDBit):
(JSC::nuke):
(JSC::isNuked):
(JSC::decontaminate):
(JSC::StructureIDTable::base):
(JSC::StructureIDTable::size const):
(JSC::StructureIDTable::table const):
(JSC::StructureIDTable::decode):
(JSC::StructureIDTable::encode):
(JSC::StructureIDTable::get):
(JSC::StructureIDTable::tryGet):
(JSC::StructureIDTable::validate):
(JSC::StructureIDTable::deallocateID):
(JSC::StructureIDTable::allocateID):
(JSC::StructureIDTable::flushOldTables):

  • runtime/StructureRareData.cpp:

(JSC::StructureRareData::StructureRareData):

  • runtime/StructureRareData.h:
  • runtime/StructureRareDataInlines.h:

(JSC::StructureRareData::tryCachePropertyNameEnumeratorViaWatchpoint):

  • runtime/SymbolPrototype.cpp:

(JSC::JSC_DEFINE_CUSTOM_GETTER):
(JSC::JSC_DEFINE_HOST_FUNCTION):

  • runtime/TypeProfilerLog.cpp:

(JSC::TypeProfilerLog::processLogEntries):
(JSC::TypeProfilerLog::visit):

  • runtime/VM.h:

(JSC::VM::getStructure):
(JSC::VM::tryGetStructure):

  • runtime/WriteBarrier.h:

(JSC::WriteBarrierStructureID::WriteBarrierStructureID): Deleted.
(JSC::WriteBarrierStructureID::get const): Deleted.
(JSC::WriteBarrierStructureID::operator* const): Deleted.
(JSC::WriteBarrierStructureID::operator-> const): Deleted.
(JSC::WriteBarrierStructureID::clear): Deleted.
(JSC::WriteBarrierStructureID::operator bool const): Deleted.
(JSC::WriteBarrierStructureID::operator! const): Deleted.
(JSC::WriteBarrierStructureID::setWithoutWriteBarrier): Deleted.
(JSC::WriteBarrierStructureID::unvalidatedGet const): Deleted.
(JSC::WriteBarrierStructureID::value const): Deleted.

  • runtime/WriteBarrierInlines.h:

(JSC::WriteBarrierStructureID::set): Deleted.
(JSC::WriteBarrierStructureID::setMayBeNull): Deleted.
(JSC::WriteBarrierStructureID::setEarlyValue): Deleted.

  • tools/HeapVerifier.cpp:

(JSC::HeapVerifier::validateJSCell):

  • tools/Integrity.cpp:
  • tools/Integrity.h:
  • tools/IntegrityInlines.h:

(JSC::Integrity::auditStructureID):

  • tools/JSDollarVM.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSDollarVM::finishCreation):
(JSC::JSDollarVM::visitChildrenImpl):

  • tools/JSDollarVM.h:
  • wasm/js/WebAssemblyFunction.cpp:

(JSC::WebAssemblyFunction::jsCallEntrypointSlow):

  • wasm/js/WebAssemblyGlobalPrototype.cpp:

(JSC::getGlobal):

Source/WTF:

  • wtf/OSAllocator.h:
  • wtf/posix/OSAllocatorPOSIX.cpp:

(WTF::OSAllocator::reserveUncommittedAligned): Deleted.

3:58 PM Changeset in webkit [286993] by J Pascoe
  • 18 edits
    1 add in trunk

[WebAuthn] Allow same-site, cross-origin iframe get()
https://bugs.webkit.org/show_bug.cgi?id=234180
rdar://85161142

Reviewed by Brent Fulgham.

Source/WebCore:

The Web Authentication level 2 specifies a feature policy to allow get calls in
cross-origin i-frames. This patch implements this feature policy partially. Only
same-site, cross-origin i-frames are supported instead. This is for tracking prevention
purposes. https://w3c.github.io/webauthn/#sctn-iframe-guidance

This patch also starts passing ClientDataJSON hashes to ASC to avoid the situation
where WebKit includes crossOrigin or other fields in ClientDataJSON that ASC is
unaware of when generating ClientDataJSON.

Added layout test cases for same-site, cross-origin get calls.

  • Modules/webauthn/AuthenticatorCoordinator.cpp:

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

  • Modules/webauthn/WebAuthenticationUtils.cpp:

(WebCore::buildClientDataJson):

  • Modules/webauthn/WebAuthenticationUtils.h:
  • html/FeaturePolicy.cpp:

(WebCore::policyTypeName):
(WebCore::FeaturePolicy::parse):
(WebCore::FeaturePolicy::allows const):

  • html/FeaturePolicy.h:

Source/WebKit:

The Web Authentication level 2 specifies a feature policy to allow get calls in
cross-origin i-frames. This patch implements this feature policy partially. Only
same-site, cross-origin i-frames are supported instead. This is for tracking prevention
purposes. https://w3c.github.io/webauthn/#sctn-iframe-guidance

This patch also starts passing ClientDataJSON hashes to ASC to avoid the situation
where WebKit includes crossOrigin or other fields in ClientDataJSON that ASC is
unaware of when generating ClientDataJSON.

Added layout test cases for same-site, cross-origin get calls.

  • Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
  • UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:

(produceClientDataJson):

  • UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:

(WebKit::configureRegistrationRequestContext):
(WebKit::configurationAssertionRequestContext):
(WebKit::WebAuthenticatorCoordinatorProxy::contextForRequest):

LayoutTests:

Add layout test for WebAuthn get assertions on cross-site, same-sites i-frames with
publickey-credentials-get feature policy.

  • http/wpt/webauthn/public-key-credential-same-origin-with-ancestors.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-same-origin-with-ancestors.https.html:
  • http/wpt/webauthn/resources/util.js:
3:56 PM Changeset in webkit [286992] by ysuzuki@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

[JSC] Use FixedVector for wasm exception in Wasm::Instance
https://bugs.webkit.org/show_bug.cgi?id=234224

Reviewed by Saam Barati.

Since we know # of exception tags when instantiating Wasm::Instance,
we can use FixedVector instead of Vector. This is the same to Table,
Functions etc.

We also remove Wasm::Tag::m_id. Since we do not copy Wasm::Tag and
we always allocate Wasm::Tag from heap, we can just use pointer
comparison. Then, we do not need to have this m_id.

  • wasm/WasmInstance.cpp:

(JSC::Wasm::Instance::Instance):
(JSC::Wasm::Instance::setTag):
(JSC::Wasm::Instance::addTag): Deleted.

  • wasm/WasmInstance.h:
  • wasm/WasmModuleInformation.h:

(JSC::Wasm::ModuleInformation::internalExceptionCount const):

  • wasm/WasmTag.cpp:
  • wasm/WasmTag.h:

(JSC::Wasm::Tag::create): Deleted.
(JSC::Wasm::Tag::parameterCount const): Deleted.
(JSC::Wasm::Tag::parameter const): Deleted.
(JSC::Wasm::Tag::operator== const): Deleted.
(JSC::Wasm::Tag::operator!= const): Deleted.
(JSC::Wasm::Tag::signature const): Deleted.
(JSC::Wasm::Tag::Tag): Deleted.

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::initializeImportsAndExports):

3:49 PM Changeset in webkit [286991] by Alan Coon
  • 7 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r286919. rdar://problem/86247557

Momentum Event Dispatcher: Tail frames are the wrong velocity if momentum event dispatch rate doesn't match screen refresh rate
https://bugs.webkit.org/show_bug.cgi?id=234168
<rdar://problem/86247557>

Reviewed by Simon Fraser.

In r286671, I scaled the tail frames into the momentum event disaptch
rate, but they are actually always dispatched at display refresh
frequency. In many cases these things are the same, but in some
cases can differ (most commonly a 120Hz display with 60Hz event dispatch),
so to always have the tail move at the right rate, scale into the display
refresh rate instead).

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::windowScreenDidChange):
  • WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::pageScreenDidChange):
  • WebProcess/WebPage/EventDispatcher.h:
  • WebProcess/WebPage/EventDispatcher.messages.in:
  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::didStartMomentumPhase): (WebKit::MomentumEventDispatcher::displayProperties const): (WebKit::MomentumEventDispatcher::startDisplayLink): (WebKit::MomentumEventDispatcher::stopDisplayLink): (WebKit::MomentumEventDispatcher::pageScreenDidChange): (WebKit::MomentumEventDispatcher::displayWasRefreshed): (WebKit::MomentumEventDispatcher::displayID const): Deleted.
  • WebProcess/WebPage/MomentumEventDispatcher.h: Plumb and store the nominal display refresh rate.

(WebKit::MomentumEventDispatcher::buildOffsetTableWithInitialDelta):
Scale the tail frames from the 60Hz ideal rate into the display refresh
rate, instead of the event dispatch rate.

Incoming events still scale *in* from the event dispatch rate, since
that's... the rate they come at.

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

3:45 PM Changeset in webkit [286990] by Ryan Haddad
  • 2 edits
    7 adds in trunk/LayoutTests

Unreviewed test gardening for rdar://80334322, rebaseline tests for Monterey.

  • platform/mac-bigsur/fast/events/wheel/wheelevent-in-horizontal-scrollbar-in-rtl-expected.txt: Added.
  • platform/mac-bigsur/fast/events/wheel/wheelevent-in-vertical-scrollbar-in-rtl-expected.txt: Added.
  • platform/mac-wk1/TestExpectations:
  • platform/mac/fast/events/wheel/wheelevent-in-horizontal-scrollbar-in-rtl-expected.txt: Added.
  • platform/mac/fast/events/wheel/wheelevent-in-vertical-scrollbar-in-rtl-expected.txt: Added.
3:41 PM Changeset in webkit [286989] by Alan Coon
  • 1 edit in branches/safari-612-branch/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h

Unreviewed build fix. rdar://problem/86385697

./page/scrolling/ThreadedScrollingTree.cpp:452:19: error: 'updateScrollPositionAtLastDisplayRefresh' is a protected member of 'WebCore::ScrollingTreeScrollingNode'

3:31 PM Changeset in webkit [286988] by commit-queue@webkit.org
  • 6 edits in trunk

A FormData constructed in the form's submit event listener shouldn't include the submitter
https://bugs.webkit.org/show_bug.cgi?id=234069

Patch by Andreu Botella <andreu@andreubotella.com> on 2021-12-13
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/forms/form-submission-0/constructing-form-data-set-expected.txt:

Source/WebCore:

In the HTML spec, the "construct the entry list" algorithm takes an optional submitter
argument which it uses to determine whether a button should be included in the entry list.
The FormData constructor calls it with no optional arguments, so new FormData(form) should
never contain any buttons.

In WebKit, however, if a FormData object is constructed in the form's submit event
listener, it will contain the submitter button, if the form submission wasn't implicit. This
is because whether a form control is the submitter is tracked on the control, and activating
it sets that state for the duration of the form submission algorithm.

However, the form submission algorithm also sets a submitter's state, to deal with implicit
submissions. This is set only for the duration of the "construct the entry list" call, and
so there is no need to set the state when activating the button.

Tests: imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/constructing-form-data-set.html

  • html/HTMLButtonElement.cpp:

(WebCore::HTMLButtonElement::defaultEventHandler):

  • html/ImageInputType.cpp:

(WebCore::ImageInputType::handleDOMActivateEvent):

  • html/SubmitInputType.cpp:

(WebCore::SubmitInputType::handleDOMActivateEvent):

3:14 PM Changeset in webkit [286987] by graouts@webkit.org
  • 2 edits in trunk/Source/WTF

CustomEffect and animation frame rate should be disabled by default in STP
https://bugs.webkit.org/show_bug.cgi?id=234251

Reviewed by Dean Jackson.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
3:01 PM Changeset in webkit [286986] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Unreviewed build fix after r286971.

  • wtf/spi/darwin/dyldSPI.h:
2:51 PM Changeset in webkit [286985] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: remove coloring of Web Inspector area in dock icons
https://bugs.webkit.org/show_bug.cgi?id=234262

Reviewed by Patrick Angle.

It looks too strong/bold and draws way too much attention. It also doesn't match the styling
of other nearby icons.

  • UserInterface/Images/DockBottom.svg:
  • UserInterface/Images/DockLeft.svg:
  • UserInterface/Images/DockRight.svg:
2:50 PM Changeset in webkit [286984] by Alan Coon
  • 3 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r286907. rdar://problem/86307593

[Cocoa] -[AVPlayerItem liveUpdateInterval] can hang the main thread for ~60ms
https://bugs.webkit.org/show_bug.cgi?id=234131

Reviewed by Eric Carlson.

Direct property access of AVFoundation objects can take tens of milliseconds to return
a value, even for simple properties. This impacts scrolling responsiveness.

-liveUpdateInterval is not KVO-observable, but only changes when -seekableTimeRanges does
as well. Query and cache that property during KVO of -seekableTimeRanges.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesLastModifiedTime const): (WebCore::MediaPlayerPrivateAVFoundationObjC::liveUpdateInterval const): (WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesDidChange): (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):

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

2:34 PM Changeset in webkit [286983] by Jean-Yves Avenard
  • 73 edits in trunk

Add SharedBufferBuilder class
https://bugs.webkit.org/show_bug.cgi?id=233442
rdar://85693939

Reviewed by Youenn Fablet.

Source/WebCore:

Similar to StringBuilder, a SharedBuffer can now only be modified through
a SharedBufferBuilder. A SharedBuffer becomes immutable once created.

A SharedBufferBuilder is a replacement to RefPtr<SharedBuffer>.
There exists a difference between a null and empty state.
Following a call to reset(), SharedBufferBuilder::isNull()
will return true as opposed to empty() which will create the underlying
SharedBuffer but with a size of 0.
A null SharedBufferBuilder indicates that append was never called on it
(even with an empty SharedBuffer).
It is not necessary to check if the SharedBufferBuilder is null before
calling copy() or take() as an empty SharedBuffer will be created if
none exists.
These design decisions were made due to how SharedBuffer are currently used
and to minimise the logic change as some places would distinguish between
the two states or would always create an empty SharedBuffer and only check
its size.
In the future, removing the distinction between null and pty would be
preferable.

While the aim was to guarantee that a SharedBuffer once built was immutable.
This goal wasn't entirely achieved as it is still possible to retrieve a RefPtr
to a SharedBuffer and continue to append to it through its SharedBufferBuilder
owner. Full immutability could be fully achieved with having get() return a
shallow copy which is a relatively cheap operation.

Fly-By fixes: Pass SharedBuffer via const references or pointers where it's easy
to do so.
No change in observable behaviour; covered by existing tests.

  • Modules/cache/DOMCache.cpp:

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

  • Modules/fetch/FetchBodyConsumer.cpp:

(WebCore::FetchBodyConsumer::clean):
(WebCore::FetchBodyConsumer::resolve):
(WebCore::FetchBodyConsumer::append):
(WebCore::FetchBodyConsumer::setData):
(WebCore::FetchBodyConsumer::takeData):
(WebCore::FetchBodyConsumer::takeAsArrayBuffer):
(WebCore::FetchBodyConsumer::takeAsBlob):
(WebCore::FetchBodyConsumer::takeAsText):
(WebCore::FetchBodyConsumer::setSource):

  • Modules/fetch/FetchBodyConsumer.h:

(WebCore::FetchBodyConsumer::data const):
(WebCore::FetchBodyConsumer::setData): Deleted.

  • Modules/model-element/HTMLModelElement.cpp:

(WebCore::HTMLModelElement::setSourceURL):
(WebCore::HTMLModelElement::dataReceived):
(WebCore::HTMLModelElement::notifyFinished):

  • Modules/model-element/HTMLModelElement.h:
  • inspector/NetworkResourcesData.cpp:

(WebCore::NetworkResourcesData::ResourceData::ResourceData):
(WebCore::NetworkResourcesData::ResourceData::removeContent):
(WebCore::NetworkResourcesData::ResourceData::hasData const):
(WebCore::NetworkResourcesData::ResourceData::dataLength const):
(WebCore::NetworkResourcesData::ResourceData::appendData):
(WebCore::NetworkResourcesData::ResourceData::decodeDataToContent):

  • inspector/NetworkResourcesData.h:

(WebCore::NetworkResourcesData::ResourceData::hasBufferedData const):
(WebCore::NetworkResourcesData::ResourceData::hasData const): Deleted.

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::releaseResources):
(WebCore::ResourceLoader::setDataBufferingPolicy):
(WebCore::ResourceLoader::addDataOrBuffer):
(WebCore::ResourceLoader::resourceData const):
(WebCore::ResourceLoader::clearResourceData):

  • loader/ResourceLoader.h:

(WebCore::ResourceLoader::resourceData const): Deleted.

  • loader/SubstituteResource.h:

(WebCore::SubstituteResource::data const):
(WebCore::SubstituteResource::append):
(WebCore::SubstituteResource::clear):
(WebCore::SubstituteResource::deliver):

  • loader/appcache/ApplicationCacheResourceLoader.cpp:

(WebCore::ApplicationCacheResourceLoader::dataReceived):

  • loader/appcache/ApplicationCacheStorage.cpp:

(WebCore::ApplicationCacheStorage::store):

  • loader/archive/mhtml/MHTMLParser.cpp:

(WebCore::MHTMLParser::parseNextPart):

  • loader/cache/CachedApplicationManifest.cpp:

(WebCore::CachedApplicationManifest::finishLoading):

  • loader/cache/CachedApplicationManifest.h:
  • loader/cache/CachedCSSStyleSheet.cpp:

(WebCore::CachedCSSStyleSheet::finishLoading):

  • loader/cache/CachedCSSStyleSheet.h:
  • loader/cache/CachedFont.cpp:

(WebCore::CachedFont::finishLoading):

  • loader/cache/CachedFont.h:
  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::updateBufferInternal):
(WebCore::CachedImage::convertedDataIfNeeded const):
(WebCore::CachedImage::updateBuffer):
(WebCore::CachedImage::finishLoading):

  • loader/cache/CachedImage.h:
  • loader/cache/CachedRawResource.cpp:

(WebCore::CachedRawResource::updateBuffer):
(WebCore::CachedRawResource::finishLoading):

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

(WebCore::CachedResource::updateBuffer):
(WebCore::CachedResource::finishLoading):

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

(WebCore::CachedSVGDocument::finishLoading):

  • loader/cache/CachedSVGDocument.h:
  • loader/cache/CachedScript.cpp:

(WebCore::CachedScript::finishLoading):

  • loader/cache/CachedScript.h:
  • loader/cache/CachedTextTrack.cpp:

(WebCore::CachedTextTrack::doUpdateBuffer):
(WebCore::CachedTextTrack::updateBuffer):
(WebCore::CachedTextTrack::finishLoading):

  • loader/cache/CachedTextTrack.h:
  • loader/cache/CachedXSLStyleSheet.cpp:

(WebCore::CachedXSLStyleSheet::finishLoading):

  • loader/cache/CachedXSLStyleSheet.h:
  • loader/ios/LegacyPreviewLoader.h:
  • loader/ios/LegacyPreviewLoader.mm:

(WebCore::LegacyPreviewLoader::previewConverterDidStartConverting):
(WebCore::LegacyPreviewLoader::provideMainResourceForPreviewConverter):

  • platform/PreviewConverter.cpp:

(WebCore::PreviewConverter::previewData const):
(WebCore::PreviewConverter::replayToClient):

  • platform/PreviewConverter.h:
  • platform/SharedBuffer.cpp:

(WebCore::SharedBuffer::append):

  • platform/SharedBuffer.h:

(WebCore::SharedBufferBuilder::SharedBufferBuilder):
(WebCore::SharedBufferBuilder::append):
(WebCore::SharedBufferBuilder::operator bool const):
(WebCore::SharedBufferBuilder::isNull const):
(WebCore::SharedBufferBuilder::isEmpty const):
(WebCore::SharedBufferBuilder::size const):
(WebCore::SharedBufferBuilder::reset):
(WebCore::SharedBufferBuilder::empty):
(WebCore::SharedBufferBuilder::get const):
(WebCore::SharedBufferBuilder::copy const):
(WebCore::SharedBufferBuilder::take):
(WebCore::SharedBufferBuilder::ensureBuffer):

  • platform/encryptedmedia/clearkey/CDMClearKey.cpp:

(WebCore::extractKeyidsFromCencInitData):
(WebCore::extractKeyIdFromWebMInitData):

  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:

(WebCore::PlatformResourceMediaLoader::dataReceived):
(WebCore::WebCoreAVFResourceLoader::newDataStoredInSharedBuffer):

  • platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h:

(WebCore::InitData::InitData):
(WebCore::InitData::append):
(WebCore::InitData::payload const):

  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:

(WebCore::readICCProfile):

  • platform/ios/PreviewConverterIOS.mm:

(WebCore::PreviewConverter::PreviewConverter):

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

(WebCore::MediaRecorderPrivateWriter::~MediaRecorderPrivateWriter):
(WebCore::MediaRecorderPrivateWriter::appendData):
(WebCore::MediaRecorderPrivateWriter::takeData):

  • platform/network/cocoa/RangeResponseGenerator.mm:

(WebCore::RangeResponseGenerator::Data::Data):
(WebCore::RangeResponseGenerator::giveResponseToTaskIfBytesInRangeReceived):
(WebCore::RangeResponseGenerator::expectedContentLengthFromData):

  • workers/ScriptBuffer.cpp:

(WebCore::ScriptBuffer::ScriptBuffer):
(WebCore::ScriptBuffer::toString const):
(WebCore::ScriptBuffer::containsSingleFileMappedSegment const):
(WebCore::ScriptBuffer::append):

  • workers/ScriptBuffer.h:

(WebCore::ScriptBuffer::buffer const):
(WebCore::ScriptBuffer::isolatedCopy const):
(WebCore::ScriptBuffer::isEmpty const):

  • workers/WorkerFontLoadRequest.cpp:

(WebCore::WorkerFontLoadRequest::WorkerFontLoadRequest):
(WebCore::WorkerFontLoadRequest::isPending const):
(WebCore::WorkerFontLoadRequest::ensureCustomFontData):
(WebCore::WorkerFontLoadRequest::didReceiveData):

  • workers/WorkerFontLoadRequest.h:
  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::XMLHttpRequest):
(WebCore::XMLHttpRequest::createResponseBlob):
(WebCore::XMLHttpRequest::createResponseArrayBuffer):
(WebCore::XMLHttpRequest::clearResponseBuffers):
(WebCore::XMLHttpRequest::didReceiveData):

  • xml/XMLHttpRequest.h:

Source/WebKit:

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::didReceiveResponse):
(WebKit::NetworkResourceLoader::didReceiveBuffer):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::bufferingTimerFired):
(WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):

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

(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
(WebKit::NetworkCache::SpeculativeLoad::didReceiveResponse):
(WebKit::NetworkCache::SpeculativeLoad::didReceiveBuffer):
(WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
  • UIProcess/WebURLSchemeTask.cpp:

(WebKit::WebURLSchemeTask::WebURLSchemeTask):
(WebKit::WebURLSchemeTask::didReceiveData):
(WebKit::WebURLSchemeTask::didComplete):

  • UIProcess/WebURLSchemeTask.h:
  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::PluginView):
(WebKit::PluginView::manualLoadDidReceiveData):
(WebKit::PluginView::manualLoadDidFail):
(WebKit::PluginView::liveResourceData const):
(WebKit::PluginView::redeliverManualStream):

  • WebProcess/Plugins/PluginView.h:
  • WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:

(WebKit::WebServiceWorkerFetchTaskClient::didReceiveData):
(WebKit::WebServiceWorkerFetchTaskClient::continueDidReceiveResponse):

  • WebProcess/Storage/WebServiceWorkerFetchTaskClient.h:
  • WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.cpp:

(WebKit::WebPreviewLoaderClient::didFinishLoading):
(WebKit::WebPreviewLoaderClient::didFail):

  • WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.h:

Source/WebKitLegacy/win:

  • WebFrame.cpp:

(WebFrame::loadData):

Tools:

Update API tests.

  • TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:

(TestWebKitAPI::TEST_F):

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

(TestWebKitAPI::TEST_F):

2:32 PM Changeset in webkit [286982] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Unreviewed, reverting r283354.
https://bugs.webkit.org/show_bug.cgi?id=234273

causes missing content with clip-path

Reverted changeset:

"[Performance] Optimize
RenderLayer::clipCrossesPaintingBoundary"
https://bugs.webkit.org/show_bug.cgi?id=230885
https://commits.webkit.org/r283354

2:19 PM Changeset in webkit [286981] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

LFC][IFC] Add partial unicode-bidi support on inline level boxes
https://bugs.webkit.org/show_bug.cgi?id=234196

Unreviewed test gardening.

  • platform/ios/fast/text/international/bidi-ignored-for-first-child-inline-expected.txt: Rebaseline test for iOS.
2:04 PM Changeset in webkit [286980] by Robert Jenner
  • 2 edits in trunk/LayoutTests

REGRESSION (r286259): [ BigSur+ wk1 ] 2X imported/w3c/web-platform-tests/speech-api/SpeechSynthesis (layout-tests) are constant text failures
https://bugs.webkit.org/show_bug.cgi?id=234105

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
1:21 PM Changeset in webkit [286979] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[WP][iOS] Add access to required system call
https://bugs.webkit.org/show_bug.cgi?id=234232
<rdar://86343811>

Reviewed by Brent Fulgham.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
1:16 PM Changeset in webkit [286978] by commit-queue@webkit.org
  • 7 edits in trunk/Source

[GTK] Fix ANGLE compilation
https://bugs.webkit.org/show_bug.cgi?id=233327

Patch by Alejandro G. Castro <alex@igalia.com> on 2021-12-13
Reviewed by Kenneth Russell.

Source/ThirdParty/ANGLE:

There is a define with a typo in the name and activating EGL and
X11 does not work at the same time.

  • PlatformGTK.cmake:

Source/WebCore:

No tests required.

Fixed the issues to make the engine work with -DUSE_ANGLE_WEBGL=ON
defined.

  • platform/graphics/GLContext.cpp:

(WebCore::initializeOpenGLShimsIfNeeded): In case of GTK and WPE
initially we are going to keep TextureMapper using system GL
libraries, even when we are using ANGLE for WebGL, so we need the
shims definitions.

  • platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp:

(Nicosia::GCGLLayer::swapBuffersIfNeeded): We need to allocate and
update the layer buffer in the compositor thread to make sure it
is handled in just one thread.

12:57 PM Changeset in webkit [286977] by Alan Coon
  • 12 edits in branches/safari-612-branch/Source

Cherry-pick r286905. rdar://problem/86235740

Scrolling can drop frames when CoreAnimation commits take a long time
https://bugs.webkit.org/show_bug.cgi?id=234160
<rdar://86235740>

Reviewed by Tim Horton.

In r261985 I added a mechanism that has the scrolling thread wait for the main thread to
finish a rendering update, and, if the main thread fails to complete in time, then the
scrolling thread commits. This allows for scrolling synchronization when the main thread is
responsive, but smooth scrolling when the main thread is busy.

However, r261985 only waits for WebKit work to finish; what we really care about is whether
the main thread completes its CA commit in time (because that determines whether the scroll
shows on the screen).

So plumb through pre-/post-commit hooks from TiledCoreAnimationDrawingArea, which already
had them for inspector instrumentation. Then have ThreadedScrollingTree notify
m_stateCondition in didCompletePlatformRenderingUpdate(), instead of
didCompleteRenderingUpdate().
Source/WebCore:

Also, now we can call the inspector hooks from Page, rather than out in TiledCoreAnimationDrawingArea.

  • page/Page.cpp: (WebCore::Page::willStartPlatformRenderingUpdate): (WebCore::Page::didCompletePlatformRenderingUpdate):
  • page/Page.h:
  • page/scrolling/ScrollingCoordinator.h: (WebCore::ScrollingCoordinator::willStartPlatformRenderingUpdate): (WebCore::ScrollingCoordinator::didCompletePlatformRenderingUpdate):
  • page/scrolling/ThreadedScrollingTree.cpp: (WebCore::ThreadedScrollingTree::didCompletePlatformRenderingUpdate): (WebCore::ThreadedScrollingTree::didCompleteRenderingUpdate): Deleted.
  • page/scrolling/ThreadedScrollingTree.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.mm: (WebCore::ScrollingCoordinatorMac::didCompletePlatformRenderingUpdate):

Source/WebKit:

Also, now we can call the inspector hooks from Page, rather than out in TiledCoreAnimationDrawingArea.

  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::willStartPlatformRenderingUpdate): (WebKit::WebPage::didCompletePlatformRenderingUpdate):
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::addCommitHandlers):

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

12:57 PM Changeset in webkit [286976] by Alan Coon
  • 3 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r286834. rdar://problem/86427901

Inspector "composite" events are all very short
https://bugs.webkit.org/show_bug.cgi?id=234114
<rdar://86299391>

Reviewed by Tim Horton.

The kCATransactionPhasePreCommit callbacks fire after painting, but we want the composite
time to include painting so use kCATransactionPhasePreLayout.

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm: (WebKit::RemoteLayerTreeDrawingArea::addCommitHandlers):
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::addCommitHandlers):

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

12:56 PM Changeset in webkit [286975] by Alan Coon
  • 6 edits in branches/safari-612-branch/Source/WebCore

Cherry-pick r286932. rdar://problem/86385697

Ensure that the scrolling thread always commits layer position changes to reduce scrolling stutters
https://bugs.webkit.org/show_bug.cgi?id=234213

Reviewed by Tim Horton.

On a page where CA commits on the main thread take a long time (e.g. because of expensive
painting), it's possible that the main thread has updated the scrolling layer position, and
then the scrolling thread detects that the commit is taking a long time and attempts to
trigger its own commit, but because the layer position property doesn't change, no commit
occurs.

Work around this by setting the layer position to 0,0 and back when we're on the scrolling
thread. Only do this if the scroll position changed since the last display refresh to avoid
triggering redundant commits.

Ideally we'd traverse the scrolling tree and do this for every scrolling node, but scrolling
trees can get large so for now just apply this to the root node.

  • page/scrolling/ScrollingTreeScrollingNode.cpp: (WebCore::ScrollingTreeScrollingNode::updateScrollPositionAtLastDisplayRefresh):
  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/ThreadedScrollingTree.cpp: (WebCore::ThreadedScrollingTree::displayDidRefreshOnScrollingThread): (WebCore::ThreadedScrollingTree::storeScrollPositionsAtLastDisplayRefresh):
  • page/scrolling/ThreadedScrollingTree.h:
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: (WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):

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

12:56 PM Changeset in webkit [286974] by Alan Coon
  • 6 edits in branches/safari-612-branch/Source

Cherry-pick r286858. rdar://problem/86423741

Use simpler idioms for std::less and std::greater possible in modern C++
https://bugs.webkit.org/show_bug.cgi?id=234117

Reviewed by Anders Carlsson.

Source/WebCore:

  • testing/InternalsMapLike.cpp: (WebCore::InternalsMapLike::inspectValues const): Remove unneeded explicit use of std:less, because this is what std::sort by default.

Source/WebKit:

  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::equalizeTailGaps): Removed unneeded template arguments for std::greater, and removed explicit use of std::less, since that's what std::sort does by default.

Source/WTF:

  • wtf/ListDump.h: (WTF::sortedListDump): Removed unnecessary template arguments to std::less.

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

12:56 PM Changeset in webkit [286973] by Alan Coon
  • 3 edits in branches/safari-612-branch/Source/WebKit

Cherry-pick r286900. rdar://problem/86344954

Momentum Event Dispatcher: Magic Mouse doesn't use momentum event dispatcher
https://bugs.webkit.org/show_bug.cgi?id=234189
<rdar://problem/86344954>

Reviewed by Simon Fraser.

  • Shared/mac/ScrollingAccelerationCurveMac.mm: (WebKit::fromIOHIDDevice): Fix the FIXME here about the additional fallback values; it turns out Magic Mouse is one device that does not have a value for kIOHIDScrollAccelerationTypeKey, so we need the full fallback chain to support it.
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::sendWheelEvent): Un-wrapping this optional results in losing the engaged state, and sending a garbage ScrollingAccelerationCurve across the wire. The message argument is also an optional, so just pass it along.

The result of this bug was that if you had ever used a device with a curve
for a given page, and then used a device with no curve, MomentumEventDispatcher
would have a garbage curve (from this message trying to "unset" the optional),
and a garbage curve results in chaotic scrolling.

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

12:38 PM Changeset in webkit [286972] by Antti Koivisto
  • 5 edits in trunk

[CSS Cascade Layers] Layers specified in import rules can not be reordered on media query evaluation
https://bugs.webkit.org/show_bug.cgi?id=234158

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-cascade/layer-media-query-expected.txt:

Source/WebCore:

  • style/RuleSetBuilder.cpp:

(WebCore::Style::RuleSetBuilder::addChildRules):
(WebCore::Style::RuleSetBuilder::addRulesFromSheetContents):

@import rules can introduce new layers so need to alse be considered for reordering by media queries
(which requires static evaluation).

(WebCore::Style::RuleSetBuilder::disallowDynamicMediaQueryEvaluationIfNeeded):

Factor into a function.

  • style/RuleSetBuilder.h:
12:29 PM Changeset in webkit [286971] by Chris Dumez
  • 6 edits in trunk/Source

Regression(r283565) Unable to report private messages as Spam in Twitter app
https://bugs.webkit.org/show_bug.cgi?id=234253
<rdar://86043227>

Reviewed by Alex Christensen.

Source/WebCore:

Add macro for new linkedOnOrAfter check for sending the Authorization header
on same origin redirects.

  • platform/cocoa/VersionChecks.h:

Source/WebKit:

In r283565, we aligned WebKit's behavior with the Fetch specification and with
Gecko / Blink by keeping the Authorization header on same origin redirects.

However, when reporting a private message in the twitter app, it does a
same-origin redirect from https://twitter.com/account/authenticate_web_view?...
to https://twitter.com/account/authenticate_web_view?... and the HTTP server
reponds with a 401/Unauthorized when we send the Authorization on the post-redirect
request. As far as I can tell, our behavior is correct here and I suspect this is an
issue with the twitter server. As a result, I am simply gating the new behavior
behind a linked-on-or-after check to give twitter a chance to address the issue on
their end.

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):

Source/WTF:

Add some new iOS / macOS versions.

  • wtf/spi/darwin/dyldSPI.h:
12:28 PM Changeset in webkit [286970] by youenn@apple.com
  • 5 edits
    2 adds in trunk

FetchResponse::clone should use the relevant realm for the cloned response
https://bugs.webkit.org/show_bug.cgi?id=234238

Reviewed by Alexey Shvayka.

Source/WebCore:

Reuse the relevant realm for cloning as per https://fetch.spec.whatwg.org/#dom-response-clone step 3.
If context is stopped, throw an InvalidStateError exception, like done in Chrome.

Test: http/wpt/fetch/clone-realm.html

  • Modules/fetch/FetchResponse.cpp:
  • Modules/fetch/FetchResponse.h:
  • Modules/fetch/FetchResponse.idl:

LayoutTests:

  • http/wpt/fetch/clone-realm-expected.txt: Added.
  • http/wpt/fetch/clone-realm.html: Added.
12:25 PM Changeset in webkit [286969] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

ExecutableAllocator: Do not store things in g_config when USE(SYSTEM_MALLOC).
https://bugs.webkit.org/show_bug.cgi?id=232165

Patch by waddlesplash <waddlesplash@gmail.com> on 2021-12-13
Reviewed by Yusuke Suzuki.

Following r281910 two additional slots were added
to g_config in order to store these pointers for use in bmalloc and Gigacage. However, when
USE(SYSTEM_MALLOC) is enabled, there are no slots reserved for Gigacage, and so this collided
with g_wtfConfig and overwrote data there instead.

This should fix crashes seen on Haiku, which enables USE(SYSTEM_MALLOC).

  • jit/ExecutableAllocator.cpp:

(JSC::initializeJITPageReservation):

12:21 PM Changeset in webkit [286968] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Simple RTL content does not need visual reordering
https://bugs.webkit.org/show_bug.cgi?id=234252

Reviewed by Antti Koivisto.

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::InlineItemsBuilder::build):
(WebCore::Layout::InlineItemsBuilder::breakAndComputeBidiLevels):

  • layout/formattingContexts/inline/InlineItemsBuilder.h:

(WebCore::Layout::InlineItemsBuilder::needsVisualReordering const):
(WebCore::Layout::InlineItemsBuilder::needsVisualReordeering const): Deleted.

12:19 PM Changeset in webkit [286967] by Russell Epstein
  • 1 copy in tags/Safari-613.1.11.4

Tag Safari-613.1.11.4.

12:19 PM Changeset in webkit [286966] by commit-queue@webkit.org
  • 4 edits in trunk/LayoutTests

[ macOS and iOS ] editing/deleting/forward-delete-crash.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=230047

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

Rewrite forward-delete-crash.html to avoid the timeouts on
macOS and iOS.

  • editing/deleting/forward-delete-crash.html:
  • platform/ipad/TestExpectations:
  • platform/mac/TestExpectations:
12:12 PM Changeset in webkit [286965] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Fix buggy assert in CoreAudioSharedUnit::setupAudioUnit
https://bugs.webkit.org/show_bug.cgi?id=234151

Reviewed by Eric Carlson.

Add the source as a client to the unit before reconfiguring the unit,
this makes the ASSERT(hasClients()) actually valid.
Manually tested.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:
11:59 AM Changeset in webkit [286964] by Kyle Piddington
  • 4 edits in trunk/Source/ThirdParty/ANGLE

[MacCatalyst] fix iOSMac after refactor in r286899
https://bugs.webkit.org/show_bug.cgi?id=234250

Reviewed by Dean Jackson.

Also includes a longer term fix for
https://bugs.webkit.org/show_bug.cgi?id=233977

Tested builds on mac, iOS, TV SDKs, plus iOSMac

  • src/common/platform.h:
  • src/libANGLE/renderer/metal/gen_mtl_format_table.py:

(gen_image_map_switch_string):

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

(rx::mtl::Format::init):

11:56 AM Changeset in webkit [286963] by Angelos Oikonomopoulos
  • 2 edits in trunk/Tools

[JSC] Unify default/noisy tests definition
https://bugs.webkit.org/show_bug.cgi?id=233926

Reviewed by Yusuke Suzuki.

Currently, changing a test to be noisy (i.e. using
defaultRunNoisyTest) results in only a subset of the tests being
run.

Instead of manually changing the noisy test test handler, this
patch makes the mode definitions table-driven. However, for
compatibility with the existing code, it uses the table to define
the ruby methods that the testcase definitions (@ comments,
yaml) and other callers in run-jsc-stress-tests (e.g. all
default*Run methods) expect.

Note that this slightly increases the number of tests executed (as
more test modes are enabled for the noisy tests).

This is an exploratory first step; other callers in
run-jsc-stress-tests could be simplified in the same way.

  • Scripts/run-jsc-stress-tests:
11:55 AM Changeset in webkit [286962] by Nikolas Zimmermann
  • 14 edits
    2 moves in trunk/Source/WebCore

[LBSE] Rename RenderSVGModelObject -> LegacyRenderSVGModelObject
https://bugs.webkit.org/show_bug.cgi?id=234235

Reviewed by Rob Buis.

RenderSVGModelObject will inherit from RenderLayerModelObject in LBSE,
therefore rename the current implementation to LegacyRenderSVGRoot and
adapt all callsites.

Covered by existing tests, no change in behaviour.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::isLayoutDependent):
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::computedFragmentedFlowState):

  • rendering/RenderObject.h:

(WebCore::RenderObject::isLegacyRenderSVGModelObject const):
(WebCore::RenderObject::isRenderOrLegacyRenderSVGModelObject const):

  • rendering/svg/LegacyRenderSVGModelObject.cpp: Renamed from Source/WebCore/rendering/svg/RenderSVGModelObject.cpp.

(WebCore::LegacyRenderSVGModelObject::LegacyRenderSVGModelObject):
(WebCore::LegacyRenderSVGModelObject::clippedOverflowRect const):
(WebCore::LegacyRenderSVGModelObject::computeFloatVisibleRectInContainer const):
(WebCore::LegacyRenderSVGModelObject::mapLocalToContainer const):
(WebCore::LegacyRenderSVGModelObject::pushMappingToContainer const):
(WebCore::LegacyRenderSVGModelObject::outlineBoundsForRepaint const):
(WebCore::LegacyRenderSVGModelObject::absoluteRects const):
(WebCore::LegacyRenderSVGModelObject::absoluteQuads const):
(WebCore::LegacyRenderSVGModelObject::willBeDestroyed):
(WebCore::LegacyRenderSVGModelObject::styleDidChange):
(WebCore::LegacyRenderSVGModelObject::nodeAtPoint):
(WebCore::LegacyRenderSVGModelObject::absoluteFocusRingQuads):
(WebCore::LegacyRenderSVGModelObject::checkIntersection):
(WebCore::LegacyRenderSVGModelObject::checkEnclosure):

  • rendering/svg/LegacyRenderSVGModelObject.h: Renamed from Source/WebCore/rendering/svg/RenderSVGModelObject.h.
  • rendering/svg/RenderSVGContainer.cpp:

(WebCore::RenderSVGContainer::RenderSVGContainer):
(WebCore::RenderSVGContainer::layout):

  • rendering/svg/RenderSVGContainer.h:
  • rendering/svg/RenderSVGImage.cpp:

(WebCore::RenderSVGImage::RenderSVGImage):
(WebCore::RenderSVGImage::willBeDestroyed):
(WebCore::RenderSVGImage::imageElement const):
(WebCore::RenderSVGImage::layout):

  • rendering/svg/RenderSVGImage.h:
  • rendering/svg/RenderSVGShape.cpp:

(WebCore::RenderSVGShape::RenderSVGShape):
(WebCore::RenderSVGShape::layout):

  • rendering/svg/RenderSVGShape.h:
  • rendering/svg/RenderSVGShapeInlines.h:

(WebCore::RenderSVGShape::graphicsElement const):

  • svg/SVGSVGElement.cpp:

(WebCore::checkIntersectionWithoutUpdatingLayout):
(WebCore::checkEnclosureWithoutUpdatingLayout):

11:52 AM Changeset in webkit [286961] by youenn@apple.com
  • 3 edits in trunk/Source/WebKit

REGRESSION (r286841): [ iOS ] Many webrtc tests flaky failing on iOS
https://bugs.webkit.org/show_bug.cgi?id=234181
<rdar://problem/86343642>

Reviewed by Eric Carlson.

Use network connection state change callback to know when connection fails or is cancelled.
Introduce ConnectionStateTracker to know when to stop reading new UDP packets.
ConnectionStateTracker will be stopped when state is changed to failed or cancelled as well as when the whole connection is closed.
Renaming m_nwConnections to m_connections as m_nwConnections name was already used.
Reduce error logging to only new error codes or when connectino enters unrecoverable failure (hence changing to failed state).

Covered by existing tests.

  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.h:
  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.mm:
11:46 AM Changeset in webkit [286960] by commit-queue@webkit.org
  • 2 edits in trunk/Source/ThirdParty/ANGLE

REGRESSION(Safari 15, BigSur): Poor video texture upload performance with MacBook M1, ANGLE OpenGL backend
https://bugs.webkit.org/show_bug.cgi?id=232235
<rdar://problem/84878815>
Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-12-13
Reviewed by Dean Jackson.

Remove validation for IOSurface element size when a IOSurface is bound
to a pbuffer. The IOSurfaceGetBytesPerElementOfPlane is not valid for some internal formats
that might be compressed.

Will add a WebKit level test in subsequent fix.
Will add an ANGLE level test during upstreaming of the patch.

Same as "Textures Fail to Render in WebGL from HLS Stream on iPhone 12 [iOS 14.2]"
but this time for CGL.
https://webkit.org/b/218637 rdar://problem/71102126

Remove incorrect validation that IOSurface pixel format matches
the pixel format of the texture image being specified.

The "Element" in IOSurface is a block of pixels, while the validation assumed
it means one pixel. The validation failed for a compressed format.

Currently we map non-public YUV formats, to which there is no elequent way
of implementing the validation.

  • src/libANGLE/renderer/gl/cgl/IOSurfaceSurfaceCGL.cpp:

(rx::IOSurfaceSurfaceCGL::validateAttributes):

11:10 AM Changeset in webkit [286959] by Alan Coon
  • 8 edits in branches/safari-612-branch/Source

Versioning.

WebKit-7612.4.4

10:35 AM Changeset in webkit [286958] by commit-queue@webkit.org
  • 33 edits in trunk

Deployment target for macOS 11+ does not follow minor version bumps
https://bugs.webkit.org/show_bug.cgi?id=233906

Patch by Elliott Williams <Elliott Williams> on 2021-12-13
Reviewed by Alexey Proskuryakov.
Source/bmalloc:

  • Configurations/DebugRelease.xcconfig:

Source/JavaScriptCore:

  • Configurations/DebugRelease.xcconfig:

Source/WebCore:

Changes the deployment target for macOS 11 and above to use the default SDK version, instead
of looking up a version using TARGET_MAC_OS_X_VERSION_MAJOR.

Prior to macOS 11, the deployment target did NOT change between minor versions (e.g.
"10.15" was the deployment target for all builds of 10.15.x). Now, minor releases may
change the deployment target, so we cannot rely solely on the MAC_OS_X_VERSION_MAJOR to
determine what deployment target to build for.

Since the deployment target may change within different versions of a major release,
TARGET_MAC_OS_X_VERSION_MAJOR is no longer useful for selecting a deployment target. It
should be considered read-only. To build for a non-default macOS version, set the
deployment target directly.

Reverts changes made in https://commits.webkit.org/230363@main, now that Xcode has been
fixed in rdar://problem/70185899.

  • Configurations/DebugRelease.xcconfig:
  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::variationAxes): Removes a defensive unguarded-availability pragma, now that the
underlying issue is fixed.

Source/WebGPU:

  • Configurations/DebugRelease.xcconfig:

Source/WebInspectorUI:

  • Configurations/DebugRelease.xcconfig:

Source/WebKit:

  • Configurations/DebugRelease.xcconfig:

Source/WTF:

  • Configurations/DebugRelease.xcconfig:
  • wtf/PlatformHave.h: Add feature define which has been public since macOS 11.0
10:32 AM Changeset in webkit [286957] by Alan Bujtas
  • 11 edits in trunk/Source/WebCore

[LFC][IFC] Display boxes have physical geometry.
https://bugs.webkit.org/show_bug.cgi?id=234248

Reviewed by Antti Koivisto.

logicalRect -> rect.

  • display/css/DisplayBoxFactory.cpp:

(WebCore::Display::BoxFactory::displayBoxForTextRun const):

  • layout/Verification.cpp:

(WebCore::Layout::checkForMatchingNonTextRuns):
(WebCore::Layout::checkForMatchingTextRuns):
(WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::processOverflownRunsForEllipsis):

  • layout/formattingContexts/inline/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeStaticPositionForOutOfFlowContent):

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

(WebCore::InlineDisplay::Box::rect const):
(WebCore::InlineDisplay::Box::top const):
(WebCore::InlineDisplay::Box::bottom const):
(WebCore::InlineDisplay::Box::left const):
(WebCore::InlineDisplay::Box::right const):
(WebCore::InlineDisplay::Box::width const):
(WebCore::InlineDisplay::Box::height const):
(WebCore::InlineDisplay::Box::moveVertically):
(WebCore::InlineDisplay::Box::moveHorizontally):
(WebCore::InlineDisplay::Box::setLeft):
(WebCore::InlineDisplay::Box::setRight):
(WebCore::InlineDisplay::Box::setRect):
(WebCore::InlineDisplay::Box::Box):
(WebCore::InlineDisplay::Box::truncate):
(WebCore::InlineDisplay::Box::logicalRect const): Deleted.
(WebCore::InlineDisplay::Box::logicalTop const): Deleted.
(WebCore::InlineDisplay::Box::logicalBottom const): Deleted.
(WebCore::InlineDisplay::Box::logicalLeft const): Deleted.
(WebCore::InlineDisplay::Box::logicalRight const): Deleted.
(WebCore::InlineDisplay::Box::logicalWidth const): Deleted.
(WebCore::InlineDisplay::Box::logicalHeight const): Deleted.
(WebCore::InlineDisplay::Box::setLogicalLeft): Deleted.
(WebCore::InlineDisplay::Box::setLogicalRight): Deleted.
(WebCore::InlineDisplay::Box::setLogicalRect): Deleted.

  • layout/integration/InlineIteratorBoxModernPath.h:

(WebCore::InlineIterator::BoxModernPath::rect const):

  • layout/integration/LayoutIntegrationBoxTree.cpp:

(WebCore::LayoutIntegration::showInlineContent):

  • layout/integration/LayoutIntegrationInlineContentBuilder.cpp:

(WebCore::LayoutIntegration::InlineContentBuilder::createDisplayLines const):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::firstInlineBoxRect const):
(WebCore::LayoutIntegration::LineLayout::collectInlineBoxRects const):
(WebCore::LayoutIntegration::LineLayout::hitTest):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::showInlineTreeAndRuns):

10:30 AM Changeset in webkit [286956] by Russell Epstein
  • 9 edits in branches/safari-613.1.11-branch/Source

Versioning.

WebKit-7613.1.11.4

10:23 AM Changeset in webkit [286955] by ntim@apple.com
  • 8 edits in trunk

Fix paint order of CSS text decorations
https://bugs.webkit.org/show_bug.cgi?id=227445

Reviewed by Simon Fraser.

Source/WebCore:

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::paintForegroundAndDecorations):
(WebCore::TextBoxPainter::createDecorationPainter):
(WebCore::TextBoxPainter::paintBackgroundDecorations):
(WebCore::TextBoxPainter::paintForegroundDecorations):
(WebCore::TextBoxPainter::paintDecoration): Deleted.

  • rendering/TextBoxPainter.h:
  • rendering/TextDecorationPainter.cpp:

(WebCore::TextDecorationPainter::paintBackgroundDecorations):
(WebCore::TextDecorationPainter::paintForegroundDecorations):
(WebCore::TextDecorationPainter::paintLineThrough):
(WebCore::TextDecorationPainter::paintTextDecoration): Deleted.

  • rendering/TextDecorationPainter.h:

LayoutTests:

10:13 AM Changeset in webkit [286954] by cathiechen
  • 1 edit
    2 adds in trunk/PerformanceTests

[Performance test] Add test lots-of-self-painting-layers.html
https://bugs.webkit.org/show_bug.cgi?id=233684

Reviewed by Rob Buis.

This test is a transform of the test [1] in blink. It uses position: relative to create
lots of self-painting layers. By changing the first layer's height, it tracks the repaint
performance of these self-painting layers.

[1] third_party/blink/perf_tests/layout/contain-content-style-change.html

  • Paint/lots-of-self-painting-layers.html: Added.
9:53 AM Changeset in webkit [286953] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix; add a convenience function to safely compare possibly null CFStringRefs.

  • platform/graphics/avfoundation/FormatDescriptionUtilities.cpp:

(WebCore::presentationSizeFromFormatDescription):
(WebCore::colorSpaceFromFormatDescription):

9:19 AM Changeset in webkit [286952] by svillar@igalia.com
  • 5 edits
    2 adds in trunk

[css-writing-modes] Use the correct margins in computeInlinePreferredLogicalWidths in orthogonal flows
https://bugs.webkit.org/show_bug.cgi?id=233562
<rdar://problem/86105904>

Reviewed by Rob Buis.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-writing-modes/inline-box-orthogonal-child-with-margins-expected.html: Added.
  • web-platform-tests/css/css-writing-modes/inline-box-orthogonal-child-with-margins.html: Added.

Source/WebCore:

In order to compute the preferred logical width of an inline element we must compute the preferred widths of
its children. More precisely we should compute the intrinsic size of the children in the inline direction of the
inline element. For parallel flows this means indeed computing the preferred logical width. Translated to
the margins, we should compute the margin-start and margin-end of each child.

However for orthogonal writing modes we should not use the margin-start & margin-end but margin-after and
margin-before. That's why in order to support orthogonal flows we should replace marginStart() usage by
marginStartUsing(parentStyle) (same for marginEnd).

Test: imported/w3c/web-platform-tests/css/css-writing-modes/inline-box-orthogonal-child-with-margins.html

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):

LayoutTests:

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

[LFC][IFC] Non-bidi content with RTL inline base direction may need visual reordering
https://bugs.webkit.org/show_bug.cgi?id=234242

Reviewed by Antti Koivisto.

This is in preparation for enabling content with RTL base direction.

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::InlineItemsBuilder::build):
(WebCore::Layout::InlineItemsBuilder::breakAndComputeBidiLevels):

  • layout/formattingContexts/inline/InlineItemsBuilder.h:

(WebCore::Layout::InlineItemsBuilder::needsVisualReordeering const):

8:59 AM Changeset in webkit [286950] by youenn@apple.com
  • 2 edits in trunk/Tools

Start websocket server for tests in http/tests that have websocket in their name
https://bugs.webkit.org/show_bug.cgi?id=234075

Reviewed by Jonathan Bedard.

Allows to run the websocket server for tests like LayoutTests/http/tests/workers/service/serviceworker-websocket.https.html.

  • Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy.py:
8:50 AM Changeset in webkit [286949] by Antti Koivisto
  • 7 edits in trunk

[CSS Cascade Layers] Unflake and fix web-platform-tests/css/css-cascade/layer-statement-before-import.html
https://bugs.webkit.org/show_bug.cgi?id=233944

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-cascade/layer-statement-before-import-expected.txt:
  • web-platform-tests/css/css-cascade/layer-statement-before-import.html:

Data URLs in @imports are not guaranteed to decode synchronously so make the test async.
Also catch exceptions from asserts for cleanup so failures don't affect other subtests.

Source/WebCore:

Inserting rules before early layer statements may be legal if they are moved to the regular rule list.

  • css/StyleSheetContents.cpp:

(WebCore::StyleSheetContents::wrapperInsertRule):

LayoutTests:

8:20 AM Changeset in webkit [286948] by Tyler Wilcock
  • 11 edits in trunk/LayoutTests

AX: Make aria-hidden-update.html, focusable-div.html, mac/invalid-status-for-input-types.html, and mac/css-speech-speak.html pass in --release isolated tree mode
https://bugs.webkit.org/show_bug.cgi?id=234198

Reviewed by Chris Fleizach.

Make the following tests async or otherwise isolated-tree friendly
(i.e. by using accessibleElementById instead of document.getElementById().focus() +
accessibilityController.focusedElement to get a JS reference to an AX object).

  • accessibility/aria-hidden-update-expected.txt:
  • accessibility/aria-hidden-update.html:
  • accessibility/focusable-div-expected.txt:
  • accessibility/focusable-div.html:
  • accessibility/mac/invalid-status-for-input-types-expected.txt:
  • accessibility/mac/invalid-status-for-input-types.html:

Make these tests async. These tests must be async to pass in isolated
tree mode because they use JS to dynamically change the page.

  • accessibility/mac/css-speech-speak-expected.txt:
  • accessibility/mac/css-speech-speak.html:

Use accessibleElementById instead of document.getElementById().focus() +
accessibilityController.focusedElement to get references to JS AX objects.

  • platform/glib/TestExpectations:
  • platform/win/TestExpectations:

Skip accessibility/focusable-div.html due to lack of
AccessibilityUIElement::domIdentifier implementation.

7:18 AM Changeset in webkit [286947] by jh718.park@samsung.com
  • 2 edits in trunk/Source/WebKit

Unreviewed. Fix build error since r286946.

ClientOrigin should be forward declared as struct, not class.

  • NetworkProcess/storage/SessionStorageManager.h:
5:42 AM Changeset in webkit [286946] by Adrian Perez de Castro
  • 7 edits in trunk/Source

Unreviewed build fix after r286936

Source/JavaScriptCore:

  • wasm/WasmOSREntryData.h: Replace wrong inclusion of wtf/Vector.h (unused) with the correct

wtf/FixedVector.h one.

  • wasm/WasmTierUpCount.h: Add missing WasmOSREntryData.h inclusion.

Source/WebKit:

No new tests needed.

  • NetworkProcess/storage/OriginStorageManager.cpp: Add missing inclusion of

MemoryStorageArea.h, which broke non-unified builds.

  • NetworkProcess/storage/SQLiteStorageArea.cpp: Add missing inclusion of Logging.h, broke

the build in some configurations.

  • NetworkProcess/storage/SessionStorageManager.h: Add missing inclusion of Connection.h, and

add missing forward declaration for WebCore::ClientOrigin, which broke the build for
non-Apple ports.

5:28 AM WebKitGTK/2.34.x edited by Adrian Perez de Castro
(diff)
2:49 AM Changeset in webkit [286945] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebCore

Fix non-unified builds after r286853

Unreviewed build fix.

No new tests needed.

  • loader/SubresourceIntegrity.h: Add missing <optional> header inclusion, forward-declare

EncodedResourceCryptographicDigest type.

2:41 AM Changeset in webkit [286944] by youenn@apple.com
  • 51 edits
    2 copies
    12 adds in trunk

Fix ServiceWorker downloads
https://bugs.webkit.org/show_bug.cgi?id=202142
<rdar://problem/55721934>

Reviewed by Alex Christensen.

Source/WebCore:

Add API to ask the fetch task to become a download.

Tests: http/tests/workers/service/service-worker-download-body.https.html

http/tests/workers/service/service-worker-download-stream.https.html
http/wpt/service-workers/fetch-service-worker-preload-download-through-direct-preload.https.html
http/wpt/service-workers/fetch-service-worker-preload-download.https.html

  • workers/service/context/ServiceWorkerFetch.h:
  • workers/service/context/ServiceWorkerThreadProxy.cpp:
  • workers/service/context/ServiceWorkerThreadProxy.h:

Source/WebKit:

Add ServiceWorkerDownloadTask class as a NetworkDataTask whose purpose is to download the content of a response given from service worker.
Add a way to convert ServiceWorkerFetchTask into downloads:

  • If a preload is ongoing and can be used for navigation, use this preload as the download NetworkLoad.
  • If a preload does not exist, create a ServiceWorkerDownloadTask and a corresponding NetworkLoad to start downloading the service worker response data.

When creating a ServiceWorkerDownloadTask, the WebServiceWorkerFetchTaskClient will be notified to start sending response data using ServiceWorkerDownloadTask
instead of ServiceWorkerFetchTask messages. This allows cancelling the ServiceWorkerFetchTask without any issue.

Note that the service worker lifetime is not augmented: if the service worker exits due to all its clients being closed, the download will fail.

Increase unified build files to 112.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • NetworkProcess/NetworkConnectionToWebProcess.cpp:
  • NetworkProcess/NetworkLoad.cpp:
  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/NetworkResourceLoader.cpp:
  • NetworkProcess/ServiceWorker/ServiceWorkerDownloadTask.cpp: Added.
  • NetworkProcess/ServiceWorker/ServiceWorkerDownloadTask.h: Added.
  • NetworkProcess/ServiceWorker/ServiceWorkerDownloadTask.messages.in: Added.
  • NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
  • NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:
  • NetworkProcess/ServiceWorker/ServiceWorkerNavigationPreloader.cpp:
  • NetworkProcess/ServiceWorker/ServiceWorkerNavigationPreloader.h:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
  • NetworkProcess/storage/NetworkStorageManager.cpp:
  • Scripts/generate-unified-sources.sh:
  • Scripts/webkit/messages.py:
  • Scripts/webkit/tests/TestWithCVPixelBufferMessageReceiver.cpp:

(WebKit::TestWithCVPixelBuffer::didReceiveMessage):

  • Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp:

(WebKit::TestWithIfMessage::didReceiveMessage):

  • Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp:

(WebKit::TestWithImageData::didReceiveMessage):

  • Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp:

(WebKit::TestWithLegacyReceiver::didReceiveTestWithLegacyReceiverMessage):

  • Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp:

(WebKit::TestWithSemaphore::didReceiveMessage):

  • Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp:

(WebKit::TestWithStreamBuffer::didReceiveMessage):

  • Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp:

(WebKit::TestWithStream::didReceiveStreamMessage):

  • Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp:

(WebKit::TestWithoutAttributes::didReceiveMessage):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::receivedPolicyDecision):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::download):
(WebKit::WebProcessPool::createDownloadProxy):

  • Sources.txt:
  • UnifiedSources-output.xcfilelist:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Storage/WebSWContextManagerConnection.cpp:
  • WebProcess/Storage/WebSWContextManagerConnection.h:
  • WebProcess/Storage/WebSWContextManagerConnection.messages.in:
  • WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
  • WebProcess/Storage/WebServiceWorkerFetchTaskClient.h:

Tools:

Add test runner API to log the total download size.
This helps ensuring that service worker loads are correctly downloaded and do not rely on networking.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:
  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:
  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

LayoutTests:

  • http/tests/workers/service/resources/service-worker-download-worker.js:
  • http/tests/workers/service/service-worker-download-body.https-expected.txt: Added.
  • http/tests/workers/service/service-worker-download-body.https.html: Added.
  • http/tests/workers/service/service-worker-download-stream.https-expected.txt: Added.
  • http/tests/workers/service/service-worker-download-stream.https.html: Added.
  • http/tests/workers/service/service-worker-download.https-expected.txt:
  • http/tests/workers/service/service-worker-download.https.html:
  • http/wpt/service-workers/fetch-service-worker-preload-download-through-direct-preload.https-expected.txt: Added.
  • http/wpt/service-workers/fetch-service-worker-preload-download-through-direct-preload.https.html: Added.
  • http/wpt/service-workers/fetch-service-worker-preload-download.https-expected.txt: Added.
  • http/wpt/service-workers/fetch-service-worker-preload-download.https.html: Added.
  • http/wpt/service-workers/fetch-service-worker-preload-worker.js:
  • http/wpt/service-workers/resources/fetch-service-worker-preload-script.py:
  • platform/ios/http/wpt/service-workers/fetch-service-worker-preload-download-through-direct-preload.https-expected.txt: Added.
  • platform/ios/http/wpt/service-workers/fetch-service-worker-preload-download.https-expected.txt: Added.
2:37 AM Changeset in webkit [286943] 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-13
Reviewed by Simon Fraser.

Source/WebCore:

Second try, previous was reverted due to a test failure.
See WebKit side for the description.

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.

Second try, previous was reverted due to a test failure.
The test failure happened due to RemoteLayerBackingStore
sending the same drawn backing store with different
properties but same image. The original patch tried
to use RemoteLayerBackingStore::m_bufferHandle also
on the send side to store the handle. This handle
was encoded multiple times. The underlying
ShareableBitmap::Handle IPC encoding destroys the
underlying mach send right even though the encoding
API signature would signify that the Handle stays
intact. ShareableBitmap, SharedMemory will be fixed in
future commits.

  • 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):

  • 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.

2:29 AM Changeset in webkit [286942] by Martin Robinson
  • 4 edits in trunk

transform-origin on SVG elements does not take into account the transform reference box origin
https://bugs.webkit.org/show_bug.cgi?id=234078

Reviewed by Rob Buis.

Source/WebCore:

No new tests. This is covered by existing WPT tests.

  • svg/SVGGraphicsElement.cpp:

(WebCore::SVGGraphicsElement::animatedLocalTransform const): Add the reference box origin
to the calculated reference box offset when calculating the transform origin for SVG.

LayoutTests:

1:24 AM Changeset in webkit [286941] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[RISCV64] Add MacroAssemblerRISCV64 implementations for trivial floating-point-register operations
https://bugs.webkit.org/show_bug.cgi?id=234223

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

Add implementations for the trivial floating-point register operations
in MacroAssemblerRISCV64. This covers moves, loads, stores, arithmetics,
basic conversion and truncation and the lightweight logical operations.

The two floating-point temporary registers needed in some operations are
listed. The rounding and comparison operations are left for later as
they require a more complex implementation due to the necessary manual
NaN checks.

  • assembler/MacroAssemblerRISCV64.h:

(JSC::MacroAssemblerRISCV64::swap):
(JSC::MacroAssemblerRISCV64::moveZeroToFloat):
(JSC::MacroAssemblerRISCV64::moveZeroToDouble):
(JSC::MacroAssemblerRISCV64::moveFloat):
(JSC::MacroAssemblerRISCV64::moveFloatTo32):
(JSC::MacroAssemblerRISCV64::move32ToFloat):
(JSC::MacroAssemblerRISCV64::moveDouble):
(JSC::MacroAssemblerRISCV64::moveDoubleTo64):
(JSC::MacroAssemblerRISCV64::move64ToDouble):
(JSC::MacroAssemblerRISCV64::loadFloat):
(JSC::MacroAssemblerRISCV64::loadDouble):
(JSC::MacroAssemblerRISCV64::storeFloat):
(JSC::MacroAssemblerRISCV64::storeDouble):
(JSC::MacroAssemblerRISCV64::addFloat):
(JSC::MacroAssemblerRISCV64::addDouble):
(JSC::MacroAssemblerRISCV64::subFloat):
(JSC::MacroAssemblerRISCV64::subDouble):
(JSC::MacroAssemblerRISCV64::mulFloat):
(JSC::MacroAssemblerRISCV64::mulDouble):
(JSC::MacroAssemblerRISCV64::divFloat):
(JSC::MacroAssemblerRISCV64::divDouble):
(JSC::MacroAssemblerRISCV64::sqrtFloat):
(JSC::MacroAssemblerRISCV64::sqrtDouble):
(JSC::MacroAssemblerRISCV64::absFloat):
(JSC::MacroAssemblerRISCV64::absDouble):
(JSC::MacroAssemblerRISCV64::andFloat):
(JSC::MacroAssemblerRISCV64::andDouble):
(JSC::MacroAssemblerRISCV64::orFloat):
(JSC::MacroAssemblerRISCV64::orDouble):
(JSC::MacroAssemblerRISCV64::negateFloat):
(JSC::MacroAssemblerRISCV64::negateDouble):
(JSC::MacroAssemblerRISCV64::convertInt32ToFloat):
(JSC::MacroAssemblerRISCV64::convertInt32ToDouble):
(JSC::MacroAssemblerRISCV64::convertInt64ToFloat):
(JSC::MacroAssemblerRISCV64::convertInt64ToDouble):
(JSC::MacroAssemblerRISCV64::convertUInt64ToFloat):
(JSC::MacroAssemblerRISCV64::convertUInt64ToDouble):
(JSC::MacroAssemblerRISCV64::convertFloatToDouble):
(JSC::MacroAssemblerRISCV64::convertDoubleToFloat):
(JSC::MacroAssemblerRISCV64::truncateFloatToInt32):
(JSC::MacroAssemblerRISCV64::truncateFloatToUint32):
(JSC::MacroAssemblerRISCV64::truncateFloatToInt64):
(JSC::MacroAssemblerRISCV64::truncateFloatToUint64):
(JSC::MacroAssemblerRISCV64::truncateDoubleToInt32):
(JSC::MacroAssemblerRISCV64::truncateDoubleToUint32):
(JSC::MacroAssemblerRISCV64::truncateDoubleToInt64):
(JSC::MacroAssemblerRISCV64::truncateDoubleToUint64):

1:20 AM WebKitGTK/2.34.x edited by Adrian Perez de Castro
(diff)
1:18 AM Changeset in webkit [286940] by youenn@apple.com
  • 6 edits in trunk

Implement step 17 of main fetch algorithm
https://bugs.webkit.org/show_bug.cgi?id=234140

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • web-platform-tests/service-workers/service-worker/fetch-csp.https.html:
  • web-platform-tests/service-workers/service-worker/resources/fetch-csp-iframe.html.sub.headers:

Source/WebCore:

The step was implemented for non DocumentThreadableLoader resources, we need to also do the same step within DocumentThreadableLoader.

Covered by existing updated tests.

  • loader/DocumentThreadableLoader.cpp:
  • loader/DocumentThreadableLoader.h:
1:09 AM Changeset in webkit [286939] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Rename startCallback to resetCallback in AudioMediaStreamTrackRendererUnit createInternalUnit
https://bugs.webkit.org/show_bug.cgi?id=234142

Reviewed by Eric Carlson.

No change of behavior, just a renaming.

  • platform/mediastream/cocoa/AudioMediaStreamTrackRendererUnit.cpp:
12:50 AM Changeset in webkit [286938] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.34/Source/WebKit

Merge r286800 - [WPE] Crash under WebProcessProxy::setIsInProcessCache when closing web view in debug builds
https://bugs.webkit.org/show_bug.cgi?id=233933

Reviewed by Geoffrey Garen.

The crash would occur because the WebProcessPool destructor would call WebProcessCache::clear()
which would destroy WebProcessCache::CachedProcess objects, causing
WebProcessProxy::setIsInProcessCache(false) to get called. Previously, this call to
setIsInProcessCache() would convert the WeakPtr the WebProcessProxy held to its process pool
into a RefPtr, thus causing the WebProcessPool to get ref'd while in the middle of destruction.

To address the issue, the setIsInProcessCache() setter now takes a WillShutDown flag that gets
set in the CachedProcess destructor and which causes setIsInProcessCache() to return early
right after setting the m_isInProcessCache flag, without trying to send IPC to the WebProcess
or trying to ref the WebProcessPool.

  • UIProcess/WebProcessCache.cpp:

(WebKit::WebProcessCache::CachedProcess::~CachedProcess):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::setIsInProcessCache):

  • UIProcess/WebProcessProxy.h:
12:30 AM Changeset in webkit [286937] by Jean-Yves Avenard
  • 261 edits in trunk

Distinguish contiguous SharedBuffer from non-contiguous one and guarantee immutability
https://bugs.webkit.org/show_bug.cgi?id=233030
rdar://85333814

Reviewed by Darin Adler.

Source/WebCore:

When calling SharedBuffer::data() the underlying data was flattened,
and so could be mutated while being shared. This was an undesirable
behaviour.
We introduce ContiguousSharedBuffer which guarantee that its content is made
of contiguous data.
All methods that would have mutated a SharedBuffer when being flattened are
moved to ContiguousSharedBuffer.

Area where SharedBuffers were always created with a single segment where
converted to a ContiguousSharedBuffer.
Previously, a SharedBuffer would have been flattened only if it needed to be
and only when the data was going to be accessed; following this change
the conversion is now explictly done through a call to makeContiguous.
This conversion is a no-op if the SharedBuffer being converted was already
a ContiguousSharedBuffer.
With the nature of a SharedBuffer being shared by potentially multiple
users it was necessary to limit the number of conversions being performed
on demand to avoid redundancy.
When the flattening could have occured, the SharedBuffer creation points were
traced back and identified to make the buffer contiguous then.
In the end, there's no more SharedBuffer flattening operations than there
would have been before this change.
There's a potential increase of temporary memory usage with the
ScriptBufferSourceProvider class; bug 233511 is tracking it.

While the change is extensive, code coverage of the modified areas is thorough
which makes undetected regressions unlikely.

In bug 233442, a SharedBuffer will be made completely immutable once created.

No observable change.
Covered by all existing tests. New API tests creatded.

  • Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:

(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::sanitizeDataIfNeeded):

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

(WebCore::ClipboardImageReader::readBuffer):

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

(WebCore::ClipboardImageReader::readBuffer):

  • Modules/cache/CacheStorageConnection.cpp:

(WebCore::CacheStorageConnection::computeRealBodySize):

  • Modules/cache/DOMCache.cpp:

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

  • Modules/cache/DOMCache.h:
  • Modules/cache/DOMCacheEngine.cpp:

(WebCore::DOMCacheEngine::isolatedResponseBody):
(WebCore::DOMCacheEngine::copyResponseBody):

  • Modules/cache/DOMCacheEngine.h:
  • Modules/encryptedmedia/InitDataRegistry.cpp:

(WebCore::extractKeyIDsKeyids):
(WebCore::sanitizeKeyids):

  • Modules/encryptedmedia/MediaKeyStatusMap.cpp:

(WebCore::keyIdsMatch):
(WebCore::MediaKeyStatusMap::Iterator::next):

  • Modules/fetch/FetchBody.cpp:

(WebCore::FetchBody::consumeFormData):
(WebCore::FetchBody::bodyAsFormData const):
(WebCore::FetchBody::take):

  • Modules/fetch/FetchBody.h:
  • Modules/fetch/FetchBodyConsumer.cpp:

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

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::BodyLoader::consumeDataByChunk):
(WebCore::FetchResponse::setBodyData):

  • Modules/fetch/FetchResponse.h:
  • Modules/highlight/AppHighlight.h:

(WebCore::AppHighlight::encode const):

  • Modules/highlight/AppHighlightRangeData.cpp:

(WebCore::AppHighlightRangeData::create):

  • Modules/indexeddb/server/IDBSerialization.cpp:

(WebCore::serializeIDBKeyPath):
(WebCore::serializeIDBKeyData):

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

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

  • Modules/indexeddb/server/SQLiteIDBCursor.cpp:

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

  • Modules/mediastream/RTCDataChannelRemoteHandler.cpp:

(WebCore::RTCDataChannelRemoteHandler::readyToSend):

  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp:

(WebCore::LibWebRTCDataChannelHandler::setClient):

  • Modules/model-element/HTMLModelElement.cpp:

(WebCore::HTMLModelElement::notifyFinished):

  • Modules/model-element/scenekit/SceneKitModelLoaderUSD.mm:

(WebCore::writeToTemporaryFile):

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::handleResponseOnStreamingAction):

  • bindings/js/ScriptBufferSourceProvider.h:
  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::load):

  • css/CSSFontFaceSource.h:
  • editing/Editor.cpp:

(WebCore::Editor::promisedAttachmentInfo):

  • editing/Editor.h:
  • editing/SerializedAttachmentData.h:
  • editing/cocoa/EditorCocoa.mm:

(WebCore::archivedDataForAttributedString):
(WebCore::Editor::getPasteboardTypesAndDataForAttachment):
(WebCore::Editor::selectionInWebArchiveFormat):
(WebCore::Editor::dataInRTFDFormat):
(WebCore::Editor::dataInRTFFormat):

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::_addAttachmentForElement):
(fileWrapperForURL):
(fileWrapperForElement):

  • editing/cocoa/WebContentReaderCocoa.mm:

(WebCore::replaceRichContentWithAttachments):
(WebCore::extractMarkupAndArchive):
(WebCore::sanitizeMarkupWithArchive):
(WebCore::WebContentReader::readRTFD):
(WebCore::WebContentMarkupReader::readRTFD):
(WebCore::WebContentReader::readRTF):
(WebCore::WebContentMarkupReader::readRTF):

  • editing/mac/EditorMac.mm:

(WebCore::Editor::imageInWebArchiveFormat):
(WebCore::Editor::dataSelectionForPasteboard):

  • html/FTPDirectoryDocument.cpp:

(WebCore::createTemplateDocumentData):
(WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):

  • inspector/NetworkResourcesData.cpp:

(WebCore::NetworkResourcesData::ResourceData::decodeDataToContent):

  • inspector/agents/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::cachedResourceContent):

  • inspector/agents/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::mainResourceContent):
(WebCore::InspectorPageAgent::sharedBufferContent):

  • loader/ContentFilter.cpp:

(WebCore::ContentFilter::deliverResourceData):

  • loader/CrossOriginPreflightChecker.cpp:

(WebCore::CrossOriginPreflightChecker::doPreflight):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::maybeCreateArchive):
(WebCore::DocumentLoader::parsedArchiveData const):
(WebCore::DocumentLoader::maybeFinishLoadingMultipartContent):

  • loader/DocumentLoader.h:
  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::loadRequest):

  • loader/EmptyClients.cpp:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadResourceSynchronously):

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

(WebCore::ResourceLoader::didReceiveDataOrBuffer):

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didReceiveDataOrBuffer):

  • loader/appcache/ApplicationCacheGroup.cpp:

(WebCore::ApplicationCacheGroup::didFinishLoadingManifest):

  • loader/appcache/ApplicationCacheHost.cpp:

(WebCore::bufferFromResource):
(WebCore::ApplicationCacheHost::maybeLoadSynchronously):
(WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):

  • loader/appcache/ApplicationCacheHost.h:
  • loader/appcache/ApplicationCacheResource.cpp:

(WebCore::ApplicationCacheResource::deliver):

  • loader/appcache/ApplicationCacheStorage.cpp:

(WebCore::ApplicationCacheStorage::store):
(WebCore::ApplicationCacheStorage::loadCache):

  • loader/archive/cf/LegacyWebArchive.cpp:

(WebCore::LegacyWebArchive::createPropertyListRepresentation):
(WebCore::LegacyWebArchive::createResource):
(WebCore::LegacyWebArchive::create):
(WebCore::LegacyWebArchive::extract):
(WebCore::LegacyWebArchive::createFromSelection):

  • loader/archive/mhtml/MHTMLParser.cpp:

(WebCore::MHTMLParser::parseNextPart):

  • loader/cache/CachedApplicationManifest.cpp:

(WebCore::CachedApplicationManifest::finishLoading):

  • loader/cache/CachedCSSStyleSheet.cpp:

(WebCore::CachedCSSStyleSheet::sheetText const):
(WebCore::CachedCSSStyleSheet::finishLoading):

  • loader/cache/CachedFont.cpp:

(WebCore::CachedFont::finishLoading):
(WebCore::CachedFont::ensureCustomFontData):
(WebCore::CachedFont::createCustomFontData):
(WebCore::CachedFont::checkNotify):

  • loader/cache/CachedFont.h:
  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::updateBufferInternal):
(WebCore::CachedImage::convertedDataIfNeeded const):

  • loader/cache/CachedImage.h:
  • loader/cache/CachedRawResource.cpp:

(WebCore::CachedRawResource::updateBuffer):
(WebCore::CachedRawResource::finishLoading):

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::tryReplaceEncodedData):

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::resourceBuffer const):

  • loader/cache/CachedSVGDocument.cpp:

(WebCore::CachedSVGDocument::finishLoading):

  • loader/cache/CachedSVGFont.cpp:

(WebCore::CachedSVGFont::ensureCustomFontData):

  • loader/cache/CachedSVGFont.h:
  • loader/cache/CachedScript.cpp:

(WebCore::CachedScript::finishLoading):

  • loader/cache/CachedTextTrack.cpp:

(WebCore::CachedTextTrack::doUpdateBuffer):

  • loader/cache/CachedXSLStyleSheet.cpp:

(WebCore::CachedXSLStyleSheet::finishLoading):

  • loader/cocoa/DiskCacheMonitorCocoa.h:
  • loader/cocoa/DiskCacheMonitorCocoa.mm:

(WebCore::DiskCacheMonitor::tryGetFileBackedSharedBufferFromCFURLCachedResponse):
(WebCore::DiskCacheMonitor::resourceBecameFileBacked):

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

(WebCore::Page::userStyleSheet const):

  • page/PageSerializer.cpp:

(WebCore::PageSerializer::serializeFrame):
(WebCore::PageSerializer::serializeCSSStyleSheet):
(WebCore::PageSerializer::addImageToResources):

  • page/PageSerializer.h:
  • page/ShareData.h:
  • page/ShareDataReader.cpp:

(WebCore::ShareDataReader::ShareDataReader):
(WebCore::ShareDataReader::didFinishLoading):

  • platform/KeyedCoding.h:
  • platform/Pasteboard.h:
  • platform/PasteboardCustomData.cpp:

(WebCore::PasteboardCustomData::createSharedBuffer const):
(WebCore::PasteboardCustomData::fromSharedBuffer):

  • platform/PasteboardCustomData.h:
  • platform/PasteboardStrategy.h:
  • platform/PasteboardWriterData.h:
  • platform/PlatformPasteboard.h:
  • platform/PromisedAttachmentInfo.h:
  • platform/SharedBuffer.cpp:

(WebCore::SharedBuffer::SharedBuffer):
(WebCore::SharedBuffer::makeContiguous const):
(WebCore::SharedBuffer::size const):
(WebCore::SharedBuffer::isEmpty const):
(WebCore::SharedBuffer::isContiguous const):
(WebCore::SharedBuffer::append):
(WebCore::SharedBuffer::copy const):
(WebCore::SharedBuffer::hasOneSegment const):
(WebCore::ContiguousSharedBuffer::ContiguousSharedBuffer):
(WebCore::ContiguousSharedBuffer::createWithContentsOfFile):
(WebCore::ContiguousSharedBuffer::data const):
(WebCore::ContiguousSharedBuffer::dataAsCharPtr const):
(WebCore::DataSegment::data const):
(WebCore::DataSegment::containsMappedFileData const):
(WebCore::ContiguousSharedBuffer::decoder const):
(WebCore::DataSegment::size const):
(WebCore::SharedBufferDataView::SharedBufferDataView):
(WebCore::SharedBufferDataView::dataAsCharPtr const):
(WebCore::SharedBufferDataView::createSharedBuffer const):
(WebCore::utf8Buffer):

  • platform/SharedBuffer.h:

(WebCore::DataSegment::create):
(WebCore::DataSegment::DataSegment):
(WebCore::SharedBuffer::create):
(WebCore::ContiguousSharedBuffer::create):

  • platform/audio/cocoa/MediaSessionManagerCocoa.mm:

(WebCore::MediaSessionManagerCocoa::setNowPlayingInfo):

  • platform/cf/KeyedEncoderCF.cpp:

(WebCore::KeyedEncoderCF::finishEncoding):

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

(WebCore::ContiguousSharedBuffer::createCFData const):
(WebCore::SharedBuffer::append):

  • platform/cocoa/PasteboardCocoa.mm:

(WebCore::convertTIFFToPNG):
(WebCore::Pasteboard::readBufferForTypeWithSecurityCheck):

  • platform/cocoa/SharedBufferCocoa.mm:

(-[WebCoreSharedBufferData initWithDataSegment:position:size:]):
(WebCore::ContiguousSharedBuffer::createNSData const):
(WebCore::ContiguousSharedBuffer::createCFData const):
(WebCore::ContiguousSharedBuffer::createFromReadingFile):
(WebCore::DataSegment::createNSData const):

  • platform/encryptedmedia/CDMUtilities.cpp:

(WebCore::CDMUtilities::parseJSONObject):

  • platform/encryptedmedia/clearkey/CDMClearKey.cpp:

(WebCore::extractKeyidsLocationFromCencInitData):
(WebCore::extractKeyidsFromCencInitData):
(WebCore::extractKeyIdFromWebMInitData):

  • platform/generic/KeyedEncoderGeneric.cpp:

(WebCore::KeyedEncoderGeneric::finishEncoding):

  • platform/generic/KeyedEncoderGeneric.h:
  • platform/glib/KeyedEncoderGlib.cpp:

(WebCore::KeyedEncoderGlib::finishEncoding):

  • platform/glib/KeyedEncoderGlib.h:
  • platform/glib/SharedBufferGlib.cpp:

(WebCore::ContiguousSharedBuffer::createGBytes const):
(WebCore::ContiguousSharedBuffer::createFromReadingFile):

  • platform/graphics/Font.cpp:

(WebCore::Font::create):

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

(WebCore::Model::create):
(WebCore::Model::Model):

  • platform/graphics/Model.h:

(WebCore::Model::encode const):
(WebCore::Model::decode):

  • platform/graphics/WOFFFileFormat.cpp:

(WebCore::readUInt32):
(WebCore::readUInt16):
(WebCore::isWOFF):
(WebCore::convertWOFFToSfnt):
(WebCore::convertWOFFToSfntIfNecessary):

  • platform/graphics/WOFFFileFormat.h:
  • platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:

(WebCore::extractSinfData):

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

(WebCore::parseJSONValue):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::requestLicense):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::loadSession):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRequest):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRequests):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRenewingRequest):

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

(WebCore::ImageDecoderAVFObjC::ImageDecoderAVFObjC):
(WebCore::ImageDecoderAVFObjC::setData):

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

(WebCore::SourceBufferParserAVFObjC::appendData):

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

(WebCore::PlatformResourceMediaLoader::dataReceived):
(WebCore::DataURLResourceMediaLoader::DataURLResourceMediaLoader):

  • platform/graphics/cairo/FontCustomPlatformData.h:
  • platform/graphics/cg/ImageDecoderCG.cpp:

(WebCore::sharedBufferGetBytesAtPosition):
(WebCore::ImageDecoderCG::ImageDecoderCG):
(WebCore::ImageDecoderCG::setData):

  • platform/graphics/cg/PDFDocumentImage.cpp:

(WebCore::PDFDocumentImage::createPDFDocument):

  • platform/graphics/cocoa/FontPlatformDataCocoa.mm:

(WebCore::FontPlatformData::platformOpenTypeTable const):

  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:
  • platform/graphics/coretext/FontPlatformDataCoreText.cpp:

(WebCore::FontPlatformData::openTypeTable const):

  • platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:

(WebCore::createFontCustomPlatformData):

  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:

(WebCore::FontPlatformData::openTypeTable const):

  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::GstMappedOwnedBuffer::createSharedBuffer):

  • platform/graphics/gstreamer/GStreamerCommon.h:
  • platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:

(WebCore::ImageDecoderGStreamer::pushEncodedData):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::initializationDataEncountered):

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

(WebCore::markupText):
(WebCore::InitData::extractCencIfNeeded):

  • platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h:

(WebCore::InitData::InitData):

  • platform/graphics/mac/FontCustomPlatformData.cpp:

(WebCore::createFontCustomPlatformData):

  • platform/graphics/mac/FontCustomPlatformData.h:
  • platform/graphics/mac/PDFDocumentImageMac.mm:

(WebCore::PDFDocumentImage::createPDFDocument):

  • platform/graphics/opentype/OpenTypeMathData.cpp:

(WebCore::OpenType::MathItalicsCorrectionInfo::getItalicCorrection const):
(WebCore::OpenType::MathGlyphInfo::mathItalicsCorrectionInfo const):
(WebCore::OpenType::GlyphAssembly::getAssemblyParts const):
(WebCore::OpenType::MathGlyphConstruction::getSizeVariants const):
(WebCore::OpenType::MathGlyphConstruction::getAssemblyParts const):
(WebCore::OpenType::MathVariants::mathGlyphConstruction const):
(WebCore::OpenType::MATHTable::mathConstants const):
(WebCore::OpenType::MATHTable::mathGlyphInfo const):
(WebCore::OpenType::MATHTable::mathVariants const):

  • platform/graphics/opentype/OpenTypeMathData.h:
  • platform/graphics/opentype/OpenTypeTypes.h:

(WebCore::OpenType::validateTable):
(WebCore::OpenType::TableBase::isValidEnd):
(WebCore::OpenType::TableBase::validatePtr):
(WebCore::OpenType::TableBase::validateOffset const):
(WebCore::OpenType::TableWithCoverage::getCoverageIndex const):

  • platform/graphics/opentype/OpenTypeUtilities.cpp:

(WebCore::renameFont):
(WebCore::renameAndActivateFont):

  • platform/graphics/opentype/OpenTypeUtilities.h:
  • platform/graphics/opentype/OpenTypeVerticalData.cpp:

(WebCore::OpenType::SubstitutionSubTable::coverage const):
(WebCore::OpenType::LookupTable::getSubstitutions const):
(WebCore::OpenType::LookupList::lookup const):
(WebCore::OpenType::FeatureTable::getGlyphSubstitutions const):
(WebCore::OpenType::FeatureList::feature const):
(WebCore::OpenType::FeatureList::findFeature const):
(WebCore::OpenType::LangSysTable::feature const):
(WebCore::OpenType::ScriptTable::defaultLangSys const):
(WebCore::OpenType::ScriptList::script const):
(WebCore::OpenType::ScriptList::defaultScript const):
(WebCore::OpenType::ScriptList::defaultLangSys const):
(WebCore::OpenType::GSUBTable::scriptList const):
(WebCore::OpenType::GSUBTable::featureList const):
(WebCore::OpenType::GSUBTable::lookupList const):
(WebCore::OpenType::GSUBTable::defaultLangSys const):
(WebCore::OpenType::GSUBTable::feature const):
(WebCore::OpenType::GSUBTable::getVerticalGlyphSubstitutions const):
(WebCore::loadHmtxTable):
(WebCore::OpenTypeVerticalData::loadMetrics):
(WebCore::OpenTypeVerticalData::loadVerticalGlyphSubstitutions):

  • platform/graphics/win/FontCustomPlatformData.cpp:

(WebCore::createFontCustomPlatformData):

  • platform/graphics/win/FontCustomPlatformData.h:
  • platform/graphics/win/FontCustomPlatformDataCairo.cpp:

(WebCore::createFontCustomPlatformData):

  • platform/graphics/win/FontPlatformDataCairoWin.cpp:

(WebCore::FontPlatformData::openTypeTable const):

  • platform/graphics/win/FontPlatformDataWin.cpp:

(WebCore::FontPlatformData::platformOpenTypeTable const):

  • platform/gtk/SelectionData.h:

(WebCore::SelectionData::setCustomData):
(WebCore::SelectionData::customData const):

  • platform/image-decoders/ScalableImageDecoder.h:
  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:

(WebCore::readICCProfile):
(WebCore::JPEGImageDecoder::setICCProfile):

  • platform/image-decoders/jpeg/JPEGImageDecoder.h:
  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::bufferForType):
(WebCore::PlatformPasteboard::write):
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
(WebCore::createItemProviderRegistrationList):
(WebCore::PlatformPasteboard::readBuffer const):

  • platform/mac/PasteboardMac.mm:

(WebCore::fileWrapper):
(WebCore::readBufferAtPreferredItemIndex):
(WebCore::Pasteboard::read):

  • platform/mac/PasteboardWriter.mm:

(WebCore::createPasteboardWriter):

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::PlatformPasteboard::bufferForType):
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
(WebCore::PlatformPasteboard::write):
(WebCore::PlatformPasteboard::setBufferForType):
(WebCore::PlatformPasteboard::readBuffer const):
(WebCore::createPasteboardItem):

  • platform/network/FormData.cpp:

(WebCore::FormData::asSharedBuffer const):

  • platform/network/FormData.h:
  • platform/network/ResourceHandleClient.cpp:

(WebCore::ResourceHandleClient::didReceiveBuffer):

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(-[WebCoreNSURLSessionDataTask resource:receivedData:]):

  • platform/network/curl/CurlMultipartHandle.cpp:

(WebCore::CurlMultipartHandle::didReceiveData):
(WebCore::CurlMultipartHandle::didComplete):
(WebCore::CurlMultipartHandle::processContent):

  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::writeDataToDownloadFileIfEnabled):

  • platform/network/curl/CurlResourceHandleDelegate.cpp:

(WebCore::CurlResourceHandleDelegate::curlDidReceiveBuffer):

  • platform/win/PasteboardWin.cpp:

(WebCore::createGlobalImageFileContent):
(WebCore::createGlobalHDropContent):

  • platform/win/SharedBufferWin.cpp:

(WebCore::ContiguousSharedBuffer::createFromReadingFile):

  • testing/MockCDMFactory.cpp:

(WebCore::MockCDM::sanitizeResponse const):
(WebCore::MockCDMInstance::setServerCertificate):
(WebCore::MockCDMInstanceSession::updateLicense):

  • workers/WorkerFontLoadRequest.cpp:

(WebCore::WorkerFontLoadRequest::ensureCustomFontData):

  • workers/service/context/ServiceWorkerFetch.cpp:

(WebCore::ServiceWorkerFetch::processResponse):

  • workers/service/server/SWScriptStorage.cpp:

(WebCore::SWScriptStorage::retrieve):

  • xml/XSLTProcessorLibxslt.cpp:

(WebCore::docLoaderFunc):

  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::openFunc):

Source/WebKit:

  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:

(WebKit::RemoteMediaRecorder::fetchData):

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::sendReplyToSynchronousRequest):

  • NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp:

(WebKit::ServiceWorkerSoftUpdateLoader::didReceiveBuffer):

  • NetworkProcess/cache/CacheStorageEngineCache.cpp:

(WebKit::CacheStorage::Cache::encode):
(WebKit::CacheStorage::Cache::decode):

  • NetworkProcess/cache/NetworkCacheEntry.cpp:

(WebKit::NetworkCache::Entry::encodeAsStorageRecord const):

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::didReadDataURL):

  • Platform/IPC/SharedBufferCopy.cpp:

(IPC::SharedBufferCopy::decode):

  • Platform/IPC/SharedBufferCopy.h:

(IPC::SharedBufferCopy::SharedBufferCopy):
(IPC::SharedBufferCopy::buffer):
(IPC::SharedBufferCopy::buffer const):

  • Platform/SharedMemory.cpp:

(WebKit::SharedMemory::createSharedBuffer const):

  • Platform/SharedMemory.h:
  • Shared/APIWebArchiveResource.mm:

(API::WebArchiveResource::data):

  • Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:

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

  • Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.cpp:

(WebKit::CGDisplayListImageBufferBackend::createImageBufferBackendHandle const):

  • Shared/ShareableResource.cpp:

(WebKit::ShareableResource::wrapInSharedBuffer):
(WebKit::ShareableResource::Handle::tryWrapInSharedBuffer const):

  • Shared/ShareableResource.h:
  • Shared/WebCoreArgumentCoders.cpp:

(IPC::decodeSharedBuffer):
(IPC::encodeTypesAndData):
(IPC::decodeTypesAndData):
(IPC::ArgumentCoder<DOMCacheEngine::Record>::encode):
(IPC::ArgumentCoder<DOMCacheEngine::Record>::decode):
(IPC::ArgumentCoder<PasteboardCustomData::Entry>::decode):
(IPC::ArgumentCoder<WebCore::SerializedAttachmentData>::decode):
(IPC::ArgumentCoder<RefPtr<WebCore::SharedBuffer>>::decode):
(IPC::ArgumentCoder<Ref<WebCore::SharedBuffer>>::decode):
(IPC::ArgumentCoder<RefPtr<WebCore::ContiguousSharedBuffer>>::encode):
(IPC::ArgumentCoder<RefPtr<WebCore::ContiguousSharedBuffer>>::decode):
(IPC::ArgumentCoder<Ref<WebCore::ContiguousSharedBuffer>>::encode):
(IPC::ArgumentCoder<Ref<WebCore::ContiguousSharedBuffer>>::decode):
(IPC::ArgumentCoder<WebCore::ScriptBuffer>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • Shared/gtk/ArgumentCodersGtk.cpp:

(IPC::ArgumentCoder<SelectionData>::decode):

  • Shared/win/WebCoreArgumentCodersWin.cpp:

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

  • UIProcess/API/APIAttachment.cpp:

(API::Attachment::createSerializedRepresentation const):
(API::Attachment::updateFromSerializedRepresentation):

  • UIProcess/API/APIAttachment.h:
  • UIProcess/API/APIContentRuleListStore.cpp:

(API::getData):

  • UIProcess/API/Cocoa/APIAttachmentCocoa.mm:

(API::Attachment::createSerializedRepresentation const):
(API::Attachment::updateFromSerializedRepresentation):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _storeAppHighlight:]):

  • UIProcess/API/gtk/DropTargetGtk3.cpp:

(WebKit::DropTarget::dataReceived):

  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::NavigationClient::didFinishLoadForQuickLookDocumentInMainFrame):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::writeSelectionToPasteboard):
(WebKit::WebViewImpl::setPromisedDataForImage):
(WebKit::WebViewImpl::provideDataForPasteboard):
(WebKit::WebViewImpl::namesOfPromisedFilesDroppedAtDestination):
(WebKit::WebViewImpl::requestDOMPasteAccess):

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

(WebKit::WebURLSchemeTask::didComplete):

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

(WebKit::PageClientImpl::saveImageToLibrary):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView canPerformActionForWebView:withSender:]):
(allPasteboardItemOriginsMatchOrigin):
(-[WKContentView actionSheetAssistant:shareElementWithImage:rect:]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::dataSelectionForPasteboard):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::dataSelectionForPasteboard):

  • WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h:

(API::InjectedBundle::EditorClient::getPasteboardDataForRange):

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]):

  • WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:

(WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange):

  • WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
  • WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:

(WebKit::releaseSharedBuffer):
(WebKit::InjectedBundlePageLoaderClient::willLoadDataRequest):

  • WebProcess/Model/mac/ARKitInlinePreviewModelPlayerMac.mm:

(WebKit::ARKitInlinePreviewModelPlayerMac::createFile):

  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::didCacheResource):

  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::didReceiveData):

  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::getClientPasteboardData):

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

(WebKit::WebFrameLoaderClient::finishedLoading):

  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::bufferForType):
(WebKit::WebPlatformStrategies::readBufferFromClipboard):
(WebKit::WebPlatformStrategies::readBufferFromPasteboard):

  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:
  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

(WebKit::WebDragClient::declareAndWriteDragImage):

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::source const):

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::getDataSelectionForPasteboard):

  • WebProcess/cocoa/VideoFullscreenManager.mm:

(WebKit::VideoFullscreenManager::supportsVideoFullscreen const):
(WebKit::VideoFullscreenManager::supportsVideoFullscreenStandby const):

Source/WebKitLegacy/mac:

  • DOM/DOMUIKitExtensions.mm:

(-[DOMHTMLImageElement dataRepresentation:]):

  • WebCoreSupport/WebEditorClient.h:
  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::getClientPasteboardData):

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:

(WebPlatformStrategies::bufferForType):
(WebPlatformStrategies::readBufferFromPasteboard):

  • WebView/WebDataSource.mm:

(-[WebDataSource data]):

  • WebView/WebHTMLRepresentation.mm:

(-[WebHTMLRepresentation documentSource]):

  • WebView/WebHTMLView.mm:

(createShareMenuItem):

  • WebView/WebResource.mm:

(-[WebResource encodeWithCoder:]):
(-[WebResource data]):
(-[WebResource _stringValue]):

Source/WebKitLegacy/win:

  • MemoryStream.cpp:

(MemoryStream::MemoryStream):
(MemoryStream::createInstance):

  • MemoryStream.h:
  • WebArchive.cpp:

(WebArchive::data):

  • WebCoreSupport/WebEditorClient.cpp:

(WebEditorClient::getClientPasteboardData):

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

(WebDataSource::data):

  • WebResource.cpp:

(WebResource::createInstance):

  • WebResource.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:

(TestWebKitAPI::TEST_F):

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

(TestWebKitAPI::TEST_F):

Dec 12, 2021:

11:39 PM Changeset in webkit [286936] by sihui_liu@apple.com
  • 22 edits
    5 copies
    7 adds in trunk/Source

Merge StorageManager with NetworkStorageManager to manage WebStorage by origin
https://bugs.webkit.org/show_bug.cgi?id=234087

Reviewed by Chris Dumez.

Source/WebCore:

  • platform/sql/SQLiteFileSystem.cpp:

(WebCore::SQLiteFileSystem::deleteDatabaseFile):
(WebCore::SQLiteFileSystem::moveDatabaseFile):
(WebCore::SQLiteFileSystem::databaseFileSize):

  • platform/sql/SQLiteFileSystem.h:

Source/WebKit:

In network process, WebStorage data is managed by WebKit::StorageManager class. Each StorageManager owns one or
many StorageNameSpaces, and each StorageNamespace owns one or more StorageAreas. Each StorageArea correponds
to one storage map (one localStorage or sessionStorage object), using either a SQLite database or a in-memory
map as backend. Now that we have NetworkStorageManager, which manages storage by origin. We can merge
StorageManager with NetworkStorageManager, since localStorage and sessionStorage are not shared between
different origins.

The new structure is:
NetworkStorageManager (manage storage for a session, owns one or more OriginStorageManagers)
OriginStorageManager (manage storage for an origin, owns one LocalStorageManager and one SessionStorageManager)
LocalStorageManager / SessionStorageManager (manage LocalStorage and SessionStorage, owns one or more
StorageAreaBases)
MemoryStorageArea / SQLiteStorageArea (inherits StorageAreaBases; manage one local or session storage, like
Webkit::StorageArea)

StorageNamespace layer is removed. For SessionStorage, different StorageNamespaces means different web pages,
and same origin can have different sessionStorages on different pages, so we keep a StorageNamespace <=>
StorageArea map in SessionStorageManager. For LocalStorage, differnt StorageNamespaces means different page
groups. Our original plan was the same origin can have different localStorages in different page groups, but our
old implementation actually made all page groups point to the same database file. To keep existing behavior
that all page groups with same origin share the storage, we now keep one local StorageArea and one transient
StorageArea per LocalStorageManager.

Mostly refactoring and covered by existing tests.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::NetworkProcess):
(WebKit::NetworkProcess::lowMemoryHandler):
(WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
(WebKit::NetworkProcess::addWebsiteDataStore):
(WebKit::NetworkProcess::addStorageManagerForSession):
(WebKit::NetworkProcess::destroySession):
(WebKit::NetworkProcess::hasLocalStorage):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::prepareToSuspend):
(WebKit::NetworkProcess::resume):
(WebKit::NetworkProcess::syncLocalStorage):
(WebKit::NetworkProcess::renameOriginInWebsiteData):
(WebKit::NetworkProcess::connectionToWebProcessClosed):
(WebKit::NetworkProcess::getLocalStorageOriginDetails): Deleted.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/storage/LocalStorageManager.cpp: Added.

(WebKit::fileNameToOrigin):
(WebKit::originToFileName):
(WebKit::LocalStorageManager::originsOfLocalStorageData):
(WebKit::LocalStorageManager::localStorageFilePath):
(WebKit::LocalStorageManager::LocalStorageManager):
(WebKit::LocalStorageManager::isActive const):
(WebKit::LocalStorageManager::hasDataInMemory const):
(WebKit::LocalStorageManager::clearDataInMemory):
(WebKit::LocalStorageManager::clearDataOnDisk):
(WebKit::LocalStorageManager::close):
(WebKit::LocalStorageManager::handleLowMemoryWarning):
(WebKit::LocalStorageManager::syncLocalStorage):
(WebKit::LocalStorageManager::connectionClosed):
(WebKit::LocalStorageManager::connectionClosedForLocalStorageArea):
(WebKit::LocalStorageManager::connectionClosedForTransientStorageArea):
(WebKit::LocalStorageManager::connectToLocalStorageArea):
(WebKit::LocalStorageManager::connectToTransientLocalStorageArea):
(WebKit::LocalStorageManager::disconnectFromStorageArea):

  • NetworkProcess/storage/LocalStorageManager.h: Added.
  • NetworkProcess/storage/MemoryStorageArea.cpp: Added.

(WebKit::MemoryStorageArea::MemoryStorageArea):
(WebKit::MemoryStorageArea::isEmpty):
(WebKit::MemoryStorageArea::clear):
(WebKit::MemoryStorageArea::allItems):
(WebKit::MemoryStorageArea::setItem):
(WebKit::MemoryStorageArea::removeItem):
(WebKit::MemoryStorageArea::clone const):

  • NetworkProcess/storage/MemoryStorageArea.h: Added.

(isType):

  • NetworkProcess/storage/NetworkStorageManager.cpp:

(WebKit::readOriginFromFile):
(WebKit::writeOriginToFileIfNecessary):
(WebKit::NetworkStorageManager::create):
(WebKit::NetworkStorageManager::NetworkStorageManager):
(WebKit::NetworkStorageManager::canHandleTypes):
(WebKit::NetworkStorageManager::close):
(WebKit::originDirectoryPath):
(WebKit::originFilePath):
(WebKit::NetworkStorageManager::localOriginStorageManager):
(WebKit::NetworkStorageManager::removeOriginStorageManagerIfPossible):
(WebKit::NetworkStorageManager::deleteOriginDirectoryIfPossible):
(WebKit::NetworkStorageManager::clearStorageForTesting):
(WebKit::NetworkStorageManager::forEachOriginDirectory):
(WebKit::NetworkStorageManager::getAllOrigins):
(WebKit::NetworkStorageManager::fetchDataFromDisk):
(WebKit::NetworkStorageManager::deleteDataOnDisk):
(WebKit::NetworkStorageManager::moveData):
(WebKit::NetworkStorageManager::suspend):
(WebKit::NetworkStorageManager::resume):
(WebKit::NetworkStorageManager::handleLowMemoryWarning):
(WebKit::NetworkStorageManager::syncLocalStorage):
(WebKit::NetworkStorageManager::connectToLocalStorageArea):
(WebKit::NetworkStorageManager::connectToTransientLocalStorageArea):
(WebKit::NetworkStorageManager::connectToSessionStorageArea):
(WebKit::NetworkStorageManager::disconnectFromStorageArea):
(WebKit::NetworkStorageManager::cloneSessionStorageNamespace):
(WebKit::NetworkStorageManager::getValues):
(WebKit::NetworkStorageManager::setItem):
(WebKit::NetworkStorageManager::removeItem):
(WebKit::NetworkStorageManager::clear):
(WebKit::toWebsiteDataType): Deleted.

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

(WebKit::OriginStorageManager::StorageBucket::StorageBucket):
(WebKit::OriginStorageManager::StorageBucket::toWebsiteDataType):
(WebKit::OriginStorageManager::StorageBucket::toStorageIdentifier):
(WebKit::OriginStorageManager::StorageBucket::localStorageManager):
(WebKit::OriginStorageManager::StorageBucket::existingLocalStorageManager):
(WebKit::OriginStorageManager::StorageBucket::sessionStorageManager):
(WebKit::OriginStorageManager::StorageBucket::existingSessionStorageManager):
(WebKit::OriginStorageManager::StorageBucket::isActive const):
(WebKit::OriginStorageManager::StorageBucket::isEmpty const):
(WebKit::OriginStorageManager::StorageBucket::fetchDataTypesInList):
(WebKit::OriginStorageManager::StorageBucket::deleteData):
(WebKit::OriginStorageManager::StorageBucket::moveData):
(WebKit::OriginStorageManager::StorageBucket::fetchDataTypesInListFromMemory):
(WebKit::OriginStorageManager::StorageBucket::fetchDataTypesInListFromDisk):
(WebKit::OriginStorageManager::StorageBucket::deleteLocalStorageData):
(WebKit::OriginStorageManager::StorageBucket::deleteSessionStorageData):
(WebKit::OriginStorageManager::OriginStorageManager):
(WebKit::OriginStorageManager::defaultBucket):
(WebKit::OriginStorageManager::localStorageManager):
(WebKit::OriginStorageManager::existingLocalStorageManager):
(WebKit::OriginStorageManager::sessionStorageManager):
(WebKit::OriginStorageManager::existingSessionStorageManager):
(WebKit::OriginStorageManager::isEmpty):
(WebKit::OriginStorageManager::fetchDataTypesInList):
(WebKit::OriginStorageManager::deleteData):
(WebKit::OriginStorageManager::moveData):
(WebKit::OriginStorageManager::StorageBucket::isActive): Deleted.

  • NetworkProcess/storage/OriginStorageManager.h:
  • NetworkProcess/storage/SQLiteStorageArea.cpp: Added.

(WebKit::SQLiteStorageArea::statementString const):
(WebKit::SQLiteStorageArea::SQLiteStorageArea):
(WebKit::SQLiteStorageArea::close):
(WebKit::SQLiteStorageArea::~SQLiteStorageArea):
(WebKit::SQLiteStorageArea::isEmpty):
(WebKit::SQLiteStorageArea::clear):
(WebKit::SQLiteStorageArea::createTableIfNecessary):
(WebKit::SQLiteStorageArea::prepareDatabase):
(WebKit::SQLiteStorageArea::startTransactionIfNecessary):
(WebKit::SQLiteStorageArea::cachedStatement):
(WebKit::SQLiteStorageArea::getItem):
(WebKit::SQLiteStorageArea::getItemFromDatabase):
(WebKit::SQLiteStorageArea::allItems):
(WebKit::SQLiteStorageArea::setItem):
(WebKit::SQLiteStorageArea::removeItem):
(WebKit::SQLiteStorageArea::commitTransactionIfNecessary):
(WebKit::SQLiteStorageArea::handleLowMemoryWarning):

  • NetworkProcess/storage/SQLiteStorageArea.h: Added.

(isType):

  • NetworkProcess/storage/SessionStorageManager.cpp: Added.

(WebKit::SessionStorageManager::SessionStorageManager):
(WebKit::SessionStorageManager::isActive const):
(WebKit::SessionStorageManager::hasDataInMemory const):
(WebKit::SessionStorageManager::clearData):
(WebKit::SessionStorageManager::connectionClosed):
(WebKit::SessionStorageManager::addStorageArea):
(WebKit::SessionStorageManager::connectToSessionStorageArea):
(WebKit::SessionStorageManager::disconnectFromStorageArea):
(WebKit::SessionStorageManager::cloneStorageArea):

  • NetworkProcess/storage/SessionStorageManager.h: Added.
  • NetworkProcess/storage/StorageAreaBase.cpp: Added. Some code is moved from NetworkProcess/WebStoreage/StorageArea.cpp.

(WebKit::StorageAreaBase::StorageAreaBase):
(WebKit::StorageAreaBase::addListener):
(WebKit::StorageAreaBase::removeListener):
(WebKit::StorageAreaBase::hasListeners const):
(WebKit::StorageAreaBase::notifyListenersAboutClear):
(WebKit::StorageAreaBase::dispatchEvents const):

  • NetworkProcess/storage/StorageAreaBase.h: Added. Some code is moved from NetworkProcess/WebStoreage/StorageArea.h.

(WebKit::StorageAreaBase::identifier const):
(WebKit::StorageAreaBase::origin const):
(WebKit::StorageAreaBase::quota const):

  • NetworkProcess/storage/StorageAreaRegistry.cpp: Added.

(WebKit::StorageAreaRegistry::registerStorageArea):
(WebKit::StorageAreaRegistry::unregisterStorageArea):
(WebKit::StorageAreaRegistry::getStorageArea):

  • NetworkProcess/storage/StorageAreaRegistry.h: Added.
  • Scripts/generate-unified-sources.sh:
  • Sources.txt:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::getLocalStorageDetails): Deleted.

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::excludeDirectoryFromBackup):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::parameters):
(WebKit::WebsiteDataStore::getLocalStorageDetails): Deleted.

  • UIProcess/WebsiteData/WebsiteDataStore.h:
  • UnifiedSources-output.xcfilelist:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebStorage/StorageAreaMap.cpp:

(WebKit::StorageAreaMap::setItem):
(WebKit::StorageAreaMap::removeItem):
(WebKit::StorageAreaMap::clear):
(WebKit::StorageAreaMap::ensureMap):
(WebKit::StorageAreaMap::connect):
(WebKit::StorageAreaMap::disconnect):

  • WebProcess/WebStorage/StorageNamespaceImpl.cpp:

(WebKit::StorageNamespaceImpl::copy):

11:18 PM Changeset in webkit [286935] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[RISCV64] Add MacroAssemblerRISCV64 implementations for trivial general-purpose-register operations
https://bugs.webkit.org/show_bug.cgi?id=233992

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

Add implementations for the trivial general-purpose-register operations
in MacroAssemblerRISCV64. This covers non-patchable loads and stores,
shifts, logical operations, zero- and sign-extensions, moves and swaps,
stack operations as well as miscellaneous operations like aborts,
breakpoints and nops.

The loadImmediate helper methods are added to handle loading of
different types of immediate values. This should replace move() calls
when a sign-extended immediate load is desired, whereas move() for
a 32-bit immediate is expected to perform no sign extension.

  • assembler/MacroAssemblerRISCV64.h:

(JSC::MacroAssemblerRISCV64::add32):
(JSC::MacroAssemblerRISCV64::add64):
(JSC::MacroAssemblerRISCV64::sub32):
(JSC::MacroAssemblerRISCV64::mul32):
(JSC::MacroAssemblerRISCV64::lshift32):
(JSC::MacroAssemblerRISCV64::lshift64):
(JSC::MacroAssemblerRISCV64::rshift32):
(JSC::MacroAssemblerRISCV64::rshift64):
(JSC::MacroAssemblerRISCV64::urshift32):
(JSC::MacroAssemblerRISCV64::urshift64):
(JSC::MacroAssemblerRISCV64::load8):
(JSC::MacroAssemblerRISCV64::load8SignedExtendTo32):
(JSC::MacroAssemblerRISCV64::load16):
(JSC::MacroAssemblerRISCV64::load16Unaligned):
(JSC::MacroAssemblerRISCV64::load16SignedExtendTo32):
(JSC::MacroAssemblerRISCV64::load32):
(JSC::MacroAssemblerRISCV64::load32WithUnalignedHalfWords):
(JSC::MacroAssemblerRISCV64::load64):
(JSC::MacroAssemblerRISCV64::loadPair32):
(JSC::MacroAssemblerRISCV64::store8):
(JSC::MacroAssemblerRISCV64::store16):
(JSC::MacroAssemblerRISCV64::store32):
(JSC::MacroAssemblerRISCV64::store64):
(JSC::MacroAssemblerRISCV64::storePair32):
(JSC::MacroAssemblerRISCV64::zeroExtend8To32):
(JSC::MacroAssemblerRISCV64::zeroExtend16To32):
(JSC::MacroAssemblerRISCV64::zeroExtend32ToWord):
(JSC::MacroAssemblerRISCV64::signExtend8To32):
(JSC::MacroAssemblerRISCV64::signExtend16To32):
(JSC::MacroAssemblerRISCV64::signExtend32ToPtr):
(JSC::MacroAssemblerRISCV64::and32):
(JSC::MacroAssemblerRISCV64::and64):
(JSC::MacroAssemblerRISCV64::or8):
(JSC::MacroAssemblerRISCV64::or16):
(JSC::MacroAssemblerRISCV64::or32):
(JSC::MacroAssemblerRISCV64::or64):
(JSC::MacroAssemblerRISCV64::xor32):
(JSC::MacroAssemblerRISCV64::xor64):
(JSC::MacroAssemblerRISCV64::not32):
(JSC::MacroAssemblerRISCV64::not64):
(JSC::MacroAssemblerRISCV64::neg32):
(JSC::MacroAssemblerRISCV64::neg64):
(JSC::MacroAssemblerRISCV64::move):
(JSC::MacroAssemblerRISCV64::swap):
(JSC::MacroAssemblerRISCV64::push):
(JSC::MacroAssemblerRISCV64::pushPair):
(JSC::MacroAssemblerRISCV64::pop):
(JSC::MacroAssemblerRISCV64::popPair):
(JSC::MacroAssemblerRISCV64::abortWithReason):
(JSC::MacroAssemblerRISCV64::breakpoint):
(JSC::MacroAssemblerRISCV64::nop):
(JSC::MacroAssemblerRISCV64::loadImmediate):

11:16 PM Changeset in webkit [286934] by commit-queue@webkit.org
  • 4 edits in trunk/Source/bmalloc

[libpas] make build.sh, test.sh, build_and_test.sh, and clean.sh work on Linux
https://bugs.webkit.org/show_bug.cgi?id=233821

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

Adjust and enhance the shell scripts for building and testing CMake
builds of libpas. In build.sh, the 'cmake' SDK option handling is added,
invoking CMake to produce a libpas build of the desired variant and
configuration. The Debug and Release configuration possibilities map
exactly to the CMAKE_BUILD_TYPE option. The ENABLE_PAS_TESTING option
used for the testing variant is converted into a macro definition that's
passed to both CMAKE_C_FLAGS and CMAKE_CXX_FLAGS.

The function declarations are adjusted to use the "fname()" form, making
things runnable on shells that don't support the "function" keyword.

  • libpas/build.sh:
  • libpas/common.sh:
  • libpas/test.sh:
7:23 PM Changeset in webkit [286933] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[IFC][Integration] Enable isolate-override for inline boxes
https://bugs.webkit.org/show_bug.cgi?id=234203

Reviewed by Antti Koivisto.

  • layout/integration/LayoutIntegrationCoverage.cpp: The only reason why plaintext is not enabled yet

is becuase it may change the inline axis direction to RTL. It is going to be enabled together with the RTL support.
(WebCore::LayoutIntegration::canUseForStyle):

6:42 PM Changeset in webkit [286932] by Simon Fraser
  • 6 edits in trunk/Source/WebCore

Ensure that the scrolling thread always commits layer position changes to reduce scrolling stutters
https://bugs.webkit.org/show_bug.cgi?id=234213

Reviewed by Tim Horton.

On a page where CA commits on the main thread take a long time (e.g. because of expensive
painting), it's possible that the main thread has updated the scrolling layer position, and
then the scrolling thread detects that the commit is taking a long time and attempts to
trigger its own commit, but because the layer position property doesn't change, no commit
occurs.

Work around this by setting the layer position to 0,0 and back when we're on the scrolling
thread. Only do this if the scroll position changed since the last display refresh to avoid
triggering redundant commits.

Ideally we'd traverse the scrolling tree and do this for every scrolling node, but scrolling
trees can get large so for now just apply this to the root node.

  • page/scrolling/ScrollingTreeScrollingNode.cpp:

(WebCore::ScrollingTreeScrollingNode::updateScrollPositionAtLastDisplayRefresh):

  • page/scrolling/ScrollingTreeScrollingNode.h:
  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::displayDidRefreshOnScrollingThread):
(WebCore::ThreadedScrollingTree::storeScrollPositionsAtLastDisplayRefresh):

  • page/scrolling/ThreadedScrollingTree.h:
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):

5:46 PM Changeset in webkit [286931] by Alan Bujtas
  • 5 edits in trunk

[LFC][IFC] Add partial unicode-bidi support on inline level boxes
https://bugs.webkit.org/show_bug.cgi?id=234196

Reviewed by Antti Koivisto.

Source/WebCore:

This patch enables partial unicode-bidi processing on all elements (block and inline).

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent): The paragraph builder now may
produce valid bidi levels for inline box end type of inline items (see popDirectionalFormatting).

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForStyle):

LayoutTests:

  • platform/mac/fast/text/international/bidi-ignored-for-first-child-inline-expected.txt: Progression.
5:09 PM Changeset in webkit [286930] by ysuzuki@apple.com
  • 15 edits in trunk/Source/JavaScriptCore

[JSC] Use FixedVector to shrink some of Wasm data structures
https://bugs.webkit.org/show_bug.cgi?id=234206

Reviewed by Saam Barati.

We can use FixedVector to shrink some of Wasm data structures including Wasm::Callee.

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::emitLoopTierUpCheck):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::PatchpointExceptionHandle::generate const):
(JSC::Wasm::B3IRGenerator::emitLoopTierUpCheck):

  • wasm/WasmCallee.cpp:

(JSC::Wasm::LLIntCallee::linkExceptionHandlers):
(JSC::Wasm::OptimizingJITCallee::linkExceptionHandlers):
(JSC::Wasm::OptimizingJITCallee::stackmap const):

  • wasm/WasmCallee.h:

(JSC::Wasm::Callee::hasExceptionHandlers const):
(JSC::Wasm::JITCallee::wasmToWasmCallsites):
(JSC::Wasm::OptimizingJITCallee::OptimizingJITCallee):

  • wasm/WasmCodeBlock.cpp:

(JSC::Wasm::CodeBlock::CodeBlock):

  • wasm/WasmCodeBlock.h:
  • wasm/WasmHandlerInfo.cpp:

(JSC::Wasm::HandlerInfo::handlerForIndex):

  • wasm/WasmHandlerInfo.h:
  • wasm/WasmOSREntryData.h:

(JSC::Wasm::OSREntryData::OSREntryData):
(JSC::Wasm::OSREntryData::values):
(JSC::Wasm::OSREntryValue::OSREntryValue): Deleted.
(JSC::Wasm::OSREntryValue::type const): Deleted.

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::updateCallSitesToCallUs):

  • wasm/WasmTierUpCount.cpp:

(JSC::Wasm::TierUpCount::addOSREntryData):

  • wasm/WasmTierUpCount.h:
  • wasm/js/JSWebAssemblyCodeBlock.cpp:

(JSC::JSWebAssemblyCodeBlock::JSWebAssemblyCodeBlock):

  • wasm/js/JSWebAssemblyCodeBlock.h:
3:49 PM Changeset in webkit [286929] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Add partial unicode-bidi support on the block container
https://bugs.webkit.org/show_bug.cgi?id=234195

Reviewed by Antti Koivisto.

'unicode-bidi: plaintext' on the block container may change the base directionality of
the container itself. We only support LTR inline axis direction.

  • layout/formattingContexts/inline/InlineItemsBuilder.cpp:

(WebCore::Layout::handleEnterExitBidiContext):
(WebCore::Layout::buildBidiParagraph): Add control character for the unicode-bidi property on the block container.
(WebCore::Layout::InlineItemsBuilder::breakAndComputeBidiLevels):

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForStyle):
(WebCore::LayoutIntegration::canUseForRenderInlineChild):
(WebCore::LayoutIntegration::canUseForLineLayoutWithReason):
(WebCore::LayoutIntegration::canUseForLineLayoutAfterStyleChange):

2:10 PM Changeset in webkit [286928] by Alan Bujtas
  • 6 edits
    2 adds in trunk

[LFC][IFC] Ignore zero width glyphs while collecting fallback fonts
https://bugs.webkit.org/show_bug.cgi?id=234210

Reviewed by Antti Koivisto.

Source/WebCore:

Taking zero width glyphs (e.g. control characters) into consideration while collecting
fallback font information may result in incorrect line height and baseline positioning.

The logic in this patch matches with WidthIterator::commitCurrentFontRange (used by legacy line layout).
It is measured to have only a slight perf impact on layout microbenchmarks (~1%).
Alternatively we could check against unicode ranges to omit certain glyphs.

Test: fast/text/fallback-font-and-zero-width-glyph.html

  • layout/formattingContexts/inline/text/TextUtil.cpp:

(WebCore::Layout::fallbackFontsForRunWithIterator):

LayoutTests:

  • fast/text/fallback-font-and-zero-width-glyph-expected.html: Added.
  • fast/text/fallback-font-and-zero-width-glyph.html: Added.
12:21 PM Changeset in webkit [286927] by Fujii Hironori
  • 2 edits in trunk/LayoutTests

[WinCairo] Unreviewed test gardening

  • platform/wincairo/TestExpectations:
9:44 AM Changeset in webkit [286926] by commit-queue@webkit.org
  • 17 edits in trunk/LayoutTests

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

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

  • platform/glib/TestExpectations:
  • platform/glib/imported/w3c/web-platform-tests/css/cssom-view/getBoundingClientRect-shy-expected.txt:
  • platform/glib/svg/css/getComputedStyle-basic-expected.txt:
  • platform/glib/webgl/1.0.3/conformance/glsl/misc/shaders-with-name-conflicts-expected.txt:
  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • 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:
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/datetime-local-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-2-expected.txt:
  • platform/wpe/css2.1/t0805-c5518-brdr-t-01-e-expected.txt:
  • platform/wpe/css2.1/t0805-c5519-brdr-r-01-e-expected.txt:
  • platform/wpe/css2.1/t0805-c5520-brdr-b-01-e-expected.txt:
  • platform/wpe/css2.1/t0805-c5521-brdr-l-01-e-expected.txt:
  • platform/wpe/css2.1/t0805-c5521-ibrdr-l-00-a-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/selection/selection-select-all-move-input-crash-expected.txt:
9:31 AM Changeset in webkit [286925] by weinig@apple.com
  • 17 edits
    1 copy in trunk

Pipe ColorInterpolationMethod into Gradient
https://bugs.webkit.org/show_bug.cgi?id=234205

Reviewed by Antti Koivisto.

Source/WebCore:

There is no functional change yet, this just adds a required ColorInterpolationMethod parameter to
Gradient, which for the moment has to be SRGB and non-premultiplied alpha. Subsequent changes will
support for specifying an interpolation method via CSS gradients as well as implementing support
for that in the platform gradient backends.

Also moves the ColorInterpolationMethod struct into its own file as it was getting quite long.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSGradientValue.cpp:

(WebCore::CSSGradientValue::equals const):
(WebCore::CSSLinearGradientValue::createGradient):
(WebCore::CSSRadialGradientValue::createGradient):
(WebCore::CSSConicGradientValue::createGradient):

  • css/CSSGradientValue.h:

(WebCore::CSSGradientValue::CSSGradientValue):
(WebCore::CSSGradientValue::colorInterpolationMethod const):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradient):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedRadialGradient):
(WebCore::CSSPropertyParserHelpers::consumeRadialGradient):
(WebCore::CSSPropertyParserHelpers::consumeLinearGradient):
(WebCore::CSSPropertyParserHelpers::consumeConicGradient):

  • html/HTMLInputElement.cpp:

(WebCore::autoFillStrongPasswordMaskImage):

  • html/canvas/CanvasGradient.cpp:

(WebCore::CanvasGradient::CanvasGradient):

  • platform/graphics/ColorInterpolation.h:

(WebCore::interpolateColorComponents):
(WebCore::ColorInterpolationMethod::encode const): Deleted.
(WebCore::ColorInterpolationMethod::decode): Deleted.

  • platform/graphics/ColorInterpolationMethod.h: Added.

(WebCore::ColorInterpolationMethod::encode const):
(WebCore::ColorInterpolationMethod::decode):
(WebCore::add):
(WebCore::operator==):

  • platform/graphics/Gradient.cpp:

(WebCore::Gradient::create):
(WebCore::Gradient::Gradient):
(WebCore::Gradient::hash const):

  • platform/graphics/Gradient.h:

(WebCore::Gradient::encode const):
(WebCore::Gradient::decode):

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::paintProgressBar):
(WebCore::RenderThemeIOS::checkboxRadioBackgroundGradient):
(WebCore::RenderThemeIOS::paintColorWellDecorations):

  • rendering/svg/RenderSVGResourceLinearGradient.cpp:

(WebCore::RenderSVGResourceLinearGradient::buildGradient const):

  • rendering/svg/RenderSVGResourceRadialGradient.cpp:

(WebCore::RenderSVGResourceRadialGradient::buildGradient const):

Tools:

Update calls to Gradient::create() to pass the now required ColorInterpolationMethod.

  • TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp:

(TestWebKitAPI::createGradient):

  • TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp:

(TestWebKitAPI::TEST):

9:29 AM Changeset in webkit [286924] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

IFC progression after r286121.

Unreviewed gardening.

1:05 AM Changeset in webkit [286923] by graouts@webkit.org
  • 3 edits
    2 adds in trunk/LayoutTests

Add a test for document.timeline.maximumFrameRate
https://bugs.webkit.org/show_bug.cgi?id=234200

Reviewed by Dean Jackson.

Bug 234161 added a new document.timeline.maximumFrameRate property but didn't feature
a test. This new test checks that we have a minimum of 60fps reported.

  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:
  • webanimations/frame-rate/document-timeline-maximum-frame-rate-expected.txt: Added.
  • webanimations/frame-rate/document-timeline-maximum-frame-rate.html: Added.

Dec 11, 2021:

7:04 PM Changeset in webkit [286922] by don.olmstead@sony.com
  • 8 edits
    2 deletes in trunk/Source/WebCore

SharedBuffer should use WTF::FileSystem when creating from a file
https://bugs.webkit.org/show_bug.cgi?id=233598
<rdar://problem/86123732>

Reviewed by Chris Dumez.

Remove platform specific implementations of SharedBuffer::createFromReadingFile and use
FileSystem::readEntireFile instead when creating a SharedBuffer from a file. The function
was only used within SharedBuffer::createWithContentsOfFile so the implementation is just
moved into that function.

  • PlatformFTW.cmake:
  • PlatformPlayStation.cmake:
  • PlatformWin.cmake:
  • platform/SharedBuffer.cpp:

(WebCore::SharedBuffer::createWithContentsOfFile):

  • platform/SharedBuffer.h:
  • platform/cocoa/SharedBufferCocoa.mm:

(WebCore::SharedBuffer::createFromReadingFile): Deleted.

  • platform/glib/SharedBufferGlib.cpp:

(WebCore::SharedBuffer::createFromReadingFile): Deleted.

  • platform/posix/SharedBufferPOSIX.cpp: Removed.
  • platform/win/SharedBufferWin.cpp: Removed.
6:08 PM Changeset in webkit [286921] by Alan Bujtas
  • 2 edits
    1 copy
    1 add in trunk/LayoutTests

fast/borders/bidi-002.html is failing on Monterey bots.
https://bugs.webkit.org/show_bug.cgi?id=234204

Unreviewed gardening.

  • platform/mac-bigsur/fast/borders/bidi-002-expected.txt: Copied from LayoutTests/platform/mac/fast/borders/bidi-002-expected.txt.
  • platform/mac/fast/borders/bidi-002-expected.txt:
4:39 PM Changeset in webkit [286920] by sbarati@apple.com
  • 14 edits in trunk/Source/JavaScriptCore

Teach the sampling profiler how to display origin data for B3 Wasm
https://bugs.webkit.org/show_bug.cgi?id=234097

Reviewed by Yusuke Suzuki.

This teaches the SamplingProfiler how to gather origin data for
Wasm. We reuse the PCToCodeOriginMap from JS, and store the wasm
function offset data inside of CodeOrigin's BytecodeIndex.

For now, this patch is only doing this for B3, because the Air backend
doesn't currently generate filled in OpcodeOrigin data. We'll fix that
in: https://bugs.webkit.org/show_bug.cgi?id=234182

Also, this capability isn't yet supported in Web Inspector. We'll want
to do that in a future change as we improve Web Inspector's ability to
debug Wasm code. When that time comes, we'll have to generate the
PCToCodeOriginMap based on debugging info, and not just 'useSamplingProfiler'
JSC option.

The data now shows up like this for hottest bytecodes:

Hottest bytecodes as <numSamples 'functionName#hash:JITType:bytecodeIndex'>

524 '<?>.wasm-function[2373]:OMG:0x21a'
414 '<?>.wasm-function[2363]:OMG:0x1ae'
395 '<?>.wasm-function[2373]:OMG:0x418'
354 '<?>.wasm-function[2373]:OMG:0x34f'
270 '<?>.wasm-function[2373]:OMG:0x352'
256 '<?>.wasm-function[2363]:OMG:0x152'

  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • jit/PCToCodeOriginMap.cpp:

(JSC::PCToCodeOriginMapBuilder::PCToCodeOriginMapBuilder):

  • jit/PCToCodeOriginMap.h:
  • runtime/SamplingProfiler.cpp:

(JSC::FrameWalker::recordJITFrame):
(JSC::SamplingProfiler::processUnverifiedStackTraces):
(JSC::SamplingProfiler::reportTopBytecodes):

  • runtime/SamplingProfiler.h:
  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::origin):
(JSC::Wasm::parseAndCompileAir):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::parseAndCompile):
(JSC::Wasm::computePCToCodeOriginMap):

  • wasm/WasmB3IRGenerator.h:

(): Deleted.

  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::work):
(JSC::Wasm::BBQPlan::didCompleteCompilation):
(JSC::Wasm::BBQPlan::initializeCallees):

  • wasm/WasmCalleeRegistry.h:

(JSC::Wasm::CalleeRegistry::unregisterCallee):
(JSC::Wasm::CalleeRegistry::addPCToCodeOriginMap):
(JSC::Wasm::CalleeRegistry::WTF_REQUIRES_LOCK):

  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

  • wasm/WasmOpcodeOrigin.h:

(JSC::Wasm::OpcodeOrigin::OpcodeOrigin):

4:38 PM Changeset in webkit [286919] by timothy_horton@apple.com
  • 7 edits in trunk/Source/WebKit

Momentum Event Dispatcher: Tail frames are the wrong velocity if momentum event dispatch rate doesn't match screen refresh rate
https://bugs.webkit.org/show_bug.cgi?id=234168
<rdar://problem/86247557>

Reviewed by Simon Fraser.

In r286671, I scaled the tail frames into the momentum event disaptch
rate, but they are actually always dispatched at display refresh
frequency. In many cases these things are the same, but in some
cases can differ (most commonly a 120Hz display with 60Hz event dispatch),
so to always have the tail move at the right rate, scale into the display
refresh rate instead).

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::windowScreenDidChange):

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::pageScreenDidChange):

  • WebProcess/WebPage/EventDispatcher.h:
  • WebProcess/WebPage/EventDispatcher.messages.in:
  • WebProcess/WebPage/MomentumEventDispatcher.cpp:

(WebKit::MomentumEventDispatcher::didStartMomentumPhase):
(WebKit::MomentumEventDispatcher::displayProperties const):
(WebKit::MomentumEventDispatcher::startDisplayLink):
(WebKit::MomentumEventDispatcher::stopDisplayLink):
(WebKit::MomentumEventDispatcher::pageScreenDidChange):
(WebKit::MomentumEventDispatcher::displayWasRefreshed):
(WebKit::MomentumEventDispatcher::displayID const): Deleted.

  • WebProcess/WebPage/MomentumEventDispatcher.h:

Plumb and store the nominal display refresh rate.

(WebKit::MomentumEventDispatcher::buildOffsetTableWithInitialDelta):
Scale the tail frames from the 60Hz ideal rate into the display refresh
rate, instead of the event dispatch rate.

Incoming events still scale *in* from the event dispatch rate, since
that's... the rate they come at.

4:29 PM Changeset in webkit [286918] by Chris Dumez
  • 17 edits in trunk/Source/WebCore

ContextDestructionObserver::m_scriptExecutionContext should be private
https://bugs.webkit.org/show_bug.cgi?id=234184

Reviewed by Youenn Fablet.

ContextDestructionObserver::m_scriptExecutionContext should be private. It is poor encapsulation
to have protected data members.

  • Modules/encryptedmedia/CDM.cpp:

(WebCore::CDM::getSupportedConfiguration):

  • Modules/encryptedmedia/MediaKeySystemRequest.cpp:

(WebCore::MediaKeySystemRequest::topLevelDocumentOrigin const):
(WebCore::MediaKeySystemRequest::start):
(WebCore::MediaKeySystemRequest::deny):
(WebCore::MediaKeySystemRequest::stop):
(WebCore::MediaKeySystemRequest::document const):

  • Modules/geolocation/Geolocation.cpp:

(WebCore::Geolocation::watchPosition):

  • Modules/mediastream/RTCDataChannel.h:
  • Modules/mediastream/RTCDtlsTransport.h:
  • Modules/mediastream/RTCIceTransport.h:
  • Modules/mediastream/RTCSctpTransport.h:
  • Modules/mediastream/UserMediaRequest.cpp:

(WebCore::UserMediaRequest::userMediaDocumentOrigin const):
(WebCore::UserMediaRequest::topLevelDocumentOrigin const):
(WebCore::UserMediaRequest::start):
(WebCore::UserMediaRequest::allow):
(WebCore::UserMediaRequest::deny):
(WebCore::UserMediaRequest::stop):
(WebCore::UserMediaRequest::document const):

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::mediaSessionGroupIdentifier const):

  • Modules/webaudio/BaseAudioContext.cpp:

(WebCore::BaseAudioContext::document const):
(WebCore::BaseAudioContext::origin const):
(WebCore::BaseAudioContext::addConsoleMessage):

  • Modules/webdatabase/DatabaseContext.cpp:

(WebCore::DatabaseContext::allowDatabaseAccess const):
(WebCore::DatabaseContext::databaseExceededQuota):
(WebCore::DatabaseContext::securityOrigin const):
(WebCore::DatabaseContext::isContextThread const):

  • Modules/webxr/WebXRSystem.cpp:

(WebCore::WebXRSystem::DummyInlineDevice::requestFrame):

  • dom/ActiveDOMObject.cpp:

(WebCore::ActiveDOMObject::~ActiveDOMObject):
(WebCore::ActiveDOMObject::suspendIfNeeded):

  • dom/ContextDestructionObserver.h:
  • dom/MessagePort.cpp:

(WebCore::MessagePort::MessagePort):
(WebCore::MessagePort::~MessagePort):
(WebCore::MessagePort::entangle):
(WebCore::MessagePort::postMessage):
(WebCore::MessagePort::disentangle):
(WebCore::MessagePort::messageAvailable):
(WebCore::MessagePort::start):
(WebCore::MessagePort::contextDestroyed):
(WebCore::MessagePort::dispatchMessages):
(WebCore::MessagePort::dispatchEvent):
(WebCore::MessagePort::virtualHasPendingActivity const):

  • html/track/VTTRegion.cpp:

(WebCore::VTTRegion::getDisplayTree):
(WebCore::VTTRegion::prepareRegionDisplayTree):

12:48 PM Changeset in webkit [286917] by don.olmstead@sony.com
  • 15 edits in trunk/Source

Add a std::nullptr_t constructor for RefPtr
https://bugs.webkit.org/show_bug.cgi?id=234192

Reviewed by Yusuke Suzuki.

Source/WebCore:

Remove uses of 0 when creating an empty RefPtr.

  • accessibility/AccessibilityObject.cpp:

(WebCore::Accessibility::findMatchingObjects):

  • platform/graphics/cairo/CairoUtilities.cpp:

(WebCore::drawPatternToCairoContext):

  • platform/graphics/texmap/TextureMapperGL.cpp:

(WebCore::TextureMapperGL::drawTexture):
(WebCore::TextureMapperGL::drawTexturePlanarYUV):
(WebCore::TextureMapperGL::drawTextureSemiPlanarYUV):
(WebCore::TextureMapperGL::drawTexturePackedYUV):

  • platform/graphics/win/IconWin.cpp:

(WebCore::Icon::createIconForFiles):

  • platform/graphics/win/ImageCGWin.cpp:

(WebCore::BitmapImage::create):

  • platform/graphics/win/ImageCairoWin.cpp:

(WebCore::BitmapImage::create):

  • platform/win/DragImageWin.cpp:

(WebCore::dragLabelFont):

Source/WebKit:

Remove uses of 0 when creating an empty RefPtr.

  • WebProcess/win/WebProcessWin.cpp:

(loadResourceIntoBuffer):

Source/WebKitLegacy/win:

Remove uses of 0 when creating an empty RefPtr.

  • FullscreenVideoController.cpp:

(FullscreenVideoController::draw):

  • WebArchive.cpp:

(WebArchive::createInstance):

Source/WTF:

Add the constexpr constructor RefPtr(std::nullptr_t) with the same behavior as the default
constructor. Both std::unique_ptr and std::shared_ptr have this same overload to optimize
for the nullptr case. As an added bonus this also makes it so 0 can't fill in as a
nullptr since the ambiguity will cause a compilation error.

  • wtf/RefPtr.h:

(WTF::RefPtr::RefPtr):

10:28 AM Changeset in webkit [286916] by Antti Koivisto
  • 28 edits in trunk/Source

Remove redundant StyleRule::Type enum
https://bugs.webkit.org/show_bug.cgi?id=234156

Reviewed by Alan Bujtas.

Source/WebCore:

Remove redundant CSSRule::STYLE_RULE etc enum values and just use StyleRuleType enum class.

  • bindings/js/JSCSSRuleCustom.cpp:

(WebCore::toJSNewlyCreated):

  • bindings/scripts/CodeGenerator.pm:

(GenerateCompileTimeCheckForEnumsIfNeeded):

Add 'ConstantsEnum' attribute to generate static_asserts for constants that match an enum class.

  • bindings/scripts/IDLAttributes.json:
  • css/CSSCounterStyleRule.h:
  • css/CSSFontFaceRule.h:
  • css/CSSFontPaletteValuesRule.h:
  • css/CSSImportRule.h:
  • css/CSSKeyframeRule.h:
  • css/CSSKeyframesRule.h:
  • css/CSSLayerBlockRule.h:
  • css/CSSLayerStatementRule.h:
  • css/CSSMediaRule.h:
  • css/CSSNamespaceRule.h:
  • css/CSSPageRule.h:
  • css/CSSRule.cpp:
  • css/CSSRule.h:

(WebCore::CSSRule::typeForBindings const):

  • css/CSSRule.idl:
  • css/CSSStyleRule.h:
  • css/CSSSupportsRule.h:
  • css/CSSUnknownRule.h:
  • css/StyleRuleType.h:
  • style/InspectorCSSOMWrappers.cpp:

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

Source/WebKitLegacy/mac:

  • DOM/DOMCSS.mm:

(kitClass):

  • DOM/DOMCSSRule.mm:

(-[DOMCSSRule type]):

10:20 AM Changeset in webkit [286915] by graouts@webkit.org
  • 14 edits
    5 adds in trunk

Expose a frameRate property to Web Animations
https://bugs.webkit.org/show_bug.cgi?id=234174
rdar://86338983

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Rebaseline the output of a Web Animations WPT which lists all enumerable Animation properties.

  • web-platform-tests/web-animations/interfaces/Animation/style-change-events-expected.txt:

Source/WebCore:

Expose a new frameRate property to the Animation interface. This property
accepts either a value from the new AnimationFrameRatePreset enum (auto,
low, high or highest) or a FramesPerSecond explicit value. This property
is governed by an off-by-default runtime setting.

When we obtain the frame rate from the IDL bindings, we record an "effective"
frame rate which is either a null value for the default frame rate, or an
explicit FramesPerSecond value for any value above or below it.

Test: webanimations/frame-rate/animation-frame-rate.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/AnimationFrameRatePreset.h: Added.
  • animation/AnimationFrameRatePreset.idl: Added.
  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::setBindingsFrameRate):
(WebCore::WebAnimation::setEffectiveFrameRate):

  • animation/WebAnimation.h:

(WebCore::WebAnimation::bindingsFrameRate const):
(WebCore::WebAnimation::frameRate const):

  • animation/WebAnimation.idl:

LayoutTests:

Add a new test checking whether valid values are accepted and invalid values
rejected without effect.

  • webanimations/frame-rate/animation-frame-rate-expected.txt: Added.
  • webanimations/frame-rate/animation-frame-rate.html: Added.
10:17 AM Changeset in webkit [286914] by Lauro Moura
  • 16 edits in trunk/Source

Non-unified build fixes, mid mid December 2021 edition
https://bugs.webkit.org/show_bug.cgi?id=234191

Unreviewed build fix.

A few more fixes already a couple of days after the last fix.

Full build still failing due to the issue discussed on bug226088.

All changes are inclusion of missing headers.

Source/WebCore:

  • html/shadow/DateTimeEditElement.cpp:
  • platform/graphics/displaylists/DisplayListRecorder.cpp:
  • workers/WorkerDebuggerProxy.h:
  • workers/shared/SharedWorkerManager.cpp:
  • workers/shared/SharedWorkerProxy.cpp:
  • workers/shared/SharedWorkerScriptLoader.cpp:
  • workers/shared/SharedWorkerScriptLoader.h:
  • workers/shared/SharedWorkerThread.cpp:

Source/WebKit:

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDListElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLDirectoryElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLMenuElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOptionElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLPreElement.cpp:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLTextAreaElement.cpp:
8:59 AM Changeset in webkit [286913] by mark.lam@apple.com
  • 5 edits in trunk/Source

Automatically forbid JS execution when we throw a TerminationException.
https://bugs.webkit.org/show_bug.cgi?id=234188

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

For Worker threads, we throw a TerminationException when Worker.terminate() is
called. Once the TerminationException is thrown, we expect to completely unwind
out of any JS frames on the stack, and we also expect the client to never call
into JS again. Previously, WebCore will call VM:setExecutionForbidden() to flag
that we should not re-enter the VM anymore. On JSC side, this executionForbidden()
is used to prevent micro-tasks from firing. On WebCore side, it is used to prevent
many things from running, including firing events.

Previously, we reply on WebCore side to catch the TerminationException, determine
that it is the TerminationException, and then call VM:setExecutionForbidden().
This is tedious and error prone as there may be places in WebCore that should call
VM:setExecutionForbidden() but is missed. This has been the source of some bugs
with the handling of the Worker termination in the past.

In this patch, we change VM to setExecutionForbidden() immediately when we throw
the TerminationException, but only if VM::m_executionForbiddenOnTermination is set.
Currently, we'll only set VM:m_executionForbiddenOnTermination for Workers because
for legacy reasons, other clients of JSC has the ability to re-enter the VM after
a TerminationException unwinds out (which is ok to do when used under some
controlled conditions). Until we can determine that it is safe to adopt this
"execution forbidden on termination" behavior universally, we'll adopt it only for
workers.

In a subsequent patch, we can also look into removing all the places in WebCore
that checks for TerminationException in order to call VM:setExecutionForbidden().
We'll leave those in place for now though they should be redundant after this patch.

Also add some ASSERTs to document invariants regarding states used in the handing
of TerminationException.

  • runtime/VM.cpp:

(JSC::VM::setException):
(JSC::VM::throwTerminationException):

  • runtime/VM.h:

(JSC::VM::forbidExecutionOnTermination):

Source/WebCore:

Enable "execution forbidden on termination" behavior for workers.

  • workers/WorkerOrWorkletScriptController.cpp:

(WebCore::WorkerOrWorkletScriptController::WorkerOrWorkletScriptController):

8:55 AM Changeset in webkit [286912] by mark.lam@apple.com
  • 2 edits in trunk/Source/WebCore

WebCore::createDOMException() should abort early if termination is pending.
https://bugs.webkit.org/show_bug.cgi?id=234190

Reviewed by Darin Adler.

Attempting to create Error objects may re-enter the VM, which we should not do
when termination is pending.

This issue manifested as an ASSERT failure, and was discovered while running
http/wpt/fetch/ layout tests with a Debug build on an M1 Mac. It also manifested
on some testing bots.

  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::createDOMException):

7:33 AM Changeset in webkit [286911] by commit-queue@webkit.org
  • 50 edits
    10 deletes in trunk

Unreviewed, reverting r286893.
https://bugs.webkit.org/show_bug.cgi?id=234197

Breaks the build

Reverted changeset:

"[macOS] Add new screen and window capture backend"
https://bugs.webkit.org/show_bug.cgi?id=234029
https://commits.webkit.org/r286893

6:37 AM Changeset in webkit [286910] by aakash_jain@apple.com
  • 2 edits in trunk

Update my github username.

Unreviewed.

  • metadata/contributors.json:
5:36 AM Changeset in webkit [286909] by jh718.park@samsung.com
  • 2 edits in trunk/Source/WebCore

Unreviewed. CSSCalcOperationNode::allowsNegativePercentageReference() should be const member function.

In r286897, the above method's const keyword was missed out, so add it.

No new tests, no new behaviours.

  • css/calc/CSSCalcOperationNode.h:
1:00 AM Changeset in webkit [286908] by jer.noble@apple.com
  • 56 edits
    17 copies
    11 adds in trunk

Source/WebCore:
Add an experimental trackConfiguration accessor on AudioTrack & VideoTrack.
https://bugs.webkit.org/show_bug.cgi?id=230841

Reviewed by Eric Carlson.

Add an experimental property on AudioTrack VideoTrack which contains information about the
underlying media track's configuration. The AudioTrackConfiguration is based on
AudioConfiguration from MediaCapabilities. The VideoTrackConfiguration is based on a
combination of the VideoConfiguration from MediaCapabilities and the VideoColorSpace from
WebCodecs.

The AVFoundation implementation of AVTrackPrivateAVFObjCImpl will extract a NAL unit for the
video codec from the CMFormatDescription containing information about the underlying media,
and pass that NAL unit to utility methods in HEVCUtilities (which should probably be
renamed to CodecUntilities) to extract and create codec configuration strings. It will
extract colorspace information from CMFormatDescriptionExtensions found in the format
description. It will extract framerate, bitrate, width and height, sample rate and channel
count information from the underlying AVAssetTrack. There are shortcomings here, as HLS
streams and MSE streams do not generate framerate or bitrate information in the
AVAssetTrack.

Tests: media/track/audio-track-configuration.html

media/track/video-track-configuration.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/webcodecs/VideoColorPrimaries.h:
  • Modules/webcodecs/VideoColorPrimaries.idl:
  • Modules/webcodecs/VideoColorSpace.h:

(WebCore::VideoColorSpace::create):
(WebCore::VideoColorSpace::primaries const):
(WebCore::VideoColorSpace::setPrimaries):
(WebCore::VideoColorSpace::transfer const):
(WebCore::VideoColorSpace::setTransfer):
(WebCore::VideoColorSpace::matrix const):
(WebCore::VideoColorSpace::setMatrix):
(WebCore::VideoColorSpace::fullRange const):
(WebCore::VideoColorSpace::setfFullRange):
(WebCore::VideoColorSpace::VideoColorSpace):

  • Modules/webcodecs/VideoColorSpace.idl:
  • Modules/webcodecs/VideoColorSpaceInit.h:
  • Modules/webcodecs/VideoColorSpaceInit.idl:
  • Modules/webcodecs/VideoMatrixCoefficients.h:
  • Modules/webcodecs/VideoMatrixCoefficients.idl:
  • Modules/webcodecs/VideoTransferCharacteristics.h:
  • Modules/webcodecs/VideoTransferCharacteristics.idl:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • html/track/AudioTrack.cpp:

(WebCore::AudioTrack::AudioTrack):
(WebCore::AudioTrack::setPrivate):
(WebCore::AudioTrack::updateConfigurationFromPrivate):

  • html/track/AudioTrack.h:
  • html/track/AudioTrack.idl:
  • html/track/AudioTrackConfiguration.h:

(WebCore::AudioTrackConfiguration::create):
(WebCore::AudioTrackConfiguration::codec const):
(WebCore::AudioTrackConfiguration::setCodec):
(WebCore::AudioTrackConfiguration::sampleRate const):
(WebCore::AudioTrackConfiguration::setSampleRate):
(WebCore::AudioTrackConfiguration::numberOfChannels const):
(WebCore::AudioTrackConfiguration::setNumberOfChannels):
(WebCore::AudioTrackConfiguration::bitrate const):
(WebCore::AudioTrackConfiguration::setBitrate):
(WebCore::AudioTrackConfiguration::AudioTrackConfiguration):

  • html/track/AudioTrackConfiguration.idl:
  • html/track/VideoTrack.cpp:

(WebCore::VideoTrack::VideoTrack):
(WebCore::VideoTrack::setPrivate):
(WebCore::VideoTrack::updateConfigurationFromPrivate):

  • html/track/VideoTrack.h:
  • html/track/VideoTrack.idl:
  • html/track/VideoTrackConfiguration.h: Added.

(WebCore::VideoTrackConfiguration::create):
(WebCore::VideoTrackConfiguration::codec const):
(WebCore::VideoTrackConfiguration::setCodec):
(WebCore::VideoTrackConfiguration::width const):
(WebCore::VideoTrackConfiguration::setWidth):
(WebCore::VideoTrackConfiguration::height const):
(WebCore::VideoTrackConfiguration::setHeight):
(WebCore::VideoTrackConfiguration::colorSpace const):
(WebCore::VideoTrackConfiguration::setColorSpace):
(WebCore::VideoTrackConfiguration::framerate const):
(WebCore::VideoTrackConfiguration::setFramerate):
(WebCore::VideoTrackConfiguration::bitrate const):
(WebCore::VideoTrackConfiguration::setBitrate):
(WebCore::VideoTrackConfiguration::VideoTrackConfiguration):

  • html/track/VideoTrackConfiguration.idl:
  • platform/graphics/AudioTrackPrivate.h:

(WebCore::AudioTrackPrivate::codec const):
(WebCore::AudioTrackPrivate::setCodec):
(WebCore::AudioTrackPrivate::sampleRate const):
(WebCore::AudioTrackPrivate::setSampleRate):
(WebCore::AudioTrackPrivate::numberOfChannels const):
(WebCore::AudioTrackPrivate::setNumberOfChannels):
(WebCore::AudioTrackPrivate::bitrate const):
(WebCore::AudioTrackPrivate::setBitrate):

  • platform/graphics/HEVCUtilities.cpp:

(WebCore::parseAVCCodecParameters):
(WebCore::createAVCCodecParametersString):
(WebCore::parseAVCDecoderConfigurationRecord):
(WebCore::parseHEVCCodecParameters):
(WebCore::createHEVCCodecParametersString):
(WebCore::parseHEVCDecoderConfigurationRecord):
(WebCore::parseDoViDecoderConfigurationRecord):
(WebCore::createDoViCodecParametersString):

  • platform/graphics/HEVCUtilities.h:
  • platform/graphics/PlatformVideoColorPrimaries.h:
  • platform/graphics/PlatformVideoColorSpace.h:

(WebCore::PlatformVideoColorSpace::encode const):
(WebCore::PlatformVideoColorSpace::decode):

  • platform/graphics/PlatformVideoMatrixCoefficients.h:
  • platform/graphics/PlatformVideoTransferCharacteristics.h:
  • platform/graphics/VideoTrackPrivate.h:

(WebCore::VideoTrackPrivate::codec const):
(WebCore::VideoTrackPrivate::setCodec):
(WebCore::VideoTrackPrivate::width const):
(WebCore::VideoTrackPrivate::setWidth):
(WebCore::VideoTrackPrivate::height const):
(WebCore::VideoTrackPrivate::setHeight):
(WebCore::VideoTrackPrivate::colorSpace const):
(WebCore::VideoTrackPrivate::setColorSpace):
(WebCore::VideoTrackPrivate::framerate const):
(WebCore::VideoTrackPrivate::setFramerate):
(WebCore::VideoTrackPrivate::bitrate const):
(WebCore::VideoTrackPrivate::setBitrate):

  • platform/graphics/VideoTrackPrivateClient.h:
  • platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
  • platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:

(WebCore::assetTrackFor):
(WebCore::formatDescriptionFor):
(WebCore::AVTrackPrivateAVFObjCImpl::codec const):
(WebCore::AVTrackPrivateAVFObjCImpl::width const):
(WebCore::AVTrackPrivateAVFObjCImpl::height const):
(WebCore::AVTrackPrivateAVFObjCImpl::colorSpace const):
(WebCore::AVTrackPrivateAVFObjCImpl::framerate const):
(WebCore::AVTrackPrivateAVFObjCImpl::sampleRate const):
(WebCore::AVTrackPrivateAVFObjCImpl::numberOfChannels const):
(WebCore::AVTrackPrivateAVFObjCImpl::bitrate const):

  • platform/graphics/avfoundation/AudioTrackPrivateAVF.h:

(WebCore::AudioTrackPrivateAVF::kind const): Deleted.
(WebCore::AudioTrackPrivateAVF::id const): Deleted.
(WebCore::AudioTrackPrivateAVF::label const): Deleted.
(WebCore::AudioTrackPrivateAVF::language const): Deleted.
(WebCore::AudioTrackPrivateAVF::trackIndex const): Deleted.

  • platform/graphics/avfoundation/FormatDescriptionUtilities.cpp: Added.

(WebCore::presentationSizeFromFormatDescription):
(WebCore::colorSpaceFromFormatDescription):
(WebCore::codecFromFormatDescription):

  • platform/graphics/avfoundation/FormatDescriptionUtilities.h:
  • platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h:
  • platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:

(WebCore::MediaSelectionOptionAVFObjC::assetTrack const):

  • platform/graphics/avfoundation/VideoTrackPrivateAVF.h:
  • platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:

(WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack):

  • platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:

(WebCore::VideoTrackPrivateAVFObjC::resetPropertiesFromTrack):

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

(WebCore::VideoTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):

  • platform/graphics/cocoa/VideoTrackPrivateWebM.cpp:

(WebCore::VideoTrackPrivateWebM::codec const):
(WebCore::VideoTrackPrivateWebM::width const):
(WebCore::VideoTrackPrivateWebM::height const):
(WebCore::VideoTrackPrivateWebM::framerate const):

  • platform/graphics/cocoa/VideoTrackPrivateWebM.h:

Source/WebCore/PAL:
Add an experimental trackConfiguration accessor on AudioTrack & VideoTrack.
https://bugs.webkit.org/show_bug.cgi?id=230841

Reviewed by Eric Carlson.

  • pal/cf/CoreMediaSoftLink.cpp:
  • pal/cf/CoreMediaSoftLink.h:
  • pal/spi/cocoa/AVFoundationSPI.h:

Source/WebKit:
Add an experimental trackConfiguration accessor on AudioTrack & VideoTrack.
https://bugs.webkit.org/show_bug.cgi?id=230841

Reviewed by Eric Carlson.

  • GPUProcess/media/RemoteAudioTrackProxy.cpp:

(WebKit::RemoteAudioTrackProxy::configuration):

  • GPUProcess/media/RemoteAudioTrackProxy.h:
  • GPUProcess/media/RemoteVideoTrackProxy.cpp:

(WebKit::RemoteVideoTrackProxy::configuration):
(WebKit::RemoteVideoTrackProxy::updateConfiguration):
(WebKit::RemoteVideoTrackProxy::selectedChanged):
(WebKit::RemoteVideoTrackProxy::idChanged):
(WebKit::RemoteVideoTrackProxy::labelChanged):
(WebKit::RemoteVideoTrackProxy::languageChanged):
(WebKit::RemoteVideoTrackProxy::configurationChanged): Deleted.

  • GPUProcess/media/RemoteVideoTrackProxy.h:
  • GPUProcess/media/TrackPrivateRemoteConfiguration.h:

(WebKit::TrackPrivateRemoteConfiguration::encode const):
(WebKit::TrackPrivateRemoteConfiguration::decode):

  • WebProcess/GPU/media/AudioTrackPrivateRemote.cpp:

(WebKit::AudioTrackPrivateRemote::updateConfiguration):

  • WebProcess/GPU/media/AudioTrackPrivateRemote.h:
  • WebProcess/GPU/media/VideoTrackPrivateRemote.cpp:

(WebKit::VideoTrackPrivateRemote::updateConfiguration):

  • WebProcess/GPU/media/VideoTrackPrivateRemote.h:

Source/WTF:
Add an experimental VideoTrackConfiguration class and accessor on VideoTrack
https://bugs.webkit.org/show_bug.cgi?id=230841

Reviewed by Eric Carlson.

Drive-by change: add a Vector::reverseFindMatching convenience method.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
  • wtf/Vector.h:

(WTF::Malloc>::reverseFindMatching const):

LayoutTests:
Add an experimental trackConfiguration accessor on AudioTrack & VideoTrack.
https://bugs.webkit.org/show_bug.cgi?id=230841

Reviewed by Eric Carlson.

  • fast/mediastream/MediaStream-video-element-expected.txt:
  • media/content/test-hevc.mp4: Added.
  • media/hevc-codec-parameters-expected.txt:
  • media/hevc-codec-parameters.html:
  • media/hevc-codec-string-expected.txt: Added.
  • media/hevc-codec-string.html: Added.
  • media/track/audio-track-configuration-expected.txt: Added.
  • media/track/audio-track-configuration.html: Added.
  • media/track/video-track-configuration-expected.txt: Added.
  • media/track/video-track-configuration.html: Added.
12:47 AM Changeset in webkit [286907] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore

[Cocoa] -[AVPlayerItem liveUpdateInterval] can hang the main thread for ~60ms
https://bugs.webkit.org/show_bug.cgi?id=234131

Reviewed by Eric Carlson.

Direct property access of AVFoundation objects can take tens of milliseconds to return
a value, even for simple properties. This impacts scrolling responsiveness.

-liveUpdateInterval is not KVO-observable, but only changes when -seekableTimeRanges does
as well. Query and cache that property during KVO of -seekableTimeRanges.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesLastModifiedTime const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::liveUpdateInterval const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesDidChange):
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):

12:01 AM Changeset in webkit [286906] by mmaxfield@apple.com
  • 3 edits in trunk/LayoutTests

Test gardening after r286889.
https://bugs.webkit.org/show_bug.cgi?id=234171

Unreviewed.

  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:

Dec 10, 2021:

11:17 PM Changeset in webkit [286905] by Simon Fraser
  • 12 edits in trunk/Source

Scrolling can drop frames when CoreAnimation commits take a long time
https://bugs.webkit.org/show_bug.cgi?id=234160
<rdar://86235740>

Reviewed by Tim Horton.

In r261985 I added a mechanism that has the scrolling thread wait for the main thread to
finish a rendering update, and, if the main thread fails to complete in time, then the
scrolling thread commits. This allows for scrolling synchronization when the main thread is
responsive, but smooth scrolling when the main thread is busy.

However, r261985 only waits for WebKit work to finish; what we really care about is whether
the main thread completes its CA commit in time (because that determines whether the scroll
shows on the screen).

So plumb through pre-/post-commit hooks from TiledCoreAnimationDrawingArea, which already
had them for inspector instrumentation. Then have ThreadedScrollingTree notify
m_stateCondition in didCompletePlatformRenderingUpdate(), instead of
didCompleteRenderingUpdate().
Source/WebCore:

Also, now we can call the inspector hooks from Page, rather than out in TiledCoreAnimationDrawingArea.

  • page/Page.cpp:

(WebCore::Page::willStartPlatformRenderingUpdate):
(WebCore::Page::didCompletePlatformRenderingUpdate):

  • page/Page.h:
  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::willStartPlatformRenderingUpdate):
(WebCore::ScrollingCoordinator::didCompletePlatformRenderingUpdate):

  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::didCompletePlatformRenderingUpdate):
(WebCore::ThreadedScrollingTree::didCompleteRenderingUpdate): Deleted.

  • page/scrolling/ThreadedScrollingTree.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.h:
  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::didCompletePlatformRenderingUpdate):

Source/WebKit:

Also, now we can call the inspector hooks from Page, rather than out in TiledCoreAnimationDrawingArea.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::willStartPlatformRenderingUpdate):
(WebKit::WebPage::didCompletePlatformRenderingUpdate):

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

(WebKit::TiledCoreAnimationDrawingArea::addCommitHandlers):

11:00 PM Changeset in webkit [286904] by Chris Dumez
  • 8 edits in trunk

Implement AbortSignal.throwIfAborted
https://bugs.webkit.org/show_bug.cgi?id=234127

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Resync WPT test from upstream to gain test coverage and rebaseline it.

  • web-platform-tests/dom/abort/event.any-expected.txt:
  • web-platform-tests/dom/abort/event.any.js:
  • web-platform-tests/dom/abort/event.any.worker-expected.txt:

Source/WebCore:

Implement AbortSignal.throwIfAborted as per:

No new tests, updated / rebaselined existing test.

  • dom/AbortSignal.cpp:

(WebCore::AbortSignal::throwIfAborted):

  • dom/AbortSignal.h:
  • dom/AbortSignal.idl:
10:40 PM Changeset in webkit [286903] by Kocsen Chung
  • 1 copy in tags/Safari-613.1.11.3

Tag Safari-613.1.11.3.

10:20 PM Changeset in webkit [286902] by Kocsen Chung
  • 9 edits in branches/safari-613.1.11-branch/Source

Versioning.

WebKit-7613.1.11.3

9:11 PM Changeset in webkit [286901] by ysuzuki@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Wasm catch thunk should be JIT code to use ExceptionHandlerPtrTag
https://bugs.webkit.org/show_bug.cgi?id=234183

Reviewed by Tadeu Zagallo.

ExceptionHandlerPtrTag is only usable for JITCode. Thus, we should not tag wasm catch LLInt code with it.
This patch fixes it by using trampoline. This is the same to normal LLInt's handleCatchThunk.

  • assembler/JITOperationList.cpp:

(JSC::JITOperationList::populatePointersInJavaScriptCoreForLLInt):

  • llint/LLIntExceptions.cpp:

(JSC::LLInt::handleWasmCatch):
(JSC::LLInt::handleWasmCatchAll):

  • llint/LLIntThunks.cpp:

(JSC::LLInt::handleWasmCatchThunk):
(JSC::LLInt::handleWasmCatchAllThunk):

  • llint/LLIntThunks.h:
7:43 PM Changeset in webkit [286900] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit

Momentum Event Dispatcher: Magic Mouse doesn't use momentum event dispatcher
https://bugs.webkit.org/show_bug.cgi?id=234189
<rdar://problem/86344954>

Reviewed by Simon Fraser.

  • Shared/mac/ScrollingAccelerationCurveMac.mm:

(WebKit::fromIOHIDDevice):
Fix the FIXME here about the additional fallback values; it turns out
Magic Mouse is one device that does not have a value for
kIOHIDScrollAccelerationTypeKey, so we need the full fallback chain to support it.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::sendWheelEvent):
Un-wrapping this optional results in losing the engaged state, and sending
a garbage ScrollingAccelerationCurve across the wire.
The message argument is also an optional, so just pass it along.

The result of this bug was that if you had ever used a device with a curve
for a given page, and then used a device with no curve, MomentumEventDispatcher
would have a garbage curve (from this message trying to "unset" the optional),
and a garbage curve results in chaotic scrolling.

7:24 PM Changeset in webkit [286899] by Kyle Piddington
  • 4 edits in trunk/Source/ThirdParty/ANGLE

[ANGLE] ASTC-HDR is unavailable on some platforms
https://bugs.webkit.org/show_bug.cgi?id=234164

Reviewed by Kenneth Russell.

Update autogenerated format table to avoid using ASTC_HDR on
platforms that don't have the enum.

  • src/libANGLE/renderer/metal/gen_mtl_format_table.py:

(gen_image_map_switch_astc_case_iosmac):
(gen_image_map_switch_astc_case_tvos):
(gen_image_map_switch_astc_case_tvos.gen_format_assign_code):
(gen_image_map_switch_string):
(gen_image_mtl_to_angle_switch_string):
(gen_mtl_format_caps_init_string):
(gen_image_map_switch_astc_case): Deleted.
(gen_image_map_switch_astc_case.gen_format_assign_code): Deleted.

  • src/libANGLE/renderer/metal/mtl_format_map.json:
  • src/libANGLE/renderer/metal/mtl_format_table_autogen.mm:

(rx::mtl::Format::MetalToAngleFormatID):
(rx::mtl::Format::init):
(rx::mtl::FormatTable::initNativeFormatCapsAutogen):

7:02 PM Changeset in webkit [286898] by Alexey Shvayka
  • 5 edits
    3 adds in trunk

Setting "onselectionchange" content attribute should add an event listener
https://bugs.webkit.org/show_bug.cgi?id=234167

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Import WPT tests from https://github.com/web-platform-tests/wpt/pull/32013.

  • web-platform-tests/selection/textcontrols: Added.
  • web-platform-tests/selection/textcontrols/onselectionchange-content-attribute-expected.txt: Added.
  • web-platform-tests/selection/textcontrols/onselectionchange-content-attribute.html: Added.

Source/WebCore:

This patch implements full support for "onselectionchange" content attribute,
enabling it to add an event listener on any element, which fixes regression
introduced in r268745 and aligns "onselectionchange" with "onselectstart".

Aligns WebKit with Gecko and the spec [1].

[1] https://w3c.github.io/selection-api/#extensions-to-globaleventhandlers-interface

Tests: fast/dom/event-handler-attributes.html

imported/w3c/web-platform-tests/selection/textcontrols/onselectionchange-content-attribute.html

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::createEventHandlerNameMap):

LayoutTests:

  • fast/dom/event-handler-attributes-expected.txt:
6:45 PM Changeset in webkit [286897] by jh718.park@samsung.com
  • 14 edits in trunk

Don't do simplification for percentage comparison resolution against negative reference values.
https://bugs.webkit.org/show_bug.cgi?id=233987

Reviewed by Darin Adler.

A percentage may be resolved against a negative value, which is allowed only in 'background-position' property.

Currently in CSSCalcExpressionNodeParser::parseCalc,
it creates CSSCalcExpressionNode tree result and does simplification for it.
But during it, e.g. min(50%, 10%) is simplified to min(10%) and max(50%, 10%) is simplified to max(50%),
which is the opposite result what should be done against negative basis.

With this patch, the percentage comparison resolution against nagative basis is done correctly.

The corresponding spec is step 4's note described below in
https://drafts.csswg.org/css-values-4/#simplify-a-calculation-tree.

'If a percentage is left at this point, it will usually block simplification of the node,
since it needs to be resolved against another value using information not currently available.
(Otherwise, it would have been converted to a different value in an earlier step.)
This includes operations such as "min", since percentages might resolve against a negative basis,
and thus end up with an opposite comparative relationship than the raw percentage value would seem to indicate.'

LayoutTests/imported/w3c:

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

Source/WebCore:

  • css/calc/CSSCalcExpressionNodeParser.cpp:

(WebCore::CSSCalcExpressionNodeParser::parseCalc):

  • css/calc/CSSCalcExpressionNodeParser.h:
  • css/calc/CSSCalcOperationNode.cpp:

(WebCore::CSSCalcOperationNode::combineChildren):

  • css/calc/CSSCalcOperationNode.h:
  • css/calc/CSSCalcValue.cpp:

(WebCore::CSSCalcValue::create):

  • css/calc/CSSCalcValue.h:
  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeBackgroundPosition):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::CalcParser::CalcParser):
(WebCore::CSSPropertyParserHelpers::consumeLengthOrPercent):
(WebCore::CSSPropertyParserHelpers::consumePositionComponent):
(WebCore::CSSPropertyParserHelpers::consumePositionCoordinates):

  • css/parser/CSSPropertyParserHelpers.h:

LayoutTests:

6:32 PM Changeset in webkit [286896] by msaboff@apple.com
  • 17 edits in trunk/Source

https://bugs.webkit.org/show_bug.cgi?id=234173
Update Install Paths for build system changes

Reviewed by Yusuke Suzuki.

Updated install paths for changes in the build system that use a system path prefix.

Source/JavaScriptCore:

  • Configurations/Base.xcconfig:

Source/ThirdParty/ANGLE:

  • Configurations/ANGLE-dynamic.xcconfig:

Source/ThirdParty/libwebrtc:

  • Configurations/libwebrtc.xcconfig:

Source/WebCore:

Covered by existing tests.

  • Configurations/WebCore.xcconfig:

Source/WebGPU:

  • Configurations/WebGPU.xcconfig:

Source/WebInspectorUI:

  • Configurations/WebInspectorUIFramework.xcconfig:

Source/WebKit:

  • Configurations/BaseTarget.xcconfig:
  • Configurations/WebKit.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/WebKitLegacy.xcconfig:
6:26 PM Changeset in webkit [286895] by commit-queue@webkit.org
  • 18 edits
    14 adds in trunk

Some WebIDL operations / attributes incorrectly use _current_ realm instead of _relevant_
https://bugs.webkit.org/show_bug.cgi?id=230941

Patch by Alexey Shvayka <ashvayka@apple.com> on 2021-12-10
Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Import WPT tests from https://github.com/web-platform-tests/wpt/pull/32012.

  • web-platform-tests/dom/events/Event-timestamp-cross-realm-getter-expected.txt: Added.
  • web-platform-tests/dom/events/Event-timestamp-cross-realm-getter.html: Added.
  • web-platform-tests/html/browsers/history/the-history-interface/history_back_cross_realm_method-expected.txt: Added.
  • web-platform-tests/html/browsers/history/the-history-interface/history_back_cross_realm_method.html: Added.
  • web-platform-tests/html/browsers/history/the-history-interface/history_forward_cross_realm_method-expected.txt: Added.
  • web-platform-tests/html/browsers/history/the-history-interface/history_forward_cross_realm_method.html: Added.
  • web-platform-tests/html/browsers/history/the-history-interface/history_go_cross_realm_method-expected.txt: Added.
  • web-platform-tests/html/browsers/history/the-history-interface/history_go_cross_realm_method.html: Added.
  • web-platform-tests/html/webappapis/scripting/reporterror-cross-realm-method-expected.txt: Added.
  • web-platform-tests/html/webappapis/scripting/reporterror-cross-realm-method.html: Added.
  • web-platform-tests/html/webappapis/structured-clone/structured-clone-cross-realm-method-expected.txt: Added.
  • web-platform-tests/html/webappapis/structured-clone/structured-clone-cross-realm-method.html: Added.
  • web-platform-tests/requestidlecallback/callback-timeRemaining-cross-realm-method-expected.txt: Added.
  • web-platform-tests/requestidlecallback/callback-timeRemaining-cross-realm-method.html: Added.

Source/WebCore:

This patch replaces _current_ global object with _relevant_, as per recommendation
for spec authors [1], for select WebIDL operations / attributes that satisfy all
the following conditions:

1) it's an instance member: static ones and constructors can't use _relevant_;
2) it's on standards track (not deprecated / WebKit-only / internal);
3) the change is directly observable: global object is used for something

beyond lifecycle / event loop / parsing CSS etc;

4) the change either aligns WebKit with both Blink and Gecko,

or the spec explicitly requires _relevant_ realm / settings object.

Most of the remaining [CallWith=GlobalObject] instances are correctly used for
converting JS arguments to WebIDL values; the rest, along with _current_ Document
and ScriptExecutionContext, either match the spec or replacing them with _relevant_
global object is not directly observable (see condition #3).

This change is aimed at fixing web-exposed APIs rather than performing a global cleanup.

[1] https://html.spec.whatwg.org/multipage/webappapis.html#concept-current-everything

Tests: imported/w3c/web-platform-tests/dom/events/Event-timestamp-cross-realm-getter.html

imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/history_back_cross_realm_method.html
imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/history_forward_cross_realm_method.html
imported/w3c/web-platform-tests/html/browsers/history/the-history-interface/history_go_cross_realm_method.html
imported/w3c/web-platform-tests/html/webappapis/scripting/reporterror-cross-realm-method.html
imported/w3c/web-platform-tests/html/webappapis/structured-clone/structured-clone-cross-realm-method.html
imported/w3c/web-platform-tests/requestidlecallback/callback-timeRemaining-cross-realm-method.html

  • Modules/indexeddb/IDBFactory.idl:

https://www.w3.org/TR/IndexedDB/#dom-idbfactory-open (step 2)
https://www.w3.org/TR/IndexedDB/#dom-idbfactory-deletedatabase (step 1)
https://www.w3.org/TR/IndexedDB/#dom-idbfactory-databases (step 1)

  • Modules/paymentrequest/PaymentRequest.idl:

https://www.w3.org/TR/payment-request/#show-method (steps 2-4)
https://www.w3.org/TR/payment-request/#can-make-payment-algorithm (before step 1)

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateCallWith):

  • bindings/scripts/IDLAttributes.json:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/TestObj.idl:
  • dom/Event.idl:

https://dom.spec.whatwg.org/#inner-event-creation-steps (step 3)

  • dom/IdleDeadline.idl:

https://w3c.github.io/requestidlecallback/#the-requestidlecallback-method (step 1)

  • page/History.idl:

https://html.spec.whatwg.org/multipage/history.html#dom-history-go (step 1)
https://html.spec.whatwg.org/multipage/history.html#dom-history-back (step 1)
https://html.spec.whatwg.org/multipage/history.html#dom-history-forward (step 1)

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::setTimeout):
(WebCore::DOMWindow::setInterval):

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

(WebCore::WorkerGlobalScope::setTimeout):
(WebCore::WorkerGlobalScope::setInterval):

  • workers/WorkerGlobalScope.h:

Although condition #4 isn't satisfied for setTimeout() / setInterval() because
_current_ global object is used only for logging, replacing it with _relevant_
nicely cleans up method signatures.

  • page/WindowOrWorkerGlobalScope.cpp:

(WebCore::WindowOrWorkerGlobalScope::structuredClone):

  • page/WindowOrWorkerGlobalScope.h:
  • page/WindowOrWorkerGlobalScope.idl:

https://html.spec.whatwg.org/multipage/webappapis.html#report-the-exception
https://html.spec.whatwg.org/multipage/structured-data.html#structured-cloning (step 2)

6:06 PM Changeset in webkit [286894] by Devin Rousso
  • 22 edits
    3 adds in trunk

WKWebView doesn’t respond to -copyFont: and -pasteFont:
https://bugs.webkit.org/show_bug.cgi?id=191379
<rdar://problem/45878659>

Reviewed by Wenson Hsieh.

Source/WebCore:

Test: editing/execCommand/mac/copyFont-pasteFont.html

  • dom/DOMPasteAccess.h:

Add DOMPasteAccessCategory::Fonts (which corresponds to NSPasteboardNameFont on macOS).

  • editing/Editor.h:
  • editing/Editor.cpp:

(WebCore::eventNameForClipboardEvent):
(WebCore::createDataTransferForClipboardEvent):
(WebCore::Editor::copyFont): Added.
(WebCore::Editor::pasteFont): Added.
Add platform-agnostic handling for "CopyFont" and "PasteFont" editor commands.

  • editing/mac/EditorMac.mm:

(WebCore::Editor::platformCopyFont): Added.
(WebCore::Editor::platformPasteFont): Added.
Mimic the logic in -[WebHTMLView copyFont:]/-[WebHTMLView pasteFont:] to be compatible
with WK1 (i.e. to make it easier for clients to switch to WK2).

  • editing/gtk/EditorGtk.cpp:

(WebCore::Editor::platformCopyFont): Added.
(WebCore::Editor::platformPasteFont): Added.

  • editing/ios/EditorIOS.mm:

(WebCore::Editor::platformCopyFont): Added.
(WebCore::Editor::platformPasteFont): Added.

  • editing/libwpe/EditorLibWPE.cpp:

(WebCore::Editor::platformCopyFont): Added.
(WebCore::Editor::platformPasteFont): Added.

  • editing/win/EditorWin.cpp:

(WebCore::Editor::platformCopyFont): Added.
(WebCore::Editor::platformPasteFont): Added.
Add stubs for other platforms.

  • editing/EditorCommand.cpp:

(WebCore::executeCopyFont): Added.
(WebCore::executePasteFont): Added.
(WebCore::createCommandMap):
Hook "CopyFont" and "PasteFont" editor commands up to document.execCommand.

Source/WebKit:

  • UIProcess/API/mac/WKView.mm:
  • UIProcess/API/mac/WKWebViewMac.mm:

Add -copyFont: and -pasteFont: methods via WEBCORE_COMMAND.

  • UIProcess/WebPageProxy.cpp:

(WebKit::pasteAccessCategoryForCommand):
The PasteFont command should be categorized as DOMPasteAccessCategory::Fonts.

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::pasteboardNameForAccessCategory):
(WebKit::pasteboardForAccessCategory):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::willPerformPasteCommand):
Correlate DOMPasteAccessCategory::Fonts with NSPasteboardNameFont.

  • UIProcess/ios/WKContentViewInteraction.mm:

(pasteboardNameForAccessCategory):
(pasteboardForAccessCategory):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::willPerformPasteCommand):
Correlate DOMPasteAccessCategory::Fonts with UIPasteboardNameGeneral.

LayoutTests:

  • editing/editing.js:

(execCopyFontCommand): Added.
(copyFontCommand): Added.
(execPasteFontCommand): Added.
(pasteFontCommand): Added.

  • editing/execCommand/mac/copyFont-pasteFont.html: Added.
  • editing/execCommand/mac/copyFont-pasteFont-expected.html: Added.
5:25 PM Changeset in webkit [286893] by eric.carlson@apple.com
  • 50 edits
    2 copies
    8 adds in trunk

[macOS] Add new screen and window capture backend
https://bugs.webkit.org/show_bug.cgi?id=234029

Reviewed by Jer Noble and Youenn Fablet.

Source/WebCore:

New API test: GetDisplayMediaWindowAndScreen.mm

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • en.lproj/Localizable.strings: Add strings for window and screen prompts.
  • platform/mediastream/MediaConstraints.h:

(WebCore::StringConstraint::getExact const): Drive-by: fix logic inversion bug.
(WebCore::StringConstraint::getIdeal const): Ditto.

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::fitnessDistance): Assert if device ID constraint is
not a string.

  • platform/mediastream/RealtimeMediaSourceCenter.h:

(WebCore::RealtimeMediaSourceCenter::useScreenCaptureKit const):
(WebCore::RealtimeMediaSourceCenter::setUseScreenCaptureKit):
(WebCore::RealtimeMediaSourceCenter::useMockCaptureDevices const):
(WebCore::RealtimeMediaSourceCenter::setUseMockCaptureDevices):

  • platform/mediastream/cocoa/DisplayCaptureSourceCocoa.cpp:

(WebCore::DisplayCaptureSourceCocoa::create):
(WebCore::DisplayCaptureSourceCocoa::DisplayCaptureSourceCocoa):
(WebCore::DisplayCaptureSourceCocoa::Capturer::setObserver):
(WebCore::DisplayCaptureSourceCocoa::Capturer::capturerIsRunningChanged): Deleted.

  • platform/mediastream/cocoa/DisplayCaptureSourceCocoa.h:

(WebCore::CapturerObserver::capturerIsRunningChanged):
(WebCore::CapturerObserver::capturerFailed):

  • platform/mediastream/ios/ReplayKitCaptureSource.mm:

(WebCore::ReplayKitCaptureSource::captureStateDidChange):

  • platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp:

(WebCore::DisplayCaptureManagerCocoa::updateDisplayCaptureDevices): Use
ScreenCaptureKitCaptureSource when available.
(WebCore::DisplayCaptureManagerCocoa::updateWindowCaptureDevices): Ditto.
(WebCore::DisplayCaptureManagerCocoa::screenCaptureDeviceWithPersistentID): Ditto.
(WebCore::DisplayCaptureManagerCocoa::windowCaptureDeviceWithPersistentID): Ditto.

  • platform/mediastream/mac/ScreenCaptureKitCaptureSource.h: Added.
  • platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm: Added.

(-[WebCoreScreenCaptureKitHelper initWithCallback:]):
(-[WebCoreScreenCaptureKitHelper disconnect]):
(-[WebCoreScreenCaptureKitHelper stream:didStopWithError:]):
(WebCore::usingOldAPI):
(WebCore::ScreenCaptureKitCaptureSource::isAvailable):
(WebCore::ScreenCaptureKitCaptureSource::create):
(WebCore::ScreenCaptureKitCaptureSource::ScreenCaptureKitCaptureSource):
(WebCore::ScreenCaptureKitCaptureSource::~ScreenCaptureKitCaptureSource):
(WebCore::ScreenCaptureKitCaptureSource::start):
(WebCore::ScreenCaptureKitCaptureSource::stop):
(WebCore::ScreenCaptureKitCaptureSource::streamFailedWithError):
(WebCore::ScreenCaptureKitCaptureSource::generateFrame):
(WebCore::ScreenCaptureKitCaptureSource::processSharableContent):
(WebCore::ScreenCaptureKitCaptureSource::findShareableContent):
(WebCore::ScreenCaptureKitCaptureSource::streamConfiguration):
(WebCore::ScreenCaptureKitCaptureSource::startContentStream):
(WebCore::ScreenCaptureKitCaptureSource::intrinsicSize const):
(WebCore::ScreenCaptureKitCaptureSource::updateStreamConfiguration):
(WebCore::ScreenCaptureKitCaptureSource::commitConfiguration):
(WebCore::ScreenCaptureKitCaptureSource::captureQueue):
(WebCore::ScreenCaptureKitCaptureSource::frameAvailableHandler):
(WebCore::ScreenCaptureKitCaptureSource::deviceType const):
(WebCore::ScreenCaptureKitCaptureSource::surfaceType const):
(WebCore::ScreenCaptureKitCaptureSource::screenCaptureDeviceWithPersistentID):
(WebCore::ScreenCaptureKitCaptureSource::screenCaptureDevices):
(WebCore::ScreenCaptureKitCaptureSource::windowCaptureDeviceWithPersistentID):
(WebCore::ScreenCaptureKitCaptureSource::windowCaptureDevices):
(WebCore::ScreenCaptureKitCaptureSource::forEachNSWindow):

  • platform/mock/MockMediaDevice.h:

(WebCore::MockMediaDevice::captureDevice const): Make devices enabled by default.
Initialize screen and window devices with the correct type.

  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::defaultDevices): Fix window device types.
(WebCore::MockRealtimeMediaSourceCenter::displayDevices):

  • platform/mock/MockRealtimeMediaSourceCenter.h:

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/mac/ScreenCaptureKitSoftLink.h: Added.
  • pal/mac/ScreenCaptureKitSoftLink.mm: Added.

Source/WebKit:

  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/WKPreferences.mm: Add _useScreenCaptureKit private preference.

(-[WKPreferences _useScreenCaptureKit]):
(-[WKPreferences _setUseScreenCaptureKit:]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Add private delegate for a

getDisplayMedia-specific prompt.

  • UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
  • UIProcess/API/Cocoa/WKWebViewTesting.mm:

(-[WKWebView _setIndexOfGetDisplayMediaDeviceSelectedForTesting:]): Set the index
of the screen or window device to return for getDisplayMedia without prompting.

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

(WebKit::UIDelegate::UIClient::promptForDisplayCapturePermission): Call new
screen/window capture delegate.
(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):

  • UIProcess/UserMediaPermissionRequestProxy.cpp:

(WebKit::UserMediaPermissionRequestProxy::create):
(WebKit::UserMediaPermissionRequestProxy::promptForGetDisplayMedia): Add parameter
specifying a window or screen capture prompt.

  • UIProcess/UserMediaPermissionRequestProxy.h:

(WebKit::UserMediaPermissionRequestProxy::create):
(WebKit::UserMediaPermissionRequestProxy::manager const):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setIndexOfGetDisplayMediaDeviceSelectedForTesting):

  • UIProcess/WebPageProxy.h:
  • UIProcess/mac/DisplayCaptureSessionManager.h: Added.

(WebKit::DisplayCaptureSessionManager::setIndexOfDeviceSelectedForTesting):

  • UIProcess/mac/DisplayCaptureSessionManager.mm: Added.

(WebKit::getMockWindowList):
(WebKit::getCGWindowList):
(WebKit::getWindowList):
(WebKit::alertForWindowSelection):
(WebKit::DisplayCaptureSessionManager::alertForGetDisplayMedia):
(WebKit::DisplayCaptureSessionManager::isAvailable):
(WebKit::DisplayCaptureSessionManager::singleton):
(WebKit::DisplayCaptureSessionManager::DisplayCaptureSessionManager):
(WebKit::DisplayCaptureSessionManager::~DisplayCaptureSessionManager):
(WebKit::DisplayCaptureSessionManager::promptForGetDisplayMedia):
(WebKit::DisplayCaptureSessionManager::deviceSelectedForTesting):
(WebKit::DisplayCaptureSessionManager::showWindowPicker):
(WebKit::DisplayCaptureSessionManager::showScreenPicker):

  • UIProcess/mac/UserMediaPermissionRequestProxyMac.h: Added.
  • UIProcess/mac/UserMediaPermissionRequestProxyMac.mm: Added.

(WebKit::UserMediaPermissionRequestProxy::create):
(WebKit::UserMediaPermissionRequestProxyMac::UserMediaPermissionRequestProxyMac):
(WebKit::UserMediaPermissionRequestProxyMac::~UserMediaPermissionRequestProxyMac):
(WebKit::UserMediaPermissionRequestProxyMac::promptForGetDisplayMedia):
(WebKit::UserMediaPermissionRequestProxyMac::canPromptForGetDisplayMedia):

  • WebKit.xcodeproj/project.pbxproj:

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml: Add UseScreenCaptureKit.
  • wtf/PlatformHave.h: Define HAVE_SCREEN_CAPTURE_KIT.
  • wtf/cocoa/SoftLinking.h: Add softlink macros that take an API_AVAILABLE check.

Tools:

  • TestWebKitAPI/SourcesCocoa.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/GetDisplayMediaWindowAndScreen.mm: Added.

(-[WindowAndScreenCaptureTestView haveStream:]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewUnderPageBackgroundColor.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WebProcessTerminate.mm:
  • TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.h:
  • TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.mm:

(-[UserMediaCaptureUIDelegate init]):
(-[UserMediaCaptureUIDelegate setGetDisplayMediaDecision:]):
(-[UserMediaCaptureUIDelegate _webView:requestDisplayCapturePermissionForOrigin:initiatedByFrame:decisionHandler:]):

5:17 PM Changeset in webkit [286892] by Mikhail R. Gadelha
  • 2 edits in trunk/Source/JavaScriptCore

[JSC][32bit] Add callee save registers for MIPS
https://bugs.webkit.org/show_bug.cgi?id=233766

Reviewed by Mark Lam.

This patch enables callee save registers for mips, which fixes an
assertion violation from the call frame shufflers in some tests if
jsc was built with assertions enabled (either debug or release+assert
mode).

  • jit/RegisterSet.cpp:

(JSC::RegisterSet::llintBaselineCalleeSaveRegisters):
(JSC::RegisterSet::dfgCalleeSaveRegisters):

5:10 PM Changeset in webkit [286891] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] isTaggedJSCCodePtrImpl does not have proper implementation for JITCage & JITCode combination
https://bugs.webkit.org/show_bug.cgi?id=234186

Reviewed by Mark Lam.

If JITCage is enabled and target code is JITCode, we should use tagJSCCodePtrImpl.

  • runtime/JSCPtrTag.h:

(JSC::isTaggedJSCCodePtrImpl):

5:08 PM Changeset in webkit [286890] by Razvan Caliman
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Add CSS variable names to property name completion list
https://bugs.webkit.org/show_bug.cgi?id=233372
<rdar://83205968>

Reviewed by Devin Rousso.

Add the list of applicable CSS variables to the list of CSS property name completions.

WI.CSSPropertyNameCompletions is a long-lived object that holds all supported property names.
It doesn't need to change over time in a Web Inspector session. But the list of applicable
CSS variables depends on the selected node.

To avoid thrashing the long list of values in WI.CSSPropertyNameCompletions we don't proactively collect
CSS variables. Instead, we introduce a flag to indicate that the list of CSS variables may
be stale whenever the inspected node changes. Only when completions are requested do we check
this flag and augment the list of CSS property names with the latest list of CSS variables.

  • UserInterface/Models/CSSCompletions.js:

(WI.CSSCompletions.prototype.replaceValues):
Allow a sub-class to replace the list of values in one go.
If a WI.CSSQueryController was used, reset it and provide it the new list of values.

  • UserInterface/Models/CSSPropertyNameCompletions.js:

(WI.CSSPropertyNameCompletions):
(WI.CSSPropertyNameCompletions.prototype.executeQuery):
(WI.CSSPropertyNameCompletions.prototype.startsWith):
(WI.CSSPropertyNameCompletions.prototype._updateValuesWithLatestCSSVariablesIfNeeded):
Holding a copy of the original list of CSS property names in order to create a new list
agumented with variables on demand.

(WI.CSSPropertyNameCompletions.prototype.addValues):
Warn when trying to add new property values which would overwrite the cached and sorted list of CSS property names.

(WI.CSSPropertyNameCompletions.prototype._handleInspectedNodeChanged):
Consider changing of the inspected node as an indicator that the list of variables is stale.
That may not necessarily be true for web pages with all CSS variables declared on :root or <html>,
but iterating over them to verify is needlessly expensive especially if completions were not even requested.

(WI.CSSPropertyNameCompletions.prototype._handleNodesStylesNeedsRefresh):
Consider any change to the styles of the inspected node as a potential change to the list of applicable variables.

(WI.CSSPropertyNameCompletions):

4:53 PM Changeset in webkit [286889] by mmaxfield@apple.com
  • 6 edits
    2 adds in trunk

[Cocoa] OT-SVG glyphs don't draw into canvases (because of the GPU process)
https://bugs.webkit.org/show_bug.cgi?id=234171
<rdar://problem/70166552>

Reviewed by Devin Rousso.

Source/WebCore:

Drawing OT-SVG glyphs into canvas was intentionally disabled in https://trac.webkit.org/changeset/269211/webkit.
This patch enables it again. Rather than doing anything complicated like supporting all of SVG in DrawGlyphsRecorder,
we can simply support this by drawing the glyphs into a ImageBuffer and sending the ImageBuffer to the GPU process.

For text, it's pretty important that the pixel grid of the ImageBuffer matches the pixel grid of the destination,
rather than being offset by half a pixel or something. This patch adds a new creation function to ImageBuffer which
accepts a FloatRect (instead of the previous FloatSize which it used to accept). The FloatRect is necessary because
inflating the geometry has to happen on both the left and the right if we want the pixel grids to match.

Test: fast/text/otsvg-canvas.html

  • platform/graphics/DrawGlyphsRecorder.h:
  • platform/graphics/ImageBuffer.cpp:

(WebCore::ImageBuffer::createCompatibleBuffer):
(WebCore::ImageBuffer::compatibleBufferInfo):

  • platform/graphics/ImageBuffer.h:
  • platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:

(WebCore::DrawGlyphsRecorder::drawOTSVGRun):
(WebCore::DrawGlyphsRecorder::drawNonOTSVGRun):
(WebCore::DrawGlyphsRecorder::drawBySplittingIntoOTSVGAndNonOTSVGRuns):
(WebCore::DrawGlyphsRecorder::drawGlyphs):
(WebCore::filterOutOTSVGGlyphs): Deleted.

LayoutTests:

  • fast/text/otsvg-canvas-expected.html: Added.
  • fast/text/otsvg-canvas.html: Added.
4:53 PM Changeset in webkit [286888] by Alan Coon
  • 1 copy in tags/Safari-613.1.11.2

Tag Safari-613.1.11.2.

4:47 PM Changeset in webkit [286887] by BJ Burg
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: save and restore extension tab positions
https://bugs.webkit.org/show_bug.cgi?id=234115
<rdar://85560636>

Reviewed by Devin Rousso and Patrick Angle.

The existing tab state restoration system works by saving or loading tab positions
from persistent storage and saving or restoring each tab's state using one cookie per tab type.

With extension tabs, it is now possible to have more than one tab per tab type.
Additionally, extension tabs can be added at any time via InspectorFrontendAPI.
Given these challenges, we need a different system for saving and restoring extension tabs.

Extension tab restoration is now handled by WI.WebInspectorExtensionController.
We consider a tab to be an 'anchor' tab if it is saveable, visible, and not pinnable.
In other words, an anchor tab is one of the built-in singleton tabs like Console, Elements, etc.

When the tab bar item list is modified, for each extension tab, we save the observed
'anchor' tab's type and a distance from that anchor tab's insertion index.
Updates to extension tab positions are saved to persistent storage at most every 5 seconds.

When it is time to place an extension tab with createTabForExtension() or showExtensionTab(),
perform the reverse operation of computing an insertion index from a anchorTabType and distanceFromAnchorTab.

This patch was tested with one extension, multiple extensions, showing/hiding extension tabs,
remote inspecting a JSContext, and remote inspecting a WKWebView.

  • UserInterface/Views/TabBar.js:

(WI.TabBar.prototype.get visibleTabBarItemsFromLeftToRight): Added.

  • UserInterface/Controllers/WebInspectorExtensionController.js:

(WI.WebInspectorExtensionController):
(WI.WebInspectorExtensionController.get extensionTabPositionsObjectStoreKey): Added.

(WI.WebInspectorExtensionController.prototype.registerExtension):
(WI.WebInspectorExtensionController.prototype.unregisterExtension):
Add and remove WI.TabBar event listeners that notify us of changes to the tab bar.

(WI.WebInspectorExtensionController.prototype.createTabForExtension): Deleted.
(WI.WebInspectorExtensionController.prototype.async createTabForExtension): Renamed.
Load saved tab positions from persistent storage if needed. Compute the insertion index for the new tab.
This method is already expected to return a promise, so make it async to allow using await.

(WI.WebInspectorExtensionController.prototype.showExtensionTab):
Compute the insertion index for the new tab.

(WI.WebInspectorExtensionController.prototype.async _loadExtensionTabPositions):
Load saved tab positions from persistent storage, allowing for the case where nothing has been saved yet.

(WI.WebInspectorExtensionController.prototype.async _saveExtensionTabPositions):
Recompute and save tab positions for all extension tabs. Then write to persistent storage
at most every 5 seconds using a WI.Debouncer.

(WI.WebInspectorExtensionController.prototype._insertionIndexForExtensionTab): Added, wrapper method.
(WI.WebInspectorExtensionController.prototype._computeIndicesForExtensionTab):
Compute the anchorTabType, distanceFromAnchorTab, and insertionIndex for the extension tab.
If saving tab positions, pass options.recomputePositions to ignore saved positions
and recompute these fields based on what is currently visible in the tab bar.

  • UserInterface/Views/WebInspectorExtensionTabContentView.js:

(WI.WebInspectorExtensionTabContentView.prototype.get savedTabPositionKey): Added.

4:46 PM Changeset in webkit [286886] by Megan Gardner
  • 16 edits in trunk/Source

Image does not update after Markup Pane is dismissed.
https://bugs.webkit.org/show_bug.cgi?id=234162

Reviewed by Devin Rousso.

Once the item is retured from the Sharing Service, we need to pipe the information
back to the attachement element so that it can be properly updated.
This includes holding onto the attachment ID of the controlled image so that it
can later be found and updated.

Source/WebCore:

  • dom/mac/ImageControlsMac.cpp:

(WebCore::ImageControlsMac::handleEvent):

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::setAttachmentElement):

  • page/ChromeClient.h:

(WebCore::ChromeClient::handleImageServiceClick):

Source/WebKit:

  • Shared/ContextMenuContextData.cpp:

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

  • Shared/ContextMenuContextData.h:

(WebKit::ContextMenuContextData::controlledImageAttachmentID const):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):

  • UIProcess/API/Cocoa/_WKAttachment.h:
  • UIProcess/API/Cocoa/_WKAttachment.mm:

(-[_WKAttachment setData:newContentType:]):

  • UIProcess/API/Cocoa/_WKAttachmentInternal.h:
  • UIProcess/mac/WKSharingServicePickerDelegate.h:
  • UIProcess/mac/WKSharingServicePickerDelegate.mm:

(-[WKSharingServicePickerDelegate setAttachmentID:]):
(-[WKSharingServicePickerDelegate sharingService:didShareItems:]):

  • UIProcess/mac/WebContextMenuProxyMac.mm:

(WebKit::WebContextMenuProxyMac::setupServicesMenu):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::handleImageServiceClick):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::handleImageServiceClick):

4:40 PM Changeset in webkit [286885] by Nikita Vasilyev
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: Add a swatch for justify-content, justify-items, and justify-self
https://bugs.webkit.org/show_bug.cgi?id=233055
<rdar://problem/85613257>

Reviewed by Patrick Angle.

Add an inline swatch for justify-content, that shows icons for common values:
start, center, end, space-between, space-around, space-evenly, and stretch.

Also, add inline swatches for justify-items and justify-self, that shows icons for:
start, center, end, and stretch.

The newly added swatches reuse the existing align-content and align-items icons, and
rotate them -90 degrees. While align-* properties define alignment in the block-direction
the justify-* properties define alignment in the inline-direction.

  • UserInterface/Models/AlignmentData.js:

(WI.AlignmentData._propertyNameToType):

  • UserInterface/Views/AlignmentEditor.css:

(.alignment-editor .glyph.rotate-left > svg):

  • UserInterface/Views/AlignmentEditor.js:

(WI.AlignmentEditor.shouldRotateGlyph):
(WI.AlignmentEditor._glyphsForType):
(WI.AlignmentEditor.prototype.set alignment):

  • UserInterface/Views/InlineSwatch.css:

(.inline-swatch.alignment > span.rotate-left):

  • UserInterface/Views/InlineSwatch.js:

(WI.InlineSwatch.prototype._updateSwatch):

4:38 PM Changeset in webkit [286884] by Alan Coon
  • 9 edits in branches/safari-613.1.11-branch/Source

Versioning.

WebKit-7613.1.11.2

4:35 PM Changeset in webkit [286883] by don.olmstead@sony.com
  • 12 edits in trunk

Add FileSystem function to read a file at a path
https://bugs.webkit.org/show_bug.cgi?id=234103

Reviewed by Alex Christensen.

Source/JavaScriptCore:

Use FileSystem::readEntireFile.

  • inspector/remote/socket/RemoteInspectorSocket.cpp:

(Inspector::RemoteInspector::backendCommands const):

Source/WebCore:

Use FileSystem::readEntireFile.

  • platform/network/curl/CurlCacheEntry.cpp:

(WebCore::CurlCacheEntry::readCachedData):
(WebCore::CurlCacheEntry::loadResponseHeaders):
(WebCore::CurlCacheEntry::loadFileToBuffer): Deleted.

  • platform/network/curl/CurlCacheEntry.h:
  • platform/network/curl/CurlCacheManager.cpp:

(WebCore::CurlCacheManager::loadIndex):

  • rendering/RenderThemeWin.cpp:

(WebCore::RenderThemeWin::stringWithContentsOfFile):
(WebCore::fillBufferWithContentsOfFile): Deleted.

Source/WTF:

Add FileSystem::readEntireFile which takes a path and attempts to read the whole contents
of the file into a Vector<uint8_t>. If the file is not found or is empty then it returns
nullopt. Internally it manages the opening and closing of the file to prevent file handles
from leaking.

Modify FileSystem::readEntireFile which takes a handle to continue reading until the entire
file has been read. Previously it could've just done a partial read as
FileSystem::readFromFile does not guarantee it will read all the bytes requested.

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::readEntireFile):

  • wtf/FileSystem.h:

Tools:

Add tests for readEntireFile.

  • TestWebKitAPI/Tests/WTF/FileSystem.cpp:

(TestWebKitAPI::TEST_F):

3:17 PM Changeset in webkit [286882] by Mikhail R. Gadelha
  • 2 edits in trunk

Mark myself (Mikhail R. Gadelha) as committer
https://bugs.webkit.org/show_bug.cgi?id=234157

Unreviewed.

  • metadata/contributors.json:
3:03 PM Changeset in webkit [286881] by ysuzuki@apple.com
  • 2 edits in trunk/JSTests

Unreviewed, we may not throw an stack overflow error

  • stress/stack-overflow-in-custom-hasInstance.js:

(catch):

3:02 PM Changeset in webkit [286880] by Robert Jenner
  • 1 edit
    7 adds in trunk/LayoutTests

REGRESSION(r286795):REBASELINE [ iOS EWS ] 4X CSS (layout-tests) are constant text failures
https://bugs.webkit.org/show_bug.cgi?id=234177

Uneviewed test gardening. Rebaseline for iOS.

  • platform/ios-wk2/fast/css/getComputedStyle/computed-style-expected.txt: Added.
  • platform/ios-wk2/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Added.
  • platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt: Added.
  • platform/ios-wk2/svg/css/getComputedStyle-basic-expected.txt: Added.
2:52 PM Changeset in webkit [286879] by Aditya Keerthi
  • 5 edits in trunk/Source/WebKit

[iOS] Support find-in-page keyboard shortcuts
https://bugs.webkit.org/show_bug.cgi?id=234163
rdar://86333128

Reviewed by Devin Rousso.

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

(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView findForWebView:]):
(-[WKContentView findNextForWebView:]):
(-[WKContentView findPreviousForWebView:]):

2:19 PM Changeset in webkit [286878] by beidson@apple.com
  • 5 edits in trunk/Source

Teach webpushd to launch an app in response to an injected message.
https://bugs.webkit.org/show_bug.cgi?id=234122

Reviewed by Alex Christensen.

Source/WebCore/PAL:

  • pal/spi/cocoa/LaunchServicesSPI.h:

Source/WebKit:

To by covered by future API test.

When a message comes in, webpushd knows which code signing identifier it was targetted for.
It launches that app in a special mode so the app can then "take it from there"

  • webpushd/WebPushDaemon.h:
  • webpushd/WebPushDaemon.mm:

(WebPushD::Daemon::injectPushMessageForTesting):
(WebPushD::Daemon::notifyClientPushMessageIsAvailable):

2:17 PM Changeset in webkit [286877] by graouts@webkit.org
  • 11 edits in trunk/Source

Expose the maximum device frame rate to the Web Animations model
https://bugs.webkit.org/show_bug.cgi?id=234161
rdar://85983792

Reviewed by Simon Fraser.

Source/WebCore:

Expose a new property on DocumentTimeline, governed by an off-by-default runtime flag,
that exposes the maximum frame rate supported by the device. This will allow authors
to use this information to make informed decision on appropriate frame rates to set
on animations.

  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::maximumFrameRate const):

  • animation/DocumentTimeline.h:
  • animation/DocumentTimeline.idl:

Source/WebCore/PAL:

Add a newly-used CADisplayLink SPI.

  • pal/spi/cocoa/QuartzCoreSPI.h:

Source/WebKit:

The display's nominal frame rate was only provided to the Page on macOS. We also
expose it on iOS such that the new DocumentTimeline property also works on iOS.

  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:

(-[WKOneShotDisplayLinkHandler initWithDrawingAreaProxy:]):

  • UIProcess/WebPageProxy.h:

Source/WTF:

Add a new experimental feature controlling the availability of per-animation frame rate.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
2:15 PM Changeset in webkit [286876] by Razvan Caliman
  • 7 edits
    2 adds in trunk

Web Inspector: Computed Panel: Group CSS variables by value type
https://bugs.webkit.org/show_bug.cgi?id=233563
<rdar://82978905>

Reviewed by Devin Rousso and Patrick Angle.

Source/WebInspectorUI:

Add the ability to view CSS variables in the Computed styles details sidebar panel
groupped by value type in a few sections: "colors", "dimensions", "numbers" and a
catch-all group of "other".

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Models/DOMNodeStyles.js:

(WI.DOMNodeStyles):
(WI.DOMNodeStyles.prototype.variableStylesByType):
Iterate on-demand over all CSS variables found in the node's computed styles
and assign each to a group depending on its value type:

  • color
  • dimension (number followed by a CSS unit-like string)
  • number
  • other

Additional groups and refinements will come in follow-up patches.

(WI.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
The map of CSS variable groups gets invalidated when there's a significant
change in the node's computed style. This supports the use case where previously
empty groups become populated or, conversely, become empty.

  • UserInterface/Views/ComputedStyleDetailsPanel.js:

(WI.ComputedStyleDetailsPanel):
(WI.ComputedStyleDetailsPanel.prototype.refresh):
(WI.ComputedStyleDetailsPanel.prototype.applyFilter):
(WI.ComputedStyleDetailsPanel.prototype.initialLayout):
No longer generate the elements for laying out CSS variables during initialLayout()
but handle them during layout(). This support mutating the DOM for laying out
either one top-level list of CSS variables (ungrouped) or multiple lists of CSS variable
groups depeding on the grouping mode selected at runtime.

  • UserInterface/Views/ComputedStyleDetailsPanel.css:

(.sidebar > .panel.details.css-style > .content > .computed .details-section > .content):
Ensure both top-level and nested details sections overwrite styles. CSS variables groups are in nested details sections.

(.sidebar > .panel.details.css-style > .content > .computed .details-section.computed-style-variables .computed-property-item):
Adapt stylesheet to account for using WI.ComputedStyleSection instead of WI.SpreadsheetCSSStyleDeclarationEditor

(.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .scope-bar.computed-style-variables-grouping-mode):
(.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .scope-bar.computed-style-variables-grouping-mode.default-item-selected:not(:hover)):
(.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .scope-bar.computed-style-variables-grouping-mode.default-item-selected:hover):
Reuse the visual treatment from SourcesNavigationSidebarPanel.css to avoid highlighting the default grouping mode scope bar item.

(.sidebar > .panel.details.css-style > .content > .computed > .details-section > .content): Deleted.
(.sidebar > .panel.details.css-style > .content > .computed .property): Deleted.

(WI.ComputedStyleDetailsPanel.prototype.layout):
Skip destroying and rebuilding sections whose data sources change during
WI.ComputedStyleDetailsPanel.refresh() and which handle layout internally.
We need to remove and rebuild just the sections for CSS variables because
layout is requested in response to changing the CSS variables grouping mode.

(WI.ComputedStyleDetailsPanel.prototype._createVariablesStyleSection):
Replaces the use of WI.SpreadsheetCSSStyleDeclarationEditor for rendering CSS variables with
WI.ComputedStyleSection which is already used for rendering CSS properties.
It's a lighter-weight View that's fit for purpose.

(WI.ComputedStyleDetailsPanel.prototype._renderVariablesStyleSectionGroup):
Use a generic renderer for CSS variable sections that can be reused for any group type.

(WI.ComputedStyleDetailsPanel.prototype._handleDetailsSectionCollapsedStateChanged):
Generalize handling collapsed state change events for all sections, current and future.

(WI.ComputedStyleDetailsPanel.prototype._handleEditorFilterApplied):
Generalize handling filtering events for all sections, current and future.

(WI.ComputedStyleDetailsPanel.prototype._handleVariablesGroupingModeScopeBarSelectionChanged):
(WI.ComputedStyleDetailsPanel.prototype._handleVariablesGroupingSettingChanged):
(WI.ComputedStyleDetailsPanel.prototype._handlePropertiesSectionCollapsedStateChanged): Deleted.
(WI.ComputedStyleDetailsPanel.prototype._handleVariablesSectionCollapsedStateChanged): Deleted.

  • UserInterface/Views/ComputedStyleSection.js:

(WI.ComputedStyleSection):
Change the default value of _styleTraces to null instead of an empty array so that
WI.ComputedStyleSection.layout() doesn't attempt to access it like a Map.

LayoutTests:

Check logic for grouping CSS variables by value type in Web Inspector.

  • inspector/css/variableStylesByType-expected.txt: Added.
  • inspector/css/variableStylesByType.html: Added.
2:01 PM Changeset in webkit [286875] by Nikita Vasilyev
  • 5 edits
    7 moves
    5 adds in trunk/Source/WebInspectorUI

Web Inspector: Add a swatch for align-items and align-self
https://bugs.webkit.org/show_bug.cgi?id=233054
<rdar://problem/85613199>

Reviewed by Devin Rousso.

Introduce inline swatches for align-items and align-self, that shows icons for common values:
start, center, end, and stretch.

  • UserInterface/Images/AlignContentCenter.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentCenter.svg.
  • UserInterface/Images/AlignContentEnd.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentEnd.svg.
  • UserInterface/Images/AlignContentSpaceAround.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentSpaceAround.svg.
  • UserInterface/Images/AlignContentSpaceBetween.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentSpaceBetween.svg.
  • UserInterface/Images/AlignContentSpaceEvenly.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentSpaceEvenly.svg.
  • UserInterface/Images/AlignContentStart.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentStart.svg.
  • UserInterface/Images/AlignContentStretch.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentStretch.svg.

Rename icons from Alignment to AlignContent since they are only used for align-content CSS property now.

  • UserInterface/Images/AlignItemsCenter.svg: Added.
  • UserInterface/Images/AlignItemsEnd.svg: Added.
  • UserInterface/Images/AlignItemsStart.svg: Added.
  • UserInterface/Images/AlignItemsStretch.svg: Added.
  • UserInterface/Main.html:
  • UserInterface/Models/AlignmentData.js: Added.

(WI.AlignmentData):
(WI.AlignmentData.isAlignmentAwarePropertyName):
(WI.AlignmentData._propertyNameToType):
(WI.AlignmentData.prototype.get type):
(WI.AlignmentData.prototype.get text):
(WI.AlignmentData.prototype.set text):
(WI.AlignmentData.prototype.toString):
Introduce a model object to be more consistent with the rest of the inline swatches.

  • UserInterface/Views/AlignmentEditor.js:

(WI.AlignmentEditor):
Allow AlignmentEditor to work with more than one CSS property (i.e. align-content), by introducing propertyName argument.

(WI.AlignmentEditor.glyphPath):
(WI.AlignmentEditor._glyphsForType):
(WI.AlignmentEditor.prototype.get alignment):
(WI.AlignmentEditor.prototype.set alignment):
Rename value to alignment to be more consistent with the rest of the editors.

(WI.AlignmentEditor.prototype._removePreviouslySelected):
(WI.AlignmentEditor.prototype._updateSelected):
(WI.AlignmentEditor.isAlignContentValue): Deleted.
(WI.AlignmentEditor.prototype.get value): Deleted.
(WI.AlignmentEditor.prototype.set value): Deleted.

  • UserInterface/Views/InlineSwatch.js:

(WI.InlineSwatch.prototype._updateSwatch):
(WI.InlineSwatch.prototype._valueEditorValueDidChange):

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype._replaceSpecialTokens):
(WI.SpreadsheetStyleProperty.prototype._addAlignmentTokens):

1:56 PM Changeset in webkit [286874] by Sam Sneddon
  • 2 edits in trunk/Source/WTF

Enable the 'resolution' media query by default
https://bugs.webkit.org/show_bug.cgi?id=78087

Reviewed by Simon Fraser.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
1:28 PM Changeset in webkit [286873] by Alexey Shvayka
  • 3 edits
    6 adds in trunk

Extend the scope where the Window's current event is set
https://bugs.webkit.org/show_bug.cgi?id=233833

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Import WPT tests from https://github.com/web-platform-tests/wpt/pull/31894.

  • web-platform-tests/dom/events/event-global-is-still-set-when-coercing-beforeunload-result-expected.txt: Added.
  • web-platform-tests/dom/events/event-global-is-still-set-when-coercing-beforeunload-result.html: Added.
  • web-platform-tests/dom/events/event-global-set-before-handleEvent-lookup.any-expected.txt: Added.
  • web-platform-tests/dom/events/event-global-set-before-handleEvent-lookup.any.html: Added.
  • web-platform-tests/dom/events/event-global-set-before-handleEvent-lookup.any.js: Added.
  • web-platform-tests/dom/events/resources/event-global-is-still-set-when-coercing-beforeunload-result-frame.html: Added.

Source/WebCore:

Inner invoke algorithm [1] sets window.event from step 8.2 until step 12 (inclusive).
That includes calling a callback interface [2], which performs "handleEvent" lookup
(step 10.1) and coerces return value of "beforeunload" handler (step 14).

Before this patch, window.event was not set during these user-observable operations.
Now WebKit is aligned with Blink and Gecko.

JSErrorHandler is correct: although reportException() may call userland "error" handler,
it will have window.event on its own.

[1] https://dom.spec.whatwg.org/#concept-event-listener-inner-invoke
[2] https://webidl.spec.whatwg.org/#call-a-user-objects-operation

Tests: imported/w3c/web-platform-tests/dom/events/event-global-is-still-set-when-coercing-beforeunload-result.html

imported/w3c/web-platform-tests/dom/events/event-global-set-before-handleEvent-lookup.any.html

  • bindings/js/JSEventListener.cpp:

(WebCore::JSEventListener::handleEvent):
ScopeExit is used since the method has so many exit points.

1:25 PM Changeset in webkit [286872] by Alan Coon
  • 1 copy in tags/Safari-613.1.11.1

Tag Safari-613.1.11.1.

1:24 PM Changeset in webkit [286871] by Alexey Shvayka
  • 5 edits in trunk

JSErrorHandler should not set window.event if invocation target is in shadow tree
https://bugs.webkit.org/show_bug.cgi?id=233834

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Update the test per https://github.com/web-platform-tests/wpt/pull/31893 as well as its expectations.

  • web-platform-tests/dom/events/event-global-expected.txt:
  • web-platform-tests/dom/events/event-global.html:

Source/WebCore:

This patch brings r233489 for JSErrorHandler (window.onerror handler for ErrorEvent),
implementing the spec [1] and aligning WebKit with Blink and Gecko.

[1] https://dom.spec.whatwg.org/#ref-for-window-current-event%E2%91%A1

Test: imported/w3c/web-platform-tests/dom/events/event-global.html

  • bindings/js/JSErrorHandler.cpp:

(WebCore::JSErrorHandler::handleEvent):

1:15 PM Changeset in webkit [286870] by Devin Rousso
  • 18 edits in trunk/Source

Allow Pasteboard::readBuffer to read from the pasteboard as a whole instead of a specific item
https://bugs.webkit.org/show_bug.cgi?id=233940

Reviewed by Wenson Hsieh.

In order to match the WK1 implementation of -pasteFont: <https://webkit.org/b/191379>, we
need to read from the font pasteboard as a whole, not a specific item. Make the index into
an std::optional so that we can have this behavior without needing to have a new method.

No change in behavior.

Source/WebCore:

  • platform/Pasteboard.h:
  • platform/Pasteboard.cpp:

(WebCore::Pasteboard::readBuffer):

  • platform/PasteboardStrategy.h:
  • platform/PlatformPasteboard.h:
  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::getTypes const):
(WebCore::PlatformPasteboard::bufferForType const):
(WebCore::PlatformPasteboard::readBuffer const):
(WebCore::PlatformPasteboard::getTypes): Deleted.
(WebCore::PlatformPasteboard::bufferForType): Deleted.

  • platform/libwpe/PlatformPasteboardLibWPE.cpp:

(WebCore::PlatformPasteboard::getTypes const):
(WebCore::PlatformPasteboard::getTypes): Deleted.

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::PlatformPasteboard::getTypes const):
(WebCore::PlatformPasteboard::bufferForType const):
(WebCore::PlatformPasteboard::readBuffer const):
(WebCore::PlatformPasteboard::getTypes): Deleted.
(WebCore::PlatformPasteboard::bufferForType): Deleted.

Source/WebKit:

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

(WebKit::WebPasteboardProxy::readBufferFromPasteboard):

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:

(WebKit::WebPasteboardProxy::readBufferFromPasteboard):

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

(WebKit::WebPlatformStrategies::readBufferFromPasteboard):

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:

(WebPlatformStrategies::readBufferFromPasteboard):

12:37 PM Changeset in webkit [286869] by Chris Dumez
  • 22 edits
    2 adds in trunk

Improve <type="datetime-local"> value parsing and sanitization
https://bugs.webkit.org/show_bug.cgi?id=234039

Reviewed by Darin Adler.

Source/WebCore:

Improve <type="datetime-local"> value parsing and sanitization.

Test: fast/forms/datetimelocal/datetime-local-value-sanitization.html

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

(WebCore::DateTimeLocalInputType::sanitizeValue const):
Implement value sanitization for <type="datetime-local"> so that:

  • html/DateTimeLocalInputType.h:
  • platform/DateComponents.cpp:

(WebCore::DateComponents::parseTime):
Fix bug where we would allow more than 3 digits for the millisecond part of the time (we
would silently ignore follow-up digits instead of failing parsing). This is as per:

This was covered by one of the subtests in imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/datetime-local.html

(WebCore::isDateTimeLocalSeparator):
(WebCore::DateComponents::parseDateTimeLocal):
Allow using a space as date / time separator in <type="datetime-local">, instead of simply allowing a 'T'.
This would align our behavior with Gecko and the specification:

Note that Blink still seems to only allow 'T' as separator.

(WebCore::DateComponents::toStringForTime const):
The output will use the shortest possible string, omitting seconds or milliseconds when 0, as per
https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-normalised-local-date-and-time-string

LayoutTests:

  • fast/forms/datetimelocal/ValidityState-typeMismatch-datetimelocal-expected.txt:
  • fast/forms/datetimelocal/ValidityState-typeMismatch-datetimelocal.html:
  • fast/forms/datetimelocal/input-valueasnumber-datetimelocal-expected.txt:
  • fast/forms/datetimelocal/input-valueasnumber-datetimelocal.html:

Update a couple of existing tests to reflect behavior change.

  • fast/forms/datetimelocal/datetime-local-value-sanitization-expected.txt: Added.
  • fast/forms/datetimelocal/datetime-local-value-sanitization.html: Added.

Improve test coverage for datetime-local value sanitization.

  • platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valueMissing-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/datetime-local-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/time-2-expected.txt:

Rebaseline WPT tests now that more checks are passing.

12:23 PM Changeset in webkit [286868] by achristensen@apple.com
  • 20 edits in trunk

Move if-domain and unless-domain conversion to WKContentRuleList parsing
https://bugs.webkit.org/show_bug.cgi?id=234126

Reviewed by Tim Hatcher.

Source/WebCore:

This simplifies a part of the compiler that is about to get more complicated.
if-domain and unless-domain were the predecessors of if-top-url and unless-top-url,
which are strictly more powerful because they run regexes on the whole top URL.
This just translates *-domain into a *-top-url regex. This also makes it so there
is no reason not to have *-domain and *-top-url conditions in the same rule list.

Covered by existing tests.

  • contentextensions/CombinedURLFilters.cpp:

(WebCore::ContentExtensions::CombinedURLFilters::addDomain): Deleted.

  • contentextensions/CombinedURLFilters.h:
  • contentextensions/CompiledContentExtension.h:
  • contentextensions/ContentExtension.cpp:

(WebCore::ContentExtensions::ContentExtension::populateConditionCacheIfNeeded):

  • contentextensions/ContentExtensionCompiler.cpp:

(WebCore::ContentExtensions::compileRuleList):

  • contentextensions/ContentExtensionCompiler.h:
  • contentextensions/ContentExtensionError.cpp:

(WebCore::ContentExtensions::contentExtensionErrorCategory):

  • contentextensions/ContentExtensionError.h:
  • contentextensions/ContentExtensionParser.cpp:

(WebCore::ContentExtensions::getDomainList):
(WebCore::ContentExtensions::loadTrigger):

  • contentextensions/ContentExtensionRule.h:

Source/WebKit:

  • Shared/WebCompiledContentRuleList.cpp:

(WebKit::WebCompiledContentRuleList::conditionsApplyOnlyToDomain const): Deleted.

  • Shared/WebCompiledContentRuleList.h:
  • Shared/WebCompiledContentRuleListData.cpp:

(WebKit::WebCompiledContentRuleListData::encode const):
(WebKit::WebCompiledContentRuleListData::decode):

  • Shared/WebCompiledContentRuleListData.h:

(WebKit::WebCompiledContentRuleListData::WebCompiledContentRuleListData):

  • UIProcess/API/APIContentRuleListStore.cpp:

(API::encodeContentRuleListMetaData):
(API::decodeContentRuleListMetaData):
(API::compiledToFile):
(API::createExtension):
(API::getContentRuleListSourceFromMappedFile):

  • UIProcess/API/APIContentRuleListStore.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:

(TestWebKitAPI::testRequestImpl):
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::testRequest): Deleted.

11:55 AM Changeset in webkit [286867] by Said Abou-Hallawa
  • 4 edits in trunk/Source/WebCore

[GPU Process] [Filters] Address review comments after r285597
https://bugs.webkit.org/show_bug.cgi?id=234130

Reviewed by Darin Adler.

Most of the comments in https://bugs.webkit.org/show_bug.cgi?id=232457
have already been addressed. This patch covers the unaddressed ones.

  • platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp:

(WebCore::FEMorphologySoftwareApplier::apply const):
Remove wasteful ceilf() calls

  • rendering/RenderLayerFilters.cpp:

(WebCore::RenderLayerFilters::buildFilter):
Capitalize the sentence in the FIXME comments.

  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::applyResource):
Use 'auto' in a few places where the type can be deduced.

11:37 AM Changeset in webkit [286866] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

nullptr deref in ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=234018

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2021-12-10
Reviewed by Alan Bujtas.

Source/WebCore:

Test: fast/rendering/floating-object-renderer-crash.html

When destroying a given renderer, we first remove floats and out-of-flow positioned objects
from their containing block before detaching the renderer from the tree. We do this by obtaining
the renderer’s outermost block containing a floating object and recursively marking all siblings
and descendants for layout.

The criteria for continuing down the list of children require the current block to contain floats
or be able to shrink to avoid floats. However, we can have a scenario where the current child block
doesn’t have a float, but one of its descendants does. In this case, although we should continue to
that descendant and remove the float, we do not.

The proposal in this patch will instead check whether the child block contains a float, or any of its descendants do.
If so we should continue traversing towards that descendant.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::subtreeContainsFloat const):
(WebCore::RenderBlockFlow::subtreeContainsFloats const):
(WebCore::RenderBlockFlow::markAllDescendantsWithFloatsForLayout):

  • rendering/RenderBlockFlow.h:

LayoutTests:

  • fast/rendering/floating-object-renderer-crash-expected.txt: Added.
  • fast/rendering/floating-object-renderer-crash.html: Added.
11:34 AM Changeset in webkit [286865] by pvollan@apple.com
  • 7 edits in trunk/Source/WebKit

[WP] Block access to container manager service for Mail
https://bugs.webkit.org/show_bug.cgi?id=234080
<rdar://problem/86269784>

Reviewed by Brent Fulgham.

Local testing is not showing access to this daemon when running Mail.

  • 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):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

  • WebProcess/com.apple.WebProcess.sb.in:
11:26 AM Changeset in webkit [286864] by Said Abou-Hallawa
  • 27 edits in trunk/Source

[GPU Process] [Filters] Make FilterEffectVector a Vector of Ref<FilterEffect>
https://bugs.webkit.org/show_bug.cgi?id=234108

Reviewed by Cameron McCormack.

Source/WebCore:

There is no case that would require inserting a nullptr in FilterEffectVector.

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::drawFilteredImageBuffer):

  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::inputEffect const):

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

(WebCore::SourceAlpha::SourceAlpha):

  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::buildFilterFunctions):
(WebCore::CSSFilter::effectsOfType const):

  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):

  • svg/SVGFEBlendElement.cpp:

(WebCore::SVGFEBlendElement::build const):

  • svg/SVGFEColorMatrixElement.cpp:

(WebCore::SVGFEColorMatrixElement::build const):

  • svg/SVGFEComponentTransferElement.cpp:

(WebCore::SVGFEComponentTransferElement::build const):

  • svg/SVGFECompositeElement.cpp:

(WebCore::SVGFECompositeElement::build const):

  • svg/SVGFEConvolveMatrixElement.cpp:

(WebCore::SVGFEConvolveMatrixElement::build const):

  • svg/SVGFEDiffuseLightingElement.cpp:

(WebCore::SVGFEDiffuseLightingElement::build const):

  • svg/SVGFEDisplacementMapElement.cpp:

(WebCore::SVGFEDisplacementMapElement::build const):

  • svg/SVGFEDropShadowElement.cpp:

(WebCore::SVGFEDropShadowElement::build const):

  • svg/SVGFEGaussianBlurElement.cpp:

(WebCore::SVGFEGaussianBlurElement::build const):

  • svg/SVGFEMergeElement.cpp:

(WebCore::SVGFEMergeElement::build const):

  • svg/SVGFEMorphologyElement.cpp:

(WebCore::SVGFEMorphologyElement::build const):

  • svg/SVGFEOffsetElement.cpp:

(WebCore::SVGFEOffsetElement::build const):

  • svg/SVGFESpecularLightingElement.cpp:

(WebCore::SVGFESpecularLightingElement::build const):

  • svg/SVGFETileElement.cpp:

(WebCore::SVGFETileElement::build const):

  • svg/graphics/filters/SVGFilter.cpp:

(WebCore::SVGFilter::effectsOfType const):

  • svg/graphics/filters/SVGFilterBuilder.cpp:

(WebCore::SVGFilterBuilder::clearResultsRecursive):
(WebCore::SVGFilterBuilder::buildEffectExpression const):
(WebCore::SVGFilterBuilder::buildExpression const):

  • svg/graphics/filters/SVGFilterBuilder.h:

(WebCore::SVGFilterBuilder::effectReferences):

Source/WebKit:

  • GPUProcess/graphics/RemoteDisplayListRecorder.cpp:

(WebKit::RemoteDisplayListRecorder::drawFilteredImageBuffer):

11:26 AM Changeset in webkit [286863] by Alan Coon
  • 2 edits in branches/safari-613.1.11-branch/Source/WebKit

Cherry-pick r286805. rdar://problem/86331680

Momentum Generator: Scroll tail hiccup only when scrolling up on 60Hz displays
https://bugs.webkit.org/show_bug.cgi?id=234104
<rdar://problem/86291413>

Reviewed by Simon Fraser.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp: (WebKit::MomentumEventDispatcher::equalizeTailGaps): Sort in the correct direction based on the sign of the first delta...

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

11:21 AM Changeset in webkit [286862] by Alan Coon
  • 9 edits in branches/safari-613.1.11-branch/Source

Versioning.

WebKit-7613.1.11.1

11:02 AM Changeset in webkit [286861] by Devin Rousso
  • 8 edits in trunk/Source/WebCore

Add a way to write a SharedBuffer to the Pasteboard
https://bugs.webkit.org/show_bug.cgi?id=234065

Reviewed by Wenson Hsieh.

In order to match the WK1 implementation of -pasteFont: <https://webkit.org/b/191379>, we
need to be able to write a SharedBuffer (with an associated type) to the font pasteboard.

Create a struct PasteboardBuffer to wrap the SharedBuffer and String type (and a
String contentOrigin on Cocoa platforms, which is used to decide whether to show a "Paste"
callout to the user as a gate on crossorigin content sharing) in a single object.

Though it isn't used in this patch, -pasteFont: <https://webkit.org/b/191379> will use
this to write RTF data (which contains the necessary font data).

No change in behavior.

  • platform/Pasteboard.h:
  • platform/Pasteboard.cpp:
  • platform/libwpe/PasteboardLibWPE.cpp:

(WebCore::Pasteboard::write):

  • platform/gtk/PasteboardGtk.cpp:

(WebCore::Pasteboard::write):

  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::write):

  • platform/mac/PasteboardMac.mm:

(WebCore::Pasteboard::write):

  • platform/win/PasteboardWin.cpp:

(WebCore::Pasteboard::write):

11:00 AM Changeset in webkit [286860] by Patrick Griffis
  • 7 edits in trunk

LayoutTests/imported/w3c:
CSP: Implement protections against nonce-hijacking
https://bugs.webkit.org/show_bug.cgi?id=233087

Reviewed by Brent Fulgham.

Update expectations.

  • web-platform-tests/content-security-policy/script-src/nonce-enforce-blocked-expected.txt:

Source/WebCore:
CSP: Prevent nonce-hijacking
https://bugs.webkit.org/show_bug.cgi?id=233087

Reviewed by Brent Fulgham.

Implement protections against nonce-hijacking as described in this spec:

https://www.w3.org/TR/CSP3/#security-nonce-hijacking

  • dom/Element.cpp:

(WebCore::Element::isNonceable const):
(WebCore::Element::nonce const):

  • dom/Element.h:

(WebCore::Element::hasDuplicateAttribute const):
(WebCore::Element::setHasDuplicateAttribute):

  • html/parser/AtomHTMLToken.h:

(WebCore::AtomHTMLToken::hasDuplicateAttribute const):
(WebCore::AtomHTMLToken::initializeAttributes):

  • html/parser/HTMLConstructionSite.cpp:

(WebCore::setAttributes):
(WebCore::HTMLConstructionSite::insertCustomElement):

10:52 AM Changeset in webkit [286859] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[WP][macOS] Add required system call
https://bugs.webkit.org/show_bug.cgi?id=234129

Reviewed by Brent Fulgham.

  • WebProcess/com.apple.WebProcess.sb.in:
10:17 AM Changeset in webkit [286858] by Darin Adler
  • 6 edits in trunk/Source

Use simpler idioms for std::less and std::greater possible in modern C++
https://bugs.webkit.org/show_bug.cgi?id=234117

Reviewed by Anders Carlsson.

Source/WebCore:

  • testing/InternalsMapLike.cpp:

(WebCore::InternalsMapLike::inspectValues const): Remove unneeded explicit
use of std:less, because this is what std::sort by default.

Source/WebKit:

  • WebProcess/WebPage/MomentumEventDispatcher.cpp:

(WebKit::MomentumEventDispatcher::equalizeTailGaps): Removed unneeded
template arguments for std::greater, and removed explicit use of std::less,
since that's what std::sort does by default.

Source/WTF:

  • wtf/ListDump.h:

(WTF::sortedListDump): Removed unnecessary template arguments to std::less.

9:28 AM Changeset in webkit [286857] by commit-queue@webkit.org
  • 15 edits
    4 adds
    3 deletes in trunk

Unreviewed, reverting r286836.
https://bugs.webkit.org/show_bug.cgi?id=234153

some tests are flaky on iOS and some are crashing on macOS

Reverted changeset:

"[Model] Add load and error events to distinguish resource
load from model readiness"
https://bugs.webkit.org/show_bug.cgi?id=233706
https://commits.webkit.org/r286836

9:25 AM Changeset in webkit [286856] by Tadeu Zagallo
  • 2 edits in trunk/Source/JavaScriptCore

Remove Mac-specific ARM64EHash implementation
https://bugs.webkit.org/show_bug.cgi?id=234150

Reviewed by Saam Barati.

Currently we have a weaker implementation of ARM64EHash on mac, but we measured it and it's not
any faster than the stricter version we use on iOS. We are removing the mac-specific version and
switching it to use the stricter version.

  • assembler/AssemblerBuffer.h:
9:16 AM Changeset in webkit [286855] by Chris Dumez
  • 23 edits in trunk

Radio buttons with no form owner are not grouped
https://bugs.webkit.org/show_bug.cgi?id=220502
<rdar://problem/73300895>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

  • web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valid-expected.txt:
  • web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valueMissing-expected.txt:
  • web-platform-tests/html/semantics/forms/the-input-element/radio-expected.txt:

Source/WebCore:

Per the HTML specification and to match the behavior of both Gecko and Blink,
radio buttons should still be grouped, even if they are disconnected and not
owned by a form.

This patch aligns our behavior with Gecko and Blink and is based on the following
Blink commit:

No new tests, rebaselined existing tests.

  • dom/ContainerNode.h:

(WebCore::ContainerNode::rootNode const):

  • dom/ElementTraversal.h:

(WebCore::Traversal<ElementType>::inclusiveFirstWithin):

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::setChecked):
(WebCore::HTMLInputElement::didChangeForm):
(WebCore::HTMLInputElement::insertedIntoAncestor):
(WebCore::HTMLInputElement::removedFromAncestor):
(WebCore::HTMLInputElement::checkedRadioButtonForGroup const):

  • html/InputType.h:

(WebCore::InputType::willUpdateCheckedness):

  • html/RadioInputType.cpp:

(WebCore::RadioInputType::valueMissing const):
(WebCore::RadioInputType::willUpdateCheckedness):

  • html/RadioInputType.h:

LayoutTests:

  • fast/forms/radio/ValidityState-valueMissing-radio-expected.txt:
  • fast/forms/radio/ValidityState-valueMissing-radio.html:
  • fast/forms/radio/radio-live-validation-style-expected.txt:
  • fast/forms/radio/radio-live-validation-style.html:

Update existing tests to reflect behavior change. I have verified that our behavior on those tests
is aligned with both Firefox and Chrome.

  • platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valid-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valueMissing-expected.txt:

Rebaseline WPT tests now that more checks are passing.

9:07 AM Changeset in webkit [286854] by youenn@apple.com
  • 3 edits in trunk/LayoutTests

[ Monterey ] http/tests/workers/service/serviceworker-websocket.https.html (layout-test) is constant text failure
https://bugs.webkit.org/show_bug.cgi?id=233665
<rdar://problem/85888177>

Reviewed by Alex Christensen.

Allow all SSL certificates.

  • http/tests/workers/service/serviceworker-websocket.https.html:
  • platform/mac-wk2/TestExpectations:
8:56 AM Changeset in webkit [286853] by Patrick Griffis
  • 20 edits in trunk

CSP: Allow external scripts with SRI hashes matching CSP
https://bugs.webkit.org/show_bug.cgi?id=233911

Reviewed by Kate Cheney.

LayoutTests/imported/w3c:

Update expectations with more passes.

  • web-platform-tests/content-security-policy/script-src/script-src-report-only-policy-works-with-external-hash-policy-expected.txt:
  • web-platform-tests/content-security-policy/script-src/script-src-sri_hash.sub-expected.txt:

Source/WebCore:

This is a change in CSP3 that allows loading external
scripts that have SRI hashes matching CSP hashes.
https://www.w3.org/TR/CSP3/#external-hash

ResourceCryptographicDigest was changed to not validate padding
during base64 decoding which is harmless and fixes parsing the
hashes used in WPT's script-src-sri_hash.sub.html.

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::isAllowedByContentSecurityPolicy):

  • loader/ResourceCryptographicDigest.cpp:

(WebCore::parseCryptographicDigestImpl):
(WebCore::decodeEncodedResourceCryptographicDigest):

  • loader/SubresourceIntegrity.cpp:

(WebCore::parseIntegrityMetadata):

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

(WebCore::CachedResourceLoader::allowedByContentSecurityPolicy const):

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::allScriptPoliciesAllow const):
(WebCore::parseSubResourceIntegrityIntoDigests):
(WebCore::ContentSecurityPolicy::allowResourceFromSource const):
(WebCore::ContentSecurityPolicy::allowScriptFromSource const):

  • page/csp/ContentSecurityPolicy.h:
  • page/csp/ContentSecurityPolicyDirectiveList.cpp:

(WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForScript const):

  • page/csp/ContentSecurityPolicyDirectiveList.h:
  • page/csp/ContentSecurityPolicySourceList.cpp:

(WebCore::ContentSecurityPolicySourceList::matchesAll const):

  • page/csp/ContentSecurityPolicySourceList.h:
  • page/csp/ContentSecurityPolicySourceListDirective.cpp:

(WebCore::ContentSecurityPolicySourceListDirective::containsAllHashes const):

  • page/csp/ContentSecurityPolicySourceListDirective.h:

LayoutTests:

Update tests to accept base64 with extra padding.

  • http/tests/security/contentSecurityPolicy/1.1/scripthash-tests-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/scripthash-tests.html:
8:33 AM Changeset in webkit [286852] by pvollan@apple.com
  • 7 edits in trunk/Source/WebKit

Fix sandbox build error
https://bugs.webkit.org/show_bug.cgi?id=234146

Unreviewed fix sandbox build error after r286460.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in:
  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
8:20 AM Changeset in webkit [286851] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Replace Vector<std::unique_ptr<DisplayBoxNode> with Vector<DisplayBoxTree::Node>
https://bugs.webkit.org/show_bug.cgi?id=234110

Reviewed by Antti Koivisto.

This patch switches over from using DisplayBoxNode* in AncestorStack to simple indexes to contain heap allocations.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::DisplayBoxTree::DisplayBoxTree):
(WebCore::Layout::DisplayBoxTree::hasInlineBox const):
(WebCore::Layout::DisplayBoxTree::root const):
(WebCore::Layout::DisplayBoxTree::at):
(WebCore::Layout::DisplayBoxTree::at const):
(WebCore::Layout::DisplayBoxTree::append):
(WebCore::Layout::AncestorStack::unwind):
(WebCore::Layout::AncestorStack::push):
(WebCore::Layout::createdDisplayBoxNodeForContainerBoxAndPushToAncestorStack):
(WebCore::Layout::InlineDisplayContentBuilder::ensureDisplayBoxForContainer):
(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::processBidiContent):
(WebCore::Layout::DisplayBoxNode::DisplayBoxNode): Deleted.
(WebCore::Layout::DisplayBoxNode::appendChild): Deleted.
(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForChildNode): Deleted.

  • layout/formattingContexts/inline/InlineDisplayContentBuilder.h:
7:36 AM Changeset in webkit [286850] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed, reverting r282794.
<rdar://problem/86271222>

Regressed PLT5

Reverted changeset:

"Avoid doing a second server pre-connect after a process-swap"
https://bugs.webkit.org/show_bug.cgi?id=230517
https://commits.webkit.org/r282794

6:28 AM Changeset in webkit [286849] by keith_miller@apple.com
  • 2 edits in trunk/Source/WTF

Reduce maximum mmap size for Structure regions to help placate ios
https://bugs.webkit.org/show_bug.cgi?id=234091

Reviewed by Saam Barati.

Use mach_vm_map since that supports memory alignement so we don't have to map 2x desired address space then free then trim.

  • wtf/PlatformHave.h:
  • wtf/posix/OSAllocatorPOSIX.cpp:

(WTF::OSAllocator::reserveUncommittedAligned):

6:27 AM Changeset in webkit [286848] by Alan Bujtas
  • 8 edits in trunk

[LFC][IFC] Enable bidi handling for content with inline boxes
https://bugs.webkit.org/show_bug.cgi?id=234055

Reviewed by Antti Koivisto.

Source/WebCore:

  • layout/integration/LayoutIntegrationCoverage.cpp:

LayoutTests:

Progressions.

  • platform/mac/fast/borders/bidi-002-expected.txt:
  • platform/mac/fast/borders/bidi-012-expected.txt:
  • platform/mac/fast/borders/rtl-border-05-expected.txt:
6:07 AM Changeset in webkit [286847] by Manuel Rego Casasnovas
  • 3 edits
    1 add in trunk/LayoutTests/imported/w3c

[WPT] Import resources/accesskey.js
https://bugs.webkit.org/show_bug.cgi?id=234137

Reviewed by Rob Buis.

This just imports the changes from this WPT PR:
https://github.com/web-platform-tests/wpt/pull/32000

Which will allow to write other WPT tests using pressAccessKey() method.

  • web-platform-tests/resources/accesskey.js: Added.

(pressAccessKey):

  • web-platform-tests/resources/w3c-import.log:
  • web-platform-tests/shadow-dom/accesskey.tentative.html:
5:51 AM Changeset in webkit [286846] by Nikolas Zimmermann
  • 5 edits in trunk/Source/WebCore

[LBSE] Create RenderSVGRoot renderer for outermost <svg> and allow direct <rect> children
https://bugs.webkit.org/show_bug.cgi?id=233873

Reviewed by Rob Buis.

Construct RenderSVGRoot renderers for the outermost <svg> element when LBSE is enabled.
An 'allowlist' approach is used to only create renderers for those SVG elements that
are aware of LBSE: outermost <svg> element + <rect> element. For all other elements
no renderers will be created in LBSE for now.

This patch leaves the legacy engine unchanged (probed by EWS & local test runs),
and also LBSE shows no assertions/crashes/hangs in release/debug builds - tested
with "run-webkit-tests --internal-feature=LayerBasedSVGEngineEnabled".

Note that many layout tests will either timeout or show a different result,
due to the small capabilities of LBSE at present. Therefore it's beneficial to
decrease timeouts / use more workers when running layout tests. Otherwise they
will take a long time to complete. On my macOS Monterey M1 MacBook, following
parameters lead to a reasonable test execution time:

run-webkit-tests --internal-feature=LayerBasedSVGEngineEnabled --timeout=5000 \
--no-sample-on-timeout --no-retry-failures --child-processes=15 \
[--release / --debug] svg

Covered by existing tests.

  • rendering/svg/RenderSVGModelObject.cpp:

(WebCore::RenderSVGModelObject::clippedOverflowRect const):
(WebCore::RenderSVGModelObject::nodeAtPoint):

  • rendering/svg/RenderSVGModelObject.h:

(WebCore::RenderSVGModelObject::visualOverflowRectEquivalent const):

  • svg/SVGElement.cpp:

(WebCore::createSVGLayerAwareElementSet):
(WebCore::isSVGLayerAwareElement):
(WebCore::SVGElement::childShouldCreateRenderer const):

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::createElementRenderer):

5:28 AM Changeset in webkit [286845] by Antti Koivisto
  • 13 edits in trunk/Source

[CSS Container Queries] Basic @container at-rule parsing support
https://bugs.webkit.org/show_bug.cgi?id=234135

Reviewed by Antoine Quint.

Source/WebCore:

Implement basic support for parsing @container at-rules.
This patch doesn't yet parse the queries themselves.

Disabled by default.

  • css/StyleRule.cpp:

(WebCore::StyleRuleBase::destroy):
(WebCore::StyleRuleBase::copy const):
(WebCore::StyleRuleBase::createCSSOMWrapper const):
(WebCore::StyleRuleContainer::StyleRuleContainer):
(WebCore::StyleRuleContainer::create):

  • css/StyleRule.h:

(WebCore::StyleRuleBase::isContainerRule const):
(isType):

  • css/StyleRuleType.h:
  • css/StyleSheetContents.cpp:

(WebCore::traverseRulesInVector):
(WebCore::StyleSheetContents::traverseSubresources const):

  • css/parser/CSSAtRuleID.cpp:

(WebCore::cssAtRuleID):

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

(WebCore::operator==):
(WebCore::add):

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

(WebCore::CSSParserImpl::consumeAtRule):
(WebCore::CSSParserImpl::consumeContainerRule):

  • css/parser/CSSParserImpl.h:

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:

Add preference for container queries, disabled by default.

4:23 AM Changeset in webkit [286844] by Razvan Caliman
  • 10 edits
    1 add in trunk/Source/WebInspectorUI

Web Inspector: Extract a specialized CSSNameCompletions from CSSCompletions
https://bugs.webkit.org/show_bug.cgi?id=233369
<rdar://83206520>

Reviewed by Devin Rousso.

WI.CSSPropertyNameCompletions is a long-lived object that holds the list of all CSS properties
supported by the target. It is instantiated only once on Web Inspector startup.

By contrast, WI.CSSCompletions is an object instantiated as often as needed with
lists of property values, CSS function values, etc. It holds the generic logic for
matching values against a given query.

The specialized logic for CSS property names was mixed-in with the generic logic in WI.CSSCompletions.
The main difference is in the format of the payload provided:

  • an array of objects with key/value pairs for WI.CSSPropertyNameCompletions.
  • an array of strings for general purpose WI.CSSCompletions.

This patch reduces the complexity in WI.Completions:

  • moves the one-time initialization method to WI.cssManager.initializeCSSCompletions.
  • simplifies WI.Completions constructor to expect just an array of strings.
  • introduces WI.CSSPropertyNameCompletions as a sub-class of WI.CSSCompletions where its constructor is specialized to handle the payload received from the backend.
  • moves the WI.CSSPropertyNameCompletions instance to WI.cssManager.cssPropertyNameCompletions.
  • removes unused accessors for navigating the list of matched completions.
  • UserInterface/Base/Main.js:

(WI.performOneTimeFrontendInitializationsUsingTarget):

  • UserInterface/Controllers/CSSManager.js:

(WI.CSSManager):
(WI.CSSManager.prototype.initializeCSSPropertyNameCompletions.):
(WI.CSSManager.prototype.initializeCSSPropertyNameCompletions):
Moved the initializiation method for objects used to get CSS completions
from WI.CSSCompletions with data from the backed to a more appropriate place.

(WI.CSSManager.prototype.get propertyNameCompletions):

  • UserInterface/Controllers/CodeMirrorCompletionController.js:

(WI.CodeMirrorCompletionController.prototype._generateCSSCompletions):

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

(WI.CSSCompletions.prototype._firstIndexOfPrefix):
(WI.CSSCompletions):
(WI.CSSCompletions.initializeCSSCompletions.): Deleted.
(WI.CSSCompletions.initializeCSSCompletions.collectPropertyNameForCodeMirror): Deleted.
(WI.CSSCompletions.initializeCSSCompletions.propertiesCallback): Deleted.
(WI.CSSCompletions.initializeCSSCompletions.fontFamilyNamesCallback): Deleted.
(WI.CSSCompletions.initializeCSSCompletions): Deleted.
Moved to WI.CSSManager.

(WI.CSSCompletions.prototype.next): Deleted.
(WI.CSSCompletions.prototype.previous): Deleted.
(WI.CSSCompletions.prototype._closest): Deleted.
Removed unused methods for navigating the completions list.
This behavior is encapsulated in WI.CompletionSuggestionsView.

(WI.CSSCompletions.prototype.isValidPropertyName): Deleted.
Moved to WI.CSSPropertyNameCompletions.

  • UserInterface/Models/CSSKeywordCompletions.js:

(WI.CSSKeywordCompletions.forPartialPropertyName):

  • UserInterface/Models/CSSPropertyNameCompletions.js: Added.

(WI.CSSPropertyNameCompletions.prototype.isValidPropertyName):
(WI.CSSPropertyNameCompletions):

  • UserInterface/Test.html:
  • UserInterface/Test/Test.js:

(WI.performOneTimeFrontendInitializationsUsingTarget):

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.updateStatus):
(WI.SpreadsheetStyleProperty.prototype._addCSSDocumentationButton):

4:19 AM Changeset in webkit [286843] by Nikolas Zimmermann
  • 13 edits in trunk/Source/WebCore

[LBSE] Handle RenderSVGRoot in all places that handle LegacyRenderSVGRoot
https://bugs.webkit.org/show_bug.cgi?id=233872

Reviewed by Rob Buis.

Various places that handle LegacyRenderSVGRoot, also need to handle the
LBSE RenderSVGRoot renderer -- this patch plumbs in support for
RenderSVGRoot where necessary.

Covered by existing tests, no change in behaviour.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::elementPath const):

  • page/FrameView.cpp:

(WebCore::FrameView::applyOverflowToViewport):

  • rendering/RenderTreeAsText.cpp:

(WebCore::write):

  • rendering/svg/RenderSVGResource.cpp:

(WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):

  • rendering/svg/SVGRenderSupport.cpp:

(WebCore::layoutSizeOfNearestViewportChanged):

  • rendering/svg/SVGRenderTreeAsText.cpp:

(WebCore::write):

  • rendering/svg/SVGRenderTreeAsText.h:
  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::attachInternal):
(WebCore::RenderTreeBuilder::detach):

  • rendering/updating/RenderTreeBuilderSVG.cpp:

(WebCore::RenderTreeBuilder::SVG::attach):
(WebCore::RenderTreeBuilder::SVG::detach):

  • rendering/updating/RenderTreeBuilderSVG.h:
  • svg/SVGElement.cpp:

(WebCore::SVGElement::childShouldCreateRenderer const):

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::svgAttributeChanged):
(WebCore::SVGSVGElement::currentViewBoxRect const):
(WebCore::SVGSVGElement::currentViewportSize const):

3:24 AM Changeset in webkit [286842] by Nikolas Zimmermann
  • 4 edits
    2 adds in trunk/Source/WebCore

[LBSE] Begin layer-aware RenderSVGRoot implementation
https://bugs.webkit.org/show_bug.cgi?id=233863

Reviewed by Rob Buis.

Begin implementing RenderSVGRoot - the renderer for the outermost <svg> element -
for the layer-based SVG engine (LBSE). Starting with the downstream implementation,
all parts were removed that can be upstreamed separated (SVGBoundingBoxComputation,
SVGContainerLayout, etc.). This only creates the renderer and integrates it with
the build systems.

Covered by existing tests, no change in behaviour.

  • Sources.txt: Add RenderSVGRoot.* to build.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • platform/graphics/transforms/TransformState.h:

(WebCore::TransformState::direction const): Make direction() public.

  • rendering/svg/RenderSVGRoot.cpp: Added.

(WebCore::RenderSVGRoot::RenderSVGRoot):
(WebCore::RenderSVGRoot::svgSVGElement const):
(WebCore::RenderSVGRoot::computeIntrinsicRatioInformation const):
(WebCore::RenderSVGRoot::isEmbeddedThroughSVGImage const):
(WebCore::RenderSVGRoot::isEmbeddedThroughFrameContainingSVGDocument const):
(WebCore::RenderSVGRoot::computeReplacedLogicalWidth const):
(WebCore::RenderSVGRoot::computeReplacedLogicalHeight const):
(WebCore::RenderSVGRoot::layout):
(WebCore::RenderSVGRoot::shouldApplyViewportClip const):
(WebCore::RenderSVGRoot::paint):
(WebCore::RenderSVGRoot::paintObject):
(WebCore::RenderSVGRoot::paintContents):
(WebCore::RenderSVGRoot::willBeDestroyed):
(WebCore::RenderSVGRoot::insertedIntoTree):
(WebCore::RenderSVGRoot::willBeRemovedFromTree):
(WebCore::RenderSVGRoot::styleDidChange):
(WebCore::RenderSVGRoot::updateLayerInformation):
(WebCore::RenderSVGRoot::updateFromStyle):
(WebCore::RenderSVGRoot::clippedOverflowRect const):
(WebCore::RenderSVGRoot::computeTransformationMatrices):
(WebCore::RenderSVGRoot::nodeAtPoint):
(WebCore::RenderSVGRoot::hasRelativeDimensions const):
(WebCore::RenderSVGRoot::addResourceForClientInvalidation):
(WebCore::RenderSVGRoot::currentViewportSize const):
(WebCore::RenderSVGRoot::mapLocalToContainer const):
(WebCore::RenderSVGRoot::overflowClipRect const):
(WebCore::RenderSVGRoot::applyTransform const):
(WebCore::RenderSVGRoot::absoluteRects const):
(WebCore::RenderSVGRoot::absoluteQuads const):

  • rendering/svg/RenderSVGRoot.h: Added.
2:39 AM Changeset in webkit [286841] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (iOS 15): Safari loses Network access when establishing WebRTC session
https://bugs.webkit.org/show_bug.cgi?id=233752
<rdar://problem/86196093>

Reviewed by Geoffrey Garen.

When we get an error from a UDP nw socket, we do not need to stop reading and close it.
We can just log the error and continue reading as the error might get fixed later on.

Not easily testable.

  • NetworkProcess/webrtc/NetworkRTCUDPSocketCocoa.mm:
2:30 AM Changeset in webkit [286840] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Handle TerminationException in WebCore::ReadableStream::create()
https://bugs.webkit.org/show_bug.cgi?id=233061

Patch by Frederic Wang <fwang@igalia.com> on 2021-12-10
Reviewed by Darin Adler.

Source/WebCore:

Test: streams/readable-stream-create-after-worker-terminates-crash.html

  • bindings/js/ReadableStream.cpp:

(WebCore::ReadableStream::create): Do not try immediately casting the constructor value to an
object, since it is undefined when a termination exception is thrown.

LayoutTests:

Add non-regression test.

  • streams/readable-stream-create-after-worker-terminates-crash-expected.txt: Added.
  • streams/readable-stream-create-after-worker-terminates-crash.html: Added.
2:18 AM Changeset in webkit [286839] by Chris Lord
  • 2 edits in trunk

Change contributor status of Chris Lord from committer to reviewer
https://bugs.webkit.org/show_bug.cgi?id=234136

Unreviewed.

  • metadata/contributors.json:
12:24 AM Changeset in webkit [286838] by commit-queue@webkit.org
  • 30 edits
    1 copy
    1 add in trunk

IOSurface memory attribution is hard to use in constructors
https://bugs.webkit.org/show_bug.cgi?id=232988
<rdar://problem/85541918>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-12-10
Reviewed by Chris Dumez.

Source/WebCore:

Add WebCore::ProcessIdentity type that can be used to communicate memory attribution.
For non-Cocoa ports, this is nullptr.
This is used in WebCore to set the memory attribution of IOSurface and objects
that hold IOSurfaces.
This is instantiated in WebKit.
Currently the only useful way to instantiate ProcessIdentity is by receiving
the ProcessIdentity as a message and create it this way for the
sender process.

No new tests, refactor.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/Logging.h:

Add WebCore Process log tag since the code moved from WebKit to ProcessIdentity
used that tag to log.

  • platform/ProcessIdentity.cpp: Added.

(WebCore::ProcessIdentity::ProcessIdentity):
(WebCore::ProcessIdentity::taskIdToken const):
(WebCore::ProcessIdentity::sendRight const):
(WebCore::ProcessIdentity::operator bool const):

  • platform/ProcessIdentity.h: Added.

Add the ProcessIdentity type that can be used to communicate memory attribution.

  • platform/graphics/RemoteVideoSample.h:

(WebCore::RemoteVideoSample::setOwnershipIdentity):

  • platform/graphics/angle/GraphicsContextGLANGLE.h:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.h:
  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm:

(WebCore::GraphicsContextGLCocoa::create):
(WebCore::GraphicsContextGLCocoa::GraphicsContextGLCocoa):
(WebCore::GraphicsContextGLANGLE::allocateAndBindDisplayBufferBacking):
Add an example use where the constructor takes the memory attribution token.
This may be needed in the future when the token is used as a parameter in
the ANGLE context creation.
Use the token in creating the IOSurface. This fixes a bug where WebGL
back buffers would not be attributed until they were sent to WP.

  • platform/graphics/cocoa/IOSurface.h:
  • platform/graphics/cocoa/IOSurface.mm:

(WebCore::IOSurface::setOwnershipIdentity):

  • platform/graphics/cocoa/WebProcessGraphicsContextGLCocoa.mm:

Source/WebKit:

Remove ifdefs and direct use of task_id_token_t.
Instead, use WebCore::ProcessIdentifier. This way the
cross-platform code is easier to author.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::GPUConnectionToWebProcess):

  • GPUProcess/GPUConnectionToWebProcess.h:

(WebKit::GPUConnectionToWebProcess::webProcessIdentity const):
(WebKit::GPUConnectionToWebProcess::webProcessIdentityToken const): Deleted.

  • GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:

(WebKit::RemoteGraphicsContextGLCocoa::RemoteGraphicsContextGLCocoa):
(WebKit::RemoteGraphicsContextGLCocoa::platformWorkQueueInitialize):
(WebKit::RemoteGraphicsContextGLCocoa::prepareForDisplay):

  • GPUProcess/graphics/RemoteImageBuffer.h:

(WebKit::RemoteImageBuffer::setOwnershipIdentity):
(WebKit::RemoteImageBuffer::setProcessOwnership): Deleted.

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::RemoteRenderingBackend):
(WebKit::RemoteRenderingBackend::createImageBufferWithQualifiedIdentifier):

  • GPUProcess/graphics/RemoteRenderingBackend.h:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:

(WebKit::Function<void):

  • Shared/GPUProcessConnectionParameters.h:

(WebKit::GPUProcessConnectionParameters::encode const):
(WebKit::GPUProcessConnectionParameters::decode):

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::SourceProxy::SourceProxy):
(WebKit::UserMediaCaptureManagerProxy::SourceProxy::setShouldApplyRotation):
(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
(WebKit::UserMediaCaptureManagerProxy::clone):
(WebKit::UserMediaCaptureManagerProxy::SourceProxy::setWebProcessIdentityToken): Deleted.

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:

(WebKit::UserMediaCaptureManagerProxy::ConnectionProxy::webProcessIdentityToken const): Deleted.

  • UIProcess/WebProcessProxy.cpp:
  • WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h:

(WebKit::ImageBufferShareableBitmapBackend::setOwnershipIdentity):

  • WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.cpp:

(WebKit::ImageBufferShareableMappedIOSurfaceBackend::setOwnershipIdentity):
(WebKit::ImageBufferShareableMappedIOSurfaceBackend::setProcessOwnership): Deleted.

  • WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.h:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeGPUProcessConnectionParameters):

Tools:

Update constructor calling base class constructor, add empty
ProcesseIdentity.

  • TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLCocoa.mm:
12:22 AM Changeset in webkit [286837] by Adrian Perez de Castro
  • 24 edits in trunk/Source

Non-unified build fixes, mid December 2021 edition
https://bugs.webkit.org/show_bug.cgi?id=234106

Unreviewed non-unified build fixes.

Source/JavaScriptCore:

  • wasm/js/WasmToJS.h: Remove unneeded forward declaration of CallLinkInfo, add forward

declaration of OptimizingCallLinkInfo.

Source/WebCore:

No new tests needed.

  • bindings/js/JSDOMConvertCallbacks.h: Add missing JSDOMGlobalObject.h header.
  • css/CSSImportRule.cpp: Add missing CSSMarkup.h header.
  • css/CSSLayerStatementRule.cpp: Add missinig CSSLayerBlockRule.h header.
  • platform/graphics/ColorInterpolation.cpp: Remove unneeded #pragma once.
  • platform/graphics/ColorInterpolation.h: Add missing <optional> header.
  • platform/graphics/displaylists/DisplayListItemBuffer.cpp: Add missing Filter.h header.
  • platform/graphics/displaylists/DisplayListRecorderImpl.cpp: Ditto.
  • platform/graphics/filters/FilterFunction.cpp: Add missing ImageBuffer.h header.
  • platform/graphics/filters/FilterOperation.cpp: Ditto.
  • platform/graphics/filters/FilterOperations.cpp: Ditto.
  • platform/graphics/filters/SourceAlpha.cpp: Ditto.
  • platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.cpp: Ditto.
  • platform/graphics/filters/software/SourceGraphicSoftwareApplier.cpp: Add missing

FilterImage.h header.

  • svg/SVGFEFuncAElement.cpp: Add missing ImageBuffer.h header.
  • svg/SVGFEFuncBElement.cpp: Ditto.
  • svg/SVGFEFuncGElement.cpp: Ditto.
  • svg/SVGFEFuncRElement.cpp: Ditto.
  • svg/SVGFEPointLightElement.cpp: Ditto.
  • svg/SVGFESpotLightElement.cpp: Ditto.

Source/WebKit:

  • NetworkProcess/storage/OriginStorageManager.cpp: Add missing WebsiteDataType.h and

wtf/FileSystem.h headers.

12:15 AM Changeset in webkit [286836] by graouts@webkit.org
  • 15 edits
    3 adds
    4 deletes in trunk

[Model] Add load and error events to distinguish resource load from model readiness
https://bugs.webkit.org/show_bug.cgi?id=233706
rdar://85922697

Reviewed by Chris Dumez and Dean Jackson.

Source/WebCore:

Test: model-element/model-element-error-and-load-events.html

Prior to this patch, <model> elements had a "ready" promise which resolved once the resource had been loaded.
However, this promise should be used when the <model> is fully ready, and this is done on macOS and iOS asynchronously
after the resource has been loaded by the supporting ARQL framework. So we need a way to monitor success or failure of
the resource load specifically.

To that end, and matching the <img> element, we dispatch "load" and "error" events on <model> elements and add a
"complete" property to indicate whether the resource is loaded.

Meanwhile, the "ready" promise is now resolved when the model is fully loaded by the supporting framework, indicating
that further APIs are safe to use.

Since creating the support ARQL object for macOS and iOS also requires the <model> element's renderer being available,
we opt into "custom style resolve callbacks" so that we may implement didAttachRenderers() on HTMLModelElement and keep
track of renderer availability before attempting to create the ModelPlayer.

  • Modules/model-element/HTMLModelElement.cpp:

(WebCore::HTMLModelElement::HTMLModelElement):
(WebCore::HTMLModelElement::create):
(WebCore::HTMLModelElement::setSourceURL):
(WebCore::HTMLModelElement::didAttachRenderers):
(WebCore::HTMLModelElement::notifyFinished):
(WebCore::HTMLModelElement::modelDidChange):
(WebCore::HTMLModelElement::createModelPlayer):
(WebCore::HTMLModelElement::didFinishLoading):
(WebCore::HTMLModelElement::didFailLoading):
(WebCore::HTMLModelElement::activeDOMObjectName const):
(WebCore::HTMLModelElement::virtualHasPendingActivity const):

  • Modules/model-element/HTMLModelElement.h:
  • Modules/model-element/HTMLModelElement.idl:

Tools:

Use the "load" event instead of the "ready" promise for this test which only requires monitoring
the <model> resource being loaded.

  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:

(TestWebKitAPI::TEST):

LayoutTests:

Remove existing tests around resource loading and recreate them in terms of "load" and "error"
events in model-element/model-element-error-and-load-events.html and in terms of the ready
promise in model-element/model-element-ready.html.

Other tests using model.ready for other purposes are also rewritten using events.

  • model-element/model-element-contents-layer-updates-with-clipping.html:
  • model-element/model-element-contents-layer-updates.html:
  • model-element/model-element-error-and-load-events-expected.txt: Added.
  • model-element/model-element-error-and-load-events.html: Added.
  • model-element/model-element-graphics-layers-opacity.html:
  • model-element/model-element-graphics-layers.html:
  • model-element/model-element-ready-expected.txt:
  • model-element/model-element-ready-load-aborted-expected.txt: Removed.
  • model-element/model-element-ready-load-aborted.html: Removed.
  • model-element/model-element-ready-load-failed-expected.txt: Removed.
  • model-element/model-element-ready-load-failed.html: Removed.
  • model-element/model-element-ready.html:
  • model-element/resources/model-element-test-utils.js: Added.

(const.createModelAndSource):

  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
12:11 AM Changeset in webkit [286835] by Said Abou-Hallawa
  • 12 edits in trunk/Source/WebCore

[GPU Process] [Filters] Enable Filter rendering in GPU Process
https://bugs.webkit.org/show_bug.cgi?id=233989

Reviewed by Cameron McCormack.

This will move applying the CSSFilterImageValue, the CSSFilter and the
SVGFilter to GPUProcess.

  • css/CSSFilterImageValue.cpp:

(WebCore::CSSFilterImageValue::image):

  • rendering/RenderLayerFilters.cpp:

(WebCore::RenderLayerFilters::allocateBackingStoreIfNeeded):

  • rendering/RenderMenuList.cpp:

(RenderMenuList::hostWindow const):
Change the implementation to call RenderObject::hostWindow() since it is
now defined to be virtual in the two base classes.

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::hostWindow const):

  • rendering/RenderObject.h:

Add the helper function RenderObject::hostWindow() since it is being
requested in many places because of creating ImageBuffer for GPUProcess.

  • rendering/RenderSearchField.cpp:

(WebCore::RenderSearchField::hostWindow const):
Change the implementation to call RenderObject::hostWindow() since it is
now defined to be virtual in the two base classes.

  • rendering/svg/RenderSVGResourceClipper.cpp:

(WebCore::RenderSVGResourceClipper::applyClippingToContext):

  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::applyResource):
(WebCore::RenderSVGResourceFilter::postApplyResource):

  • rendering/svg/RenderSVGResourceMasker.cpp:

(WebCore::RenderSVGResourceMasker::applyResource):
filterData.sourceGraphicBuffer will have to stay around because caching
the filter result has not been implemented yet.

  • rendering/svg/SVGRenderingContext.cpp:

(WebCore::SVGRenderingContext::createImageBuffer):

  • rendering/svg/SVGRenderingContext.h:
Note: See TracTimeline for information about the timeline view.