Skip to content

test - #3

Merged
Jarred-Sumner merged 6213 commits into
oven-sh:mainfrom
WebKit:main
Feb 21, 2022
Merged

Jarred-Sumner merged 6213 commits into
oven-sh:mainfrom
WebKit:main

Conversation

@Jarred-Sumner

Copy link
Copy Markdown
Collaborator

No description provided.

Mark Lam and others added 29 commits February 16, 2022 06:12
https://bugs.webkit.org/show_bug.cgi?id=236686
rdar://81337114

Reviewed by Saam Barati.

JSTests:

These tests are identical except that they are customized with different watchdog
timeout periods for a Debug / Release build.  This is a necessary condition in
order for the test to manifest this issue if the code is regressed.

* stress/termination-exception-in-operationMaterializeObjectInOSR-debug.js: Added.
* stress/termination-exception-in-operationMaterializeObjectInOSR-release.js: Added.

Source/JavaScriptCore:

operationMaterializeObjectInOSR expects to always succeed.  It is difficult (and
not worth the effort) to make it be able to handle interruptions by the
TerminationException.  Since operationMaterializeObjectInOSR is guaranteed to
finish running in some finite time, it is reasonable to just defer handling a
pending TerminationException until the function returns.

* ftl/FTLOperations.cpp:
(JSC::FTL::JSC_DEFINE_JIT_OPERATION):




Canonical link: https://commits.webkit.org/247315@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=236611

Reviewed by Chris Dumez.

Source/WebKit:

Reviewed by Chris Dumez.

Add a new parameter shouldUseCustomStoragePaths on WebsiteDataStoreConfiguration to specify whether WebKit
should use custom storage paths. If the value is true, WebKit will keep using the custom localStorageDirectory
and indexedDBDatabaseDirectory paths as it is now. If the value is false, WebKit will migrate data from
localStorageDirectory and indexedDBDatabaseDirectory to new paths set by WebKit under generalStorageDirectory.

API test: WebKit.MigrateLocalStorageDataToGeneralStorageDirectory
          WebKit.MigrateIndexedDBDataToGeneralStorageDirectory

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::addWebsiteDataStore):
* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::addStorageManagerSession):
* NetworkProcess/NetworkSession.h:
* NetworkProcess/storage/LocalStorageManager.cpp:
(WebKit::LocalStorageManager::localStorageFilePath):
* NetworkProcess/storage/LocalStorageManager.h:
* NetworkProcess/storage/NetworkStorageManager.cpp:
(WebKit::NetworkStorageManager::create):
(WebKit::NetworkStorageManager::NetworkStorageManager):
(WebKit::originDirectoryPath):
(WebKit::originFilePath):
(WebKit::NetworkStorageManager::localOriginStorageManager):
* NetworkProcess/storage/NetworkStorageManager.h:
* NetworkProcess/storage/OriginStorageManager.cpp:
(WebKit::OriginStorageManager::StorageBucket::StorageBucket):
(WebKit::OriginStorageManager::StorageBucket::localStorageManager):
(WebKit::OriginStorageManager::StorageBucket::idbStorageManager):
(WebKit::OriginStorageManager::StorageBucket::isEmpty):
(WebKit::OriginStorageManager::StorageBucket::moveData):
(WebKit::OriginStorageManager::StorageBucket::resolvedIDBStoragePath):
(WebKit::OriginStorageManager::StorageBucket::fetchDataTypesInListFromDisk):
(WebKit::OriginStorageManager::StorageBucket::deleteLocalStorageData):
(WebKit::OriginStorageManager::StorageBucket::deleteIDBStorageData):
(WebKit::OriginStorageManager::StorageBucket::resolvedLocalStoragePath):
(WebKit::OriginStorageManager::originFileIdentifier):
(WebKit::OriginStorageManager::OriginStorageManager):
(WebKit::OriginStorageManager::defaultBucket):
(WebKit::OriginStorageManager::quotaManager):
(WebKit::OriginStorageManager::StorageBucket::isEmpty const): Deleted.
* NetworkProcess/storage/OriginStorageManager.h:
* Shared/WebsiteDataStoreParameters.cpp:
(WebKit::WebsiteDataStoreParameters::encode const):
(WebKit::WebsiteDataStoreParameters::decode):
* Shared/WebsiteDataStoreParameters.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
(-[_WKWebsiteDataStoreConfiguration shouldUseCustomStoragePaths]):
(-[_WKWebsiteDataStoreConfiguration setShouldUseCustomStoragePaths:]):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::parameters):
* UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:
(WebKit::WebsiteDataStoreConfiguration::copy const):
* UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
(WebKit::WebsiteDataStoreConfiguration::shouldUseCustomStoragePaths const):
(WebKit::WebsiteDataStoreConfiguration::setShouldUseCustomStoragePaths):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/general-storage-directory.salt: Added.



