GNOME Bugzilla – Bug 765145
Flickering when opening context menu
Last modified: 2017-09-26 21:35:36 UTC
When in Web Application mode, if using the secondary mouse button over a link to open the context menu, you can perceive, upon opening, the menu opening bigger and quickly flickering to resize to a smaller size.
Yes, it's a WebKit API problem; the obvious way to fix it is to use sync IPC to check whether clipboard actions are available, but then a tab could hang the UI process so that's not OK.
Maybe we can compute the menu items BEFORE showing the context menu.
Created attachment 345599 [details] [review] Check edit action sensitivity in the web extension Check if the actions are sensitive in the web extension, and send that information to the UI process along with the context menu, so that the UI process has all the information needed to decide which items to show at the time the context menu is constructed. This avoids nasty flickering when the menu is shown, since we no longer have to asynchronously remove unavailable items right after showing the menu. Also, restrict the copy item to only be visible when there is a text selection. (Note: it depends on WebKit API that doesn't exist yet.)
Created attachment 345647 [details] [review] Check edit action sensitivity in the web extension Check if the actions are sensitive in the web extension, and send that information to the UI process along with the context menu, so that the UI process has all the information needed to decide which items to show at the time the context menu is constructed. This avoids nasty flickering when the menu is shown, since we no longer have to asynchronously remove unavailable items right after showing the menu. Also, restrict the copy item to only be visible when there is a text selection.
Comment on attachment 345647 [details] [review] Check edit action sensitivity in the web extension It depends on WebKit API that we decided not to add.
New patch in bug #772106. Anyway, the flickering should be gone since 3.24. The patch in bug #772106 fixes things without bringing back the flickering.