Changeset 196028 in webkit
- Timestamp:
- Feb 2, 2016 1:31:36 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r196027 r196028 1 2016-02-02 Tim Horton <timothy_horton@apple.com> 2 3 <attachment> icon should be a folder for the custom MIME type multipart/x-folder 4 https://bugs.webkit.org/show_bug.cgi?id=153795 5 <rdar://problem/24416632> 6 7 Reviewed by Anders Carlsson. 8 9 * fast/attachment/attachment-folder-icon-expected.html: Added. 10 * fast/attachment/attachment-folder-icon.html: Added. 11 Make sure that the rendering of an attachment with multipart/x-folder 12 matches that of a file reference pointing at a folder. 13 1 14 2016-02-02 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> 2 15 -
trunk/Source/WebCore/ChangeLog
r196025 r196028 1 2016-02-02 Tim Horton <timothy_horton@apple.com> 2 3 <attachment> icon should be a folder for the custom MIME type multipart/x-folder 4 https://bugs.webkit.org/show_bug.cgi?id=153795 5 <rdar://problem/24416632> 6 7 Reviewed by Anders Carlsson. 8 9 Test: fast/attachment/attachment-folder-icon.html 10 11 * rendering/RenderThemeMac.mm: 12 (WebCore::iconForAttachment): 13 (WebCore::paintAttachmentIcon): 14 Mail uses this special MIME type to indicate that something is a folder, which there 15 isn't a normal non-deprecated MIME type for. 16 1 17 2016-02-02 Brady Eidson <beidson@apple.com> 2 18 -
trunk/Source/WebCore/rendering/RenderThemeMac.mm
r195678 r196028 2338 2338 } 2339 2339 2340 static RefPtr<Icon> iconForAttachment(const RenderAttachment& attachment) 2341 { 2342 String MIMEType = attachment.attachmentElement().attachmentType(); 2343 if (!MIMEType.isEmpty()) { 2344 if (equalIgnoringASCIICase(MIMEType, "multipart/x-folder")) { 2345 if (auto icon = Icon::createIconForUTI("public.directory")) 2346 return icon; 2347 } else if (auto icon = Icon::createIconForMIMEType(MIMEType)) 2348 return icon; 2349 } 2350 2351 if (File* file = attachment.attachmentElement().file()) { 2352 if (auto icon = Icon::createIconForFiles({ file->path() })) 2353 return icon; 2354 } 2355 2356 return Icon::createIconForUTI("public.data"); 2357 } 2358 2340 2359 static void paintAttachmentIcon(const RenderAttachment& attachment, GraphicsContext& context, AttachmentLayout& layout) 2341 2360 { 2342 RefPtr<Icon> icon; 2343 String type = attachment.attachmentElement().attachmentType(); 2344 if (!type.isEmpty()) 2345 icon = Icon::createIconForMIMEType(type); 2346 else { 2347 Vector<String> filenames; 2348 if (File* file = attachment.attachmentElement().file()) 2349 filenames.append(file->path()); 2350 icon = Icon::createIconForFiles(filenames); 2351 } 2352 2353 if (!icon) 2354 icon = Icon::createIconForUTI("public.data"); 2355 2361 auto icon = iconForAttachment(attachment); 2356 2362 if (!icon) 2357 2363 return;
Note: See TracChangeset
for help on using the changeset viewer.