GNOME Bugzilla – Bug 678628
Port find to WebKit2
Last modified: 2012-06-27 12:19:33 UTC
Created attachment 217023 [details] [review] Patch Use WebKit2 API implement search.
Review of attachment 217023 [details] [review]: Hrm, it seems you really only operate on the find controller. Wouldn't it be easier to save that on ephy_find_toolbar_set_embed? Would save a lot of webkit_web_view_get_find_controller. ::: src/ephy-find-toolbar.c @@ +259,1 @@ #endif Is mark_matches called from the WK2 code to do nothing or is it only called from WK1 code? If the latter, should #ifdef it completely no? @@ +269,3 @@ + + if (!priv->find_string || !g_strcmp0 (priv->find_string, "")) + return; If you are going to use g_strcmp0 you can skip the first check I think.
(In reply to comment #1) > Review of attachment 217023 [details] [review]: > > Hrm, it seems you really only operate on the find controller. Wouldn't it be > easier to save that on ephy_find_toolbar_set_embed? Would save a lot of > webkit_web_view_get_find_controller. Yes, indeed. > ::: src/ephy-find-toolbar.c > @@ +259,1 @@ > #endif > > Is mark_matches called from the WK2 code to do nothing or is it only called > from WK1 code? If the latter, should #ifdef it completely no? It's only called from wk1 code, so yes, it's should be #ifdefed > @@ +269,3 @@ > + > + if (!priv->find_string || !g_strcmp0 (priv->find_string, "")) > + return; > > If you are going to use g_strcmp0 you can skip the first check I think. You are right, I copied this from the wk1 code.
Created attachment 217380 [details] [review] Updated patch
Review of attachment 217380 [details] [review]: OK.