Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

liferea.css is no longer applied after update webkit2gtk-2.30.6 to 2.32.0 in archlinux #973

Closed
mohafri opened this issue Mar 30, 2021 · 11 comments · Fixed by #976
Closed
Assignees
Labels
Milestone

Comments

@mohafri
Copy link

mohafri commented Mar 30, 2021

Liferea 1.13.5 and also newest version from master (commit b3de8af).

With webkit2gtk-2.30.6 everything is fine, with webkit2gtk-2.32.0 liferea.css doesn't work - see screenshots with activated webkit2-inspector.

webkit2gtk-2 30 6
webkit2gtk-2 32 0

With webkit2gtk-2.32.0 I get the message: "User Agent Style Sheet cannot be modified." and as error-message: "Not allowed to load local resource: file:///home/harald/.cache/liferea/style.css?1617130761"
Perhaps of this?: The changelog (https://webkitgtk.org/2021/03/26/webkitgtk2.32.0-released.html) states: "New API to remove individual scripts/stylesheets using WebKitUserContentManager."

The only workaround for me is to downgrade to webkit2gtk-2.30.6.

Am I missing something?

Best regards
harald

@sunwire
Copy link
Contributor

sunwire commented Mar 31, 2021

I can confirm on Fedora 33 the same.

@Leiaz Leiaz added the bug label Apr 2, 2021
@sunwire
Copy link
Contributor

sunwire commented Apr 3, 2021

It looks that all file:// urls are not allowed, style, js, pictures
2021-04-03_20-19

@Leiaz Leiaz self-assigned this Apr 5, 2021
Leiaz added a commit to Leiaz/liferea that referenced this issue Apr 5, 2021
It used to be enought to declare the liferea custom scheme as local to
access resources with file scheme, but for WebKit2Gtk >= 2.32 it looks
like it is necessary to register the custom scheme with a handler.

The handler doesn't do anything interesting for now as we just pass the
content with webkit_web_view_load_bytes and use the file scheme to
access resources, but it could be used to load Liferea resources in the
future ...
@sunwire
Copy link
Contributor

sunwire commented Apr 5, 2021

Thanks @Leiaz it works well.

@mohafri
Copy link
Author

mohafri commented Apr 5, 2021

@Leiaz
Many thanks - the issue is fixed for me too! Liferea.css works again.

@LiamDawe
Copy link

LiamDawe commented Apr 6, 2021

Would this be why as of the latest updates on Arch, the content window is white when the rest adhere to dark theme?

@Leiaz
Copy link
Collaborator

Leiaz commented Apr 6, 2021

@LiamDawe Yes, that is due to the css file not loading.

lwindolf added a commit that referenced this issue Apr 7, 2021
Register liferea custom scheme, fixes #973
@lwindolf lwindolf added this to the 1.13.6 milestone Apr 7, 2021
@paulgevers
Copy link
Contributor

@Leiaz just to confirm, your patch also works with older webkit2gtk versions, right?

@Leiaz
Copy link
Collaborator

Leiaz commented Apr 27, 2021

@paulgevers Yes, it should, I'm not using anything marked in the doc as requiring a particular version.

@paulgevers
Copy link
Contributor

@Leiaz thanks for confirming. One more request. I'm expecting the new webkit2gtk to also show up in Debian stable, which means that I also need to fix liferea 1.12.6. Your patch doesn't apply cleanly, can you double check that the patch looks good? I.e. I inserted it in the correct context?

I have prepared the following commit for this review:
https://salsa.debian.org/debian/liferea/-/commit/78fa1f32078eb7a56073ed49fd4b5ce481250f83#73b185a6dfa8c05a7c51823326e97de1cf49b443

@Leiaz
Copy link
Collaborator

Leiaz commented Apr 29, 2021

@paulgevers Yes, that patch is good.

@paulgevers
Copy link
Contributor

@Leiaz awesome, thanks for confirming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants