WebKit-https.git
108 min agoSupport invalidation for :in-range/:out-of-range master
antti@apple.com [Sat, 21 May 2022 15:15:06 +0000 (15:15 +0000)]
Support invalidation for :in-range/:out-of-range
https://bugs.webkit.org/show_bug.cgi?id=238902
<rdar://91718746>

Reviewed by Alan Bujtas.

* LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/input-pseudo-classes-in-has-expected.txt:

* Source/WebCore/html/InputType.cpp:
(WebCore::InputType::setValue):

No need to invalidate style unconditionally on value change anymore.
Use Style::PseudoClassChangeInvalidation for :in-range invalidation.

* Source/WebCore/html/SearchInputType.cpp:
(WebCore::SearchInputType::setValue):

Search cancel button style depends on emptiness of the value so invalidate that specifically.

* Source/WebCore/html/SearchInputType.h:

link: https://commits.webkit.org/250839@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294613 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4 hours agoText selection does not show continuous selection when dragging across pages with...
zalan@apple.com [Sat, 21 May 2022 12:38:30 +0000 (12:38 +0000)]
Text selection does not show continuous selection when dragging across pages with widows
https://bugs.webkit.org/show_bug.cgi?id=240753
<rdar://90960113>

Reviewed by Antti Koivisto.

Use the correct variable to mark the line.

Test: fast/multicol/incorrect-is-first-line-after-page-break-with-widow.html
* Source/WebCore/layout/integration/inline/InlineIteratorLineBox.cpp:
(WebCore::InlineIterator::LineBoxIterator::operator bool const):
* Source/WebCore/layout/integration/inline/InlineIteratorLineBox.h:
(WebCore::InlineIterator::LineBoxIterator::operator bool const): Deleted.
* Source/WebCore/layout/integration/inline/LayoutIntegrationPagination.cpp:
(WebCore::LayoutIntegration::adjustLinePositionsForPagination):
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::lineIndexAfterPageBreak):
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:
* LayoutTests/fast/multicol/incorrect-is-first-line-after-page-break-with-widow-expected.txt: Added.
* LayoutTests/fast/multicol/incorrect-is-first-line-after-page-break-with-widow.html: Added.

link: https://commits.webkit.org/250838@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294612 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10 hours agoStart preparing the code base for marking the StringView(const char*) constructor...
cdumez@apple.com [Sat, 21 May 2022 06:19:29 +0000 (06:19 +0000)]
Start preparing the code base for marking the StringView(const char*) constructor explicit
https://bugs.webkit.org/show_bug.cgi?id=240687

Reviewed by Darin Adler.

Start preparing the code base for marking the StringView(const char*) constructor explicit.
This encourages people to ensure ASCIILiteral / ""_s whenever possible.

* Source/JavaScriptCore/API/JSAPIGlobalObject.mm:
(JSC::computeValidImportSpecifier):
* Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::isWebKitInjectedScript):
* Source/JavaScriptCore/jit/ExecutableAllocator.cpp:
(JSC::dumpJITMemory):
* Source/JavaScriptCore/jsc.cpp:
(GlobalObject::moduleLoaderImportModule):
(GlobalObject::moduleLoaderResolve):
* Source/JavaScriptCore/runtime/FileBasedFuzzerAgent.cpp:
(JSC::FileBasedFuzzerAgent::getPredictionInternal):
* Source/JavaScriptCore/runtime/IntlLocale.cpp:
(JSC::IntlLocale::initializeLocale):
* Source/JavaScriptCore/runtime/IntlObject.cpp:
(JSC::isValidTimeZoneNameFromICUTimeZone):
* Source/JavaScriptCore/runtime/TypeProfiler.cpp:
(JSC::TypeProfiler::logTypesForTypeLocation):
* Source/JavaScriptCore/testRegExp.cpp:
(parseRegExpLine):
* Source/JavaScriptCore/yarr/YarrUnicodeProperties.cpp:
(JSC::Yarr::HashTable::entry const):
* Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
* Source/WebKit/UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::hasOnlySecureContent):
* Source/WebKit/UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _defaultAnimationController]):
* Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController _defaultAnimationController]):
* Source/WTF/wtf/DateMath.cpp:
(WTF::parseDateFromNullTerminatedCharacters):
* Source/WTF/wtf/SortedArrayMap.h:
(WTF::operator<):
* Source/WTF/wtf/URL.cpp:
(WTF::URL::hasSpecialScheme const):
(WTF::URL::setPath):
(WTF::protocolIsInternal):
(WTF::protocolIs):
(WTF::URL::isLocalFile const):
(WTF::protocolIsJavaScript):
(WTF::URL::protocolIsAbout const):
(WTF::portAllowed):
(WTF::mimeTypeFromDataURL):
(WTF::URL::isAboutBlank const):
(WTF::URL::isAboutSrcDoc const):
* Source/WTF/wtf/URL.h:
(WTF::URL::protocolIsBlob const):
(WTF::URL::protocolIsData const):
* Source/WTF/wtf/URLHelpers.cpp:
(WTF::URLHelpers::applyHostNameFunctionToURLString):
* Source/WTF/wtf/URLParser.cpp:
(WTF::URLParser::copyBaseWindowsDriveLetter):
(WTF::URLParser::URLParser):
(WTF::URLParser::parse):
* Source/WTF/wtf/text/ASCIILiteral.h:
* Source/WTF/wtf/text/StringView.h:
(WTF::operator==):
(WTF::operator!=):
(WTF::equal):
* Source/WebCore/Modules/applepay/PaymentSession.cpp:
(WebCore::isSecure):
* Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp:
(WebCore::resolveRelativeVirtualPath):
(WebCore::DOMFileSystem::getParent):
* Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp:
(WebCore::FetchBodyConsumer::packageFormData):
* Source/WebCore/Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::removeAllDatabasesForFullOriginPath):
* Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::databasesSizeForDirectory):
* Source/WebCore/Modules/mediasource/MediaSource.cpp:
(WebCore::addVP9FullRangeVideoFlagToContentType):
* Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::shouldIgnoreIceCandidate):
* Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::iceServersFromConfiguration):
* Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::isValidURLBasedPaymentMethodIdentifier):
* Source/WebCore/Modules/plugins/YouTubePluginReplacement.cpp:
(WebCore::YouTubePluginReplacement::youTubeURLFromAbsoluteURL):
* Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.cpp:
(WebCore::AuthenticatorCoordinatorInternal::needsAppIdQuirks):
* Source/WebCore/Modules/webdatabase/Database.cpp:
(WebCore::fullyQualifiedInfoTableName):
* Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::usage):
* Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp:
(WebCore::ThreadableWebSocketChannel::validateURL):
* Source/WebCore/Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect):
(WebCore::WebSocket::didUpgradeURL):
* Source/WebCore/Modules/websockets/WebSocketHandshake.cpp:
(WebCore::hostName):
(WebCore::WebSocketHandshake::WebSocketHandshake):
(WebCore::WebSocketHandshake::httpURLForAuthenticationAndCookies const):
(WebCore::headerHasValidHTTPVersion):
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleAttributeChange):
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isSearchField const):
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::ariaLandmarkRoleDescription const):
* Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::AccessibilityObject::rolePlatformDescription const):
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::setPseudoElement):
* Source/WebCore/bindings/js/ScriptModuleLoader.cpp:
(WebCore::resolveModuleSpecifier):
* Source/WebCore/contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad):
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForPingLoad):
(WebCore::ContentExtensions::applyResultsToRequest):
* Source/WebCore/css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::isSupportedFormat const):
* Source/WebCore/css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::formatInfiniteOrNanValue const):
(WebCore::CSSPrimitiveValue::formatNumberValue const):
(WebCore::CSSPrimitiveValue::formatIntegerValue const):
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
* Source/WebCore/css/CSSPrimitiveValue.h:
* Source/WebCore/css/CSSSelector.cpp:
(WebCore::CSSSelector::parsePseudoElementType):
* Source/WebCore/css/ContainerQueryParser.cpp:
(WebCore::ContainerQueryParser::consumePlainSizeFeature):
* Source/WebCore/css/DOMCSSNamespace.cpp:
(WebCore::valueWithoutImportant):
* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeDashedIdent):
* Source/WebCore/css/parser/CSSSelectorParser.cpp:
(WebCore::consumeLangArgumentList):
* Source/WebCore/css/typedom/CSSOMVariableReferenceValue.cpp:
(WebCore::CSSOMVariableReferenceValue::create):
(WebCore::CSSOMVariableReferenceValue::setVariable):
* Source/WebCore/dom/ConstantPropertyMap.cpp:
(WebCore::variableDataForPositivePixelLength):
(WebCore::variableDataForPositiveDuration):
* Source/WebCore/dom/DataTransfer.cpp:
(WebCore::normalizeType):
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::isCookieAverse const):
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::isEventHandlerAttribute const):
* Source/WebCore/dom/TextDecoder.cpp:
(WebCore::TextDecoder::encoding const):
* Source/WebCore/editing/cocoa/HTMLConverter.mm:
(HTMLConverterCaches::isBlockElement):
(HTMLConverter::computedAttributesForElement):
(HTMLConverter::_processText):
* Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::stripMicrosoftPrefix):
* Source/WebCore/editing/markup.cpp:
(WebCore::shouldPreserveMSOLists):
* Source/WebCore/fileapi/BlobURL.cpp:
* Source/WebCore/html/FeaturePolicy.cpp:
(WebCore::FeaturePolicy::parse):
* Source/WebCore/html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAttribute):
* Source/WebCore/html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::formWouldHaveSecureSubmission):
* Source/WebCore/html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
* Source/WebCore/html/HTMLMediaElement.cpp:
* Source/WebCore/html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::hasValidClassId):
* Source/WebCore/html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::isImageType):
* Source/WebCore/html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
* Source/WebCore/html/URLDecomposition.cpp:
(WebCore::URLDecomposition::setUsername):
(WebCore::URLDecomposition::setPassword):
(WebCore::URLDecomposition::setHost):
(WebCore::URLDecomposition::setHostname):
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::State::fontString const):
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::getActiveUniform):
(WebCore::WebGLRenderingContextBase::getUniformLocation):
* Source/WebCore/html/parser/CSSPreloadScanner.cpp:
(WebCore::hasValidImportConditions):
* Source/WebCore/html/parser/HTMLMetaCharsetParser.cpp:
(WebCore::extractCharset):
* Source/WebCore/html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
* Source/WebCore/html/track/WebVTTParser.cpp:
* Source/WebCore/inspector/DOMPatchSupport.cpp:
* Source/WebCore/inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::revealFileExternally):
* Source/WebCore/inspector/InspectorStyleSheet.cpp:
(WebCore::StyleSheetHandler::observeComment):
(WebCore::lowercasePropertyName):
(WebCore::selectorsFromSource):
* Source/WebCore/loader/CookieJar.cpp:
(WebCore::CookieJar::shouldIncludeSecureCookies):
* Source/WebCore/loader/CustomHeaderFields.cpp:
(WebCore::CustomHeaderFields::thirdPartyDomainsMatch const):
* Source/WebCore/loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::open):
* Source/WebCore/loader/PolicyChecker.cpp:
(WebCore::FrameLoader::PolicyChecker::checkNavigationPolicy):
* Source/WebCore/loader/PrivateClickMeasurement.cpp:
(WebCore::PrivateClickMeasurement::parseAttributionRequest):
* Source/WebCore/loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::isPDFJSResourceLoad const):
* Source/WebCore/loader/appcache/ApplicationCacheManifestParser.cpp:
(WebCore::parseApplicationCacheManifest):
* Source/WebCore/loader/archive/ArchiveResourceCollection.cpp:
(WebCore::ArchiveResourceCollection::archiveResourceForURL):
* Source/WebCore/loader/cache/CachedResource.cpp:
(WebCore::CachedResource::makeRevalidationDecision const):
* Source/WebCore/loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
* Source/WebCore/page/ContextMenuController.cpp:
(WebCore::ContextMenuController::checkOrEnableIfNeeded const):
* Source/WebCore/page/EventHandler.cpp:
(WebCore::hasDropZoneType):
* Source/WebCore/page/Frame.cpp:
(WebCore::createRegExpForLabels):
(WebCore::matchLabelsAgainstString):
* Source/WebCore/page/Page.cpp:
(WebCore::Page::userStyleSheetLocationChanged):
(WebCore::Page::allowsLoadFromURL const):
* Source/WebCore/page/Quirks.cpp:
(WebCore::isYahooMail):
(WebCore::Quirks::shouldDisableContentChangeObserverTouchEventAdjustment const):
(WebCore::Quirks::shouldHideSearchFieldResultsButton const):
(WebCore::Quirks::isAmazon const):
(WebCore::Quirks::isGoogleMaps const):
(WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
(WebCore::Quirks::shouldDispatchedSimulatedMouseEventsAssumeDefaultPrevented const):
(WebCore::Quirks::simulatedMouseEventTypeForTarget const):
(WebCore::Quirks::shouldPreventPointerMediaQueryFromEvaluatingToCoarse const):
(WebCore::Quirks::shouldAvoidResizingWhenInputViewBoundsChange const):
(WebCore::Quirks::shouldDisablePointerEventsQuirk const):
(WebCore::Quirks::needsInputModeNoneImplicitly const):
(WebCore::Quirks::needsFullscreenDisplayNoneQuirk const):
(WebCore::Quirks::shouldSilenceWindowResizeEvents const):
(WebCore::Quirks::shouldSilenceMediaQueryListChangeEvents const):
(WebCore::Quirks::shouldUseLegacySelectPopoverDismissalBehaviorInDataActivation const):
(WebCore::Quirks::shouldOpenAsAboutBlank const):
(WebCore::Quirks::shouldBypassBackForwardCache const):
(WebCore::Quirks::shouldBypassAsyncScriptDeferring const):
(WebCore::Quirks::shouldMakeEventListenerPassive):
(WebCore::Quirks::shouldDisableElementFullscreenQuirk const):
(WebCore::Quirks::needsCanPlayAfterSeekedQuirk const):
(WebCore::Quirks::shouldLayOutAtMinimumWindowWidthWhenIgnoringScalingConstraints const):
(WebCore::Quirks::shouldIgnoreContentObservationForSyntheticClick const):
(WebCore::isKinjaLoginAvatarElement):
(WebCore::Quirks::isMicrosoftTeamsRedirectURL):
(WebCore::Quirks::needsBlackFullscreenBackgroundQuirk const):
(WebCore::Quirks::needsToForceUserSelectAndUserDragWhenInstallingImageOverlay const):
* Source/WebCore/page/SecurityOrigin.cpp:
(WebCore::schemeRequiresHost):
(WebCore::SecurityOrigin::shouldIgnoreHost):
(WebCore::shouldTreatAsUniqueOrigin):
(WebCore::isLoopbackIPAddress):
(WebCore::SecurityOrigin::isLocalHostOrLoopbackIPAddress):
* Source/WebCore/page/SecurityPolicy.cpp:
(WebCore::SecurityPolicy::shouldHideReferrer):
(WebCore::SecurityPolicy::generateOriginHeader):
* Source/WebCore/page/UserContentURLPattern.cpp:
(WebCore::UserContentURLPattern::parse):
* Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm:
(WebCore::ResourceUsageThread::platformCollectCPUData):
* Source/WebCore/page/csp/ContentSecurityPolicy.cpp:
(WebCore::shouldReportProtocolOnly):
(WebCore::ContentSecurityPolicy::upgradeInsecureRequestIfNeeded const):
(WebCore::ContentSecurityPolicy::setUpgradeInsecureRequests):
* Source/WebCore/page/csp/ContentSecurityPolicySource.cpp:
(WebCore::ContentSecurityPolicySource::portMatches const):
* Source/WebCore/page/csp/ContentSecurityPolicySourceList.cpp:
(WebCore::ContentSecurityPolicySourceList::isProtocolAllowedByStar const):
* Source/WebCore/platform/MIMETypeRegistry.cpp:
(WebCore::MIMETypeRegistry::isSupportedJSONMIMEType):
(WebCore::MIMETypeRegistry::isXMLMIMEType):
* Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm:
(WebCore::MacApplication::isSafari):
* Source/WebCore/platform/graphics/Image.cpp:
(WebCore::Image::isPDFResource):
(WebCore::Image::isPostScriptResource):
* Source/WebCore/platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
(WebCore::CDMFactoryFairPlayStreaming::supportsKeySystem):
* Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::isUnsupportedMIMEType):
* Source/WebCore/platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm:
(WebCore::AVAssetMIMETypeCache::isUnsupportedContainerType):
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::fontWithFamilySpecialCase):
* Source/WebCore/platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.cpp:
(WebCore::videoCodecTypeFromRFC4281Type):
(WebCore::computeMediaCapabilitiesInfo):
* Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp:
(WebCore::SourceBufferParserWebM::isContentTypeSupported):
* Source/WebCore/platform/mac/UserAgentMac.mm:
(WebCore::standardUserAgentWithApplicationName):
* Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
(WebCore::isValidCaptureDevice):
* Source/WebCore/platform/network/CacheValidation.cpp:
(WebCore::parseCacheControlDirectives):
(WebCore::cookieRequestHeaderFieldValue):
* Source/WebCore/platform/network/DataURLDecoder.cpp:
(WebCore::DataURLDecoder::DecodeTask::process):
* Source/WebCore/platform/network/HTTPParsers.cpp:
(WebCore::extractCharsetFromMediaType):
* Source/WebCore/platform/network/ParsedContentRange.cpp:
(WebCore::parseContentRange):
* Source/WebCore/platform/network/ParsedRequestRange.cpp:
(WebCore::ParsedRequestRange::parse):
* Source/WebCore/platform/network/ResourceHandle.cpp:
(WebCore::ResourceHandle::shouldContentSniffURL):
* Source/WebCore/platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::redirectedRequest const):
* Source/WebCore/platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::isHTTP09 const):
* Source/WebCore/platform/network/cf/SocketStreamHandleImpl.h:
(WebCore::SocketStreamHandleImpl::shouldUseSSL const):
* Source/WebCore/platform/network/cf/SocketStreamHandleImplCFNet.cpp:
(WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl):
* Source/WebCore/platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::willSendRequest):
* Source/WebCore/plugins/PluginData.cpp:
(WebCore::shouldBePubliclyVisible):
* Source/WebCore/rendering/HitTestResult.cpp:
(WebCore::HitTestResult::absolutePDFURL const):
* Source/WebCore/rendering/RenderListMarker.cpp:
(WebCore::listMarkerSuffix):
* Source/WebCore/svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::scrollToFragment):
* Source/WebCore/svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::parseOffsetValue):
(WebCore::SVGSMILElement::parseCondition):
* Source/WebCore/workers/Worker.cpp:
(WebCore::Worker::didReceiveResponse):
* Source/WebCore/workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::addRegistration):
* Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::shouldAllowExternalLoad):

link: https://commits.webkit.org/250837@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294611 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10 hours agoRelease assert in Document::updateLayout() via HTMLTextAreaElement::childrenChanged
brandonstewart@apple.com [Sat, 21 May 2022 06:09:00 +0000 (06:09 +0000)]
Release assert in Document::updateLayout() via HTMLTextAreaElement::childrenChanged
https://bugs.webkit.org/show_bug.cgi?id=224471

Reviewed by Ryosuke Niwa.

This patch is based on a set of patches made by Sergio Villar Senin
and Gabriel Nava Marino.

Executing some editing commands in a text area might force the recomputation of things
like caret or the visible selection position and extent. Under some circumstances (like
when the text area has no content and children) we might end up trying to update layout
when it is not safe as a side effect of updating the caret.

In order to fix that, we can switch to a model in which we update the selection asynchronously
in the case of having a non-user triggered change. That way we don't do it inside
a restricted layout scope.

The App Highlight restoration code had to be tuned as well (when restoring and scrolling to reveal
a Quick Note on iOS MacOS). It uses TemporarySelectionChange to select and scroll to reveal the highlight
range; the code assumed that this scrolling happens synchronously, since it reverts the selection to
the original range at the end of `AppHighlightStorage::attemptToRestoreHighlightAndScroll` when the
TemporarySelectionChange falls out of scope. That is however no longer the case. Actually no scrolling
happened after this patch because we end up only scheduling the appearance update timer before setting
the selection back to the original state with `SelectionRevealMode::DoNotReveal`. Since this only happens
when the user interacts in the Notes app, it seems sensible to consider it as a user triggered event.

Layout Tests

Moved some tests out of the text-based-repaint.js model because selection is now updated
and revealed asynchronously in the case of non-user triggered changes. The problem is that
by the time the repaint rects are queried the update has not happened yet. That's why
the tests were modified so that we wait until the repaint happens.

