Bug 16584
Summary: | [GTK] Need more fine grained return value for webkit_web_view_search_text | ||
---|---|---|---|
Product: | WebKit | Reporter: | Xan Lopez <xan.lopez> |
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | christian, cosimoc, mrobinson |
Priority: | P2 | Keywords: | Gtk |
Version: | 528+ (Nightly build) | ||
Hardware: | Other | ||
OS: | OS X 10.4 | ||
Bug Depends on: | |||
Bug Blocks: | 14141 |
Xan Lopez
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))
+ {
+ return EPHY_EMBED_FIND_FOUND;
+ }
+ else if (webkit_web_view_search_text (priv->web_view, priv->find_string, priv->case_sensitive, forward, TRUE))
+ {
+ return EPHY_EMBED_FIND_FOUNDWRAPPED;
+ }
+ else
+ return EPHY_EMBED_FIND_NOTFOUND;
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.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Martin Robinson
Going to close this one, but we should open a new bug if it's still an issue with ephy + WebKit2.