Bug 29321 - Post the WebViewDidChangeSelectionNotification when text selection changes
Summary: Post the WebViewDidChangeSelectionNotification when text selection changes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows Vista
: P2 Normal
Assignee: Ada Chan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-16 17:32 PDT by Ada Chan
Modified: 2009-09-17 11:32 PDT (History)
0 users

See Also:


Attachments
Patch (2.18 KB, patch)
2009-09-17 10:33 PDT, Ada Chan
sullivan: review+
Details | Formatted Diff | Diff
Updated patch (2.16 KB, patch)
2009-09-17 11:22 PDT, Ada Chan
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ada Chan 2009-09-16 17:32:22 PDT
IWebEditingDelegate::webViewDidChangeSelection() should be called when any text selection changes inside a WebView.  The Mac code already posts a WebViewDidChangeSelectionNotification when text selection changes.
Comment 1 Ada Chan 2009-09-17 10:33:36 PDT
Created attachment 39705 [details]
Patch
Comment 2 Ada Chan 2009-09-17 10:57:25 PDT
After further discussion with Adam Roben, we have agreed that it might be better to just post the WebViewDidChangeSelectionNotification instead of using IWebEditingDelegate.
Comment 3 Ada Chan 2009-09-17 11:22:50 PDT
Created attachment 39709 [details]
Updated patch
Comment 4 Adam Roben (:aroben) 2009-09-17 11:25:30 PDT
Comment on attachment 39709 [details]
Updated patch

> Index: WebKit/win/Interfaces/IWebEditingDelegate.idl
> ===================================================================
> --- WebKit/win/Interfaces/IWebEditingDelegate.idl	(revision 48477)
> +++ WebKit/win/Interfaces/IWebEditingDelegate.idl	(working copy)
> @@ -23,6 +23,8 @@
>   * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
>   */
>  
> +cpp_quote("#define WebViewDidChangeSelectionNotification TEXT(\"WebViewDidChangeSelectionNotification\")")
> +

I'd put this in IWebView.idl, to match where it is defined in the Mac API.

r=me
Comment 5 Ada Chan 2009-09-17 11:32:55 PDT
Fixed in r48478