Commit Graph

726 Commits

Author SHA1 Message Date
Pritesh Nandgaonkar 34b7ec82b5 Moved out logic to calculate size consumed on a line into seperate function
Reviewed By: emilsjolander

Differential Revision: D6797640

fbshipit-source-id: ad9757e7d603c0ce57f452b1e5c404037605bed9
2018-02-05 07:04:53 -08:00
Pritesh Nandgaonkar 9f7cedbe14 Remove the use of legacy flag and log the diff if its used
Reviewed By: emilsjolander

Differential Revision: D6856812

fbshipit-source-id: e4724d80702cc75c1894e348e137b24e663573d2
2018-02-02 07:40:25 -08:00
Mark Wang 9f57dedc17 Use delete instead of free
Reviewed By: richardjrossiii

Differential Revision: D6866064

fbshipit-source-id: a44828cedb5045b6c97179fb30ffd8c8dafcbfbe
2018-01-31 18:01:34 -08:00
Andy Toulouse 2a3c37f424 Give IInspector a virtual destructor for correct InspectorImpl destruction
Reviewed By: bnham

Differential Revision: D6815637

fbshipit-source-id: bfd3bd4a664ec51d5364df512bfc9bc366f516c1
2018-01-25 20:31:58 -08:00
Pritesh Nandgaonkar be8e7c6e65 Made logging logic dynamic to log string length
Reviewed By: emilsjolander

Differential Revision: D6784491

fbshipit-source-id: 26e4520a84be355ff992b808297ce7a95b3d09e3
2018-01-23 06:46:08 -08:00
Michael Lee b8e79a7e8b Split folly/Memory out from headers-only targets
Reviewed By: yfeldblum

Differential Revision: D6732464

fbshipit-source-id: 9d9498e0faa02c2003ab0e363444b7a2be51fd93
2018-01-22 08:42:18 -08:00
Jonathan Kim 4f2cc42a2d Make xplat react native files buildable
Reviewed By: mzlee

Differential Revision: D6605611

fbshipit-source-id: baa33947319a27b95020924d177a9398a276dabe
2018-01-21 22:05:05 -08:00
Scott Wolchok cec2e80fc2 Fix dependencies
Reviewed By: adamjernst

Differential Revision: D6754488

fbshipit-source-id: 49f2a45d024c7bd6b52f51f7705bcd167a499e47
2018-01-20 12:16:52 -08:00
Alex Dvornikov 9e34cbda9d Add Bundle Splitting support for source code bundles
Reviewed By: amnn

Differential Revision: D6695431

fbshipit-source-id: 76f4c09b7caadabad5b327af29c02afe61f31abd
2018-01-16 15:20:45 -08:00
Pritesh Nandgaonkar d0f7d4d107 Use vector instead of linked list
Reviewed By: emilsjolander

Differential Revision: D6722959

fbshipit-source-id: 4e81176802b9a9319bc5f385c824a06be14a83a2
2018-01-16 09:36:09 -08:00
Pritesh Nandgaonkar ee5c91c031 Fix for failing screenshot tests
Reviewed By: emilsjolander

Differential Revision: D6726745

fbshipit-source-id: 99f91aabe2337b23953724545f97695238f2124e
2018-01-16 09:16:01 -08:00
Valentin Shergin 6bb8617f3a Exposing `setDirtiedFunc` as plain C function YGNodeSetDirtiedFunc
Summary: Trivial. Those lines were lost during rebasing of the original commit.

Reviewed By: priteshrnandgaonkar

Differential Revision: D6717696

fbshipit-source-id: a5dce25427c8977352b3ae7ea01e546a540e0c13
2018-01-15 16:06:11 -08:00
Pritesh Nandgaonkar 831a1bb4b1 Moved leadingpaddingnandborder function as a method on YGNode
Reviewed By: emilsjolander

Differential Revision: D6711991

fbshipit-source-id: 41ad7191bf8df6fe3131106436dc0c87e9dee297
2018-01-15 10:17:29 -08:00
Pritesh Nandgaonkar 2fe65b032e Move trailing padding function as a method on YGNode
Reviewed By: emilsjolander

Differential Revision: D6711897

fbshipit-source-id: fa2e1a8e31242358a6e94aef51368e2c2c58b79d
2018-01-15 10:17:29 -08:00
Pritesh Nandgaonkar bd7bf94af9 Moved leading padding function as a method on YGNode
Reviewed By: emilsjolander

Differential Revision: D6711830

fbshipit-source-id: d2f6f55ec23b007bb51f8a91385e02236f46dc7b
2018-01-15 10:17:29 -08:00
Pritesh Nandgaonkar 7f94bff89a Resolve direction function is now as a method on YGNode
Reviewed By: emilsjolander

Differential Revision: D6711755

fbshipit-source-id: a0e80596e10f0c7fb7a31b75377da4db846c4bbb
2018-01-15 10:17:29 -08:00
Pritesh Nandgaonkar 82088580ab Move trailing border function as a method on YGNode
Reviewed By: emilsjolander

Differential Revision: D6711666

fbshipit-source-id: fe4fdfc2db59d03beb763317e1a6f9de52f851d4
2018-01-15 10:17:29 -08:00
Pritesh Nandgaonkar 210ae5b95a Move leading border function as a method on YGNode
Reviewed By: emilsjolander

Differential Revision: D6711523

fbshipit-source-id: 76e90083a9dd0728dc9557cc3b0a1f431f3afd5d
2018-01-15 10:17:29 -08:00
Pritesh Nandgaonkar 2b27f1aa19 Moved YGNodeIsFlex as a method on YGNode
Reviewed By: emilsjolander

Differential Revision: D6711536

fbshipit-source-id: e60be7da55e3e8d254eb253c141d219a37a76087
2018-01-15 10:17:28 -08:00
Pritesh Nandgaonkar fcf2c7cf61 Refactored step3 of flexbox algorithm
Reviewed By: emilsjolander

Differential Revision: D6702749

fbshipit-source-id: 15dcc94ae30ac185e4d1c7d6e3744a40cfa47317
2018-01-15 10:17:28 -08:00
Pritesh Nandgaonkar ac1c8c265e Refactored the flexbox step to determine available space in main and cross dim
Reviewed By: emilsjolander

Differential Revision: D6693777

fbshipit-source-id: d6c87670e74bdc22b32916c2d77fe423d831b378
2018-01-15 06:05:24 -08:00
Semen Zhydenko d2c569795c Typos in comments and log messages
Summary:
No code changes, no testing required.

alligned -> aligned
allignment -> alignment
completly -> completely
conseptually -> conceptually
decendents -> descendants
indefinetly -> indefinitely
dimention -> dimension
doesnt -> doesn't
safegaurd -> safeguard
intialization -> initialization
hierachy -> hierarchy
happend -> happened
gaurd -> guard
programatically -> programmatically
initalized -> initialized
immidiately -> immediately
occured -> occurred
unkown -> unknown
neccessary -> necessary
neccesarily -> necessarily
occuring -> occurring
comoponent -> component
propogate -> propagate
recieved -> received
referece -> reference
perfomance -> performance
recieving -> receiving
subsquently -> subsequently
scoll -> scroll
suprisingly -> surprisingly
targetting -> targeting
tranform -> transform
symetrical -> symmetrical
wtih -> with
Closes https://github.com/facebook/react-native/pull/17578

Differential Revision: D6718791

Pulled By: shergin

fbshipit-source-id: 4ab79c1131ec5971d35a0c7199eba7ec0a0918ad
2018-01-12 22:18:45 -08:00
Sergei Dryganets c8e98bbaf5 CI for Android fixed
Summary:
Fix for android github CI.

Github CI doesn't work without this change.

CI passes.

[INTERNAL] Android CI fix.
Closes https://github.com/facebook/react-native/pull/17551

Differential Revision: D6707477

Pulled By: hramos

fbshipit-source-id: f98515234da3b90ee3233523bcd7cc67ed82c1b4
2018-01-12 08:01:00 -08:00
Alex Dvornikov 8f358a2088 Report module id as string and as double, in case of invalid values are passed to nativeRequire
Differential Revision: D6695769

fbshipit-source-id: b578b9d52ed711fb5a3e51717ac555fa8a232d7a
2018-01-11 14:21:00 -08:00
Michał Gregorczyk 702b7e877e (almost) kill fbjsc
Reviewed By: johnislarry

Differential Revision: D6701327

fbshipit-source-id: 17630f336e2b275c1de30ebfa32d1cbfbc1b9634
2018-01-11 13:16:37 -08:00
Pritesh Nandgaonkar 4b4959a21c Moved setPosition as a method on YGNode
Reviewed By: emilsjolander

Differential Revision: D6683387

fbshipit-source-id: 83f64101faa700933771c69b222056ec2a6b8d1e
2018-01-11 05:13:56 -08:00
Pritesh Nandgaonkar 89c14579d0 Moved trailingmargin function as a method on YGNode
Reviewed By: emilsjolander

Differential Revision: D6683313

fbshipit-source-id: 5ee458c2f4698768724901df0e3f5d8805c7c8f5
2018-01-11 05:13:51 -08:00
Pritesh Nandgaonkar f0f4bee429 Moved getLeadingMargin as a function on YGNode
Reviewed By: emilsjolander

Differential Revision: D6683270

fbshipit-source-id: a26663006419e13cb783e9849183e3c665f59b3c
2018-01-11 05:13:47 -08:00
Pritesh Nandgaonkar b709ff4f13 Moved getTrailingPosition function as a method on YGNode
Reviewed By: emilsjolander

Differential Revision: D6683205

fbshipit-source-id: d30003d90d634c644d92c833e58165b073d4d13e
2018-01-11 05:13:45 -08:00
Pritesh Nandgaonkar 040197a485 Moved is isTrailingPos defined as a method on YGNode
Reviewed By: emilsjolander

Differential Revision: D6683190

fbshipit-source-id: c37e57d02cc4475eb8181a2bb003c555bdb0aaea
2018-01-11 05:13:43 -08:00
Pritesh Nandgaonkar 98a74b0a2b Moved isLeadingPos defined as a method on YGNode
Reviewed By: emilsjolander

Differential Revision: D6682956

fbshipit-source-id: 31c60e0eae906e1434a6969f3cd786fcaf9097a5
2018-01-11 05:13:39 -08:00
Pritesh Nandgaonkar 00f1a37b2c Moved YGNodeLeading position as a method on YGNode
Reviewed By: emilsjolander

Differential Revision: D6682929

