Граф коммитов

324 Коммитов

Автор SHA1 Сообщение Дата
Emil Sjölander ee6b0d6658 Fix aspect ratio when stretching with main axis margin (#834)
Summary:
I've noticed that when a child's size is determined by `align-items: stretch` in combination with `aspect-ratio` its size is wrongly calculated to account for margin in the main axis when there is more than enough space.

See playground: https://goo.gl/tgW6cD

I've yet to figure out exactly how to solve this but i've started by writing a failing test when can be seen in the first commit here.

I assumed I had found the bug here https://github.com/facebook/yoga/blob/master/yoga/Yoga.cpp#L1838 where margin is being subtracted from the desired width even though the measure mode tells it to measure to exactly that size. However, if we don't remove this margin from the available width then 15 tests fail (including the one I just added) not quite figured out why yet. I'm also a bit confused at to why this would only happen for nodes with `aspect-ratio` and not for nodes where an explicit height and width is set.
Pull Request resolved: https://github.com/facebook/yoga/pull/834

Reviewed By: astreet

Differential Revision: D13223579

Pulled By: davidaurelio

fbshipit-source-id: 6970e6072e79f3bb6f9097355ab6e441441bfd88
2018-12-10 09:23:01 -08:00
David Aurelio 90f582ffb9 Back out Stack D13119110..D13236159
Summary: backout, causes failures

Reviewed By: adityasharat

Differential Revision: D13376210

fbshipit-source-id: 1fa8823f2dce601c47738f34ddb2674288197e79
2018-12-07 13:01:28 -08:00
David Aurelio 8f6521aacf Don't pass `std::string` by pointer
Summary:
@public

Pass strings by mutable ref rather than pointer.

Reviewed By: SidharthGuglani

Differential Revision: D13236159

fbshipit-source-id: 04fd35e8a9e106ba8cdd71cfab31e8d90edaac9e
2018-12-06 07:38:44 -08:00
David Aurelio 32d5da2eb8 Use bitfields for enum members of `YGStyle`
Summary:
@public

Puts all enum fields of `YGStyle` into bitfields. This saves 36 bytes (> 3%) per node.

Reviewed By: SidharthGuglani

Differential Revision: D13233686

fbshipit-source-id: 3ef7e0d6913f0254806acb942d9a9f5b78a5af9c
2018-12-06 07:38:44 -08:00
David Aurelio 32bc724fb0 Remove templates for setting/getting style properties
Summary:
@public

Replaces the `StyleProp` template with a simple setter macro / inlined getter code.

The template was introduced to replace more extensive macros that would generate function signatures, too.
Here, we keep the spirit of that change by only generating function bodies.

Reviewed By: SidharthGuglani

Differential Revision: D13233687

fbshipit-source-id: 218a7d5edb489b43a66c8c9d6156f74feefd2227
2018-12-06 07:38:44 -08:00
David Aurelio f9c575e352 `YGNodeBoundAxisWithinMinAndMax` accepts `YGFloatOptional`
Summary:
@public

Saves some calls to `.unwrap()`

Reviewed By: SidharthGuglani

Differential Revision: D13209153

fbshipit-source-id: 5658586e91496085f39b3522db6364aaeafcfe2f
2018-12-06 07:38:44 -08:00
David Aurelio 94ab9b429c inline `YGUnwrapFloatOptional`
Summary:
@public
Replaces C-style function call with C++ method invokation.

Reviewed By: SidharthGuglani

Differential Revision: D13209154

fbshipit-source-id: 14e650af4655efb3a659f3cd949a11df773aabcf
2018-12-06 07:38:44 -08:00
David Aurelio 517d07ddcf Remove unnecessary `static` keyword
Summary:
@public

Header-declared inline functions shouldn’t be decleared `static`

Reviewed By: SidharthGuglani

Differential Revision: D13209156

fbshipit-source-id: e2d643a67e6f6c33c96dc71b0a90d00bd9b6f36f
2018-12-06 07:38:44 -08:00
David Aurelio fa171b4fe7 Get rid of `static_cast` in `YGResolveValue`
Summary:
@public

Removes `static_cast` from `YGResolveValue`

Reviewed By: SidharthGuglani

Differential Revision: D13209155

fbshipit-source-id: 76c27c89f6217af9dfef9e2620d639c9f3e212f5
2018-12-06 07:38:43 -08:00
David Aurelio ceb6602422 Inline `YGFloatOptional` completely
Summary:
@public
`YGFLoatOptional` only contains trivial functionality. Make it header-only.

Reviewed By: SidharthGuglani

Differential Revision: D13209151

fbshipit-source-id: 3ecca015fa0ac6644ae694b44bc53d840fbc5635
2018-12-06 07:38:43 -08:00
David Aurelio a7757f6e5d Pass `YGFloatOptional` by value, not reference
Summary:
@public

`YGFloatOptional` is a 32bit type now, and can be passed by value efficiently.

Reviewed By: SidharthGuglani

Differential Revision: D13209150

fbshipit-source-id: c7b937a640258256c97e082ba2f832754e191b9a
2018-12-06 07:38:43 -08:00
David Aurelio 4157a49d8d Eliminate `YGFloatOptional::getValue()`
Summary:
@public

`YGFloatOptional::getValue()` has the unfortunate property of calling `std::exit` if the wrapped value is undefined.
That forces `x.isUndefined() ? fallback : x.getValue()` as access pattern.

Here, we replace that by introducing `YGFloatOptional::orElse(float)` which encapsulates that pattern. Other additions are `orElseGet([] { … })` and some extra operators.

Reviewed By: SidharthGuglani

Differential Revision: D13209152

fbshipit-source-id: 4e5deceaaaaf8eaed44846a8c152cc8b235e815c
2018-12-06 07:38:43 -08:00
David Aurelio cb7a9b2057 Store `YGFloatOptional` in 32 bits
Summary:
@public

After removing `-ffast-math`, `NaN` can again be used to represent `undefined`. That allows us to remove the additional flag from `YGFloatOptional`, and reduce memory usage.

Reviewed By: SidharthGuglani

Differential Revision: D13209157

fbshipit-source-id: 21b83c837a78f924a4ec23a9236ca2440b3c8606
2018-12-06 07:38:43 -08:00
David Aurelio e1c651340b Make equality operator for `YGValue` inlineable
Summary:
@public

Makes `operator==` for `YGValue` an inline function.

Reviewed By: SidharthGuglani

Differential Revision: D13189356

fbshipit-source-id: 7fe61035acf635e22ebb1a1071925d6b3dad0616
2018-12-06 07:38:43 -08:00
David Aurelio c37826a933 Move out `YGValue`
Summary:
@public

Creates a single header file for `YGValue`. This is in preparation of a more compact representation of `YGValue` within `YGStyle`.

Also fixes the incorrect definition of NAN.

Reviewed By: SidharthGuglani

Differential Revision: D13172444

fbshipit-source-id: 4250dbcf8fe15ec3ecdee3913360a73bab633ce3
2018-12-06 07:38:43 -08:00
David Aurelio 57a38263bf Roll back `-ffast-math`
Summary:
@public

`-ffast-math` does not have measurable performance benefits.

By using `NaN` for *undefined* values again, we can squeeze `YGFloatOptional` into 32 bits.
This will also enable us to store `YGValue` (or a variant of it) in 32 bits.

Reviewed By: SidharthGuglani

Differential Revision: D13119110

fbshipit-source-id: 4e6964240bf74ebc22d8783107b89d536a1a0842
2018-12-06 07:38:43 -08:00
David Aurelio ea734dcfbf Adjust yearless format for MIT license
Summary:
@public

Adjust license headers throughout the project

Reviewed By: SidharthGuglani

Differential Revision: D13255691

fbshipit-source-id: 98be2aa372a94e7a54a65e3d64e5c6a436b18083
2018-11-29 11:37:51 -08:00
Tomas Reimers b5571cd5fd Create a recursive free with cleanup function
Reviewed By: davidaurelio

Differential Revision: D13119307

fbshipit-source-id: 162bb4fd6d7620f61cbac010d0dc236d81738b71
2018-11-26 16:02:51 -08:00
Sidharth Guglani f000cf07c5 calling markDirtyAndPropogate when setting isReferenceBaseline value
Summary:
@public
Marking the node as dirty when isReferenceBaseline property is changed

Reviewed By: davidaurelio

Differential Revision: D13147742

fbshipit-source-id: 3bbff1cfceeadfbf77380519e4638f2984fc2009
2018-11-26 07:28:48 -08:00
David Aurelio f2894e58cf Data types for marker API
Summary:
@public

Adds types for a marker API in Yoga.

This will allow us to register callbacks that Yoga can use to log performance data without hard-coding the backend system for that.

Reviewed By: SidharthGuglani

Differential Revision: D13118830

fbshipit-source-id: b42a42c609f0cf66212186f7f20ee572522d59e3
2018-11-24 16:26:30 -08:00
David Aurelio 8f283b93ea `YGNodeComputeFlexBasisForChildren`: remove output param
Summary:
@public

`YGNodeComputeFlexBasisForChildren` was using an output parameter (`float&`) that is always initialised to `0.0f`.
Here, we move the initialisation inside `YGNodeComputeFlexBasisForChildren`, and simply return the result.

Reviewed By: astreet

Differential Revision: D13167509

fbshipit-source-id: cbea20e2deb82ec75a1c158b16c94f4a3e5e4c99
2018-11-22 08:08:47 -08:00
David Aurelio c34ad17c94 Pass enums by value
Summary:
@public

passes all enum values by value, not by reference.

Reviewed By: astreet

Differential Revision: D13156390

fbshipit-source-id: 56aea66c16ab3325594f67b9017afa18a678d281
2018-11-22 08:08:47 -08:00
David Aurelio f8ff6bd4e8 Pass primitives by value
Summary:
@public

Passes all `float`, `bool`, etc. by value, not by reference.

Reviewed By: astreet

Differential Revision: D13153500

fbshipit-source-id: 95529bc2efcff144044e2c25087915b2b7ede179
2018-11-22 03:50:30 -08:00
David Aurelio 619de16661 Back to yearless format for MIT license
Summary:
@public

Restores the yearless format of the MIT license.

Reviewed By: SidharthGuglani

Differential Revision: D13082510

fbshipit-source-id: f5a849b06652cedf68547d4a7963398b2627915f
2018-11-15 08:24:57 -08:00
Sidharth Guglani 6eb5bd381c added functionality using which child node can tell parent node to use it as a reference baseline
Summary:
@public
Currently only parent can tell the layout to align its children based on baseline. But if one of the children is a column or row then basealign does not work as expected.

We have added an api setReferenceBaseline which when set to true would mean that it's baseline would be considered as the reference baseline for parent amongst its siblings. If there are more than one siblings with referenceBaseline set, the first one would be considered.

Reviewed By: davidaurelio

Differential Revision: D12883323

fbshipit-source-id: 19beccfc47d98bb38f81f5b66ba764e83680f821
2018-11-14 02:51:34 -08:00
Daniel Hood 31439f8e64 Fix build error caused by -Werror=class-memaccess (#823)
Summary:
OS: Arch Linux
GCC Version: gcc (GCC) 8.2.1 20180831
Clang Version: 6.0.1 (tags/RELEASE_601/final)

Build Log Before Fix:

command: `buck build //:yoga`
```
Not using buckd because watchman isn't installed.
yoga/Yoga.cpp: In function ‘void YGZeroOutLayoutRecursivly(YGNodeRef)’:
yoga/Yoga.cpp:1854:51: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct YGLayout’; use assignment or value-initialization instead [-Werror=class-memaccess]
   memset(&(node->getLayout()), 0, sizeof(YGLayout));
                                                   ^
In file included from yoga/YGNode.h:11,
                 from yoga/Utils.h:9,
                 from yoga/Yoga.cpp:13:
yoga/YGLayout.h:12:8: note: ‘struct YGLayout’ declared here
 struct YGLayout {
        ^~~~~~~~
cc1plus: all warnings being treated as errors
Build failed: Command failed with exit code 1.
stderr: yoga/Yoga.cpp: In function ‘void YGZeroOutLayoutRecursivly(YGNodeRef)’:
yoga/Yoga.cpp:1854:51: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct YGLayout’; use assignment or value-initialization instead [-Werror=class-memaccess]
   memset(&(node->getLayout()), 0, sizeof(YGLayout));
                                                   ^
In file included from yoga/YGNode.h:11,
                 from yoga/Utils.h:9,
                 from yoga/Yoga.cpp:13:
yoga/YGLayout.h:12:8: note: ‘struct YGLayout’ declared here
 struct YGLayout {
        ^~~~~~~~
cc1plus: all warnings being treated as errors
    When running <c++ preprocess_and_compile>.
    When building rule //:yoga#compile-Yoga.cpp.o9b5477b5,default.
Parsing buck files: finished in 0.8 sec (100%)
Building: finished in 2.2 sec (100%) 10/10 jobs, 1 updated
  Total time: 3.3 sec
```

Build Log After Fix

command: `buck build //:yoga`
```
Not using buckd because watchman isn't installed.
Parsing buck files: finished in 0.8 sec (100%)
Building: finished in 0.6 sec (100%) 1/1 jobs, 0 updated
  Total time: 1.6 sec
```

All tests are passing
Pull Request resolved: https://github.com/facebook/yoga/pull/823

Reviewed By: davidaurelio

Differential Revision: D10486023

Pulled By: passy

fbshipit-source-id: e9de734c3ce6c45ea4a8edd5d78206901d85ca84
2018-11-07 08:49:15 -08:00
Tim Yung a689711f68 RN: Missing Copyright Headers
Summary: Adds copyright headers to all files that are missing them.

Reviewed By: hramos

Differential Revision: D12837494

fbshipit-source-id: 6330a18919676dec9ff2c03b7c9329ed9127d930
2018-10-31 01:37:26 -07:00
Sidharth Guglani d743989dab Replaced default constructors with member assignments
Reviewed By: davidaurelio

Differential Revision: D10466125

fbshipit-source-id: ed92d1e054a8b5b9a6c8c09035173b11da45c368
2018-10-25 08:04:06 -07:00
Alexey Kozhevnikov d9792b3e59 Exclude cpp equality operators from `extern "C"`
Summary:
`extern "C"` disables name mangling, hence input parameter types does not influence the name. That makes it impossible to have several equality operators with `extern "C"` linkage (for different types).

One such operator is defined in Windows SDK, in `guiddef.h`. It in turn is included in `winnt.h` inside `extern "C" { ... }` block. Trying to compile file which both is dependent both on `winnt.h` and `Yoga.h` results in:
```
Yoga.h(50): error C2733: 'operator ==': second C linkage of overloaded function not allowed
guiddef.h(192): note: see declaration of 'operator =='
```

In general it doesn't make much sense to have cpp specific operator to have `extern "C"` linkage, so the change doesn't introduce any controlling flag (mangling on/off).

Note that it's breaking binary compatibility and yoga library should be rebuilt if those operators are used.

Reviewed By: milend

Differential Revision: D10418395

fbshipit-source-id: 2f1cccff26165e638b9a07eece07d94fccfa5e5a
2018-10-18 08:44:45 -07:00
Adam Comella f90c9b5292 When paddingStart is 0, it should override paddingHorizontal (#816)
Summary:
Fixes #815

Imagine a node with this style: `{ paddingHorizontal: 10, paddingStart: 0 }`.

After running layout on this node, we expect its computed `paddingStart` to be `0`. However, it is actually `10`.

Consider the expression `paddingEdgeStart.getValue() > 0.0f` in [`getLeadingPadding`](328ec7dc4d/yoga/YGNode.cpp (L461)). Why is `0` handled like a negative number rather than a positive number? I suspect this should be `>=` so `0` is handled like the positive numbers (this is how `getTrailingPadding` works).

It looks like 3a82d2b1a8?diff=unified&w=1#diff-07b4949bf42749fde386e769ff08a124 changed the operator from `>=` to `>` in `getLeadingPadding`. I suspect it was a mistake. `getTrailingPadding` still uses `>=`.

I manually verified this using the code in #815 and added some unit tests to catch this bug and other similar issues.

Adam Comella
Microsoft Corp.
Pull Request resolved: https://github.com/facebook/yoga/pull/816

Reviewed By: priteshrnandgaonkar

Differential Revision: D10282617

Pulled By: shergin

fbshipit-source-id: 2ab2874ae39d9454308a020a960ace85573fe777
2018-10-12 15:08:45 -07:00
Adam Comella af8c69ecf7 Fix rounding of negative numbers (#825)
Summary:
`YGRoundValueToPixelGrid` currently rounds negative numbers incorrectly. For example:

```
YGRoundValueToPixelGrid(-2.2, 1.0, /* ceil */ false, /* floor */ true) = -2.0
```

However, that operation is supposed to take the floor of the number so the result should acutally be `-3.0`.

There's a detailed comment in `YGRoundValueToPixelGrid` about the fix and why it works.

A symptom that manifested because of this bug is that text nodes could get smaller and smaller on each layout pass. For details see https://github.com/facebook/yoga/issues/824.

Fixes #824

Adam Comella
Microsoft Corp.
Pull Request resolved: https://github.com/facebook/yoga/pull/825

Reviewed By: priteshrnandgaonkar

Differential Revision: D10282064

Pulled By: shergin

fbshipit-source-id: 16ca966e6cb0cfc88b1dbf4ba31e7b1dbe1f2049
2018-10-11 18:19:11 -07:00
Adam Comella 780ced4d07 Fix C# unit tests (#818)
Summary:
This consists of several fixes:
  - Some of the C++ functions called by the tests were missing `WIN_EXPORT`
  - It looks like Yoga was changed to round up after `TestMeasureFuncWithFloat` was written. Here's the function call that results in the rounding: 357ca78f9f/yoga/Yoga.cpp (L4019-L4026)
  - The format of the result of the `Print` method was changed after `TestPrint` was written.
Pull Request resolved: https://github.com/facebook/yoga/pull/818

Differential Revision: D10282902

Pulled By: shergin

fbshipit-source-id: a5fd732a7dbff1a704cbafbfc95ae3e0c0a0cdd8
2018-10-09 18:16:21 -07:00
Héctor Ramos 1151c096da Update copyright headers to yearless format
Summary: This change drops the year from the copyright headers and the LICENSE file.

Reviewed By: yungsters

Differential Revision: D9727774

fbshipit-source-id: df4fc1e4390733fe774b1a160dd41b4a3d83302a
2018-09-11 15:33:07 -07:00
Pritesh Nandgaonkar abc95a9113 Expose logging capablities in Yoga header
Summary: Exposes a bool in the config which will help log the yoga hierarchy. Also added a test case

Reviewed By: IanChilds

Differential Revision: D9560577

fbshipit-source-id: ef4998107ed51ea374853bab7cbe09e3232caa0c
2018-08-30 04:47:15 -07:00
Jonathan Kim 2515e4861a Move RN's DEFS.bzl to tools and rename to rn_defs.bzl
Reviewed By: mzlee

Differential Revision: D9553765

fbshipit-source-id: cb65081668ea2726f24d2c9c02661e859cc7a994
2018-08-29 13:21:52 -07:00
Pritesh Nandgaonkar d85226f539 Solve the bug related to baseline height
Summary:
This diff fixes the height calculation logic for the nodes with baseline. Before height calculation for baseline was done at wrong place.

The task was created due to the regression caused by D9219678.

Reviewed By: IanChilds

Differential Revision: D9421551

fbshipit-source-id: 3fbb738314130b346c4186ec45d00c9ea63bc9f4
2018-08-22 12:31:19 -07:00
Pritesh Nandgaonkar 5be1726d28 Solve width bug when the size is less than min
Summary:
This diff updates the logic which reassigns `remainingFreeSpace` when the node's calculated dimension falls below min width of the node.

So we will have to update the `remainingFreeSpace` as there is more available space since the calculated nodes width is less than the min width.

I have also added comments at relevant places in the code so that it is clearer.

This diff solves the issue raised in litho support grp. The details can be found here T32199608. This diff also makes sure that it doesn't break fblite, as the earlier version broke it, details of which can be found here T32881750.

Reviewed By: IanChilds

Differential Revision: D9359026

fbshipit-source-id: 4168e385e962c168a9de9370220c75f14a6726a7
2018-08-20 06:20:52 -07:00
David Aurelio 625c54d406 Inline `YG_NODE_STYLE_PROPERTY_UNIT_IMPL` macro
Reviewed By: astreet

Differential Revision: D8874733

fbshipit-source-id: 75c24b508f287f405fad09605f64d2bfb3ffa0a5
2018-08-17 04:02:30 -07:00
David Aurelio e4dc34ddba Replace percent setter in `YG_NODE_STYLE_PROPERTY_UNIT_IMPL` macro with template code
Reviewed By: astreet

Differential Revision: D8874732

fbshipit-source-id: 46fdf851f19f16def0c7e2ab4c5f17a349dc7aee
2018-08-17 04:02:30 -07:00
David Aurelio 03377ac322 Replace point setter in `YG_NODE_STYLE_PROPERTY_UNIT_IMPL` macro with template code
Reviewed By: astreet

Differential Revision: D8874735

fbshipit-source-id: 77fa1ceb2eaff6a0e415ef939e55aa22bc3d6099
2018-08-17 04:02:30 -07:00
David Aurelio edc15ebceb Replace getter in `YG_NODE_STYLE_PROPERTY_UNIT_IMPL` macro with template code
Reviewed By: astreet

Differential Revision: D8874734

fbshipit-source-id: ba94b4d0fd31e8344c7836b66a269d5f1f69e225
2018-08-17 04:02:30 -07:00
David Aurelio b7c079f96f Type alias for dimensions
Summary:
Aliases `std::array<YGValue, 2>` as `YGStyle::Dimensions` for increased readability.

This prepares a follow up, where the alias is used in `Yoga.cpp`.

Reviewed By: astreet

Differential Revision: D8874566

fbshipit-source-id: a7a7a1b02bff547d7d6b800c522c4785a62ad611
2018-08-17 04:02:30 -07:00
Pritesh Nandgaonkar 3770165f72 Fix parent height calculation in case of baseline alignment
Summary:
Prior to this diff, if parents height was not set then the height of parent was deduced as max of childrens height(considering  line ht, padding, margin etc. ), but it didn't consider the baseline scenario where the previous logic will fail as then the parents height will be determined by the space taken by children above and below the reference baseline. I added a test case for the same.

Look at the diff D9088051 which shows the screenshot of the bug.
It is solved to https://pxl.cl/gvVk

Reviewed By: dsyang

Differential Revision: D9219678

fbshipit-source-id: f4a0b9f1452c33e78bd8c6cf39f6fcf538a04074
2018-08-16 16:52:42 -07:00
Roman Kushnarenko f0631b11f5 Revert D9286928: [yoga] Solve width bug when the size is less than min
Differential Revision:
D9286928

Original commit changeset: 915269602cda

fbshipit-source-id: a4c23bf335b82fbbf3928a524a61374a6cf6ffb1
2018-08-16 16:52:42 -07:00
Pritesh Nandgaonkar 3072d599c9 Solve width bug when the size is less than min
Summary:
Removed the faulty calculation of `remainingFreeSpace` from the code. `remainingFreeSpace` already had the correct value that special condition was not required.

Also added a test case for this issue

Reviewed By: IanChilds

Differential Revision: D9286928

fbshipit-source-id: 915269602cda2cc4515e6eab8184b2ea98d3e6d4
2018-08-16 16:52:41 -07:00
David Aurelio 0926373c9f Eliminate remaining `YGStyle&` locals
Summary:
@public

Replaces local references to `YGStyle` objects, and assignment to `YGValue` members with direct assignment from temporaries.

This should increase readability, and eliminate duplicated checks for *undefined* values.

Reviewed By: astreet

Differential Revision: D9083531

fbshipit-source-id: 11386be465352f5cb167b8195b7da432d0055d6f
2018-08-15 06:17:15 -07:00
David Aurelio acd8820154 Eliminate unnecessary copies of node style objects
Summary:
@public

`YGNode.getStyle()` returns a reference to the enclosed `YGStyle` member. Assigning to a local copies unnecessarily.

Having eliminated the copy, we can also safely remove calls to `YGNode.setStyle()`, eliminating another copy.

Reviewed By: astreet

Differential Revision: D9083336

fbshipit-source-id: df8b603b5cc0b974cf5dd434c71956be4548e583
2018-08-15 06:17:15 -07:00
Dulmandakh 6117a6c720 Bump Android NDK to r17b (#20357)
Summary:
This PR bumps Android NDK version to r17b (latest). Cleaned up redundant **LOCAL_EXPORT_CPPFLAGS** rules in .mk files
Pull Request resolved: https://github.com/facebook/react-native/pull/20357

Differential Revision: D9068424

Pulled By: hramos

fbshipit-source-id: 8578637e38e807288b819a36cb75ea9feefcc09f
2018-07-30 14:02:11 -07:00
Amir Shalem 374fd7c0cd Deallocate the YogaConfig memory with correct method
Summary: We've mistakenly used `free()` to free the memory, where `delete` should have been used

Reviewed By: davidaurelio

Differential Revision: D9042347

fbshipit-source-id: e15cec0f498409066521a6de1e3fe4b7404ec46c
2018-07-29 14:16:35 -07:00
Valentin Shergin 6bf9024107 Implementation of `operator==` for YGValue
Summary:
@public
It's very useful sometimes for product code to compare `YGValue`s (e.g. in Fabric).

Reviewed By: priteshrnandgaonkar

Differential Revision: D8937594

fbshipit-source-id: b93e1ab4a6419ada6746f233b587e8c9cb32c6d4
2018-07-23 13:33:28 -07:00