From 4472442708e2648a8f3352a9f1daaa9031002a83 Mon Sep 17 00:00:00 2001 From: Nathan Hunzaker Date: Thu, 28 Sep 2017 07:53:59 -0400 Subject: [PATCH] Remove allow transparency (#10823) * Remove allowTransparency attribute `allowtransparency` is an Internet Explorer-only attribute that controls the background transparency of an iFrame. When set to true, it respects the background color of the iFrame. When set to false, it sets the background color to that of the document. This feature was removed in IE9 - falling out of React's support commitment. Developers that have somehow figured out how to get IE8 to work with React 16.x can still use `allowtransparency="true"`, since React now supports unrecognized attributes. * Use correct attribute script location * Use new UMD bundles in attribute fixtures * Update attribute snapshot * Blank for CI --- .../AttributeTableSnapshot.md | 25 ------------------- fixtures/attribute-behavior/README.md | 2 +- fixtures/attribute-behavior/src/App.js | 6 ++--- fixtures/attribute-behavior/src/attributes.js | 6 ----- .../dom/shared/HTMLDOMPropertyConfig.js | 3 --- .../dom/shared/hooks/possibleStandardNames.js | 1 - 6 files changed, 4 insertions(+), 39 deletions(-) diff --git a/fixtures/attribute-behavior/AttributeTableSnapshot.md b/fixtures/attribute-behavior/AttributeTableSnapshot.md index 69e717a24aef..d9c792897daa 100644 --- a/fixtures/attribute-behavior/AttributeTableSnapshot.md +++ b/fixtures/attribute-behavior/AttributeTableSnapshot.md @@ -473,31 +473,6 @@ | `allowReorder=(null)`| (initial)| `` | | `allowReorder=(undefined)`| (initial)| `` | -## `allowTransparency` (on `` inside ``) -| Test Case | Flags | Result | -| --- | --- | --- | -| `allowTransparency=(string)`| (changed)| `"a string"` | -| `allowTransparency=(empty string)`| (changed)| `` | -| `allowTransparency=(array with string)`| (changed)| `"string"` | -| `allowTransparency=(empty array)`| (changed)| `` | -| `allowTransparency=(object)`| (changed)| `"result of toString()"` | -| `allowTransparency=(numeric string)`| (changed)| `"42"` | -| `allowTransparency=(-1)`| (changed)| `"-1"` | -| `allowTransparency=(0)`| (changed)| `"0"` | -| `allowTransparency=(integer)`| (changed)| `"1"` | -| `allowTransparency=(NaN)`| (changed, warning)| `"NaN"` | -| `allowTransparency=(float)`| (changed)| `"99.99"` | -| `allowTransparency=(true)`| (changed)| `"true"` | -| `allowTransparency=(false)`| (changed)| `"false"` | -| `allowTransparency=(string 'true')`| (changed)| `"true"` | -| `allowTransparency=(string 'false')`| (changed)| `"false"` | -| `allowTransparency=(string 'on')`| (changed)| `"on"` | -| `allowTransparency=(string 'off')`| (changed)| `"off"` | -| `allowTransparency=(symbol)`| (initial, warning, ssr error, ssr mismatch)| `` | -| `allowTransparency=(function)`| (initial, warning, ssr mismatch)| `` | -| `allowTransparency=(null)`| (initial)| `` | -| `allowTransparency=(undefined)`| (initial)| `` | - ## `alphabetic` (on `` inside ``) | Test Case | Flags | Result | | --- | --- | --- | diff --git a/fixtures/attribute-behavior/README.md b/fixtures/attribute-behavior/README.md index 5b6be37496ba..cae4bbba7503 100644 --- a/fixtures/attribute-behavior/README.md +++ b/fixtures/attribute-behavior/README.md @@ -8,7 +8,7 @@ ## Instructions -`cd scripts/attribute-behavior && yarn install && yarn start` +`cd fixtures/attribute-behavior && yarn install && yarn start` ## Interpretation diff --git a/fixtures/attribute-behavior/src/App.js b/fixtures/attribute-behavior/src/App.js index b10a57d272ad..c682b73aae67 100644 --- a/fixtures/attribute-behavior/src/App.js +++ b/fixtures/attribute-behavior/src/App.js @@ -753,9 +753,9 @@ class App extends React.Component { async componentDidMount() { const sources = { - ReactStable: 'https://unpkg.com/react@latest/dist/react.js', - ReactDOMStable: 'https://unpkg.com/react-dom@latest/dist/react-dom.js', - ReactDOMServerStable: 'https://unpkg.com/react-dom@latest/dist/react-dom-server.js', + ReactStable: 'https://unpkg.com/react@latest/umd/react.development.js', + ReactDOMStable: 'https://unpkg.com/react-dom@latest/umd/react-dom.development.js', + ReactDOMServerStable: 'https://unpkg.com/react-dom@latest/umd/react-dom-server.browser.development.js', ReactNext: '/react.development.js', ReactDOMNext: '/react-dom.development.js', ReactDOMServerNext: '/react-dom-server.browser.development.js', diff --git a/fixtures/attribute-behavior/src/attributes.js b/fixtures/attribute-behavior/src/attributes.js index 6e7462bc9a97..736b47afd01f 100644 --- a/fixtures/attribute-behavior/src/attributes.js +++ b/fixtures/attribute-behavior/src/attributes.js @@ -92,12 +92,6 @@ const attributes = [ tagName: 'switch', read: getSVGAttribute('allowReorder'), }, - { - name: 'allowTransparency', - containerTagName: 'svg', - tagName: 'path', - read: getSVGAttribute('allowtransparency'), - }, { name: 'alphabetic', containerTagName: 'svg', diff --git a/src/renderers/dom/shared/HTMLDOMPropertyConfig.js b/src/renderers/dom/shared/HTMLDOMPropertyConfig.js index 98b92fe6f689..6b99daf81ccc 100644 --- a/src/renderers/dom/shared/HTMLDOMPropertyConfig.js +++ b/src/renderers/dom/shared/HTMLDOMPropertyConfig.js @@ -26,9 +26,6 @@ var HTMLDOMPropertyConfig = { // name warnings. Properties: { allowFullScreen: HAS_BOOLEAN_VALUE, - // IE only true/false iFrame attribute - // https://msdn.microsoft.com/en-us/library/ms533072(v=vs.85).aspx - allowTransparency: HAS_STRING_BOOLEAN_VALUE, // specifies target context for links with `preload` type async: HAS_BOOLEAN_VALUE, // autoFocus is polyfilled/normalized by AutoFocusUtils diff --git a/src/renderers/dom/shared/hooks/possibleStandardNames.js b/src/renderers/dom/shared/hooks/possibleStandardNames.js index 3f1b7c620e76..236de2e0e9ae 100644 --- a/src/renderers/dom/shared/hooks/possibleStandardNames.js +++ b/src/renderers/dom/shared/hooks/possibleStandardNames.js @@ -18,7 +18,6 @@ var possibleStandardNames = { accesskey: 'accessKey', action: 'action', allowfullscreen: 'allowFullScreen', - allowtransparency: 'allowTransparency', alt: 'alt', as: 'as', async: 'async',