Same situation for other tests that do not involve repaint rects but trigger accesibility
tree updates. We must ensure that we let the notification be thrown before checking whether or
not has been emited. As it's done asynchronously we must let the main thread run before checking.

Last but not least, some of the tests are using setTimeout() instead of requestAnimationFrame()
because the results with the latter were not as reliable under stress/debug conditions.

* Source/WebCore/Modules/highlight/AppHighlightStorage.cpp:
(WebCore::AppHighlightStorage::attemptToRestoreHighlightAndScroll):
* Source/WebCore/editing/Editor.cpp:
(WebCore::TemporarySelectionChange::setSelection):
* Source/WebCore/editing/Editor.h:
* Source/WebCore/editing/FrameSelection.cpp:
(WebCore::FrameSelection::setSelection):
(WebCore::FrameSelection::updateSelectionAppearanceNow):
(WebCore::FrameSelection::absoluteCaretBounds):
(WebCore::FrameSelection::setCaretVisibility):
(WebCore::FrameSelection::selectionBounds):
(WebCore::FrameSelection::revealSelection):
(WebCore::updateSelectionByUpdatingLayoutOrStyle): Deleted.
(WebCore::FrameSelection::selectionBounds const): Deleted.
* Source/WebCore/editing/FrameSelection.h:
* Source/WebCore/page/EventHandler.cpp:
(WebCore::setSelectionIfNeeded):
* Source/WebCore/page/Page.cpp:
(WebCore::Page::doAfterUpdateRendering):
* LayoutTests/accessibility/mac/selection-boundary-userinfo.html:
* LayoutTests/accessibility/mac/selection-change-userinfo.html:
* LayoutTests/accessibility/mac/selection-value-changes-for-aria-textbox.html:
* LayoutTests/editing/selection-with-absolute-positioned-empty-content.html:
* LayoutTests/fast/forms/textarea-scrolled-endline-caret.html:
* LayoutTests/fast/repaint/selection-gap-absolute-child-expected.txt:
* LayoutTests/fast/repaint/selection-gap-absolute-child.html:
* LayoutTests/fast/repaint/selection-gap-fixed-child.html:
* LayoutTests/fast/repaint/selection-gap-flipped-absolute-child-expected.txt:
* LayoutTests/fast/repaint/selection-gap-flipped-absolute-child.html:
* LayoutTests/fast/repaint/selection-gap-transformed-absolute-child-expected.txt:
* LayoutTests/fast/repaint/selection-gap-transformed-absolute-child.html:
* LayoutTests/fast/repaint/selection-gap-transformed-fixed-child-expected.txt:
* LayoutTests/fast/repaint/selection-gap-transformed-fixed-child.html:
* LayoutTests/fast/repaint/selection-paint-invalidation-expected.txt:
* LayoutTests/fast/repaint/selection-ruby-rl-expected.txt:
* LayoutTests/fast/repaint/selection-ruby-rl.html:
* LayoutTests/fast/repaint/text-selection-overflow-hidden-expected.txt:
* LayoutTests/fast/repaint/text-selection-overflow-hidden.html:
* LayoutTests/fast/text/incorrect-deselection-across-multiple-elements.html:
* LayoutTests/platform/gtk/TestExpectations:
* LayoutTests/platform/gtk/fast/repaint/selection-ruby-rl-expected.txt: Copied from LayoutTests/fast/repaint/selection-ruby-rl-expected.txt.
* LayoutTests/platform/gtk/fast/repaint/text-selection-overflow-hidden-expected.txt:
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/mac-wk1/accessibility/mac/focus-setting-selection-syncronizing-not-clearing-expected.txt: Added.
* LayoutTests/platform/mac-wk1/fast/repaint/4776765-expected.txt: Added.
* LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-target-margin-005-expected.txt:
* LayoutTests/platform/mac/TestExpectations:
* LayoutTests/platform/win/fast/repaint/4776765-expected.txt: Added.
* LayoutTests/platform/win/fast/repaint/selection-ruby-rl-expected.txt:
* LayoutTests/platform/win/fast/repaint/text-selection-overflow-hidden-expected.txt:

link: https://commits.webkit.org/250836@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294610 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11 hours ago[css-values-4] logical `*vi`(inline) and `*vb` (block) viewport units should be based...
drousso@apple.com [Sat, 21 May 2022 05:39:52 +0000 (05:39 +0000)]
[css-values-4] logical `*vi`(inline) and `*vb` (block) viewport units should be based on the current element's `writing-mode`
https://bugs.webkit.org/show_bug.cgi?id=234373
<rdar://problem/86832561>

Reviewed by Tim Nguyen.

Previously, we only looked at the root element's `writing-mode`. Looking at the current element's
`writing-mode` allows for non-root elements to have a `writing-mode` independent of the root element,
as well as having styles based on that. This was changed in <https://github.com/w3c/csswg-drafts/issues/6873>.

Tests: CSSViewportUnits.AllSame
       CSSViewportUnits.MinimumViewportInsetWithWritingMode
       CSSViewportUnits.MaximumViewportInsetWithWritingMode
       CSSViewportUnits.EmptyUnobscuredSizeOverrides
       CSSViewportUnits.SameUnobscuredSizeOverrides
       CSSViewportUnits.DifferentUnobscuredSizeOverrides
       CSSViewportUnits.SVGDocument

* Source/WebCore/css/CSSPrimitiveValue.cpp:
(WebCore::lengthOfViewportPhysicalAxisForLogicalAxis):
(WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):

* Tools/TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.mm:
(changeCSSPropertyOfElements): Added.
(TEST.CSSViewportUnits.AllSame):
(TEST.CSSViewportUnits.MinimumViewportInsetWithWritingMode):
(TEST.CSSViewportUnits.MaximumViewportInsetWithWritingMode):
(TEST.CSSViewportUnits.EmptyUnobscuredSizeOverrides):
(TEST.CSSViewportUnits.SameUnobscuredSizeOverrides):
(TEST.CSSViewportUnits.DifferentUnobscuredSizeOverrides):
(TEST.CSSViewportUnits.SVGDocument):

link: https://commits.webkit.org/250835@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294609 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 hours agoTrying out my git setup: Update my personal info in contributors.json
ggaren@apple.com [Sat, 21 May 2022 04:21:15 +0000 (04:21 +0000)]
Trying out my git setup: Update my personal info in contributors.json
https://bugs.webkit.org/show_bug.cgi?id=240745

Reviewed by Beth Dakin.

* metadata/contributors.json: Added some news skills I've acquired.

link: https://commits.webkit.org/250834@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294608 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 hours agoConvert ExpansionBehavior to a struct of left/right expansion behaviors
commit-queue@webkit.org [Sat, 21 May 2022 02:33:42 +0000 (02:33 +0000)]
Convert ExpansionBehavior to a struct of left/right expansion behaviors
https://bugs.webkit.org/show_bug.cgi?id=240554

Patch by Kiet Ho <tho22@apple.com> on 2022-05-20
Reviewed by Myles C. Maxfield.

* Tools/TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp:
(TestWebKitAPI::TEST_F):
* Source/WebKit/WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
(WebKit::WebPopupMenu::setUpPlatformData):

No new tests, no functional changes made.

* Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::measureText):
(WebCore::CanvasRenderingContext2D::drawTextInternal):
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::drawText):
(WebCore::CanvasRenderingContext2DBase::measureTextInternal):
* Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp:
(WebCore::Layout::Line::applyRunExpansion):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h:
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::fallbackFontsForText):
* Source/WebCore/platform/graphics/ComplexTextController.cpp:
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::expansionOpportunityCountInternal):
* Source/WebCore/platform/graphics/TextRun.h:
(WebCore::TextRun::TextRun):
* Source/WebCore/platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::WidthIterator):
(WebCore::WidthIterator::calculateAdditionalWidth const):
* Source/WebCore/platform/text/TextFlags.h:
(WebCore::ExpansionBehavior::ExpansionBehavior):
(WebCore::ExpansionBehavior::allowLeftOnly):
(WebCore::ExpansionBehavior::forceLeftOnly):
(WebCore::ExpansionBehavior::allowRightOnly):
* Source/WebCore/platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::paint):
* Source/WebCore/rendering/LegacyEllipsisBox.cpp:
(WebCore::LegacyEllipsisBox::paint):
(WebCore::LegacyEllipsisBox::selectionRect const):
(WebCore::LegacyEllipsisBox::paintSelection):
* Source/WebCore/rendering/LegacyInlineTextBox.cpp:
(WebCore::LegacyInlineTextBox::expansionBehavior const):
* Source/WebCore/rendering/LegacyLineLayout.cpp:
(WebCore::expansionBehaviorForInlineTextBox):
(WebCore::applyExpansionBehavior):
* Source/WebCore/rendering/RenderBlock.h:
* Source/WebCore/rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::paintObject):
(WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths const):
* Source/WebCore/rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
* Source/WebCore/rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
(WebCore::RenderListBox::paintItemForeground):
* Source/WebCore/rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::getAverageCharWidth):
* Source/WebCore/rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::constructTextRun const):
* Source/WebCore/rendering/svg/SVGTextMetrics.cpp:
(WebCore::SVGTextMetrics::constructTextRun):

link: https://commits.webkit.org/250833@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294607 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 hours agoFix invalid assertion in parseKeywordValue
achristensen@apple.com [Sat, 21 May 2022 02:25:01 +0000 (02:25 +0000)]
Fix invalid assertion in parseKeywordValue
https://bugs.webkit.org/show_bug.cgi?id=240593

Reviewed by Antti Koivisto.

Test: fast/css/parse-non-descriptor.html

* Source/WebCore/css/parser/CSSParserFastPaths.cpp:
This function returns null, which is fine.

link: https://commits.webkit.org/250831@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294606 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 hours agoReduce branching a little under JSNodeOwner::isReachableFromOpaqueRoots()
cdumez@apple.com [Sat, 21 May 2022 02:24:37 +0000 (02:24 +0000)]
Reduce branching a little under JSNodeOwner::isReachableFromOpaqueRoots()
https://bugs.webkit.org/show_bug.cgi?id=240742

Reviewed by Geoffrey Garen.

Given that JSNodeOwner::isReachableFromOpaqueRoots() already checks if the Node is
connected or not, make sure to avoid the same check under Node::opaqueRoot().

* Source/WebCore/bindings/js/JSNodeCustom.cpp:
(WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
* Source/WebCore/dom/Node.cpp:
(WebCore::Node::traverseToOpaqueRoot const):
(WebCore::Node::opaqueRootSlow const): Deleted.
* Source/WebCore/dom/Node.h:
(WebCore::Node::opaqueRoot const):

link: https://commits.webkit.org/250831@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294605 268f45cc-cd09-0410-ab3c-d52691b4dbfc

15 hours ago[Gardening]: [ iOS ] fast/events/ios/rotation/layout-viewport-during-safari-type...
Jenner@apple.com [Sat, 21 May 2022 01:23:37 +0000 (01:23 +0000)]
[Gardening]: [ iOS ] fast/events/ios/rotation/layout-viewport-during-safari-type-rotation.html is a constant text failure
https://bugs.webkit.org/show_bug.cgi?id=231266

Unreviewed test gardening.

* LayoutTests/platform/ios/fast/events/ios/rotation/layout-viewport-during-safari-type-rotation-expected.txt: Renamed from LayoutTests/platform/ios-wk2/fast/events/ios/rotation/layout-viewport-during-safari-type-rotation-expected.txt.

link: https://commits.webkit.org/250830@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294604 268f45cc-cd09-0410-ab3c-d52691b4dbfc

15 hours ago[ Gardening ]: [ BigSur+ Debug wk2 EWS ] imported/w3c/web-platform-tests/html/webappa...
Jenner@apple.com [Sat, 21 May 2022 01:06:56 +0000 (01:06 +0000)]
[ Gardening ]: [ BigSur+ Debug wk2 EWS ] imported/w3c/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/quirks.window.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=237165

Unreviewed test gardening. Removal of no longer needed expectation.

* LayoutTests/platform/mac-wk2/TestExpectations:

link: https://commits.webkit.org/250829@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294603 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 hours agoTrying git workflow: updating personal info in contributors.json
bdakin@apple.com [Sat, 21 May 2022 00:35:13 +0000 (00:35 +0000)]
Trying git workflow: updating personal info in contributors.json
https://bugs.webkit.org/show_bug.cgi?id=240747

Reviewed by Wenson Hsieh.

Adding more recent areas of expertise.

* metadata/contributors.json:

link: https://commits.webkit.org/250828@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294600 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 hours ago[WebGPU] Integrate Metal-cpp
mmaxfield@apple.com [Sat, 21 May 2022 00:23:34 +0000 (00:23 +0000)]
[WebGPU] Integrate Metal-cpp
https://bugs.webkit.org/show_bug.cgi?id=240746
<rdar://problem/89344870>

Reviewed by Dean Jackson.

Metal-cpp is a low-overhead C++ interface for Metal.
https://developer.apple.com/metal/cpp/

Metal-cpp isn't a library per-se, but is instead just a collection of files which users
are supposed to just copy into their project. This does just that, and hooks up all the
necessary flags and paths and everything.

This uses the "single header alternative" described on that webpage, and creates the
single file as a build step.

Metal-cpp files should not be style-checked.

* Source/WebGPU/Configurations/WebGPU.xcconfig:
* Source/WebGPU/WebGPU.xcodeproj/project.pbxproj:
* Source/WebGPU/WebGPU/Metal.cpp: Added.
* Source/WebGPU/WebGPU/config.h:
* Source/WebGPU/WebGPU/metal-cpp/Foundation/Foundation.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Foundation/NSArray.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Foundation/NSAutoreleasePool.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Foundation/NSBundle.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Foundation/NSData.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Foundation/NSDate.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Foundation/NSDefines.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Foundation/NSDictionary.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Foundation/NSEnumerator.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Foundation/NSError.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Foundation/NSLock.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Foundation/NSNotification.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Foundation/NSNumber.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Foundation/NSObjCRuntime.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Foundation/NSObject.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Foundation/NSPrivate.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Foundation/NSProcessInfo.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Foundation/NSRange.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Foundation/NSString.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Foundation/NSTypes.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Foundation/NSURL.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/LICENSE.txt: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLAccelerationStructure.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLAccelerationStructureCommandEncoder.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLAccelerationStructureTypes.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLArgument.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLArgumentEncoder.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLBinaryArchive.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLBlitCommandEncoder.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLBlitPass.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLBuffer.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLCaptureManager.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLCaptureScope.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLCommandBuffer.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLCommandEncoder.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLCommandQueue.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLComputeCommandEncoder.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLComputePass.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLComputePipeline.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLCounters.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLDefines.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLDepthStencil.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLDevice.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLDrawable.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLDynamicLibrary.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLEvent.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLFence.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLFunctionConstantValues.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLFunctionDescriptor.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLFunctionHandle.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLFunctionLog.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLFunctionStitching.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLHeaderBridge.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLHeap.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLIndirectCommandBuffer.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLIndirectCommandEncoder.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLIntersectionFunctionTable.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLLibrary.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLLinkedFunctions.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLParallelRenderCommandEncoder.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLPipeline.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLPixelFormat.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLPrivate.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLRasterizationRate.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLRenderCommandEncoder.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLRenderPass.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLRenderPipeline.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLResource.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLResourceStateCommandEncoder.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLResourceStatePass.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLSampler.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLStageInputOutputDescriptor.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLTexture.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLTypes.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLVertexDescriptor.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/MTLVisibleFunctionTable.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/Metal/Metal.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/QuartzCore/CADefines.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/QuartzCore/CAMetalDrawable.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/QuartzCore/CAPrivate.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/QuartzCore/QuartzCore.hpp: Added.
* Source/WebGPU/WebGPU/metal-cpp/README.md: Added.
* Source/WebGPU/WebGPU/metal-cpp/SingleHeader/MakeSingleHeader.py: Added.
(HeaderPrefix):
(HeaderPrefix.__init__):
(HeaderPrefix.__str__):
(HeaderPrefix.__get_commit_hash):
(HeaderPrefix.__get_commit_string):
(HeaderPrefix.__get_date_string):
(__meta_data_string):
(SingleHeader):
(SingleHeader.__init__):
(SingleHeader.__str__):
(SingleHeader.append):
(SingleHeader.process):
(SingleHeader.__read_header):
(SingleHeader.__strip_pragma_once):
(SingleHeader.__strip_comments):
(SingleHeader.__strip_empty_lines):
(SingleHeader.__substitute_include_directive):
(SingleHeader.__process_include_directives):
(SingleHeader.__process_foundation_directives):
(SingleHeader.__process_header):
(create_argument_parser):
(parse_arguments):
(make_header):
(make_dir):
(write_header):
* Tools/Scripts/webkitpy/style/checker.py:

link: https://commits.webkit.org/250827@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294599 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 hours agoReduce array length for memory limited scenarios in regexp-bol-optimize-out-of-stack.js
commit-queue@webkit.org [Sat, 21 May 2022 00:10:35 +0000 (00:10 +0000)]
Reduce array length for memory limited scenarios in regexp-bol-optimize-out-of-stack.js
https://bugs.webkit.org/show_bug.cgi?id=240717

Patch by Xan López <xan@igalia.com> on 2022-05-20
Reviewed by Yusuke Suzuki.

* stress/regexp-bol-optimize-out-of-stack.js: use a smaller array size when memory is limited.
(test):

link: https://commits.webkit.org/250826@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294595 268f45cc-cd09-0410-ab3c-d52691b4dbfc

17 hours agoUnreviewed, reverting r294371.
commit-queue@webkit.org [Sat, 21 May 2022 00:02:11 +0000 (00:02 +0000)]
Unreviewed, reverting r294371.
https://bugs.webkit.org/show_bug.cgi?id=240740

Introduced page load regression

Reverted changeset:

"Private relay should fail closed for third party loads if the main resource was loaded over private relay"
https://bugs.webkit.org/show_bug.cgi?id=240483
https://commits.webkit.org/r294371

link: https://commits.webkit.org/250825@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294592 268f45cc-cd09-0410-ab3c-d52691b4dbfc

17 hours agoRemove unused WebPage::InteractionRegions IPC
timothy_horton@apple.com [Fri, 20 May 2022 23:42:42 +0000 (23:42 +0000)]
Remove unused WebPage::InteractionRegions IPC
https://bugs.webkit.org/show_bug.cgi?id=240725

Reviewed by Wenson Hsieh.

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::interactionRegions): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::interactionRegions): Deleted.
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:

link: https://commits.webkit.org/250824@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294591 268f45cc-cd09-0410-ab3c-d52691b4dbfc

17 hours agoWeb Inspector: only override request headers if they are provided
drousso@apple.com [Fri, 20 May 2022 23:40:02 +0000 (23:40 +0000)]
Web Inspector: only override request headers if they are provided
https://bugs.webkit.org/show_bug.cgi?id=240734

Reviewed by Patrick Angle.

* Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.async requestIntercepted):
(WI.NetworkManager.prototype.async responseIntercepted):

* LayoutTests/http/tests/inspector/network/intercept-request-properties.html:
* LayoutTests/http/tests/inspector/network/intercept-request-properties-expected.txt:
* LayoutTests/http/tests/inspector/network/local-resource-override-basic.html:
* LayoutTests/http/tests/inspector/network/local-resource-override-basic-expected.txt:

link: https://commits.webkit.org/250823@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294590 268f45cc-cd09-0410-ab3c-d52691b4dbfc

17 hours ago[MacCatalyst] REGRESSION(r290091): sometimes can hang if `WKWebView` is unparented...
drousso@apple.com [Fri, 20 May 2022 23:09:44 +0000 (23:09 +0000)]
[MacCatalyst] REGRESSION(r290091): sometimes can hang if `WKWebView` is unparented before the next visible content rect update
https://bugs.webkit.org/show_bug.cgi?id=240691
<rdar://problem/92006847>

Reviewed by Wenson Hsieh.

Test: WKWebViewResize.RemovesAssertionsAfterMovingToWindow

* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _processWillSwapOrDidExit]):
(-[WKWebView didMoveToWindow]):
(-[WKWebView _acquireResizeAssertionForReason:]):
Drive-by: WebProcess crashes should also clear the resize assertions.
Drive-by: Add a 1s timeout in case the next visible content rect update takes too long.
* Source/WebKit/UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
* Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm:
(-[WKWebView _hasResizeAssertion]): Added.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewResize.mm:
(TEST.WKWebViewResize.RemovesAssertionsAfterMovingToWindow): Added.

link: https://commits.webkit.org/250822@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294589 268f45cc-cd09-0410-ab3c-d52691b4dbfc

