[Webkit-unassigned] [Bug 176760] [GTK] Need WebKitContextMenuItemType to open emoji picker
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri May 17 01:35:07 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=176760
--- Comment #6 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to Michael Catanzaro from comment #5)
> Comment on attachment 370039 [details]
> Patch
>
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=370039&action=review
>
> I've asked the GTK devs to expose this for GTK 4, so maybe we'll only need
> to copy it for GTK 3 in the future.
Yes, I asked about it some time ago too.
> Matthias suggests that we check the master branch for recent fixes to the
> emoji chooser to make it populate incrementally, which are still pending
> backport to GTK 3.
Ok, I'll include fixes in a follow up then.
> > Source/WebKit/ChangeLog:9
> > + context menu or keyboard shortcuts. GtkEmojiChooser is proivate in GTK, so we include our own copy, adapted to
>
> private
>
> > Source/WebKit/ChangeLog:11
> > + content. I'm going to add public API in a follow up patch to be able to use your own chooser, or event prevent
>
> even
>
> > Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:232
> > + CompletionHandler<void(String)> emojiChooserCompletionHandler;
> > + RunLoop::Timer<WebKitWebViewBasePrivate> releaseEmojiChooserTimer;
>
> What happens if the WebKitWebViewBase is destroyed before the timer fires? I
> assume the callback will not execute. So we will not gtk_widget_destroy()
> the emoji chooser in that case. But that should be fine, right? Because it's
> pointing relative to the WebKitWebViewBase, it should be disposed when the
> parent widget is destroyed?
Yes, the timer si stopped in its destructor, so it won't fire if the web view is destroyed. In that case the popover is destroyed with its parent.
> What happens if the WebKitWebViewBase is destroyed before the
> emojiChooserCompletionHandler is called, i.e. when
> emojiChooserCompletionHandler is nonnull at time of destruction? I think the
> CompletionHandler destructor will assert and crash the UI process, right? We
> need to make sure the CompletionHandler is guaranteed to be called.
I'm not sure how can that happen because the popover is modal, so you need to close it first, to close the tab or window. I guess it could still be destroyed programatically somehow, so I'll complete the handler in the dispose.
> > Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:1797
> > + priv->releaseEmojiChooserTimer.startOneShot(2_min);
>
> Irrelevant: I love this timer syntax. You can't screw up the units!
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190517/1ffb8a3d/attachment-0001.html>
More information about the webkit-unassigned
mailing list