Commit Graph

2387 Commits

Author SHA1 Message Date
Toru Kobayashi be0551d01e Release syntheticEvent.target on the destructor 2016-01-14 15:09:56 +09:00
Paul O’Shannessy 26f53de4a6 Fixup style for long lines 2016-01-11 17:27:37 -08:00
Michael McDermott f2b62e9d90 Warn when both value and defaultValue or both check and defaultChecked props are specified on input, textarea, or select elements 2016-01-11 18:09:37 -05:00
Paul O’Shannessy 708e1b3f03 Sort attrs in HTMLDOMPropertyConfig 2016-01-08 17:23:25 -08:00
Miles Johnson f4c5b2c00b Updated ReactCompositeComponent to trigger componentWillReceiveProps when either props or context change. Fixes issue #5756 2016-01-06 15:49:47 -08:00
jim 4e3d38ed27 Removed note explaining why the logic is there, since the justification is now different. 2016-01-05 15:30:00 -08:00
Ben Alpert eb00290673 Remove now-unused prepareToManageChildren
This was a temporary hook needed for the DOM implementation. We no longer need it because we now necessarily load every node into cache (via calling getNativeNode on it) before manipulating any of its siblings.
2016-01-05 15:08:42 -08:00
Ben Alpert 27926572f6 Move nodes around by reference instead of by index
This makes things easier if we ever want to use more than one DOM node for a component. Notably, this is more convenient if we want to remove the wrappers around text components (since text nodes can be split and joined however a browser feels like) or if we want to support returning more than one element from render (#2127).

I left the old indexes so that implementations aren't forced to use the node/image if they prefer indices, because I'm not sure yet whether the changes corresponding to my rewrite of DOMChildrenOperations are easy or hard yet in React Native. (The tests pass with and without the DOMChildrenOperations changes here.)
2016-01-05 15:08:42 -08:00
Ben Alpert 0ebc7b60e1 Revert "Merge pull request #5689 from jimfb/cleanup-5151"
This reverts commit 067547c1d1, reversing
changes made to 102cd29189.
2016-01-05 15:08:15 -08:00
Jim 067547c1d1 Merge pull request #5689 from jimfb/cleanup-5151
Get rid of getNativeNode()
2016-01-05 14:42:05 -08:00
Rick Beerendonk bef45b0b1a Year-agnostic copyright message, like React Native uses, to prevent the need for yearly changes. 2015-12-29 20:20:32 +01:00
Michael Ziwisky a0d6a98cbf Remove extraneous comment
This little guy should have been removed in https://github.com/facebook/react/commit/6bd6ef208b302879eb38018d4192a054f40c1c8b
2015-12-28 19:28:41 -06:00
Dan Abramov 98a7100930 Use JSX in the new tests 2015-12-25 13:50:10 +00:00
Dan Abramov f27e3aa750 Move the specific else if clause up 2015-12-25 13:48:13 +00:00
Dan Abramov 251d6c30b5 Move SVG attribute deprecation warnings into a devtool
In #5590 a new system was introduced for tracking dev-time warnings.
This commit uses it for reporting SVG attribute deprecation warnings.
2015-12-24 17:50:46 +00:00
Dan Abramov 232a47ad04 Pass SVG attributes through
All attributes defined on SVG elements will now be passed directly regardless of the whitelist. The casing specified by user will be preserved, and setAttribute() will be used.

In the future we will remove support for the camel case aliases to the hyphenated attributes. For example, we currently map `strokeWidth` to `stroke-width` but this is now deprecated behind a warning. When we remove support for this we can remove some of the code paths introduced in this commit.

The purpose of this change is to stop maintaining a separate SVG property config. The config still exists for two purposes:

* Allow a migration path for deprecated camelcased versions of hyphenated SVG attributes
* Track special namespaced attributes (they still require a whitelist)

However it is no longer a blocker for using new non-namespaced SVG attributes, and users don't have to ask us to add them to the whitelist.

Fixes #1657
2015-12-24 17:18:33 +00:00
Jim 82fe64a456 Merge pull request #5590 from jimfb/use-devtool-for-unknown-property-warning
Use devtool for unknown property warning
2015-12-23 19:02:58 -08:00
Ben Alpert 432578ef03 Add another test for #5729 2015-12-23 16:25:35 -08:00
Ben Alpert 07c0bc6166 Set input .type before .value always
In IE11 (and below), if you run

```
var input = document.createElement('input');
input.value = 'wat';
input.type = 'radio';
console.log(input.value);
```

you get the string "on" logged. Because that makes sense.

So we set the type first.
2015-12-23 15:44:33 -08:00
James Wen 6ff96441da Clarify React class constructor comments
- The constructor is not always overridden by mocks. Makes viewing this constructor during debugging less confusing.
2015-12-23 12:58:18 -05:00
Ben Alpert bae0f19543 Merge pull request #5308 from spicyj/rep
Import ResponderEventPlugin changes from RN
2015-12-22 15:53:11 -08:00
Ben Alpert bb11639e25 Import ResponderEventPlugin changes from RN 2015-12-22 15:45:51 -08:00
Moshe Kolodny 7c0189fbad improved react-addons-update tests 2015-12-20 22:01:54 -05:00
Ben Alpert 5563771ace Merge pull request #5694 from spicyj/div-html-nesting
Make sure div > html nesting is considered invalid
2015-12-18 12:53:27 -08:00
Ben Alpert 40d5692980 Make sure div > html nesting is considered invalid
See #5128.
2015-12-18 12:49:54 -08:00
Paul O’Shannessy 7a1d87bd33 A couple small style fixups that were missed in recent PRs 2015-12-18 11:27:49 -08:00
jim 8eabf84204 Get rid of getNativeNode() 2015-12-17 19:04:27 -08:00
jim 26f3785a8c Use duck typing instead of allocating event objects 2015-12-16 19:32:55 -08:00
Ben Alpert 963b3cacab Merge pull request #5346 from prometheansacrifice/warn-immutable-props
Warns when mutated props are passed.
2015-12-16 16:09:33 -08:00
Jim c9c3c339b7 Merge pull request #5216 from nLight/number-in-data-attrs-2329
Allow numbers after `data-` in custom attributes fixes #2329
2015-12-16 15:37:41 -08:00
Jim 3afced6a75 Error boundaries. 2015-12-16 12:15:26 -08:00
Oliver Zeigermann 20e5a95fe3 fixed docs on ReactElement that were out of sync with code 2015-12-16 11:26:32 +01:00
jpersson 13080f99ba Rephrase comment to better describe use of warning() 2015-12-14 23:27:37 -05:00
Jim 30ef056731 Moved unknown-prop warning into a devtool 2015-12-14 16:29:04 -08:00
Jim a55ab282fa Initial outline for new devtools api 2015-12-14 16:29:02 -08:00
Ben Alpert 33217f0fb9 Merge pull request #4888 from spicyj/ssr-no-queue
Don't build up mount-ready queue for server side rendering
2015-12-14 14:46:04 -08:00
Ben Alpert 3997164418 Merge pull request #5550 from spicyj/cc-speed
Make createClass 10-15% faster on complex specs
2015-12-14 14:45:44 -08:00
Freddy Rangel db37deb17c Autocorrect and autocapitalize should not be property
Fixes facebook/react#5436
2015-12-13 23:37:29 -08:00
Justas Brazauskas 0886273438 Fix few typos in React docs and comments 2015-12-13 16:39:07 +02:00
Ben Alpert 4f7a2766e4 Merge pull request #5640 from spicyj/no-typechecks
Remove @typechecks
2015-12-10 11:30:40 -08:00
Ben Alpert 46f5251c66 Remove @typechecks
These don't really do anything.

```
codemod.py -d src --extensions js -m '\s* \* @typechecks.*?\n' '\n'
```

with "yes to all".
2015-12-10 11:26:45 -08:00
Jim be964561ed Merge pull request #5610 from yangshun/change-devtools-message
Change devtools install message on file: URLs
2015-12-10 08:55:57 -08:00
Tay Yang Shun 3deca65a89 Change devtools install message on file: URLs 2015-12-11 00:48:53 +08:00
Mark Rushakoff 86b44349de Avoid negative lookahead in regular expression
I'm trying to use React with otto
(https://github.com/robertkrimen/otto), which is implemented in Go and
does not support lookaheads or backreferences in regular expressions.
(Unfortunately that *does* mean that otto isn't fully compatible with
the ECMA5 spec; but since this is the only lookahead I am aware of in
the React codebase, this change makes React once again compatible with
otto, and any other JS implementation that may not be fully compliant on
regular expressions).

As far as I can tell, the previous code replaced a sequence of slash
characters with one more slash than before. The new code avoids the
negative lookahead by matching any sequence of slash characters and then
using the special `$&` placeholder to replace the matched sequence with
the original sequence, plus one more slash.
2015-12-06 13:46:16 -08:00
Taeho Kim 14725ba768 Clean up caller sites of instantiateReactComponent
The 2nd argument was removed since #4139.
2015-12-06 17:31:30 +09:00
Paul O’Shannessy 67663ba2c9 Merge pull request #5603 from henryw4k/patch-3
chore(ReactComponentWithPureRenderMixin.js): made "Mixin" lowercase
2015-12-04 13:08:58 -08:00
Henry Wong 4a971c2d1c chore(ReactComponentWithPureRenderMixin.js): made "Mixin" lowercase
When referring to mixin, the rest of the comment is in lowercase; see line 36 and line 37. 
This change helps with the consistency of the usage of "mixin", and not to confuse it with a variable name.
2015-12-04 11:12:07 -08:00
Remko Tronçon 7d699f4063 Fix single select incorrectly updating
Closes #5592
2015-12-04 11:21:02 +01:00
Jim 50c7b1792c Merge pull request #5570 from jimfb/remove-setprops-replaceprops
Remove setProps and replaceProps.
2015-12-02 19:09:19 -08:00
Scott Feeney 8557cc0d67 Merge pull request #5561 from graue/setstate-cwm
shallow render: fix setState in componentWillMount
2015-12-01 19:49:15 -08:00