Canonical link: https://commits.webkit.org/247316@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…down

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

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-15
Reviewed by Simon Fraser.

Speed up debug build binary LOG(Channel, ...) by checking the
channel (and level) before constructing the log arguments.
This is consistent with how RELEASE_LOG() works.

If the arguments are slow to create, call sites end up implementing
this at the call site and risk subtle bugs which make existing logging unreliable.

Fixes a bug with LOG_WITH_STREAM where ChannelState::OnWithAccumulation channels would not log.

* wtf/Assertions.h:


Canonical link: https://commits.webkit.org/247317@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
* css3/calc/block-mask-overlay-image-outset.html: Expand pixel range for GPU Process.
* fast/forms/auto-fill-button/auto-fill-strong-password-button-when-maxlength-changes.html: Add fuzzy data for GPU Process.
* svg/clip-path/clip-path-line-use-before-defined.svg: Add fuzzy data for all bots.


Canonical link: https://commits.webkit.org/247318@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…text menu

https://bugs.webkit.org/show_bug.cgi?id=236628
rdar://86446810

Reviewed by Darin Adler.

Source/WebCore:

Add support for a new context menu item in the sharing services picker; see WebKit/ChangeLog for more details.

* dom/mac/ImageControlsMac.cpp:
(WebCore::ImageControlsMac::handleEvent):

Simplify this chrome client hook by passing along the entire HTMLImageElement, instead of the absolute bounds,
attachment element ID, and whether the image has contenteditable style as separate arguments. This makes it a
bit easier to compute and send the image MIME type and an ElementContext in WebKit2. See changes in WebPageMac
for more information.

* html/HTMLAttachmentElement.h: Export a method.
* page/ChromeClient.h:
(WebCore::ChromeClient::handleImageServiceClick):
* platform/LocalizedStrings.h:
* platform/cocoa/LocalizedStringsCocoa.mm:

Add a helper function for the "Markup Image" menu item's localized title.

(WebCore::contextMenuItemTitleMarkupImage):

Source/WebKit:

Add support for a new context menu item in the sharing services picker; to achieve this, we plumb along some
more information about the controlled image element for the services picker menu (i.e. MIME type and an element
context). In WebContextMenuProxyMac, we then append the "Markup Image" item if the system feature is enabled,
and use this information about the controlled image element to replace the image using image data returned from
VisionKit, transcoded to a format that matches that of the original source image. See below for more details.

* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::encode const):
(WebKit::ContextMenuContextData::decode):
* Shared/ContextMenuContextData.h:
(WebKit::ContextMenuContextData::controlledImageElementContext const):
(WebKit::ContextMenuContextData::controlledImageMIMEType const):

Add `m_controlledImageElementContext`, which can be used to identify the controlled image element, and
`m_controlledImageMIMEType`, the MIME type of the controlled image. See `applyMarkupToControlledImage` for more
information about usage.

* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::replaceWithPasteboardData):

Add a helper method that's nearly identical to the extant `replaceSelectionWithPasteboardData` method, except
that it takes an ElementContext and applies the editing replacement to a selection containing the element
corresponding to the given context, rather than applying the edit command to the current selection.

* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView updateImageAnalysisMarkupMenuItems:]):

Use the new WebCore localized string helper function.

* UIProcess/mac/WKSharingServicePickerDelegate.h:
* UIProcess/mac/WKSharingServicePickerDelegate.mm:
(-[WKSharingServicePickerDelegate markupImage]):

Handle the new context menu invocation.

* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu):

If the controlled image is set and `isImageAnalysisMarkupSystemFeatureEnabled()` is true, append a new item to
the services menu to invoke "Markup Image"; when activated, this menu item invokes the
`-[WKSharingServicePickerDelegate markupImage]` method above, which in turn calls into
`applyMarkupToControlledImage` below.

(WebKit::WebContextMenuProxyMac::applyMarkupToControlledImage):

This method contains the main logic for coordinating "Markup Image" from the services menu on macOS. Using
information about the controlled image, this first creates a CGImageRef from the image bitmap, passes it to
VisionKit for analysis, and obtains a resulting CGImageRef; it then transcodes this resulting CGImageRef to
image data in a format that matches the MIME type of the source image, and replaces the controlled image using
this image data via the override pasteboard.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::handleImageServiceClick):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::replaceWithPasteboardData):

Move the current selection to surround the element identified by the given ElementContext, and then call into
`replaceSelectionWithPasteboardData` to perform the replacement.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::handleImageServiceClick):

Additionally compute and send the controlled image MIME type and its element context.



Canonical link: https://commits.webkit.org/247320@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289882 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=229307

Reviewed by Mark Lam.

Source/WebCore:

FontMetrics::height can return a negative value when setAscent() is called with
with a value that is too large to be represented as an int. Prevent this by
making setAscent() ensure that m_intAscent is set to a non-negative value.

Test: fast/forms/listbox-zero-item-height.html

