Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: da4ea518b228c320fb16ae92d065a990ff3dab17 https://github.com/WebKit/WebKit/commit/da4ea518b228c320fb16ae92d065a990ff3dab17 Author: Timothy Hatcher <timo...@apple.com> Date: 2024-04-22 (Mon, 22 Apr 2024)
Changed paths: M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionActionCocoa.mm M Source/WebKit/UIProcess/Extensions/WebExtensionAction.h Log Message: ----------- Web Extension popup is slow and jittery when presenting. https://webkit.org/b/273079 rdar://126646845 Reviewed by Brian Weinstein. Fixes a few issues where popups were not presenting fast and jittering when animating open. * Add the web view temporarily to a window to force it to layout. This was the primary issue, since WebKit was not laying-out various extension popups before it was added to a window. * Stop updating the popover size when the size hasn't changed above the minimum. * Reduced the timeout to 250ms in Release builds (and triple in Debug). All popups now display in less than 100ms on an M3 MacBook Pro. This can be reduced because the timeout starts after the document load, not prior to the load like it did before 275454@main. * Prevent the delegate method from being called when just accessing the popupWebView property on the action. It should only be called when the performActionForTab: method is called. * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionActionCocoa.mm: (-[_WKWebExtensionActionWebView contentSize]): Renamed from _contentSize to be public. (-[_WKWebExtensionActionWebView _contentSizeDidChange]): Only call popupSizeDidChange when the size is above the minimum. (-[_WKWebExtensionActionWebView _contentSizeHasStabilized]): Renamed from _checkIfContentSizeStabilizedAndPresentPopup to be clearer. (-[_WKWebExtensionActionPopover initWithWebExtensionAction:]): (WebKit::WebExtensionAction::WebExtensionAction): (WebKit::WebExtensionAction::popupWebView): Remove unused LoadOnFirstAccess parameter. (WebKit::WebExtensionAction::presentPopupWhenReady): (WebKit::WebExtensionAction::popupDidFinishDocumentLoad): (WebKit::WebExtensionAction::readyToPresentPopup): (WebKit::WebExtensionAction::popupSizeDidChange): Moved readyToPresentPopup() call here. (WebKit::WebExtensionAction::closePopup): (-[_WKWebExtensionActionWebView _contentSize]): Deleted. (-[_WKWebExtensionActionWebView _checkIfContentSizeStabilizedAndPresentPopup]): Deleted. * Source/WebKit/UIProcess/Extensions/WebExtensionAction.h: (WebKit::WebExtensionAction::shouldPresentPopupWhenReady const): Canonical link: https://commits.webkit.org/277838@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes