Commit graph

51 commits

Author SHA1 Message Date
Adam Harald Jørgensen d6796d5123 Ladybird: Add keyboard shortcuts for jumping to a specific tab
It's now possible to open a specific tab by using Ctrl/Command plus the
number key corresponding to its position in the tab row.
2023-10-06 08:10:30 +02:00
circl 84f845494e Ladybird/Qt: Add support for color pickers 2023-09-27 12:16:41 +01:00
Aliaksandr Kalenik 3c675e3f25 Userland+Ladybird: Always specify url to be about:srcdoc in load_html()
After moving to navigables, we started reusing the code that populates
session history entries with the srcdoc attribute value from iframes
in `Page::load_html()` for loading HTML.

This change addresses a crash in `determine_the_origin` which occurred
because this method expected the URL to be `about:srcdoc` if we also
provided HTML content (previously, it was the URL passed along with the
HTML content into `load_html()`).
2023-09-17 21:08:59 +02:00
Aliaksandr Kalenik aef4b84e22 LibWeb+WebContent: Add option to dump session history of a traversable 2023-09-16 16:53:32 +02:00
Bastiaan van der Plaat 836a7b00dd Ladybird+LibWeb: Add MouseEvent screenX and screenY support 2023-09-15 22:12:56 +02:00
implicitfield 63d09f6daf Browser+Ladybird: Let the list of user agent strings be shared 2023-09-13 19:33:07 -04:00
Adam Harald Jørgensen 7bf842a974 Ladybird: Allow opening multiple URLs at once from the command line
Each URL is opened in a separate tab on startup, and the active tab is
the first URL supplied.
2023-09-11 17:01:17 +01:00
Timothy Flynn bc5b7aeffb Ladybird: Hide the WebDriver-to-WebContent IPC path from the help menu
This is never meant to be passed by a human, it is created and passed by
WebDriver only. Hide it from the --help menu to avoid confusion.
2023-09-05 06:51:16 -04:00
Andrew Kaster 7bc009d80f Ladybird: Add new template Kotlin Android application without Qt
This template app from Android Studio should hopefully be more fun to
work on than the Qt wrapped application we were using before. :^)

It currently builds the native code using gradle rules, and has a stub
WebViewImplementationNative class that will wrap a c++ class of the same
name that inhertis from WebView::ViewImplementation. Spawning helper
processes and creating proper views in Kotlin is next on the list.
2023-09-03 11:38:51 +02:00
Andreas Kling 2e45306d42 Ladybird: Update set of User-Agent spoofs to current versions 2023-09-01 09:16:55 +02:00
Timothy Flynn e26ead0995 Ladybird+LibWebView: Move creation of the SQL client to LibWebView
This lets us remove the direct dependency from Ladybird to LibSQL.
2023-08-31 19:19:45 +02:00
Timothy Flynn 5c5a00dd3a Ladybird+LibWebView: Move CookieJar, Database, and History to LibWebView
These classes are used as-is in all chromes. Move them to LibWebView so
that non-Serenity chromes don't have to awkwardly reach into its headers
and sources.
2023-08-31 19:19:45 +02:00
Bastiaan van der Plaat 43f81f1d0c Ladybird: Remove save button from settings dialog
Save new tab page value on change when valid and
show red error border when URL is not valid
2023-08-31 15:46:21 +02:00
Bastiaan van der Plaat 9510df6eab Ladybird: Move new_tab_page along to set_new_tab_page 2023-08-31 15:46:21 +02:00
Timothy Flynn 204a6f9241 Ladybird+LibWebView: Move console history tracking to ConsoleClient
This will allow other chromes to make use of history in their console
implementations.
2023-08-31 12:20:10 +02:00
Timothy Flynn bf59e06d2a Ladybird+LibWebView: Extract common JS console functionality to a helper
This creates WebView::ConsoleClient to handle functionality that will be
common to the JS consoles of all Ladybird chromes. This will let each
chrome focus on just the UI.

