⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Feb 12, 2022:

11:11 PM Changeset in webkit [289705] by ntim@apple.com
  • 2 edits in trunk/LayoutTests

Skip imported/w3c/web-platform-tests/url/toascii.window.html on Catalina/Big Sur

Unreviewed test gardening.

  • platform/mac/TestExpectations:
9:42 PM Changeset in webkit [289704] by commit-queue@webkit.org
  • 2 edits in trunk/Source/bmalloc

Fix typos in libpas docs
https://bugs.webkit.org/show_bug.cgi?id=236550

Patch by Brandon Stewart <Brandon> on 2022-02-12
Reviewed by Yusuke Suzuki.

Fix several typos in libpas documentation.

  • libpas/Documentation.md:
5:18 PM Changeset in webkit [289703] by Jonathan Bedard
  • 2 edits in trunk/Tools

[run-webkit-tests] Do not try and read from /dev/null
https://bugs.webkit.org/show_bug.cgi?id=236528
<rdar://problem/88836868>

Reviewed by Alexey Proskuryakov.

While writing to /dev/null is well defined, reading from it is not. Do not
read from /dev/null.

  • Scripts/webkitpy/layout_tests/servers/websocket_server.py:

(PyWebSocket.init): Delete _wsin.
(PyWebSocket._prepare_config): Ditto.
(PyWebSocket._spawn_process): Use executive.PIPE instead of os.devnull.
(PyWebSocket._stop_running_server): Delete _wsin.

5:05 PM Changeset in webkit [289702] by commit-queue@webkit.org
  • 10 edits
    3 adds in trunk/Source/WebKit

Update preference location used for CaptivePortalMode.
https://bugs.webkit.org/show_bug.cgi?id=236135
<rdar://problem/88486544>

Patch by Gavin Phillips <gavin.p@apple.com> on 2022-02-12
Reviewed by Geoffrey Garen.

  • PlatformMac.cmake:
  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/_WKSystemPreferences.h: Added.
  • UIProcess/API/Cocoa/_WKSystemPreferences.mm: Added.

(+[_WKSystemPreferences isCaptivePortalModeEnabled]):
(+[_WKSystemPreferences setCaptivePortalModeEnabled:]):
(+[_WKSystemPreferences isCaptivePortalModeIgnored:]):
(+[_WKSystemPreferences setCaptivePortalModeIgnored:ignore:]):

  • UIProcess/API/Cocoa/_WKSystemPreferencesInternal.h: Added.
  • UIProcess/Cocoa/PreferenceObserver.mm:

(-[WKUserDefaults findPreferenceChangesAndNotifyForKeys:toValuesForKeys:]):

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::captivePortalModeConfigUpdateCallback):
(WebKit::WebProcessPool::registerNotificationObservers):
(WebKit::WebProcessPool::unregisterNotificationObservers):
(WebKit::isCaptivePortalModeEnabledBySystemIgnoringCaching):
(WebKit::WebProcessPool::notifyPreferencesChanged):

  • UIProcess/WebProcessPool.h:
  • UIProcess/mac/DisplayCaptureSessionManager.h:
  • UIProcess/mac/DisplayCaptureSessionManager.mm:

(WebKit::DisplayCaptureSessionManager::promptForGetDisplayMedia):

  • WebKit.xcodeproj/project.pbxproj:
2:57 PM Changeset in webkit [289701] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[macOS] Use system window and screen picker when available
https://bugs.webkit.org/show_bug.cgi?id=236531
rdar://87111816

Unreviewed build fix.

  • platform/mediastream/mac/ScreenCaptureKitSharingSessionManager.mm:

(WebCore::ScreenCaptureKitSharingSessionManager::takeSharingSessionForFilter):

2:44 PM Changeset in webkit [289700] by ysuzuki@apple.com
  • 4 edits
    2 adds in trunk

WebGL2 AllowShared TypedArray should be accepted
https://bugs.webkit.org/show_bug.cgi?id=232662

Reviewed by Dean Jackson.

Source/WebCore:

Test: webgl/webgl-allow-shared-typed-array.html

TypedArray with [AllowShared] annotation is not handled properly, which results in handling it as Sequence<T>,
invoking iteration protocol to copy them. This patch adds that as the same to [AllowShared] ArrayBuffer / ArrayBufferView.

  • bindings/IDLTypes.h:
  • bindings/js/JSDOMConvertUnion.h:

LayoutTests:

  • webgl/webgl-allow-shared-typed-array-expected.txt: Added.
  • webgl/webgl-allow-shared-typed-array.html: Added.
1:33 PM Changeset in webkit [289699] by ntim@apple.com
  • 4 edits
    1 delete in trunk/LayoutTests

Unreviewed test gardening: imported/w3c/web-platform-tests/url/toascii.window.html

LayoutTests/imported/w3c:

  • web-platform-tests/url/toascii.window-expected.txt:

LayoutTests:

  • platform/gtk/imported/w3c/web-platform-tests/url/toascii.window-expected.txt: Removed.
  • platform/mac/TestExpectations:
11:25 AM Changeset in webkit [289698] by Patrick Angle
  • 11 edits in trunk/Source/WebCore

Web Inspector: [Flexbox] Show item bounds, gaps, and free space in flex overlays
https://bugs.webkit.org/show_bug.cgi?id=236410

Reviewed by Devin Rousso.

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::flexibleBoxRendererBeganLayoutImpl):
(WebCore::InspectorInstrumentation::flexibleBoxRendererWrappedToNextLineImpl):
(WebCore::InspectorInstrumentation::instrumentingAgents):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::flexibleBoxRendererBeganLayout):
(WebCore::InspectorInstrumentation::flexibleBoxRendererWrappedToNextLine):

  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorDOMAgent::reset):
(WebCore::InspectorDOMAgent::flexibleBoxRendererBeganLayout):
(WebCore::InspectorDOMAgent::flexibleBoxRendererWrappedToNextLine):
(WebCore::InspectorDOMAgent::flexibleBoxRendererCachedItemsAtStartOfLine):

  • inspector/agents/InspectorDOMAgent.h:
  • Add instrumentation points specifically for flexbox renderers to keep track of which items start a new line

inside flex containers. The start of the first line is not recorded because it will always be zero.

(WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):

  • Force a layout of the document to ensure that our collection of flexbox line starts is correctly populated

when attaching an inspector, since without an inspector this information is not kept beyond layout.

  • inspector/InspectorOverlay.cpp:

(WebCore::drawLayoutPattern):

  • Generalize drawLayoutHatching to support different line styles in order to support the new stippling fill.
  • In order to support "flipping" the pattern we now use a rectangle encompassing the provided quad as the edges

we follow for filling the pattern (the existing clipping ensures that the final product is still within the
quad). This also resolves an issue that could occur in transformed containers (non-rectangular) where the
spacing was inconsistent at different rotations/perspectives.

(WebCore::drawLayoutStippling):

  • A new dot-pattern effect similar to hatching, but using small dots to fill the space instead.

(WebCore::drawLayoutHatching):

  • Updated to use the new generic drawLayoutPattern helper.

(WebCore::InspectorOverlay::drawFlexOverlay):
(WebCore::InspectorOverlay::buildFlexOverlay):

  • Handle iterating through the flex children to show their bounds as well as the spacing/gaps between them.

Almost all this work is done in relative terms, like leading/trailing/cross-axis/main-axis to make it easier to
reason about what should happen for different writing modes, text direction, flex direction, and flex wrapping.
To accomplish this coordinates of children are read through special corrected* helper functions that take in
to account the determined direction, main-axis reversal, and cross axis-reversal from all of the relevant
properties. This means there are only 8 (23) actual permutations of flex layout (since the layout inside each
individual child is irrelevant here). Throughout we are working with flex children frames that are relative to
their parent, which saves us from having to deal with transforms until after we have constructed most of our
overlay representation, only needing to be passed through childQuadToRootQuad before being added to the
appropriate part of the highlight object.

  • inspector/InspectorOverlay.h:

(WebCore::InspectorOverlay::Highlight::FlexHighlightOverlay::encode const):
(WebCore::InspectorOverlay::Highlight::FlexHighlightOverlay::decode):

  • rendering/RenderBox.h:

(WebCore::RenderBox::marginBox const):

  • Add a way to get the entire margin box instead of its individual components.
  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::layoutFlexItems):

  • rendering/RenderFlexibleBox.h:
  • Make getting the computed inter-item and inter-line gap public so we can use them in the overlay.
  • Add instrumentation calls to keep track of the indexes of items that start a new line during layout when an

Inspector is attached.

  • platform/LayoutUnit.h:

(WebCore::operator!=):

10:16 AM Changeset in webkit [289697] by jer.noble@apple.com
  • 33 edits
    11 adds in trunk

Add settings to restrict media containers and codecs when in Captive Portal mode
https://bugs.webkit.org/show_bug.cgi?id=236245

Reviewed by Eric Carlson.

Source/WebCore:

Tests: media/media-allowed-codecs.html

media/media-allowed-containers.html
media/media-source/media-source-allowed-codecs.html
media/media-source/media-source-allowed-containers.html

Add settings at the WebCore level to optionally declare a list of container types,
video codecs, audio codecs, and caption formats to allow when loading media through
HTMLMediaElement and MediaSource.

There are some cases where the codec ID, typically a four-character-code embedded
in the container itself, does not match the RFC4281 codec string. Notably, this is the case
with "mp4a.40" and 'aac '. So the settings must include both the codec ID and the codec
type in string form.

Query these lists in HTMLMediaElement::canPlayType() and MediaSource::isTypeSupported()
and reject ContentTypes which do not conform to the allowed types.

Query these lists in MediaSource::changeType() to disallow switching to an unsupported
ContentType.

If these lists are set, pass them into AVURLAsset as creation options.

When a new AVAssetTrack is loaded, query these lists and if the track's type does not
conform to the allowed types, synthesize an error and block further loading.

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::isTypeSupported):

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::changeType):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::canPlayType const):
(WebCore::HTMLMediaElement::allowedMediaContainerTypes const):
(WebCore::HTMLMediaElement::allowedMediaCodecTypes const):
(WebCore::HTMLMediaElement::allowedMediaVideoCodecTypes const):
(WebCore::HTMLMediaElement::allowedMediaAudioCodecTypes const):
(WebCore::HTMLMediaElement::allowedMediaCaptionFormatTypes const):

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

(WebCore::SettingsBase::setAllowedMediaContainerTypes):
(WebCore::SettingsBase::setAllowedMediaVideoCodecTypes):
(WebCore::SettingsBase::setAllowedMediaAudioCodecTypes):
(WebCore::SettingsBase::setAllowedMediaCaptionFormatTypes):

  • page/SettingsBase.h:

(WebCore::SettingsBase::setAllowedMediaContainerTypes):
(WebCore::SettingsBase::allowedMediaContainerTypes const):
(WebCore::SettingsBase::setAllowedMediaVideoCodecTypes):
(WebCore::SettingsBase::allowedMediaVideoCodecTypes const):
(WebCore::SettingsBase::setAllowedMediaAudioCodecTypes):
(WebCore::SettingsBase::allowedMediaAudioCodecTypes const):
(WebCore::SettingsBase::setAllowedMediaCaptionFormatTypes):
(WebCore::SettingsBase::allowedMediaCaptionFormatTypes const):

  • platform/graphics/ContentTypeUtilities.cpp: Added.

(WebCore::contentTypesToCodecs):
(WebCore::contentTypeMeetsContainerAndCodecTypeRequirements):

  • platform/graphics/ContentTypeUtilities.h: Added.
  • platform/graphics/FourCC.h:

(WebCore::FourCC::encode const):
(WebCore::FourCC::decode):

  • platform/graphics/MediaPlayer.cpp:

(WebCore::nullOptionalStringVector):
(WebCore::nullOptionalFourCCVector):
(WebCore::MediaPlayer::nextBestMediaEngine):
(WebCore::MediaPlayer::allowedMediaContainerTypes const):
(WebCore::MediaPlayer::allowedMediaVideoCodecTypes const):
(WebCore::MediaPlayer::allowedMediaAudioCodecTypes const):
(WebCore::MediaPlayer::allowedMediaCaptionFormatTypes const):

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaEngineSupportParameters::encode const):
(WebCore::MediaEngineSupportParameters::decode):

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:

(WebCore::MediaPlayerPrivateAVFoundation::loadingMetadata const):

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

(WebCore::contentTypesToCodecs): Deleted.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
(WebCore::MediaPlayerPrivateAVFoundationObjC::allTracksArePlayable const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::trackIsPlayable const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::assetStatus const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsTypeAndCodecs):
(WebCore::assetTrackMetadataKeyNames):

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::setAllowedMediaContainerTypes):
(WebCore::InternalSettings::setAllowedMediaVideoCodecTypes):
(WebCore::InternalSettings::setAllowedMediaAudioCodecTypes):
(WebCore::InternalSettings::setAllowedMediaCaptionFormatTypes):

  • testing/InternalSettings.h:
  • testing/InternalSettings.idl:

Source/WebCore/PAL:

  • pal/cocoa/AVFoundationSoftLink.h:
  • pal/cocoa/AVFoundationSoftLink.mm:

Source/WebKit:

RemoteMediaPlayerManager caches the results of supportsTypeAndCodecs() calls, which
is problematic when those results can change due to a change in settings. So enforce
the allowed codec and containers settings at the RemoteMediaPlayerManager level. Also,
pass those settings across the GPU process boundary via RemoteMediaPlayerProxyConfiguration.

Drive-by fix: refactor RemoteMediaPlayerProxyConfiguration::decode() so as not to require
re-declaring the types of every ivar, and greatly simplify the implementation.

  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h:

(WebKit::RemoteMediaPlayerProxyConfiguration::encode const):
(WebKit::RemoteMediaPlayerProxyConfiguration::decode):

  • WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:

(WebKit::RemoteMediaPlayerManager::createRemoteMediaPlayer):
(WebKit::RemoteMediaPlayerManager::supportsTypeAndCodecs):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Source/WTF:

  • Scripts/Preferences/WebPreferences.yaml:

LayoutTests:

  • media/media-allowed-codecs-expected.txt: Added.
  • media/media-allowed-codecs.html: Added.
  • media/media-allowed-containers-expected.txt: Added.
  • media/media-allowed-containers.html: Added.
  • media/media-source/media-source-allowed-codecs-expected.txt: Added.
  • media/media-source/media-source-allowed-codecs.html: Added.
  • media/media-source/media-source-allowed-containers-expected.txt: Added.
  • media/media-source/media-source-allowed-containers.html: Added.
