Commit Graph

1493 Commits

Author SHA1 Message Date
Emil Sjolander 45fdcdc93a YGNodeChildCount -> YGNodeGetChildCount for consistency
Reviewed By: gkassabli

Differential Revision: D4333480

fbshipit-source-id: 17058f18fa9e26b3e02f7a1651f7295cae59acad
2016-12-16 04:44:18 -08:00
Janic Duplessis 46f3ff68b6 Move headers to project section to fix archive
Summary:
Follow up to fix some issues with 59407f3660. Headers needed to be in the `project` section instead of `private` in xcode so they don't get included in the archive.

cc javache
Closes https://github.com/facebook/react-native/pull/11395

Differential Revision: D4313048

Pulled By: javache

fbshipit-source-id: 805dbbe9f149acfe780be76e99c949c450272358
2016-12-12 08:58:29 -08:00
Alexey Lang 66c5305fa8 Fix JSGlobalContext leak
Reviewed By: javache

Differential Revision: D4299616

fbshipit-source-id: f30e88fbdd08422f1d0ae3c10b8a9af13d637135
2016-12-12 05:43:34 -08:00
Stepan Hruda 1642b38abe Make React Profiler asm position independent
Reviewed By: compnerd

Differential Revision: D4297098

fbshipit-source-id: 567f640f2d1ed4187e53356e7ca2d066f1412f9d
2016-12-08 14:58:26 -08:00
Theo Yaung 4a6f2ec44a Fail-Fast on Redundant Callback Invokes
Reviewed By: javache

Differential Revision: D4295268

fbshipit-source-id: 1258ffbc02bcf7d7199348c7df8fcd744bb9963f
2016-12-08 13:43:38 -08:00
Adam Ernst cfb8b19126 Expose more of RCTWebSocketObserver
Reviewed By: javache

Differential Revision: D4297162

fbshipit-source-id: 97032ccf3dc6bd259ca0fa2883eff45c0c49347f
2016-12-08 07:44:38 -08:00
Adam Ernst 587606987f Rename and merge files for RCTWebSocketObserver protocol
Summary: No need to have two files; merge it into one and give it an appropriate name.

Reviewed By: javache

Differential Revision: D4296716

fbshipit-source-id: 904d13c23bb8d403b8efcb60f9a4aa5df5b08972
2016-12-08 07:44:37 -08:00
Adam Ernst 2b0c4591e2 Rename RCTWebSocketManager file to reflect its new contents
Reviewed By: javache

Differential Revision: D4296615

fbshipit-source-id: a48da3f0550398cb59478c7405fe971f9246910f
2016-12-08 07:44:37 -08:00
Adam Ernst d0c3e98d1d Eliminate RCTWebSocketManager
Summary: This singleton was unnecessary and can be implemented with a single `static` in `RCTDevMenu`. In another diff, I will rename `RCTWebSocketManager.{h,m}` to reflect the only class that remains.

Reviewed By: javache

Differential Revision: D4296551

fbshipit-source-id: 653971dfb31de5b0a161b531eed82a067f536ce3
2016-12-08 07:44:37 -08:00
Adam Ernst 2ca6138852 Start exposing RCTWebSocketObserver using a protocol
Reviewed By: javache

Differential Revision: D4296387

fbshipit-source-id: 33f92c36168dcb18356d0ccdaf902a84634d94b7
2016-12-08 07:44:37 -08:00
Adam Ernst ac489858f8 Clean up RCTWebSocketProxyDelegate a bit
Reviewed By: javache

Differential Revision: D4296294

fbshipit-source-id: b31e522c21ec490fdf98711655e5e8df22b32a12
2016-12-08 07:44:37 -08:00
Pieter De Baets 286095292f Fix RN tvOS build
Reviewed By: mkonicek

Differential Revision: D4298869

fbshipit-source-id: fd132b2c1b656707b2dc750888c09e262b503111
2016-12-08 04:13:36 -08:00
Adam Ernst 617eb309a1 Refactor reload command in React Native
Summary: Introduces an API to register a weakly-held listener for the reload (Cmd+R) command. This allows external infrastructure to hook into the reload command before the `RCTBridge` object is even created.

Reviewed By: javache

Differential Revision: D4286980

fbshipit-source-id: 51012fb8cbeb433dc880d9d98d847b07fdbb4c4f
2016-12-07 20:13:22 -08:00
Pieter De Baets 286a1b2e5e Remove deprecated RCTReloadNotification
Reviewed By: adamjernst

Differential Revision: D4294180

fbshipit-source-id: 6837597df2a798661c993c6f63ec430989954de6
2016-12-07 16:28:33 -08:00
Pieter De Baets 59407f3660 Redo exported headers and include paths for opensource
Summary:
Xcode really sucks, per some discussion on e1577df1fd and https://developer.apple.com/library/content/technotes/tn2215/_index.html, if you use the headers phase, and mark headers in your static library as public, they will actually end up in the final package that's built and you can't submit to the app store! This changes our xcode setup to use a copy files phase instead.

I've also changed the header include path to be $(BUILT_PRODUCTS_DIR)/include, which is added to the include path by Xcode by default, so 3rd party libraries should not be impacted by these changes anymore.

Reviewed By: mkonicek

Differential Revision: D4291607

fbshipit-source-id: 969b9ebcbeb8161f85427f8c429e198d9d0fae30
2016-12-07 15:28:29 -08:00
Emil Sjolander 7f8c2985a8 Rename directories
Reviewed By: gkassabli

Differential Revision: D4284681

fbshipit-source-id: f0c6855c2c6e4389b7867f48f72cbb697830fc5a
2016-12-07 05:14:12 -08:00
Pieter De Baets 27acb71353 Fix target configuration in React.xcodeproj
Summary: The target config inside React.xcodeproj was messed up, with source files being included in multiple or wrong targets. I went over the files in React.xcodeproj and verified that each .m file was included only once and was in the right target and .h were in the right projects.

Reviewed By: majak

Differential Revision: D4284673

fbshipit-source-id: 99af61083c6ca81311e30f0ea0045d4e7bffc20c
2016-12-06 06:28:33 -08:00
Jake Dawkins 6234a5dfa2 Fix iOS Picker Item Colors
Summary:
I want to resolve #11170 by passing the `color` prop from `PickerIOS.Item` to its implementation.

In `RCTPicker.m`, the label.textColor was already being set and used, but there was nothing referencing the past prop. I passed the prop to the implementation, checked if it exists, and if not, set the default color, like before.

I visually tested the **Colorful Pickers** example in UIExplorer. Those picker `Item`s pass in a `color` prop.

