Commit Graph

132 Commits

Author SHA1 Message Date
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
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
Adam Ernst
b280a19b0a Run 'arc lint-deps'
Reviewed By: d16r

Differential Revision: D20362505

fbshipit-source-id: f3b7e62f7665d20a32788042772b731d6ed53f36
2020-03-10 10:58:46 -07:00
Nate Stedman
63a463d011 Mark YogaKit as modular
Differential Revision: D20364340

fbshipit-source-id: ce4bc1f474177ffc9c77eb2f10bdb7cb549dd6d8
2020-03-10 09:38:56 -07:00
Sidharth Guglani
bfc3b2f86f fix lint errors
Summary:
Changelog: [Internal][Yoga] Fixed lint errors

```arc lint --apply-patches --take CLANGFORMAT --paths-cmd 'hg files xplat/yoga'
```
Added .clang-tidy file

Reviewed By: zertosh

Differential Revision: D19948702

fbshipit-source-id: f77a16d6f2c532267597a84a9caded0aae68c3aa
2020-02-18 08:24:46 -08:00
Pritesh Nandgaonkar
0be0e9fc01 Solve lib lint failure
Summary:
This diff solves `pod lib lint` failure.

We want to make a new yoga release, as I landed some changes in its podspec which solves the broken flipper build for xcode 11.

{F221612119}

Reviewed By: passy

Differential Revision: D18382588

fbshipit-source-id: efddfa3e93ca59b79b887d04f83407b004d9a199
2019-11-08 04:03:00 -08:00
Andres Suarez
42bba10894 Tidy up license headers
Summary: Changelog: Tidy up license headers

Reviewed By: SidharthGuglani

Differential Revision: D17919414

fbshipit-source-id: 0501b495dc0a42256ca6ba3284a873da1ab175c0
2019-10-15 10:36:38 -07:00
Andres Suarez
c37f5956e4 Fix license headers
Reviewed By: scottrice

Differential Revision: D17673223

