Commit Graph

2024 Commits

Author SHA1 Message Date
vvveiii
3d19f52ba3 [JNI] fix JNI binding complie error 2020-08-15 18:22:28 +08:00
vvveiii
b7cc9f9dac [Yoga] update unit tests
- all unit tests passed
2020-08-15 17:55:00 +08:00
vvveiii
cc80a01488 [YogaKit] update YogaKitSample 2020-08-15 15:42:48 +08:00
vvveiii
029b877d2e [Yoga] replace float with YGFloat
- pass all unit tests
2020-08-15 14:52:10 +08:00
vvveiii
b498714d48 [YogaKit] round-pixel view’s bounds 2020-08-15 10:18:54 +08:00
vvveiii
31fc173ee0 [YogaKit] fix complie error for tvOS 2020-08-14 22:33:17 +08:00
vvveiii
c302e34ee0 [YogaKit] fix complie error with -Wc++11-narrowing 2020-08-14 22:17:54 +08:00
vvveiii
257a79993d [YogaKit] rollback gnu++17 to gnu++14
- fix gnu++17 complie error: noexcept' is only available on iOS 11 or newer
2020-08-14 22:08:46 +08:00
vvveiii
c3ec27ede1 [YogaKit] build YogaKit with ObjC++17
- remove YGRoundPixelValue for view’s origin
- check view’s isYogaEnabled before check view.yoga.isEnabled
2020-08-14 21:52:54 +08:00
vvveiii
f8ff6d8ac7 [YogaKit] remove YogaKitSampleTests from Podfile 2020-08-14 19:51:22 +08:00
vvveiii
98420460d9 [YogaKit] add unit tests to YogaKit.xcodeproj 2020-08-14 19:49:16 +08:00
vvveiii
656a98b149 [YogaKit] align pixel for view’s size 2020-08-14 19:24:55 +08:00
vvveiii
7c940ac51f [YogaKit] rollback implementation of YGRoundPixelValue 2020-08-14 17:51:47 +08:00
vvveiii
520b622e5c [Yoga] fix error: templates must have C++ linkage 2020-08-14 14:35:21 +08:00
vvveiii
b5b42bd6c5 [YogaKit] fix complie error with ObjC++ 2020-08-14 14:07:40 +08:00
vvveiii
f7b77210bc [YogaKit] remove unused headers from project 2020-08-14 13:55:12 +08:00
vvveiii
ee59c265bf [YogaKit] remove unused umbrella headers from Yoga 2020-08-14 13:53:50 +08:00
vvveiii
5521fb7149 [YogaKit] remove unused public headers from Yoga. 2020-08-14 13:49:50 +08:00
vvveiii
025f6a358f [YogaKit] add YGLayoutExtensions.swift to YogaKit 2020-08-14 13:17:05 +08:00
vvveiii
a507c40621 [YogaKit] add symbol link to yoga 2020-08-14 10:32:52 +08:00
vvveiii
6a5faa41b9 [YogaKit] update TARGETED_DEVICE_FAMILY 2020-08-14 08:01:49 +08:00
vvveiii
ed3c29c22e [YogaKit] update YogaKit.xcodeproj 2020-08-13 23:46:52 +08:00
vvveiii
4f69c9bd1d [YogaKit] add YogaKit.xcodeproj for support Carthage 2020-08-13 23:17:00 +08:00
vvveiii
709cee78e7 [YogaKit] update Podfile.lock of YogaKitSample 2020-08-13 22:54:27 +08:00
vvveiii
890edf5af0 [YogaKit] rename module yoga to Yoga. 2020-08-13 22:50:47 +08:00
vvveiii
d000474ba2 [YogaKit] remove DEVELOPMENT_TEAM from project. 2020-08-13 21:47:28 +08:00
vvveiii
8608c92816 [YogaKit] support macOS. 2020-08-13 21:44:57 +08:00
vvveiii
0d339b6754 [YogaKit] support tvOS
- add YogaKitTVSample target
2020-08-13 20:44:27 +08:00
vvveiii
a902445203 [YogaKit] pixel-align view’s frame. 2020-08-13 18:18:09 +08:00
vvveiii
1cef5287af [YogaKit] remove + (void)initialize for YGLayout. 2020-08-13 17:45:23 +08:00
vvveiii
ae3aa9582c [YogaKit] add unit tests.
- pixel-align for view’s frame;
- add unit tests for YogaKit.
2020-08-13 17:17:15 +08:00
vvveiii
b78cfa6698 [YogaKit] ignore margin for yoga root view.
fix issue 1023: https://github.com/facebook/yoga/issues/1023
2020-08-13 14:25:57 +08:00
vvveiii
aa11f6a4db [YogaKit] use bounds/center and not frame if non-identity transform. 2020-08-13 14:09:58 +08:00
vvveiii
6bf096294d [YogaKit] update Pod Spec version to 1.18.2 2020-08-13 13:37:29 +08:00
vvveiii
14f7e8bb2c [YogaKit] support auto apply layout.
- support auto apply layout
- build Yoga & YogaKit framework as staticlib;
- update YogaKitSample.
2020-08-13 13:24:14 +08:00
Jiawei Lv
e1c9d8800e Assign test_ownership_2020 as owner for unowned java tests in fbandroid
Summary: Changelog: [Internal]

