Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
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. :^)
|
|
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.
|
|
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.
|
|
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. :^)
|
|
|
|
|
|
|
|
Don't have time to dig into this right now, but let's unbreak Browser.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This will let the WindowManager choose the location of the window
|
|
You can enable the new multi-process mode by using "Browser -m".
|
|
This commit sets everything up, but we still always instantiate a plain
Web::PageView in Browser::Tab..
|
|
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.
|
|
The new parser is now used everywhere and it's working pretty well!
|
|
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.
|
|
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.
|
|
|
|
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. :^)
|
|
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. :^)
|
|
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.
|
|
Currently, the tab's context menu only has options to reload and
close, but this patch allows for those options to be quickly
expanded!
|
|
|
|
This can be overridden in Browser.ini, but if there's no value there,
we now use "about:blank"
|
|
|
|
It's nicer to always use the browser's own app icon instead. :^)
|
|
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 :^)
|
|
Fixes #1952.
|
|
|
|
The Browser can now load a home page URL from the user's Browser.ini
configuration file rather than using a hard-coded URL.
|
|
|
|
...and enable this in the main Browser UI. :^)
|
|
|
|
|
|
This makes the active tab "take over" the whole window UI, even though
it's actually inside a TabWidget.
|
|
|
|
Now you can switch between the open tabs with Ctrl+PgUp and Ctrl+PgDn
|
|
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.
|
|
This also introduces a WindowActions collection of actions that are not
specific to the currently open tab, but nevertheless part of its menus.
|
|
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!)
|
|
|
|
This mimics the Explorer toolbar container from Windows 2000 and looks
pretty neat! :^)
|
|
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.
|