Bug 16584 - [GTK] Need more fine grained return value for webkit_web_view_search_text
Summary: [GTK] Need more fine grained return value for webkit_web_view_search_text
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.4
: P2 Normal
Assignee: Nobody
Keywords: Gtk
Depends on:
Blocks: 14141
  Show dependency treegraph
Reported: 2007-12-23 05:39 PST by Xan Lopez
Modified: 2014-04-08 17:53 PDT (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Xan Lopez 2007-12-23 05:39:43 PST
Sometimes it's useful to know not only if the search has succeeded, but whether it had to wrap or not to do so. Epiphany, for instance, expects to get this information from the search API (in order to update the UI with the wrap information). The only way to do this now is to something like:

+  if (webkit_web_view_search_text (priv->web_view, priv->find_string, priv->case_sensitive, forward, FALSE))
+  {
+  }
+  else if (webkit_web_view_search_text (priv->web_view, priv->find_string, priv->case_sensitive, forward, TRUE))
+  {
+  }
+  else

which is ugly.

It would be nice to return an enum value with { NOT_FOUND, FOUND, FOUND_WRAPPED } possibilities.

Not sure how easy is to do this given the WebCore API, does not look trivial at first sight though.
Comment 1 Martin Robinson 2014-04-08 17:53:46 PDT
Going to close this one, but we should open a new bug if it's still an issue with ephy + WebKit2.