Bug 106081 - REGRESSION(r138544): [GTK] Clicking on selected text in a text editable deletes the selection
Summary: REGRESSION(r138544): [GTK] Clicking on selected text in a text editable delet...
Status: RESOLVED DUPLICATE of bug 106045
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk, Regression
Depends on:
Blocks:
 
Reported: 2013-01-04 03:34 PST by Carlos Garcia Campos
Modified: 2013-03-01 02:49 PST (History)
3 users (show)

See Also:


Attachments
Patch (2.71 KB, patch)
2013-01-04 03:37 PST, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2013-01-04 03:34:12 PST
The problem is that GtkInputMethodFilter::notifyMouseButtonPress() in WebKit2 always confirms a text composition, instead of the current composition.
Comment 1 Carlos Garcia Campos 2013-01-04 03:37:34 PST
Created attachment 181286 [details]
Patch
Comment 2 WebKit Review Bot 2013-01-04 03:41:55 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Martin Robinson 2013-01-04 08:34:17 PST
I think the patch I posted yesterday might be more complete.

*** This bug has been marked as a duplicate of bug 106045 ***
Comment 4 Martin Robinson 2013-01-04 08:37:22 PST
Comment on attachment 181286 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=181286&action=review

> Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:626
> -    priv->inputMethodFilter.notifyMouseButtonPress();
> -
>      if (!priv->clickCounter.shouldProcessButtonEvent(buttonEvent))
>          return TRUE;
>  
>      // If it's a right click event save it as a possible context menu event.
>      if (buttonEvent->button == 3)
>          priv->contextMenuEvent.set(gdk_event_copy(reinterpret_cast<GdkEvent*>(buttonEvent)));
> +
> +    priv->inputMethodFilter.notifyMouseButtonPress();

I think either way, it makes sense to cancel the composition. clickCounter.shouldProcessButtonEvent just discards "extra" events that happen during the process of multi-clicking, so the chances of this making a difference are pretty small.
Comment 5 Eric Seidel (no email) 2013-03-01 02:49:23 PST
Comment on attachment 181286 [details]
Patch

Cleared review? from attachment 181286 [details] so that this bug does not appear in http://webkit.org/pending-review.  If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).