summaryrefslogtreecommitdiff
path: root/Userland/Applications/Browser
AgeCommit message (Collapse)Author
2022-01-28Revert "Userland: Invoke tzset in apps that care about time zones"Timothy Flynn
This reverts most of commit ede5c9548e55d8216dba21ed431b9e53d085a248. The one change not reverted is ClockWidget.h, so that the taskbar clock can continue to notice time zone changes.
2022-01-25Userland: Invoke tzset in applications that care about time zonesTimothy Flynn
In most applications, we invoke tzset once at startup for now. Most of these are short lived and don't need to know about time zone changes. The exception is the ClockWidget in the taskbar. Here, we invoke tzset each time we update the system time. This way, any time zone changes can take effect immediately.
2022-01-24Everywhere: Convert ByteBuffer factory methods from Optional -> ErrorOrSam Atkins
Apologies for the enormous commit, but I don't see a way to split this up nicely. In the vast majority of cases it's a simple change. A few extra places can use TRY instead of manual error checking though. :^)
2022-01-24Browser: Convert file-downloading code to Core::Stream :^)Sam Atkins
2022-01-24Browser: Convert ad-filter loading to Core::Stream :^)Sam Atkins
2022-01-24Browser: Convert search-engines file loading to Core::Stream :^)Sam Atkins
Wrapped it in a method so we can take advantage of TRY(). I chose not to make failure here stop the Browser process, but just to cancel loading any more search engines.
2022-01-23Userland: Add promises to programs that will read /etc/timezoneTimothy Flynn
This will require unveiling /etc/timezone itself for reading, as well as the rpath pledge promise.
2022-01-21Browser: Load icons at start of programDylan Katz
Previously, Browser loaded icons from the disk every time an icon was set. In addition to making more calls to the disk and decoding more images, this makes error propagation impossible. This change moves all icon loading to the start of the program.
2022-01-12Base+Userland: Add various iconselectrikmilk
Add new icons to menus, add existing icons that could be used in menus.
2022-01-12Base+Browser: Add Browser iconselectrikmilk
Add some missing icons to the brower.
2021-12-30Userland: Link directly against LibUnicodeData where neededTimothy Flynn
This is partially a revert of commits: 10a8b6d4116c6a627a6c189154af032f69b29c21 561b67a1add82538502ef2f5733f1d86718898ad Rather than adding the prot_exec pledge requried to use dlopen(), we can link directly against LibUnicodeData in applications that we know need that library. This might make the dlopen() dance a bit unnecessary. The same purpose might now be fulfilled with weak symbols. That can be revisted next, but for now, this at least removes the potential security risk of apps like the Browser having prot_exec privileges.
2021-12-27LibJS+WebContent+Browser+js: Implement console.group() methodsSam Atkins
This implements: - console.group() - console.groupCollapsed() - console.groupEnd() In the Browser, we use `<details>` for the groups, which is not actually implemented yet, so groups are always open. In the REPL, groups are non-interactive, but still indent any output. This looks weird since the console prompt and return values remain on the far left, but this matches what Node does so it's probably fine. :^) I expect `console.group()` is not used much outside of browsers.
2021-12-21Userland: Add unveil/pledge requisites for dynamic Unicode data loadingTimothy Flynn
Loading libunicodedata.so will require dlopen(), which in turn requires mmap(). The 'prot_exec' pledge is needed for this. Further, the .so itself must be unveiled for reading. The "real" path is unveiled (libunicodedata.so.serenity) as the symlink (libunicodedata.so) itself cannot be unveiled.
2021-12-10Browser+LibWeb+WebContent: Add variables display to InspectorSam Atkins
This allows us to see which custom properties apply to a given element, which previously wasn't shown.
2021-11-28Everywhere: Use default execpromises argument for Core::System::pledgeBrian Gianforcaro
2021-11-26Browser: Allow custom search engine URLs that don't start http[s]://Sam Atkins
2021-11-26Browser+Base: Delete provided Browser.ini fileSam Atkins
Having files in Base's user `.config` folder means that every time the Serenity image is built, all user settings in that file are thrown away. So, let's not do that! :^) Modified the default value for the homepage url to match what was in Browser.ini, so there is no visible change.
2021-11-26Browser: Move search engine definitions to a json fileSam Atkins
This both makes them configurable, and means that we can read them from other applications, such as BrowserSettings. :^)
2021-11-26Browser+BrowserSettings: Persist the "show bookmarks bar" settingSam Atkins
Previously this setting was only temporary, but we now save/load it from the config file.
2021-11-24LibDesktop: Make allowlist APIs return ErrorOr<void>Andreas Kling
This makes it very smooth to use TRY() when setting up these lists, as you can see in the rest of this commit. :^)
2021-11-23LibCore+LibSystem: Move syscall wrappers from LibSystem to LibCoreAndreas Kling
With this change, System::foo() becomes Core::System::foo(). Since LibCore builds on other systems than SerenityOS, we now have to make sure that wrappers work with just a standard C library underneath.
2021-11-22Everywhere: Use Application::construct() with Main::Arguments directlyMustafa Quraish
Use the updated API everywhere we are currently manually passing in `arguments.argc` and `arguments.argv`.
2021-11-22Everywhere: Use ArgsParser::parse() with Main::Arguments directlyMustafa Quraish
Use the updated API everywhere we are currently manually passing in `arguments.argc` and `arguments.argv`.
2021-11-22Browser: Scope bookmark actions so that they don't block the delete keySam Atkins
This fixes #10940. Previously, all presses of the Delete key without a modifier in Browser were uselessly consumed by the "Delete" action in the bookmark context menu.
2021-11-22Browser: Port to LibMain :^)Andreas Kling
2021-11-21LibGUI+Everywhere: Make sync requests to Clipboard server more obviousBen Wiederhake
2021-11-21Browser: Make paste access to Clipboard atomicBen Wiederhake
This avoids data race issues and saves a synchronous request to the ClipboardServer.
2021-11-18LibWeb: Move BrowsingContext into HTML/Andreas Kling
Browsing contexts are defined by the HTML specification, so let's move them into the HTML directory. :^)
2021-11-11Everywhere: Pass AK::StringView by valueAndreas Kling
2021-11-08LibGfx: Use ErrorOr<T> for Bitmap::try_load_from_file()Andreas Kling
This was used in a lot of places, so this patch makes liberal use of ErrorOr<T>::release_value_but_fixme_should_propagate_errors().
2021-11-02LibWeb+Browser: Show DOM comments with syntax_comment color in inspectorAndreas Kling
This required a hack since models can't return a color role directly from data(). I've added a FIXME about it.
2021-10-31Browser: Add "Color scheme" settingSam Atkins
This allows the user to override whether to use a dark or light theme in supporting websites.
2021-10-07Browser: Use reorderable tabsPeter Elliott
2021-10-06LibWeb: Rename Layout::BlockBox => BlockContainerAndreas Kling
There's a subtle difference here. A "block box" in the spec is a block-level box, while a "block container" is a box whose children are either all inline-level boxes in an IFC, or all block-level boxes participating in a BFC. Notably, an "inline-block" box is a "block container" but not a "block box" since it is itself inline-level.
2021-10-05Everywhere: Change from http to https where feasibleBen Wiederhake
I used "git grep -FIn http://" to find all occurrences, and looked at each one. If an occurrence was really just a link, and if a https version exists, and if our Browser can access it at least as well as the http version, then I changed the occurrence to https. I'm happy to report that I didn't run into a single site where Browser can't deal with the https version.
2021-10-03LibWeb+Browser: Disable Same-Origin Policy by default for nowAndreas Kling
Until we have CORS preflight checks working, this is only getting in the way of testing and I have to disable it manually all the time.
2021-09-29Browser: Use CommonActions where possible and various fixesMarcus Nilsson
This replaces some actions with CommonActions and also adds '...' to menu items that require user input.
2021-09-27LibWeb+Browser: Make ad blocking work in the multi-process worldAndreas Kling
We now send the list of content filters over to new WebContent processes after creating an OutOfProcessWebView. :^)
2021-09-18LibWeb: Remove the unused LayoutTreeModelAndreas Kling
If we want to bring back this functionality, we'll have to rewrite it for multi-process mode anyway.
2021-09-17Browser: Remove redundant tab::view() call from the tab constructorEyad Hossam
2021-09-13Browser: Rename "DOM Inspector" to just "Inspector"Andreas Kling
It inspects more than the DOM, after all. :^)
2021-09-13Browser: Add some UI padding in the Inspector widgetAndreas Kling
2021-09-12LibWeb+Browser: Add Debug menu action for toggling Same-Origin PolicyAndreas Kling
Sometimes it's useful to turn off the SOP for testing purposes. Let's make that easy by having a Debug menu item for it. :^)
2021-09-11AK: Replace the mutable String::replace API with an immutable versionIdan Horowitz
This removes the awkward String::replace API which was the only String API which mutated the String and replaces it with a new immutable version that returns a new String with the replacements applied. This also fixes a couple of UAFs that were caused by the use of this API. As an optimization an equivalent StringView::replace API was also added to remove an unnecessary String allocations in the format of: `String { view }.replace(...);`
2021-09-11Browser: Use String::count instead of String::replace(X, X, true)Idan Horowitz
There's no need to create a new String just to count the amount of occurrences of a substring.
2021-09-08LibWeb: Rename InitialContainingBlockBox => InitialContainingBlockAndreas Kling
The "Box" suffix added nothing here.
2021-09-06Browser+WebContent: Initialize WebContentConsoleClient earlierSam Atkins
With this patch, we now initialize the `WebContentConsoleClient` as soon as the Page has loaded, instead of waiting for the Console Window to be shown. This finally lets us see log messages that happened before the window was opened! :^) However, it is not perfect. Waiting until the page has loaded means we lose any messages that happen *during* page load. Ideally we would initialize the WCCC when the page *starts* loading instead, but it requires that the page has a document and interpreter assigned and accessible. As far as I can tell with my limited knowledge, this is not the case until the page has completed loading.
2021-09-06Browser: Convert JS ConsoleWidget to new APISam Atkins
The console widget now requests messages and receives them in bulk, using the shiny new IPC calls. This lets it display console messages that occurred before the widget was created. :^)
2021-09-06Browser: Reconnect the JS console when the current page changesSam Atkins
Previously, it would keep a pointer to the interpreter of the previous page, which resulted in Crashy Fun Times. This also changes the clearing behavior - instead of clearing the console output every time the window is shown, we clear it when the page changes. This is more useful, since before you would lose any log messages that had happened before opening the window.
2021-09-06Browser: Move `show_console_window()` to TabSam Atkins
Having the BrowserWindow assigning Tab's internals felt a bit wrong. This is also a step towards removing BrowserWindow as a friend class. While I was at it, changed the Tab to having a pointer to the ConsoleWidget instead of the Window, since that is usually what we want to use, and it's awkward having to static_cast the main-widget repeatedly.