Bug 2121096

Summary: webkitgtk 2.37.90 breaks the evolution mail view
Product: [Fedora] Fedora Reporter: Yanko Kaneti <yaneti>
Component: evolutionAssignee: Milan Crha <mcrha>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: awilliam, caillon+fedoraproject, fattony4, gnome-sig, lucilanga, mcatanza, mcrha, peter, raffi.khatchadourian, rstrode, sallyahaj, sandmann
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-12 17:45:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
frame-flatteing remove revert none

Description Yanko Kaneti 2022-08-24 12:52:48 UTC
Description of problem:
After the webkit2gtk4.1 update to 2.37.90 the evolution mail body is empty


Version-Release number of selected component (if applicable):
webkitgtk-2.37.90-1.fc38

Comment 1 Milan Crha 2022-08-25 07:03:13 UTC
(In reply to Yanko Kaneti from comment #0)
> Description of problem:
> After the webkit2gtk4.1 update to 2.37.90 the evolution mail body is empty

That's not accurate, or at least it's not what I see. There are the message headers and the message text is very thin, vertically.

The WebKitGTK+ broke frame-flattenning. Evolution relies on it, it defines 10px iframe hight, expecting WebKitGTK to make it as tall as needed.

Comment 2 Yanko Kaneti 2022-08-25 09:19:44 UTC
You are right. The text is there and with a right size but 10px high viewport is not enough to see anything..

Comment 3 Sally 2022-08-27 22:01:27 UTC
The same issue in Fedora 37:
webkit2gtk4.1-2.37.90-1.fc37.aarch64
webkit2gtk5.0-2.37.90-1.fc37.aarch64
Can't read messages in Evolution.

Comment 4 Yanko Kaneti 2022-08-30 16:46:25 UTC
Created attachment 1908566 [details]
frame-flatteing remove revert

It looks like frame-flattening was removed intentionally https://github.com/WebKit/WebKit/commit/37224f042c178a094cc2287dee595345bc89f687

As an experiment I've tested this patch which reverts the change on top of 2.37.90 and it at least helps evo/mailer work as before

Comment 5 Michael Catanzaro 2022-08-30 17:06:19 UTC
> It looks like frame-flattening was removed intentionally 

Good find!

Comment 6 Michael Catanzaro 2022-08-30 17:13:35 UTC
OK, I don't think this code is coming back, so reassigning to Evolution to try to find another way to do this.

Comment 7 Adam Williamson 2022-08-30 18:28:09 UTC
Can we put it back at least temporarily? It's kind of a pain for everyone who uses Evo to have to downgrade webkitgtk...

Comment 8 Michael Catanzaro 2022-08-30 18:44:27 UTC
It's probably better to find another solution. A patch that big won't apply for very long. But if Milan requests it, then yes, we can try that temporarily.

FWIW I think frame flattening was only intended to be used on iOS. I didn't realize it was supported in desktop builds. It seems there is public API unfortunately, WebKitSettings:enable-frame-flattening, that was not deprecated and presumably does not work anymore.

Comment 9 Raffi Khatchadourian 2022-08-30 19:04:12 UTC
(In reply to Adam Williamson from comment #7)
> Can we put it back at least temporarily? It's kind of a pain for everyone
> who uses Evo to have to downgrade webkitgtk...

I can't even downgrade due to dependency conflicts. I have to use flatpak as a workaround, which doesn't bring in all of my previous settings.

Comment 10 Milan Crha 2022-08-31 09:56:45 UTC
Okay, let's face it. The frame-flattening is removed now. Then there's a plan to drop more public API which Evolution relies heavily on, in the near(er) future. Is it time to look for a different web engine, which will be able to show HTML content in the message preview? Are there any options at all?

I'll see what I can do with the frame flattening now.

Comment 11 Adam Williamson 2022-08-31 15:37:01 UTC
Thanks, Milan, I know this must suck :| I'd like to help but my C coding is not at that level.

I can't off the top of my head think of any alternatives which would be less painful than adapting to webkit changes, either :|

Comment 12 Milan Crha 2022-08-31 16:13:24 UTC
I asked them [1] to revert the change, but I have no hope.

The GNOME hard code freeze starts in two days and I'm not able to change the core functionality of the mail preview without breaking user experience heavily.

Michael, supposing the WebKit upstream will not revert it for the 2.38.0, is it possible to carry the change in the WebKitGTK upstream only, at least in the 2.38.x series? I'm not talking about Fedora package, I'm talking about WebKitGTK upstream - all distros should have it. That could give me more time to adapt the Evolution.

[1] https://bugs.webkit.org/show_bug.cgi?id=242883#c8

Comment 13 Michael Catanzaro 2022-08-31 18:20:47 UTC
I believe we have consensus revert this on the WebKitGTK 2.38 branch. We'll probably use the patch that Yanko provided (thanks!).

But it will really be gone in 2.40, so please do continue to investigate how to adapt Evolution. Sorry about that. :/

Comment 14 Michael Catanzaro 2022-08-31 22:02:43 UTC
(In reply to Michael Catanzaro from comment #13)
> I believe we have consensus revert this on the WebKitGTK 2.38 branch. We'll
> probably use the patch that Yanko provided (thanks!).

Done. Yanko's patch applied cleanly, so I just used that.

Comment 15 Milan Crha 2022-09-01 05:12:34 UTC
Thanks, I appreciate it. I will look on the options to avoid using the frame-flattening for the next major evolution version series (3.48.x) within the linked upstream bug.

Comment 16 Michael Catanzaro 2022-09-02 15:50:57 UTC
2.37.91 should (hopefully) fix this issue. I will kick off builds soon.

Comment 17 Fedora Update System 2022-09-03 14:19:36 UTC
FEDORA-2022-fff66108a5 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-fff66108a5

Comment 18 Michael Catanzaro 2022-09-03 14:21:28 UTC
Hi Milan, in addition to fixing this bug, the new update should also fix printing with the bubblewrap sandbox enabled. Maybe try enabling it in F37 and see if anything breaks? It will be a huge security improvement for Evolution users.

Comment 20 Sally 2022-09-03 15:56:22 UTC
2.37.91 fixed the issue, thank you.

Comment 21 Fedora Update System 2022-09-03 23:44:37 UTC
FEDORA-2022-fff66108a5 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-fff66108a5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-fff66108a5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 22 Milan Crha 2022-09-05 08:51:22 UTC
(In reply to Michael Catanzaro from comment #18)
> Maybe try enabling it in F37 and see if anything breaks? It will be a huge security improvement for Evolution users.

I'm afraid it's a huge change for the Fedora 37. Let's investigate the possibility for the 3.48.x aka Fedora 38 (unless I forget of it meanwhile).

Comment 23 Fedora Update System 2022-09-12 17:45:50 UTC
FEDORA-2022-fff66108a5 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.