8:08 AM Changeset in webkit [289696] by eric.carlson@apple.com
  • 17 edits
    3 adds in trunk/Source

[macOS] Use system window and screen picker when available
https://bugs.webkit.org/show_bug.cgi?id=236531
rdar://87111816

Reviewed by Jer Noble.

Source/WebCore:

Tested manually.

  • SourcesCocoa.txt: Add new files.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • en.lproj/Localizable.strings: Update prompts.
  • platform/mediastream/cocoa/DisplayCaptureSourceCocoa.cpp:

(WebCore::DisplayCaptureSourceCocoa::capturerConfigurationChanged): Allow a capturer
to notify the source of a configuration change.

  • platform/mediastream/cocoa/DisplayCaptureSourceCocoa.h:

(WebCore::CapturerObserver::capturerConfigurationChanged):

  • platform/mediastream/mac/ScreenCaptureKitCaptureSource.h:
  • platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:

(-[WebCoreScreenCaptureKitHelper stream:didStopWithError:]): Forward delegate callbacks
to the capture source.
(-[WebCoreScreenCaptureKitHelper sessionDidEnd:]): Ditto.
(-[WebCoreScreenCaptureKitHelper sessionDidChangeContent:]): Ditto.
(-[WebCoreScreenCaptureKitHelper pickerCanceledForSession:]): Ditto.
(WebCore::ScreenCaptureKitCaptureSource::sessionDidChangeContent): React to a
reconfiguration.
(WebCore::ScreenCaptureKitCaptureSource::sessionDidEnd):
(WebCore::ScreenCaptureKitCaptureSource::startContentStream): Use the sharing
session manager when available.
(WebCore::ScreenCaptureKitCaptureSource::intrinsicSize const): Get the size from
the content when possible.

  • platform/mediastream/mac/ScreenCaptureKitSharingSessionManager.h: Added.

(WebCore::ScreenCaptureKitSharingSessionManager::SharingSessionObserver::operator== const):

  • platform/mediastream/mac/ScreenCaptureKitSharingSessionManager.mm: Added.

(-[WebDisplayMediaPromptHelper initWithCallback:]):
(-[WebDisplayMediaPromptHelper disconnect]):
(-[WebDisplayMediaPromptHelper startObservingSession:]):
(-[WebDisplayMediaPromptHelper stopObservingSession:]):
(-[WebDisplayMediaPromptHelper sessionDidEnd:]):
(-[WebDisplayMediaPromptHelper sessionDidChangeContent:]):
(-[WebDisplayMediaPromptHelper pickerCanceledForSession:]):
(WebCore::ScreenCaptureKitSharingSessionManager::isAvailable):
(WebCore::ScreenCaptureKitSharingSessionManager::singleton):
(WebCore::ScreenCaptureKitSharingSessionManager::ScreenCaptureKitSharingSessionManager):
(WebCore::ScreenCaptureKitSharingSessionManager::~ScreenCaptureKitSharingSessionManager):
(WebCore::ScreenCaptureKitSharingSessionManager::pickerCanceledForSession):
(WebCore::ScreenCaptureKitSharingSessionManager::sessionDidEnd):
(WebCore::ScreenCaptureKitSharingSessionManager::sessionDidChangeContent):
(WebCore::ScreenCaptureKitSharingSessionManager::showWindowPicker):
(WebCore::ScreenCaptureKitSharingSessionManager::showScreenPicker):
(WebCore::ScreenCaptureKitSharingSessionManager::promptForGetDisplayMedia):
(WebCore::ScreenCaptureKitSharingSessionManager::takeSharingSessionForFilter):

Source/WebCore/PAL:

  • PAL.xcodeproj/project.pbxproj:
  • pal/mac/ScreenCaptureKitSoftLink.h:
  • pal/mac/ScreenCaptureKitSoftLink.mm:
  • pal/spi/mac/ScreenCaptureKitSPI.h: Added.

Source/WebKit:

  • Platform/spi/Cocoa/SafeBrowsingSPI.h:
  • UIProcess/mac/DisplayCaptureSessionManager.mm:

(WebKit::DisplayCaptureSessionManager::alertForGetDisplayMedia): Update prompt strings.
(WebKit::DisplayCaptureSessionManager::showWindowPicker): Use capture session
manager when available.
(WebKit::DisplayCaptureSessionManager::showScreenPicker): Ditto.

Source/WTF:

  • wtf/PlatformHave.h: Define HAVE_SC_CONTENT_SHARING_SESSION.
7:48 AM Changeset in webkit [289695] by Adrian Perez de Castro
  • 2 edits in trunk/Source/JavaScriptCore

[CMake] REGRESSION(r289611): Debug builds fail linking binaries with ld.lld
https://bugs.webkit.org/show_bug.cgi?id=236506

Reviewed by Yusuke Suzuki.

  • jit/ThunkGenerators.cpp: Use .previous in inline assembler for thunks in order to ensure

that mixed emission of assembler code and variable definitions correctly puts each of them
in their rightful sections in the output object code.

7:42 AM Changeset in webkit [289694] by commit-queue@webkit.org
  • 10 edits in trunk

Invoke mouse hover delegate callback on iOS
https://bugs.webkit.org/show_bug.cgi?id=233018

Patch by Kevin Turner <kevin_turner@apple.com> on 2022-02-12
Reviewed by Tim Horton.

Source/WebKit:

Allow mouseDidMoveOverElement: callbacks on iOS with pointer support.

Test: iOSMouseSupport.MouseDidMoveOverElement

  • Shared/API/Cocoa/_WKHitTestResult.h:
  • Shared/API/Cocoa/_WKHitTestResult.mm:
  • Shared/API/Cocoa/_WKHitTestResultInternal.h:
  • Shared/Cocoa/APIObject.mm:

(API::Object::newObject):

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

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::mouseDidMoveOverElement):
Convert the modifier flags from the hover event to UIKeyModifierFlags if not on macOS.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/iOSMouseSupport.mm:

(-[MouseSupportUIDelegate _webView:mouseDidMoveOverElement:withFlags:userInfo:]):
(-[MouseSupportUIDelegate setMouseDidMoveOverElementHandler:]):
(TEST):

7:34 AM Changeset in webkit [289693] by commit-queue@webkit.org
  • 7 edits
    2 adds in trunk

Suppress style invalidation when matching :checked
https://bugs.webkit.org/show_bug.cgi?id=235910

Patch by Rob Buis <rbuis@igalia.com> on 2022-02-12
Reviewed by Antti Koivisto.

Source/WebCore:

Suppress style invalidation when matching :checked for option elements.

Test: fast/selectors/has-select-option-crash.html

  • css/SelectorCheckerTestFunctions.h:

(WebCore::isChecked):

  • html/HTMLOptionElement.cpp:

(WebCore::HTMLOptionElement::selected const):
(WebCore::HTMLOptionElement::setSelectedState):

  • html/HTMLOptionElement.h:
  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::updateListItemSelectedStates):
(WebCore::HTMLSelectElement::recalcListItems const):

  • html/HTMLSelectElement.h:

LayoutTests:

  • fast/selectors/has-select-option-crash-expected.txt: Added.
  • fast/selectors/has-select-option-crash.html: Added.
7:29 AM Changeset in webkit [289692] by Cameron McCormack
  • 3 edits in trunk/Source/WebCore

Make WidgetHierarchyUpdatesSuspensionScope cheaper if it has nothing to do
https://bugs.webkit.org/show_bug.cgi?id=236486

Reviewed by Simon Fraser.

With content that does a lot of DOM manipulation, we can create and
destroy a WidgetHierarchyUpdatesSuspensionScope on the stack many times.
When this object has nothing to do, it calls an out of line function.
This patch pulls out the check for whether it needs to call
moveWidgets() into the inline destructor.

This is a 1% saving on the jQuery-TodoMVC subtest of Speedometer 2,
though the effect on the top line score is minimal.

  • rendering/RenderWidget.cpp:

(WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):

  • rendering/RenderWidget.h:

(WebCore::WidgetHierarchyUpdatesSuspensionScope::~WidgetHierarchyUpdatesSuspensionScope):
(WebCore::WidgetHierarchyUpdatesSuspensionScope::scheduleWidgetToMove):

7:08 AM Changeset in webkit [289691] by Cameron McCormack
  • 2 edits in trunk/Source/WebCore

Look up InputTypeFactoryMap with an ASCII lowercase string instead of using a ASCIICaseInsensitiveHash
https://bugs.webkit.org/show_bug.cgi?id=236532

Reviewed by Myles C. Maxfield.

InputType::create looks up the InputTypeFactoryMap based on the
AtomString value of the <input type> attribute. The HashMap uses an
ASCIICaseInsensitiveHash, but the AtomStrings stored in the map are all
ASCII lowercase to begin with. This means that we spend time doing an
ASCII case insensitive hash computation on the query string. Most
content already supplies an ASCII lowercase type value, so it's less
work to ASCII lowercase the type value and then look up the HashMap
using the regular hash for AtomStrings (i.e., pulling the hash out of
AtomString).

Doing this is a 0.5% improvement on a couple of Speedometer 2 subtests,
and a 0.1% improvement to the overall score.

  • html/InputType.cpp:

(WebCore::InputType::create):

6:20 AM Changeset in webkit [289690] by aakash_jain@apple.com
  • 12 edits in trunk/Tools

Unreviewed, reverting r289687.
https://bugs.webkit.org/show_bug.cgi?id=236539

broke commit queue

Reverted changeset:

"git-webkit setup should allow changing the credentials"
https://bugs.webkit.org/show_bug.cgi?id=235297
https://commits.webkit.org/r289687

Patch by Commit Queue <commit-queue@webkit.org> on 2022-02-12

Feb 11, 2022:

6:29 PM Changeset in webkit [289689] by don.olmstead@sony.com
  • 3 edits in trunk/Source/JavaScriptCore

Allow structureHeapAddressSize to be set during build
https://bugs.webkit.org/show_bug.cgi?id=236527

Reviewed by Yusuke Suzuki.

Add STRUCTURE_HEAP_ADDRESS_SIZE_IN_MB as a way to set the size of
structureHeapAddressSize at build time. Set a default for the PlayStation port.

  • PlatformPlayStation.cmake:
  • runtime/JSCConfig.h:
6:04 PM Changeset in webkit [289688] by Kocsen Chung
  • 1 copy in tags/Safari-614.1.3

Tag Safari-614.1.3.

6:04 PM Changeset in webkit [289687] by Jonathan Bedard
  • 12 edits in trunk/Tools

git-webkit setup should allow changing the credentials
https://bugs.webkit.org/show_bug.cgi?id=235297
<rdar://problem/87988794>

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/webkitbugspy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py:

(Tracker.credentials): Pass validater into webkitscmpy.credentials if caller requests validation.

  • Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py:

(Tracker.credentials): Pass validater into webkitscmpy.credentials if caller requests validation.

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

(credentials): Allow caller to provide a callback which will validate credentials to ensure
they work, re-prompt user if credentials fail validation.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:

(Setup.git): Request validation of GitHub credentials.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:

(GitHub.credentials): Pass validation flag.

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

5:52 PM Changeset in webkit [289686] by Alan Bujtas
  • 4 edits
    2 adds in trunk

contain:content breaks fullscreen
https://bugs.webkit.org/show_bug.cgi?id=236470
<rdar://88689388>

Reviewed by Simon Fraser.

Source/WebCore:

Paint/layout containment forms a containing block for fixed positioned block boxes. It makes all fixed
positioned descendants anchored (contained) to this layout container.
This patch enables fullscreen boxes break out of this non-ICB based layout scope (this is similar to what we
do for other, "layout scope changing" properties, see canContainFixedPositionObjects).

Test: fullscreen/fullscreen-prevented-by-containment.html

  • css/fullscreen.css:

(:-webkit-full-screen-ancestor:not(iframe)):

  • css/parser/CSSParserContext.cpp:

(WebCore::CSSParserContext::CSSParserContext):

LayoutTests:

  • fullscreen/fullscreen-prevented-by-containment-expected.txt: Added.
  • fullscreen/fullscreen-prevented-by-containment.html: Added.
5:46 PM Changeset in webkit [289685] by Megan Gardner
  • 14 edits
    2 copies in trunk/Source/WebKit

Implement Reveal methods
https://bugs.webkit.org/show_bug.cgi?id=236478

Reviewed by Wenson Hsieh.

Respond to protocol methods that request RVItems for selection.

  • Platform/IPC/ArgumentCoder.h:
  • Platform/IPC/DataReference.h:
  • Shared/Cocoa/SandboxExtensionCocoa.mm:
  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:
  • SourcesCocoa.txt:
  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView requestRVItemInSelectedRangeWithCompletionHandler:]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::requestRVItemInCurrentSelectedRange):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::requestRVItemInCurrentSelectedRange):

5:45 PM Changeset in webkit [289684] by Jonathan Bedard
  • 5 edits in trunk/Tools

[git-webkit] Link issue to pull requests
https://bugs.webkit.org/show_bug.cgi?id=236339
<rdar://problem/88657772>

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:

(PullRequest.main): Add link to pull request in issue comments, assign issue to
pull request author.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:

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

5:35 PM Changeset in webkit [289683] by Nikos Mouchtaris
  • 2 edits in trunk/Source/WTF

Turn overscroll-behavior on by default
https://bugs.webkit.org/show_bug.cgi?id=236060

Reviewed by Tim Nguyen.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
5:15 PM Changeset in webkit [289682] by commit-queue@webkit.org
  • 5 edits
    4 deletes in trunk

Unreviewed, reverting r289498.
https://bugs.webkit.org/show_bug.cgi?id=236534

Speedometer2 2% regression

Reverted changeset:

"Dialog element only animates once"
https://bugs.webkit.org/show_bug.cgi?id=236274
https://commits.webkit.org/r289498

5:12 PM Changeset in webkit [289681] by Wenson Hsieh
  • 18 edits
    1 add in trunk/Source

[iOS] Add a "Copy Cropped Image" context menu item when long pressing images
https://bugs.webkit.org/show_bug.cgi?id=236511
rdar://88817219