Reviewed By: IanChilds

Differential Revision: D22980855

fbshipit-source-id: d5e394f16eaf0e50367b95b1eec98024b906d3d9
2020-08-11 17:19:05 -07:00
Thomas Nardone
084d5935e6 Tweak stdlib imports in event, utils
Summary:
Changelog:
[Internal][Fixed] - Tweaked stdlib imports

Reviewed By: SidharthGuglani

Differential Revision: D22860196

fbshipit-source-id: fc0fc1bf05ebbfae7e86bce5e960e58d5944ee5c
2020-08-03 09:39:32 -07:00
Valentin Shergin
fc88b2f774 Introducing YGPositionTypeStatic
Summary:
Changelog: [Internal] Fabric-specific internal change.
This diff introduces a new value for `YGPositionType`: `YGPositionTypeStatic`.
No part of Yoga, RN, Litho or CK uses this value yet. `relative` and `static` values behave the same way for now. We also do not change any defaults. So, it should be fine.

Reviewed By: SidharthGuglani

Differential Revision: D22386732

fbshipit-source-id: 39cd9e818458ac2a91efb175f24a74c8c303ff08
2020-07-20 00:33:02 -07:00
Stanislau Hlebik
5ac5624e3f remediation of S205607
fbshipit-source-id: 798decc90db4f13770e97cdce3c0df7d5421b2a3
2020-07-17 17:23:52 -07:00
Stanislau Hlebik
16f676eccf remediation of S205607
fbshipit-source-id: 5113fe0c527595e4227ff827253b7414abbdf7ac
2020-07-17 17:23:51 -07:00
Valentin Shergin
0767f4d105 Using YGPositionTypeAbsolute value where we compare absolute vs relative
Summary:
Now Yoga.cpp does not use the `YGPositionTypeRelative` value/constant, it uses `YGPositionTypeAbsolute` instead.
Now `YGPositionType` can only be `YGPositionTypeRelative` or `YGPositionTypeAbsolute`, so expressions `x == YGPositionTypeRelative` and `x != YGPositionTypeAbsolute` are equivalent.
The reasoning behind the change is that in all cases we actually check a node to be (or not to be) `absolute`, not `relative`. This will make a difference in the coming diffs in the stack when we will introduce a new value for the type: `static`.

We need to differentiate `static` and `relative` values t implement the `stacking context` feature in the W3C-compliant way (to fix bugs and avoid developer confusion). Read more here:
https://developer.mozilla.org/en-US/docs/Web/CSS/position

Changelog: [Internal] Internal change in Yoga.

Reviewed By: SidharthGuglani

Differential Revision: D22386733

fbshipit-source-id: 8e2c2b88b404660639f845783c8f93f0c62c0fbb
2020-07-14 15:31:07 -07:00
Amir Shalem
a93e5d63c9 Don't call config->setLogger(nullptr) directly to avoid having no logger at all
Summary:
Changelog: [Internal][Yoga] Don't call config->setLogger(nullptr) directly to avoid having no logger at all

Broken in D14151037 (05f36a835a) when it started calling
```
config->setLogger(nullptr);
```
instead of going thru
```
YGConfigSetLogger(config, nullptr);
```
which does the right thing by setting the logger to its default value:
https://www.internalfb.com/intern/diffusion/FBS/browsefile/master/xplat/yoga/yoga/Yoga.cpp?commit=835911317e8b3cf7da1866e40e1c79cda0690136&lines=4320-4330

