Changeset 249140 in webkit
- Timestamp:
- Aug 27, 2019 7:59:32 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r249135 r249140 1 2019-08-27 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Image pasted from screenshot into Mail compose window via share sheet has the wrong aspect ratio 4 https://bugs.webkit.org/show_bug.cgi?id=201171 5 <rdar://problem/54671275> 6 7 Reviewed by Tim Horton. 8 9 Augments an existing app-specific hack to include the Mail composition service, in addition to Mail. 10 11 * platform/RuntimeApplicationChecks.h: 12 * platform/cocoa/RuntimeApplicationChecksCocoa.mm: 13 (WebCore::IOSApplication::isMailCompositionService): 14 15 Add a new bundle checking method for the Mail composition service (com.apple.MailCompositionService). 16 17 * platform/ios/PlatformPasteboardIOS.mm: 18 (WebCore::PlatformPasteboard::informationForItemAtIndex): 19 20 Only plumb the preferred presentation height through to the web process if the application is neither Mail nor 21 the Mail composition service. In the future, we should consider putting this hack behind SPI, or maybe only 22 expose the preferred presentation width in all apps (it isn't difficult to imagine a use case where a "Mail- 23 compose-like" web app has `img { max-width: 100%; }` in their stylesheet). 24 1 25 2019-08-27 Carlos Garcia Campos <cgarcia@igalia.com> 2 26 -
trunk/Source/WebCore/platform/RuntimeApplicationChecks.h
r248471 r249140 78 78 79 79 WEBCORE_EXPORT bool isMobileMail(); 80 WEBCORE_EXPORT bool isMailCompositionService(); 80 81 WEBCORE_EXPORT bool isMobileSafari(); 81 82 WEBCORE_EXPORT bool isIMDb(); -
trunk/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm
r248471 r249140 203 203 } 204 204 205 bool IOSApplication::isMailCompositionService() 206 { 207 static bool isMailCompositionService = applicationBundleIsEqualTo("com.apple.MailCompositionService"_s); 208 return isMailCompositionService; 209 } 210 205 211 bool IOSApplication::isMobileSafari() 206 212 { -
trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm
r246892 r249140 159 159 if (!CGSizeEqualToSize(itemProvider.preferredPresentationSize, CGSizeZero)) { 160 160 auto adjustedPreferredPresentationHeight = [](auto height) -> Optional<double> { 161 if (!IOSApplication::isMobileMail() )161 if (!IOSApplication::isMobileMail() && !IOSApplication::isMailCompositionService()) 162 162 return { height }; 163 163 // Mail's max-width: 100%; default style is in conflict with the preferred presentation size and can lead to unexpectedly stretched images. Not setting the height forces layout to preserve the aspect ratio.
Note: See TracChangeset
for help on using the changeset viewer.