Reviewed by Devin Rousso.

Source/WebKit:

Add support for a new context menu item on iOS that allows the user to copy a cropped version of the source
image, after invoking markup UI. See below for more details.

  • Configurations/WebKit.xcconfig:

Link against UniformTypeIdentifiers on macOS 11+, rather than macOS 12+.

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

(WebKit::transcode):
(WebKit::transcodeWithPreferredMIMEType):

Move a helper function that transcodes an image to a given UTI into CocoaImage.h, as a standalone function.
Also, add a separate helper function here that transcodes an image to a given MIME type (with a fallback UTI, in
case the MIME type cannot be mapped to a suitable UTI that conforms to any image UTI). The new call sites of
this function are in WKContentViewInteraction.mm.

  • Platform/cocoa/TextRecognitionUtilities.mm:
  • Shared/ios/InteractionInformationAtPosition.h:
  • Shared/ios/InteractionInformationAtPosition.mm:

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

Add a new imageMIMEType member to represent the MIME type of the source image used to generate the bitmap
image data in image.

  • SourcesCocoa.txt: Add CocoaImage.mm.
  • UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:

(-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:userInfo:]):
(-[_WKActivatedElementInfo _initWithType:URL:imageURL:location:title:ID:rect:image:imageMIMEType:]):
(-[_WKActivatedElementInfo _initWithType:URL:imageURL:location:title:ID:rect:image:imageMIMEType:userInfo:]):
(-[_WKActivatedElementInfo imageMIMEType]):

Add plumbing for imageMIMEType from InteractionInformationAtPosition (position information) into
_WKActivatedElementInfo, as an internal method. We use this information below, to transcode the resulting image
back to the source image format after applying markup, when invoking the new "Copy Cropped Image" item.

(-[_WKActivatedElementInfo _initWithType:URL:imageURL:location:title:ID:rect:image:]): Deleted.
(-[_WKActivatedElementInfo _initWithType:URL:imageURL:location:title:ID:rect:image:userInfo:]): Deleted.

  • UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h:
  • UIProcess/API/Cocoa/_WKElementAction.h:
  • UIProcess/API/Cocoa/_WKElementAction.mm:

(+[_WKElementAction _elementActionWithType:customTitle:assistant:]):
(+[_WKElementAction imageForElementActionType:]):

Add support for the new "Copy Cropped Image" item tag (_WKElementActionTypeCopyCroppedImage).

(elementActionTypeToUIActionIdentifier):
(uiActionIdentifierToElementActionType):

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

(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
(-[WKActionSheetAssistant defaultActionsForImageSheet:]):
(-[WKActionSheetAssistant showLinkSheet]):
(-[WKActionSheetAssistant handleElementActionWithType:element:needsInteraction:]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _showAttachmentSheet]):
(-[WKContentView performImageAnalysisMarkup:]):

Use the new transcodeWithPreferredMIMEType helper method here.

(-[WKContentView doAfterComputingImageAnalysisResultsForMarkup:]):

Remove the TIFF transcoding workaround from this method (see associated changes in Radar for more information).

(-[WKContentView actionSheetAssistant:copyCroppedImage:sourceMIMEType:]):

Handle the new action by calling into VisionKit to adjust the source image as needed, and then transcode the
resulting CGImageRef back to a format that matches the source image; finally, write this transcoded
representation to the general pasteboard.

(-[WKContentView _dataForPreviewItemController:atPosition:type:]):
(-[WKContentView _presentedViewControllerForPreviewItemController:]):

Pass imageMIMEType from position information into the activated element info initializer in several places.

(WebKit::transcode): Deleted.

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::imagePositionInformation):
(WebKit::elementPositionInformation):

Populate imageMIMEType in position information.

Source/WTF:

Add a compile-time flag to guard availability of the UniformTypeIdentifiers framework. See WebKit/ChangeLog for
more information.

  • wtf/PlatformHave.h:
4:42 PM Changeset in webkit [289680] by Said Abou-Hallawa
  • 3 edits in trunk/Source/WebKit

[GPU Process] [CG] Add an ArgumentCoder for CFCharacterSetRef
https://bugs.webkit.org/show_bug.cgi?id=236507

Reviewed by Sam Weinig.

CFCharacterSetRef is used for encoding and decoding the system fonts.

  • Shared/cf/ArgumentCodersCF.cpp:

(IPC::typeFromCFTypeRef):
(IPC::ArgumentCoder<CFTypeRef>::encode):
(IPC::ArgumentCoder<RetainPtr<CFTypeRef>>::decode):
(IPC::ArgumentCoder<CFCharacterSetRef>::encode):
(IPC::ArgumentCoder<RetainPtr<CFCharacterSetRef>>::decode):

  • Shared/cf/ArgumentCodersCF.h:
3:54 PM Changeset in webkit [289679] by Alan Coon
  • 1 copy in tags/Safari-613.1.17.0.1

Tag Safari-613.1.17.0.1.

3:53 PM Changeset in webkit [289678] by Russell Epstein
  • 1 copy in tags/Safari-613.1.17.1.1

Tag Safari-613.1.17.1.1.

3:35 PM Changeset in webkit [289677] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Marking expectations for compositing/iframes/border-radius-composited-frame.html as it is failing on EWS
rdar://80333071

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:26 PM Changeset in webkit [289676] by Jonathan Bedard
  • 4 edits in trunk/Tools

[EWS] Rebase PRs on tip of branch
https://bugs.webkit.org/show_bug.cgi?id=236389
<rdar://problem/88705147>

Reviewed by Aakash Jain.

  • Tools/CISupport/ews-build/master.cfg: Add github.base.ref to properties.
  • Tools/CISupport/ews-build/steps.py:

(CheckOutSource.run): Set branch from github properties, if available.
(ShowIdentifier.start): Use 'got_revision' instead of github properties.
(CheckOutPullRequest.run): Rebase PRs if we have enough information to. To support
rebasing, we need to handle conflicts in changelogs.
(RevertPullRequestChanges.run): Revert to whatever revision we rebased on.
(Trigger.propertiesToPassToTriggers): Pass github.base.ref to triggered build.

  • Tools/CISupport/ews-build/steps_unittest.py:

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

3:23 PM Changeset in webkit [289675] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[ Mac wk1 ] fast/text/otsvg-canvas.html failing constantly
https://bugs.webkit.org/show_bug.cgi?id=236530

Unreviewed test gardening

  • platform/mac-wk1/TestExpectations:
3:10 PM Changeset in webkit [289674] by Truitt Savell
  • 2 edits in trunk/LayoutTests

update expectations for webrtc/h264-baseline.html and webrtc/h264-high.html
webkit.org/b/223043

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:03 PM Changeset in webkit [289673] by Megan Gardner
  • 6 edits in trunk/Source

Enable grammar checking on Mac Catalyst.
https://bugs.webkit.org/show_bug.cgi?id=236479

Reviewed by Devin Rousso.

Source/WebCore:

  • editing/Editor.cpp:

(WebCore::Editor::markMisspellingsAfterTypingToWord):

  • platform/graphics/cocoa/GraphicsContextCocoa.mm:

(WebCore::grammarColor):
(WebCore::colorForMarkerLineStyle):

Source/WebKit:

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/TextCheckerIOS.mm:

(WebKit::mutableState):
(WebKit::TextChecker::setGrammarCheckingEnabled):
(WebKit::TextChecker::checkTextOfParagraph):

2:57 PM Changeset in webkit [289672] by Chris Dumez
  • 24 edits
    2 adds in trunk

Fix MIME type check for classic worker script fetches
https://bugs.webkit.org/show_bug.cgi?id=236411

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/workers/Worker_script_mimetype-expected.txt:
  • web-platform-tests/workers/importscripts_mime.any.sharedworker-expected.txt:
  • web-platform-tests/workers/importscripts_mime.any.worker-expected.txt:

Rebaseline WPT tests now that more checks are passing.

  • web-platform-tests/workers/constructors/SharedWorker/Infinity.headers: Added.
  • web-platform-tests/workers/constructors/SharedWorker/NaN.headers: Added.

Merge upstream fix from https://github.com/web-platform-tests/wpt/pull/32782.

Source/WebCore:

Fix MIME type check for classic worker script fetches and classic worker script imports, so that we are
now aligned with the specification:

This was causing us to fail some Web Platform Tests.

No new tests, rebaselined existing tests.

  • bindings/js/WorkerModuleScriptLoader.cpp:

(WebCore::WorkerModuleScriptLoader::load):

  • loader/FetchOptions.h:

(WebCore::isScriptLikeDestination):

  • workers/Worker.cpp:

(WebCore::Worker::create):

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::importScripts):

  • workers/WorkerScriptLoader.cpp:

(WebCore::WorkerScriptLoader::loadSynchronously):
(WebCore::WorkerScriptLoader::loadAsynchronously):
(WebCore::constructJavaScriptMIMETypeError):
(WebCore::WorkerScriptLoader::validateWorkerResponse):
(WebCore::WorkerScriptLoader::didReceiveResponse):

  • workers/WorkerScriptLoader.h:
  • workers/service/ServiceWorkerJob.cpp:

(WebCore::ServiceWorkerJob::fetchScriptWithContext):

  • workers/shared/SharedWorkerScriptLoader.cpp:

(WebCore::SharedWorkerScriptLoader::load):

Source/WebKit:

  • NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp:

(WebKit::ServiceWorkerSoftUpdateLoader::processResponse):

LayoutTests:

Fix existing layout tests to make sure that worker scripts are served with a JavaScript mime type.

  • http/tests/resourceLoadStatistics/resources/script-revealing-cookies.py:
  • http/tests/security/contentSecurityPolicy/resources/worker-importScript-redirect-cross-origin-allowed.py:
  • http/tests/security/contentSecurityPolicy/resources/worker-importScript-redirect-cross-origin-blocked.py:
  • http/tests/security/contentSecurityPolicy/resources/worker-xhr-allowed.py:
  • http/tests/security/contentSecurityPolicy/resources/worker-xhr-redirect-cross-origin-allowed.py:
  • http/tests/security/contentSecurityPolicy/resources/worker-xhr-redirect-cross-origin-blocked.py:
  • http/tests/security/contentSecurityPolicy/resources/worker.py:
  • http/tests/workers/resources/subworker-encoded.py:
2:46 PM Changeset in webkit [289671] by don.olmstead@sony.com
  • 4 edits in trunk

[CMake] Check for MAP_ALIGNED support
https://bugs.webkit.org/show_bug.cgi?id=236522

Reviewed by Keith Miller.

.:

Add a symbol check for MAP_ALIGNED in the CMake.

  • Source/cmake/OptionsCommon.cmake:

Source/WTF:

Use the HAVE(MAP_ALIGNED) check in tryReserveUncommittedAligned. Mark unused parameters in
the function. Also define MAP_NORESERVE if its undefined which seems to be the case in
FreeBSD.

  • wtf/posix/OSAllocatorPOSIX.cpp:

(WTF::OSAllocator::tryReserveUncommittedAligned):

1:48 PM Changeset in webkit [289670] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Sources: double clicking a breakpoint icon should show the edit popover
https://bugs.webkit.org/show_bug.cgi?id=236524

Reviewed by Patrick Angle.

This is a more convenient way to access(/discover) the breakpoint's configuration details.

  • UserInterface/Views/BreakpointTreeElement.js:

(WI.BreakpointTreeElement):
(WI.BreakpointTreeElement.prototype._handleStatusImageElementDoubleClicked): Added.

  • UserInterface/Views/BreakpointPopover.js:

(WI.BreakpointPopover.show): Added.
(WI.BreakpointPopover.appendContextMenuItems):
Add a convenience method to create a WI.BreakpointPopover (or subclass) for the given
breakpoint and show it over the given target element.

1:46 PM Changeset in webkit [289669] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: click to re-enable breakpoint clears automatic continue
https://bugs.webkit.org/show_bug.cgi?id=236465

Reviewed by Patrick Angle.

This is not very convenient for developers as it means that they have to click more than
once when re-enabling an auto-continue breakpoint (i.e. once to enable it (which currently
disables auto-continue), and once to re-enable auto-continue). Separating these behaviors is
preferable because it's unlikely that a developer would want to disable auto-continue when
re-enabling a breakpoint if they've taken the time to previously configure auto-continue.

  • UserInterface/Views/BreakpointTreeElement.js:

(WI.BreakpointTreeElement.prototype.onenter):
(WI.BreakpointTreeElement.prototype.onspace):
(WI.BreakpointTreeElement.prototype._statusImageElementClicked):

  • UserInterface/Views/SourceCodeTextEditor.js:

(WI.SourceCodeTextEditor.prototype.textEditorBreakpointClicked):
Replace cycleToNextNode with disabled = !disabled.

  • UserInterface/Models/Breakpoint.js:

(WI.Breakpoint.prototype.cycleToNextMode): Deleted.
Remove this method now that it's no longer used.

1:43 PM Changeset in webkit [289668] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests

[model] rewrite http/tests/model/model-document.html using testharness.js
https://bugs.webkit.org/show_bug.cgi?id=236494

Reviewed by Dean Jackson.

  • http/tests/model/model-document-expected.txt:
  • http/tests/model/model-document.html:
1:39 PM Changeset in webkit [289667] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

css/css-writing-modes/direction-propagation-body-contain-root.html asserts
https://bugs.webkit.org/show_bug.cgi?id=234763
<rdar://problem/87243336>

Unreviewed gardening.

1:16 PM WebKitGTK/2.34.x edited by Adrian Perez de Castro
(diff)
1:12 PM Changeset in webkit [289666] by graouts@webkit.org
  • 3 edits
    2 adds in trunk

[model] standalone model documents should be interactive
https://bugs.webkit.org/show_bug.cgi?id=236493

Reviewed by Dean Jackson.

Source/WebCore:

We made <model> elements not be interactive by default in bug 227621,
so we need to opt into interactivity for standalone <model> documents.
All this requires is setting the "interactive" attribute, which we set
instead of the "controls" attribute which does not exist for <model>.

Test: http/tests/model/model-document-interactive.html

  • html/ModelDocument.cpp:

(WebCore::ModelDocumentParser::createDocumentStructure):

LayoutTests:

Add a test that checks that the <model> element created for standalone
documents has the "interactive" attribute.

  • http/tests/model/model-document-interactive-expected.txt: Added.
  • http/tests/model/model-document-interactive.html: Added.