18 hours agoWeb Inspector: Sources Tab: adding a new header to a request local override doesn...
drousso@apple.com [Fri, 20 May 2022 22:53:33 +0000 (22:53 +0000)]
Web Inspector: Sources Tab: adding a new header to a request local override doesn't show it
https://bugs.webkit.org/show_bug.cgi?id=240733

Reviewed by Patrick Angle.

* Source/WebInspectorUI/UserInterface/Views/LocalResourceOverridePopover.js:
(WI.LocalResourceOverridePopover.prototype.show):

link: https://commits.webkit.org/250821@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294588 268f45cc-cd09-0410-ab3c-d52691b4dbfc

18 hours agoClean up some fast/text layout tests
simon.fraser@apple.com [Fri, 20 May 2022 22:37:00 +0000 (22:37 +0000)]
Clean up some fast/text layout tests
https://bugs.webkit.org/show_bug.cgi?id=240738

Reviewed by Myles C. Maxfield.

Move Ahem-COLR.ttf from fast/text/canvas-color-fonts/resources to fast/text/resources
so a future non-canvas test can use it.

Create a fast/text/glyph-display-lists directory to host more future glyph
display list tests.

Remove platform/ios/fast/text/softHyphen-expected.txt because the test is a ref test.

* LayoutTests/TestExpectations:
* LayoutTests/fast/text/canvas-color-fonts/COLR-expected.html:
* LayoutTests/fast/text/canvas-color-fonts/COLR.html:
* LayoutTests/fast/text/canvas-color-fonts/ctm-COLR-expected.html:
* LayoutTests/fast/text/canvas-color-fonts/ctm-COLR.html:
* LayoutTests/fast/text/canvas-color-fonts/fill-color-COLR-expected.html:
* LayoutTests/fast/text/canvas-color-fonts/fill-color-COLR.html:
* LayoutTests/fast/text/canvas-color-fonts/fill-color-shadow-COLR.html:
* LayoutTests/fast/text/canvas-color-fonts/fill-color-shadow-ctm-COLR.html:
* LayoutTests/fast/text/canvas-color-fonts/fill-gradient-COLR-2.html:
* LayoutTests/fast/text/canvas-color-fonts/fill-gradient-COLR.html:
* LayoutTests/fast/text/canvas-color-fonts/linedash-COLR-expected-mismatch.html:
* LayoutTests/fast/text/canvas-color-fonts/linedash-COLR.html:
* LayoutTests/fast/text/canvas-color-fonts/linedash-outlines-expected-mismatch.html:
* LayoutTests/fast/text/canvas-color-fonts/linedash-outlines.html:
* LayoutTests/fast/text/canvas-color-fonts/stroke-color-COLR-expected.html:
* LayoutTests/fast/text/canvas-color-fonts/stroke-color-COLR.html:
* LayoutTests/fast/text/canvas-color-fonts/stroke-color-shadow-COLR.html:
* LayoutTests/fast/text/canvas-color-fonts/stroke-color-shadow-ctm-COLR.html:
* LayoutTests/fast/text/canvas-color-fonts/stroke-gradient-COLR-2.html:
* LayoutTests/fast/text/canvas-color-fonts/stroke-gradient-COLR-3.html:
* LayoutTests/fast/text/canvas-color-fonts/stroke-gradient-COLR-4.html:
* LayoutTests/fast/text/canvas-color-fonts/stroke-gradient-COLR-5.html:
* LayoutTests/fast/text/canvas-color-fonts/stroke-gradient-COLR.html:
* LayoutTests/fast/text/glyph-display-lists/glyph-display-list-color-expected.txt: Renamed from LayoutTests/fast/text/glyph-display-list-color-expected.txt.
* LayoutTests/fast/text/glyph-display-lists/glyph-display-list-color.html: Renamed from LayoutTests/fast/text/glyph-display-list-color.html.
* LayoutTests/fast/text/resources/Ahem-COLR.ttf: Renamed from LayoutTests/fast/text/canvas-color-fonts/resources/Ahem-COLR.ttf.
* LayoutTests/platform/ios/fast/text/softHyphen-expected.txt: Removed.

link: https://commits.webkit.org/250820@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294587 268f45cc-cd09-0410-ab3c-d52691b4dbfc

19 hours ago[Merge-Queue] Validate reviewers in commit message
jbedard@apple.com [Fri, 20 May 2022 21:42:03 +0000 (21:42 +0000)]
[Merge-Queue] Validate reviewers in commit message
https://bugs.webkit.org/show_bug.cgi?id=240718
<rdar://problem/93665771>

Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/steps.py:
(ValidateCommitMessage):
(ValidateCommitMessage.__init__):
(ValidateCommitMessage.extract_reviewers): Extract reviewers from commit message.
(ValidateCommitMessage.is_reviewer): Check if a contributor is a reviewer.
(ValidateCommitMessage.run): Check if extracted reviewers are reviewers.
* Tools/CISupport/ews-build/steps_unittest.py:

link: https://commits.webkit.org/250818@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294582 268f45cc-cd09-0410-ab3c-d52691b4dbfc

19 hours agoUnreviewed. [WPE] Bump version numbers
aperez@igalia.com [Fri, 20 May 2022 21:41:14 +0000 (21:41 +0000)]
Unreviewed. [WPE] Bump version numbers

* Source/cmake/OptionsWPE.cmake: Update version numbers for the next
  release series.

link: https://commits.webkit.org/250818@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294581 268f45cc-cd09-0410-ab3c-d52691b4dbfc

19 hours ago[Gardening]: REGRESSION (r294536): [ macOS Release wk2 ] Twelve webgl/2.0.0/conforman...
rackler@apple.com [Fri, 20 May 2022 21:33:55 +0000 (21:33 +0000)]
[Gardening]: REGRESSION (r294536): [ macOS Release wk2 ] Twelve webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex are a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=240735
<rdar://93678287>

Unreviewed test gardening.

* LayoutTests/platform/mac-wk2/TestExpectations:

link: https://commits.webkit.org/250817@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294580 268f45cc-cd09-0410-ab3c-d52691b4dbfc

19 hours ago[web-animations] provide a dedicated flag for KeyframeEffect.iterationComposite
commit-queue@webkit.org [Fri, 20 May 2022 21:21:54 +0000 (21:21 +0000)]
[web-animations] provide a dedicated flag for KeyframeEffect.iterationComposite
https://bugs.webkit.org/show_bug.cgi?id=240727

Patch by Antoine Quint <graouts@apple.com> on 2022-05-20
Reviewed by Dean Jackson.

Add a dedicated flag for the `KeyframeEffect.iterationComposite` property as
that property did not make it to Web Animations 1.0 and should not be enabled
together with `KeyframeEffect.composite`.

* Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml:

* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::create):
* Source/WebCore/animation/KeyframeEffect.idl:

link: https://commits.webkit.org/250816@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294579 268f45cc-cd09-0410-ab3c-d52691b4dbfc

19 hours agoRemove redundant text-indent tests already covered by WPT
commit-queue@webkit.org [Fri, 20 May 2022 21:13:28 +0000 (21:13 +0000)]
Remove redundant text-indent tests already covered by WPT
https://bugs.webkit.org/show_bug.cgi?id=240730

Patch by Kiet Ho <tho22@apple.com> on 2022-05-20
Reviewed by Simon Fraser.

getComputedStyle-text-indent.html is covered by the following WPT tests:
  * LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/text-indent-computed.html
  * LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/text-indent-invalid.html
  * LayoutTests/imported/w3c/web-platform-tests/css/css-text/parsing/text-indent-valid.html

getComputedStyle-text-indent-inherited.html is covered by the WPT test
LayoutTests/imported/w3c/web-platform-tests/css/css-text/inheritance.html

They are also obsolete, since they still use the prefixed keywords '-webkit-each-line' and
'-webkit-hanging', while WebKit has supported the non-prefixed keywords since
https://bugs.webkit.org/show_bug.cgi?id=223851. They were also marked as skipped since a long
time ago. Therefore there's no reason not to remove them.

* LayoutTests/TestExpectations:
* LayoutTests/fast/css3-text/css3-text-indent/getComputedStyle/getComputedStyle-text-indent-expected.txt: Removed.
* LayoutTests/fast/css3-text/css3-text-indent/getComputedStyle/getComputedStyle-text-indent-inherited-expected.txt: Removed.
* LayoutTests/fast/css3-text/css3-text-indent/getComputedStyle/getComputedStyle-text-indent-inherited.html: Removed.
* LayoutTests/fast/css3-text/css3-text-indent/getComputedStyle/getComputedStyle-text-indent.html: Removed.

link: https://commits.webkit.org/250815@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294578 268f45cc-cd09-0410-ab3c-d52691b4dbfc

20 hours ago[Modern Media Controls] macCatalyst should not use touch events
drousso@apple.com [Fri, 20 May 2022 20:49:54 +0000 (20:49 +0000)]
[Modern Media Controls] macCatalyst should not use touch events
https://bugs.webkit.org/show_bug.cgi?id=240704
<rdar://problem/84570717>

Reviewed by Eric Carlson.

* Source/WebCore/Modules/modern-media-controls/controls/layout-traits.js:
(LayoutTraits.prototype.supportsTouches): Added.
* Source/WebCore/Modules/modern-media-controls/controls/macos-layout-traits.js:
(MacOSLayoutTraits.prototype.supportsTouches): Added.
Allow `LayoutTraits` to indicate whether touches are supported.

* Source/WebCore/Modules/modern-media-controls/controls/auto-hide-controller.js:
(AutoHideController):
* Source/WebCore/Modules/modern-media-controls/controls/button.js:
(Button):
* Source/WebCore/Modules/modern-media-controls/controls/range-button.js:
(RangeButton):
* Source/WebCore/Modules/modern-media-controls/controls/slider.js:
(Slider.prototype._interactionEndTarget):
* Source/WebCore/Modules/modern-media-controls/media/media-document-controller.js:
(MediaDocumentController):
Use `LayoutTraits.prototype.supportsTouches` instead of `GestureRecognizer.SupportsTouches` so that
macOS (including macCatalyst) can always act as though touches are not supported (which is fine
since mouse events are fully functional on macOS).

* LayoutTests/media/modern-media-controls/button/button-icon-name.html:
* LayoutTests/media/modern-media-controls/button/button.html:
* LayoutTests/media/modern-media-controls/buttons-container/buttons-container-buttons-property.html:
* LayoutTests/media/modern-media-controls/buttons-container/buttons-container-constructor.html:
* LayoutTests/media/modern-media-controls/buttons-container/buttons-container-layout.html:
Add `layoutDelegate`/`layoutTraits` where needed.

link: https://commits.webkit.org/250814@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294573 268f45cc-cd09-0410-ab3c-d52691b4dbfc

20 hours agoChange display list item logging to respect logging options
simon.fraser@apple.com [Fri, 20 May 2022 20:43:30 +0000 (20:43 +0000)]
Change display list item logging to respect logging options
https://bugs.webkit.org/show_bug.cgi?id=240527

Reviewed by Myles Maxfield.

Split off from the patch in bug 240422.

We need to log display list items through a function that can take the flags
argument to avoid logging unstable resource identifiers in layout tests, so
implement dumpItem() for each item type, and respect the IncludesResourceIdentifiers
flag.

* platform/graphics/displaylists/DisplayList.cpp:
(WebCore::DisplayList::DisplayList::asText const):
(WebCore::DisplayList::DisplayList::dump const):
* platform/graphics/displaylists/DisplayList.h:
* platform/graphics/displaylists/DisplayListItemType.h:
* platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::dumpItem):
(WebCore::DisplayList::dumpItemHandle):
* platform/graphics/displaylists/DisplayListItems.h:
(WebCore::DisplayList::operator<<):

link: https://commits.webkit.org/250813@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294572 268f45cc-cd09-0410-ab3c-d52691b4dbfc

20 hours agoPROGRESSION (r294272): Correction to guard in Platform file caused multiple tests...
rackler@apple.com [Fri, 20 May 2022 20:21:02 +0000 (20:21 +0000)]
PROGRESSION (r294272): Correction to guard in Platform file caused multiple tests failures
https://bugs.webkit.org/show_bug.cgi?id=240579
<rdar://93504716>

Unreviewed test gardening.

* LayoutTests/platform/ios/TestExpectations:

link: https://commits.webkit.org/250812@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294571 268f45cc-cd09-0410-ab3c-d52691b4dbfc

20 hours agotest262-runner should have basic Windows compatibility
ross.kirsling@sony.com [Fri, 20 May 2022 20:08:02 +0000 (20:08 +0000)]
test262-runner should have basic Windows compatibility
https://bugs.webkit.org/show_bug.cgi?id=240698

Reviewed by Mark Lam.

test262-runner currently has a slew of incompabilities on Windows;
this patch rectifies enough of them to achieve basic usability.

In particular:
- When `use` of a module triggers a fork() call, a crash occurs on Windows. Avoid by calling Runner::main() from outside.
- This is a WebKit-specific file; use webkitdirs.pm without hesitation and determine jsc binary path using jscPath().
- Don't use `DYLD_FRAMEWORK_PATH=` prefix on Windows.
- Remove erroneous quotes from system call.
- Use File::Copy::copy instead of cp.
- abs_path() of a not-yet-created file is invalid on Windows. But it's also completely unnecessary, as $resultsDir is absolute.
- Manually flush progress meter on Windows (since \r without \n will never be flushed automatically).

Remaining limitation:
- If --child-processes value is too high, the runner will hang. Workaround is to provide a lower number.

* Tools/Scripts/test262-runner:
* Tools/Scripts/test262/Runner.pm:
(processCLI):
(main):
(getBuildPath):
(runTest):
(summarizeResults):
(printHTMLResults):

link: https://commits.webkit.org/250811@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294568 268f45cc-cd09-0410-ab3c-d52691b4dbfc

21 hours agoAX: Update the isolated tree when aria-selected changes
tyler_w@apple.com [Fri, 20 May 2022 19:34:21 +0000 (19:34 +0000)]
AX: Update the isolated tree when aria-selected changes
https://bugs.webkit.org/show_bug.cgi?id=240703

Reviewed by Chris Fleizach.

Fixes accessibility/selected-state-changed-notifications.html in
isolated tree mode.

* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::updateIsolatedTree):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::updateNodeProperty):
* LayoutTests/accessibility/selected-state-changed-notifications.html:

link: https://commits.webkit.org/250810@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294565 268f45cc-cd09-0410-ab3c-d52691b4dbfc

22 hours ago[ iOS ] accessibility/aria-modal-with-text-crash.html is a consistent failure
rackler@apple.com [Fri, 20 May 2022 19:01:16 +0000 (19:01 +0000)]
[ iOS ] accessibility/aria-modal-with-text-crash.html is a consistent failure
https://bugs.webkit.org/show_bug.cgi?id=240722
<rdar://93669155>

Unreviewed test gardening.

* LayoutTests/platform/ios/TestExpectations:

link: https://commits.webkit.org/250809@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294564 268f45cc-cd09-0410-ab3c-d52691b4dbfc

22 hours agoRefine B3ReduceStrength's range for sign extension operations.
mark.lam@apple.com [Fri, 20 May 2022 18:33:04 +0000 (18:33 +0000)]
Refine B3ReduceStrength's range for sign extension operations.
https://bugs.webkit.org/show_bug.cgi?id=240720
<rdar://problem/93536782>

Reviewed by Yusuke Suzuki and Keith Miller.

* Source/JavaScriptCore/b3/B3ReduceStrength.cpp:

link: https://commits.webkit.org/250808@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294563 268f45cc-cd09-0410-ab3c-d52691b4dbfc

22 hours agoClear SessionStorage of a page when the page is destroyed
sihui_liu@apple.com [Fri, 20 May 2022 18:18:51 +0000 (18:18 +0000)]
Clear SessionStorage of a page when the page is destroyed
https://bugs.webkit.org/show_bug.cgi?id=240683

Reviewed by Chris Dumez.

We should not keep SessionStorage items in memory when they will not be accessed any more.

* Source/WebKit/NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::removeWebPageNetworkParameters):
* Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp:
(WebKit::NetworkStorageManager::clearStorageForWebPage):
* Source/WebKit/NetworkProcess/storage/NetworkStorageManager.h:
* Source/WebKit/NetworkProcess/storage/SessionStorageManager.cpp:
(WebKit::SessionStorageManager::removeNamespace):
* Source/WebKit/NetworkProcess/storage/SessionStorageManager.h:

link: https://commits.webkit.org/250807@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294562 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 hours agoMake accessibility/mac/aria-modal-auto-focus.html async so it can pass in isolated...
tyler_w@apple.com [Fri, 20 May 2022 17:33:20 +0000 (17:33 +0000)]
Make accessibility/mac/aria-modal-auto-focus.html async so it can pass in isolated tree mode
https://bugs.webkit.org/show_bug.cgi?id=240676

Reviewed by Chris Fleizach.

* LayoutTests/accessibility/mac/aria-modal-auto-focus-expected.txt:
* LayoutTests/accessibility/mac/aria-modal-auto-focus.html:

link: https://commits.webkit.org/250806@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294559 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 hours agoWebAccessibilityObjectWrapperMac::detachIsolatedObject should not unregister the...
tyler_w@apple.com [Fri, 20 May 2022 17:13:32 +0000 (17:13 +0000)]
WebAccessibilityObjectWrapperMac::detachIsolatedObject should not unregister the wrapper for AccessibilityDetachmentType::ElementChanged detachments
https://bugs.webkit.org/show_bug.cgi?id=240628

Reviewed by Chris Fleizach.

Prior to this change, WebAccessibilityObjectWrapperMac::detachIsolatedObject unconditionally
called NSAccessibilityUnregisterUniqueIdForUIElement. This is the wrong
behavior for AccessibilityDetachmentType::ElementChanged detachments, as
this unregistering causes an element destroyed notification to be issued.

This type of detachment happens when we swap the underlying isolated
object for a wrapper as the result of a call to AXIsolatedTree::updateNode.

This unregistering caused VoiceOver focus flickering when modifying
sliders or textboxes, greatly hampering user experience.

No test included because there isn't a great way to test this.

* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper detachIsolatedObject:]):

link: https://commits.webkit.org/250805@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294552 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 hours ago[ REBASELINE ][ iOS ] fast/events/ios/rotation/layout-viewport-during-safari-type...
Jenner@apple.com [Fri, 20 May 2022 17:09:55 +0000 (17:09 +0000)]
[ REBASELINE ][ iOS ] fast/events/ios/rotation/layout-viewport-during-safari-type-rotation.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=231266

Unreviewed test gardening. Correct rebase for iOS.

* LayoutTests/platform/ios-wk2/fast/events/ios/rotation/layout-viewport-during-safari-type-rotation-expected.txt: Renamed from LayoutTests/platform/ios-wk2/fast/events/ios/rotation/layout-viewport-during-rotation-expected.txt.

link: https://commits.webkit.org/250804@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294551 268f45cc-cd09-0410-ab3c-d52691b4dbfc

23 hours agoRevert "Release assert in Document::updateLayout() via HTMLTextAreaElement::childrenC...
rackler@apple.com [Fri, 20 May 2022 17:07:41 +0000 (17:07 +0000)]
Revert "Release assert in Document::updateLayout() via HTMLTextAreaElement::childrenChanged"

This reverts commit 0a91c415adf4e01ff05b2e98934802790e57f276.

Unreviewed revert

link: https://commits.webkit.org/250803@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294550 268f45cc-cd09-0410-ab3c-d52691b4dbfc

24 hours agoAfter commit 039ebd9, some tests run with ITM disabled despite --accessibility-isolat...
tyler_w@apple.com [Fri, 20 May 2022 17:00:34 +0000 (17:00 +0000)]
After commit 039ebd9, some tests run with ITM disabled despite --accessibility-isolated-tree flag being passed
https://bugs.webkit.org/show_bug.cgi?id=240627

Reviewed by Chris Fleizach.

https://github.com/WebKit/WebKit/commit/039ebd9 changed TestController::resetStateToConsistentValues to only send the "Reset" message to the testing InjectedBundle after a test completed, rather than before and after each test. This is a good and logical change, but exposed a bug in how we set InjectedBundle::m_accessibilityIsolatedTree, since we relied on this "Reset" behavior to setup this member variable.

With this patch, we instead set InjectedBundle::m_accessibilityIsolatedTree in response to the "BeginTest" message, which fixes the issue.

* Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* Tools/WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
* Tools/WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::createTestSettingsDictionary):

link: https://commits.webkit.org/250802@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294547 268f45cc-cd09-0410-ab3c-d52691b4dbfc

