Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d2091f38fe857c747e7eb84f0e2d7fe19aa6fd1c
      
https://github.com/WebKit/WebKit/commit/d2091f38fe857c747e7eb84f0e2d7fe19aa6fd1c
  Author: Timothy Hatcher <[email protected]>
  Date:   2024-02-28 (Wed, 28 Feb 2024)

  Changed paths:
    M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionActionCocoa.mm
    M Source/WebKit/UIProcess/Extensions/WebExtensionAction.h
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIAction.mm

  Log Message:
  -----------
  Web Extension popup can present too soon.
https://webkit.org/b/270185
rdar://problem/123711867

Reviewed by Brian Weinstein.

Instead of starting the timer that presented the popup on the start of the load,
we should start it after the document has loaded and rendering will begin.

This prevents us from showing the popup while it might still be loading, and
causing it to resize mid-animation in most instances.

Also connect delegate methods for load fails to close the popup, so the web view
doesn't stick around indefinitely. Some API tests were failing to load because 
the
popup.html resource was missing.

* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionActionCocoa.mm:
(-[_WKWebExtensionActionWebViewDelegate 
webView:didFailProvisionalNavigation:withError:]):
(-[_WKWebExtensionActionWebViewDelegate webView:didFailNavigation:withError:]):
(-[_WKWebExtensionActionWebViewDelegate 
_webView:navigationDidFinishDocumentLoad:]):
(WebKit::WebExtensionAction::presentPopupWhenReady):
(WebKit::WebExtensionAction::popupDidFinishDocumentLoad):
(WebKit::WebExtensionAction::readyToPresentPopup):
* Source/WebKit/UIProcess/Extensions/WebExtensionAction.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIAction.mm:
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/275454@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to