1:09 PM Changeset in webkit [289665] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix the Apple TV build

Don't try to import AVKitSPI.h on Apple TV.

  • UIProcess/ios/WKContentViewInteraction.mm:
1:00 PM Changeset in webkit [289664] by Kyle Piddington
  • 3 edits in trunk/Source/ThirdParty/ANGLE

Cocoa2d-HTLM5 game apepars to use wrong vertex buffer data
https://bugs.webkit.org/show_bug.cgi?id=236427
<rdar://problem/87136345>

Reviewed by Kimmo Kinnunen.

Render encoder appears to carry stale state when a vertex array's element
buffer is updated, but no other parts of the buffer are updated. Reassign
vertex buffer bindings in this case, which clears up corruption
(Squished rendering elements, incorrect UV's)

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

(rx::VertexArrayMtl::syncState):
(rx::VertexArrayMtl::setupDraw):

12:35 PM Changeset in webkit [289663] by Russell Epstein
  • 4 edits in branches/safari-613.1.17.1-branch/Source/WebCore

Cherry-pick r289493. rdar://problem/88321921

Register strings in CSSTokenizer created from preprocessing
https://bugs.webkit.org/show_bug.cgi?id=236309

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2022-02-09
Reviewed by Michael Saboff.

Register strings in CSSTokenizer created from preprocessing. This will align with
what is currently done for strings with escapes in CSSTokenizer::consumeName().

  • css/parser/CSSTokenizer.cpp: (WebCore::CSSTokenizer::preprocessString): (WebCore::CSSTokenizer::tryCreate): (WebCore::CSSTokenizer::CSSTokenizer): (WebCore::preprocessString): Deleted.
  • css/parser/CSSTokenizer.h:
  • css/parser/CSSTokenizerInputStream.h:

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

12:35 PM Changeset in webkit [289662] by Russell Epstein
  • 4 edits in branches/safari-613.1.17.0-branch/Source/WebCore

Cherry-pick r289493. rdar://problem/88321921

Register strings in CSSTokenizer created from preprocessing
https://bugs.webkit.org/show_bug.cgi?id=236309

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2022-02-09
Reviewed by Michael Saboff.

Register strings in CSSTokenizer created from preprocessing. This will align with
what is currently done for strings with escapes in CSSTokenizer::consumeName().

  • css/parser/CSSTokenizer.cpp: (WebCore::CSSTokenizer::preprocessString): (WebCore::CSSTokenizer::tryCreate): (WebCore::CSSTokenizer::CSSTokenizer): (WebCore::preprocessString): Deleted.
  • css/parser/CSSTokenizer.h:
  • css/parser/CSSTokenizerInputStream.h:

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

12:31 PM Changeset in webkit [289661] by Russell Epstein
  • 14 edits
    2 adds in branches/safari-613.1.17.1-branch

Cherry-pick r289462. rdar://problem/88580935

Don't return an empty value from AbortController.signal.reason and make it harder to return empty values from JSValueInWrappedObject
https://bugs.webkit.org/show_bug.cgi?id=236318
<rdar://88580935>

Reviewed by Mark Lam.

Source/WebCore:

This patch makes it so we might not accidentally return the empty value to
JavaScript code from JSValueInWrappedObject. Previously, JSValueInWrappedObject
had an "operator JSValue()" method. This patch removes that, adds a new
conversion method for converting between JSValueInWrappedObject and JSValue,
and makes JSValueInWrappedObject return undefined inside this method
when it used to return the empty value. This fixes a crash where we'd return
the empty value to JS JIT code, and crash dereferencing a nullptr. It's never
valid for a JS function call (or getter, etc) to return the empty value.

Test: fast/dom/AbortSignal-reason-crash-2.html

  • Modules/webaudio/AudioBuffer.cpp: (WebCore::AudioBuffer::getChannelData):
  • Modules/webaudio/AudioWorkletProcessor.cpp: (WebCore::toJSArray): (WebCore::toJSObject): (WebCore::AudioWorkletProcessor::buildJSArguments):
  • bindings/js/JSCustomEventCustom.cpp: (WebCore::JSCustomEvent::detail const):
  • bindings/js/JSDOMConvertAny.h: (WebCore::JSConverter<IDLAny>::convert):
  • bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data const):
  • bindings/js/JSPaymentMethodChangeEventCustom.cpp: (WebCore::JSPaymentMethodChangeEvent::methodDetails const):
  • bindings/js/JSPopStateEventCustom.cpp: (WebCore::JSPopStateEvent::state const):
  • bindings/js/JSValueInWrappedObject.h: (WebCore::JSValueInWrappedObject::getValue const): (WebCore::JSValueInWrappedObject::operator bool const): (WebCore::cachedPropertyValue): (WebCore::JSValueInWrappedObject::operator JSC::JSValue const): Deleted.
  • dom/AbortSignal.cpp: (WebCore::AbortSignal::signalFollow): (WebCore::AbortSignal::throwIfAborted):
  • dom/ErrorEvent.cpp: (WebCore::ErrorEvent::error): (WebCore::ErrorEvent::trySerializeError):
  • dom/PopStateEvent.cpp: (WebCore::PopStateEvent::trySerializeState):
  • page/History.cpp: (WebCore::History::cachedState):

LayoutTests:

  • fast/dom/AbortSignal-reason-crash-2-expected.txt: Added.
  • fast/dom/AbortSignal-reason-crash-2.html: Added.

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

12:31 PM Changeset in webkit [289660] by Russell Epstein
  • 14 edits
    2 adds in branches/safari-613.1.17.0-branch

Cherry-pick r289462. rdar://problem/88580935

Don't return an empty value from AbortController.signal.reason and make it harder to return empty values from JSValueInWrappedObject
https://bugs.webkit.org/show_bug.cgi?id=236318
<rdar://88580935>

Reviewed by Mark Lam.

Source/WebCore:

This patch makes it so we might not accidentally return the empty value to
JavaScript code from JSValueInWrappedObject. Previously, JSValueInWrappedObject
had an "operator JSValue()" method. This patch removes that, adds a new
conversion method for converting between JSValueInWrappedObject and JSValue,
and makes JSValueInWrappedObject return undefined inside this method
when it used to return the empty value. This fixes a crash where we'd return
the empty value to JS JIT code, and crash dereferencing a nullptr. It's never
valid for a JS function call (or getter, etc) to return the empty value.

Test: fast/dom/AbortSignal-reason-crash-2.html

  • Modules/webaudio/AudioBuffer.cpp: (WebCore::AudioBuffer::getChannelData):
  • Modules/webaudio/AudioWorkletProcessor.cpp: (WebCore::toJSArray): (WebCore::toJSObject): (WebCore::AudioWorkletProcessor::buildJSArguments):
  • bindings/js/JSCustomEventCustom.cpp: (WebCore::JSCustomEvent::detail const):
  • bindings/js/JSDOMConvertAny.h: (WebCore::JSConverter<IDLAny>::convert):
  • bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data const):
  • bindings/js/JSPaymentMethodChangeEventCustom.cpp: (WebCore::JSPaymentMethodChangeEvent::methodDetails const):
  • bindings/js/JSPopStateEventCustom.cpp: (WebCore::JSPopStateEvent::state const):
  • bindings/js/JSValueInWrappedObject.h: (WebCore::JSValueInWrappedObject::getValue const): (WebCore::JSValueInWrappedObject::operator bool const): (WebCore::cachedPropertyValue): (WebCore::JSValueInWrappedObject::operator JSC::JSValue const): Deleted.
  • dom/AbortSignal.cpp: (WebCore::AbortSignal::signalFollow): (WebCore::AbortSignal::throwIfAborted):
  • dom/ErrorEvent.cpp: (WebCore::ErrorEvent::error): (WebCore::ErrorEvent::trySerializeError):
  • dom/PopStateEvent.cpp: (WebCore::PopStateEvent::trySerializeState):
  • page/History.cpp: (WebCore::History::cachedState):

LayoutTests:

  • fast/dom/AbortSignal-reason-crash-2-expected.txt: Added.
  • fast/dom/AbortSignal-reason-crash-2.html: Added.

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

12:25 PM Changeset in webkit [289659] by Jonathan Bedard
  • 6 edits in trunk/Tools

[git-webkit] Handle local commit on production branch
https://bugs.webkit.org/show_bug.cgi?id=235974
<rdar://problem/88346615>

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py: Handle moving

branches to remote reference.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:

(PullRequest.main): Move local branch ref to remote reference.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:

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

12:19 PM Changeset in webkit [289658] by Chris Dumez
  • 5 edits in trunk/Source

Regression(r287684) Microsoft teams meeting URLs fail to open the app
https://bugs.webkit.org/show_bug.cgi?id=236516
<rdar://88678598>

Reviewed by Geoffrey Garen.

Add a quirk for Microsoft teams.

Source/WebCore:

  • page/Quirks.cpp:

(WebCore::Quirks::shouldAllowNavigationToCustomProtocolWithoutUserGesture):

  • page/Quirks.h:

Source/WebKit:

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForNavigationAction):

12:10 PM Changeset in webkit [289657] by Russell Epstein
  • 3 edits in branches/safari-613.1.17.1-branch/Source/ThirdParty/ANGLE

Apply patch. rdar://problem/87136345

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

Git commit message hook should allow source = 'template' case
https://bugs.webkit.org/show_bug.cgi?id=236504
<rdar://problem/88787806>

Reviewed by Tim Horton.

  • Scripts/hooks/prepare-commit-msg: 'template' should be handled like 'commit'
12:05 PM Changeset in webkit [289655] by Russell Epstein
  • 6 edits
    2 adds in branches/safari-613.1.17.1-branch

Cherry-pick r289526. rdar://problem/87061239

[:has() pseudo-class] Nullptr crash with non-function :has
https://bugs.webkit.org/show_bug.cgi?id=236431
rdar://87061239

Reviewed by Cameron McCormack.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/parsing/parse-has-expected.txt:
  • web-platform-tests/css/selectors/parsing/parse-has.html:

Source/WebCore:

Test: fast/selectors/malformed-has.html

  • css/parser/CSSSelectorParser.cpp: (WebCore::isOnlyPseudoClassFunction):

:has() is legal, plain :has is not.

LayoutTests:

  • fast/selectors/malformed-has-expected.txt: Added.
  • fast/selectors/malformed-has.html: Added.

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

12:04 PM Changeset in webkit [289654] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-613.1.17.1-branch

Cherry-pick r289443. rdar://problem/88593617

REGRESSION (15.4): Angular virtual scrollers no longer work (because of contain:strict)
https://bugs.webkit.org/show_bug.cgi?id=236260

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

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/contain-paint-049-expected.txt: Added.
  • web-platform-tests/css/css-contain/contain-paint-049.html: Added.

Source/WebCore:

Paint containment did not allow collecting scrollable overflow, breaking scrolling
of the container contents, this patch fixes that.

Test: imported/w3c/web-platform-tests/css/css-contain/contain-paint-049.html

  • rendering/RenderBox.cpp: (WebCore::RenderBox::addOverflowFromChild):

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

12:04 PM Changeset in webkit [289653] by Russell Epstein
  • 2 edits in branches/safari-613.1.17.1-branch/Source/WebKit

Cherry-pick r289380. rdar://problem/86904276

Reduce allocations and increase thread safety of constructedPath
https://bugs.webkit.org/show_bug.cgi?id=236286
<rdar://86904276>

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-08
Reviewed by Chris Dumez.

  • UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers):

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

12:04 PM Changeset in webkit [289652] by Russell Epstein
  • 6 edits in branches/safari-613.1.17.1-branch

Cherry-pick r289377. rdar://problem/88178304

Return 'none' for the computed style of mask when there are no mask images
https://bugs.webkit.org/show_bug.cgi?id=236265
<rdar://88178304>

Patch by Matt Woodrow <Matt Woodrow> on 2022-02-08
Reviewed by Dean Jackson.

Source/WebCore:

Rather than returning all the longhand properties, return 'none' if there are no
mask images. This no longer matches the behaviour of the 'background' property, but
better matches what other UAs do.

Ideally we'd return the smallest possible canonical representation of the non-initial
property values, but this is a much simpler change to fix a compat regression.

Test: fast/masking/parsing-mask.html
Updates expected results to match new behavior.

  • css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::getLayerCount): (WebCore::ComputedStyleExtractor::getFillLayerPropertyShorthandValue): (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue): (WebCore::ComputedStyleExtractor::getMaskShorthandValue):
  • css/CSSComputedStyleDeclaration.h:

LayoutTests:

  • fast/masking/parsing-mask-expected.txt:
  • fast/masking/parsing-mask.html:

Updated expected results to expect 'none' for all cases where there isn't an actual mask
image.

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

11:58 AM Changeset in webkit [289651] by Russell Epstein
  • 3 edits in branches/safari-613.1.17.0-branch/Source/ThirdParty/ANGLE

Apply patch. rdar://problem/87136345

11:58 AM Changeset in webkit [289650] by Russell Epstein
  • 6 edits
    2 adds in branches/safari-613.1.17.0-branch

Cherry-pick r289526. rdar://problem/87061239

[:has() pseudo-class] Nullptr crash with non-function :has
https://bugs.webkit.org/show_bug.cgi?id=236431
rdar://87061239

Reviewed by Cameron McCormack.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/parsing/parse-has-expected.txt:
  • web-platform-tests/css/selectors/parsing/parse-has.html:

Source/WebCore:

Test: fast/selectors/malformed-has.html

  • css/parser/CSSSelectorParser.cpp: (WebCore::isOnlyPseudoClassFunction):

:has() is legal, plain :has is not.

LayoutTests:

  • fast/selectors/malformed-has-expected.txt: Added.
  • fast/selectors/malformed-has.html: Added.

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

11:58 AM Changeset in webkit [289649] by Russell Epstein
  • 4 edits in branches/safari-613.1.17.0-branch

Cherry-pick r289502. rdar://problem/88528286

WKWebView: WKURLSchemeHandler “request to the end of the resource” produces an invalid header
https://bugs.webkit.org/show_bug.cgi?id=236401
rdar://88528286

Reviewed by Brent Fulgham.

Source/WebCore:

https://webkit.org/b/203302 added support for Range requests to AVAssetResourceLoadingDataRequest,
but it incorrectly used '*' instead of for "last-byte-pos:" for a request to the end of the resource.