24 hours ago[Gardening]REGRESSION (r294317): [ iOS ] Thirteen layout tests are flaky or consiste...
rackler@apple.com [Fri, 20 May 2022 16:35:53 +0000 (16:35 +0000)]
[Gardening]REGRESSION  (r294317): [ iOS ] Thirteen layout tests are flaky or consistent timeouts
https://bugs.webkit.org/show_bug.cgi?id=240616
<rdar://93541706>

Unreviewed test gardening.

* LayoutTests/platform/ios/TestExpectations:

link: https://commits.webkit.org/250801@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294546 268f45cc-cd09-0410-ab3c-d52691b4dbfc

25 hours ago[EWS] Remove ChangeLog steps
jbedard@apple.com [Fri, 20 May 2022 15:55:23 +0000 (15:55 +0000)]
[EWS] Remove ChangeLog steps
https://bugs.webkit.org/show_bug.cgi?id=240542
<rdar://problem/93456184>

Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/factories.py:
* Tools/CISupport/ews-build/steps.py:
(ValidateCommitterAndReviewer.start):
(SetBuildSummary.start):
(ValidateChangeLogAndReviewer): Deleted.
(FindModifiedChangeLogs): Deleted.
(CreateLocalGITCommit): Deleted.
* Tools/CISupport/ews-build/steps_unittest.py:

link: https://commits.webkit.org/250800@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294545 268f45cc-cd09-0410-ab3c-d52691b4dbfc

25 hours agoEliminate changelogs
jbedard@apple.com [Fri, 20 May 2022 15:28:50 +0000 (15:28 +0000)]
Eliminate changelogs
https://bugs.webkit.org/show_bug.cgi?id=239125
<rdar://91959187>

Reviewed by Michael Catanzaro and Aakash J.

Let the past die. Kill it, if you have to.

* ChangeLog-2012-05-22: Removed.
* ChangeLog-2018-01-01: Removed.
* JSTests/ChangeLog-2018-09-11: Removed.
* JSTests/ChangeLog-2021-03-18: Removed.
* LayoutTests/ChangeLog-2007-10-14: Removed.
* LayoutTests/ChangeLog-2008-08-10: Removed.
* LayoutTests/ChangeLog-2009-06-16: Removed.
* LayoutTests/ChangeLog-2010-01-29: Removed.
* LayoutTests/ChangeLog-2010-05-24: Removed.
* LayoutTests/ChangeLog-2010-12-06: Removed.
* LayoutTests/ChangeLog-2011-02-16: Removed.
* LayoutTests/ChangeLog-2011-06-04: Removed.
* LayoutTests/ChangeLog-2012-04-23: Removed.
* LayoutTests/ChangeLog-2012-05-22: Removed.
* LayoutTests/ChangeLog-2012-10-02: Removed.
* LayoutTests/ChangeLog-2013-04-24: Removed.
* LayoutTests/ChangeLog-2013-10-13: Removed.
* LayoutTests/ChangeLog-2014-02-20: Removed.
* LayoutTests/ChangeLog-2014-10-07: Removed.
* LayoutTests/ChangeLog-2015-11-21: Removed.
* LayoutTests/ChangeLog-2016-09-26: Removed.
* LayoutTests/ChangeLog-2017-03-23: Removed.
* LayoutTests/ChangeLog-2018-01-01: Removed.
* LayoutTests/ChangeLog-2018-09-11: Removed.
* LayoutTests/ChangeLog-2019-06-05: Removed.
* LayoutTests/ChangeLog-2020-04-10: Removed.
* LayoutTests/ChangeLog-2021-03-18: Removed.
* LayoutTests/ChangeLog-2022-02-22: Removed.
* LayoutTests/imported/w3c/ChangeLog-2016-09-26: Removed.
* LayoutTests/imported/w3c/ChangeLog-2018-01-01: Removed.
* LayoutTests/imported/w3c/ChangeLog-2018-09-11: Removed.
* LayoutTests/imported/w3c/ChangeLog-2020-04-10: Removed.
* LayoutTests/imported/w3c/ChangeLog-2021-03-18: Removed.
* LayoutTests/imported/w3c/ChangeLog-2022-02-22: Removed.
* PerformanceTests/ChangeLog-2018-01-01: Removed.
* Source/JavaScriptCore/ChangeLog-2002-12-03: Removed.
* Source/JavaScriptCore/ChangeLog-2003-10-25: Removed.
* Source/JavaScriptCore/ChangeLog-2007-10-14: Removed.
* Source/JavaScriptCore/ChangeLog-2008-08-10: Removed.
* Source/JavaScriptCore/ChangeLog-2009-06-16: Removed.
* Source/JavaScriptCore/ChangeLog-2010-05-24: Removed.
* Source/JavaScriptCore/ChangeLog-2011-02-16: Removed.
* Source/JavaScriptCore/ChangeLog-2012-05-22: Removed.
* Source/JavaScriptCore/ChangeLog-2012-10-02: Removed.
* Source/JavaScriptCore/ChangeLog-2013-04-24: Removed.
* Source/JavaScriptCore/ChangeLog-2013-10-13: Removed.
* Source/JavaScriptCore/ChangeLog-2014-02-20: Removed.
* Source/JavaScriptCore/ChangeLog-2014-10-07: Removed.
* Source/JavaScriptCore/ChangeLog-2015-11-21: Removed.
* Source/JavaScriptCore/ChangeLog-2016-09-26: Removed.
* Source/JavaScriptCore/ChangeLog-2017-03-23: Removed.
* Source/JavaScriptCore/ChangeLog-2018-01-01: Removed.
* Source/JavaScriptCore/ChangeLog-2018-09-11: Removed.
* Source/JavaScriptCore/ChangeLog-2019-06-05: Removed.
* Source/JavaScriptCore/ChangeLog-2020-04-10: Removed.
* Source/JavaScriptCore/ChangeLog-2021-03-18: Removed.
* Source/JavaScriptCore/ChangeLog-2022-02-22: Removed.
* Source/ThirdParty/ANGLE/ChangeLog-2022-02-22: Removed.
* Source/WTF/ChangeLog-2013-10-13: Removed.
* Source/WTF/ChangeLog-2016-09-26: Removed.
* Source/WTF/ChangeLog-2018-09-11: Removed.
* Source/WTF/ChangeLog-2021-03-18: Removed.
* Source/WebCore/ChangeLog-2002-12-03: Removed.
* Source/WebCore/ChangeLog-2003-10-25: Removed.
* Source/WebCore/ChangeLog-2005-08-23: Removed.
* Source/WebCore/ChangeLog-2005-12-19: Removed.
* Source/WebCore/ChangeLog-2006-05-10: Removed.
* Source/WebCore/ChangeLog-2006-12-31: Removed.
* Source/WebCore/ChangeLog-2007-10-14: Removed.
* Source/WebCore/ChangeLog-2008-08-10: Removed.
* Source/WebCore/ChangeLog-2009-06-16: Removed.
* Source/WebCore/ChangeLog-2010-01-29: Removed.
* Source/WebCore/ChangeLog-2010-05-24: Removed.
* Source/WebCore/ChangeLog-2010-12-06: Removed.
* Source/WebCore/ChangeLog-2011-02-16: Removed.
* Source/WebCore/ChangeLog-2011-06-04: Removed.
* Source/WebCore/ChangeLog-2011-10-19: Removed.
* Source/WebCore/ChangeLog-2012-05-22: Removed.
* Source/WebCore/ChangeLog-2012-10-02: Removed.
* Source/WebCore/ChangeLog-2013-04-24: Removed.
* Source/WebCore/ChangeLog-2013-10-13: Removed.
* Source/WebCore/ChangeLog-2014-02-20: Removed.
* Source/WebCore/ChangeLog-2014-10-07: Removed.
* Source/WebCore/ChangeLog-2015-11-21: Removed.
* Source/WebCore/ChangeLog-2016-09-26: Removed.
* Source/WebCore/ChangeLog-2017-03-23: Removed.
* Source/WebCore/ChangeLog-2018-01-01: Removed.
* Source/WebCore/ChangeLog-2018-09-11: Removed.
* Source/WebCore/ChangeLog-2019-06-05: Removed.
* Source/WebCore/ChangeLog-2020-04-10: Removed.
* Source/WebCore/ChangeLog-2021-03-18: Removed.
* Source/WebCore/ChangeLog-2022-02-22: Removed.
* Source/WebInspectorUI/ChangeLog-2013-06-11: Removed.
* Source/WebInspectorUI/ChangeLog-2014-11-19: Removed.
* Source/WebInspectorUI/ChangeLog-2015-11-21: Removed.
* Source/WebInspectorUI/ChangeLog-2016-09-26: Removed.
* Source/WebInspectorUI/ChangeLog-2018-01-01: Removed.
* Source/WebInspectorUI/ChangeLog-2019-06-05: Removed.
* Source/WebInspectorUI/ChangeLog-2021-03-18: Removed.
* Source/WebKit/ChangeLog-2011-02-16: Removed.
* Source/WebKit/ChangeLog-2011-06-04: Removed.
* Source/WebKit/ChangeLog-2012-05-22: Removed.
* Source/WebKit/ChangeLog-2012-10-02: Removed.
* Source/WebKit/ChangeLog-2013-04-24: Removed.
* Source/WebKit/ChangeLog-2013-10-13: Removed.
* Source/WebKit/ChangeLog-2014-02-20: Removed.
* Source/WebKit/ChangeLog-2014-10-07: Removed.
* Source/WebKit/ChangeLog-2015-11-21: Removed.
* Source/WebKit/ChangeLog-2016-09-26: Removed.
* Source/WebKit/ChangeLog-2017-03-23: Removed.
* Source/WebKit/ChangeLog-2018-01-01: Removed.
* Source/WebKit/ChangeLog-2018-09-11: Removed.
* Source/WebKit/ChangeLog-2019-06-05: Removed.
* Source/WebKit/ChangeLog-2020-04-10: Removed.
* Source/WebKit/ChangeLog-2021-03-18: Removed.
* Source/WebKit/ChangeLog-2022-02-22: Removed.
* Source/WebKitLegacy/mac/ChangeLog-2002-12-03: Removed.
* Source/WebKitLegacy/mac/ChangeLog-2006-02-09: Removed.
* Source/WebKitLegacy/mac/ChangeLog-2007-10-14: Removed.
* Source/WebKitLegacy/mac/ChangeLog-2010-01-29: Removed.
* Source/WebKitLegacy/mac/ChangeLog-2012-10-02: Removed.
* Source/WebKitLegacy/mac/ChangeLog-2015-11-21: Removed.
* Source/WebKitLegacy/mac/ChangeLog-2019-06-05: Removed.
* Source/WebKitLegacy/win/ChangeLog-2009-06-16: Removed.
* Source/WebKitLegacy/win/ChangeLog-2015-11-21: Removed.
* Source/bmalloc/ChangeLog-2022-02-22: Removed.
* Tools/ChangeLog-2009-06-16: Removed.
* Tools/ChangeLog-2010-05-24: Removed.
* Tools/ChangeLog-2011-02-16: Removed.
* Tools/ChangeLog-2012-05-22: Removed.
* Tools/ChangeLog-2012-10-02: Removed.
* Tools/ChangeLog-2013-04-24: Removed.
* Tools/ChangeLog-2014-02-20: Removed.
* Tools/ChangeLog-2015-11-21: Removed.
* Tools/ChangeLog-2017-03-23: Removed.
* Tools/ChangeLog-2018-01-01: Removed.
* Tools/ChangeLog-2018-09-11: Removed.
* Tools/ChangeLog-2019-06-05: Removed.
* Tools/ChangeLog-2020-04-10: Removed.
* Tools/ChangeLog-2021-03-18: Removed.
* Tools/ChangeLog-2022-02-22: Removed.
* Websites/perf.webkit.org/ChangeLog-2018-01-01: Removed.

link: https://commits.webkit.org/250799@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294544 268f45cc-cd09-0410-ab3c-d52691b4dbfc

26 hours ago[GLib] Fix typo in WebKitUserMediaPermissionRequest description
commit-queue@webkit.org [Fri, 20 May 2022 15:00:41 +0000 (15:00 +0000)]
[GLib] Fix typo in WebKitUserMediaPermissionRequest description
https://bugs.webkit.org/show_bug.cgi?id=240708

Patch by Olivier Blin <olivier.blin@softathome.com> on 2022-05-20
Reviewed by Adrian Perez de Castro.

Mention enumerateDevices instead of enumeraceDevices.
Introduced in r237031.

* Source/WebKit/UIProcess/API/glib/WebKitDeviceInfoPermissionRequest.cpp:

link: https://commits.webkit.org/250798@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294543 268f45cc-cd09-0410-ab3c-d52691b4dbfc

28 hours agocheck-webkit-style: more strict upper case enum exceptions
yurys@chromium.org [Fri, 20 May 2022 12:58:07 +0000 (12:58 +0000)]
check-webkit-style: more strict upper case enum exceptions
https://bugs.webkit.org/show_bug.cgi?id=240681

Reviewed by Darin Adler.

Added a new list of common abbreviations which are allowed to be
used as all uppercase enum values.

* Tools/Scripts/webkitpy/style/checkers/cpp.py:
(_EnumState.process_clean_line):
(_EnumState.process_clean_line.is_case_error): Extracted common
logic for inline and multiline enum declarations.
(_EnumState):
* Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py:
(NoNonVirtualDestructorsTest):

link: https://commits.webkit.org/250797@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294542 268f45cc-cd09-0410-ab3c-d52691b4dbfc

29 hours agoREGRESSION(r294504) [WPE] Fix build after PDF.js changes
commit-queue@webkit.org [Fri, 20 May 2022 12:02:01 +0000 (12:02 +0000)]
REGRESSION(r294504) [WPE] Fix build after PDF.js changes
https://bugs.webkit.org/show_bug.cgi?id=240711

Patch by Olivier Blin <olivier.blin@softathome.com> on 2022-05-20
Reviewed by Adrian Perez de Castro.

* Source/WebKit/PlatformWPE.cmake: do not use GTK-specific variables.

link: https://commits.webkit.org/250796@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294541 268f45cc-cd09-0410-ab3c-d52691b4dbfc

31 hours ago[GStreamer] Block legacy VAAPI plugin
commit-queue@webkit.org [Fri, 20 May 2022 09:25:46 +0000 (09:25 +0000)]
[GStreamer] Block legacy VAAPI plugin
https://bugs.webkit.org/show_bug.cgi?id=240664

Patch by Philippe Normand <philn@igalia.com> on 2022-05-20
Reviewed by Xabier Rodriguez-Calvar.

The VAAPI plugin is not much maintained anymore and prone to rendering issues. In the
mid-term we will leverage the new stateless VA decoders. Disable the legacy plugin,
unless the WEBKIT_GST_ENABLE_LEGACY_VAAPI environment variable is set to 1.

* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::registerWebKitGStreamerElements):

link: https://commits.webkit.org/250795@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294540 268f45cc-cd09-0410-ab3c-d52691b4dbfc

31 hours ago[Win] Destroy Thread::ClientData only when thread TLS is initialized
ysuzuki@apple.com [Fri, 20 May 2022 09:16:59 +0000 (09:16 +0000)]
[Win] Destroy Thread::ClientData only when thread TLS is initialized
https://bugs.webkit.org/show_bug.cgi?id=240707

Reviewed by Mark Lam.

Move destruction under if (thread) check.

* Source/WTF/wtf/win/ThreadingWin.cpp:
(WTF::Thread::ThreadHolder::~ThreadHolder):

link: https://commits.webkit.org/250793@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294539 268f45cc-cd09-0410-ab3c-d52691b4dbfc

31 hours agoNon-unified build fixes, late-ish May 2022 edition
aperez@igalia.com [Fri, 20 May 2022 09:16:13 +0000 (09:16 +0000)]
Non-unified build fixes, late-ish May 2022 edition
https://bugs.webkit.org/show_bug.cgi?id=240710

Unreviewed build fix

* Source/WebCore/rendering/svg/RenderSVGBlock.cpp: Add missing RenderView.h inclusion.

link: https://commits.webkit.org/250793@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294538 268f45cc-cd09-0410-ab3c-d52691b4dbfc

32 hours agoREGRESSION(r288092): Deadlock when the playback is stopping just right after startup
commit-queue@webkit.org [Fri, 20 May 2022 08:47:07 +0000 (08:47 +0000)]
REGRESSION(r288092): Deadlock when the playback is stopping just right after startup
https://bugs.webkit.org/show_bug.cgi?id=240661

Patch by Yacine Bandou <yacine.bandou@softathome.com> on 2022-05-20
Reviewed by Philippe Normand.

r288092 causes a deadlock with the "28. ChangeType.H264.VP9" test in "https://ytlr-cert.appspot.com/2020/main.html".

The background thread locks the GStPad and sends a notify::caps signal which is caught by
VideoTrackPrivateGStreamer that calls callOnMainThreadAndWait.

At the same time the main thread destroys MediaPlayerPrivateGStreamer and sets the pipeline to NULL
that calls "gst_pad_set_active" which wants to lock the GStPad.

This commit uses AbortableTaskQueue and calls enqueueTask instead of callOnMainThreadAndWait
in order to be able to abort the waiting job and avoid using the "AndWait" variant, consequently
we avoid the deadlock.

* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
(WebCore::AudioTrackPrivateGStreamer::AudioTrackPrivateGStreamer):
(WebCore::AudioTrackPrivateGStreamer::updateConfigurationFromTags):
(WebCore::AudioTrackPrivateGStreamer::updateConfigurationFromCaps):
(WebCore::AudioTrackPrivateGStreamer::disconnect):
* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h:
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:
(WebCore::VideoTrackPrivateGStreamer::VideoTrackPrivateGStreamer):
(WebCore::VideoTrackPrivateGStreamer::updateConfigurationFromTags):
(WebCore::VideoTrackPrivateGStreamer::updateConfigurationFromCaps):
(WebCore::VideoTrackPrivateGStreamer::disconnect):
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h:

link: https://commits.webkit.org/250792@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294537 268f45cc-cd09-0410-ab3c-d52691b4dbfc

33 hours agoDrawing the PDF snapshot should take place in WebProcess
said@apple.com [Fri, 20 May 2022 07:17:02 +0000 (07:17 +0000)]
Drawing the PDF snapshot should take place in WebProcess
https://bugs.webkit.org/show_bug.cgi?id=240368
rdar://91660159

Reviewed by Simon Fraser.

The ImageBufferBackends should act like a drawing surface only. It has
a GraphicsContext. It can get and set pixels. And it can get a NativeImage
out of the pixels. But it should never draw itself to a GraphicsContext.
The ImageBuffer can act like an image. It can draw itself as an image or
as a pattern into a GraphicsContext.

So draw(), drawPattern() and drawConsuming() will be removed from the
ImageBufferBackend super classes and the implementation will be unified
for all platforms and moved to ConcreteImageBuffer.

By doing that, a canvas can be drawn to the PDF context in WebProcess
even if the GPUProcess for DOM rendering is enabled.

link: https://commits.webkit.org/250791@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294536 268f45cc-cd09-0410-ab3c-d52691b4dbfc

33 hours ago[git-webkit] Question 'Are you sure want to setup a fork?' always returns 'Yes'
dpino@igalia.com [Fri, 20 May 2022 07:14:48 +0000 (07:14 +0000)]
[git-webkit] Question 'Are you sure want to setup a fork?' always returns 'Yes'

Reviewed by Jonathan Bedard.

When the response of the user is an empty string, function 'Terminal.choose'
always returns the first option.

The reason for that is a 'startswith' comparison of an option with an empty
string. This comparison is always true, thus the first option is selected
instead of the default option.

link: https://commits.webkit.org/250790@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294535 268f45cc-cd09-0410-ab3c-d52691b4dbfc

34 hours agoCSSMotionPathEnabled setting does not prevent parsing of CSS Motion Path properties
commit-queue@webkit.org [Fri, 20 May 2022 06:51:32 +0000 (06:51 +0000)]
CSSMotionPathEnabled setting does not prevent parsing of CSS Motion Path properties
https://bugs.webkit.org/show_bug.cgi?id=240594
<rdar://93522039>

Patch by Antoine Quint <graouts@apple.com> on 2022-05-19
Reviewed by Antti Koivisto.

* Source/WebCore/css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/parser/CSSParserContext.cpp:
(WebCore::operator==):
(WebCore::add):
(WebCore::CSSParserContext::isPropertyRuntimeDisabled const):
* Source/WebCore/css/parser/CSSParserContext.h:
* Source/WebCore/css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseShorthand):

link: https://commits.webkit.org/250789@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294534 268f45cc-cd09-0410-ab3c-d52691b4dbfc

