Hi,

> Am 16.05.2025 um 22:25 schrieb Riccardo Mottola <[email protected]>:
> 
> Hi,
> 
> H. Nikolaus Schaller wrote:
>> Well,https://webkit.org/  says:
>> 
>> WebKit is the web browser engine used by Safari, Mail, App Store, and many 
>> other apps
>  years ago when we worked on 10.6/10.7 and SWK we hd doubts on this claim. It 
> looked part of NSAttributedString.

Well, there is a method of NSAttributedString that takes a HTML string as 
argument. Back then we found that it is a wrapper
around WebKit.

> Of course, many things changed, maybe Mail is even partially rewritten in 
> swift, so they could have done it.

I have tried to find a hint by analysing Mail through the Activity Monitor. 
There is no WebKit in the list of open files, although other frameworks are.
So it may have changed. For example the translation may run in a subprocess so 
that WebKit bugs are constrained.

>> Is this using SimpleWebKit or has GNUMail its own html -> display converter?
> 
> It  has its own converter, I wrote. I find it very crude, had a look at it. 
> They way it is done I think is probably very hard to upgrade to even simple 
> styles.
> But, well, SWK doesn't support styles either.

I do not exactly remember but AFAIR, the <style> tag is decoded by SWK as good 
as possible. May have bugs or needs modern extensions.
Anyways it is a lot of work to get SWK working for that purpose and integrate 
it into GNUmail.

> 
> It works essentialy by looking for <bold> then searching for next </bold> and 
> inserting an Attributed. Of course with <style> it would we harder, so which 
> one would be?
> 
> Also Grrr has a concoted converter.
> 
> Maybe we should move the concocted converter into GUI like Mac does. If SWK 
> (or equivalent) is present it could delegate to it.

Yes, that is the NSAttributedString method (it even exists in Swift):

https://developer.apple.com/documentation/foundation/nsattributedstring/init(html:options:documentattributes:)?language=objc

An implementation is 
https://github.com/goldelico/mySTEP/blob/master/AppKit/Sources/NSAttributedStringAdditions.m#L806

That could wrap anything and could be improved and unit-tested independently of 
GNUmail.

> 
> In any case, it could be that the issues in Grr are not from the converter 
> but from something else that chokes, needs to be analyzed.
> 
> Riccardo

BR,
Nikolaus


  • G... Patrick Cardona
    • ... Gregory Casamento
    • ... Riccardo Mottola
      • ... H. Nikolaus Schaller
        • ... Riccardo Mottola
          • ... H. Nikolaus Schaller
      • ... Luke Lollard via Discussion list for the GNUstep programming environment
      • ... Patrick Cardona
        • ... Riccardo Mottola
          • ... Patrick Cardona
            • ... Riccardo Mottola
              • ... Patrick Cardona
    • ... Riccardo Mottola

Reply via email to