Compare commits
230 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a874992e7c | ||
|
31fc287d35 | ||
|
892913a69d | ||
|
99026e42a9 | ||
|
3a82d2b1a8 | ||
|
b28292e454 | ||
|
2ff18bc948 | ||
|
d0bee487e0 | ||
|
419e29c5a6 | ||
|
295d111f0e | ||
|
da5eb2db67 | ||
|
3408e4d4fa | ||
|
6d7eca8e42 | ||
|
5726a71b62 | ||
|
f73b5057ac | ||
|
51051aad7f | ||
|
91d3c08248 | ||
|
52f2cf319a | ||
|
bbdb62e654 | ||
|
e024943c4b | ||
|
7f44ec512e | ||
|
a2b6ddb7b1 | ||
|
bdc37b0797 | ||
|
82aaebfea2 | ||
|
48d82224ee | ||
|
100afcfdb0 | ||
|
b3436d5eba | ||
|
c5371aca64 | ||
|
269619a419 | ||
|
9b3104577c | ||
|
a1697d2307 | ||
|
056b75858c | ||
|
c84ed90272 | ||
|
b21dd9891a | ||
|
bba81781af | ||
|
0c74a72fac | ||
|
1822bc5eaf | ||
|
01ffe10c2f | ||
|
7f99a547f5 | ||
|
0e5651fb80 | ||
|
0ca44f3001 | ||
|
3f85763797 | ||
|
b318c4c5c9 | ||
|
ae9703712a | ||
|
d617ab6662 | ||
|
4c3eebd3e5 | ||
|
10061af491 | ||
|
91621641e6 | ||
|
35c6931ade | ||
|
44622912a2 | ||
|
aac40cf89b | ||
|
d4b20f5793 | ||
|
89df2d9475 | ||
|
79fa6f8d58 | ||
|
69242938f7 | ||
|
1b66b5d941 | ||
|
fb30f7ddcb | ||
|
747c2a4208 | ||
|
43fda26275 | ||
|
b1222bf83e | ||
|
3ec41b656f | ||
|
740ef6cd9e | ||
|
8c5cbf698b | ||
|
5f2cf6623f | ||
|
4b7efb73d7 | ||
|
a6b7e34187 | ||
|
e50308e823 | ||
|
b6a13ce43a | ||
|
96a87a811d | ||
|
025ee03cb1 | ||
|
c06ee92251 | ||
|
3aca5965dc | ||
|
cac77e5ffa | ||
|
49f1d7b5f6 | ||
|
82e44dbf04 | ||
|
9b501dd9eb | ||
|
8ba663f6f4 | ||
|
8f35484262 | ||
|
1e3143656d | ||
|
699b1f5012 | ||
|
9c877a621e | ||
|
a3144150e0 | ||
|
c830083df3 | ||
|
9eb03b1bcd | ||
|
7e3136c347 | ||
|
c3de8016c0 | ||
|
af45863f8e | ||
|
08d7d1673e | ||
|
e7c56ccd1e | ||
|
de8cab8e60 | ||
|
9e0f751464 | ||
|
951a429ac5 | ||
|
e43bb9da19 | ||
|
b08bd572ef | ||
|
402ee11273 | ||
|
6e38a26f32 | ||
|
d66239bea8 | ||
|
7eb8df2777 | ||
|
75473fd924 | ||
|
c94ade8ffd | ||
|
61afbd43c9 | ||
|
64f6ea37bd | ||
|
dc0609d153 | ||
|
bd46344a4e | ||
|
7199902316 | ||
|
250873abf2 | ||
|
1e775ecb83 | ||
|
9718c517d9 | ||
|
afc215aa66 | ||
|
5df8157863 | ||
|
802fe6bb29 | ||
|
27d2ad198e | ||
|
63be3ff84c | ||
|
66045bd13d | ||
|
f5f8105b57 | ||
|
4f92ae46ef | ||
|
80f8aa3c7e | ||
|
42778f687b | ||
|
7b27a58b97 | ||
|
a40ba9d350 | ||
|
9ecdff14fa | ||
|
288adc49c9 | ||
|
b8c2428b31 | ||
|
92bfcbafc0 | ||
|
130b5beca2 | ||
|
adb2e0fdd6 | ||
|
0a04bd7f2f | ||
|
9d6af5b314 | ||
|
6efb4b90d4 | ||
|
5806f1728c | ||
|
a9dd527748 | ||
|
db3d20b7b7 | ||
|
acd4e01aaf | ||
|
b217f23ba5 | ||
|
76875af207 | ||
|
f2ba14c309 | ||
|
a65b79a944 | ||
|
681b580fd8 | ||
|
b985b6c377 | ||
|
92eda21e78 | ||
|
0cfdb50477 | ||
|
1eb9a5edd9 | ||
|
383b881748 | ||
|
47543c8fba | ||
|
dc6ed89bfa | ||
|
348dd368b5 | ||
|
40eeefd4f7 | ||
|
47892c17ce | ||
|
f2a369fb73 | ||
|
61dc10ef66 | ||
|
7d01f4d8b1 | ||
|
c7a5e1e290 | ||
|
fbd332dee8 | ||
|
dbf6a12134 | ||
|
dbc47ae383 | ||
|
f22cfd52e0 | ||
|
2a10337344 | ||
|
836eaa62df | ||
|
a01c7adcfb | ||
|
5133faa1ad | ||
|
6a8c2960ad | ||
|
0c98e89fdb | ||
|
5f78181911 | ||
|
03dd1d23fa | ||
|
91683be798 | ||
|
109cb1a562 | ||
|
ad1240e276 | ||
|
2e468d9c8c | ||
|
6caa94b779 | ||
|
429a7eeee3 | ||
|
dec1172f38 | ||
|
afaafb4126 | ||
|
e566fcca08 | ||
|
c7f7ba250c | ||
|
7e3be21811 | ||
|
5e39f1a57c | ||
|
5aa0f44a9b | ||
|
55c767ba7f | ||
|
5502a97f7f | ||
|
8ab1d81917 | ||
|
942543f6a5 | ||
|
a69545a6ae | ||
|
0b13a0c168 | ||
|
d8341ca3b0 | ||
|
34ac314101 | ||
|
02c00f2711 | ||
|
15231c3304 | ||
|
d98e5aef97 | ||
|
5b0dfa471f | ||
|
26481a6553 | ||
|
64e08aa98b | ||
|
0c3168f150 | ||
|
40861c699e | ||
|
d8fee24778 | ||
|
5c617a5947 | ||
|
ff0a3f39d9 | ||
|
bfb4dabf0c | ||
|
58d14ee557 | ||
|
c5182c4bf5 | ||
|
132b016bae | ||
|
4785e95a0c | ||
|
be94a5ef8d | ||
|
208b70a93c | ||
|
6c3155ae3b | ||
|
32f071c2ad | ||
|
fdd1dbe3a9 | ||
|
1ca5bb694d | ||
|
b4cfaa916c | ||
|
fc6c85996e | ||
|
969f055f47 | ||
|
58328d01ef | ||
|
d90914f3dc | ||
|
3a0a86788e | ||
|
a77aa9a41e | ||
|
7217471427 | ||
|
bcc36cc1b2 | ||
|
16052085d0 | ||
|
c20f2864ab | ||
|
4185a44393 | ||
|
c79c5e3c9d | ||
|
35a9f33abb | ||
|
32f128640b | ||
|
18d19af7ec | ||
|
2ee2dd439f | ||
|
5edfb679e7 | ||
|
f45059e1e6 | ||
|
c9384762ee | ||
|
7ea50439ce | ||
|
154e67adbc | ||
|
570a193b7e |
@@ -1,9 +1,10 @@
|
|||||||
[cxx]
|
[cxx]
|
||||||
gtest_dep = //lib/gtest:gtest
|
gtest_dep = //lib/gtest:gtest
|
||||||
[android]
|
[android]
|
||||||
target = android-23
|
target = android-25
|
||||||
|
build_tools_version = 26.0.2
|
||||||
[ndk]
|
[ndk]
|
||||||
ndk_version = 13.1.3345770
|
ndk_version = 15.2.4203891
|
||||||
compiler = clang
|
compiler = clang
|
||||||
app_platform = android-21
|
app_platform = android-21
|
||||||
cpu_abis = arm64, armv7, x86, x86_64
|
cpu_abis = arm64, armv7, x86, x86_64
|
||||||
|
142
.travis.yml
142
.travis.yml
@@ -5,128 +5,28 @@
|
|||||||
# LICENSE file in the root directory of this source tree. An additional grant
|
# LICENSE file in the root directory of this source tree. An additional grant
|
||||||
# of patent rights can be found in the PATENTS file in the same directory.
|
# of patent rights can be found in the PATENTS file in the same directory.
|
||||||
|
|
||||||
os: osx
|
language: node_js
|
||||||
osx_image: xcode8.2
|
node_js:
|
||||||
language: cpp
|
- "8"
|
||||||
compiler: clang
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- $HOME/Library/Caches/Homebrew
|
|
||||||
|
|
||||||
env:
|
install:
|
||||||
- TARGET=c
|
- cd website
|
||||||
- TARGET=java
|
- yarn --ignore-scripts
|
||||||
- TARGET=net
|
- cd ..
|
||||||
- TARGET=ios
|
|
||||||
- TARGET=js
|
|
||||||
- TARGET=android
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- |
|
|
||||||
if [[ -n "$encrypted_d27e803291ff_iv" ]]; then
|
|
||||||
openssl aes-256-cbc -K $encrypted_d27e803291ff_key -iv $encrypted_d27e803291ff_iv -in scripts/setup-keys.enc -d >> gradle.properties;
|
|
||||||
fi
|
|
||||||
|
|
||||||
- brew update > /dev/null
|
|
||||||
- brew install --HEAD facebook/fb/buck
|
|
||||||
|
|
||||||
# Java
|
|
||||||
- |
|
|
||||||
if [[ $TARGET = "java" ]]; then
|
|
||||||
brew cask install java &&
|
|
||||||
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) &&
|
|
||||||
export PATH=$JAVA_HOME/bin:$PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
# .NET
|
|
||||||
- |
|
|
||||||
if [[ $TARGET = "net" ]]; then
|
|
||||||
brew install mono
|
|
||||||
fi
|
|
||||||
|
|
||||||
# iOS
|
|
||||||
- |
|
|
||||||
if [[ $TARGET = "ios" ]]; then
|
|
||||||
brew outdated xctool || brew upgrade xctool;
|
|
||||||
gem install xcpretty --no-document --quiet;
|
|
||||||
gem install cocoapods --pre --no-document --quiet;
|
|
||||||
pod repo update --silent;
|
|
||||||
pod install --project-directory=YogaKit/YogaKitSample/;
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Emscripten (used for js tests)
|
|
||||||
# Note: cannot be ran on Linux (because it will compile Clang from its sources :|)
|
|
||||||
- |
|
|
||||||
if [[ $TARGET = "js" ]]; then
|
|
||||||
wget -O /tmp/emsdk-portable.tar.gz https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz &&
|
|
||||||
tar xf /tmp/emsdk-portable.tar.gz -C /tmp/ &&
|
|
||||||
/tmp/emsdk-portable/emsdk install latest 2>&1 | grep -v '^x ' &&
|
|
||||||
/tmp/emsdk-portable/emsdk activate latest
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Android
|
|
||||||
- |
|
|
||||||
if [[ $TARGET = "android" ]]; then
|
|
||||||
brew cask install java;
|
|
||||||
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8);
|
|
||||||
export PATH=$JAVA_HOME/bin:$PATH;
|
|
||||||
export TERMINAL=dumb;
|
|
||||||
source scripts/android-setup.sh && installAndroidSDK
|
|
||||||
export ANDROID_SDK=$ANDROID_HOME
|
|
||||||
fi
|
|
||||||
|
|
||||||
# JavaScript
|
|
||||||
- |
|
|
||||||
if [[ $TARGET = "js" ]]; then (
|
|
||||||
cd javascript &&
|
|
||||||
npm install &&
|
|
||||||
unset CC && unset CXX && unset LINK &&
|
|
||||||
source /tmp/emsdk-portable/emsdk_env.sh &&
|
|
||||||
npm run build:browser
|
|
||||||
) fi
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# C
|
- cd website
|
||||||
- |
|
- yarn build
|
||||||
if [[ $TARGET = "c" ]]; then
|
- cd ..
|
||||||
buck test --verbose 0 //:yoga &&
|
|
||||||
buck run --verbose 0 //benchmark:benchmark &&
|
|
||||||
git checkout HEAD^ &&
|
|
||||||
buck run --verbose 0 //benchmark:benchmark
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Java
|
deploy:
|
||||||
- |
|
provider: pages
|
||||||
if [[ $TARGET = "java" ]]; then
|
skip-cleanup: true
|
||||||
buck test --verbose 0 //java:java
|
github-token: $GITHUB_TOKEN
|
||||||
fi
|
fqdn: yogalayout.com
|
||||||
|
local-dir: website/public
|
||||||
# .NET
|
email: yogabot@fb.com
|
||||||
- |
|
name: Yoga-bot
|
||||||
if [[ $TARGET = "net" ]]; then
|
keep-history: true
|
||||||
sh csharp/tests/Facebook.Yoga/test_macos.sh
|
on:
|
||||||
fi
|
branch: master
|
||||||
|
|
||||||
# iOS
|
|
||||||
- |
|
|
||||||
if [[ $TARGET = "ios" ]]; then
|
|
||||||
buck test --verbose 0 //YogaKit:YogaKitTests --config cxx.default_platform=iphonesimulator-x86_64 &&
|
|
||||||
set -o pipefail &&
|
|
||||||
xcodebuild build -workspace YogaKit/YogaKitSample/YogaKitSample.xcworkspace -scheme YogaKitSample -sdk iphonesimulator | xcpretty -c
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Android
|
|
||||||
- |
|
|
||||||
if [[ $TARGET = "android" ]]; then
|
|
||||||
buck build --verbose 0 //android/sample:sample &&
|
|
||||||
./gradlew testDebugUnit &&
|
|
||||||
scripts/publish-snapshot.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
# JavaScript
|
|
||||||
- |
|
|
||||||
if [[ $TARGET = "js" ]]; then (
|
|
||||||
cd javascript &&
|
|
||||||
npm run test:all &&
|
|
||||||
npm run bench
|
|
||||||
) fi
|
|
||||||
|
36
BUCK
36
BUCK
@@ -1,11 +1,9 @@
|
|||||||
# Copyright (c) 2014-present, Facebook, Inc.
|
# Copyright (c) 2014-present, Facebook, Inc.
|
||||||
# All rights reserved.
|
|
||||||
#
|
#
|
||||||
# This source code is licensed under the BSD-style license found in the
|
# This source code is licensed under the MIT license found in the
|
||||||
# LICENSE file in the root directory of this source tree. An additional grant
|
# LICENSE file in the root directory of this source tree.
|
||||||
# of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
|
|
||||||
include_defs("//YOGA_DEFS")
|
load("//:yoga_defs.bzl", "LIBRARY_COMPILER_FLAGS", "BASE_COMPILER_FLAGS", "GTEST_TARGET", "yoga_dep", "cxx_library", "cxx_test")
|
||||||
|
|
||||||
GMOCK_OVERRIDE_FLAGS = [
|
GMOCK_OVERRIDE_FLAGS = [
|
||||||
# gmock does not mark mocked methods as override, ignore the warnings in tests
|
# gmock does not mark mocked methods as override, ignore the warnings in tests
|
||||||
@@ -13,21 +11,37 @@ GMOCK_OVERRIDE_FLAGS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
COMPILER_FLAGS = LIBRARY_COMPILER_FLAGS + [
|
COMPILER_FLAGS = LIBRARY_COMPILER_FLAGS + [
|
||||||
"-std=c11",
|
"-std=c++1y",
|
||||||
]
|
]
|
||||||
|
|
||||||
TEST_COMPILER_FLAGS = BASE_COMPILER_FLAGS + GMOCK_OVERRIDE_FLAGS + ["-std=c++11"]
|
TEST_COMPILER_FLAGS = BASE_COMPILER_FLAGS + GMOCK_OVERRIDE_FLAGS + [
|
||||||
|
"-std=c++1y",
|
||||||
|
]
|
||||||
|
|
||||||
cxx_library(
|
cxx_library(
|
||||||
name = "yoga",
|
name = "yoga",
|
||||||
srcs = glob(["yoga/*.c"]),
|
srcs = glob(["yoga/*.cpp"]),
|
||||||
compiler_flags = COMPILER_FLAGS,
|
|
||||||
exported_headers = subdir_glob([("", "yoga/*.h")]),
|
|
||||||
header_namespace = "",
|
header_namespace = "",
|
||||||
|
exported_headers = subdir_glob([("", "yoga/*.h")]),
|
||||||
|
compiler_flags = COMPILER_FLAGS,
|
||||||
soname = "libyogacore.$(ext)",
|
soname = "libyogacore.$(ext)",
|
||||||
tests = [":YogaTests"],
|
tests = [":YogaTests"],
|
||||||
visibility = ["PUBLIC"],
|
visibility = ["PUBLIC"],
|
||||||
deps = [] if THIS_IS_FBOBJC else [
|
deps = [
|
||||||
|
yoga_dep("lib/fb:ndklog"),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
cxx_library(
|
||||||
|
name = "yogafastmath",
|
||||||
|
srcs = glob(["yoga/*.cpp"]),
|
||||||
|
header_namespace = "",
|
||||||
|
exported_headers = subdir_glob([("", "yoga/*.h")]),
|
||||||
|
compiler_flags = COMPILER_FLAGS + ["-ffast-math"],
|
||||||
|
soname = "libyogafastmathcore.$(ext)",
|
||||||
|
tests = [":YogaTests"],
|
||||||
|
visibility = ["PUBLIC"],
|
||||||
|
deps = [
|
||||||
yoga_dep("lib/fb:ndklog"),
|
yoga_dep("lib/fb:ndklog"),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
@@ -1,17 +1,15 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2014-present, Facebook, Inc.
|
# Copyright (c) 2014-present, Facebook, Inc.
|
||||||
# All rights reserved.
|
|
||||||
#
|
#
|
||||||
# This source code is licensed under the BSD-style license found in the
|
# This source code is licensed under the MIT license found in the
|
||||||
# LICENSE file in the root directory of this source tree. An additional grant
|
# LICENSE file in the root directory of this source tree.
|
||||||
# of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
#
|
#
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.4.1)
|
cmake_minimum_required(VERSION 3.4.1)
|
||||||
|
|
||||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||||
|
|
||||||
file(GLOB yogacore_SRC yoga/*.c)
|
file(GLOB yogacore_SRC yoga/*.cpp)
|
||||||
add_library(yogacore STATIC ${yogacore_SRC})
|
add_library(yogacore STATIC ${yogacore_SRC})
|
||||||
|
|
||||||
target_link_libraries(yogacore android log)
|
target_link_libraries(yogacore android log)
|
||||||
|
3
CODE_OF_CONDUCT.md
Normal file
3
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Code of Conduct
|
||||||
|
|
||||||
|
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.facebook.com/pages/876921332402685/open-source-code-of-conduct) so that you can understand what actions will and will not be tolerated.
|
@@ -2,6 +2,10 @@
|
|||||||
We want to make contributing to this project as easy and transparent as
|
We want to make contributing to this project as easy and transparent as
|
||||||
possible.
|
possible.
|
||||||
|
|
||||||
|
## Code of Conduct
|
||||||
|
|
||||||
|
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.facebook.com/pages/876921332402685/open-source-code-of-conduct) so that you can understand what actions will and will not be tolerated.
|
||||||
|
|
||||||
## Pull Requests
|
## Pull Requests
|
||||||
We actively welcome your pull requests.
|
We actively welcome your pull requests.
|
||||||
1. Fork the repo and create your branch from `master`.
|
1. Fork the repo and create your branch from `master`.
|
||||||
@@ -25,9 +29,6 @@ Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe
|
|||||||
disclosure of security bugs. In those cases, please go through the process
|
disclosure of security bugs. In those cases, please go through the process
|
||||||
outlined on that page and do not file a public issue.
|
outlined on that page and do not file a public issue.
|
||||||
|
|
||||||
## Coding Style
|
|
||||||
* format.sh
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
By contributing to yoga, you agree that your contributions will be licensed
|
By contributing to yoga, you agree that your contributions will be licensed
|
||||||
under its BSD license.
|
under its MIT license.
|
||||||
|
43
LICENSE
43
LICENSE
@@ -1,30 +1,21 @@
|
|||||||
BSD License
|
MIT License
|
||||||
|
|
||||||
For yoga software
|
Copyright (c) 2014-present, Facebook, Inc.
|
||||||
|
|
||||||
Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
The above copyright notice and this permission notice shall be included in all
|
||||||
are permitted provided that the following conditions are met:
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice, this
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
list of conditions and the following disclaimer.
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
* Redistributions in binary form must reproduce the above copyright notice,
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
this list of conditions and the following disclaimer in the documentation
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
and/or other materials provided with the distribution.
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
* Neither the name Facebook nor the names of its contributors may be used to
|
|
||||||
endorse or promote products derived from this software without specific
|
|
||||||
prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
||||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
||||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
33
PATENTS
33
PATENTS
@@ -1,33 +0,0 @@
|
|||||||
Additional Grant of Patent Rights Version 2
|
|
||||||
|
|
||||||
"Software" means the yoga software distributed by Facebook, Inc.
|
|
||||||
|
|
||||||
Facebook, Inc. (“Facebook”) hereby grants to each recipient of the Software
|
|
||||||
(“you”) a perpetual, worldwide, royalty-free, non-exclusive, irrevocable
|
|
||||||
(subject to the termination provision below) license under any Necessary
|
|
||||||
Claims, to make, have made, use, sell, offer to sell, import, and otherwise
|
|
||||||
transfer the Software. For avoidance of doubt, no license is granted under
|
|
||||||
Facebook's rights in any patent claims that are infringed by (i) modifications
|
|
||||||
to the Software made by you or any third party or (ii) the Software in
|
|
||||||
combination with any software or other technology.
|
|
||||||
|
|
||||||
The license granted hereunder will terminate, automatically and without notice,
|
|
||||||
if you (or any of your subsidiaries, corporate affiliates or agents) initiate
|
|
||||||
directly or indirectly, or take a direct financial interest in, any Patent
|
|
||||||
Assertion: (i) against Facebook or any of its subsidiaries or corporate
|
|
||||||
affiliates, (ii) against any party if such Patent Assertion arises in whole or
|
|
||||||
in part from any software, technology, product or service of Facebook or any of
|
|
||||||
its subsidiaries or corporate affiliates, or (iii) against any party relating
|
|
||||||
to the Software. Notwithstanding the foregoing, if Facebook or any of its
|
|
||||||
subsidiaries or corporate affiliates files a lawsuit alleging patent
|
|
||||||
infringement against you in the first instance, and you respond by filing a
|
|
||||||
patent infringement counterclaim in that lawsuit against that party that is
|
|
||||||
unrelated to the Software, the license granted hereunder will not terminate
|
|
||||||
under section (i) of this paragraph due to such counterclaim.
|
|
||||||
|
|
||||||
A "Necessary Claim" is a claim of a patent owned by Facebook that is
|
|
||||||
necessarily infringed by the Software standing alone.
|
|
||||||
|
|
||||||
A "Patent Assertion" is any lawsuit or other action alleging direct, indirect,
|
|
||||||
or contributory infringement or inducement to infringe any patent, including a
|
|
||||||
cross-claim or counterclaim.
|
|
15
README.md
15
README.md
@@ -1,15 +1,5 @@
|
|||||||
# Yoga [](http://cocoapods.org/pods/YogaKit) [](https://www.npmjs.com/package/yoga-layout) [](https://bintray.com/facebook/maven/com.facebook.yoga%3Ayoga/_latestVersion) [](https://www.nuget.org/packages/Facebook.Yoga)
|
# Yoga [](http://cocoapods.org/pods/YogaKit) [](https://www.npmjs.com/package/yoga-layout) [](https://bintray.com/facebook/maven/com.facebook.yoga%3Ayoga/_latestVersion) [](https://www.nuget.org/packages/Facebook.Yoga)
|
||||||
|
|
||||||
[](https://travis-ci.org/facebook/yoga)
|
|
||||||
[](https://travis-ci.org/facebook/yoga)
|
|
||||||
[](https://travis-ci.org/facebook/yoga)
|
|
||||||
[](https://travis-ci.org/facebook/yoga)
|
|
||||||
[](https://travis-ci.org/facebook/yoga)
|
|
||||||
[](https://travis-ci.org/facebook/yoga)
|
|
||||||
|
|
||||||
[]()
|
|
||||||
[]()
|
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
Yoga builds with [buck](https://buckbuild.com). Make sure you install buck before contributing to Yoga. Yoga's main implementation is in C, with bindings to supported languages and frameworks. When making changes to Yoga please ensure the changes are also propagated to these bindings when applicable.
|
Yoga builds with [buck](https://buckbuild.com). Make sure you install buck before contributing to Yoga. Yoga's main implementation is in C, with bindings to supported languages and frameworks. When making changes to Yoga please ensure the changes are also propagated to these bindings when applicable.
|
||||||
|
|
||||||
@@ -33,9 +23,6 @@ You may need to install the latest watir-webdriver gem (`gem install watir-webdr
|
|||||||
### .NET
|
### .NET
|
||||||
.NET testing is not integrated in buck yet, you might need to set up .NET testing environment. We have a script which to launch C# test on macOS, `csharp/tests/Facebook.Yoga/test_macos.sh`.
|
.NET testing is not integrated in buck yet, you might need to set up .NET testing environment. We have a script which to launch C# test on macOS, `csharp/tests/Facebook.Yoga/test_macos.sh`.
|
||||||
|
|
||||||
## Code style
|
|
||||||
For the main C implementation of Yoga clang-format is used to ensure a consistent code style. Please run `bash format.sh` before submitting a pull request. For other languages just try to follow the current code style.
|
|
||||||
|
|
||||||
## Benchmarks
|
## Benchmarks
|
||||||
Benchmarks are located in `benchmark/YGBenchmark.c` and can be run with `buck run //benchmark:benchmark`. If you think your change has affected performance please run this before and after your change to validate that nothing has regressed. Benchmarks are run on every commit in CI.
|
Benchmarks are located in `benchmark/YGBenchmark.c` and can be run with `buck run //benchmark:benchmark`. If you think your change has affected performance please run this before and after your change to validate that nothing has regressed. Benchmarks are run on every commit in CI.
|
||||||
|
|
||||||
@@ -59,5 +46,3 @@ This will now only run the standalone webpack build upon install.
|
|||||||
| node | Builds node js version. |
|
| node | Builds node js version. |
|
||||||
| standalone | Runs webpack. |
|
| standalone | Runs webpack. |
|
||||||
| none | Does nothing. You can use the prepackaged libs. |
|
| none | Does nothing. You can use the prepackaged libs. |
|
||||||
|
|
||||||
|
|
||||||
|
47
YOGA_DEFS
47
YOGA_DEFS
@@ -1,47 +0,0 @@
|
|||||||
|
|
||||||
YOGA_ROOTS = ['//...']
|
|
||||||
JAVA_TARGET = '//java:java'
|
|
||||||
INFER_ANNOTATIONS_TARGET = '//lib/infer-annotations:infer-annotations'
|
|
||||||
JSR_305_TARGET = '//lib/jsr-305:jsr-305'
|
|
||||||
JUNIT_TARGET = '//lib/junit:junit'
|
|
||||||
PROGRUARD_ANNOTATIONS_TARGET = '//java/proguard-annotations/src/main/java/com/facebook/proguard/annotations:annotations'
|
|
||||||
SOLOADER_TARGET = '//lib/soloader:soloader'
|
|
||||||
GTEST_TARGET = '//lib/gtest:gtest'
|
|
||||||
JNI_TARGET = '//lib/jni:jni'
|
|
||||||
FBJNI_TARGET = '//lib/fb:fbjni'
|
|
||||||
FBJNI_JAVA_TARGET = '//lib/fb/src/main/java/com/facebook/jni:jni'
|
|
||||||
APPCOMPAT_TARGET = '//lib/appcompat:appcompat'
|
|
||||||
ANDROID_SUPPORT_TARGET = '//lib/android-support:android-support'
|
|
||||||
ANDROID_TARGET = '//android:android'
|
|
||||||
ANDROID_JAVA_TARGET = '//android/src/main/java/com/facebook/yoga/android:android'
|
|
||||||
ANDROID_RES_TARGET = '//android:res'
|
|
||||||
ANDROID_SAMPLE_JAVA_TARGET = '//android/sample/java/com/facebook/samples/yoga:yoga'
|
|
||||||
ANDROID_SAMPLE_RES_TARGET = '//android/sample:res'
|
|
||||||
|
|
||||||
THIS_IS_FBOBJC = False
|
|
||||||
|
|
||||||
CXX_LIBRARY_WHITELIST = [
|
|
||||||
'//:yoga',
|
|
||||||
'//lib/fb:fbjni',
|
|
||||||
'//java:jni',
|
|
||||||
]
|
|
||||||
|
|
||||||
BASE_COMPILER_FLAGS = [
|
|
||||||
'-fno-omit-frame-pointer',
|
|
||||||
'-fexceptions',
|
|
||||||
'-Wall',
|
|
||||||
'-Werror',
|
|
||||||
'-O3',
|
|
||||||
]
|
|
||||||
|
|
||||||
LIBRARY_COMPILER_FLAGS = BASE_COMPILER_FLAGS + [
|
|
||||||
'-fPIC',
|
|
||||||
]
|
|
||||||
|
|
||||||
def yoga_dep(dep):
|
|
||||||
return '//' + dep
|
|
||||||
|
|
||||||
with allow_unsafe_import():
|
|
||||||
import os.path
|
|
||||||
def isdir(filename):
|
|
||||||
return os.path.isdir(filename)
|
|
10
Yoga.podspec
10
Yoga.podspec
@@ -1,7 +1,7 @@
|
|||||||
Pod::Spec.new do |spec|
|
Pod::Spec.new do |spec|
|
||||||
spec.name = 'Yoga'
|
spec.name = 'Yoga'
|
||||||
spec.version = '1.6.0'
|
spec.version = '1.7.0'
|
||||||
spec.license = { :type => 'BSD', :file => "LICENSE" }
|
spec.license = { :type => 'MIT', :file => "LICENSE" }
|
||||||
spec.homepage = 'https://facebook.github.io/yoga/'
|
spec.homepage = 'https://facebook.github.io/yoga/'
|
||||||
spec.documentation_url = 'https://facebook.github.io/yoga/docs/api/c/'
|
spec.documentation_url = 'https://facebook.github.io/yoga/docs/api/c/'
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ Pod::Spec.new do |spec|
|
|||||||
spec.authors = 'Facebook'
|
spec.authors = 'Facebook'
|
||||||
spec.source = {
|
spec.source = {
|
||||||
:git => 'https://github.com/facebook/yoga.git',
|
:git => 'https://github.com/facebook/yoga.git',
|
||||||
:tag => '1.6.0',
|
:tag => '1.7.0',
|
||||||
}
|
}
|
||||||
|
|
||||||
spec.module_name = 'yoga'
|
spec.module_name = 'yoga'
|
||||||
@@ -21,8 +21,8 @@ Pod::Spec.new do |spec|
|
|||||||
'-fexceptions',
|
'-fexceptions',
|
||||||
'-Wall',
|
'-Wall',
|
||||||
'-Werror',
|
'-Werror',
|
||||||
'-std=c11',
|
'-std=c++1y',
|
||||||
'-fPIC'
|
'-fPIC'
|
||||||
]
|
]
|
||||||
spec.source_files = 'yoga/**/*.{c,h}'
|
spec.source_files = 'yoga/**/*.{c,h,cpp}'
|
||||||
end
|
end
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
podspec = Pod::Spec.new do |spec|
|
podspec = Pod::Spec.new do |spec|
|
||||||
spec.name = 'YogaKit'
|
spec.name = 'YogaKit'
|
||||||
spec.version = '1.6.0'
|
spec.version = '1.7.0'
|
||||||
spec.license = { :type => 'BSD', :file => "LICENSE" }
|
spec.license = { :type => 'MIT', :file => "LICENSE" }
|
||||||
spec.homepage = 'https://facebook.github.io/yoga/'
|
spec.homepage = 'https://facebook.github.io/yoga/'
|
||||||
spec.documentation_url = 'https://facebook.github.io/yoga/docs/api/yogakit/'
|
spec.documentation_url = 'https://facebook.github.io/yoga/docs/api/yogakit/'
|
||||||
|
|
||||||
@@ -11,14 +11,14 @@ podspec = Pod::Spec.new do |spec|
|
|||||||
spec.authors = 'Facebook'
|
spec.authors = 'Facebook'
|
||||||
spec.source = {
|
spec.source = {
|
||||||
:git => 'https://github.com/facebook/yoga.git',
|
:git => 'https://github.com/facebook/yoga.git',
|
||||||
:tag => '1.6.0',
|
:tag => '1.7.0',
|
||||||
}
|
}
|
||||||
|
|
||||||
spec.platform = :ios
|
spec.platform = :ios
|
||||||
spec.ios.deployment_target = '8.0'
|
spec.ios.deployment_target = '8.0'
|
||||||
spec.ios.frameworks = 'UIKit'
|
spec.ios.frameworks = 'UIKit'
|
||||||
|
|
||||||
spec.dependency 'Yoga', '~> 1.6'
|
spec.dependency 'Yoga', '~> 1.7'
|
||||||
spec.source_files = 'YogaKit/Source/*.{h,m,swift}'
|
spec.source_files = 'YogaKit/Source/*.{h,m,swift}'
|
||||||
spec.public_header_files = 'YogaKit/Source/{YGLayout,UIView+Yoga}.h'
|
spec.public_header_files = 'YogaKit/Source/{YGLayout,UIView+Yoga}.h'
|
||||||
spec.private_header_files = 'YogaKit/Source/YGLayout+Private.h'
|
spec.private_header_files = 'YogaKit/Source/YGLayout+Private.h'
|
||||||
|
19
YogaKit/BUCK
19
YogaKit/BUCK
@@ -1,11 +1,9 @@
|
|||||||
# Copyright (c) 2014-present, Facebook, Inc.
|
# Copyright (c) 2014-present, Facebook, Inc.
|
||||||
# All rights reserved.
|
|
||||||
#
|
#
|
||||||
# This source code is licensed under the BSD-style license found in the
|
# This source code is licensed under the MIT license found in the
|
||||||
# LICENSE file in the root directory of this source tree. An additional grant
|
# LICENSE file in the root directory of this source tree.
|
||||||
# of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
|
|
||||||
include_defs("//YOGA_DEFS")
|
load("//:yoga_defs.bzl", "yoga_dep", "apple_library", "apple_test")
|
||||||
|
|
||||||
COMPILER_FLAGS = [
|
COMPILER_FLAGS = [
|
||||||
"-fobjc-arc",
|
"-fobjc-arc",
|
||||||
@@ -30,12 +28,21 @@ COMPILER_FLAGS = [
|
|||||||
apple_library(
|
apple_library(
|
||||||
name = "YogaKit",
|
name = "YogaKit",
|
||||||
srcs = glob(["Source/**/*.m"]),
|
srcs = glob(["Source/**/*.m"]),
|
||||||
|
header_namespace = "",
|
||||||
|
exported_headers = subdir_glob(
|
||||||
|
[
|
||||||
|
("", "Source/**/*.h"),
|
||||||
|
("Source", "**/*.h"),
|
||||||
|
],
|
||||||
|
prefix = "YogaKit",
|
||||||
|
),
|
||||||
compiler_flags = COMPILER_FLAGS,
|
compiler_flags = COMPILER_FLAGS,
|
||||||
exported_headers = glob(["Source/**/*.h"]),
|
|
||||||
frameworks = [
|
frameworks = [
|
||||||
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
||||||
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
|
||||||
],
|
],
|
||||||
|
header_path_prefix = "",
|
||||||
|
link_whole = True,
|
||||||
visibility = ["PUBLIC"],
|
visibility = ["PUBLIC"],
|
||||||
deps = [
|
deps = [
|
||||||
yoga_dep(":yoga"),
|
yoga_dep(":yoga"),
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
YogaKit is available to install via [CocoaPods](https://cocoapods.org/).
|
YogaKit is available to install via [CocoaPods](https://cocoapods.org/).
|
||||||
|
|
||||||
```
|
```
|
||||||
pod 'YogaKit', '~> 1.6'
|
pod 'YogaKit', '~> 1.7'
|
||||||
```
|
```
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "YGLayout.h"
|
#import "YGLayout.h"
|
||||||
@@ -12,7 +10,7 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
typedef void (^YGLayoutConfigurationBlock)(YGLayout *);
|
typedef void (^YGLayoutConfigurationBlock)(YGLayout *layout);
|
||||||
|
|
||||||
@interface UIView (Yoga)
|
@interface UIView (Yoga)
|
||||||
|
|
||||||
@@ -20,6 +18,10 @@ typedef void (^YGLayoutConfigurationBlock)(YGLayout *);
|
|||||||
The YGLayout that is attached to this view. It is lazily created.
|
The YGLayout that is attached to this view. It is lazily created.
|
||||||
*/
|
*/
|
||||||
@property (nonatomic, readonly, strong) YGLayout *yoga;
|
@property (nonatomic, readonly, strong) YGLayout *yoga;
|
||||||
|
/**
|
||||||
|
Indicates whether or not Yoga is enabled
|
||||||
|
*/
|
||||||
|
@property (nonatomic, readonly, assign) BOOL isYogaEnabled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
In ObjC land, every time you access `view.yoga.*` you are adding another `objc_msgSend`
|
In ObjC land, every time you access `view.yoga.*` you are adding another `objc_msgSend`
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "UIView+Yoga.h"
|
#import "UIView+Yoga.h"
|
||||||
@@ -26,6 +24,11 @@ static const void *kYGYogaAssociatedKey = &kYGYogaAssociatedKey;
|
|||||||
return yoga;
|
return yoga;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL)isYogaEnabled
|
||||||
|
{
|
||||||
|
return objc_getAssociatedObject(self, kYGYogaAssociatedKey) != nil;
|
||||||
|
}
|
||||||
|
|
||||||
- (void)configureLayoutWithBlock:(YGLayoutConfigurationBlock)block
|
- (void)configureLayoutWithBlock:(YGLayoutConfigurationBlock)block
|
||||||
{
|
{
|
||||||
if (block != nil) {
|
if (block != nil) {
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "YGLayout.h"
|
#import "YGLayout.h"
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
@@ -23,13 +21,21 @@ YG_EXTERN_C_END
|
|||||||
|
|
||||||
typedef NS_OPTIONS(NSInteger, YGDimensionFlexibility) {
|
typedef NS_OPTIONS(NSInteger, YGDimensionFlexibility) {
|
||||||
YGDimensionFlexibilityFlexibleWidth = 1 << 0,
|
YGDimensionFlexibilityFlexibleWidth = 1 << 0,
|
||||||
YGDimensionFlexibilityFlexibleHeigth = 1 << 1,
|
YGDimensionFlexibilityFlexibleHeight = 1 << 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
@interface YGLayout : NSObject
|
@interface YGLayout : NSObject
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The property that decides if we should include this view when calculating layout. Defaults to YES.
|
Make default init unavailable, as it will not initialise YGNode which is
|
||||||
|
required for the setters and getters of YGLayout's properties to work properly.
|
||||||
|
*/
|
||||||
|
- (instancetype)init
|
||||||
|
__attribute__((unavailable("you are not meant to initialise YGLayout")));
|
||||||
|
|
||||||
|
/**
|
||||||
|
The property that decides if we should include this view when calculating
|
||||||
|
layout. Defaults to YES.
|
||||||
*/
|
*/
|
||||||
@property (nonatomic, readwrite, assign, setter=setIncludedInLayout:) BOOL isIncludedInLayout;
|
@property (nonatomic, readwrite, assign, setter=setIncludedInLayout:) BOOL isIncludedInLayout;
|
||||||
|
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "YGLayout+Private.h"
|
#import "YGLayout+Private.h"
|
||||||
@@ -30,6 +28,9 @@
|
|||||||
- (void)set##capitalized_name:(YGValue)lowercased_name \
|
- (void)set##capitalized_name:(YGValue)lowercased_name \
|
||||||
{ \
|
{ \
|
||||||
switch (lowercased_name.unit) { \
|
switch (lowercased_name.unit) { \
|
||||||
|
case YGUnitUndefined: \
|
||||||
|
YGNodeStyleSet##capitalized_name(self.node, lowercased_name.value); \
|
||||||
|
break; \
|
||||||
case YGUnitPoint: \
|
case YGUnitPoint: \
|
||||||
YGNodeStyleSet##capitalized_name(self.node, lowercased_name.value); \
|
YGNodeStyleSet##capitalized_name(self.node, lowercased_name.value); \
|
||||||
break; \
|
break; \
|
||||||
@@ -41,6 +42,29 @@
|
|||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define YG_AUTO_VALUE_PROPERTY(lowercased_name, capitalized_name) \
|
||||||
|
- (YGValue)lowercased_name \
|
||||||
|
{ \
|
||||||
|
return YGNodeStyleGet##capitalized_name(self.node); \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
- (void)set##capitalized_name:(YGValue)lowercased_name \
|
||||||
|
{ \
|
||||||
|
switch (lowercased_name.unit) { \
|
||||||
|
case YGUnitPoint: \
|
||||||
|
YGNodeStyleSet##capitalized_name(self.node, lowercased_name.value); \
|
||||||
|
break; \
|
||||||
|
case YGUnitPercent: \
|
||||||
|
YGNodeStyleSet##capitalized_name##Percent(self.node, lowercased_name.value); \
|
||||||
|
break; \
|
||||||
|
case YGUnitAuto: \
|
||||||
|
YGNodeStyleSet##capitalized_name##Auto(self.node); \
|
||||||
|
break; \
|
||||||
|
default: \
|
||||||
|
NSAssert(NO, @"Not implemented"); \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
#define YG_EDGE_PROPERTY_GETTER(type, lowercased_name, capitalized_name, property, edge) \
|
#define YG_EDGE_PROPERTY_GETTER(type, lowercased_name, capitalized_name, property, edge) \
|
||||||
- (type)lowercased_name \
|
- (type)lowercased_name \
|
||||||
{ \
|
{ \
|
||||||
@@ -61,6 +85,9 @@ YG_EDGE_PROPERTY_SETTER(lowercased_name, capitalized_name, property, edge)
|
|||||||
- (void)set##objc_capitalized_name:(YGValue)objc_lowercased_name \
|
- (void)set##objc_capitalized_name:(YGValue)objc_lowercased_name \
|
||||||
{ \
|
{ \
|
||||||
switch (objc_lowercased_name.unit) { \
|
switch (objc_lowercased_name.unit) { \
|
||||||
|
case YGUnitUndefined: \
|
||||||
|
YGNodeStyleSet##c_name(self.node, edge, objc_lowercased_name.value); \
|
||||||
|
break; \
|
||||||
case YGUnitPoint: \
|
case YGUnitPoint: \
|
||||||
YGNodeStyleSet##c_name(self.node, edge, objc_lowercased_name.value); \
|
YGNodeStyleSet##c_name(self.node, edge, objc_lowercased_name.value); \
|
||||||
break; \
|
break; \
|
||||||
@@ -202,7 +229,7 @@ YG_PROPERTY(YGDisplay, display, Display)
|
|||||||
|
|
||||||
YG_PROPERTY(CGFloat, flexGrow, FlexGrow)
|
YG_PROPERTY(CGFloat, flexGrow, FlexGrow)
|
||||||
YG_PROPERTY(CGFloat, flexShrink, FlexShrink)
|
YG_PROPERTY(CGFloat, flexShrink, FlexShrink)
|
||||||
YG_VALUE_PROPERTY(flexBasis, FlexBasis)
|
YG_AUTO_VALUE_PROPERTY(flexBasis, FlexBasis)
|
||||||
|
|
||||||
YG_VALUE_EDGE_PROPERTY(left, Left, Position, YGEdgeLeft)
|
YG_VALUE_EDGE_PROPERTY(left, Left, Position, YGEdgeLeft)
|
||||||
YG_VALUE_EDGE_PROPERTY(top, Top, Position, YGEdgeTop)
|
YG_VALUE_EDGE_PROPERTY(top, Top, Position, YGEdgeTop)
|
||||||
@@ -221,8 +248,8 @@ YG_EDGE_PROPERTY(borderStartWidth, BorderStartWidth, Border, YGEdgeStart)
|
|||||||
YG_EDGE_PROPERTY(borderEndWidth, BorderEndWidth, Border, YGEdgeEnd)
|
YG_EDGE_PROPERTY(borderEndWidth, BorderEndWidth, Border, YGEdgeEnd)
|
||||||
YG_EDGE_PROPERTY(borderWidth, BorderWidth, Border, YGEdgeAll)
|
YG_EDGE_PROPERTY(borderWidth, BorderWidth, Border, YGEdgeAll)
|
||||||
|
|
||||||
YG_VALUE_PROPERTY(width, Width)
|
YG_AUTO_VALUE_PROPERTY(width, Width)
|
||||||
YG_VALUE_PROPERTY(height, Height)
|
YG_AUTO_VALUE_PROPERTY(height, Height)
|
||||||
YG_VALUE_PROPERTY(minWidth, MinWidth)
|
YG_VALUE_PROPERTY(minWidth, MinWidth)
|
||||||
YG_VALUE_PROPERTY(minHeight, MinHeight)
|
YG_VALUE_PROPERTY(minHeight, MinHeight)
|
||||||
YG_VALUE_PROPERTY(maxWidth, MaxWidth)
|
YG_VALUE_PROPERTY(maxWidth, MaxWidth)
|
||||||
@@ -254,7 +281,7 @@ YG_PROPERTY(CGFloat, aspectRatio, AspectRatio)
|
|||||||
if (dimensionFlexibility & YGDimensionFlexibilityFlexibleWidth) {
|
if (dimensionFlexibility & YGDimensionFlexibilityFlexibleWidth) {
|
||||||
size.width = YGUndefined;
|
size.width = YGUndefined;
|
||||||
}
|
}
|
||||||
if (dimensionFlexibility & YGDimensionFlexibilityFlexibleHeigth) {
|
if (dimensionFlexibility & YGDimensionFlexibilityFlexibleHeight) {
|
||||||
size.height = YGUndefined;
|
size.height = YGUndefined;
|
||||||
}
|
}
|
||||||
[self calculateLayoutWithSize:size];
|
[self calculateLayoutWithSize:size];
|
||||||
@@ -361,7 +388,7 @@ static void YGAttachNodesFromViewHierachy(UIView *const view)
|
|||||||
|
|
||||||
NSMutableArray<UIView *> *subviewsToInclude = [[NSMutableArray alloc] initWithCapacity:view.subviews.count];
|
NSMutableArray<UIView *> *subviewsToInclude = [[NSMutableArray alloc] initWithCapacity:view.subviews.count];
|
||||||
for (UIView *subview in view.subviews) {
|
for (UIView *subview in view.subviews) {
|
||||||
if (subview.yoga.isIncludedInLayout) {
|
if (subview.yoga.isEnabled && subview.yoga.isIncludedInLayout) {
|
||||||
[subviewsToInclude addObject:subview];
|
[subviewsToInclude addObject:subview];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
postfix operator %
|
postfix operator %
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <XCTest/XCTest.h>
|
#import <XCTest/XCTest.h>
|
||||||
@@ -181,7 +179,9 @@
|
|||||||
view.yoga.height = YGPointValue(100);
|
view.yoga.height = YGPointValue(100);
|
||||||
[container addSubview:view];
|
[container addSubview:view];
|
||||||
|
|
||||||
[container.yoga applyLayoutPreservingOrigin:YES dimensionFlexibility:YGDimensionFlexibilityFlexibleHeigth];
|
[container.yoga
|
||||||
|
applyLayoutPreservingOrigin:YES
|
||||||
|
dimensionFlexibility:YGDimensionFlexibilityFlexibleHeight];
|
||||||
XCTAssertEqual(200, container.frame.size.width);
|
XCTAssertEqual(200, container.frame.size.width);
|
||||||
XCTAssertEqual(100, container.frame.size.height);
|
XCTAssertEqual(100, container.frame.size.height);
|
||||||
}
|
}
|
||||||
@@ -197,7 +197,10 @@
|
|||||||
view.yoga.height = YGPointValue(100);
|
view.yoga.height = YGPointValue(100);
|
||||||
[container addSubview:view];
|
[container addSubview:view];
|
||||||
|
|
||||||
[container.yoga applyLayoutPreservingOrigin:YES dimensionFlexibility:YGDimensionFlexibilityFlexibleWidth | YGDimensionFlexibilityFlexibleHeigth];
|
[container.yoga
|
||||||
|
applyLayoutPreservingOrigin:YES
|
||||||
|
dimensionFlexibility:YGDimensionFlexibilityFlexibleWidth |
|
||||||
|
YGDimensionFlexibilityFlexibleHeight];
|
||||||
XCTAssertEqual(100, container.frame.size.width);
|
XCTAssertEqual(100, container.frame.size.width);
|
||||||
XCTAssertEqual(100, container.frame.size.height);
|
XCTAssertEqual(100, container.frame.size.height);
|
||||||
}
|
}
|
||||||
|
@@ -4,9 +4,9 @@ PODS:
|
|||||||
- IGListKit/Default (2.1.0):
|
- IGListKit/Default (2.1.0):
|
||||||
- IGListKit/Diffing
|
- IGListKit/Diffing
|
||||||
- IGListKit/Diffing (2.1.0)
|
- IGListKit/Diffing (2.1.0)
|
||||||
- Yoga (1.6.0)
|
- Yoga (1.7.0)
|
||||||
- YogaKit (1.6.0):
|
- YogaKit (1.7.0):
|
||||||
- Yoga (~> 1.6)
|
- Yoga (~> 1.7)
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- IGListKit (~> 2.1.0)
|
- IGListKit (~> 2.1.0)
|
||||||
|
@@ -1,11 +1,9 @@
|
|||||||
# Copyright (c) 2014-present, Facebook, Inc.
|
# Copyright (c) 2014-present, Facebook, Inc.
|
||||||
# All rights reserved.
|
|
||||||
#
|
#
|
||||||
# This source code is licensed under the BSD-style license found in the
|
# This source code is licensed under the MIT license found in the
|
||||||
# LICENSE file in the root directory of this source tree. An additional grant
|
# LICENSE file in the root directory of this source tree.
|
||||||
# of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
|
|
||||||
include_defs("//YOGA_DEFS")
|
load("//:yoga_defs.bzl", "ANDROID_JAVA_TARGET", "ANDROID_RES_TARGET", "INFER_ANNOTATIONS_TARGET", "JAVA_TARGET", "PROGRUARD_ANNOTATIONS_TARGET", "android_aar", "android_resource")
|
||||||
|
|
||||||
android_aar(
|
android_aar(
|
||||||
name = "android",
|
name = "android",
|
||||||
|
@@ -22,7 +22,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':yoga')
|
api project(':yoga')
|
||||||
}
|
}
|
||||||
|
|
||||||
task sourcesJar(type: Jar) {
|
task sourcesJar(type: Jar) {
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
# This source code is licensed under the license found in the
|
# This source code is licensed under the license found in the
|
||||||
# LICENSE-examples file in the root directory of this source tree.
|
# LICENSE-examples file in the root directory of this source tree.
|
||||||
|
|
||||||
include_defs("//YOGA_DEFS")
|
load("//:yoga_defs.bzl", "ANDROID_SAMPLE_JAVA_TARGET", "ANDROID_SAMPLE_RES_TARGET", "ANDROID_RES_TARGET", "android_binary", "android_resource")
|
||||||
|
|
||||||
android_binary(
|
android_binary(
|
||||||
name = "sample",
|
name = "sample",
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
# LICENSE file in the root directory of this source tree. An additional grant
|
# LICENSE file in the root directory of this source tree. An additional grant
|
||||||
# of patent rights can be found in the PATENTS file in the same directory.
|
# of patent rights can be found in the PATENTS file in the same directory.
|
||||||
|
|
||||||
include_defs("//YOGA_DEFS")
|
load("//:yoga_defs.bzl", "ANDROID_JAVA_TARGET", "ANDROID_SAMPLE_RES_TARGET", "ANDROID_SUPPORT_TARGET", "APPCOMPAT_TARGET", "SOLOADER_TARGET", "android_library")
|
||||||
|
|
||||||
android_library(
|
android_library(
|
||||||
name = "yoga",
|
name = "yoga",
|
||||||
|
@@ -2,11 +2,9 @@
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
Copyright (c) 2014-present, Facebook, Inc.
|
Copyright (c) 2014-present, Facebook, Inc.
|
||||||
All rights reserved.
|
|
||||||
|
This source code is licensed under the MIT license found in the
|
||||||
This source code is licensed under the BSD-style license found in the
|
LICENSE file in the root directory of this source tree.
|
||||||
LICENSE file in the root directory of this source tree. An additional grant
|
|
||||||
of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
@@ -1,11 +1,9 @@
|
|||||||
# Copyright (c) 2014-present, Facebook, Inc.
|
# Copyright (c) 2014-present, Facebook, Inc.
|
||||||
# All rights reserved.
|
|
||||||
#
|
#
|
||||||
# This source code is licensed under the BSD-style license found in the
|
# This source code is licensed under the MIT license found in the
|
||||||
# LICENSE file in the root directory of this source tree. An additional grant
|
# LICENSE file in the root directory of this source tree.
|
||||||
# of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
|
|
||||||
include_defs("//YOGA_DEFS")
|
load("//:yoga_defs.bzl", "ANDROID_RES_TARGET", "INFER_ANNOTATIONS_TARGET", "JAVA_TARGET", "JSR_305_TARGET", "SOLOADER_TARGET", "android_library")
|
||||||
|
|
||||||
android_library(
|
android_library(
|
||||||
name = "android",
|
name = "android",
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.facebook.yoga.android;
|
package com.facebook.yoga.android;
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.facebook.yoga.android;
|
package com.facebook.yoga.android;
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.facebook.yoga.android;
|
package com.facebook.yoga.android;
|
||||||
|
@@ -2,11 +2,9 @@
|
|||||||
|
|
||||||
<!--
|
<!--
|
||||||
Copyright (c) 2014-present, Facebook, Inc.
|
Copyright (c) 2014-present, Facebook, Inc.
|
||||||
All rights reserved.
|
|
||||||
|
This source code is licensed under the MIT license found in the
|
||||||
This source code is licensed under the BSD-style license found in the
|
LICENSE file in the root directory of this source tree.
|
||||||
LICENSE file in the root directory of this source tree. An additional grant
|
|
||||||
of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<resources>
|
<resources>
|
||||||
|
@@ -1,15 +1,15 @@
|
|||||||
# Copyright (c) 2014-present, Facebook, Inc.
|
# Copyright (c) 2014-present, Facebook, Inc.
|
||||||
# All rights reserved.
|
|
||||||
#
|
#
|
||||||
# This source code is licensed under the BSD-style license found in the
|
# This source code is licensed under the MIT license found in the
|
||||||
# LICENSE file in the root directory of this source tree. An additional grant
|
# LICENSE file in the root directory of this source tree.
|
||||||
# of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
|
|
||||||
include_defs("//YOGA_DEFS")
|
load("//:yoga_defs.bzl", "yoga_dep")
|
||||||
|
|
||||||
cxx_binary(
|
cxx_binary(
|
||||||
name = "benchmark",
|
name = "benchmark",
|
||||||
srcs = glob(["*.c"]),
|
srcs = glob(["*.c"]),
|
||||||
|
headers = subdir_glob([("", "*.h")]),
|
||||||
|
header_namespace = "",
|
||||||
compiler_flags = [
|
compiler_flags = [
|
||||||
"-fno-omit-frame-pointer",
|
"-fno-omit-frame-pointer",
|
||||||
"-fexceptions",
|
"-fexceptions",
|
||||||
@@ -18,8 +18,6 @@ cxx_binary(
|
|||||||
"-O3",
|
"-O3",
|
||||||
"-std=c11",
|
"-std=c11",
|
||||||
],
|
],
|
||||||
header_namespace = "",
|
|
||||||
headers = subdir_glob([("", "*.h")]),
|
|
||||||
visibility = ["PUBLIC"],
|
visibility = ["PUBLIC"],
|
||||||
deps = [
|
deps = [
|
||||||
yoga_dep(":yoga"),
|
yoga_dep(":yoga"),
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "YGBenchmark.h"
|
#include "YGBenchmark.h"
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
10
build.gradle
10
build.gradle
@@ -3,12 +3,12 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
|
maven { url 'https://maven.google.com/' }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:2.3.3'
|
classpath 'com.android.tools.build:gradle:3.0.0'
|
||||||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
|
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
|
||||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
|
||||||
classpath 'com.nabilhachicha:android-native-dependencies:0.1'
|
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
@@ -24,8 +24,8 @@ allprojects {
|
|||||||
ext {
|
ext {
|
||||||
minSdkVersion = 14
|
minSdkVersion = 14
|
||||||
targetSdkVersion = 25
|
targetSdkVersion = 25
|
||||||
compileSdkVersion = 25
|
compileSdkVersion = 26
|
||||||
buildToolsVersion = '25.0.2'
|
buildToolsVersion = '26.0.2'
|
||||||
sourceCompatibilityVersion = JavaVersion.VERSION_1_7
|
sourceCompatibilityVersion = JavaVersion.VERSION_1_7
|
||||||
targetCompatibilityVersion = JavaVersion.VERSION_1_7
|
targetCompatibilityVersion = JavaVersion.VERSION_1_7
|
||||||
}
|
}
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE-examples file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
15
csharp/BUCK
15
csharp/BUCK
@@ -1,11 +1,9 @@
|
|||||||
# Copyright (c) 2014-present, Facebook, Inc.
|
# Copyright (c) 2014-present, Facebook, Inc.
|
||||||
# All rights reserved.
|
|
||||||
#
|
#
|
||||||
# This source code is licensed under the BSD-style license found in the
|
# This source code is licensed under the MIT license found in the
|
||||||
# LICENSE file in the root directory of this source tree. An additional grant
|
# LICENSE file in the root directory of this source tree.
|
||||||
# of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
|
|
||||||
include_defs("//YOGA_DEFS")
|
load("//:yoga_defs.bzl", "BASE_COMPILER_FLAGS", "yoga_dep", "cxx_library", "is_apple_platform")
|
||||||
|
|
||||||
COMPILER_FLAGS = BASE_COMPILER_FLAGS + ["-std=c++11"]
|
COMPILER_FLAGS = BASE_COMPILER_FLAGS + ["-std=c++11"]
|
||||||
|
|
||||||
@@ -34,10 +32,10 @@ cxx_library(
|
|||||||
deps = [yoga_dep(":yoga")],
|
deps = [yoga_dep(":yoga")],
|
||||||
)
|
)
|
||||||
|
|
||||||
if isdir('/Applications/Xcode.app'):
|
if is_apple_platform():
|
||||||
yoganet_ios_srcs = []
|
yoganet_ios_srcs = []
|
||||||
for arch in [
|
for arch in [
|
||||||
'iphonesimulator-x86_64', 'iphonesimulator-i386', 'iphoneos-arm64', 'iphoneos-armv7'
|
'iphonesimulator-x86_64', 'iphoneos-arm64'
|
||||||
]:
|
]:
|
||||||
name = 'yoganet-' + arch
|
name = 'yoganet-' + arch
|
||||||
yoganet_ios_srcs.append(':' + name)
|
yoganet_ios_srcs.append(':' + name)
|
||||||
@@ -65,8 +63,7 @@ if isdir('/Applications/Xcode.app'):
|
|||||||
genrule(
|
genrule(
|
||||||
name = 'yoganet-macosx',
|
name = 'yoganet-macosx',
|
||||||
srcs = [
|
srcs = [
|
||||||
yoga_dep(yoganet_macosx_target % 'x86_64'),
|
yoga_dep(yoganet_macosx_target % 'x86_64')
|
||||||
yoga_dep(yoganet_macosx_target % 'i386'),
|
|
||||||
],
|
],
|
||||||
out = 'libyoga.dylib',
|
out = 'libyoga.dylib',
|
||||||
cmd = 'lipo $SRCS -create -output $OUT',
|
cmd = 'lipo $SRCS -create -output $OUT',
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
@@ -16,5 +14,6 @@ namespace Facebook.Yoga
|
|||||||
FlexEnd,
|
FlexEnd,
|
||||||
SpaceBetween,
|
SpaceBetween,
|
||||||
SpaceAround,
|
SpaceAround,
|
||||||
|
SpaceEvenly,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
@@ -595,12 +593,14 @@ namespace Facebook.Yoga
|
|||||||
Native.YGNodeSetBaselineFunc(_ygNode, _managedBaseline);
|
Native.YGNodeSetBaselineFunc(_ygNode, _managedBaseline);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CalculateLayout()
|
public void CalculateLayout(
|
||||||
|
float width = YogaConstants.Undefined,
|
||||||
|
float height = YogaConstants.Undefined)
|
||||||
{
|
{
|
||||||
Native.YGNodeCalculateLayout(
|
Native.YGNodeCalculateLayout(
|
||||||
_ygNode,
|
_ygNode,
|
||||||
YogaConstants.Undefined,
|
width,
|
||||||
YogaConstants.Undefined,
|
height,
|
||||||
Native.YGNodeStyleGetDirection(_ygNode));
|
Native.YGNodeStyleGetDirection(_ygNode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
|
@@ -4,6 +4,7 @@ using System.Collections.Generic;
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
#if __IOS__
|
#if __IOS__
|
||||||
using NativeView = UIKit.UIView;
|
using NativeView = UIKit.UIView;
|
||||||
|
using NativeScrollView = UIKit.UIScrollView;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Facebook.YogaKit
|
namespace Facebook.YogaKit
|
||||||
@@ -699,12 +700,12 @@ namespace Facebook.YogaKit
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return _node.StyleAspectRatio;
|
return _node.AspectRatio;
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_node.StyleAspectRatio = value;
|
_node.AspectRatio = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -716,6 +717,17 @@ namespace Facebook.YogaKit
|
|||||||
float width = 0;
|
float width = 0;
|
||||||
float height = 0;
|
float height = 0;
|
||||||
GetWidthHeightOfNativeView(view, out width, out height);
|
GetWidthHeightOfNativeView(view, out width, out height);
|
||||||
|
if (view is NativeScrollView)
|
||||||
|
{
|
||||||
|
if (FlexDirection == YogaFlexDirection.Column || FlexDirection == YogaFlexDirection.ColumnReverse)
|
||||||
|
{
|
||||||
|
height = float.NaN;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
width = float.NaN;
|
||||||
|
}
|
||||||
|
}
|
||||||
CalculateLayoutWithSize(this, width, height);
|
CalculateLayoutWithSize(this, width, height);
|
||||||
ApplyLayoutToViewHierarchy(view);
|
ApplyLayoutToViewHierarchy(view);
|
||||||
}
|
}
|
||||||
@@ -743,9 +755,7 @@ namespace Facebook.YogaKit
|
|||||||
|
|
||||||
var node = layout._node;
|
var node = layout._node;
|
||||||
|
|
||||||
node.Width = width;
|
node.CalculateLayout(width, height);
|
||||||
node.Height = height;
|
|
||||||
node.CalculateLayout();
|
|
||||||
|
|
||||||
return new SizeF { Width = node.LayoutWidth, Height = node.LayoutHeight };
|
return new SizeF { Width = node.LayoutWidth, Height = node.LayoutHeight };
|
||||||
}
|
}
|
||||||
@@ -775,14 +785,14 @@ namespace Facebook.YogaKit
|
|||||||
float result;
|
float result;
|
||||||
if (measureMode == YogaMeasureMode.Exactly)
|
if (measureMode == YogaMeasureMode.Exactly)
|
||||||
{
|
{
|
||||||
result = (float)constrainedSize;
|
result = constrainedSize;
|
||||||
}
|
}
|
||||||
else if (measureMode == YogaMeasureMode.AtMost)
|
else if (measureMode == YogaMeasureMode.AtMost)
|
||||||
{
|
{
|
||||||
result = (float)Math.Min(constrainedSize, measuredSize);
|
result = Math.Min(constrainedSize, measuredSize);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
result = (float)measuredSize;
|
result = measuredSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@@ -820,7 +830,7 @@ namespace Facebook.YogaKit
|
|||||||
var subviewsToInclude = new List<NativeView>();
|
var subviewsToInclude = new List<NativeView>();
|
||||||
foreach (var subview in view.Subviews)
|
foreach (var subview in view.Subviews)
|
||||||
{
|
{
|
||||||
if (subview.Yoga().IsIncludeInLayout)
|
if (subview.Yoga().IsEnabled && subview.Yoga().IsIncludeInLayout)
|
||||||
{
|
{
|
||||||
subviewsToInclude.Add(subview);
|
subviewsToInclude.Add(subview);
|
||||||
}
|
}
|
||||||
@@ -856,7 +866,7 @@ namespace Facebook.YogaKit
|
|||||||
|
|
||||||
static double RoundPointValue(float value)
|
static double RoundPointValue(float value)
|
||||||
{
|
{
|
||||||
float scale = NativePointScale;
|
float scale = NativePixelScale;
|
||||||
|
|
||||||
return Math.Round(value * scale) / scale;
|
return Math.Round(value * scale) / scale;
|
||||||
}
|
}
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE-examples file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (c) 2014-present, Facebook, Inc.
|
# Copyright (c) 2014-present, Facebook, Inc.
|
||||||
# All rights reserved.
|
|
||||||
#
|
#
|
||||||
# This source code is licensed under the BSD-style license found in the
|
# This source code is licensed under the MIT license found in the
|
||||||
# LICENSE file in the root directory of this source tree. An additional grant
|
# LICENSE file in the root directory of this source tree.
|
||||||
# of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "YGInterop.h"
|
#include "YGInterop.h"
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// dllmain.cpp : Defines the entry point for the DLL application.
|
// dllmain.cpp : Defines the entry point for the DLL application.
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// stdafx.cpp : source file that includes just the standard includes
|
// stdafx.cpp : source file that includes just the standard includes
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// stdafx.h : include file for standard system include files,
|
// stdafx.h : include file for standard system include files,
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd `dirname "$0"`
|
cd `dirname "$0"`
|
||||||
echo $ANDROID_SDK
|
echo $ANDROID_SDK
|
||||||
BUCK_RELEASE=2017.05.09.01
|
BUCK_RELEASE=2018.02.16.01
|
||||||
echo "buck $BUCK_RELEASE"
|
echo "buck $BUCK_RELEASE"
|
||||||
BUCK=lib/buck-$BUCK_RELEASE/bin/buck
|
BUCK=lib/buck-$BUCK_RELEASE/bin/buck
|
||||||
if $BUCK --version >/dev/null 2>&1; then true; else
|
if $BUCK --version >/dev/null 2>&1; then true; else
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE-examples file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE-examples file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -22,8 +22,6 @@
|
|||||||
<MtouchDebug>true</MtouchDebug>
|
<MtouchDebug>true</MtouchDebug>
|
||||||
<MtouchFastDev>true</MtouchFastDev>
|
<MtouchFastDev>true</MtouchFastDev>
|
||||||
<MtouchProfiling>true</MtouchProfiling>
|
<MtouchProfiling>true</MtouchProfiling>
|
||||||
<MtouchUseSGen>true</MtouchUseSGen>
|
|
||||||
<MtouchUseRefCounting>true</MtouchUseRefCounting>
|
|
||||||
<IOSDebuggerPort>17481</IOSDebuggerPort>
|
<IOSDebuggerPort>17481</IOSDebuggerPort>
|
||||||
<MtouchLink>None</MtouchLink>
|
<MtouchLink>None</MtouchLink>
|
||||||
<MtouchArch>x86_64</MtouchArch>
|
<MtouchArch>x86_64</MtouchArch>
|
||||||
@@ -39,8 +37,6 @@
|
|||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<CodesignKey>iPhone Developer</CodesignKey>
|
<CodesignKey>iPhone Developer</CodesignKey>
|
||||||
<MtouchUseSGen>true</MtouchUseSGen>
|
|
||||||
<MtouchUseRefCounting>true</MtouchUseRefCounting>
|
|
||||||
<MtouchFloat32>true</MtouchFloat32>
|
<MtouchFloat32>true</MtouchFloat32>
|
||||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||||
<MtouchLink>SdkOnly</MtouchLink>
|
<MtouchLink>SdkOnly</MtouchLink>
|
||||||
@@ -56,8 +52,6 @@
|
|||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<CodesignKey>iPhone Developer</CodesignKey>
|
<CodesignKey>iPhone Developer</CodesignKey>
|
||||||
<MtouchUseSGen>true</MtouchUseSGen>
|
|
||||||
<MtouchUseRefCounting>true</MtouchUseRefCounting>
|
|
||||||
<MtouchLink>None</MtouchLink>
|
<MtouchLink>None</MtouchLink>
|
||||||
<MtouchArch>x86_64</MtouchArch>
|
<MtouchArch>x86_64</MtouchArch>
|
||||||
<MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
|
<MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
|
||||||
@@ -76,8 +70,6 @@
|
|||||||
<MtouchDebug>true</MtouchDebug>
|
<MtouchDebug>true</MtouchDebug>
|
||||||
<MtouchFastDev>true</MtouchFastDev>
|
<MtouchFastDev>true</MtouchFastDev>
|
||||||
<MtouchProfiling>true</MtouchProfiling>
|
<MtouchProfiling>true</MtouchProfiling>
|
||||||
<MtouchUseSGen>true</MtouchUseSGen>
|
|
||||||
<MtouchUseRefCounting>true</MtouchUseRefCounting>
|
|
||||||
<MtouchFloat32>true</MtouchFloat32>
|
<MtouchFloat32>true</MtouchFloat32>
|
||||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||||
<MtouchLink>SdkOnly</MtouchLink>
|
<MtouchLink>SdkOnly</MtouchLink>
|
||||||
@@ -102,6 +94,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Main.cs" />
|
<Compile Include="Main.cs" />
|
||||||
<Compile Include="UnitTestAppDelegate.cs" />
|
<Compile Include="UnitTestAppDelegate.cs" />
|
||||||
|
<Compile Include="YogaKitNativeTest.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Facebook.YogaKit.iOS\Facebook.YogaKit.iOS.csproj">
|
<ProjectReference Include="..\Facebook.YogaKit.iOS\Facebook.YogaKit.iOS.csproj">
|
||||||
|
51
csharp/iOS/Facebook.YogaKit.iOS.Tests/YogaKitNativeTest.cs
Normal file
51
csharp/iOS/Facebook.YogaKit.iOS.Tests/YogaKitNativeTest.cs
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
using System.Drawing;
|
||||||
|
using Facebook.Yoga;
|
||||||
|
using NUnit.Framework;
|
||||||
|
using System;
|
||||||
|
using UIKit;
|
||||||
|
using CoreGraphics;
|
||||||
|
|
||||||
|
namespace Facebook.YogaKit.iOS.Tests
|
||||||
|
{
|
||||||
|
[TestFixture]
|
||||||
|
public class YogaKitNativeTest
|
||||||
|
{
|
||||||
|
[Test]
|
||||||
|
public void ScrollViewVertical()
|
||||||
|
{
|
||||||
|
var view = new UIScrollView() {
|
||||||
|
Frame = new CGRect(0, 0, 100, 100),
|
||||||
|
};
|
||||||
|
|
||||||
|
view.Yoga().Overflow = YogaOverflow.Scroll;
|
||||||
|
var subview = new UIView();
|
||||||
|
subview.Yoga().Height = 1000;
|
||||||
|
subview.Yoga().IsEnabled = true;
|
||||||
|
|
||||||
|
view.AddSubview(subview);
|
||||||
|
view.Yoga().IsEnabled = true;
|
||||||
|
view.Yoga().ApplyLayout();
|
||||||
|
Assert.True(view.ContentSize.Height == 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void NormalViewVertical()
|
||||||
|
{
|
||||||
|
var view = new UIView() {
|
||||||
|
Frame = new CGRect(0,0, 100, 100),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
var subview = new UIView();
|
||||||
|
subview.Yoga().Height = 1000;
|
||||||
|
subview.Yoga().Width = 2;
|
||||||
|
subview.Yoga().IsEnabled = true;
|
||||||
|
|
||||||
|
view.AddSubview(subview);
|
||||||
|
view.Yoga().IsEnabled = true;
|
||||||
|
view.Yoga().ApplyLayout();
|
||||||
|
Assert.True(view.Bounds.Height == 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@@ -23,14 +23,21 @@ namespace Facebook.YogaKit
|
|||||||
height = (float)view.Bounds.Height;
|
height = (float)view.Bounds.Height;
|
||||||
}
|
}
|
||||||
|
|
||||||
static float NativePixelScale => (float)UIScreen.MainScreen.Scale;
|
static float NativePixelScale => (float)UIScreen.MainScreen.Scale;
|
||||||
|
|
||||||
|
|
||||||
static void ApplyLayoutToNativeView(UIView view, YogaNode node)
|
static void ApplyLayoutToNativeView(UIView view, YogaNode node)
|
||||||
{
|
{
|
||||||
var topLeft = new CGPoint(node.LayoutX, node.LayoutY);
|
var topLeft = new CGPoint(node.LayoutX, node.LayoutY);
|
||||||
var bottomRight = new CGPoint(topLeft.X + node.LayoutWidth, topLeft.Y + node.LayoutHeight);
|
var bottomRight = new CGPoint(topLeft.X + node.LayoutWidth, topLeft.Y + node.LayoutHeight);
|
||||||
view.Frame = new CGRect(RoundPointValue((float)topLeft.X), RoundPointValue((float)topLeft.Y), RoundPointValue((float)bottomRight.X) - RoundPointValue((float)topLeft.X), RoundPointValue((float)bottomRight.Y) - RoundPointValue((float)topLeft.Y));
|
if (view is UIScrollView scrollView)
|
||||||
|
{
|
||||||
|
scrollView.ContentSize = new CGSize(RoundPointValue((float)bottomRight.X) - RoundPointValue((float)topLeft.X), RoundPointValue((float)bottomRight.Y) - RoundPointValue((float)topLeft.Y));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
view.Frame = new CGRect(RoundPointValue((float)topLeft.X), RoundPointValue((float)topLeft.Y), RoundPointValue((float)bottomRight.X) - RoundPointValue((float)topLeft.X), RoundPointValue((float)bottomRight.Y) - RoundPointValue((float)topLeft.Y));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _disposed;
|
bool _disposed;
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAbsolutePositionTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAbsolutePositionTest.html
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignContentTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignContentTest.html
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignItemsTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignItemsTest.html
|
||||||
@@ -1958,5 +1956,211 @@ namespace Facebook.Yoga
|
|||||||
Assert.AreEqual(20f, root_child0_child0_child0.LayoutHeight);
|
Assert.AreEqual(20f, root_child0_child0_child0.LayoutHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void Test_align_flex_start_with_shrinking_children()
|
||||||
|
{
|
||||||
|
YogaConfig config = new YogaConfig();
|
||||||
|
|
||||||
|
YogaNode root = new YogaNode(config);
|
||||||
|
root.Width = 500;
|
||||||
|
root.Height = 500;
|
||||||
|
|
||||||
|
YogaNode root_child0 = new YogaNode(config);
|
||||||
|
root_child0.AlignItems = YogaAlign.FlexStart;
|
||||||
|
root.Insert(0, root_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0 = new YogaNode(config);
|
||||||
|
root_child0_child0.FlexGrow = 1;
|
||||||
|
root_child0_child0.FlexShrink = 1;
|
||||||
|
root_child0.Insert(0, root_child0_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0_child0 = new YogaNode(config);
|
||||||
|
root_child0_child0_child0.FlexGrow = 1;
|
||||||
|
root_child0_child0_child0.FlexShrink = 1;
|
||||||
|
root_child0_child0.Insert(0, root_child0_child0_child0);
|
||||||
|
root.StyleDirection = YogaDirection.LTR;
|
||||||
|
root.CalculateLayout();
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root.LayoutY);
|
||||||
|
Assert.AreEqual(500f, root.LayoutWidth);
|
||||||
|
Assert.AreEqual(500f, root.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
|
Assert.AreEqual(500f, root_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
root.StyleDirection = YogaDirection.RTL;
|
||||||
|
root.CalculateLayout();
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root.LayoutY);
|
||||||
|
Assert.AreEqual(500f, root.LayoutWidth);
|
||||||
|
Assert.AreEqual(500f, root.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
|
Assert.AreEqual(500f, root_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(500f, root_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void Test_align_flex_start_with_stretching_children()
|
||||||
|
{
|
||||||
|
YogaConfig config = new YogaConfig();
|
||||||
|
|
||||||
|
YogaNode root = new YogaNode(config);
|
||||||
|
root.Width = 500;
|
||||||
|
root.Height = 500;
|
||||||
|
|
||||||
|
YogaNode root_child0 = new YogaNode(config);
|
||||||
|
root.Insert(0, root_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0 = new YogaNode(config);
|
||||||
|
root_child0_child0.FlexGrow = 1;
|
||||||
|
root_child0_child0.FlexShrink = 1;
|
||||||
|
root_child0.Insert(0, root_child0_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0_child0 = new YogaNode(config);
|
||||||
|
root_child0_child0_child0.FlexGrow = 1;
|
||||||
|
root_child0_child0_child0.FlexShrink = 1;
|
||||||
|
root_child0_child0.Insert(0, root_child0_child0_child0);
|
||||||
|
root.StyleDirection = YogaDirection.LTR;
|
||||||
|
root.CalculateLayout();
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root.LayoutY);
|
||||||
|
Assert.AreEqual(500f, root.LayoutWidth);
|
||||||
|
Assert.AreEqual(500f, root.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
|
Assert.AreEqual(500f, root_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(500f, root_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(500f, root_child0_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
root.StyleDirection = YogaDirection.RTL;
|
||||||
|
root.CalculateLayout();
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root.LayoutY);
|
||||||
|
Assert.AreEqual(500f, root.LayoutWidth);
|
||||||
|
Assert.AreEqual(500f, root.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
|
Assert.AreEqual(500f, root_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(500f, root_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(500f, root_child0_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void Test_align_flex_start_with_shrinking_children_with_stretch()
|
||||||
|
{
|
||||||
|
YogaConfig config = new YogaConfig();
|
||||||
|
|
||||||
|
YogaNode root = new YogaNode(config);
|
||||||
|
root.Width = 500;
|
||||||
|
root.Height = 500;
|
||||||
|
|
||||||
|
YogaNode root_child0 = new YogaNode(config);
|
||||||
|
root_child0.AlignItems = YogaAlign.FlexStart;
|
||||||
|
root.Insert(0, root_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0 = new YogaNode(config);
|
||||||
|
root_child0_child0.FlexGrow = 1;
|
||||||
|
root_child0_child0.FlexShrink = 1;
|
||||||
|
root_child0.Insert(0, root_child0_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0_child0 = new YogaNode(config);
|
||||||
|
root_child0_child0_child0.FlexGrow = 1;
|
||||||
|
root_child0_child0_child0.FlexShrink = 1;
|
||||||
|
root_child0_child0.Insert(0, root_child0_child0_child0);
|
||||||
|
root.StyleDirection = YogaDirection.LTR;
|
||||||
|
root.CalculateLayout();
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root.LayoutY);
|
||||||
|
Assert.AreEqual(500f, root.LayoutWidth);
|
||||||
|
Assert.AreEqual(500f, root.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
|
Assert.AreEqual(500f, root_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
root.StyleDirection = YogaDirection.RTL;
|
||||||
|
root.CalculateLayout();
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root.LayoutY);
|
||||||
|
Assert.AreEqual(500f, root.LayoutWidth);
|
||||||
|
Assert.AreEqual(500f, root.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
|
Assert.AreEqual(500f, root_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(500f, root_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutHeight);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignSelfTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignSelfTest.html
|
||||||
|
299
csharp/tests/Facebook.Yoga/YGAndroidNewsFeed.cs
Normal file
299
csharp/tests/Facebook.Yoga/YGAndroidNewsFeed.cs
Normal file
@@ -0,0 +1,299 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAndroidNewsFeed.html
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
namespace Facebook.Yoga
|
||||||
|
{
|
||||||
|
[TestFixture]
|
||||||
|
public class YGAndroidNewsFeed
|
||||||
|
{
|
||||||
|
[Test]
|
||||||
|
public void Test_android_news_feed()
|
||||||
|
{
|
||||||
|
YogaConfig config = new YogaConfig();
|
||||||
|
|
||||||
|
YogaNode root = new YogaNode(config);
|
||||||
|
root.AlignContent = YogaAlign.Stretch;
|
||||||
|
root.Width = 1080;
|
||||||
|
|
||||||
|
YogaNode root_child0 = new YogaNode(config);
|
||||||
|
root.Insert(0, root_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0 = new YogaNode(config);
|
||||||
|
root_child0_child0.AlignContent = YogaAlign.Stretch;
|
||||||
|
root_child0.Insert(0, root_child0_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0_child0 = new YogaNode(config);
|
||||||
|
root_child0_child0_child0.AlignContent = YogaAlign.Stretch;
|
||||||
|
root_child0_child0.Insert(0, root_child0_child0_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0_child0_child0 = new YogaNode(config);
|
||||||
|
root_child0_child0_child0_child0.FlexDirection = YogaFlexDirection.Row;
|
||||||
|
root_child0_child0_child0_child0.AlignContent = YogaAlign.Stretch;
|
||||||
|
root_child0_child0_child0_child0.AlignItems = YogaAlign.FlexStart;
|
||||||
|
root_child0_child0_child0_child0.MarginStart = 36;
|
||||||
|
root_child0_child0_child0_child0.MarginTop = 24;
|
||||||
|
root_child0_child0_child0.Insert(0, root_child0_child0_child0_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0_child0_child0_child0 = new YogaNode(config);
|
||||||
|
root_child0_child0_child0_child0_child0.FlexDirection = YogaFlexDirection.Row;
|
||||||
|
root_child0_child0_child0_child0_child0.AlignContent = YogaAlign.Stretch;
|
||||||
|
root_child0_child0_child0_child0.Insert(0, root_child0_child0_child0_child0_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0_child0_child0_child0_child0 = new YogaNode(config);
|
||||||
|
root_child0_child0_child0_child0_child0_child0.AlignContent = YogaAlign.Stretch;
|
||||||
|
root_child0_child0_child0_child0_child0_child0.Width = 120;
|
||||||
|
root_child0_child0_child0_child0_child0_child0.Height = 120;
|
||||||
|
root_child0_child0_child0_child0_child0.Insert(0, root_child0_child0_child0_child0_child0_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0_child0_child0_child1 = new YogaNode(config);
|
||||||
|
root_child0_child0_child0_child0_child1.AlignContent = YogaAlign.Stretch;
|
||||||
|
root_child0_child0_child0_child0_child1.FlexShrink = 1;
|
||||||
|
root_child0_child0_child0_child0_child1.MarginRight = 36;
|
||||||
|
root_child0_child0_child0_child0_child1.PaddingLeft = 36;
|
||||||
|
root_child0_child0_child0_child0_child1.PaddingTop = 21;
|
||||||
|
root_child0_child0_child0_child0_child1.PaddingRight = 36;
|
||||||
|
root_child0_child0_child0_child0_child1.PaddingBottom = 18;
|
||||||
|
root_child0_child0_child0_child0.Insert(1, root_child0_child0_child0_child0_child1);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0_child0_child0_child1_child0 = new YogaNode(config);
|
||||||
|
root_child0_child0_child0_child0_child1_child0.FlexDirection = YogaFlexDirection.Row;
|
||||||
|
root_child0_child0_child0_child0_child1_child0.AlignContent = YogaAlign.Stretch;
|
||||||
|
root_child0_child0_child0_child0_child1_child0.FlexShrink = 1;
|
||||||
|
root_child0_child0_child0_child0_child1.Insert(0, root_child0_child0_child0_child0_child1_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0_child0_child0_child1_child1 = new YogaNode(config);
|
||||||
|
root_child0_child0_child0_child0_child1_child1.AlignContent = YogaAlign.Stretch;
|
||||||
|
root_child0_child0_child0_child0_child1_child1.FlexShrink = 1;
|
||||||
|
root_child0_child0_child0_child0_child1.Insert(1, root_child0_child0_child0_child0_child1_child1);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0_child1 = new YogaNode(config);
|
||||||
|
root_child0_child0_child1.AlignContent = YogaAlign.Stretch;
|
||||||
|
root_child0_child0.Insert(1, root_child0_child0_child1);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0_child1_child0 = new YogaNode(config);
|
||||||
|
root_child0_child0_child1_child0.FlexDirection = YogaFlexDirection.Row;
|
||||||
|
root_child0_child0_child1_child0.AlignContent = YogaAlign.Stretch;
|
||||||
|
root_child0_child0_child1_child0.AlignItems = YogaAlign.FlexStart;
|
||||||
|
root_child0_child0_child1_child0.MarginStart = 174;
|
||||||
|
root_child0_child0_child1_child0.MarginTop = 24;
|
||||||
|
root_child0_child0_child1.Insert(0, root_child0_child0_child1_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0_child1_child0_child0 = new YogaNode(config);
|
||||||
|
root_child0_child0_child1_child0_child0.FlexDirection = YogaFlexDirection.Row;
|
||||||
|
root_child0_child0_child1_child0_child0.AlignContent = YogaAlign.Stretch;
|
||||||
|
root_child0_child0_child1_child0.Insert(0, root_child0_child0_child1_child0_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0_child1_child0_child0_child0 = new YogaNode(config);
|
||||||
|
root_child0_child0_child1_child0_child0_child0.AlignContent = YogaAlign.Stretch;
|
||||||
|
root_child0_child0_child1_child0_child0_child0.Width = 72;
|
||||||
|
root_child0_child0_child1_child0_child0_child0.Height = 72;
|
||||||
|
root_child0_child0_child1_child0_child0.Insert(0, root_child0_child0_child1_child0_child0_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0_child1_child0_child1 = new YogaNode(config);
|
||||||
|
root_child0_child0_child1_child0_child1.AlignContent = YogaAlign.Stretch;
|
||||||
|
root_child0_child0_child1_child0_child1.FlexShrink = 1;
|
||||||
|
root_child0_child0_child1_child0_child1.MarginRight = 36;
|
||||||
|
root_child0_child0_child1_child0_child1.PaddingLeft = 36;
|
||||||
|
root_child0_child0_child1_child0_child1.PaddingTop = 21;
|
||||||
|
root_child0_child0_child1_child0_child1.PaddingRight = 36;
|
||||||
|
root_child0_child0_child1_child0_child1.PaddingBottom = 18;
|
||||||
|
root_child0_child0_child1_child0.Insert(1, root_child0_child0_child1_child0_child1);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0_child1_child0_child1_child0 = new YogaNode(config);
|
||||||
|
root_child0_child0_child1_child0_child1_child0.FlexDirection = YogaFlexDirection.Row;
|
||||||
|
root_child0_child0_child1_child0_child1_child0.AlignContent = YogaAlign.Stretch;
|
||||||
|
root_child0_child0_child1_child0_child1_child0.FlexShrink = 1;
|
||||||
|
root_child0_child0_child1_child0_child1.Insert(0, root_child0_child0_child1_child0_child1_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0_child1_child0_child1_child1 = new YogaNode(config);
|
||||||
|
root_child0_child0_child1_child0_child1_child1.AlignContent = YogaAlign.Stretch;
|
||||||
|
root_child0_child0_child1_child0_child1_child1.FlexShrink = 1;
|
||||||
|
root_child0_child0_child1_child0_child1.Insert(1, root_child0_child0_child1_child0_child1_child1);
|
||||||
|
root.StyleDirection = YogaDirection.LTR;
|
||||||
|
root.CalculateLayout();
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root.LayoutY);
|
||||||
|
Assert.AreEqual(1080f, root.LayoutWidth);
|
||||||
|
Assert.AreEqual(240f, root.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
|
Assert.AreEqual(1080f, root_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(240f, root_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(1080f, root_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(240f, root_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(1080f, root_child0_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(144f, root_child0_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(36f, root_child0_child0_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(24f, root_child0_child0_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(1044f, root_child0_child0_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(120f, root_child0_child0_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(120f, root_child0_child0_child0_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(120f, root_child0_child0_child0_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0_child0_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0_child0_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(120f, root_child0_child0_child0_child0_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(120f, root_child0_child0_child0_child0_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(120f, root_child0_child0_child0_child0_child1.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0_child0_child1.LayoutY);
|
||||||
|
Assert.AreEqual(72f, root_child0_child0_child0_child0_child1.LayoutWidth);
|
||||||
|
Assert.AreEqual(39f, root_child0_child0_child0_child0_child1.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(36f, root_child0_child0_child0_child0_child1_child0.LayoutX);
|
||||||
|
Assert.AreEqual(21f, root_child0_child0_child0_child0_child1_child0.LayoutY);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0_child0_child1_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0_child0_child1_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(36f, root_child0_child0_child0_child0_child1_child1.LayoutX);
|
||||||
|
Assert.AreEqual(21f, root_child0_child0_child0_child0_child1_child1.LayoutY);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0_child0_child1_child1.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0_child0_child1_child1.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child1.LayoutX);
|
||||||
|
Assert.AreEqual(144f, root_child0_child0_child1.LayoutY);
|
||||||
|
Assert.AreEqual(1080f, root_child0_child0_child1.LayoutWidth);
|
||||||
|
Assert.AreEqual(96f, root_child0_child0_child1.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(174f, root_child0_child0_child1_child0.LayoutX);
|
||||||
|
Assert.AreEqual(24f, root_child0_child0_child1_child0.LayoutY);
|
||||||
|
Assert.AreEqual(906f, root_child0_child0_child1_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(72f, root_child0_child0_child1_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child1_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child1_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(72f, root_child0_child0_child1_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(72f, root_child0_child0_child1_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child1_child0_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child1_child0_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(72f, root_child0_child0_child1_child0_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(72f, root_child0_child0_child1_child0_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(72f, root_child0_child0_child1_child0_child1.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child1_child0_child1.LayoutY);
|
||||||
|
Assert.AreEqual(72f, root_child0_child0_child1_child0_child1.LayoutWidth);
|
||||||
|
Assert.AreEqual(39f, root_child0_child0_child1_child0_child1.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(36f, root_child0_child0_child1_child0_child1_child0.LayoutX);
|
||||||
|
Assert.AreEqual(21f, root_child0_child0_child1_child0_child1_child0.LayoutY);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child1_child0_child1_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child1_child0_child1_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(36f, root_child0_child0_child1_child0_child1_child1.LayoutX);
|
||||||
|
Assert.AreEqual(21f, root_child0_child0_child1_child0_child1_child1.LayoutY);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child1_child0_child1_child1.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child1_child0_child1_child1.LayoutHeight);
|
||||||
|
|
||||||
|
root.StyleDirection = YogaDirection.RTL;
|
||||||
|
root.CalculateLayout();
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root.LayoutY);
|
||||||
|
Assert.AreEqual(1080f, root.LayoutWidth);
|
||||||
|
Assert.AreEqual(240f, root.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
|
Assert.AreEqual(1080f, root_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(240f, root_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(1080f, root_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(240f, root_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(1080f, root_child0_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(144f, root_child0_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(24f, root_child0_child0_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(1044f, root_child0_child0_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(120f, root_child0_child0_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(924f, root_child0_child0_child0_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(120f, root_child0_child0_child0_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(120f, root_child0_child0_child0_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0_child0_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0_child0_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(120f, root_child0_child0_child0_child0_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(120f, root_child0_child0_child0_child0_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(816f, root_child0_child0_child0_child0_child1.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0_child0_child1.LayoutY);
|
||||||
|
Assert.AreEqual(72f, root_child0_child0_child0_child0_child1.LayoutWidth);
|
||||||
|
Assert.AreEqual(39f, root_child0_child0_child0_child0_child1.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(36f, root_child0_child0_child0_child0_child1_child0.LayoutX);
|
||||||
|
Assert.AreEqual(21f, root_child0_child0_child0_child0_child1_child0.LayoutY);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0_child0_child1_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0_child0_child1_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(36f, root_child0_child0_child0_child0_child1_child1.LayoutX);
|
||||||
|
Assert.AreEqual(21f, root_child0_child0_child0_child0_child1_child1.LayoutY);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0_child0_child1_child1.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0_child0_child1_child1.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child1.LayoutX);
|
||||||
|
Assert.AreEqual(144f, root_child0_child0_child1.LayoutY);
|
||||||
|
Assert.AreEqual(1080f, root_child0_child0_child1.LayoutWidth);
|
||||||
|
Assert.AreEqual(96f, root_child0_child0_child1.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child1_child0.LayoutX);
|
||||||
|
Assert.AreEqual(24f, root_child0_child0_child1_child0.LayoutY);
|
||||||
|
Assert.AreEqual(906f, root_child0_child0_child1_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(72f, root_child0_child0_child1_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(834f, root_child0_child0_child1_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child1_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(72f, root_child0_child0_child1_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(72f, root_child0_child0_child1_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child1_child0_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child1_child0_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(72f, root_child0_child0_child1_child0_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(72f, root_child0_child0_child1_child0_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(726f, root_child0_child0_child1_child0_child1.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child1_child0_child1.LayoutY);
|
||||||
|
Assert.AreEqual(72f, root_child0_child0_child1_child0_child1.LayoutWidth);
|
||||||
|
Assert.AreEqual(39f, root_child0_child0_child1_child0_child1.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(36f, root_child0_child0_child1_child0_child1_child0.LayoutX);
|
||||||
|
Assert.AreEqual(21f, root_child0_child0_child1_child0_child1_child0.LayoutY);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child1_child0_child1_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child1_child0_child1_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(36f, root_child0_child0_child1_child0_child1_child1.LayoutX);
|
||||||
|
Assert.AreEqual(21f, root_child0_child0_child1_child0_child1_child1.LayoutY);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child1_child0_child1_child1.LayoutWidth);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child1_child0_child1_child1.LayoutHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGBorderTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGBorderTest.html
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGDimensionTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGDimensionTest.html
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGDisplayTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGDisplayTest.html
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGFlexDirectionTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGFlexDirectionTest.html
|
||||||
|
@@ -1,10 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) 2014-present, Facebook, Inc.
|
||||||
* All rights reserved.
|
|
||||||
*
|
*
|
||||||
* This source code is licensed under the BSD-style license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
* LICENSE file in the root directory of this source tree.
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGFlexTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGFlexTest.html
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user