| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1096>
|
|
|
|
| |
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1096>
|
|
|
|
|
|
| |
This won't work in GTK4, so just always use GDK_CURRENT_TIME.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1096>
|
|
|
|
|
|
|
|
|
| |
Confusingly, the icon_url member of EphyWebApplication is actually a
path not a URL or URI. The only place where it gets set to a URI is in
prefs-general-page.c when the user changes the icon, and there it is
happening erroneously since all the other code that deals with it
assumes it is a path. So, rename the struct member and ensure all the
use of it treats it as a path.
|
|
|
|
|
| |
Make use of the GetIcon() portal method so the app manager can work
under Flatpak.
|
|
|
|
|
| |
Just create the string in the one place we need it rather than always
storing it. This introduces no functional changes.
|
|
|
|
|
|
|
|
|
|
|
| |
This is yet another migration of web apps. This time we are changing the
GApplication ID to make it simpler and more D-Bus friendly. We also have
to ensure the GApp ID has the app ID as a prefix to be able to use the
dynamic launcher portal (and in order to own the right bus name when the
web app is run). We also migrate the web apps' desktop files and
icons to the locations they'd be in if we had used the portal to create
them, so that going forward they will all be in one place and things
should be simpler.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds a D-Bus service that exposes the web apps managed by
Epiphany so that a client can enumerate them, install a new one, or
remove an installed one. The intended client is GNOME Software, since I
am soon going to add back a webapp plugin to Software which will make
use of this interface. This is part of a larger effort to improve the
support for Progressive Web Apps in GNOME (though Epiphany's web apps do
not support PWA manifest features).
The great thing about having this be a service exposed by Epiphany,
rather than having Software try to install Epiphany-compatible web apps
on its own as it used to do, is that the implementation of how to create
and manage the web apps can stay in Epiphany, and there can never be
disagreement between Epiphany and Software about the proper on-disk
format for them (e.g. the algorithm used for generating the app ID from
the name).
The goal for the PWA project is to support Flatpak'd Epiphany, whereas
currently only non-Flatpak Epiphany can do web apps. This will be
accomplished with new portals to allow installing and removing the
.desktop launchers. The Flatpak support requirement is reflected in the
design of the API here, specifically the install_token parameter for the
Install() method. This token is to be acquired by the client of the
D-Bus interface (Software) so that the installation can be achieved
without any additional user interaction since the user would've already
clicked "Install" in Software. Web app installation directly via
Flatpak'd Epiphany's UI would involve a dialog created by the portal;
this is because we don't want sandboxed applications in general to be
able to create desktop launchers without user interaction.
The Uninstall() method by contrast doesn't require such a token,
because the portal can ensure that only apps created by an application
are deleted by that application.
The GetInstalledApps() method is implemented by looking at the profile
directories of the apps, because we don't want to have to poke a sandbox
hole to allow access to the actual desktop files.
|
|
|
|
| |
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1085>
|
|
|
|
|
|
|
|
|
|
|
| |
When the reader mode JS fails, we accidentally free it manually, even
though it's stored in an autoptr. Oops!
Fixes #1698, sort of. This really only fixes the Epiphany side of
things. I will report a separate WebKit bug to ensure the JS execution
never fails.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1084>
|
|
|
|
|
|
| |
It's unused and not portable to GTK4.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1081>
|
|
|
|
|
|
|
|
| |
Everything else will go away in GTK4, and while some of the old functions
got renamed, it's easier to just rename them later rather than move them
from path/uri to GFiles.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1072>
|
|
|
|
| |
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1072>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit ports EphySearchEngineManager to being a proper GListModel,
with a separate EphySearchEngine object for each search engines. That makes
the code overall way cleaner and easier to work with, as there's no need
to keep track of the old_name and saved_name or whatever horrible thing
that I needed to do, since now we just need to keep around the EphySearchEngine
object we're displaying in this preferences row, and do changes on it directly.
That did require quite a few changes all around the code base to adapt to all
API changes, but it is definitely worth it.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1055>
|
|
|
|
|
|
|
|
| |
This part wasn't allowed as a translatable string, so in french for example
we'd have a mismatch of quotes type since the first email address would have
«» as quotes but the next addresses have "" instead.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1065>
|
|
|
|
|
|
| |
According to the RFC, it's not a semi-colon but a comma instead.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1065>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are overencoding here. Epiphany is not prepared to handle the encoded
app ID, and it is not necessary to encode in the first place because the
app ID is trusted to be a valid GApplication ID, which cannot contain
nasty characters.
However, encoding the URLs here really is necessary, because they really
could contain nasty content.
Fixes #1665
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1050>
|
|
|
|
|
|
|
|
|
|
|
| |
The encoded URL here does not work. And we cannot reload via the web
process, because the window.location is about:blank for alternate HTML,
so we'll have to send a message to the UI process to have it do so
instead.
Fixes #1663
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1050>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
HTML-encoding the content passed to reader mode does not work because it
contains HTML markup generated by Readability.js. Oops. I must have
seriously screwed up when testing this yesterday, because there is no
way this could ever have worked.
Upstream recommends use of a DOM purifier, but in theory, if we
completely block *all* script execution, we can avoid the need for
that. So add a CSP recommended by Patrick.
We'll sneak in a couple bonus fixes: use ' rather than " to improve
readability, and close the </body> tag that we opened rather than abuse
the permissiveness of the parser.
Fixes: #1612
See also: #1661
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1047>
|
|
|
|
|
|
|
|
|
|
| |
This changes the style of the "Delete" button on the
"about:applications" page so that it looks like it has the
"destructive-class" applied, which makes it more consistent with
destructive buttons across the rest of GNOME. The CSS is copied from
error.css.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1040>
|
|
|
|
| |
Let's use only the required encoding here, and not more.
|
|
|
|
|
|
|
| |
Page titles and URLs are untrusted and could be nasty, so we need to
encode them appropriately when injecting them into HTML.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1045>
|
|
|
|
| |
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1045>
|
|
|
|
|
|
|
| |
This is necessary to prevent web content from escaping its intended
context.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1045>
|
|
|
|
| |
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1045>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The actual data here should be good already because it gets escaped by
GLib, but this function is really designed for use in XML, so let's
switch to the simpler Epiphany function designed for anti-XSS to make it
more clear what's going on here.
The URL is probably vulnerable, though, since a malicious URL could
conceivably try to escape the HTML entity context. Encode that.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1045>
|
|
|
|
|
|
|
|
|
|
|
| |
The file's name is suggested by the server, and could be malicious. We
don't want it to be able to escape the HTML attribute context.
The file data should already be safe because it is base-64 encoded. Here
I'm just adjusting the code style to match what I've done for the
filename.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1045>
|
|
|
|
| |
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1045>
|
|
|
|
|
|
|
|
| |
The web app has some partial control over its title, and full control
over its URL. Let's be careful here to ensure the web app info cannot be
used to execute code.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1045>
|
|
|
|
|
|
|
|
|
|
| |
Otherwise, web pages can execute code in about:overview via a malicious
page title. It might be possible to do the same via the URL, so better
encode that too.
Fixes #1612
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1045>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Snaps use the same portals as Flatpak, so we should detect whether we're
running as a Snap when deciding whether to use portals or disable
features that are impossible in these different but similar sandboxing
technologies.
This is mostly academic because the Snap of Epiphany appears to be
outdated, but it is more correct so let's do it.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1041>
|
|
|
|
|
|
|
| |
webkit_file_chooser_request_select_files() is transfer none, we still need
to free the array.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1038>
|
|
|
|
|
|
|
|
| |
It can do things such as show a spinner, a secondary label or actions.
Remove all of that, only leave what we actually use.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1038>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In GTK4 gtk_box_pack_start() is gone, replaced with gtk_box_append(). More
importantly, child properties are gone and pack_start() allows to set them.
With this in mind, stop using anything other than their default values:
FALSE, TRUE, 0. Everything else can be done with halign, valign, hexpand,
vexpand and margins.
gtk_box_pack_end() is gone as well. Replace with pack_start() where
possible (which involves rearranging the order in which widgets are added),
and the remaining uses at this point can be replaced with gtk_box_prepend().
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1038>
|
|
|
|
| |
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1035>
|
|
|
|
|
|
| |
They are gone in GTK4.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1035>
|
|
|
|
|
|
| |
This looks like legacy, not sure what it was even used for.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1035>
|
|
|
|
| |
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1034>
|
|
|
|
|
|
| |
It's already in a clamp.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1034>
|
|
|
|
| |
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1034>
|
|
|
|
|
|
| |
GtkSearchBar won't be derivable in GTK4.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1034>
|
|
|
|
|
|
|
|
|
|
|
| |
It was probably more useful when it was written, but by now it's a thin
wrapper around WebKitHitTestResult that proxies everything to it and
doesn't do much else. Also contains a GdkEvent and proxies its fields
but it's unused.
So just inline it instead.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1034>
|
|
|
|
| |
This indicates that it's a new tab better than Most Visited.
|
|
|
|
|
|
|
|
|
|
| |
about:blank is still white even when the app is using dark style.
Go with the same approach as Safari and introduce a new page for new tab
instead: about:newtab. As a bonus, we can give it a proper title instead
of "blank page".
Fixes https://gitlab.gnome.org/GNOME/epiphany/-/issues/1555
|
|
|
|
|
|
|
|
|
|
|
| |
When it's available, hide the reader color scheme preference and follow the
system.
Change the setting description to reflect this.
Fixes https://gitlab.gnome.org/GNOME/epiphany/-/issues/1546
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1029>
|
|
|
|
|
|
|
|
|
|
|
| |
We forced PDFs loaded via POST requests to become downloads to solve
issue #1505, but forgot that PDFs can also be opened via other URI
schemes. We shouldn't crash in this case. These can safely be loaded via
PDF.js.
Fixes #1611
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1023>
|
|
|
|
| |
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1020>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Same as the last commit, and a few more adjustments.
Recoloring icons is easy when they are monochrome. Unfortunately, here we
have red icons. So here we have to use complex and fragile filters, assume
the source icon is #cc0000 and carefully manipulate it to get the precise
color we want.
We also have to move the style class for it to work. While it could be both
on the icon and the title, it's easier to add it to the parent instead.
Fix the details expander.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Looking up passwords is a two-step process:
* Look up available usernames for the domain
* Look up passwords for the username (for the domain)
Currently if there is exactly one available username, we throw it away
rather than passing it along. Oops!
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1014>
|