summaryrefslogtreecommitdiff
path: root/Userland/Applications/Browser
AgeCommit message (Collapse)Author
2023-03-07Browser: Handle close event in WebContentViewAliaksandr Kalenik
2023-03-06Everywhere: Stop using NonnullRefPtrVectorAndreas Kling
This class had slightly confusing semantics and the added weirdness doesn't seem worth it just so we can say "." instead of "->" when iterating over a vector of NNRPs. This patch replaces NonnullRefPtrVector<T> with Vector<NNRP<T>>.
2023-03-06Browser: Add a missing include in InspectorWidgetMatthew Olsson
2023-03-04Userland: Use Font::pixel_size_rounded_up() instead of glyph_height()Andreas Kling
The only remaining clients of this API are specific to bitmap fonts and editing thereof.
2023-02-28LibWeb: Rename Layout::InitialContainingBlock to Layout::ViewportAndreas Kling
The name "initial containing block" was wrong for this, as it doesn't correspond to the HTML element, and that's specifically what it's supposed to do! :^)
2023-02-25Everywhere: Use _{short_,}string to create Strings from literalsLinus Groh
2023-02-24Browser+LibWeb+WebContent: Store cookie expiry times in UTCTimothy Flynn
We are currently converting parsed expiry times to local time, whereas the RFC dictates we parse them as UTC. When expiring cookies, we must also use the current UTC time to compare against the cookies' expiry times.
2023-02-18Userland: Specify margins and spacing in the GUI::Layout constructorSam Atkins
2023-02-18Userland: Use Widget::add_spacer() everywhereSam Atkins
2023-02-13LibCore: Remove `Stream.h`Tim Schumacher
2023-02-13LibCore: Move Stream-based file into the `Core` namespaceTim Schumacher
2023-02-13LibCore: Rename `File` to `DeprecatedFile`Tim Schumacher
As usual, this removes many unused includes and moves used includes further down the chain.
2023-02-13Userland: Set Button text using the new String classKarol Kosek
2023-02-13Userland: Replace usages of AbstractButton::text_deprecated with text()Karol Kosek
2023-02-13LibGUI+Userland: Add `_deprecated` suffix to AbstractButton::{set_,}textKarol Kosek
2023-02-08Everywhere: Use ReadonlySpan<T> instead of Span<T const>MacDue
2023-02-07Browser: Use `GUI::CommonActions::make_about_action()`Sam Atkins
Browser had bespoke code for showing the exact same AboutDialog, in a more convoluted way.
2023-02-04LibGUI+Userland: Switch order of parameters for InputBox::showKarol Baraniecki
Because usage of the input_type parameter is now higher than of the placeholder parameter, this makes for a cleaner API.
2023-02-04Userland: Replace manual checking by using GUI::InputType::NonemptyTextKarol Baraniecki
Do this where we were already checking if the input was empty after the InputBox was submitted. Those places gain interactive input validation. :^)
2023-02-03LibSQL+Userland: Pass SQL IPC results to clients in a structureTimothy Flynn
SQLClient exists as a wrapper around SQL IPC to provide a bit friendlier interface for clients to deal with. Though right now, it mostly forwards values as-is from IPC to the clients. This makes it a bit verbose to add values to IPC responses, as we then have to add it to the callbacks used by all clients. It's also a bit confusing seeing a sea of "auto" as the parameter types for these callbacks. This patch moves these response values to named structures instead. This will allow adding values without needing to simultaneously update all clients. We can then separately handle the new values in interested clients only.
2023-02-02Browser: Disallow empty URLs in the bookmark editorKemal Zebari
When an empty URL is given to `BookmarkEditor`, it will now disable the button that saves the bookmark change since an empty URL is an invalid URL.
2023-01-27AK: Remove StringBuilder::build() in favor of to_deprecated_string()Linus Groh
Having an alias function that only wraps another one is silly, and keeping the more obvious name should flush out more uses of deprecated strings. No behavior change.
2023-01-27Browser: Replace uses of JsonObject::get_deprecated()/get_ptr()Sam Atkins
2023-01-26LibGfx: Remove `try_` prefix from bitmap creation functionsTim Schumacher
Those don't have any non-try counterpart, so we might as well just omit it.
2023-01-17AK+Everywhere: Rename JsonObject::get() to ::get_deprecated()Sam Atkins
This is a preparatory step to making `get()` return `ErrorOr`.
2023-01-13Userland: Remove a bunch of unveil calls on /sys/kernel/processesLiav A
These are not needed anymore since the introduction of the new get_root_session_id syscall.
2023-01-12LibWebView+Ladybird: Move DOM inspection helpers to ViewImplementationLinus Groh
2023-01-12Browser: Implement zoom :^)Linus Groh
Largely based on the Ladybird implementation in 0cc151b.
2023-01-07Everywhere: Use ElapsedTimer::elapsed_time() for comparisonsAndrew Kaster
Simplify a lot of uses of ElapsedTimer by converting the callers to elapsed_time from elapsed, as the AK::Time returned is better for unit conversions and comparisons against constants.
2023-01-07LibGUI+Userland: Rename `try_load_from_gml()` -> `load_from_gml()` :^)Sam Atkins
It's the only one, so the `try` prefix is unnecessary now.
2023-01-07Userland: Replace all uses of `load_from_gml` with `try_load_from_gml`Sam Atkins
MOAR FIXMES! ;^)
2023-01-07Browser: Add Accessibility Tab to Inspector WidgetJonah
This tab allows you to view the accessibility tree like you do the DOM tree. The implementation limited to the role currently, once we add the name and description calculation algorithm, those will be displayed here as well. Selections are also not currently supported.
2023-01-06LibGUI+Everywhere: Use fallible Window::set_main_widget() everywhere :^)Sam Atkins
Rip that bandaid off! This does the following, in one big, awkward jump: - Replace all uses of `set_main_widget<Foo>()` with the `try` version. - Remove `set_main_widget<Foo>()`. - Rename the `try` version to just be `set_main_widget` because it's now the only one. The majority of places that call `set_main_widget<Foo>()` are inside constructors, so this unfortunately gives us a big batch of new `release_value_but_fixme_should_propagate_errors()` calls.
2023-01-05LibWeb+Browser+WebContent: Convert BoxModelMetrics to new pixel unitsSam Atkins
2023-01-03LibGfx: Make Font::width() return a floatAndreas Kling
2023-01-02Everywhere: Remove unused includes of AK/Format.hBen Wiederhake
These instances were detected by searching for files that include AK/Format.h, but don't match the regex: \\b(CheckedFormatString|critical_dmesgln|dbgln|dbgln_if|dmesgln|FormatBu ilder|__FormatIfSupported|FormatIfSupported|FormatParser|FormatString|Fo rmattable|Formatter|__format_value|HasFormatter|max_format_arguments|out |outln|set_debug_enabled|StandardFormatter|TypeErasedFormatParams|TypeEr asedParameter|VariadicFormatParams|v_critical_dmesgln|vdbgln|vdmesgln|vf ormat|vout|warn|warnln|warnln_if)\\b (Without the linebreaks.) This regex is pessimistic, so there might be more files that don't actually use any formatting functions. Observe that this revealed that Userland/Libraries/LibC/signal.cpp is missing an include. In theory, one might use LibCPP to detect things like this automatically, but let's do this one step after another.
2023-01-02Everywhere: Remove unused includes of AK/IterationDecision.hBen Wiederhake
These instances were detected by searching for files that include IterationDecision.h, but don't match the regex: \\bIterationDecision(?!\.h>)\\b This is the only symbol defined by IterationDecision.h. In theory, one might use LibCPP to detect things like this automatically, but let's do this one step after another.
2023-01-02Everywhere: Fix badly-formatted includesBen Wiederhake
In 7c5e30daaa615ad3a2ef55222423a747ac0a1227, the focus was "only" on Userland/Libraries/, whereas this commit cleans up the remaining headers in the repo, and any new badly-formatted include.
2022-12-31Browser: Add window to inspect historyRafał Babiarz
2022-12-28Applications: Remove i686 supportLiav A
2022-12-21Browser: Introduce action for opening bookmarks in a new windowKemal Zebari
This change introduces an action to bookmarks that allows them to be opened in a new browser window. This is done by accessing any bookmark's context menu and pressing "Open in New Window".
2022-12-19Browser+WebContent: Fixup some DOM inspector weirdnessMacDue
This fixes a few things I noticed whilst working on the inspector for Ladybird. 1. The computed and resolved values were being passed swapped around from the inspect_dom_node() IPC call. I.e. computed values were passed as resolved values and vice versa. This was then fixed by swapping them again in the InspectorWidget (two errors canceled out). 2. Resolved values were called "specified values" seemingly only in the inspect_dom_node() IPC calls. This was a little confusing so I've renamed them to back to "resolved values" for consistency. 3. The inspector took and stored the DOM JSON strings unnecessarily, all the models immediately parse the JSON and don't need the strings to hang around.
2022-12-19Browser: Close inspectors and JS console when tab closesMacDue
Keeping these around can lead to use-after-frees and crashes.
2022-12-14Browser: Inject cookies timestamps as integers rather than doublesTimothy Flynn
Now that LibSQL can store 64-bit integers, let's use them.
2022-12-12Browser: Go back/forward when pressing back/forward mouse buttonsBaitinq
This currently doesn't work when running Serenity through QEMU, as it doesn't pass the side button events over to Serenity due to some bug or missing feature.
2022-12-12LibCore: Propagate errors from `Stream::*_entire_buffer`Tim Schumacher
2022-12-12LibCore: Rename `Stream::*_or_error` to `*_entire_buffer`Tim Schumacher
All of our functions are `_or_error` (or are about to be), and maybe making it less reminiscient of AK::Stream will make people use it more.
2022-12-08Browser: Store cookies in a LibSQL database :^)Timothy Flynn
Currently, cookies are ephemeral and only survive for the lifetime of Browser instance. This will make Browser instead store cookies in a SQL database for persisted access.
2022-12-08Browser+LibWebView+WebContent: Do not domain match on cookie updatesTimothy Flynn
Updating cookies through these hooks happens in one of two manners: 1. Through the Browser's storage inspector. 2. Through WebDriver's delete-cookies operation. In (1), we should not restrict ourselves to being able to delete cookies for the current page. For example, it's handy to open the inspector from the welcome page and be able to delete cookies for any domain. In (2), we already are only interacting with cookies that have been matched against the document URL.
2022-12-08LibGfx+Userland: Make PNGWriter::encode() return ErrorOr<ByteBuffer>Andreas Kling
This is a first step towards handling PNG encoding failures instead of just falling over and crashing the program. This initial step will cause encode() to return an error if the final ByteBuffer copy fails to allocate. There are more potential failures that will be surfaced by subsequent commits. Two FIXMEs were killed in the making of this patch. :^)