fbshipit-source-id: 3607aab1544b62b1126c5d75b2f6fb8f5ca2d45f
2018-01-11 05:13:33 -08:00
Valentin Shergin c2b0f34533 Introducing on-dirty handler (aka `YGNodeSetDirtiedFunc`)
Summary:
Currently, we can dirty leaf nodes with `measure` function, we also can get `dirty` status for any node, but we cannot handle a moment when this change happen. This diff introduces a new call-back-manner handler for it.
We need this to plug Yoga inside and outside other layout systems without maintaining own dirty propagation infrastructure.
Consider using Yoga for flex-box layout in React Native where we can have deeply nested layout like `<View><Text><View><Text/></View></Text></View>` where all content of all <Text> nodes are laid out using native text/inline (not flex-box!) layout system. In this case, when some change dirties some deeply nested Yoga node, we have to propagate the dirty state down to outer one. Having this handler makes possible to wire up `on-dirty` handler on the root node and `setDirtied` for the leaf node.
Removing custom dirting mechanism from React Native should drastically simplify rendering layer and bring a huge performance win.

Reviewed By: emilsjolander

Differential Revision: D6597856

fbshipit-source-id: 6588cd712f9c1dede4af32f3d326f90103e48ff0
2018-01-10 09:56:41 -08:00
Pritesh Nandgaonkar b41d41fd40 Move utility functions to utils file
Reviewed By: emilsjolander

Differential Revision: D6682933

fbshipit-source-id: 0fd90fdaf5ca4f9b7a11cbd15d8c54c7d0ce8a03
2018-01-10 05:02:24 -08:00
Pritesh Nandgaonkar a8d4666651 Fix warnings of casting and null pointer handling
Reviewed By: emilsjolander

Differential Revision: D6675111

fbshipit-source-id: 884659fabb05033b4d43d3aa6629e22481d39b7e
2018-01-09 04:30:56 -08:00
Pritesh Nandgaonkar d85da86dc7 Move YGNodeResolveFlexShrink to a method on YGNode
Reviewed By: emilsjolander

Differential Revision: D6611418

fbshipit-source-id: 6e5ba39b555d313a967800589891027920112c15
2018-01-08 03:01:30 -08:00
Pritesh Nandgaonkar 6627d7723c Moved YGResolveFlexGrow as a method on YGNode
Reviewed By: emilsjolander

Differential Revision: D6611385

fbshipit-source-id: 71660946c469fac77c5ffa0284c793e6adc9db7b
2018-01-08 03:01:30 -08:00
Pritesh Nandgaonkar 0a9e652bdd Move markDirtyInternal as a method in YGNode
Reviewed By: emilsjolander

Differential Revision: D6611287

fbshipit-source-id: 54402145d51ea717553ea136be739b9880a79817
2018-01-08 03:01:30 -08:00
Pritesh Nandgaonkar 28968e2c0b Move YGCloneChildrenIfNeeded as a method on `YGNode`
Reviewed By: emilsjolander

Differential Revision: D6611155

fbshipit-source-id: 463723a363e0fbd2c7686f65226eca73236bd07e
2018-01-08 03:01:30 -08:00
Dan Zimmerman 1fd7315c3b Remove unnecessary include
Reviewed By: mzlee

Differential Revision: D6638538

fbshipit-source-id: 4b11b8f4f88aa533ac0467348df36e5780bfbb70
2017-12-27 13:16:30 -08:00
Héctor Ramos 33da6047a3 Include OSS defs in Yoga BUCK
Reviewed By: ttsugriy

Differential Revision: D6630280

fbshipit-source-id: 6355d4b64a39feb000d5a104f39733a90fc5a31e
2017-12-22 14:31:21 -08:00
Pritesh Nandgaonkar a163f70f87 Optimize the performance of Origami
Reviewed By: emilsjolander

Differential Revision: D6619293

fbshipit-source-id: c1632efd97f47696b7f8bb1b3e763de92c707287
2017-12-22 06:51:09 -08:00
Taras Tsugrii ba31d29dc9 Replace native cxx_library with fb-specific macros.
Reviewed By: adamjernst

Differential Revision: D6618153

fbshipit-source-id: 188e2ca3cc78efad6e71f0a22547e26abf2f62e1
2017-12-21 08:58:50 -08:00
Pritesh Nandgaonkar 4cdbb77c33 Do not set FB_ASSERTION_ENABLED
Reviewed By: emilsjolander

Differential Revision: D6611904

fbshipit-source-id: f01ac144159c1b333d8deb8cbb5ba0288e4bf7a4
2017-12-21 04:45:34 -08:00
Peter Ammon f9f40cd3e4 JSBigString to MAP_PRIVATE not MAP_SHARED
Reviewed By: mhorowitz

Differential Revision: D6613463

fbshipit-source-id: 2553a0475ade061f3b70ffce90fcf4e0ceb7d9fa
2017-12-20 14:01:33 -08:00
Ben Nham 59c7967627 document isInspectable
Reviewed By: mhorowitz

Differential Revision: D6601992

fbshipit-source-id: 4bd69f90943b14286e5618c70fc7eaca689fb02c
2017-12-20 02:30:47 -08:00
Michał Gregorczyk 6ad1f0957a Kill orphaned marker end in JSCExecutor
Reviewed By: mhorowitz

Differential Revision: D6594498

fbshipit-source-id: 67f281ded088bdbad3eb1e173882d4328c1fdc93
2017-12-19 14:00:36 -08:00
Pritesh Nandgaonkar f1055bcac8 Make YGNode as c++ struct with properties exposed through accessors
Reviewed By: emilsjolander

Differential Revision: D6592257

fbshipit-source-id: 641e8b9462ad00731a094511f9f5608b23a6bb21
2017-12-19 11:32:49 -08:00
Pritesh Nandgaonkar d89901fa60 Use wildcard instead of manual file addition
Reviewed By: emilsjolander

Differential Revision: D6601704

fbshipit-source-id: 9bac4bc1a8d9e40feb0111fc4c7a627d4d3c4270
2017-12-19 07:41:57 -08:00
Ben Nham 15cd98b782 add isInspectable property
Reviewed By: Hypuk

Differential Revision: D6578736

fbshipit-source-id: a4229c3766125ff55cff50a49893b2385f9c8a6a
2017-12-18 13:32:36 -08:00
Ben Nham 3852c42ad8 add isInspectable property
Reviewed By: Hypuk

Differential Revision: D6578737

fbshipit-source-id: 05143e4cf59b5be9e20ab79b83efbfaa7da059d8
2017-12-18 13:32:35 -08:00
Ben Nham bef7967f9a move page registration logic in to jsinspector
Reviewed By: pakoito

Differential Revision: D6531199

fbshipit-source-id: ed1ae9e2f0c19e7656cd022e438693798320e55a
2017-12-15 09:20:13 -08:00
Taras Tsugrii 88f6f69152 Skylarkify config_utils_defs macros.
Reviewed By: adamjernst

Differential Revision: D6569785

fbshipit-source-id: d2f20cd648822846e59830614d4eb0f466252363
2017-12-14 18:52:18 -08:00
Max Sherman eca51eb46a Type global hooks as function pointers
Reviewed By: danzimm

Differential Revision: D6568053

fbshipit-source-id: 94fdecaf066a36c9c916bbd7b23c2f0680d91895
2017-12-14 14:47:10 -08:00
Max Sherman 434f432d5d Meyers singleton jsc error extractor
Reviewed By: mhorowitz

Differential Revision: D6554142

fbshipit-source-id: f586cd7030130e4ccb069f9aed8fb1364c527e54
2017-12-13 12:35:11 -08:00
Greg McGary f8fe6b0c70 Explicitly #define isnan __builtin_isnan for Android clang-5 to mimic gcc's default behavior
Reviewed By: passy

Differential Revision: D6527499

fbshipit-source-id: 65d9e43c7e7d973a6c92e9863ebe469b35a24ac8
2017-12-12 17:02:08 -08:00
Taras Tsugrii ed2bfcb35a Skalarkify flags macros.
Reviewed By: adamjernst

Differential Revision: D6528242

fbshipit-source-id: f809cfb853d6615a1aa47e145063ef1d7f5838be
2017-12-09 22:06:09 -08:00
Ben Nham e76abfa036 Revert D6155682: Use clang-5.0 -Oz
Differential Revision: D6155682

fbshipit-source-id: 9139ed14e0d24784bf25b2783e364a511173ab83
2017-12-08 09:54:37 -08:00
Greg McGary f59140eb21 Use clang-5.0 -Oz
Reviewed By: mzlee

Differential Revision: D6155682

fbshipit-source-id: 2f64e742f4dc44be171274c2ad0a41fb1e7079d7
2017-12-07 13:32:23 -08:00
Yaroslav Pavlov 4034febb7e Round size geometry for Button and RichText components.
Reviewed By: cuva

Differential Revision: D6466875

fbshipit-source-id: 62a480411e7d2354a6879917c42bbf0ee96cdadd
2017-12-06 16:33:34 -08:00
Pritesh Nandgaonkar b08a912f11 vector instead of YGNodeList
Reviewed By: jonathandann, emilsjolander

Differential Revision: D6442379

fbshipit-source-id: d2d48ef0676351d2eeaa2d427dcd72e082cd15a1
2017-12-05 08:30:15 -08:00
Lukas Wöhrl 4fdaf2de98 Fix min/max percentage constraints on measured nodes
Summary:
Fix min/max percentage constraints on measured nodes. Currently we passed in the available size instead of the parent size.
Fixes #611
Closes https://github.com/facebook/yoga/pull/649

Reviewed By: priteshrnandgaonkar

Differential Revision: D6408019

Pulled By: emilsjolander

fbshipit-source-id: 18be5056dbc0dc179970ec231ab8b4e2cdba65c5
2017-11-30 08:16:50 -08:00
Andres Suarez d674d48a7b Run buildifier over all BUCK files
Reviewed By: mzlee, dinhviethoa

Differential Revision: D6439498

fbshipit-source-id: ec847595afdd79434e48652d237d2533bbd2cad2
2017-11-29 20:30:43 -08:00
Lukas Wöhrl 72e762d4bc Suppress unused warnings on YGDefaultLog
Summary:
Suppresses the unused warnings on ```YGDefaultLog```. It uses a more generic macro which simply casts the variable to ```(void)```. This is the simples approach to make mutiple different compilers happy. Fixes #650
Closes https://github.com/facebook/yoga/pull/651

Differential Revision: D6407999

Pulled By: emilsjolander

fbshipit-source-id: 19fd78dd8b84eafdbb48875dd003d506a98c4807
2017-11-28 10:36:16 -08:00
Peter Ammon 03956c4ecf Use different symbols for SystraceSection depending on WITH_FBYSTRACE
Reviewed By: tmikov

