Commit Graph

13 Commits

Author SHA1 Message Date
Hugh Davenport
637ccbec35 UI/Qt: Show search engine name in location bar
The placeholder text shows "Search or enter web address" which doesn't
tell the user about *how* the search will be performed. Other popular
open source browsers show the search engine that will be used. For
example:

	Chromium: "Search **engine** or type a URL"
	Firefox: "Search with **engine** or enter address"

This change changes the placeholder text of the location bar to show
"Search with **engine** or enter web address".
2024-06-25 09:56:42 +01:00
Tim Ledbetter
808784092c UI/Qt: Don't show URL when a new tab is initially focused
The URL is now not shown when a new tab is initially activated until
the location bar loses focus. This allows the user to see the location
bar placeholder text when opening a new tab. It also makes it easier to
paste URLs into the location bar after opening a new tab.
2024-06-17 17:26:55 +02:00
Hugh Davenport
cb657a038f UI/Qt: Update placeholder text if search disabled
The placeholder text is there to prompt the user as to what could be
added in the address bar. The current text tells the user that they can
"Search or enter web address" even when the search setting is disabled.
When attempting to "Search" the user is instead sent to page ":", with
an error in the console:
    WebContent(575249): (FIXME) Don't know how to navigate to :

This patch fixes this by checking whether the search feature is enabled
and setting the placeholder appropriately. This provides a slightly
better user experience.

Closes #132
2024-06-11 09:50:46 +02:00
Shannon Booth
e800605ad3 AK+LibURL: Move AK::URL into a new URL library
This URL library ends up being a relatively fundamental base library of
the system, as LibCore depends on LibURL.

This change has two main benefits:
 * Moving AK back more towards being an agnostic library that can
   be used between the kernel and userspace. URL has never really fit
   that description - and is not used in the kernel.
 * URL _should_ depend on LibUnicode, as it needs punnycode support.
   However, it's not really possible to do this inside of AK as it can't
   depend on any external library. This change brings us a little closer
   to being able to do that, but unfortunately we aren't there quite
   yet, as the code generators depend on LibCore.
2024-03-18 14:06:28 -04:00
Timothy Flynn
a21998003c Ladybird/Qt: Make String allocation infallible 2023-12-04 12:03:48 -07:00
Timothy Flynn
1aedb0ae5a Ladybird/Qt: Replace the QString-from-AK helpers with a single method
There's no need for 2 overloads for String and DeprecatedString, we can
just use a StringView. This also avoids some cases of needlessly
allocating a DeprecatedString from a StringView when calling this
method.
2023-12-04 12:03:48 -07:00
Timothy Flynn
f8f0c5459d Ladybird/Qt: Migrate to LibWebView for search engines 2023-10-23 12:12:36 -04:00
Timothy Flynn
e7f48abb74 Ladybird/Qt: Use LibWebView to decide what parts of a URL to highlight 2023-10-20 07:18:54 +02:00
Timothy Flynn
f023e37de7 Ladybird/Qt: Sanitize user-provided URLs with LibWebView 2023-10-13 13:37:11 -04:00
Cameron Youell
d68433653a Ladybird: Add autocomplete to LocationEdit 2023-08-17 15:30:23 +01:00
Cameron Youell
c53d3e7aa4 Ladybird: Simplify the LocationEdit constructor 2023-08-17 15:30:23 +01:00
Shannon Booth
c25485700a AK: Port URL scheme from DeprecatedString to String 2023-08-13 15:03:53 -06:00
Andrew Kaster
391beef707 Ladybird: Move Qt-specific classes and functions to a Qt subdirectory
This will help a lot with developing chromes for different UI frameworks
where we can see which helper classes and processes are really using Qt
vs just using it to get at helper data.

As a bonus, remove Qt dependency from WebDriver.
2023-08-07 14:58:04 -06:00