Commit Graph

538 Commits

Author SHA1 Message Date
Ben Alpert dea7efbe16 Merge pull request #3555 from spicyj/native-overrides
Import ResponderEventPlugin from react-native
2015-04-02 14:13:35 -07:00
凌恒 6094ebbc39 update comment 2015-04-01 23:59:43 +08:00
凌恒 54a74d95bb deal IE8 out of size error 2015-04-01 23:56:05 +08:00
凌恒 d4adaee4eb use ie8 feature detect instead of try catch 2015-04-01 21:46:40 +08:00
凌恒 e1a8d69840 fix render order error in safari 2015-04-01 18:13:03 +08:00
Ben Alpert 036d342189 Fix unused variable lint from #3552 2015-03-31 17:06:42 -07:00
Ben Alpert 6ec3b65169 Import ResponderEventPlugin from react-native
This is a direct import of the files from react-native, with the license headers updated.
2015-03-31 15:21:47 -07:00
Paul O’Shannessy 94a3b0f8a3 Merge pull request #3552 from James-Dunn/fix-for-loops
Remove caching from for loops
2015-03-31 10:30:44 -07:00
James 90dcc1ffb7 Remove caching from for loops
Removed caching from for loops as it does not seem to increase
performance and makes the code harder to read.
2015-03-31 10:22:52 +04:00
Paul O’Shannessy 18d608820e Merge pull request #3519 from jonchester/patch-1
Add IE-specific 'unselectable' attribute
2015-03-30 15:27:13 -07:00
jonchester a0265fe8b7 Add IE-specific 'unselectable' attribute
I ended up needing to add this attribute to work around a common IE bug, that clicking on a scrollbar gives focus to the scroll container. I needed to set it as MUST_USE_ATTRIBUTE or the attribute would not be passed through by React successfully.

