Compare commits
266 Commits
1.10.0
...
carlhuting
Author | SHA1 | Date | |
---|---|---|---|
|
19035c90e9 | ||
|
19fd066507 | ||
|
204e849218 | ||
|
8ff13c922a | ||
|
af219f8836 | ||
|
e33123f955 | ||
|
755fa07b39 | ||
|
2701d80078 | ||
|
c393ed1381 | ||
|
a4bdd9cd9b | ||
|
4a4325afb6 | ||
|
586eb6102a | ||
|
b1e6793460 | ||
|
8b17459254 | ||
|
195c166efe | ||
|
0908d3a173 | ||
|
f304990656 | ||
|
cea3865c74 | ||
|
b74c0d4766 | ||
|
54e863cef2 | ||
|
1938792517 | ||
|
aa71dbb5bd | ||
|
8dc46c0a87 | ||
|
1180afed9c | ||
|
1562bce9b4 | ||
|
a9514513a7 | ||
|
cf809b8e8b | ||
|
d7ff5c0689 | ||
|
e3156279fc | ||
|
0ce42d83e0 | ||
|
afc1108659 | ||
|
a15bf6e701 | ||
|
74fc37efc8 | ||
|
5824dbda66 | ||
|
e96a09e5ff | ||
|
9e20dfeea1 | ||
|
6e04631862 | ||
|
88b23ebb3d | ||
|
018916403e | ||
|
af38fd31f8 | ||
|
1e0ebdae2f | ||
|
1adbafe950 | ||
|
e51ca95713 | ||
|
a803421739 | ||
|
011c1964a0 | ||
|
05d205cf89 | ||
|
0a4f7bd558 | ||
|
cea862a6bf | ||
|
cc02a20c9e | ||
|
98fda9c587 | ||
|
2eed95f3e4 | ||
|
e5d3baca81 | ||
|
dee93017f7 | ||
|
e167642672 | ||
|
e9bb1efb03 | ||
|
3f7d03b443 | ||
|
ffce716557 | ||
|
fcfb19e9cf | ||
|
c5f105a7b6 | ||
|
b062d23947 | ||
|
7fc6fcb38c | ||
|
bc7e504b29 | ||
|
3d8afa9e90 | ||
|
a1e47e37ae | ||
|
e0bc0ebe29 | ||
|
498c0ff4bf | ||
|
d42d43e90f | ||
|
bfc6319daa | ||
|
74ce5afd9e | ||
|
c11faf2d56 | ||
|
5fad8008ab | ||
|
948ade4b1c | ||
|
b1a7f2b4d9 | ||
|
d44a6d936f | ||
|
1fc8472d35 | ||
|
c235301b52 | ||
|
2fb81500c1 | ||
|
68d9209dd9 | ||
|
e91569cdad | ||
|
f31917aa01 | ||
|
74202aecff | ||
|
9c2108c69e | ||
|
3d2836a947 | ||
|
e4856a2264 | ||
|
a2ee0f65bd | ||
|
85352c4e45 | ||
|
7d7b7b9e18 | ||
|
62d8a911ff | ||
|
ca46c67e9e | ||
|
5bb2265083 | ||
|
ab3bf40c7d | ||
|
f273e80c77 | ||
|
1471be54e3 | ||
|
f039835249 | ||
|
f793ba2d6b | ||
|
9f72ad05ce | ||
|
14f3827491 | ||
|
0d96098fd9 | ||
|
42e3b78f04 | ||
|
3ad49d27d9 | ||
|
3331a9e480 | ||
|
7890672ecc | ||
|
d7bfbf3646 | ||
|
6d271c05f6 | ||
|
a9bddf87ff | ||
|
88994129ae | ||
|
888892885e | ||
|
de79f2a1d4 | ||
|
6368416178 | ||
|
a935a222b5 | ||
|
7c4da0a341 | ||
|
b047af25ca | ||
|
2abd9dd91b | ||
|
afadc5cf6b | ||
|
8823cc357a | ||
|
8b8d9a05b7 | ||
|
15668aceb6 | ||
|
e25fe994b3 | ||
|
47abe1c482 | ||
|
95169c3150 | ||
|
7331de78bd | ||
|
05f36a835a | ||
|
dcd9438488 | ||
|
d38db1292c | ||
|
4463fe0856 | ||
|
2156de5fb5 | ||
|
b1c749075d | ||
|
367a93de88 | ||
|
2643b96589 | ||
|
016a10df26 | ||
|
cbcf07f08a | ||
|
59bcac3289 | ||
|
bd90192df9 | ||
|
e7fcf1ee65 | ||
|
f86c74ce7e | ||
|
d5ad51bccc | ||
|
0bdf36f5d1 | ||
|
1b9053bc5d | ||
|
446101a168 | ||
|
f0324035bf | ||
|
a2f94cbf9a | ||
|
d21fa68033 | ||
|
5a6d84abc9 | ||
|
61ae484316 | ||
|
42657017bd | ||
|
9b9a344934 | ||
|
5f92ba49a7 | ||
|
2e564c21cd | ||
|
ca7d4d1633 | ||
|
3645f43cea | ||
|
9378a7a439 | ||
|
d3e02b15fa | ||
|
80d527814e | ||
|
5121fef5d8 | ||
|
0d026bd1a0 | ||
|
719fa3cca3 | ||
|
307cf09434 | ||
|
8691cdaed6 | ||
|
4a6b1e19b8 | ||
|
31ce3ab866 | ||
|
0846439c8e | ||
|
000d1436b4 | ||
|
1bc97a5e48 | ||
|
68f7001ed4 | ||
|
59446294b3 | ||
|
460370b7d3 | ||
|
cbea5d44b8 | ||
|
b4b009c2d8 | ||
|
74dd627495 | ||
|
58f0cca7c7 | ||
|
3de3575ac4 | ||
|
390fade8c0 | ||
|
96dfe068ee | ||
|
e0eb37fce0 | ||
|
79355ab72d | ||
|
5a9f29debb | ||
|
8b8932811e | ||
|
604a9a98a9 | ||
|
71321f763a | ||
|
7fa0816d81 | ||
|
4840495d3f | ||
|
866bf101b2 | ||
|
3467308874 | ||
|
ef2c693b05 | ||
|
efac22a508 | ||
|
4b97375524 | ||
|
ab9d06abf5 | ||
|
5ee32fbefc | ||
|
899664dddd | ||
|
b66642cb86 | ||
|
b9ae948ce9 | ||
|
138521ccc2 | ||
|
5514722ce2 | ||
|
56e133ab4c | ||
|
f6415889ca | ||
|
885b4cbdfb | ||
|
8461aeaef0 | ||
|
3df41aefdb | ||
|
8bc89651d6 | ||
|
c5f2444048 | ||
|
130a9a2aa2 | ||
|
dd97fcc968 | ||
|
4f51871fa8 | ||
|
e96d14395c | ||
|
852db1d885 | ||
|
3f79439718 | ||
|
96d93f2982 | ||
|
236bcc1a39 | ||
|
4b5ae211da | ||
|
aaa018bbea | ||
|
6bdd39d0ed | ||
|
da678ef971 | ||
|
e9078374c9 | ||
|
f23a669ed0 | ||
|
9ddda3c630 | ||
|
8ab01fde6e | ||
|
440c719190 | ||
|
e522b2dee4 | ||
|
b26e637c81 | ||
|
6b7f6980f9 | ||
|
4248fd9d4c | ||
|
5a65261a55 | ||
|
5719132f58 | ||
|
10b316f315 | ||
|
b6498987fa | ||
|
9680ae98a6 | ||
|
59755d2874 | ||
|
64c37767c2 | ||
|
50ec35575f | ||
|
ed3b54b603 | ||
|
ed5c5a799f | ||
|
d19da9e528 | ||
|
0962c5220c | ||
|
b9972cee6e | ||
|
98c1c180af | ||
|
6f6e0ce339 | ||
|
bdae838516 | ||
|
6d8ee77791 | ||
|
9725d5b21b | ||
|
8e48edaa0b | ||
|
89394a2dd6 | ||
|
02a2309b2a | ||
|
8f181c7259 | ||
|
339c5574b8 | ||
|
8d5bbecd3d | ||
|
dd12907632 | ||
|
7d7d9a7ef0 | ||
|
63570613d3 | ||
|
4e2011c381 | ||
|
7a60399b2b | ||
|
a0b3586fb3 | ||
|
a2ef8978cd | ||
|
d02f4a94de | ||
|
b7890fa2a8 | ||
|
1e4d0abc66 | ||
|
eb2aeb3adb | ||
|
fad2ee1a64 | ||
|
ba9bd4eae3 | ||
|
e12b78f99b | ||
|
5d1cee2bf0 | ||
|
5c711a7076 | ||
|
838ef47847 | ||
|
786ccddd7b | ||
|
b747286c1d | ||
|
bb3c2b2498 | ||
|
36e732aabd |
56
.clang-format
Normal file
56
.clang-format
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
Language: Cpp
|
||||||
|
AccessModifierOffset: -2
|
||||||
|
AlignAfterOpenBracket: AlwaysBreak
|
||||||
|
AlignConsecutiveAssignments: false
|
||||||
|
AlignConsecutiveDeclarations: false
|
||||||
|
AlignEscapedNewlines: Left
|
||||||
|
AlignOperands: false
|
||||||
|
AlignTrailingComments: false
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: false
|
||||||
|
AllowShortBlocksOnASingleLine: false
|
||||||
|
AllowShortCaseLabelsOnASingleLine: false
|
||||||
|
AllowShortFunctionsOnASingleLine: Inline
|
||||||
|
AllowShortIfStatementsOnASingleLine: false
|
||||||
|
AllowShortLoopsOnASingleLine: true
|
||||||
|
AlwaysBreakAfterReturnType: None
|
||||||
|
AlwaysBreakBeforeMultilineStrings: true
|
||||||
|
AlwaysBreakTemplateDeclarations: Yes
|
||||||
|
BinPackArguments: false
|
||||||
|
BinPackParameters: false
|
||||||
|
BreakBeforeBinaryOperators: false
|
||||||
|
BreakBeforeBraces: Attach
|
||||||
|
BreakBeforeTernaryOperators: true
|
||||||
|
BreakConstructorInitializers: BeforeColon
|
||||||
|
BreakInheritanceList: BeforeColon
|
||||||
|
BreakStringLiterals: true
|
||||||
|
ColumnLimit: 80
|
||||||
|
CompactNamespaces: false
|
||||||
|
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||||
|
ConstructorInitializerIndentWidth: 4
|
||||||
|
ContinuationIndentWidth: 4
|
||||||
|
Cpp11BracedListStyle: true
|
||||||
|
DerivePointerAlignment: false
|
||||||
|
FixNamespaceComments: true
|
||||||
|
IndentCaseLabels: true
|
||||||
|
IndentPPDirectives: None
|
||||||
|
IndentWidth: 2
|
||||||
|
IndentWrappedFunctionNames: false
|
||||||
|
MaxEmptyLinesToKeep: 1
|
||||||
|
NamespaceIndentation: None
|
||||||
|
PenaltyReturnTypeOnItsOwnLine: 2000
|
||||||
|
PointerAlignment: Left
|
||||||
|
ReflowComments: true
|
||||||
|
SortIncludes: false
|
||||||
|
SortUsingDeclarations: true
|
||||||
|
SpaceAfterCStyleCast: true
|
||||||
|
SpaceAfterTemplateKeyword: true
|
||||||
|
SpaceBeforeAssignmentOperators: true
|
||||||
|
SpaceBeforeCpp11BracedList: false
|
||||||
|
SpaceBeforeCtorInitializerColon: true
|
||||||
|
SpaceBeforeInheritanceColon: true
|
||||||
|
SpaceBeforeParens: ControlStatements
|
||||||
|
SpaceBeforeRangeBasedForLoopColon: true
|
||||||
|
SpaceInEmptyParentheses: false
|
||||||
|
SpacesBeforeTrailingComments: 1
|
||||||
|
Standard: Cpp11
|
||||||
|
UseTab: Never
|
1
.clang-format-ignore
Normal file
1
.clang-format-ignore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
^lib/.*
|
@@ -1 +1 @@
|
|||||||
3.0
|
4.0
|
||||||
|
31
BUCK
31
BUCK
@@ -9,20 +9,31 @@ GMOCK_OVERRIDE_FLAGS = [
|
|||||||
"-Wno-inconsistent-missing-override",
|
"-Wno-inconsistent-missing-override",
|
||||||
]
|
]
|
||||||
|
|
||||||
COMPILER_FLAGS = LIBRARY_COMPILER_FLAGS + [
|
|
||||||
"-std=c++1y",
|
|
||||||
]
|
|
||||||
|
|
||||||
TEST_COMPILER_FLAGS = BASE_COMPILER_FLAGS + GMOCK_OVERRIDE_FLAGS + [
|
TEST_COMPILER_FLAGS = BASE_COMPILER_FLAGS + GMOCK_OVERRIDE_FLAGS + [
|
||||||
"-std=c++1y",
|
"-DDEBUG",
|
||||||
|
"-DYG_ENABLE_EVENTS",
|
||||||
]
|
]
|
||||||
|
|
||||||
yoga_cxx_library(
|
yoga_cxx_library(
|
||||||
name = "yoga",
|
name = "yoga",
|
||||||
srcs = glob(["yoga/*.cpp"]),
|
srcs = glob(["yoga/**/*.cpp"]),
|
||||||
header_namespace = "",
|
header_namespace = "",
|
||||||
exported_headers = subdir_glob([("", "yoga/*.h")]),
|
exported_headers = subdir_glob([("", "yoga/**/*.h")]),
|
||||||
compiler_flags = COMPILER_FLAGS,
|
compiler_flags = LIBRARY_COMPILER_FLAGS,
|
||||||
|
soname = "libyogacore.$(ext)",
|
||||||
|
tests = [":YogaTests"],
|
||||||
|
visibility = ["PUBLIC"],
|
||||||
|
deps = [
|
||||||
|
yoga_dep("lib/fb:ndklog"),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
yoga_cxx_library(
|
||||||
|
name = "yogaForDebug",
|
||||||
|
srcs = glob(["yoga/**/*.cpp"]),
|
||||||
|
header_namespace = "",
|
||||||
|
exported_headers = subdir_glob([("", "yoga/**/*.h")]),
|
||||||
|
compiler_flags = TEST_COMPILER_FLAGS,
|
||||||
soname = "libyogacore.$(ext)",
|
soname = "libyogacore.$(ext)",
|
||||||
tests = [":YogaTests"],
|
tests = [":YogaTests"],
|
||||||
visibility = ["PUBLIC"],
|
visibility = ["PUBLIC"],
|
||||||
@@ -34,11 +45,13 @@ yoga_cxx_library(
|
|||||||
yoga_cxx_test(
|
yoga_cxx_test(
|
||||||
name = "YogaTests",
|
name = "YogaTests",
|
||||||
srcs = glob(["tests/*.cpp"]),
|
srcs = glob(["tests/*.cpp"]),
|
||||||
|
headers = subdir_glob([("", "yoga/**/*.h")]),
|
||||||
compiler_flags = TEST_COMPILER_FLAGS,
|
compiler_flags = TEST_COMPILER_FLAGS,
|
||||||
contacts = ["emilsj@fb.com"],
|
contacts = ["emilsj@fb.com"],
|
||||||
visibility = ["PUBLIC"],
|
visibility = ["PUBLIC"],
|
||||||
deps = [
|
deps = [
|
||||||
":yoga",
|
":yogaForDebug",
|
||||||
|
yoga_dep("testutil:testutil"),
|
||||||
GTEST_TARGET,
|
GTEST_TARGET,
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
@@ -13,3 +13,4 @@ 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)
|
||||||
|
set_target_properties(yogacore PROPERTIES CXX_STANDARD 11)
|
||||||
|
5224
ReactYoga.xcodeproj/project.pbxproj
Normal file
5224
ReactYoga.xcodeproj/project.pbxproj
Normal file
File diff suppressed because it is too large
Load Diff
12
Yoga.podspec
12
Yoga.podspec
@@ -1,6 +1,12 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
#
|
||||||
|
# This source code is licensed under the MIT license found in the LICENSE
|
||||||
|
# file in the root directory of this source tree.
|
||||||
|
#
|
||||||
Pod::Spec.new do |spec|
|
Pod::Spec.new do |spec|
|
||||||
spec.name = 'Yoga'
|
spec.name = 'Yoga'
|
||||||
spec.version = '1.9.0'
|
spec.version = '1.14.0'
|
||||||
spec.license = { :type => 'MIT', :file => "LICENSE" }
|
spec.license = { :type => 'MIT', :file => "LICENSE" }
|
||||||
spec.homepage = 'https://yogalayout.com/'
|
spec.homepage = 'https://yogalayout.com/'
|
||||||
spec.documentation_url = 'https://yogalayout.com/docs'
|
spec.documentation_url = 'https://yogalayout.com/docs'
|
||||||
@@ -13,7 +19,7 @@ Pod::Spec.new do |spec|
|
|||||||
:git => 'https://github.com/facebook/yoga.git',
|
:git => 'https://github.com/facebook/yoga.git',
|
||||||
:tag => spec.version.to_s,
|
:tag => spec.version.to_s,
|
||||||
}
|
}
|
||||||
spec.platforms = { :ios => "8.0", :tvos => "10.0" }
|
spec.platforms = { :ios => "8.0", :osx => "10.7", :tvos => "10.0", :watchos => "2.0" }
|
||||||
spec.module_name = 'yoga'
|
spec.module_name = 'yoga'
|
||||||
spec.requires_arc = false
|
spec.requires_arc = false
|
||||||
spec.pod_target_xcconfig = {
|
spec.pod_target_xcconfig = {
|
||||||
@@ -28,6 +34,6 @@ Pod::Spec.new do |spec|
|
|||||||
'-fPIC'
|
'-fPIC'
|
||||||
]
|
]
|
||||||
spec.source_files = 'yoga/**/*.{c,h,cpp}'
|
spec.source_files = 'yoga/**/*.{c,h,cpp}'
|
||||||
spec.public_header_files = 'yoga/{Yoga,YGEnums,YGMacros}.h'
|
spec.public_header_files = 'yoga/{Yoga,YGEnums,YGMacros,YGValue}.h'
|
||||||
|
|
||||||
end
|
end
|
||||||
|
10
YogaDev.xcworkspace/contents.xcworkspacedata
generated
Normal file
10
YogaDev.xcworkspace/contents.xcworkspacedata
generated
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "group:YogaDev/YogaDev.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
<FileRef
|
||||||
|
location = "group:ReactYoga.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
350
YogaDev/YogaDev.xcodeproj/project.pbxproj
Normal file
350
YogaDev/YogaDev.xcodeproj/project.pbxproj
Normal file
@@ -0,0 +1,350 @@
|
|||||||
|
// !$*UTF8*$!
|
||||||
|
{
|
||||||
|
archiveVersion = 1;
|
||||||
|
classes = {
|
||||||
|
};
|
||||||
|
objectVersion = 50;
|
||||||
|
objects = {
|
||||||
|
|
||||||
|
/* Begin PBXBuildFile section */
|
||||||
|
6D4C7FA42249476900CBB1EC /* YGMarker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D4C7F892249476700CBB1EC /* YGMarker.cpp */; };
|
||||||
|
6D4C7FA52249476900CBB1EC /* YGValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D4C7F8B2249476700CBB1EC /* YGValue.cpp */; };
|
||||||
|
6D4C7FA62249476900CBB1EC /* YGLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D4C7F902249476700CBB1EC /* YGLayout.cpp */; };
|
||||||
|
6D4C7FA72249476900CBB1EC /* YGNodePrint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D4C7F922249476700CBB1EC /* YGNodePrint.cpp */; };
|
||||||
|
6D4C7FA82249476900CBB1EC /* YGStyle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D4C7F992249476800CBB1EC /* YGStyle.cpp */; };
|
||||||
|
6D4C7FA92249476900CBB1EC /* log.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D4C7F9A2249476800CBB1EC /* log.cpp */; };
|
||||||
|
6D4C7FAA2249476900CBB1EC /* YGNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D4C7F9B2249476800CBB1EC /* YGNode.cpp */; };
|
||||||
|
6D4C7FAB2249476900CBB1EC /* Yoga.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D4C7F9C2249476800CBB1EC /* Yoga.cpp */; };
|
||||||
|
6D4C7FAC2249476900CBB1EC /* Utils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D4C7F9D2249476800CBB1EC /* Utils.cpp */; };
|
||||||
|
6D4C7FAD2249476900CBB1EC /* YGEnums.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D4C7F9E2249476800CBB1EC /* YGEnums.cpp */; };
|
||||||
|
6D4C7FAE2249476900CBB1EC /* YGConfig.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D4C7FA32249476800CBB1EC /* YGConfig.cpp */; };
|
||||||
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
/* Begin PBXCopyFilesBuildPhase section */
|
||||||
|
6D4C7F76224945B200CBB1EC /* CopyFiles */ = {
|
||||||
|
isa = PBXCopyFilesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
dstPath = "include/$(PRODUCT_NAME)";
|
||||||
|
dstSubfolderSpec = 16;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXFileReference section */
|
||||||
|
6D4C7F78224945B200CBB1EC /* libYogaDev.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libYogaDev.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
6D4C7F892249476700CBB1EC /* YGMarker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = YGMarker.cpp; path = ../yoga/YGMarker.cpp; sourceTree = "<group>"; };
|
||||||
|
6D4C7F8A2249476700CBB1EC /* Utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Utils.h; path = ../yoga/Utils.h; sourceTree = "<group>"; };
|
||||||
|
6D4C7F8B2249476700CBB1EC /* YGValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = YGValue.cpp; path = ../yoga/YGValue.cpp; sourceTree = "<group>"; };
|
||||||
|
6D4C7F8C2249476700CBB1EC /* instrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = instrumentation.h; path = ../yoga/instrumentation.h; sourceTree = "<group>"; };
|
||||||
|
6D4C7F8D2249476700CBB1EC /* YGStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YGStyle.h; path = ../yoga/YGStyle.h; sourceTree = "<group>"; };
|
||||||
|
6D4C7F8E2249476700CBB1EC /* YGNodePrint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YGNodePrint.h; path = ../yoga/YGNodePrint.h; sourceTree = "<group>"; };
|
||||||
|
6D4C7F8F2249476700CBB1EC /* YGMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YGMarker.h; path = ../yoga/YGMarker.h; sourceTree = "<group>"; };
|
||||||
|
6D4C7F902249476700CBB1EC /* YGLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = YGLayout.cpp; path = ../yoga/YGLayout.cpp; sourceTree = "<group>"; };
|
||||||
|
6D4C7F912249476700CBB1EC /* YGEnums.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YGEnums.h; path = ../yoga/YGEnums.h; sourceTree = "<group>"; };
|
||||||
|
6D4C7F922249476700CBB1EC /* YGNodePrint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = YGNodePrint.cpp; path = ../yoga/YGNodePrint.cpp; sourceTree = "<group>"; };
|
||||||
|
6D4C7F932249476700CBB1EC /* YGMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YGMacros.h; path = ../yoga/YGMacros.h; sourceTree = "<group>"; };
|
||||||
|
6D4C7F942249476700CBB1EC /* log.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = log.h; path = ../yoga/log.h; sourceTree = "<group>"; };
|
||||||
|
6D4C7F952249476800CBB1EC /* YGFloatOptional.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YGFloatOptional.h; path = ../yoga/YGFloatOptional.h; sourceTree = "<group>"; };
|
||||||
|
6D4C7F962249476800CBB1EC /* YGNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YGNode.h; path = ../yoga/YGNode.h; sourceTree = "<group>"; };
|
||||||
|
6D4C7F972249476800CBB1EC /* YGLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YGLayout.h; path = ../yoga/YGLayout.h; sourceTree = "<group>"; };
|
||||||
|
6D4C7F982249476800CBB1EC /* CompactValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CompactValue.h; path = ../yoga/CompactValue.h; sourceTree = "<group>"; };
|
||||||
|
6D4C7F992249476800CBB1EC /* YGStyle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = YGStyle.cpp; path = ../yoga/YGStyle.cpp; sourceTree = "<group>"; };
|
||||||
|
6D4C7F9A2249476800CBB1EC /* log.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = log.cpp; path = ../yoga/log.cpp; sourceTree = "<group>"; };
|
||||||
|
6D4C7F9B2249476800CBB1EC /* YGNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = YGNode.cpp; path = ../yoga/YGNode.cpp; sourceTree = "<group>"; };
|
||||||
|
6D4C7F9C2249476800CBB1EC /* Yoga.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Yoga.cpp; path = ../yoga/Yoga.cpp; sourceTree = "<group>"; };
|
||||||
|
6D4C7F9D2249476800CBB1EC /* Utils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Utils.cpp; path = ../yoga/Utils.cpp; sourceTree = "<group>"; };
|
||||||
|
6D4C7F9E2249476800CBB1EC /* YGEnums.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = YGEnums.cpp; path = ../yoga/YGEnums.cpp; sourceTree = "<group>"; };
|
||||||
|
6D4C7F9F2249476800CBB1EC /* Yoga-internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Yoga-internal.h"; path = "../yoga/Yoga-internal.h"; sourceTree = "<group>"; };
|
||||||
|
6D4C7FA02249476800CBB1EC /* YGValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YGValue.h; path = ../yoga/YGValue.h; sourceTree = "<group>"; };
|
||||||
|
6D4C7FA12249476800CBB1EC /* Yoga.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Yoga.h; path = ../yoga/Yoga.h; sourceTree = "<group>"; };
|
||||||
|
6D4C7FA22249476800CBB1EC /* YGConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YGConfig.h; path = ../yoga/YGConfig.h; sourceTree = "<group>"; };
|
||||||
|
6D4C7FA32249476800CBB1EC /* YGConfig.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = YGConfig.cpp; path = ../yoga/YGConfig.cpp; sourceTree = "<group>"; };
|
||||||
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
6D4C7F75224945B200CBB1EC /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXGroup section */
|
||||||
|
6D4C7F6F224945B200CBB1EC = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
6D4C7F982249476800CBB1EC /* CompactValue.h */,
|
||||||
|
6D4C7F8C2249476700CBB1EC /* instrumentation.h */,
|
||||||
|
6D4C7F9A2249476800CBB1EC /* log.cpp */,
|
||||||
|
6D4C7F942249476700CBB1EC /* log.h */,
|
||||||
|
6D4C7F9D2249476800CBB1EC /* Utils.cpp */,
|
||||||
|
6D4C7F8A2249476700CBB1EC /* Utils.h */,
|
||||||
|
6D4C7FA32249476800CBB1EC /* YGConfig.cpp */,
|
||||||
|
6D4C7FA22249476800CBB1EC /* YGConfig.h */,
|
||||||
|
6D4C7F9E2249476800CBB1EC /* YGEnums.cpp */,
|
||||||
|
6D4C7F912249476700CBB1EC /* YGEnums.h */,
|
||||||
|
6D4C7F952249476800CBB1EC /* YGFloatOptional.h */,
|
||||||
|
6D4C7F902249476700CBB1EC /* YGLayout.cpp */,
|
||||||
|
6D4C7F972249476800CBB1EC /* YGLayout.h */,
|
||||||
|
6D4C7F932249476700CBB1EC /* YGMacros.h */,
|
||||||
|
6D4C7F892249476700CBB1EC /* YGMarker.cpp */,
|
||||||
|
6D4C7F8F2249476700CBB1EC /* YGMarker.h */,
|
||||||
|
6D4C7F9B2249476800CBB1EC /* YGNode.cpp */,
|
||||||
|
6D4C7F962249476800CBB1EC /* YGNode.h */,
|
||||||
|
6D4C7F922249476700CBB1EC /* YGNodePrint.cpp */,
|
||||||
|
6D4C7F8E2249476700CBB1EC /* YGNodePrint.h */,
|
||||||
|
6D4C7F992249476800CBB1EC /* YGStyle.cpp */,
|
||||||
|
6D4C7F8D2249476700CBB1EC /* YGStyle.h */,
|
||||||
|
6D4C7F8B2249476700CBB1EC /* YGValue.cpp */,
|
||||||
|
6D4C7FA02249476800CBB1EC /* YGValue.h */,
|
||||||
|
6D4C7F9F2249476800CBB1EC /* Yoga-internal.h */,
|
||||||
|
6D4C7F9C2249476800CBB1EC /* Yoga.cpp */,
|
||||||
|
6D4C7FA12249476800CBB1EC /* Yoga.h */,
|
||||||
|
6D4C7F79224945B200CBB1EC /* Products */,
|
||||||
|
);
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
6D4C7F79224945B200CBB1EC /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
6D4C7F78224945B200CBB1EC /* libYogaDev.a */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXGroup section */
|
||||||
|
|
||||||
|
/* Begin PBXNativeTarget section */
|
||||||
|
6D4C7F77224945B200CBB1EC /* YogaDev */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 6D4C7F81224945B200CBB1EC /* Build configuration list for PBXNativeTarget "YogaDev" */;
|
||||||
|
buildPhases = (
|
||||||
|
6D4C7F74224945B200CBB1EC /* Sources */,
|
||||||
|
6D4C7F75224945B200CBB1EC /* Frameworks */,
|
||||||
|
6D4C7F76224945B200CBB1EC /* CopyFiles */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = YogaDev;
|
||||||
|
productName = YogaDev;
|
||||||
|
productReference = 6D4C7F78224945B200CBB1EC /* libYogaDev.a */;
|
||||||
|
productType = "com.apple.product-type.library.static";
|
||||||
|
};
|
||||||
|
/* End PBXNativeTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXProject section */
|
||||||
|
6D4C7F70224945B200CBB1EC /* Project object */ = {
|
||||||
|
isa = PBXProject;
|
||||||
|
attributes = {
|
||||||
|
LastUpgradeCheck = 1010;
|
||||||
|
ORGANIZATIONNAME = "Will Wilson";
|
||||||
|
TargetAttributes = {
|
||||||
|
6D4C7F77224945B200CBB1EC = {
|
||||||
|
CreatedOnToolsVersion = 10.1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
buildConfigurationList = 6D4C7F73224945B200CBB1EC /* Build configuration list for PBXProject "YogaDev" */;
|
||||||
|
compatibilityVersion = "Xcode 9.3";
|
||||||
|
developmentRegion = en;
|
||||||
|
hasScannedForEncodings = 0;
|
||||||
|
knownRegions = (
|
||||||
|
en,
|
||||||
|
);
|
||||||
|
mainGroup = 6D4C7F6F224945B200CBB1EC;
|
||||||
|
productRefGroup = 6D4C7F79224945B200CBB1EC /* Products */;
|
||||||
|
projectDirPath = "";
|
||||||
|
projectRoot = "";
|
||||||
|
targets = (
|
||||||
|
6D4C7F77224945B200CBB1EC /* YogaDev */,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
/* End PBXProject section */
|
||||||
|
|
||||||
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
|
6D4C7F74224945B200CBB1EC /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
6D4C7FAD2249476900CBB1EC /* YGEnums.cpp in Sources */,
|
||||||
|
6D4C7FAE2249476900CBB1EC /* YGConfig.cpp in Sources */,
|
||||||
|
6D4C7FAA2249476900CBB1EC /* YGNode.cpp in Sources */,
|
||||||
|
6D4C7FAB2249476900CBB1EC /* Yoga.cpp in Sources */,
|
||||||
|
6D4C7FA92249476900CBB1EC /* log.cpp in Sources */,
|
||||||
|
6D4C7FA62249476900CBB1EC /* YGLayout.cpp in Sources */,
|
||||||
|
6D4C7FAC2249476900CBB1EC /* Utils.cpp in Sources */,
|
||||||
|
6D4C7FA82249476900CBB1EC /* YGStyle.cpp in Sources */,
|
||||||
|
6D4C7FA42249476900CBB1EC /* YGMarker.cpp in Sources */,
|
||||||
|
6D4C7FA52249476900CBB1EC /* YGValue.cpp in Sources */,
|
||||||
|
6D4C7FA72249476900CBB1EC /* YGNodePrint.cpp in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin XCBuildConfiguration section */
|
||||||
|
6D4C7F7F224945B200CBB1EC /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_TESTABILITY = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
|
"DEBUG=1",
|
||||||
|
"$(inherited)",
|
||||||
|
);
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||||
|
MTL_FAST_MATH = YES;
|
||||||
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
6D4C7F80224945B200CBB1EC /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
MTL_FAST_MATH = YES;
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
VALIDATE_PRODUCT = YES;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
6D4C7F82224945B200CBB1EC /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
OTHER_LDFLAGS = "-ObjC";
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SKIP_INSTALL = YES;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
6D4C7F83224945B200CBB1EC /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
OTHER_LDFLAGS = "-ObjC";
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SKIP_INSTALL = YES;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
|
/* Begin XCConfigurationList section */
|
||||||
|
6D4C7F73224945B200CBB1EC /* Build configuration list for PBXProject "YogaDev" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
6D4C7F7F224945B200CBB1EC /* Debug */,
|
||||||
|
6D4C7F80224945B200CBB1EC /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
6D4C7F81224945B200CBB1EC /* Build configuration list for PBXNativeTarget "YogaDev" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
6D4C7F82224945B200CBB1EC /* Debug */,
|
||||||
|
6D4C7F83224945B200CBB1EC /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
/* End XCConfigurationList section */
|
||||||
|
};
|
||||||
|
rootObject = 6D4C7F70224945B200CBB1EC /* Project object */;
|
||||||
|
}
|
@@ -1,9 +1,15 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
#
|
||||||
|
# This source code is licensed under the MIT license found in the LICENSE
|
||||||
|
# file in the root directory of this source tree.
|
||||||
|
#
|
||||||
podspec = Pod::Spec.new do |spec|
|
podspec = Pod::Spec.new do |spec|
|
||||||
spec.name = 'YogaKit'
|
spec.name = 'YogaKit'
|
||||||
spec.version = '1.9.0'
|
spec.version = '1.14.0'
|
||||||
spec.license = { :type => 'MIT', :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/'
|
||||||
|
|
||||||
spec.summary = 'Yoga is a cross-platform layout engine which implements Flexbox.'
|
spec.summary = 'Yoga is a cross-platform layout engine which implements Flexbox.'
|
||||||
spec.description = 'Yoga is a cross-platform layout engine enabling maximum collaboration within your team by implementing an API many designers are familiar with, and opening it up to developers across different platforms.'
|
spec.description = 'Yoga is a cross-platform layout engine enabling maximum collaboration within your team by implementing an API many designers are familiar with, and opening it up to developers across different platforms.'
|
||||||
@@ -17,11 +23,11 @@ podspec = Pod::Spec.new do |spec|
|
|||||||
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.14'
|
||||||
spec.dependency 'Yoga', '~> 1.9'
|
|
||||||
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'
|
||||||
|
spec.swift_version = '4.0'
|
||||||
end
|
end
|
||||||
|
|
||||||
# See https://github.com/facebook/yoga/pull/366
|
# See https://github.com/facebook/yoga/pull/366
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "YGLayout.h"
|
#import "YGLayout.h"
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "YGLayout.h"
|
#import "YGLayout.h"
|
||||||
#import <yoga/Yoga.h>
|
#import <yoga/Yoga.h>
|
||||||
|
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
#import <yoga/YGEnums.h>
|
#import <yoga/YGEnums.h>
|
||||||
#import <yoga/Yoga.h>
|
#import <yoga/Yoga.h>
|
||||||
@@ -63,6 +62,7 @@ typedef NS_OPTIONS(NSInteger, YGDimensionFlexibility) {
|
|||||||
@property (nonatomic, readwrite, assign) YGOverflow overflow;
|
@property (nonatomic, readwrite, assign) YGOverflow overflow;
|
||||||
@property (nonatomic, readwrite, assign) YGDisplay display;
|
@property (nonatomic, readwrite, assign) YGDisplay display;
|
||||||
|
|
||||||
|
@property (nonatomic, readwrite, assign) CGFloat flex;
|
||||||
@property (nonatomic, readwrite, assign) CGFloat flexGrow;
|
@property (nonatomic, readwrite, assign) CGFloat flexGrow;
|
||||||
@property (nonatomic, readwrite, assign) CGFloat flexShrink;
|
@property (nonatomic, readwrite, assign) CGFloat flexShrink;
|
||||||
@property (nonatomic, readwrite, assign) YGValue flexBasis;
|
@property (nonatomic, readwrite, assign) YGValue flexBasis;
|
||||||
|
@@ -129,6 +129,7 @@ static YGConfigRef globalConfig;
|
|||||||
@interface YGLayout ()
|
@interface YGLayout ()
|
||||||
|
|
||||||
@property (nonatomic, weak, readonly) UIView *view;
|
@property (nonatomic, weak, readonly) UIView *view;
|
||||||
|
@property(nonatomic, assign, readonly) BOOL isUIView;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@@ -153,6 +154,7 @@ static YGConfigRef globalConfig;
|
|||||||
YGNodeSetContext(_node, (__bridge void *) view);
|
YGNodeSetContext(_node, (__bridge void *) view);
|
||||||
_isEnabled = NO;
|
_isEnabled = NO;
|
||||||
_isIncludedInLayout = YES;
|
_isIncludedInLayout = YES;
|
||||||
|
_isUIView = [view isMemberOfClass:[UIView class]];
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
@@ -178,7 +180,7 @@ static YGConfigRef globalConfig;
|
|||||||
// the measure function. Since we already know that this is a leaf,
|
// the measure function. Since we already know that this is a leaf,
|
||||||
// this *should* be fine. Forgive me Hack Gods.
|
// this *should* be fine. Forgive me Hack Gods.
|
||||||
const YGNodeRef node = self.node;
|
const YGNodeRef node = self.node;
|
||||||
if (YGNodeGetMeasureFunc(node) == NULL) {
|
if (YGNodeHasMeasureFunc(node)) {
|
||||||
YGNodeSetMeasureFunc(node, YGMeasureView);
|
YGNodeSetMeasureFunc(node, YGMeasureView);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -227,6 +229,7 @@ YG_PROPERTY(YGWrap, flexWrap, FlexWrap)
|
|||||||
YG_PROPERTY(YGOverflow, overflow, Overflow)
|
YG_PROPERTY(YGOverflow, overflow, Overflow)
|
||||||
YG_PROPERTY(YGDisplay, display, Display)
|
YG_PROPERTY(YGDisplay, display, Display)
|
||||||
|
|
||||||
|
YG_PROPERTY(CGFloat, flex, Flex)
|
||||||
YG_PROPERTY(CGFloat, flexGrow, FlexGrow)
|
YG_PROPERTY(CGFloat, flexGrow, FlexGrow)
|
||||||
YG_PROPERTY(CGFloat, flexShrink, FlexShrink)
|
YG_PROPERTY(CGFloat, flexShrink, FlexShrink)
|
||||||
YG_AUTO_VALUE_PROPERTY(flexBasis, FlexBasis)
|
YG_AUTO_VALUE_PROPERTY(flexBasis, FlexBasis)
|
||||||
@@ -331,10 +334,20 @@ static YGSize YGMeasureView(
|
|||||||
const CGFloat constrainedHeight = (heightMode == YGMeasureModeUndefined) ? CGFLOAT_MAX: height;
|
const CGFloat constrainedHeight = (heightMode == YGMeasureModeUndefined) ? CGFLOAT_MAX: height;
|
||||||
|
|
||||||
UIView *view = (__bridge UIView*) YGNodeGetContext(node);
|
UIView *view = (__bridge UIView*) YGNodeGetContext(node);
|
||||||
const CGSize sizeThatFits = [view sizeThatFits:(CGSize) {
|
CGSize sizeThatFits = CGSizeZero;
|
||||||
|
|
||||||
|
// The default implementation of sizeThatFits: returns the existing size of
|
||||||
|
// the view. That means that if we want to layout an empty UIView, which
|
||||||
|
// already has got a frame set, its measured size should be CGSizeZero, but
|
||||||
|
// UIKit returns the existing size.
|
||||||
|
//
|
||||||
|
// See https://github.com/facebook/yoga/issues/606 for more information.
|
||||||
|
if (!view.yoga.isUIView || [view.subviews count] > 0) {
|
||||||
|
sizeThatFits = [view sizeThatFits:(CGSize){
|
||||||
.width = constrainedWidth,
|
.width = constrainedWidth,
|
||||||
.height = constrainedHeight,
|
.height = constrainedHeight,
|
||||||
}];
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
return (YGSize) {
|
return (YGSize) {
|
||||||
.width = YGSanitizeMeasurement(constrainedWidth, sizeThatFits.width, widthMode),
|
.width = YGSanitizeMeasurement(constrainedWidth, sizeThatFits.width, widthMode),
|
||||||
@@ -412,9 +425,7 @@ static void YGRemoveAllChildren(const YGNodeRef node)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (YGNodeGetChildCount(node) > 0) {
|
YGNodeRemoveAllChildren(node);
|
||||||
YGNodeRemoveChild(node, YGNodeGetChild(node, YGNodeGetChildCount(node) - 1));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static CGFloat YGRoundPixelValue(CGFloat value)
|
static CGFloat YGRoundPixelValue(CGFloat value)
|
||||||
|
@@ -127,6 +127,15 @@
|
|||||||
XCTAssertEqual(longTextLabelSize.width + textBadgeView.yoga.intrinsicSize.width, containerSize.width);
|
XCTAssertEqual(longTextLabelSize.width + textBadgeView.yoga.intrinsicSize.width, containerSize.width);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)testSizeThatFitsEmptyView {
|
||||||
|
UIView* view = [[UIView alloc] initWithFrame:CGRectMake(10, 10, 200, 200)];
|
||||||
|
view.yoga.isEnabled = YES;
|
||||||
|
|
||||||
|
const CGSize viewSize = view.yoga.intrinsicSize;
|
||||||
|
XCTAssertEqual(viewSize.height, 0);
|
||||||
|
XCTAssertEqual(viewSize.width, 0);
|
||||||
|
}
|
||||||
|
|
||||||
- (void)testPreservingOrigin
|
- (void)testPreservingOrigin
|
||||||
{
|
{
|
||||||
UIView *container = [[UIView alloc] initWithFrame:CGRectMake(0,0,50,75)];
|
UIView *container = [[UIView alloc] initWithFrame:CGRectMake(0,0,50,75)];
|
||||||
|
@@ -1,3 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
// !$*UTF8*$!
|
// !$*UTF8*$!
|
||||||
{
|
{
|
||||||
archiveVersion = 1;
|
archiveVersion = 1;
|
||||||
|
@@ -1,3 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
apply plugin: 'com.jfrog.bintray'
|
apply plugin: 'com.jfrog.bintray'
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'com.github.dcendents.android-maven'
|
apply plugin: 'com.github.dcendents.android-maven'
|
||||||
|
@@ -1,3 +1,10 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
#
|
||||||
|
# This source code is licensed under the MIT license found in the LICENSE
|
||||||
|
# file in the root directory of this source tree.
|
||||||
|
#
|
||||||
|
|
||||||
GROUP=com.facebook.yoga.android
|
GROUP=com.facebook.yoga.android
|
||||||
POM_NAME=YogaLayout
|
POM_NAME=YogaLayout
|
||||||
POM_DESCRIPTION=YogaLayout
|
POM_DESCRIPTION=YogaLayout
|
||||||
|
@@ -4,6 +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.
|
||||||
|
|
||||||
|
load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
|
||||||
load("//tools/build_defs/oss:yoga_defs.bzl", "ANDROID_RES_TARGET", "ANDROID_SAMPLE_JAVA_TARGET", "ANDROID_SAMPLE_RES_TARGET", "yoga_android_binary", "yoga_android_resource")
|
load("//tools/build_defs/oss:yoga_defs.bzl", "ANDROID_RES_TARGET", "ANDROID_SAMPLE_JAVA_TARGET", "ANDROID_SAMPLE_RES_TARGET", "yoga_android_binary", "yoga_android_resource")
|
||||||
|
|
||||||
yoga_android_binary(
|
yoga_android_binary(
|
||||||
@@ -28,7 +29,7 @@ yoga_android_resource(
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
keystore(
|
fb_native.keystore(
|
||||||
name = "debug_keystore",
|
name = "debug_keystore",
|
||||||
properties = "debug.keystore.properties",
|
properties = "debug.keystore.properties",
|
||||||
store = "debug.keystore",
|
store = "debug.keystore",
|
||||||
|
@@ -1,5 +1,9 @@
|
|||||||
// Copyright 2004-present Facebook. All Rights Reserved.
|
/**
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
|
* file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
package com.facebook.samples.yoga;
|
package com.facebook.samples.yoga;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
@@ -1,5 +1,9 @@
|
|||||||
// Copyright 2004-present Facebook. All Rights Reserved.
|
/**
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
|
* file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
package com.facebook.samples.yoga;
|
package com.facebook.samples.yoga;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@@ -1,5 +1,9 @@
|
|||||||
// Copyright 2004-present Facebook. All Rights Reserved.
|
/**
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
|
* file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
package com.facebook.samples.yoga;
|
package com.facebook.samples.yoga;
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,5 +1,9 @@
|
|||||||
// Copyright 2004-present Facebook. All Rights Reserved.
|
/**
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
|
* file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
package com.facebook.samples.yoga;
|
package com.facebook.samples.yoga;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
@@ -1,5 +1,9 @@
|
|||||||
// Copyright 2004-present Facebook. All Rights Reserved.
|
/**
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
|
* file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
package com.facebook.samples.yoga;
|
package com.facebook.samples.yoga;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
@@ -1,5 +1,9 @@
|
|||||||
// Copyright 2004-present Facebook. All Rights Reserved.
|
/**
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
|
* file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
package com.facebook.samples.yoga;
|
package com.facebook.samples.yoga;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
@@ -1,11 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
* 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
|
||||||
* LICENSE-examples file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.facebook.samples.yoga;
|
package com.facebook.samples.yoga;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.facebook.yoga.android;
|
package com.facebook.yoga.android;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -33,7 +32,7 @@ public class VirtualYogaLayout extends ViewGroup {
|
|||||||
|
|
||||||
final private List<View> mChildren = new LinkedList<>();
|
final private List<View> mChildren = new LinkedList<>();
|
||||||
final private Map<View, YogaNode> mYogaNodes = new HashMap<>();
|
final private Map<View, YogaNode> mYogaNodes = new HashMap<>();
|
||||||
final private YogaNode mYogaNode = new YogaNode();
|
final private YogaNode mYogaNode = YogaNode.create();
|
||||||
|
|
||||||
public VirtualYogaLayout(Context context) {
|
public VirtualYogaLayout(Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
@@ -73,7 +72,7 @@ public class VirtualYogaLayout extends ViewGroup {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
YogaNode node = new YogaNode();
|
YogaNode node = YogaNode.create();
|
||||||
YogaLayout.LayoutParams lp = new YogaLayout.LayoutParams(params);
|
YogaLayout.LayoutParams lp = new YogaLayout.LayoutParams(params);
|
||||||
YogaLayout.applyLayoutParams(lp, node, child);
|
YogaLayout.applyLayoutParams(lp, node, child);
|
||||||
node.setData(child);
|
node.setData(child);
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.facebook.yoga.android;
|
package com.facebook.yoga.android;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@@ -78,7 +77,7 @@ public class YogaLayout extends ViewGroup {
|
|||||||
public YogaLayout(Context context, AttributeSet attrs, int defStyleAttr) {
|
public YogaLayout(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||||
super(context, attrs, defStyleAttr);
|
super(context, attrs, defStyleAttr);
|
||||||
|
|
||||||
mYogaNode = new YogaNode();
|
mYogaNode = YogaNode.create();
|
||||||
mYogaNodes = new HashMap<>();
|
mYogaNodes = new HashMap<>();
|
||||||
|
|
||||||
mYogaNode.setData(this);
|
mYogaNode.setData(this);
|
||||||
@@ -155,7 +154,7 @@ public class YogaLayout extends ViewGroup {
|
|||||||
if(mYogaNodes.containsKey(child)) {
|
if(mYogaNodes.containsKey(child)) {
|
||||||
childNode = mYogaNodes.get(child);
|
childNode = mYogaNodes.get(child);
|
||||||
} else {
|
} else {
|
||||||
childNode = new YogaNode();
|
childNode = YogaNode.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
childNode.setData(child);
|
childNode.setData(child);
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.facebook.yoga.android;
|
package com.facebook.yoga.android;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -26,8 +25,7 @@
|
|||||||
#define YGBENCHMARK(NAME, BLOCK) \
|
#define YGBENCHMARK(NAME, BLOCK) \
|
||||||
__start = clock(); \
|
__start = clock(); \
|
||||||
for (uint32_t __i = 0; __i < NUM_REPETITIONS; __i++) { \
|
for (uint32_t __i = 0; __i < NUM_REPETITIONS; __i++) { \
|
||||||
{ BLOCK } \
|
{BLOCK} __endTimes[__i] = clock(); \
|
||||||
__endTimes[__i] = clock(); \
|
|
||||||
} \
|
} \
|
||||||
__printBenchmarkResult(NAME, __start, __endTimes);
|
__printBenchmarkResult(NAME, __start, __endTimes);
|
||||||
|
|
||||||
@@ -46,7 +44,10 @@ static int __compareDoubles(const void *a, const void *b) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __printBenchmarkResult(char *name, clock_t start, clock_t *endTimes) {
|
static void __printBenchmarkResult(
|
||||||
|
char* name,
|
||||||
|
clock_t start,
|
||||||
|
clock_t* endTimes) {
|
||||||
double timesInMs[NUM_REPETITIONS];
|
double timesInMs[NUM_REPETITIONS];
|
||||||
double mean = 0;
|
double mean = 0;
|
||||||
clock_t lastEnd = start;
|
clock_t lastEnd = start;
|
||||||
@@ -70,8 +71,8 @@ static void __printBenchmarkResult(char *name, clock_t start, clock_t *endTimes)
|
|||||||
printf("%s: median: %lf ms, stddev: %lf ms\n", name, median, stddev);
|
printf("%s: median: %lf ms, stddev: %lf ms\n", name, median, stddev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static YGSize _measure(
|
||||||
static YGSize _measure(YGNodeRef node,
|
YGNodeRef node,
|
||||||
float width,
|
float width,
|
||||||
YGMeasureMode widthMode,
|
YGMeasureMode widthMode,
|
||||||
float height,
|
float height,
|
||||||
@@ -83,7 +84,6 @@ static YGSize _measure(YGNodeRef node,
|
|||||||
}
|
}
|
||||||
|
|
||||||
YGBENCHMARKS({
|
YGBENCHMARKS({
|
||||||
|
|
||||||
YGBENCHMARK("Stack with flex", {
|
YGBENCHMARK("Stack with flex", {
|
||||||
const YGNodeRef root = YGNodeNew();
|
const YGNodeRef root = YGNodeNew();
|
||||||
YGNodeStyleSetWidth(root, 100);
|
YGNodeStyleSetWidth(root, 100);
|
||||||
@@ -161,7 +161,8 @@ YGBENCHMARKS({
|
|||||||
|
|
||||||
for (uint32_t iiii = 0; iiii < 10; iiii++) {
|
for (uint32_t iiii = 0; iiii < 10; iiii++) {
|
||||||
const YGNodeRef grandGrandGrandChild = YGNodeNew();
|
const YGNodeRef grandGrandGrandChild = YGNodeNew();
|
||||||
YGNodeStyleSetFlexDirection(grandGrandGrandChild, YGFlexDirectionRow);
|
YGNodeStyleSetFlexDirection(
|
||||||
|
grandGrandGrandChild, YGFlexDirectionRow);
|
||||||
YGNodeStyleSetFlexGrow(grandGrandGrandChild, 1);
|
YGNodeStyleSetFlexGrow(grandGrandGrandChild, 1);
|
||||||
YGNodeStyleSetWidth(grandGrandGrandChild, 10);
|
YGNodeStyleSetWidth(grandGrandGrandChild, 10);
|
||||||
YGNodeStyleSetHeight(grandGrandGrandChild, 10);
|
YGNodeStyleSetHeight(grandGrandGrandChild, 10);
|
||||||
@@ -174,5 +175,4 @@ YGBENCHMARKS({
|
|||||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||||
YGNodeFreeRecursive(root);
|
YGNodeFreeRecursive(root);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
11
build.gradle
11
build.gradle
@@ -1,12 +1,20 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
maven { url 'https://maven.google.com/' }
|
maven { url 'https://maven.google.com/' }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.0.0'
|
classpath 'com.android.tools.build:gradle:3.1.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:2.0'
|
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
|
||||||
|
|
||||||
@@ -17,6 +25,7 @@ buildscript {
|
|||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -3,6 +3,7 @@
|
|||||||
# This source code is licensed under the MIT 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.
|
# LICENSE file in the root directory of this source tree.
|
||||||
|
|
||||||
|
load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
|
||||||
load(
|
load(
|
||||||
"//tools/build_defs/oss:yoga_defs.bzl",
|
"//tools/build_defs/oss:yoga_defs.bzl",
|
||||||
"BASE_COMPILER_FLAGS",
|
"BASE_COMPILER_FLAGS",
|
||||||
@@ -13,14 +14,14 @@ load(
|
|||||||
|
|
||||||
COMPILER_FLAGS = BASE_COMPILER_FLAGS + ["-std=c++11"]
|
COMPILER_FLAGS = BASE_COMPILER_FLAGS + ["-std=c++11"]
|
||||||
|
|
||||||
csharp_library(
|
fb_native.csharp_library(
|
||||||
name = "yogalibnet46",
|
name = "yogalibnet46",
|
||||||
srcs = glob(["**/*.cs"]),
|
srcs = glob(["**/*.cs"]),
|
||||||
dll_name = "Facebook.Yoga.dll",
|
dll_name = "Facebook.Yoga.dll",
|
||||||
framework_ver = "net46",
|
framework_ver = "net46",
|
||||||
)
|
)
|
||||||
|
|
||||||
csharp_library(
|
fb_native.csharp_library(
|
||||||
name = "yogalibnet45",
|
name = "yogalibnet45",
|
||||||
srcs = glob(["**/*.cs"]),
|
srcs = glob(["**/*.cs"]),
|
||||||
dll_name = "Facebook.Yoga.dll",
|
dll_name = "Facebook.Yoga.dll",
|
||||||
@@ -29,7 +30,7 @@ csharp_library(
|
|||||||
|
|
||||||
yoga_cxx_library(
|
yoga_cxx_library(
|
||||||
name = "yoganet",
|
name = "yoganet",
|
||||||
srcs = glob(["Yoga/YGInterop.cpp"]),
|
srcs = ["Yoga/YGInterop.cpp"],
|
||||||
compiler_flags = COMPILER_FLAGS,
|
compiler_flags = COMPILER_FLAGS,
|
||||||
link_style = "static",
|
link_style = "static",
|
||||||
link_whole = True,
|
link_whole = True,
|
||||||
|
@@ -10,12 +10,6 @@ using System.Runtime.InteropServices;
|
|||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
{
|
{
|
||||||
#if WINDOWS_UWP_ARM
|
|
||||||
using YogaValueType = IntPtr;
|
|
||||||
#else
|
|
||||||
using YogaValueType = YogaValue;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
internal static class Native
|
internal static class Native
|
||||||
{
|
{
|
||||||
#if (UNITY_IOS && !UNITY_EDITOR) || __IOS__
|
#if (UNITY_IOS && !UNITY_EDITOR) || __IOS__
|
||||||
@@ -49,9 +43,6 @@ namespace Facebook.Yoga
|
|||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGConfigFree(IntPtr node);
|
public static extern void YGConfigFree(IntPtr node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern int YGNodeGetInstanceCount();
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern int YGConfigGetInstanceCount();
|
public static extern int YGConfigGetInstanceCount();
|
||||||
|
|
||||||
@@ -74,6 +65,14 @@ namespace Facebook.Yoga
|
|||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern bool YGConfigGetUseWebDefaults(YGConfigHandle config);
|
public static extern bool YGConfigGetUseWebDefaults(YGConfigHandle config);
|
||||||
|
|
||||||
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void YGConfigSetUseLegacyStretchBehaviour(
|
||||||
|
YGConfigHandle config,
|
||||||
|
bool useLegacyStretchBehavior);
|
||||||
|
|
||||||
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern bool YGConfigGetUseLegacyStretchBehaviour(YGConfigHandle config);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGConfigSetPointScaleFactor(
|
public static extern void YGConfigSetPointScaleFactor(
|
||||||
YGConfigHandle config,
|
YGConfigHandle config,
|
||||||
@@ -88,6 +87,14 @@ namespace Facebook.Yoga
|
|||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeRemoveChild(YGNodeHandle node, YGNodeHandle child);
|
public static extern void YGNodeRemoveChild(YGNodeHandle node, YGNodeHandle child);
|
||||||
|
|
||||||
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void YGNodeSetIsReferenceBaseline(
|
||||||
|
YGNodeHandle node,
|
||||||
|
bool isReferenceBaseline);
|
||||||
|
|
||||||
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern bool YGNodeIsReferenceBaseline(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeCalculateLayout(
|
public static extern void YGNodeCalculateLayout(
|
||||||
YGNodeHandle node,
|
YGNodeHandle node,
|
||||||
@@ -218,7 +225,7 @@ namespace Facebook.Yoga
|
|||||||
public static extern void YGNodeStyleSetFlexBasisAuto(YGNodeHandle node);
|
public static extern void YGNodeStyleSetFlexBasisAuto(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern YogaValueType YGNodeStyleGetFlexBasis(YGNodeHandle node);
|
public static extern YogaValue YGNodeStyleGetFlexBasis(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeStyleSetWidth(YGNodeHandle node, float width);
|
public static extern void YGNodeStyleSetWidth(YGNodeHandle node, float width);
|
||||||
@@ -230,7 +237,7 @@ namespace Facebook.Yoga
|
|||||||
public static extern void YGNodeStyleSetWidthAuto(YGNodeHandle node);
|
public static extern void YGNodeStyleSetWidthAuto(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern YogaValueType YGNodeStyleGetWidth(YGNodeHandle node);
|
public static extern YogaValue YGNodeStyleGetWidth(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeStyleSetHeight(YGNodeHandle node, float height);
|
public static extern void YGNodeStyleSetHeight(YGNodeHandle node, float height);
|
||||||
@@ -242,7 +249,7 @@ namespace Facebook.Yoga
|
|||||||
public static extern void YGNodeStyleSetHeightAuto(YGNodeHandle node);
|
public static extern void YGNodeStyleSetHeightAuto(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern YogaValueType YGNodeStyleGetHeight(YGNodeHandle node);
|
public static extern YogaValue YGNodeStyleGetHeight(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeStyleSetMinWidth(YGNodeHandle node, float minWidth);
|
public static extern void YGNodeStyleSetMinWidth(YGNodeHandle node, float minWidth);
|
||||||
@@ -251,7 +258,7 @@ namespace Facebook.Yoga
|
|||||||
public static extern void YGNodeStyleSetMinWidthPercent(YGNodeHandle node, float minWidth);
|
public static extern void YGNodeStyleSetMinWidthPercent(YGNodeHandle node, float minWidth);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern YogaValueType YGNodeStyleGetMinWidth(YGNodeHandle node);
|
public static extern YogaValue YGNodeStyleGetMinWidth(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeStyleSetMinHeight(YGNodeHandle node, float minHeight);
|
public static extern void YGNodeStyleSetMinHeight(YGNodeHandle node, float minHeight);
|
||||||
@@ -260,7 +267,7 @@ namespace Facebook.Yoga
|
|||||||
public static extern void YGNodeStyleSetMinHeightPercent(YGNodeHandle node, float minHeight);
|
public static extern void YGNodeStyleSetMinHeightPercent(YGNodeHandle node, float minHeight);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern YogaValueType YGNodeStyleGetMinHeight(YGNodeHandle node);
|
public static extern YogaValue YGNodeStyleGetMinHeight(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeStyleSetMaxWidth(YGNodeHandle node, float maxWidth);
|
public static extern void YGNodeStyleSetMaxWidth(YGNodeHandle node, float maxWidth);
|
||||||
@@ -269,7 +276,7 @@ namespace Facebook.Yoga
|
|||||||
public static extern void YGNodeStyleSetMaxWidthPercent(YGNodeHandle node, float maxWidth);
|
public static extern void YGNodeStyleSetMaxWidthPercent(YGNodeHandle node, float maxWidth);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern YogaValueType YGNodeStyleGetMaxWidth(YGNodeHandle node);
|
public static extern YogaValue YGNodeStyleGetMaxWidth(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeStyleSetMaxHeight(YGNodeHandle node, float maxHeight);
|
public static extern void YGNodeStyleSetMaxHeight(YGNodeHandle node, float maxHeight);
|
||||||
@@ -278,7 +285,7 @@ namespace Facebook.Yoga
|
|||||||
public static extern void YGNodeStyleSetMaxHeightPercent(YGNodeHandle node, float maxHeight);
|
public static extern void YGNodeStyleSetMaxHeightPercent(YGNodeHandle node, float maxHeight);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern YogaValueType YGNodeStyleGetMaxHeight(YGNodeHandle node);
|
public static extern YogaValue YGNodeStyleGetMaxHeight(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeStyleSetAspectRatio(YGNodeHandle node, float aspectRatio);
|
public static extern void YGNodeStyleSetAspectRatio(YGNodeHandle node, float aspectRatio);
|
||||||
@@ -297,7 +304,7 @@ namespace Facebook.Yoga
|
|||||||
public static extern void YGNodeStyleSetPositionPercent(YGNodeHandle node, YogaEdge edge, float position);
|
public static extern void YGNodeStyleSetPositionPercent(YGNodeHandle node, YogaEdge edge, float position);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern YogaValueType YGNodeStyleGetPosition(YGNodeHandle node, YogaEdge edge);
|
public static extern YogaValue YGNodeStyleGetPosition(YGNodeHandle node, YogaEdge edge);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeStyleSetMargin(YGNodeHandle node, YogaEdge edge, float margin);
|
public static extern void YGNodeStyleSetMargin(YGNodeHandle node, YogaEdge edge, float margin);
|
||||||
@@ -309,7 +316,7 @@ namespace Facebook.Yoga
|
|||||||
public static extern void YGNodeStyleSetMarginAuto(YGNodeHandle node, YogaEdge edge);
|
public static extern void YGNodeStyleSetMarginAuto(YGNodeHandle node, YogaEdge edge);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern YogaValueType YGNodeStyleGetMargin(YGNodeHandle node, YogaEdge edge);
|
public static extern YogaValue YGNodeStyleGetMargin(YGNodeHandle node, YogaEdge edge);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeStyleSetPadding(YGNodeHandle node, YogaEdge edge, float padding);
|
public static extern void YGNodeStyleSetPadding(YGNodeHandle node, YogaEdge edge, float padding);
|
||||||
@@ -318,7 +325,7 @@ namespace Facebook.Yoga
|
|||||||
public static extern void YGNodeStyleSetPaddingPercent(YGNodeHandle node, YogaEdge edge, float padding);
|
public static extern void YGNodeStyleSetPaddingPercent(YGNodeHandle node, YogaEdge edge, float padding);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern YogaValueType YGNodeStyleGetPadding(YGNodeHandle node, YogaEdge edge);
|
public static extern YogaValue YGNodeStyleGetPadding(YGNodeHandle node, YogaEdge edge);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeStyleSetBorder(YGNodeHandle node, YogaEdge edge, float border);
|
public static extern void YGNodeStyleSetBorder(YGNodeHandle node, YogaEdge edge, float border);
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
@@ -117,6 +117,19 @@ namespace Facebook.Yoga
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool UseLegacyStretchBehaviour
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Native.YGConfigGetUseLegacyStretchBehaviour(_ygConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
Native.YGConfigSetUseLegacyStretchBehaviour(_ygConfig, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public float PointScaleFactor
|
public float PointScaleFactor
|
||||||
{
|
{
|
||||||
set
|
set
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
@@ -13,7 +13,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Left));
|
return Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Left);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -26,7 +26,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Top));
|
return Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Top);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -39,7 +39,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Right));
|
return Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Right);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -52,7 +52,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Bottom));
|
return Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -65,7 +65,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Start));
|
return Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Start);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -78,7 +78,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.End));
|
return Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.End);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -103,7 +103,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Left));
|
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Left);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -116,7 +116,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Top));
|
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Top);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -129,7 +129,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Right));
|
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Right);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -142,7 +142,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Bottom));
|
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -155,7 +155,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Start));
|
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Start);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -168,7 +168,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.End));
|
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.End);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -181,7 +181,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Horizontal));
|
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Horizontal);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -194,7 +194,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Vertical));
|
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Vertical);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -207,7 +207,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.All));
|
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.All);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -236,7 +236,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Left));
|
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Left);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -249,7 +249,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Top));
|
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Top);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -262,7 +262,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Right));
|
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Right);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -275,7 +275,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Bottom));
|
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -288,7 +288,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Start));
|
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Start);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -301,7 +301,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.End));
|
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.End);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -314,7 +314,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Horizontal));
|
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Horizontal);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -327,7 +327,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Vertical));
|
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Vertical);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -340,7 +340,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.All));
|
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.All);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
@@ -271,7 +271,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetFlexBasis(_ygNode));
|
return Native.YGNodeStyleGetFlexBasis(_ygNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -295,7 +295,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetWidth(_ygNode));
|
return Native.YGNodeStyleGetWidth(_ygNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -319,7 +319,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetHeight(_ygNode));
|
return Native.YGNodeStyleGetHeight(_ygNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -343,7 +343,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMaxWidth(_ygNode));
|
return Native.YGNodeStyleGetMaxWidth(_ygNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -363,7 +363,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMaxHeight(_ygNode));
|
return Native.YGNodeStyleGetMaxHeight(_ygNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -383,7 +383,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMinWidth(_ygNode));
|
return Native.YGNodeStyleGetMinWidth(_ygNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -403,7 +403,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMinHeight(_ygNode));
|
return Native.YGNodeStyleGetMinHeight(_ygNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -519,6 +519,19 @@ namespace Facebook.Yoga
|
|||||||
Native.YGNodeSetHasNewLayout(_ygNode, false);
|
Native.YGNodeSetHasNewLayout(_ygNode, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool IsReferenceBaseline
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Native.YGNodeIsReferenceBaseline(_ygNode);
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
Native.YGNodeSetIsReferenceBaseline(_ygNode, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool ValuesEqual(float f1, float f2)
|
public bool ValuesEqual(float f1, float f2)
|
||||||
{
|
{
|
||||||
if (float.IsNaN(f1) || float.IsNaN(f2))
|
if (float.IsNaN(f1) || float.IsNaN(f2))
|
||||||
@@ -660,10 +673,5 @@ namespace Facebook.Yoga
|
|||||||
return _children != null ? ((IEnumerable<YogaNode>)_children).GetEnumerator() :
|
return _children != null ? ((IEnumerable<YogaNode>)_children).GetEnumerator() :
|
||||||
System.Linq.Enumerable.Empty<YogaNode>().GetEnumerator();
|
System.Linq.Enumerable.Empty<YogaNode>().GetEnumerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int GetInstanceCount()
|
|
||||||
{
|
|
||||||
return Native.YGNodeGetInstanceCount();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -91,17 +91,5 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
return Point(pointValue);
|
return Point(pointValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WINDOWS_UWP_ARM
|
|
||||||
internal static YogaValue MarshalValue(IntPtr ptr)
|
|
||||||
{
|
|
||||||
return Marshal.PtrToStructure<YogaValue>(ptr);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
internal static YogaValue MarshalValue(YogaValue value)
|
|
||||||
{
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,2 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
#
|
||||||
|
# This source code is licensed under the MIT license found in the
|
||||||
|
# LICENSE file in the root directory of this source tree.
|
||||||
|
#
|
||||||
|
|
||||||
./csharp/Mac/Facebook.Yoga.Mac.Tests/bin/Release/Facebook.Yoga.Mac.Tests.app/Contents/MacOS/Facebook.Yoga.Mac.Tests
|
./csharp/Mac/Facebook.Yoga.Mac.Tests/bin/Release/Facebook.Yoga.Mac.Tests.app/Contents/MacOS/Facebook.Yoga.Mac.Tests
|
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||||
using Facebook.Yoga;
|
using Facebook.Yoga;
|
||||||
|
|
||||||
@@ -206,8 +206,8 @@ namespace Facebook.Yoga.Universal.Tests
|
|||||||
return MeasureOutput.Make(123.4f, 81.7f);
|
return MeasureOutput.Make(123.4f, 81.7f);
|
||||||
});
|
});
|
||||||
node.CalculateLayout();
|
node.CalculateLayout();
|
||||||
Assert.AreEqual(123, node.LayoutWidth);
|
Assert.AreEqual(124, node.LayoutWidth);
|
||||||
Assert.AreEqual(81, node.LayoutHeight);
|
Assert.AreEqual(82, node.LayoutHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@@ -268,7 +268,12 @@ namespace Facebook.Yoga.Universal.Tests
|
|||||||
parent.Insert(0, child0);
|
parent.Insert(0, child0);
|
||||||
parent.Insert(0, child1);
|
parent.Insert(0, child1);
|
||||||
parent.CalculateLayout();
|
parent.CalculateLayout();
|
||||||
Assert.AreEqual(parent.Print(), "{layout: {width: 100, height: 120, top: 0, left: 0}, flexDirection: 'column', alignItems: 'stretch', flexGrow: 0, flexShrink: 0, overflow: 'visible', width: 100, height: 120, children: [\n {layout: {width: 35, height: 45, top: 0, left: 0}, flexDirection: 'column', alignItems: 'stretch', flexGrow: 0, flexShrink: 0, overflow: 'visible', width: 35, height: 45, },\n {layout: {width: 30, height: 40, top: 45, left: 0}, flexDirection: 'column', alignItems: 'stretch', flexGrow: 0, flexShrink: 0, overflow: 'visible', width: 30, height: 40, },\n]},\n");
|
Assert.AreEqual(parent.Print(),
|
||||||
|
"<div layout=\"width: 100; height: 120; top: 0; left: 0;\" style=\"width: 100px; height: 120px; \" >\n" +
|
||||||
|
" <div layout=\"width: 35; height: 45; top: 0; left: 0;\" style=\"width: 35px; height: 45px; \" ></div>\n" +
|
||||||
|
" <div layout=\"width: 30; height: 40; top: 45; left: 0;\" style=\"width: 30px; height: 40px; \" ></div>\n" +
|
||||||
|
"</div>"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "YGInterop.h"
|
#include "YGInterop.h"
|
||||||
|
|
||||||
static YGInteropLogger gManagedLogger;
|
static YGInteropLogger gManagedLogger;
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <yoga/Yoga.h>
|
#include <yoga/Yoga.h>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|ARM">
|
<ProjectConfiguration Include="Debug|ARM">
|
||||||
@@ -33,47 +33,47 @@
|
|||||||
<RootNamespace>Yoga</RootNamespace>
|
<RootNamespace>Yoga</RootNamespace>
|
||||||
<AppContainerApplication>true</AppContainerApplication>
|
<AppContainerApplication>true</AppContainerApplication>
|
||||||
<ApplicationType>Windows Store</ApplicationType>
|
<ApplicationType>Windows Store</ApplicationType>
|
||||||
<WindowsTargetPlatformVersion>10.0.10586.0</WindowsTargetPlatformVersion>
|
<WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
|
||||||
<WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion>
|
<WindowsTargetPlatformMinVersion>10.0.14393.0</WindowsTargetPlatformMinVersion>
|
||||||
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
|
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
<OutDir>bin\Universal\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>bin\Universal\$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(PlatformTarget)\$(Configuration)\</IntDir>
|
<IntDir>obj\Universal\$(PlatformTarget)\$(Configuration)\</IntDir>
|
||||||
<TargetName>yoga</TargetName>
|
<TargetName>yoga</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
@@ -242,19 +242,31 @@
|
|||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\yoga\Utils.h" />
|
||||||
|
<ClInclude Include="..\..\yoga\YGConfig.h" />
|
||||||
<ClInclude Include="..\..\yoga\YGEnums.h" />
|
<ClInclude Include="..\..\yoga\YGEnums.h" />
|
||||||
<ClInclude Include="..\..\yoga\Yoga.h" />
|
<ClInclude Include="..\..\yoga\YGFloatOptional.h" />
|
||||||
|
<ClInclude Include="..\..\yoga\YGLayout.h" />
|
||||||
<ClInclude Include="..\..\yoga\YGMacros.h" />
|
<ClInclude Include="..\..\yoga\YGMacros.h" />
|
||||||
<ClInclude Include="..\..\yoga\YGNodeList.h" />
|
<ClInclude Include="..\..\yoga\YGNode.h" />
|
||||||
|
<ClInclude Include="..\..\yoga\YGNodePrint.h" />
|
||||||
|
<ClInclude Include="..\..\yoga\YGStyle.h" />
|
||||||
|
<ClInclude Include="..\..\yoga\Yoga-internal.h" />
|
||||||
|
<ClInclude Include="..\..\yoga\Yoga.h" />
|
||||||
<ClInclude Include="resource.h" />
|
<ClInclude Include="resource.h" />
|
||||||
<ClInclude Include="YGInterop.h" />
|
|
||||||
<ClInclude Include="stdafx.h" />
|
<ClInclude Include="stdafx.h" />
|
||||||
<ClInclude Include="targetver.h" />
|
<ClInclude Include="targetver.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\..\yoga\YGEnums.c" />
|
<ClCompile Include="..\..\yoga\Utils.cpp" />
|
||||||
<ClCompile Include="..\..\yoga\Yoga.c" />
|
<ClCompile Include="..\..\yoga\YGConfig.cpp" />
|
||||||
<ClCompile Include="..\..\yoga\YGNodeList.c" />
|
<ClCompile Include="..\..\yoga\YGEnums.cpp" />
|
||||||
|
<ClCompile Include="..\..\yoga\YGFloatOptional.cpp" />
|
||||||
|
<ClCompile Include="..\..\yoga\YGLayout.cpp" />
|
||||||
|
<ClCompile Include="..\..\yoga\YGNode.cpp" />
|
||||||
|
<ClCompile Include="..\..\yoga\YGNodePrint.cpp" />
|
||||||
|
<ClCompile Include="..\..\yoga\YGStyle.cpp" />
|
||||||
|
<ClCompile Include="..\..\yoga\Yoga.cpp" />
|
||||||
<ClCompile Include="YGInterop.cpp" />
|
<ClCompile Include="YGInterop.cpp" />
|
||||||
<ClCompile Include="dllmain.cpp">
|
<ClCompile Include="dllmain.cpp">
|
||||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
|
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
|
||||||
|
@@ -21,22 +21,40 @@
|
|||||||
<ClInclude Include="targetver.h">
|
<ClInclude Include="targetver.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\yoga\Yoga.h">
|
<ClInclude Include="resource.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\yoga\Utils.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\yoga\YGEnums.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\yoga\YGFloatOptional.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\yoga\YGLayout.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\yoga\YGMacros.h">
|
<ClInclude Include="..\..\yoga\YGMacros.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\yoga\YGNodeList.h">
|
<ClInclude Include="..\..\yoga\YGNode.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="YGInterop.h">
|
<ClInclude Include="..\..\yoga\YGNodePrint.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="resource.h">
|
<ClInclude Include="..\..\yoga\YGStyle.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\yoga\YGEnums.h">
|
<ClInclude Include="..\..\yoga\Yoga.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\yoga\Yoga-internal.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\yoga\YGConfig.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@@ -47,16 +65,34 @@
|
|||||||
<ClCompile Include="dllmain.cpp">
|
<ClCompile Include="dllmain.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\yoga\Yoga.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\yoga\YGNodeList.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="YGInterop.cpp">
|
<ClCompile Include="YGInterop.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\yoga\YGEnums.c">
|
<ClCompile Include="..\..\yoga\Utils.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\yoga\YGEnums.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\yoga\YGFloatOptional.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\yoga\YGLayout.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\yoga\YGNode.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\yoga\YGNodePrint.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\yoga\YGStyle.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\yoga\Yoga.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\yoga\YGConfig.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@@ -38,39 +38,39 @@
|
|||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// dllmain.cpp : Defines the entry point for the DLL application.
|
// dllmain.cpp : Defines the entry point for the DLL application.
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
|
* file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
//{{NO_DEPENDENCIES}}
|
//{{NO_DEPENDENCIES}}
|
||||||
// Microsoft Visual C++ generated include file.
|
// Microsoft Visual C++ generated include file.
|
||||||
// Used by Yoga.rc
|
// Used by Yoga.rc
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// stdafx.cpp : source file that includes just the standard includes
|
// stdafx.cpp : source file that includes just the standard includes
|
||||||
// Yoga.pch will be the pre-compiled header
|
// Yoga.pch will be the pre-compiled header
|
||||||
// stdafx.obj will contain the pre-compiled type information
|
// stdafx.obj will contain the pre-compiled type information
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// stdafx.h : include file for standard system include files,
|
// stdafx.h : include file for standard system include files,
|
||||||
// or project specific include files that are used frequently, but
|
// or project specific include files that are used frequently, but
|
||||||
// are changed infrequently
|
// are changed infrequently
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Including SDKDDKVer.h defines the highest available Windows platform.
|
// Including SDKDDKVer.h defines the highest available Windows platform.
|
||||||
|
@@ -1,4 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
#
|
||||||
|
# This source code is licensed under the MIT license found in the
|
||||||
|
# LICENSE file in the root directory of this source tree.
|
||||||
|
#
|
||||||
|
|
||||||
cd `dirname "$0"`
|
cd `dirname "$0"`
|
||||||
echo $ANDROID_SDK
|
echo $ANDROID_SDK
|
||||||
BUCK_RELEASE=2018.02.16.01
|
BUCK_RELEASE=2018.02.16.01
|
||||||
@@ -22,4 +30,3 @@ $BUCK build \
|
|||||||
//csharp:yoganet-macosx \
|
//csharp:yoganet-macosx \
|
||||||
//csharp:yoganet#android-armv7,shared \
|
//csharp:yoganet#android-armv7,shared \
|
||||||
//csharp:yoganet#android-x86,shared
|
//csharp:yoganet#android-x86,shared
|
||||||
|
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAbsolutePositionTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAbsolutePositionTest.html
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
104
csharp/tests/Facebook.Yoga/YGAlignBaselineTest.cs
Normal file
104
csharp/tests/Facebook.Yoga/YGAlignBaselineTest.cs
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
namespace Facebook.Yoga
|
||||||
|
{
|
||||||
|
[TestFixture]
|
||||||
|
public class YGAlignBaselineTest
|
||||||
|
{
|
||||||
|
[Test]
|
||||||
|
public void Test_align_baseline_parent_using_child_in_column_as_reference()
|
||||||
|
{
|
||||||
|
YogaConfig config = new YogaConfig();
|
||||||
|
YogaNode root = createYGNode(config, YogaFlexDirection.Row, 1000, 1000, true);
|
||||||
|
|
||||||
|
YogaNode root_child0 = createYGNode(config, YogaFlexDirection.Column, 500, 600, false);
|
||||||
|
root.Insert(0, root_child0);
|
||||||
|
|
||||||
|
YogaNode root_child1 = createYGNode(config, YogaFlexDirection.Column, 500, 800, false);
|
||||||
|
root.Insert(1, root_child1);
|
||||||
|
|
||||||
|
YogaNode root_child1_child0 = createYGNode(config, YogaFlexDirection.Column, 500, 300, false);
|
||||||
|
root_child1.Insert(0, root_child1_child0);
|
||||||
|
|
||||||
|
YogaNode root_child1_child1 = createYGNode(config, YogaFlexDirection.Column, 500, 400, false);
|
||||||
|
root_child1_child1.SetBaselineFunction((_, width, height) => {
|
||||||
|
return height / 2;
|
||||||
|
});
|
||||||
|
root_child1_child1.IsReferenceBaseline = true;
|
||||||
|
root_child1.Insert(1, root_child1_child1);
|
||||||
|
|
||||||
|
root.CalculateLayout();
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
|
|
||||||
|
Assert.AreEqual(500f, root_child1.LayoutX);
|
||||||
|
Assert.AreEqual(100f, root_child1.LayoutY);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child1_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child1_child0.LayoutY);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child1_child1.LayoutX);
|
||||||
|
Assert.AreEqual(300f, root_child1_child1.LayoutY);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void Test_align_baseline_parent_using_child_in_row_as_reference()
|
||||||
|
{
|
||||||
|
YogaConfig config = new YogaConfig();
|
||||||
|
|
||||||
|
YogaNode root = createYGNode(config, YogaFlexDirection.Row, 1000, 1000, true);
|
||||||
|
|
||||||
|
YogaNode root_child0 = createYGNode(config, YogaFlexDirection.Column, 500, 600, false);
|
||||||
|
root.Insert(0, root_child0);
|
||||||
|
|
||||||
|
YogaNode root_child1 = createYGNode(config, YogaFlexDirection.Row, 500, 800, true);
|
||||||
|
root.Insert(1, root_child1);
|
||||||
|
|
||||||
|
YogaNode root_child1_child0 = createYGNode(config, YogaFlexDirection.Row, 500, 500, false);
|
||||||
|
root_child1.Insert(0, root_child1_child0);
|
||||||
|
|
||||||
|
YogaNode root_child1_child1 = createYGNode(config, YogaFlexDirection.Row, 500, 400, false);
|
||||||
|
root_child1_child1.SetBaselineFunction((_, width, height) => {
|
||||||
|
return height / 2;
|
||||||
|
});
|
||||||
|
root_child1_child1.IsReferenceBaseline = true;
|
||||||
|
root_child1.Insert(1, root_child1_child1);
|
||||||
|
|
||||||
|
root.StyleDirection = YogaDirection.LTR;
|
||||||
|
|
||||||
|
root.CalculateLayout();
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
|
|
||||||
|
Assert.AreEqual(500f, root_child1.LayoutX);
|
||||||
|
Assert.AreEqual(100f, root_child1.LayoutY);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child1_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child1_child0.LayoutY);
|
||||||
|
|
||||||
|
Assert.AreEqual(500f, root_child1_child1.LayoutX);
|
||||||
|
Assert.AreEqual(300f, root_child1_child1.LayoutY);
|
||||||
|
}
|
||||||
|
|
||||||
|
private YogaNode createYGNode(YogaConfig config, YogaFlexDirection flexDirection, int width, int height, bool alignBaseline) {
|
||||||
|
YogaNode node = new YogaNode(config);
|
||||||
|
node.FlexDirection = flexDirection;
|
||||||
|
node.Width = width;
|
||||||
|
node.Height = height;
|
||||||
|
if (alignBaseline) {
|
||||||
|
node.AlignItems = YogaAlign.Baseline;
|
||||||
|
}
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignContentTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignContentTest.html
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
@@ -362,39 +361,6 @@ namespace Facebook.Yoga
|
|||||||
Assert.AreEqual(100f, root.LayoutWidth);
|
Assert.AreEqual(100f, root.LayoutWidth);
|
||||||
Assert.AreEqual(100f, root.LayoutHeight);
|
Assert.AreEqual(100f, root.LayoutHeight);
|
||||||
|
|
||||||
Assert.AreEqual(0f, root_child0.LayoutX);
|
|
||||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
|
||||||
Assert.AreEqual(50f, root_child0.LayoutWidth);
|
|
||||||
Assert.AreEqual(10f, root_child0.LayoutHeight);
|
|
||||||
|
|
||||||
Assert.AreEqual(0f, root_child1.LayoutX);
|
|
||||||
Assert.AreEqual(10f, root_child1.LayoutY);
|
|
||||||
Assert.AreEqual(50f, root_child1.LayoutWidth);
|
|
||||||
Assert.AreEqual(10f, root_child1.LayoutHeight);
|
|
||||||
|
|
||||||
Assert.AreEqual(0f, root_child2.LayoutX);
|
|
||||||
Assert.AreEqual(20f, root_child2.LayoutY);
|
|
||||||
Assert.AreEqual(50f, root_child2.LayoutWidth);
|
|
||||||
Assert.AreEqual(10f, root_child2.LayoutHeight);
|
|
||||||
|
|
||||||
Assert.AreEqual(0f, root_child3.LayoutX);
|
|
||||||
Assert.AreEqual(30f, root_child3.LayoutY);
|
|
||||||
Assert.AreEqual(50f, root_child3.LayoutWidth);
|
|
||||||
Assert.AreEqual(10f, root_child3.LayoutHeight);
|
|
||||||
|
|
||||||
Assert.AreEqual(0f, root_child4.LayoutX);
|
|
||||||
Assert.AreEqual(40f, root_child4.LayoutY);
|
|
||||||
Assert.AreEqual(50f, root_child4.LayoutWidth);
|
|
||||||
Assert.AreEqual(10f, root_child4.LayoutHeight);
|
|
||||||
|
|
||||||
root.StyleDirection = YogaDirection.RTL;
|
|
||||||
root.CalculateLayout();
|
|
||||||
|
|
||||||
Assert.AreEqual(0f, root.LayoutX);
|
|
||||||
Assert.AreEqual(0f, root.LayoutY);
|
|
||||||
Assert.AreEqual(100f, root.LayoutWidth);
|
|
||||||
Assert.AreEqual(100f, root.LayoutHeight);
|
|
||||||
|
|
||||||
Assert.AreEqual(50f, root_child0.LayoutX);
|
Assert.AreEqual(50f, root_child0.LayoutX);
|
||||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
Assert.AreEqual(50f, root_child0.LayoutWidth);
|
Assert.AreEqual(50f, root_child0.LayoutWidth);
|
||||||
@@ -419,6 +385,39 @@ namespace Facebook.Yoga
|
|||||||
Assert.AreEqual(40f, root_child4.LayoutY);
|
Assert.AreEqual(40f, root_child4.LayoutY);
|
||||||
Assert.AreEqual(50f, root_child4.LayoutWidth);
|
Assert.AreEqual(50f, root_child4.LayoutWidth);
|
||||||
Assert.AreEqual(10f, root_child4.LayoutHeight);
|
Assert.AreEqual(10f, root_child4.LayoutHeight);
|
||||||
|
|
||||||
|
root.StyleDirection = YogaDirection.RTL;
|
||||||
|
root.CalculateLayout();
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root.LayoutY);
|
||||||
|
Assert.AreEqual(100f, root.LayoutWidth);
|
||||||
|
Assert.AreEqual(100f, root.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
|
Assert.AreEqual(50f, root_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(10f, root_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child1.LayoutX);
|
||||||
|
Assert.AreEqual(10f, root_child1.LayoutY);
|
||||||
|
Assert.AreEqual(50f, root_child1.LayoutWidth);
|
||||||
|
Assert.AreEqual(10f, root_child1.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child2.LayoutX);
|
||||||
|
Assert.AreEqual(20f, root_child2.LayoutY);
|
||||||
|
Assert.AreEqual(50f, root_child2.LayoutWidth);
|
||||||
|
Assert.AreEqual(10f, root_child2.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child3.LayoutX);
|
||||||
|
Assert.AreEqual(30f, root_child3.LayoutY);
|
||||||
|
Assert.AreEqual(50f, root_child3.LayoutWidth);
|
||||||
|
Assert.AreEqual(10f, root_child3.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child4.LayoutX);
|
||||||
|
Assert.AreEqual(40f, root_child4.LayoutY);
|
||||||
|
Assert.AreEqual(50f, root_child4.LayoutWidth);
|
||||||
|
Assert.AreEqual(10f, root_child4.LayoutHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignItemsTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignItemsTest.html
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignSelfTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAlignSelfTest.html
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAndroidNewsFeed.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGAndroidNewsFeed.html
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGBorderTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGBorderTest.html
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGDimensionTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGDimensionTest.html
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGDisplayTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGDisplayTest.html
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
@@ -214,8 +213,6 @@ namespace Facebook.Yoga
|
|||||||
root_child1_child0.FlexShrink = 1;
|
root_child1_child0.FlexShrink = 1;
|
||||||
root_child1_child0.FlexBasis = 0.Percent();
|
root_child1_child0.FlexBasis = 0.Percent();
|
||||||
root_child1_child0.Width = 20;
|
root_child1_child0.Width = 20;
|
||||||
root_child1_child0.MinWidth = 0;
|
|
||||||
root_child1_child0.MinHeight = 0;
|
|
||||||
root_child1.Insert(0, root_child1_child0);
|
root_child1.Insert(0, root_child1_child0);
|
||||||
|
|
||||||
YogaNode root_child2 = new YogaNode(config);
|
YogaNode root_child2 = new YogaNode(config);
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGFlexDirectionTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGFlexDirectionTest.html
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGFlexTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGFlexTest.html
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
@@ -69,6 +68,123 @@ namespace Facebook.Yoga
|
|||||||
Assert.AreEqual(25f, root_child1.LayoutHeight);
|
Assert.AreEqual(25f, root_child1.LayoutHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void Test_flex_shrink_flex_grow_row()
|
||||||
|
{
|
||||||
|
YogaConfig config = new YogaConfig();
|
||||||
|
|
||||||
|
YogaNode root = new YogaNode(config);
|
||||||
|
root.FlexDirection = YogaFlexDirection.Row;
|
||||||
|
root.Width = 500;
|
||||||
|
root.Height = 500;
|
||||||
|
|
||||||
|
YogaNode root_child0 = new YogaNode(config);
|
||||||
|
root_child0.FlexShrink = 1;
|
||||||
|
root_child0.Width = 500;
|
||||||
|
root_child0.Height = 100;
|
||||||
|
root.Insert(0, root_child0);
|
||||||
|
|
||||||
|
YogaNode root_child1 = new YogaNode(config);
|
||||||
|
root_child1.FlexShrink = 1;
|
||||||
|
root_child1.Width = 500;
|
||||||
|
root_child1.Height = 100;
|
||||||
|
root.Insert(1, root_child1);
|
||||||
|
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(250f, root_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(100f, root_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(250f, root_child1.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child1.LayoutY);
|
||||||
|
Assert.AreEqual(250f, root_child1.LayoutWidth);
|
||||||
|
Assert.AreEqual(100f, root_child1.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(250f, root_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
|
Assert.AreEqual(250f, root_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(100f, root_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child1.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child1.LayoutY);
|
||||||
|
Assert.AreEqual(250f, root_child1.LayoutWidth);
|
||||||
|
Assert.AreEqual(100f, root_child1.LayoutHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void Test_flex_shrink_flex_grow_child_flex_shrink_other_child()
|
||||||
|
{
|
||||||
|
YogaConfig config = new YogaConfig();
|
||||||
|
|
||||||
|
YogaNode root = new YogaNode(config);
|
||||||
|
root.FlexDirection = YogaFlexDirection.Row;
|
||||||
|
root.Width = 500;
|
||||||
|
root.Height = 500;
|
||||||
|
|
||||||
|
YogaNode root_child0 = new YogaNode(config);
|
||||||
|
root_child0.FlexShrink = 1;
|
||||||
|
root_child0.Width = 500;
|
||||||
|
root_child0.Height = 100;
|
||||||
|
root.Insert(0, root_child0);
|
||||||
|
|
||||||
|
YogaNode root_child1 = new YogaNode(config);
|
||||||
|
root_child1.FlexGrow = 1;
|
||||||
|
root_child1.FlexShrink = 1;
|
||||||
|
root_child1.Width = 500;
|
||||||
|
root_child1.Height = 100;
|
||||||
|
root.Insert(1, root_child1);
|
||||||
|
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(250f, root_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(100f, root_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(250f, root_child1.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child1.LayoutY);
|
||||||
|
Assert.AreEqual(250f, root_child1.LayoutWidth);
|
||||||
|
Assert.AreEqual(100f, root_child1.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(250f, root_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
|
Assert.AreEqual(250f, root_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(100f, root_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child1.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child1.LayoutY);
|
||||||
|
Assert.AreEqual(250f, root_child1.LayoutWidth);
|
||||||
|
Assert.AreEqual(100f, root_child1.LayoutHeight);
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void Test_flex_basis_flex_grow_row()
|
public void Test_flex_basis_flex_grow_row()
|
||||||
{
|
{
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGFlexWrapTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGFlexWrapTest.html
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
@@ -530,12 +529,12 @@ namespace Facebook.Yoga
|
|||||||
Assert.AreEqual(0f, root_child0.LayoutX);
|
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
Assert.AreEqual(50f, root_child0.LayoutWidth);
|
Assert.AreEqual(50f, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(100f, root_child0.LayoutHeight);
|
Assert.AreEqual(0f, root_child0.LayoutHeight);
|
||||||
|
|
||||||
Assert.AreEqual(50f, root_child1.LayoutX);
|
Assert.AreEqual(50f, root_child1.LayoutX);
|
||||||
Assert.AreEqual(0f, root_child1.LayoutY);
|
Assert.AreEqual(0f, root_child1.LayoutY);
|
||||||
Assert.AreEqual(50f, root_child1.LayoutWidth);
|
Assert.AreEqual(50f, root_child1.LayoutWidth);
|
||||||
Assert.AreEqual(100f, root_child1.LayoutHeight);
|
Assert.AreEqual(0f, root_child1.LayoutHeight);
|
||||||
|
|
||||||
root.StyleDirection = YogaDirection.RTL;
|
root.StyleDirection = YogaDirection.RTL;
|
||||||
root.CalculateLayout();
|
root.CalculateLayout();
|
||||||
@@ -548,12 +547,12 @@ namespace Facebook.Yoga
|
|||||||
Assert.AreEqual(100f, root_child0.LayoutX);
|
Assert.AreEqual(100f, root_child0.LayoutX);
|
||||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
Assert.AreEqual(50f, root_child0.LayoutWidth);
|
Assert.AreEqual(50f, root_child0.LayoutWidth);
|
||||||
Assert.AreEqual(100f, root_child0.LayoutHeight);
|
Assert.AreEqual(0f, root_child0.LayoutHeight);
|
||||||
|
|
||||||
Assert.AreEqual(50f, root_child1.LayoutX);
|
Assert.AreEqual(50f, root_child1.LayoutX);
|
||||||
Assert.AreEqual(0f, root_child1.LayoutY);
|
Assert.AreEqual(0f, root_child1.LayoutY);
|
||||||
Assert.AreEqual(50f, root_child1.LayoutWidth);
|
Assert.AreEqual(50f, root_child1.LayoutWidth);
|
||||||
Assert.AreEqual(100f, root_child1.LayoutHeight);
|
Assert.AreEqual(0f, root_child1.LayoutHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGJustifyContentTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGJustifyContentTest.html
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
@@ -1003,5 +1002,159 @@ namespace Facebook.Yoga
|
|||||||
Assert.AreEqual(10f, root_child2.LayoutHeight);
|
Assert.AreEqual(10f, root_child2.LayoutHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void Test_justify_content_min_width_with_padding_child_width_greater_than_parent()
|
||||||
|
{
|
||||||
|
YogaConfig config = new YogaConfig();
|
||||||
|
|
||||||
|
YogaNode root = new YogaNode(config);
|
||||||
|
root.AlignContent = YogaAlign.Stretch;
|
||||||
|
root.Width = 1000;
|
||||||
|
root.Height = 1584;
|
||||||
|
|
||||||
|
YogaNode root_child0 = new YogaNode(config);
|
||||||
|
root_child0.FlexDirection = YogaFlexDirection.Row;
|
||||||
|
root_child0.AlignContent = YogaAlign.Stretch;
|
||||||
|
root.Insert(0, root_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0 = new YogaNode(config);
|
||||||
|
root_child0_child0.FlexDirection = YogaFlexDirection.Row;
|
||||||
|
root_child0_child0.JustifyContent = YogaJustify.Center;
|
||||||
|
root_child0_child0.AlignContent = YogaAlign.Stretch;
|
||||||
|
root_child0_child0.PaddingLeft = 100;
|
||||||
|
root_child0_child0.PaddingRight = 100;
|
||||||
|
root_child0_child0.MinWidth = 400;
|
||||||
|
root_child0.Insert(0, root_child0_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0_child0 = new YogaNode(config);
|
||||||
|
root_child0_child0_child0.FlexDirection = YogaFlexDirection.Row;
|
||||||
|
root_child0_child0_child0.AlignContent = YogaAlign.Stretch;
|
||||||
|
root_child0_child0_child0.Width = 300;
|
||||||
|
root_child0_child0_child0.Height = 100;
|
||||||
|
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(1000f, root.LayoutWidth);
|
||||||
|
Assert.AreEqual(1584f, root.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
|
Assert.AreEqual(1000f, root_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(100f, 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(100f, root_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(100f, root_child0_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(300f, root_child0_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(100f, root_child0_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
root.StyleDirection = YogaDirection.RTL;
|
||||||
|
root.CalculateLayout();
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root.LayoutY);
|
||||||
|
Assert.AreEqual(1000f, root.LayoutWidth);
|
||||||
|
Assert.AreEqual(1584f, root.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
|
Assert.AreEqual(1000f, root_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(100f, root_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(500f, root_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(500f, root_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(100f, root_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(100f, root_child0_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(300f, root_child0_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(100f, root_child0_child0_child0.LayoutHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void Test_justify_content_min_width_with_padding_child_width_lower_than_parent()
|
||||||
|
{
|
||||||
|
YogaConfig config = new YogaConfig();
|
||||||
|
|
||||||
|
YogaNode root = new YogaNode(config);
|
||||||
|
root.AlignContent = YogaAlign.Stretch;
|
||||||
|
root.Width = 1080;
|
||||||
|
root.Height = 1584;
|
||||||
|
|
||||||
|
YogaNode root_child0 = new YogaNode(config);
|
||||||
|
root_child0.FlexDirection = YogaFlexDirection.Row;
|
||||||
|
root_child0.AlignContent = YogaAlign.Stretch;
|
||||||
|
root.Insert(0, root_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0 = new YogaNode(config);
|
||||||
|
root_child0_child0.FlexDirection = YogaFlexDirection.Row;
|
||||||
|
root_child0_child0.JustifyContent = YogaJustify.Center;
|
||||||
|
root_child0_child0.AlignContent = YogaAlign.Stretch;
|
||||||
|
root_child0_child0.PaddingLeft = 100;
|
||||||
|
root_child0_child0.PaddingRight = 100;
|
||||||
|
root_child0_child0.MinWidth = 400;
|
||||||
|
root_child0.Insert(0, root_child0_child0);
|
||||||
|
|
||||||
|
YogaNode root_child0_child0_child0 = new YogaNode(config);
|
||||||
|
root_child0_child0_child0.FlexDirection = YogaFlexDirection.Row;
|
||||||
|
root_child0_child0_child0.AlignContent = YogaAlign.Stretch;
|
||||||
|
root_child0_child0_child0.Width = 199;
|
||||||
|
root_child0_child0_child0.Height = 100;
|
||||||
|
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(1080f, root.LayoutWidth);
|
||||||
|
Assert.AreEqual(1584f, root.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
|
Assert.AreEqual(1080f, root_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(100f, root_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(400f, root_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(100f, root_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(101f, root_child0_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(199f, root_child0_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(100f, root_child0_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
root.StyleDirection = YogaDirection.RTL;
|
||||||
|
root.CalculateLayout();
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root.LayoutY);
|
||||||
|
Assert.AreEqual(1080f, root.LayoutWidth);
|
||||||
|
Assert.AreEqual(1584f, root.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
|
Assert.AreEqual(1080f, root_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(100f, root_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(680f, root_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(400f, root_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(100f, root_child0_child0.LayoutHeight);
|
||||||
|
|
||||||
|
Assert.AreEqual(101f, root_child0_child0_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
|
||||||
|
Assert.AreEqual(199f, root_child0_child0_child0.LayoutWidth);
|
||||||
|
Assert.AreEqual(100f, root_child0_child0_child0.LayoutHeight);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGMarginTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGMarginTest.html
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGMinMaxDimensionTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGMinMaxDimensionTest.html
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGPaddingTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGPaddingTest.html
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGPercentageTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGPercentageTest.html
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGRoundingTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGRoundingTest.html
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @Generated by gentest/gentest.rb from gentest/fixtures/YGSizeOverflowTest.html
|
// @Generated by gentest/gentest.rb from gentest/fixtures/YGSizeOverflowTest.html
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@@ -259,7 +259,7 @@ namespace Facebook.Yoga
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestPrintWithLogger()
|
public void TestPrintWithLogger()
|
||||||
{
|
{
|
||||||
YogaNode node = new YogaNode(new YogaConfig{Logger = (c, n, l, m) => {}});
|
YogaNode node = new YogaNode();
|
||||||
node.Width = 110;
|
node.Width = 110;
|
||||||
node.Height = 105;
|
node.Height = 105;
|
||||||
node.CalculateLayout();
|
node.CalculateLayout();
|
||||||
|
286
enums.py
286
enums.py
@@ -3,107 +3,57 @@
|
|||||||
# This source code is licensed under the MIT 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.
|
# LICENSE file in the root directory of this source tree.
|
||||||
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||||
from __future__ import division
|
|
||||||
from __future__ import print_function
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
ENUMS = {
|
ENUMS = {
|
||||||
'Direction': [
|
"Direction": ["Inherit", "LTR", "RTL"],
|
||||||
'Inherit',
|
"Unit": ["Undefined", "Point", "Percent", "Auto"],
|
||||||
'LTR',
|
"FlexDirection": ["Column", "ColumnReverse", "Row", "RowReverse"],
|
||||||
'RTL',
|
"Justify": [
|
||||||
|
"FlexStart",
|
||||||
|
"Center",
|
||||||
|
"FlexEnd",
|
||||||
|
"SpaceBetween",
|
||||||
|
"SpaceAround",
|
||||||
|
"SpaceEvenly",
|
||||||
],
|
],
|
||||||
'Unit': [
|
"Overflow": ["Visible", "Hidden", "Scroll"],
|
||||||
'Undefined',
|
"Align": [
|
||||||
'Point',
|
"Auto",
|
||||||
'Percent',
|
"FlexStart",
|
||||||
'Auto',
|
"Center",
|
||||||
|
"FlexEnd",
|
||||||
|
"Stretch",
|
||||||
|
"Baseline",
|
||||||
|
"SpaceBetween",
|
||||||
|
"SpaceAround",
|
||||||
],
|
],
|
||||||
'FlexDirection': [
|
"PositionType": ["Relative", "Absolute"],
|
||||||
'Column',
|
"Display": ["Flex", "None"],
|
||||||
'ColumnReverse',
|
"Wrap": ["NoWrap", "Wrap", "WrapReverse"],
|
||||||
'Row',
|
"MeasureMode": ["Undefined", "Exactly", "AtMost"],
|
||||||
'RowReverse',
|
"Dimension": ["Width", "Height"],
|
||||||
|
"Edge": [
|
||||||
|
"Left",
|
||||||
|
"Top",
|
||||||
|
"Right",
|
||||||
|
"Bottom",
|
||||||
|
"Start",
|
||||||
|
"End",
|
||||||
|
"Horizontal",
|
||||||
|
"Vertical",
|
||||||
|
"All",
|
||||||
],
|
],
|
||||||
'Justify': [
|
"NodeType": ["Default", "Text"],
|
||||||
'FlexStart',
|
"LogLevel": ["Error", "Warn", "Info", "Debug", "Verbose", "Fatal"],
|
||||||
'Center',
|
"ExperimentalFeature": [
|
||||||
'FlexEnd',
|
|
||||||
'SpaceBetween',
|
|
||||||
'SpaceAround',
|
|
||||||
'SpaceEvenly',
|
|
||||||
],
|
|
||||||
'Overflow': [
|
|
||||||
'Visible',
|
|
||||||
'Hidden',
|
|
||||||
'Scroll',
|
|
||||||
],
|
|
||||||
'Align': [
|
|
||||||
'Auto',
|
|
||||||
'FlexStart',
|
|
||||||
'Center',
|
|
||||||
'FlexEnd',
|
|
||||||
'Stretch',
|
|
||||||
'Baseline',
|
|
||||||
'SpaceBetween',
|
|
||||||
'SpaceAround',
|
|
||||||
],
|
|
||||||
'PositionType': [
|
|
||||||
'Relative',
|
|
||||||
'Absolute',
|
|
||||||
],
|
|
||||||
'Display': [
|
|
||||||
'Flex',
|
|
||||||
'None',
|
|
||||||
],
|
|
||||||
'Wrap': [
|
|
||||||
'NoWrap',
|
|
||||||
'Wrap',
|
|
||||||
'WrapReverse',
|
|
||||||
],
|
|
||||||
'MeasureMode': [
|
|
||||||
'Undefined',
|
|
||||||
'Exactly',
|
|
||||||
'AtMost',
|
|
||||||
],
|
|
||||||
'Dimension': [
|
|
||||||
'Width',
|
|
||||||
'Height',
|
|
||||||
],
|
|
||||||
'Edge': [
|
|
||||||
'Left',
|
|
||||||
'Top',
|
|
||||||
'Right',
|
|
||||||
'Bottom',
|
|
||||||
'Start',
|
|
||||||
'End',
|
|
||||||
'Horizontal',
|
|
||||||
'Vertical',
|
|
||||||
'All',
|
|
||||||
],
|
|
||||||
'NodeType': [
|
|
||||||
'Default',
|
|
||||||
'Text',
|
|
||||||
],
|
|
||||||
'LogLevel': [
|
|
||||||
'Error',
|
|
||||||
'Warn',
|
|
||||||
'Info',
|
|
||||||
'Debug',
|
|
||||||
'Verbose',
|
|
||||||
'Fatal',
|
|
||||||
],
|
|
||||||
'ExperimentalFeature': [
|
|
||||||
# Mimic web flex-basis behavior.
|
# Mimic web flex-basis behavior.
|
||||||
'WebFlexBasis',
|
"WebFlexBasis"
|
||||||
],
|
|
||||||
'PrintOptions': [
|
|
||||||
('Layout', 1),
|
|
||||||
('Style', 2),
|
|
||||||
('Children', 4),
|
|
||||||
],
|
],
|
||||||
|
"PrintOptions": [("Layout", 1), ("Style", 2), ("Children", 4)],
|
||||||
}
|
}
|
||||||
|
|
||||||
LICENSE = """/**
|
LICENSE = """/**
|
||||||
@@ -115,23 +65,25 @@ LICENSE = """/**
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
def to_java_upper(symbol):
|
def to_java_upper(symbol):
|
||||||
symbol = str(symbol)
|
symbol = str(symbol)
|
||||||
out = ''
|
out = ""
|
||||||
for i in range(0, len(symbol)):
|
for i in range(0, len(symbol)):
|
||||||
c = symbol[i]
|
c = symbol[i]
|
||||||
if str.istitle(c) and i is not 0 and not str.istitle(symbol[i - 1]):
|
if str.istitle(c) and i is not 0 and not str.istitle(symbol[i - 1]):
|
||||||
out += '_'
|
out += "_"
|
||||||
out += c.upper()
|
out += c.upper()
|
||||||
return out
|
return out
|
||||||
|
|
||||||
|
|
||||||
def to_log_lower(symbol):
|
def to_log_lower(symbol):
|
||||||
symbol = str(symbol)
|
symbol = str(symbol)
|
||||||
out = ''
|
out = ""
|
||||||
for i in range(0, len(symbol)):
|
for i in range(0, len(symbol)):
|
||||||
c = symbol[i]
|
c = symbol[i]
|
||||||
if str.istitle(c) and i is not 0 and not str.istitle(symbol[i - 1]):
|
if str.istitle(c) and i is not 0 and not str.istitle(symbol[i - 1]):
|
||||||
out += '-'
|
out += "-"
|
||||||
out += c.lower()
|
out += c.lower()
|
||||||
return out
|
return out
|
||||||
|
|
||||||
@@ -139,114 +91,128 @@ def to_log_lower(symbol):
|
|||||||
root = os.path.dirname(os.path.abspath(__file__))
|
root = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
||||||
# write out C & Objective-C headers
|
# write out C & Objective-C headers
|
||||||
with open(root + '/yoga/YGEnums.h', 'w') as f:
|
with open(root + "/yoga/YGEnums.h", "w") as f:
|
||||||
f.write(LICENSE)
|
f.write(LICENSE)
|
||||||
f.write('#pragma once\n\n')
|
f.write("#pragma once\n\n")
|
||||||
f.write('#include "YGMacros.h"\n\n')
|
f.write('#include "YGMacros.h"\n\n')
|
||||||
f.write('YG_EXTERN_C_BEGIN\n\n')
|
f.write("YG_EXTERN_C_BEGIN\n\n")
|
||||||
for name, values in sorted(ENUMS.items()):
|
for name, values in sorted(ENUMS.items()):
|
||||||
f.write('#define YG%sCount %s\n' % (name, len(values)))
|
f.write("#define YG%sCount %s\n" % (name, len(values)))
|
||||||
f.write('typedef YG_ENUM_BEGIN(YG%s) {\n' % name)
|
f.write("typedef YG_ENUM_BEGIN(YG%s) {\n" % name)
|
||||||
for value in values:
|
for value in values:
|
||||||
if isinstance(value, tuple):
|
if isinstance(value, tuple):
|
||||||
f.write(' YG%s%s = %d,\n' % (name, value[0], value[1]))
|
f.write(" YG%s%s = %d,\n" % (name, value[0], value[1]))
|
||||||
else:
|
else:
|
||||||
f.write(' YG%s%s,\n' % (name, value))
|
f.write(" YG%s%s,\n" % (name, value))
|
||||||
f.write('} YG_ENUM_END(YG%s);\n' % name)
|
f.write("} YG_ENUM_END(YG%s);\n" % name)
|
||||||
f.write('WIN_EXPORT const char *YG%sToString(const YG%s value);\n' % (name, name))
|
f.write(
|
||||||
f.write('\n')
|
"WIN_EXPORT const char *YG%sToString(const YG%s value);\n" % (name, name)
|
||||||
f.write('YG_EXTERN_C_END\n')
|
)
|
||||||
|
f.write("\n")
|
||||||
|
f.write("YG_EXTERN_C_END\n")
|
||||||
|
|
||||||
# write out C body for printing
|
# write out C body for printing
|
||||||
with open(root + '/yoga/YGEnums.cpp', 'w') as f:
|
with open(root + "/yoga/YGEnums.cpp", "w") as f:
|
||||||
f.write(LICENSE)
|
f.write(LICENSE)
|
||||||
f.write('#include "YGEnums.h"\n\n')
|
f.write('#include "YGEnums.h"\n\n')
|
||||||
for name, values in sorted(ENUMS.items()):
|
for name, values in sorted(ENUMS.items()):
|
||||||
f.write('const char *YG%sToString(const YG%s value){\n' % (name, name))
|
f.write("const char *YG%sToString(const YG%s value){\n" % (name, name))
|
||||||
f.write(' switch(value){\n')
|
f.write(" switch(value){\n")
|
||||||
for value in values:
|
for value in values:
|
||||||
if isinstance(value, tuple):
|
if isinstance(value, tuple):
|
||||||
f.write(' case YG%s%s:\n' % (name, value[0]))
|
f.write(" case YG%s%s:\n" % (name, value[0]))
|
||||||
f.write(' return "%s";\n' % to_log_lower(value[0]))
|
f.write(' return "%s";\n' % to_log_lower(value[0]))
|
||||||
else:
|
else:
|
||||||
f.write(' case YG%s%s:\n' % (name, value))
|
f.write(" case YG%s%s:\n" % (name, value))
|
||||||
f.write(' return "%s";\n' % to_log_lower(value))
|
f.write(' return "%s";\n' % to_log_lower(value))
|
||||||
f.write(' }\n')
|
f.write(" }\n")
|
||||||
f.write(' return "unknown";\n')
|
f.write(' return "unknown";\n')
|
||||||
f.write('}\n\n')
|
f.write("}\n\n")
|
||||||
|
|
||||||
# write out java files
|
# write out java files
|
||||||
for name, values in sorted(ENUMS.items()):
|
for name, values in sorted(ENUMS.items()):
|
||||||
with open(root + '/java/com/facebook/yoga/Yoga%s.java' % name, 'w') as f:
|
with open(root + "/java/com/facebook/yoga/Yoga%s.java" % name, "w") as f:
|
||||||
f.write(LICENSE.replace('/**', '/*', 1))
|
f.write(LICENSE.replace("/**", "/*", 1))
|
||||||
f.write('package com.facebook.yoga;\n\n')
|
f.write("package com.facebook.yoga;\n\n")
|
||||||
f.write('import com.facebook.proguard.annotations.DoNotStrip;\n\n')
|
f.write("import com.facebook.proguard.annotations.DoNotStrip;\n\n")
|
||||||
f.write('@DoNotStrip\n')
|
f.write("@DoNotStrip\n")
|
||||||
f.write('public enum Yoga%s {\n' % name)
|
f.write("public enum Yoga%s {\n" % name)
|
||||||
if len(values) > 0:
|
if len(values) > 0:
|
||||||
for value in values:
|
for value in values:
|
||||||
if isinstance(value, tuple):
|
if isinstance(value, tuple):
|
||||||
f.write(' %s(%d)' % (to_java_upper(value[0]), value[1]))
|
f.write(" %s(%d)" % (to_java_upper(value[0]), value[1]))
|
||||||
else:
|
else:
|
||||||
f.write(' %s(%d)' % (to_java_upper(value), values.index(value)))
|
f.write(" %s(%d)" % (to_java_upper(value), values.index(value)))
|
||||||
if values.index(value) is len(values) - 1:
|
if values.index(value) is len(values) - 1:
|
||||||
f.write(';\n')
|
f.write(";\n")
|
||||||
else:
|
else:
|
||||||
f.write(',\n')
|
f.write(",\n")
|
||||||
else:
|
else:
|
||||||
f.write('__EMPTY(-1);')
|
f.write("__EMPTY(-1);")
|
||||||
f.write('\n')
|
f.write("\n")
|
||||||
f.write(' private int mIntValue;\n')
|
f.write(" private int mIntValue;\n")
|
||||||
f.write('\n')
|
f.write("\n")
|
||||||
f.write(' Yoga%s(int intValue) {\n' % name)
|
f.write(" Yoga%s(int intValue) {\n" % name)
|
||||||
f.write(' mIntValue = intValue;\n')
|
f.write(" mIntValue = intValue;\n")
|
||||||
f.write(' }\n')
|
f.write(" }\n")
|
||||||
f.write('\n')
|
f.write("\n")
|
||||||
f.write(' public int intValue() {\n')
|
f.write(" public int intValue() {\n")
|
||||||
f.write(' return mIntValue;\n')
|
f.write(" return mIntValue;\n")
|
||||||
f.write(' }\n')
|
f.write(" }\n")
|
||||||
f.write('\n')
|
f.write("\n")
|
||||||
f.write(' public static Yoga%s fromInt(int value) {\n' % name)
|
f.write(" public static Yoga%s fromInt(int value) {\n" % name)
|
||||||
f.write(' switch (value) {\n')
|
f.write(" switch (value) {\n")
|
||||||
for value in values:
|
for value in values:
|
||||||
if isinstance(value, tuple):
|
if isinstance(value, tuple):
|
||||||
f.write(' case %d: return %s;\n' % (value[1], to_java_upper(value[0])))
|
f.write(
|
||||||
|
" case %d: return %s;\n" % (value[1], to_java_upper(value[0]))
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
f.write(' case %d: return %s;\n' % (values.index(value), to_java_upper(value)))
|
f.write(
|
||||||
f.write(' default: throw new IllegalArgumentException("Unknown enum value: " + value);\n')
|
" case %d: return %s;\n"
|
||||||
f.write(' }\n')
|
% (values.index(value), to_java_upper(value))
|
||||||
f.write(' }\n')
|
)
|
||||||
f.write('}\n')
|
f.write(
|
||||||
|
' default: throw new IllegalArgumentException("Unknown enum value: " + value);\n'
|
||||||
|
)
|
||||||
|
f.write(" }\n")
|
||||||
|
f.write(" }\n")
|
||||||
|
f.write("}\n")
|
||||||
|
|
||||||
# write out csharp files
|
# write out csharp files
|
||||||
for name, values in sorted(ENUMS.items()):
|
for name, values in sorted(ENUMS.items()):
|
||||||
with open(root + '/csharp/Facebook.Yoga/Yoga%s.cs' % name, 'w') as f:
|
with open(root + "/csharp/Facebook.Yoga/Yoga%s.cs" % name, "w") as f:
|
||||||
f.write(LICENSE)
|
f.write(LICENSE)
|
||||||
f.write('namespace Facebook.Yoga\n{\n')
|
f.write("namespace Facebook.Yoga\n{\n")
|
||||||
if isinstance(next(iter(values or []), None), tuple):
|
if isinstance(next(iter(values or []), None), tuple):
|
||||||
f.write(' [System.Flags]\n')
|
f.write(" [System.Flags]\n")
|
||||||
f.write(' public enum Yoga%s\n {\n' % name)
|
f.write(" public enum Yoga%s\n {\n" % name)
|
||||||
for value in values:
|
for value in values:
|
||||||
if isinstance(value, tuple):
|
if isinstance(value, tuple):
|
||||||
f.write(' %s = %d,\n' % (value[0], value[1]))
|
f.write(" %s = %d,\n" % (value[0], value[1]))
|
||||||
else:
|
else:
|
||||||
f.write(' %s,\n' % value)
|
f.write(" %s,\n" % value)
|
||||||
f.write(' }\n')
|
f.write(" }\n")
|
||||||
f.write('}\n')
|
f.write("}\n")
|
||||||
|
|
||||||
# write out javascript file
|
# write out javascript file
|
||||||
with open(root + '/javascript/sources/YGEnums.js', 'w') as f:
|
with open(root + "/javascript/sources/YGEnums.js", "w") as f:
|
||||||
f.write(LICENSE)
|
f.write(LICENSE)
|
||||||
f.write('module.exports = {\n\n')
|
f.write("module.exports = {\n\n")
|
||||||
for name, values in sorted(ENUMS.items()):
|
for name, values in sorted(ENUMS.items()):
|
||||||
f.write(' %s_COUNT: %s,\n' % (to_java_upper(name), len(values)))
|
f.write(" %s_COUNT: %s,\n" % (to_java_upper(name), len(values)))
|
||||||
base = 0
|
base = 0
|
||||||
for value in values:
|
for value in values:
|
||||||
if isinstance(value, tuple):
|
if isinstance(value, tuple):
|
||||||
f.write(' %s_%s: %d,\n' % (to_java_upper(name), to_java_upper(value[0]), value[1]))
|
f.write(
|
||||||
|
" %s_%s: %d,\n"
|
||||||
|
% (to_java_upper(name), to_java_upper(value[0]), value[1])
|
||||||
|
)
|
||||||
base = value[1] + 1
|
base = value[1] + 1
|
||||||
else:
|
else:
|
||||||
f.write(' %s_%s: %d,\n' % (to_java_upper(name), to_java_upper(value), base))
|
f.write(
|
||||||
|
" %s_%s: %d,\n" % (to_java_upper(name), to_java_upper(value), base)
|
||||||
|
)
|
||||||
base += 1
|
base += 1
|
||||||
f.write('\n')
|
f.write("\n")
|
||||||
f.write('};\n')
|
f.write("};\n")
|
||||||
|
@@ -1,121 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the BSD-style license found in the
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
#include <algorithm>
|
|
||||||
#include <array>
|
|
||||||
#include <cmath>
|
|
||||||
#include <vector>
|
|
||||||
#include "Yoga.h"
|
|
||||||
|
|
||||||
using YGVector = std::vector<YGNodeRef>;
|
|
||||||
|
|
||||||
YG_EXTERN_C_BEGIN
|
|
||||||
|
|
||||||
WIN_EXPORT float YGRoundValueToPixelGrid(
|
|
||||||
const float value,
|
|
||||||
const float pointScaleFactor,
|
|
||||||
const bool forceCeil,
|
|
||||||
const bool forceFloor);
|
|
||||||
|
|
||||||
YG_EXTERN_C_END
|
|
||||||
|
|
||||||
extern const std::array<YGEdge, 4> trailing;
|
|
||||||
extern const std::array<YGEdge, 4> leading;
|
|
||||||
extern bool YGValueEqual(const YGValue a, const YGValue b);
|
|
||||||
extern const YGValue YGValueUndefined;
|
|
||||||
extern const YGValue YGValueAuto;
|
|
||||||
extern const YGValue YGValueZero;
|
|
||||||
|
|
||||||
template <std::size_t size>
|
|
||||||
bool YGValueArrayEqual(
|
|
||||||
const std::array<YGValue, size> val1,
|
|
||||||
const std::array<YGValue, size> val2) {
|
|
||||||
bool areEqual = true;
|
|
||||||
for (uint32_t i = 0; i < size && areEqual; ++i) {
|
|
||||||
areEqual = YGValueEqual(val1[i], val2[i]);
|
|
||||||
}
|
|
||||||
return areEqual;
|
|
||||||
}
|
|
||||||
|
|
||||||
const YGValue kYGValueUndefined = {YGUndefined, YGUnitUndefined};
|
|
||||||
const YGValue kYGValueAuto = {YGUndefined, YGUnitAuto};
|
|
||||||
const std::array<YGValue, YGEdgeCount> kYGDefaultEdgeValuesUnit = {
|
|
||||||
{kYGValueUndefined,
|
|
||||||
kYGValueUndefined,
|
|
||||||
kYGValueUndefined,
|
|
||||||
kYGValueUndefined,
|
|
||||||
kYGValueUndefined,
|
|
||||||
kYGValueUndefined,
|
|
||||||
kYGValueUndefined,
|
|
||||||
kYGValueUndefined,
|
|
||||||
kYGValueUndefined}};
|
|
||||||
const std::array<YGValue, 2> kYGDefaultDimensionValuesAutoUnit = {
|
|
||||||
{kYGValueAuto, kYGValueAuto}};
|
|
||||||
const std::array<YGValue, 2> kYGDefaultDimensionValuesUnit = {
|
|
||||||
{kYGValueUndefined, kYGValueUndefined}};
|
|
||||||
|
|
||||||
struct YGCachedMeasurement {
|
|
||||||
float availableWidth;
|
|
||||||
float availableHeight;
|
|
||||||
YGMeasureMode widthMeasureMode;
|
|
||||||
YGMeasureMode heightMeasureMode;
|
|
||||||
|
|
||||||
float computedWidth;
|
|
||||||
float computedHeight;
|
|
||||||
|
|
||||||
bool operator==(YGCachedMeasurement measurement) const {
|
|
||||||
bool isEqual = widthMeasureMode == measurement.widthMeasureMode &&
|
|
||||||
heightMeasureMode == measurement.heightMeasureMode;
|
|
||||||
|
|
||||||
if (!std::isnan(availableWidth) ||
|
|
||||||
!std::isnan(measurement.availableWidth)) {
|
|
||||||
isEqual = isEqual && availableWidth == measurement.availableWidth;
|
|
||||||
}
|
|
||||||
if (!std::isnan(availableHeight) ||
|
|
||||||
!std::isnan(measurement.availableHeight)) {
|
|
||||||
isEqual = isEqual && availableHeight == measurement.availableHeight;
|
|
||||||
}
|
|
||||||
if (!std::isnan(computedWidth) || !std::isnan(measurement.computedWidth)) {
|
|
||||||
isEqual = isEqual && computedWidth == measurement.computedWidth;
|
|
||||||
}
|
|
||||||
if (!std::isnan(computedHeight) ||
|
|
||||||
!std::isnan(measurement.computedHeight)) {
|
|
||||||
isEqual = isEqual && computedHeight == measurement.computedHeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
return isEqual;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// This value was chosen based on empiracle data. Even the most complicated
|
|
||||||
// layouts should not require more than 16 entries to fit within the cache.
|
|
||||||
#define YG_MAX_CACHED_RESULT_COUNT 16
|
|
||||||
|
|
||||||
struct YGConfig {
|
|
||||||
bool experimentalFeatures[YGExperimentalFeatureCount + 1];
|
|
||||||
bool useWebDefaults;
|
|
||||||
bool useLegacyStretchBehaviour;
|
|
||||||
bool shouldDiffLayoutWithoutLegacyStretchBehaviour;
|
|
||||||
float pointScaleFactor;
|
|
||||||
YGLogger logger;
|
|
||||||
YGNodeClonedFunc cloneNodeCallback;
|
|
||||||
void* context;
|
|
||||||
};
|
|
||||||
|
|
||||||
static const float kDefaultFlexGrow = 0.0f;
|
|
||||||
static const float kDefaultFlexShrink = 0.0f;
|
|
||||||
static const float kWebDefaultFlexShrink = 1.0f;
|
|
||||||
|
|
||||||
extern bool YGFloatsEqual(const float a, const float b);
|
|
||||||
extern bool YGValueEqual(const YGValue a, const YGValue b);
|
|
||||||
extern const YGValue* YGComputedEdgeValue(
|
|
||||||
const std::array<YGValue, YGEdgeCount>& edges,
|
|
||||||
const YGEdge edge,
|
|
||||||
const YGValue* const defaultValue);
|
|
@@ -3,6 +3,16 @@
|
|||||||
<div style="flex-grow: 1;"></div>
|
<div style="flex-grow: 1;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="flex_shrink_flex_grow_row" style="width: 500px; height: 500px; flex-direction: row;">
|
||||||
|
<div style="width: 500px; height: 100px; flex-grow: 0; flex-shrink: 1;"></div>
|
||||||
|
<div style="width: 500px; height: 100px; flex-grow: 0; flex-shrink: 1;"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="flex_shrink_flex_grow_child_flex_shrink_other_child" style="width: 500px; height: 500px; flex-direction: row;">
|
||||||
|
<div style="width: 500px; height: 100px; flex-grow: 0; flex-shrink: 1;"></div>
|
||||||
|
<div style="width: 500px; height: 100px; flex-grow: 1; flex-shrink: 1;"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="flex_basis_flex_grow_row" style="width: 100px; height: 100px; flex-direction: row;">
|
<div id="flex_basis_flex_grow_row" style="width: 100px; height: 100px; flex-direction: row;">
|
||||||
<div style="flex-basis: 50px; flex-grow: 1;"></div>
|
<div style="flex-basis: 50px; flex-grow: 1;"></div>
|
||||||
<div style="flex-grow: 1;"></div>
|
<div style="flex-grow: 1;"></div>
|
||||||
|
@@ -86,7 +86,7 @@
|
|||||||
<div style="height: 10px;"></div>
|
<div style="height: 10px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="justify_content_min_width_with_padding_child_width_greater_than_parent" style="width: 1000px; height: 1584px;">
|
<div id="justify_content_min_width_with_padding_child_width_greater_than_parent" style="width: 1000px; height: 1584px; align-content: stretch;">
|
||||||
<div style="flex-direction: row; align-content: stretch;">
|
<div style="flex-direction: row; align-content: stretch;">
|
||||||
<div style="flex-direction: row; justify-content: center; align-content: stretch; min-width: 400px; padding-left: 100px; padding-right: 100px;">
|
<div style="flex-direction: row; justify-content: center; align-content: stretch; min-width: 400px; padding-left: 100px; padding-right: 100px;">
|
||||||
<div style="height: 100px; width: 300px; align-content: stretch; flex-direction: row;"></div>
|
<div style="height: 100px; width: 300px; align-content: stretch; flex-direction: row;"></div>
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="justify_content_min_width_with_padding_child_width_greater_than_parent" style="width: 1080px; height: 1584px;">
|
<div id="justify_content_min_width_with_padding_child_width_lower_than_parent" style="width: 1080px; height: 1584px; align-content: stretch;">
|
||||||
<div style="flex-direction: row; align-content: stretch;">
|
<div style="flex-direction: row; align-content: stretch;">
|
||||||
<div style="flex-direction: row; justify-content: center; align-content: stretch; min-width: 400px; padding-left: 100px; padding-right: 100px;">
|
<div style="flex-direction: row; justify-content: center; align-content: stretch; min-width: 400px; padding-left: 100px; padding-right: 100px;">
|
||||||
<div style="height: 100px; width: 199px; align-content: stretch; flex-direction: row;"></div>
|
<div style="height: 100px; width: 199px; align-content: stretch; flex-direction: row;"></div>
|
||||||
|
@@ -42,13 +42,29 @@ JavaEmitter.prototype = Object.create(Emitter.prototype, {
|
|||||||
this.push([
|
this.push([
|
||||||
'package com.facebook.yoga;',
|
'package com.facebook.yoga;',
|
||||||
'',
|
'',
|
||||||
'import org.junit.Test;',
|
|
||||||
'',
|
|
||||||
'import static org.junit.Assert.assertEquals;',
|
'import static org.junit.Assert.assertEquals;',
|
||||||
'',
|
'',
|
||||||
|
'import org.junit.Test;',
|
||||||
|
'import org.junit.runner.RunWith;',
|
||||||
|
'import org.junit.runners.Parameterized;',
|
||||||
|
'',
|
||||||
|
'@RunWith(Parameterized.class)',
|
||||||
'public class YogaTest {',
|
'public class YogaTest {',
|
||||||
]);
|
]);
|
||||||
this.pushIndent();
|
this.pushIndent();
|
||||||
|
this.push([
|
||||||
|
'@Parameterized.Parameters(name = "{0}")',
|
||||||
|
'public static Iterable<TestParametrization.NodeFactory> nodeFactories() {',
|
||||||
|
]);
|
||||||
|
this.pushIndent();
|
||||||
|
this.push('return TestParametrization.nodeFactories();');
|
||||||
|
this.popIndent();
|
||||||
|
this.push('}');
|
||||||
|
this.push([
|
||||||
|
'',
|
||||||
|
'@Parameterized.Parameter public TestParametrization.NodeFactory mNodeFactory;',
|
||||||
|
'',
|
||||||
|
]);
|
||||||
}},
|
}},
|
||||||
|
|
||||||
emitTestPrologue:{value:function(name, experiments) {
|
emitTestPrologue:{value:function(name, experiments) {
|
||||||
@@ -64,7 +80,7 @@ JavaEmitter.prototype = Object.create(Emitter.prototype, {
|
|||||||
}},
|
}},
|
||||||
|
|
||||||
emitTestTreePrologue:{value:function(nodeName) {
|
emitTestTreePrologue:{value:function(nodeName) {
|
||||||
this.push('final YogaNode ' + nodeName + ' = new YogaNode(config);');
|
this.push('final YogaNode ' + nodeName + ' = createNode(config);');
|
||||||
}},
|
}},
|
||||||
|
|
||||||
emitTestEpilogue:{value:function(experiments) {
|
emitTestEpilogue:{value:function(experiments) {
|
||||||
@@ -76,6 +92,11 @@ JavaEmitter.prototype = Object.create(Emitter.prototype, {
|
|||||||
}},
|
}},
|
||||||
|
|
||||||
emitEpilogue:{value:function(lines) {
|
emitEpilogue:{value:function(lines) {
|
||||||
|
this.push('private YogaNode createNode(YogaConfig config) {');
|
||||||
|
this.pushIndent();
|
||||||
|
this.push('return mNodeFactory.create(config);');
|
||||||
|
this.popIndent();
|
||||||
|
this.push('}');
|
||||||
this.popIndent();
|
this.popIndent();
|
||||||
this.push([
|
this.push([
|
||||||
'}',
|
'}',
|
||||||
|
@@ -42,12 +42,11 @@ function assert(condition, message) {
|
|||||||
function printTest(e, LTRContainer, RTLContainer, genericContainer) {
|
function printTest(e, LTRContainer, RTLContainer, genericContainer) {
|
||||||
e.push([
|
e.push([
|
||||||
'/**',
|
'/**',
|
||||||
' * Copyright (c) 2014-present, Facebook, Inc.',
|
' * Copyright (c) Facebook, Inc. and its affiliates.',
|
||||||
' *',
|
' *',
|
||||||
' * This source code is licensed under the MIT license found in the',
|
' * This source code is licensed under the MIT license found in the LICENSE',
|
||||||
' * LICENSE file in the root directory of this source tree.',
|
' * file in the root directory of this source tree.',
|
||||||
' */',
|
' */',
|
||||||
'',
|
|
||||||
'// @Generated by gentest/gentest.rb from gentest/fixtures/' + document.title + '.html',
|
'// @Generated by gentest/gentest.rb from gentest/fixtures/' + document.title + '.html',
|
||||||
'',
|
'',
|
||||||
]);
|
]);
|
||||||
@@ -138,7 +137,7 @@ function checkDefaultValues() {
|
|||||||
{style:'bottom', value:'undefined'},
|
{style:'bottom', value:'undefined'},
|
||||||
{style:'display', value:'flex'},
|
{style:'display', value:'flex'},
|
||||||
].forEach(function(item) {
|
].forEach(function(item) {
|
||||||
assert(item.value === getDefaultStyleValue(item.style),
|
assert(isDefaultStyleValue(item.style, item.value),
|
||||||
item.style + ' should be ' + item.value);
|
item.style + ' should be ' + item.value);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -159,7 +158,7 @@ function setupTestTree(e, parent, node, genericNode, nodeName, parentName, index
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node.style[style] !== getDefaultStyleValue(style)) {
|
if (!isDefaultStyleValue(style, node.style[style])) {
|
||||||
switch (style) {
|
switch (style) {
|
||||||
case 'direction':
|
case 'direction':
|
||||||
e.YGNodeStyleSetDirection(nodeName, directionValue(e, node.style[style]));
|
e.YGNodeStyleSetDirection(nodeName, directionValue(e, node.style[style]));
|
||||||
@@ -400,21 +399,38 @@ function displayValue(e, value){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDefaultStyleValue(style) {
|
var DEFAULT_STYLES = new Map();
|
||||||
if (style == 'position') {
|
|
||||||
return 'relative';
|
function isDefaultStyleValue(style, value) {
|
||||||
}
|
let defaultStyle = DEFAULT_STYLES.get(style);
|
||||||
|
if (defaultStyle == null) {
|
||||||
switch (style) {
|
switch (style) {
|
||||||
|
case 'position':
|
||||||
|
defaultStyle = new Set(['relative']);;
|
||||||
|
break;
|
||||||
|
|
||||||
case 'left':
|
case 'left':
|
||||||
case 'top':
|
case 'top':
|
||||||
case 'right':
|
case 'right':
|
||||||
case 'bottom':
|
case 'bottom':
|
||||||
case 'start':
|
case 'start':
|
||||||
case 'end':
|
case 'end':
|
||||||
return 'undefined';
|
defaultStyle = new Set(['undefined']);
|
||||||
}
|
break;
|
||||||
|
|
||||||
|
case 'min-height':
|
||||||
|
case 'min-width':
|
||||||
|
defaultStyle = new Set(['0', '0px', 'auto']);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
var node = document.getElementById('default');
|
var node = document.getElementById('default');
|
||||||
return getComputedStyle(node, null).getPropertyValue(style);
|
defaultStyle = new Set([getComputedStyle(node, null)[style]]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
DEFAULT_STYLES.set(style, defaultStyle);
|
||||||
|
}
|
||||||
|
return DEFAULT_STYLES.get(style).has(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRoundedSize(node) {
|
function getRoundedSize(node) {
|
||||||
|
@@ -1,8 +1,15 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
#
|
||||||
|
# This source code is licensed under the MIT license found in the LICENSE
|
||||||
|
# file in the root directory of this source tree.
|
||||||
|
#
|
||||||
|
|
||||||
# Project-wide Gradle settings.
|
# Project-wide Gradle settings.
|
||||||
|
|
||||||
org.gradle.jvmargs=-Xmx1536M
|
org.gradle.jvmargs=-Xmx1536M
|
||||||
|
|
||||||
VERSION_NAME=1.10.0-SNAPSHOT
|
VERSION_NAME=1.14.0-SNAPSHOT
|
||||||
POM_URL=https://github.com/facebook/yoga
|
POM_URL=https://github.com/facebook/yoga
|
||||||
POM_SCM_URL=https://github.com/facebook/yoga.git
|
POM_SCM_URL=https://github.com/facebook/yoga.git
|
||||||
POM_SCM_CONNECTION=scm:git:https://github.com/facebook/yoga.git
|
POM_SCM_CONNECTION=scm:git:https://github.com/facebook/yoga.git
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip
|
||||||
|
84
gradlew.bat
vendored
Normal file
84
gradlew.bat
vendored
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
@if "%DEBUG%" == "" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS=
|
||||||
|
|
||||||
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
set JAVA_EXE=java.exe
|
||||||
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if "%ERRORLEVEL%" == "0" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:init
|
||||||
|
@rem Get command-line arguments, handling Windows variants
|
||||||
|
|
||||||
|
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||||
|
|
||||||
|
:win9xME_args
|
||||||
|
@rem Slurp the command line arguments.
|
||||||
|
set CMD_LINE_ARGS=
|
||||||
|
set _SKIP=2
|
||||||
|
|
||||||
|
:win9xME_args_slurp
|
||||||
|
if "x%~1" == "x" goto execute
|
||||||
|
|
||||||
|
set CMD_LINE_ARGS=%*
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
17
java/BUCK
17
java/BUCK
@@ -3,20 +3,26 @@
|
|||||||
# This source code is licensed under the MIT 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.
|
# LICENSE file in the root directory of this source tree.
|
||||||
|
|
||||||
load("//tools/build_defs/oss:yoga_defs.bzl", "ANDROID", "CXX_LIBRARY_WHITELIST", "FBJNI_JAVA_TARGET", "FBJNI_TARGET", "INFER_ANNOTATIONS_TARGET", "JNI_TARGET", "JSR_305_TARGET", "JUNIT_TARGET", "PROGRUARD_ANNOTATIONS_TARGET", "SOLOADER_TARGET", "yoga_cxx_library", "yoga_dep", "yoga_java_binary", "yoga_java_library", "yoga_java_test")
|
load("//tools/build_defs/oss:yoga_defs.bzl", "ANDROID", "CXX_LIBRARY_WHITELIST", "FBJNI_JAVA_TARGET", "FBJNI_TARGET", "INFER_ANNOTATIONS_TARGET", "JNI_TARGET", "JSR_305_TARGET", "JUNIT_TARGET", "PROGRUARD_ANNOTATIONS_TARGET", "SOLOADER_TARGET", "yoga_cxx_lib", "yoga_cxx_library", "yoga_dep", "yoga_java_binary", "yoga_java_library", "yoga_java_test")
|
||||||
|
|
||||||
|
CXX_LIBRARY_WHITELIST_FOR_TESTS = CXX_LIBRARY_WHITELIST + [
|
||||||
|
yoga_cxx_lib("testutil:jni"),
|
||||||
|
yoga_cxx_lib("testutil:testutil"),
|
||||||
|
]
|
||||||
|
|
||||||
yoga_cxx_library(
|
yoga_cxx_library(
|
||||||
name = "jni",
|
name = "jni",
|
||||||
srcs = glob(["jni/*.cpp"]),
|
srcs = glob(["jni/*.cpp"]),
|
||||||
headers = glob(["jni/*.h"]),
|
header_namespace = "yoga/java",
|
||||||
header_namespace = "",
|
exported_headers = glob(["jni/*.h"]),
|
||||||
|
allow_jni_merging = True,
|
||||||
compiler_flags = [
|
compiler_flags = [
|
||||||
"-fno-omit-frame-pointer",
|
"-fno-omit-frame-pointer",
|
||||||
"-fexceptions",
|
"-fexceptions",
|
||||||
"-fPIC",
|
"-fPIC",
|
||||||
"-Wall",
|
"-Wall",
|
||||||
"-Werror",
|
"-Werror",
|
||||||
"-O3",
|
"-Os",
|
||||||
"-std=c++11",
|
"-std=c++11",
|
||||||
],
|
],
|
||||||
platforms = ANDROID,
|
platforms = ANDROID,
|
||||||
@@ -54,11 +60,12 @@ yoga_java_library(
|
|||||||
yoga_java_test(
|
yoga_java_test(
|
||||||
name = "tests",
|
name = "tests",
|
||||||
srcs = glob(["tests/**/*.java"]),
|
srcs = glob(["tests/**/*.java"]),
|
||||||
cxx_library_whitelist = CXX_LIBRARY_WHITELIST,
|
cxx_library_whitelist = CXX_LIBRARY_WHITELIST_FOR_TESTS,
|
||||||
use_cxx_libraries = True,
|
use_cxx_libraries = True,
|
||||||
visibility = ["PUBLIC"],
|
visibility = ["PUBLIC"],
|
||||||
deps = [
|
deps = [
|
||||||
":java",
|
":java",
|
||||||
|
yoga_dep("testutil:java"),
|
||||||
JUNIT_TARGET,
|
JUNIT_TARGET,
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
@@ -29,7 +29,7 @@ add_compile_options(
|
|||||||
-Wall
|
-Wall
|
||||||
-std=c++11)
|
-std=c++11)
|
||||||
|
|
||||||
add_library(yoga SHARED jni/YGJNI.cpp)
|
add_library(yoga SHARED jni/YGJNI.cpp jni/YGJTypes.cpp)
|
||||||
|
|
||||||
target_include_directories(yoga PRIVATE
|
target_include_directories(yoga PRIVATE
|
||||||
${libfb_DIR}/include
|
${libfb_DIR}/include
|
||||||
|
@@ -1,3 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
apply plugin: 'com.jfrog.bintray'
|
apply plugin: 'com.jfrog.bintray'
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'com.github.dcendents.android-maven'
|
apply plugin: 'com.github.dcendents.android-maven'
|
||||||
@@ -28,6 +35,7 @@ android {
|
|||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
path 'CMakeLists.txt'
|
path 'CMakeLists.txt'
|
||||||
|
version '3.6.0-rc2'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the LICENSE
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
package com.facebook.yoga;
|
package com.facebook.yoga;
|
||||||
|
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the LICENSE
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
package com.facebook.yoga;
|
package com.facebook.yoga;
|
||||||
|
|
||||||
|
@@ -1,82 +1,63 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the LICENSE
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
package com.facebook.yoga;
|
package com.facebook.yoga;
|
||||||
|
|
||||||
import com.facebook.proguard.annotations.DoNotStrip;
|
|
||||||
import com.facebook.soloader.SoLoader;
|
import com.facebook.soloader.SoLoader;
|
||||||
|
|
||||||
@DoNotStrip
|
|
||||||
public class YogaConfig {
|
public class YogaConfig {
|
||||||
|
|
||||||
public static int SPACING_TYPE = 1;
|
public static int SPACING_TYPE = 1;
|
||||||
|
public static boolean useBatchingForLayoutOutputs = false;
|
||||||
static {
|
|
||||||
YogaJNI.init();
|
|
||||||
}
|
|
||||||
|
|
||||||
long mNativePointer;
|
long mNativePointer;
|
||||||
private YogaLogger mLogger;
|
private YogaLogger mLogger;
|
||||||
private YogaNodeCloneFunction mYogaNodeCloneFunction;
|
private YogaNodeCloneFunction mYogaNodeCloneFunction;
|
||||||
|
|
||||||
private native long jni_YGConfigNew();
|
|
||||||
public YogaConfig() {
|
public YogaConfig() {
|
||||||
mNativePointer = jni_YGConfigNew();
|
mNativePointer = YogaNative.jni_YGConfigNew();
|
||||||
if (mNativePointer == 0) {
|
if (mNativePointer == 0) {
|
||||||
throw new IllegalStateException("Failed to allocate native memory");
|
throw new IllegalStateException("Failed to allocate native memory");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGConfigFree(long nativePointer);
|
|
||||||
@Override
|
@Override
|
||||||
protected void finalize() throws Throwable {
|
protected void finalize() throws Throwable {
|
||||||
try {
|
try {
|
||||||
jni_YGConfigFree(mNativePointer);
|
YogaNative.jni_YGConfigFree(mNativePointer);
|
||||||
} finally {
|
} finally {
|
||||||
super.finalize();
|
super.finalize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGConfigSetExperimentalFeatureEnabled(
|
|
||||||
long nativePointer,
|
|
||||||
int feature,
|
|
||||||
boolean enabled);
|
|
||||||
public void setExperimentalFeatureEnabled(YogaExperimentalFeature feature, boolean enabled) {
|
public void setExperimentalFeatureEnabled(YogaExperimentalFeature feature, boolean enabled) {
|
||||||
jni_YGConfigSetExperimentalFeatureEnabled(mNativePointer, feature.intValue(), enabled);
|
YogaNative.jni_YGConfigSetExperimentalFeatureEnabled(mNativePointer, feature.intValue(), enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGConfigSetUseWebDefaults(long nativePointer, boolean useWebDefaults);
|
|
||||||
public void setUseWebDefaults(boolean useWebDefaults) {
|
public void setUseWebDefaults(boolean useWebDefaults) {
|
||||||
jni_YGConfigSetUseWebDefaults(mNativePointer, useWebDefaults);
|
YogaNative.jni_YGConfigSetUseWebDefaults(mNativePointer, useWebDefaults);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGConfigSetPrintTreeFlag(long nativePointer, boolean enable);
|
|
||||||
public void setPrintTreeFlag(boolean enable) {
|
public void setPrintTreeFlag(boolean enable) {
|
||||||
jni_YGConfigSetPrintTreeFlag(mNativePointer, enable);
|
YogaNative.jni_YGConfigSetPrintTreeFlag(mNativePointer, enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGConfigSetPointScaleFactor(long nativePointer, float pixelsInPoint);
|
|
||||||
public void setPointScaleFactor(float pixelsInPoint) {
|
public void setPointScaleFactor(float pixelsInPoint) {
|
||||||
jni_YGConfigSetPointScaleFactor(mNativePointer, pixelsInPoint);
|
YogaNative.jni_YGConfigSetPointScaleFactor(mNativePointer, pixelsInPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGConfigSetUseLegacyStretchBehaviour(long nativePointer, boolean useLegacyStretchBehaviour);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Yoga previously had an error where containers would take the maximum space possible instead of the minimum
|
* Yoga previously had an error where containers would take the maximum space possible instead of the minimum
|
||||||
* like they are supposed to. In practice this resulted in implicit behaviour similar to align-self: stretch;
|
* like they are supposed to. In practice this resulted in implicit behaviour similar to align-self: stretch;
|
||||||
* Because this was such a long-standing bug we must allow legacy users to switch back to this behaviour.
|
* Because this was such a long-standing bug we must allow legacy users to switch back to this behaviour.
|
||||||
*/
|
*/
|
||||||
public void setUseLegacyStretchBehaviour(boolean useLegacyStretchBehaviour) {
|
public void setUseLegacyStretchBehaviour(boolean useLegacyStretchBehaviour) {
|
||||||
jni_YGConfigSetUseLegacyStretchBehaviour(mNativePointer, useLegacyStretchBehaviour);
|
YogaNative.jni_YGConfigSetUseLegacyStretchBehaviour(mNativePointer, useLegacyStretchBehaviour);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGConfigSetShouldDiffLayoutWithoutLegacyStretchBehaviour(
|
|
||||||
long nativePointer, boolean shouldDiffLayoutWithoutLegacyStretchBehaviour);
|
|
||||||
/**
|
/**
|
||||||
* If this flag is set then yoga would diff the layout without legacy flag and would set a bool in
|
* If this flag is set then yoga would diff the layout without legacy flag and would set a bool in
|
||||||
* YogaNode(mDoesLegacyStretchFlagAffectsLayout) with true if the layouts were different and false
|
* YogaNode(mDoesLegacyStretchFlagAffectsLayout) with true if the layouts were different and false
|
||||||
@@ -84,29 +65,16 @@ public class YogaConfig {
|
|||||||
*/
|
*/
|
||||||
public void setShouldDiffLayoutWithoutLegacyStretchBehaviour(
|
public void setShouldDiffLayoutWithoutLegacyStretchBehaviour(
|
||||||
boolean shouldDiffLayoutWithoutLegacyStretchBehaviour) {
|
boolean shouldDiffLayoutWithoutLegacyStretchBehaviour) {
|
||||||
jni_YGConfigSetShouldDiffLayoutWithoutLegacyStretchBehaviour(
|
YogaNative.jni_YGConfigSetShouldDiffLayoutWithoutLegacyStretchBehaviour(
|
||||||
mNativePointer, shouldDiffLayoutWithoutLegacyStretchBehaviour);
|
mNativePointer, shouldDiffLayoutWithoutLegacyStretchBehaviour);
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGConfigSetLogger(long nativePointer, Object logger);
|
|
||||||
public void setLogger(YogaLogger logger) {
|
public void setLogger(YogaLogger logger) {
|
||||||
mLogger = logger;
|
mLogger = logger;
|
||||||
jni_YGConfigSetLogger(mNativePointer, logger);
|
YogaNative.jni_YGConfigSetLogger(mNativePointer, logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
public YogaLogger getLogger() {
|
public YogaLogger getLogger() {
|
||||||
return mLogger;
|
return mLogger;
|
||||||
}
|
}
|
||||||
|
|
||||||
private native void jni_YGConfigSetHasCloneNodeFunc(long nativePointer, boolean hasClonedFunc);
|
|
||||||
|
|
||||||
public void setOnCloneNode(YogaNodeCloneFunction cloneYogaNodeFunction) {
|
|
||||||
mYogaNodeCloneFunction = cloneYogaNodeFunction;
|
|
||||||
jni_YGConfigSetHasCloneNodeFunc(mNativePointer, cloneYogaNodeFunction != null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@DoNotStrip
|
|
||||||
private final YogaNode cloneNode(YogaNode oldNode, YogaNode parent, int childIndex) {
|
|
||||||
return mYogaNodeCloneFunction.cloneNode(oldNode, parent, childIndex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -1,38 +1,24 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the LICENSE
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
package com.facebook.yoga;
|
package com.facebook.yoga;
|
||||||
|
|
||||||
public class YogaConstants {
|
public class YogaConstants {
|
||||||
|
|
||||||
/**
|
public static final float UNDEFINED = Float.NaN;
|
||||||
* Large positive number signifies that the property(float) is undefined. Earlier we used to have
|
|
||||||
* YGundefined as NAN, but the downside of this is that we can't use -ffast-math compiler flag as
|
|
||||||
* it assumes all floating-point calculation involve and result into finite numbers. For more
|
|
||||||
* information regarding -ffast-math compiler flag in clang, have a look at
|
|
||||||
* https://clang.llvm.org/docs/UsersManual.html#cmdoption-ffast-math
|
|
||||||
*/
|
|
||||||
public static final float UNDEFINED = (float) (10E20);
|
|
||||||
|
|
||||||
public static boolean isUndefined(float value) {
|
public static boolean isUndefined(float value) {
|
||||||
// Value of a float in the case of it being not defined is 10.1E20. Earlier it used to be NAN,
|
return Float.compare(value, UNDEFINED) == 0;
|
||||||
// the benefit of which
|
|
||||||
// was that if NAN is involved in any mathematical expression the result was NAN. But since we
|
|
||||||
// want to have `-ffast-math`
|
|
||||||
// flag being used by compiler which assumes that the floating point values are not NAN and Inf,
|
|
||||||
// we represent YGUndefined as 10.1E20.
|
|
||||||
// But now if YGUndefined is involved in any mathematical operations this value(10.1E20) would
|
|
||||||
// change.
|
|
||||||
// So the following check makes sure that if the value is outside a range (-10E8, 10E8) then it
|
|
||||||
// is undefined.
|
|
||||||
return (Float.compare(value, (float) 10E8) >= 0 || Float.compare(value, (float) -10E8) <= 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isUndefined(YogaValue value) {
|
public static boolean isUndefined(YogaValue value) {
|
||||||
return value.unit == YogaUnit.UNDEFINED;
|
return value.unit == YogaUnit.UNDEFINED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static float getUndefined() {
|
||||||
|
return UNDEFINED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the LICENSE
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
package com.facebook.yoga;
|
package com.facebook.yoga;
|
||||||
|
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the LICENSE
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
package com.facebook.yoga;
|
package com.facebook.yoga;
|
||||||
|
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the LICENSE
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
package com.facebook.yoga;
|
package com.facebook.yoga;
|
||||||
|
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the LICENSE
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
package com.facebook.yoga;
|
package com.facebook.yoga;
|
||||||
|
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the LICENSE
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
package com.facebook.yoga;
|
package com.facebook.yoga;
|
||||||
|
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the LICENSE
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
package com.facebook.yoga;
|
package com.facebook.yoga;
|
||||||
|
|
||||||
|
@@ -1,30 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the LICENSE
|
|
||||||
* file in the root directory of this source tree.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package com.facebook.yoga;
|
|
||||||
|
|
||||||
import com.facebook.soloader.SoLoader;
|
|
||||||
|
|
||||||
public class YogaJNI {
|
|
||||||
|
|
||||||
// Known constants. 1-3 used in previous experiments. Do not reuse.
|
|
||||||
public static int JNI_FAST_CALLS = 4;
|
|
||||||
|
|
||||||
// set before loading any other Yoga code
|
|
||||||
public static boolean useFastCall = false;
|
|
||||||
|
|
||||||
private static native void jni_bindNativeMethods(boolean useFastCall);
|
|
||||||
|
|
||||||
static boolean init() {
|
|
||||||
if (SoLoader.loadLibrary("yoga")) {
|
|
||||||
jni_bindNativeMethods(useFastCall);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,9 +1,8 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the LICENSE
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
package com.facebook.yoga;
|
package com.facebook.yoga;
|
||||||
|
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the LICENSE
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
package com.facebook.yoga;
|
package com.facebook.yoga;
|
||||||
|
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the LICENSE
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
package com.facebook.yoga;
|
package com.facebook.yoga;
|
||||||
|
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
/*
|
/**
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the LICENSE
|
* This source code is licensed under the MIT license found in the LICENSE
|
||||||
* file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
package com.facebook.yoga;
|
package com.facebook.yoga;
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user