react-dom 15.6.0 → 15.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -103,10 +103,6 @@ if (process.env.NODE_ENV !== 'production') {
103
103
  * @param {ReactDOMComponent} component
104
104
  */
105
105
  var warnValidStyle = function (name, value, component) {
106
- // Don't warn for CSS variables
107
- if (name.indexOf('--') === 0) {
108
- return;
109
- }
110
106
  var owner;
111
107
  if (component) {
112
108
  owner = component._currentElement._owner;
@@ -148,13 +144,16 @@ var CSSPropertyOperations = {
148
144
  if (!styles.hasOwnProperty(styleName)) {
149
145
  continue;
150
146
  }
147
+ var isCustomProperty = styleName.indexOf('--') === 0;
151
148
  var styleValue = styles[styleName];
152
149
  if (process.env.NODE_ENV !== 'production') {
153
- warnValidStyle(styleName, styleValue, component);
150
+ if (!isCustomProperty) {
151
+ warnValidStyle(styleName, styleValue, component);
152
+ }
154
153
  }
155
154
  if (styleValue != null) {
156
155
  serialized += processStyleName(styleName) + ':';
157
- serialized += dangerousStyleValue(styleName, styleValue, component) + ';';
156
+ serialized += dangerousStyleValue(styleName, styleValue, component, isCustomProperty) + ';';
158
157
  }
159
158
  }
160
159
  return serialized || null;
@@ -182,14 +181,17 @@ var CSSPropertyOperations = {
182
181
  if (!styles.hasOwnProperty(styleName)) {
183
182
  continue;
184
183
  }
184
+ var isCustomProperty = styleName.indexOf('--') === 0;
185
185
  if (process.env.NODE_ENV !== 'production') {
186
- warnValidStyle(styleName, styles[styleName], component);
186
+ if (!isCustomProperty) {
187
+ warnValidStyle(styleName, styles[styleName], component);
188
+ }
187
189
  }
188
- var styleValue = dangerousStyleValue(styleName, styles[styleName], component);
190
+ var styleValue = dangerousStyleValue(styleName, styles[styleName], component, isCustomProperty);
189
191
  if (styleName === 'float' || styleName === 'cssFloat') {
190
192
  styleName = styleFloatAccessor;
191
193
  }
192
- if (styleName.indexOf('--') === 0) {
194
+ if (isCustomProperty) {
193
195
  style.setProperty(styleName, styleValue);
194
196
  } else if (styleValue) {
195
197
  style[styleName] = styleValue;
@@ -10,4 +10,4 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- module.exports = '15.6.0';
13
+ module.exports = '15.6.1';
@@ -26,7 +26,7 @@ var styleWarnings = {};
26
26
  * @param {ReactDOMComponent} component
27
27
  * @return {string} Normalized style value with dimensions applied.
28
28
  */
29
- function dangerousStyleValue(name, value, component) {
29
+ function dangerousStyleValue(name, value, component, isCustomProperty) {
30
30
  // Note that we've removed escapeTextForBrowser() calls here since the
31
31
  // whole string will be escaped when the attribute is injected into
32
32
  // the markup. If you provide unsafe user data here they can inject
@@ -43,7 +43,7 @@ function dangerousStyleValue(name, value, component) {
43
43
  }
44
44
 
45
45
  var isNonNumeric = isNaN(value);
46
- if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
46
+ if (isCustomProperty || isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
47
47
  return '' + value; // cast to string
48
48
  }
49
49
 
@@ -56,10 +56,11 @@ var inputValueTracking = {
56
56
 
57
57
  var currentValue = '' + node[valueField];
58
58
 
59
- // if someone has already defined a value bail and don't track value
60
- // will cause over reporting of changes, but it's better then a hard failure
61
- // (needed for certain tests that spyOn input values)
62
- if (node.hasOwnProperty(valueField)) {
59
+ // if someone has already defined a value or Safari, then bail
60
+ // and don't track value will cause over reporting of changes,
61
+ // but it's better then a hard failure
62
+ // (needed for certain tests that spyOn input values and Safari)
63
+ if (node.hasOwnProperty(valueField) || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
63
64
  return;
64
65
  }
65
66
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-dom",
3
- "version": "15.6.0",
3
+ "version": "15.6.1",
4
4
  "description": "React package for working with the DOM.",
5
5
  "main": "index.js",
6
6
  "repository": "facebook/react",
@@ -16,10 +16,10 @@
16
16
  "fbjs": "^0.8.9",
17
17
  "loose-envify": "^1.1.0",
18
18
  "object-assign": "^4.1.0",
19
- "prop-types": "~15.5.7"
19
+ "prop-types": "^15.5.10"
20
20
  },
21
21
  "peerDependencies": {
22
- "react": "^15.6.0-rc.1"
22
+ "react": "^15.6.1"
23
23
  },
24
24
  "files": [
25
25
  "LICENSE",