Commit Graph

1164 Commits

Author SHA1 Message Date
Pablo Lacerda de Miranda 792b84c94b fixes ReactDefaultPerf.getMeasurementsSummaryMap format style 2014-09-23 18:50:18 -07:00
Pablo Lacerda de Miranda 486c69b6de extracts getMeasurementsSummaryMap from ReactDefaultPerf.printWasted 2014-09-19 16:03:41 -07:00
Paul O’Shannessy 21f601964f Merge pull request #1301 from markijbema/patch-1
Only stop if the transition on this element ended
2014-09-12 17:00:05 -07:00
Paul O’Shannessy def41dfd8f Move onscroll warning test
This moves it to the appropriate place to accomodate the move of the check.
2014-09-11 15:15:19 -07:00
Andrew Rasmussen 7ae8909504 Move IE8 onscroll check
Rather than checking if document.onscroll exists in EventPluginHub
(which is agnostic of the DOM) do it in ReactDOMComponent
2014-09-10 13:33:23 -07:00
Paul O’Shannessy 99191046f9 Merge pull request #2113 from BinaryMuse/fix_numeric_properties
Fix DOMProperty bitmask checking
2014-09-09 15:26:38 -07:00
Paul O’Shannessy 5d88ebbecb Merge pull request #2144 from zertosh/master
Comment typo
2014-09-08 19:37:00 -07:00
Paul O’Shannessy 79ca0c7fd2 Merge pull request #1848 from fgnass/master
add picture element and related attributes
2014-09-08 16:23:39 -07:00
Paul O’Shannessy f3c64704ad Merge pull request #1988 from syranide/tacfix
Don't wrap values with ReactTextComponent in traverseAllChildren (cloneWithProps)
2014-09-08 15:36:26 -07:00
Isaac Salier-Hellendag 8c9a24983e Remove calls to Range.detach
This method is a no-op, as demonstrated by console warnings in Chrome and https://developer.mozilla.org/en-US/docs/Web/API/range.detach.

Remove callsites.

Fixes #2142
2014-09-08 14:30:53 -07:00
Andreas Svensson 45f8837e35 Don't wrap values with ReactTextComponent in traverseAllChildren 2014-09-08 22:35:25 +02:00
Andres Suarez 4c2f124aa8 Comment typo 2014-09-04 12:00:43 -04:00
Paul O’Shannessy 00fe66ddec Merge pull request #2106 from subtleGradient/subtleGradient/improve-ReactPerf-debugging
Improve debugging for methods using ReactPerf
2014-09-03 17:46:49 -07:00
Paul O’Shannessy 1854e8a912 Merge pull request #2033 from pekim/master
Add support for <dialog> tag.
2014-09-03 14:47:41 -07:00
Paul O’Shannessy f678591ad6 Merge pull request #2101 from jeffchan/patch-1
Fix typo in ReactDefaultPerfAnalysis comment
2014-09-02 11:57:45 -07:00
Brandon Tilley 0e28f5e6d7 Fix DOMProperty bitmask checking 2014-09-02 06:53:58 -07:00
Mike D Pilsbury ffa0447177 Add support for <dialog> tag's open attribute. 2014-08-31 12:43:32 +01:00
Sebastian Markbage 4af98990db Bumping version to help filtering. 2014-08-29 14:35:22 -07:00
Sebastian Markbage 63046277e4 Bumping version to help filtering. 2014-08-29 14:35:12 -07:00
Sebastian Markbage bad1b7c41a Start warning for JSX on plain functions
Let's also bump the version number for the log so that we can start filtering
out the other logs.
2014-08-29 14:35:07 -07:00
Sebastian Markbage 3c6c437d07 Don't transfer props to mocked empty component
We currently automatically render empty components in place of mocks. However,
we were accidentally transferring the props from the mocked descriptor to the
empty component placeholder. Even children.

This change just cleans that up and should only affect unit tests.
2014-08-29 14:35:01 -07:00
Sebastian Markbage f5a0d667a5 Add version to legacy factory monitoring 2014-08-29 14:34:58 -07:00
Miorel Palii 335e91df71 Fix console warning in LegacyImmutableObject
It does check `hasOwnProperty`, but *after* accessing the field and therefore triggering enumerable getters in modified prototypes.
2014-08-29 14:32:50 -07:00
Thomas Aylott 755cc9671f Combine displayName using underscore 2014-08-28 14:58:59 -04:00
Thomas Aylott a6116b31e5 Improve debugging for methods using ReactPerf 2014-08-28 13:49:51 -04:00
Jeff Chan ef9c9c81d0 Fix typo 2014-08-27 21:17:10 -07:00
Cheng Lou 74ff6fb6b8 Merge pull request #2039 from crm416/return-false
Deprecate 'return false' in event handlers
2014-08-27 13:33:40 -07:00
Cheng Lou 95de877dce Merge pull request #2036 from crm416/static-functions
Throw an error when functions on `statics` clash due to duplicate keys
2014-08-27 11:36:53 -07:00
Charles Marsh eb36b57079 Use warning module 2014-08-23 09:46:32 +08:00
Charles Marsh 979a93a70a Removed monitorCodeUse call 2014-08-22 13:09:38 +08:00
Felix Gnass 942d358ace use attribute for media, srcSet and sizes 2014-08-22 00:37:32 +02:00
Charles Marsh f01246d6bb Indentation for eventHandlerName 2014-08-21 09:13:35 +08:00
Cheng Lou 72e690ecfb Merge pull request #2037 from crm416/duplicate-key
More informative error message for mergeObjectsWithNoDuplicateKeys
2014-08-20 17:27:07 -07:00
Cheng Lou b8ab95aaa7 Merge pull request #2054 from chenglou/accum
[RFC] Use `accumulateInto` to save even more allocation
2014-08-20 13:36:45 -07:00
Cheng Lou 48e901f8ae [RFC] Use accumulateInto to save even more allocation
Trying to make the event a bit more performant for events.