Differential Revision: D6365162

fbshipit-source-id: d1e13b0012528305506c368d5e60f3754a576df3
2017-11-27 14:45:57 -08:00
Ben Nham 70c359000a move inspector out of jschelpers
Differential Revision: D6385924

fbshipit-source-id: 1913d903077494cc0d86d5a8c8839620f1ecab0c
2017-11-27 07:23:37 -08:00
Ben Nham 850efa8650 remove hard dependency on JSGlobalContextRef in inspector interfaces
Differential Revision: D6385923

fbshipit-source-id: 2f547b0dc1760f72fa8d7edc67327415069c648e
2017-11-27 07:23:37 -08:00
Lukas Wöhrl 5f99b1a55f Measure nodes which have margin: auto and align-item: stretch
Summary:
If you have a measurable node and set ```marign-left: auto``` + ```align-item:stretch``` on it, it won't get measured and they get a width/height of ```-(nan)```. This change fixes that behaviour. Fixes #644.
Closes https://github.com/facebook/yoga/pull/645

Differential Revision: D6413512

Pulled By: emilsjolander

fbshipit-source-id: 755febeb33bb0d4520ca6b3c28d56ac333e4a14d
2017-11-27 05:30:30 -08:00
Lukas Wöhrl 1050e0b476 Add justify-content: space-evenly
Summary:
Adds new ```space-evenly``` for ```justify-content```.

Also adds a typofix in one of the other justify-content tests.

Fixes #657
Closes https://github.com/facebook/yoga/pull/658

Differential Revision: D6407996

Pulled By: emilsjolander

fbshipit-source-id: cc837409e1345624b4bd72c31e25fe68dcb0f6a3
2017-11-27 04:01:02 -08:00
Lukas Wöhrl 1d62848535 Fix shrinking in non strech alignments while retaining legacy behaviour
Summary:
This fixes shrinking of elements which are in a non stretch alignment, but keeps the legacy stretch behaviour in place. Additionally this adds a testcase for ```useLegacyStretchBehaviour```

Fixes #633
Closes https://github.com/facebook/yoga/pull/635

Differential Revision: D6408037

Pulled By: emilsjolander

fbshipit-source-id: 377ab0308dd3a75a148a0af31ab5eb3ffb5b5d83
2017-11-27 03:15:38 -08:00
Lukas Wöhrl 41da6e3128 Do not mark node as dirty if, new and old values are undefined
Summary:
If we have a values already set to undefined and set it to undefined again, we invalidate the layout. This change takes this case into account and keeps the layout valid.
Fixes #630
Closes https://github.com/facebook/yoga/pull/648

Differential Revision: D6408013

Pulled By: emilsjolander

fbshipit-source-id: dc2a848d84d3de9f4650fac9e41d7c8169446406
2017-11-27 03:15:37 -08:00
Jake Teton-Landis a383b8ca05 Fix assertion preventing YGNodeLayoutGet* with YGEdgeEnd
Summary:
Expected to be able to call `YGNodeLayoutGetMargin(node, YGEdgeEnd)`, but instead, the program aborts with `"Cannot get layout properties of multi-edge shorthands"`.

This bug seems to incorrectly prevent properties from YGEdgeEnd for all Layout properties.
Closes https://github.com/facebook/yoga/pull/632

Differential Revision: D6408060

Pulled By: emilsjolander

fbshipit-source-id: 4ab3b2ffb2f1bb6fd3a27f780caf0123abcdb230
2017-11-27 03:01:00 -08:00
Lukas Wöhrl f5becebc07 Fix justify content with min/max constraint parent
Summary:
The min/max inner width shouldn't take the margins into account.
Adds a test for both cases.

Fixes #664
Closes https://github.com/facebook/yoga/pull/665

Differential Revision: D6407982

Pulled By: emilsjolander

fbshipit-source-id: ffa549a06f802263e3b8488e90756aa3f722d52d
2017-11-24 07:26:24 -08:00
Pritesh Nandgaonkar 0984f29a32 Refactor and move YGNodeToString implementation to different file
Reviewed By: emilsjolander

Differential Revision: D6397372

fbshipit-source-id: 79e701efe7f19db6dac1aea6328ebf0ac84a7ac3
2017-11-23 09:46:30 -08:00
Pritesh Nandgaonkar d7ab9496bc Change c files to cpp
Reviewed By: gkassabli

Differential Revision: D6271299

fbshipit-source-id: 66c0e54ccf019d72d1fd0b4d117826e4e84fdc89
2017-11-21 10:18:29 -08:00
Pritesh Nandgaonkar d950dc6a21 Deleted YGSetMemoryFucs as it is unused
Reviewed By: emilsjolander

Differential Revision: D6374147

fbshipit-source-id: 8c896dce23571268a1a52df5cc72486af9d66df7
2017-11-21 03:37:54 -08:00
Pritesh Nandgaonkar 6c70975689 Replace printf with YGLog calls
Reviewed By: gkassabli

Differential Revision: D6297015

fbshipit-source-id: 6a67bdf33ef121785ac14938f5d3ed6e9d6f2656
2017-11-16 05:34:27 -08:00
Alex Dvornikov a47431ed74 Adopt split segments registration approach on Android
Differential Revision: D6284863

fbshipit-source-id: 0df6b90eb0cbeab4c8a2b11f1e4dcbd5d5dfab72
2017-11-09 12:23:51 -08:00
Alex Dvornikov cff0d8e0e5 Register split segment paths with RAMBundleRegistry
Differential Revision: D6284466

fbshipit-source-id: c80cf929af38f92f06cca5b366c58785ae992d83
2017-11-09 12:23:46 -08:00
Alex Dvornikov 6ecae73fe5 Remove RAMBundleRegistry subclasses
Differential Revision: D6262247

fbshipit-source-id: 708f919e34f1706d9aca19a34ad8ea506e9f8d8b
2017-11-08 04:12:20 -08:00
Dan Caspi 19de7fcb22 Moving some RAM logic to Instance.
Reviewed By: michalgr

Differential Revision: D6208977

fbshipit-source-id: 28339d07c58f1acc816be02f2707ef75529fa069
2017-11-03 05:32:02 -07:00
Dan Zimmerman 02f7c61cdd Introduce macro that disables poisoning JSC symbols
Reviewed By: dcaspi

Differential Revision: D6184846

fbshipit-source-id: 755653ceebcbded8fbe165375e8e8e50cf0ecccc
2017-11-02 08:16:11 -07:00
Dan Zimmerman c6a30ab949 Match the linkage used for FBJSContextStartGCTimers, configureJSCForIOS
Reviewed By: dcaspi

Differential Revision: D6184848

fbshipit-source-id: cf016caddcccab8de9ffccbe616e579005ae05d0
2017-11-02 08:16:11 -07:00
Chandra Patni 86c50a5094 use `> || YGFloatsEqual` instead of `>=` for computing round value to pixel grid
Reviewed By: emilsjolander

Differential Revision: D6202484

fbshipit-source-id: bb80235452208caec388775574cc4f07bfd649c4
2017-11-01 15:47:59 -07:00
Alex Dvornikov b5651d945c Add "setJsBundlesDirectory" method to CatalystInstanceImpl
Differential Revision: D6042493

fbshipit-source-id: 950c6d6bdc2e0b62b14c9bcfc86233159a002c67
2017-11-01 06:54:44 -07:00
Georgiy Kassabli 21917ab7bf Fixing the edge case in Yoga with percentage absolute position and infinite constraint
Reviewed By: emilsjolander

Differential Revision: D6199731

fbshipit-source-id: f40ddf00614b2f507848fb35f348a9dfef14b323
2017-11-01 06:20:11 -07:00
Pritesh Nandgaonkar 0230672275 Reverting the dirty child optimization
Reviewed By: emilsjolander

Differential Revision: D6203290

fbshipit-source-id: 8e42abb70e55f0fac90faaa21ecdbe0fbb76ce6b
2017-10-31 23:15:43 -07:00
Pritesh Nandgaonkar 587225ab45 Used hasDirtyChildren tag for the optimization
Reviewed By: emilsjolander

Differential Revision: D6134754

fbshipit-source-id: bbcfee14058140b946401de756a3f130de0f51cd
2017-10-31 08:21:54 -07:00
Dan Caspi 40a90831b8 Final fixes
Reviewed By: amnn

Differential Revision: D6050931

fbshipit-source-id: 44db12becc0057fe71d469f3e9e6fc16a5d4d5af
2017-10-19 14:33:05 -07:00
Sebastian Markbage 60c898d864 Persistent Yoga
Summary:
This is meant to show a possible route format for a persistent form of Yoga. Where previous layouts can remain intact while still taking advantage of incremental layout by reusing previous subtrees.

```c
YGNodeRef YGNodeClone(const YGNodeRef node);
```

The core of this functionality is a new API to clone an existing node. This makes a new detached node with all the same values as the previous one. Conceptually this makes the original node "frozen" from that point on. It's now immutable. (This is not yet enforced at runtime in this PR but something we should add.)

Since the original is frozen, we reuse the children set from the original node. Their parent pointers still point back to the original tree though.

The cloned node is still mutable. It can have its styles updated, and nodes can be inserted or deleted. If an insertion/deletion happens on a cloned node whose children were reused, it'll first shallow clone its children automatically.

As a convenience I also added an API to clear all children:

```c
void YGNodeRemoveAllChildren(const YGNodeRef node);
```

During insert/delete, or as a result of layout a set of reused children may need to be first cloned. A kind of copy-on-write. When that happens, the host may want to respond. E.g. by updating the `context` such as by cloning any wrapper objects and attaching them to the new node.

```c
typedef void (*YGNodeClonedFunc)(YGNodeRef oldNode,
                                 YGNodeRef newNode,
                                 YGNodeRef parent,
                                 int childIndex);

void YGConfigSetNodeClonedFunc(YGConfigRef config,
                               YGNodeClonedFunc callback);
```

This PR doesn't change any existing semantics for trees that are not first cloned.

It's possible for a single node to exist in two trees at once and be used by multiple threads. Therefore it's not safe to recursively free a whole tree when you use persistence. To solve this, any user of the library has to manually manage ref counting or tracing GC. E.g. by replicating the tree structure in a wrapper.

In a follow up we could consider moving ref counting into Yoga.
Closes https://github.com/facebook/yoga/pull/636

Reviewed By: emilsjolander

Differential Revision: D5941921

Pulled By: sebmarkbage

