[webkit-changes] [WebKit/WebKit] 310284: [Cocoa] Genmoji viewed in Gmail and other web mail...
Aditya Keerthi
noreply at github.com
Sat Nov 16 14:46:42 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3102843f9dd6361edda9a9e824fc17bca82b0ad4
https://github.com/WebKit/WebKit/commit/3102843f9dd6361edda9a9e824fc17bca82b0ad4
Author: Aditya Keerthi <akeerthi at apple.com>
Date: 2024-11-16 (Sat, 16 Nov 2024)
Changed paths:
M Source/WebCore/editing/cocoa/EditorCocoa.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/AdaptiveImageGlyph.mm
Log Message:
-----------
[Cocoa] Genmoji viewed in Gmail and other web mail clients are very large
https://bugs.webkit.org/show_bug.cgi?id=283202
rdar://137165281
Reviewed by Abrar Rahman Protyasha.
In places where Genmoji aren't fully supported, a fallback PNG is displayed
instead. Currently, this fallback is created using the first frame of the
HEIC file that represents a Genmoji. This is problematic, since the size of
the first frame can be inconsistent, and can be quite large, looking very
out of place alongside text.
To fix, create the PNG at a much smaller fixed size. Note that this can
still result in inconsistencies between font size / fallback size, if the
text itself is larger. That issue is out of scope for this change, since
the only general solution is to recreate a PNG every time the used font size
is changed. A partial solution is to offer a post-processing step prior to
sending out an email, but that would only benefit clients that knew to
perform the post-processing step (potentially Apple Mail).
* Source/WebCore/editing/cocoa/EditorCocoa.mm:
(WebCore::fallbackImageForMultiRepresentationHEIC):
(WebCore::Editor::insertMultiRepresentationHEIC):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/AdaptiveImageGlyph.mm:
(TestWebKitAPI::TEST(AdaptiveImageGlyph, InsertAndRemoveWKAttachments)):
(TestWebKitAPI::TEST(AdaptiveImageGlyph, InsertWKAttachmentsCopyFromWebViewPasteToWebView)):
(TestWebKitAPI::TEST(AdaptiveImageGlyph, InsertWKAttachmentsMovingParagraphs)):
Canonical link: https://commits.webkit.org/286692@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list