Changeset 249146 in webkit
- Timestamp:
- Aug 27, 2019, 9:19:37 AM (7 years ago)
- Location:
- branches/safari-608-branch/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
platform/RuntimeApplicationChecks.h (modified) (1 diff)
-
platform/cocoa/RuntimeApplicationChecksCocoa.mm (modified) (1 diff)
-
platform/ios/PlatformPasteboardIOS.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-608-branch/Source/WebCore/ChangeLog
r249145 r249146 1 2019-08-27 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r249140. rdar://problem/54749102 4 5 Image pasted from screenshot into Mail compose window via share sheet has the wrong aspect ratio 6 https://bugs.webkit.org/show_bug.cgi?id=201171 7 <rdar://problem/54671275> 8 9 Reviewed by Tim Horton. 10 11 Augments an existing app-specific hack to include the Mail composition service, in addition to Mail. 12 13 * platform/RuntimeApplicationChecks.h: 14 * platform/cocoa/RuntimeApplicationChecksCocoa.mm: 15 (WebCore::IOSApplication::isMailCompositionService): 16 17 Add a new bundle checking method for the Mail composition service (com.apple.MailCompositionService). 18 19 * platform/ios/PlatformPasteboardIOS.mm: 20 (WebCore::PlatformPasteboard::informationForItemAtIndex): 21 22 Only plumb the preferred presentation height through to the web process if the application is neither Mail nor 23 the Mail composition service. In the future, we should consider putting this hack behind SPI, or maybe only 24 expose the preferred presentation width in all apps (it isn't difficult to imagine a use case where a "Mail- 25 compose-like" web app has `img { max-width: 100%; }` in their stylesheet). 26 27 28 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249140 268f45cc-cd09-0410-ab3c-d52691b4dbfc 29 30 2019-08-27 Wenson Hsieh <wenson_hsieh@apple.com> 31 32 Image pasted from screenshot into Mail compose window via share sheet has the wrong aspect ratio 33 https://bugs.webkit.org/show_bug.cgi?id=201171 34 <rdar://problem/54671275> 35 36 Reviewed by Tim Horton. 37 38 Augments an existing app-specific hack to include the Mail composition service, in addition to Mail. 39 40 * platform/RuntimeApplicationChecks.h: 41 * platform/cocoa/RuntimeApplicationChecksCocoa.mm: 42 (WebCore::IOSApplication::isMailCompositionService): 43 44 Add a new bundle checking method for the Mail composition service (com.apple.MailCompositionService). 45 46 * platform/ios/PlatformPasteboardIOS.mm: 47 (WebCore::PlatformPasteboard::informationForItemAtIndex): 48 49 Only plumb the preferred presentation height through to the web process if the application is neither Mail nor 50 the Mail composition service. In the future, we should consider putting this hack behind SPI, or maybe only 51 expose the preferred presentation width in all apps (it isn't difficult to imagine a use case where a "Mail- 52 compose-like" web app has `img { max-width: 100%; }` in their stylesheet). 53 1 54 2019-08-27 Alan Coon <alancoon@apple.com> 2 55 -
branches/safari-608-branch/Source/WebCore/platform/RuntimeApplicationChecks.h
r248574 r249146 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(); -
branches/safari-608-branch/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm
r248574 r249146 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 { -
branches/safari-608-branch/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm
r246892 r249146 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.