fbshipit-source-id: c8e93421824c112d09c4773bed4e3141b6491ccf
2017-10-17 01:26:48 -07:00
Alex Dvornikov dd400f842b add "jsBundlesDirectory" method to RCTBridgeDelegate
Differential Revision: D6030185

fbshipit-source-id: 58d6f9d0d412c7ad0f83af9ae4df01c4dc1178bc
2017-10-12 12:33:21 -07:00
Sergei Dryganets 4192790f05 more detailed CxxModule logging
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Cxx module code swallows c++ exception details with sarcastic comment let native developer figure it out.

Now instead of swallowing it, we print as much information as we can for different exception types.
Still not ideal but way more informative.

Have a crash in your c++ module and try to figure it out without this change.
Closes https://github.com/facebook/react-native/pull/16193

Differential Revision: D6040038

Pulled By: javache

fbshipit-source-id: 3fbe838383ca13395e21f74c9549474f6329cfeb
2017-10-12 12:02:11 -07:00
Scott Yost f9047cdfaf Revert D5932093: [RAMBO] Final fixes
Differential Revision: D5932093

fbshipit-source-id: 8e6ac0482a4c5a9ae4549be73d316df919613c9b
2017-10-12 09:16:40 -07:00
Dan Caspi 0da1738e9b Final fixes
Reviewed By: amnn

Differential Revision: D5932093

fbshipit-source-id: f52a0bb3552af5ad003c051dc32dff0bfabb43ac
2017-10-12 08:27:17 -07:00
Alex Dvornikov 9e01d72103 Unify supplimentary bundle path creation logic between Android and iOS
Differential Revision: D5941546

fbshipit-source-id: c9b8fab887f480faa373c26a1d5ba310e8acde78
2017-10-04 15:16:27 -07:00
Paco Estevez Garcia ef2e29f54c Move URL escaping to Inspector layer
Reviewed By: Hypuk

Differential Revision: D5967544

fbshipit-source-id: d741e6324aff7583778cb13c862505b61ca02a3d
2017-10-04 03:51:33 -07:00
Paco Estevez Garcia 905631470a Add isNetworkInspected to check if a JS VM needs to be paused on launch
Reviewed By: mhorowitz

Differential Revision: D5924019

fbshipit-source-id: 6b1cfc94d149883236ad06619fc54018d57cb0e7
2017-10-03 06:03:23 -07:00
Paco Estevez Garcia da14fad829 Add AppIdentity and DeviceIdentity to Inspector
Reviewed By: Hypuk

Differential Revision: D5924011

fbshipit-source-id: a81d420dbe1a5ede203d2fa313548e19664b9587
2017-10-03 06:03:23 -07:00
Marko Novakovic 5038b06b31 Un-inline-ing a method declared as export
Reviewed By: compnerd

Differential Revision: D5909847

fbshipit-source-id: 7108dd88271e640e1881b20c0cbf1ad28bbf63c9
2017-09-26 19:01:38 -07:00
Alex Dvornikov 7d2021ec49 Added iOS support for loading multiple RAM bundles
Differential Revision: D5890466

fbshipit-source-id: e7805f90a7c446f5f75427c3fadcd133a3f7ad18
2017-09-22 09:58:47 -07:00
Alex Dvornikov 7d115730dc Configure JSExector with BundleRegistry instead of JSModulesUnbundle
Differential Revision: D5890458

fbshipit-source-id: 968be95786ffbf53aa98928d4d3e3bd52a84b3dc
2017-09-22 09:58:46 -07:00
Jia Li 0aa12939fd Revert D5850968: Configure JSExector with BundleRegistry instead of JSModulesUnbundle.
Differential Revision: D5850968

fbshipit-source-id: f4c9dc8d5f14cdd32195463e8786242e708770e9
2017-09-21 21:22:39 -07:00
Jia Li 526fd6b931 Revert D5850970: Added iOS support for loading multiple RAM bundles
Differential Revision: D5850970

fbshipit-source-id: 8b0f9bc296ac2944b8b7657a4119b6787d810a2c
2017-09-21 21:22:39 -07:00
Alex Dvornikov 1aeb767a37 Added iOS support for loading multiple RAM bundles
Differential Revision: D5850970

fbshipit-source-id: 88ab6fe3822f1bc4195007f8ec83177a84c27569
2017-09-21 08:51:00 -07:00
Alex Dvornikov 79821917fa Configure JSExector with BundleRegistry instead of JSModulesUnbundle.
Differential Revision: D5850968

fbshipit-source-id: e5e7ad92c2347c2641551fcf820f061ffde5fed6
2017-09-21 08:51:00 -07:00
Alex Dvornikov 2f952fbaac Initial implementation of multiple RAM bundles registry
Differential Revision: D5850963

fbshipit-source-id: e1bd6d74953872d38e73a20f6d054905a7e4c80c
2017-09-21 08:51:00 -07:00
Alex Dvornikov da2ea2601b Allow "nativeRequire" to accept "bundleId" and "moduleId" values
Differential Revision: D5850960

fbshipit-source-id: 4d7aa0ed7542181861649a2089d90c3cf98723e9
2017-09-21 08:51:00 -07:00
Mingwei Pan 67d0cc5c08 Improve formatting of YogaNode.print() on Android
Reviewed By: emilsjolander

Differential Revision: D5842889

fbshipit-source-id: 8ecc829dc43614934c47fd3a68317259e403325a
2017-09-21 07:50:57 -07:00
Emil Sjolander 244045edea Revert D5874862: [yoga][PR] Fix shrinking in non strech alignments
Differential Revision: D5874862

fbshipit-source-id: 24517d26b18c11fb9f75c6d3b5faae360711ea9e
2017-09-21 03:50:11 -07:00
Lukas Wöhrl aa8eb806ca Fix shrinking in non strech alignments
Summary:
This fixes shrinking of elements which are in a non stretch alignment

Fixes #633
Closes https://github.com/facebook/yoga/pull/634

Differential Revision: D5874862

Pulled By: emilsjolander

fbshipit-source-id: 1426aa6b60f6ba42c2be702e6f24cea935ab7acb
2017-09-20 13:31:11 -07:00
Michał Gregorczyk 0ee502d125 More useful utilities in jschelpers
Reviewed By: mhorowitz

Differential Revision: D5785204

fbshipit-source-id: 4c5240f24c6a69bb781896d3af32d4d16fc2387c
2017-09-18 18:45:27 -07:00
Michał Gregorczyk d6c519bc96 Base class for all object private data passed to JSC
Reviewed By: amnn

Differential Revision: D5761937

fbshipit-source-id: de88cf8b959fc855c3c0786f817bb6032491c819
2017-09-18 18:45:27 -07:00
Mingwei Pan d0f36d7a68 Zero out all fields in YGZeroOutLayoutRecursivly using memset
Reviewed By: emilsjolander

Differential Revision: D5842351

fbshipit-source-id: d2c2b6f829588a200525b7ccbdb63003cb4dcc4e
2017-09-15 08:34:26 -07:00
Pieter De Baets 7b770556ac Improve RCTCxxBridge invalidation
Reviewed By: fromcelticpark

Differential Revision: D5536063

fbshipit-source-id: b0f19bebea839c7da84890c338ad4d38293bc99c
2017-09-11 04:30:31 -07:00
Michael Lee 1f2ca244d7 Move to fbsystrace to a new location
Reviewed By: dreiss

Differential Revision: D5760920

fbshipit-source-id: 9ff001dbd34660c14d061dec5428e82a815c719a
2017-09-07 09:17:02 -07:00
Michael Lee ed31f7a97d Reformat BUCK files
Reviewed By: zertosh

Differential Revision: D5756296

fbshipit-source-id: 69af6e9211648a81ba864be8d37165023cb5f9c2
2017-09-05 15:02:19 -07:00
Marc Horowitz d48f08cad6 Thread the JSI runtime descriptor up into the RCTDevMenu title
Reviewed By: javache

Differential Revision: D5643014

fbshipit-source-id: 977be5729c57c0d01ff67b268031ad6fdbf88a07
2017-09-05 15:02:19 -07:00
Pieter De Baets 8497ec297c Shortcut JSBigFileString in when no offset is used
Reviewed By: mhorowitz

Differential Revision: D5227225

fbshipit-source-id: a50688c8b873bf08ea10fafaa143df130f59dfaa
2017-09-05 03:15:43 -07:00
Michał Gregorczyk 8ffe131dad Do not let macros mess with shape of JSExecutor's vtable
Reviewed By: mhorowitz

Differential Revision: D5750246

fbshipit-source-id: b9b428bb301abe208075d409b1a08cde070b17d8
2017-09-01 09:15:43 -07:00
Michael Lee bf80585eba Switch to xplat folly
Reviewed By: nlutsenko

Differential Revision: D5739990

fbshipit-source-id: a1b862faab1dbcdb3bcc11f1bf662241cf7252e5
2017-08-31 17:02:38 -07:00
Marc Horowitz de01f09b5d Remove the restriction on importing bridge:cxxreact
Reviewed By: javache

Differential Revision: D5724406

fbshipit-source-id: 24974601d161fd23805d8e925b2b20a1cf11850d
2017-08-30 11:52:28 -07:00
Pieter De Baets c68bb6a72c Update systrace markers
Reviewed By: AaaChiuuu

Differential Revision: D5707578

fbshipit-source-id: 90afc7c0c7dd66eda621f990ca3a11848adeb4e5
2017-08-30 03:45:02 -07:00
Pieter De Baets 46f0a3b2f6 Disambiguate error messages in MethodCall
Reviewed By: fromcelticpark

Differential Revision: D5706581

fbshipit-source-id: 06343e2a41d08a1594eb35bb96cc6dc7bf9e29c6
2017-08-29 03:15:04 -07:00
Pieter De Baets 4535d527c2 Fix Yoga podspec casing
Summary:
Fix incorrect filename case
Closes https://github.com/facebook/react-native/pull/15657

Differential Revision: D5707921

Pulled By: javache

fbshipit-source-id: 1e4778f930d32949d423ac04bb008e02060649ce
2017-08-25 11:20:14 -07:00
Adam Comella b050b6906d BREAKING: iOS: Fix case sensitivity build warning in Xcode 8.3
Summary:
**Breaking Change Notes**

To adapt to the breaking change, app developers that are consuming React Native through CocoaPods must update their Podfile to refer to yoga with a lowercase "y". In other words:

    pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

Must be changed to (note the lowercase "y"):

    pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

**Symptom**

If you consume React Native as a CocoaPod and consume a third-party React Native module not as a CocoaPod, you will receive a `nonportable-include-path` warning in Xcode >= 8.3.

**Details**

Xcode 8.3 introduced -Wnonportable-include-path which triggers if you import a header using different casing than the path to the header on disk. This triggers when consuming React Native as a CocoaPod from a library that isn't a CocoaPod. React Native imports Yoga using paths like this:

    #import <yoga/Yoga.h>

Which means Yoga's headers are expected to be located in a directory called "yoga" with a lowercase "y". However, when React Native is a CocoaPod the Yoga headers for non-CocoaPods end up in the directory "$(BUILT_PRODUCTS_DIR)/Yoga".

To fix this such that Yoga's headers end up in "$(BUILT_PRODUCTS_DIR)/yoga" (note the lowercase "y"), I've changed Yoga's podspec name to have a lowercase "y".

**Test Plan**

Created a test app where React Native is consumed as a CocoaPod. Added the react-native-maps library to the project and configured it to not be consumed through CocoaPods. Verified that the app compiles properly without the `nonportable-include-path` warnings.

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

Differential Revision: D5706338

Pulled By: javache

fbshipit-source-id: 090daa2c3ebb1c66bd467e78a1e91791dbb06651
2017-08-25 04:45:06 -07:00
Lukas Wöhrl 95faccb13c Fix const declaration mismatch and double/float mix
Summary:
This PR fixes a declaration mismatch for `YGNodeCanUseCachedMeasurement` where the last argument is declared non `const` in `.h` and `const` in `.c`.

Additionally it uses explicit `float` for fraction calculation do avoid usage of `double` assignment.
Closes https://github.com/facebook/yoga/pull/607

Differential Revision: D5677931

Pulled By: emilsjolander

fbshipit-source-id: 502da957089e4439ed956987ff8dec10bd033ba3
2017-08-23 02:45:30 -07:00
Scott Wolchok f0f25c57ca Make gYGNodeDefaults const
Reviewed By: emilsjolander

Differential Revision: D5675518

fbshipit-source-id: 72a6e208263dde0b6bb46a78fedb2796d0e0a600
2017-08-22 12:00:42 -07:00
Emil Sjolander 67c160cc6c BREAKING: Change aspect ratio behavior
Summary:
== Before ==
- Aspect ratio would do its best to fit within it's parent constraints
- Aspect ratio would prioritize `alignItems: stretch` over other sizing properties.

== After ==
- Aspect ratio is allowed to make a node grow past its parent constraints. This matches many other aspects of flexbox where parent constraints are not treated as hard constraints but rather as suggestions.
- Aspect ratio only takes `alignItems: stretch` into account if no other size definition is defined. This matches the interaction of other properties with `alignItems: stretch`.

== Updating your code ==

**You probably don't need to do anything** but in case something does break in your product it should be as easy as  adding `{width: '100%', height: '100%', flexShrink: 1}` to the style declaring the `aspectRatio`.

Reviewed By: gkassabli

Differential Revision: D5639187

fbshipit-source-id: 603e8fcc3373f0b7f2461da2dad1625ab59dcb19
2017-08-21 03:14:42 -07:00
Marc Horowitz f6de2e4a9b Don't assume JS integers are dynamic Ints
Reviewed By: kathryngray

Differential Revision: D5643016

fbshipit-source-id: 2e4e1bce013e16c286745dc2a9aa5ff251f7afdd
2017-08-18 14:45:06 -07:00
Ben Nham c080fe54d6 add perf markers for reload and download
Reviewed By: alexeylang

Differential Revision: D5633613

fbshipit-source-id: 1fe39669cf4ba4e1475bb57de59c696771ebf8c7
2017-08-17 05:44:27 -07:00
Dmitry Zakharov cf38b083dd Implement lazy discovery scaffolding for loading NativeModules on demand.
Reviewed By: javache

Differential Revision: D5364734

fbshipit-source-id: 5162f7d41434a3ba38c82fa610e84f865bfacf50
2017-08-11 06:41:33 -07:00
Riley Dulin 1df198da02 Expose ModuleRegistry from Instance
Reviewed By: javache

Differential Revision: D5586566

fbshipit-source-id: 786ecf2aa67f12861df7d98f0d32ab79b3d02962
2017-08-10 10:48:25 -07:00
Michael Lee a9eaf6f8a7 Switch soname from .so to .$(ext)
Reviewed By: dinhviethoa

Differential Revision: D5595092

fbshipit-source-id: f6fe1822938693d59f884f0957c7b73d50977668
2017-08-10 10:08:43 -07:00
Kathy Gray 66a788fd99 Add locking around calls from JSCExecuter
Reviewed By: javache

Differential Revision: D5488452

fbshipit-source-id: bda18e7948574117b8ce95894782e0e6e9c321de
2017-08-08 05:07:25 -07:00
Pieter De Baets 1cd276ab5c Specialize JSCValueEncoder for id instead of NSArray
Reviewed By: kathryngray

Differential Revision: D5355723

fbshipit-source-id: a992514c92143fcac52f8e35824c665a1cb44ea4
2017-08-07 06:45:34 -07:00
Ben Nham f5f5ed5ba6 add way for JS to query process-wide perf stats
Reviewed By: alexeylang

Differential Revision: D5555533

fbshipit-source-id: a4c16e004552b8f655ede08548c5242486b5ebb8
2017-08-03 13:13:25 -07:00
Pieter De Baets c1c791fb59 Provide default implementation of getConstants
Reviewed By: kathryngray

Differential Revision: D5453963

fbshipit-source-id: cf3d42a86c3262991697e9c1a23ab90b7f742afe
2017-08-01 03:33:41 -07:00
Georgiy Kassabli 671c6ac04e Fixing edge case issue in Yoga where text node was unnecessary rounded down
Reviewed By: emilsjolander

Differential Revision: D5465632

fbshipit-source-id: 57e11092a97eba5dd76daad15fa8619535ff9c1b
2017-07-26 19:46:32 -07:00
Pieter De Baets 4d55ce3ac1 Remove unused nativeTrace*stage methods
Reviewed By: alexeylang

Differential Revision: D5433403

fbshipit-source-id: f83b576e12a59f0a066960fcb3d1446da011cf39
2017-07-26 07:08:51 -07:00
Pieter De Baets f9808f07c8 Fix missing files in OSS build
Reviewed By: danzimm, alexeylang

Differential Revision: D5488648

fbshipit-source-id: 63226fecb374d319e9d5976b724c4c1bdc5181f9
2017-07-26 05:47:22 -07:00
Pieter De Baets ec14db1abc Cleanup ifdef's in JSCExecutor
Reviewed By: kathryngray

Differential Revision: D5433407

fbshipit-source-id: 104e8e5589d9c5e09c6702992eac3db2e6b4ab1a
2017-07-25 05:02:03 -07:00
Pieter De Baets cb12080179 Replace exported method registration with statically allocated struct
Reviewed By: fromcelticpark

Differential Revision: D5389383

fbshipit-source-id: 9eb29b254b616574966b43ad24aa880d44589652
2017-07-24 07:01:53 -07:00
Pieter De Baets 543cd217f6 Fix incorrect invocation of JSClassCreate
Reviewed By: kathryngray

Differential Revision: D5465118

fbshipit-source-id: 16e1a1af52fb1ef41fa02e380223e9e90c0611ba
2017-07-24 05:03:53 -07:00
Martin Kralik 436218b08d Export stringForScriptTag symbol
Reviewed By: javache

Differential Revision: D5470782

fbshipit-source-id: 889d3251f01b5f5d4e75b32dceb12a99e9e61262
2017-07-21 14:05:34 -07:00
Pieter De Baets ed3c018ee4 Remove legacy JSC profiler
Reviewed By: bnham

Differential Revision: D5433406

fbshipit-source-id: 8cbea8b9b46a0d9f29c57a5bcf605e6bb61ed8a7
2017-07-20 04:21:16 -07:00
dlowder-salesforce f082e6cffd Apple TV Cocoapods support
Summary:
**Motivation**

Support Apple TV for people adding React Native to their projects using Cocoapods.

**Test plan**

Working test project at https://github.com/dlowder-salesforce/react-native-tvos-cocoapods-test
Closes https://github.com/facebook/react-native/pull/15065

Differential Revision: D5443791

Pulled By: javache

fbshipit-source-id: dc46a72df0d73a0049f1c3f9368658e5f3d1ecb8
2017-07-18 15:15:59 -07:00
Paco Estevez Garcia a1e053cc50 Add Framework name to Attach selection
Reviewed By: Hypuk, javache

Differential Revision: D5389047

fbshipit-source-id: 90e2a5f805561e47e7705e7935ced7556a374616
2017-07-14 07:50:40 -07:00
Georgiy Kassabli 820026f69b Fixing the issue with node dimensions rounding in Yoga
Reviewed By: emilsjolander

Differential Revision: D5406211

fbshipit-source-id: df1d54ed0805dfc3abbd8f0ceae30f6d8c26d61a
2017-07-12 09:30:29 -07:00
Lukas Wöhrl 5da0a9909e Reset the hadOverflow flag at the beginning of the algorithm
Summary:
This fixes the case where we change the layout, so that it doesn't overflow anymore.

This also improves the readability by using `|=` instead of referencing the value twice.
Closes https://github.com/facebook/yoga/pull/587

Differential Revision: D5388657

Pulled By: emilsjolander

fbshipit-source-id: ce1b1ded1feed7314a2c16bf695f62b866c19ea0
2017-07-10 12:08:32 -07:00
Grace Ku 79bf089bc5 Make visible to fix build when focusing on ReactKit
Reviewed By: dinhviethoa

Differential Revision: D5372827

fbshipit-source-id: 4cc718e88bc2da08b104d22ffc83691a62b1de4e
2017-07-06 19:46:45 -07:00
Pieter De Baets 465a68db1f Remove xcode_public_headers_symlinks from RN BUCK files
Reviewed By: dinhviethoa

Differential Revision: D5321259

fbshipit-source-id: b07ff4a01280251deb2113a62197d96d5c2e37a1
2017-07-06 12:16:20 -07:00
Pieter De Baets 51afde821d Remove some outdated references to xreact
Reviewed By: kathryngray

Differential Revision: D5339824

fbshipit-source-id: 486212dcf0e80036fa548a139e38358ae251ef2a
2017-07-04 08:00:44 -07:00
Lukas Wöhrl b437d61475 Fix text node rounding with fractional dimensions matching the rounding factor
Summary:
If we have a fractional measure output which matches the subpixel rounding factor, we still should round both dimension into the same direction.

Fixes facebook/yoga#580.
Closes https://github.com/facebook/yoga/pull/583

Reviewed By: marco-cova

Differential Revision: D5274212

Pulled By: emilsjolander

fbshipit-source-id: 1febf9194210437ab77f91319d10d4da9b284b79
2017-07-04 06:29:59 -07:00
Andrey Mishanin ecd5829bf8 Overflow detection in Yoga
Reviewed By: gkassabli

Differential Revision: D5336645

fbshipit-source-id: c4f87d1754d7bac848e8d347b31d619393b94d2c
2017-06-30 09:33:52 -07:00
Pieter De Baets 14538aa038 Export some more symbols
Reviewed By: alexeylang

Differential Revision: D5328772

fbshipit-source-id: 7122af7e9bcb14ecdb224fd63ea1be57e4c7f20e
2017-06-27 11:16:13 -07:00
Pieter De Baets 83faa4b608 Simplify Catalyst handleMemoryPressure
Reviewed By: cwdick

Differential Revision: D5200555

fbshipit-source-id: 86f12acca33ece265d3482ba52de9afcc83173cd
2017-06-26 06:01:14 -07:00
Alexey Lang e2dff82160 Fix visibility of installGlobalFunction(..)
Reviewed By: javache

Differential Revision: D5319733

fbshipit-source-id: cfe796f13920924bbdbdd2a2741a70f492a141f9
2017-06-26 05:15:42 -07:00
Pieter De Baets e2628f93b5 Rename Executor to JSExecutor
Summary:
* Cleanup some header files so we use more forward declarations
* Rename Executor to JSExecutor.h
* Move some typedefs to more appropriate locations

Reviewed By: mhorowitz

Differential Revision: D5301913

fbshipit-source-id: e75154797eb3f531d2f42a5e95409f4062b85f91
2017-06-23 17:01:25 -07:00
Kathy Gray 5c5410459e Setting bridge up for sharing: allowing native modules to register after init
Reviewed By: javache

Differential Revision: D4945784

fbshipit-source-id: 80e7236e9ccd5d5c9a7fba7c96b98fc38b43a2fc
2017-06-21 12:08:45 -07:00
Lukas Wöhrl 3b93ba9af7 The total flex factores need to be a minimum of 1 if any
Summary:
The only thing I found in the spec for this change is the following. Not exactly sure if this is the thing this PR is about:

> For each flex item, subtract its outer flex base size from its max-content contribution size. If that result is not zero, divide it by (if the result was positive) its **flex grow factor floored at 1** or (if the result was negative) by its scaled flex shrink factor, having **floored the flex shrink factor at 1**. This is the item’s max-content flex fraction.

But at least it seems a required change.

Fixes facebook/yoga#566
Closes https://github.com/facebook/yoga/pull/572

Differential Revision: D5264388

Pulled By: emilsjolander

fbshipit-source-id: 0004d1c3b9bad070a98cd6766c1adc06a54475f8
2017-06-16 07:46:28 -07:00
Pieter De Baets 534bbfac8f Report Java stack from errors from sync native module calls
Reviewed By: mhorowitz

Differential Revision: D5069794

fbshipit-source-id: ede314034a2eb6b063a22dbd6e5d13c8ad66e20c
2017-06-14 09:32:37 -07:00
Pieter De Baets c25f356675 Avoid crash when accessing jsContextRef without an executor
Reviewed By: adamjernst

Differential Revision: D5237039

fbshipit-source-id: 6a86da90605b896093e0ef99b0fcf079bf9854bf
2017-06-14 05:32:27 -07:00
Marco Cova f908cce679 Rounding error in width/height fixed
Reviewed By: emilsjolander

Differential Revision:
D5209073

Tags: accept2ship

fbshipit-source-id: a3a6a43767aa707ebfa5eee62a83adcdd88d7ce6
2017-06-10 05:35:55 -07:00
Ben Nham 2984628357 add marker surrounding entire native module creation
Reviewed By: javache

Differential Revision: D5200856

fbshipit-source-id: 35b0e627224d518126a1cfdd36d6af264dd186cf
2017-06-09 06:22:39 -07:00
Alex Kotliarskyi d062cc252e Promise support for C++ bridge
Summary: Looks like `CxxModule::Method` already supports 0..2 callbacks. Based on Obj-C implementation (RCTModuleMethod.m:492) and JS bridge code (NativeModules.js:76), 2 callbacks native method is transformed to JS promise by JS part of the bridge.

Reviewed By: javache

Differential Revision: D5207852

fbshipit-source-id: 5aad86d45b97397f2bc3a4dbc648a60d96a4689e
2017-06-08 11:47:26 -07:00
Theo Yaung ba2e486b33 Connection management
Reviewed By: javache

Differential Revision: D5171773

fbshipit-source-id: 6421739736f732e021e85474253ab0ddb3804b0a
2017-06-08 07:45:53 -07:00
Pieter De Baets 81c2f3b189 Cleanup Platform
Reviewed By: dcaspi

Differential Revision: D5185504

fbshipit-source-id: 4f7e9f9068598418b346a7370f6be241a0784b60
2017-06-07 10:19:01 -07:00
Dan Caspi 63ffa7c2f6 Fixing a race condition that may be caused by the reloadable executor.
Reviewed By: javache

Differential Revision: D5139379

fbshipit-source-id: 24aa820caacfe3780d0e5a2f5868cdc46cefc3fb
2017-06-06 11:35:38 -07:00
Pieter De Baets 7081391c3d Simplify Value.fromJSON API
Reviewed By: mhorowitz

Differential Revision: D5154478

fbshipit-source-id: 3f9528a6401d89df7e170d55da9c0327db5f4f3e
2017-06-06 03:20:14 -07:00
Pieter De Baets 79500f81a9 Fix Travis CI runs
Summary: Closes https://github.com/facebook/react-native/pull/14286

Differential Revision: D5164925

Pulled By: javache

fbshipit-source-id: 0ebe028ab58f37a9afc8b615fe346d7af9180040
2017-06-02 09:03:18 -07:00
Pieter De Baets bd5051adeb Move xreact/jni to react/jni
Reviewed By: mhorowitz

Differential Revision: D5155612

fbshipit-source-id: 871a23916c0069498691dc0dd3c94fd2e404cec9
2017-06-01 05:53:25 -07:00
Lukas Wöhrl 7c980c5ba5 Fix absolute position if wrap-reverse and align-items: flex-end
Summary:
This is a fix on top of 56b10fc. It takes the case into account were you have `wrap-reverse` and `align-items: flex-end` set.
Closes https://github.com/facebook/yoga/pull/568

Differential Revision: D5155521

Pulled By: emilsjolander

fbshipit-source-id: 7e5fcfa2fbb48b6c6279da46cc648a071ff2b079
2017-06-01 05:53:25 -07:00
Hoa Dinh ae49713342 Export more symbols on React Native
Reviewed By: skotchvail

Differential Revision: D5157649

fbshipit-source-id: 8d04dff3a8564d3a095591aa982c9b72ace9a8b7
2017-05-31 21:02:01 -07:00
Hoa Dinh b61999cf03 Make isCustomJSCWrapperSet and setCustomJSCWrapper visible when using arc focus --dylib
Reviewed By: skotchvail, javache

Differential Revision: D5148545

fbshipit-source-id: db6e595325d5275b5d5fdce4c4047965dc97125e
2017-05-31 12:48:20 -07:00
Dan Caspi 578227d83b Adding the ability to run GC on a different thread than the one JSContext was created in
Reviewed By: javache

Differential Revision: D5121232

fbshipit-source-id: 28df89271c9d3f421ca27cf309ca0d3c756beba2
2017-05-31 11:17:41 -07:00
Pieter De Baets 2766103291 Don't use folly::stringPrintf in jschelpers
Reviewed By: mhorowitz

Differential Revision: D5146873

fbshipit-source-id: 99224b0091ee0ea28e5dd132bcc65203d2dc43a6
2017-05-30 15:01:02 -07:00
Emil Sjolander fff3ad1336 Fix confusing variable name
Reviewed By: gkassabli

Differential Revision: D5144146

fbshipit-source-id: a5d711f8ad7049b0d96ee0f0f3eef1165ab3b4e8
2017-05-29 08:00:26 -07:00
Emil Sjolander adaa966272 Fix absolute positioning in reverse wrapping container
Reviewed By: gkassabli

Differential Revision: D5144145

fbshipit-source-id: da6ef999ec0aabacf499017d1cfa81fc8f66e4bd
2017-05-29 08:00:23 -07:00
Georgiy Kassabli 6be550d85c Changed pointScaleFactor usage to avoid accumulating error
Reviewed By: shergin

Differential Revision: D5137923

fbshipit-source-id: 652b59bc3da3f35ee93ffa3695936f623298a023
2017-05-26 11:03:06 -07:00
Pieter De Baets 03e1f40c1e Cleanup and document Value wrapper (retry)
Reviewed By: mhorowitz

Differential Revision: D5120975

fbshipit-source-id: 6e9c80a57fdcf7f3dad21d5521fb928b52c924c7
2017-05-26 04:17:19 -07:00
Kathy Gray 35b888dc11 Fix making loadScriptFromString always synchronous
Reviewed By: javache

Differential Revision: D5129620

fbshipit-source-id: a0ad5e2704fc38f4cdfe29187a2b59ba4b0ff61b
2017-05-25 16:47:06 -07:00
David Aurelio 9f81baa834 Switch ComponentScript/iOS to new Buck integration
Reviewed By: adamjernst

Differential Revision: D5121635

fbshipit-source-id: 7b7aaf70c54c1c232130afd34071adff9cbe54e1
2017-05-25 15:35:05 -07:00
Kathy Gray f46eaa30cf Provide sync vs async interface for bundle loading via parameter
Reviewed By: javache

Differential Revision: D5104317

fbshipit-source-id: ffacb57d85c24795a3acc2faba2ff5824cc739b2
2017-05-24 07:31:36 -07:00
Pieter De Baets d59fd9e419 Revert D5087565: Cleanup and document Value wrapper
Differential Revision: D5087565

fbshipit-source-id: 8168bda39fac9384264e9d849b205a2c1d37dcfa
2017-05-24 07:31:36 -07:00
Pieter De Baets 374d08b8e4 Cleanup and document Value wrapper
Reviewed By: mhorowitz

Differential Revision: D5087565

fbshipit-source-id: 21b15dc4c476d6ecd7c42f9334c6995fa43810c2
2017-05-24 06:30:51 -07:00
Georgiy Kassabli 2e24197da3 Fixing potential measure call with negative size value
Reviewed By: emilsjolander

Differential Revision: D5111534