* platform/graphics/FontMetrics.h:
(WebCore::FontMetrics::setAscent):

LayoutTests:

* fast/forms/listbox-zero-item-height-expected.txt: Added.
* fast/forms/listbox-zero-item-height.html: Added.



Canonical link: https://commits.webkit.org/247321@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…ures with ANGLE WebGL enabled

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

Reviewed by Kenneth Russell.

Disable the texture-sharing fast-path for GStreamer GL when ANGLE is
also enabled.

No new tests, no change in behaviour.

* platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp:
(WebCore::GraphicsContextGLTextureMapper::copyTextureFromMedia):



Canonical link: https://commits.webkit.org/247322@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289884 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…o the process

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

Patch by Alejandro G. Castro <alex@igalia.com> on 2022-02-16
Reviewed by Žan Doberšek.

We are creating a global static variable to handle the fd of the
device in the process, to make sure we search and open once for
the graphics device. Also we are using the DRM_NODE_RENDER because
we do not need the primary device for the operations we expect to
use.

No new tests, already covered in the tests.

* platform/graphics/gbm/GBMDevice.cpp:
(WebCore::GBMDevice::GBMDevice): Use a new global fd.
* platform/graphics/gbm/GBMDevice.h: Ditto.


Canonical link: https://commits.webkit.org/247323@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=236691

Reviewed by Antoine Quint.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-contain/container-queries/container-parsing-expected.txt:

Source/WebCore:

Serialize element.style.container.

* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue const):



Canonical link: https://commits.webkit.org/247324@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=236651

Reviewed by Žan Doberšek.

Modify PLATFORM(WPE) to USE(LIBWPE) in EventSenderProxy and PlatformWebView. The former
just uses the libwpe API to send events so it can be shared. The later uses the
WPEToolingBackend so it can also be shared.

The WPE port was missing guards around ENABLE(TOUCH_EVENTS) so add those and organize the
corresponding .cpp so the methods track with the ordering in the header.

Also modernize the PlatformWebView code to prefer using over typedef.

* WebKitTestRunner/EventSenderProxy.h:
* WebKitTestRunner/PlatformWPE.cmake:
* WebKitTestRunner/PlatformWebView.h:
* WebKitTestRunner/libwpe/EventSenderProxyLibWPE.cpp: Renamed from Tools/WebKitTestRunner/wpe/EventSenderProxyWPE.cpp.
(WTR::EventSenderProxy::getUpdatedTouchEvents):
(WTR::EventSenderProxy::removeUpdatedTouchEvents):
(WTR::EventSenderProxy::prepareAndDispatchTouchEvent):
* WebKitTestRunner/libwpe/PlatformWebViewLibWPE.cpp: Renamed from Tools/WebKitTestRunner/wpe/PlatformWebViewWPE.cpp.
(WTR::PlatformWebView::windowSnapshotImage):



Canonical link: https://commits.webkit.org/247325@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=236654
<rdar://problem/88974170>

Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/steps.py:
(AnalyzeLayoutTestsResults.send_email_for_new_test_failures): Draft different
email for failed patch than failed pull request build.


Canonical link: https://commits.webkit.org/247326@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=181227

Patch by Geza Lore <glore@igalia.com> on 2022-02-16
Reviewed by Adrian Perez de Castro.

* stress/new-largeish-contiguous-array-with-size.js:
Re-enable on ARMv7, re-enable and increase leniency on MIPS.


Canonical link: https://commits.webkit.org/247327@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289889 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…ate to unknown

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

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-contain/container-queries/aspect-ratio-feature-evaluation-expected.txt:
* web-platform-tests/css/css-contain/container-queries/container-selection-expected.txt:
* web-platform-tests/css/css-contain/container-queries/unsupported-axis-expected.txt:

Source/WebCore:

"If ... the query container does not support container size queries on the relevant axes,
then the result of evaluating the size feature is unknown."

https://drafts.csswg.org/css-contain-3/#size-container

* style/ContainerQueryEvaluator.cpp:
(WebCore::Style::ContainerQueryEvaluator::evaluate const):

Some cleanups.

(WebCore::Style::ContainerQueryEvaluator::evaluateQuery const):
(WebCore::Style::ContainerQueryEvaluator::evaluateCondition const):
(WebCore::Style::ContainerQueryEvaluator::evaluateSizeFeature const):

Check whether the container supports the feature axis and return Unknown of not.

* style/ContainerQueryEvaluator.h:

Rename EvaluationContext -> ResolvedContainer to be less generic.



Canonical link: https://commits.webkit.org/247328@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289890 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=236690

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-16
Reviewed by Antti Koivisto.

Source/WebKit:

Add the missing encode, decode. Use the better decode pattern
to avoid default construction and reduce the chance of having
a declaration but no decode.
Also add TextStream operator<< for RemoteVideoFrameProxy::Properties
for easier debugging with WebKit2Logging IPCMessages.