34 hours agoAdd `revert-layer` to `isUniversalKeyword`
ntim@apple.com [Fri, 20 May 2022 06:39:43 +0000 (06:39 +0000)]
Add `revert-layer` to `isUniversalKeyword`
https://bugs.webkit.org/show_bug.cgi?id=234674

Reviewed by Antti Koivisto.

* Source/WebCore/css/parser/CSSParserFastPaths.cpp:
(WebCore::isUniversalKeyword):

link: https://commits.webkit.org/250788@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294533 268f45cc-cd09-0410-ab3c-d52691b4dbfc

34 hours agoTests with an '-e' parameters in requireOptions fail with bytecode cache enabled
commit-queue@webkit.org [Fri, 20 May 2022 06:19:49 +0000 (06:19 +0000)]
Tests with an '-e' parameters in requireOptions fail with bytecode cache enabled
https://bugs.webkit.org/show_bug.cgi?id=218703

Patch by Xan López <xan@igalia.com> on 2022-05-19
Reviewed by Yusuke Suzuki.

Do not try to further tokenize the command parameters to the test run
in the bytecode cache helper script. This will just mess up things
like the '-e "foo bar"' extra options, and it's not needed.

* Scripts/jsc-stress-test-helpers/bytecode-cache-test-helper.sh: do not tokenize the arguments to the script.
* Scripts/run-jsc-stress-tests: also run the bytecode cache tests on MIPS.

link: https://commits.webkit.org/250787@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294532 268f45cc-cd09-0410-ab3c-d52691b4dbfc

35 hours agoASSERT(status == U_ZERO_ERROR) under SearchBuffer::search() when typing in the url...
simon.fraser@apple.com [Fri, 20 May 2022 05:49:27 +0000 (05:49 +0000)]
ASSERT(status == U_ZERO_ERROR) under SearchBuffer::search() when typing in the url bar in the iOS simulator
https://bugs.webkit.org/show_bug.cgi?id=240699
<rdar://92182174>

Reviewed by Tim Horton.

Replace `status == U_ZERO_ERROR` tests with `U_SUCCESS(status)`.

* Source/WebCore/PAL/pal/text/TextCodecICU.cpp:
(PAL::ErrorCallbackSetter::ErrorCallbackSetter):
(PAL::ErrorCallbackSetter::~ErrorCallbackSetter):
* Source/WebKit/UIProcess/Cocoa/ModalContainerControlClassifier.mm:
(WebKit::SpoofChecker::checker):
* Source/WebCore/editing/TextIterator.cpp:
(WebCore::createSearcher):
(WebCore::SearchBuffer::SearchBuffer):
(WebCore::SearchBuffer::~SearchBuffer):
(WebCore::SearchBuffer::search):

link: https://commits.webkit.org/250786@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294531 268f45cc-cd09-0410-ab3c-d52691b4dbfc

35 hours agoREGRESSION (r293126): Gmail formatting menu/panel in compose view becomes blank/empty...
simon.fraser@apple.com [Fri, 20 May 2022 05:27:37 +0000 (05:27 +0000)]
REGRESSION (r293126): Gmail formatting menu/panel in compose view becomes blank/empty while scrolling
https://bugs.webkit.org/show_bug.cgi?id=240625
<rdar://92984518>

Reviewed by Alan Bujtas.

Gmail uses the css `clip` property with negative offsets, which is surprising, and revealed a bug in
the compositing code for clipping.

When a stacking-context layer has overflow:hidden or clip:, we assume that the clip encloses all the
descendants, so make a GraphicsLayer with masksToBounds as a parent of the child layers. When the
layer has border-radius with uneven corners, we implement that with a shape layer which acts as a
mask on that clipping GraphicsLayer.

The content in question had CSS clip with negative offsets and border-radius, so the shape layer
mask would clip out any content outside the border shape.

So if the clip rect extends beyond the border, we need to follow a different code path, which pushes
the clipping layers onto descendants; this code path is used for non-stacking context clipping, and
for mix-blend-mode which needs to avoid the creation of the intermediate clipping layer.

So generalize the `isolatesCompositedBlending()` code path to also be used in the scenario of CSS
clip which extends outside the border box.

Tests: compositing/clipping/css-clip-and-border-radius.html
       compositing/clipping/css-clip-non-stacking.html
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::canUseDescendantClippingLayer):
(WebCore::RenderLayerCompositor::clippedByAncestor const):
(WebCore::RenderLayerCompositor::computeAncestorClippingStack const):
(WebCore::RenderLayerCompositor::clipsCompositingDescendants):
* LayoutTests/compositing/clipping/css-clip-and-border-radius-expected.html: Added.
* LayoutTests/compositing/clipping/css-clip-and-border-radius.html: Added.
* LayoutTests/compositing/clipping/css-clip-non-stacking-expected.html: Added.
* LayoutTests/compositing/clipping/css-clip-non-stacking.html: Added.

link: https://commits.webkit.org/250785@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294530 268f45cc-cd09-0410-ab3c-d52691b4dbfc

36 hours ago[ Gardening ]REBASELINE [ iOS ] fast/events/ios/rotation/layout-viewport-during-safar...
Jenner@apple.com [Fri, 20 May 2022 04:52:04 +0000 (04:52 +0000)]
[ Gardening ]REBASELINE [ iOS ] fast/events/ios/rotation/layout-viewport-during-safari-type-rotation.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=231266

Unreviewed test gardening. Rebaseline for iOS.

* LayoutTests/platform/ios-wk2/TestExpectations:
* LayoutTests/platform/ios-wk2/fast/events/ios/rotation/layout-viewport-during-rotation-expected.txt: Added.

link: https://commits.webkit.org/250784@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294529 268f45cc-cd09-0410-ab3c-d52691b4dbfc

37 hours agoUnreviewed, non-unified build fixes after 250776@main
dpino@igalia.com [Fri, 20 May 2022 04:03:09 +0000 (04:03 +0000)]
Unreviewed, non-unified build fixes after 250776@main

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

37 hours agoRemove unused memory capacity output value in calculateURLCacheSizes
commit-queue@webkit.org [Fri, 20 May 2022 03:46:31 +0000 (03:46 +0000)]
Remove unused memory capacity output value in calculateURLCacheSizes
https://bugs.webkit.org/show_bug.cgi?id=240577

Patch by Olivier Blin <olivier.blin@softathome.com> on 2022-05-19
Reviewed by Darin Adler.

Source/WebKit:

calculateURLCacheSizes() had a urlCacheMemoryCapacity output value
since its creation in r203857, which was passed to platformSetURLCacheSize().

But the implementation has been removed for the soup platform in
r205556 when switching to the WebKit network cache, and for the Cocoa
platform in r232201 when dropping NSURLCache support.

urlCacheMemoryCapacity is now unused.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::computeCapacity):
* Shared/CacheModel.cpp:
(WebKit::calculateURLCacheSizes):
* Shared/CacheModel.h:

link: https://commits.webkit.org/250782@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294527 268f45cc-cd09-0410-ab3c-d52691b4dbfc

37 hours agoRemove a first bit of unused plug-in code
darin@apple.com [Fri, 20 May 2022 03:38:58 +0000 (03:38 +0000)]
Remove a first bit of unused plug-in code
https://bugs.webkit.org/show_bug.cgi?id=240309

Reviewed by Chris Dumez.

* Source/WebKit/Sources.txt: Removed Plugin.cpp.
Removed unneeded @no-unify for PluginView.cpp and WebPluginInfoProvider.cpp.

* Source/WebKit/UIProcess/WebProcessProxy.cpp: Removed unneeded include
of PDFPlugin.h.

* Source/WebKit/WebKit.xcodeproj/project.pbxproj: Removed Plugin.cpp,
Plugin.h, and PluginController.h, and turned off non-unified building
for PluginView.cpp and WebPluginInfoProvider.cpp.

* Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameHandlesPageScaleGesture): Deprecate, and always return false.

* Source/WebKit/WebProcess/InjectedBundle/API/c/mac/WKBundlePageMac.mm:
(WKBundlePageGetPDFDocumentInFrame): Moved code inside #if ENABLE(PDFKIT_PLUGIN)
and also removed some unneeded local variables and includes.

* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h: Updated includes,
removing uneeeded ones, and adding others that previously were inherited
from Plugin.h. Similarly, added and removed forward declarations.
Changed the class to inherit from ThreadSafeRefCounted directly, eliminating
the Plugin base class. Removed the unneeded WebFrame argument from the create
function. Moved functions here from Plugin. Made handlesPageScalFactor,
convertFromPDFViewToRootView frameForHUD, and ensureDataBufferLength private.
Made isFullFramePlugin public. Added deviceScaleFactor. Made the virtual
function overrides just normal functions. Also tweaked arguments and return
values on some of them so they are the minimum needed to do the job.
Replaced the old weak pointer to the plug-in controller with a weak ponter
to the plug-in view; the two are the same object. Removed the isPDFPlugin
function and the type traits for downcast, since this is no longer derived
from a Plugin base class.

* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm: Tweaked includes.
Removed the "requestID" since now loading the main resource of the plug-in
is done without using general purpose "stream-loading" machinery.
(WebKit::PDFPlugin::create): Take fewer arguments.
(WebKit::PDFPlugin::PDFPlugin): Use WebFrame::fromCoreFrame to find the
frame so we don't have to pass it in. No need for null checks, though, because
PluginView does all those. Refactor and tweak a bit.
(WebKit::PDFPlugin::getResourceBytesAtPosition): Get URL from m_view.
(WebKit::PDFPlugin::updateScrollbars): Use m_view.
(WebKit::PDFPlugin::pluginView): Deleted.
(WebKit::PDFPlugin::pluginView const): Deleted.
(WebKit::PDFPlugin::createScrollbar): Use m_view.
(WebKit::PDFPlugin::convertFromScrollbarToContainingView const): Ditto.
(WebKit::PDFPlugin::convertFromContainingViewToScrollbar const): Ditto.
(WebKit::PDFPlugin::handleScroll): Deleted.
(WebKit::PDFPlugin::scrollCornerRect const): Use m_view.
(WebKit::PDFPlugin::scrollableAreaBoundingBox const): Ditto.
(WebKit::PDFPlugin::addArchiveResource): Ditto. Also get URL from m_vie
since we no longer have m_sourceURL.
(WebKit::PDFPlugin::streamDidFinishLoading): Merged with
documentDataDidFinishLoading and manualStreamDidFinishLoading, and removed
the streamID argument since we only use one stream, to load PDF document data.
(WebKit::PDFPlugin::installPDFDocument): Use m_view.
(WebKit::PDFPlugin::streamDidReceiveResponse): Merged with setSuggestedFilename
and manualStreamDidReceiveResponse, and removed the streamID argument.
(WebKit::PDFPlugin::streamDidReceiveData): Merged with manualStreamDidReceiveData,
and removed the streamID argument.
(WebKit::PDFPlugin::streamDidFail): Merged with manualStreamDidFail, and removed
the streamID argument.
(WebKit::PDFPlugin::deviceScaleFactor const): Added. Gets the device scale factor
from the WebCore Page, which is something we have to do twice. The old code used
to go through the controller to do this.
(WebKit::PDFPlugin::updatePageAndDeviceScaleFactors): Use m_view. This change
looks confusing because what the controller called contentsScaleFactor was the
device scale factor from the WebCore::Page. Better to call that deviceScaleFactor.
(WebKit::PDFPlugin::initialize): Deleted. Moved all this code into
PluginView::initializePlugin.
(WebKit::PDFPlugin::setView): Added. Used to initialize.
(WebKit::PDFPlugin::destroy): Merged with destroyPlugin and with Plugin::destroy.
(WebKit::PDFPlugin::snapshot): Use deviceScaleFactor. See note above.
(WebKit::PDFPlugin::pluginLayer): Use CALayer for the return type.
(WebKit::PDFPlugin::geometryDidChange): Use m_view.
(WebKit::PDFPlugin::frameDidFinishLoading): Deleted.
(WebKit::PDFPlugin::frameDidFail): Deleted.
(WebKit::PDFPlugin::didEvaluateJavaScript): Deleted.
(WebKit::PDFPlugin::handleEditingCommand): Removed unused argument, use StringView.
(WebKit::PDFPlugin::isEditingCommandEnabled): Use StringView.
(WebKit::PDFPlugin::isFullFramePlugin const): Use m_view.
(WebKit::PDFPlugin::notifyContentScaleFactorChanged): Ditto.
(WebKit::PDFPlugin::pluginHandlesContentOffsetForAccessibilityHitTest const): Deleted.
(WebKit::PDFPlugin::openWithNativeApplication): Use isNull.
(WebKit::PDFPlugin::nextMatchForString): Use bool.

* Source/WebKit/WebProcess/Plugins/Plugin.cpp: Removed.
* Source/WebKit/WebProcess/Plugins/Plugin.h: Removed.
* Source/WebKit/WebProcess/Plugins/PluginController.h: Removed.

* Source/WebKit/WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::URLRequest): Deleted.
(WebKit::PluginView::Stream::create): Remove streamID.
(WebKit::PluginView::Stream::streamID const): Deleted.
(WebKit::PluginView::Stream::Stream): Remove streamID.
(WebKit::PluginView::Stream::start): Use PluginView::frame.
(WebKit::PluginView::Stream::continueLoad): Removed unneeded assertion.
(WebKit::buildHTTPHeaders): Deleted.
(WebKit::lastModifiedDateMS): Deleted.
(WebKit::PluginView::Stream::willSendRequest): Removed call to
streamWillSendRequest.
(WebKit::PluginView::Stream::didReceiveResponse): Removed most of the
arguments to streamDidReceiveResponse.
(WebKit::PluginView::Stream::didReceiveData): Removed the streamID
argument to streamDidReceiveData.
(WebKit::PluginView::Stream::didFail): Removed the arguments to
streamDidFail, and the call to removeStream, since we can do that here.
(WebKit::PluginView::Stream::didFinishLoading): Removed the
streamID argument to stringDidFinishLoading, and the call to removeStream,
since we can do that here.
(WebKit::webPage): Deleted.
(WebKit::PluginView::create): Moved the code to map from element to WebPage
in here, changed the arguments to take all the parameters instead of
a Parameters struct, and moved the call to shouldUsePDFPlugin here
from WebPage::createPlugin.
(WebKit::PluginView::PluginView): Take individual parameters instead of
a Parameters struct. Also update for name changes.
(WebKit::PluginView::~PluginView): Removed most of the code, leaving
only call to cancel the stream and destroy the plug-in.
(WebKit::PluginView::destroyPluginAndReset): Deleted.
(WebKit::PluginView::setLayerHostingMode): Deleted.
(WebKit::PluginView::manualLoadDidReceiveResponse): Removed null check
of m_plugin, and most of the arguments to manualStreamDidReceiveResponse,
calling streamDidReceiveResponse instead.
(WebKit::PluginView::manualLoadDidReceiveData): Removed null check
of m_plugin, and call streamDidReceiveData instead of a separate
manualStreamDidReceiveData.
(WebKit::PluginView::manualLoadDidFinishLoading): Removed null check
of m_plugin, and call streamDidFinishLoading instead of a separate
manualStreamDidFinishLoading.
(WebKit::PluginView::manualLoadDidFail): Removed null check
of m_plugin, handling of specific stream errors, and call streamDidFail
without a specific error instead of a separate manualStreamDidFail.
(WebKit::PluginView::setPageScaleFactor): Removed unused IntPoint argument.
(WebKit::PluginView::handlesPageScaleFactor const): Deleted.
(WebKit::PluginView::requiresUnifiedScaleFactor const): Deleted.
(WebKit::PluginView::activityStateDidChange): Deleted.
(WebKit::PluginView::setDeviceScaleFactor): Removed null check of m_plugin.
(WebKit::PluginView::accessibilityAssociatedPluginParentForElement const):
(WebKit::PluginView::windowAndViewFramesChanged): Deleted.
(WebKit::PluginView::accessibilityAssociatedPluginParentForElement const):
Removed null check of m_plugin.
(WebKit::PluginView::accessibilityObject const): Ditto.
(WebKit::PluginView::initializePlugin): Merged with didInitializePlugin
removed null check of m_plugin, code to call addMediaCanStartListener,
code to call addAudioProducer, call Plugin::setView instead of calling
Plugin::initialize, call loadMainResource if needed, which was previously
done by Plugin::initialize. Removed the calls to windowAndViewFramesChanged
Plugin::setFocus. windowVisibilityChanged, windowFocusChanged, and
wantsWheelEvents. Fixed a bug in handling of non-full-frame plug-ins
in the main frame by only sending
MainFramePluginHandlesPageScaleGestureDidChange when it is full frame.
(WebKit::PluginView::platformLayer const): Removed null check of m_plugin.
(WebKit::PluginView::storageBlockingStateChanged): Deleted.
(WebKit::PluginView::scroll): Ditto.
(WebKit::PluginView::horizontalScrollbar): Ditto.
(WebKit::PluginView::verticalScrollbar): Ditto.
(WebKit::PluginView::wantsWheelEvents): Return true.
(WebKit::PluginView::paint): Removed null check of m_plugin and the
call to Plugin::paint.
(WebKit::PluginView::countFindMatches): Removed null check of m_plugin.
(WebKit::PluginView::findString): Ditto.
(WebKit::PluginView::getSelectionString const): Ditto.
(WebKit::PluginView::createWebEvent const): Deleted. Calling this
eventually resulted in calling Plugin::convertToRootView and would then
hit ASSSERT_NOT_REACHED.
(WebKit::PluginView::handleEvent): Removed the call to  createWebEvent.
Updated since m_pluginElement is a Ref instead of RefPtr. Removed the
call to wantsWheelEvents, which is now always true.
(WebKit::PluginView::handleEditingCommand): Removed null check of
m_plugin and stop passing the argument to Plugin::handleEditingCommand.
(WebKit::PluginView::isEditingCommandEnabled): Removed null check of
m_plugin.
(WebKit::PluginView::shouldAllowScripting): Deleted.
(WebKit::PluginView::shouldAllowNavigationFromDrags const): Return true.
(WebKit::PluginView::willDetachRenderer): Removed null check of m_plugin.
(WebKit::PluginView::liveResourceData const): Ditto.
(WebKit::PluginView::performDictionaryLookupAtLocation): Ditto.
(WebKit::PluginView::existingSelectionContainsPoint const): Ditto.
(WebKit::PluginView::viewGeometryDidChange): Ditto.
(WebKit::PluginView::viewVisibilityDidChange): Removed code to calculate
the clip rect and don't pass a clip rect to Plugin::geometryDidChange.
(WebKit::PluginView::clipRectInWindowCoordinates const): Update since
m_pluginElement is a Ref.
(WebKit::PluginView::focusPluginElement): Ditto.
(WebKit::PluginView::pendingResourceRequestTimerFired): Renamed from
pendingURLRequestsTimerFired. Simplified code since we can only have
one pending resource request and we don't want to support JavaScript URLs.
(WebKit::PluginView::performURLRequest): Deleted.
(WebKit::PluginView::performFrameLoadURLRequest): Deleted.
(WebKit::PluginView::performJavaScriptURLRequest): Deleted.
(WebKit::PluginView::addStream): Deleted.
(WebKit::PluginView::removeStream): Deleted.
(WebKit::PluginView::cancelAllStreams): Deleted.
(WebKit::PluginView::redeliverManualStream): Removed error argument
for manualLoadDidFail function.
(WebKit::PluginView::invalidateRect): Removed null check of m_plugin.
(WebKit::PluginView::setFocus): Deleted.
(WebKit::PluginView::mediaCanStart): Deleted.
(WebKit::PluginView::pageMutedStateDidChange): Deleted.
(WebKit::PluginView::loadMainResource): Renamed from loadURL.
Removed all the arguments, since it always loads the same URL in the
same way. Removed most of the code since most arguments are defaults.
(WebKit::PluginView::contentsScaleFactor): Deleted.
(WebKit::PluginView::didFinishLoad): Deleted.
(WebKit::PluginView::didFailLoad): Deleted.
(WebKit::PluginView::shouldCreateTransientPaintingSnapshot const):
Removed null check of m_plugin.
(WebKit::PluginView::isBeingDestroyed const): Moved out of
PluginView.h so it does not have to include PDFPlugin.h.
(WebKit::PluginView::pdfDocumentForPrinting const): Ditto.
(WebKit::PluginView::pdfDocumentSizeForPrinting const): Added.
(WebKit::PluginView::accessibilityHitTest const): Moved out of
PluginView.h so it does not have to include PDFPlugin.h.
(WebKit::PluginView::rectForSelectionInRootView const): Added.
(WebKit::PluginView::contentScaleFactor const): Added.