Note that this includes the `console.group` functionality that only the
Serenity chrome previously had. This was a FIXME in the Qt chrome, and
it is implemented such that all chromes will receive this functionality
for free.
2023-08-30 09:24:59 +02:00
Timothy Flynn a6bdf8c2a9 Ladybird: Use a web view for the Qt chrome's View Source action
Unlike the existing popup window, this will provide syntax highlighting.
2023-08-29 08:11:11 -04:00
Timothy Flynn a718a1f3a6 Ladybird: Allow creating new tabs with plain HTML
This will allow us to internally create a new tab with HTML, to be used
by the View Source command.
2023-08-29 08:11:11 -04:00
Timothy Flynn 9c4ce1b80b Ladybird: Do not enable the reload button if history is empty
Not much of an issue currently, but will be once tabs are used to render
plain HTML.
2023-08-29 08:11:11 -04:00
Timothy Flynn 0f9c088302 Ladybird: Install the native style sheet into the JS console web view
Without this, we are unable to render the web view in dark mode.
2023-08-26 15:32:36 -04:00
Timothy Flynn d56f127c80 Ladybird+LibWebView: Rename some "on get" notifications to "on received"
The old names sounded like awkward English to me, as they implied the
WebContent process is asking for information. In reality, WebContent is
*providing* the information.
2023-08-23 12:07:02 -04:00
Timothy Flynn edec5b1d91 Ladybird+LibWebView: Migrate input completions to LibWebView callbacks 2023-08-23 12:07:02 -04:00
Timothy Flynn 5116e97a9d Ladybird+LibWebView: Migrate tooltip changes to LibWebView callbacks 2023-08-23 12:07:02 -04:00
Timothy Flynn 78d9339aa9 Ladybird+LibWebView: Migrate scrolling changes to LibWebView callbacks 2023-08-23 12:07:02 -04:00
Timothy Flynn 00fe122b0a Ladybird+LibWebView: Migrate cursor changes to LibWebView callbacks 2023-08-23 12:07:02 -04:00
Timothy Flynn bf464665a7 Ladybird+LibWebView: Migrate layout notification to LibWebView callbacks 2023-08-23 12:07:02 -04:00
Timothy Flynn 682a5f9b70 Ladybird+LibWebView: Move APIs which only repaint to LibWebView
We can easily add hooks to notify the browsers of these events if any
implementation-specific handling is needed in the future, but for now,
these only repaint the client, which we can do in ViewImplementation.
2023-08-23 09:59:04 -04:00
Timothy Flynn ea7e1b5f53 Ladybird+LibWebView: Move most of paint handling to LibWebView
Storing the backup bitmap is the same across Browser and Ladybird. Just
peform that work in LibWebView, and handle only the implementation-
specific nuances within the browsers.
2023-08-23 09:59:04 -04:00
Timothy Flynn 15da77f4c4 Ladybird+LibWebView: Migrate file APIs to LibWebView callbacks
This also sets the default callback to do what every non-Serenity
browser is doing, rather than copy-pasting this callback into every
implementation. The callback is still available for any platform which
might want to override the default behavior. For example, OOPWV now
overrides this callback to use FileSystemAccessClient.
2023-08-23 09:59:04 -04:00
Timothy Flynn ebdcba8b3b Ladybird+LibWebView: Migrate dialog APIs to LibWebView callbacks 2023-08-23 09:59:04 -04:00
Bastiaan van der Plaat abf0c8f1a6 Ladybird: Use pixelDelta() on supported platforms for better scrolling 2023-08-20 12:17:58 -06:00
Bastiaan van der Plaat 0facfd3257 LibWeb: Make handle_mousewheel wheel delta use pixels 2023-08-20 12:17:58 -06:00
Timothy Flynn 9608bfb576 LibWebView+Ladybird: Remove duplicate WebContent callback
We have on_navigate_back + on_back_button and on_navigate_forward +
on_forward_button. Remove the *_button variants.
2023-08-19 05:15:35 +02:00
Aliaksandr Kalenik 24edb7c97f Ladybird, WebContent: Add option in debug menu to output GC graph dump 2023-08-17 18:27:02 +02:00
Andreas Kling 258af0fb1b Ladybird/Qt: Turn off web search and autocomplete by default
Anyone who wants this can enable it in the settings window.
2023-08-17 16:49:22 +02: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
Cameron Youell 0da5af0eff Ladybird: Pass QIcon by reference in tab_favicon_changed 2023-08-17 15:30:23 +01:00
Cameron Youell 6e40e8316e Ladybird: Convert Browser::Settings to a singleton 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
Timothy Flynn ccf2597bd3 Ladybird: Remove unused LoadType parameter from Tab::navigate
The only non-default use of this parameter was removed in 980e7164fe.
2023-08-13 21:49:06 +01:00
0x6D70 980e7164fe Ladybird: Add initial page to history
This fixes a bug where the reload button does not work on the page that
was initially opened
2023-08-13 09:24:19 -04:00
Bastiaan van der Plaat b7b02693b9 Ladybird: Remember window position and size on close 2023-08-09 13:47:44 +01:00
Timothy Flynn 93ffa77370 Ladybird: Remove workaround for initial page load for WebDriver
The issue noted in the removed comment no longer seems to apply. The URL
loaded here is triggered before WebDriver even issues the POST /session
command.
2023-08-09 05:33:24 +02:00
Timothy Flynn 6c7422e8b7 Ladybird: Only load a single URL at launch
When we launch Ladybird, we currently:

1. Create a BrowserWindow, whose constructor navigates to the configured
   new tab page URL.
2. Then navigate to either "about:blank" or whatever URL is provided via
   the command line.

This patch removes step 2 and forwards the URL from the command line (if
any) to BrowserWindow. BrowserWindow's constructor then either navigates
to that URL or the new tab page URL.
2023-08-09 05:33:24 +02:00
Timothy Flynn 601da7e5bd Ladybird: Add the select-all action to the JS console
Also clarify a comment, because it wasn't immediately clear to me what
wouldn't work without the code below it.
2023-08-09 05:13:24 +02:00
Timothy Flynn 59b583329a Ladybird: Close the current tab even if we're closing the window
Currently, if the JS console is open and tied to the last opened tab in
the browser window, it will prevent the main process from exiting when
the last tab is closed. This change explicitly closes that tab before
closing the window (if it's the last tab), allowing Qt to delete the
Tab object.
2023-08-09 05:13:24 +02:00
Andreas Kling 99ac34eeae Ladybird+LibWebView+Browser: Remove ability to run with AST interpreter 2023-08-08 13:07:13 +02:00
Andreas Kling e769776bdd Ladybird: Remove ability to run with AST interpreter 2023-08-08 13:07:13 +02:00
Andrew Kaster 82495083c3 Ladybird: Ensure selected new tab URL is a valid URL before saving 2023-08-07 22:17:40 -04:00