API test URLSchemeHandler.Ranges was updated.

  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: (WebCore::WebCoreAVFResourceLoader::startLoading):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:

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

11:58 AM Changeset in webkit [289648] by Russell Epstein
  • 3 edits
    2 adds in branches/safari-613.1.17.0-branch

Cherry-pick r289443. rdar://problem/88593617

REGRESSION (15.4): Angular virtual scrollers no longer work (because of contain:strict)
https://bugs.webkit.org/show_bug.cgi?id=236260

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

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/contain-paint-049-expected.txt: Added.
  • web-platform-tests/css/css-contain/contain-paint-049.html: Added.

Source/WebCore:

Paint containment did not allow collecting scrollable overflow, breaking scrolling
of the container contents, this patch fixes that.

Test: imported/w3c/web-platform-tests/css/css-contain/contain-paint-049.html

  • rendering/RenderBox.cpp: (WebCore::RenderBox::addOverflowFromChild):

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

11:58 AM Changeset in webkit [289647] by Russell Epstein
  • 2 edits in branches/safari-613.1.17.0-branch/Source/WebKit

Cherry-pick r289380. rdar://problem/86904276

Reduce allocations and increase thread safety of constructedPath
https://bugs.webkit.org/show_bug.cgi?id=236286
<rdar://86904276>

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-08
Reviewed by Chris Dumez.

  • UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers):

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

11:58 AM Changeset in webkit [289646] by Russell Epstein
  • 6 edits in branches/safari-613.1.17.0-branch

Cherry-pick r289377. rdar://problem/88178304

Return 'none' for the computed style of mask when there are no mask images
https://bugs.webkit.org/show_bug.cgi?id=236265
<rdar://88178304>

Patch by Matt Woodrow <Matt Woodrow> on 2022-02-08
Reviewed by Dean Jackson.

Source/WebCore:

Rather than returning all the longhand properties, return 'none' if there are no
mask images. This no longer matches the behaviour of the 'background' property, but
better matches what other UAs do.

Ideally we'd return the smallest possible canonical representation of the non-initial
property values, but this is a much simpler change to fix a compat regression.

Test: fast/masking/parsing-mask.html
Updates expected results to match new behavior.

  • css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::getLayerCount): (WebCore::ComputedStyleExtractor::getFillLayerPropertyShorthandValue): (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue): (WebCore::ComputedStyleExtractor::getMaskShorthandValue):
  • css/CSSComputedStyleDeclaration.h:

LayoutTests:

  • fast/masking/parsing-mask-expected.txt:
  • fast/masking/parsing-mask.html:

Updated expected results to expect 'none' for all cases where there isn't an actual mask
image.

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

11:57 AM Changeset in webkit [289645] by Russell Epstein
  • 9 edits in branches/safari-613.1.17.1-branch/Source

Versioning.

WebKit-7613.1.17.1.1

11:55 AM Changeset in webkit [289644] by Elliott Williams
  • 3 edits
    1 delete in trunk/Source/WTF

Fix headers in install builds and add untracked headers
https://bugs.webkit.org/show_bug.cgi?id=235744

Reviewed by Alexey Proskuryakov.
Relands native Xcode build phases for "Copy WTF Headers", again.

Adds a slash prefix, so that PRIVATE_HEADERS_FOLDER_PATH is always an absolute path.
Otherwise, when WTF_INSTALL_PATH_PREFIX is not set, it's relative and incorrectoly copied
into the INSTALL_PATH (/usr/local/lib).

Uses separate path variables for Copy Files phases that create header subdirectories. Unlike
the native "Headers" phase, copying to "/usr/local/include" is not automatically relative to
the SYMROOT or DSTROOT, respective of build action type.

Adds SignedPtr.h to WTF's Headers phase. It was added recently and missed integration in
r289256.

Sets INSTALLHDRS_COPY_PHASE so that nested header directories are copied during installhdrs.

  • Configurations/WTF.xcconfig:
  • WTF.xcodeproj/project.pbxproj:
11:54 AM Changeset in webkit [289643] by Jonathan Bedard
  • 4 edits in trunk/Tools

[git-webkit] Reset target branch when landing fails
https://bugs.webkit.org/show_bug.cgi?id=236110
<rdar://problem/88463164>

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/land.py:

(Land.revert_branch): Move branch to specified remote's representation of the branch.
(Land.main): If we fail to land a change after moving a branch's local ref to include that
change, we should return that local ref to what the branch's remote reports.

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

11:47 AM Changeset in webkit [289642] by Simon Fraser
  • 9 edits
    2 adds in trunk/Source/WebKit

Introduce a RemoteLayerBackingStoreCollection subclass for GPU Process-based rendering
https://bugs.webkit.org/show_bug.cgi?id=236468

Reviewed by Tim Horton.

Add RemoteLayerWithRemoteRenderingBackingStoreCollection, a subclass of RemoteLayerBackingStoreCollection
which is instantiated by RemoteLayerTreeContext when DOM rendering in GPU process is enabled.

Delegate buffer allocation to this now polymorphic class; RemoteLayerBackingStore no longer
consults shouldUseRemoteRenderingFor().

RemoteLayerWithRemoteRenderingBackingStoreCollection needs a back pointer to RemoteLayerTreeContext
to get to the RemoteRenderingBackendProxy.

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::backingStoreCollection const):
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):

  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.h:

(WebKit::RemoteLayerBackingStoreCollection::layerTreeContext const):

  • Shared/RemoteLayerTree/RemoteLayerBackingStoreCollection.mm:

(WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
(WebKit::RemoteLayerBackingStoreCollection::allocateBufferForBackingStore):

  • Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.h: Added.
  • Shared/RemoteLayerTree/RemoteLayerWithRemoteRenderingBackingStoreCollection.mm: Added.

(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::RemoteLayerWithRemoteRenderingBackingStoreCollection):
(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::remoteRenderingBackendProxy):
(WebKit::RemoteLayerWithRemoteRenderingBackingStoreCollection::allocateBufferForBackingStore):

  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.h:

(WebKit::RemoteLayerTreeContext::backingStoreCollection):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:

(WebKit::RemoteLayerTreeContext::RemoteLayerTreeContext):

11:45 AM Changeset in webkit [289641] by Russell Epstein
  • 9 edits in branches/safari-613.1.17.0-branch/Source

Versioning.

WebKit-7613.1.17.0.1

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

Keep promise in scope when calling DeferredPromise::reject
https://bugs.webkit.org/show_bug.cgi?id=236454

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2022-02-11
Reviewed by Youenn Fablet.

Keep promise in scope when calling DeferredPromise::reject, as createDOMException
could go through a path that invokes GC on its owner and the promise.

  • bindings/js/JSDOMPromiseDeferred.cpp:

(WebCore::DeferredPromise::reject):

11:34 AM Changeset in webkit [289639] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

The GPU process should not check in with Launch Services
https://bugs.webkit.org/show_bug.cgi?id=236457

Reviewed by Geoffrey Garen.

Since the GPU process is not an application in the normal sense, there is no need to call _LSApplicationCheckIn.
The function _CSCheckFixDisable should still be called.

  • GPUProcess/mac/GPUProcessMac.mm:

(WebKit::GPUProcess::initializeProcess):

11:10 AM Changeset in webkit [289638] by Jonathan Bedard
  • 2 edits in trunk/Tools

[EWS] Enable WPE and WinCairo queues for PRs
https://bugs.webkit.org/show_bug.cgi?id=236517
<rdar://problem/88823117>

Reviewed by Aakash Jain.

  • Tools/CISupport/ews-build/config.json:

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

10:24 AM Changeset in webkit [289637] by ntim@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix: revert r289616

  • WebCore.xcodeproj/project.pbxproj:
10:12 AM Changeset in webkit [289636] by Russell Epstein
  • 1 copy in tags/Safari-614.1.2.1

Tag Safari-614.1.2.1.

10:10 AM Changeset in webkit [289635] by Russell Epstein
  • 1 copy in branches/safari-613.1.17.3-branch

New branch.

10:10 AM Changeset in webkit [289634] by Russell Epstein
  • 1 copy in branches/safari-613.1.17.2-branch

New branch.

10:10 AM Changeset in webkit [289633] by Russell Epstein
  • 1 copy in branches/safari-613.1.17.1-branch

New branch.

10:10 AM Changeset in webkit [289632] by Russell Epstein
  • 1 copy in branches/safari-613.1.17.0-branch

New branch.

9:55 AM Changeset in webkit [289631] by jonlee@apple.com
  • 5 edits in trunk/LayoutTests

Unreviewed gardening.

Update fuzzy data based on EWS results to support b231828.
LayoutTests/imported/w3c:

  • web-platform-tests/css/css-grid/alignment/grid-item-aspect-ratio-stretch-1.html:

LayoutTests:

  • css3/color-filters/color-filter-text-decoration-shadow.html:
  • fast/text/system-font-fallback.html:
9:53 AM Changeset in webkit [289630] by ntim@apple.com
  • 3 edits in trunk/Source/WebCore

Unreviewed followup: address Youenn's feedback for PDFDocument.

  • html/PDFDocument.cpp:

(WebCore::PDFDocumentEventListener::handleEvent):
(WebCore::PDFDocument::createDocumentStructure):
(WebCore::PDFDocument::updateDuringParsing):
(WebCore::PDFDocument::finishedParsing):
(WebCore::PDFDocument::injectContentScript):

  • html/PDFDocument.h:
9:47 AM Changeset in webkit [289629] by jonlee@apple.com
  • 5 edits in trunk/LayoutTests

Unreviewed gardening.

Update fuzzy data based on EWS results to support b231828.

  • css3/blending/background-blend-mode-body-transparent-color-and-image.html:
  • css3/calc/border-radius.html:
  • svg/gradients/spreadMethodDiagonal3.svg:
  • svg/gradients/spreadMethodDiagonal4.svg:
9:40 AM Changeset in webkit [289628] by youenn@apple.com
  • 75 edits
    3 copies
    2 adds in trunk

Support remote video frames in WebRTC video pipeline
https://bugs.webkit.org/show_bug.cgi?id=236356

Reviewed by Kimmo Kinnunen.

Source/ThirdParty/libwebrtc:

Introduce a way for ObjCFrameBuffer to not directly own a CVPixelBufferRef but a pointer
that can be used to get a CVPixelBufferRef. This is used to allow remote frames to be sent over to libwebrtc.

  • Configurations/libwebrtc.iOS.exp:
  • Configurations/libwebrtc.iOSsim.exp:
  • Configurations/libwebrtc.mac.exp:
  • Source/webrtc/sdk/WebKit/WebKitDecoder.h:
  • Source/webrtc/sdk/WebKit/WebKitDecoder.mm:
  • Source/webrtc/sdk/WebKit/WebKitUtilities.h:
  • Source/webrtc/sdk/WebKit/WebKitUtilities.mm:
  • Source/webrtc/sdk/objc/native/src/objc_frame_buffer.h:
  • Source/webrtc/sdk/objc/native/src/objc_frame_buffer.mm:

Source/WebCore:

Allow to receive/send remote frames as webrtc VideoFrame buffers.
We are not yet optimizing remove video frame sending as this requires moving remote video frame to WebCore.
This will be done as a follow-up.

Covered by existing tests and updated tests to enable the experimental flag.

  • platform/MediaSample.h:
  • platform/VideoFrame.cpp:
  • platform/VideoFrame.h:
  • platform/graphics/RemoteVideoSample.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
  • platform/mediastream/RealtimeVideoSource.cpp:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.h:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:

Source/WebKit:

Allow receiving remote samples from camera or HW decoders.
In that case, we create remote video frames and allow piping them to our existing pipeline.
We update MediaRecorder and LibWebRTC HW encoders to deal with this.
Since we have a code path that requires getting access to the raw pixels, we introduce RemoteVideoFrameObjectHeapProxy
to allow getting that data through shared memory asynchronously.
RemoteVideoFrameProxy will then use a semaphore to block on the async IPC result.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • GPUProcess/GPUConnectionToWebProcess.cpp:
  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.cpp:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.h:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.messages.in:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.h:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.messages.in:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:
  • GPUProcess/webrtc/RemoteMediaRecorder.h:
  • GPUProcess/webrtc/RemoteMediaRecorder.messages.in:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:
  • Shared/ThreadSafeObjectHeap.h:
  • Sources.txt:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/GPUProcessConnection.cpp:
  • WebProcess/GPU/GPUProcessConnection.h:
  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
  • WebProcess/GPU/media/RemoteVideoFrameIdentifier.h:
  • WebProcess/GPU/media/RemoteVideoFrameProxy.cpp:
  • WebProcess/GPU/media/RemoteVideoFrameProxy.h:
  • WebProcess/GPU/media/RemoteVideoFrameProxyIdentifier.h: Added.
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.messages.in:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:
  • WebProcess/GPU/webrtc/RemoteVideoFrameObjectHeapProxy.h: Added.
  • WebProcess/GPU/webrtc/RemoteVideoFrameObjectHeapProxyProcessor.cpp: Added.
  • WebProcess/GPU/webrtc/RemoteVideoFrameObjectHeapProxyProcessor.h: Added.
  • WebProcess/GPU/webrtc/RemoteVideoFrameObjectHeapProxyProcessor.messages.in: Added.
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:
  • WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:
  • WebProcess/cocoa/RemoteCaptureSampleManager.h:
  • WebProcess/cocoa/RemoteCaptureSampleManager.messages.in:
  • WebProcess/cocoa/RemoteRealtimeMediaSourceProxy.cpp:
  • WebProcess/cocoa/RemoteRealtimeMediaSourceProxy.h:
  • WebProcess/cocoa/RemoteRealtimeVideoSource.cpp:
  • WebProcess/cocoa/UserMediaCaptureManager.cpp:
  • WebProcess/cocoa/UserMediaCaptureManager.h:

Source/WTF:

Introduce an experimental flag to make use of remote frames in WebRTC code paths.

  • Scripts/Preferences/WebPreferencesInternal.yaml:

Tools:

Allow switching on the new remote video frame flag.

  • WebKitTestRunner/TestOptions.cpp:

LayoutTests:

Enabling remote video frames for below tests.

  • webrtc/video-mute-vp8.html:
  • webrtc/video-mute.html:
  • webrtc/video-rotation.html:
  • webrtc/video.html:
9:30 AM Changeset in webkit [289627] by ntim@apple.com
  • 5 edits
    1 copy
    5 adds in trunk/Source/WebCore

Inject custom styles into PDF.js to make it look like PDFKit
https://bugs.webkit.org/show_bug.cgi?id=236510

Reviewed by Tim Horton.

This introduces a pdfjs-extras directory that is copied in the pdfjs/extras resource subdirectory at build-time.

In that directory contains a content-script.js file that is executed when the PDFJS iframe loads. Currently, that
content script only injects the PDFKit styling, but it may be used for other types of interaction in the future
(e.g. loading a blob, hooking with find-in-page messages, etc.).

In PDFDocument, we add m_iframe, a ref to the PDFDocument iframe, that we can re-use when the iframe loads,
to inject the content script.

PDFDocumentEventListener handles the iframe load event listener.

m_viewerRendered which was set once the <iframe> was added to the document, is now no longer needed, since we can
check for m_iframe directly.

(const.PDFJSContentScript.injectStyle):
(const.PDFJSContentScript.init):

(body):
(@keyframes fade-out):
(to):
(#loadingBar):
(#toolbarContainer):
(#toolbarViewer):
(#toolbarViewer:hover):
(#toolbarViewerMiddle,):
(#toolbarViewerLeft,):
(#toolbarViewer .toolbarButton):
(#toolbarViewer .toolbarButton:active):
(#toolbarViewer .toolbarButton::before):
(#zoomOut):
(#zoomIn):
(#zoomOut + .splitToolbarButtonSeparator):
(#download):
(#viewerContainer):
(#findbar):
(#findbar:not(.hidden) ~ #viewerContainer):
(#findbar::before,):
(#findbarOptionsTwoContainer):
(#findResultsCount,):
(#findbar .splitToolbarButton > .toolbarButton::before):
(#findInput:focus):
(#findInput[data-status="notFound"]):

  • WebCore.xcodeproj/project.pbxproj:
  • dom/EventListener.h:
  • html/PDFDocument.cpp:

(WebCore::PDFDocumentEventListener::handleEvent):
(WebCore::PDFDocumentEventListener::operator== const):
(WebCore::PDFDocument::PDFDocument):
(WebCore::PDFDocument::createDocumentStructure):
(WebCore::PDFDocument::updateDuringParsing):
(WebCore::PDFDocument::finishedParsing):
(WebCore::PDFDocument::injectContentScript):
(WebCore::m_viewerRendered): Deleted.

  • html/PDFDocument.h:
9:24 AM Changeset in webkit [289626] by Russell Epstein
  • 9 edits in branches/safari-614.1.2-branch/Source

Versioning.

WebKit-7614.1.2.1

9:23 AM Changeset in webkit [289625] by Jonathan Bedard
  • 3 edits in trunk/Tools

[EWS] Support PRs in UploadTestResults and ExtractTestResults
https://bugs.webkit.org/show_bug.cgi?id=236446
<rdar://problem/88756592>

Reviewed by Aakash Jain.

  • CISupport/ews-build/steps.py:

(ConfigureBuild.add_pr_details): Shorten hash to 8 characters.
(UploadTestResults.init): Use change_id instead of patch_id.
(ExtractTestResults.init): Ditto.

  • CISupport/ews-build/steps_unittest.py:

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

9:11 AM Changeset in webkit [289624] by Wenson Hsieh
  • 3 edits in trunk/Source/WebKit

Unreviewed, non-unified build fixes in WKPaymentAuthorizationDelegate

Include several missing headers.

  • Platform/cocoa/WKPaymentAuthorizationDelegate.h:
  • Platform/cocoa/WKPaymentAuthorizationDelegate.mm:
9:01 AM Changeset in webkit [289623] by Wenson Hsieh
  • 17 edits in trunk/Source

[iOS] Add support for a "markup image" item in the callout bar when selecting a single image
https://bugs.webkit.org/show_bug.cgi?id=236415
rdar://88714333

Reviewed by Aditya Keerthi.

Source/WebCore:

Export a couple of functions; see WebKit/ChangeLog for more details.

  • platform/graphics/Image.h:
  • platform/graphics/cg/UTIRegistry.h:

Source/WebKit:

This patch introduces support for a new "Markup Image" callout menu item, which is only shown when the user has
selected exactly one image. If the image is suitable for "Markup Image" (that is, the relevant VisionKit API
returns a non-null image), then we show a new item in the callout bar which, when activated, replaces the
current selection with the image returned by the aforementioned VisionKit API.

See below for more details.

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

(WebKit::isImageAnalysisMarkupSystemFeatureEnabled):

Add a new helper method to return whether or not the corresponding system feature flag is enabled.

  • Shared/EditorState.cpp:

(WebKit::EditorState::PostLayoutData::encode const):
(WebKit::EditorState::PostLayoutData::decode):

  • Shared/EditorState.h:

Add an optional ElementContext that's populated only if the user's selection spans a single HTMLImageElement.

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView didMoveToWindow]):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::requestImageBitmap):

Add a new async IPC message that allows the UI process to grab a ShareableBitmap handle (along with the MIME
type of the source image) given an ElementContext that identifies an image element.

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

Cache the last result from requesting "Image Markup" data from VisionKit in _imageAnalysisMarkupResults, and
use this information when invoking the new selector, -performImageAnalysisMarkup:.

  • UIProcess/ios/WKContentViewInteraction.mm:

(WebKit::transcode):

Add a helper method that takes a CGImageRef, transcodes it to the given uniform type identifier, and finally
returns a blob of image data. Used by the two new call sites for Image Markup below, as well as an existing call
site for Visual Look Up in -provideDataForItem:

(-[WKContentView targetForAction:withSender:]):

Add a check for the new Image Markup action selector.

(-[WKContentView requestRectsToEvadeForSelectionCommandsWithCompletionHandler:]):

Use this existing UIKit delegate hook to defer callout bar presentation only in the case where a single image
element is selected, such that we only show the callout bar in this scenario once VisionKit has determined
whether or not the "Image Markup" action is suitable for the data of the selected image.

The initial purpose of this delegate hook was to allow WebKit to defer callout bar presentation for a short,
hard-coded delay to wait for the web page to layout out or add clickable items that might underlap the callout
bar; as such, we still perform this logic with a hard-coded delay of 250 ms (including whatever time was taken
during image analysis).

(-[WKContentView updateImageAnalysisMarkupMenuItems:]):

Append the new menu item only if the system feature flag is enabled, and we've selected an editable image. Note
that this intentionally does not consult _imageAnalysisMarkupResults to ensure that the state of additional
menu items in the shared menu controller is consistent between Markup Image and Quick Note, and updated in the
same lifecycle as editor state updates.

(-[WKContentView canPerformImageAnalysisMarkup]):

This is consulted when we're actually about to show the callout bar action for "Image Markup" (importantly,
after callout bar presentation deferral), and depends on the state of _imageAnalysisMarkupResults.

(-[WKContentView performImageAnalysisMarkup:]):

Add logic to handle the new action by calling into WebPageProxy to (basically) paste the modified image data
after transcoding it to match the image element's original source type. After #236406, this codepath is now
available on all Cocoa platforms (as opposed to macOS-only).

(-[WKContentView doAfterComputingImageAnalysisResultsForMarkup:]):

Use the new requestImageBitmap IPC message to grab a bitmap for the currently selected image, call out to
VisionKit to perform image analysis, and then cache the resulting image. After all of this is done, we proceed
with showing the callout bar.

In a followup, we should enforce some (reasonable) upper bound on the amount of time by which the callout bar
can be delayed.

(-[WKContentView _selectionChanged]):
(-[WKContentView setUpAdditionalMenuControllerActions]):

Refactor existing logic for supplying additional callout bar menu items, such that we update items as needed for
both Quick Note as well as Image Markup. Note that we need to preserve any existing menu items in the shared
UIMenuController, since the WebKit client (e.g. Mail) may have already supplied custom menu items. This
currently doees not affect Quick Note since the only internal client that enables Quick Note is Safari, which
does not attempt to add any of its own items; however, "Markup Image" needs to be available in Mail on iOS as
well, which does use custom menu items.

(findMenuItemWithAction):
(-[WKContentView updateAppHighlightMenuItems:]):

Make this adjust the given mutable array of UIMenuItems, which are then combined with any markup menu items
when setting custom items on the shared menu controller.

(-[WKContentView provideDataForItem:]):

Adjust this to use the new transcode helper function, declared above.

(-[WKContentView _setUpImageAnalysis]):
(-[WKContentView _tearDownImageAnalysis]):
(-[WKContentView setUpAppHighlightMenusIfNeeded]): Deleted.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::requestImageBitmap):

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

(WebKit::WebPage::getPlatformEditorState const):

Compute and populate the new selectedEditableImage element context; to achieve this, we use TextIterator to
scan for an image element, and bail immediately if we either find anything that is not an image, or find more
than one image.

8:08 AM Changeset in webkit [289622] by commit-queue@webkit.org
  • 45 edits
    3 copies
    7 adds in trunk

Introduce a RemoteMediaSampleProxy to represent captured video frames used in Media Streams and present in GPUP
https://bugs.webkit.org/show_bug.cgi?id=236099

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-11
Reviewed by Youenn Fablet.

Source/WebCore:

Add VideoFrame : public MediaStream, base class for Media Stream video frames.
Currently inherits from MediaSample, but later will remove the MediaSample.

The WebCore::VideoFrame is intended to be used in various entry-points that
currently are currently typed as:

void videoSampleAvailable(MediaSample&, VideoSampleMetadata, ...).

The new class WebKit::RemoteVideoFrameProxy : public VideoFrame can be passed to these APIs.
The API entrypoints are not yet changed in order to partially roll the changes in.
Later on, the entrypoints will be similar to:

void videoSampleAvailable(VideoFrame&, VideoSampleMetadata, ...).

Removes MediaSample::setTrackID as that is not used.
Changes MediaSample::platformSample() to const, so that it can be called from
const context.

No new tests, refactor.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/MediaSample.h:
  • platform/VideoFrame.cpp: Added.

(WebCore::VideoFrame::decodeTime const):
(WebCore::VideoFrame::duration const):
(WebCore::VideoFrame::trackID const):
(WebCore::VideoFrame::sizeInBytes const):
(WebCore::VideoFrame::presentationSize const):
(WebCore::VideoFrame::offsetTimestampsBy):
(WebCore::VideoFrame::setTimestamps):
(WebCore::VideoFrame::isDivisable const):
(WebCore::VideoFrame::divide):
(WebCore::VideoFrame::createNonDisplayingCopy const):
(WebCore::VideoFrame::flags const):
(WebCore::VideoFrame::byteRange const):
(WebCore::VideoFrame::dump const):

  • platform/VideoFrame.h: Added.
  • platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm:

(WebCore::LocalSampleBufferDisplayLayer::enqueueSampleBuffer):

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

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateCurrentFrameImage):

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

(isType):

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

(WebCore::MediaSampleAVFObjC::platformSample const):

  • platform/graphics/gstreamer/MediaSampleGStreamer.cpp:

(WebCore::MediaSampleGStreamer::platformSample const):

  • platform/graphics/gstreamer/MediaSampleGStreamer.h:
  • platform/mock/mediasource/MockSourceBufferPrivate.cpp:

(WebCore::MockMediaSample::platformSample const):

Source/WebKit:

Changes after revert:

  • For now, create the RemoteVideoFrame in GPUP using synchronous message. This way RemoteVideoFrameProxy does not need to receive messages. It cannot easily do that, as it is referenced in multiple threads and thus we cannot remove the message destination for the instance from GPUProcess instance, as that operation is main thread only. The type cannot be DestructionThread::Main, as we do not (yet) control the base class (MediaSample).

WebContent process:
Add WebKit::RemoteVideoFrameProxy, WebContent process side proxy object that
WebCore::MediaPlayerPrivateMediaStreamAVFObjC can use.

RemoteVideoFrameProxy can be sent to the GPUP and the the SampleBufferDisplayLayer. So
the captured content shows in compositing through video element.

At the moment MediaPlayerPrivateMediaStreamAVFObjC cannot paint RemoteVideoFrameProxy to the
document CSS painted content, Context2D or WebGL canvas.

GPUP:
RemoteVideoFrameObjectHeap is a mapping
RemoteVideoFrameIdentifier -> MediaSample. Currently all objects
map to normal MediaSampleAVFObjC.

Add an example implementation where a remote MediaSample is returned by IPC:
RemoteGraphicsContextGL::paintCompositedResultsToMediaSample().

The GPUP object pointed by RemoteVideoFrameIdentifier is:

  • created in RemoteGraphicsContextGL::paintCompositedResultsToMediaSample() in RemoteGraphicsContextGL thread
  • consumed in RemoteSampleBufferDisplayLayer::enqueueSample in RemoteSampleBufferDisplayLayerManager thread
  • released in RemoteVideoFrameObjectHeap::releaseVideoFrame in GPUP main thread

All of these messages are asynchronous and can arrive to their destination in any order.
For example, request to release the video frame can happen before the message to create the video frame has been
received.

To solve the ordering issue, introduce readers-writers reference counting method via following classes:

  • ObjectIdentifierReadReference
  • ObjectIdentifierWriteReference
  • ObjectIdentifierReferenceTracker

ObjectIdentifier identifies the object.
ObjectIdentifierWriteReference identifies a new version of the content pointed by the identifier.
Pseudocode examples:

WriteReference { identifier = 1, pendingReads = 0, version = 0 } means:

"End the life-time of identifier 1, version 0. Create version = 1"
This is how initial object is assigned to the reference.

WriteReference { identifier = 1, pendingReads = 77, version = 32 } means

"End the life-time of identifier 1, version 32 when all 77 reads have completed. Create version = 33"

ObjectIdentifierReadReference declares a read dependency to a specific version of the content pointed by the identifier.
Pseudocode examples:

ReadReference { identifier = 1, version = 32 } means
"Complete one read of identifier 1, version 32".

Creates, updates and destructions are WriteReferences.
Reads are ReadReferences.

The ObjectIdentifierReferenceTracker creates write and read references in the Proxy -using process (WebContent process).

The added ThreadSafeObjectHeap resolves the read and write references in the real object process (GPUP in this case).
Reads and writes are blocking the requesting thread appropriately:

  • Read of unknown version of the identifier blocks until the write creates the version
  • Write of new version of the identifier blocks until the reads have retired, or creates parallel, new version of the content in case of copy-on-write schemes.

In this commit objects pointed by RemoteVideoFrameIdentifier are immutable until destroyed, so there is no update or
copy-on-write scheme here.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::GPUConnectionToWebProcess):
(WebKit::GPUConnectionToWebProcess::didClose):
(WebKit::GPUConnectionToWebProcess::videoFrameObjectHeap const):

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

(WebKit::RemoteGraphicsContextGL::RemoteGraphicsContextGL):
(WebKit::RemoteGraphicsContextGL::paintCompositedResultsToMediaSample):

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:
  • GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.cpp: Added.

(WebKit::RemoteVideoFrameObjectHeap::create):
(WebKit::RemoteVideoFrameObjectHeap::RemoteVideoFrameObjectHeap):
(WebKit::RemoteVideoFrameObjectHeap::~RemoteVideoFrameObjectHeap):
(WebKit::RemoteVideoFrameObjectHeap::stopListeningForIPC):
(WebKit::RemoteVideoFrameObjectHeap::releaseVideoFrame):

  • GPUProcess/media/RemoteVideoFrameObjectHeap.h: Copied from Source/WebKit/Shared/IPCTester.h.
  • GPUProcess/media/RemoteVideoFrameObjectHeap.messages.in: Copied from Source/WebKit/GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in.
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:

(WebKit::RemoteSampleBufferDisplayLayer::create):
(WebKit::RemoteSampleBufferDisplayLayer::RemoteSampleBufferDisplayLayer):
(WebKit::RemoteSampleBufferDisplayLayer::enqueueSample):
(WebKit::RemoteSampleBufferDisplayLayer::enqueueSampleCV):

  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.messages.in:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.cpp:

(WebKit::RemoteSampleBufferDisplayLayerManager::createLayer):

  • Scripts/webkit/messages.py:

(types_that_cannot_be_forward_declared):
(headers_for_type):

  • Shared/IPCTester.cpp:

(WebKit::IPCTester::startMessageTesting):
(WebKit::isTestingIPC):

  • Shared/IPCTester.h:

(WebKit::isTestingIPC):

  • Shared/ObjectIdentifierReferenceTracker.h: Added.

(WebKit::ObjectIdentifierReference::ObjectIdentifierReference):
(WebKit::ObjectIdentifierReference::identifier const):
(WebKit::ObjectIdentifierReference::version const):
(WebKit::ObjectIdentifierReference::operator== const):
(WebKit::ObjectIdentifierReference::isHashTableDeletedValue const):
(WebKit::ObjectIdentifierReference::encode const):
(WebKit::ObjectIdentifierReference::decode):
(WebKit::ObjectIdentifierReadReference::ObjectIdentifierReadReference):
(WebKit::ObjectIdentifierReadReference::identifier const):
(WebKit::ObjectIdentifierReadReference::version const):
(WebKit::ObjectIdentifierReadReference::reference const):
(WebKit::ObjectIdentifierReadReference::encode const):
(WebKit::ObjectIdentifierReadReference::decode):
(WebKit::ObjectIdentifierWriteReference::generateForAdd):
(WebKit::ObjectIdentifierWriteReference::ObjectIdentifierWriteReference):
(WebKit::ObjectIdentifierWriteReference::identifier const):
(WebKit::ObjectIdentifierWriteReference::version const):
(WebKit::ObjectIdentifierWriteReference::pendingReads const):
(WebKit::ObjectIdentifierWriteReference::reference const):
(WebKit::ObjectIdentifierWriteReference::retiredReference const):
(WebKit::ObjectIdentifierWriteReference::encode const):
(WebKit::ObjectIdentifierWriteReference::decode):
(WebKit::ObjectIdentifierReferenceTracker::ObjectIdentifierReferenceTracker):
(WebKit::ObjectIdentifierReferenceTracker::read const):
(WebKit::ObjectIdentifierReferenceTracker::write const):
(WebKit::ObjectIdentifierReferenceTracker::identifier const):
(WebKit::add):
(WebKit::operator<<):
(WTF::DefaultHash<WebKit::ObjectIdentifierReference<T>>::hash):
(WTF::DefaultHash<WebKit::ObjectIdentifierReference<T>>::equal):

  • Shared/ThreadSafeObjectHeap.h: Added.

(WebKit::ThreadSafeObjectHeap::ReferenceState::ReferenceState):
(WebKit::HeldType>::retire):
(WebKit::HeldType>::retireRemove):
(WebKit::HeldType>::clear):

  • Shared/mac/MediaFormatReader/MediaSampleByteRange.cpp:

(WebKit::MediaSampleByteRange::platformSample const):

  • Shared/mac/MediaFormatReader/MediaSampleByteRange.h:
  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::dispatchMessage):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::paintCompositedResultsToMediaSample):

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
  • WebProcess/GPU/graphics/cocoa/RemoteGraphicsContextGLProxyCocoa.mm:
  • WebProcess/GPU/media/RemoteVideoFrameIdentifier.h: Copied from Source/WebKit/Shared/IPCTester.h.
  • WebProcess/GPU/media/RemoteVideoFrameProxy.cpp: Added.

(WebKit::RemoteVideoFrameProxy::properties):
(WebKit::RemoteVideoFrameProxy::create):
(WebKit::RemoteVideoFrameProxy::releaseUnused):
(WebKit::RemoteVideoFrameProxy::RemoteVideoFrameProxy):
(WebKit::RemoteVideoFrameProxy::~RemoteVideoFrameProxy):
(WebKit::RemoteVideoFrameProxy::identifier const):
(WebKit::RemoteVideoFrameProxy::write const):
(WebKit::RemoteVideoFrameProxy::read const):
(WebKit::RemoteVideoFrameProxy::presentationTime const):
(WebKit::RemoteVideoFrameProxy::platformSample const):
(WebKit::RemoteVideoFrameProxy::videoRotation const):
(WebKit::RemoteVideoFrameProxy::videoMirrored const):
(WebKit::RemoteVideoFrameProxy::videoPixelFormat const):
(WebKit::RemoteVideoFrameProxy::videoFrame const):
(WebKit::RemoteVideoFrameProxy::release):

  • WebProcess/GPU/media/RemoteVideoFrameProxy.h: Added.

(WebKit::RemoteVideoFrameProxy::Properties::encode const):
(WebKit::RemoteVideoFrameProxy::Properties::decode):
(isType):

  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:

(WebKit::SampleBufferDisplayLayer::SampleBufferDisplayLayer):
(WebKit::SampleBufferDisplayLayer::~SampleBufferDisplayLayer):
(WebKit::SampleBufferDisplayLayer::enqueueSample):
(WebKit::SampleBufferDisplayLayer::gpuProcessConnectionDidClose):
(WebKit::SampleBufferDisplayLayer::disconnectGPUProcessConnectionIfNeeded):

  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.h:

Tools:

  • Scripts/generate-gpup-webgl:
  • TestWebKitAPI/Tests/WebCore/SampleMap.cpp:

LayoutTests:

Captured WebGL to another context2d or WebGL not implemented yet, mark few tests as timing out.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
7:53 AM Changeset in webkit [289621] by Chris Dumez
  • 2 edits in trunk/Source/WebKitLegacy/mac

Unreviewed, fix build with the latest iOS SDK.

  • Plugins/WebBasePluginPackage.mm:

(-[WebBasePluginPackage isNativeLibraryData:]):

7:09 AM WebKitGTK/2.34.x edited by Michael Catanzaro
(diff)
6:53 AM Changeset in webkit [289620] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[GTK] WebKit browser scrollbars not always correctly displayed if overlay scrollbars are disabled
https://bugs.webkit.org/show_bug.cgi?id=234874

Patch by Michael Catanzaro <Michael Catanzaro> on 2022-02-11
Reviewed by Carlos Garcia Campos.

If overlay scrollbars are disabled, and there is not enough content for the page to be
scrollable, and scrollbars are forced using overflow:scroll, then we currently fail to
paint the scrollbars properly. At minimum, we need to paint the scrollbar background, which
is what the macOS port does. Do so.

In the future, we might want to additionally paint the rest of the scrollbars, similar to
the GTK_POLICY_ALWAYS scrollbar policy type, but this would require more work.

  • platform/adwaita/ScrollbarThemeAdwaita.cpp:

(WebCore::ScrollbarThemeAdwaita::paint):

  • platform/gtk/ScrollbarThemeGtk.cpp:

(WebCore::ScrollbarThemeGtk::paint):

5:30 AM Changeset in webkit [289619] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[SOUP] Fix memory leak in WebKitDirectoryInputStream
https://bugs.webkit.org/show_bug.cgi?id=236498

Reviewed by Adrian Perez de Castro.

  • NetworkProcess/soup/WebKitDirectoryInputStream.cpp:

(webkitDirectoryInputStreamRead): Use adoptGRef() for g_bytes_new_from_bytes().

5:02 AM Changeset in webkit [289618] by commit-queue@webkit.org
  • 2 edits in trunk/Tools/buildstream

[Flatpak SDK] Enable GStreamer webrtcdsp support
https://bugs.webkit.org/show_bug.cgi?id=236175

Patch by Philippe Normand <pnormand@igalia.com> on 2022-02-11
Reviewed by Martin Robinson.

  • elements/sdk/gst-plugins-bad.bst: Enable webrtcdsp, needed for VAD handling.
4:47 AM Changeset in webkit [289617] by Antti Koivisto
  • 5 edits in trunk

[CSS Container Queries] Implement container name matching
https://bugs.webkit.org/show_bug.cgi?id=236495

Reviewed by Tim Nguyen.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/container-queries/container-name-invalidation-expected.txt:
  • web-platform-tests/css/css-contain/container-queries/container-selection-expected.txt:

Source/WebCore:

Find the right container to evaluate against.

  • style/ContainerQueryEvaluator.cpp:

(WebCore::Style::ContainerQueryEvaluator::evaluate const):

4:05 AM Changeset in webkit [289616] by ntim@apple.com
  • 2 edits in trunk/Source/WebCore

Add build phase to copy PDF.js resources to WebCore.framework resources
https://bugs.webkit.org/show_bug.cgi?id=235981

Reviewed by Youenn Fablet.

This adds a new "Run Script" phase that simply copies Source/ThirdParty/pdfjs to
WebCore.framework/Resources/pdfjs, it excludes .svn and .DS_Store files too.

  • WebCore.xcodeproj/project.pbxproj:
2:52 AM Changeset in webkit [289615] by commit-queue@webkit.org
  • 5 edits in trunk

Clicking on an <input type="image"> will submit the form with null submitter
https://bugs.webkit.org/show_bug.cgi?id=236324

LayoutTests/imported/w3c:

Add a test to make sure that when the form is submitted through an <input type="image">
control, the submitter field of the submit event is that control.

Patch by Andreu Botella <andreu@andreubotella.com> on 2022-02-11
Reviewed by Carlos Garcia Campos.

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

Source/WebCore:

Patch by Andreu Botella <andreu@andreubotella.com> on 2022-02-11
Reviewed by Carlos Garcia Campos.

If you submit a form by clicking on an <input type="image"> control, the control will be in
the form's entry list, but the submitter field in the submit event will be null. This is
wrong per the spec, and caused because the call to HTMLFormElement::submitIfPossible() in
ImageInputType::handleDOMActivateEvent() calls it with one argument, rather than passing
the element as the submitter.

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

  • html/ImageInputType.cpp:

(WebCore::ImageInputType::handleDOMActivateEvent):

2:14 AM Changeset in webkit [289614] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.34/Source/WebKit

Merge r289608 - [WPE][GTK] BubblewrapLauncher leaks D-Bus proxy sockets
https://bugs.webkit.org/show_bug.cgi?id=201771

Reviewed by Michael Catanzaro.

xdg-dbus-proxy removes the socket when the sync fd is closed by the application. In most of the cases the
xdg-dbus-proxy process is killed before the sync fd is closed and the socket file is leaked. We should
explicitly close the sync fd.

  • UIProcess/Launcher/glib/XDGDBusProxy.cpp:

(WebKit::XDGDBusProxy::XDGDBusProxy): Save the sync fd.
(WebKit::XDGDBusProxy::~XDGDBusProxy): Close the sync fd is needed.
(WebKit::XDGDBusProxy::launch const): Return the sync fd.

  • UIProcess/Launcher/glib/XDGDBusProxy.h:
2:14 AM Changeset in webkit [289613] by Carlos Garcia Campos
  • 5 edits
    1 copy
    1 add in releases/WebKitGTK/webkit-2.34/Source/WebKit

Merge r289528 - [GTK][WPE] Refactor the XDGDBusProxy launcher to simplify it and fix some issues
https://bugs.webkit.org/show_bug.cgi?id=236437

Reviewed by Adrian Perez de Castro.

Source/WebKit:

This patch moves the XDGDBusProxy launcher implementation to its own file and fixes the following issues:

  • r289369 introduced an issue with old versions of bwrap that fails to mount over an existing file, so we need to ensure we only bind the original socket for the a11y socket and not the session bus one.
  • bindA11y is GTK specific for some reason, which means WPE doesn't have a11y under the sandbox.
  • The names of the socket paths for a11y and session bus use the same pattern dbus-proxy-XXXXXX, it helps to use a different one.
  • The code to get the a11y DBus address is now duplicated in PlatformDisplay, we can just use the PlatformDisplay to get the address.
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::argumentsToFileDescriptor):
(WebKit::bindDBusSession):
(WebKit::bindA11y):
(WebKit::bubblewrapSpawn):
(WebKit::argsToFd): Deleted.
(WebKit::XDGDBusProxyLauncher::setAddress): Deleted.
(WebKit::XDGDBusProxyLauncher::isRunning const): Deleted.
(WebKit::XDGDBusProxyLauncher::path const): Deleted.
(WebKit::XDGDBusProxyLauncher::proxyPath const): Deleted.
(WebKit::XDGDBusProxyLauncher::setPermissions): Deleted.
(WebKit::XDGDBusProxyLauncher::launch): Deleted.
(WebKit::XDGDBusProxyLauncher::makeProxyPath): Deleted.
(WebKit::XDGDBusProxyLauncher::dbusAddressToPath): Deleted.
(): Deleted.

  • UIProcess/Launcher/glib/BubblewrapLauncher.h:
  • UIProcess/Launcher/glib/XDGDBusProxy.cpp: Added.

(WebKit::XDGDBusProxy::XDGDBusProxy):
(WebKit::XDGDBusProxy::makeProxy const):
(WebKit::XDGDBusProxy::launch const):

  • UIProcess/Launcher/glib/XDGDBusProxy.h: Added.

(WebKit::XDGDBusProxy::proxyPath const):
(WebKit::XDGDBusProxy::path const):

1:49 AM Changeset in webkit [289612] by youenn@apple.com
  • 33 edits
    3 copies
    1 add in trunk

Add support to query camera and microphone permissions
https://bugs.webkit.org/show_bug.cgi?id=236138

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/permissions/nfc-permission-expected.txt:
  • web-platform-tests/permissions/test-background-fetch-permission-expected.txt:

Source/WebCore:

Update queryPermission to be async as it may require to check to UIProcess.
Covered by API test.

  • Modules/permissions/PermissionController.h:
  • Modules/permissions/Permissions.cpp:

Source/WebKit:

Add new SPI to query for permission (without requesting anything to user).
Use this to implement camera/microphone permission.
In case of permisssion persistently denied, only expose it if web page already called getUserMedia.
In case of permission not persistently set, compute the permission state according past getUserMedia requests.
Also add geolocation mapping as applications might want to support it and it makes existing WPT tests happy.
Add C API as well so that WTR can control permission querying.

Covered by API test.

  • Headers.cmake:
  • Shared/API/APIObject.h:
  • Shared/API/c/WKBase.h:
  • Sources.txt:
  • UIProcess/API/APIUIClient.h:
  • UIProcess/API/C/WKAPICast.h:
  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageUIClient):

  • UIProcess/API/C/WKPageUIClient.h:
  • UIProcess/API/C/WKSpeechRecognitionPermissionCallback.h:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:
  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebPermissionController.cpp:
  • WebProcess/WebCoreSupport/WebPermissionController.h:

Tools:

  • TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.mm:

(-[UserMediaCaptureUIDelegate _webView:queryPermission:forOrigin:completionHandler:]):

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:
  • TestWebKitAPI/Tests/WebKit/getUserMediaPermission.html: Added.
  • TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.h:
  • TestWebKitAPI/cocoa/UserMediaCaptureUIDelegate.mm:
  • WebKitTestRunner/TestController.cpp:

(WTR::queryPermission):
(WTR::TestController::createWebViewWithOptions):

1:16 AM Changeset in webkit [289611] by Adrian Perez de Castro
  • 2 edits in trunk

[CMake] Use ld.lld by default for development builds where available
https://bugs.webkit.org/show_bug.cgi?id=235979

Reviewed by Michael Catanzaro.

  • Source/cmake/OptionsCommon.cmake: Enable USE_LD_LLD by default for developers builds

when ld.lld is available. While at it, improve the match on LD_VERSION to be more robust.

12:44 AM Changeset in webkit [289610] by Nikita Vasilyev
  • 7 edits in trunk/Source/WebInspectorUI

Web Inspector: [Flexbox] Show flex badge next to flex containers in DOM Tree
https://bugs.webkit.org/show_bug.cgi?id=235924

Reviewed by Patrick Angle.

Elements with display: flex and display: inline-flex should include a "flex" badge.
Clicking the badge should toggle the overlay for the corresponding element.

  • UserInterface/Controllers/GridOverlayConfigurationDiagnosticEventRecorder.js:

(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype.setup):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype.teardown):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleGridOverlayShown):

  • UserInterface/Controllers/GridOverlayDiagnosticEventRecorder.js:

(WI.GridOverlayDiagnosticEventRecorder.prototype.setup):
(WI.GridOverlayDiagnosticEventRecorder.prototype.teardown):
(WI.GridOverlayDiagnosticEventRecorder.prototype._handleGridOverlayShown):
(WI.GridOverlayDiagnosticEventRecorder):

  • UserInterface/Controllers/OverlayManager.js:

(WI.OverlayManager):
(WI.OverlayManager.prototype.showOverlay):
(WI.OverlayManager.prototype.hideOverlay):
(WI.OverlayManager.prototype.hasVisibleGridOverlays):
(WI.OverlayManager.prototype.hasVisibleOverlay):
(WI.OverlayManager.prototype.toggleOverlay):
(WI.OverlayManager.prototype.getColorForNode):
(WI.OverlayManager.prototype.setColorForNode):
(WI.OverlayManager.prototype._handleLayoutContextTypeChanged):
(WI.OverlayManager.prototype._handleGridSettingChanged):
(WI.OverlayManager.prototype._handleMainResourceDidChange):
(WI.OverlayManager.prototype.showGridOverlay): Deleted.
(WI.OverlayManager.prototype.hideGridOverlay): Deleted.
(WI.OverlayManager.prototype.isGridOverlayVisible): Deleted.
(WI.OverlayManager.prototype.toggleGridOverlay): Deleted.
(WI.OverlayManager.prototype.getGridColorForNode): Deleted.
(WI.OverlayManager.prototype.setGridColorForNode): Deleted.
Remove grid-specific methods (such as showGridOverlay) and introduce methods that work with
both Grid and Flexbox (such as showOverlay).

  • UserInterface/Views/CSSGridSection.js:

(WI.CSSGridSection.prototype.attached):
(WI.CSSGridSection.prototype.detached):
(WI.CSSGridSection.prototype._handleToggleAllCheckboxChanged):
(WI.CSSGridSection.prototype.layout):
(WI.CSSGridSection.prototype._handleGridOverlayStateChanged):
(WI.CSSGridSection.prototype._updateToggleAllCheckbox):
(WI.CSSGridSection):

  • UserInterface/Views/DOMTreeElement.css:

(.tree-outline.dom .layout-badge):
(.tree-outline.dom .layout-badge.activated):
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.selected .layout-badge):
(@media (prefers-color-scheme: dark) .tree-outline.dom .layout-badge):
(.tree-outline.dom .badge-css-grid): Deleted.
(.tree-outline.dom .badge-css-grid.activated): Deleted.
(body:not(.window-inactive, .window-docked-inactive) .tree-outline.dom:focus-within li.selected .badge-css-grid): Deleted.
(@media (prefers-color-scheme: dark) .tree-outline.dom .badge-css-grid): Deleted.

  • UserInterface/Views/DOMTreeElement.js:

(WI.DOMTreeElement):
(WI.DOMTreeElement.prototype.onattach):
(WI.DOMTreeElement.prototype.ondetach):
(WI.DOMTreeElement.prototype.updateTitle):
(WI.DOMTreeElement.prototype._updateLayoutBadge):
(WI.DOMTreeElement.prototype._layoutBadgeClicked):
(WI.DOMTreeElement.prototype._updateLayoutBadgeStatus):
(WI.DOMTreeElement.prototype._handleLayoutContextTypeChanged):
(WI.DOMTreeElement.prototype._updateGridBadge): Deleted.
(WI.DOMTreeElement.prototype._gridBadgeClicked): Deleted.
(WI.DOMTreeElement.prototype._gridBadgeDoubleClicked): Deleted.
(WI.DOMTreeElement.prototype._updateGridBadgeStatus): Deleted.
Renamed _gridBadgeElement to _layoutBadgeElement. We can't have both "flex" and "grid" badge on the same element,
so I called it "layoutBadge". I didn't call it simply "badge" because we may have other badges in the future.

12:40 AM Changeset in webkit [289609] by mmaxfield@apple.com
  • 14 edits
    6 adds in trunk

Tab characters and ch units do not obey synthetic bold width adjustments correctly
https://bugs.webkit.org/show_bug.cgi?id=236172

Reviewed by Alan Bujtas.

Source/WebCore:

It turns out we have a lot of places where code wants to know the synthetic-bold-expanded
width of characters. One place is 'tab-width: <integer>' and another is the 'ch' unit.
However, WidthIterator and ComplexTextController don't want the synthetic-bold-expanded
widths, because they explicitly apply synthetic bold after shaping.

This patch adds a 2-value enum argument to the Font::widthForGlyph() function, so callers
can pass in which behavior they want. The function has a default value to include the
synthetic bold expansion.

I then audited every call site of this function, and passed in the correct enum value.
Doing this led me to discover two bugs where the wrong behavior was being used, and this
patch fixes them and adds tests for them.

Tests: fast/text/ch-unit-synthetic-bold.html

fast/text/tab-width-synthetic-bold-complex.html
fast/text/tab-width-synthetic-bold.html

  • layout/formattingContexts/inline/text/TextUtil.cpp:

(WebCore::Layout::fallbackFontsForRunWithIterator):

  • platform/graphics/ComplexTextController.cpp:

(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):

  • platform/graphics/Font.cpp:

(WebCore::Font::platformGlyphInit):

  • platform/graphics/Font.h:

(WebCore::Font::spaceWidth const):
(WebCore::Font::widthForGlyph const):

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::widthForSimpleText const):

  • platform/graphics/FontCascade.h:

(WebCore::FontCascade::tabWidth const):

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::advanceInternal):
(WebCore::WidthIterator::calculateAdditionalWidth const):

LayoutTests:

3 new tests. Also, the changes in ignored-properties-001-expected.txt are a revert of the rebaseline in
r281687. That rebaseline was wrong, so this undoes it.

  • fast/text/ch-unit-synthetic-bold-expected.html: Added.
  • fast/text/ch-unit-synthetic-bold.html: Added.
  • fast/text/tab-width-synthetic-bold-complex-expected.html: Added.
  • fast/text/tab-width-synthetic-bold-complex.html: Added.
  • fast/text/tab-width-synthetic-bold-expected.html: Added.
  • fast/text/tab-width-synthetic-bold.html: Added.
  • platform/ios/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
  • platform/mac-catalina/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
  • platform/mac-mojave/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
  • platform/mac/imported/w3c/web-platform-tests/mathml/relations/css-styling/ignored-properties-001-expected.txt:
12:32 AM Changeset in webkit [289608] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit

[WPE][GTK] BubblewrapLauncher leaks D-Bus proxy sockets
https://bugs.webkit.org/show_bug.cgi?id=201771

Reviewed by Michael Catanzaro.

xdg-dbus-proxy removes the socket when the sync fd is closed by the application. In most of the cases the
xdg-dbus-proxy process is killed before the sync fd is closed and the socket file is leaked. We should
explicitly close the sync fd.

  • UIProcess/Launcher/glib/XDGDBusProxy.cpp:

(WebKit::XDGDBusProxy::XDGDBusProxy): Save the sync fd.
(WebKit::XDGDBusProxy::~XDGDBusProxy): Close the sync fd is needed.
(WebKit::XDGDBusProxy::launch const): Return the sync fd.

  • UIProcess/Launcher/glib/XDGDBusProxy.h:
12:25 AM Changeset in webkit [289607] by Diego Pino Garcia
  • 5 edits
    32 deletes in trunk/LayoutTests

LayoutTests/imported/w3c:
[WPE] Several WPT offscreen canvas tests are failing after r287846
https://bugs.webkit.org/show_bug.cgi?id=236474

Reviewed by Carlos Alberto Lopez Perez.

  • web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.coordinatespace.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.coordinatespace.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.missingargs.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.missingargs.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.voidreturn.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.voidreturn.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing-expected.txt:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.measure.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.measure.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.combined.3d.transforms.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.combined.3d.transforms.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.x.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.x.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.y.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.y.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.z.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate3d.z.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotateAxis.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotateAxis.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.3d.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.3d.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.3d.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.3d.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.3d.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.3d.worker.html: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.3d.worker-expected.txt: Removed.
  • web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.3d.worker.html: Removed.

LayoutTests:
[GTK] Remove several stale WPT offscreen canvas tests
https://bugs.webkit.org/show_bug.cgi?id=236474

Reviewed by Carlos Alberto Lopez Perez.

r287846 re-sync WPT html/ tests, including offscreen canvas tests.
Some already imported offscreen canvas tests are no longer part of WPT tests.
These tests were marked as Failure but should have actually be removed
instead. Two of these tests needed to update their baseline.

  • platform/gtk/TestExpectations:
12:04 AM Changeset in webkit [289606] by Nikolas Zimmermann
  • 13 edits in trunk/Source/WebCore

[LBSE] Begin stub implementation of transform support for SVG layers
https://bugs.webkit.org/show_bug.cgi?id=236185

Reviewed by Rob Buis.

RenderLayer / RenderLayerBacking use RenderStyle::applyTransform()
to compute a TransformationMatrix from the CSS Transform properties.

To hook in SVG transform support, which goes beyond pure CSS properties
that influence the "effective transform" for a certain SVG element,
RenderStyle is not the right place to place the applyTransform()
implementation for SVG specific requirements.

Therefore introduce a virtual RenderLayerModelObject::applyTransform()
function, that is implemented in RenderBox / RenderSVGModelObject.
In this patch RenderSVGModelObject::applyTransform() stays a stub
and RenderBox::applyTransform() simply forwards to RenderStyle,
preserving the current behavior.

This allows SVG to add additional transformations to the transformation
stack, which is useful to implement 'viewBox' support among other things.

Covered by existing tests, no change in behaviour.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::applyTransform const):

  • rendering/RenderBox.h:
  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::applyTransform const):

  • rendering/RenderBoxModelObject.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateTransform):
(WebCore::RenderLayer::currentTransform const):
(WebCore::RenderLayer::perspectiveTransform const):
(WebCore::RenderLayer::perspectiveOrigin const):

  • rendering/RenderLayer.h:

(WebCore::RenderLayer::rendererBorderBoxRect const):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateTransform):
(WebCore::RenderLayerBacking::updateChildrenTransformAndAnchorPoint):
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::startAnimation):
(WebCore::RenderLayerBacking::transformMatrixForProperty const):
(WebCore::rendererBorderBoxRect): Deleted.

  • rendering/RenderLayerModelObject.h:
  • rendering/svg/RenderSVGModelObject.cpp:

(WebCore::RenderSVGModelObject::applyTransform const):

  • rendering/svg/RenderSVGModelObject.h:
  • rendering/svg/RenderSVGRoot.cpp:

(WebCore::RenderSVGRoot::applyTransform const):

  • rendering/svg/RenderSVGRoot.h:
Note: See TracTimeline for information about the timeline view.