remove trailing spaces
2015-03-30 07:44:08 -07:00
Ben Alpert 7c6694987d Tweak validation message, add html support
The old message made no sense if you had a > div > a or similar. I'm clearly feeling sloppy today.
2015-03-25 17:24:13 -07:00
Ben Alpert 07b7e8424d Remove stray console.log comment 2015-03-25 17:06:42 -07:00
Ben Alpert 76bb96ef21 Validate only against problematic tag nesting
Turns out lots of people write invalid HTML all the time and no one, including your browser or React, cares. Most invalid HTML combinations don't cause magic reparented nodes; only some do. The HTML5 parsing spec (https://html.spec.whatwg.org/multipage/syntax.html) specifies which tag combinations cause strange parsing behavior. I did my best to encode the logic here. It's more lenient than before in some cases, but more strict in others (before we didn't look at the whole stack of tags; now we warn with deeply nested `p` or `form` or `a` tags).
2015-03-25 16:43:41 -07:00
Paul O’Shannessy 27a191e704 Merge pull request #3513 from agelter/master
Added support for the 'low', 'high', and 'optimum' attributes that are missing from the <meter> tag.
2015-03-25 12:17:07 -07:00
Aaron Gelter c9e82ce0f6 Added support for the 'low', 'high', and 'optimum' attributes that the <meter> tag requires. 2015-03-25 11:33:02 -06:00
Damien Pellier 3d45c0ad9d add scoped property to the list of DOM standard properties 2015-03-25 09:41:05 +01:00
Paul O’Shannessy 09ecf8bca9 Merge pull request #3499 from sverrejoh/patch-1
Don't add 'px' to strokeDashoffset CSS Properties
2015-03-24 13:57:02 -07:00
Sverre Johansen 77abea5ddc Reordered properties to maintain ABC order 2015-03-24 20:43:55 +00:00
Ben Alpert 6ad4afd404 Merge pull request #3502 from spicyj/tests
Fix tests after merge of #3440
2015-03-24 13:41:34 -07:00
Paul O’Shannessy 2795fb162a Merge pull request #3490 from chenglou/remove-class-addon
Remove classSet/cx
2015-03-24 13:39:47 -07:00
Ben Alpert 4dde417214 Fix tests after merge
Test Plan: jest
2015-03-24 13:37:39 -07:00
Ben Alpert 9260b540ad Merge pull request #3467 from spicyj/valid-3
Validate node nesting, take 3
2015-03-24 13:30:16 -07:00
Ben Alpert 1aa4e3c234 Merge pull request #3440 from spicyj/console-error
Use console.error to show stack trace in console
2015-03-24 13:30:01 -07:00
Sverre Johansen c28059e39b Don't add 'px' to strokeDashoffset CSS Properties
This is a SVG CSS Property. The standard expects values or percentages, and adding "px" to the value will break it.

http://www.w3.org/TR/SVG/painting.html#StrokeDashoffsetProperty
2015-03-24 17:52:02 +00:00
Cheng Lou 18ab88aa78 Remove classSet/cx 2015-03-23 17:59:27 -04:00
Ben Alpert f9abf493b4 Validate node nesting, take 3
Nicer version of #644 and #735. Fixes #101. Context is neat.
2015-03-20 16:10:02 -07:00
Mert Kahyaoğlu 63aa7259b9 move getReactRootElementInContainer to ReactMount.js
getReactRootElementInContainer.js file contains one function used only
in ReactMount.js.
2015-03-20 20:50:11 +02:00
Mert Kahyaoğlu 0c1eca7dfc fix doc comments and typos 2015-03-20 18:21:29 +02:00
Ben Alpert 7fe5a3aadd Merge pull request #3442 from spicyj/kill-initializeTouchEvents
Kill React.initializeTouchEvents for good
2015-03-19 14:15:26 -07:00
Ben Alpert a321247ee5 More lint fixes 2015-03-17 14:17:03 -07:00
Ben Alpert 26664315a6 Merge pull request #3438 from spicyj/lint
Lint fixes
2015-03-17 14:14:57 -07:00
Ben Alpert 9c4c2f58ea Kill React.initializeTouchEvents for good
Now that #1169 is fixed, the only thing this is used for is to determine whether `onTouchTap` causes touch listeners to be added. The only internal uses of TapEventPlugin are where touch events are already initialized (so this doesn't make a difference) and we don't support `onTouchTap` as part of the public API so this should be safe.
2015-03-17 14:12:26 -07:00
cpojer fb23276178 Add warning for getDOMNode calls. 2015-03-17 14:08:04 -07:00
Ben Alpert e791fccf58 Use console.error to show stack trace in console
Better version of #3277.

Test Plan: jest, grunt test
2015-03-17 13:39:04 -07:00
Ben Alpert c34fa7f3d2 Lint fixes 2015-03-17 13:30:15 -07:00
Jim 12059299f3 Added webcomponents.js and a simple unit test verifying a document fragment as a valid React container. 2015-03-16 16:37:05 -07:00
Jim 73f4dc59d8 Merge pull request #3169 from jsfb/mount-into-shadowdom
Allow rendering into document fragments. Fixes #840
2015-03-16 16:15:03 -07:00
Paul O’Shannessy 99cbaed836 Ensure FullPageComponents are treated as DOM components
We currently override a couple DOM components. We need to ensure everything we
override is still treated as a DOM component, even if it has a composite
component wrapper.
2015-03-16 15:18:39 -07:00
Austin Wright 29416f422e Appease eslint 2015-03-14 14:08:18 -07:00
Austin Wright b52bb22342 Move list of newline-eating tags to variable 2015-03-14 13:57:15 -07:00
Austin Wright 030a7b34c7 Add back \n-to-be-eaten for the plain-text elements
The comment hack to enable polyglot HTML isn't cross-browser, or simply doesn't work.
2015-03-14 13:53:12 -07:00
Austin Wright 8e714f9898 Update tests to use Polyglot profile of HTML 2015-03-14 13:53:12 -07:00
Austin Wright e913e85e1a Use a Polyglot HTML-safe method of escaping leading newline in rawtext elements 2015-03-14 13:53:12 -07:00
Austin Wright 8bc828aa7c Generate XML-compatible tags and boolean attributes 2015-03-14 13:53:12 -07:00
Paul O’Shannessy 68a2f89cc6 Merge pull request #3402 from vkramskikh/fix-empty-selects-with-value
Fix for empty <select> elements with value
2015-03-13 18:04:57 -07:00
Robert Knight ee86942d77 Fix incorrect update of style when props.style transitions from null to non-null
ReactDOMComponent maintains a copy of the previous style
object to support in-place mutations of props.style.

This cached object was not cleared when the style
property was removed in a props update.

Fixes #3409
2015-03-13 22:16:19 +00:00
Vitaly Kramskikh 2f52d81865 Fix for empty <select> elements with value
There is an exception when value or defaultValue is set but there are no
children as ReactDOMSelect tries to mark the first children as selected
even if there are no children.
2015-03-13 21:48:02 +07:00
Sebastian Markbåge ca8d7cba1b Merge pull request #3355 from cpojer/shallowCompare
Add shallowCompare module and use it in PureRenderMixin + tests
2015-03-12 17:45:22 -07:00
cpojer 413e96d0cd Add some important getDOMNode tests back. 2015-03-10 17:27:19 -07:00