Switch to application/vnd.apple.folder for <attachment> folder special-case
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 28 Feb 2016 21:00:15 +0000 (21:00 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 28 Feb 2016 21:00:15 +0000 (21:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=154786
<rdar://problem/24416632>

Reviewed by Anders Carlsson.

Source/WebCore:

No new tests, adjusted an existing test to cover this.

* rendering/RenderThemeMac.mm:
(WebCore::iconForAttachment):
Add a second folder MIME type.

LayoutTests:

* fast/attachment/attachment-folder-icon-expected.html:
* fast/attachment/attachment-folder-icon.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@197301 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/attachment/attachment-folder-icon-expected.html
LayoutTests/fast/attachment/attachment-folder-icon.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderThemeMac.mm

index e0dfae0..d1a1d13 100644 (file)
@@ -1,5 +1,16 @@
 2016-02-28  Tim Horton  <timothy_horton@apple.com>
 
+        Switch to application/vnd.apple.folder for <attachment> folder special-case
+        https://bugs.webkit.org/show_bug.cgi?id=154786
+        <rdar://problem/24416632>
+
+        Reviewed by Anders Carlsson.
+
+        * fast/attachment/attachment-folder-icon-expected.html:
+        * fast/attachment/attachment-folder-icon.html:
+
+2016-02-28  Tim Horton  <timothy_horton@apple.com>
+
         Variables can resolve to the wrong value when elements differ in nothing but inherited variable value
         https://bugs.webkit.org/show_bug.cgi?id=154785
 
index efd122d..52650cb 100644 (file)
@@ -2,6 +2,7 @@
 <html>
 <body>
 <attachment title=" "></attachment>
+<attachment title=" "></attachment>
 <script>
 if (window.internals)
     file = window.internals.createFile("resources/");
index c57c9bf..90383b9 100644 (file)
@@ -2,5 +2,6 @@
 <html>
 <body>
 <attachment type="multipart/x-folder"></attachment>
+<attachment type="application/vnd.apple.folder"></attachment>
 </body>
 </html>
index 0dca2b2..5f8bdab 100644 (file)
@@ -1,5 +1,19 @@
 2016-02-28  Tim Horton  <timothy_horton@apple.com>
 
+        Switch to application/vnd.apple.folder for <attachment> folder special-case
+        https://bugs.webkit.org/show_bug.cgi?id=154786
+        <rdar://problem/24416632>
+
+        Reviewed by Anders Carlsson.
+
+        No new tests, adjusted an existing test to cover this.
+
+        * rendering/RenderThemeMac.mm:
+        (WebCore::iconForAttachment):
+        Add a second folder MIME type.
+
+2016-02-28  Tim Horton  <timothy_horton@apple.com>
+
         Variables can resolve to the wrong value when elements differ in nothing but inherited variable value
         https://bugs.webkit.org/show_bug.cgi?id=154785
 
index e2ffc22..c1154a7 100644 (file)
@@ -2349,7 +2349,7 @@ static RefPtr<Icon> iconForAttachment(const RenderAttachment& attachment)
 {
     String MIMEType = attachment.attachmentElement().attachmentType();
     if (!MIMEType.isEmpty()) {
-        if (equalIgnoringASCIICase(MIMEType, "multipart/x-folder")) {
+        if (equalIgnoringASCIICase(MIMEType, "multipart/x-folder") || equalIgnoringASCIICase(MIMEType, "application/vnd.apple.folder")) {
             if (auto icon = Icon::createIconForUTI("public.directory"))
                 return icon;
         } else if (auto icon = Icon::createIconForMIMEType(MIMEType))