Also by default YogaConfig always have a logger:
https://www.internalfb.com/intern/diffusion/FBS/browsefile/master/xplat/yoga/yoga/Yoga.cpp?commit=835911317e8b3cf7da1866e40e1c79cda0690136&lines=335-343

Reviewed By: SidharthGuglani

Differential Revision: D22387459

fbshipit-source-id: 4da91da87a696d38cc9d8db2acb5845d29398adb
2020-07-06 03:53:19 -07:00
Stiopa Koltsov
d74a1069a0 xplat: Disable Starlark in several files
Summary: Disable Starlark in several files which are not trivial to fix.

Reviewed By: scottrice

Differential Revision: D22202463

fbshipit-source-id: a3ff717f0f4b9cd7f492b8fcebdb91f232207222
2020-06-24 12:29:48 -07:00
Sidharth Guglani
633cdc9088 use fmod and YGDoubleEquals for double operations instead of float
Summary: Changelog: [Internal][Yoga] Use double operations during rounding

Reviewed By: mdvacca

Differential Revision: D21840018

fbshipit-source-id: c5d17fcb8984b1da9832a15ccd4d628e8d742c6a
2020-06-08 08:11:18 -07:00
Steven Koeber
ede65bbce4 Buckification of Yoga build script
Reviewed By: liorisraeli87, k21

Differential Revision: D21429174

fbshipit-source-id: f12c8349cc59398553773df7bc15f0f83bd571b4
2020-06-04 06:54:18 -07:00
Jon Janzen
4135420cba Fix GitHub Actions secrets access (#1005)
Summary:
Ref: [Secrets documentation](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#using-encrypted-secrets-in-a-workflow)

In combination with setting the secrets in the GitHub settings, this should fully migrate yoga to GH actions.

Pull Request resolved: https://github.com/facebook/yoga/pull/1005

Test Plan: GitHub Actions CI on the PR attached to this diff

Reviewed By: SidharthGuglani

Differential Revision: D21574995

Pulled By: bigfootjon

fbshipit-source-id: e9ee6d7cf1ae131afdc3aa3778667f1e9b9de833
2020-05-14 12:21:28 -07:00
Sidharth Guglani
07c0d539bd throw std::logic_error instead of aborting the process and convert to java exception
Summary: Changelog: [Internal][Yoga] throw std::logic_error instead of aborting the process and convert to java exception for jni layer

Reviewed By: pasqualeanatriello

Differential Revision: D21301235

fbshipit-source-id: 148b27920e62990a271e1d0df8c85a2cc42f4fd4
2020-05-14 06:39:25 -07:00
Jon Janzen
ac7c85c0a6 Migrate CI from TravisCI to GitHub Actions (#1004)
Summary:
Migrate from TravisCI to GitHub Actions. Facebook employees can read about this migration [here](https://fburl.com/rfp033ou).

CC: wittgenst
Pull Request resolved: https://github.com/facebook/yoga/pull/1004

Test Plan: GitHub Actions CI on my personal GitHub: https://github.com/bigfootjon/yoga/runs/653755729

Reviewed By: passy

Differential Revision: D21431309

Pulled By: bigfootjon

fbshipit-source-id: 490a8679bc0cfec26b13c8c584a928f03c6e26e7
2020-05-12 12:01:53 -07:00
Sidharth Guglani
83b27417ae Fix rounding error using double instead of float
Summary: Changelog: [Internal] [Yoga] Use double instead of float during rounding process to prevent loss of precision.

Reviewed By: mdvacca

Differential Revision: D21227565

fbshipit-source-id: 380b57535a356624cda8dc2017871a4ef3c882d1
2020-04-27 14:48:15 -07:00
Valentin Shergin
884f147742 Fixed incorrect owner assignment in YGNode move constructor
Summary:
Assigning self as an owner makes a cycle which is obviously a bug.

Changelog: [Internal] Small change in Yoga (should not affect RN).

Reviewed By: SidharthGuglani

Differential Revision: D21111423

fbshipit-source-id: 1835561c055ac827f5ce98a044f25aed0d1845a5
2020-04-20 12:05:55 -07:00