[webkit-changes] [295445] trunk/Source/WebKit/NetworkProcess/cocoa/ LaunchServicesDatabaseObserver.mm
Title: [295445] trunk/Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.mm Revision 295445 Author pvol...@apple.com Date 2022-06-09 21:58:46 -0700 (Thu, 09 Jun 2022) Log Message Revert r295422 https://bugs.webkit.org/show_bug.cgi?id=241502 Unreviewed, revert r295422. * Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.mm: (WebKit::LaunchServicesDatabaseObserver::LaunchServicesDatabaseObserver): (WebKit::LaunchServicesDatabaseObserver::startObserving): (WebKit::LaunchServicesDatabaseObserver::~LaunchServicesDatabaseObserver): (WebKit::hasSystemContentDatabase): Deleted. Canonical link: https://commits.webkit.org/251451@main Modified Paths trunk/Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.mm Diff Modified: trunk/Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.mm (295444 => 295445) --- trunk/Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.mm 2022-06-10 03:08:10 UTC (rev 295444) +++ trunk/Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.mm 2022-06-10 04:58:46 UTC (rev 295445) @@ -34,19 +34,9 @@ namespace WebKit { -#if HAVE(LSDATABASECONTEXT) -static bool hasSystemContentDatabase() -{ -return [LSDatabaseContext.sharedDatabaseContext respondsToSelector:@selector(getSystemContentDatabaseObject4WebKit:)]; -} -#endif - LaunchServicesDatabaseObserver::LaunchServicesDatabaseObserver(NetworkProcess&) { #if HAVE(LSDATABASECONTEXT) -if (hasSystemContentDatabase()) -return; - m_observer = [LSDatabaseContext.sharedDatabaseContext addDatabaseChangeObserver4WebKit:^(xpc_object_t change) { auto message = adoptOSObject(xpc_dictionary_create(nullptr, nullptr, 0)); xpc_dictionary_set_string(message.get(), XPCEndpoint::xpcMessageNameKey, LaunchServicesDatabaseXPCConstants::xpcUpdateLaunchServicesDatabaseMessageName); @@ -74,20 +64,6 @@ } #if HAVE(LSDATABASECONTEXT) -if (hasSystemContentDatabase()) { -[LSDatabaseContext.sharedDatabaseContext getSystemContentDatabaseObject4WebKit:makeBlockPtr([connection = connection] (xpc_object_t _Nullable object, NSError * _Nullable error) { -if (!object) -return; -auto message = adoptOSObject(xpc_dictionary_create(nullptr, nullptr, 0)); -xpc_dictionary_set_string(message.get(), XPCEndpoint::xpcMessageNameKey, LaunchServicesDatabaseXPCConstants::xpcUpdateLaunchServicesDatabaseMessageName); -xpc_dictionary_set_value(message.get(), LaunchServicesDatabaseXPCConstants::xpcLaunchServicesDatabaseKey, object); - -xpc_connection_send_message(connection.get(), message.get()); - -}).get()]; -return; -} - RetainPtr observer = [LSDatabaseContext.sharedDatabaseContext addDatabaseChangeObserver4WebKit:^(xpc_object_t change) { auto message = adoptOSObject(xpc_dictionary_create(nullptr, nullptr, 0)); xpc_dictionary_set_string(message.get(), XPCEndpoint::xpcMessageNameKey, LaunchServicesDatabaseXPCConstants::xpcUpdateLaunchServicesDatabaseMessageName); @@ -107,8 +83,6 @@ LaunchServicesDatabaseObserver::~LaunchServicesDatabaseObserver() { #if HAVE(LSDATABASECONTEXT) -if (hasSystemContentDatabase()) -return; [LSDatabaseContext.sharedDatabaseContext removeDatabaseChangeObserver4WebKit:m_observer.get()]; #endif } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295444] trunk/Source/WebCore
Title: [295444] trunk/Source/WebCore Revision 295444 Author za...@apple.com Date 2022-06-09 20:08:10 -0700 (Thu, 09 Jun 2022) Log Message computeUnderlineOffset should not take TextRun https://bugs.webkit.org/show_bug.cgi?id=241471 Reviewed by Antti Koivisto. This is in preparation for taking visual overflow for decoration into account in IFC. * Source/WebCore/rendering/TextDecorationPainter.cpp: (WebCore::TextDecorationPainter::paintBackgroundDecorations): * Source/WebCore/style/InlineTextBoxStyle.cpp: (WebCore::computeUnderlineOffset): (WebCore::visualOverflowForDecorations): * Source/WebCore/style/InlineTextBoxStyle.h: Canonical link: https://commits.webkit.org/251450@main Modified Paths trunk/Source/WebCore/rendering/TextDecorationPainter.cpp trunk/Source/WebCore/style/InlineTextBoxStyle.cpp trunk/Source/WebCore/style/InlineTextBoxStyle.h Diff Modified: trunk/Source/WebCore/rendering/TextDecorationPainter.cpp (295443 => 295444) --- trunk/Source/WebCore/rendering/TextDecorationPainter.cpp 2022-06-10 03:06:22 UTC (rev 295443) +++ trunk/Source/WebCore/rendering/TextDecorationPainter.cpp 2022-06-10 03:08:10 UTC (rev 295444) @@ -28,6 +28,7 @@ #include "GraphicsContext.h" #include "HTMLAnchorElement.h" #include "HTMLFontElement.h" +#include "InlineIteratorLineBox.h" #include "InlineTextBoxStyle.h" #include "RenderBlock.h" #include "RenderStyle.h" @@ -279,7 +280,14 @@ if (m_decorations.contains(TextDecorationLine::Underline)) { float textDecorationBaseFontSize = 16; auto defaultGap = m_lineStyle.computedFontSize() / textDecorationBaseFontSize; -float offset = computeUnderlineOffset(m_lineStyle.textUnderlinePosition(), m_lineStyle.textUnderlineOffset(), m_lineStyle.metricsOfPrimaryFont(), m_textBox, defaultGap); +float offset = computeUnderlineOffset({ m_lineStyle +, defaultGap +, _textBox->renderer() +, m_textBox->lineBox()->baselineType() +, m_textBox->logicalTop() +, m_textBox->logicalBottom() +, m_textBox->lineBox() +}); float wavyOffset = m_styles.underlineStyle == TextDecorationStyle::Wavy ? m_wavyOffset : 0; FloatRect rect(localOrigin, FloatSize(m_width, textDecorationThickness)); rect.move(0, offset + wavyOffset); Modified: trunk/Source/WebCore/style/InlineTextBoxStyle.cpp (295443 => 295444) --- trunk/Source/WebCore/style/InlineTextBoxStyle.cpp 2022-06-10 03:06:22 UTC (rev 295443) +++ trunk/Source/WebCore/style/InlineTextBoxStyle.cpp 2022-06-10 03:08:10 UTC (rev 295444) @@ -29,7 +29,6 @@ #include "FontCascade.h" #include "HTMLAnchorElement.h" #include "HTMLNames.h" -#include "InlineIteratorLineBox.h" #include "InlineIteratorTextBox.h" #include "LegacyInlineTextBox.h" #include "LegacyRootInlineBox.h" @@ -101,10 +100,10 @@ return current; } -float computeUnderlineOffset(TextUnderlinePosition underlinePosition, TextUnderlineOffset underlineOffset, const FontMetrics& fontMetrics, const InlineIterator::TextBoxIterator& textRun, float defaultGap) +float computeUnderlineOffset(const UnderlineOffsetArguments& context) { // This represents the gap between the baseline and the closest edge of the underline. -float gap = std::max(1, std::ceil(defaultGap / 2.0f)); +float gap = std::max(1, std::ceil(context.defaultGap / 2.0f)); // FIXME: The code for visual overflow detection passes in a null inline text box. This means it is now // broken for the case where auto needs to behave like "under". @@ -115,11 +114,14 @@ // even if it is horizontal, but detecting this has performance implications. For now we only work with // vertical text, since we already determined the baseline type to be ideographic in that // case. - +auto underlinePosition = context.lineStyle.textUnderlinePosition(); +auto underlineOffset = context.lineStyle.textUnderlineOffset(); +auto& fontMetrics = context.lineStyle.metricsOfPrimaryFont(); + auto resolvedUnderlinePosition = underlinePosition; if (resolvedUnderlinePosition == TextUnderlinePosition::Auto && underlineOffset.isAuto()) { -if (textRun) -resolvedUnderlinePosition = textRun->lineBox()->baselineType() == IdeographicBaseline ? TextUnderlinePosition::Under : TextUnderlinePosition::Auto; +if (context.renderer) +resolvedUnderlinePosition = context.baselineType == IdeographicBaseline ? TextUnderlinePosition::Under : TextUnderlinePosition::Auto; else resolvedUnderlinePosition = TextUnderlinePosition::Auto; } @@ -132,22 +134,22 @@ case TextUnderlinePosition::FromFont: return fontMetrics.ascent() + fontMetrics.underlinePosition() + underlineOffset.lengthOr(0); case TextUnderlinePosition::Under: { -ASSERT(textRun); +ASSERT(context.lineBox && context.renderer); //
[webkit-changes] [295442] trunk/Source/WebKit/NetworkProcess/cocoa/ LaunchServicesDatabaseObserver.mm
Title: [295442] trunk/Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.mm Revision 295442 Author pvol...@apple.com Date 2022-06-09 17:31:13 -0700 (Thu, 09 Jun 2022) Log Message Build fix after r295422 https://bugs.webkit.org/show_bug.cgi?id=241494 Unreviewed, build fix. * Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.mm: Canonical link: https://commits.webkit.org/251448@main Modified Paths trunk/Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.mm Diff Modified: trunk/Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.mm (295441 => 295442) --- trunk/Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.mm 2022-06-10 00:14:26 UTC (rev 295441) +++ trunk/Source/WebKit/NetworkProcess/cocoa/LaunchServicesDatabaseObserver.mm 2022-06-10 00:31:13 UTC (rev 295442) @@ -34,10 +34,12 @@ namespace WebKit { +#if HAVE(LSDATABASECONTEXT) static bool hasSystemContentDatabase() { return [LSDatabaseContext.sharedDatabaseContext respondsToSelector:@selector(getSystemContentDatabaseObject4WebKit:)]; } +#endif LaunchServicesDatabaseObserver::LaunchServicesDatabaseObserver(NetworkProcess&) { ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295441] trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Title: [295441] trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm Revision 295441 Author wenson_hs...@apple.com Date 2022-06-09 17:14:26 -0700 (Thu, 09 Jun 2022) Log Message [ iOS Debug ] ASSERTION FAILED: Attempt to access post layout data before receiving it on editing/editable-region/fixed-and-absolute-contenteditable-scrolled.html https://bugs.webkit.org/show_bug.cgi?id=237541 rdar://89918871 Reviewed by Simon Fraser. After the changes in r289876, this test started sometimes hitting an assertion when run immediately after `editing/deleting/ios/backspace-last-character.html`. By eliminating a sync IPC call to the web content process when requesting autocorrection information, UIKit now requests selection-caret- relative character information slightly earlier than it previously did when dismissing the keyboard, which may occur after we've received an editor state update after blurring the focused element, but before we've received post-layout data. In this scenario, we already know that the focused element has been blurred and the selection is no longer editable, so once the post-layout data does arrive, it would contain `0` for all of the characters close to the selection caret. As such, we can simply return 0 early before attempting to access post-layout data if the selection is not a caret in editable content, since all of the relevant post-layout data members (`characterAfterSelection`, `characterBeforeSelection` and `twoCharacterBeforeSelection`) are going to be 0 anyways. * Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _characterInRelationToCaretSelection:]): Canonical link: https://commits.webkit.org/251447@main Modified Paths trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm Diff Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (295440 => 295441) --- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2022-06-09 23:43:51 UTC (rev 295440) +++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2022-06-10 00:14:26 UTC (rev 295441) @@ -4869,20 +4869,22 @@ }); } -- (UTF32Char)_characterBeforeCaretSelection +- (UTF32Char)_characterInRelationToCaretSelection:(int)amount { -return _lastInsertedCharacterToOverrideCharacterBeforeSelection.value_or(_page->editorState().postLayoutData().characterBeforeSelection); -} +if (amount == -1 && _lastInsertedCharacterToOverrideCharacterBeforeSelection) +return *_lastInsertedCharacterToOverrideCharacterBeforeSelection; -- (UTF32Char)_characterInRelationToCaretSelection:(int)amount -{ +auto& state = _page->editorState(); +if (!state.isContentEditable || state.selectionIsNone || state.selectionIsRange) +return 0; + switch (amount) { case 0: -return _page->editorState().postLayoutData().characterAfterSelection; +return state.postLayoutData().characterAfterSelection; case -1: -return self._characterBeforeCaretSelection; +return state.postLayoutData().characterBeforeSelection; case -2: -return _page->editorState().postLayoutData().twoCharacterBeforeSelection; +return state.postLayoutData().twoCharacterBeforeSelection; default: return 0; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295440] trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm
Title: [295440] trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm Revision 295440 Author eric.carl...@apple.com Date 2022-06-09 16:43:51 -0700 (Thu, 09 Jun 2022) Log Message [Cocoa] TestWebKitAPI.MediaLoading.CaptivePortalHLS times out https://bugs.webkit.org/show_bug.cgi?id=241476 rdar://93270049 Reviewed by Jer Noble. * Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm: (TestWebKitAPI::TEST): Return early if the SPI used for captive portal mode is not implemented. Canonical link: https://commits.webkit.org/251446@main Modified Paths trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm Diff Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm (295439 => 295440) --- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm 2022-06-09 23:12:18 UTC (rev 295439) +++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm 2022-06-09 23:43:51 UTC (rev 295440) @@ -31,6 +31,8 @@ #import "TestWKWebView.h" #import +#import + #if ENABLE(VIDEO) && USE(AVFOUNDATION) namespace TestWebKitAPI { @@ -187,6 +189,9 @@ TEST(MediaLoading, CaptivePortalHLS) { +if (!PAL::canLoad_AVFoundation_AVURLAssetAllowableTypeCategoriesKey()) +return; + constexpr auto hlsPlayTestHTML =
[webkit-changes] [295439] trunk/Source/WebCore/platform/graphics
Title: [295439] trunk/Source/WebCore/platform/graphics Revision 295439 Author eric.carl...@apple.com Date 2022-06-09 16:12:18 -0700 (Thu, 09 Jun 2022) Log Message [iOS] iPhone fullscreen captions are sometimes duplicated https://bugs.webkit.org/show_bug.cgi?id=241464 rdar://94261522 Reviewed by Jer Noble. Clear the text track representation when the video layer is cleared. * Source/WebCore/platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm: (WebCore::VideoLayerManagerObjC::didDestroyVideoLayer): Clear the text track representation. * Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.mm: (WebCore::TextTrackRepresentationCocoa::TextTrackRepresentationCocoa): Name the text track representation layer to aid debugging in the future. Canonical link: https://commits.webkit.org/251445@main Modified Paths trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm trunk/Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.mm Diff Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm (295438 => 295439) --- trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm 2022-06-09 21:45:40 UTC (rev 295438) +++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm 2022-06-09 23:12:18 UTC (rev 295439) @@ -91,6 +91,9 @@ { ALWAYS_LOG(LOGIDENTIFIER); +#if ENABLE(VIDEO_PRESENTATION_MODE) +setTextTrackRepresentationLayer(nil); +#endif [m_videoLayer removeFromSuperlayer]; m_videoInlineLayer = nil; Modified: trunk/Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.mm (295438 => 295439) --- trunk/Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.mm 2022-06-09 21:45:40 UTC (rev 295438) +++ trunk/Source/WebCore/platform/graphics/cocoa/TextTrackRepresentationCocoa.mm 2022-06-09 23:12:18 UTC (rev 295439) @@ -119,6 +119,8 @@ { [m_layer setDelegate:m_delegate.get()]; [m_layer setContentsGravity:kCAGravityBottom]; + +[m_layer setName:@"TextTrackRepresentation"]; } TextTrackRepresentationCocoa::~TextTrackRepresentationCocoa() ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295438] trunk
Title: [295438] trunk Revision 295438 Author drou...@apple.com Date 2022-06-09 14:45:40 -0700 (Thu, 09 Jun 2022) Log Message [Modern Media Controls] upstream new features https://bugs.webkit.org/show_bug.cgi?id=241390 Reviewed by Eric Carlson. * Source/WebCore/Modules/modern-media-controls/controls/inline-media-controls.js: (InlineMediaControls.prototype.layout): (InlineMediaControls.prototype.topLeftContainerButtons): Renamed from `_topLeftContainerButtons`. (InlineMediaControls.prototype.leftContainerButtons): Renamed from `_leftContainerButtons`. (InlineMediaControls.prototype.centerContainerButtons): Renamed from `_centerContainerButtons`. (InlineMediaControls.prototype.rightContainerButtons): Renamed from `_rightContainerButtons`. (InlineMediaControls.prototype.droppableButtons): Renamed from `_droppableButtons`. (InlineMediaControls.prototype.collapsableButtons): Renamed from `_collapsableButtons`. Move these methods into `// Protected` so subclasses can override. * Source/WebCore/Modules/modern-media-controls/controls/ios-inline-media-controls.js: (IOSInlineMediaControls.prototype.layout): Added. (IOSInlineMediaControls.prototype.centerContainerButtons): Added. (IOSInlineMediaControls.prototype.leftContainerButtons): Added. (IOSInlineMediaControls.prototype.droppableButtons): Added. (IOSInlineMediaControls.prototype.get _shouldUseMultilineLayout): Added. * Source/WebCore/Modules/modern-media-controls/controls/ios-inline-media-controls.css: Added. (.media-controls.inline.ios:not(.audio)): (.media-controls.inline.ios:not(.audio):is(:empty, .faded)): (.media-controls.inline.ios:not(.audio) *): (.media-controls.inline.ios:not(.audio) > .controls-bar:is(.top-left, .top-right)): (.media-controls.inline.ios:not(.audio) > .controls-bar.center): Only use the new UI for ``. * Source/WebCore/Modules/modern-media-controls/controls/slider.js: (Slider): (Slider.prototype.get allowsRelativeScrubbing): Added. (Slider.prototype.set allowsRelativeScrubbing): Added. (Slider.prototype.handleEvent): (Slider.prototype._handlePointerdownEvent): (Slider.prototype._handlePointermoveEvent): Added. (Slider.prototype._handlePointerupEvent): (Slider.prototype._playbackProgress): Added. (Slider.prototype._valueWillStartChanging): Deleted. (Slider.prototype._valueDidStopChanging): Deleted. * Source/WebCore/Modules/modern-media-controls/controls/slider.css: (.slider.allows-relative-scrubbing > .custom-slider): Added. (.slider.allows-relative-scrubbing > .custom-slider.changing): Added. (.slider.allows-relative-scrubbing > .custom-slider > .fill): Added. (.slider.allows-relative-scrubbing > .custom-slider.changing > .fill.primary): Added. (.slider.allows-relative-scrubbing > .custom-slider.changing > .fill.track): Added. (.slider.allows-relative-scrubbing > .custom-slider.changing > .fill.secondary): Added. (.slider.allows-relative-scrubbing > input): Added. (.ios .slider > input): (.ios .slider:not(.allows-relative-scrubbing) > input): Added. * Source/WebCore/Modules/modern-media-controls/controls/adwaita-fullscreen-media-controls.js: (AdwaitaFullscreenMediaControls): * Source/WebCore/Modules/modern-media-controls/controls/adwaita-inline-media-controls.js: (AdwaitaInlineMediaControls): * Source/WebCore/Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js: (MacOSFullscreenMediaControls): * Source/WebCore/Modules/modern-media-controls/controls/macos-inline-media-controls.js: (MacOSInlineMediaControls): * Source/WebCore/Modules/modern-media-controls/controls/time-control.js: (TimeControl): Allow the user to use relative scrubbing instead of having to exactly tap/drag on the knob. * Source/WebCore/Modules/modern-media-controls/controls/ios-layout-traits.js: (IOSLayoutTraits.prototype.skipDuration): Change to 10s. * Source/WebCore/Modules/modern-media-controls/controls/overflow-button.js: (OverflowButton): * Source/WebCore/Modules/modern-media-controls/controls/layout-traits.js: (LayoutTraits.prototype.overflowButtonHasCircle): Deleted. * Source/WebCore/Modules/modern-media-controls/controls/icon-service.js: * Source/WebCore/Modules/modern-media-controls/images/iOS/Overflow.svg: * Source/WebCore/Modules/modern-media-controls/images/iOS/OverflowCircle.svg: Removed. Update iOS overflow button icon. * Source/WebCore/CMakeLists.txt: * Source/WebCore/DerivedSources-input.xcfilelist: * Source/WebCore/DerivedSources.make: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * LayoutTests/fast/mediastream/MediaStream-video-element-video-tracks-disabled.html: * LayoutTests/fast/mediastream/MediaStream-video-element-video-tracks-disabled-expected.html: * LayoutTests/media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-layout.html: * LayoutTests/media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-layout-expected.txt: * LayoutTests/media/modern-media-controls/ios-inline-media-controls/touch/ios-inline-media-controls-added-after-play.html: *
[webkit-changes] [295437] trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm
Title: [295437] trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm Revision 295437 Author achristen...@apple.com Date 2022-06-09 14:41:45 -0700 (Thu, 09 Jun 2022) Log Message REGRESSION: [iOS] TestWebKitAPI.HSTS.ThirdParty is consistely failing https://bugs.webkit.org/show_bug.cgi?id=241342 Reviewed by Kate Cheney. * Tools/TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm: (TestWebKitAPI::hstsWebViewAndDelegate): (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/251443@main Modified Paths trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm Diff Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm (295436 => 295437) --- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm 2022-06-09 21:36:44 UTC (rev 295436) +++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/HSTS.mm 2022-06-09 21:41:45 UTC (rev 295437) @@ -47,6 +47,7 @@ [storeConfiguration setAllowsHSTSWithUntrustedRootCertificate:YES]; auto viewConfiguration = adoptNS([WKWebViewConfiguration new]); [viewConfiguration setWebsiteDataStore:adoptNS([[WKWebsiteDataStore alloc] _initWithConfiguration:storeConfiguration.get()]).get()]; +[[viewConfiguration websiteDataStore] _setResourceLoadStatisticsEnabled:YES]; auto webView = adoptNS([[WKWebView alloc] initWithFrame:CGRectMake(0, 0, 100, 100) configuration:viewConfiguration.get()]); auto delegate = adoptNS([TestNavigationDelegate new]); [webView setNavigationDelegate:delegate.get()]; @@ -91,12 +92,7 @@ EXPECT_WK_STREQ(webView.get().URL.absoluteString, "https://example.com/"); } -// FIXME: Re-enable after webkit.org/b/241342 is resolved -#if (PLATFORM(IOS)) -TEST(HSTS, DISABLED_ThirdParty) -#else TEST(HSTS, ThirdParty) -#endif { auto httpsServer = hstsServer(); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295436] trunk/Source/WebCore/html/HTMLInputElement.cpp
Title: [295436] trunk/Source/WebCore/html/HTMLInputElement.cpp Revision 295436 Author csaave...@igalia.com Date 2022-06-09 14:36:44 -0700 (Thu, 09 Jun 2022) Log Message Fix invalid isInShadowRoot flag during input element removal https://bugs.webkit.org/show_bug.cgi?id=241470 Reviewed by Ryosuke Niwa. Style invalidation of input elements might rely on whether the element is in the shadow tree, but during node removal the isInShadowRoot flag might not be up-to-date. Ensure that the flag is updated by letting Node::removedFromAncestor() be called up first in the HTMLInputNode::removedFromAncestor() implementation, before doing anything else with the node post-removal. * Source/WebCore/html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::removedFromAncestor): Canonical link: https://commits.webkit.org/251442@main Modified Paths trunk/Source/WebCore/html/HTMLInputElement.cpp Diff Modified: trunk/Source/WebCore/html/HTMLInputElement.cpp (295435 => 295436) --- trunk/Source/WebCore/html/HTMLInputElement.cpp 2022-06-09 21:34:27 UTC (rev 295435) +++ trunk/Source/WebCore/html/HTMLInputElement.cpp 2022-06-09 21:36:44 UTC (rev 295436) @@ -1585,6 +1585,7 @@ void HTMLInputElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree) { +HTMLTextFormControlElement::removedFromAncestor(removalType, oldParentOfRemovedTree); if (removalType.treeScopeChanged && isRadioButton()) oldParentOfRemovedTree.treeScope().radioButtonGroups().removeButton(*this); if (removalType.disconnectedFromDocument && !form()) @@ -1593,7 +1594,6 @@ document().removeElementWithPendingUserAgentShadowTreeUpdate(*this); m_hasPendingUserAgentShadowTreeUpdate = false; } -HTMLTextFormControlElement::removedFromAncestor(removalType, oldParentOfRemovedTree); ASSERT(!isConnected()); if (removalType.disconnectedFromDocument && !form() && isRadioButton()) updateValidity(); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295435] trunk/Source/WebKit
Title: [295435] trunk/Source/WebKit Revision 295435 Author achristen...@apple.com Date 2022-06-09 14:34:27 -0700 (Thu, 09 Jun 2022) Log Message Remove _WKWebsiteDataStore https://bugs.webkit.org/show_bug.cgi?id=241387 Reviewed by Brady Eidson. * Source/WebKit/SourcesCocoa.txt: * Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration ALLOW_DEPRECATED_IMPLEMENTATIONS_END]): Deleted. (-[WKWebViewConfiguration _setWebsiteDataStore:]): Deleted. * Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: * Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStore.h: * Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm: Removed. * Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h: Removed. * Source/WebKit/WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/251441@main Modified Paths trunk/Source/WebKit/SourcesCocoa.txt trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStore.h trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj Removed Paths trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h Diff Modified: trunk/Source/WebKit/SourcesCocoa.txt (295434 => 295435) --- trunk/Source/WebKit/SourcesCocoa.txt 2022-06-09 20:54:29 UTC (rev 295434) +++ trunk/Source/WebKit/SourcesCocoa.txt 2022-06-09 21:34:27 UTC (rev 295435) @@ -315,7 +315,6 @@ UIProcess/API/Cocoa/_WKWebAuthenticationAssertionResponse.mm UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm UIProcess/API/Cocoa/_WKWebsiteDataSize.mm -UIProcess/API/Cocoa/_WKWebsiteDataStore.mm UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm UIProcess/API/Cocoa/APIAttachmentCocoa.mm UIProcess/API/Cocoa/APIContentRuleListStoreCocoa.mm Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm (295434 => 295435) --- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm 2022-06-09 20:54:29 UTC (rev 295434) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm 2022-06-09 21:34:27 UTC (rev 295435) @@ -42,7 +42,6 @@ #import "WebURLSchemeHandlerCocoa.h" #import "_WKApplicationManifestInternal.h" #import "_WKVisitedLinkStore.h" -#import "_WKWebsiteDataStoreInternal.h" #import #import #import @@ -587,24 +586,6 @@ return handler ? static_cast(handler.get())->apiHandler() : nil; } -ALLOW_DEPRECATED_DECLARATIONS_BEGIN - -ALLOW_DEPRECATED_IMPLEMENTATIONS_BEGIN -- (_WKWebsiteDataStore *)_websiteDataStore -ALLOW_DEPRECATED_IMPLEMENTATIONS_END -{ -return self.websiteDataStore ? adoptNS([[_WKWebsiteDataStore alloc] initWithDataStore:self.websiteDataStore]).autorelease() : nullptr; -} - -ALLOW_DEPRECATED_IMPLEMENTATIONS_BEGIN -- (void)_setWebsiteDataStore:(_WKWebsiteDataStore *)websiteDataStore -ALLOW_DEPRECATED_IMPLEMENTATIONS_END -{ -self.websiteDataStore = websiteDataStore ? websiteDataStore->_dataStore.get() : nullptr; -} - -ALLOW_DEPRECATED_DECLARATIONS_END - #if PLATFORM(IOS_FAMILY) - (BOOL)limitsNavigationsToAppBoundDomains { Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h (295434 => 295435) --- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h 2022-06-09 20:54:29 UTC (rev 295434) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h 2022-06-09 21:34:27 UTC (rev 295435) @@ -51,7 +51,6 @@ @class WKWebView; @class _WKApplicationManifest; @class _WKVisitedLinkStore; -@class _WKWebsiteDataStore; @interface WKWebViewConfiguration (WKPrivate) @@ -117,7 +116,6 @@ @property (nonatomic, readwrite, setter=_setPageGroup:) WKPageGroupRef _pageGroup WK_API_AVAILABLE(macos(10.13.4)); #endif -@property (nonatomic, strong, setter=_setWebsiteDataStore:) _WKWebsiteDataStore *_websiteDataStore WK_API_DEPRECATED_WITH_REPLACEMENT("websiteDataStore", macos(10.10, 10.11), ios(8.0, 9.0)); @property (nonatomic, setter=_setRequiresUserActionForAudioPlayback:) BOOL _requiresUserActionForAudioPlayback WK_API_DEPRECATED_WITH_REPLACEMENT("mediaTypesRequiringUserActionForPlayback", macos(10.12, 10.12), ios(10.0, 10.0)); @property (nonatomic, setter=_setRequiresUserActionForVideoPlayback:) BOOL _requiresUserActionForVideoPlayback WK_API_DEPRECATED_WITH_REPLACEMENT("mediaTypesRequiringUserActionForPlayback", macos(10.12, 10.12), ios(10.0, 10.0)); Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStore.h (295434 => 295435) --- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStore.h 2022-06-09 20:54:29 UTC (rev 295434) +++ trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStore.h 2022-06-09 21:34:27 UTC (rev 295435) @@ -27,21 +27,4 @@ #import -typedef NS_OPTIONS(NSUInteger, WKWebsiteDataTypes) { -WKWebsiteDataTypeAll = NSUIntegerMax, -} WK_API_AVAILABLE(macos(10.11), ios(9.0)); - -
[webkit-changes] [295434] trunk/Source/WebCore/platform/mediastream/mac/ ScreenCaptureKitCaptureSource.mm
Title: [295434] trunk/Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm Revision 295434 Author commit-qu...@webkit.org Date 2022-06-09 13:54:29 -0700 (Thu, 09 Jun 2022) Log Message Add missing include in ScreenCaptureKitCaptureSource.mm https://bugs.webkit.org/show_bug.cgi?id=241479 Patch by Youssef Soliman on 2022-06-09 Reviewed by Wenson Hsieh and Eric Carlson. ScreenCaptureKitCaptureSource was missing the declaration for CGDisplayModeGetPixelsWide and CGDisplayModeGetPixelsHigh which are defined in , this was causing build failures if the build order happened to change. * Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm: Canonical link: https://commits.webkit.org/251440@main Modified Paths trunk/Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm Diff Modified: trunk/Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm (295433 => 295434) --- trunk/Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm 2022-06-09 20:42:38 UTC (rev 295433) +++ trunk/Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm 2022-06-09 20:54:29 UTC (rev 295434) @@ -36,6 +36,7 @@ #import "RealtimeVideoUtilities.h" #import "ScreenCaptureKitSharingSessionManager.h" #import +#import #import #import #import ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295433] trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm
Title: [295433] trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm Revision 295433 Author s...@apple.com Date 2022-06-09 13:42:38 -0700 (Thu, 09 Jun 2022) Log Message REGRESSION(r292365): [ iOS ] TestWebKitAPI.GPUProcess.CanvasBasicCrashHandling is a constant failure on iOS https://bugs.webkit.org/show_bug.cgi?id=239303 Reviewed by Simon Fraser. The test has been passing when running it locally. This should be fixed by other changes so re-enable this api-test. * Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm: (TEST): Canonical link: https://commits.webkit.org/251439@main Modified Paths trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm Diff Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm (295432 => 295433) --- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm 2022-06-09 20:30:57 UTC (rev 295432) +++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm 2022-06-09 20:42:38 UTC (rev 295433) @@ -456,8 +456,7 @@ " \n" ""; -// FIXME: https://bugs.webkit.org/show_bug.cgi?id=239303 -TEST(GPUProcess, DISABLED_CanvasBasicCrashHandling) +TEST(GPUProcess, CanvasBasicCrashHandling) { auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]); WKPreferencesSetBoolValueForKeyForTesting((__bridge WKPreferencesRef)[configuration preferences], true, WKStringCreateWithUTF8CString("UseGPUProcessForCanvasRenderingEnabled")); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295432] trunk/Source
Title: [295432] trunk/Source Revision 295432 Author timothy_hor...@apple.com Date 2022-06-09 13:30:57 -0700 (Thu, 09 Jun 2022) Log Message Upstream linkage of ApplePushService https://bugs.webkit.org/show_bug.cgi?id=241473 Reviewed by Wenson Hsieh. * Source/WTF/wtf/PlatformHave.h: * Source/WebKit/Configurations/WebKit.xcconfig: Canonical link: https://commits.webkit.org/251438@main Modified Paths trunk/Source/WTF/wtf/PlatformHave.h trunk/Source/WebKit/Configurations/WebKit.xcconfig Diff Modified: trunk/Source/WTF/wtf/PlatformHave.h (295431 => 295432) --- trunk/Source/WTF/wtf/PlatformHave.h 2022-06-09 20:13:45 UTC (rev 295431) +++ trunk/Source/WTF/wtf/PlatformHave.h 2022-06-09 20:30:57 UTC (rev 295432) @@ -1234,3 +1234,8 @@ #if PLATFORM(MAC) #define HAVE_ADDITIONAL_APPLE_CAMERA_SERVICE 1 #endif + +#if ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 13) \ +|| (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 16)) +#define HAVE_APPLE_PUSH_SERVICE_URL_TOKEN_SUPPORT 1 +#endif Modified: trunk/Source/WebKit/Configurations/WebKit.xcconfig (295431 => 295432) --- trunk/Source/WebKit/Configurations/WebKit.xcconfig 2022-06-09 20:13:45 UTC (rev 295431) +++ trunk/Source/WebKit/Configurations/WebKit.xcconfig 2022-06-09 20:30:57 UTC (rev 295432) @@ -60,6 +60,13 @@ WK_APPKIT_LDFLAGS_macosx = -framework AppKit; WK_APPKIT_LDFLAGS_maccatalyst = -framework AppKit; +WK_APPLE_PUSH_SERVICE_LDFLAGS = $(WK_APPLE_PUSH_SERVICE_LDFLAGS_$(WK_PLATFORM_NAME)); +WK_APPLE_PUSH_SERVICE_LDFLAGS_iphoneos = $(WK_APPLE_PUSH_SERVICE_LDFLAGS$(WK_IOS_16)); +WK_APPLE_PUSH_SERVICE_LDFLAGS_iphonesimulator = $(WK_APPLE_PUSH_SERVICE_LDFLAGS$(WK_IOS_16)); +WK_APPLE_PUSH_SERVICE_LDFLAGS_IOS_SINCE_16 = -framework ApplePushService; +WK_APPLE_PUSH_SERVICE_LDFLAGS_macosx = $(WK_APPLE_PUSH_SERVICE_LDFLAGS$(WK_MACOS_1300)); +WK_APPLE_PUSH_SERVICE_LDFLAGS_MACOS_SINCE_1300 = -framework ApplePushService; + WK_BACKBOARD_SERVICES_LDFLAGS = $(WK_BACKBOARD_SERVICES_LDFLAGS_$(WK_PLATFORM_NAME)); WK_BACKBOARD_SERVICES_LDFLAGS_iphoneos = -framework BackBoardServices; WK_BACKBOARD_SERVICES_LDFLAGS_iphonesimulator = -framework BackBoardServices; @@ -166,7 +173,7 @@ WK_INSTALL_COORDINATION_LDFLAGS_iphoneos = -framework InstallCoordination; WK_INSTALL_COORDINATION_LDFLAGS_iphonesimulator = $(WK_INSTALL_COORDINATION_LDFLAGS_iphoneos) -FRAMEWORK_AND_LIBRARY_LDFLAGS = -lobjc -framework CFNetwork -framework CoreAudio -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework IOKit -framework IOSurface -framework WebKitLegacy -lnetwork -framework Metal $(WK_ACCESSIBILITY_LDFLAGS) $(WK_APPKIT_LDFLAGS) $(WK_BACKBOARD_SERVICES_LDFLAGS) $(WK_RUNNINGBOARD_SERVICES_LDFLAGS) $(WK_AUTHKIT_LDFLAGS) $(WK_CARBON_LDFLAGS) $(WK_CONTACTS_LDFLAGS) $(WK_CORE_PREDICTION_LDFLAGS) $(WK_CORE_SERVICES_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_LIBNETWORKEXTENSION_LDFLAGS) $(WK_LIBSANDBOX_LDFLAGS) $(WK_LIBWEBRTC_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS) $(WK_PDFKIT_LDFLAGS) $(WK_PROTOTYPE_TOOLS_LDFLAGS) $(WK_SAFE_BROWSING_LDFLAGS) $(WK_SECURITY_INTERFACE_LDFLAGS) $(WK_UIKIT_LDFLAGS) $(WK_UNIFORM_TYPE_IDENTIFIERS_LDFLAGS) $(WK_URL_FORMATTING_LDFLAGS) $(WK_WEBINSPECTORUI_LDFLAGS) $(WK_COORDINATOR_LDFLAGS) $(WK_INSTALL_COORDINATION_LD FLAGS) $(WK_APP_STORE_DAEMON_LDFLAGS); +FRAMEWORK_AND_LIBRARY_LDFLAGS = -lobjc -framework CFNetwork -framework CoreAudio -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework IOKit -framework IOSurface -framework WebKitLegacy -lnetwork -framework Metal $(WK_ACCESSIBILITY_LDFLAGS) $(WK_APPKIT_LDFLAGS) $(WK_APPLE_PUSH_SERVICE_LDFLAGS) $(WK_BACKBOARD_SERVICES_LDFLAGS) $(WK_RUNNINGBOARD_SERVICES_LDFLAGS) $(WK_AUTHKIT_LDFLAGS) $(WK_CARBON_LDFLAGS) $(WK_CONTACTS_LDFLAGS) $(WK_CORE_PREDICTION_LDFLAGS) $(WK_CORE_SERVICES_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_LIBNETWORKEXTENSION_LDFLAGS) $(WK_LIBSANDBOX_LDFLAGS) $(WK_LIBWEBRTC_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS) $(WK_PDFKIT_LDFLAGS) $(WK_PROTOTYPE_TOOLS_LDFLAGS) $(WK_SAFE_BROWSING_LDFLAGS) $(WK_SECURITY_INTERFACE_LDFLAGS) $(WK_UIKIT_LDFLAGS) $(WK_UNIFORM_TYPE_IDENTIFIERS_LDFLAGS) $(WK_URL_FORMATTING_LDFLAGS) $(WK_WEBINSPECTORUI_LDFLAGS) $(WK_COORDINATOR_LDFLA GS) $(WK_INSTALL_COORDINATION_LDFLAGS) $(WK_APP_STORE_DAEMON_LDFLAGS); // Prevent C++ standard library basic_stringstream, operator new, delete and their related exception types from being exported as weak symbols. UNEXPORTED_SYMBOL_LDFLAGS = -Wl,-unexported_symbol -Wl,__ZTISt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTISt9exception -Wl,-unexported_symbol -Wl,__ZTSSt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTSSt9exception -Wl,-unexported_symbol -Wl,__ZdlPvS_ -Wl,-unexported_symbol -Wl,__ZnwmPv -Wl,-unexported_symbol -Wl,__Znwm -Wl,-unexported_symbol -Wl,__ZTVNSt3__117bad_function_callE -Wl,-unexported_symbol
[webkit-changes] [295431] trunk/Source/WebCore/platform/graphics/cocoa/ GraphicsContextGLCocoa.mm
Title: [295431] trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm Revision 295431 Author commit-qu...@webkit.org Date 2022-06-09 13:13:45 -0700 (Thu, 09 Jun 2022) Log Message Multisampling does not work on MTLGPUFamilyApple2 devices when using ANGLE Metal https://bugs.webkit.org/show_bug.cgi?id=241456 Patch by Kimmo Kinnunen on 2022-06-09 Reviewed by Dean Jackson. Use OpenGL ES for WebGL for devices prior to MTLGPUFamilyApple3. WebGL2 already was running OpenGL ES for these devices for different reasons. The multisample codepath is not implemented for Apple2 which does not support MTLStoreActionStoreAndMultisampleResolve. * Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm: (WebCore::platformSupportsMetal): (WebCore::GraphicsContextGLCocoa::platformInitializeContext): Canonical link: https://commits.webkit.org/251437@main Modified Paths trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm Diff Modified: trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm (295430 => 295431) --- trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm 2022-06-09 19:26:54 UTC (rev 295430) +++ trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm 2022-06-09 20:13:45 UTC (rev 295431) @@ -99,18 +99,15 @@ } #endif -static bool platformSupportsMetal(bool isWebGL2) +static bool platformSupportsMetal() { auto device = adoptNS(MTLCreateSystemDefaultDevice()); if (device) { #if PLATFORM(IOS_FAMILY) && !PLATFORM(IOS_FAMILY_SIMULATOR) -// A8 devices (iPad Mini 4, iPad Air 2) cannot use WebGL2 via Metal. +// A8 devices (iPad Mini 4, iPad Air 2) cannot use WebGL via Metal. // This check can be removed once they are no longer supported. -if (isWebGL2) -return [device supportsFamily:MTLGPUFamilyApple3]; -#else -UNUSED_PARAM(isWebGL2); +return [device supportsFamily:MTLGPUFamilyApple3]; #endif return true; } @@ -247,7 +244,7 @@ { GraphicsContextGLAttributes attributes = contextAttributes(); m_isForWebGL2 = attributes.webGLVersion == GraphicsContextGLWebGLVersion::WebGL2; -if (attributes.useMetal && !platformSupportsMetal(m_isForWebGL2)) { +if (attributes.useMetal && !platformSupportsMetal()) { attributes.useMetal = false; setContextAttributes(attributes); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295430] trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
Title: [295430] trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp Revision 295430 Author commit-qu...@webkit.org Date 2022-06-09 12:26:54 -0700 (Thu, 09 Jun 2022) Log Message Need to check the context wasn't lost in WebGL2RenderingContext::readBuffer() https://bugs.webkit.org/show_bug.cgi?id=241477 Patch by Antoine Quint on 2022-06-09 Reviewed by Dean Jackson. All other APIs exposed on WebGL2RenderingContext are guarded by isContextLostOrPending() checks, and readBuffer() should be no exception. * Source/WebCore/html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::readBuffer): Canonical link: https://commits.webkit.org/251436@main Modified Paths trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp Diff Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp (295429 => 295430) --- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp 2022-06-09 19:25:08 UTC (rev 295429) +++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp 2022-06-09 19:26:54 UTC (rev 295430) @@ -811,6 +811,9 @@ void WebGL2RenderingContext::readBuffer(GCGLenum src) { +if (isContextLostOrPending()) +return; + if (src == GraphicsContextGL::BACK) { // Because the backbuffer is simulated on all current WebKit ports, we need to change BACK to COLOR_ATTACHMENT0. if (m_readFramebufferBinding) { ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [295429] trunk
Title: [295429] trunk Revision 295429 Author kpidding...@apple.com Date 2022-06-09 12:25:08 -0700 (Thu, 09 Jun 2022) Log Message TextureMtl.mm:108 (GetLayerMipIndex): \t! Unreachable reached https://bugs.webkit.org/show_bug.cgi?id=240790 Reviewed by Darin Adler Check texture valid before use. * Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_resources.mm: (rx::mtl::Texture::MakeTexture): Canonical link: https://commits.webkit.org/251435@main Modified Paths trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_resources.mm Added Paths trunk/LayoutTests/fast/canvas/webgl/large-texture-creation-expected.txt trunk/LayoutTests/fast/canvas/webgl/large-texture-creation.html Diff Added: trunk/LayoutTests/fast/canvas/webgl/large-texture-creation-expected.txt (0 => 295429) --- trunk/LayoutTests/fast/canvas/webgl/large-texture-creation-expected.txt (rev 0) +++ trunk/LayoutTests/fast/canvas/webgl/large-texture-creation-expected.txt 2022-06-09 19:25:08 UTC (rev 295429) @@ -0,0 +1,14 @@ +Test creating a max-size texture. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +Canvas.getContext +PASS context exists + +PASS getError was one of: NO_ERROR or OUT_OF_MEMORY : unexpected result when creating MAX_TEXTURE_SIZE texture + +PASS successfullyParsed is true + +TEST COMPLETE + Added: trunk/LayoutTests/fast/canvas/webgl/large-texture-creation.html (0 => 295429) --- trunk/LayoutTests/fast/canvas/webgl/large-texture-creation.html (rev 0) +++ trunk/LayoutTests/fast/canvas/webgl/large-texture-creation.html 2022-06-09 19:25:08 UTC (rev 295429) @@ -0,0 +1,52 @@ + + + + +WebGL Framebuffer Test + + + + + +