No new tests, tested by existing WebRTC tests
when WebRTCRemoteVideoFrameEnabled=true (not default currently)

* WebProcess/GPU/media/RemoteVideoFrameProxy.cpp:
(WebKit::operator<<):
* WebProcess/GPU/media/RemoteVideoFrameProxy.h:
(WebKit::RemoteVideoFrameProxy::Properties::encode const):
(WebKit::RemoteVideoFrameProxy::Properties::decode):

Source/WTF:

Export the MediaTime TextStream operator<< as inline function
for all compilation modes. It is useful also when NDEBUG is defined,
and it is hard to ifdef at all the call sites.

* wtf/MediaTime.cpp:
* wtf/MediaTime.h:


Canonical link: https://commits.webkit.org/247329@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289891 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…ct after replaceJSFunctionForAttributeListener()

https://bugs.webkit.org/show_bug.cgi?id=236618
<rdar://88696673>

Reviewed by Chris Dumez.

Source/WebCore:

After r287293, if an inline event handler was replaced with a JSFunction, its execution was
still disallowed by the CSP policy.

This change fixes detection of inline event handlers (ones that were created from markup)
by introducing JSEventListener::m_wasCreatedFromMarkup and unsetting it during replacement
of an attribute event listener.

Since no virtual calls are added to the hot path, the Speedometer2/Inferno-TodoMVC performance
gain is kept. Also, a virtual call is removed from JSEventListener::handleEvent(), which is nice.
`sizeof(JSEventListener)` is unchanged.

Test: http/tests/security/contentSecurityPolicy/inline-event-handler-allowed-after-being-replaced.html

* bindings/js/JSErrorHandler.cpp:
(WebCore::JSErrorHandler::JSErrorHandler):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
(WebCore::JSEventListener::create):
(WebCore::JSEventListener::replaceJSFunctionForAttributeListener):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::wasCreatedFromMarkup const):
(WebCore::JSEventListener::wasCreatedFromMarkup):
* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::JSLazyEventListener):
* bindings/js/JSLazyEventListener.h:
* dom/EventListener.h:
(WebCore::EventListener::wasCreatedFromMarkup const): Deleted.
* dom/EventListenerMap.cpp:
(WebCore::removeFirstListenerCreatedFromMarkup):
(WebCore::copyListenersNotCreatedFromMarkupToTarget):
* dom/EventTarget.cpp:
(WebCore::EventTarget::addEventListener):
* svg/SVGElement.cpp:
(WebCore::SVGElement::removeEventListener):

LayoutTests:

* http/tests/security/contentSecurityPolicy/inline-event-handler-allowed-after-being-replaced-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/inline-event-handler-allowed-after-being-replaced.html: Added.



Canonical link: https://commits.webkit.org/247330@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=236652

Patch by Philippe Normand <pnormand@igalia.com> on 2022-02-16
Reviewed by Eric Carlson.

Source/WebCore:

ENABLE(MEDIA_RECORDER) depends on ENABLE(MEDIA_STREAM) and is enabled only for COCOA
platforms, until the GStreamer backend is merged.

* Modules/mediarecorder/BlobEvent.cpp:
* Modules/mediarecorder/BlobEvent.h:
* Modules/mediarecorder/BlobEvent.idl:
* Modules/mediarecorder/MediaRecorder.cpp:
* Modules/mediarecorder/MediaRecorder.h:
* Modules/mediarecorder/MediaRecorder.idl:
* Modules/mediarecorder/MediaRecorderErrorEvent.cpp:
* Modules/mediarecorder/MediaRecorderErrorEvent.h:
* Modules/mediarecorder/MediaRecorderErrorEvent.idl:
* Modules/mediarecorder/MediaRecorderProvider.cpp:
* Modules/mediarecorder/MediaRecorderProvider.h:
* platform/mediarecorder/MediaRecorderPrivate.cpp:
* platform/mediarecorder/MediaRecorderPrivate.h:
* platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:
* platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
* platform/mediarecorder/MediaRecorderPrivateMock.cpp:
* platform/mediarecorder/MediaRecorderPrivateMock.h:
* platform/mediarecorder/MediaRecorderPrivateOptions.h:
* platform/mediarecorder/cocoa/AudioSampleBufferCompressor.h:
* platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm:
* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
* platform/mediarecorder/cocoa/VideoSampleBufferCompressor.h:
* platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm:

Source/WTF:

ENABLE(MEDIA_RECORDER) depends on ENABLE(MEDIA_STREAM) and is enabled only for COCOA
platforms. Suggested by Eric Carlson.

* wtf/PlatformEnable.h:
* wtf/PlatformEnableCocoa.h:

LayoutTests:

* platform/glib/TestExpectations: Skip MediaRecorder test, GLib ports don't enable this
feature yet. This test used to pass because MediaRecorder used to be under MediaStream and
there is a mock Recorder implementation.


Canonical link: https://commits.webkit.org/247331@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289894 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…tting

