mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1153145 - Ensure trusted focus events from web content focus plugins. r=smaug
This commit is contained in:
parent
94a2e00c55
commit
b7aa196e8f
@ -161,7 +161,12 @@ HTMLObjectElement::OnFocusBlurPlugin(Element* aElement, bool aFocus)
|
||||
nsCOMPtr<nsIObjectLoadingContent> olc = do_QueryInterface(aElement);
|
||||
bool hasRunningPlugin = false;
|
||||
if (olc) {
|
||||
olc->GetHasRunningPlugin(&hasRunningPlugin);
|
||||
// nsIObjectLoadingContent::GetHasRunningPlugin() fails when
|
||||
// nsContentUtils::IsCallerChrome() returns false (which it can do even
|
||||
// when we're processing a trusted focus event). We work around this by
|
||||
// calling nsObjectLoadingContent::HasRunningPlugin() directly.
|
||||
hasRunningPlugin =
|
||||
static_cast<nsObjectLoadingContent*>(olc.get())->HasRunningPlugin();
|
||||
}
|
||||
if (!hasRunningPlugin) {
|
||||
aFocus = false;
|
||||
|
Loading…
Reference in New Issue
Block a user