![dec-01-2016 22-07-46](https://cloud.githubusercontent.com/assets/9259509/20821696/ae45d704-b812-11e6-9720-0045d6c0bcd4.gif)

The basic picker does not pass the color prop to the picker `Item`, and there are no errors. Basic functionality is still in tact:

![dec-01-2016 22-09-35](https://cloud.githubusercontent.com/assets/9259509/20821730/ee544f74-b812-11e6-9294-a1b45e78d9f7.gif)
Closes https://github.com/facebook/react-native/pull/11260

Differential Revision: D4272370

fbshipit-source-id: 5fa33c40526dda59ca2ab527c31351bcd27e5cf3
2016-12-03 18:58:29 -08:00
Emil Sjolander 85ac5fc354 Rename C api
Differential Revision: D4259190

fbshipit-source-id: 26c8b356ca464d4304f5f9dc4192bff10cea2dc9
2016-12-03 04:44:10 -08:00
Emil Sjolander 779508c0ba Rename enums
Differential Revision: D4244360

fbshipit-source-id: c9fcbdd231098c9ff230a6055676bbc7cbd11001
2016-12-02 05:58:45 -08:00
Emil Sjolander 8117a029cb Fix error from refactor of setMeasuredDimensionsIfEmptyOrFixedSize
Reviewed By: gkassabli

Differential Revision: D4258254

fbshipit-source-id: e22e36e67260114081e483527fc7ce378f7f0df9
2016-12-01 07:28:30 -08:00
Vojta Bartos abf1438f54 fixing shake to open Dev Menu only work once
Summary:
Fixing issues https://github.com/facebook/react-native/issues/10588

This bug has been introduced during refactoring UIActionSheet to UIAlertController d368ebfab2 (diff-f78a84ff95f2bcee5a70d3accb504528)

**Test plan**

- shake to open DevMenu, choose random menu item, it should close DevMenu and after another shaking it should open again
Closes https://github.com/facebook/react-native/pull/10676

Differential Revision: D4168254

Pulled By: javache

fbshipit-source-id: 6e2935b765053a2b55809af357d2b6ea03e04e8b
2016-11-29 13:43:31 -08:00
Sokovikov 837814240b unselectedItemTintColor property available since iOS10
Summary:
**motivation:**

make possible to use new tab bar property.

![1475603157804](https://cloud.githubusercontent.com/assets/1488195/19085757/8b7cc8a4-8a7c-11e6-82c7-7c76313fb545.jpg)

It is not working for previous versions but not failing.
https://developer.apple.com/reference/uikit/uitabbar/1648949-unselecteditemtintcolor
Closes https://github.com/facebook/react-native/pull/10241

Differential Revision: D4168046

Pulled By: mmmulani

fbshipit-source-id: aa0c9b36cbdbc50a9a60bbbc658355c3066ba1a5
2016-11-29 12:28:55 -08:00
Sokovikov a50bafa678 badgeColor property
Summary:
**motivation:**

make possible to use new tab bar item property

![1476033023249](https://cloud.githubusercontent.com/assets/1488195/19222245/f4c1292c-8e64-11e6-8a29-7b95b45e153c.jpg)
Closes https://github.com/facebook/react-native/pull/10315

Differential Revision: D4000011

Pulled By: mmmulani

fbshipit-source-id: 5c00b0b5f56c551cc4151fcc030da6c8bc1a3649
2016-11-29 11:43:31 -08:00
Pieter De Baets 2f01cbd026 Remove duplicate copy of CSSLayout
Reviewed By: astreet

Differential Revision: D4231769

fbshipit-source-id: e5b6fec5788659c8f4fc6302bef8a8a8464faea5
2016-11-28 05:13:31 -08:00
Indragie Karunaratne b4dbf2b477 Read bytecode format version from custom JSC executor only if custom JSC is enabled
Reviewed By: javache

Differential Revision: D4230129

fbshipit-source-id: d28e475d3a55320285a45f54b7ea495229be364d
2016-11-27 11:43:30 -08:00
Pieter De Baets 439092742a Fix imports in UIExplorerUnitTests
Reviewed By: bestander

Differential Revision: D4231271

fbshipit-source-id: 84f903f6b14256ed1958ad1800f128133590a3dc
2016-11-24 09:58:31 -08:00
rcaferati fc23784fe7 Fix LayoutAnimation delete scaleXY animation
Summary:
This fix the issue https://github.com/facebook/react-native/issues/11066.

It's more a workaround but it fixes the scaling down animation on component unmount using LayoutAnimation.

![scale_test](https://cloud.githubusercontent.com/assets/8358797/20537196/16f7ff24-b0e4-11e6-8870-6525466017f2.gif)
Closes https://github.com/facebook/react-native/pull/11073

Differential Revision: D4226704

fbshipit-source-id: 64c7663411cc5e703c3ae8a6d3d4de0f0bcf6c96
2016-11-23 11:58:29 -08:00
Pieter De Baets f2a46b17d4 Replace RCTJSCWrapper with JSCWrapper from ReactCommon
Reviewed By: mhorowitz

Differential Revision: D4204516

fbshipit-source-id: 6bcb122daf2848035dfae404ee7a2e9aca0f8087
2016-11-23 11:43:48 -08:00
Pieter De Baets e1577df1fd Move all header imports to "<React/..>"
Summary:
To make React Native play nicely with our internal build infrastructure we need to properly namespace all of our header includes.

Where previously you could do `#import "RCTBridge.h"`, you must now write this as `#import <React/RCTBridge.h>`. If your xcode project still has a custom header include path, both variants will likely continue to work, but for new projects, we're defaulting the header include path to `$(BUILT_PRODUCTS_DIR)/usr/local/include`, where the React and CSSLayout targets will copy a subset of headers too. To make Xcode copy headers phase work properly, you may need to add React as an explicit dependency to your app's scheme and disable "parallelize build".

Reviewed By: mmmulani

Differential Revision: D4213120

fbshipit-source-id: 84a32a4b250c27699e6795f43584f13d594a9a82
2016-11-23 07:58:39 -08:00
Emil Sjolander 5850165795 Add support for aspectRatio style prop
Summary:
Expose aspectRatio style prop from css-layout to React Native.

This means the following will now work:

    <View style={{backgroundColor: 'blue', aspectRatio: 1}}/>

Reviewed By: javache

Differential Revision: D4226472

fbshipit-source-id: c8709a7c0abbf77089a4e867879b42dcd9116f65
2016-11-23 07:43:28 -08:00
David Aurelio 5db7484e8d Move `ScriptTag` and `RCTJSModulesUnbundle` to `cxxreact`
Reviewed By: javache

Differential Revision: D4213662

fbshipit-source-id: fc2ec9717c24fe77bb022a48777049f88173ebeb
2016-11-23 06:43:50 -08:00
Janic Duplessis b49e7afe47 Dispatch native handled events to JS
Summary:
When native events where handled they were not sent to JS as an optimization but this caused some issues. One of the major one is touches are not handled properly inside a ScrollView with an Animated.event because it doesn't receive scroll events so it can't cancel the touch if the user scrolled.
Closes https://github.com/facebook/react-native/pull/10981

Differential Revision: D4226403

Pulled By: astreet

fbshipit-source-id: 41278d3ed4b684af142d9e273b11b974eb679879
2016-11-23 05:43:35 -08:00
Emil Sjolander dad520476e Fixup recent fix to flex basis and put it behind an experimental flag
Reviewed By: gkassabli

Differential Revision: D4222910

fbshipit-source-id: d693482441fcc4d37a288e2e3529057a04f60541
2016-11-23 05:28:48 -08:00
Pieter De Baets 41810008b7 Inject custom JSC wrapper from FBReactModule
Reviewed By: bnham

Differential Revision: D4197674

fbshipit-source-id: b195ff1dc850981be36ecb3080b131d03df85a4a
2016-11-23 03:58:41 -08:00
Pieter De Baets cb3e575deb Allow bridge delegate to specify whether to use custom JSC wrapper
Reviewed By: mhorowitz

Differential Revision: D4197657

fbshipit-source-id: 09e050f802b41c9a7016456c25381018b2123553
2016-11-23 03:58:41 -08:00
king6cong 3ba3b39fdc fix typo
Summary: Closes https://github.com/facebook/react-native/pull/11067

Differential Revision: D4220269

Pulled By: mkonicek

fbshipit-source-id: 7fa70d5f15211215396375711be1583a8877ef5e
2016-11-22 08:58:28 -08:00
Lukas Woehrl 1c69b61c26 Added feature to use rounded values
Summary:
Added an experimental feature to allow to use only rounded values. See #184. It's not a perfect solution and definitely  can be further improved. I'm looking forward to your ideas.
Closes https://github.com/facebook/css-layout/pull/256

Reviewed By: splhack

Differential Revision: D4214168

Pulled By: emilsjolander

fbshipit-source-id: 6293352d479b7b4dad258eb3f9e0afaa11cf7236
2016-11-22 05:43:26 -08:00
Emil Sjolander 6526548b50 Move measure code for known dimensions out of main layout function
Reviewed By: gkassabli

Differential Revision: D4213339

fbshipit-source-id: 5ca35ca307594f3419fd0dee81321d3c2e06710f
2016-11-21 11:13:40 -08:00
Emil Sjolander 85d0dab9bf Move measure code for empty containers out of main layout function
Reviewed By: gkassabli

Differential Revision: D4213313

fbshipit-source-id: 2061a809202f7f948bff1b3ee8dc4c230692a223
2016-11-21 11:13:40 -08:00
Emil Sjolander cf796248ec Move custom measure code out of main layout function
Reviewed By: gkassabli

Differential Revision: D4213302

fbshipit-source-id: df4bc43848325e99ad338a2fa6d5c9404315b0e6
2016-11-21 11:13:39 -08:00
Emil Sjolander e1df3c8782 Add aspectRatio style property
Reviewed By: gkassabli

Differential Revision: D4211458

fbshipit-source-id: f8d0d318369c7b529ee29e61a52b17d0cf3b396d
2016-11-21 10:13:34 -08:00
Pieter De Baets 7c91f894ba Fix CSSLayout import hack, update podspec
Summary: Correct header import paths, update podspec so we point at the copy in ReactCommon (and can eventually remove the copy under React)

Reviewed By: astreet

Differential Revision: D4204501

fbshipit-source-id: e979a010092f025b2cdc289e1e5f22fc7b65a8d1
2016-11-21 09:13:36 -08:00
Emil Sjolander 15f848e8d8 Only skip updating computed flex basis within the same generation
Reviewed By: dshahidehpour

Differential Revision: D4207106

fbshipit-source-id: fc1063ca79ecf75f6101aadded53bca96cb0585d
2016-11-20 05:13:28 -08:00
Don Yu 1835dbea7b Add in support for showing annotation callouts by default without the user clicking on the pins
Reviewed By: mmmulani

Differential Revision: D4209555

fbshipit-source-id: 38c2459f9bec0dd2279cf673bcb22aef15748347
2016-11-20 00:58:28 -08:00
Adam Comella eddc2c90f6 iOS: Add getContentSizeMultiplier & event
Summary:
Corresponding Android PR: https://github.com/facebook/react-native/pull/11008

This gives apps the ability to find out the current scaling factor for fonts on the device. An event was also added so that apps can find out when this value changes.

**Test plan (required)**

Verified that the getter and the event work properly in a test app. Also, this change is used in my team's app.

Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/11010

Differential Revision: D4207620

Pulled By: ericvicenti

fbshipit-source-id: b3f6f4a412557ba97e1f5fb63446c7ff9a2ff753
2016-11-18 17:28:31 -08:00
Martin Kralik a78ee4323b reverted view clipping changes
Summary: Reveting the recent view clipping changes, since it doesn't work well with modals and the fix is not super simple.

Reviewed By: mmmulani

Differential Revision: D4204490

fbshipit-source-id: 510f2b04c604b3f3a223dc4accb424b030876fbe
2016-11-18 14:43:31 -08:00
Grace Ku cac64f98a9 Remove unused variable in RCTExceptionsManager
Reviewed By: javache

Differential Revision: D4205553

fbshipit-source-id: f481bcca57f75356b6b2c6e1ec488313de64ab93
2016-11-18 14:13:27 -08:00
Pieter De Baets bcac6e7d39 Cleanup RCTSourceCode
Reviewed By: mmmulani

Differential Revision: D4124428

fbshipit-source-id: 0db5bfd5897c37c11374fe90516ac7aeb2ae5d53
2016-11-18 05:13:31 -08:00
Lukas Wöhrl 687ae48cc7 use fmaxf to prevent casting from and to double
Summary:
Use ```fmaxf``` to prevent double casting.
Closes https://github.com/facebook/css-layout/pull/251

Reviewed By: emilsjolander

Differential Revision: D4199342

Pulled By: splhack

fbshipit-source-id: c04bc68a3c9c97b92e910e885457cf2fe00da28b
2016-11-17 20:43:44 -08:00
Lukas Wöhrl ee285876d2 Change more method arguments to const
Summary:
Change more method arguments to ```const```
Closes https://github.com/facebook/css-layout/pull/252

Reviewed By: emilsjolander

Differential Revision: D4199335

Pulled By: splhack

fbshipit-source-id: f54fccaea8051a49c6cdf0fcaf1a68c025ba26da
2016-11-17 20:43:44 -08:00
Lukas Wöhrl fb4d9f204a do not redefine isnan if already defined via math.h
Summary:
```isnan``` is already defined in ```math.h``` (at least when using VS13) so there is no need to redefine it. it also is a nan for float and not for double opposed to ```_isnan```
Closes https://github.com/facebook/css-layout/pull/253

Reviewed By: emilsjolander

Differential Revision: D4199331

Pulled By: splhack

fbshipit-source-id: 139fb0efd68dd5df79bbaef863a8e8b9246c795d
2016-11-17 20:43:44 -08:00
Lukas Wöhrl 1430458906 use size_t instead of unsigned long
Summary:
Use ```size_t```instead of ```unsinged long``` as this is the "offical" return type of ```strlen```. Is VS13 ```size_t``` is defined as ```unsigned long long``` which leads to a compiler warning.
Closes https://github.com/facebook/css-layout/pull/254

Reviewed By: emilsjolander

Differential Revision: D4199327

Pulled By: splhack

fbshipit-source-id: 5e1a91f282bf776e4d9f5806e6467dfe36c7a633
2016-11-17 20:43:43 -08:00
Kazuki Sakamoto 39a59caac1 Introduce CSSNodeCopyStyle
Reviewed By: emilsjolander

Differential Revision: D4188514

fbshipit-source-id: af8d7fb5e8688c64aea05ce7ad23fff9233fb441
2016-11-17 09:13:31 -08:00
Kazuki Sakamoto c5f6e864f9 Workaround fix for Visual Studio
Reviewed By: emilsjolander

Differential Revision: D4191268

fbshipit-source-id: 53fdcc388292e76c2b97ad071f0d7c27d0613ecf
2016-11-17 08:58:55 -08:00
Kazuki Sakamoto 0d0f44439c Fix memory func test
Reviewed By: emilsjolander

Differential Revision: D4193712

fbshipit-source-id: a4aba84d054d98a7baf438e213a90bd7ef34e979
2016-11-17 07:43:27 -08:00
Pieter De Baets c3448236da Include RCTSamplingProfiler in React-tvOS
Reviewed By: ericvicenti

Differential Revision: D4190591

fbshipit-source-id: f8c81c644ba801c27d4c9776b1e8ccaf22df6822
2016-11-16 11:58:33 -08:00
Dan Caspi 42d14bef04 Enforcing semi-colon consistency between dev and release modes when calling RCTLog*
Summary:
The various RCTLog macros (`RCTLogWarn`, `RCTLogError`, etc..) are based on the `_RCTLog` macro, which, in its expanded form, has a semi-colon in DEV mode (i.e., when `RCTLOG_ENABLED` is set to 1), and doesn't have one when `RCTLOG_ENABLED` is set to 0.
This could lead to a situation where code will compile in DEV but will fail to compile for prod.
Fixing this by removing the semicolon from the DEV version (as should).

Reviewed By: javache

Differential Revision: D4189133

fbshipit-source-id: 54cb4e2c96d1e48d9df88464aa58b13af432c2bd
2016-11-16 07:28:32 -08:00
Dan Caspi 3b4ac79583 Exposing RCTDevMenuItem when not in DEV mode and adding a missing header
Reviewed By: javache

Differential Revision: D4189179

fbshipit-source-id: c9ad45b20bab884e5d0fcd17efc494fc37ab7d92
2016-11-16 07:28:32 -08:00
Andy Street ca69ea435a Update objc build to use CSSLayout in ReactCommon
Summary: Updates objc version to use the same CSSLayout files as the android version

Reviewed By: emilsjolander

Differential Revision: D4182821

fbshipit-source-id: 81f18184b539fe0ef76ea868bc067b8283c2cccb
2016-11-16 04:43:27 -08:00
Kazuki Sakamoto e864c40be8 Introduce CSSLayoutSetMemoryFuncs
Reviewed By: emilsjolander

Differential Revision: D4178386

fbshipit-source-id: a79dbdaf82a512f42cc43f99dbc49faba296903b
2016-11-15 20:28:30 -08:00
Martin Kralik 26e373c903 fix view clipping to operate on ui hierachy
Summary:
There was a bug in the view clipping logic.
Clipping works on uiview hierarchy, but I've been using `reactSuperview` to get clipping rect for my parent.
This is incorrect in a case where these two hierarchies don't match and there are some views between a view and its `reactSuperview`.

So we should really use normal `superview`. A minor complication is that `superview` is `nil` if we are clipped.
We could remember what our last `superview` was, but that's extra data we have to manage. Instead I use one clever trick to avoid doing so.
(Let me know if it makes sense based on my inline documentation.)

Reviewed By: mmmulani

Differential Revision: D4182647

fbshipit-source-id: 779cbcec0bd08eb270c3727c9c5cb9c080c4a2a4
2016-11-15 17:13:48 -08:00
Dan Caspi b123cc279e Another fix
Reviewed By: benhiller

Differential Revision: D4185166

fbshipit-source-id: 940dbfbd65c94455979c7e88375784a5c68647a5
2016-11-15 14:58:36 -08:00
Dan Caspi 851aed262d Fixing a missing colon
Reviewed By: javache

Differential Revision: D4183368

fbshipit-source-id: b7a8bdfa40bf13d3fd5caae8a0985492f1e8b901
2016-11-15 11:17:49 -08:00
Dan Caspi 9fc6204efc Add support for JSC's sampling profiler on iOS for RN
Reviewed By: javache

Differential Revision: D4107919

fbshipit-source-id: ecfe2cacdb78b857e461f7006b29e4d1fe1a1862
2016-11-15 09:29:06 -08:00
Emil Sjolander ffcdf25281 Autogenerate enum defenitions for all languages
Reviewed By: gkassabli

Differential Revision: D4174263

fbshipit-source-id: 478961a8f683e196704d3c6ea1505a05c85fcb10
2016-11-15 08:44:30 -08:00
Andy Street 3b20a39f7b Move ReactCommon/CSSLayout to ReactCommon/CSSLayout/CSSLayout
Reviewed By: emilsjolander

Differential Revision: D4182345

fbshipit-source-id: 05cb4f0b0e7971d4f66e656ea89d876264a61bd4
2016-11-15 06:28:45 -08:00
Martin Konicek 7991d1206b Revert import from D4133936 (13aba8)
Summary:
This broke the open source build: http://imgur.com/a/1Btd1

javache tells me reverting this line should fix it.

Reviewed By: javache, ericvicenti

Differential Revision: D4178951

fbshipit-source-id: c680de6b3b48bf137294dfe053afaff7b0613caf
2016-11-14 16:28:55 -08:00
Pieter De Baets 6fe977d5cc Fix missing reference to RCTLog
Reviewed By: bestander

Differential Revision: D4176714

fbshipit-source-id: 92c7ef86c9c51b828fb564606bc5de16bfe4f54f
2016-11-14 14:14:06 -08:00
Fred Liu 1f125e3d41 Revert D4157971: [csslayout] BREAKING - Fix sizing of container with child overflowing parent
Differential Revision: D4157971

fbshipit-source-id: be055cf018fd39b3cee9af0bc777831fcf757190
2016-11-14 12:28:40 -08:00
Indragie Karunaratne 13aba82a2b Add more functions to RCTJSCWrapper + make it a public header
Reviewed By: javache

Differential Revision: D4133936

fbshipit-source-id: 04951965099598f7058cb0005267712c276582b9
2016-11-14 09:13:40 -08:00
Ashok Menon e7c85cea36 Bytecode Exposure Logging
Reviewed By: javache

Differential Revision: D4160438

fbshipit-source-id: 3554ec68da5fcae8baef8bb49c76b75a7e45c55f
2016-11-14 07:58:31 -08:00
Andy Street 07ef5a8fe9 Build C-version of CSSLayout in open source
Summary: Builds and ships libcsslayout.so with Android builds. This is not used yet, but a follow up diff will shortly move us from CSSNodeDEPRECATED to CSSNode (which uses libcsslayout)

Reviewed By: emilsjolander

Differential Revision: D4168140

fbshipit-source-id: d72bded88df81e4d54df31a08e4b101834770a73
2016-11-14 06:13:48 -08:00
Pieter De Baets 33deaad196 Cleanup display of C++ stack frames in redbox
Reviewed By: mmmulani

Differential Revision: D4159921

fbshipit-source-id: 1924a701db4af30800064a648dfa5c0d5906de19
2016-11-14 04:59:13 -08:00
Emil Sjolander 307871e854 Implement standard interface for toggling experimental features
Reviewed By: gkassabli

Differential Revision: D4174260

fbshipit-source-id: ad3667183810c02833fba9a1276f89286e848fcd
2016-11-14 03:28:39 -08:00
Emil Sjolander a2cafb062e rename CSSWrapType to shorter CSSWrap matching java and csharp
Reviewed By: gkassabli

Differential Revision: D4174257

fbshipit-source-id: ba0bfab996ba158b07863d8c72cf2a41262c9592
2016-11-14 03:28:38 -08:00
Emil Sjolander e2e3a27571 BREAKING - Fix sizing of container with child overflowing parent
Reviewed By: gkassabli

Differential Revision: D4157971

fbshipit-source-id: 3cfae15ac8b65b70f01789444099ee684e1b099a
2016-11-14 02:13:51 -08:00
Emil Sjolander bd1f22c4bd Fix flex within max size if max size is not constraint to
Reviewed By: gkassabli

Differential Revision: D4162104

fbshipit-source-id: 08feba6cb4e789c9aa12179e2cdeadc66b011841
2016-11-11 08:13:34 -08:00
Martin Kralik d5e067f244 don't clip if ui and react view hierarchies are different
Reviewed By: mmmulani

Differential Revision: D4088498

fbshipit-source-id: ec08e4e68d327fc770c944c274bb9f367daba6d2
2016-11-11 05:29:31 -08:00
Martin Kralik 625c8cb83c new `removeClippedSubviews` implementation (take 2 - recursive)
Reviewed By: mmmulani

Differential Revision: D4081700

fbshipit-source-id: d4079138dc070565e475831e82651c9b2d5b8d59
2016-11-11 05:29:30 -08:00
Martin Kralik a3ad34c34f remove outdated code in RCTNavigator
Reviewed By: mmmulani

Differential Revision: D4095285

fbshipit-source-id: 1e2111b6647e14562675e4474cd56acb91d22ec2
2016-11-11 05:29:30 -08:00
Martin Kralik 47839307f3 proper `reactSuperview` implementation
Summary:
React view hierarchy doesn't have to always match uiview hierarchy. Plus if we clip view we loose knowledge about view's react superview if we just use `self.superview` as react superview.
This diff fixes it by storing a strong ref to reactSuperview in an associated object.

This is needed for new view clipping implementation (see the dependent diff).

Reviewed By: mmmulani

Differential Revision: D4081844

fbshipit-source-id: 9317d9db46fbd474382c5469b7922f88e5ee7568
2016-11-11 05:29:30 -08:00
Ashok Menon 58aa9afaed BC Kill-switch
Reviewed By: javache

Differential Revision: D4159923

fbshipit-source-id: 9814c76d04f7230fda7693efac3f6623cc882ccf
2016-11-11 05:29:30 -08:00
Ashok Menon 8288bc2006 BC Soft Errors
Reviewed By: javache

Differential Revision: D4131340

fbshipit-source-id: b0827fc99d94985fbbb2a1b03ddc4d6feab10bff
2016-11-11 05:29:25 -08:00
Emil Sjolander 454c33884a Revert D4133643: [react-native] Fix incorrect pixel-rounding in RCTShadowView.
Differential Revision: D4133643

fbshipit-source-id: bb17e0c84ba9d85c5d03129c602d1d432ee0aa56
2016-11-10 15:13:43 -08:00
Pieter De Baets 5aad13b691 Remove useless store in CSSLayout.c
Reviewed By: emilsjolander

Differential Revision: D4159938

fbshipit-source-id: 8b9ff3896c0e222e8e89546881129214bc6ba566
2016-11-10 08:58:41 -08:00
Kazuki Sakamoto 1d9d8e93fb Remove CSSAssertSetFailFunc
Reviewed By: emilsjolander

Differential Revision: D4155452

fbshipit-source-id: 5a19c79a212f204d13064527fd6e5843bab76e6b
2016-11-09 17:28:38 -08:00
Emil Sjolander 744965800f Absolute positioned items should apear inside padding but outside border
Reviewed By: gkassabli

Differential Revision: D4153332

fbshipit-source-id: 251e29e02018a433f60349b78c03feb121512797
2016-11-09 11:59:37 -08:00
Emil Sjolander a4a02f6b57 Dont measure single flex grow+shrink child
Reviewed By: gkassabli

Differential Revision: D4153133

fbshipit-source-id: 2333150a83857cc30078cc8d52761cbd00652830
2016-11-09 11:29:02 -08:00
Andy Street a731a23d91 Update logging to support levels, print messages in Android logcat on assertion failures
Summary: The goal of this diff is to have assertion failures show up as error logs on Android. To do this, I updated the logging API to take calls with log levels. We now have to pass around va_list unfortunately since you can't re-expand or pass along var-args to a subcall.

Reviewed By: emilsjolander

Differential Revision: D4140898

fbshipit-source-id: e0eb9a1f0b08a7d90a8233f66bb857d5b871b6ad
2016-11-09 09:58:59 -08:00
Dustin Shahidehpour 39798ae368 Allow MeasureFunc to be set to NULL no matter how many children a node has.
Reviewed By: emilsjolander

Differential Revision: D4148727

fbshipit-source-id: 79a0f3ef1bf7b1dce9a14de96f870e35c042b78b
2016-11-09 08:43:32 -08:00
Jing Chen 653e8d9b9a Reverted commit D4147298
Reviewed By: gkassabli

Differential Revision: D4147298

fbshipit-source-id: 8416508a31e8d317bf59d956abdbe5760b55bb6d
2016-11-09 00:14:02 -08:00
Emil Sjolander 4500e4d0ff Dont measure single flex grow+shrink child
Reviewed By: gkassabli

Differential Revision: D4147298

fbshipit-source-id: 51152e57eff8e322a833a6d698c30f8c5e2dcc35
2016-11-08 15:28:42 -08:00
Emil Sjolander 72d11912f4 Fix flex within max width constraint
Reviewed By: gkassabli

Differential Revision: D4147199

fbshipit-source-id: feb335eb8687a1b7939ee8cd8649e455e0c069a9
2016-11-08 09:59:03 -08:00
Ashok Menon 3ee5e97bcd Removing redundant `if`.
Reviewed By: javache

Differential Revision: D4139894

fbshipit-source-id: 457f6b2b0b448af1dd75faa1c1b350e36d7a3133
2016-11-08 09:13:43 -08:00
Emil Sjolander 81e4139edc Remove isTextNode optimization
Reviewed By: astreet

Differential Revision: D4146785

fbshipit-source-id: e20d780fbd5759b8f38b809e8cadf29cedee82a8
2016-11-08 09:13:43 -08:00
Dan Caspi 47d9cb4dac Setting runtime options for JSC on iOS
Reviewed By: michalgr

Differential Revision: D4104084

fbshipit-source-id: 517f833343948c59e5f77cede8a60574ca1e40c0
2016-11-08 08:43:38 -08:00
Roger Chapman c1458e0181 If no match return at least the first font in the family.
Summary:
Solves issue #7632 where fonts with only a single font weight/type would not render.

Example of a built-in font that would not render is `Zapfino` and other custom fonts like `Impact` would not render.
Closes https://github.com/facebook/react-native/pull/10572

Differential Revision: D4143335

Pulled By: hramos

fbshipit-source-id: 2f64aad2fb5ddc7aae2ca7a5362a89b45e550e13
2016-11-07 17:14:02 -08:00
Aleksei Androsov 3eeaffce1a RefreshControl doesn't render when initial refreshing state is true
Summary:
Example (index.ios.js):

```
'use strict';

import React from 'react';
import {ListView, RefreshControl, Text, View} from 'react-native';

class BugExample extends React.Component {

    render() {
        return (
            <ListView
                style={{backgroundColor: 'red'}}
                contentContainerStyle={{backgroundColor: 'green'}}
                refreshControl={
                    <RefreshControl
                        refreshing={true}
                        onRefresh={() => {}}
                    />
                }
                dataSource={
                    new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2}).cloneWithRows(['a', 'b', 'c'])
                }
                renderRow={(item) => {
                    return (
                        <View>
                            <Text>{item}</Text>
                        </View>
                    );
                }}
            />
        );
    }
}
```

RN version: 0.34, 0.35-rc
iOS version (emulator): 9.
Closes https://github.com/facebook/react-native/pull/10321

Differential Revision: D4142774

Pulled By: mmmulani

fbshipit-source-id: 743b865a6e1c1fb09c7cfc48631ad383bd593f89
2016-11-07 15:58:43 -08:00
Dustin Shahidehpour 4d35f65eb7 Fix incorrect pixel-rounding in RCTShadowView.
Reviewed By: emilsjolander

Differential Revision: D4133643

fbshipit-source-id: 28a4408ba8da797138b9e100fa1555ddb0856ceb
2016-11-07 15:58:43 -08:00
安秋亮 7839a9fd60 Add inline definition for Microsoft Visual Studio
Summary:
The inline keyword is available only in C++. The __inline and __forceinline keywords are available in both C and C++. For compatibility with previous versions, _inline is a synonym for __inline.

https://msdn.microsoft.com/en-us/library/z8y1yy88(v=vs.120).aspx
Closes https://github.com/facebook/css-layout/pull/239

Reviewed By: astreet

Differential Revision: D4138941

Pulled By: emilsjolander

fbshipit-source-id: cb59dc91ef285e5378036c4912217fd4ec8d9f79
2016-11-07 12:58:33 -08:00
Geordie a4bb4d25f5 Only retain the previousViews that need to be validated
Summary:
Fixes #4740, where views would unnecessarily be retained after performing `navigator.pop()` - this was particularly problematic for big lists and memory-intensive custom views.

This fix causes no functional change: `_previousViews` are only used in the loop starting at line 564 to ensure that the JavaScript and Native navigation stacks are equivalent at all times. As we do in this fix, that loop limits itself to only the views expected to be on the React navigation stack. So overall this change makes the code logically 'more correct'.

Tested by checking that `_previousViews.count` is always equivalent to `previousReactCount` in the loop (which means we could remove the complex `MIN(... MIN(previousReactCount, _previousViews.count)` in the loop too, but I wanted to keep the diff as small as possible for now).
Closes https://github.com/facebook/react-native/pull/10789

Differential Revision: D4140502

Pulled By: ericvicenti

fbshipit-source-id: 4491ad3c16642914c3081295cf95c4cf36be9f94
2016-11-07 10:28:48 -08:00
Andy Street 96a581f6c2 Assert that node can have measure function <==> node is a leaf node
Summary: Instead of silently ignorning non-leaf nodes with measure functions, we should assert that we don't create those kinds of trees.

Reviewed By: emilsjolander

Differential Revision: D4130770

fbshipit-source-id: a3ef10a2e63bbc12b5aa07977e4b84c8d59e3ffe
2016-11-07 05:28:52 -08:00
Dustin Shahidehpour 07fb9040d9 Only mark Nodes dirty if an actual node is removed.
Reviewed By: gkassabli

Differential Revision: D4125453

fbshipit-source-id: 745cfc55269415fea106a80c72401eb3074f2d31
2016-11-03 13:43:57 -07:00
Ashok Menon 227f1b0ea8 Decoupling initialisation and synchronous execution.
Reviewed By: javache

Differential Revision: D4117471

fbshipit-source-id: b00de532c99f041ebba8b9d74972a36827a1a3f4
2016-11-03 10:58:43 -07:00
Georgiy Kassabli e7dc71ba84 Exposing layout cache check publicly
Reviewed By: emilsjolander

Differential Revision: D4124705

fbshipit-source-id: 23284967900585fa20dcb51c9cc1bee829b32975
2016-11-03 10:43:53 -07:00
Pieter De Baets 761e06bf02 Don't receive touches in RCTRootView
Reviewed By: mmmulani, majak

Differential Revision: D4104319

fbshipit-source-id: 70731b72e087710ccbc32024a596583640b94d04
2016-11-03 09:58:48 -07:00
Dan Caspi 8287e3e83f Added a way to handle functions that are not supported by the system JSC
Reviewed By: javache

Differential Revision: D4110660

fbshipit-source-id: 27c99cae96b57f70ddc1d310c6d5343d7c3c8892
2016-11-02 09:43:58 -07:00
Pieter De Baets 95cb4ea752 Fix UIView borderWidths not rendering correctly
Reviewed By: majak

Differential Revision: D4111231

fbshipit-source-id: f02c8f2ebda4c3e397d746ed5433afea539c9a88
2016-11-01 11:13:53 -07:00
Ashok Menon 1a75ba3c67 Expose BC version
Reviewed By: javache

Differential Revision: D4110361

fbshipit-source-id: 6cde7d8ca26d30a804f1a99cf9380dcbc0ff5541
2016-11-01 10:28:55 -07:00
Ashok Menon ace32e650c Refactoring JSC Wrapper
Reviewed By: javache

Differential Revision: D4110360

fbshipit-source-id: 5a8bda7cf005dc340ad18a559f8bf0da8d4075d1
2016-11-01 10:28:55 -07:00
Ashok Menon 16290851aa Recognise and run BC bundles
Reviewed By: javache

Differential Revision: D4067425

fbshipit-source-id: fade9adebfa8a59dc49aeadfd01a782f7b686082
2016-11-01 10:28:55 -07:00
James Ide fc11a5fde8 Add support for native animated events on iOS
Summary:
This adds native support for `Animated.event` on iOS.

**Test plan**
Tested in the native animated UIExplorer example that it works properly like on Android.
Closes https://github.com/facebook/react-native/pull/9598

Differential Revision: D4110331

fbshipit-source-id: 15748d23d0f475f2bcd1040ca3dca33e2620f058
2016-11-01 03:58:53 -07:00
Dustin Shahidehpour bb84c37dce Prevent crash when accessing child count, but child list is NULL.
Reviewed By: emilsjolander

Differential Revision: D4104093

fbshipit-source-id: cd7b09818759aa76415b97e241f1a6746a2bc50c
2016-10-31 12:44:09 -07:00
Emil Sjolander df7d61bbbb Some small simplifications for function return values
Reviewed By: gkassabli

Differential Revision: D4101772

fbshipit-source-id: 626df10c0fc76278c330c86be4dc82fdda5f5156
2016-10-31 11:13:39 -07:00
Emil Sjolander d0f8e7f35c void* -> CSSNodeRef in CSSNodeList
Reviewed By: gkassabli

Differential Revision: D4101773

fbshipit-source-id: 8a5c9066da796967bd02ce6b1fc74ff40e15dfe1
2016-10-31 11:13:39 -07:00
Pieter De Baets 7063ff466a Modules export constants if any superclass exports them (2nd try)
Reviewed By: fkgozali

Differential Revision: D4098128

fbshipit-source-id: 73d7f068373b3a9dd5af1881b4cca4e54856cec6
2016-10-31 04:58:50 -07:00
Mehdi Mulani a96b4ab5a0 Warn when height/width is set in style without correct flex
Reviewed By: emilsjolander, yungsters

Differential Revision: D4095399

fbshipit-source-id: 6246e47a39ebbc60835bc1ce5e9fb78c6630a851
2016-10-28 12:13:37 -07:00
Kevin Gozali cea7c6edf2 Reverted commit D4081915
Reviewed By: fkgozali

Differential Revision: D4081915

fbshipit-source-id: 7fa750becc12b40861f30d86411388180fec2d59
2016-10-27 17:28:40 -07:00
Pieter De Baets 285786ad30 Correctly generate viewConfig for shadow properties
Reviewed By: fkgozali

Differential Revision: D4090109

fbshipit-source-id: 6aa24ae95ddcbdabdc5d1da8ab817960bde960a4
2016-10-27 12:43:52 -07:00
Emil Sjolander 8e69a9f695 BREAKING - Make first parameter of measure and print functions CSSNodeRef instead of just context
Reviewed By: javache

Differential Revision: D4081544

fbshipit-source-id: d49679025cea027cf7b8482898de0a01fe0f9d40
2016-10-27 10:58:42 -07:00
Mehdi Mulani 97153d68cf Guard against bad values set in RCTCustomScrollView
Summary:
UIScrollView's internal logic with scroll indicator dies when bad values (e.g. NaN/Infinity) are set on the position/size.
We already guard UIManager with these checks but the RCTScrollView's underlying scrollview (RCTCustomScrollView) can get these set from other places, and we're seeing crashes in this area.

Reviewed By: javache

Differential Revision: D4088601

fbshipit-source-id: b1185cc7c65ba0266787441169264c94338fc55c
2016-10-27 09:28:32 -07:00
Pieter De Baets aa4428cd13 Remove customDirectEventTypes
Summary: This method has been deprecated for a while and there are no internal use-cases left (customBubblingEventTypes is still used by RCTViewManager though).

Reviewed By: fkgozali

Differential Revision: D4083327

fbshipit-source-id: 261e0dce3b41714d13b46d146f87fc415eb9e817
2016-10-27 06:58:52 -07:00
Pieter De Baets 19ab84ffb7 Cleanup and simplify view config generation
Reviewed By: fkgozali

Differential Revision: D4083308

fbshipit-source-id: 42ca797a8faede68bd031e84cf1c33a3e3ade37f
2016-10-27 06:58:52 -07:00
Pieter De Baets af3f656d97 Modules export constants if any superclass exports them
Reviewed By: fkgozali

Differential Revision: D4081915

fbshipit-source-id: 3a99033cd156c1393f7c8bbbb45f43772eb3a8df
2016-10-27 04:29:01 -07:00
Pieter De Baets 8bc30af6c8 Fix some warnings in React.xcodeproj
Reviewed By: majak

Differential Revision: D4081860

fbshipit-source-id: 4b503df3c4e8b6e06b04613919a4a3405bf01171
2016-10-27 04:29:01 -07:00
Pieter De Baets 384ea330c8 Move Platform constants to RCTPlatform
Reviewed By: majak

Differential Revision: D4081849

fbshipit-source-id: bee08af2f68dcc1af424f382f960ff897ba11945
2016-10-27 04:29:00 -07:00
Pieter De Baets 82911a8204 s/CGFloat/float in RCTShadowView
Reviewed By: emilsjolander

Differential Revision: D4081788

fbshipit-source-id: 91da6af0fff1317ff4661572e8e7c1cc5594f810
2016-10-26 13:13:47 -07:00
Pieter De Baets 4ea359a4f3 Remove getter for RCTShadowView flex
Reviewed By: emilsjolander

Differential Revision: D4081779

fbshipit-source-id: 4e2a1780738423396111c7cfde2fe12010ad0e93
2016-10-26 13:13:47 -07:00
Nikhilesh Sigatapu c67225818d Add a way to access the underlying JavaScriptCore context
Summary:
**Motivation**

I'm working on a project that uses React Native and needs to add direct synchronous bindings to native stuff through the JavaScriptCore C API. This is because it's performance-sensitive and would benefit from the quickest JS->C path. It does this using cross-platform C++ code that works on both iOS and Android. Most of the infrastructure for getting access to the JSC context is already in React Native actually, just had to add a few more things.

(lexs you mentioned to tag you in this pull request)

**Test plan**

Modify the JavaScriptCore context through the `JSContextRef` returned (eg. add an object at global scope) and verify that it exists in JavaScript.
Closes https://github.com/facebook/react-native/pull/10399

Differential Revision: D4080945

Pulled By: lexs

fbshipit-source-id: 6659b7a01e09fd84475adde183c1d3aca2d4cf09
2016-10-26 03:43:44 -07:00
Neil Sarkar c144bbfb7e Allow serializing underlying NSError objects, closes #10506
Summary:
Explain the **motivation** for making this change. What existing problem does the pull request solve?

See https://github.com/facebook/react-native/issues/10506. A native `NSError` with `NSUnderlyingErrorKey` set causes a JSON stringify error from the websocket dispatcher if remote debugging is enabled.

**Test plan (required)**

I'm not familiar with the react native testing framework. Happy to add a test for this if someone can point me to where this part of the codebase is exercised :)

I did some spot checks with nil user dictionaries and nil underlying errors here. The case that this solves is testable using https://github.com/superseriouscompany/react-native-error-repro, specifically:

```objective-c
NSError *underlyingError = [NSError errorWithDomain:@"underlyingDomain" code:421 userInfo:nil];
NSError *err = [NSError errorWithDomain:@"domain" code:68 userInfo:@{@"NSUnderlyingError": underlyingError}];

reject(@"foo", @"bar", err);
```
Closes https://github.com/facebook/react-native/pull/10507

Differential Revision: D4080802

Pulled By: lacker

fbshipit-source-id: 93a41d9e9a710e406a6ccac214a5617271b4bede
2016-10-26 01:43:39 -07:00
littlesome 49667db1c8 Fix Alert memory leak
Summary:
1. Using weak container to hold the currently opened alerts.
2. Using weak reference to alertController in action handler block.
3. BTW,  remove the unused vars: _alertCallbacks, _alertButtonKeys.

Test plan (required)

```
- (void)invalidate
{
  for (UIAlertController *alertController in _alertControllers) {
    [alertController.presentingViewController dismissViewControllerAnimated:YES completion:nil];
  }
}
```
Since we use weak container, _alertControllers should only contains the currently opened alerts.

I test this way: Put a breakpoint in invalidate, open the UIExplorer play with the 'Alert' & 'AlertIOS' examples, then fire a reload and see if _alertControllers contains the expected values.
Closes https://github.com/facebook/react-native/pull/10407

Differential Revision: D4078649

Pulled By: lacker

fbshipit-source-id: 8509e7e7142379a81d5b28c9067c085bad8bb5cb
2016-10-25 17:28:49 -07:00
Scott Wolchok d932c96ddc Don't preallocate child lists
Reviewed By: emilsjolander

Differential Revision: D4078012

fbshipit-source-id: 7cdcab03ec4067550a5fee5e1baea14344f3a8f9
2016-10-25 17:13:36 -07:00
Emil Sjolander 942f724166 Suggest the compiler to inline smaller functions
Reviewed By: gkassabli

Differential Revision: D4074580

fbshipit-source-id: 69b63fadf2011cb688af58f09d67c2cb711a0e20
2016-10-25 10:43:41 -07:00
Kazuki Sakamoto 31d3926784 Update CSSNodeFree for C#, Java and Objective-C
Reviewed By: emilsjolander

Differential Revision: D4069655

fbshipit-source-id: 1fd764059784d7968af38b6aaf7fb6f70fdee8ee
2016-10-25 07:43:44 -07:00
Emil Sjolander 3c5a7ae859 Fix bug in canUseCachedMeasurement causing unneeded double measure
Reviewed By: gkassabli

Differential Revision: D4071621

fbshipit-source-id: 19d87d939051ddf8ee2e1c6e60efee22d173bbb9
2016-10-25 07:43:44 -07:00
Emil Sjolander 1ba4e8b9c6 Reduce duplicate function calls
Reviewed By: gkassabli

Differential Revision: D4068140

fbshipit-source-id: 91261afb73e1c5e23c2cfc84df6ecc5c844a4e78
2016-10-24 12:28:39 -07:00
Emil Sjolander 58b5e28e71 Simplify memory model between managed and unmanaged memory
Differential Revision: D4051454

fbshipit-source-id: 8f5d010be520b3d1c981a7f85e5e6d95773ea6c1
2016-10-24 10:43:43 -07:00
Emil Sjolander ea6458b63e Remove flex shorthand getter because it doesnt make a lot of sense
Reviewed By: gkassabli

Differential Revision: D4064674

fbshipit-source-id: 69935b85042020b4e8c61a393c1be8f4d42a6674
2016-10-24 03:44:22 -07:00
Emil Sjolander dc142ad8f9 Dont override flexShrink, flexGrow, and flexBasis with shorthand flex
Reviewed By: gkassabli

Differential Revision: D4064696

fbshipit-source-id: db2d4b8e60209f0a9eed6794a167b85e453be41c
2016-10-24 03:44:18 -07:00
Emil Sjolander 978d45ddef Forward gLogger output to adb on android platforms
Reviewed By: splhack

Differential Revision: D4064619

fbshipit-source-id: de23e72844e25106d0db756064f5699959f45ed2
2016-10-23 10:58:40 -07:00
Kevin Gozali 150c522be9 allow fetching any resource under js folder via packager
Summary: This is a simple hook to allow native side to fetch any file under the js root folder via packager. Historically, only the `main.jsbundle` is fetched via the packager. This then allows fetching local file like a json file that lives under the same root js folder

Reviewed By: yungsters

Differential Revision: D4037730

fbshipit-source-id: a2d6eb5e30d148fee573d413fc4036d0189f4938
2016-10-20 11:43:44 -07:00
Emil Sjolander 9ed8cae47e Fixup format file for hopefully the last time in a while and re-format code
Reviewed By: gkassabli

Differential Revision: D4044545

fbshipit-source-id: 60ebb73cfdd9dbc9b5fae62ddebf37e9b1e6eecf
2016-10-20 06:28:33 -07:00
Kazuki Sakamoto 1607ff2466 Introduce CSSLayoutSetLogger to pass the print result to C# side
Reviewed By: emilsjolander

Differential Revision: D4027044

fbshipit-source-id: 90e2e449260888770f71fa7ea790ca9764d91c44
2016-10-19 11:13:59 -07:00
Emil Sjolander a9d94c2dfb Change flex basis to override main axis size
Reviewed By: gkassabli

Differential Revision: D4029374

fbshipit-source-id: bc3c72879f3937a50bf8a636b547adc7b9a4f5a7
2016-10-19 06:43:57 -07:00
Emil Sjolander 6d3ecbe07a Use typedefs from header
Reviewed By: gkassabli

Differential Revision: D4036421

fbshipit-source-id: 01f15cb840363850970e6a60e661af06fd6ec9e0
2016-10-18 10:29:30 -07:00
Emil Sjolander c805cf8376 Use switch instead of ifelse chain
Reviewed By: gkassabli

Differential Revision: D4036445

fbshipit-source-id: 2159946f53507ff3d7505795e5baa5f820cdb65c
2016-10-18 10:13:39 -07:00
Emil Sjolander 0699a30980 Fix flex-shrink when shrinking to zero size
Reviewed By: gkassabli

Differential Revision: D4036345

fbshipit-source-id: f6848d7a316a694426f761d5e51d972bd379d90e
2016-10-18 09:28:45 -07:00
Emil Sjolander 4d0b3e684a Remove default: usage to ensure compiler can help with missing cases
Reviewed By: gkassabli

Differential Revision: D4036440

fbshipit-source-id: f5ef4c8afff0f353de50681ad304878f90255fef
2016-10-18 07:02:01 -07:00
Emil Sjolander 02fc4c8ffa Move absolute layout calculation out into seperate function
Reviewed By: gkassabli

Differential Revision: D4028329

fbshipit-source-id: 2903f66b028063cec0a6b3037ca7cb4d6552176d
2016-10-17 12:14:17 -07:00