Pritesh Nandgaonkar
f0490d1217
Refactored relativePosition private method to YGFloatOptional return type
...
Reviewed By: emilsjolander
Differential Revision: D7344939
fbshipit-source-id: 72443d38426a211d3e84be814e6a61baf4d26703
2018-04-04 08:31:53 -07:00
Pritesh Nandgaonkar
de70bc74d5
Change the type of getTrailingPosition to YGFloatOptional
...
Reviewed By: emilsjolander
Differential Revision: D7344710
fbshipit-source-id: eb4c422b6e0f55d90b083221aa8ff1ab797d58a8
2018-04-04 08:31:52 -07:00
Pritesh Nandgaonkar
f3c2ab306c
Changed the type of return value of getLeadingPosition to YGFloatOptional
...
Reviewed By: emilsjolander
Differential Revision: D7344367
fbshipit-source-id: 0f5a667ca357b2ce056c86763aa3e9e4c54b82f0
2018-04-04 08:31:52 -07:00
Pritesh Nandgaonkar
0186ccf006
Changed the type of computedFlexBasis to YGFloatOptional in YGLayout
...
Reviewed By: emilsjolander
Differential Revision: D7340413
fbshipit-source-id: 39247b2b582a682e602f49f58b4bbd2bf0c995af
2018-04-04 08:31:52 -07:00
Pritesh Nandgaonkar
fe3a9d4013
Fixed types of getLeadingPaddingAndBorder and getTrailingPaddingAndBorder to YGFloatOptional
...
Reviewed By: emilsjolander
Differential Revision: D7339998
fbshipit-source-id: aa24335c2db1cd895b9711214b72195add718c32
2018-04-04 08:31:52 -07:00
Pritesh Nandgaonkar
ee0d621d2a
Changed the return type of trailing padding to YGFloatOptional
...
Reviewed By: emilsjolander
Differential Revision: D7339712
fbshipit-source-id: 483c5886838c14b17cb731c81abb9fc80f519956
2018-04-04 08:31:52 -07:00
Pritesh Nandgaonkar
51f5cd4810
Updated the implementation of leading padding
...
Reviewed By: emilsjolander
Differential Revision: D7336690
fbshipit-source-id: b2a2f010026f26fc2cc9fb35ad921da8f7017c9f
2018-04-04 08:31:52 -07:00
Pritesh Nandgaonkar
20e5193207
Make the return type of YGNodeBoundAxisWithinMinAndMax to YGFloatOptional
...
Reviewed By: emilsjolander
Differential Revision: D7323382
fbshipit-source-id: 8e3eb4f3744b5f3f9e2b353f56184905f7557191
2018-04-04 08:31:52 -07:00
Pritesh Nandgaonkar
dbb2c6b0fd
Remove the use of YGUnwrapOptional from YGConstrainedMaxSizeForMode
...
Reviewed By: emilsjolander
Differential Revision: D7322743
fbshipit-source-id: d825c60bcdc9ecdc0c784a215dc6b1b8a7a7860e
2018-04-04 08:31:52 -07:00
Pritesh Nandgaonkar
2ace555972
Made the acccessors method to return const references
...
Reviewed By: emilsjolander
Differential Revision: D7321801
fbshipit-source-id: 9fc4da724bc2f58a0d95824ca3c0b5bf1690bccf
2018-04-04 08:31:52 -07:00
Lukas Wöhrl
d4add3fc1c
Fix float type mismatch on endOfLineIndex and inside rounding
...
Summary:
This PR fixes a type mismatch on `endOfLineIndex` where it should be of type `uint32_t` while it is of type `float`
Additonally it fixes some `double` casting in the rounding methods.
Closes https://github.com/facebook/yoga/pull/745
Differential Revision: D7494519
Pulled By: emilsjolander
fbshipit-source-id: 30a86574ce163458a6888f61a902d0640c1874fb
2018-04-04 06:49:19 -07:00
Pritesh Nandgaonkar
f84f4fd04a
Changed the return type of YGResolveValueMargin to YGFloatOptional
...
Reviewed By: emilsjolander
Differential Revision: D7304090
fbshipit-source-id: cbec03a9367cf34976d083ad475d4da0b736e6d2
2018-04-03 15:02:57 -07:00
Pritesh Nandgaonkar
63c073d994
Move equaltiy function from utils to an operator on YGFloatOptional
...
Reviewed By: emilsjolander
Differential Revision: D7303460
fbshipit-source-id: 41ec0076ace621ec1a5bdbab00b72eea57780fff
2018-04-03 15:02:57 -07:00
Pritesh Nandgaonkar
bcd12f1e87
Change the type of aspect Ratio to YGFloatOptional
...
Reviewed By: emilsjolander
Differential Revision: D7302651
fbshipit-source-id: 53e3b4c9627207a379f927b1f3485e36a9c70601
2018-04-03 15:02:57 -07:00
Pritesh Nandgaonkar
e5a4d59244
Remove the usage of YGUndefined for kYGValueAuto and fix setter and getter of dimensions
...
Reviewed By: emilsjolander
Differential Revision: D7302453
fbshipit-source-id: e002a1ddd75bfc6fe142a7275e7913c064972e16
2018-04-03 15:02:56 -07:00
David Vacca
5be4ff0261
Extend Yoga to be able clone Yoga Node with new children
...
Reviewed By: emilsjolander
Differential Revision: D7245421
fbshipit-source-id: 72578c8261f29e4a12fc6c72a91f2f891cd58d48
2018-04-01 18:32:12 -07:00
David Vacca
29ff30c539
Rename YogaNode.parent -> YogaNode.owner
...
Reviewed By: priteshrnandgaonkar
Differential Revision: D7352778
fbshipit-source-id: dcf1af5e72bfc3063b5c4bda197d7952a9194768
2018-04-01 18:32:12 -07:00
David Vacca
aff5a75d8e
Refactor cloning of YogaNode
...
Reviewed By: priteshrnandgaonkar
Differential Revision: D7339832
fbshipit-source-id: 2de6f47ae7601ac083d3b9fbe10ffaf6307ae760
2018-04-01 18:32:12 -07:00
Valentin Shergin
1f27098a1a
Fabric: Proper Yoga node dirting in YogaLayoutableShadowNode
...
Summary: Any change must be propagate upwards.
Reviewed By: mdvacca
Differential Revision: D7389058
fbshipit-source-id: 09c74640d0e9607d2e17bdd31d7ce69df8565f72
2018-03-30 12:25:51 -07:00
Héctor Ramos
979c01ed2d
Build yoga in OSS
...
Differential Revision: D7417644
fbshipit-source-id: 2641c1abc1083db83cbb304f8dcc7b781e329041
2018-03-27 15:19:20 -07:00
Valentin Shergin
99e9c6e798
Fabric: Collecting and printing ShadowNode's revision/generation
...
Summary: It drastically simplifies reading logs.
Reviewed By: fkgozali
Differential Revision: D7388963
fbshipit-source-id: 7849c803f295719918c20ddf8c082e5a5780116f
2018-03-25 22:48:19 -07:00
Valentin Shergin
cb7a7f3b93
Fabric: Deleted virtual default destructor from Props
...
Summary: Trivial. We don't need this because we already have another virtual method.
Reviewed By: fkgozali
Differential Revision: D7388964
fbshipit-source-id: 5ea6eb33ece72796d8cde2cc4b12c1240447d22a
2018-03-25 22:48:18 -07:00
Valentin Shergin
6f17e3b328
Fabric: Introducing TreeMutationInstruction
...
Summary: The Great Diffing algorithm is coming.
Reviewed By: fkgozali
Differential Revision: D7376528
fbshipit-source-id: bdfef69551980136cfd1717a11ae376d5eef126b
2018-03-25 22:48:18 -07:00
Valentin Shergin
53dfbcc81c
Fabric: Fixed bug in node management in FabricUIManager
...
Summary: Suddenly, `{}` means `{nullptr}`, not `empty list`.
Reviewed By: mdvacca
Differential Revision: D7376347
fbshipit-source-id: 76f81eebe046ae592f0a42be7bcaa0587732c2a9
2018-03-25 22:48:18 -07:00
Valentin Shergin
5642514aa5
Fabric: Detailed looging in FabricUIManager
...
Summary: Apparently, we need this.
Reviewed By: mdvacca
Differential Revision: D7376350
fbshipit-source-id: 11d8ad54c7439e6c19a739ae1ac31af90d37166a
2018-03-25 22:48:18 -07:00
Valentin Shergin
ee0cc6bbe7
Fabric: Implementing cloneAndReplaceChild() for ViewShadowNode
...
Summary:
First, LayoutableShadowNode::cloneAndReplaceChild() is now pure virtual. The default implementation was useless and confusing.
Second, cloneAndReplaceChild() is now fully implemented for ViewShadowNode, so fancy Yoga Concurrent layout *should* work now.
Reviewed By: mdvacca
Differential Revision: D7376352
fbshipit-source-id: 1199a37e64535c8592a2a5480e60139f61d02006
2018-03-25 22:48:18 -07:00
Valentin Shergin
8f9212b839
Fabric: Fixed lost YogaNode's context in YogaLayoutableShadowNode
...
Summary: We replace yogaNode with newly creaded (by Yoga) one. So, we have to set up context.
Reviewed By: mdvacca
Differential Revision: D7376345
fbshipit-source-id: 7926a10e3f057fc385e7731c354827aeb8245760
2018-03-25 22:48:18 -07:00
Valentin Shergin
1bb6db36be
Fabric: Removed unused copy constructor YogaLayoutableShadowNode()
...
Summary: Trivial. We don't use it, and it shouldn't be exist by desing.
Reviewed By: mdvacca
Differential Revision: D7376351
fbshipit-source-id: 22f03af2b3596c274a22bab1fab6d8af854a7374
2018-03-25 22:48:18 -07:00
Valentin Shergin
53782eafc9
Fabric: Source shadow node is now stored as a weak pointer
...
Summary:
We use shource nodes only in the diffing alogorithm. It implies that we have strong pointers to those nodes in trees we compare against.
Using weak_ptr's allows to avoid memory leaks.
Reviewed By: mdvacca
Differential Revision: D7376348
fbshipit-source-id: 34e5f58f18a00475f6bcdfbea3996b41c84dff62
2018-03-25 22:48:18 -07:00
Jonathan Dann
2cc75f7d47
Add YGNodeSetChildren(), YGNodeTraversePreOrder()
...
Reviewed By: Woody17
Differential Revision: D7360203
fbshipit-source-id: 32df8e1213ead03bc0a026ec4bf453bc799bb9ce
2018-03-25 14:35:04 -07:00
Kevin Gozali
1acef45977
iOS: added placeholder test setup for fabric graphics/uimanager/view targets
...
Reviewed By: shergin
Differential Revision: D7390366
fbshipit-source-id: d49fcc335fc03d52402676341f1da24177c6084b
2018-03-23 22:22:20 -07:00
Kevin Gozali
408a5f264b
iOS: added fabric/core ComponentDescriptor tests
...
Summary: Basic test for ComponentDescriptor mechanism.
Reviewed By: shergin
Differential Revision: D7388297
fbshipit-source-id: 3b0c625656e31df03d71a2e036388621a5e2e21d
2018-03-23 17:32:52 -07:00
Kevin Gozali
e254474d4c
iOS: added fabric/core ShadowNode tests
...
Summary: basic tests for shadow nodes and props for fabric
Reviewed By: shergin
Differential Revision: D7377867
fbshipit-source-id: dc8e5bb369aeb32b4790fd8b56f333376bc1578c
2018-03-23 17:32:52 -07:00
Kevin Gozali
8c0070c706
iOS: added fabric/core primitives tests
...
Summary: basic tests for fabric core primitives
Reviewed By: shergin
Differential Revision: D7373952
fbshipit-source-id: e2d9b3c15716c16b1aab698883817e670dcb7a57
2018-03-23 17:32:52 -07:00
Kevin Gozali
10c95a25cc
fixed contacts for the test target
...
Reviewed By: mdvacca
Differential Revision: D7366977
fbshipit-source-id: 93341f8964da71a7e23049fc5d2324a0da376746
2018-03-22 10:49:44 -07:00
Kevin Gozali
6ae38feb65
Added sample iOS unit test setup for fabric/debug target
...
Summary: basic setup for unit testing Fabric impl
Reviewed By: hramos
Differential Revision: D7359239
fbshipit-source-id: ccaf36e775036f2fad4d8c882bce86bbbe06dd28
2018-03-21 16:40:06 -07:00
Kevin Gozali
f015900d30
fixed debug string formatting for structure
...
Summary:
Fixed minor issue:
* use double spaces instead of a tab character for indentation
* depth should increase by 1, not 2
Reviewed By: shergin
Differential Revision: D7332803
fbshipit-source-id: 74fda2c7a4be4f509270d3074a7d71a3d4d32fe4
2018-03-21 16:40:06 -07:00
Jonathan Dann
cb3103ce09
Mark more member functions as const
...
Reviewed By: priteshrnandgaonkar
Differential Revision: D7291364
fbshipit-source-id: 2e7d96cfe0345692ffa411bb21a80eb7a859880b
2018-03-21 16:40:06 -07:00
Jonathan Dann
ed0ba1bfc7
Pass some constructor argumetns by const-reference
...
Reviewed By: priteshrnandgaonkar
Differential Revision: D7291363
fbshipit-source-id: 22e606d0b3fa1133d7e0334c8cf9f5f1f32fe64b
2018-03-21 16:40:06 -07:00
Jonathan Dann
0b085a80bd
Pass-by-reference in YGNode::setStyle() ::setChildren() ::setLayout()
...
Reviewed By: priteshrnandgaonkar
Differential Revision: D7291096
fbshipit-source-id: 7a4025831811d622050adbb5f86608855b94d68e
2018-03-21 16:40:06 -07:00
Orta
cf036dbc7a
Updates Yoga to handle being in a Xcode framework project
...
Summary:
Updates the Yoga Podspec to work with Cocoa frameworks. Replicated a2's work over on Yoga https://github.com/facebook/yoga/pull/726
(Which should also get merged too please ❤️ )
Set it manually in my own project and tested 👍
Only https://github.com/facebook/yoga/pull/726
[IOS] [BUGFIX] [Yoga] - Fixes to yoga.podspec when integrating into an iOS app using Cocoa frameworks.
Closes https://github.com/facebook/react-native/pull/18492
Differential Revision: D7355907
Pulled By: hramos
fbshipit-source-id: 6986d2bc560a23bb7f0f20b80e88bb440079891a
2018-03-21 14:15:33 -07:00
Valentin Shergin
b808bfdce2
Fabric: Introducting ShadowNode.sourceNode
, the node used in copy-constructor
...
Summary: We will need this later in the diffing alogrithm.
Reviewed By: fkgozali
Differential Revision: D7330337
fbshipit-source-id: 3da44a62e4d5f30deed28b18a5779544153244f3
2018-03-19 17:08:31 -07:00
Valentin Shergin
39383d1189
Fabric: Improved YogaLayoutableShadowNode printing
...
Summary: `LTR` is actually a default value for `direction` here, because an `inherit` value makes no sense for YGLayout (because it's *computed* value by definition).
Reviewed By: fkgozali
Differential Revision: D7330335
fbshipit-source-id: b3c7736c104689f2296e150f0cf57d622483d537
2018-03-19 17:08:31 -07:00
Valentin Shergin
ff288b7416
Fabric: Complete implementation of layoutMetricsFromYogaNode
...
Summary: That was simply incomplete.
Reviewed By: fkgozali
Differential Revision: D7330336
fbshipit-source-id: c495c7f61d8e551fa963bfa6cc0408343eb8439b
2018-03-19 17:08:31 -07:00
Valentin Shergin
a5a34565e0
Fabric: Proper return value of LayoutableShadowNode::setLayoutMetrics()
...
Summary: `LayoutableShadowNode::setLayoutMetrics()` must return `false` is nothing was changes.
Reviewed By: fkgozali
Differential Revision: D7330334
fbshipit-source-id: 700d50b0047919fa2b919acfa72825f100cd496f
2018-03-19 17:08:31 -07:00
Valentin Shergin
aaaa946e6d
Fabric: Equality operators for geometry types
...
Summary: We will need this soon.
Reviewed By: fkgozali
Differential Revision: D7330338
fbshipit-source-id: 30aeadc182893e86c6a039c74d245f9b56624151
2018-03-19 17:08:31 -07:00
Naris Siamwalla
12535ae69d
Fix clang-6 strictness surrounding virtual destructors
...
Reviewed By: smeenai
Differential Revision: D7326765
fbshipit-source-id: 9df477dfa89812e05e79b5e6d510bcbbc793381c
2018-03-19 15:00:09 -07:00
Kevin Gozali
f42b5892a1
iOS C++: Add ICxxExceptionManager to access RCTExceptionsManager native module
...
Summary: It is sometimes useful to report soft/fatal errors from C++ (native) to the same RCTExceptionsManager that is already handling JS exceptions. `ICxxExceptionManager` is an approach to provide such access, which impl provided for ObjC++.
Reviewed By: shergin
Differential Revision: D7224944
fbshipit-source-id: 8c607226b67851d46f4c787f5b6e6c8cb6a1afea
2018-03-19 00:06:57 -07:00
Valentin Shergin
378da73201
DebugStringConvertibleOptions: Formating
...
Summary:
DebugStringConvertibleOptions allows pretty-format debug strings.
https://pxl.cl/ch0m
Reviewed By: fkgozali
Differential Revision: D7312622
fbshipit-source-id: 0ed62520bbc521790bedf5a6d18c796b42f85658
2018-03-18 19:17:39 -07:00
Valentin Shergin
4cda0df2e5
Switching to the new FabricUIManager and all new shadow tree infra
...
Reviewed By: fkgozali
Differential Revision: D7230670
fbshipit-source-id: bca7d2859b87931c0d15406782b7d689de1d8c36
2018-03-18 19:17:39 -07:00