Enclosed is a temporary fix to remove the dependency on webkit_web_view_get_selected_text.

Once applied, you can successfully compile and run midori against the post r88621 Webkit GTK trunk.

It's only a workaround: it does not preserve the functionality previously covered by the call, whatever it was, which I did not investigate -- casual browsing and inspection seems to work fine without it.

I am pretty ignorant of webkit internals, but I can at least say that on my midori build against webkit 1.5.2 (r94040 -- svn head on 2011-08-30 02:29:25 UTC) the
"find" tool via Ctrl-F works as expected and doesn't seem to crash the browser, no matter how many times I invoke it. Running a valgrind session, the feature doesn't seem to leak any memory either -- I am not on ubuntu though, so it's I cannot make a blow-by-blow comparison of your dependencies with mine.

Sylvain your patch allows to compile midori (taken from git) with webkit fetched ( svn, rev. 95201) and compiled on my system but it breaks one of midori function.
AFAIU, the commented function was used to provide ability to select text on a page and from context menu pass it to search engine. Now it is impossible, i.e. text can be selected but items from context menu doesn't open new window/tab with search results.

Thanks both Sylvain and Chrono for your investigation. Based on the patch from comment #8 I made a change to use DOM API with WebKitGTK+ 1.5.1 and fallback to the previous behavior otherwise, so that old versions continue to work.

Supposed to be private yes. And it's not the first function which was the only way to use a feature for a long time. Another example would be webkit_web_frame_print which actually became public afterall. You can't exactly argue to not have access to the clipboard or printing.

If you build with >= 1.4.3 it's no longer an issue. I don't intend to take away features from older versions now.