RESOLVED WONTFIX 16624
[GTK] Improvements to search API
https://bugs.webkit.org/show_bug.cgi?id=16624
Summary [GTK] Improvements to search API
Cosimo Cecchi
Reported 2007-12-27 07:33:18 PST
Hi, currently we have the following search API in WebKit/GTK gboolean webkit_web_view_search_text (WebKitWebView* web_view, const gchar* string, gboolean case_sensitive, gboolean forward, gboolean wrap); guint webkit_web_view_mark_text_matches (WebKitWebView* web_view, const gchar* string, gboolean case_sensitive, guint limit); void webkit_web_view_set_highlight_text_matches (WebKitWebView* web_view, gboolean highlight); void webkit_web_view_unmark_text_matches (WebKitWebView* web_view); which IMHO is not optimal. webkit_web_view_search_text directly looks for a provided string, returning a bool value is found/not found, and one match at a time is selected in the web view, with the possibility to go forward/backwards and wrap. This API misses the possibility to highlight all the occurrencies of the string, and also to un-highlight. webkit_web_view_mark_text_matches and the other functions, look for a provided string and highlight a maximum provided number of occurrences (|limit|). This API also provides a function to highlight/unhighlight the found occurrencies, but lacks a way to go forward/backwards in highliting the occurrencies, to wrap the search and returns an int. I think all this is confusing, and we should merge the two APIs together like this: webkit_web_view_mark_text_matches should not have "limit" as an argument. Then we would have: enum { NOT_FOUND, FOUND, FOUND_WRAPPED } Result - Result webkit_web_view_highlight_single_match (WebKitWebView *, direction) - guint webkit_web_view_highlight_matches (WebKitWebView *, limit) - void webkit_web_view_unhighlight_matches (WebKitWebView *) - void webkit_web_view_unmark_matches (WebKitWebView *) This would also cover bug #16584.
Attachments
Sergio Villar Senin
Comment 1 2012-01-17 09:11:04 PST
Cosimo maybe you'd like to take a look at the new find API for WebKit2, see https://bugs.webkit.org/show_bug.cgi?id=76070
Martin Robinson
Comment 2 2014-04-08 17:54:10 PDT
WebKit1GTK+ has been removed.
Note You need to log in before you can comment on or make changes to this bug.