From dfd74c480387fb1b101012e68663ac9b0fd5558a Mon Sep 17 00:00:00 2001 From: Doug Richardson Date: Tue, 11 May 2021 20:53:03 -0700 Subject: [PATCH] Add muted and playsinline video attributes for HTML5. --- include/tidyenum.h | 2 ++ src/attrdict.c | 2 ++ src/attrs.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/include/tidyenum.h b/include/tidyenum.h index 01430f7..70a0cf5 100644 --- a/include/tidyenum.h +++ b/include/tidyenum.h @@ -1210,6 +1210,7 @@ typedef enum TidyAttr_MAX, /**< MAX= */ TidyAttr_MEDIAGROUP, /**< MEDIAGROUP= */ TidyAttr_MIN, /**< MIN= */ + TidyAttr_MUTED, /**< MUTED= */ TidyAttr_NOVALIDATE, /**< NOVALIDATE= */ TidyAttr_OPEN, /**< OPEN= */ TidyAttr_OPTIMUM, /**< OPTIMUM= */ @@ -1265,6 +1266,7 @@ typedef enum TidyAttr_OnWAITING, /**< OnWAITING= */ TidyAttr_PATTERN, /**< PATTERN= */ TidyAttr_PLACEHOLDER, /**< PLACEHOLDER= */ + TidyAttr_PLAYSINLINE, /**< PLAYSINLINE= */ TidyAttr_POSTER, /**< POSTER= */ TidyAttr_PRELOAD, /**< PRELOAD= */ TidyAttr_PUBDATE, /**< PUBDATE= */ diff --git a/src/attrdict.c b/src/attrdict.c index 224cdc3..f7c0862 100644 --- a/src/attrdict.c +++ b/src/attrdict.c @@ -3625,6 +3625,8 @@ const AttrVersion TY_(W3CAttrsFor_VIDEO)[] = { TidyAttr_HEIGHT, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, { TidyAttr_LOOP, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, { TidyAttr_MEDIAGROUP, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, + { TidyAttr_MUTED, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, + { TidyAttr_PLAYSINLINE, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, { TidyAttr_POSTER, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, { TidyAttr_PRELOAD, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, { TidyAttr_SRC, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, diff --git a/src/attrs.c b/src/attrs.c index 0f16551..919e625 100644 --- a/src/attrs.c +++ b/src/attrs.c @@ -317,6 +317,7 @@ static const Attribute attribute_defs [] = { TidyAttr_MAX, "max", CH_PCDATA }, { TidyAttr_MEDIAGROUP, "mediagroup", CH_PCDATA }, { TidyAttr_MIN, "min", CH_PCDATA }, + { TidyAttr_MUTED, "muted", CH_BOOL }, { TidyAttr_NOVALIDATE, "novalidate", CH_PCDATA }, { TidyAttr_OPEN, "open", CH_BOOL }, /* Is. #925 PR #932 */ { TidyAttr_OPTIMUM, "optimum", CH_PCDATA }, @@ -372,6 +373,7 @@ static const Attribute attribute_defs [] = { TidyAttr_OnWAITING, "onwaiting", CH_PCDATA }, { TidyAttr_PATTERN, "pattern", CH_PCDATA }, { TidyAttr_PLACEHOLDER, "placeholder", CH_PCDATA }, + { TidyAttr_PLAYSINLINE, "playsinline", CH_BOOL }, { TidyAttr_POSTER, "poster", CH_PCDATA }, { TidyAttr_PRELOAD, "preload", CH_PCDATA }, { TidyAttr_PUBDATE, "pubdate", CH_PCDATA },