* Source/WebKit/WebProcess/Plugins/PluginView.h: Wrapped the
entire file in #if ENABLE(PDFKIT_PLUGIN) since this is no longer
a general purpose plug-in view. Removed many includes and an
obsolete comment about moving this whole class to WebCore.
Changed PluginView to no longer derive from PluginController,
MediaCanStartListener, LoadListener, or MediaProducer.
Removed most arguments to PluginView::create and the constructor,
added in the logic about whether to create a PDF view or not, so
it can now return nullptr. Moved isBeingDestroyed out of the header.
Removed the argument to manualLoadDidFail. Removed activityStateDidChange,
setLayerHostingMode, windowAndViewFramesChanged, initialParameters,
handlesPageScaleFactor, requiresUnifiedScaleFactor, shouldAllowScripting,
performURLRequest, performFrameLoadURLRequest, performJavaScriptURLRequest,
addStream, removeStream, cancelAllStreams, mediaCanStart, mediaState,
pageMutedStateDidChange, contentsScaleFactor, didInitializePlugin,
destroyPluginAndReset, didFinishLoad, didFailLoad, createWebEvent,
m_parameters, m_isWaitingUntilMediaCanStart, m_mainResourceURL,
m_mainResourceContentType, m_shouldUseManualLoader, m_pendingFrameLoads,
m_streams, m_manualStreamError, and m_pluginIsPlayingAudio.
Added pdfDocumentSizeForPrinting, mainResourceURL, lookupTextAtLocation,
rectForSelectionInRootView, contentScaleFactor, and m_stream.
Removed unused origin argument to setPageScaleFactor. Renamed
pendingURLRequestsTimerFired to pendingResourceRequestTimerFired,
m_pendingURLRequests to m_pendingResourceRequest,
m_pendingURLRequestsTimer to m_pendingResourceRequestTimer, and
loadURL to loadMainResource. Changed m_pluginElement and m_plugin
from RefPtr to Ref since neither can be null.

* Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.cpp:
Removed most includes.
(WebKit::WebPluginInfoProvider::WebPluginInfoProvider): Deleted.
(WebKit::WebPluginInfoProvider::~WebPluginInfoProvider): Deleted.
(WebKit::pluginInfoVector): Added. Factors out common code.
(WebKit::WebPluginInfoProvider::pluginInfo): Removed everything
except the call to pluginInfoVector.
(WebKit::WebPluginInfoProvider::webVisiblePluginInfo): Ditto.

* Source/WebKit/WebProcess/Plugins/WebPluginInfoProvider.h:
Removed unnneded include and tweaked coding style a bit.

* Source/WebKit/WebProcess/Storage/WebSWClientConnection.cpp:
Added a missing FrameDestructionObserverInlines.h include.

* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::print): Call pdfDocumentSizeForPrinting
on the view, not the plug-in. Fixed the #if that was incorrectly
doing PLATFORM(COCOA) when it means ENABLE(PDFKIT_PLUGIN).

* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::hasPlugInView const): Added.
(WebKit::WebFrameLoaderClient::setMainDocumentError): Moved
plug-in-specific code inside ENABLE(PDFKIT_PLUGIN).
(WebKit::WebFrameLoaderClient::committedLoad): Call hasPlugInView
and moved plug-in-specific code inside ENABLE(PDFKIT_PLUGIN).
(WebKit::WebFrameLoaderClient::finishedLoading): Ditto.
(WebKit::WebFrameLoaderClient::createPlugin): Ditto. Also pass in
the arguments individually instead of a Parameters struct.
(WebKit::WebFrameLoaderClient::redirectDataToPlugin): Ditto.
(WebKit::WebFrameLoaderClient::allowScript): Always return false
for frames with plug-in views.

* Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
Added hasPlugInView. Moved m_pluginView and m_hasSentResponseToPluginView
inside ENABLE(PDFKIT_PLUGIN).

* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation): Put the plug-in
code inside ENABLE(PDFKIT_PLUGIN) and use mainFramePlugIn.
(WebKit::WebPage::getPDFFirstPageSize): Ditto. Also call the
pdfDocumentSizeForPrinting function on the plug-in view rather than
the plug-in. Also removed unneeded null check of WebCore frame before
calling pluginViewForFrame.

* Source/WebKit/WebProcess/WebPage/FindController.cpp: Added include
needed now that other headers don't pull in as many.
(WebKit::FindController::mainFramePlugIn): Added.
(WebKit::FindController::countStringMatches): Put code inside
(WebKit::FindController::updateFindUIAfterPageScroll): Ditto.
(WebKit::FindController::findString): Ditto.
(WebKit::FindController::hideFindUI): Ditto.

* Source/WebKit/WebProcess/WebPage/FindController.h: Added mainFramePlugIn.

* Source/WebKit/WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
(WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
Update since handlesPageScaleGesture is now a WebPage function rather than a
WebFrame function.
(WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture): Ditto.

* Source/WebKit/WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::handlesPageScaleGesture const): Deleted.
(WebKit::WebFrame::requiresUnifiedScaleFactor const): Deleted.
* Source/WebKit/WebProcess/WebPage/WebFrame.h: Updated for the above.

* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::~WebPage): Put plug-in code inside #if ENABLE(PDFKIT_PLUGIN).
(WebKit::WebPage::editorState const): Ditto.
(WebKit::WebPage::createPlugin): Deleted.
(WebKit::WebPage::pluginViewForFrame): Use dynamicDowncast.
(WebKit::WebPage::mainFramePlugIn): Added.
(WebKit::WebPage::executeEditingCommand): Put plug-in code inside
 #if ENABLE(PDFKIT_PLUGIN).
(WebKit::WebPage::isEditingCommandEnabled): Ditto.
(WebKit::WebPage::textZoomFactor const): Updated since all plug-ins
use "unified scale factor" and all main-frame plug-ins "handle page scale factor".
(WebKit::WebPage::setTextZoomFactor): Ditto.
(WebKit::WebPage::pageZoomFactor const): Ditto.
(WebKit::WebPage::setPageZoomFactor): Ditto.
(WebKit::WebPage::setPageAndTextZoomFactors): Ditto.
(WebKit::WebPage::scalePage): Removed original argument to setPageScaleFactor
and put plug-in code inside #if ENABLE(PDFKIT_PLUGIN).
(WebKit::WebPage::totalScaleFactor const): Updated since all main-frame
plug-ins "handle page scale factor" and put code in #if ENABLE.
(WebKit::WebPage::validateCommand): Put code in #if ENABLE.
(WebKit::WebPage::setTopContentInset): Ditto.
(WebKit::WebPage::getMainResourceDataOfFrame): Ditto.
(WebKit::WebPage::mainFrameView const): Ditto.
(WebKit::WebPage::setActivityState): Removed call to PluginView::activityStateDidChange.
(WebKit::WebPage::setLayerHostingMode): Removed call to PluginView::setLayerHostingMode.
(WebKit::WebPage::addPluginView): Removed code to set m_hasSeenPlugin.
(WebKit::WebPage::windowAndViewFramesChanged): Removed call to
PluginView::windowAndViewFramesChanged.
(WebKit::WebPage::handlesPageScaleGesture const): Added. Returns true if
we have a main-frame plug-in.

* Source/WebKit/WebProcess/WebPage/WebPage.h: Removed include of Plugin.h,
createPlugin, and m_hasSeenPlugin. Changed argument to the
dictionaryPopupInfoForSelectionInPDFPlugin from PDFPlugin to PluginView.
Put all members that involve PluginView inside #if statements.
Added handlesPageScaleGesture and mainFramePlugIn functions.

(WebKit::WebPage::accessibilityObjectForMainFramePlugin): Just return nil
since we don't have any plug-ins in iOS at this time.

* Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
(-[WKAccessibilityWebPageObject accessibilityHitTest:]): Removed call to
pluginHandlesContentOffsetForAccessibilityHitTest, and use mainFramePlugIn.

* Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::accessibilityObjectForMainFramePlugin): Use mainFramePlugIn.
(WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin): Update since
the plug-in view function is named contentScaleFactor, not just scaleFactor
as the PDF plug-in functino was named.
(WebKit::WebPage::performImmediateActionHitTestAtLocation): Call
lookupTextAtLocation on the plug-in view, not the plug-in.

* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper associatedPluginParent]): Use dynamicDowncast,
and remove some other casts that are not needed any more.

* Source/WebCore/bindings/js/JSPluginElementFunctions.cpp:
(WebCore::pluginScriptObject): Use dynamicDowncast and removed the plug-in
element argument to DOMTimer::scriptDidInteractWithPlugin.

* Source/WebCore/bindings/js/ScriptController.cpp: Removed include of
PluginViewBase.h.
(WebCore::ScriptController::createScriptInstanceForWidget): Always return
nullptr; this function is only used on platforms that do not support scripting
with widgets at all.

* Source/WebCore/html/HTMLObjectElement.cpp: Removed include of PluginViewBase.h.

* Source/WebCore/html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::pluginWidget const): Return PluginViewBase* instead
of Widget*.
(WebCore::HTMLPlugInElement::isKeyboardFocusable const): Return false.
(WebCore::HTMLPlugInElement::isUserObservable const): Deleted.
(WebCore::HTMLPlugInElement::isBelowSizeThreshold const): Deleted.
* Source/WebCore/html/HTMLPlugInElement.h: Updated for the above.

* Source/WebCore/html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::willDetachRenderers): Removed unneeded
type castss now that pluginWidget returns a PluginViewBase.

* Source/WebCore/html/PluginDocument.cpp:
(WebCore::PluginDocument::pluginWidget): Return PluginViewBase* instead
of Widget*.
* Source/WebCore/html/PluginDocument.h: Updated for the above.

* Source/WebCore/inspector/PageDebugger.cpp:
(WebCore::PageDebugger::setJavaScriptPaused): Removed calls to plug-in views.

* Source/WebCore/loader/FrameLoaderClient.h: Removed forward
declaration of PluginViewBase.

* Source/WebCore/page/DOMTimer.cpp:
(WebCore::DOMTimer::scriptDidInteractWithPlugin): Removed the plug-in
element argument, because all were always returning true for isUserObservable.
* Source/WebCore/page/DOMTimer.h: Updated for the above.

* Source/WebCore/page/DragController.cpp:
(WebCore::DragController::operationForLoad): Removed unneeded dynamicDowncast.

* Source/WebCore/page/Page.cpp:
(WebCore::Page::pluginViews): Deleted.
(WebCore::Page::storageBlockingStateChanged): Removed calls to plug-in views.
* Source/WebCore/page/Page.h: Updated for the above.

* Source/WebCore/platform/ScrollableArea.h:
(WebCore::ScrollableArea::isPDFPlugin const): Deleted.

* Source/WebCore/platform/Widget.h:
(WebCore::Widget::isPluginView const): Deleted.

* Source/WebCore/plugins/PluginViewBase.h: Removed storageBlockingStateChanged,
supportsKeyboardFocus, audioHardwareActivity, setJavaScriptPaused,
and bindingInstance. Made isPluginViewBase private and final.

* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::pluginIsBelowSizeThreshold): Deleted.
* Source/WebCore/testing/Internals.cpp: Updated for the above.
* Source/WebCore/testing/Internals.idl: Ditto. No test was using this.

link: https://commits.webkit.org/250781@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294526 268f45cc-cd09-0410-ab3c-d52691b4dbfc

38 hours ago[ANGLE] Production builds don't need to include Metal debug info
mmaxfield@apple.com [Fri, 20 May 2022 02:55:54 +0000 (02:55 +0000)]
[ANGLE] Production builds don't need to include Metal debug info
https://bugs.webkit.org/show_bug.cgi?id=240696
<rdar://problem/93580049>

Reviewed by Tim Horton.

Metal debug info can be generated in engineering builds, but production builds don't need it.

* Source/ThirdParty/ANGLE/Configurations/AngleMetalLib.xcconfig:
* Source/ThirdParty/ANGLE/Configurations/Base.xcconfig:
* Source/ThirdParty/ANGLE/Configurations/DebugRelease.xcconfig:

link: https://commits.webkit.org/250780@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294525 268f45cc-cd09-0410-ab3c-d52691b4dbfc

38 hours agoprepare-commit-msg should be no-op with --no-edit
gsnedders@apple.com [Fri, 20 May 2022 02:32:27 +0000 (02:32 +0000)]
prepare-commit-msg should be no-op with --no-edit
https://bugs.webkit.org/show_bug.cgi?id=240689

Reviewed by Jonathan Bedard.

* Tools/Scripts/hooks/prepare-commit-msg:

link: https://commits.webkit.org/250779@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294524 268f45cc-cd09-0410-ab3c-d52691b4dbfc

38 hours agoRelease assert in Document::updateLayout() via HTMLTextAreaElement::childrenChanged
brandonstewart@apple.com [Fri, 20 May 2022 02:14:43 +0000 (02:14 +0000)]
Release assert in Document::updateLayout() via HTMLTextAreaElement::childrenChanged
https://bugs.webkit.org/show_bug.cgi?id=224471

Reviewed by Ryosuke Niwa.

This patch is based on a set of patches made by Sergio Villar Senin
and Gabriel Nava Marino.

Executing some editing commands in a text area might force the recomputation of things
like caret or the visible selection position and extent. Under some circumstances (like
when the text area has no content and children) we might end up trying to update layout
when it is not safe as a side effect of updating the caret.

In order to fix that, we can switch to a model in which we update the selection asynchronously
in the case of having a non-user triggered change. That way we don't do it inside
a restricted layout scope.

The App Highlight restoration code had to be tuned as well (when restoring and scrolling to reveal
a Quick Note on iOS MacOS). It uses TemporarySelectionChange to select and scroll to reveal the highlight
range; the code assumed that this scrolling happens synchronously, since it reverts the selection to
the original range at the end of `AppHighlightStorage::attemptToRestoreHighlightAndScroll` when the
TemporarySelectionChange falls out of scope. That is however no longer the case. Actually no scrolling
happened after this patch because we end up only scheduling the appearance update timer before setting
the selection back to the original state with `SelectionRevealMode::DoNotReveal`. Since this only happens
when the user interacts in the Notes app, it seems sensible to consider it as a user triggered event.

Layout Tests

Moved some tests out of the text-based-repaint.js model because selection is now updated
and revealed asynchronously in the case of non-user triggered changes. The problem is that
by the time the repaint rects are queried the update has not happened yet. That's why
the tests were modified so that we wait until the repaint happens.

Same situation for other tests that do not involve repaint rects but trigger accesibility
tree updates. We must ensure that we let the notification be thrown before checking whether or
not has been emited. As it's done asynchronously we must let the main thread run before checking.

Last but not least, some of the tests are using setTimeout() instead of requestAnimationFrame()
because the results with the latter were not as reliable under stress/debug conditions.

* Source/WebCore/Modules/highlight/AppHighlightStorage.cpp:
(WebCore::AppHighlightStorage::attemptToRestoreHighlightAndScroll):
* Source/WebCore/editing/Editor.cpp:
(WebCore::TemporarySelectionChange::setSelection):
* Source/WebCore/editing/Editor.h:
* Source/WebCore/editing/FrameSelection.cpp:
(WebCore::FrameSelection::setSelection):
(WebCore::FrameSelection::updateSelectionAppearanceNow):
(WebCore::FrameSelection::absoluteCaretBounds):
(WebCore::FrameSelection::setCaretVisibility):
(WebCore::FrameSelection::selectionBounds):
(WebCore::FrameSelection::revealSelection):
(WebCore::updateSelectionByUpdatingLayoutOrStyle): Deleted.
(WebCore::FrameSelection::selectionBounds const): Deleted.
* Source/WebCore/editing/FrameSelection.h:
* Source/WebCore/page/EventHandler.cpp:
(WebCore::setSelectionIfNeeded):
* Source/WebCore/page/Page.cpp:
(WebCore::Page::doAfterUpdateRendering):
* LayoutTests/accessibility/mac/selection-boundary-userinfo.html:
* LayoutTests/accessibility/mac/selection-change-userinfo.html:
* LayoutTests/accessibility/mac/selection-value-changes-for-aria-textbox.html:
* LayoutTests/editing/selection-with-absolute-positioned-empty-content.html:
* LayoutTests/fast/forms/textarea-scrolled-endline-caret.html:
* LayoutTests/fast/repaint/selection-gap-absolute-child-expected.txt:
* LayoutTests/fast/repaint/selection-gap-absolute-child.html:
* LayoutTests/fast/repaint/selection-gap-fixed-child.html:
* LayoutTests/fast/repaint/selection-gap-flipped-absolute-child-expected.txt:
* LayoutTests/fast/repaint/selection-gap-flipped-absolute-child.html:
* LayoutTests/fast/repaint/selection-gap-transformed-absolute-child-expected.txt:
* LayoutTests/fast/repaint/selection-gap-transformed-absolute-child.html:
* LayoutTests/fast/repaint/selection-gap-transformed-fixed-child-expected.txt:
* LayoutTests/fast/repaint/selection-gap-transformed-fixed-child.html:
* LayoutTests/fast/repaint/selection-paint-invalidation-expected.txt:
* LayoutTests/fast/repaint/selection-ruby-rl-expected.txt:
* LayoutTests/fast/repaint/selection-ruby-rl.html:
* LayoutTests/fast/repaint/text-selection-overflow-hidden-expected.txt:
* LayoutTests/fast/repaint/text-selection-overflow-hidden.html:
* LayoutTests/fast/text/incorrect-deselection-across-multiple-elements.html:
* LayoutTests/platform/gtk/TestExpectations:
* LayoutTests/platform/gtk/fast/repaint/selection-ruby-rl-expected.txt: Copied from LayoutTests/fast/repaint/selection-ruby-rl-expected.txt.
* LayoutTests/platform/gtk/fast/repaint/text-selection-overflow-hidden-expected.txt:
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/mac-wk1/accessibility/mac/focus-setting-selection-syncronizing-not-clearing-expected.txt: Added.
* LayoutTests/platform/mac-wk1/fast/repaint/4776765-expected.txt: Added.
* LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-scroll-snap/scroll-target-margin-005-expected.txt:
* LayoutTests/platform/mac/TestExpectations:
* LayoutTests/platform/win/fast/repaint/4776765-expected.txt: Added.
* LayoutTests/platform/win/fast/repaint/selection-ruby-rl-expected.txt:
* LayoutTests/platform/win/fast/repaint/text-selection-overflow-hidden-expected.txt:

link: https://commits.webkit.org/250778@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294523 268f45cc-cd09-0410-ab3c-d52691b4dbfc

39 hours ago[webkit-patch] Fix revert workflow
jbedard@apple.com [Fri, 20 May 2022 01:26:21 +0000 (01:26 +0000)]
[webkit-patch] Fix revert workflow
https://bugs.webkit.org/show_bug.cgi?id=240684
<rdar://93602151>

Reviewed by Dewei Zhu.

* Tools/Scripts/webkitpy/common/checkout/checkout.py:
(_changelog_data_for_revision): Use git commit message instead of ChangeLog.
(changelog_entries_for_revision): Deleted.
* Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py:
(CheckoutTest.test_changelog_entries_for_revision): Deleted.
(CheckoutTest.test_commit_info_for_revision): Deleted.
(CheckoutTest.test_bug_id_for_revision): Deleted.
(CheckoutTest.test_suggested_reviewers): Deleted.
* Tools/Scripts/webkitpy/common/config/committers.py:
(Contributor.email): Match webkitscmpy's API.
* Tools/Scripts/webkitpy/tool/commands/download.py:
(AbstractRevertPrepCommand._prepare_state): Use email instead of bugzilla_email.
* Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py:
(PrepareChangeLogForRevert.run): Replace with a `git commit -a -m`.

link: https://commits.webkit.org/250777@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294521 268f45cc-cd09-0410-ab3c-d52691b4dbfc

39 hours agoImplement contain flag for ray() in offset path
nmouchtaris@apple.com [Fri, 20 May 2022 01:22:33 +0000 (01:22 +0000)]
Implement contain flag for ray() in offset path
https://bugs.webkit.org/show_bug.cgi?id=240259
<rdar://93374029>

Reviewed by Simon Fraser.

Implement contain flag for ray(). Contains purpose is to have the entire box
being animated be contained within the path. "Contained within the path" is
defined as having the box remain within a circle with the radius of the path
length and positioned at the offset anchor. This solution is adapted from the
repository of the spec writer: https://github.com/ewilligers/petrogale-purpureicollis.