https://bugs.webkit.org/show_bug.cgi?id=236648
<rdar://problem/87821817>

We want to be able to enable/disable various WebGL/WebAudio interfaces via a setting
so that we can block them when CaptivePortalMode is enabled.

Patch by Gavin Phillips <gavin.p@apple.com> on 2022-02-16
Reviewed by Brent Fulgham.

* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBuffer.idl:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioDestinationNode.idl:
* Modules/webaudio/AudioListener.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webaudio/AudioParam.idl:
* Modules/webaudio/AudioProcessingEvent.idl:
* Modules/webaudio/AudioScheduledSourceNode.idl:
* Modules/webaudio/AudioWorkletProcessor.idl:
* Modules/webaudio/BiquadFilterNode.idl:
* Modules/webaudio/ChannelMergerNode.idl:
* Modules/webaudio/ChannelSplitterNode.idl:
* Modules/webaudio/ConvolverNode.idl:
* Modules/webaudio/DelayNode.idl:
* Modules/webaudio/DynamicsCompressorNode.idl:
* Modules/webaudio/GainNode.idl:
* Modules/webaudio/MediaElementAudioSourceNode.idl:
* Modules/webaudio/MediaStreamAudioDestinationNode.idl:
* Modules/webaudio/MediaStreamAudioSourceNode.idl:
* Modules/webaudio/OfflineAudioCompletionEvent.idl:
* Modules/webaudio/OscillatorNode.idl:
* Modules/webaudio/PeriodicWave.idl:
* Modules/webaudio/WaveShaperNode.idl:
* bindings/js/WebCoreBuiltinNames.h:
* html/canvas/WebGLActiveInfo.idl:
* html/canvas/WebGLBuffer.idl:
* html/canvas/WebGLContextEvent.idl:
* html/canvas/WebGLFramebuffer.idl:
* html/canvas/WebGLProgram.idl:
* html/canvas/WebGLQuery.idl:
* html/canvas/WebGLRenderbuffer.idl:
* html/canvas/WebGLRenderingContext.idl:
* html/canvas/WebGLSampler.idl:
* html/canvas/WebGLShader.idl:
* html/canvas/WebGLShaderPrecisionFormat.idl:
* html/canvas/WebGLSync.idl:
* html/canvas/WebGLTexture.idl:
* html/canvas/WebGLUniformLocation.idl:


Canonical link: https://commits.webkit.org/247332@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289896 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…cal position

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

Reviewed by Antti Koivisto.

Legacy line layout returns the physical position too, though in a bit obscure manner:

  firstRootBox()->logicalTop() + firstLineStyle().metricsOfPrimaryFont().descent(firstRootBox()->baselineType())
  where
    // The logicalTop[ position is the top edge of the line box in a horizontal line and the left edge in a vertical line.
    float logicalTop() const { return isHorizontal() ? m_topLeft.y() : m_topLeft.x(); }

* layout/integration/LayoutIntegrationLine.h:
(WebCore::LayoutIntegration::Line::lineBoxHeight const):
(WebCore::LayoutIntegration::Line::lineBoxWidth const):
* layout/integration/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::firstLinePhysicalBaseline const):
(WebCore::LayoutIntegration::LineLayout::lastLineLogicalBaseline const):
(WebCore::LayoutIntegration::LineLayout::firstLineBaseline const): Deleted.
(WebCore::LayoutIntegration::LineLayout::lastLineBaseline const): Deleted.
* layout/integration/LayoutIntegrationLineLayout.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::firstLineBaseline const):
(WebCore::RenderBlockFlow::inlineBlockBaseline const):



Canonical link: https://commits.webkit.org/247333@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=236578

Unreviewed test gardening.

* http/tests/model/model-document-expected.txt:


Canonical link: https://commits.webkit.org/247334@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289898 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…n "value" attribute is present.

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

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/html/semantics/forms/the-input-element/image-click-form-data-expected.txt:

Source/WebCore:

As per spec at
https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#constructing-form-data-set,
and discussions at
https://groups.google.com/a/chromium.org/g/blink-dev/c/hp1_-1tgvDs
The condstructed "form data set" should not include the value of the image button in this case.

This change is an import from chromium CL at
https://chromium-review.googlesource.com/c/chromium/src/+/1086953/

* html/ImageInputType.cpp:
(WebCore::ImageInputType::appendFormData const):

LayoutTests:

Update test expectation as the test is now passing.
* fast/forms/input-image-submit.html:



Canonical link: https://commits.webkit.org/247335@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289902 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=236644

Reviewed by Antoine Quint.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-transforms/animation/transform-interpolation-verify-reftests-expected.txt: Update expectations.
* web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:

Source/WebCore:

No new tests. This is covered by existing WPT tests.

* platform/graphics/transforms/PerspectiveTransformOperation.h: When the value of a perspective operation
is zero, it isn't an identity operation, because it will be rounded to 1px.



