Summary: Remove output properties from computed styles as they will be computed to their output values before we can read them. Only include them if they are explicitly set by the user.
Reviewed By: IanChilds
Differential Revision: D3770917
fbshipit-source-id: e55996cf8744073496debea19c36a188d2e5086c
Summary: Implement flexShrink flexGrow and flexBasis in java as well because it will take a bit until the java code is removed
Reviewed By: lucasr
Differential Revision: D3753231
fbshipit-source-id: ea41d887cd99d1f03d2bc876a2fd7141dbe48320
Summary: Use const where possible. This does not use const for all variables as that would require too much refactoring for one diff. It does however use const where currently possible as well as does some small refactoring to enable const usage in more locations. Striving for 100% const usage leads to code with is easier to reason about as a reference will always reference the same value. The compiler will also assist if you accidentally override a reference.
Reviewed By: IanChilds
Differential Revision: D3741999
fbshipit-source-id: 1ba7da5784c3047f2d4c03746890192f724aa65e
Summary: When adding CSSEdge I kinda forgot we had CSSPosition. I should have just refactor renamed CSSPosition and added some fields. Well this cleans that up.
Reviewed By: IanChilds
Differential Revision: D3728740
fbshipit-source-id: 19dc817a637b80d1f6df8d76982feb2e1fb2705a
Summary: We don't want to format files in lib/ for example. For some reason java/jni and tests/CSSLayoutTestUtils folders were previously ignored. This change formats those folders as well.
Reviewed By: lucasr
Differential Revision: D3715203
fbshipit-source-id: 37bcbd36bcf8535cfca73d6a806ab0f1d097dde7
Summary: Add header to generated code so that code can easily be re-generated in case test generation is improved in the future.
Reviewed By: lucasr
Differential Revision: D3715181
fbshipit-source-id: 593baa691c2d7c7f171c6673898fb8a2ecf0e008
Summary: Add support for flex-grow, flex-shrink, and flex-basis properties. The flex property behavior is preserved for backwards compatibility.
Reviewed By: lucasr
Differential Revision: D3714520
fbshipit-source-id: 80d3a9a1e2b6f74b863bbe22357f2c9865fa290e
Summary: Spent a couple hours customizing the clang-format rules to better match the desired code style.
Reviewed By: IanChilds
Differential Revision: D3714510
fbshipit-source-id: f6d0436346416aab023aacbedd70ea189e583e8d
Summary: Use spacing for position in public api. This was already the case internally
Differential Revision: D3690235
fbshipit-source-id: 4c04952e6ded32fd5fbfdccf63736cf025ae470e
Summary: This code used to be auto generated. Let's let clang-format clean up some stuff for us.
Reviewed By: lucasr
Differential Revision: D3662225
fbshipit-source-id: ddd4064cbf9be21ca6a97001ace1b56b4314c86f
Summary: Add jni bindings for csslayout. First step in many of removing LayoutEngine.java and performing all layout in native.
Reviewed By: lucasr
Differential Revision: D3648793
fbshipit-source-id: d0e696e196fa7c63109c9117a65645ca3d6c9c00
Summary:
@public The make current RCTShadowView support RTL layout.
1 Change all left/right to start/end for margin, padding, boarder and position
2 Calculate position in the same way as margin, padding and boarder
Reviewed By: fkgozali
Differential Revision: D3619292
fbshipit-source-id: eaaa6faeee93c964d59bb6f498d89effc09ed567
Summary: The test case CSSLayoutTest/test_layout_node_with_bottom has some problem. I can't find a way to fix it without get the screen size. I decided to remove it first. If we could find a better way to right this test case. We can add it again.
Reviewed By: fkgozali
Differential Revision: D3629662
fbshipit-source-id: 303f81a74919e5d3bf037e2809e1345a554a7009
Summary:
@public The current CSSLayout can't support RTL because wrong calculation for absolute position.
This change is mainly to fix the issue: https://github.com/facebook/css-layout/issues/197
Three main problems I fixed:
1. Calculate the position in the same way as margin, boarder, and padding. So that to fix the absolute problem.
2. Fix one wrong calculation for leading value when we only know the trailing value. It was hard code for the LTR situation. Now I changed it to depends on the main Axis.
3. Expose getter and setter function for RN to read layout direction and start/end position value.
Reviewed By: fkgozali
Differential Revision: D3616949
fbshipit-source-id: ae7a47cc0a5d02b42b95f87232be51ab144056d9
Summary: The test case CSSLayoutTest/test_layout_node_with_bottom has some problem. I can't find a way to fix it without get the screen size. I decided to remove it first. If we could find a better way to right this test case. We can add it again.
Reviewed By: fkgozali
Differential Revision: D3629662
fbshipit-source-id: 62d6cd3827d20ae670af55d1c072bd9645a701b9