The way this solution works is that you construct a coordinate system with the origin
being the offset anchor. You then calculate the position of each vertex of the box.
Then, rotate the vertices based on the angles difference from the x-axis. Next, using
the circle equation, we want to find an offset such that (x + offset)^2 + y^2 = r^2.
This results in a lower and upper bound for offset: -x - sqrt(r^2 - y^2) <= offset <=
-x + sqrt(r^2 + y^2). Finally we choose the minimal value of these upper and lower
bounds to get the final clamped offset.

This patch currently doesn't take into account if it is not possible to fit the box
within the path, as this will be completed in a seperate patch. Currently, test 4 is
failing due to rounding error, and test 5 is failing due to the unimplemented part.

* Source/WebCore/platform/graphics/GeometryUtilities.cpp:
(WebCore::toRelatedAcuteAngle):
(WebCore::distanceOfPointToSidesOfRect):
(WebCore::verticesForBox):
* Source/WebCore/platform/graphics/GeometryUtilities.h:
* Source/WebCore/rendering/PathOperation.cpp:
(WebCore::RayPathOperation::lengthForContainPath const):
(WebCore::RayPathOperation::pathForReferenceRect const):
* Source/WebCore/rendering/PathOperation.h:
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::getPathFromPathOperation):
(WebCore::RenderStyle::applyMotionPathTransform const):
* LayoutTests/TestExpectations:

link: https://commits.webkit.org/250776@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294520 268f45cc-cd09-0410-ab3c-d52691b4dbfc

39 hours agoRevert "[Xcode] Prevent STP and other self-contained builds from overwriting content...
emw@apple.com [Fri, 20 May 2022 01:17:40 +0000 (01:17 +0000)]
Revert "[Xcode] Prevent STP and other self-contained builds from overwriting content in the macOS SDK"

This reverts commit ae2e942111f9f4f1a80c749a3f51ab0ae83b013a.

Seeing some new failures on internal post-commit builders.

link: https://commits.webkit.org/250775@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294519 268f45cc-cd09-0410-ab3c-d52691b4dbfc

39 hours agoUnreviewed, non-unified build fixes after 250765@main
dpino@igalia.com [Fri, 20 May 2022 01:15:56 +0000 (01:15 +0000)]
Unreviewed, non-unified build fixes after 250765@main

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

40 hours agoFix boolean operation in WTF/BitMap test.
basuke.suzuki@sony.com [Fri, 20 May 2022 00:59:11 +0000 (00:59 +0000)]
Fix boolean operation in WTF/BitMap test.
https://bugs.webkit.org/show_bug.cgi?id=240668

Reviewed by Adrian Perez de Castro.

Clang 14 starts complaining about using logical operators to boolean:
```
webkit/Tools/TestWebKitAPI/Tests/WTF/Bitmap.cpp:1172:32: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
        EXPECT_EQ(temp.get(i), bitmap1.get(i) | bitmap2.get(i));
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                              ||
```

link: https://commits.webkit.org/250773@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294517 268f45cc-cd09-0410-ab3c-d52691b4dbfc

40 hours agoMail: dragged in attachments are shown as rich icons in compose but are received...
katherine_cheney@apple.com [Fri, 20 May 2022 00:04:44 +0000 (00:04 +0000)]
Mail: dragged in attachments are shown as rich icons in compose but are received as generic icons
https://bugs.webkit.org/show_bug.cgi?id=240679
<rdar://93513798>

Reviewed by Wenson Hsieh.

Render the thumbnail for iWork files when the file wrapper is set for
attachments that are not added via the pasteboard.

Confirmed this also fixes the issue for Notes.

* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(testiWorkAttachmentFileURL):
(testiWorkAttachmentData):
(-[AttachmentUIDelegate _webView:didInsertAttachment:withSource:]):
(TestWebKitAPI::TEST):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::updateAttachmentAttributes):
* Source/WebCore/rendering/RenderThemeMac.mm:
(WebCore::shouldDrawIcon):
(WebCore::paintAttachmentIcon):
There's a small delay while we wait for the file wrapper for the
attachment to be set so we can retrieve the thumbnail. In order to avoid a
flicker from the generic icon to the thumbnail, we should avoid painting
iWork file icons until the thumbnail is retrieved.

link: https://commits.webkit.org/250772@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294515 268f45cc-cd09-0410-ab3c-d52691b4dbfc

41 hours agoAvoid injected bundle delegate calls when text fields are focused and blurred without...
wenson_hsieh@apple.com [Fri, 20 May 2022 00:00:07 +0000 (00:00 +0000)]
Avoid injected bundle delegate calls when text fields are focused and blurred without user interaction
https://bugs.webkit.org/show_bug.cgi?id=240614

Reviewed by Chris Dumez.

Add a mechanism to throttle calls to injected bundle form client via `textFieldDidBeginEditing`, in
the case where the focused element is in a subframe that has never handled an editing command or
user interaction. This yields a small win on Speedometer 2, on M1 MacBookPro:

```
----------------------------------------------------------------------------------------------------------
|               subtest                |     ms      |     ms      |  b / a   | pValue                   |
----------------------------------------------------------------------------------------------------------
| Angular2-TypeScript-TodoMVC          |30.651667    |28.456667    |0.928389  | 0.000000 (significant)   |
| AngularJS-TodoMVC                    |109.733333   |111.623333   |1.017224  | 0.000000 (significant)   |
| BackboneJS-TodoMVC                   |31.371667    |33.988333    |1.083409  | 0.000000 (significant)   |
| Elm-TodoMVC                          |96.818333    |96.893333    |1.000775  | 0.760078                 |
| EmberJS-Debug-TodoMVC                |292.241667   |292.628333   |1.001323  | 0.530967                 |
| EmberJS-TodoMVC                      |99.671667    |98.963333    |0.992893  | 0.040683                 |
| Flight-TodoMVC                       |43.815000    |50.915000    |1.162045  | 0.000000 (significant)   |
| Inferno-TodoMVC                      |46.633333    |44.911667    |0.963081  | 0.000000 (significant)   |
| Preact-TodoMVC                       |11.636667    |11.673333    |1.003151  | 0.862258                 |
| React-Redux-TodoMVC                  |121.411667   |120.096667   |0.989169  | 0.000000 (significant)   |
| React-TodoMVC                        |69.908333    |69.885000    |0.999666  | 0.944581                 |
| Vanilla-ES2015-Babel-Webpack-TodoMVC |47.750000    |46.223333    |0.968028  | 0.000000 (significant)   |
| Vanilla-ES2015-TodoMVC               |48.721667    |48.323333    |0.991824  | 0.001202 (significant)   |
| VanillaJS-TodoMVC                    |40.218333    |38.231667    |0.950603  | 0.000000 (significant)   |
| VueJS-TodoMVC                        |18.420000    |16.793333    |0.911690  | 0.000000 (significant)   |
| jQuery-TodoMVC                       |188.831667   |186.908333   |0.989815  | 0.000005 (significant)   |
----------------------------------------------------------------------------------------------------------

a mean = 343.48012
b mean = 344.99902
pValue = 0.0027314347
(Bigger means are better.)
1.004 times better
Results ARE significant
```

See below for more details.

* Source/WebCore/editing/Editor.cpp:
(WebCore::Editor::Editor):
(WebCore::Editor::stopTextFieldDidBeginEditingTimer):

Stop the `textFieldDidBeginEditing` timer if needed, and return true if and only if it was active.

(WebCore::Editor::textFieldDidBeginEditingTimerFired):

Dispatch the deferred EditorClient call using the currently focused element.

(WebCore::Editor::textFieldDidBeginEditing):

If we're inside of a subframe that has never handled user interaction or editing, then don't eagerly
notify the injected bundle about the newly focused text field; instead, schedule a newly added timer
(`m_textFieldDidBeginEditingTimer`) to perform this call after a short delay.

(WebCore::Editor::textFieldDidEndEditing):

If editing ends (i.e. the text field is blurred) while the `textFieldDidBeginEditing` timer is still
scheduled, then simply elide this call to `textFieldDidBeginEditing` and `textFieldDidEndEditing`
altogether. This prevents us from repeatedly calling into the injected bundle if a page frequently
programmatically focuses and blurs text fields.

(WebCore::Editor::textDidChangeInTextField):
(WebCore::Editor::doTextFieldCommandFromEvent):
(WebCore::Editor::textWillBeDeletedInTextField):
(WebCore::Editor::textDidChangeInTextArea):

If any of these other injected bundle form client hooks are invoked while there is a scheduled
`textFieldDidBeginEditing` timer, then stop the timer and immediately inform the injected bundle
client about the focused text field.

(WebCore::Editor::isInSubframeWithoutUserInteraction const):
(WebCore::Editor::respondToChangedSelection):

Use the new helper function above.

* Source/WebCore/editing/Editor.h:

link: https://commits.webkit.org/250771@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294514 268f45cc-cd09-0410-ab3c-d52691b4dbfc

41 hours agoHandle cases where origin/HEAD doesn't exist in git-webkit
gsnedders@apple.com [Thu, 19 May 2022 23:46:27 +0000 (23:46 +0000)]
Handle cases where origin/HEAD doesn't exist in git-webkit
https://bugs.webkit.org/show_bug.cgi?id=240693

Reviewed by Jonathan Bedard.

* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.default_branch):

This makes several changes to default_branch:

 * We attempt origin/HEAD, origin/main, and origin/master before
   trying to guess based on all branches.

 * When guessing based on all branches, prefer main over master.

Additionally, this changes the searching to use `--symbolic-full-ref`,
as we only ever want refs to be returned, and this takes away the
guesswork parsing.

link: https://commits.webkit.org/250770@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294513 268f45cc-cd09-0410-ab3c-d52691b4dbfc

41 hours agoWeb Inspector: Getting style data via WebCore::InspectorCSSAgent::getMatchedStylesFor...
pangle@apple.com [Thu, 19 May 2022 23:42:23 +0000 (23:42 +0000)]
Web Inspector: Getting style data via WebCore::InspectorCSSAgent::getMatchedStylesForNode for a detached node crashes
https://bugs.webkit.org/show_bug.cgi?id=240608
rdar://93473674

Reviewed by Devin Rousso.

Added test case to inspector/css/node-styles-refreshed.html

Previously it was possible under at least two different circumstances that
`WebCore::InspectorCSSAgent::getMatchedStylesForNode` could be called with the NodeId of a detached node, which means
that `computedStyle` for that Node will be `nullptr`, and calls to `Style::Scope::forNode` will fail.

The first failure state is timing based. If the Inspector frontend makes a request for updated styles for a node, the
node may already have been detached by some other means (webpage JS, for example). In this case by the time
`getMatchedStylesForNode` is invoked the `computedStyle` is no longer available.

The second failure state is easier to get into. In a DOM tree with elements A, B, and C, each a child of the
previous such that A is the parent of B and B is the parent of C, imagine C is the selected DOM node. Now if
we right click and delete A from the DOM tree, we will have removed all three elements from the tree (both the
frontend representation as well as the actual tree in the backend). Previously C remained the selected node in the
tree, which means that we continue to show the Styles sidebar panel, where the user could then attempt to edit the style
of the node. These style changes trigger the need to refresh the frontend's style information, at which point we will
call `getMatchedStylesForNode` with a detached node id.

The fix to the underlying problem is to check in the backend that a node is actually attached before determining its
style information. Additionally, we should always update the selection of a TreeOutline when the current selection is
part of the subtree being removed from the tree. This prevents the user being able to easily get into the state in the
first place as well as prevents folks from getting confused about what the open sidebars are showing information for,
since visually no node _appears_ selected.

* Source/WebCore/inspector/agents/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
(WebCore::InspectorCSSAgent::getComputedStyleForNode):
- Guard the functions that will eventually use `computedStyle` or `Style::Scope::forNode`, both of which only work for
"connected" (in Web Inspector parlance "attached") nodes. Note there are a few other uses in our code where
`computedStyle` is used without this check, but we do explicitly check the result of computed styles in those cases,
which also works since `computedStyle` returns early if the node is not connected.

(WebCore::InspectorCSSAgent::buildObjectForRule):
- Add an assertion that we never call buildObjectForRule with a disconnected Element.

* Source/WebInspectorUI/UserInterface/Views/TreeOutline.js:
(WI.TreeOutline.prototype.removeChildAtIndex):
- Fix selection updating to account for the fact the selected node may be part of the descendants tree of the removed
item, in which case we would still want to update the selection to something else.

* LayoutTests/inspector/css/node-styles-refreshed-expected.txt:
* LayoutTests/inspector/css/node-styles-refreshed.html:
- Add test case to try getting styles of a detached node, and update other test cases with a new helper function instead
of relying on a "global" `nodeStyles`.

link: https://commits.webkit.org/250769@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294512 268f45cc-cd09-0410-ab3c-d52691b4dbfc

42 hours agoAdd sys call MSC_iokit_user_client_trap to the WebContent process' sandbox
pvollan@apple.com [Thu, 19 May 2022 23:00:40 +0000 (23:00 +0000)]
Add sys call MSC_iokit_user_client_trap to the WebContent process' sandbox
https://bugs.webkit.org/show_bug.cgi?id=240685
<rdar://93600722>

Reviewed by Chris Dumez.

* Source/WebKit/WebProcess/com.apple.WebProcess.sb.in:

link: https://commits.webkit.org/250768@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294511 268f45cc-cd09-0410-ab3c-d52691b4dbfc

42 hours ago[git-webkit] Use --date=unix in log commands
jbedard@apple.com [Thu, 19 May 2022 22:47:50 +0000 (22:47 +0000)]
[git-webkit] Use --date=unix in log commands
https://bugs.webkit.org/show_bug.cgi?id=240537
<rdar://93464544>

Reviewed by Stephanie Lewis.

Override any local configuration for git log's date format,
use a simpler date format.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.Cache.populate): Use --date=unix.
(Git.commit): Ditto.
(Git._args_from_content): Parse --date=unix.
(Git.commits): Use --date=unix.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
(TestGit.test_log):

link: https://commits.webkit.org/250767@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294510 268f45cc-cd09-0410-ab3c-d52691b4dbfc

42 hours ago[Curl] Suppress warning of unused enum value in switch statement.
basuke.suzuki@sony.com [Thu, 19 May 2022 22:43:55 +0000 (22:43 +0000)]
[Curl] Suppress warning of unused enum value in switch statement.
https://bugs.webkit.org/show_bug.cgi?id=240672

Reviewed by Fujii Hironori.

Just after the request object creation, the state is WaitingForStart. It is better
the code explicitly takes care of this fact. Also moving the assignment to the state
inside the switch statement denotes the state is changing to the response of previous
state.

No new tests. Covered by existing tests.

* platform/network/curl/CurlRequest.cpp:
(WebCore::CurlRequest::start):

link: https://commits.webkit.org/250766@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294509 268f45cc-cd09-0410-ab3c-d52691b4dbfc

42 hours agoImplement unit checks of CSSNumericValue.{min,max}
achristensen@apple.com [Thu, 19 May 2022 22:37:38 +0000 (22:37 +0000)]
Implement unit checks of CSSNumericValue.{min,max}
https://bugs.webkit.org/show_bug.cgi?id=240559

Reviewed by Chris Dumez.

This is part of an off-by-default experimental feature.
This is in the spec but not implemented in Chrome yet.
Covered by an addition to WPT tests at https://github.com/web-platform-tests/wpt/pull/34103

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/typedom/CSSNumericValue.cpp:
* Source/WebCore/css/typedom/CSSNumericValue.h:
* Source/WebCore/css/typedom/numeric/CSSMathProduct.cpp:
* Source/WebCore/css/typedom/numeric/CSSMathSum.cpp:
* Source/WebCore/css/typedom/numeric/CSSNumericType.cpp:
* Source/WebCore/css/typedom/numeric/CSSNumericType.h:

link: https://commits.webkit.org/250765@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294508 268f45cc-cd09-0410-ab3c-d52691b4dbfc

42 hours ago[ macOS Debug wk2 iOS ] imported/w3c/web-platform-tests/html/semantics/embedded-conte...
rackler@apple.com [Thu, 19 May 2022 22:08:58 +0000 (22:08 +0000)]
[ macOS Debug wk2 iOS ] imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-move-into-script-disabled-iframe.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=240670
<rdar://93589033>

Unreviewed test gardening.

* LayoutTests/platform/mac-wk2/TestExpectations:

link: https://commits.webkit.org/250764@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294507 268f45cc-cd09-0410-ab3c-d52691b4dbfc

43 hours agoWeb Inspector: Computed Panel: Assertion Failed: Cannot remove view which isn't a...
rcaliman@apple.com [Thu, 19 May 2022 21:49:47 +0000 (21:49 +0000)]
Web Inspector: Computed Panel: Assertion Failed: Cannot remove view which isn't a subview. ComputedStyleSection
https://bugs.webkit.org/show_bug.cgi?id=240644

Reviewed by Patrick Angle.

The root cause for this failed assertion is an accumulation of orphaned `WI.ComputedStyleSection` view instances in
`WI.ComputedStyleDetailsPanel._detailsSectionByStyleSectionMap`.

When `WI.ComputedStyleDetailsPanel.layout()` is called to reflect the latest selected node's variables, the previous `WI.ComputedStyleSection` view instance for ungrouped
variables is accidentally kept around. When attempting to remove this view on the next `layout()` run, this orphaned instance has no
host node that belongs to the parent view so the assertion fails. The issue gets progressively worse on each `layout()` run by accumulating more orphans.

* Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js: (WI.ComputedStyleDetailsPanel.prototype.layout):

link: https://commits.webkit.org/250763@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294506 268f45cc-cd09-0410-ab3c-d52691b4dbfc

43 hours agomedia/modern-media-controls tests are timing out
drousso@apple.com [Thu, 19 May 2022 21:44:28 +0000 (21:44 +0000)]
media/modern-media-controls tests are timing out
https://bugs.webkit.org/show_bug.cgi?id=231187
<rdar://problem/83846919>

Unreviewed.

The tests in `media/modern-media-controls/overflow-support` and `media/modern-media-controls/tracks-support`
require `"touch*"` (really `"pointer*"`) events on iOS, so skip for OpenSource and unskip internally.

* LayoutTests/platform/ios/TestExpectations:

link: https://commits.webkit.org/250762@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294505 268f45cc-cd09-0410-ab3c-d52691b4dbfc

44 hours ago[WPE][GTK] Improve dependency tracking of PDF.js files (and other GResources)
commit-queue@webkit.org [Thu, 19 May 2022 20:57:08 +0000 (20:57 +0000)]
[WPE][GTK] Improve dependency tracking of PDF.js files (and other GResources)
https://bugs.webkit.org/show_bug.cgi?id=240535

Patch by Michael Catanzaro <mcatanzaro@redhat.com> on 2022-05-19
Reviewed by Adrian Perez de Castro.

This commit does two things. First, for each use of
glib-compile-resources, it adds the --dependency-file argument in order
to make the build command depend on the files included in the GResource
manifest, to ensure the resource is automatically recompiled whenever
any of its source files change. Second, for PDF.js only, it replaces the
GLOB_RECURSE command with a list of source files. The
generate-pdfjs-gresource-manifest.py script is adapted to create CMake
file lists in addition to GResource manifests, and renamed from
-gresource-manifest.py to -resource-manifest.py. The web inspector
GResource would benefit from similar work, but that will be a problem
for another day.

* Tools/TestWebKitAPI/glib/CMakeLists.txt:
* Tools/glib/generate-pdfjs-resource-manifest.py: Renamed from Tools/glib/generate-pdfjs-gresource-manifest.py.
(get_filenames):
(get_filenames.resource_name):
(is_compressible):
(write_cmake_file):
(write_gresource_manifest):
* Source/ThirdParty/pdfjs/PdfJSFiles.cmake: Added.
* Source/ThirdParty/pdfjs/README.webkit:
* Source/WebKit/InspectorGResources.cmake:
* Source/WebKit/PdfJSGResources.cmake:
* Source/WebKit/PlatformGTK.cmake:
* Source/WebKit/PlatformWPE.cmake:
* CMakeLists.txt:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:

link: https://commits.webkit.org/250761@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294504 268f45cc-cd09-0410-ab3c-d52691b4dbfc

45 hours agoChanging text color and removing line-clamp on hover causes text to disappear permanently
zalan@apple.com [Thu, 19 May 2022 19:57:08 +0000 (19:57 +0000)]
Changing text color and removing line-clamp on hover causes text to disappear permanently
https://bugs.webkit.org/show_bug.cgi?id=240410

Reviewed by Darin Adler.

Address post-landing review comment.
* Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::styleWillChange):

link: https://commits.webkit.org/250760@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294503 268f45cc-cd09-0410-ab3c-d52691b4dbfc

