[webkit-changes] [294987] trunk/Source/WebKit/UIProcess
Title: [294987] trunk/Source/WebKit/UIProcess Revision 294987 Author mattwood...@apple.com Date 2022-05-27 22:25:49 -0700 (Fri, 27 May 2022) Log Message Use desktop User Agent when preconnecting for loads that are predicted to use desktop content mode https://bugs.webkit.org/show_bug.cgi?id=240938 Reviewed by Geoffrey Garen. * Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _preconnectToServer:]): * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadRequestWithNavigationShared): (WebKit::WebPageProxy::preconnectTo): * Source/WebKit/UIProcess/WebPageProxy.h: * Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::useDesktopClassBrowsing const): (WebKit::WebPageProxy::predictedUserAgentForRequest const): (WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies): * Source/WebKit/UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::predictedUserAgentForRequest const): Canonical link: https://commits.webkit.org/251091@main Modified Paths trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm trunk/Source/WebKit/UIProcess/WebPageProxy.cpp trunk/Source/WebKit/UIProcess/WebPageProxy.h trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm Diff Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (294986 => 294987) --- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2022-05-28 05:24:00 UTC (rev 294986) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2022-05-28 05:25:49 UTC (rev 294987) @@ -3438,7 +3438,7 @@ - (void)_preconnectToServer:(NSURL *)url { THROW_IF_SUSPENDED; -_page->preconnectTo(url); +_page->preconnectTo(url, _page->userAgent()); } - (BOOL)_canUseCredentialStorage Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (294986 => 294987) --- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2022-05-28 05:24:00 UTC (rev 294986) +++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2022-05-28 05:25:49 UTC (rev 294987) @@ -1447,7 +1447,7 @@ addPlatformLoadParameters(process, loadParameters); if (shouldTreatAsContinuingLoad == ShouldTreatAsContinuingLoad::No) -preconnectTo(url); +preconnectTo(url, predictedUserAgentForRequest(loadParameters.request)); navigation.setIsLoadedWithNavigationShared(true); @@ -4697,7 +4697,7 @@ m_pageLoadState.setNetworkRequestsInProgress(transaction, networkRequestsInProgress); } -void WebPageProxy::preconnectTo(const URL& url) +void WebPageProxy::preconnectTo(const URL& url, const String& userAgent) { if (!m_websiteDataStore->configuration().allowsServerPreconnect()) return; @@ -4704,7 +4704,7 @@ auto storedCredentialsPolicy = m_canUseCredentialStorage ? WebCore::StoredCredentialsPolicy::Use : WebCore::StoredCredentialsPolicy::DoNotUse; -websiteDataStore().networkProcess().preconnectTo(sessionID(), identifier(), webPageID(), url, userAgent(), storedCredentialsPolicy, isNavigatingToAppBoundDomain(), m_lastNavigationWasAppInitiated ? LastNavigationWasAppInitiated::Yes : LastNavigationWasAppInitiated::No); +websiteDataStore().networkProcess().preconnectTo(sessionID(), identifier(), webPageID(), url, userAgent, storedCredentialsPolicy, isNavigatingToAppBoundDomain(), m_lastNavigationWasAppInitiated ? LastNavigationWasAppInitiated::Yes : LastNavigationWasAppInitiated::No); } void WebPageProxy::setCanUseCredentialStorage(bool canUseCredentialStorage) Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (294986 => 294987) --- trunk/Source/WebKit/UIProcess/WebPageProxy.h 2022-05-28 05:24:00 UTC (rev 294986) +++ trunk/Source/WebKit/UIProcess/WebPageProxy.h 2022-05-28 05:25:49 UTC (rev 294987) @@ -1085,6 +1085,11 @@ void setCustomUserAgent(const String&); const String& customUserAgent() const { return m_customUserAgent; } static String standardUserAgent(const String& applicationName = String()); +#if PLATFORM(IOS_FAMILY) +String predictedUserAgentForRequest(const WebCore::ResourceRequest&) const; +#else +String predictedUserAgentForRequest(const WebCore::ResourceRequest&) const { return userAgent(); } +#endif bool supportsTextEncoding() const; void setCustomTextEncodingName(const String&); @@ -1972,7 +1977,7 @@ WebPopupMenuProxy* activePopupMenu() const { return m_activePopupMenu.get(); } -void preconnectTo(const URL&); +void preconnectTo(const URL&, const String& userAgent); bool canUseCredentialStorage() { return m_canUseCredentialStorage; } void setCanUseCredentialStorage(bool); @@ -2433,6 +2438,7 @@ bool isValidPerformActionOnElementAuthorizationToken(const String& authorizationToken) const; bool isDesktopClassBrowsingRecommended(const WebCore::ResourceRequest&) const; +bool useDesktopClassBrowsing(const API::WebsitePolicies&, const WebCore::ResourceRequest&) const; #endif void focusedFrameChanged(const std::optional&); Modified: trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (294986 =>
[webkit-changes] [294986] trunk/Source/WebKit/WebProcess/FullScreen/ WebFullScreenManager.cpp
Title: [294986] trunk/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp Revision 294986 Author wenson_hs...@apple.com Date 2022-05-27 22:24:00 -0700 (Fri, 27 May 2022) Log Message Trigger element fullscreen video extraction after the `seeked` event https://bugs.webkit.org/show_bug.cgi?id=241053 Reviewed by Devin Rousso. * Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::WebFullScreenManager::handleEvent): (WebKit::WebFullScreenManager::setMainVideoElement): Canonical link: https://commits.webkit.org/251090@main Modified Paths trunk/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp Diff Modified: trunk/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp (294985 => 294986) --- trunk/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp 2022-05-28 04:30:41 UTC (rev 294985) +++ trunk/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp 2022-05-28 05:24:00 UTC (rev 294986) @@ -387,7 +387,8 @@ } if (targetElement == m_mainVideoElement.get()) { -if (m_mainVideoElement && m_mainVideoElement->paused()) +auto& targetVideoElement = downcast(*targetElement); +if (targetVideoElement.paused() && !targetVideoElement.seeking()) scheduleMainVideoElementExtraction(); else endMainVideoElementExtractionIfNeeded(); @@ -439,6 +440,7 @@ static NeverDestroyed eventsToObserve = std::array { WebCore::eventNames().seekingEvent, +WebCore::eventNames().seekedEvent, WebCore::eventNames().playingEvent, WebCore::eventNames().pauseEvent, }; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [294985] trunk/Source/WebInspectorUI/UserInterface/Models/CSSProperty.js
Title: [294985] trunk/Source/WebInspectorUI/UserInterface/Models/CSSProperty.js Revision 294985 Author drou...@apple.com Date 2022-05-27 21:30:41 -0700 (Fri, 27 May 2022) Log Message Web Inspector: CSS property name counts should be updated atomically https://bugs.webkit.org/show_bug.cgi?id=240994 Reviewed by Patrick Angle. Consider the following example: ``` display: foo; display: bar; ``` Before this change, the following would happen: a. get the cached count of `display: foo` b. increment the cached count of `display: foo` by 1 c. get the stored count of `display: foo` d. get the cached count of `display: bar` e. increment the cached count of `display: bar` by 1 f. get the stored count of `display: bar` (async) g. increment the stored count of `display: foo` (from c) by 1 (async) h. increment the stored count of `display: bar` (from f) by 1 The problem is that g/h get the same stored count because c/f happened before any updates occurred. After this change, the following would happen: a. get the cached count of `display: foo` b. increment the cached count of `display: foo` by 1 c. get the cached count of `display: bar` d. increment the cached count of `display: bar` by 1 (async) e. get the stored count of `display: foo` (async) f. increment the stored count of `display: foo` (from e) by 1 (async) g. get the stored count of `display: bar` (async) h. increment the stored count of `display: bar` (from g) by 1 By ensuring there is never more than one active operation on `WI.objectStores.cssPropertyNameCounts` at a time, it is guaranteed that values will never be trampled over (though it takes a bit longer). * Source/WebInspectorUI/UserInterface/Models/CSSProperty.js: (WI.CSSProperty._initializePropertyNameCounts): (WI.CSSProperty.prototype._updateName.changeCount): Canonical link: https://commits.webkit.org/251089@main Modified Paths trunk/Source/WebInspectorUI/UserInterface/Models/CSSProperty.js Diff Modified: trunk/Source/WebInspectorUI/UserInterface/Models/CSSProperty.js (294984 => 294985) --- trunk/Source/WebInspectorUI/UserInterface/Models/CSSProperty.js 2022-05-28 04:22:16 UTC (rev 294984) +++ trunk/Source/WebInspectorUI/UserInterface/Models/CSSProperty.js 2022-05-28 04:30:41 UTC (rev 294985) @@ -119,12 +119,15 @@ WI.CSSProperty._cachedNameCounts = {}; -WI.objectStores.cssPropertyNameCounts.getAllKeys().then((propertyNames) => { -for (let propertyName of propertyNames) { -WI.objectStores.cssPropertyNameCounts.get(propertyName).then((storedCount) => { +WI.CSSProperty._storedNameCountsQueue = new Promise((resolve, reject) => { +WI.objectStores.cssPropertyNameCounts.getAllKeys().then((propertyNames) => { +Promise.allSettled(propertyNames.map(async (propertyName) => { +let storedCount = await WI.objectStores.cssPropertyNameCounts.get(propertyName); + WI.CSSProperty._cachedNameCounts[propertyName] = (WI.CSSProperty._cachedNameCounts[propertyName] || 0) + storedCount; -}); -} +})) +.then(resolve, reject); +}); }); } @@ -567,9 +570,11 @@ console.assert(delta > 0 || cachedCount >= delta, cachedCount, delta); WI.CSSProperty._cachedNameCounts[propertyName] = Math.max(0, (cachedCount || 0) + delta); -WI.objectStores.cssPropertyNameCounts.get(propertyName).then((storedCount) => { +WI.CSSProperty._storedNameCountsQueue = WI.CSSProperty._storedNameCountsQueue.finally(async () => { +let storedCount = await WI.objectStores.cssPropertyNameCounts.get(propertyName); + console.assert(delta > 0 || storedCount >= delta, storedCount, delta); -WI.objectStores.cssPropertyNameCounts.put(Math.max(0, (storedCount || 0) + delta), propertyName); +await WI.objectStores.cssPropertyNameCounts.put(Math.max(0, (storedCount || 0) + delta), propertyName); }); if (propertyName !== this.canonicalName) @@ -616,6 +621,7 @@ }; WI.CSSProperty._cachedNameCounts = null; +WI.CSSProperty._storedNameCountsQueue = null; WI.CSSProperty.Event = { Changed: "css-property-changed", ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [294984] trunk/Source/WebCore/html/InputType.cpp
Title: [294984] trunk/Source/WebCore/html/InputType.cpp Revision 294984 Author cdu...@apple.com Date 2022-05-27 21:22:16 -0700 (Fri, 27 May 2022) Log Message Optimize InputType::create() by reducing calls to AtomString::convertToASCIILowercase() https://bugs.webkit.org/show_bug.cgi?id=241043 Reviewed by Cameron McCormack. In the common case, InputType::create() gets called with a `type` string that is already lowercase. As a result, we would iterate over the whole string unnecessarily under convertToASCIILowercase() to verify that it is already lowercase, just to look up the type in a HashMap. To avoid this, we now trying to look up the type in the HashMap directly, and only fallback to calling convertToASCIILowercase() in the rare case where the look up failed. On my Apple Silicon MacBook Pro, this reduces the number of samples under convertToASCIILowercase() from 17 to 4. Also reduces the number of samples under InputType::create() from 21 to 12. * Source/WebCore/html/InputType.cpp: (WebCore::createInputTypeFactoryMap): (WebCore::findFactory): (WebCore::InputType::create): Canonical link: https://commits.webkit.org/251088@main Modified Paths trunk/Source/WebCore/html/InputType.cpp Diff Modified: trunk/Source/WebCore/html/InputType.cpp (294983 => 294984) --- trunk/Source/WebCore/html/InputType.cpp 2022-05-28 04:10:06 UTC (rev 294983) +++ trunk/Source/WebCore/html/InputType.cpp 2022-05-28 04:22:16 UTC (rev 294984) @@ -131,6 +131,7 @@ { nullptr, ::search, }, { nullptr, ::submit, }, { nullptr, ::telephone, }, +{ nullptr, ::text, }, #if ENABLE(INPUT_TYPE_TIME) { ::inputTypeTimeEnabled, ::time, }, #endif @@ -138,7 +139,6 @@ #if ENABLE(INPUT_TYPE_WEEK) { ::inputTypeWeekEnabled, ::week, }, #endif -// No need to register "text" because it is the default type. }; InputTypeFactoryMap map; @@ -147,12 +147,20 @@ return map; } +static inline std::pair findFactory(const AtomString& typeName) +{ +static NeverDestroyed factoryMap = createInputTypeFactoryMap(); +auto factory = factoryMap.get().get(typeName); +if (UNLIKELY(!factory.second)) +factory = factoryMap.get().get(typeName.convertToASCIILowercase()); +return factory; +} + Ref InputType::create(HTMLInputElement& element, const AtomString& typeName) { if (!typeName.isEmpty()) { -static NeverDestroyed factoryMap = createInputTypeFactoryMap(); -auto&& [conditional, factory] = factoryMap.get().get(typeName.convertToASCIILowercase()); -if (factory && (!conditional || std::invoke(conditional, element.document().settings( +auto [conditional, factory] = findFactory(typeName); +if (LIKELY(factory && (!conditional || std::invoke(conditional, element.document().settings() return factory(element); } return adoptRef(*new TextInputType(element)); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [294983] trunk/Source/WebCore/layout/formattingContexts/flex/ FlexFormattingContext.cpp
Title: [294983] trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp Revision 294983 Author za...@apple.com Date 2022-05-27 21:10:06 -0700 (Fri, 27 May 2022) Log Message Introduce base-size to the flex algorithm https://bugs.webkit.org/show_bug.cgi?id=241001 Reviewed by Antti Koivisto. This is in preparation for supporting flex-basis, where the flex-basis value is used as the base for flexing. * Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp: (WebCore::Layout::FlexFormattingContext::computeLogicalWidthForShrinkingFlexItems): (WebCore::Layout::FlexFormattingContext::computeLogicalWidthForFlexItems): Canonical link: https://commits.webkit.org/251087@main Modified Paths trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp Diff Modified: trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp (294982 => 294983) --- trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp 2022-05-28 04:05:00 UTC (rev 294982) +++ trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp 2022-05-28 04:10:06 UTC (rev 294983) @@ -217,13 +217,14 @@ // Collect flex items with non-zero flex-shrink value. flex-shrink: 0 flex items // don't participate in content flexing. for (size_t index = 0; index < logicalFlexItemList.size(); ++index) { -auto& logicalFlexItem = logicalFlexItemList[index]; -if (auto flexShrink = logicalFlexItem.layoutBox->style().flexShrink()) { +auto& flexItem = logicalFlexItemList[index]; +auto baseSize = flexItem.rect.width(); +if (auto flexShrink = flexItem.layoutBox->style().flexShrink()) { shrinkingItems.append(index); -totalShrink += flexShrink; -totalFlexibleSpace += logicalFlexItem.rect.width(); +totalShrink += flexShrink * baseSize; +totalFlexibleSpace += baseSize; } else -availableSpace -= logicalFlexItem.rect.width(); +availableSpace -= baseSize; } if (totalShrink) flexShrinkBase = (totalFlexibleSpace - availableSpace) / totalShrink; @@ -236,12 +237,13 @@ for (auto flexItemIndex : shrinkingItems) { auto& flexItem = logicalFlexItemList[flexItemIndex]; -auto flexShrink = flexItem.layoutBox->style().flexShrink(); -auto flexedSize = flexItem.rect.width() - (flexShrink * flexShrinkBase); +auto baseSize = flexItem.rect.width(); +auto flexShrink = flexItem.layoutBox->style().flexShrink() * baseSize; +auto flexedSize = baseSize - (flexShrink * flexShrinkBase); auto minimumSize = formattingState.intrinsicWidthConstraintsForBox(*flexItem.layoutBox)->minimum; if (minimumSize >= flexedSize) { totalShrink -= flexShrink; -totalFlexibleSpace -= flexItem.rect.width(); +totalFlexibleSpace -= baseSize; availableSpace -= minimumSize; } } @@ -254,8 +256,9 @@ for (auto flexItemIndex : shrinkingItems) { auto& flexItem = logicalFlexItemList[flexItemIndex]; -auto flexShrink = flexItem.layoutBox->style().flexShrink(); -auto flexedSize = LayoutUnit { flexItem.rect.width() - (flexShrink * flexShrinkBase) }; +auto baseSize = flexItem.rect.width(); +auto flexShrink = flexItem.layoutBox->style().flexShrink() * baseSize; +auto flexedSize = LayoutUnit { baseSize - (flexShrink * flexShrinkBase) }; auto minimumSize = formattingState.intrinsicWidthConstraintsForBox(*flexItem.layoutBox)->minimum; flexItem.rect.setWidth(std::max(minimumSize, flexedSize)); } @@ -340,13 +343,13 @@ for (auto& logicalFlexItem : logicalFlexItemList) logicalWidth += logicalFlexItem.rect.width(); return logicalWidth; -}; +}(); if (!availableSpace) ASSERT_NOT_IMPLEMENTED_YET(); -else if (*availableSpace > contentLogicalWidth()) +else if (*availableSpace > contentLogicalWidth) computeLogicalWidthForStretchingFlexItems(logicalFlexItemList, *availableSpace); -else +else if (*availableSpace < contentLogicalWidth) computeLogicalWidthForShrinkingFlexItems(logicalFlexItemList, *availableSpace); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [294982] trunk/Source/WebKit
Title: [294982] trunk/Source/WebKit Revision 294982 Author wenson_hs...@apple.com Date 2022-05-27 21:05:00 -0700 (Fri, 27 May 2022) Log Message Rename the WebKit2 `Image` logging category to `ImageAnalysis` https://bugs.webkit.org/show_bug.cgi?id=241032 Reviewed by Devin Rousso. This existing logging category is only used for image analysis -- as such, the logging category should be renamed to reflect that. This also avoids confusing these logs with the Images logging category in WebCore, which is really about image decoding, rendering and painting. No change in behavior. * Source/WebKit/Platform/Logging.h: * Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::requestTextRecognition): (WebKit::WebViewImpl::computeHasVisualSearchResults): (WebKit::WebViewImpl::installImageAnalysisOverlayView): Deleted. (WebKit::WebViewImpl::uninstallImageAnalysisOverlayView): Deleted. * Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _cancelImageAnalysis]): (-[WKContentView validateImageAnalysisRequestIdentifier:]): (-[WKContentView imageAnalysisGestureDidBegin:]): (-[WKContentView _completeImageAnalysisRequestForContextMenu:requestIdentifier:hasTextResults:]): (-[WKContentView imageAnalysisGestureDidTimeOut:]): (-[WKContentView installImageAnalysisInteraction:]): Deleted. (-[WKContentView uninstallImageAnalysisInteraction]): Deleted. Canonical link: https://commits.webkit.org/251086@main Modified Paths trunk/Source/WebKit/Platform/Logging.h trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit/Platform/Logging.h (294981 => 294982) --- trunk/Source/WebKit/Platform/Logging.h 2022-05-28 03:37:10 UTC (rev 294981) +++ trunk/Source/WebKit/Platform/Logging.h 2022-05-28 04:05:00 UTC (rev 294982) @@ -59,7 +59,7 @@ M(IPCMessages) \ M(ITPDebug) \ M(IconDatabase) \ -M(Images) \ +M(ImageAnalysis) \ M(IncrementalPDF) \ M(IncrementalPDFVerbose) \ M(IndexedDB) \ Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (294981 => 294982) --- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm 2022-05-28 03:37:10 UTC (rev 294981) +++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm 2022-05-28 04:05:00 UTC (rev 294982) @@ -276,7 +276,7 @@ auto startTime = MonotonicTime::now(); processImageAnalyzerRequest(request.get(), [completion = WTFMove(completion), startTime] (CocoaImageAnalysis *analysis, NSError *) mutable { auto result = makeTextRecognitionResult(analysis); -RELEASE_LOG(Images, "Image analysis completed in %.0f ms (found text? %d)", (MonotonicTime::now() - startTime).milliseconds(), !result.isEmpty()); +RELEASE_LOG(ImageAnalysis, "Image analysis completed in %.0f ms (found text? %d)", (MonotonicTime::now() - startTime).milliseconds(), !result.isEmpty()); completion(WTFMove(result)); }); } @@ -294,7 +294,7 @@ [ensureImageAnalyzer() processRequest:request.get() progressHandler:nil completionHandler:makeBlockPtr([completion = WTFMove(completion), startTime] (CocoaImageAnalysis *analysis, NSError *) mutable { BOOL result = [analysis hasResultsForAnalysisTypes:VKAnalysisTypeVisualSearch]; CFRunLoopPerformBlock(CFRunLoopGetMain(), (__bridge CFStringRef)NSEventTrackingRunLoopMode, makeBlockPtr([completion = WTFMove(completion), result, startTime] () mutable { -RELEASE_LOG(Images, "Image analysis completed in %.0f ms (found visual search results? %d)", (MonotonicTime::now() - startTime).milliseconds(), result); +RELEASE_LOG(ImageAnalysis, "Image analysis completed in %.0f ms (found visual search results? %d)", (MonotonicTime::now() - startTime).milliseconds(), result); completion(result); }).get()); CFRunLoopWakeUp(CFRunLoopGetMain()); @@ -5927,36 +5927,6 @@ #endif // ENABLE(REVEAL) -#if ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS) - -void WebViewImpl::installImageAnalysisOverlayView(VKCImageAnalysis *analysis) -{ -if (!m_imageAnalysisOverlayView) { -m_imageAnalysisOverlayView = adoptNS([PAL::allocVKCImageAnalysisOverlayViewInstance() initWithFrame:[m_view bounds]]); -m_imageAnalysisOverlayViewDelegate = adoptNS([[WKImageAnalysisOverlayViewDelegate alloc] initWithWebViewImpl:*this]); -[m_imageAnalysisOverlayView setDelegate:m_imageAnalysisOverlayViewDelegate.get()]; -[m_imageAnalysisOverlayView setActiveInteractionTypes:VKImageAnalysisInteractionTypeTextSelection | VKImageAnalysisInteractionTypeDataDetectors]; -[m_imageAnalysisOverlayView setWantsAutomaticContentsRectCalculation:NO]; -setUpAdditionalImageAnalysisBehaviors(m_imageAnalysisOverlayView.get()); -} - -[m_imageAnalysisOverlayView setAnalysis:analysis]; -[m_view addSubview:m_imageAnalysisOverlayView.get()]; -} - -void WebViewImpl::uninstallImageAnalysisOverlayView() -{ -if
[webkit-changes] [294981] trunk/Source/WebCore
Title: [294981] trunk/Source/WebCore Revision 294981 Author hey...@apple.com Date 2022-05-27 20:37:10 -0700 (Fri, 27 May 2022) Log Message Fix sense of the display list AsTextFlags https://bugs.webkit.org/show_bug.cgi?id=240939 Reviewed by Simon Fraser. They do the opposite of what their names suggest. * Source/WebCore/platform/graphics/displaylists/DisplayList.cpp: (WebCore::DisplayList::DisplayList::shouldDumpForFlags): (WebCore::DisplayList::DisplayList::dump const): * Source/WebCore/platform/graphics/displaylists/DisplayListItemType.h: * Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp: (WebCore::DisplayList::dumpItem): * Source/WebCore/platform/graphics/displaylists/DisplayListItems.h: (WebCore::DisplayList::operator<<): * Source/WebCore/testing/Internals.cpp: (WebCore::Internals::displayListForElement): (WebCore::Internals::replayDisplayListForElement): (WebCore::Internals::cachedGlyphDisplayListsForTextNode): * Source/WebCore/testing/Internals.h: * Source/WebCore/testing/Internals.idl: Canonical link: https://commits.webkit.org/251085@main Modified Paths trunk/Source/WebCore/platform/graphics/displaylists/DisplayList.cpp trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemType.h trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.h trunk/Source/WebCore/testing/Internals.cpp trunk/Source/WebCore/testing/Internals.h trunk/Source/WebCore/testing/Internals.idl Diff Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayList.cpp (294980 => 294981) --- trunk/Source/WebCore/platform/graphics/displaylists/DisplayList.cpp 2022-05-28 03:16:46 UTC (rev 294980) +++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayList.cpp 2022-05-28 03:37:10 UTC (rev 294981) @@ -87,7 +87,7 @@ { switch (item.type()) { case ItemType::SetState: -if (!flags.contains(AsTextFlag::IncludesPlatformOperations)) { +if (flags.contains(AsTextFlag::IncludePlatformOperations)) { const auto& stateItem = item.get(); // FIXME: for now, only drop the item if the only state-change flags are platform-specific. if (stateItem.state().changes() == GraphicsContextState::Change::ShouldSubpixelQuantizeFonts) @@ -97,7 +97,7 @@ #if USE(CG) case ItemType::ApplyFillPattern: case ItemType::ApplyStrokePattern: -if (!flags.contains(AsTextFlag::IncludesPlatformOperations)) +if (flags.contains(AsTextFlag::IncludePlatformOperations)) return false; break; #endif @@ -136,7 +136,7 @@ for (auto displayListItem : *this) { auto [item, extent, itemSizeInBuffer] = displayListItem.value(); TextStream::GroupScope group(ts); -dumpItemHandle(ts, item, { AsTextFlag::IncludesPlatformOperations, AsTextFlag::IncludesResourceIdentifiers }); +dumpItemHandle(ts, item, { AsTextFlag::IncludePlatformOperations, AsTextFlag::IncludeResourceIdentifiers }); if (item.isDrawingItem()) ts << " extent " << extent; } Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemType.h (294980 => 294981) --- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemType.h 2022-05-28 03:16:46 UTC (rev 294980) +++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItemType.h 2022-05-28 03:37:10 UTC (rev 294981) @@ -29,9 +29,8 @@ namespace DisplayList { enum class AsTextFlag : uint8_t { -IncludesPlatformOperations = 1 << 0, -IncludesResourceIdentifiers = 1 << 1, -DecomposesDrawGlyphs= 1 << 2, +IncludePlatformOperations = 1 << 0, +IncludeResourceIdentifiers = 1 << 1, }; enum class ItemType : uint8_t { Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp (294980 => 294981) --- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp 2022-05-28 03:16:46 UTC (rev 294980) +++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp 2022-05-28 03:37:10 UTC (rev 294981) @@ -767,7 +767,7 @@ void dumpItem(TextStream& ts, const ClipToImageBuffer& item, OptionSet flags) { -if (!flags.contains(AsTextFlag::IncludesResourceIdentifiers)) +if (flags.contains(AsTextFlag::IncludeResourceIdentifiers)) ts.dumpProperty("image-buffer-identifier", item.imageBufferIdentifier()); ts.dumpProperty("dest-rect", item.destinationRect()); } @@ -785,7 +785,7 @@ void dumpItem(TextStream& ts, const DrawFilteredImageBuffer& item, OptionSet flags) { -if (!flags.contains(AsTextFlag::IncludesResourceIdentifiers)) +if (flags.contains(AsTextFlag::IncludeResourceIdentifiers)) ts.dumpProperty("source-image-identifier", item.sourceImageIdentifier()); ts.dumpProperty("source-image-rect", item.sourceImageRect()); } @@ -801,7 +801,7 @@ void dumpItem(TextStream& ts, const
[webkit-changes] [294980] trunk/Source/WebCore/dom
Title: [294980] trunk/Source/WebCore/dom Revision 294980 Author cdu...@apple.com Date 2022-05-27 20:16:46 -0700 (Fri, 27 May 2022) Log Message Remove some unnecessary work from the Node destructor https://bugs.webkit.org/show_bug.cgi?id=241035 Reviewed by Geoffrey Garen. Remove some unnecessary work from the Node destructor as it shows on Speedometer profiles. In particular, stop calling clearRareData() as this is just clearing a data member. Also move work that only applies to non-ContainerNode to the Text and CharacterData destructors since those are the only two non-ContainerNodes. * Source/WebCore/dom/Attr.cpp: (WebCore::Attr::~Attr): * Source/WebCore/dom/CharacterData.cpp: (WebCore::CharacterData::~CharacterData): * Source/WebCore/dom/CharacterData.h: * Source/WebCore/dom/Node.cpp: (WebCore::Node::~Node): Canonical link: https://commits.webkit.org/251084@main Modified Paths trunk/Source/WebCore/dom/Attr.cpp trunk/Source/WebCore/dom/CharacterData.cpp trunk/Source/WebCore/dom/CharacterData.h trunk/Source/WebCore/dom/Node.cpp Diff Modified: trunk/Source/WebCore/dom/Attr.cpp (294979 => 294980) --- trunk/Source/WebCore/dom/Attr.cpp 2022-05-28 03:13:21 UTC (rev 294979) +++ trunk/Source/WebCore/dom/Attr.cpp 2022-05-28 03:16:46 UTC (rev 294980) @@ -71,6 +71,8 @@ { ASSERT_WITH_SECURITY_IMPLICATION(!isInShadowTree()); ASSERT_WITH_SECURITY_IMPLICATION(treeScope().rootNode().isDocumentNode()); + +willBeDeletedFrom(document()); } ExceptionOr Attr::setPrefix(const AtomString& prefix) Modified: trunk/Source/WebCore/dom/CharacterData.cpp (294979 => 294980) --- trunk/Source/WebCore/dom/CharacterData.cpp 2022-05-28 03:13:21 UTC (rev 294979) +++ trunk/Source/WebCore/dom/CharacterData.cpp 2022-05-28 03:16:46 UTC (rev 294980) @@ -42,6 +42,11 @@ WTF_MAKE_ISO_ALLOCATED_IMPL(CharacterData); +CharacterData::~CharacterData() +{ +willBeDeletedFrom(document()); +} + static bool canUseSetDataOptimization(const CharacterData& node) { auto& document = node.document(); Modified: trunk/Source/WebCore/dom/CharacterData.h (294979 => 294980) --- trunk/Source/WebCore/dom/CharacterData.h 2022-05-28 03:13:21 UTC (rev 294979) +++ trunk/Source/WebCore/dom/CharacterData.h 2022-05-28 03:16:46 UTC (rev 294980) @@ -52,6 +52,8 @@ ASSERT(type == CreateCharacterData || type == CreateText || type == CreateEditingText); } +~CharacterData(); + void setDataWithoutUpdate(const String& data) { ASSERT(!data.isNull()); Modified: trunk/Source/WebCore/dom/Node.cpp (294979 => 294980) --- trunk/Source/WebCore/dom/Node.cpp 2022-05-28 03:13:21 UTC (rev 294979) +++ trunk/Source/WebCore/dom/Node.cpp 2022-05-28 03:16:46 UTC (rev 294980) @@ -369,21 +369,14 @@ liveNodeSet().remove(*this); #endif -RELEASE_ASSERT(!renderer()); +ASSERT(!renderer()); ASSERT(!parentNode()); ASSERT(!m_previous); ASSERT(!m_next); -if (hasRareData()) -clearRareData(); - -auto* textManipulationController = document().textManipulationControllerIfExists(); -if (UNLIKELY(textManipulationController)) +if (auto* textManipulationController = document().textManipulationControllerIfExists(); UNLIKELY(textManipulationController)) textManipulationController->removeNode(*this); -if (!isContainerNode()) -willBeDeletedFrom(document()); - if (hasEventTargetData()) clearEventTargetData(); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [294979] trunk
Title: [294979] trunk Revision 294979 Author hey...@apple.com Date 2022-05-27 20:13:21 -0700 (Fri, 27 May 2022) Log Message Fix typo in ConcatenateCTM display list item serialization https://bugs.webkit.org/show_bug.cgi?id=240935 Reviewed by Simon Fraser. * LayoutTests/displaylists/extent-includes-transforms-expected.txt: * LayoutTests/platform/mac-wk1/displaylists/extent-includes-transforms-expected.txt: * Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp: (WebCore::DisplayList::operator<<): Canonical link: https://commits.webkit.org/251083@main Modified Paths trunk/LayoutTests/displaylists/extent-includes-transforms-expected.txt trunk/LayoutTests/platform/mac-wk1/displaylists/extent-includes-transforms-expected.txt trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp Diff Modified: trunk/LayoutTests/displaylists/extent-includes-transforms-expected.txt (294978 => 294979) --- trunk/LayoutTests/displaylists/extent-includes-transforms-expected.txt 2022-05-28 02:40:34 UTC (rev 294978) +++ trunk/LayoutTests/displaylists/extent-includes-transforms-expected.txt 2022-05-28 03:13:21 UTC (rev 294979) @@ -2,7 +2,7 @@ (translate (x 0.00) (y 22.00)) -(concatentate-ctm +(concatenate-ctm (ctm {m=((0.87,0.50)(-0.50,0.87)) t=(81.70,-18.30)})) (save) (set-state Modified: trunk/LayoutTests/platform/mac-wk1/displaylists/extent-includes-transforms-expected.txt (294978 => 294979) --- trunk/LayoutTests/platform/mac-wk1/displaylists/extent-includes-transforms-expected.txt 2022-05-28 02:40:34 UTC (rev 294978) +++ trunk/LayoutTests/platform/mac-wk1/displaylists/extent-includes-transforms-expected.txt 2022-05-28 03:13:21 UTC (rev 294979) @@ -2,7 +2,7 @@ (translate (x 0.00) (y 22.00)) -(concatentate-ctm +(concatenate-ctm (ctm {m=((0.87,0.50)(-0.50,0.87)) t=(81.70,-18.30)})) (save (restore-index 5)) Modified: trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp (294978 => 294979) --- trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp 2022-05-28 02:40:34 UTC (rev 294978) +++ trunk/Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp 2022-05-28 03:13:21 UTC (rev 294979) @@ -621,7 +621,7 @@ case ItemType::Rotate: ts << "rotate"; break; case ItemType::Scale: ts << "scale"; break; case ItemType::SetCTM: ts << "set-ctm"; break; -case ItemType::ConcatenateCTM: ts << "concatentate-ctm"; break; +case ItemType::ConcatenateCTM: ts << "concatenate-ctm"; break; case ItemType::SetInlineFillColor: ts << "set-inline-fill-color"; break; case ItemType::SetInlineStrokeColor: ts << "set-inline-stroke-color"; break; case ItemType::SetStrokeThickness: ts << "set-stroke-thickness"; break; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [294977] trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm
Title: [294977] trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm Revision 294977 Author yu...@chromium.org Date 2022-05-27 19:19:02 -0700 (Fri, 27 May 2022) Log Message WKHTTPCookieStore tests should use removeDataOfTypes to delete all cookies https://bugs.webkit.org/show_bug.cgi?id=240726 Reviewed by Sihui Liu. Call WKWebsiteDataStore.removeDataOfTypes when to clear all cookies instead of deleting them one by one. Besides simplifying the code it documents the API recommended for the clients. * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm: (clearCookies): (TEST): (deleteCookies): Deleted. Canonical link: https://commits.webkit.org/251081@main Modified Paths trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm Diff Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm (294976 => 294977) --- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm 2022-05-28 02:12:20 UTC (rev 294976) +++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm 2022-05-28 02:19:02 UTC (rev 294977) @@ -459,14 +459,13 @@ TestWebKitAPI::Util::run(); } -static void deleteCookies(WKHTTPCookieStore *store, RetainPtr cookies, BlockPtr completionBlock) +static void clearCookies(WKWebsiteDataStore *dataStore) { -if (![cookies count]) -return completionBlock(); -[store deleteCookie:[cookies lastObject] completionHandler:^(void) { -[cookies removeLastObject]; -deleteCookies(store, cookies, completionBlock); +__block bool deleted = false; +[dataStore removeDataOfTypes:[NSSet setWithObject:WKWebsiteDataTypeCookies] modifiedSince:[NSDate distantPast] completionHandler:^{ +deleted = true; }]; +TestWebKitAPI::Util::run(); } TEST(WKHTTPCookieStore, ObserveCookiesReceivedFromHTTP) @@ -473,16 +472,6 @@ { TestWebKitAPI::HTTPServer server({{ "/"_s, {{{ "Set-Cookie"_s, "testkey=testvalue"_s }}, "hello"_s }}}); -auto removeAllCookies = [] (WKHTTPCookieStore *store) { -__block bool deletedAllCookies = false; -[store getAllCookies:^(NSArray *cookies) { -deleteCookies(store, adoptNS([cookies mutableCopy]), ^{ -deletedAllCookies = true; -}); -}]; -TestWebKitAPI::Util::run(); -}; - auto runTest = [&] (WKWebsiteDataStore *dataStore) { auto configuration = adoptNS([WKWebViewConfiguration new]); configuration.get().websiteDataStore = dataStore; @@ -489,7 +478,7 @@ auto webView = adoptNS([[WKWebView alloc] initWithFrame:CGRectZero configuration:configuration.get()]); auto observer = adoptNS([CookieObserver new]); globalCookieStore = webView.get().configuration.websiteDataStore.httpCookieStore; -removeAllCookies(globalCookieStore.get()); +clearCookies(dataStore); [globalCookieStore addObserver:observer.get()]; observerCallbacks = 0; [webView loadRequest:server.request()]; @@ -726,27 +715,6 @@ return [first.name isEqual:second.name] && [first.domain isEqual:second.domain] && [first.path isEqual:second.path] && [first.value isEqual:second.value]; } -static void clearCookies(WKHTTPCookieStore* cookieStore) -{ -finished = false; -[cookieStore getAllCookies:^(NSArray *cookies) { -if (!cookies || !cookies.count) { -finished = true; -return; -} - -unsigned cookiesCount = cookies.count; -__block unsigned deletedCount = 0; -for (NSHTTPCookie* cookie in cookies) { -[cookieStore deleteCookie:cookie completionHandler:^{ -if (++deletedCount == cookiesCount) -finished = true; -}]; -} -}]; -TestWebKitAPI::Util::run(); -} - TEST(WKHTTPCookieStore, WithoutProcessPoolDuplicates) { RetainPtr httpCookieStore = [WKWebsiteDataStore defaultDataStore].httpCookieStore; @@ -764,7 +732,7 @@ RetainPtr sessionCookieDifferentValue = [NSHTTPCookie cookieWithProperties:properties.get()]; finished = false; -clearCookies(httpCookieStore.get()); +clearCookies([WKWebsiteDataStore defaultDataStore]); [httpCookieStore.get() setCookie:sessionCookie.get() completionHandler:^{ finished = true; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [294976] trunk/Source/WebCore/html/HTMLAttachmentElement.cpp
Title: [294976] trunk/Source/WebCore/html/HTMLAttachmentElement.cpp Revision 294976 Author katherine_che...@apple.com Date 2022-05-27 19:12:20 -0700 (Fri, 27 May 2022) Log Message [WK2] Attachment icons do not update after updating filewrapper https://bugs.webkit.org/show_bug.cgi?id=241026 rdar://86293273 Reviewed by Wenson Hsieh. In the case of certain iWork file types downloaded from iCloud that require thumbnails, we don't remove the progress update once the filewrapper is updated with the complete attachment, which prevents the thumbnail from appearing. This patch removes the progress attribute once the thumbnail is updated so we know we can now paint the icon. No new tests. There's no clear way to test this change. For previous thumbnail bugs we swizzled the thumbnail generator code to make sure we were generating thumbnails; however, this bug is a case of the thumbnail being generated but not displayed. Similarly, we can't compare the attachment size because it is the same for the attachment with and without the correct thumbnail. * Source/WebCore/html/HTMLAttachmentElement.cpp: (WebCore::HTMLAttachmentElement::updateThumbnail): Canonical link: https://commits.webkit.org/251080@main Modified Paths trunk/Source/WebCore/html/HTMLAttachmentElement.cpp Diff Modified: trunk/Source/WebCore/html/HTMLAttachmentElement.cpp (294975 => 294976) --- trunk/Source/WebCore/html/HTMLAttachmentElement.cpp 2022-05-28 01:46:33 UTC (rev 294975) +++ trunk/Source/WebCore/html/HTMLAttachmentElement.cpp 2022-05-28 02:12:20 UTC (rev 294976) @@ -272,7 +272,7 @@ void HTMLAttachmentElement::updateThumbnail(const RefPtr& thumbnail) { m_thumbnail = thumbnail; - +removeAttribute(HTMLNames::progressAttr); if (auto* renderer = this->renderer()) renderer->invalidate(); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [294975] trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ TestSOAuthorization.mm
Title: [294975] trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm Revision 294975 Author j_pas...@apple.com Date 2022-05-27 18:46:33 -0700 (Fri, 27 May 2022) Log Message [ iOS ] TestWebKitAPI.SOAuthorizationSubFrame.InterceptionErrorWithReferrer is a flaky timeout https://bugs.webkit.org/show_bug.cgi?id=239311 Reviewed by Brent Fulgham. There is a race condition when using waitForMessage that we hit here, causing flaky tests on some bots. This patch avoids this by specifying the messages waited for before loading the request. * Tools/TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm: (-[TestSOAuthorizationScriptMessageHandler initWithExpectation:]): (-[TestSOAuthorizationScriptMessageHandler userContentController:didReceiveScriptMessage:]): (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/251079@main Modified Paths trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm Diff Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm (294974 => 294975) --- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm 2022-05-28 01:23:18 UTC (rev 294974) +++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm 2022-05-28 01:46:33 UTC (rev 294975) @@ -250,28 +250,24 @@ @implementation TestSOAuthorizationScriptMessageHandler { RetainPtr _messages; +RetainPtr _expectedMessages; } +- (instancetype)initWithExpectation:(NSArray *)expectedMessages +{ +_messages = adoptNS([[NSMutableArray alloc] init]); +_expectedMessages = expectedMessages; +return self; +} + - (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message { -if (!_messages) -_messages = adoptNS([[NSMutableArray alloc] init]); +auto curIndex = [_messages count]; [_messages addObject:message.body]; - -if ([message.body isEqual:@""]) { +if ([_messages count] == [_expectedMessages count]) allMessagesReceived = true; -EXPECT_EQ([_messages count], 5u); -EXPECT_WK_STREQ("SOAuthorizationDidStart", [_messages objectAtIndex:1]); -EXPECT_WK_STREQ("SOAuthorizationDidCancel", [_messages objectAtIndex:3]); -EXPECT_WK_STREQ("", [_messages objectAtIndex:4]); -} - -if ([message.body isEqual:@"Hello."]) { -allMessagesReceived = true; -EXPECT_EQ([_messages count], 4u); -EXPECT_WK_STREQ("SOAuthorizationDidStart", [_messages objectAtIndex:1]); -EXPECT_WK_STREQ("Hello.", [_messages objectAtIndex:3]); -} +if (curIndex < [_expectedMessages count] && [_expectedMessages objectAtIndex:curIndex] != [NSNull null]) +EXPECT_WK_STREQ([_expectedMessages objectAtIndex:curIndex], [_messages objectAtIndex:curIndex]); } @end @@ -2635,7 +2631,7 @@ } // FIXME: https://bugs.webkit.org/show_bug.cgi?id=239311 -TEST(SOAuthorizationSubFrame, DISABLED_InterceptionErrorWithReferrer) +TEST(SOAuthorizationSubFrame, InterceptionErrorWithReferrer) { resetState(); ClassMethodSwizzler swizzler1(PAL::getSOAuthorizationClass(), @selector(canPerformAuthorizationWithURL:responseCode:), reinterpret_cast(overrideCanPerformAuthorizationWithURL)); @@ -2668,21 +2664,22 @@ }); }); }); +auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]); +auto origin = makeString("http://127.0.0.1:", server.port()); -auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500)]); +auto messageHandler = adoptNS([[TestSOAuthorizationScriptMessageHandler alloc] initWithExpectation:@[origin, @"SOAuthorizationDidStart", origin, @"SOAuthorizationDidCancel", origin, @"Hello.", origin, makeString("Referrer: ", origin, "/")]]); +[[configuration userContentController] addScriptMessageHandler:messageHandler.get() name:@"testHandler"]; +auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 500) configuration:configuration.get()]); auto delegate = adoptNS([[TestSOAuthorizationDelegate alloc] init]); configureSOAuthorizationWebView(webView.get(), delegate.get()); -auto origin = makeString("http://127.0.0.1:", server.port()); [webView _loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:(id)origin]] shouldOpenExternalURLs:NO]; -[webView waitForMessage:(id)origin]; -[webView waitForMessage:@"SOAuthorizationDidStart"]; + +Util::run(); EXPECT_TRUE(policyForAppSSOPerformed); [gDelegate authorization:gAuthorization didCompleteWithError:adoptNS([[NSError alloc] initWithDomain:NSCocoaErrorDomain code:0 userInfo:nil]).get()]; -[webView waitForMessage:(id)origin]; -[webView waitForMessage:@"SOAuthorizationDidCancel"]; -[webView waitForMessage:(id)makeString("Referrer: ", origin, "/")]; // Referrer policy requires '/' after origin. +Util::run(); } TEST(SOAuthorizationSubFrame, InterceptionErrorMessageOrder) @@
[webkit-changes] [294974] trunk/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp
Title: [294974] trunk/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp Revision 294974 Author commit-qu...@webkit.org Date 2022-05-27 18:23:18 -0700 (Fri, 27 May 2022) Log Message [GLib] Properly deprecate WebKitSettings properties enable-accelerated-2d-canvas, enable-plugins, and enable-xss-auditor https://bugs.webkit.org/show_bug.cgi?id=240993 Patch by Michael Catanzaro on 2022-05-27 Reviewed by Adrian Perez de Castro. * Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp: (webkit_settings_class_init): Canonical link: https://commits.webkit.org/251078@main Modified Paths trunk/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp Diff Modified: trunk/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp (294973 => 294974) --- trunk/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp 2022-05-28 01:06:44 UTC (rev 294973) +++ trunk/Source/WebKit/UIProcess/API/glib/WebKitSettings.cpp 2022-05-28 01:23:18 UTC (rev 294974) @@ -708,6 +708,8 @@ * * Whether to enable the XSS auditor. This feature filters some kinds of * reflective XSS attacks on vulnerable web sites. + * + * Deprecated: 2.38 */ sObjProperties[PROP_ENABLE_XSS_AUDITOR] = g_param_spec_boolean( @@ -715,7 +717,7 @@ _("Enable XSS auditor"), _("Whether to enable the XSS auditor."), TRUE, -readWriteConstructParamFlags); +static_cast(readWriteConstructParamFlags | G_PARAM_DEPRECATED)); /** * WebKitSettings:enable-frame-flattening: @@ -745,7 +747,7 @@ _("Enable plugins"), _("Enable embedded plugin objects."), FALSE, -readWriteConstructParamFlags); +static_cast(readWriteConstructParamFlags | G_PARAM_DEPRECATED)); /** * WebKitSettings:enable-java: @@ -1273,7 +1275,7 @@ _("Enable accelerated 2D canvas"), _("Whether to enable accelerated 2D canvas"), FALSE, -readWriteConstructParamFlags); +static_cast(readWriteConstructParamFlags | G_PARAM_DEPRECATED)); /** * WebKitSettings:enable-write-console-messages-to-stdout: ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [294973] trunk/Source/WebCore
Title: [294973] trunk/Source/WebCore Revision 294973 Author timothy_hor...@apple.com Date 2022-05-27 18:06:44 -0700 (Fri, 27 May 2022) Log Message Add a fake style bit for mouse click handlers https://bugs.webkit.org/show_bug.cgi?id=240924 Reviewed by Antti Koivisto. Add a bit to `EventListenerRegionType` for mouse click events, and populate it via Node::willRespondToMouseClickEvents. To do so while avoiding recursive style computation, make it possible to plumb Editability through to willRespondToMouseClickEventsWithEditability. This short-circuits Node calling into computeEditability() from the base implementation of willRespondToMouseClickEvents, which reenters style computation via computedStyle() when called from StyleAdjuster (where `EventListenerRegionType` is populated). Also make a variant of computeEditability that takes a passed-in style, and do some refactoring to share more code between platforms (without changing behavior, even in cases where the behavior differences are suprising). * Source/WebCore/dom/Node.cpp: (WebCore::computeEditabilityFromComputedStyle): Instead of computing style, computeEditabilityFromComputedStyle is now passed a RenderStyle reference. (WebCore::Node::computeEditabilityWithStyle const): This subsumes most of the logic from computeEditability(), but will compute the style (only if we need it) if it is not passed in. (WebCore::Node::computeEditability const): computeEditability retains its "normal" API, passing through its arguments and a null style, indicating to computeEditabilityWithStyle that it should compute the style as usual. (WebCore::Node::computeEditabilityForMouseClickEvents const): A variant of `computeEditabilityWithStyle` that maintains an odd existing platform-specific difference in the `UserSelectAllTreatment` argument, and allows callers of `willRespondToMouseClickEventsWithEditability` to all be consistent. (WebCore::Node::willRespondToMouseClickEvents const): Maintain the existing behavior of willRespondToMouseClickEvents; compute editability as needed. (WebCore::Node::willRespondToMouseClickEventsWithEditability const): `willRespondToMouseClickEventsWithEditability` is now the override point, and will not itself cause a style update. Refactor this function a bit to share as much code as possible between platforms (and maintain an existing comment questioning the differences that we maintain). * Source/WebCore/dom/Node.h: * Source/WebCore/rendering/EventRegion.cpp: (WebCore::EventRegion::eventListenerRegionForType const): * Source/WebCore/rendering/RenderLayerBacking.cpp: (WebCore::patternForEventListenerRegionType): Add EventListenerRegionType::MouseClick to these two switches over EventListenerRegionType, but break and fall into the ASSERT_NOT_REACHED default state; these are only called for wheel event listeners. * Source/WebCore/rendering/style/RenderStyleConstants.cpp: (WebCore::operator<<): * Source/WebCore/rendering/style/RenderStyleConstants.h: * Source/WebCore/style/StyleAdjuster.cpp: (WebCore::Style::Adjuster::adjustEventListenerRegionTypesForRootStyle): (WebCore::Style::Adjuster::computeEventListenerRegionTypes): (WebCore::Style::Adjuster::adjust const): If we're building interaction regions, propagate EventListenerRegionType::MouseClick down the style tree like we do for wheel event listeners. This is a bit more complicated than wheel event listeners, using the Node method instead of just looking at the set of event listeners, because many elements accept mouse clicks *without* having event listeners installed; they just implement behaviors in their default event handlers. * Source/WebCore/style/StyleAdjuster.h: * Source/WebCore/page/InteractionRegion.cpp: (WebCore::interactionRegions): Adopt the new fake style bit. This is not the final intended use: we will use it from EventRegion::unite(), like we do for wheel events, in a future patch. * Source/WebCore/html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::willRespondToMouseClickEventsWithEditability const): (WebCore::HTMLAnchorElement::willRespondToMouseClickEvents const): Deleted. * Source/WebCore/html/HTMLAnchorElement.h: * Source/WebCore/html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::willRespondToMouseClickEventsWithEditability const): (WebCore::HTMLButtonElement::willRespondToMouseClickEvents const): Deleted. * Source/WebCore/html/HTMLButtonElement.h: * Source/WebCore/html/HTMLElement.cpp: (WebCore::HTMLElement::willRespondToMouseClickEventsWithEditability const): (WebCore::HTMLElement::willRespondToMouseClickEvents const): Deleted. * Source/WebCore/html/HTMLElement.h: * Source/WebCore/html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::willRespondToMouseClickEventsWithEditability const): (WebCore::HTMLImageElement::willRespondToMouseClickEvents const): Deleted. * Source/WebCore/html/HTMLImageElement.h: * Source/WebCore/html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::willRespondToMouseClickEventsWithEditability const):
[webkit-changes] [294972] trunk/Source/WebCore
Title: [294972] trunk/Source/WebCore Revision 294972 Author commit-qu...@webkit.org Date 2022-05-27 17:56:02 -0700 (Fri, 27 May 2022) Log Message Add EXT_texture_compression_bptc WebGL extension support https://bugs.webkit.org/show_bug.cgi?id=235637 Patch by Alexey Knyazev <3479527+lexaknya...@users.noreply.github.com> on 2022-05-27 Reviewed by Kenneth Russell. Support BPTC texture formats and slightly cleanup RGTC code. * Source/WebCore/CMakeLists.txt: * Source/WebCore/DerivedSources-input.xcfilelist: * Source/WebCore/DerivedSources-output.xcfilelist: * Source/WebCore/DerivedSources.make: * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/bindings/js/JSDOMConvertWebGL.cpp: (WebCore::convertToJSValue): * Source/WebCore/html/canvas/EXTTextureCompressionBPTC.cpp: Copied from Source/WebCore/html/canvas/EXTTextureCompressionRGTC.cpp. (WebCore::EXTTextureCompressionBPTC::EXTTextureCompressionBPTC): (WebCore::EXTTextureCompressionBPTC::getName const): (WebCore::EXTTextureCompressionBPTC::supported): * Source/WebCore/html/canvas/EXTTextureCompressionBPTC.h: Copied from Source/WebCore/html/canvas/EXTTextureCompressionRGTC.h. * Source/WebCore/html/canvas/EXTTextureCompressionBPTC.idl: Copied from Source/WebCore/html/canvas/EXTTextureCompressionRGTC.h. * Source/WebCore/html/canvas/EXTTextureCompressionRGTC.cpp: (WebCore::EXTTextureCompressionRGTC::EXTTextureCompressionRGTC): (WebCore::EXTTextureCompressionRGTC::supported): * Source/WebCore/html/canvas/EXTTextureCompressionRGTC.h: * Source/WebCore/html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::getExtension): (WebCore::WebGL2RenderingContext::getSupportedExtensions): * Source/WebCore/html/canvas/WebGLExtension.h: * Source/WebCore/html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getExtension): (WebCore::WebGLRenderingContext::getSupportedExtensions): * Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::extensionIsEnabled): (WebCore::WebGLRenderingContextBase::validateCompressedTexFuncData): (WebCore::WebGLRenderingContextBase::loseExtensions): * Source/WebCore/html/canvas/WebGLRenderingContextBase.h: * Source/WebCore/platform/graphics/GraphicsContextGL.h: Canonical link: https://commits.webkit.org/251076@main Modified Paths trunk/Source/WebCore/CMakeLists.txt trunk/Source/WebCore/DerivedSources-input.xcfilelist trunk/Source/WebCore/DerivedSources-output.xcfilelist trunk/Source/WebCore/DerivedSources.make trunk/Source/WebCore/Sources.txt trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj trunk/Source/WebCore/bindings/js/JSDOMConvertWebGL.cpp trunk/Source/WebCore/html/canvas/EXTTextureCompressionRGTC.cpp trunk/Source/WebCore/html/canvas/EXTTextureCompressionRGTC.h trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp trunk/Source/WebCore/html/canvas/WebGLExtension.h trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h trunk/Source/WebCore/platform/graphics/GraphicsContextGL.h Added Paths trunk/Source/WebCore/html/canvas/EXTTextureCompressionBPTC.cpp trunk/Source/WebCore/html/canvas/EXTTextureCompressionBPTC.h trunk/Source/WebCore/html/canvas/EXTTextureCompressionBPTC.idl Diff Modified: trunk/Source/WebCore/CMakeLists.txt (294971 => 294972) --- trunk/Source/WebCore/CMakeLists.txt 2022-05-28 00:32:27 UTC (rev 294971) +++ trunk/Source/WebCore/CMakeLists.txt 2022-05-28 00:56:02 UTC (rev 294972) @@ -1808,6 +1808,7 @@ html/canvas/EXTFloatBlend.cpp html/canvas/EXTFragDepth.cpp html/canvas/EXTShaderTextureLOD.cpp +html/canvas/EXTTextureCompressionBPTC.cpp html/canvas/EXTTextureCompressionRGTC.cpp html/canvas/EXTTextureFilterAnisotropic.cpp html/canvas/EXTTextureNorm16.cpp @@ -1870,6 +1871,7 @@ html/canvas/EXTFloatBlend.idl html/canvas/EXTFragDepth.idl html/canvas/EXTShaderTextureLOD.idl +html/canvas/EXTTextureCompressionBPTC.idl html/canvas/EXTTextureCompressionRGTC.idl html/canvas/EXTTextureFilterAnisotropic.idl html/canvas/EXTTextureNorm16.idl Modified: trunk/Source/WebCore/DerivedSources-input.xcfilelist (294971 => 294972) --- trunk/Source/WebCore/DerivedSources-input.xcfilelist 2022-05-28 00:32:27 UTC (rev 294971) +++ trunk/Source/WebCore/DerivedSources-input.xcfilelist 2022-05-28 00:56:02 UTC (rev 294972) @@ -1296,6 +1296,7 @@ $(PROJECT_DIR)/html/canvas/EXTFloatBlend.idl $(PROJECT_DIR)/html/canvas/EXTFragDepth.idl $(PROJECT_DIR)/html/canvas/EXTShaderTextureLOD.idl +$(PROJECT_DIR)/html/canvas/EXTTextureCompressionBPTC.idl $(PROJECT_DIR)/html/canvas/EXTTextureCompressionRGTC.idl $(PROJECT_DIR)/html/canvas/EXTTextureFilterAnisotropic.idl $(PROJECT_DIR)/html/canvas/EXTTextureNorm16.idl Modified: trunk/Source/WebCore/DerivedSources-output.xcfilelist (294971 => 294972)
[webkit-changes] [294971] trunk/Source/WebKit
Title: [294971] trunk/Source/WebKit Revision 294971 Author timothy_hor...@apple.com Date 2022-05-27 17:32:27 -0700 (Fri, 27 May 2022) Log Message Remove WebKit feature flags plist https://bugs.webkit.org/show_bug.cgi?id=241042 Reviewed by Wenson Hsieh. * Source/WebKit/FeatureFlags/WebKit.plist: Removed. * Source/WebKit/WebKit.xcodeproj/project.pbxproj: Now that the blocking bug is resolved, we can remove this entirely. Canonical link: https://commits.webkit.org/251075@main Modified Paths trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj Removed Paths trunk/Source/WebKit/FeatureFlags/ Diff Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (294970 => 294971) --- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2022-05-28 00:01:34 UTC (rev 294970) +++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2022-05-28 00:32:27 UTC (rev 294971) @@ -3676,7 +3676,6 @@ 1CEF45BB27BCA46A00C3A6BC /* WebGPUShaderModuleCompilationHint.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUShaderModuleCompilationHint.cpp; sourceTree = ""; }; 1CEF45BC27BCA46A00C3A6BC /* WebGPUShaderModuleCompilationHint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUShaderModuleCompilationHint.h; sourceTree = ""; }; 1CF18F3E26BB5D90004B1722 /* LogInitialization.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LogInitialization.cpp; sourceTree = ""; }; - 1D0530D2259162C900E436F7 /* WebKit.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = WebKit.plist; sourceTree = ""; }; 1D0B66192624C11800F9712F /* WebMediaKeySystemClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebMediaKeySystemClient.cpp; sourceTree = ""; }; 1D0B661A2624C19600F9712F /* MediaKeySystemPermissionRequestManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MediaKeySystemPermissionRequestManager.cpp; path = EncryptedMedia/MediaKeySystemPermissionRequestManager.cpp; sourceTree = ""; }; 1D0ECEAA23FC858400D172F6 /* RemoteMediaPlayerProxyCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteMediaPlayerProxyCocoa.mm; sourceTree = ""; }; @@ -7521,7 +7520,6 @@ 510CC7DA16138E0100D03ED3 /* NetworkProcess */, 2D9FB1FF2375209D0049F936 /* GPUProcess */, C0CE729D1247E71D00BC0EC4 /* Derived Sources */, -1DEC97AB246B6865007C83F4 /* FeatureFlags */, 089C1665FE841158C02AAC07 /* Resources */, C0CE73351247F70E00BC0EC4 /* Scripts */, 1A4F9769100E7B6600637A18 /* Configurations */, @@ -,7 +7775,6 @@ 1AADDF4B10D82AF000D3D63D /* Shared */ = { isa = PBXGroup; children = ( -932CA81B283C35EB00C20BEB /* StorageAreaIdentifier.h */, BCDDB314124EBCEF0048D13C /* API */, 1AB1F7761D1B30A9007C9BD1 /* ApplePay */, 518E8EF116B208F000E91429 /* Authentication */, @@ -7914,6 +7911,7 @@ 8313F7E71F7DAE0300B944EB /* SharedStringHashTable.h */, 83F9644B1FA0F76200C47750 /* SharedStringHashTableReadOnly.cpp */, 83F9644C1FA0F76300C47750 /* SharedStringHashTableReadOnly.h */, +932CA81B283C35EB00C20BEB /* StorageAreaIdentifier.h */, 1A5E4DA312D3BD3D0099A2BB /* TextCheckerState.h */, F4A7CE842667EB4E00228685 /* TextRecognitionUpdateResult.h */, 7BE37F6F27B1475F007A6CD3 /* ThreadSafeObjectHeap.h */, @@ -8598,14 +8596,6 @@ path = cocoa; sourceTree = ""; }; - 1DEC97AB246B6865007C83F4 /* FeatureFlags */ = { - isa = PBXGroup; - children = ( -1D0530D2259162C900E436F7 /* WebKit.plist */, - ); - path = FeatureFlags; - sourceTree = ""; - }; 1F0181681858DC1500F92884 /* Cocoa */ = { isa = PBXGroup; children = ( @@ -14341,7 +14331,6 @@ 83A0ED351F747CCF003299EB /* PreconnectTask.h in Headers */, C15CBB3623F3777100300CC7 /* PreferenceObserver.h in Headers */, AAB145E6223F931200E489D8 /* PrefetchCache.h in Headers */, -932CA81C283C35EC00C20BEB /* StorageAreaIdentifier.h in Headers */, E1CC1B9012D7EADF00625838 /* PrintInfo.h in Headers */, 512ECC3527196ADB00089B66 /* PrivateClickMeasurementConnection.h in Headers */, 5C826D6C26D482F2008AEC91 /* PrivateClickMeasurementDatabase.h in Headers */, @@ -14485,6 +14474,7 @@ 93E799DA276121080074008A /* SQLiteStorageArea.h in Headers */, 7A3FECA221F7C09700F267CD /* StorageAccessStatus.h in Headers */, 93E799DC276121080074008A /* StorageAreaBase.h in Headers */, +932CA81C283C35EC00C20BEB /* StorageAreaIdentifier.h in Headers */, 1AD3306F16B1D991004F60E7 /* StorageAreaImpl.h in Headers */, 1ACECD2517162DB1001FC9EF /* StorageAreaMap.h in Headers */, 93AEC161278F8CD3006F /* StorageAreaMapIdentifier.h in Headers */, @@ -15539,7 +15529,6 @@ 5DF408D1131DDBEC00130071 /* Check For Inappropriate Files In Framework */, A55DEAA61670402E003DB841 /* Check For
[webkit-changes] [294970] trunk
Title: [294970] trunk Revision 294970 Author simon.fra...@apple.com Date 2022-05-27 17:01:34 -0700 (Fri, 27 May 2022) Log Message Optimize setting SVG element transforms https://bugs.webkit.org/show_bug.cgi?id=240825 Reviewed by Said Abou-Hallawa. When parseTransformValueGeneric() creates SVGTransformValues, it default-constructed them and then called setRotate(), setScale() etc, which would reset m_matrix to identity a second time. Optimize by providing static helpers for creating translate, rotate and scale SVGTransformValues which initialize the matrix with the final value. Helpers are added to AffineTransform to create scale, translate and rotate transforms, renaming `translation` to `makeTranslation` so that the "scale" helper doesn't conflict with the `scale` member function. This reduces the time spent under the Element::setAttribute() function in the MotionMark Suits test by about 14%. * Source/WebCore/page/FrameView.cpp: (WebCore::FrameView::rectForViewportConstrainedObjects): * Source/WebCore/platform/graphics/FontCascade.cpp: (WebCore::GlyphToPathTranslator::GlyphToPathTranslator): * Source/WebCore/rendering/svg/LegacyRenderSVGRoot.cpp: (WebCore::LegacyRenderSVGRoot::paintReplaced): (WebCore::LegacyRenderSVGRoot::localToParentTransform const): * Source/WebCore/rendering/svg/RenderSVGResourceMarker.cpp: (WebCore::RenderSVGResourceMarker::localToParentTransform const): * Source/WebCore/rendering/svg/RenderSVGViewportContainer.cpp: (WebCore::RenderSVGViewportContainer::calculateLocalTransform): * Source/WebCore/svg/SVGTransform.h: (WebCore::SVGTransform::create): (WebCore::SVGTransform::SVGTransform): * Source/WebCore/svg/SVGTransformList.cpp: (WebCore::SVGTransformList::parseGeneric): * Source/WebCore/svg/SVGTransformValue.h: (WebCore::SVGTransformValue::translateTransformValue): (WebCore::SVGTransformValue::rotateTransformValue): (WebCore::SVGTransformValue::scaleTransformValue): (WebCore::SVGTransformValue::setMatrix): (WebCore::SVGTransformValue::matrixDidChange): (WebCore::SVGTransformValue::setTranslate): (WebCore::SVGTransformValue::setScale): (WebCore::SVGTransformValue::setRotate): * Source/WebCore/svg/SVGTransformable.cpp: (WebCore::parseTransformValueGeneric): * Source/WebCore/svg/properties/SVGValueProperty.h: * Tools/TestWebKitAPI/Tests/WebCore/AffineTransform.cpp: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/251074@main Modified Paths trunk/Source/WebCore/page/FrameView.cpp trunk/Source/WebCore/platform/graphics/FontCascade.cpp trunk/Source/WebCore/platform/graphics/transforms/AffineTransform.h trunk/Source/WebCore/rendering/svg/LegacyRenderSVGRoot.cpp trunk/Source/WebCore/rendering/svg/RenderSVGResourceMarker.cpp trunk/Source/WebCore/rendering/svg/RenderSVGViewportContainer.cpp trunk/Source/WebCore/svg/SVGTransform.h trunk/Source/WebCore/svg/SVGTransformList.cpp trunk/Source/WebCore/svg/SVGTransformValue.h trunk/Source/WebCore/svg/SVGTransformable.cpp trunk/Source/WebCore/svg/properties/SVGValueProperty.h trunk/Tools/TestWebKitAPI/Tests/WebCore/AffineTransform.cpp Diff Modified: trunk/Source/WebCore/page/FrameView.cpp (294969 => 294970) --- trunk/Source/WebCore/page/FrameView.cpp 2022-05-28 00:00:04 UTC (rev 294969) +++ trunk/Source/WebCore/page/FrameView.cpp 2022-05-28 00:01:34 UTC (rev 294970) @@ -1955,7 +1955,7 @@ scaleOrigin.setX(contentRect.x() + sizeDelta.width() > 0 ? contentRect.width() * (viewportRect.x() - contentRect.x()) / sizeDelta.width() : 0); scaleOrigin.setY(contentRect.y() + sizeDelta.height() > 0 ? contentRect.height() * (viewportRect.y() - contentRect.y()) / sizeDelta.height() : 0); -AffineTransform rescaleTransform = AffineTransform::translation(scaleOrigin.x(), scaleOrigin.y()); +AffineTransform rescaleTransform = AffineTransform::makeTranslation(toFloatSize(scaleOrigin)); rescaleTransform.scale(frameScaleFactor / maxPostionedObjectsRectScale, frameScaleFactor / maxPostionedObjectsRectScale); rescaleTransform = CGAffineTransformTranslate(rescaleTransform, -scaleOrigin.x(), -scaleOrigin.y()); Modified: trunk/Source/WebCore/platform/graphics/FontCascade.cpp (294969 => 294970) --- trunk/Source/WebCore/platform/graphics/FontCascade.cpp 2022-05-28 00:00:04 UTC (rev 294969) +++ trunk/Source/WebCore/platform/graphics/FontCascade.cpp 2022-05-28 00:01:34 UTC (rev 294970) @@ -1603,7 +1603,7 @@ , m_textRun(textRun) , m_glyphBuffer(glyphBuffer) , m_fontData((m_index)) -, m_translation(AffineTransform::translation(textOrigin.x(), textOrigin.y())) +, m_translation(AffineTransform::makeTranslation(toFloatSize(textOrigin))) { #if USE(CG) m_translation.flipY(); Modified: trunk/Source/WebCore/platform/graphics/transforms/AffineTransform.h (294969 => 294970) --- trunk/Source/WebCore/platform/graphics/transforms/AffineTransform.h 2022-05-28 00:00:04 UTC (rev 294969) +++
[webkit-changes] [294969] trunk/Source/WebKit/GPUProcess/mac/ com.apple.WebKit.GPUProcess.sb.in
Title: [294969] trunk/Source/WebKit/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in Revision 294969 Author pvol...@apple.com Date 2022-05-27 17:00:04 -0700 (Fri, 27 May 2022) Log Message [macOS][GPUP] Block unused system calls https://bugs.webkit.org/show_bug.cgi?id=240966 Reviewed by Chris Dumez. * Source/WebKit/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in: Canonical link: https://commits.webkit.org/251073@main Modified Paths trunk/Source/WebKit/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in Diff Modified: trunk/Source/WebKit/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in (294968 => 294969) --- trunk/Source/WebKit/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in 2022-05-27 23:55:11 UTC (rev 294968) +++ trunk/Source/WebKit/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in 2022-05-28 00:00:04 UTC (rev 294969) @@ -904,7 +904,7 @@ (allow mach-message-send (with telemetry) (when (and (equal? (param "ENABLE_SANDBOX_MESSAGE_FILTER") "YES") (defined? 'syscall-mach)) -(allow syscall-mach (with telemetry)) +(deny syscall-mach (with telemetry)) (allow syscall-mach (machtrap-number MSC__kernelrpc_mach_port_allocate_trap MSC__kernelrpc_mach_port_construct_trap @@ -911,6 +911,7 @@ MSC__kernelrpc_mach_port_deallocate_trap MSC__kernelrpc_mach_port_destruct_trap MSC__kernelrpc_mach_port_extract_member_trap +MSC__kernelrpc_mach_port_get_attributes_trap MSC__kernelrpc_mach_port_guard_trap MSC__kernelrpc_mach_port_insert_member_trap MSC__kernelrpc_mach_port_insert_right_trap @@ -917,29 +918,45 @@ MSC__kernelrpc_mach_port_mod_refs_trap MSC__kernelrpc_mach_port_request_notification_trap MSC__kernelrpc_mach_port_type_trap +MSC__kernelrpc_mach_port_unguard_trap MSC__kernelrpc_mach_vm_allocate_trap MSC__kernelrpc_mach_vm_deallocate_trap MSC__kernelrpc_mach_vm_map_trap MSC__kernelrpc_mach_vm_protect_trap +MSC__kernelrpc_mach_vm_purgable_control_trap MSC_host_create_mach_voucher_trap MSC_host_self_trap +MSC_iokit_user_client_trap +MSC_mach_generate_activity_id MSC_mach_msg_trap MSC_mach_reply_port MSC_mach_voucher_extract_attr_recipe_trap +MSC_mk_timer_arm +MSC_mk_timer_cancel +MSC_mk_timer_create +MSC_mk_timer_destroy MSC_pid_for_task MSC_semaphore_signal_trap +MSC_semaphore_timedwait_trap MSC_semaphore_wait_trap MSC_swtch_pri MSC_syscall_thread_switch -MSC_thread_get_special_reply_port))) +MSC_task_name_for_pid +MSC_task_self_trap +MSC_thread_get_special_reply_port)) + +(when (defined? 'MSC_mach_msg2_trap) +(allow syscall-mach +(machtrap-number MSC_mach_msg2_trap #endif // HAVE(SANDBOX_MESSAGE_FILTERING) (when (defined? 'syscall-unix) -(allow syscall-unix (with telemetry)) +(deny syscall-unix (with telemetry)) (allow syscall-unix (syscall-number SYS___channel_open SYS___disable_threadsignal SYS___mac_syscall +SYS___pthread_canceled SYS___pthread_kill SYS___pthread_sigmask SYS___semwait_signal @@ -981,6 +998,7 @@ SYS_gettimeofday SYS_getuid SYS_getxattr +SYS_guarded_open_np SYS_issetugid SYS_kdebug_trace SYS_kdebug_trace64 @@ -1024,6 +1042,8 @@ SYS_readlink SYS_rename SYS_sendto +SYS_setrlimit +SYS_setsockopt SYS_sigaltstack SYS_sigprocmask SYS_socket ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [294968] trunk/Source/WebInspectorUI/UserInterface/Views/ BreakpointActionView.js
Title: [294968] trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointActionView.js Revision 294968 Author drou...@apple.com Date 2022-05-27 16:55:11 -0700 (Fri, 27 May 2022) Log Message Web Inspector: Sources: editing a breakpoint action to cause the CodeMirror to wrap doesn't update the `WI.Popover` size https://bugs.webkit.org/show_bug.cgi?id=220643 Reviewed by Patrick Angle. * Source/WebInspectorUI/UserInterface/Views/BreakpointActionView.js: (WI.BreakpointActionView.prototype._updateBody): (WI.BreakpointActionView.prototype._handleJavaScriptCodeMirrorUpdate): Added. (WI.BreakpointActionView.prototype._codeMirrorViewportChanged): Deleted. Replace listening for `"viewportChange"` (and `"update"`) with `"updates"`, each time comparing the `getScrollInfo().clientHeight` (we don't care about the `clientWidth` because it's hardcoded in the CSS `.breakpoint-action-eval-editor > .CodeMirror`) with the last value. This is necessary because `"viewportChange"` is only fired when the number of lines changes, which a wrapped line doesn't do. Canonical link: https://commits.webkit.org/251072@main Modified Paths trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointActionView.js Diff Modified: trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointActionView.js (294967 => 294968) --- trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointActionView.js 2022-05-27 23:52:53 UTC (rev 294967) +++ trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointActionView.js 2022-05-27 23:55:11 UTC (rev 294968) @@ -180,10 +180,9 @@ value: this._action.data || "", }); -this._codeMirror.on("viewportChange", this._codeMirrorViewportChanged.bind(this)); -this._codeMirror.on("change", this._handleJavaScriptCodeMirrorChange.bind(this)); +this._codeMirrorClientHeight = NaN; -this._codeMirrorViewport = {from: null, to: null}; +this._codeMirror.on("changes", this._handleJavaScriptCodeMirrorChanges.bind(this)); var completionController = new WI.CodeMirrorCompletionController(this._delegate.breakpointActionViewCodeMirrorCompletionControllerMode(this, this._codeMirror), this._codeMirror); completionController.addExtendedCompletionProvider("_javascript_", WI._javascript_RuntimeCompletionProvider); @@ -216,20 +215,17 @@ this._action.data = "" } -_handleJavaScriptCodeMirrorChange(event) +_handleJavaScriptCodeMirrorChanges(codeMirror, changes) { // Throw away the _expression_ if it's just whitespace. this._action.data = "" -} -_codeMirrorViewportChanged(event, from, to) -{ -if (this._codeMirrorViewport.from === from && this._codeMirrorViewport.to === to) -return; +let {clientHeight} = this._codeMirror.getScrollInfo(); +if (clientHeight !== this._codeMirrorClientHeight) { +this._codeMirrorClientHeight = clientHeight; -this._codeMirrorViewport.from = from; -this._codeMirrorViewport.to = to; -this._delegate.breakpointActionViewResized(this); +this._delegate.breakpointActionViewResized(this); +} } _handleEmulateUserGestureCheckboxChange(event) ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [294967] trunk/Source/WebInspectorUI/UserInterface/Views/ TimelineOverview.js
Title: [294967] trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js Revision 294967 Author drou...@apple.com Date 2022-05-27 16:52:53 -0700 (Fri, 27 May 2022) Log Message Web Inspector: Timelines: switching between Events/Frames while editing instruments leaves the UI in a broken state https://bugs.webkit.org/show_bug.cgi?id=218700 Reviewed by Patrick Angle. * Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js: (WI.TimelineOverview.prototype.set viewMode): (WI.TimelineOverview.prototype._viewModeDidChange): Forcibly stop editing instruments when switching between Events/Frames. Note that this will save the current state of edited instruments, so no changes will be lost. Canonical link: https://commits.webkit.org/251071@main Modified Paths trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js Diff Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js (294966 => 294967) --- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js 2022-05-27 23:40:43 UTC (rev 294966) +++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js 2022-05-27 23:52:53 UTC (rev 294967) @@ -174,9 +174,6 @@ set viewMode(x) { -if (this._editingInstruments) -return; - if (this._viewMode === x) return; @@ -824,6 +821,8 @@ _viewModeDidChange() { +this._stopEditingInstruments(); + let startTime = 0; let isRenderingFramesMode = this._viewMode === WI.TimelineOverview.ViewMode.RenderingFrames; if (isRenderingFramesMode) { ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [294966] trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py
Title: [294966] trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py Revision 294966 Author ab...@igalia.com Date 2022-05-27 16:40:43 -0700 (Fri, 27 May 2022) Log Message git-webkit pr: Show server response when updating an issue fails Reviewed by Jonathan Bedard. Small changes are also made to the request() method to make it more reusable: now it can handle methods other than GET, and can print custom error messages when requests fail. Bare usages of python-requests have been refactored to use self.request() where possible (that is, when the path being accessed is within the repo URL). * Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py: Canonical link: https://commits.webkit.org/251070@main Modified Paths trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py Diff Modified: trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py (294965 => 294966) --- trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py 2022-05-27 23:09:30 UTC (rev 294965) +++ trunk/Tools/Scripts/libraries/webkitbugspy/webkitbugspy/github.py 2022-05-27 23:40:43 UTC (rev 294966) @@ -137,7 +137,7 @@ save_in_keyring=save_in_keyring, ) -def request(self, path=None, params=None, headers=None, authenticated=None, paginate=True): +def request(self, path=None, params=None, method='GET', headers=None, authenticated=None, paginate=True, json=None, error_message=None): headers = {key: value for key, value in headers.items()} if headers else dict() headers['Accept'] = headers.get('Accept', 'application/vnd.github.v3+json') @@ -158,10 +158,12 @@ name=self.name, path='{}'.format(path) if path else '', ) -response = requests.get(url, params=params, headers=headers, auth=auth) +response = requests.request(method, url, params=params, headers=headers, auth=auth, json=json) if authenticated is None and not auth and response.status_code // 100 == 4: -return self.request(path=path, params=params, headers=headers, authenticated=True, paginate=paginate) -if response.status_code != 200: +return self.request(path=path, params=params, method=method, headers=headers, authenticated=True, paginate=paginate, json=json, error_message=error_message) +if response.status_code // 100 != 2: +if error_message: +sys.stderr.write("{}\n".format(error_message)) sys.stderr.write("Request to '{}' returned status code '{}'\n".format(url, response.status_code)) message = response.json().get('message') if message: @@ -193,6 +195,9 @@ ) if response.status_code // 100 != 2: sys.stderr.write("Request to '{}' returned status code '{}'\n".format(url, response.status_code)) +message = response.json().get('message') +if message: +sys.stderr.write('Message: {}\n'.format(message)) sys.stderr.write(self.REFRESH_TOKEN_PROMPT) return None @@ -368,19 +373,14 @@ for label in labels: if not self.labels.get(label): raise ValueError("'{}' is not a label for '{}'".format(label, self.url)) -response = requests.put( -'{api_url}/repos/{owner}/{name}/issues/{id}/labels'.format( -api_url=self.api_url, -owner=self.owner, -name=self.name, -id=issue.id, -), auth=HTTPBasicAuth(*self.credentials(required=True)), -headers=dict(Accept='application/vnd.github.v3+json'), +response = self.request( +'issues/{id}/labels'.format(id=issue.id), +method='PUT', +authenticated=True, json=dict(labels=labels), +error_message="Failed to modify '{}'".format(issue) ) -if response.status_code // 100 != 2: -sys.stderr.write("Failed to modify '{}'\n".format(issue)) -sys.stderr.write(self.REFRESH_TOKEN_PROMPT) +if not response: if not update_dict: return None elif project and component and version: @@ -390,45 +390,33 @@ if update_dict: update_dict['number'] = [issue.id] -response = requests.patch( -'{api_url}/repos/{owner}/{name}/issues/{id}'.format( -api_url=self.api_url, -owner=self.owner, -name=self.name, -id=issue.id, -), auth=HTTPBasicAuth(*self.credentials(required=True)), -headers=dict(Accept='application/vnd.github.v3+json'), +response = self.request( +'issues/{id}'.format(id=issue.id), +method='PATCH', +
[webkit-changes] [294964] trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Title: [294964] trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm Revision 294964 Author wenson_hs...@apple.com Date 2022-05-27 16:08:57 -0700 (Fri, 27 May 2022) Log Message [iOS] Performing the image markup action should reset `_imageAnalysisMarkupData` https://bugs.webkit.org/show_bug.cgi?id=241024 Reviewed by Aditya Keerthi. * Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView imageAnalysisMarkupMenu]): Canonical link: https://commits.webkit.org/251068@main Modified Paths trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (294963 => 294964) --- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2022-05-27 23:02:13 UTC (rev 294963) +++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2022-05-27 23:08:57 UTC (rev 294964) @@ -4677,10 +4677,11 @@ return nil; return [self menuWithInlineAction:WebCore::contextMenuItemTitleMarkupImage() identifier:@"WKActionMarkupImage" handler:[](WKContentView *view) { -if (!view->_imageAnalysisMarkupData) +auto markupData = std::exchange(view->_imageAnalysisMarkupData, { }); +if (!markupData) return; -auto [elementContext, image, preferredMIMEType] = *view->_imageAnalysisMarkupData; +auto [elementContext, image, preferredMIMEType] = *markupData; if (auto [data, type] = WebKit::imageDataForCroppedImageResult(image.get(), preferredMIMEType.createCFString().get()); data) view->_page->replaceImageWithMarkupResults(elementContext, { String { type.get() } }, { static_cast([data bytes]), [data length] }); }]; ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [294963] trunk/Source/WebCore
Title: [294963] trunk/Source/WebCore Revision 294963 Author commit-qu...@webkit.org Date 2022-05-27 16:02:13 -0700 (Fri, 27 May 2022) Log Message Update internal CSS to remove '-webkit-' prefixing where possible https://bugs.webkit.org/show_bug.cgi?id=240930 Patch by Sammy Gill on 2022-05-27 Reviewed by Brent Fulgham and Tim Nguyen. There are many instances in WebCore where prefixed versions of CSS attributes are being used even though these attributes have been standardized and have unprefixed versions. The prefixed versions no longer need to be used and can be replaced by their unprefixed equivalents. * Source/WebCore/Modules/mediacontrols/mediaControlsAdwaita.css: * Source/WebCore/Modules/mediacontrols/mediaControlsApple.css: * Source/WebCore/Modules/mediacontrols/mediaControlsBase.css: * Source/WebCore/css/html.css: * Source/WebCore/css/legacyFormControlsIOS.css: * Source/WebCore/css/mediaControls.css: * Source/WebCore/css/themeAdwaita.css: * Source/WebCore/html/shadow/imageOverlay.css: * Source/WebCore/html/shadow/mac/imageControlsMac.css: * Source/WebCore/html/shadow/meterElementShadow.css: * Source/WebCore/xml/XMLViewer.css: Canonical link: https://commits.webkit.org/251067@main Modified Paths trunk/Source/WebCore/Modules/mediacontrols/mediaControlsAdwaita.css trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css trunk/Source/WebCore/Modules/mediacontrols/mediaControlsBase.css trunk/Source/WebCore/css/html.css trunk/Source/WebCore/css/legacyFormControlsIOS.css trunk/Source/WebCore/css/mediaControls.css trunk/Source/WebCore/css/themeAdwaita.css trunk/Source/WebCore/html/shadow/imageOverlay.css trunk/Source/WebCore/html/shadow/mac/imageControlsMac.css trunk/Source/WebCore/html/shadow/meterElementShadow.css trunk/Source/WebCore/xml/XMLViewer.css Diff Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsAdwaita.css (294962 => 294963) --- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsAdwaita.css 2022-05-27 22:59:42 UTC (rev 294962) +++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsAdwaita.css 2022-05-27 23:02:13 UTC (rev 294963) @@ -189,7 +189,7 @@ audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display { --webkit-user-select: none; +user-select: none; flex: none; display: block; border: none; @@ -226,7 +226,7 @@ audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline { --webkit-appearance: media-slider !important; +appearance: media-slider !important; display: flex !important; flex: 1 1 auto !important; height: 4px !important; @@ -249,7 +249,6 @@ audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container { --webkit-appearance: media-volume-slider-container; display: flex; overflow: hidden; position: absolute; @@ -282,7 +281,7 @@ audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider { --webkit-appearance: media-volume-slider !important; +appearance: media-volume-slider !important; display: flex !important; align-items: center !important; flex-direction: column !important; @@ -313,7 +312,7 @@ } input[type="range"]::-webkit-media-slider-thumb { --webkit-appearance: none !important; +appearance: none !important; width: 14px; height: 14px; border-radius: 7px; @@ -348,7 +347,6 @@ } video::-webkit-media-controls-closed-captions-container { --webkit-appearance: media-closed-captions-container; display: flex; position: absolute; bottom: 35px; @@ -364,7 +362,7 @@ font-weight: normal; font-style: normal; color: white; --webkit-user-select: none; +user-select: none; transition: height 0.10s linear; } @@ -473,7 +471,7 @@ video::-webkit-media-text-track-container, audio::-webkit-media-text-track-container { position: relative; --webkit-flex: 1 1 auto; +flex: 1 1 auto; } video::-webkit-media-text-track-container { @@ -490,7 +488,7 @@ text-indent: 0; text-decoration: none; pointer-events: none; --webkit-user-select: none; +user-select: none; flex: 1 1 auto; Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css (294962 => 294963) --- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css 2022-05-27 22:59:42 UTC (rev 294962) +++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css 2022-05-27 23:02:13 UTC (rev 294963) @@ -43,10 +43,10 @@ width: inherit; height: inherit; position: relative; -display: -webkit-flex !important; --webkit-align-items: stretch; --webkit-justify-content: flex-end; --webkit-flex-direction: column; +display: flex !important; +align-items: stretch; +justify-content: flex-end; +flex-direction: column; font: -webkit-small-control; white-space:
[webkit-changes] [294962] trunk/LayoutTests/platform
Title: [294962] trunk/LayoutTests/platform Revision 294962 Author rack...@apple.com Date 2022-05-27 15:59:42 -0700 (Fri, 27 May 2022) Log Message [Gardening]: [ iOS macOS ] two imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage tests are a consistent failure https://bugs.webkit.org/show_bug.cgi?id=241048 Unreviewed test gardening. * LayoutTests/platform/ios/TestExpectations: * LayoutTests/platform/mac-wk1/TestExpectations: * LayoutTests/platform/mac-wk2/TestExpectations: Canonical link: https://commits.webkit.org/251066@main Modified Paths trunk/LayoutTests/platform/ios/TestExpectations trunk/LayoutTests/platform/mac-wk1/TestExpectations trunk/LayoutTests/platform/mac-wk2/TestExpectations Diff Modified: trunk/LayoutTests/platform/ios/TestExpectations (294961 => 294962) --- trunk/LayoutTests/platform/ios/TestExpectations 2022-05-27 22:55:57 UTC (rev 294961) +++ trunk/LayoutTests/platform/ios/TestExpectations 2022-05-27 22:59:42 UTC (rev 294962) @@ -3352,8 +3352,6 @@ imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-canvas.html [ Pass ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-cloned.html [ Pass ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-image.html [ Pass ] -imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html [ Pass ] -imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html [ Pass ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-canvas.html [ Pass ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-pattern-image.html [ Pass ] imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-settings.html [ Pass ] @@ -3654,3 +3652,6 @@ webkit.org/b/240927 [ Debug ] storage/indexeddb/request-with-null-open-db-request.html [ Pass Crash ] webkit.org/b/240929 [ Debug ] resize-observer/resize-observer-with-zoom.html [ Pass Timeout ] + +webkit.org/b/241048 imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html [ Failure ] +webkit.org/b/241048 imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html [ Failure ] Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (294961 => 294962) --- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2022-05-27 22:55:57 UTC (rev 294961) +++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2022-05-27 22:59:42 UTC (rev 294962) @@ -1844,3 +1844,6 @@ webkit.org/b/232630 fast/forms/autofocus-opera-003.html [ Failure ] webkit.org/b/240841 fast/forms/scroll-into-view-and-show-validation-message.html [ Pass Failure ] + +webkit.org/b/241048 imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html [ Failure Timeout ] +webkit.org/b/241048 imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html [ Failure Timeout ] Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (294961 => 294962) --- trunk/LayoutTests/platform/mac-wk2/TestExpectations 2022-05-27 22:55:57 UTC (rev 294961) +++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2022-05-27 22:59:42 UTC (rev 294962) @@ -1741,3 +1741,5 @@ webkit.org/b/240927 [ BigSur Debug ] storage/indexeddb/request-with-null-open-db-request.html [ Pass Crash ] +webkit.org/b/241048 imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-ImageBitmap-video.html [ Pass Failure ] +webkit.org/b/241048 imported/w3c/web-platform-tests/html/canvas/element/manual/wide-gamut-canvas/canvas-display-p3-drawImage-video.html [ Pass Failure ] ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [294961] trunk/LayoutTests/webgl/TestExpectations
Title: [294961] trunk/LayoutTests/webgl/TestExpectations Revision 294961 Author commit-qu...@webkit.org Date 2022-05-27 15:55:57 -0700 (Fri, 27 May 2022) Log Message Flakes in WebGL conformance[2]/textures/image_bitmap_from_image_bitmap/ tests https://bugs.webkit.org/show_bug.cgi?id=241027 Patch by Kenneth Russell on 2022-05-27 Unreviewed test gardening. * LayoutTests/webgl/TestExpectations: Mark all tests under: webgl/2.0.0/conformance[2]/textures/image_bitmap_from_image_bitmap as flaky (Pass Failure) while the bug is being investigated. Canonical link: https://commits.webkit.org/251065@main Modified Paths trunk/LayoutTests/webgl/TestExpectations Diff Modified: trunk/LayoutTests/webgl/TestExpectations (294960 => 294961) --- trunk/LayoutTests/webgl/TestExpectations 2022-05-27 22:48:36 UTC (rev 294960) +++ trunk/LayoutTests/webgl/TestExpectations 2022-05-27 22:55:57 UTC (rev 294961) @@ -8,6 +8,79 @@ # Run as much of DEQP as possible webgl/2.0.0/deqp [ Pass Slow ] +# Flaky failures +webkit.org/b/241027 webgl/2.0.0/conformance/textures/image_bitmap_from_image_bitmap/tex-2d-rgb-rgb-unsigned_byte.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance/textures/image_bitmap_from_image_bitmap/tex-2d-rgb-rgb-unsigned_short_5_6_5.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance/textures/image_bitmap_from_image_bitmap/tex-2d-rgba-rgba-unsigned_byte.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance/textures/image_bitmap_from_image_bitmap/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance/textures/image_bitmap_from_image_bitmap/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r8-red-unsigned_byte.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r16f-red-half_float.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r16f-red-float.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r32f-red-float.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r8ui-red_integer-unsigned_byte.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rg8-rg-unsigned_byte.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rg16f-rg-half_float.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rg16f-rg-float.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rg32f-rg-float.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rg8ui-rg_integer-unsigned_byte.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb8-rgb-unsigned_byte.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-srgb8-rgb-unsigned_byte.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb565-rgb-unsigned_byte.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb565-rgb-unsigned_short_5_6_5.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r11f_g11f_b10f-rgb-unsigned_int_10f_11f_11f_rev.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r11f_g11f_b10f-rgb-half_float.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-r11f_g11f_b10f-rgb-float.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb9_e5-rgb-half_float.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb9_e5-rgb-float.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb16f-rgb-half_float.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb16f-rgb-float.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb32f-rgb-float.html [ Pass Failure ] +webkit.org/b/241027 webgl/2.0.0/conformance2/textures/image_bitmap_from_image_bitmap/tex-2d-rgb8ui-rgb_integer-unsigned_byte.html [ Pass Failure ] +webkit.org/b/241027
[webkit-changes] [294960] trunk/Source
Title: [294960] trunk/Source Revision 294960 Author mark@apple.com Date 2022-05-27 15:48:36 -0700 (Fri, 27 May 2022) Log Message Revert "Non unified build fixes, lateish May 2022 edition" Unreviewed. This reverts commit 2db7e5eef53c0424ac30bccf7cdf9aa8428e9464. We need to revert 2a12d06fc13f7c3bbcf8d204d6f760ab222d75d9 because it broke WASM on 64-bit platforms. 2db7e5eef53c0424ac30bccf7cdf9aa8428e9464 was builds on top of 2a12d06fc13f7c3bbcf8d204d6f760ab222d75d9, and hence, needs to be reverted too. Canonical link: https://commits.webkit.org/251064@main Modified Paths trunk/Source/_javascript_Core/wasm/js/WasmToJS.cpp trunk/Source/WebCore/platform/audio/MultiChannelResampler.cpp Diff Modified: trunk/Source/_javascript_Core/wasm/js/WasmToJS.cpp (294959 => 294960) --- trunk/Source/_javascript_Core/wasm/js/WasmToJS.cpp 2022-05-27 22:10:16 UTC (rev 294959) +++ trunk/Source/_javascript_Core/wasm/js/WasmToJS.cpp 2022-05-27 22:48:36 UTC (rev 294960) @@ -29,7 +29,6 @@ #if ENABLE(WEBASSEMBLY) #include "CCallHelpers.h" -#include "JSCJSValueInlines.h" #include "JSWebAssemblyInstance.h" #include "LinkBuffer.h" #include "MaxFrameExtentForSlowPathCall.h" Modified: trunk/Source/WebCore/platform/audio/MultiChannelResampler.cpp (294959 => 294960) --- trunk/Source/WebCore/platform/audio/MultiChannelResampler.cpp 2022-05-27 22:10:16 UTC (rev 294959) +++ trunk/Source/WebCore/platform/audio/MultiChannelResampler.cpp 2022-05-27 22:48:36 UTC (rev 294960) @@ -34,7 +34,6 @@ #include "AudioBus.h" #include "SincResampler.h" -#include namespace WebCore { ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [294959] trunk
Title: [294959] trunk Revision 294959 Author drou...@apple.com Date 2022-05-27 15:10:16 -0700 (Fri, 27 May 2022) Log Message [Modern Media Controls] REGRESSION(r293684) cannot pause `` if `controls` are added after `"play"` https://bugs.webkit.org/show_bug.cgi?id=240985 Reviewed by Eric Carlson. * Source/WebCore/Modules/modern-media-controls/media/media-controller.js: (MediaController): Actually check if the `media` is playing and/or has played instead of always assuming `false`. * Source/WebCore/Modules/modern-media-controls/media/start-support.js: (StartSupport.prototype._shouldShowStartButton): Drive-by: It's no longer necessary to check `media.played.length` here it's part of `mediaController.hasPlayed`. * LayoutTests/media/modern-media-controls/ios-inline-media-controls/touch/ios-inline-media-controls-added-after-play.html: Added. * LayoutTests/media/modern-media-controls/ios-inline-media-controls/touch/ios-inline-media-controls-added-after-play-expected.txt: Added. Canonical link: https://commits.webkit.org/251062@main Modified Paths trunk/Source/WebCore/Modules/modern-media-controls/media/media-controller.js trunk/Source/WebCore/Modules/modern-media-controls/media/start-support.js Added Paths trunk/LayoutTests/media/modern-media-controls/ios-inline-media-controls/touch/ios-inline-media-controls-added-after-play-expected.txt trunk/LayoutTests/media/modern-media-controls/ios-inline-media-controls/touch/ios-inline-media-controls-added-after-play.html Diff Added: trunk/LayoutTests/media/modern-media-controls/ios-inline-media-controls/touch/ios-inline-media-controls-added-after-play-expected.txt (0 => 294959) --- trunk/LayoutTests/media/modern-media-controls/ios-inline-media-controls/touch/ios-inline-media-controls-added-after-play-expected.txt (rev 0) +++ trunk/LayoutTests/media/modern-media-controls/ios-inline-media-controls/touch/ios-inline-media-controls-added-after-play-expected.txt 2022-05-27 22:10:16 UTC (rev 294959) @@ -0,0 +1,17 @@ +Check that tapping the start button pauses the video if controls are added after it has started playing. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +'play' event. +PASS shadowRoot.querySelector('button.play-pause') became different from null +PASS shadowRoot.querySelector('button.play-pause').getBoundingClientRect().width became different from 0 +Tapping start button... +Waiting for pause... +PASS media.paused became true +Checking again... +PASS media.paused is true +PASS successfullyParsed is true + +TEST COMPLETE + Added: trunk/LayoutTests/media/modern-media-controls/ios-inline-media-controls/touch/ios-inline-media-controls-added-after-play.html (0 => 294959) --- trunk/LayoutTests/media/modern-media-controls/ios-inline-media-controls/touch/ios-inline-media-controls-added-after-play.html (rev 0) +++ trunk/LayoutTests/media/modern-media-controls/ios-inline-media-controls/touch/ios-inline-media-controls-added-after-play.html 2022-05-27 22:10:16 UTC (rev 294959) @@ -0,0 +1,45 @@ + + +