From 03f35a1affb4afc50120d24a40c79e07f78a9e36 Mon Sep 17 00:00:00 2001 From: snianu <45411397+snianu@users.noreply.github.com> Date: Tue, 4 Jun 2024 12:57:45 -0700 Subject: [PATCH] Add SVG format to the spec. (#216) --- index.bs | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 841ca01..ffd046e 100644 --- a/index.bs +++ b/index.bs @@ -1803,7 +1803,7 @@ url: https://w3c.github.io/permissions/#permissions-task-source; type: dfn; On MacOS, follow the convention described below: - 1. Assign NSHTMLPboardType to |wellKnownFormat|. + 1. Assign NSPasteboardTypeHTML to |wellKnownFormat|. On Linux, ChromeOS, and Android, follow the convention described below: @@ -1823,6 +1823,20 @@ url: https://w3c.github.io/permissions/#permissions-task-source; type: dfn; 1. Assign "image/png" to |wellKnownFormat|. + 1. Else, if |mimeType|'s [=MIME type/essence=] is "image/svg+xml", then + + On Windows, follow the convention described below: + + 1. Assign CFSTR_MIME_SVG_XML to |wellKnownFormat|. + + On MacOS, follow the convention described below: + + 1. Assign UTTypeSVG to |wellKnownFormat|. + + On Linux, ChromeOS, and Android, follow the convention described below: + + 1. Assign "image/svg+xml" to |wellKnownFormat|. + 1. Return |wellKnownFormat|. @@ -1850,15 +1864,19 @@ url: https://w3c.github.io/permissions/#permissions-task-source; type: dfn; 1. Else, if |osFormatName| "PNG", then set |mimeTypeString| to "image/png". + 1. Else, if |osFormatName| CFSTR_MIME_SVG_XML, then set |mimeTypeString| to "image/svg+xml". + On MacOS, follow the convention described below: 1. If |osFormatName| is NSPasteboardTypeString, then set |mimeTypeString| to "text/plain". - 1. Else, if |osFormatName| is NSHTMLPboardType, then set |mimeTypeString| to "text/html". + 1. Else, if |osFormatName| is NSPasteboardTypeHTML, then set |mimeTypeString| to "text/html". 1. Else, if |osFormatName| NSPasteboardTypePNG, then set |mimeTypeString| to "image/png". + 1. Else, if |osFormatName| UTTypeSVG, then set |mimeTypeString| to "image/svg+xml". + On Linux, ChromeOS, and Android, follow the convention described below: @@ -1868,6 +1886,8 @@ url: https://w3c.github.io/permissions/#permissions-task-source; type: dfn; 1. Else, if |osFormatName| "image/png", then set |mimeTypeString| to "image/png". + 1. Else, if |osFormatName| "image/svg+xml", then set |mimeTypeString| to "image/svg+xml". + 1. Let |mimeType| be the result of [=parsing a MIME type=] given |mimeTypeString|.