45 hours agogit webkit setup pauses between questions to install modules
jbedard@apple.com [Thu, 19 May 2022 19:53:43 +0000 (19:53 +0000)]
git webkit setup pauses between questions to install modules
https://bugs.webkit.org/show_bug.cgi?id=240487
<rdar://93522052>

Reviewed by Alexey Proskuryakov.

* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.main): Pre-install jinja.

link: https://commits.webkit.org/250759@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294501 268f45cc-cd09-0410-ab3c-d52691b4dbfc

45 hours agoAX: Logging outerHTML in streamAXCoreObject is not truncated
tyler_w@apple.com [Thu, 19 May 2022 19:22:34 +0000 (19:22 +0000)]
AX: Logging outerHTML in streamAXCoreObject is not truncated
https://bugs.webkit.org/show_bug.cgi?id=240523
<rdar://93429407>

Reviewed by Chris Fleizach.

outerHTML can be a very, very big string, and we don't truncate it at all.
This can cause debug builds to perform even worse than they already do, and
is almost always too much noise in the logs.

In this change, we truncate outerHTML to 150 characters.

* Source/WebCore/accessibility/AXLogger.cpp:
(WebCore::streamAXCoreObject):

link: https://commits.webkit.org/250758@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294499 268f45cc-cd09-0410-ab3c-d52691b4dbfc

45 hours agoTextTrackCue should get its document for its ActiveDOMObject base class
cdumez@apple.com [Thu, 19 May 2022 19:18:42 +0000 (19:18 +0000)]
TextTrackCue should get its document for its ActiveDOMObject base class
https://bugs.webkit.org/show_bug.cgi?id=240660
<rdar://93512736>

Reviewed by Eric Carlson.

TextTrackCue should get its document for its ActiveDOMObject base class instead
of requiring an extra data member to store it.

* Source/WebCore/html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::TextTrackCue):
(WebCore::TextTrackCue::scriptExecutionContext const):
(WebCore::TextTrackCue::document const):
(WebCore::TextTrackCue::getCueAsHTML):
(WebCore::TextTrackCue::rebuildDisplayTree):
* Source/WebCore/html/track/TextTrackCue.h:
(WebCore::TextTrackCue::ownerDocument): Deleted.
* Source/WebCore/html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGeneric::createDisplayTree):
(WebCore::TextTrackCueGeneric::setFontSize):
* Source/WebCore/html/track/TextTrackCueGeneric.h:
* Source/WebCore/html/track/VTTCue.cpp:
(WebCore::VTTCue::VTTCue):
(WebCore::VTTCue::initialize):
(WebCore::VTTCue::createDisplayTree):
(WebCore::VTTCue::displayTreeInternal):
(WebCore::VTTCue::createWebVTTNodeTree):
(WebCore::VTTCue::getCueAsHTML):
(WebCore::VTTCue::createCueRenderingTree):
(WebCore::VTTCue::getDisplayTree):
(WebCore::VTTCue::removeDisplayTree):
* Source/WebCore/html/track/VTTCue.h:

link: https://commits.webkit.org/250757@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294498 268f45cc-cd09-0410-ab3c-d52691b4dbfc

46 hours agoNeed to keep the document alive in KeyframeEffect::processKeyframes()
graouts@webkit.org [Thu, 19 May 2022 18:42:22 +0000 (18:42 +0000)]
Need to keep the document alive in KeyframeEffect::processKeyframes()
https://bugs.webkit.org/show_bug.cgi?id=240677
<rdar://93513759>

Reviewed by Saam Barati.

Since the Document is used throughout KeyframeEffect::processKeyframes and it's provided
as a simple reference, we must ensure we keep it alive with a Ref since JS code in a custom
iterator for the keyframes object could cause it to be torn down.

* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::processKeyframes):

link: https://commits.webkit.org/250756@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294497 268f45cc-cd09-0410-ab3c-d52691b4dbfc

46 hours ago[Xcode] Prevent STP and other self-contained builds from overwriting content in the...
emw@apple.com [Thu, 19 May 2022 18:32:41 +0000 (18:32 +0000)]
[Xcode] Prevent STP and other self-contained builds from overwriting content in the macOS SDK
https://bugs.webkit.org/show_bug.cgi?id=240408

Reviewed by Alexey Proskuryakov.

When building with WK_OVERRIDE_FRAMEWORKS_DIR, we assume that WebKit is
being built as part of a self-contained application, e.g. Safari
Technology Preview. This means that most content is installed to the
override directory, instead of the normal /System/Library/Frameworks
directory.

However, static library content (e.g. headers and archives
for bmalloc, webrtc, WTF) is _not_ installed to the override directory,
as it is not needed at runtime. It was being installed to the default
/usr/local prefix, where it would merge with and overwrite whatever
WebKit content was already present.

To prevent overwrites and other sorts of conflict with the
system-provided WebKit, introduce WK_LIBRARY_HEADERS_FOLDER_PATH and
WK_LIBRARY_INSTALL_PATH, which expand to /usr/local/include/safari-sdk
and /usr/local/lib/safari-sdk respectively when building in this mode.
Static library headers and archives are built to these locations, where
they're still in the expected SDK location, but won't clobber system
WebKit.

* Source/bmalloc/Configurations/Base.xcconfig:
* Source/bmalloc/Configurations/bmalloc.xcconfig:
* Source/bmalloc/Configurations/mbmalloc.xcconfig:
* Source/JavaScriptCore/Configurations/Base.xcconfig:
* Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig:
* Source/JavaScriptCore/DerivedSources.make:
* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/Scripts/generate-unified-sources.sh:
* Source/JavaScriptCore/offlineasm/config.rb:
* Source/JavaScriptCore/offlineasm/parser.rb:
* Source/ThirdParty/ANGLE/Configurations/ANGLE-dynamic.xcconfig:
* Source/ThirdParty/ANGLE/Configurations/AngleMetalLib.xcconfig:
* Source/ThirdParty/ANGLE/Configurations/Base.xcconfig:
* Source/ThirdParty/libwebrtc/Configurations/Base.xcconfig:
* Source/ThirdParty/libwebrtc/Configurations/boringssl.xcconfig:
* Source/ThirdParty/libwebrtc/Configurations/libabsl.xcconfig:
* Source/ThirdParty/libwebrtc/Configurations/libsrtp.xcconfig:
* Source/ThirdParty/libwebrtc/Configurations/libvpx.xcconfig:
* Source/ThirdParty/libwebrtc/Configurations/libwebm.xcconfig:
* Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig:
* Source/ThirdParty/libwebrtc/Configurations/libyuv.xcconfig:
* Source/ThirdParty/libwebrtc/Configurations/opus.xcconfig:
* Source/ThirdParty/libwebrtc/Configurations/usrsctp.xcconfig:
* Source/ThirdParty/libwebrtc/Configurations/yasm.xcconfig:
* Source/WebCore/PAL/Configurations/Base.xcconfig:
* Source/WebCore/PAL/Configurations/PAL.xcconfig:
* Source/WebGPU/Configurations/Base.xcconfig:
* Source/WebGPU/Configurations/WGSL.xcconfig:
* Source/WebGPU/Configurations/WGSLUnitTests.xcconfig:
* Source/WebGPU/Configurations/WebGPU.xcconfig:
* Source/WebKit/Configurations/Base.xcconfig:
* Source/WebKit/Configurations/BaseTarget.xcconfig:
* Source/WebKit/Configurations/SandboxProfiles.xcconfig:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKitLegacy/scripts/generate-unified-sources.sh:
* Source/WebKitLegacy/mac/Configurations/Base.xcconfig:
* Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig:
* Source/WTF/Configurations/Base.xcconfig:
* Source/WTF/Configurations/WTF.xcconfig:
* Source/WTF/Configurations/icu.xcconfig:
* Source/WebCore/Configurations/Base.xcconfig:
* Source/WebCore/Configurations/WebCore.xcconfig:
* Source/WebCore/Configurations/WebCoreTestSupport.xcconfig:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Scripts/generate-unified-sources.sh:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:

link: https://commits.webkit.org/250755@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294496 268f45cc-cd09-0410-ab3c-d52691b4dbfc

46 hours agoDelete WKHoverPlatter
timothy_horton@apple.com [Thu, 19 May 2022 18:18:01 +0000 (18:18 +0000)]
Delete WKHoverPlatter
https://bugs.webkit.org/show_bug.cgi?id=240623

Reviewed by Wenson Hsieh.

* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _allowsDoubleTapGestures]):
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.h:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _createAndConfigureHighlightLongPressGestureRecognizer]):
(-[WKContentView setUpInteraction]):
(-[WKContentView cleanUpInteraction]):
(-[WKContentView _locationForGesture:]):
(-[WKContentView _startPointForGesture:]):
(-[WKContentView _longPressRecognized:]):
(-[WKContentView _singleTapIdentified:]):
(-[WKContentView _singleTapRecognized:]):
(-[WKContentView _doubleTapRecognized:]):
(-[WKContentView _didCommitLoadForMainFrame]):
(-[WKContentView _shouldUseContextMenus]):
(-[WKContentView setUpDragAndDropInteractions]):
(-[WKContentView mouseGestureRecognizerChanged:]):
(-[WKContentView positionInformationForHoverPlatter:withRequest:completionHandler:]): Deleted.
(-[WKContentView interactionRegionsForHoverPlatter:inRect:completionHandler:]): Deleted.
* Source/WebKit/UIProcess/ios/WKHoverPlatter.h: Removed.
* Source/WebKit/UIProcess/ios/WKHoverPlatter.mm: Removed.
* Source/WebKit/UIProcess/ios/WKHoverPlatterParameters.h: Removed.
* Source/WebKit/UIProcess/ios/WKHoverPlatterParameters.mm: Removed.
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

link: https://commits.webkit.org/250754@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294495 268f45cc-cd09-0410-ab3c-d52691b4dbfc

46 hours ago[ iOS macOS Debug wk2 ] imported/w3c/web-platform-tests/html/semantics/embedded-conte...
rackler@apple.com [Thu, 19 May 2022 18:05:02 +0000 (18:05 +0000)]
[ iOS macOS Debug wk2 ] imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-move-into-script-disabled-iframe.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=240670
<rdar://93589033>

Unreviewed test gardening.

* LayoutTests/platform/ios/TestExpectations:

link: https://commits.webkit.org/250753@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294494 268f45cc-cd09-0410-ab3c-d52691b4dbfc

47 hours agoBuild fix for Release ASAN builds.
mark.lam@apple.com [Thu, 19 May 2022 17:50:30 +0000 (17:50 +0000)]
Build fix for Release ASAN builds.
https://bugs.webkit.org/show_bug.cgi?id=240667

Reviewed by Yusuke Suzuki.

JSC::ptrTagName() should also be defined for CPU(ARM64E) when ENABLE(DISASSEMBLER)
is true because it is used to support disassembly now.

* Source/JavaScriptCore/runtime/JSCPtrTag.cpp:
* Source/JavaScriptCore/runtime/JSCPtrTag.h:

link: https://commits.webkit.org/250752@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294493 268f45cc-cd09-0410-ab3c-d52691b4dbfc

47 hours agoBegin using coroutines in testing code
achristensen@apple.com [Thu, 19 May 2022 17:40:17 +0000 (17:40 +0000)]
Begin using coroutines in testing code
https://bugs.webkit.org/show_bug.cgi?id=235730

Reviewed by Darin Adler.

co_await is nicer than nested lambdas.
This begins WebKit's use of C++ coroutines in a small, incomplete, and low-risk way by using it with test code.

link: https://commits.webkit.org/250751@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294492 268f45cc-cd09-0410-ab3c-d52691b4dbfc

47 hours agogit-webkit setup: Fix various pitfalls with credentials input
aboya@igalia.com [Thu, 19 May 2022 17:13:30 +0000 (17:13 +0000)]
git-webkit setup: Fix various pitfalls with credentials input
https://bugs.webkit.org/show_bug.cgi?id=240574

Reviewed by Jonathan Bedard.

Yesterday I tried to run `git webkit setup`.

To put it mildly, it wasn't a smooth ride. I ended up having to debug the
tooling for hours just to be able to get it running.

This patch fixes several issues I found during the process, so that the next
unlucky person doesn't have to go through this again.

1. Whenever a request failed, the response from the server was not shown in
anyway, instead printing an unhelpful generic message. This patch adds code to
write to the screen the responses obtained from the GitHub API, so that the
next person having problems with it doesn't need to add debugging code to know
what is wrong.

2. When copying and pasting tokens from the browser it's very easy to
accidentally grab some leading or trailing whitespace. This is especially easy
to miss for the blind terminal key prompt. This patch adds code to trim these
fields. This is generally good UX practice since leading and trailing spaces
are virtually always accidental. [1]

3. The validation code for GitHub username and token was not run under `git
webkit setup`. Looking at the code it's clear the intention was for that
validation to be done to check (1) a plain GitHub username is used instead of
an email address associated to that account and (2) that a test log-in
succeeds. But because the credentials function is called in many places, the
first instance that actually gets called happens to not set validate=True in
the arguments.

   Validating passwords that have just been input for the first time should not
be an optional feature that is disabled by default. Otherwise any mistake in
the credentials input can cause cryptic errors and the user is left on their
own to figure out what is going on, and eventually, how to manually interact
with the keychain to remove or edit the bogus username and/or token. This patch
makes changes so that validation is made whenever the user is prompt for
username and token, no matter in what codepath this becomes necessary.

[1] https://tonyshowoff.com/articles/should-you-trim-passwords/

* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/bugzilla.py:
(Tracker.credentials):
* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py:
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/credentials.py:
(credentials):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.github):

link: https://commits.webkit.org/250750@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294491 268f45cc-cd09-0410-ab3c-d52691b4dbfc

47 hours agoAdd Razvan Caliman's GitHub username to contributors.json
rcaliman@apple.com [Thu, 19 May 2022 17:10:02 +0000 (17:10 +0000)]
Add Razvan Caliman's GitHub username to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=240663

Reviewed by Jonathan Bedard.

Adding my GitHub username to contributors.json

* metadata/contributors.json:

link: https://commits.webkit.org/250749@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294490 268f45cc-cd09-0410-ab3c-d52691b4dbfc

47 hours agogit webkit setup ignores configured editor (Part 2)
jbedard@apple.com [Thu, 19 May 2022 17:07:32 +0000 (17:07 +0000)]
git webkit setup ignores configured editor (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=240529
<rdar://93521972>

Reviewed by Alexey Proskuryakov.

* 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:
(Git): Allow whitespace in config keys.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.git): Pull editor from environment variables, if available.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py:

link: https://commits.webkit.org/250748@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294489 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 days ago[ iOS Debug ] fast/text/isolate-ignore.html is a consistent crash
rackler@apple.com [Thu, 19 May 2022 16:43:56 +0000 (16:43 +0000)]
[ iOS Debug ] fast/text/isolate-ignore.html is a consistent crash
https://bugs.webkit.org/show_bug.cgi?id=240659
<rdar://93582407>

Unreviewed test gardening.

* LayoutTests/platform/ios/TestExpectations:

link: https://commits.webkit.org/250747@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294488 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 days agoimportedScript service worker loads should not have ServiceWorker headers
commit-queue@webkit.org [Thu, 19 May 2022 16:28:06 +0000 (16:28 +0000)]
importedScript service worker loads should not have ServiceWorker headers
https://bugs.webkit.org/show_bug.cgi?id=240571

Patch by Youenn Fablet <youennf@gmail.com> on 2022-05-19
Reviewed by Chris Dumez.

In case of update, we were reloading imported scripts with ServiceWorker header.
Prevent this as this is not as per spec.

Test: http/wpt/service-workers/update-with-importScripts.html

* Source/WebCore/workers/service/ServiceWorkerJob.cpp:
(WebCore::scriptResourceRequest):
(WebCore::ServiceWorkerJob::ImportedScriptsLoader::load):
(WebCore::ServiceWorkerJob::fetchScriptWithContext):
* Source/WebCore/workers/service/server/SWServer.cpp:
(WebCore::SWServer::createScriptRequest):
(WebCore::SWServer::startScriptFetch):
* LayoutTests/http/wpt/service-workers/resources/update-with-importScripts-script.py: Added.
(main):
* LayoutTests/http/wpt/service-workers/resources/update-with-importScripts-worker.js: Added.
* LayoutTests/http/wpt/service-workers/update-with-importScripts-expected.txt: Added.
* LayoutTests/http/wpt/service-workers/update-with-importScripts.html: Added.
* LayoutTests/platform/mac/TestExpectations:

link: https://commits.webkit.org/250746@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294487 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 days agoDebug assertion on launch when using an ASAN build on macOS Apple Silicon.
mark.lam@apple.com [Thu, 19 May 2022 16:06:36 +0000 (16:06 +0000)]
Debug assertion on launch when using an ASAN build on macOS Apple Silicon.
https://bugs.webkit.org/show_bug.cgi?id=240655

Reviewed by Chris Dumez.

Temporarily disabling ENABLE(JIT_OPERATION_DISASSEMBLY) on ASAN builds as a workaround.

* Source/WTF/wtf/PlatformEnable.h:

link: https://commits.webkit.org/250745@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294486 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 days agoREGRESSION (r294291): Nullptr crash with :first-letter
antti@apple.com [Thu, 19 May 2022 15:46:15 +0000 (15:46 +0000)]
REGRESSION (r294291): Nullptr crash with :first-letter
https://bugs.webkit.org/show_bug.cgi?id=240631
<rdar://93495868>

Reviewed by Alan Bujtas.

Test: fast/css/first-letter-multicol-crash.html

* Source/WebCore/rendering/RenderObject.h:
* Source/WebCore/rendering/updating/RenderTreeBuilderFirstLetter.cpp:

With multicol there can be multiple levels of anonymous ancestors. Search for the
nearest non-anonymous ancestor to find the first-letter style.

(WebCore::styleForFirstLetter):
* LayoutTests/fast/css-generated-content/first-letter-in-nested-before-table-expected.html:

Update expected results. The new results match Chrome behavior.

* LayoutTests/fast/css/first-letter-multicol-crash-expected.txt: Added.
* LayoutTests/fast/css/first-letter-multicol-crash.html: Added.

link: https://commits.webkit.org/250744@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294485 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 days agoREGRESSION (r294452): [ iOS ] ImageBufferIOSurfaceBackend - nine tests are a consiste...
rackler@apple.com [Thu, 19 May 2022 15:40:42 +0000 (15:40 +0000)]
REGRESSION (r294452): [ iOS ] ImageBufferIOSurfaceBackend - nine tests are a consistent image failure
https://bugs.webkit.org/show_bug.cgi?id=240654
<rdar://93578166>

Unreviewed test gardening.

* LayoutTests/platform/ios/TestExpectations:

link: https://commits.webkit.org/250743@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294484 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 days agoLink Alicia Boya Garcia's GitHub to contributors.json
aboya@igalia.com [Thu, 19 May 2022 15:36:21 +0000 (15:36 +0000)]
Link Alicia Boya Garcia's GitHub to contributors.json

Reviewed by Jonathan Bedard.

* metadata/contributors.json:

link: https://commits.webkit.org/250742@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294483 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 days agoREGRESSION (250635@main): TestWebKitAPI.PushAPI.pushEventsAndInspectedServiceWorker...
commit-queue@webkit.org [Thu, 19 May 2022 15:28:47 +0000 (15:28 +0000)]
REGRESSION (250635@main): TestWebKitAPI.PushAPI.pushEventsAndInspectedServiceWorker is failing
https://bugs.webkit.org/show_bug.cgi?id=240612
rdar://problem/93537478

Patch by Youenn Fablet <youennf@gmail.com> on 2022-05-19
Reviewed by Chris Dumez.

The test was failing as the injection of internals in a ServiceWorkerGlobalScope might happen after firing a push event.
To prevent this, we now do the injection by posting a task to the service worker right after starting the service worker thread
instead of after the script has been executed.

* Source/WebCore/workers/service/context/SWContextManager.cpp:

link: https://commits.webkit.org/250741@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294482 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 days agoUpdate WPT dom/nodes/aria-element-reflection.tentative.html test
rego@igalia.com [Thu, 19 May 2022 15:13:42 +0000 (15:13 +0000)]
Update WPT dom/nodes/aria-element-reflection.tentative.html test
https://bugs.webkit.org/show_bug.cgi?id=240641

Reviewed by Chris Dumez.

Update test and expectations.
The new failure is due to https://webkit.org/b/240563.

* LayoutTests/imported/w3c/web-platform-tests/dom/nodes/aria-element-reflection.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/dom/nodes/aria-element-reflection.tentative.html:

link: https://commits.webkit.org/250740@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294481 268f45cc-cd09-0410-ab3c-d52691b4dbfc