fbshipit-source-id: 99f09b85f0c6a0e5dec89a26baba8f9d560100da
2017-05-23 11:16:27 -07:00
yihuang 130a82101c Fix right/bottom in absolute layout.
Summary:
1, Change bottom to be based� on height of parent.
2, Respect margin value when layout with right/bottom.
Closes https://github.com/facebook/yoga/pull/552

Differential Revision: D5102090

Pulled By: emilsjolander

fbshipit-source-id: dca291413ffc2027d7628f4c8b8eeeb0b4823bc2
2017-05-22 03:01:27 -07:00
yihuang cf5535b86f fix print edge value.
Summary: Closes https://github.com/facebook/yoga/pull/551

Differential Revision: D5069358

Pulled By: emilsjolander

fbshipit-source-id: 8a8f07043d43f9f2d846a645217a52913cffe31b
2017-05-21 06:50:00 -07:00
Pieter De Baets f98518c5f9 Add setPropertyAtIndex
Reviewed By: mhorowitz

Differential Revision: D5069708

fbshipit-source-id: f81542f9d752ff53acf3fb9d96bf71e60acecac3
2017-05-19 07:15:42 -07:00
Ashok Menon 056d075ef2 Fixing up header namespaces in ReactCommon
Reviewed By: mzlee

Differential Revision: D5079295

fbshipit-source-id: 03b848dedb41da900bb6ac69112bbb973a8a2595
2017-05-17 14:21:59 -07:00
Georgiy Kassabli c785763773 Fixing using flex in root node
Reviewed By: emilsjolander

Differential Revision: D5071164

fbshipit-source-id: b8afef42477d0ed87d0c9fcfd26349e0a0babd6e
2017-05-17 07:32:40 -07:00
Dmitry Zakharov f8b683b3ee Copy-free Source loading implementation
Reviewed By: amnn

Differential Revision: D4914165

fbshipit-source-id: 38851679cb696c41f59edfd0d2005faf37813b23
2017-05-15 09:15:29 -07:00
Georgiy Kassabli c4fb32fa40 Correct YGNodeCanUseCachedMeasurement to account for non-existent scale factor
Reviewed By: emilsjolander

Differential Revision: D5061016

fbshipit-source-id: 907ef987bd0ead29cf02f6945a3f03d4ffb58a2e
2017-05-15 08:49:38 -07:00
Georgiy Kassabli baf93e46d0 Adding ability to account for rounding in YGNodeCanUseCachedMeasurement
Reviewed By: emilsjolander

Differential Revision: D5059560

fbshipit-source-id: d729e991758a8c668a4b373105b71337961875cd
2017-05-15 06:23:45 -07:00
Pieter De Baets 6221053179 Improve systrace markers
Reviewed By: mhorowitz

Differential Revision: D4860135

fbshipit-source-id: ce963010883e6b9cc8e34f7ff01b4018cd195eba
2017-05-12 18:07:49 -07:00
Michael Lee fb99f55939 Fix compilation due to missing flag
Reviewed By: mhorowitz

Differential Revision: D5053975

fbshipit-source-id: cfb5e71d7c9c318fa1942ce9d4dc72b4f7c1e054
2017-05-12 13:31:24 -07:00
Emil Sjolander 0a4ce80868 Fix typo causing wrapped children to be sized by wrong axis margin
Reviewed By: passy

Differential Revision: D5044470

fbshipit-source-id: 7d203dd48b258a5fe5c4b3c493099092a1d334db
2017-05-12 09:18:56 -07:00
Emil Sjolander 67b96fc0ce Include margin when calculating if children overflow
Reviewed By: passy

Differential Revision: D5044471

fbshipit-source-id: e7c1eb694445ffb898bcf375d9deefc558c49f11
2017-05-12 09:18:56 -07:00
Emil Sjolander 54548894d0 Fix flex basis not accounting for max size constraint
Reviewed By: gkassabli

Differential Revision: D5044314

fbshipit-source-id: d9f9db832e4943a57a89c9d162ff6077b709795a
2017-05-12 09:18:56 -07:00
Pieter De Baets 6e2c07534e Fix Circle CI builds
Summary: Closes https://github.com/facebook/react-native/pull/13945

Differential Revision: D5052083

Pulled By: javache

fbshipit-source-id: eeda8253d26c2dfd0d20b93b238377fe92e3ca3c
2017-05-12 08:35:30 -07:00
Pieter De Baets afbab66a44 Define rn_xplat_cxx_library for OSS builds
Reviewed By: bestander

Differential Revision: D5044673

fbshipit-source-id: 41c9fe4b2ae128eed6f299dd8ea9dbfc4ca75917
2017-05-12 02:45:19 -07:00
Pieter De Baets 103f4ee01f Move JSBigString its own cxxreact target
Reviewed By: amnn

Differential Revision: D5020584

fbshipit-source-id: 9ba21c0231c3bb77973620669727205231a0b7a8
2017-05-11 09:01:30 -07:00
Georgiy Kassabli 70b7488f97 Adding node type and moving rounding dependency to rely on that type
Reviewed By: emilsjolander

Differential Revision: D5025107

fbshipit-source-id: a8d66e2f9c5d02ab080784cc474be583a09b92e2
2017-05-11 08:17:58 -07:00
Pieter De Baets 01460873da Move jschelpers to fb_xplat_cxx_library
Reviewed By: bestander

Differential Revision: D5035858

fbshipit-source-id: 110fc5140ee4930634ef2ac3453d0a84124516f9
2017-05-11 06:35:36 -07:00
Pieter De Baets 19e6557d2e Cleanup cxxreact BUCK file
Reviewed By: mzlee

Differential Revision: D5020563

fbshipit-source-id: 286a2d1c44623b5b9fd923ef8684d263500791b3
2017-05-11 05:04:02 -07:00
Ben Nham 65f22a5190 log script name with bundle loading perf event
Reviewed By: javache

Differential Revision: D5010638

fbshipit-source-id: 2e139201a8374245fa1dedc4f11a716dcf700fd7
2017-05-10 04:09:19 -07:00
Hoa Dinh 3dfed2e865 Explicitely export some symbols since they can be referenced from outside that library.
Differential Revision: D5024612

fbshipit-source-id: 6d75ebce9422c879bfc0acdb1159be72756a2f15
2017-05-08 19:48:47 -07:00
Maël Nison 7876ffec5e Fixes Travis error reporting
Summary:
Just cherry-picked my commit from #508
Closes https://github.com/facebook/yoga/pull/542

Differential Revision: D5002335

Pulled By: emilsjolander

fbshipit-source-id: 3f61a235c41627e9cfb90dce150323f11892e65f
2017-05-04 07:43:24 -07:00
Lukas Wöhrl 5f2edfcca5 Move YGLogger into YGConfig and associate YGNodeRef with log events
Summary:
Moves the `YGLogger` into `YGConfig` and pass the `YGNodeRef` into the logger to be able to associate the log messages and assertions with the specific node.

Tackles facebook/yoga#530 and facebook/yoga#446
Closes https://github.com/facebook/yoga/pull/531

Reviewed By: astreet

Differential Revision: D4970149

Pulled By: emilsjolander

fbshipit-source-id: b7fcdaa273143ea2fa35861620b2e4d79f04f0af
2017-05-03 09:30:55 -07:00
Theo Yaung ac74d2a38b Refactor interfaces
Reviewed By: johnislarry

Differential Revision: D4844786

fbshipit-source-id: f348b8d5078643636343f6ea099b200f519fbc40
2017-05-02 21:31:41 -07:00
Emil Sjolander d199d1d65a Fix useLegacyStretchBehaviour flag by simplifying its usage
Reviewed By: gkassabli

Differential Revision: D4977923

fbshipit-source-id: cb488e63c7c2e15e4c0f0133a16df36580c646fd
2017-05-01 04:45:20 -07:00
Emil Sjolander 1c0e3b8b5b Treat measured nodes size as a minimun contraint when rounding
Reviewed By: shergin

Differential Revision: D4972290

fbshipit-source-id: 0a7bcc7f47b3e5acb8745da5286abcb9c4e44a38
2017-04-30 03:16:37 -07:00
Lukas Wöhrl 992e37c8bc Fix sizing of non strech items
Summary:
Fixes the sizing of items so that under most scenarios it calcultes its height by it's content for non exact measurings. This introduces a new useLegacyStretchBehaviour flag on the config to opt out of this change as it is breaking.

See facebook/yoga#505
Closes https://github.com/facebook/yoga/pull/506

Reviewed By: astreet

Differential Revision: D4954016

Pulled By: emilsjolander

fbshipit-source-id: d28bd5d174cd76951fb94df85e3b0cfab7f81ff7
2017-04-28 06:18:30 -07:00
Emil Sjolander 00a0343a6d Revert D4957570: [yoga] Consolidate measure cache for layout nodes and leaf nodes
Differential Revision: D4957570

fbshipit-source-id: 4d30de37c6911aac2dc1243a54914515aabfb229
2017-04-28 04:04:14 -07:00
Emil Sjolander 6272ef87bc Consolidate measure cache for layout nodes and leaf nodes
Reviewed By: astreet

Differential Revision: D4957570

fbshipit-source-id: 5c5f39b67bd3f72d92b939ecee2d9a46c80b583f
2017-04-27 13:15:56 -07:00
Emil Sjolander 1a72d91cb2 Remove rounding from experimental features
Reviewed By: gkassabli

Differential Revision: D4953838

fbshipit-source-id: 3ee5f27d92f95b3ed4a01c98bc35e9157f2e91c5
2017-04-27 07:27:26 -07:00
Lukas Wöhrl 925ec01e01 Let measure behave more like on the web
Summary:
Nodes with a measure function needs to be measured even so it seems there is no available space. So it behaves more like on the web. Fix facebook/yoga#488
Closes https://github.com/facebook/yoga/pull/499

Reviewed By: astreet

Differential Revision: D4954008

Pulled By: emilsjolander

fbshipit-source-id: 5b6d9afae0cdebe33f8b82b67620b3b4527d1efc
2017-04-27 07:27:26 -07:00
Cheng Zhao f71e3b80b9 Add YGConfigCopy
Summary: Closes https://github.com/facebook/yoga/pull/525

Differential Revision: D4953723

Pulled By: emilsjolander

fbshipit-source-id: 1c54f40dfae5054822a440edf9d0aafb22a465d9
2017-04-26 12:00:49 -07:00
Lukas Wöhrl c660d0c836 Fix flex-wrap with max constraint
Summary:
Fixes `flex-wrap` with a max constraint and `justify-content`. Fixes facebook/yoga#514.
Closes https://github.com/facebook/yoga/pull/519

Differential Revision: D4953727

