Changeset 244956 in webkit


Ignore:
Timestamp:
May 5, 2019 3:45:22 AM (5 years ago)
Author:
Wenson Hsieh
Message:

fast/attachment/attachment-folder-icon.html is an Image Only failure on recent macOS builds
https://bugs.webkit.org/show_bug.cgi?id=197593
<rdar://problem/50379267>

Reviewed by Tim Horton.

On recent versions of macOS, -[NSWorkspace iconForFileType:] returns the generic document icon for
"public.directory". Instead of using this UTI to generate attachment icons for "multipart/x-folder" and
"application/vnd.apple.folder", we should instead be using "public.folder", which has a folder icon. This fixes
the existing test fast/attachment/attachment-folder-icon.html, which currently results in an image diff on these
builds of macOS.

  • rendering/RenderThemeMac.mm:

(WebCore::iconForAttachment):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r244955 r244956  
     12019-05-05  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        fast/attachment/attachment-folder-icon.html is an Image Only failure on recent macOS builds
     4        https://bugs.webkit.org/show_bug.cgi?id=197593
     5        <rdar://problem/50379267>
     6
     7        Reviewed by Tim Horton.
     8
     9        On recent versions of macOS, -[NSWorkspace iconForFileType:] returns the generic document icon for
     10        "public.directory". Instead of using this UTI to generate attachment icons for "multipart/x-folder" and
     11        "application/vnd.apple.folder", we should instead be using "public.folder", which has a folder icon. This fixes
     12        the existing test fast/attachment/attachment-folder-icon.html, which currently results in an image diff on these
     13        builds of macOS.
     14
     15        * rendering/RenderThemeMac.mm:
     16        (WebCore::iconForAttachment):
     17
    1182019-05-04  Alex Christensen  <achristensen@webkit.org>
    219
  • trunk/Source/WebCore/rendering/RenderThemeMac.mm

    r244731 r244956  
    7272#import <Carbon/Carbon.h>
    7373#import <Cocoa/Cocoa.h>
     74#import <CoreServices/CoreServices.h>
    7475#import <math.h>
    7576#import <pal/spi/cg/CoreGraphicsSPI.h>
     
    27462747    if (!attachmentType.isEmpty()) {
    27472748        if (equalIgnoringASCIICase(attachmentType, "multipart/x-folder") || equalIgnoringASCIICase(attachmentType, "application/vnd.apple.folder")) {
    2748             if (auto icon = Icon::createIconForUTI("public.directory"))
     2749            if (auto icon = Icon::createIconForUTI(kUTTypeFolder))
    27492750                return icon;
    27502751        } else {
Note: See TracChangeset for help on using the changeset viewer.