From ae2c9a1efd06bb5ec55d2ec640273c80fda625ef Mon Sep 17 00:00:00 2001 From: Radu-Sebastian Amarie Date: Fri, 5 Apr 2019 11:44:01 +0300 Subject: [PATCH 1/4] ADD: disablePictureInPicture attribute for HTML5 videos --- packages/react-dom/src/shared/possibleStandardNames.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-dom/src/shared/possibleStandardNames.js b/packages/react-dom/src/shared/possibleStandardNames.js index ec7f6a6c58b8b..f7c67c8504f5d 100644 --- a/packages/react-dom/src/shared/possibleStandardNames.js +++ b/packages/react-dom/src/shared/possibleStandardNames.js @@ -54,6 +54,7 @@ const possibleStandardNames = { defer: 'defer', dir: 'dir', disabled: 'disabled', + disablePictureInPicture: 'disablepictureinpicture', download: 'download', draggable: 'draggable', enctype: 'encType', From 23ddcb64dd1993c1f8096f7ea87432c6f36e2ee8 Mon Sep 17 00:00:00 2001 From: Radu-Sebastian Amarie Date: Sat, 6 Apr 2019 10:23:38 +0300 Subject: [PATCH 2/4] ADD: disablePictureInPicture as DOMProperty and attribute --- fixtures/attribute-behavior/src/attributes.js | 5 +++++ packages/react-dom/src/shared/DOMProperty.js | 1 + 2 files changed, 6 insertions(+) diff --git a/fixtures/attribute-behavior/src/attributes.js b/fixtures/attribute-behavior/src/attributes.js index b0f25c10f4edb..7da51fe6dda67 100644 --- a/fixtures/attribute-behavior/src/attributes.js +++ b/fixtures/attribute-behavior/src/attributes.js @@ -448,6 +448,11 @@ const attributes = [ read: getSVGAttribute('direction'), }, {name: 'disabled', tagName: 'input'}, + { + name: 'disablePictureInPicture', + tagName: 'video', + read: getProperty('disablepictureinpicture') + }, { name: 'display', tagName: 'svg', diff --git a/packages/react-dom/src/shared/DOMProperty.js b/packages/react-dom/src/shared/DOMProperty.js index e770e0f722cc8..bdfa10e14aacf 100644 --- a/packages/react-dom/src/shared/DOMProperty.js +++ b/packages/react-dom/src/shared/DOMProperty.js @@ -294,6 +294,7 @@ const properties = {}; 'default', 'defer', 'disabled', + 'disablePictureInPicture', 'formNoValidate', 'hidden', 'loop', From 0e2568e12b4581794386d4ab07d917ce867e2fe0 Mon Sep 17 00:00:00 2001 From: Radu-Sebastian Amarie Date: Sat, 6 Apr 2019 10:51:57 +0300 Subject: [PATCH 3/4] Update: Replace camelCase with lowercase and vice-versa --- packages/react-dom/src/shared/possibleStandardNames.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-dom/src/shared/possibleStandardNames.js b/packages/react-dom/src/shared/possibleStandardNames.js index f7c67c8504f5d..80a17ba100c77 100644 --- a/packages/react-dom/src/shared/possibleStandardNames.js +++ b/packages/react-dom/src/shared/possibleStandardNames.js @@ -54,7 +54,7 @@ const possibleStandardNames = { defer: 'defer', dir: 'dir', disabled: 'disabled', - disablePictureInPicture: 'disablepictureinpicture', + disablepictureinpicture: 'disablePictureInPicture', download: 'download', draggable: 'draggable', enctype: 'encType', From 3c5c4bb8a714119d88ac4dc99f34b1ee5025abfa Mon Sep 17 00:00:00 2001 From: Radu-Sebastian Amarie Date: Sat, 6 Apr 2019 17:05:39 +0300 Subject: [PATCH 4/4] FIX: Missing comma on attribute (prettier) --- fixtures/attribute-behavior/src/attributes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fixtures/attribute-behavior/src/attributes.js b/fixtures/attribute-behavior/src/attributes.js index 7da51fe6dda67..12f4032c8f3db 100644 --- a/fixtures/attribute-behavior/src/attributes.js +++ b/fixtures/attribute-behavior/src/attributes.js @@ -451,7 +451,7 @@ const attributes = [ { name: 'disablePictureInPicture', tagName: 'video', - read: getProperty('disablepictureinpicture') + read: getProperty('disablepictureinpicture'), }, { name: 'display',