Pulled By: emilsjolander

fbshipit-source-id: 32dec48220be1392ea8dac5f34871d407eb8d49b
2017-04-26 11:31:56 -07:00
Valentin Shergin a8fa904179 New round-to-pixel-grid algorithm that fixes possible subpixel gaps between sibling nodes
Reviewed By: emilsjolander

Differential Revision: D4941266

fbshipit-source-id: 07500f5cc93c628219500e9e07291438e9d5d36c
2017-04-25 17:30:40 -07:00
Pieter De Baets 34bc6bd2ae Drop support for webworkers
Reviewed By: AaaChiuuu

Differential Revision: D4916449

fbshipit-source-id: a447233d3b7cfee98db2ce00f1c0505d513e2429
2017-04-25 05:37:54 -07:00
Alexey Lang 1bc9d448f5 Port perf metrics used in RCTBatchedBridge
Reviewed By: javache

Differential Revision: D4938279

fbshipit-source-id: c927261ff96c2eb07b7303ae96aae7600f2947f1
2017-04-25 02:32:25 -07:00
Georgiy Kassabli 6b0c72fa82 Correcting Flex fix within Experimental feature
Reviewed By: emilsjolander

Differential Revision: D4915189

fbshipit-source-id: efccee2fe39ed0f474a41dc3250d24c546f3f5d9
2017-04-19 13:29:59 -07:00
George Xu c29449d573 Revert D4875343: Correct fix for flexing grandchildren
Differential Revision: D4875343

fbshipit-source-id: 2949762bf47e151c8c0ff923d501859b3e0a567a
2017-04-13 18:09:30 -07:00
Emil Sjolander 569525d6e4 Revert D4850458: [yoga][PR] Let measure behave more like on the web
Differential Revision: D4850458

fbshipit-source-id: 2ecb6c8627a84b52ade968fd18331a7473369ebe
2017-04-13 15:45:37 -07:00
Emil Sjolander c3dc6a0f0e Revert D4878875: [yoga][PR] Fix sizing of non strech items
Differential Revision: D4878875

fbshipit-source-id: 8927438e7a1969deb617434369af53f71f625638
2017-04-13 10:01:55 -07:00
Lukas Wöhrl 62360e8981 Let measure behave more like on the web
Summary:
Nodes with a measure function needs to be measured even so it seems there is no available space. So it behaves more like on the web. Fix facebook/yoga#488
Closes https://github.com/facebook/yoga/pull/499

Differential Revision: D4850458

Pulled By: emilsjolander

fbshipit-source-id: be5e35a670ddcbf3cd426fc3c2a0c9b60a874cdc
2017-04-13 08:49:43 -07:00
Georgiy Kassabli 831ad4adc6 Correct fix for flexing grandchildren
Reviewed By: emilsjolander

Differential Revision: D4875343

fbshipit-source-id: 634e961f9798dff43eae2c6564b28c6629b816e0
2017-04-13 08:49:43 -07:00
Lukas Wöhrl a82de9509f Fix sizing of non strech items
Summary:
Fixes the sizing of items so that under most scenarios it calcultes its height by it's content for non exact measurings. See facebook/yoga#505
Closes https://github.com/facebook/yoga/pull/506

Differential Revision: D4878875

Pulled By: emilsjolander

fbshipit-source-id: ab1174ac7a76dcf20aae7b29a3bc396e11077c4d
2017-04-13 07:57:21 -07:00
Lukas Wöhrl f26a99764a Fix min constraint incorrectly reducing available space
Summary:
If a min constraint exists. It incorrectly reduces the available space by that amount. This adds a test and fix for this.
Closes https://github.com/facebook/yoga/pull/501

Differential Revision: D4867146

Pulled By: emilsjolander

fbshipit-source-id: ceafe070bfe7f501929d316656ac44c4e1753059
2017-04-11 13:09:38 -07:00
Lukas Wöhrl f7fe9a6219 Fix position on root node with RTL direction
Summary:
If the root node has a position and we have a RTL layout, that position must be like LTR direction. See #477.
Closes https://github.com/facebook/yoga/pull/502

Differential Revision: D4867144

Pulled By: emilsjolander

fbshipit-source-id: b5ad3d87e7054090da12d7665a3d1abe8496a548
2017-04-11 13:09:38 -07:00
Kazuki Sakamoto ecd0df01af Add YGConfigGetInstanceCount
Summary:
- depends on #496
- For memory leak unit test
- Expose the API for C#
Closes https://github.com/facebook/yoga/pull/497

Reviewed By: emilsjolander

Differential Revision: D4796190

Pulled By: splhack

fbshipit-source-id: 99e4e78e8dfb3d459cf6cd7103ab252c3748e5a6
2017-04-10 14:24:25 -07:00
Pieter De Baets f3dfd616f4 Allow lazy Cxx modules to not initialize
Reviewed By: mhorowitz

Differential Revision: D4851596

fbshipit-source-id: cf5f5c51b9aaa0da96f7ab6fba1277b72c988400
2017-04-08 15:18:08 -07:00
Pieter De Baets b2647ea335 Allow ModuleRegistry initialization to complete lazily
Reviewed By: mhorowitz

Differential Revision: D4794794

fbshipit-source-id: f3b7a5d02587b4cd4e214aa6b0368a0d214fb63f
2017-04-07 09:30:33 -07:00
Martin Kralik 5f37483466 Revert D4840716: Refactor interfaces
Differential Revision: D4840716

fbshipit-source-id: 1b6a6050d78ccbbd3c817621df1c1c989594fdb1
2017-04-06 06:03:10 -07:00
Theo Yaung fd99330b6c Refactor interfaces
Reviewed By: johnislarry

Differential Revision: D4840716

fbshipit-source-id: 1a82437c81ce5b767efd39ab0716998bab4f5363
2017-04-06 00:04:06 -07:00
Eric Vicenti 67e54f8bdb Add YGEnums to fix gradle build
Summary:
Attempt to fix CircleCI build by adding YGEnums to the yoga gradle file
Closes https://github.com/facebook/react-native/pull/13296

Differential Revision: D4827856

Pulled By: ericvicenti

fbshipit-source-id: cb03af77919c811d06352fbe0b77084e97d2e6c1
2017-04-04 12:01:43 -07:00
Pieter De Baets c128612c5c A proxy so a singleton CxxModule can be shared by multiple ModuleRegistry instances.
Reviewed By: mhorowitz

Differential Revision: D4814438

fbshipit-source-id: db6cdd9e948643bb24a443bd45b7b0843a0a86c2
2017-04-04 10:36:19 -07:00
Lukas Wöhrl 0ec984e69a Optimize log print by using html format
Summary:
See facebook/yoga#453. Optimizes the node log print by generating some enum text via ```enum.py``` and moving printing to new functions to reduce boilerplate code.

Changes the log output to format the nodes in html to be able to copy paste it  into browsers for quick debugging.

Hides all default values.
Closes https://github.com/facebook/yoga/pull/479

Reviewed By: gkassabli

Differential Revision: D4802184

Pulled By: emilsjolander

fbshipit-source-id: 143bd63cbc31fb0755d711062cb4e6a448049ba3
2017-04-03 09:45:47 -07:00
Emil Sjolander 673093eed0 Set web defaults when resetting
Reviewed By: astreet

Differential Revision: D4779742

fbshipit-source-id: 5b8c5d7bd432a12984e4ebfd3187da3d680272cd
2017-03-29 03:17:28 -07:00
Emil Sjolander 4bf2d8cb7d Set hasNewLayout on children when changing their layout due to display none parent
Reviewed By: astreet

Differential Revision: D4786615

fbshipit-source-id: 2f3a16661d37bc37939e8e7a551445886a06524e
2017-03-28 12:47:51 -07:00
Pieter De Baets ff7fb6efda Allow overrides of NativeModules
Reviewed By: mhorowitz

Differential Revision: D4764126

fbshipit-source-id: 036f848f8b3debbb3cc4a34fc99044304615760e
2017-03-24 05:04:05 -07:00
Michael Lee dcf3cbeb31 Clean up some of the ReactNative Buck rules
Reviewed By: yangchi

Differential Revision: D4739284

fbshipit-source-id: 0ee335df0d114631e5fc60d5d6e51547e5312d39
2017-03-23 12:02:25 -07:00
Pieter De Baets 9d377e98a0 Fix warnings in React.xcodeproj
Summary:
Various fixes of xcode projects and cleaning up some warnings
Closes https://github.com/facebook/react-native/pull/13109

Differential Revision: D4762652

Pulled By: lacker

fbshipit-source-id: b452976a58962439de4adecc8e703264af40cb38
2017-03-23 11:36:17 -07:00
Pieter De Baets 314ec87269 Remove unused CxxMessageQueue
Differential Revision: D4713064

fbshipit-source-id: 511b782279b89076228f00290e78ed155e2e723e
2017-03-21 12:46:27 -07:00
Marc Horowitz 6dc3a83e88 Don't load native module support as part of the initial CS bundle
Reviewed By: javache

Differential Revision: D4720386

fbshipit-source-id: cd8b6137aaff2d907adf089060bf7d356cd2f437
2017-03-20 13:25:33 -07:00
Adam Ernst 47d2cfeac5 Whitelist some stuff in React
Reviewed By: mzlee

Differential Revision: D4731968

fbshipit-source-id: 1d1ae12a50beef4cd024a467427ec3b6cd446f4c
2017-03-19 14:01:09 -07:00
Eloy Durán 09b8ef41e1 Fix issue with whitespace in path to source and stabilise CI.
Summary:
* Fixes issue where headers could not be found due to whitespace in an unquoted header search path. https://github.com/facebook/react-native/issues/11781#issuecomment-287176373
* Stabilises CI but not needing to download the source for Yoga, but use the existing cloned repo instead.

/cc mkonicek
Closes https://github.com/facebook/react-native/pull/13007

Differential Revision: D4735347

fbshipit-source-id: 933aefcb0e65537d2e759d25f4e3b81cdf4b8cb5
2017-03-18 12:31:37 -07:00
Emil Sjolander b956c111d8 Revert D4716024: [yoga] Avoid transfering cached layout information to java
Differential Revision: D4716024

fbshipit-source-id: 7276b4bbf072aa444c5ae9fd1a3d62ea87a0cec1
2017-03-17 13:30:26 -07:00
Emil Sjolander f0240e004a Avoid transfering cached layout information to java
Reviewed By: astreet

Differential Revision: D4716024

fbshipit-source-id: c30763a6fc7426d653c7a6ca129615cddb4140e9
2017-03-17 09:20:52 -07:00