fbshipit-source-id: 42a3a25934ef63b24ebf9f5f1909cb562d0d4172
2019-09-30 15:09:48 -07:00
Nicola Ferruzzi
0f2350308e Properly test for the lack of a node measure func in YogaKit (#915)
Summary:
The test was broken and caused a few crashes on my project.
Pull Request resolved: https://github.com/facebook/yoga/pull/915

Differential Revision: D16701613

Pulled By: davidaurelio

fbshipit-source-id: 9ab5c43bb74e77593bc2426a249750a7ee8f4034
2019-08-08 00:10:25 -07:00
Rain ⁣
a4bdd9cd9b standardize C-like MIT copyright headers throughout fbsource
Summary:
`/*` is the standard throughout open source code. For example, Firefox uses single /*: https://hg.mozilla.org/mozilla-central/file/21d22b2f541258d3d1cf96c7ba5ad73e96e616b5/gfx/ipc/CompositorWidgetVsyncObserver.cpp#l3

In addition, Rust considers `/**` to be a doc comment (similar to Javadoc) and having such a comment at the beginning of the file causes `rustc` to barf.

Note that some JavaScript tooling requires `/**`. This is OK since JavaScript files were not covered by the linter in the first place, but it would be good to have that tooling fixed too.

Reviewed By: zertosh

Differential Revision: D15640366

fbshipit-source-id: b4ed4599071516364d6109720750d6a43304c089
2019-06-06 19:44:16 -07:00
David Aurelio
7d7b7b9e18 Sample workspace: remove XML comment
Summary:
@public

Xcode does not like it

Reviewed By: astreet

Differential Revision: D14580168

fbshipit-source-id: 6d26b3961b45a59ef9dc977b21493e60e3cf9396
2019-03-22 11:46:58 -07:00
David Aurelio
7890672ecc Fix Xcode Workspace
Summary: Turns out Xcode does not like document-level comments.

Reviewed By: SidharthGuglani

Differential Revision: D14301138

fbshipit-source-id: f515a1881daa109031963688c1556cb8ef42758f
2019-03-04 09:11:17 -08:00
David Aurelio
d38db1292c Use YGNodeRemoveAllChildren where appropriate
Summary:
@public

`YGNodeRemoveAllChildren` can be used instead of removing children of a yoga node in a loop.

Reviewed By: zats

Differential Revision: D14131679

fbshipit-source-id: 6ee31f1e288b9b161c641b5bca4f2c1156d58c38
2019-02-20 12:35:27 -08:00
David Aurelio
f86c74ce7e Call measure and baseline fns within YGNode
Summary:
@public

Stricter encapsulation of baseline and measure callbacks withing `YGNode`.

Instead of invoking these callbacks directly (`node->getBaseline()(...)`), they are invoked via methods on `YGNode` (`node->baseline(...)`).

This change will allow us to add the concept of a *Layout Context,* where measure and baseline functions will be able to receive an additional `void *` argument if configured accordingly. This API will be used internally for Yoga’s JNI bindings, to avoid storing a weak JNI reference for each node, and avoid reference table overflows.

Changed API:

- `YGNodeGetMeasureFunc()` -> `YGNodeHasMeasureFunc()`
- `YGNodeGetBaselineFunc()` -> `YGNodeHasBaselineFunc()`
- `YGNode::getMeasure()` -> `YGNode::hasMeasureFunc()` + `YGNode::measure()`
- `YGNpde::getBaseline()` -> `YGNode::hasBaselineFunc()` + `YGNode::baseline()`

Reviewed By: SidharthGuglani

Differential Revision: D14099550

fbshipit-source-id: 2653ab36acc252a9747986bc88d21dac22d8c91b
2019-02-19 09:58:42 -08:00
CangZhu
68f7001ed4 feat: expose flex prop to YogaKit (#844)
Summary:
This exposes `yoga` property to `YogaKit`
Pull Request resolved: https://github.com/facebook/yoga/pull/844

Reviewed By: SidharthGuglani

Differential Revision: D13849076

Pulled By: davidaurelio

fbshipit-source-id: 560986c2235dfd28d287f61b2e784c9eef6c5eda
2019-01-29 13:06:12 -08:00
David Aurelio
b9972cee6e 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:52 -08:00
Sidharth Guglani
ba9bd4eae3 Added Copyright Header
Reviewed By: davidaurelio

Differential Revision: D10462700

fbshipit-source-id: edef1f6f5825835bbdb613a1934bf7bfe86d0ee6
2018-10-24 03:11:40 -07:00
Pavel Mazurin
838ef47847 Fixes #606 (#610)
Summary:
Fixes #606.

If there are no subviews in `UIView`, yoga assumes that `sizeThatFits:` returns `CGSizeZero`. However, according to [the documentation](https://developer.apple.com/documentation/uikit/uiview/1622625-sizethatfits), `UIView` returns current size if there are no subviews.

This diff adds a check - if there are no subviews, `sizeThatFits:` doesn't get called, and CGSizeZero is returned.
Pull Request resolved: https://github.com/facebook/yoga/pull/610

Reviewed By: davidaurelio

Differential Revision: D6807406

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 9189cf14c393f840122bc365d3827881bf03548c
2018-10-12 14:09:32 -07:00
Héctor Ramos
e224a29d1c 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:53:35 -07:00
Jonathan Kim
2b52c73d70 Move yoga_defs.bzl
Reviewed By: mzlee

Differential Revision: D9546736

fbshipit-source-id: ff0c19a33cc72a330bac1e266ad0bb6d7c440e60
2018-08-28 22:06:45 -07:00
Nate Stedman
9fe20fd2fc Also ban +new on YGLayout
Summary: `-init` is marked unavailable, but `+new` does the same thing and is not.

Reviewed By: dshahidehpour

Differential Revision: D8957391

fbshipit-source-id: 42fcfe845db79726d8724efd9f6a4d37c19938ad
2018-07-24 06:59:03 -07:00
Taras Tsugrii
a67c555320 Fix deprecated glob usage.
Summary: https://our.intern.facebook.com/intern/wiki/Buck/python-to-skylark/

Differential Revision: D8595731

fbshipit-source-id: 0e3046a7fd2a25e9b13462713ae9a008ad546770
2018-06-23 18:27:38 -07:00
Taras Tsugrii
6c51eb4f72 Re-format BUCK to use recommended style.
Summary:
This uses the latest version of `buildifier` that supports many
more Skylark syntax features.

Reviewed By: yfeldblum

Differential Revision: D8073585

fbshipit-source-id: 12322aebc09b89d5af9cc257b16c1bc0fbb066c1
2018-05-20 23:40:18 -07:00
Jonathan Kim
eb15939c23 Make yoga wrapper macros start with yoga_
Summary: Rename macros

Reviewed By: mzlee

Differential Revision: D7606834

fbshipit-source-id: a2089260dbe46f30f49a207737c83472e2fb3c63
2018-04-14 12:43:03 -07:00