Canonical link: https://commits.webkit.org/247336@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289903 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…e_impl_casual_case

<https://bugs.webkit.org/show_bug.cgi?id=236001>
<rdar://problem/88364275>

Reviewed by Dean Jackson.

Source/bmalloc:

* libpas/src/libpas/pas_large_free_inlines.h:
(pas_large_free_create_merged):
- Turn off PAS_ALWAYS_INLINE when the
  WK_WORKAROUND_RDAR_87613908_ASAN_STACK_USE_AFTER_SCOPE macro
  is defined to avoid the bug.

Tools:

Based on a patch by Kimmo Kinnunen.

Define a WK_WORKAROUND_RDAR_87613908_ASAN_STACK_USE_AFTER_SCOPE
macro so that the fix can be targeted to a specific function in
libpas.  This avoids disabling all stack-use-after-scope checks
in bmalloc when compiling with Address Sanitizer enabled.

* sanitizer/asan.xcconfig:
(WK_ADDRESS_SANITIZER_OTHER_CFLAGS_YES): Add.
- This variable contains the macro definition when the
  workaround is needed.  It's used in sanitizer.xcconfig to add
  the macro definition to $(OTHER_CFLAGS).
(WK_NEEDS_ASAN_USE_AFTER_SCOPE_WORKAROUND_FOR_bmalloc_YES): Add.
- The workaround is currently only needed in bmalloc.
(WK_NOT_): Add.
(WK_NOT_YES): Add.
- Add support for $(WK_NOT_$(X)) variables.
(WK_NEEDS_ASAN_USE_AFTER_SCOPE_WORKAROUND): Add.
- Sets when the workaround is needed based on the Xcode version.
  Uses a $(WK_NOT_$(X)) variable to negate the result when the
  workaround is not needed.
(WK_XCODE_VERSION_BEFORE_13_3_*): Add.
- List Xcode versions where the workaround is not needed.

* sanitizer/sanitizer.xcconfig:
(OTHER_CFLAGS):
- Add the value of $(WK_ADDRESS_SANITIZER_OTHER_CFLAGS_YES) from
  asan.xcconfig when building with Address Sanitizer enabled.



Canonical link: https://commits.webkit.org/247337@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=236669
rdar://88924479

Reviewed by Dean Jackson.

Remove a couple of unused context menu item identifier constants for Quick Note, and add a new constant to
represent the "Copy Cropped Image" item added in r289851.

* UIProcess/API/Cocoa/WKMenuItemIdentifiers.mm:
* UIProcess/API/Cocoa/WKMenuItemIdentifiersPrivate.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::menuItemIdentifier):



Canonical link: https://commits.webkit.org/247338@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
…ic analyzer warnings

<https://webkit.org/b/236663>
<rdar://problem/88982792>

Reviewed by Dean Jackson.

* Misc/WebDownload.mm:
(callOnDelegateThreadAndWait):
- Replace WTFMove() with std::forward<>().



Canonical link: https://commits.webkit.org/247339@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=231692

Patch by Eliot Hsu <eliot_hsu@apple.com> on 2022-02-16
Reviewed by Alex Christensen.

Following up on an old FIXME, move Safari Safe Browsing-specific
knowledge out of WebKit and into the SafariSafeBrowsing framework.
This includes things like the Learn More URL, the Report an Error URL,
etc.

Source/WebKit:

* Platform/spi/Cocoa/SafeBrowsingSPI.h:
* UIProcess/Cocoa/SafeBrowsingWarningCocoa.mm:
(WebKit::malwareDetailsBase):
(WebKit::learnMoreURL):
(WebKit::reportAnErrorBase):
(WebKit::localizedProvider):
Rely on new SafariSafeBrowsing calls to provide
URL/provider information about Safe Browsing,
when available

Source/WTF:

* wtf/PlatformHave.h:




Canonical link: https://commits.webkit.org/247340@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=236671

Reviewed by Said Abou-Hallawa.
Source/WebCore:

RemoteLayerBackingStore::encode() had some awkward code that used knowlege of the relationship
between buffer types and mappability to static_cast<> to specific backend implementations.

Replace this with a small abstract stub in the form of WebCore::ImageBufferBackendSharing, and
a mixin class for shareable image buffers which inherits from a concrete subclass, ImageBufferBackendHandleSharing.
It's not possible to downcast<> ImageBufferBackend directly because there is no common base class for
the shareable types of buffer backends.

Now the code in RemoteLayerBackingStore can be simplified.

* platform/graphics/ImageBufferBackend.h:
(WebCore::ImageBufferBackendSharing::isImageBufferBackendHandleSharing const):
(WebCore::ImageBufferBackend::toBackendSharing):

Source/WebKit:

RemoteLayerBackingStore::encode() had some awkward code that used knowlege of the relationship
between buffer types and mappability to static_cast<> to specific backend implementations.

