summaryrefslogtreecommitdiff
path: root/Applications/Browser/main.cpp
AgeCommit message (Collapse)Author
2021-01-12Applications: Move to Userland/Applications/Andreas Kling
2021-01-05LibWeb: Add a basic content filter (ad blocking!) :^)Andreas Kling
This patch adds a global (per-process) filter list to LibWeb that is used to filter all outgoing resource load requests. Basically we check the URL against a list of filter patterns and if it's a match for any one of them, we immediately fail the load. The filter list is a simple text file: ~/.config/BrowserContentFilters.txt It's one filter per line and they are simple glob filters for now, with implicit asterisks (*) at the start and end of the line.
2021-01-03Browser: Tell LaunchServer we only want to show the downloads directoryAndreas Kling
Browser only uses LaunchServer for one thing: to open the user's downloads directory after a download is finished. Eventually I'd like to move this functionality to a separate download manager service, but for now, let's at least lock down what Browser is able to ask LaunchServer to do. :^)
2021-01-01Applications+LibGUI: Convert all GML consumers to use the LibCore finderAndrew Kaster
Remove Widget::find_child_by_name and Widget::find_descendant_by_name, and convert all users to using the type-safer version in Core::Object.
2020-12-30ProtocolServer: Stream the downloaded data if possibleAnotherTest
This patchset makes ProtocolServer stream the downloads to its client (LibProtocol), and as such changes the download API; a possible download lifecycle could be as such: notation = client->server:'>', server->client:'<', pipe activity:'*' ``` > StartDownload(GET, url, headers, {}) < Response(0, fd 8) * {data, 1024b} < HeadersBecameAvailable(0, response_headers, 200) < DownloadProgress(0, 4K, 1024) * {data, 1024b} * {data, 1024b} < DownloadProgress(0, 4K, 2048) * {data, 1024b} < DownloadProgress(0, 4K, 1024) < DownloadFinished(0, true, 4K) ``` Since managing the received file descriptor is a pain, LibProtocol implements `Download::stream_into(OutputStream)`, which can be used to stream the download into any given output stream (be it a file, or memory, or writing stuff with a delay, etc.). Also, as some of the users of this API require all the downloaded data upfront, LibProtocol also implements `set_should_buffer_all_input()`, which causes the download instance to buffer all the data until the download is complete, and to call the `on_buffered_download_finish` hook.
2020-12-20LibGUI: Introduce GML - a simple GUI Markup Language :^)Andreas Kling
This patch replaces the UI-from-JSON mechanism with a more human-friendly DSL. The current implementation simply converts the GML into a JSON object that can be consumed by GUI::Widget::load_from_json(). The parser is not very helpful if you make a mistake. The language offers a very simple way to instantiate any registered Core::Object class by simply saying @ClassName @GUI::Label { text: "Hello friends!" tooltip: ":^)" } Layouts are Core::Objects and can be assigned to the "layout" property: @GUI::Widget { layout: @GUI::VerticalBoxLayout { spacing: 2 margins: [8, 8, 8, 8] } } And finally, child objects are simply nested within their parent: @GUI::Widget { layout: @GUI::HorizontalBoxLayout { } @GUI::Button { text: "OK" } @GUI::Button { text: "Cancel" } } This feels a *lot* more pleasant to write than the JSON we had. The fact that no new code was being written with the JSON mechanism was pretty telling, so let's approach this with developer convenience in mind. :^)
2020-11-02Applications: Use GUI::Icon::default_icon to set application iconBrendan Coles
2020-10-25AK: Eradicate calls to warn().asynts
2020-10-04AK: Make the return type of dbgputstr consistent.asynts
2020-10-04Browser: Remove dbgln() statement that was crashing on startupAndreas Kling
Don't have time to dig into this right now, but let's unbreak Browser.
2020-10-04Browser: Fix build after dbgf() -> dbgln() renameAndreas Kling
2020-10-04Browser: Use format functions instead of printf.asynts
2020-09-23Applications+IRCClient: Use new format functions.asynts
2020-09-14Browser: Set tab text alignment from JSON GUIAndreas Kling
2020-09-14Browser: Generate the main browser window UI from JSON :^)Andreas Kling
2020-08-12Browser: Avoid ninja-import of global variableBen Wiederhake
2020-08-05Browser: Move bookmarks.json to ~/.configAndreas Kling
2020-08-01Applications: Stop setting initial window locationPeter Elliott
This will let the WindowManager choose the location of the window
2020-07-06Browser: Add a way to start Browser in multi-process mode :^)Andreas Kling
You can enable the new multi-process mode by using "Browser -m".
2020-07-06Browser+LibWeb: Pave the way for using WebContentView in BrowserAndreas Kling
This commit sets everything up, but we still always instantiate a plain Web::PageView in Browser::Tab..
2020-07-04LibGUI: Make GUI::Application a Core::ObjectAndreas Kling
Having this on the stack makes whole-program teardown iffy. Turning it into a Core::Object allows anyone who needs it to extends its lifetime.
2020-06-26LibWeb+Browser: Remove old HTML parser :^)Andreas Kling
The new parser is now used everywhere and it's working pretty well!
2020-06-22LibWeb+Browser: Decode non-animated images out-of-process :^)Andreas Kling
We now use the ImageDecoder service in LibWeb for everything except GIF images (we'll have to deal with them later, ofc.) This has a little bit of overhead but we should be able to optimize it until it becomes negligible.
2020-06-12Browser: Be a little bit smarter about interpretering command line URLsAndreas Kling
If the (optional) URL specified on the command line is an existing file we now resolve its real path before turning into a URL. This makes relative URLs inside the loaded document work correctly. Also interpret all other specified URLs the same way we would if you had typed them into the location bar.
2020-06-01LibWeb: Move ResourceLoader into a new Loader/ directoryAndreas Kling
2020-06-01LibWeb+Browser: Use the new HTML parser by defaultAndreas Kling
You can still run the old parser with "br -O", but the new one is good enough to be the default parser now. We'll fix issues as we go and eventually remove the old one completely. :^)
2020-05-27LibWeb+Browser: Add ability to run Browser with the new HTML parserAndreas Kling
You can now pass "-n" to the browser to use the new HTML parser. It's not turned on by default since it's still very immature, but this is a huge step towards bringing it into maturity. :^)
2020-05-26Browser: Add option in DownloadWidget to open download's in folderFalseHonesty
When a download has completed, instead of graying out the cancel option, replace it with an option to open your download in the file manager.
2020-05-21Browser: Pop up a context menu when one is requested on a tabFalseHonesty
Currently, the tab's context menu only has options to reload and close, but this patch allows for those options to be quickly expanded!
2020-05-19Browser: Hide tab bar if there's only one tabLinus Groh
2020-05-10Browser: Use "about:blank" as the default home pageAndreas Kling
This can be overridden in Browser.ini, but if there's no value there, we now use "about:blank"
2020-05-09Browser: Close tabs when middle clickedFalseHonesty
2020-04-28Browser: Don't put favicons as the window iconAndreas Kling
It's nicer to always use the browser's own app icon instead. :^)
2020-04-26Base+Browser: Add an icon for the serenity Browser and make it use itAndres Vieira
Browser was using the filetype-html icon instead of a dedicated one, so we now have the globe from that icon reimagined and in good Buggie company :^)
2020-04-25Browser: Unveil /etc/passwd so we can find our home directory if neededAndreas Kling
Fixes #1952.
2020-04-25Browser: Share one BookmarksBarWidget between all TabsAndreas Kling
2020-04-25Browser: Add Browser.ini configuration fileBrendan Coles
The Browser can now load a home page URL from the user's Browser.ini configuration file rather than using a hard-coded URL.
2020-04-24Browser: Use the active tab's favicon as the window icon :^)Andreas Kling
2020-04-24LibGUI: Add "uniform tabs" mode to TabWidget (all tabs have same width)Andreas Kling
...and enable this in the main Browser UI. :^)
2020-04-24Browser: React to favicon notifications and put favicons in the tabs!Andreas Kling
2020-04-24Browser: Move the "About" action to WindowActionsAndreas Kling
2020-04-24Browser: Remove padding from the main TabWidgetAndreas Kling
This makes the active tab "take over" the whole window UI, even though it's actually inside a TabWidget.
2020-04-24Browser: Open links with target="_blank" in new tabLinus Groh
2020-04-23Browser: Add "next tab" and "previous tab" actionsAndreas Kling
Now you can switch between the open tabs with Ctrl+PgUp and Ctrl+PgDn
2020-04-23Browser: Add "Close tab" action (Ctrl+W) :^)Andreas Kling
Note that this is a little bit unreliable with the keyboard shortcut since LibGUI can get confused about which Action it's supposed to use as each Browser::Tab has its own "close tab" action. This will need to be fixed in LibGUI.
2020-04-23Browser: Add "New tab" action (Ctrl+T) :^)Andreas Kling
This also introduces a WindowActions collection of actions that are not specific to the currently open tab, but nevertheless part of its menus.
2020-04-23Browser: Start implementing tabbed browsing! :^)Andreas Kling
This patch moves most of the Browser UI into a Tab class. The main UI now mainly consists of a GUI::TabWidget that Tab objects are added to. I'm going with the "tabs on top" style here, since I like how it makes it feel like each tab has its own UI controls (which it actually does!)
2020-04-23Applications: Tweak main layout spacing and backgroundAndreas Kling
2020-04-23LibGUI: Add a ToolBarContainer widget and put most ToolBars in oneAndreas Kling
This mimics the Explorer toolbar container from Windows 2000 and looks pretty neat! :^)
2020-04-21LibGUI: Make it easier to create checkable GUI::ActionsAndreas Kling
This patch adds GUI::Action::create_checkable() helpers that work just like the existing create() helpers, but the actions become checkable(!) Clients are no longer required to manage the checked state of their actions manually, but instead they will be checked/unchecked as needed by GUI::Action itself before the activation hook is fired.