Feel free to reject this because the API inevitably isn't great. It's good for perf though, and since we're only using `accumulate` in very restrained places, I think we're fine.

`accumulateInto` is `accumulate` that mutates more and allocates less. I kept `accumulate` in case we want that in the future.
2014-08-20 13:10:50 -07:00
Paul O’Shannessy 417678310c Update Object.assign polyfill
The spec changed to allow null & undefined sources without throwing.
Now our code depends on this new behavior. The only browser that
implements Object.assign has also updated its native implementation to
this behavior (Firefox Nightly).
2014-08-20 11:44:24 -07:00
Sebastian Markbage aae31ae24c ReactMount calls a legacy factory use createDescriptor instead
This fixes some log spew since this pattern is deprecated. This doesn't use
the validator in the descriptor creation so there's no prop type checks here.
I guess that's fine because we still have the second prop type checks.

We need to use ReactLegacyDescriptor because the constructor here will be a
legacy factory that we need to unwrap.

constructAndRenderComponent should be deprecated.
2014-08-20 00:15:43 -07:00
Sebastian Markbage 5c51f2fe46 Check if a function has a prototype first
Because somehow someone used a prototype less function with JSX.
2014-08-20 00:15:32 -07:00
Sebastian Markbage 68b7b82145 Start warning when calling a legacy factory
Let's start warning when a legacy factory is called as a plain function call.
2014-08-20 00:15:11 -07:00
Sebastian Markbage 989e6b618e Drop usage of plain functions to create descriptors
Replace plain function calls to legacy factories with createFactory or
createElement. For ReactDOMComponents the type should be replaced with
strings.

Because we don't have easy access to ReactLegacyDescriptor from within
React, we need to use the .type property to extract the real class.
This will go away later and is covered by unit tests.
2014-08-20 00:14:59 -07:00
Sebastian Markbage c901b1005e Make createDescriptor return a descriptor for components
This moves all logic around legacy descriptors to ReactLegacyDescriptor. This
is responsible for the layer that knows that createClass exports a legacy
factory. When passed one of these classes, it unwraps it to be a real class.

If it is passed a non legacy factory, it is assumed to be a non-react component
that needs to be invoked as a plain function.

The semantic change is that a descriptor is now always returned if passed a
legacy factory. Even if that factory is a mock. A mock would previously return
undefined.

For mocks, I treat the factory as the authoritative function. I call it to extract
the instance or fill it with an empty component placeholder.

Additionally, I make the classes take props as the first argument to the
constructor. This is what the new class system will do.

We currently need to set up some internals by calling the internal construct
method. Instead of doing that automatically in the constructor, I now move that
to a second pass so that mocks can get the plain props.

This means that we can assert that a mock has been called once it's mounted
with it's final props. Instead of the descriptor factory being called.
2014-08-20 00:14:32 -07:00
Paul O’Shannessy 182379305a Update vendored modules 2014-08-20 00:14:28 -07:00
Charles Marsh 0ecc7e5a7f Look on __reactBoundContext for displayName 2014-08-20 08:44:33 +08:00
Charles Marsh cf45a40bb8 More info in monitorCodeUse call 2014-08-18 22:57:02 -04:00
Josh Duck 5b4e2be867 Iterate over expectedFeatures correctly
This fails if Array.prototype is extended.
2014-08-18 18:18:05 -07:00
Cheng Lou a43d8c588b Fix bad merge from 04c9820694
Didn't sync out correctly.
2014-08-18 10:37:18 -07:00
Lee Byron 04c9820694 Merge pull request #1601 from gaearon/apply-component-and-mixin-spec-deterministically
Apply component and mixins specs deterministically
2014-08-15 18:08:03 -07:00
Charles Marsh 429650a750 Test for both true and false 2014-08-15 19:47:36 -04:00
Charles Marsh c5be746fda Fixed style and comment nits 2014-08-15 11:52:22 -04:00
Charles Marsh a195d3ea1f Re-add with warning and monitorCodeUse 2014-08-14 10:43:00 -04:00