Replace this with a small abstract stub in the form of WebCore::ImageBufferBackendSharing, and
a mixin class for shareable image buffers which inherits from a concrete subclass, ImageBufferBackendHandleSharing.
It's not possible to downcast<> ImageBufferBackend directly because there is no common base class for
the shareable types of buffer backends.

Now the code in RemoteLayerBackingStore can be simplified.

* GPUProcess/graphics/RemoteImageBuffer.h:
* Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.cpp:
(WebKit::CGDisplayListImageBufferBackend::createBackendHandle const):
(WebKit::CGDisplayListImageBufferBackend::createImageBufferBackendHandle const): Deleted.
* Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.h:
* Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::encode const):
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/GPU/graphics/ImageBufferBackendHandleSharing.h: Added.
* WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.cpp:
(WebKit::ImageBufferShareableBitmapBackend::createBackendHandle const):
(WebKit::ImageBufferShareableBitmapBackend::createImageBufferBackendHandle const): Deleted.
* WebProcess/GPU/graphics/ImageBufferShareableBitmapBackend.h:
* WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
(WebKit::RemoteImageBufferProxy::createImageBufferBackendHandle):
* WebProcess/GPU/graphics/cocoa/ImageBufferRemoteIOSurfaceBackend.cpp:
(WebKit::ImageBufferRemoteIOSurfaceBackend::createBackendHandle const):
(WebKit::ImageBufferRemoteIOSurfaceBackend::createImageBufferBackendHandle const): Deleted.
* WebProcess/GPU/graphics/cocoa/ImageBufferRemoteIOSurfaceBackend.h:
* WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.cpp:
(WebKit::ImageBufferShareableMappedIOSurfaceBackend::createBackendHandle const):
(WebKit::ImageBufferShareableMappedIOSurfaceBackend::createImageBufferBackendHandle const): Deleted.
* WebProcess/GPU/graphics/cocoa/ImageBufferShareableMappedIOSurfaceBackend.h:



Canonical link: https://commits.webkit.org/247341@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=236636

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-16
Reviewed by Dean Jackson.

Source/WebCore:

Move ANGLEHeaders.h includes only to the .cpp/.mm files
that need to use ANGLE.
Use GCGL* types consistently in the GraphicsContextGLANGLE.h
declations. The WebCore types are intended to be used in place of OpenGL, EGL types
so that WebCore code does not need to include OpenGL headers.

Rename PlatformGraphicsContextGL{Display, Config}, PlatformGraphicsContextGL to
GCGLDisplay, GCGLConfig, GCGLContext to make them consistent with other
duplicated types. Declare these in GraphicsTypesGL.h, similar to others.
Remove currently unused PlatformGraphicsContextGLSurface.

Rename TemporaryANGLESetting to ScopedGLCapability, consistent with other ScopedGL*
classes. Move the implementations of ScopedGL* to ANGLEUtilities.cpp, since the
implementations need to use ANGLE and these need the ANGLE headers.

No new tests, refactor. Fixes the compile on Big Sur, internal SDK when a file add or remove
would changed unified build file ordering.

