After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 725081 - Only try to build the autosearch URL for actually typed text
Only try to build the autosearch URL for actually typed text
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-02-24 18:09 UTC by Carlos Garcia Campos
Modified: 2014-03-03 14:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
embed-utils: Invert the logic of condition in ephy_embed_utils_address_has_web_scheme (2.09 KB, patch)
2014-02-24 18:10 UTC, Carlos Garcia Campos
none Details | Review
embed-utils: Add ephy_embed_utils_address_is_valid (8.38 KB, patch)
2014-02-24 18:10 UTC, Carlos Garcia Campos
committed Details | Review
embed-utils: do not try to prepend http:// to normalize a URL if it already has a web scheme (3.40 KB, patch)
2014-02-24 18:11 UTC, Carlos Garcia Campos
committed Details | Review
embed-utils: Mode ephy_web_view_normalize_or_autosearch_url to embed-utils (11.25 KB, patch)
2014-02-24 18:11 UTC, Carlos Garcia Campos
committed Details | Review

Description Carlos Garcia Campos 2014-02-24 18:09:14 UTC
ephy_web_view_load_url/request, always call normalize_or_autosearch urls, even for internal urls that come from the history, bookmarks or session. In those cases we only want to normalize them and in the most efficient way, if possible.
Comment 1 Carlos Garcia Campos 2014-02-24 18:10:54 UTC
Created attachment 270163 [details] [review]
embed-utils: Invert the logic of condition in ephy_embed_utils_address_has_web_scheme

So that we don't need to do all the string comparisons always.
Comment 2 Carlos Garcia Campos 2014-02-24 18:10:58 UTC
Created attachment 270164 [details] [review]
embed-utils: Add ephy_embed_utils_address_is_valid

Helper method used to check if a url is valid to decide whether to load
it or perform a search. It's mostly the same expression used by
EphyWebView, but moved to a helper function. The regular expressions used
in that expression are also moved to embed-utils and they are only
compiled once instead of everytime a web view is created.
Comment 3 Carlos Garcia Campos 2014-02-24 18:11:02 UTC
Created attachment 270165 [details] [review]
embed-utils: do not try to prepend http:// to normalize a URL if it already has a web scheme
Comment 4 Carlos Garcia Campos 2014-02-24 18:11:07 UTC
Created attachment 270166 [details] [review]
embed-utils: Mode ephy_web_view_normalize_or_autosearch_url to embed-utils

And use it only for actually typed (or pasted) text.
Comment 5 Carlos Garcia Campos 2014-03-03 13:55:17 UTC
Comment on attachment 270163 [details] [review]
embed-utils: Invert the logic of condition in ephy_embed_utils_address_has_web_scheme

This is actually useless as claudio pointed out to me, so forget this patch :-)