Bug 29321

Summary: Post the WebViewDidChangeSelectionNotification when text selection changes
Product: WebKit Reporter: Ada Chan <adachan>
Component: WebKit APIAssignee: Ada Chan <adachan>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows Vista   
Attachments:
Description Flags
Patch
sullivan: review+
Updated patch aroben: review+

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