* CMakeLists.txt:
* Modules/webxr/WebXROpaqueFramebuffer.cpp:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/GLContext.h:
* platform/graphics/GraphicsContextGL.h:
* platform/graphics/GraphicsTypesGL.h:
* platform/graphics/angle/ANGLEUtilities.cpp:
(WebCore::ScopedRestoreTextureBinding::ScopedRestoreTextureBinding):
(WebCore::ScopedRestoreTextureBinding::~ScopedRestoreTextureBinding):
(WebCore::ScopedBufferBinding::ScopedBufferBinding):
(WebCore::ScopedBufferBinding::~ScopedBufferBinding):
(WebCore::ScopedRestoreReadFramebufferBinding::bindFramebuffer):
(WebCore::ScopedRestoreReadFramebufferBinding::~ScopedRestoreReadFramebufferBinding):
(WebCore::ScopedPixelStorageMode::ScopedPixelStorageMode):
(WebCore::ScopedPixelStorageMode::~ScopedPixelStorageMode):
(WebCore::ScopedPixelStorageMode::pixelStore):
(WebCore::ScopedTexture::ScopedTexture):
(WebCore::ScopedTexture::~ScopedTexture):
(WebCore::ScopedFramebuffer::ScopedFramebuffer):
(WebCore::ScopedFramebuffer::~ScopedFramebuffer):
(WebCore::ScopedGLFence::reset):
(WebCore::ScopedGLFence::fenceSync):
(WebCore::ScopedGLCapability::ScopedGLCapability):
(WebCore::ScopedGLCapability::~ScopedGLCapability):
* platform/graphics/angle/ANGLEUtilities.h:
(WebCore::ScopedBufferBinding::query):
(WebCore::ScopedRestoreReadFramebufferBinding::ScopedRestoreReadFramebufferBinding):
(WebCore::ScopedRestoreReadFramebufferBinding::framebufferTarget const):
(WebCore::ScopedPixelStorageMode::operator GCGLint const):
(WebCore::ScopedTexture::operator GCGLuint const):
(WebCore::ScopedFramebuffer::operator GCGLuint const):
(WebCore::ScopedGLFence::get const):
(WebCore::ScopedGLFence::operator GCGLsync const):
* platform/graphics/angle/GraphicsContextGLANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::releaseThreadResources):
(WebCore::GraphicsContextGLANGLE::resolveMultisamplingIfNecessary):
(WebCore::GraphicsContextGLANGLE::prepareTextureImpl):
(WebCore::GraphicsContextGLANGLE::reshape):
(WebCore::GraphicsContextGLANGLE::isSync):
(WebCore::GraphicsContextGLANGLE::deleteSync):
(WebCore::GraphicsContextGLANGLE::clientWaitSync):
(WebCore::GraphicsContextGLANGLE::waitSync):
(WebCore::GraphicsContextGLANGLE::getSynci):
(WebCore::GraphicsContextGLANGLE::waitAndUpdateOldestFrame):
* platform/graphics/angle/GraphicsContextGLANGLE.h:
* platform/graphics/angle/TemporaryANGLESetting.cpp: Removed.
* platform/graphics/angle/TemporaryANGLESetting.h: Removed.
* platform/graphics/cocoa/ANGLEUtilitiesCocoa.cpp:
(WebCore::platformIsANGLEAvailable):
(WebCore::createPbufferAndAttachIOSurface):
* platform/graphics/cocoa/ANGLEUtilitiesCocoa.h:
* platform/graphics/cocoa/GraphicsContextGLCocoa.mm:
(WebCore::GraphicsContextGLANGLE::makeCurrent):
(WebCore::GraphicsContextGLANGLE::platformDisplay const):
(WebCore::GraphicsContextGLANGLE::platformConfig const):
* platform/graphics/cv/GraphicsContextGLCVCocoa.cpp:
* platform/graphics/cv/GraphicsContextGLCVCocoa.h:
* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::platformContext):
* platform/graphics/egl/GLContextEGL.h:
* platform/graphics/glx/GLContextGLX.cpp:
(WebCore::GLContextGLX::platformContext):
* platform/graphics/glx/GLContextGLX.h:
* platform/graphics/gstreamer/PlatformDisplayGStreamer.cpp:
(PlatformDisplay::tryEnsureGstGLContext const):
* platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp:
(Nicosia::GCGLANGLELayer::ANGLEContext::platformContext const):
(Nicosia::GCGLANGLELayer::ANGLEContext::platformDisplay const):
(Nicosia::GCGLANGLELayer::ANGLEContext::platformConfig const):
(Nicosia::GCGLANGLELayer::platformContext const):
(Nicosia::GCGLANGLELayer::platformDisplay const):
(Nicosia::GCGLANGLELayer::platformConfig const):
* platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.h:
* platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp:
(Nicosia::GCGLLayer::platformContext const):
* platform/graphics/nicosia/texmap/NicosiaGCGLLayer.h:
* platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::EGLImageBacking::EGLImageBacking):
(WebCore::GraphicsContextGLANGLE::platformDisplay const):
(WebCore::GraphicsContextGLANGLE::platformConfig const):
* platform/graphics/texmap/TextureMapperGCGLPlatformLayer.cpp:
(WebCore::TextureMapperGCGLPlatformLayer::platformContext const):
(WebCore::TextureMapperGCGLPlatformLayer::platformDisplay const):
(WebCore::TextureMapperGCGLPlatformLayer::platformConfig const):
* platform/graphics/texmap/TextureMapperGCGLPlatformLayer.h:

Source/WebCore/PAL:

Remove the attempt to override system header logic with WebKit
ANGLE implementation. They are different implementations
and one cannot replace the other.

* pal/spi/cg/CoreGraphicsSPI.h:
* pal/spi/mac/HIToolboxSPI.h:
Add missing CGCOLORTAGGEDPOINTER_H_ that makes the CocoaPriv.h
included CoreGraphics header skip the incompatible tagged pointer
declarations, similar to other *SPI.h headers.

Source/WebKit:

Remove the attempt to override system header logic with WebKit
ANGLE implementation. They are different implementations
and one cannot replace the other.

* GPUProcess/graphics/RemoteGraphicsContextGL.h:
* Platform/spi/mac/AppKitSPI.h:
* Platform/spi/mac/ApplicationServicesSPI.h:
* WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:

Source/WebKitLegacy/mac:

Remove the attempt to override system header logic with WebKit
ANGLE implementation. They are different implementations
and one cannot replace the other.

* WebView/WebFrameInternal.h:


Canonical link: https://commits.webkit.org/247342@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=236000

It caused some problems, and another approach will be taken.

* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):




Canonical link: https://commits.webkit.org/247343@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289916 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.