Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
An extension shouldn't be able to close another extension's popup wit…
…h a call to `openPopup()`. https://webkit.org/b/275914 rdar://127836084 w3c/webextensions#160 Reviewed by Timothy Hatcher. Adds a static member to WebExtensionContext which signifies whether or not any extension has an open popup, along with other changes to WebExtensionContext to update this variable. * Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIActionCocoa.mm: (WebKit::WebExtensionContext::actionOpenPopup): Modified to check the state of popupIsOpen * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionActionCocoa.mm: (WebKit::WebExtensionAction::readyToPresentPopup): Modified to set the state of s_isPopupOpen when a popup is presented (WebKit::WebExtensionAction::closePopup): Modified to set the state of s_isPopupOpen when a popup is closed * Source/WebKit/UIProcess/Extensions/WebExtensionContext.h: (WebKit::WebExtensionContext::popupOpening): Setter for s_isPopupOpen (WebKit::WebExtensionContext::popupClosed): Setter for s_isPopupOpen (WebKit::WebExtensionContext::popupIsOpen const): Getter for s_isPopupOpen Canonical link: https://commits.webkit.org/280422@main
- Loading branch information