From c51d7d82a669741fb9befe21c60ce20a874025f9 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 19 Oct 2023 04:59:10 -0700 Subject: [PATCH 01/18] Consolidate JavaScript Flavors Fixes https://github.com/facebook/yoga/issues/1417 This dramatically simplifies the matrix of Node vs web, ASM vs WASM, sync vs async compilation, or CommonJS vs ES Modules. We have one variant, using without, with ESModule top-level await to do async compilation. Web/node share the same binary, and we base64 encode the WASM into a wrapper JS file for compatibility with Node and bundlers. After this change we target: This has some downsides, like requiring an environment with top level await, but also has upsides, like a consistent, sync looking API compatible with older Yoga, and mitigating TypeScript issues with package exports and typings resolution. ## Test Plan 1. `yarn test` 2. `yarn lint` 3. `yarn tsc` 4. `yarn build` website-next 5. Locally test website 5. Examine package artifact created by GitHub --- .eslintrc.js | 17 +- gentest/gentest-javascript.js | 2 +- javascript/CMakeLists.txt | 76 +-- javascript/README.md | 31 +- javascript/babel.config.cjs | 22 + javascript/{.babelrc.js => jest.config.js} | 11 +- javascript/jest.config.ts | 27 - javascript/{jest.setup.ts => jest.setup.js} | 5 - .../{just.config.ts => just.config.cjs} | 63 +- javascript/package.json | 51 +- javascript/src/entrypoint/asmjs-async-node.ts | 26 - javascript/src/entrypoint/asmjs-async-web.ts | 26 - javascript/src/entrypoint/asmjs-sync-web.ts | 23 - javascript/src/entrypoint/wasm-async-node.ts | 26 - javascript/src/entrypoint/wasm-async-web.ts | 26 - javascript/src/entrypoint/wasm-sync-node.ts | 23 - javascript/src/entrypoint/wasm-sync-web.ts | 23 - .../asmjs-sync-node.ts => index.ts} | 12 +- javascript/src/wrapAssembly.js | 3 +- .../tests/Benchmarks/YGBenchmark.test.ts | 6 +- javascript/tests/YGAlignBaselineTest.test.ts | 2 +- javascript/tests/YGComputedBorderTest.test.ts | 2 +- javascript/tests/YGComputedMarginTest.test.ts | 2 +- .../tests/YGComputedPaddingTest.test.ts | 2 +- javascript/tests/YGDirtiedTest.test.ts | 2 +- javascript/tests/YGErrataTest.test.ts | 2 +- javascript/tests/YGFlexBasisAuto.test.ts | 2 +- javascript/tests/YGMeasureCacheTest.test.ts | 4 +- javascript/tests/YGMeasureTest.test.ts | 4 +- javascript/tests/bin/run-bench.ts | 12 +- .../generated/YGAbsolutePositionTest.test.ts | 2 +- .../generated/YGAlignContentTest.test.ts | 2 +- .../tests/generated/YGAlignItemsTest.test.ts | 2 +- .../tests/generated/YGAlignSelfTest.test.ts | 2 +- .../tests/generated/YGAndroidNewsFeed.test.ts | 2 +- .../tests/generated/YGAspectRatioTest.test.ts | 2 +- .../tests/generated/YGBorderTest.test.ts | 2 +- .../tests/generated/YGDimensionTest.test.ts | 2 +- .../tests/generated/YGDisplayTest.test.ts | 2 +- .../generated/YGFlexDirectionTest.test.ts | 2 +- javascript/tests/generated/YGFlexTest.test.ts | 2 +- .../tests/generated/YGFlexWrapTest.test.ts | 2 +- javascript/tests/generated/YGGapTest.test.ts | 2 +- .../generated/YGJustifyContentTest.test.ts | 2 +- .../tests/generated/YGMarginTest.test.ts | 2 +- .../generated/YGMinMaxDimensionTest.test.ts | 2 +- .../tests/generated/YGPaddingTest.test.ts | 2 +- .../tests/generated/YGPercentageTest.test.ts | 2 +- .../tests/generated/YGRoundingTest.test.ts | 2 +- .../generated/YGSizeOverflowTest.test.ts | 2 +- javascript/tests/tools/MeasureCounter.ts | 2 +- javascript/tests/tools/globals.ts | 10 +- javascript/tsconfig.json | 8 +- package.json | 3 +- .../{babel.config.js => babel.config.cjs} | 0 ...saurus.config.js => docusaurus.config.cjs} | 2 +- website-next/{sidebars.js => sidebars.cjs} | 0 .../src/components/Playground/Editor.tsx | 2 +- .../components/Playground/LayoutRecord.tsx | 23 +- .../components/Playground/YogaEnumSelect.tsx | 2 +- .../src/components/Playground/YogaNode.tsx | 4 +- .../src/components/Playground/index.tsx | 2 +- website-next/src/pages/index.tsx | 13 +- website-next/tsconfig.json | 6 +- yarn.lock | 570 +----------------- 65 files changed, 188 insertions(+), 1032 deletions(-) create mode 100644 javascript/babel.config.cjs rename javascript/{.babelrc.js => jest.config.js} (58%) delete mode 100644 javascript/jest.config.ts rename javascript/{jest.setup.ts => jest.setup.js} (67%) rename javascript/{just.config.ts => just.config.cjs} (66%) delete mode 100644 javascript/src/entrypoint/asmjs-async-node.ts delete mode 100644 javascript/src/entrypoint/asmjs-async-web.ts delete mode 100644 javascript/src/entrypoint/asmjs-sync-web.ts delete mode 100644 javascript/src/entrypoint/wasm-async-node.ts delete mode 100644 javascript/src/entrypoint/wasm-async-web.ts delete mode 100644 javascript/src/entrypoint/wasm-sync-node.ts delete mode 100644 javascript/src/entrypoint/wasm-sync-web.ts rename javascript/src/{entrypoint/asmjs-sync-node.ts => index.ts} (55%) rename website-next/{babel.config.js => babel.config.cjs} (100%) rename website-next/{docusaurus.config.js => docusaurus.config.cjs} (98%) rename website-next/{sidebars.js => sidebars.cjs} (100%) diff --git a/.eslintrc.js b/.eslintrc.js index 1f2a76ab..0da671fa 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -27,8 +27,7 @@ module.exports = { 'require-await': 'error', }, env: { - commonjs: true, - es2018: true, + es2020: true, }, parserOptions: { sourceType: 'module', @@ -36,7 +35,7 @@ module.exports = { }, overrides: [ { - files: ['**/*.ts', '**/*.tsx'], + files: ['**/*.ts', '**/*.cts', '**/*.mts'], extends: ['plugin:@typescript-eslint/recommended'], parser: '@typescript-eslint/parser', parserOptions: { @@ -59,18 +58,8 @@ module.exports = { }, }, { - files: ['jest.*', '**/tests/**'], - env: { - node: true, - }, + files: ['**/tests/**'], extends: ['plugin:jest/recommended'], - globals: { - getMeasureCounter: 'writable', - getMeasureCounterMax: 'writable', - getMeasureCounterMin: 'writable', - Yoga: 'writable', - YGBENCHMARK: 'writable', - }, }, ], }; diff --git a/gentest/gentest-javascript.js b/gentest/gentest-javascript.js index 69ebee84..d9e3e167 100644 --- a/gentest/gentest-javascript.js +++ b/gentest/gentest-javascript.js @@ -23,7 +23,7 @@ JavascriptEmitter.prototype = Object.create(Emitter.prototype, { emitPrologue: { value: function () { - this.push('import {Yoga} from "../tools/globals";'); + this.push("import Yoga from 'yoga-layout';"); this.push('import {'); this.pushIndent(); this.push('Align,'); diff --git a/javascript/CMakeLists.txt b/javascript/CMakeLists.txt index 44cbfceb..4eb4e67a 100644 --- a/javascript/CMakeLists.txt +++ b/javascript/CMakeLists.txt @@ -31,9 +31,9 @@ add_compile_options(${COMPILE_OPTIONS}) add_link_options( ${COMPILE_OPTIONS} - --closure 1 - --memory-init-file 0 - --no-entry + "SHELL:--closure 1" + "SHELL:--memory-init-file 0" + "SHELL:--no-entry" "SHELL:-s ALLOW_MEMORY_GROWTH=1" "SHELL:-s ASSERTIONS=0" "SHELL:-s DYNAMIC_EXECUTION=0" @@ -42,8 +42,9 @@ add_link_options( "SHELL:-s FILESYSTEM=0" "SHELL:-s MALLOC='emmalloc'" "SHELL:-s MODULARIZE=1" - "SHELL:-s TEXTDECODER=0" - "SHELL:-s SINGLE_FILE=1") + "SHELL:-s EXPORT_ES6=1" + "SHELL:-s WASM=1" + "SHELL:-s TEXTDECODER=0") link_libraries(embind) @@ -51,62 +52,9 @@ add_library(yogaObjLib OBJECT ${SOURCES}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/binaries) -add_executable(asmjs-sync-node $) -target_link_options(asmjs-sync-node PUBLIC - "SHELL:-s ENVIRONMENT='node'" - "SHELL:-s WASM=0" - "SHELL:-s WASM_ASYNC_COMPILATION=0") - -add_executable(asmjs-async-node $) -target_link_options(asmjs-async-node PUBLIC - "SHELL:-s ENVIRONMENT='node'" - "SHELL:-s WASM=0" - "SHELL:-s WASM_ASYNC_COMPILATION=1") - -add_executable(asmjs-sync-web $) -target_link_options(asmjs-sync-web PUBLIC - "SHELL:-s ENVIRONMENT='web'" - "SHELL:-s WASM=0" - "SHELL:-s WASM_ASYNC_COMPILATION=0") - -add_executable(asmjs-async-web $) -target_link_options(asmjs-async-web PUBLIC - "SHELL:-s ENVIRONMENT='web'" - "SHELL:-s WASM=0" - "SHELL:-s WASM_ASYNC_COMPILATION=1") - -add_executable(asmjs-sync $) -target_link_options(asmjs-sync PUBLIC - "SHELL:-s ENVIRONMENT='web,node'" - "SHELL:-s WASM=0" - "SHELL:-s WASM_ASYNC_COMPILATION=0") - -add_executable(asmjs-async $) -target_link_options(asmjs-async PUBLIC - "SHELL:-s ENVIRONMENT='web,node'" - "SHELL:-s WASM=0" - "SHELL:-s WASM_ASYNC_COMPILATION=1") - -add_executable(wasm-sync-node $) -target_link_options(wasm-sync-node PUBLIC - "SHELL:-s ENVIRONMENT='node'" - "SHELL:-s WASM=1" - "SHELL:-s WASM_ASYNC_COMPILATION=0") - -add_executable(wasm-async-node $) -target_link_options(wasm-async-node PUBLIC - "SHELL:-s ENVIRONMENT='node'" - "SHELL:-s WASM=1" - "SHELL:-s WASM_ASYNC_COMPILATION=1") - -add_executable(wasm-sync-web $) -target_link_options(wasm-sync-web PUBLIC - "SHELL:-s ENVIRONMENT='web'" - "SHELL:-s WASM=1" - "SHELL:-s WASM_ASYNC_COMPILATION=0") - -add_executable(wasm-async-web $) -target_link_options(wasm-async-web PUBLIC - "SHELL:-s ENVIRONMENT='web'" - "SHELL:-s WASM=1" - "SHELL:-s WASM_ASYNC_COMPILATION=1") +add_executable(web $) +target_link_options(web PRIVATE + # SINGLE_FILE=1 combined with ENVIRONMENT='web' creates code that works on + # both bundlders and Node. + "SHELL:-s SINGLE_FILE=1" + "SHELL:-s ENVIRONMENT='web'") diff --git a/javascript/README.md b/javascript/README.md index f8cd930a..1f95e910 100644 --- a/javascript/README.md +++ b/javascript/README.md @@ -1,24 +1,11 @@ # yoga-layout -This package provides prebuilt JavaScript bindings for the Yoga layout engine. Both WebAssembly and asm.js variants are packaged, with the optimal loaded based on platform. +This package provides prebuilt WebAssembly bindings for the Yoga layout engine. ## Usage -The default entrypoint provides an asynchronous loader function to return a Yoga instance. - ```ts -import {loadYoga, Align} from 'yoga-layout'; - -const Yoga = await loadYoga(); - -const node = Yoga.Node.create(); -node.setAlignContent(Align.Center); -``` - -An alternative synchronous API is provided for compatibility, but requires using asm.js in browsers instead of WebAssembly, leading to worse performance and larger assets. - -```ts -import Yoga, {Align} from 'yoga-layout/sync'; +import {Yoga, Align} from 'yoga-layout'; const node = Yoga.Node.create(); node.setAlignContent(Align.Center); @@ -37,20 +24,14 @@ node.freeRecursive(); node.free(); ``` -## Selecting WebAssembly or asm.js - -For better performance and smaller packages, WebAssembly is preferred to asm.js where available. `yoga-layout` tries to provide the right default using [export maps](https://webpack.js.org/guides/package-exports/#conditional-syntax) so that platforms which can take advantage of WebAssembly use it by default. - -Different entrypoints are exposed to choose a flavor explicitly. - -```ts -import {loadYoga} from 'yoga-layout/wasm-async'; -``` - ## Using TypeScript This package provides out-of-the-box TypeScript typings so long as `tsc` is configured to support ESM resolution. It is recommended to set `moduleResolution: 'bundler'` or `moduleResolution: node16` in your `tsconfig.json` according to your environment. +## ES Modules + +`yoga-layout` is only provided as an ES Module, relying on top-level await. This allows providing a synchronous API, while still allowing async WebAssembly compilation in browsers, and will allow eventual usage of ESM/WASM interop. + ## Contributing ### Requirements diff --git a/javascript/babel.config.cjs b/javascript/babel.config.cjs new file mode 100644 index 00000000..62bbd880 --- /dev/null +++ b/javascript/babel.config.cjs @@ -0,0 +1,22 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +module.exports = { + presets: [ + ['@babel/preset-env', { + targets: "> 5%, maintained node versions", + + // Preserve ES Modules + modules: false, + }], + ['@babel/preset-typescript', { + "rewriteImportExtensions": true + }], + ], +}; diff --git a/javascript/.babelrc.js b/javascript/jest.config.js similarity index 58% rename from javascript/.babelrc.js rename to javascript/jest.config.js index c46c034b..6d697687 100644 --- a/javascript/.babelrc.js +++ b/javascript/jest.config.js @@ -7,9 +7,10 @@ * @format */ -module.exports = { - presets: [ - ['@babel/preset-env', {targets: 'defaults'}], - '@babel/preset-typescript', - ], +const config = { + setupFiles: ['./jest.setup.js'], + testRegex: '/tests/.*\\.test\\.ts$', + extensionsToTreatAsEsm: ['.ts'], }; + +export default config; diff --git a/javascript/jest.config.ts b/javascript/jest.config.ts deleted file mode 100644 index 477f6646..00000000 --- a/javascript/jest.config.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import type {Config} from 'jest'; - -const config: Config = { - setupFiles: ['./jest.setup.ts'], - testRegex: '/tests/.*\\.test\\.[jt]s$', - moduleNameMapper: { - 'yoga-layout': - process.env['SYNC'] === '1' && process.env['WASM'] === '1' - ? 'yoga-layout/wasm-sync' - : process.env['SYNC'] === '1' - ? 'yoga-layout/asmjs-sync' - : process.env['WASM'] === '1' - ? 'yoga-layout/wasm-async' - : 'yoga-layout/asmjs-async', - }, -}; - -export default config; diff --git a/javascript/jest.setup.ts b/javascript/jest.setup.js similarity index 67% rename from javascript/jest.setup.ts rename to javascript/jest.setup.js index 705024ce..df291cb2 100644 --- a/javascript/jest.setup.ts +++ b/javascript/jest.setup.js @@ -7,11 +7,6 @@ * @format */ -module.exports = async () => { - const {loadYoga, default: Yoga} = require('yoga-layout'); - globalThis.Yoga = Yoga ?? (await loadYoga()); -}; - Object.defineProperty(globalThis, 'YGBENCHMARK', { get: () => globalThis.test, }); diff --git a/javascript/just.config.ts b/javascript/just.config.cjs similarity index 66% rename from javascript/just.config.ts rename to javascript/just.config.cjs index 68d8421f..11505079 100644 --- a/javascript/just.config.ts +++ b/javascript/just.config.cjs @@ -7,7 +7,7 @@ * @format */ -import { +const { argv, cleanTask, logger, @@ -18,13 +18,13 @@ import { spawn, task, tscTask, -} from 'just-scripts'; +} = require('just-scripts'); -import {readFile, writeFile} from 'fs/promises'; +const {readFile, writeFile} = require('fs/promises'); -import glob from 'glob'; -import path from 'path'; -import which from 'which'; +const glob = require('glob'); +const path = require('path'); +const which = require('which'); const node = process.execPath; @@ -32,11 +32,15 @@ option('fix'); task('clean', cleanTask({paths: ['build', 'dist']})); -function defineFlavor(flavor: string, env: NodeJS.ProcessEnv) { +function defineFlavor(flavor, env) { task(`cmake-build:${flavor}`, cmakeBuildTask({targets: [flavor]})); task( `jest:${flavor}`, - jestTask({config: path.join(__dirname, 'jest.config.ts'), env}), + jestTask({ + config: path.join(__dirname, 'jest.config.js'), + nodeArgs: ['--experimental-vm-modules'], + env + }), ); task( `test:${flavor}`, @@ -44,14 +48,7 @@ function defineFlavor(flavor: string, env: NodeJS.ProcessEnv) { ); } -defineFlavor('asmjs-async-node', {WASM: '0', SYNC: '0'}); -defineFlavor('asmjs-sync-node', {WASM: '0', SYNC: '1'}); -defineFlavor('asmjs-async-web', {WASM: '0', SYNC: '0'}); -defineFlavor('asmjs-sync-web', {WASM: '0', SYNC: '1'}); -defineFlavor('wasm-async-node', {WASM: '1', SYNC: '0'}); -defineFlavor('wasm-sync-node', {WASM: '1', SYNC: '1'}); -defineFlavor('wasm-async-web', {WASM: '1', SYNC: '0'}); -defineFlavor('wasm-sync-web', {WASM: '1', SYNC: '1'}); +defineFlavor('web'); task('build', series(emcmakeGenerateTask(), cmakeBuildTask())); @@ -59,10 +56,8 @@ task( 'test', series( emcmakeGenerateTask(), - series('cmake-build:asmjs-async-node', 'jest:asmjs-async-node'), - series('cmake-build:asmjs-sync-node', 'jest:asmjs-sync-node'), - series('cmake-build:wasm-async-node', 'jest:wasm-async-node'), - series('cmake-build:wasm-sync-node', 'jest:wasm-sync-node'), + 'cmake-build:web', + 'jest:web', ), ); @@ -70,7 +65,7 @@ task( 'benchmark', series( emcmakeGenerateTask(), - cmakeBuildTask({targets: ['asmjs-sync-node', 'wasm-sync-node']}), + cmakeBuildTask({targets: ['node']}), runBenchTask(), ), ); @@ -96,20 +91,20 @@ task( ); function recursiveReplace( - obj: Record, - pattern: RegExp, - replacement: string, + obj, + pattern, + replacement, ) { for (const [key, value] of Object.entries(obj)) { if (typeof value === 'string') { obj[key] = value.replace(pattern, replacement); } else if (typeof value === 'object' && value != null) { - recursiveReplace(value as Record, pattern, replacement); + recursiveReplace(value, pattern, replacement); } } } -function babelTransformTask(opts: {dir: string}) { +function babelTransformTask(opts) { return () => { const args = [ opts.dir, @@ -117,7 +112,7 @@ function babelTransformTask(opts: {dir: string}) { '--out-dir', opts.dir, '--extensions', - '.js,.ts', + '.js,.cjs,.mjs,.ts,.cts,.mts', ]; logger.info(`Transforming "${path.resolve(opts.dir)}"`); @@ -132,19 +127,15 @@ function runBenchTask() { const files = glob.sync('./tests/Benchmarks/**/*'); const args = [ - '--extensions', - '.js,.ts', - '--config-file', - path.join(__dirname, '.babelrc.js'), - '--', + '--loader=babel-register-esm', './tests/bin/run-bench.ts', ...files, ]; - logger.info(['babel-node', ...args].join(' ')); + logger.info(['node', ...args].join(' ')); return spawn( node, - [require.resolve('@babel/node/bin/babel-node'), ...args], + args, { stdio: 'inherit', }, @@ -170,7 +161,7 @@ function emcmakeGenerateTask() { }; } -function cmakeBuildTask(opts?: {targets?: ReadonlyArray}) { +function cmakeBuildTask(opts) { return () => { const cmake = which.sync('cmake'); const args = [ @@ -184,7 +175,7 @@ function cmakeBuildTask(opts?: {targets?: ReadonlyArray}) { }; } -function clangFormatTask(opts?: {fix?: boolean}) { +function clangFormatTask(opts) { return () => { const args = [ ...(opts?.fix ? ['-i'] : ['--dry-run', '--Werror']), diff --git a/javascript/package.json b/javascript/package.json index 2e9a2b48..59787789 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -9,69 +9,38 @@ "type": "git", "url": "git@github.com:facebook/yoga.git" }, - "exports": { - ".": { - "browser": "./src/entrypoint/wasm-async-web.ts", - "node": "./src/entrypoint/wasm-async-node.ts", - "default": "./src/entrypoint/asmjs-async-web.ts" - }, - "./sync": { - "browser": "./src/entrypoint/asmjs-sync-web.ts", - "node": "./src/entrypoint/wasm-sync-node.ts", - "default": "./src/entrypoint/asmjs-sync-web.ts" - }, - "./asmjs-async": { - "browser": "./src/entrypoint/asmjs-async-web.ts", - "node": "./src/entrypoint/asmjs-async-node.ts", - "default": "./src/entrypoint/asmjs-async-web.ts" - }, - "./asmjs-sync": { - "browser": "./src/entrypoint/asmjs-sync-web.ts", - "node": "./src/entrypoint/asmjs-sync-node.ts", - "default": "./src/entrypoint/asmjs-sync-web.ts" - }, - "./wasm-async": { - "browser": "./src/entrypoint/wasm-async-web.ts", - "node": "./src/entrypoint/wasm-async-node.ts", - "default": "./src/entrypoint/wasm-async-web.ts" - }, - "./wasm-sync": { - "browser": "./src/entrypoint/wasm-sync-web.ts", - "node": "./src/entrypoint/wasm-sync-node.ts", - "default": "./src/entrypoint/wasm-async-web.ts" - } - }, + "type": "module", + "main": "./src/index.ts", "files": [ "binaries/**", "src/**" ], "scripts": { - "benchmark": "just benchmark", - "build": "just build", - "clang-format": "just clang-format", - "clang-format:fix": "just clang-format --fix", - "clean": "just clean", + "benchmark": "just benchmark --config just.config.cjs", + "build": "just build --config just.config.cjs", + "clang-format": "just clang-format --config just.config.cjs", + "clang-format:fix": "just clang-format --fix --config just.config.cjs", + "clean": "just clean --config just.config.cjs", "lint": "eslint .", "lint:fix": "eslint . --fix", - "prepack": "just prepack", - "test": "just test", + "prepack": "just prepack --config just.config.cjs", + "test": "just test --config just.config.cjs", "tsc": "tsc --noEmit" }, "devDependencies": { "@babel/cli": "^7.21.4", "@babel/core": "^7.21.4", - "@babel/node": "^7.21.4", "@babel/preset-env": "^7.21.4", "@babel/preset-typescript": "^7.21.4", "@types/glob": "^8.1.0", "@types/jest": "^29.5.1", "@types/node": "^16.18.25", "@types/which": "^3.0.0", + "babel-register-esm": "^1.2.5", "clang-format": "^1.8.0", "glob": "^8.0.3", "jest": "^29.3.1", "just-scripts": "^2.1.0", - "ts-node": "^10.9.1", "which": "^3.0.0" } } diff --git a/javascript/src/entrypoint/asmjs-async-node.ts b/javascript/src/entrypoint/asmjs-async-node.ts deleted file mode 100644 index 36217d77..00000000 --- a/javascript/src/entrypoint/asmjs-async-node.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import wrapAssembly from '../wrapAssembly'; -import type {Yoga} from '../wrapAssembly'; - -export * from '../generated/YGEnums'; -export type { - Config, - DirtiedFunction, - MeasureFunction, - Node, - Yoga, -} from '../wrapAssembly'; - -const loadAssembly = require('../../binaries/asmjs-async-node'); - -export async function loadYoga(): Promise { - return wrapAssembly(await loadAssembly()); -} diff --git a/javascript/src/entrypoint/asmjs-async-web.ts b/javascript/src/entrypoint/asmjs-async-web.ts deleted file mode 100644 index 9069c1d8..00000000 --- a/javascript/src/entrypoint/asmjs-async-web.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import wrapAssembly from '../wrapAssembly'; -import type {Yoga} from '../wrapAssembly'; - -export * from '../generated/YGEnums'; -export type { - Config, - DirtiedFunction, - MeasureFunction, - Node, - Yoga, -} from '../wrapAssembly'; - -const loadAssembly = require('../../binaries/asmjs-async-web'); - -export async function loadYoga(): Promise { - return wrapAssembly(await loadAssembly()); -} diff --git a/javascript/src/entrypoint/asmjs-sync-web.ts b/javascript/src/entrypoint/asmjs-sync-web.ts deleted file mode 100644 index 5984e0a0..00000000 --- a/javascript/src/entrypoint/asmjs-sync-web.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import wrapAssembly from '../wrapAssembly'; - -export * from '../generated/YGEnums'; -export type { - Config, - DirtiedFunction, - MeasureFunction, - Node, - Yoga, -} from '../wrapAssembly'; - -const loadAssembly = require('../../binaries/asmjs-sync-web'); -const Yoga = wrapAssembly(loadAssembly()); -export default Yoga; diff --git a/javascript/src/entrypoint/wasm-async-node.ts b/javascript/src/entrypoint/wasm-async-node.ts deleted file mode 100644 index 8dea482e..00000000 --- a/javascript/src/entrypoint/wasm-async-node.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import wrapAssembly from '../wrapAssembly'; -import type {Yoga} from '../wrapAssembly'; - -export * from '../generated/YGEnums'; -export type { - Config, - DirtiedFunction, - MeasureFunction, - Node, - Yoga, -} from '../wrapAssembly'; - -const loadAssembly = require('../../binaries/wasm-async-node'); - -export async function loadYoga(): Promise { - return wrapAssembly(await loadAssembly()); -} diff --git a/javascript/src/entrypoint/wasm-async-web.ts b/javascript/src/entrypoint/wasm-async-web.ts deleted file mode 100644 index 092c7d86..00000000 --- a/javascript/src/entrypoint/wasm-async-web.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import wrapAssembly from '../wrapAssembly'; -import type {Yoga} from '../wrapAssembly'; - -export * from '../generated/YGEnums'; -export type { - Config, - DirtiedFunction, - MeasureFunction, - Node, - Yoga, -} from '../wrapAssembly'; - -const loadAssembly = require('../../binaries/wasm-async-web'); - -export async function loadYoga(): Promise { - return wrapAssembly(await loadAssembly()); -} diff --git a/javascript/src/entrypoint/wasm-sync-node.ts b/javascript/src/entrypoint/wasm-sync-node.ts deleted file mode 100644 index f9f208d3..00000000 --- a/javascript/src/entrypoint/wasm-sync-node.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import wrapAssembly from '../wrapAssembly'; - -export * from '../generated/YGEnums'; -export type { - Config, - DirtiedFunction, - MeasureFunction, - Node, - Yoga, -} from '../wrapAssembly'; - -const loadAssembly = require('../../binaries/wasm-sync-node'); -const Yoga = wrapAssembly(loadAssembly()); -export default Yoga; diff --git a/javascript/src/entrypoint/wasm-sync-web.ts b/javascript/src/entrypoint/wasm-sync-web.ts deleted file mode 100644 index da1a53aa..00000000 --- a/javascript/src/entrypoint/wasm-sync-web.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import wrapAssembly from '../wrapAssembly'; - -export * from '../generated/YGEnums'; -export type { - Config, - DirtiedFunction, - MeasureFunction, - Node, - Yoga, -} from '../wrapAssembly'; - -const loadAssembly = require('../../binaries/wasm-sync-web'); -const Yoga = wrapAssembly(loadAssembly()); -export default Yoga; diff --git a/javascript/src/entrypoint/asmjs-sync-node.ts b/javascript/src/index.ts similarity index 55% rename from javascript/src/entrypoint/asmjs-sync-node.ts rename to javascript/src/index.ts index d9102923..888257e7 100644 --- a/javascript/src/entrypoint/asmjs-sync-node.ts +++ b/javascript/src/index.ts @@ -7,17 +7,17 @@ * @format */ -import wrapAssembly from '../wrapAssembly'; +// @ts-ignore untyped from Emscripten +import loadYoga from '../binaries/web.js'; +import wrapAssembly from './wrapAssembly.js'; -export * from '../generated/YGEnums'; export type { Config, DirtiedFunction, MeasureFunction, Node, - Yoga, -} from '../wrapAssembly'; +} from './wrapAssembly.ts'; -const loadAssembly = require('../../binaries/asmjs-sync-node'); -const Yoga = wrapAssembly(loadAssembly()); +const Yoga = wrapAssembly(await loadYoga()); export default Yoga; +export * from './generated/YGEnums.ts'; diff --git a/javascript/src/wrapAssembly.js b/javascript/src/wrapAssembly.js index ff7c3654..eeeb8c30 100644 --- a/javascript/src/wrapAssembly.js +++ b/javascript/src/wrapAssembly.js @@ -7,7 +7,8 @@ * @format */ -import YGEnums, {Unit, Direction} from './generated/YGEnums'; +import {Unit, Direction} from './generated/YGEnums.ts'; +import YGEnums from './generated/YGEnums.ts'; export default function wrapAssembly(lib) { function patch(prototype, name, fn) { diff --git a/javascript/tests/Benchmarks/YGBenchmark.test.ts b/javascript/tests/Benchmarks/YGBenchmark.test.ts index 8dbfcf8f..e65f4ddb 100644 --- a/javascript/tests/Benchmarks/YGBenchmark.test.ts +++ b/javascript/tests/Benchmarks/YGBenchmark.test.ts @@ -5,8 +5,10 @@ * LICENSE file in the root directory of this source tree. */ -import {getMeasureCounter} from '../tools/MeasureCounter'; -import {Yoga, YGBENCHMARK} from '../tools/globals'; +import {getMeasureCounter} from '../tools/MeasureCounter.ts'; +import {YGBENCHMARK} from '../tools/globals.ts'; + +import Yoga from 'yoga-layout'; const ITERATIONS = 2000; diff --git a/javascript/tests/YGAlignBaselineTest.test.ts b/javascript/tests/YGAlignBaselineTest.test.ts index da9613db..fd03ddfe 100644 --- a/javascript/tests/YGAlignBaselineTest.test.ts +++ b/javascript/tests/YGAlignBaselineTest.test.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import {Yoga} from './tools/globals'; +import Yoga from 'yoga-layout'; test('align_baseline_parent_using_child_in_column_as_reference', () => { const config = Yoga.Config.create(); diff --git a/javascript/tests/YGComputedBorderTest.test.ts b/javascript/tests/YGComputedBorderTest.test.ts index c74bc956..09e98f67 100644 --- a/javascript/tests/YGComputedBorderTest.test.ts +++ b/javascript/tests/YGComputedBorderTest.test.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import {Yoga} from './tools/globals'; +import Yoga from 'yoga-layout'; test('border_start', () => { const root = Yoga.Node.create(); diff --git a/javascript/tests/YGComputedMarginTest.test.ts b/javascript/tests/YGComputedMarginTest.test.ts index 91a1ed87..3b3944e5 100644 --- a/javascript/tests/YGComputedMarginTest.test.ts +++ b/javascript/tests/YGComputedMarginTest.test.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import {Yoga} from './tools/globals'; +import Yoga from 'yoga-layout'; test('margin_start', () => { const root = Yoga.Node.create(); diff --git a/javascript/tests/YGComputedPaddingTest.test.ts b/javascript/tests/YGComputedPaddingTest.test.ts index c07c54d4..75653f22 100644 --- a/javascript/tests/YGComputedPaddingTest.test.ts +++ b/javascript/tests/YGComputedPaddingTest.test.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import {Yoga} from './tools/globals'; +import Yoga from 'yoga-layout'; test('padding_start', () => { const root = Yoga.Node.create(); diff --git a/javascript/tests/YGDirtiedTest.test.ts b/javascript/tests/YGDirtiedTest.test.ts index ef5ff40d..6d2fa671 100644 --- a/javascript/tests/YGDirtiedTest.test.ts +++ b/javascript/tests/YGDirtiedTest.test.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import {Yoga} from './tools/globals'; +import Yoga from 'yoga-layout'; test('dirtied', () => { const root = Yoga.Node.create(); diff --git a/javascript/tests/YGErrataTest.test.ts b/javascript/tests/YGErrataTest.test.ts index 02dda49a..da186fce 100644 --- a/javascript/tests/YGErrataTest.test.ts +++ b/javascript/tests/YGErrataTest.test.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import {Yoga} from './tools/globals'; +import Yoga from 'yoga-layout'; test('errata_all_contains_example_errata', () => { const config = Yoga.Config.create(); diff --git a/javascript/tests/YGFlexBasisAuto.test.ts b/javascript/tests/YGFlexBasisAuto.test.ts index 903ead2d..d6e28d69 100644 --- a/javascript/tests/YGFlexBasisAuto.test.ts +++ b/javascript/tests/YGFlexBasisAuto.test.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import {Yoga} from './tools/globals'; +import Yoga from 'yoga-layout'; test('flex_basis_auto', () => { const root = Yoga.Node.create(); diff --git a/javascript/tests/YGMeasureCacheTest.test.ts b/javascript/tests/YGMeasureCacheTest.test.ts index 8866281c..4a95d1c6 100644 --- a/javascript/tests/YGMeasureCacheTest.test.ts +++ b/javascript/tests/YGMeasureCacheTest.test.ts @@ -5,9 +5,9 @@ * LICENSE file in the root directory of this source tree. */ -import {Yoga} from './tools/globals'; +import Yoga from 'yoga-layout'; -import {getMeasureCounterMax} from './tools/MeasureCounter'; +import {getMeasureCounterMax} from './tools/MeasureCounter.ts'; test('measure_once_single_flexible_child', () => { const root = Yoga.Node.create(); diff --git a/javascript/tests/YGMeasureTest.test.ts b/javascript/tests/YGMeasureTest.test.ts index e4d4a132..941d424f 100644 --- a/javascript/tests/YGMeasureTest.test.ts +++ b/javascript/tests/YGMeasureTest.test.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import {Yoga} from './tools/globals'; -import {getMeasureCounter} from './tools/MeasureCounter'; +import Yoga from 'yoga-layout'; +import {getMeasureCounter} from './tools/MeasureCounter.ts'; test('dont_measure_single_grow_shrink_child', () => { const root = Yoga.Node.create(); diff --git a/javascript/tests/bin/run-bench.ts b/javascript/tests/bin/run-bench.ts index d5c4d088..b7e21fbc 100644 --- a/javascript/tests/bin/run-bench.ts +++ b/javascript/tests/bin/run-bench.ts @@ -10,9 +10,6 @@ import path from 'path'; -import YogaAsmjs from 'yoga-layout/asmjs-sync'; -import YogaWasm from 'yoga-layout/wasm-sync'; - const WARMUP_ITERATIONS = 3; const BENCHMARK_ITERATIONS = 10; @@ -20,9 +17,7 @@ const testFiles = process.argv.slice(2); const testResults = new Map>(); -for (const type of ['asmjs', 'wasm']) { - globalThis.Yoga = type === 'asmjs' ? YogaAsmjs : YogaWasm; - +for (const type of ['wasm']) { for (const file of testFiles) { globalThis.YGBENCHMARK = (name: string, fn: () => void) => { let testEntry = testResults.get(name); @@ -42,10 +37,7 @@ for (const type of ['asmjs', 'wasm']) { }; const modulePath = path.resolve(file); - - delete require.cache[require.resolve('../tools/globals')]; - delete require.cache[modulePath]; - require(modulePath); + await import(modulePath); } } diff --git a/javascript/tests/generated/YGAbsolutePositionTest.test.ts b/javascript/tests/generated/YGAbsolutePositionTest.test.ts index 2ec0ce82..50a4461b 100644 --- a/javascript/tests/generated/YGAbsolutePositionTest.test.ts +++ b/javascript/tests/generated/YGAbsolutePositionTest.test.ts @@ -7,7 +7,7 @@ // @generated by gentest/gentest.rb from gentest/fixtures/YGAbsolutePositionTest.html -import {Yoga} from "../tools/globals"; +import Yoga from 'yoga-layout'; import { Align, Direction, diff --git a/javascript/tests/generated/YGAlignContentTest.test.ts b/javascript/tests/generated/YGAlignContentTest.test.ts index adfe3ee9..263626a5 100644 --- a/javascript/tests/generated/YGAlignContentTest.test.ts +++ b/javascript/tests/generated/YGAlignContentTest.test.ts @@ -7,7 +7,7 @@ // @generated by gentest/gentest.rb from gentest/fixtures/YGAlignContentTest.html -import {Yoga} from "../tools/globals"; +import Yoga from 'yoga-layout'; import { Align, Direction, diff --git a/javascript/tests/generated/YGAlignItemsTest.test.ts b/javascript/tests/generated/YGAlignItemsTest.test.ts index 24350c85..ce356979 100644 --- a/javascript/tests/generated/YGAlignItemsTest.test.ts +++ b/javascript/tests/generated/YGAlignItemsTest.test.ts @@ -7,7 +7,7 @@ // @generated by gentest/gentest.rb from gentest/fixtures/YGAlignItemsTest.html -import {Yoga} from "../tools/globals"; +import Yoga from 'yoga-layout'; import { Align, Direction, diff --git a/javascript/tests/generated/YGAlignSelfTest.test.ts b/javascript/tests/generated/YGAlignSelfTest.test.ts index af12224e..55891d63 100644 --- a/javascript/tests/generated/YGAlignSelfTest.test.ts +++ b/javascript/tests/generated/YGAlignSelfTest.test.ts @@ -7,7 +7,7 @@ // @generated by gentest/gentest.rb from gentest/fixtures/YGAlignSelfTest.html -import {Yoga} from "../tools/globals"; +import Yoga from 'yoga-layout'; import { Align, Direction, diff --git a/javascript/tests/generated/YGAndroidNewsFeed.test.ts b/javascript/tests/generated/YGAndroidNewsFeed.test.ts index ff0dd916..324f3af3 100644 --- a/javascript/tests/generated/YGAndroidNewsFeed.test.ts +++ b/javascript/tests/generated/YGAndroidNewsFeed.test.ts @@ -7,7 +7,7 @@ // @generated by gentest/gentest.rb from gentest/fixtures/YGAndroidNewsFeed.html -import {Yoga} from "../tools/globals"; +import Yoga from 'yoga-layout'; import { Align, Direction, diff --git a/javascript/tests/generated/YGAspectRatioTest.test.ts b/javascript/tests/generated/YGAspectRatioTest.test.ts index c2ea8353..bbd0f3d6 100644 --- a/javascript/tests/generated/YGAspectRatioTest.test.ts +++ b/javascript/tests/generated/YGAspectRatioTest.test.ts @@ -7,7 +7,7 @@ // @generated by gentest/gentest.rb from gentest/fixtures/YGAspectRatioTest.html -import {Yoga} from "../tools/globals"; +import Yoga from 'yoga-layout'; import { Align, Direction, diff --git a/javascript/tests/generated/YGBorderTest.test.ts b/javascript/tests/generated/YGBorderTest.test.ts index b7904c30..994c6e51 100644 --- a/javascript/tests/generated/YGBorderTest.test.ts +++ b/javascript/tests/generated/YGBorderTest.test.ts @@ -7,7 +7,7 @@ // @generated by gentest/gentest.rb from gentest/fixtures/YGBorderTest.html -import {Yoga} from "../tools/globals"; +import Yoga from 'yoga-layout'; import { Align, Direction, diff --git a/javascript/tests/generated/YGDimensionTest.test.ts b/javascript/tests/generated/YGDimensionTest.test.ts index 998f5cfd..834c79d4 100644 --- a/javascript/tests/generated/YGDimensionTest.test.ts +++ b/javascript/tests/generated/YGDimensionTest.test.ts @@ -7,7 +7,7 @@ // @generated by gentest/gentest.rb from gentest/fixtures/YGDimensionTest.html -import {Yoga} from "../tools/globals"; +import Yoga from 'yoga-layout'; import { Align, Direction, diff --git a/javascript/tests/generated/YGDisplayTest.test.ts b/javascript/tests/generated/YGDisplayTest.test.ts index 96cdd77c..833062ce 100644 --- a/javascript/tests/generated/YGDisplayTest.test.ts +++ b/javascript/tests/generated/YGDisplayTest.test.ts @@ -7,7 +7,7 @@ // @generated by gentest/gentest.rb from gentest/fixtures/YGDisplayTest.html -import {Yoga} from "../tools/globals"; +import Yoga from 'yoga-layout'; import { Align, Direction, diff --git a/javascript/tests/generated/YGFlexDirectionTest.test.ts b/javascript/tests/generated/YGFlexDirectionTest.test.ts index 87180643..7ceb15e0 100644 --- a/javascript/tests/generated/YGFlexDirectionTest.test.ts +++ b/javascript/tests/generated/YGFlexDirectionTest.test.ts @@ -7,7 +7,7 @@ // @generated by gentest/gentest.rb from gentest/fixtures/YGFlexDirectionTest.html -import {Yoga} from "../tools/globals"; +import Yoga from 'yoga-layout'; import { Align, Direction, diff --git a/javascript/tests/generated/YGFlexTest.test.ts b/javascript/tests/generated/YGFlexTest.test.ts index af26541a..79876f51 100644 --- a/javascript/tests/generated/YGFlexTest.test.ts +++ b/javascript/tests/generated/YGFlexTest.test.ts @@ -7,7 +7,7 @@ // @generated by gentest/gentest.rb from gentest/fixtures/YGFlexTest.html -import {Yoga} from "../tools/globals"; +import Yoga from 'yoga-layout'; import { Align, Direction, diff --git a/javascript/tests/generated/YGFlexWrapTest.test.ts b/javascript/tests/generated/YGFlexWrapTest.test.ts index 7f2daaa8..a0180624 100644 --- a/javascript/tests/generated/YGFlexWrapTest.test.ts +++ b/javascript/tests/generated/YGFlexWrapTest.test.ts @@ -7,7 +7,7 @@ // @generated by gentest/gentest.rb from gentest/fixtures/YGFlexWrapTest.html -import {Yoga} from "../tools/globals"; +import Yoga from 'yoga-layout'; import { Align, Direction, diff --git a/javascript/tests/generated/YGGapTest.test.ts b/javascript/tests/generated/YGGapTest.test.ts index caf9865e..5e62620c 100644 --- a/javascript/tests/generated/YGGapTest.test.ts +++ b/javascript/tests/generated/YGGapTest.test.ts @@ -7,7 +7,7 @@ // @generated by gentest/gentest.rb from gentest/fixtures/YGGapTest.html -import {Yoga} from "../tools/globals"; +import Yoga from 'yoga-layout'; import { Align, Direction, diff --git a/javascript/tests/generated/YGJustifyContentTest.test.ts b/javascript/tests/generated/YGJustifyContentTest.test.ts index 8f7e813f..381a1b96 100644 --- a/javascript/tests/generated/YGJustifyContentTest.test.ts +++ b/javascript/tests/generated/YGJustifyContentTest.test.ts @@ -7,7 +7,7 @@ // @generated by gentest/gentest.rb from gentest/fixtures/YGJustifyContentTest.html -import {Yoga} from "../tools/globals"; +import Yoga from 'yoga-layout'; import { Align, Direction, diff --git a/javascript/tests/generated/YGMarginTest.test.ts b/javascript/tests/generated/YGMarginTest.test.ts index 19b5ad2a..ac563eb9 100644 --- a/javascript/tests/generated/YGMarginTest.test.ts +++ b/javascript/tests/generated/YGMarginTest.test.ts @@ -7,7 +7,7 @@ // @generated by gentest/gentest.rb from gentest/fixtures/YGMarginTest.html -import {Yoga} from "../tools/globals"; +import Yoga from 'yoga-layout'; import { Align, Direction, diff --git a/javascript/tests/generated/YGMinMaxDimensionTest.test.ts b/javascript/tests/generated/YGMinMaxDimensionTest.test.ts index dc951060..cb7978aa 100644 --- a/javascript/tests/generated/YGMinMaxDimensionTest.test.ts +++ b/javascript/tests/generated/YGMinMaxDimensionTest.test.ts @@ -7,7 +7,7 @@ // @generated by gentest/gentest.rb from gentest/fixtures/YGMinMaxDimensionTest.html -import {Yoga} from "../tools/globals"; +import Yoga from 'yoga-layout'; import { Align, Direction, diff --git a/javascript/tests/generated/YGPaddingTest.test.ts b/javascript/tests/generated/YGPaddingTest.test.ts index 75e74b6a..342009b5 100644 --- a/javascript/tests/generated/YGPaddingTest.test.ts +++ b/javascript/tests/generated/YGPaddingTest.test.ts @@ -7,7 +7,7 @@ // @generated by gentest/gentest.rb from gentest/fixtures/YGPaddingTest.html -import {Yoga} from "../tools/globals"; +import Yoga from 'yoga-layout'; import { Align, Direction, diff --git a/javascript/tests/generated/YGPercentageTest.test.ts b/javascript/tests/generated/YGPercentageTest.test.ts index effa8763..50a0f76a 100644 --- a/javascript/tests/generated/YGPercentageTest.test.ts +++ b/javascript/tests/generated/YGPercentageTest.test.ts @@ -7,7 +7,7 @@ // @generated by gentest/gentest.rb from gentest/fixtures/YGPercentageTest.html -import {Yoga} from "../tools/globals"; +import Yoga from 'yoga-layout'; import { Align, Direction, diff --git a/javascript/tests/generated/YGRoundingTest.test.ts b/javascript/tests/generated/YGRoundingTest.test.ts index 63c981bf..0b267f11 100644 --- a/javascript/tests/generated/YGRoundingTest.test.ts +++ b/javascript/tests/generated/YGRoundingTest.test.ts @@ -7,7 +7,7 @@ // @generated by gentest/gentest.rb from gentest/fixtures/YGRoundingTest.html -import {Yoga} from "../tools/globals"; +import Yoga from 'yoga-layout'; import { Align, Direction, diff --git a/javascript/tests/generated/YGSizeOverflowTest.test.ts b/javascript/tests/generated/YGSizeOverflowTest.test.ts index 436bcb89..f82c630e 100644 --- a/javascript/tests/generated/YGSizeOverflowTest.test.ts +++ b/javascript/tests/generated/YGSizeOverflowTest.test.ts @@ -7,7 +7,7 @@ // @generated by gentest/gentest.rb from gentest/fixtures/YGSizeOverflowTest.html -import {Yoga} from "../tools/globals"; +import Yoga from 'yoga-layout'; import { Align, Direction, diff --git a/javascript/tests/tools/MeasureCounter.ts b/javascript/tests/tools/MeasureCounter.ts index 542f0266..d7af4735 100644 --- a/javascript/tests/tools/MeasureCounter.ts +++ b/javascript/tests/tools/MeasureCounter.ts @@ -8,7 +8,7 @@ */ import type {MeasureFunction} from 'yoga-layout'; -import {Yoga} from './globals'; +import Yoga from 'yoga-layout'; export type MeasureCounter = { inc: MeasureFunction; diff --git a/javascript/tests/tools/globals.ts b/javascript/tests/tools/globals.ts index e7d958a7..2e92b5aa 100644 --- a/javascript/tests/tools/globals.ts +++ b/javascript/tests/tools/globals.ts @@ -5,23 +5,15 @@ * LICENSE file in the root directory of this source tree. */ -import type {Yoga} from 'yoga-layout'; - declare global { - // eslint-disable-next-line no-var - var Yoga: Yoga | undefined; // eslint-disable-next-line no-var var YGBENCHMARK: (title: string, fn: () => void) => void; } -if (globalThis.Yoga === undefined) { - throw new Error('Expected "Yoga" global to be set'); -} if (globalThis.YGBENCHMARK === undefined) { throw new Error('Expected "YGBENCHMARK" global to be set'); } -const yoga = globalThis.Yoga; const benchmark = globalThis.YGBENCHMARK; -export {yoga as Yoga, benchmark as YGBENCHMARK}; +export {benchmark as YGBENCHMARK}; diff --git a/javascript/tsconfig.json b/javascript/tsconfig.json index a1434af8..ede5f35d 100644 --- a/javascript/tsconfig.json +++ b/javascript/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { - "target": "es2018", - "module": "commonjs", + "target": "es2020", + "module": "esnext", "strict": true, "declaration": true, "esModuleInterop": true, @@ -11,12 +11,14 @@ "forceConsistentCasingInFileNames": false, "baseUrl": ".", "moduleResolution": "nodenext", + "allowImportingTsExtensions": true, "paths": { "yoga-layout": ["src"] } }, "ts-node": { - "transpileOnly": true + "transpileOnly": true, + "esm": true }, "exclude": [ "binaries/**/*", diff --git a/package.json b/package.json index e6f69ce2..6453741f 100644 --- a/package.json +++ b/package.json @@ -19,5 +19,6 @@ "eslint-plugin-prettier": "^4.2.1", "prettier": "2.8.8", "typescript": "5.0.4" - } + }, + "dependencies": {} } diff --git a/website-next/babel.config.js b/website-next/babel.config.cjs similarity index 100% rename from website-next/babel.config.js rename to website-next/babel.config.cjs diff --git a/website-next/docusaurus.config.js b/website-next/docusaurus.config.cjs similarity index 98% rename from website-next/docusaurus.config.js rename to website-next/docusaurus.config.cjs index b92e8423..f8f1ef5f 100644 --- a/website-next/docusaurus.config.js +++ b/website-next/docusaurus.config.cjs @@ -37,7 +37,7 @@ const config = { /** @type {import('@docusaurus/preset-classic').Options} */ ({ docs: { - sidebarPath: require.resolve('./sidebars.js'), + sidebarPath: require.resolve('./sidebars.cjs'), editUrl: 'https://github.com/facebook/yoga/tree/main/website', }, blog: { diff --git a/website-next/sidebars.js b/website-next/sidebars.cjs similarity index 100% rename from website-next/sidebars.js rename to website-next/sidebars.cjs diff --git a/website-next/src/components/Playground/Editor.tsx b/website-next/src/components/Playground/Editor.tsx index c77a6ed7..7006fd9f 100644 --- a/website-next/src/components/Playground/Editor.tsx +++ b/website-next/src/components/Playground/Editor.tsx @@ -11,7 +11,7 @@ import React, {Component} from 'react'; import {Row, Col, Button, Tabs} from 'antd'; import EditValue from './EditValue'; import type {LayoutRecordType} from './LayoutRecord'; -import type {Direction} from 'yoga-layout/sync'; +import type {Direction} from 'yoga-layout'; import InfoText from './InfoText'; import './Editor.css'; const TabPane = Tabs.TabPane; diff --git a/website-next/src/components/Playground/LayoutRecord.tsx b/website-next/src/components/Playground/LayoutRecord.tsx index 764ab438..0892da1d 100644 --- a/website-next/src/components/Playground/LayoutRecord.tsx +++ b/website-next/src/components/Playground/LayoutRecord.tsx @@ -10,15 +10,8 @@ import {Record, List} from 'immutable'; import PositionRecord from './PositionRecord'; import type {PositionRecordType} from './PositionRecord'; -import yoga from 'yoga-layout/sync'; -import type { - Align, - Justify, - FlexDirection, - Wrap, - PositionType, -} from 'yoga-layout/sync'; +import {Align, Justify, FlexDirection, Wrap, PositionType} from 'yoga-layout'; export type LayoutRecordType = ReturnType; @@ -50,11 +43,11 @@ export type LayoutRecordFactory = Record.Factory<{ const r: LayoutRecordFactory = Record({ width: 'auto', height: 'auto', - justifyContent: yoga.JUSTIFY_FLEX_START, - alignItems: yoga.ALIGN_STRETCH, - alignSelf: yoga.ALIGN_AUTO, - alignContent: yoga.ALIGN_STRETCH, - flexDirection: yoga.FLEX_DIRECTION_ROW, + justifyContent: Justify.FlexStart, + alignItems: Align.Stretch, + alignSelf: Align.Auto, + alignContent: Align.Stretch, + flexDirection: FlexDirection.Row, padding: PositionRecord(), margin: PositionRecord(), border: PositionRecord(), @@ -64,8 +57,8 @@ const r: LayoutRecordFactory = Record({ right: NaN, bottom: NaN, }), - positionType: yoga.POSITION_TYPE_RELATIVE, - flexWrap: yoga.WRAP_NO_WRAP, + positionType: PositionType.Relative, + flexWrap: Wrap.NoWrap, flexBasis: 'auto', flexGrow: 0, flexShrink: 1, diff --git a/website-next/src/components/Playground/YogaEnumSelect.tsx b/website-next/src/components/Playground/YogaEnumSelect.tsx index 31d2bb51..94946b0e 100644 --- a/website-next/src/components/Playground/YogaEnumSelect.tsx +++ b/website-next/src/components/Playground/YogaEnumSelect.tsx @@ -8,7 +8,7 @@ */ import React, {Component} from 'react'; -import Yoga from 'yoga-layout/sync'; +import Yoga from 'yoga-layout'; import {Radio, Menu, Dropdown, Button, Icon} from 'antd'; import './YogaEnumSelect.css'; const RadioButton = Radio.Button; diff --git a/website-next/src/components/Playground/YogaNode.tsx b/website-next/src/components/Playground/YogaNode.tsx index da5322d6..65ad4d47 100644 --- a/website-next/src/components/Playground/YogaNode.tsx +++ b/website-next/src/components/Playground/YogaNode.tsx @@ -8,12 +8,12 @@ */ import React, {Component} from 'react'; -import Yoga from 'yoga-layout/sync'; +import Yoga from 'yoga-layout'; import PositionGuide from './PositionGuide'; import PositionRecord from './PositionRecord'; import LayoutRecord from './LayoutRecord'; import type {LayoutRecordType} from './LayoutRecord'; -import {Direction, Display, Edge, Node, Wrap} from 'yoga-layout/sync'; +import {Direction, Display, Edge, Node, Wrap} from 'yoga-layout'; import './YogaNode.css'; diff --git a/website-next/src/components/Playground/index.tsx b/website-next/src/components/Playground/index.tsx index 12171a5b..19f90e74 100644 --- a/website-next/src/components/Playground/index.tsx +++ b/website-next/src/components/Playground/index.tsx @@ -8,7 +8,7 @@ */ import React, {Component} from 'react'; -import {Direction} from 'yoga-layout/sync'; +import {Direction} from 'yoga-layout'; import YogaNode from './YogaNode'; import Editor from './Editor'; import {List, setIn} from 'immutable'; diff --git a/website-next/src/pages/index.tsx b/website-next/src/pages/index.tsx index c011234c..5e6e1fcc 100644 --- a/website-next/src/pages/index.tsx +++ b/website-next/src/pages/index.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import React from 'react'; +import React, {Suspense} from 'react'; import clsx from 'clsx'; import Link from '@docusaurus/Link'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; @@ -34,6 +34,8 @@ function HomepageHeader() { ); } +const LazyPlayground = React.lazy(() => import('../components/Playground')); + export default function Home(): JSX.Element { const {siteConfig} = useDocusaurusContext(); return ( @@ -44,10 +46,11 @@ export default function Home(): JSX.Element {
- {() => { - const Playground = require('../components/Playground'); - return ; - }} + {() => ( + + + + )}
diff --git a/website-next/tsconfig.json b/website-next/tsconfig.json index 6f475698..a7d78311 100644 --- a/website-next/tsconfig.json +++ b/website-next/tsconfig.json @@ -2,6 +2,10 @@ // This file is not used in compilation. It is here just for a nice editor experience. "extends": "@tsconfig/docusaurus/tsconfig.json", "compilerOptions": { - "baseUrl": "." + "baseUrl": ".", + "target": "esnext", + "module": "esnext", + "moduleResolution": "bundler", + "allowImportingTsExtensions": true } } diff --git a/yarn.lock b/yarn.lock index 5879177d..9e808326 100644 --- a/yarn.lock +++ b/yarn.lock @@ -813,18 +813,6 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/node@^7.21.4": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/node/-/node-7.22.6.tgz#a47b4f150f06bad1808823c4519690ded6c93911" - integrity sha512-Lt6v+RUQOTsEOXLv+KfjogLFkFfsLPPSoXZqmbngfVatkWjQPnFGHO0xjFRcN6XEvm3vsnZn+AWQiRpgZFsdIA== - dependencies: - "@babel/register" "^7.22.5" - commander "^4.0.1" - core-js "^3.30.2" - node-environment-flags "^1.0.5" - regenerator-runtime "^0.13.11" - v8flags "^3.1.1" - "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7": version "7.21.8" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.8.tgz#642af7d0333eab9c0ad70b14ac5e76dbde7bfdf8" @@ -1780,17 +1768,6 @@ "@babel/plugin-transform-modules-commonjs" "^7.21.5" "@babel/plugin-transform-typescript" "^7.21.3" -"@babel/register@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.22.5.tgz#e4d8d0f615ea3233a27b5c6ada6750ee59559939" - integrity sha512-vV6pm/4CijSQ8Y47RH5SopXzursN35RQINfGJkmOlcpAtGuf94miFvIPhCKGQN7WGIcsgG1BHEX2KVdTYwTwUQ== - dependencies: - clone-deep "^4.0.1" - find-cache-dir "^2.0.0" - make-dir "^2.1.0" - pirates "^4.0.5" - source-map-support "^0.5.16" - "@babel/regjsgen@^0.8.0": version "0.8.0" resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" @@ -1898,13 +1875,6 @@ resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== -"@cspotcode/source-map-support@^0.8.0": - version "0.8.1" - resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" - integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== - dependencies: - "@jridgewell/trace-mapping" "0.3.9" - "@discoveryjs/json-ext@0.5.7": version "0.5.7" resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" @@ -2633,11 +2603,6 @@ resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== -"@jridgewell/resolve-uri@^3.0.3": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" - integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== - "@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": version "1.1.2" resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" @@ -2656,14 +2621,6 @@ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== -"@jridgewell/trace-mapping@0.3.9": - version "0.3.9" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" - integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.15", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": version "0.3.18" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6" @@ -2942,26 +2899,6 @@ resolved "https://registry.yarnpkg.com/@tsconfig/docusaurus/-/docusaurus-1.0.7.tgz#a3ee3c8109b3fec091e3d61a61834e563aeee3c3" integrity sha512-ffTXxGIP/IRMCjuzHd6M4/HdIrw1bMfC7Bv8hMkTadnePkpe0lG0oDSdbRpSDZb2rQMAgpbWiR10BvxvNYwYrg== -"@tsconfig/node10@^1.0.7": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" - integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== - -"@tsconfig/node12@^1.0.7": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" - integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== - -"@tsconfig/node14@^1.0.0": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" - integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== - -"@tsconfig/node16@^1.0.2": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" - integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== - "@types/babel__core@^7.1.14": version "7.1.20" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.20.tgz#e168cdd612c92a2d335029ed62ac94c95b362359" @@ -3575,12 +3512,12 @@ acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn-walk@^8.0.0, acorn-walk@^8.1.1: +acorn-walk@^8.0.0: version "8.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^8.0.4, acorn@^8.4.1, acorn@^8.7.1, acorn@^8.8.0, acorn@^8.8.2: +acorn@^8.0.4, acorn@^8.7.1, acorn@^8.8.0, acorn@^8.8.2: version "8.8.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== @@ -3797,11 +3734,6 @@ anymatch@^3.0.3, anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" -arg@^4.1.0: - version "4.1.3" - resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" - integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== - arg@^5.0.0: version "5.0.2" resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.2.tgz#c81433cc427c92c4dcf4865142dbca6f15acd59c" @@ -3838,14 +3770,6 @@ arr-map@^2.0.0, arr-map@^2.0.2: dependencies: make-iterator "^1.0.0" -array-buffer-byte-length@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" - integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== - dependencies: - call-bind "^1.0.2" - is-array-buffer "^3.0.1" - array-each@^1.0.0, array-each@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f" @@ -3891,17 +3815,6 @@ array-union@^2.1.0: resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -array.prototype.reduce@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/array.prototype.reduce/-/array.prototype.reduce-1.0.5.tgz#6b20b0daa9d9734dd6bc7ea66b5bbce395471eac" - integrity sha512-kDdugMl7id9COE8R7MHF5jWk7Dqt/fs4Pv+JXoICnYwqpjjjbUurz6w5fT5IG6brLdJhv6/VoHB0H7oyIBXd+Q== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-array-method-boxes-properly "^1.0.0" - is-string "^1.0.7" - asap@~2.0.3: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" @@ -3967,11 +3880,6 @@ autoprefixer@^10.4.12, autoprefixer@^10.4.7: picocolors "^1.0.0" postcss-value-parser "^4.2.0" -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== - axios@^0.25.0: version "0.25.0" resolved "https://registry.yarnpkg.com/axios/-/axios-0.25.0.tgz#349cfbb31331a9b4453190791760a8d35b093e0a" @@ -4119,6 +4027,11 @@ babel-preset-jest@^29.2.0: babel-plugin-jest-hoist "^29.2.0" babel-preset-current-node-syntax "^1.0.0" +babel-register-esm@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/babel-register-esm/-/babel-register-esm-1.2.5.tgz#66ff8e0b795f4af3ee11bf4895c73f2780dafde8" + integrity sha512-WaVd3Rm42kndYnufn8u1SbUUwuCxL2GAQX/7QXUL3w/7PffB+HcXrzmAqk1x01TjhFh/npSZ9Z3MNBc6dDb6Uw== + babel-runtime@6.x, babel-runtime@^6.18.0, babel-runtime@^6.23.0, babel-runtime@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" @@ -4375,20 +4288,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001464, caniuse-lite@^1.0.30001502: - version "1.0.30001502" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001502.tgz#f7e4a76eb1d2d585340f773767be1fefc118dca8" - integrity sha512-AZ+9tFXw1sS0o0jcpJQIXvFTOB/xGiQ4OQ2t98QX3NDn2EZTSRBC801gxrsGgViuq2ak/NLkNgSNEPtCr5lfKg== - -caniuse-lite@^1.0.30001400: - version "1.0.30001441" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz#987437b266260b640a23cd18fbddb509d7f69f3e" - integrity sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg== - -caniuse-lite@^1.0.30001503: - version "1.0.30001515" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001515.tgz#418aefeed9d024cd3129bfae0ccc782d4cb8f12b" - integrity sha512-eEFDwUOZbE24sb+Ecsx3+OvNETqjWIdabMy52oOkIgcUtAsQifjUG9q4U9dgTHJM2mfk4uEPxc0+xuFdJ629QA== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001400, caniuse-lite@^1.0.30001464, caniuse-lite@^1.0.30001502, caniuse-lite@^1.0.30001503: + version "1.0.30001551" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001551.tgz" + integrity sha512-vtBAez47BoGMMzlbYhfXrMV1kvRF2WP/lqiMuDu1Sb4EE4LKEgjopFDSRtZfdVnslNRpOqV/woE+Xgrwj6VQlg== cardinal@^2.1.1: version "2.1.1" @@ -4865,11 +4768,6 @@ core-js@^3.23.3: resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.31.0.tgz#4471dd33e366c79d8c0977ed2d940821719db344" integrity sha512-NIp2TQSGfR6ba5aalZD+ZQ1fSxGhDo/s1w0nx3RYzf2pnJxt7YynxFlFScP6eV7+GZsKO95NSjGxyJsU3DZgeQ== -core-js@^3.30.2: - version "3.31.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.31.1.tgz#f2b0eea9be9da0def2c5fece71064a7e5d687653" - integrity sha512-2sKLtfq1eFST7l7v62zaqXacPc7uG8ZAya8ogijLhTtaKNcpzpB4TMoTw2Si+8GYKRwFPMMtUT0263QFWFfqyQ== - core-util-is@~1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" @@ -4915,11 +4813,6 @@ create-react-class@^15.5.3: loose-envify "^1.3.1" object-assign "^4.1.1" -create-require@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" - integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== - cross-fetch@^3.1.5: version "3.1.6" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.6.tgz#bae05aa31a4da760969756318feeee6e70f15d6c" @@ -5164,7 +5057,7 @@ define-lazy-prop@^2.0.0: resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== -define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: +define-properties@^1.1.4: version "1.2.0" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== @@ -5249,11 +5142,6 @@ diff-sequences@^29.4.3: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.4.3.tgz#9314bc1fabe09267ffeca9cbafc457d8499a13f2" integrity sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA== -diff@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -5497,74 +5385,11 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.19.0, es-abstract@^1.20.4, es-abstract@^1.21.2: - version "1.21.2" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.2.tgz#a56b9695322c8a185dc25975aa3b8ec31d0e7eff" - integrity sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg== - dependencies: - array-buffer-byte-length "^1.0.0" - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-set-tostringtag "^2.0.1" - es-to-primitive "^1.2.1" - function.prototype.name "^1.1.5" - get-intrinsic "^1.2.0" - get-symbol-description "^1.0.0" - globalthis "^1.0.3" - gopd "^1.0.1" - has "^1.0.3" - has-property-descriptors "^1.0.0" - has-proto "^1.0.1" - has-symbols "^1.0.3" - internal-slot "^1.0.5" - is-array-buffer "^3.0.2" - is-callable "^1.2.7" - is-negative-zero "^2.0.2" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" - is-string "^1.0.7" - is-typed-array "^1.1.10" - is-weakref "^1.0.2" - object-inspect "^1.12.3" - object-keys "^1.1.1" - object.assign "^4.1.4" - regexp.prototype.flags "^1.4.3" - safe-regex-test "^1.0.0" - string.prototype.trim "^1.2.7" - string.prototype.trimend "^1.0.6" - string.prototype.trimstart "^1.0.6" - typed-array-length "^1.0.4" - unbox-primitive "^1.0.2" - which-typed-array "^1.1.9" - -es-array-method-boxes-properly@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" - integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== - es-module-lexer@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.3.0.tgz#6be9c9e0b4543a60cd166ff6f8b4e9dae0b0c16f" integrity sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA== -es-set-tostringtag@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" - integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== - dependencies: - get-intrinsic "^1.1.3" - has "^1.0.3" - has-tostringtag "^1.0.0" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50: version "0.10.62" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" @@ -6047,15 +5872,6 @@ finalhandler@1.2.0: statuses "2.0.1" unpipe "~1.0.0" -find-cache-dir@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" - integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== - dependencies: - commondir "^1.0.1" - make-dir "^2.0.0" - pkg-dir "^3.0.0" - find-cache-dir@^3.3.1: version "3.3.2" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" @@ -6114,13 +5930,6 @@ follow-redirects@^1.0.0, follow-redirects@^1.14.7: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== -for-each@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - dependencies: - is-callable "^1.1.3" - for-in@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -6232,21 +6041,6 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== -function.prototype.name@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" - integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" - functions-have-names "^1.2.2" - -functions-have-names@^1.2.2, functions-have-names@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" - integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== - gensync@^1.0.0-beta.1, gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" @@ -6257,7 +6051,7 @@ get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0: +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q== @@ -6295,14 +6089,6 @@ get-stream@^6.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== -get-symbol-description@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" - integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - github-slugger@^1.4.0: version "1.5.0" resolved "https://registry.yarnpkg.com/github-slugger/-/github-slugger-1.5.0.tgz#17891bbc73232051474d68bd867a34625c955f7d" @@ -6385,13 +6171,6 @@ globals@^13.19.0: dependencies: type-fest "^0.20.2" -globalthis@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" - integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== - dependencies: - define-properties "^1.1.3" - globby@^11.0.1, globby@^11.0.4, globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" @@ -6422,13 +6201,6 @@ good-listener@^1.2.2: dependencies: delegate "^3.1.2" -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== - dependencies: - get-intrinsic "^1.1.3" - got@^9.6.0: version "9.6.0" resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" @@ -6493,11 +6265,6 @@ handle-thing@^2.0.0: resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== -has-bigints@^1.0.1, has-bigints@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" - integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -6515,23 +6282,11 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" -has-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" - integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== - -has-symbols@^1.0.2, has-symbols@^1.0.3: +has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - has-yarn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77" @@ -6656,13 +6411,6 @@ hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0: dependencies: react-is "^16.7.0" -homedir-polyfill@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" - integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== - dependencies: - parse-passwd "^1.0.0" - hpack.js@^2.1.6: version "2.1.6" resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" @@ -6923,15 +6671,6 @@ inline-style-parser@0.1.1: resolved "https://registry.yarnpkg.com/inline-style-parser/-/inline-style-parser-0.1.1.tgz#ec8a3b429274e9c0a1f1c4ffa9453a7fef72cea1" integrity sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q== -internal-slot@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" - integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== - dependencies: - get-intrinsic "^1.2.0" - has "^1.0.3" - side-channel "^1.0.4" - interpret@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" @@ -6967,27 +6706,11 @@ is-alphanumerical@^1.0.0: is-alphabetical "^1.0.0" is-decimal "^1.0.0" -is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" - integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.0" - is-typed-array "^1.1.10" - is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== -is-bigint@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" - integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== - dependencies: - has-bigints "^1.0.1" - is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" @@ -6995,24 +6718,11 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" -is-boolean-object@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" - integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - is-buffer@^2.0.0: version "2.0.5" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== -is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" - integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== - is-ci@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" @@ -7034,13 +6744,6 @@ is-core-module@^2.9.0: dependencies: has "^1.0.3" -is-date-object@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" - integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== - dependencies: - has-tostringtag "^1.0.0" - is-decimal@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.4.tgz#65a3a5958a1c5b63a706e1b333d7cd9f630d3fa5" @@ -7096,23 +6799,11 @@ is-mobile@^2.1.0: resolved "https://registry.yarnpkg.com/is-mobile/-/is-mobile-2.2.2.tgz#f6c9c5d50ee01254ce05e739bdd835f1ed4e9954" integrity sha512-wW/SXnYJkTjs++tVK5b6kVITZpAZPtUrt9SF80vvxGiF/Oywal+COk1jlRkiVq15RFNEQKQY31TkV24/1T5cVg== -is-negative-zero@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" - integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== - is-npm@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-5.0.0.tgz#43e8d65cc56e1b67f8d47262cf667099193f45a8" integrity sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA== -is-number-object@^1.0.4: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" - integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== - dependencies: - has-tostringtag "^1.0.0" - is-number@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" @@ -7160,14 +6851,6 @@ is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - is-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" @@ -7178,13 +6861,6 @@ is-root@^2.1.0: resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c" integrity sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg== -is-shared-array-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" - integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== - dependencies: - call-bind "^1.0.2" - is-stream@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -7195,43 +6871,11 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== -is-string@^1.0.5, is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== - dependencies: - has-tostringtag "^1.0.0" - -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" - integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== - dependencies: - has-symbols "^1.0.2" - -is-typed-array@^1.1.10, is-typed-array@^1.1.9: - version "1.1.10" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" - integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - is-typedarray@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== -is-weakref@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" - integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== - dependencies: - call-bind "^1.0.2" - is-whitespace-character@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz#0858edd94a95594c7c9dd0b5c174ec6e45ee4aa7" @@ -7259,11 +6903,6 @@ isarray@0.0.1: resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== -isarray@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" - integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== - isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -8079,7 +7718,7 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -make-dir@^2.0.0, make-dir@^2.1.0: +make-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== @@ -8094,11 +7733,6 @@ make-dir@^3.0.0, make-dir@^3.0.2, make-dir@^3.1.0: dependencies: semver "^6.0.0" -make-error@^1.1.1: - version "1.3.6" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" - integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== - make-iterator@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6" @@ -8408,14 +8042,6 @@ node-emoji@^1.10.0: dependencies: lodash "^4.17.21" -node-environment-flags@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" - integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== - dependencies: - object.getownpropertydescriptors "^2.0.3" - semver "^5.7.0" - node-fetch@^1.0.1: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" @@ -8509,7 +8135,7 @@ object-assign@4.x, object-assign@^4.1.0, object-assign@^4.1.1: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== -object-inspect@^1.12.3, object-inspect@^1.9.0: +object-inspect@^1.9.0: version "1.12.3" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== @@ -8519,7 +8145,7 @@ object-keys@^1.1.1: resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@^4.1.0, object.assign@^4.1.4: +object.assign@^4.1.0: version "4.1.4" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== @@ -8539,17 +8165,6 @@ object.defaults@^1.0.0: for-own "^1.0.0" isobject "^3.0.0" -object.getownpropertydescriptors@^2.0.3: - version "2.1.6" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.6.tgz#5e5c384dd209fa4efffead39e3a0512770ccc312" - integrity sha512-lq+61g26E/BgHv0ZTFgRvi7NMEPuAxLkFU7rukXjc/AlwH4Am5xXVnIXy3un1bg/JPbXHrixRkK1itUzzPiIjQ== - dependencies: - array.prototype.reduce "^1.0.5" - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.21.2" - safe-array-concat "^1.0.0" - object.reduce@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object.reduce/-/object.reduce-1.0.1.tgz#6fe348f2ac7fa0f95ca621226599096825bb03ad" @@ -8746,11 +8361,6 @@ parse-numeric-range@^1.3.0: resolved "https://registry.yarnpkg.com/parse-numeric-range/-/parse-numeric-range-1.3.0.tgz#7c63b61190d61e4d53a1197f0c83c47bb670ffa3" integrity sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ== -parse-passwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" - integrity sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q== - parse5-htmlparser2-tree-adapter@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz#23c2cc233bcf09bb7beba8b8a69d46b08c62c2f1" @@ -8856,18 +8466,11 @@ pify@^4.0.1: resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== -pirates@^4.0.4, pirates@^4.0.5: +pirates@^4.0.4: version "4.0.5" resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== -pkg-dir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" - integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== - dependencies: - find-up "^3.0.0" - pkg-dir@^4.1.0, pkg-dir@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" @@ -10077,15 +9680,6 @@ regenerator-transform@^0.15.1: dependencies: "@babel/runtime" "^7.8.4" -regexp.prototype.flags@^1.4.3: - version "1.5.0" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz#fe7ce25e7e4cca8db37b6634c8a2c7009199b9cb" - integrity sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - functions-have-names "^1.2.3" - regexpp@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" @@ -10364,16 +9958,6 @@ rxjs@^7.5.4: dependencies: tslib "^2.1.0" -safe-array-concat@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.0.tgz#2064223cba3c08d2ee05148eedbc563cd6d84060" - integrity sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.0" - has-symbols "^1.0.3" - isarray "^2.0.5" - safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -10384,15 +9968,6 @@ safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.1.0, safe-buffer@~5.2.0: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -safe-regex-test@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" - integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" - is-regex "^1.1.4" - "safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -10480,7 +10055,7 @@ semver-diff@^3.1.1: dependencies: semver "^6.3.0" -semver@^5.4.1, semver@^5.6.0, semver@^5.7.0: +semver@^5.4.1, semver@^5.6.0: version "5.7.2" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== @@ -10705,7 +10280,7 @@ source-map-support@0.5.13: buffer-from "^1.0.0" source-map "^0.6.0" -source-map-support@^0.5.16, source-map-support@~0.5.20: +source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== @@ -10824,33 +10399,6 @@ string-width@^5.0.1: emoji-regex "^9.2.2" strip-ansi "^7.0.1" -string.prototype.trim@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533" - integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string.prototype.trimend@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" - integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - -string.prototype.trimstart@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" - integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -11119,25 +10667,6 @@ trough@^1.0.0: resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.5.tgz#b8b639cefad7d0bb2abd37d433ff8293efa5f406" integrity sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA== -ts-node@^10.9.1: - version "10.9.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" - integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== - dependencies: - "@cspotcode/source-map-support" "^0.8.0" - "@tsconfig/node10" "^1.0.7" - "@tsconfig/node12" "^1.0.7" - "@tsconfig/node14" "^1.0.0" - "@tsconfig/node16" "^1.0.2" - acorn "^8.4.1" - acorn-walk "^8.1.1" - arg "^4.1.0" - create-require "^1.1.0" - diff "^4.0.1" - make-error "^1.1.1" - v8-compile-cache-lib "^3.0.1" - yn "3.1.1" - tslib@^1.8.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" @@ -11200,15 +10729,6 @@ type@^2.7.2: resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== -typed-array-length@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" - integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== - dependencies: - call-bind "^1.0.2" - for-each "^0.3.3" - is-typed-array "^1.1.9" - typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" @@ -11231,16 +10751,6 @@ ua-parser-js@^1.0.35: resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-1.0.35.tgz#c4ef44343bc3db0a3cbefdf21822f1b1fc1ab011" integrity sha512-fKnGuqmTBnIE+/KXSzCn4db8RTigUzw1AN0DmdU6hJovUTbYJKyqj+8Mt1c4VfRDnOVJnENmfYkIPZ946UrSAA== -unbox-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" - integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== - dependencies: - call-bind "^1.0.2" - has-bigints "^1.0.2" - has-symbols "^1.0.3" - which-boxed-primitive "^1.0.2" - undertaker-registry@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/undertaker-registry/-/undertaker-registry-1.0.1.tgz#5e4bda308e4a8a2ae584f9b9a4359a499825cc50" @@ -11508,11 +11018,6 @@ uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -v8-compile-cache-lib@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" - integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== - v8-to-istanbul@^9.0.1: version "9.0.1" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz#b6f994b0b5d4ef255e17a0d17dc444a9f5132fa4" @@ -11522,13 +11027,6 @@ v8-to-istanbul@^9.0.1: "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^1.6.0" -v8flags@^3.1.1: - version "3.2.0" - resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.2.0.tgz#b243e3b4dfd731fa774e7492128109a0fe66d656" - integrity sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg== - dependencies: - homedir-polyfill "^1.0.1" - validator@^13.7.0: version "13.7.0" resolved "https://registry.yarnpkg.com/validator/-/validator-13.7.0.tgz#4f9658ba13ba8f3d82ee881d3516489ea85c0857" @@ -11768,29 +11266,6 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" - -which-typed-array@^1.1.9: - version "1.1.9" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" - integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - is-typed-array "^1.1.10" - which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" @@ -11960,11 +11435,6 @@ yargs@^17.3.1: y18n "^5.0.5" yargs-parser "^21.1.1" -yn@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" - integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== - yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" -- 2.50.1.windows.1 From 7c383affe7bb64600b8dc041124e0811d4fedbec Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 19 Oct 2023 05:04:43 -0700 Subject: [PATCH 02/18] Fix missed change --- javascript/just.config.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/just.config.cjs b/javascript/just.config.cjs index 11505079..096352ec 100644 --- a/javascript/just.config.cjs +++ b/javascript/just.config.cjs @@ -65,7 +65,7 @@ task( 'benchmark', series( emcmakeGenerateTask(), - cmakeBuildTask({targets: ['node']}), + cmakeBuildTask({targets: ['web']}), runBenchTask(), ), ); -- 2.50.1.windows.1 From e812f5328dcc378fbe84265949aff1cd3a12ed9f Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 19 Oct 2023 05:07:48 -0700 Subject: [PATCH 03/18] Fix noop change --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 6453741f..e6f69ce2 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,5 @@ "eslint-plugin-prettier": "^4.2.1", "prettier": "2.8.8", "typescript": "5.0.4" - }, - "dependencies": {} + } } -- 2.50.1.windows.1 From 85f4d8f942b060d34af74b017b8e4c79b0851c51 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 19 Oct 2023 05:15:20 -0700 Subject: [PATCH 04/18] . --- .eslintrc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 0da671fa..b22edd03 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -35,7 +35,7 @@ module.exports = { }, overrides: [ { - files: ['**/*.ts', '**/*.cts', '**/*.mts'], + files: ['**/*.ts', '**/*.cts', '**/*.mts', '**/*.tsx'], extends: ['plugin:@typescript-eslint/recommended'], parser: '@typescript-eslint/parser', parserOptions: { -- 2.50.1.windows.1 From 41c2b41eb60ff24d91e75c6d2269d5736579f14c Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 19 Oct 2023 18:04:08 -0700 Subject: [PATCH 05/18] Update to version of "@babel/preset-typescript" that includes "rewriteImportExtensions" --- javascript/package.json | 8 +- yarn.lock | 1393 +++++++++------------------------------ 2 files changed, 325 insertions(+), 1076 deletions(-) diff --git a/javascript/package.json b/javascript/package.json index 59787789..13fecd92 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -28,10 +28,10 @@ "tsc": "tsc --noEmit" }, "devDependencies": { - "@babel/cli": "^7.21.4", - "@babel/core": "^7.21.4", - "@babel/preset-env": "^7.21.4", - "@babel/preset-typescript": "^7.21.4", + "@babel/cli": "^7.23.0", + "@babel/core": "^7.23.0", + "@babel/preset-env": "^7.23.0", + "@babel/preset-typescript": "^7.23.0", "@types/glob": "^8.1.0", "@types/jest": "^29.5.1", "@types/node": "^16.18.25", diff --git a/yarn.lock b/yarn.lock index 9e808326..8f0a68b0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -138,14 +138,6 @@ "@algolia/logger-common" "4.17.2" "@algolia/requester-common" "4.17.2" -"@ampproject/remapping@^2.1.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" - integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== - dependencies: - "@jridgewell/gen-mapping" "^0.1.0" - "@jridgewell/trace-mapping" "^0.3.9" - "@ampproject/remapping@^2.2.0": version "2.2.1" resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" @@ -187,14 +179,14 @@ resolved "https://registry.yarnpkg.com/@ant-design/icons/-/icons-2.1.1.tgz#7b9c08dffd4f5d41db667d9dbe5e0107d0bd9a4a" integrity sha512-jCH+k2Vjlno4YWl6g535nHR09PwCEmTBKAG6VqF+rhkrSPRLfgpU2maagwbZPLjaHuU5Jd1DFQ2KJpQuI6uG8w== -"@babel/cli@^7.21.4": - version "7.22.9" - resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.22.9.tgz#501b3614aeda7399371f6d5991404f069b059986" - integrity sha512-nb2O7AThqRo7/E53EGiuAkMaRbb7J5Qp3RvN+dmua1U+kydm0oznkhqbTEG15yk26G/C3yL6OdZjzgl+DMXVVA== +"@babel/cli@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.23.0.tgz#1d7f37c44d4117c67df46749e0c86e11a58cc64b" + integrity sha512-17E1oSkGk2IwNILM4jtfAvgjt+ohmpfBky8aLerUfYZhiPNg7ca+CRCxZn8QDxwNhV/upsc2VHBCqGFIR+iBfA== dependencies: "@jridgewell/trace-mapping" "^0.3.17" commander "^4.0.1" - convert-source-map "^1.1.0" + convert-source-map "^2.0.0" fs-readdir-recursive "^1.1.0" glob "^7.2.0" make-dir "^2.1.0" @@ -203,21 +195,7 @@ "@nicolo-ribaudo/chokidar-2" "2.1.8-no-fsevents.3" chokidar "^3.4.0" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.18.6": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.21.4.tgz#d0fa9e4413aca81f2b23b9442797bda1826edb39" - integrity sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g== - dependencies: - "@babel/highlight" "^7.18.6" - -"@babel/code-frame@^7.10.4", "@babel/code-frame@^7.16.0", "@babel/code-frame@^7.22.5", "@babel/code-frame@^7.8.3": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.5.tgz#234d98e1551960604f1246e6475891a570ad5658" - integrity sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ== - dependencies: - "@babel/highlight" "^7.22.5" - -"@babel/code-frame@^7.22.13": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.0", "@babel/code-frame@^7.22.13", "@babel/code-frame@^7.8.3": version "7.22.13" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e" integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w== @@ -225,20 +203,10 @@ "@babel/highlight" "^7.22.13" chalk "^2.4.2" -"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.5": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.5.tgz#86f172690b093373a933223b4745deeb6049e733" - integrity sha512-KZXo2t10+/jxmkhNXc7pZTqRvSOIvVv/+lJwHS+B2rErwOyjuVRh60yVpb7liQ1U5t7lLJ1bz+t8tSypUZdm0g== - -"@babel/compat-data@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.5.tgz#b1f6c86a02d85d2dd3368a2b67c09add8cd0c255" - integrity sha512-4Jc/YuIaYqKnDDz892kPIledykKg12Aw1PYX5i/TY28anJtacvM1Rrr8wbieB9GfEJwlzqT0hUEao0CxEebiDA== - -"@babel/compat-data@^7.22.6", "@babel/compat-data@^7.22.9": - version "7.22.9" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.9.tgz#71cdb00a1ce3a329ce4cbec3a44f9fef35669730" - integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== +"@babel/compat-data@^7.22.6", "@babel/compat-data@^7.22.9", "@babel/compat-data@^7.23.2": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.2.tgz#6a12ced93455827037bfb5ed8492820d60fc32cc" + integrity sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ== "@babel/core@7.12.9": version "7.12.9" @@ -262,100 +230,28 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@^7.11.6", "@babel/core@^7.12.3": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.7.tgz#37072f951bd4d28315445f66e0ec9f6ae0c8c35f" - integrity sha512-t1ZjCluspe5DW24bn2Rr1CDb2v9rn/hROtg9a2tmd0+QYf4bsloYfLQzjG4qHPNMhWtKdGC33R5AxGR2Af2cBw== - dependencies: - "@ampproject/remapping" "^2.1.0" - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.20.7" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-module-transforms" "^7.20.7" - "@babel/helpers" "^7.20.7" - "@babel/parser" "^7.20.7" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.7" - "@babel/types" "^7.20.7" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.1" - semver "^6.3.0" - -"@babel/core@^7.18.6", "@babel/core@^7.19.6": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.5.tgz#d67d9747ecf26ee7ecd3ebae1ee22225fe902a89" - integrity sha512-SBuTAjg91A3eKOvD+bPEz3LlhHZRNu1nFOVts9lzDJTXshHTjII0BAtDS3Y2DAkdZdDKWVZGVwkDfc4Clxn1dg== +"@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.18.6", "@babel/core@^7.19.6", "@babel/core@^7.23.0": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.2.tgz#ed10df0d580fff67c5f3ee70fd22e2e4c90a9f94" + integrity sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ== dependencies: "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.22.5" - "@babel/generator" "^7.22.5" - "@babel/helper-compilation-targets" "^7.22.5" - "@babel/helper-module-transforms" "^7.22.5" - "@babel/helpers" "^7.22.5" - "@babel/parser" "^7.22.5" - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.5" - "@babel/types" "^7.22.5" - convert-source-map "^1.7.0" + "@babel/code-frame" "^7.22.13" + "@babel/generator" "^7.23.0" + "@babel/helper-compilation-targets" "^7.22.15" + "@babel/helper-module-transforms" "^7.23.0" + "@babel/helpers" "^7.23.2" + "@babel/parser" "^7.23.0" + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.2" + "@babel/types" "^7.23.0" + convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" - json5 "^2.2.2" - semver "^6.3.0" - -"@babel/core@^7.21.4": - version "7.22.9" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.9.tgz#bd96492c68822198f33e8a256061da3cf391f58f" - integrity sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.22.5" - "@babel/generator" "^7.22.9" - "@babel/helper-compilation-targets" "^7.22.9" - "@babel/helper-module-transforms" "^7.22.9" - "@babel/helpers" "^7.22.6" - "@babel/parser" "^7.22.7" - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.8" - "@babel/types" "^7.22.5" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.2" + json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.12.5", "@babel/generator@^7.18.7", "@babel/generator@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.5.tgz#1e7bf768688acfb05cf30b2369ef855e82d984f7" - integrity sha512-+lcUbnTRhd0jOewtFSedLyiPsD5tswKkbgcezOqqWFUVNEwoUTlpPOBmvhG7OXWLR4jMdv0czPGH5XbflnD1EA== - dependencies: - "@babel/types" "^7.22.5" - "@jridgewell/gen-mapping" "^0.3.2" - "@jridgewell/trace-mapping" "^0.3.17" - jsesc "^2.5.1" - -"@babel/generator@^7.20.7", "@babel/generator@^7.7.2": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.5.tgz#c0c0e5449504c7b7de8236d99338c3e2a340745f" - integrity sha512-SrKK/sRv8GesIW1bDagf9cCG38IOMYZusoe1dfg0D8aiUe3Amvoj1QtjTPAWcfrZFvIwlleLb0gxzQidL9w14w== - dependencies: - "@babel/types" "^7.21.5" - "@jridgewell/gen-mapping" "^0.3.2" - "@jridgewell/trace-mapping" "^0.3.17" - jsesc "^2.5.1" - -"@babel/generator@^7.22.9": - version "7.22.9" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.9.tgz#572ecfa7a31002fa1de2a9d91621fd895da8493d" - integrity sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw== - dependencies: - "@babel/types" "^7.22.5" - "@jridgewell/gen-mapping" "^0.3.2" - "@jridgewell/trace-mapping" "^0.3.17" - jsesc "^2.5.1" - -"@babel/generator@^7.23.0": +"@babel/generator@^7.12.5", "@babel/generator@^7.18.7", "@babel/generator@^7.23.0", "@babel/generator@^7.7.2": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.0.tgz#df5c386e2218be505b34837acbcb874d7a983420" integrity sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g== @@ -365,13 +261,6 @@ "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" -"@babel/helper-annotate-as-pure@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" - integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== - dependencies: - "@babel/types" "^7.18.6" - "@babel/helper-annotate-as-pure@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz#e7f06737b197d580a01edf75d97e2c8be99d3882" @@ -386,78 +275,33 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz#a6cd33e93629f5eb473b021aac05df62c4cd09bb" - integrity sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ== - dependencies: - "@babel/compat-data" "^7.20.5" - "@babel/helper-validator-option" "^7.18.6" - browserslist "^4.21.3" - lru-cache "^5.1.1" - semver "^6.3.0" - -"@babel/helper-compilation-targets@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.5.tgz#fc7319fc54c5e2fa14b2909cf3c5fd3046813e02" - integrity sha512-Ji+ywpHeuqxB8WDxraCiqR0xfhYjiDE/e6k7FuIaANnoOFxAHskHChz4vA1mJC9Lbm01s1PVAGhQY4FUKSkGZw== - dependencies: - "@babel/compat-data" "^7.22.5" - "@babel/helper-validator-option" "^7.22.5" - browserslist "^4.21.3" - lru-cache "^5.1.1" - semver "^6.3.0" - -"@babel/helper-compilation-targets@^7.22.6", "@babel/helper-compilation-targets@^7.22.9": - version "7.22.9" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.9.tgz#f9d0a7aaaa7cd32a3f31c9316a69f5a9bcacb892" - integrity sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw== +"@babel/helper-compilation-targets@^7.22.15", "@babel/helper-compilation-targets@^7.22.5", "@babel/helper-compilation-targets@^7.22.6": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz#0698fc44551a26cf29f18d4662d5bf545a6cfc52" + integrity sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw== dependencies: "@babel/compat-data" "^7.22.9" - "@babel/helper-validator-option" "^7.22.5" + "@babel/helper-validator-option" "^7.22.15" browserslist "^4.21.9" lru-cache "^5.1.1" semver "^6.3.1" -"@babel/helper-create-class-features-plugin@^7.21.0": - version "7.21.8" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.8.tgz#205b26330258625ef8869672ebca1e0dee5a0f02" - integrity sha512-+THiN8MqiH2AczyuZrnrKL6cAxFRRQDKW9h1YkBvbgKmAm6mwiacig1qT73DHIWMGo40GRnsEfN3LA+E6NtmSw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.21.5" - "@babel/helper-function-name" "^7.21.0" - "@babel/helper-member-expression-to-functions" "^7.21.5" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-replace-supers" "^7.21.5" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/helper-split-export-declaration" "^7.18.6" - semver "^6.3.0" - -"@babel/helper-create-class-features-plugin@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.5.tgz#2192a1970ece4685fbff85b48da2c32fcb130b7c" - integrity sha512-xkb58MyOYIslxu3gKmVXmjTtUPvBU4odYzbiIQbWwLKIHCsx6UGZGX6F1IznMFVnDdirseUZopzN+ZRt8Xb33Q== +"@babel/helper-create-class-features-plugin@^7.22.11", "@babel/helper-create-class-features-plugin@^7.22.15", "@babel/helper-create-class-features-plugin@^7.22.5": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.15.tgz#97a61b385e57fe458496fad19f8e63b63c867de4" + integrity sha512-jKkwA59IXcvSaiK2UN45kKwSC9o+KuoXsBDvHvU/7BecYIp8GQ2UwrVvFgJASUT+hBnwJx6MhvMCuMzwZZ7jlg== dependencies: "@babel/helper-annotate-as-pure" "^7.22.5" "@babel/helper-environment-visitor" "^7.22.5" "@babel/helper-function-name" "^7.22.5" - "@babel/helper-member-expression-to-functions" "^7.22.5" + "@babel/helper-member-expression-to-functions" "^7.22.15" "@babel/helper-optimise-call-expression" "^7.22.5" - "@babel/helper-replace-supers" "^7.22.5" + "@babel/helper-replace-supers" "^7.22.9" "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.5" - semver "^6.3.0" + "@babel/helper-split-export-declaration" "^7.22.6" + semver "^6.3.1" -"@babel/helper-create-regexp-features-plugin@^7.18.6": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.20.5.tgz#5ea79b59962a09ec2acf20a963a01ab4d076ccca" - integrity sha512-m68B1lkg3XDGX5yCvGO0kPx3v9WIYLnzjKfPcQiwntEQa5ZeRkPmo2X/ISJc8qxWGfwUr+kvZAeEzAwLec2r2w== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - regexpu-core "^5.2.1" - -"@babel/helper-create-regexp-features-plugin@^7.22.5": +"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.5.tgz#bb2bf0debfe39b831986a4efbf4066586819c6e4" integrity sha512-1VpEFOIbMRaXyDeUwUfmTIxExLwQ+zkW+Bh5zXpApA3oQedBx9v/updixWxnx/bZpKw7u8VxWjb/qWpIcmPq8A== @@ -466,22 +310,10 @@ regexpu-core "^5.3.1" semver "^6.3.0" -"@babel/helper-define-polyfill-provider@^0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.0.tgz#487053f103110f25b9755c5980e031e93ced24d8" - integrity sha512-RnanLx5ETe6aybRi1cO/edaRH+bNYWaryCEmjDDYyNr4wnSzyOp8T0dWipmqVHKEY3AbVKUom50AKSlj1zmKbg== - dependencies: - "@babel/helper-compilation-targets" "^7.17.7" - "@babel/helper-plugin-utils" "^7.16.7" - debug "^4.1.1" - lodash.debounce "^4.0.8" - resolve "^1.14.2" - semver "^6.1.2" - -"@babel/helper-define-polyfill-provider@^0.4.1": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.1.tgz#af1429c4a83ac316a6a8c2cc8ff45cb5d2998d3a" - integrity sha512-kX4oXixDxG197yhX+J3Wp+NpL2wuCFjWQAr6yX2jtCnflK9ulMI51ULFGIrWiX1jGfvAxdHp+XQCcP2bZGPs9A== +"@babel/helper-define-polyfill-provider@^0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.3.tgz#a71c10f7146d809f4a256c373f462d9bba8cf6ba" + integrity sha512-WBrLmuPP47n7PNwsZ57pqam6G/RGo1vw/87b0Blc53tZNGZ4x7YvZ6HgQe2vo1W/FR20OgjeZuGXzudPiXHFug== dependencies: "@babel/helper-compilation-targets" "^7.22.6" "@babel/helper-plugin-utils" "^7.22.5" @@ -489,38 +321,12 @@ lodash.debounce "^4.0.8" resolve "^1.14.2" -"@babel/helper-environment-visitor@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.21.5.tgz#c769afefd41d171836f7cb63e295bedf689d48ba" - integrity sha512-IYl4gZ3ETsWocUWgsFZLM5i1BYx9SoemminVEXadgLBa9TdeorzgLKm8wWLA6J1N/kT3Kch8XIk1laNzYoHKvQ== - -"@babel/helper-environment-visitor@^7.22.20": +"@babel/helper-environment-visitor@^7.22.20", "@babel/helper-environment-visitor@^7.22.5": version "7.22.20" resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== -"@babel/helper-environment-visitor@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz#f06dd41b7c1f44e1f8da6c4055b41ab3a09a7e98" - integrity sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q== - -"@babel/helper-function-name@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz#d552829b10ea9f120969304023cd0645fa00b1b4" - integrity sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg== - dependencies: - "@babel/template" "^7.20.7" - "@babel/types" "^7.21.0" - -"@babel/helper-function-name@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz#ede300828905bb15e582c037162f99d5183af1be" - integrity sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ== - dependencies: - "@babel/template" "^7.22.5" - "@babel/types" "^7.22.5" - -"@babel/helper-function-name@^7.23.0": +"@babel/helper-function-name@^7.22.5", "@babel/helper-function-name@^7.23.0": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== @@ -535,79 +341,30 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-member-expression-to-functions@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.21.5.tgz#3b1a009af932e586af77c1030fba9ee0bde396c0" - integrity sha512-nIcGfgwpH2u4n9GG1HpStW5Ogx7x7ekiFHbjjFRKXbn5zUvqO9ZgotCO4x1aNbKn/x/xOUaXEhyNHCwtFCpxWg== +"@babel/helper-member-expression-to-functions@^7.22.15": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz#9263e88cc5e41d39ec18c9a3e0eced59a3e7d366" + integrity sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA== dependencies: - "@babel/types" "^7.21.5" + "@babel/types" "^7.23.0" -"@babel/helper-member-expression-to-functions@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.22.5.tgz#0a7c56117cad3372fbf8d2fb4bf8f8d64a1e76b2" - integrity sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ== +"@babel/helper-module-imports@^7.22.15", "@babel/helper-module-imports@^7.22.5": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz#16146307acdc40cc00c3b2c647713076464bdbf0" + integrity sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w== dependencies: - "@babel/types" "^7.22.5" + "@babel/types" "^7.22.15" -"@babel/helper-module-imports@^7.21.4": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.21.4.tgz#ac88b2f76093637489e718a90cec6cf8a9b029af" - integrity sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg== +"@babel/helper-module-transforms@^7.12.1", "@babel/helper-module-transforms@^7.22.5", "@babel/helper-module-transforms@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz#3ec246457f6c842c0aee62a01f60739906f7047e" + integrity sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw== dependencies: - "@babel/types" "^7.21.4" - -"@babel/helper-module-imports@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz#1a8f4c9f4027d23f520bd76b364d44434a72660c" - integrity sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-module-transforms@^7.12.1", "@babel/helper-module-transforms@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.22.5.tgz#0f65daa0716961b6e96b164034e737f60a80d2ef" - integrity sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw== - dependencies: - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-module-imports" "^7.22.5" - "@babel/helper-simple-access" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.5" - "@babel/helper-validator-identifier" "^7.22.5" - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.5" - "@babel/types" "^7.22.5" - -"@babel/helper-module-transforms@^7.20.7", "@babel/helper-module-transforms@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.21.5.tgz#d937c82e9af68d31ab49039136a222b17ac0b420" - integrity sha512-bI2Z9zBGY2q5yMHoBvJ2a9iX3ZOAzJPm7Q8Yz6YeoUjU/Cvhmi2G4QyTNyPBqqXSgTjUxRg3L0xV45HvkNWWBw== - dependencies: - "@babel/helper-environment-visitor" "^7.21.5" - "@babel/helper-module-imports" "^7.21.4" - "@babel/helper-simple-access" "^7.21.5" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/helper-validator-identifier" "^7.19.1" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.5" - "@babel/types" "^7.21.5" - -"@babel/helper-module-transforms@^7.22.9": - version "7.22.9" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz#92dfcb1fbbb2bc62529024f72d942a8c97142129" - integrity sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ== - dependencies: - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-module-imports" "^7.22.5" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-module-imports" "^7.22.15" "@babel/helper-simple-access" "^7.22.5" "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/helper-validator-identifier" "^7.22.5" - -"@babel/helper-optimise-call-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" - integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== - dependencies: - "@babel/types" "^7.18.6" + "@babel/helper-validator-identifier" "^7.22.20" "@babel/helper-optimise-call-expression@^7.22.5": version "7.22.5" @@ -621,56 +378,28 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.21.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.21.5.tgz#345f2377d05a720a4e5ecfa39cbf4474a4daed56" - integrity sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg== - -"@babel/helper-plugin-utils@^7.22.5": +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== -"@babel/helper-remap-async-to-generator@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.5.tgz#14a38141a7bf2165ad38da61d61cf27b43015da2" - integrity sha512-cU0Sq1Rf4Z55fgz7haOakIyM7+x/uCFwXpLPaeRzfoUtAEAuUZjZvFPjL/rk5rW693dIgn2hng1W7xbT7lWT4g== +"@babel/helper-remap-async-to-generator@^7.22.20", "@babel/helper-remap-async-to-generator@^7.22.5": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz#7b68e1cb4fa964d2996fd063723fb48eca8498e0" + integrity sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw== dependencies: "@babel/helper-annotate-as-pure" "^7.22.5" - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-wrap-function" "^7.22.5" - "@babel/types" "^7.22.5" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-wrap-function" "^7.22.20" -"@babel/helper-replace-supers@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.21.5.tgz#a6ad005ba1c7d9bc2973dfde05a1bba7065dde3c" - integrity sha512-/y7vBgsr9Idu4M6MprbOVUfH3vs7tsIfnVWv/Ml2xgwvyH6LTngdfbf5AdsKwkJy4zgy1X/kuNrEKvhhK28Yrg== +"@babel/helper-replace-supers@^7.22.5", "@babel/helper-replace-supers@^7.22.9": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz#e37d367123ca98fe455a9887734ed2e16eb7a793" + integrity sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw== dependencies: - "@babel/helper-environment-visitor" "^7.21.5" - "@babel/helper-member-expression-to-functions" "^7.21.5" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.5" - "@babel/types" "^7.21.5" - -"@babel/helper-replace-supers@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.22.5.tgz#71bc5fb348856dea9fdc4eafd7e2e49f585145dc" - integrity sha512-aLdNM5I3kdI/V9xGNyKSF3X/gTyMUBohTZ+/3QdQKAA9vxIiy12E+8E2HoOP1/DjeqU+g6as35QHJNMDDYpuCg== - dependencies: - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-member-expression-to-functions" "^7.22.5" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-member-expression-to-functions" "^7.22.15" "@babel/helper-optimise-call-expression" "^7.22.5" - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.5" - "@babel/types" "^7.22.5" - -"@babel/helper-simple-access@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.21.5.tgz#d697a7971a5c39eac32c7e63c0921c06c8a249ee" - integrity sha512-ENPDAMC1wAjR0uaCUwliBdiSl1KBJAVnMTzXqi64c2MG8MPR6ii4qf7bSXDqSFbr4W6W028/rf5ivoHop5/mkg== - dependencies: - "@babel/types" "^7.21.5" "@babel/helper-simple-access@^7.22.5": version "7.22.5" @@ -679,13 +408,6 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-skip-transparent-expression-wrappers@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz#fbe4c52f60518cab8140d77101f0e63a8a230684" - integrity sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg== - dependencies: - "@babel/types" "^7.20.0" - "@babel/helper-skip-transparent-expression-wrappers@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz#007f15240b5751c537c40e77abb4e89eeaaa8847" @@ -693,20 +415,6 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-split-export-declaration@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" - integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-split-export-declaration@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.5.tgz#88cf11050edb95ed08d596f7a044462189127a08" - integrity sha512-thqK5QFghPKWLhAV321lxF95yCg2K3Ob5yw+M3VHWfdia0IkPXUtoLH8x/6Fh486QUvzhb8YOWHChTVen2/PoQ== - dependencies: - "@babel/types" "^7.22.5" - "@babel/helper-split-export-declaration@^7.22.6": version "7.22.6" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" @@ -714,86 +422,38 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-string-parser@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.21.5.tgz#2b3eea65443c6bdc31c22d037c65f6d323b6b2bd" - integrity sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w== - "@babel/helper-string-parser@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== -"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" - integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== - "@babel/helper-validator-identifier@^7.22.20": version "7.22.20" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== -"@babel/helper-validator-identifier@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz#9544ef6a33999343c8740fa51350f30eeaaaf193" - integrity sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ== +"@babel/helper-validator-option@^7.22.15", "@babel/helper-validator-option@^7.22.5": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz#694c30dfa1d09a6534cdfcafbe56789d36aba040" + integrity sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA== -"@babel/helper-validator-option@^7.18.6", "@babel/helper-validator-option@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz#8224c7e13ace4bafdc4004da2cf064ef42673180" - integrity sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ== - -"@babel/helper-validator-option@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz#de52000a15a177413c8234fa3a8af4ee8102d0ac" - integrity sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw== - -"@babel/helper-wrap-function@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.22.5.tgz#44d205af19ed8d872b4eefb0d2fa65f45eb34f06" - integrity sha512-bYqLIBSEshYcYQyfks8ewYA8S30yaGSeRslcvKMvoUk6HHPySbxHq9YRi6ghhzEU+yhQv9bP/jXnygkStOcqZw== +"@babel/helper-wrap-function@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.22.20.tgz#15352b0b9bfb10fc9c76f79f6342c00e3411a569" + integrity sha512-pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw== dependencies: "@babel/helper-function-name" "^7.22.5" - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.5" - "@babel/types" "^7.22.5" + "@babel/template" "^7.22.15" + "@babel/types" "^7.22.19" -"@babel/helpers@^7.12.5", "@babel/helpers@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.5.tgz#74bb4373eb390d1ceed74a15ef97767e63120820" - integrity sha512-pSXRmfE1vzcUIDFQcSGA5Mr+GxBV9oiRKDuDxXvWQQBCh8HoIjs/2DlDB7H8smac1IVrB9/xdXj2N3Wol9Cr+Q== +"@babel/helpers@^7.12.5", "@babel/helpers@^7.23.2": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.2.tgz#2832549a6e37d484286e15ba36a5330483cac767" + integrity sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ== dependencies: - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.5" - "@babel/types" "^7.22.5" - -"@babel/helpers@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.7.tgz#04502ff0feecc9f20ecfaad120a18f011a8e6dce" - integrity sha512-PBPjs5BppzsGaxHQCDKnZ6Gd9s6xl8bBCluz3vEInLGRJmnZan4F6BYCeqtyXqkk4W5IlPmjK4JlOuZkpJ3xZA== - dependencies: - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.7" - "@babel/types" "^7.20.7" - -"@babel/helpers@^7.22.6": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.6.tgz#8e61d3395a4f0c5a8060f309fb008200969b5ecd" - integrity sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA== - dependencies: - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.6" - "@babel/types" "^7.22.5" - -"@babel/highlight@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - chalk "^2.0.0" - js-tokens "^4.0.0" + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.2" + "@babel/types" "^7.23.0" "@babel/highlight@^7.22.13": version "7.22.20" @@ -804,50 +464,26 @@ chalk "^2.4.2" js-tokens "^4.0.0" -"@babel/highlight@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.5.tgz#aa6c05c5407a67ebce408162b7ede789b4d22031" - integrity sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw== - dependencies: - "@babel/helper-validator-identifier" "^7.22.5" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7": - version "7.21.8" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.21.8.tgz#642af7d0333eab9c0ad70b14ac5e76dbde7bfdf8" - integrity sha512-6zavDGdzG3gUqAdWvlLFfk+36RilI+Pwyuuh7HItyeScCWP3k6i8vKclAQ0bM/0y/Kz/xiwvxhMv9MgTJP5gmA== - -"@babel/parser@^7.12.7", "@babel/parser@^7.18.8", "@babel/parser@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.5.tgz#721fd042f3ce1896238cf1b341c77eb7dee7dbea" - integrity sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q== - -"@babel/parser@^7.22.15", "@babel/parser@^7.23.0": +"@babel/parser@^7.1.0", "@babel/parser@^7.12.7", "@babel/parser@^7.14.7", "@babel/parser@^7.18.8", "@babel/parser@^7.22.15", "@babel/parser@^7.23.0": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== -"@babel/parser@^7.22.7": - version "7.22.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.7.tgz#df8cf085ce92ddbdbf668a7f186ce848c9036cae" - integrity sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q== - -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.5.tgz#87245a21cd69a73b0b81bcda98d443d6df08f05e" - integrity sha512-NP1M5Rf+u2Gw9qfSO4ihjcTGW5zXTi36ITLd4/EoAcEhIZ0yjMqmftDNl3QC19CX7olhrjpyU454g/2W7X0jvQ== +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.15.tgz#02dc8a03f613ed5fdc29fb2f728397c78146c962" + integrity sha512-FB9iYlz7rURmRJyXRKEnalYPPdn87H5no108cyuQQyMwlpJ2SJtpIUBI27kdTin956pz+LPypkPVPUTlxOmrsg== dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.22.5.tgz#fef09f9499b1f1c930da8a0c419db42167d792ca" - integrity sha512-31Bb65aZaUwqCbWMnZPduIZxCBngHFlzyN6Dq6KAJjtx+lx6ohKHubc61OomYi7XwVD4Ol0XCVz4h+pYFR048g== +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.22.15.tgz#2aeb91d337d4e1a1e7ce85b76a37f5301781200f" + integrity sha512-Hyph9LseGvAeeXzikV88bczhsrLrIZqDPxO+sSmAunMPaGrBGhfMWzCPYTtiW9t+HzSE2wtV8e5cc5P6r1xMDQ== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" - "@babel/plugin-transform-optional-chaining" "^7.22.5" + "@babel/plugin-transform-optional-chaining" "^7.22.15" "@babel/plugin-proposal-object-rest-spread@7.12.1": version "7.12.1" @@ -863,14 +499,6 @@ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz#7844f9289546efa9febac2de4cfe358a050bd703" integrity sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w== -"@babel/plugin-proposal-unicode-property-regex@^7.4.4": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz#af613d2cd5e643643b65cded64207b15c85cb78e" - integrity sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" @@ -948,14 +576,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-jsx@^7.21.4", "@babel/plugin-syntax-jsx@^7.7.2": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.21.4.tgz#f264ed7bf40ffc9ec239edabc17a50c4f5b6fea2" - integrity sha512-5hewiLct5OKyh6PLKEYaFclcqtIgCb6bmELouxjF6up5q3Sov7rOayW4RwhbaBL0dit8rA80GNfY+UuDp2mBbQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-syntax-jsx@^7.22.5": +"@babel/plugin-syntax-jsx@^7.22.5", "@babel/plugin-syntax-jsx@^7.7.2": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz#a6b68e84fb76e759fc3b93e901876ffabbe1d918" integrity sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg== @@ -1018,14 +639,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-syntax-typescript@^7.20.0", "@babel/plugin-syntax-typescript@^7.7.2": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.21.4.tgz#2751948e9b7c6d771a8efa59340c15d4a2891ff8" - integrity sha512-xz0D39NvhQn4t4RNsHmDnnsaQizIlUkdtYvLs8La1BlfjQ6JEwxkJGeqJMW2tAXx+q6H+WFuUTXNdYVpEya0YA== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-syntax-typescript@^7.22.5": +"@babel/plugin-syntax-typescript@^7.22.5", "@babel/plugin-syntax-typescript@^7.7.2": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz#aac8d383b062c5072c647a31ef990c1d0af90272" integrity sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ== @@ -1047,24 +661,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-async-generator-functions@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.22.5.tgz#7336356d23380eda9a56314974f053a020dab0c3" - integrity sha512-gGOEvFzm3fWoyD5uZq7vVTD57pPJ3PczPUD/xCFGjzBpUosnklmXyKnGQbbbGs1NPNPskFex0j93yKbHt0cHyg== +"@babel/plugin-transform-async-generator-functions@^7.23.2": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.2.tgz#054afe290d64c6f576f371ccc321772c8ea87ebb" + integrity sha512-BBYVGxbDVHfoeXbOwcagAkOQAm9NxoTdMGfTqghu1GrvadSaw6iW3Je6IcL5PNOw8VwjxqBECXy50/iCQSY/lQ== dependencies: - "@babel/helper-environment-visitor" "^7.22.5" + "@babel/helper-environment-visitor" "^7.22.20" "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-remap-async-to-generator" "^7.22.5" - "@babel/plugin-syntax-async-generators" "^7.8.4" - -"@babel/plugin-transform-async-generator-functions@^7.22.7": - version "7.22.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.22.7.tgz#053e76c0a903b72b573cb1ab7d6882174d460a1b" - integrity sha512-7HmE7pk/Fmke45TODvxvkxRMV9RazV+ZZzhOL9AG8G29TLrr3jkjwF7uJfxZ30EoXpO+LJkq4oA8NjO2DTnEDg== - dependencies: - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-remap-async-to-generator" "^7.22.5" + "@babel/helper-remap-async-to-generator" "^7.22.20" "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-transform-async-to-generator@^7.22.5": @@ -1083,10 +687,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-block-scoping@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.22.5.tgz#8bfc793b3a4b2742c0983fadc1480d843ecea31b" - integrity sha512-EcACl1i5fSQ6bt+YGuU/XGCeZKStLmyVGytWkpyhCLeQVA0eu6Wtiw92V+I1T/hnezUv7j74dA/Ro69gWcU+hg== +"@babel/plugin-transform-block-scoping@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.0.tgz#8744d02c6c264d82e1a4bc5d2d501fd8aff6f022" + integrity sha512-cOsrbmIOXmf+5YbL99/S49Y3j46k/T16b9ml8bm9lP6N9US5iQ2yBK7gpui1pg0V/WMcXdkfKbTb7HXq9u+v4g== dependencies: "@babel/helper-plugin-utils" "^7.22.5" @@ -1098,42 +702,27 @@ "@babel/helper-create-class-features-plugin" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-class-static-block@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.22.5.tgz#3e40c46f048403472d6f4183116d5e46b1bff5ba" - integrity sha512-SPToJ5eYZLxlnp1UzdARpOGeC2GbHvr9d/UV0EukuVx8atktg194oe+C5BqQ8jRTkgLRVOPYeXRSBg1IlMoVRA== +"@babel/plugin-transform-class-static-block@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.22.11.tgz#dc8cc6e498f55692ac6b4b89e56d87cec766c974" + integrity sha512-GMM8gGmqI7guS/llMFk1bJDkKfn3v3C4KHK9Yg1ey5qcHcOlKb0QvcMrgzvxo+T03/4szNh5lghY+fEC98Kq9g== dependencies: - "@babel/helper-create-class-features-plugin" "^7.22.5" + "@babel/helper-create-class-features-plugin" "^7.22.11" "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-class-static-block" "^7.14.5" -"@babel/plugin-transform-classes@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.5.tgz#635d4e98da741fad814984639f4c0149eb0135e1" - integrity sha512-2edQhLfibpWpsVBx2n/GKOz6JdGQvLruZQfGr9l1qes2KQaWswjBzhQF7UDUZMNaMMQeYnQzxwOMPsbYF7wqPQ== +"@babel/plugin-transform-classes@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.15.tgz#aaf4753aee262a232bbc95451b4bdf9599c65a0b" + integrity sha512-VbbC3PGjBdE0wAWDdHM9G8Gm977pnYI0XpqMd6LrKISj8/DJXEsWqgRuTYaNE9Bv0JGhTZUzHDlMk18IpOuoqw== dependencies: "@babel/helper-annotate-as-pure" "^7.22.5" - "@babel/helper-compilation-targets" "^7.22.5" + "@babel/helper-compilation-targets" "^7.22.15" "@babel/helper-environment-visitor" "^7.22.5" "@babel/helper-function-name" "^7.22.5" "@babel/helper-optimise-call-expression" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-replace-supers" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.5" - globals "^11.1.0" - -"@babel/plugin-transform-classes@^7.22.6": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.6.tgz#e04d7d804ed5b8501311293d1a0e6d43e94c3363" - integrity sha512-58EgM6nuPNG6Py4Z3zSuu0xWu2VfodiMi72Jt5Kj2FECmaYk1RrTXA45z6KBFsu9tRgwQDwIiY4FXTt+YsSFAQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.22.5" - "@babel/helper-compilation-targets" "^7.22.6" - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-function-name" "^7.22.5" - "@babel/helper-optimise-call-expression" "^7.22.5" - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-replace-supers" "^7.22.5" + "@babel/helper-replace-supers" "^7.22.9" "@babel/helper-split-export-declaration" "^7.22.6" globals "^11.1.0" @@ -1145,10 +734,10 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/template" "^7.22.5" -"@babel/plugin-transform-destructuring@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.22.5.tgz#d3aca7438f6c26c78cdd0b0ba920a336001b27cc" - integrity sha512-GfqcFuGW8vnEqTUBM7UtPd5A4q797LTvvwKxXTgRsFjoqaJiEg9deBG6kWeQYkVEL569NpnmpC0Pkr/8BLKGnQ== +"@babel/plugin-transform-destructuring@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.0.tgz#6447aa686be48b32eaf65a73e0e2c0bd010a266c" + integrity sha512-vaMdgNXFkYrB+8lbgniSYWHsgqK5gjaMNcc84bMIOMRLH0L9AqYq3hwMdvnyqj1OPqea8UtjPEuS/DCenah1wg== dependencies: "@babel/helper-plugin-utils" "^7.22.5" @@ -1160,14 +749,6 @@ "@babel/helper-create-regexp-features-plugin" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-dotall-regex@^7.4.4": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz#b286b3e7aae6c7b861e45bed0a2fafd6b1a4fef8" - integrity sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-transform-duplicate-keys@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.22.5.tgz#b6e6428d9416f5f0bba19c70d1e6e7e0b88ab285" @@ -1175,10 +756,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-dynamic-import@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.22.5.tgz#d6908a8916a810468c4edff73b5b75bda6ad393e" - integrity sha512-0MC3ppTB1AMxd8fXjSrbPa7LT9hrImt+/fcj+Pg5YMD7UQyWp/02+JWpdnCymmsXwIx5Z+sYn1bwCn4ZJNvhqQ== +"@babel/plugin-transform-dynamic-import@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.22.11.tgz#2c7722d2a5c01839eaf31518c6ff96d408e447aa" + integrity sha512-g/21plo58sfteWjaO0ZNVb+uEOkJNjAaHhbejrnBmu011l/eNDScmkbjCC3l4FKb10ViaGU4aOkFznSu2zRHgA== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-dynamic-import" "^7.8.3" @@ -1191,18 +772,18 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-export-namespace-from@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.22.5.tgz#57c41cb1d0613d22f548fddd8b288eedb9973a5b" - integrity sha512-X4hhm7FRnPgd4nDA4b/5V280xCx6oL7Oob5+9qVS5C13Zq4bh1qq7LU0GgRU6b5dBWBvhGaXYVB4AcN6+ol6vg== +"@babel/plugin-transform-export-namespace-from@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.22.11.tgz#b3c84c8f19880b6c7440108f8929caf6056db26c" + integrity sha512-xa7aad7q7OiT8oNZ1mU7NrISjlSkVdMbNxn9IuLZyL9AJEhs1Apba3I+u5riX1dIkdptP5EKDG5XDPByWxtehw== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" -"@babel/plugin-transform-for-of@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.22.5.tgz#ab1b8a200a8f990137aff9a084f8de4099ab173f" - integrity sha512-3kxQjX1dU9uudwSshyLeEipvrLjBCVthCgeTp6CzE/9JYrlAIaeekVxRpCWsDDfYTfRZRoCeZatCQvwo+wvK8A== +"@babel/plugin-transform-for-of@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.22.15.tgz#f64b4ccc3a4f131a996388fae7680b472b306b29" + integrity sha512-me6VGeHsx30+xh9fbDLLPi0J1HzmeIIyenoOQHuw2D4m2SAU3NrspX5XxJLBpqn5yrLzrlw2Iy3RA//Bx27iOA== dependencies: "@babel/helper-plugin-utils" "^7.22.5" @@ -1215,10 +796,10 @@ "@babel/helper-function-name" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-json-strings@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.22.5.tgz#14b64352fdf7e1f737eed68de1a1468bd2a77ec0" - integrity sha512-DuCRB7fu8MyTLbEQd1ew3R85nx/88yMoqo2uPSjevMj3yoN7CDM8jkgrY0wmVxfJZyJ/B9fE1iq7EQppWQmR5A== +"@babel/plugin-transform-json-strings@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.22.11.tgz#689a34e1eed1928a40954e37f74509f48af67835" + integrity sha512-CxT5tCqpA9/jXFlme9xIBCc5RPtdDq3JpkkhgHQqtDdiTnTI0jtZ0QzXhr5DILeYifDPp2wvY2ad+7+hLMW5Pw== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-json-strings" "^7.8.3" @@ -1230,10 +811,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-logical-assignment-operators@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.22.5.tgz#66ae5f068fd5a9a5dc570df16f56c2a8462a9d6c" - integrity sha512-MQQOUW1KL8X0cDWfbwYP+TbVbZm16QmQXJQ+vndPtH/BoO0lOKpVoEDMI7+PskYxH+IiE0tS8xZye0qr1lGzSA== +"@babel/plugin-transform-logical-assignment-operators@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.22.11.tgz#24c522a61688bde045b7d9bc3c2597a4d948fc9c" + integrity sha512-qQwRTP4+6xFCDV5k7gZBF3C31K34ut0tbEcTKxlX/0KXxm9GLcO14p570aWxFvVzx6QAfPgq7gaeIHXJC8LswQ== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" @@ -1245,41 +826,32 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-modules-amd@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.22.5.tgz#4e045f55dcf98afd00f85691a68fc0780704f526" - integrity sha512-R+PTfLTcYEmb1+kK7FNkhQ1gP4KgjpSO6HfH9+f8/yfp2Nt3ggBjiVpRwmwTlfqZLafYKJACy36yDXlEmI9HjQ== +"@babel/plugin-transform-modules-amd@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.23.0.tgz#05b2bc43373faa6d30ca89214731f76f966f3b88" + integrity sha512-xWT5gefv2HGSm4QHtgc1sYPbseOyf+FFDo2JbpE25GWl5BqTGO9IMwTYJRoIdjsF85GE+VegHxSCUt5EvoYTAw== dependencies: - "@babel/helper-module-transforms" "^7.22.5" + "@babel/helper-module-transforms" "^7.23.0" "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-modules-commonjs@^7.21.5": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.5.tgz#d69fb947eed51af91de82e4708f676864e5e47bc" - integrity sha512-OVryBEgKUbtqMoB7eG2rs6UFexJi6Zj6FDXx+esBLPTCxCNxAY9o+8Di7IsUGJ+AVhp5ncK0fxWUBd0/1gPhrQ== +"@babel/plugin-transform-modules-commonjs@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.0.tgz#b3dba4757133b2762c00f4f94590cf6d52602481" + integrity sha512-32Xzss14/UVc7k9g775yMIvkVK8xwKE0DPdP5JTapr3+Z9w4tzeOuLNY6BXDQR6BdnzIlXnCGAzsk/ICHBLVWQ== dependencies: - "@babel/helper-module-transforms" "^7.21.5" - "@babel/helper-plugin-utils" "^7.21.5" - "@babel/helper-simple-access" "^7.21.5" - -"@babel/plugin-transform-modules-commonjs@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.22.5.tgz#7d9875908d19b8c0536085af7b053fd5bd651bfa" - integrity sha512-B4pzOXj+ONRmuaQTg05b3y/4DuFz3WcCNAXPLb2Q0GT0TrGKGxNKV4jwsXts+StaM0LQczZbOpj8o1DLPDJIiA== - dependencies: - "@babel/helper-module-transforms" "^7.22.5" + "@babel/helper-module-transforms" "^7.23.0" "@babel/helper-plugin-utils" "^7.22.5" "@babel/helper-simple-access" "^7.22.5" -"@babel/plugin-transform-modules-systemjs@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.22.5.tgz#18c31410b5e579a0092638f95c896c2a98a5d496" - integrity sha512-emtEpoaTMsOs6Tzz+nbmcePl6AKVtS1yC4YNAeMun9U8YCsgadPNxnOPQ8GhHFB2qdx+LZu9LgoC0Lthuu05DQ== +"@babel/plugin-transform-modules-systemjs@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.0.tgz#77591e126f3ff4132a40595a6cccd00a6b60d160" + integrity sha512-qBej6ctXZD2f+DhlOC9yO47yEYgUh5CZNz/aBoH4j/3NOlRfJXJbY7xDQCqQVf9KbrqGzIWER1f23doHGrIHFg== dependencies: "@babel/helper-hoist-variables" "^7.22.5" - "@babel/helper-module-transforms" "^7.22.5" + "@babel/helper-module-transforms" "^7.23.0" "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-validator-identifier" "^7.22.5" + "@babel/helper-validator-identifier" "^7.22.20" "@babel/plugin-transform-modules-umd@^7.22.5": version "7.22.5" @@ -1304,32 +876,32 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-nullish-coalescing-operator@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.5.tgz#f8872c65776e0b552e0849d7596cddd416c3e381" - integrity sha512-6CF8g6z1dNYZ/VXok5uYkkBBICHZPiGEl7oDnAx2Mt1hlHVHOSIKWJaXHjQJA5VB43KZnXZDIexMchY4y2PGdA== +"@babel/plugin-transform-nullish-coalescing-operator@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.11.tgz#debef6c8ba795f5ac67cd861a81b744c5d38d9fc" + integrity sha512-YZWOw4HxXrotb5xsjMJUDlLgcDXSfO9eCmdl1bgW4+/lAGdkjaEvOnQ4p5WKKdUgSzO39dgPl0pTnfxm0OAXcg== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" -"@babel/plugin-transform-numeric-separator@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.22.5.tgz#57226a2ed9e512b9b446517ab6fa2d17abb83f58" - integrity sha512-NbslED1/6M+sXiwwtcAB/nieypGw02Ejf4KtDeMkCEpP6gWFMX1wI9WKYua+4oBneCCEmulOkRpwywypVZzs/g== +"@babel/plugin-transform-numeric-separator@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.22.11.tgz#498d77dc45a6c6db74bb829c02a01c1d719cbfbd" + integrity sha512-3dzU4QGPsILdJbASKhF/V2TVP+gJya1PsueQCxIPCEcerqF21oEcrob4mzjsp2Py/1nLfF5m+xYNMDpmA8vffg== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-numeric-separator" "^7.10.4" -"@babel/plugin-transform-object-rest-spread@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.22.5.tgz#9686dc3447df4753b0b2a2fae7e8bc33cdc1f2e1" - integrity sha512-Kk3lyDmEslH9DnvCDA1s1kkd3YWQITiBOHngOtDL9Pt6BZjzqb6hiOlb8VfjiiQJ2unmegBqZu0rx5RxJb5vmQ== +"@babel/plugin-transform-object-rest-spread@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.22.15.tgz#21a95db166be59b91cde48775310c0df6e1da56f" + integrity sha512-fEB+I1+gAmfAyxZcX1+ZUwLeAuuf8VIg67CTznZE0MqVFumWkh8xWtn58I4dxdVf080wn7gzWoF8vndOViJe9Q== dependencies: - "@babel/compat-data" "^7.22.5" - "@babel/helper-compilation-targets" "^7.22.5" + "@babel/compat-data" "^7.22.9" + "@babel/helper-compilation-targets" "^7.22.15" "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.22.5" + "@babel/plugin-transform-parameters" "^7.22.15" "@babel/plugin-transform-object-super@^7.22.5": version "7.22.5" @@ -1339,36 +911,27 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/helper-replace-supers" "^7.22.5" -"@babel/plugin-transform-optional-catch-binding@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.22.5.tgz#842080be3076703be0eaf32ead6ac8174edee333" - integrity sha512-pH8orJahy+hzZje5b8e2QIlBWQvGpelS76C63Z+jhZKsmzfNaPQ+LaW6dcJ9bxTpo1mtXbgHwy765Ro3jftmUg== +"@babel/plugin-transform-optional-catch-binding@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.22.11.tgz#461cc4f578a127bb055527b3e77404cad38c08e0" + integrity sha512-rli0WxesXUeCJnMYhzAglEjLWVDF6ahb45HuprcmQuLidBJFWjNnOzssk2kuc6e33FlLaiZhG/kUIzUMWdBKaQ== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" -"@babel/plugin-transform-optional-chaining@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.22.5.tgz#1003762b9c14295501beb41be72426736bedd1e0" - integrity sha512-AconbMKOMkyG+xCng2JogMCDcqW8wedQAqpVIL4cOSescZ7+iW8utC6YDZLMCSUIReEA733gzRSaOSXMAt/4WQ== +"@babel/plugin-transform-optional-chaining@^7.22.15", "@babel/plugin-transform-optional-chaining@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.0.tgz#73ff5fc1cf98f542f09f29c0631647d8ad0be158" + integrity sha512-sBBGXbLJjxTzLBF5rFWaikMnOGOk/BmK6vVByIdEggZ7Vn6CvWXZyRkkLFK6WE0IF8jSliyOkUN6SScFgzCM0g== dependencies: "@babel/helper-plugin-utils" "^7.22.5" "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" "@babel/plugin-syntax-optional-chaining" "^7.8.3" -"@babel/plugin-transform-optional-chaining@^7.22.6": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.22.6.tgz#4bacfe37001fe1901117672875e931d439811564" - integrity sha512-Vd5HiWml0mDVtcLHIoEU5sw6HOUW/Zk0acLs/SAeuLzkGNOPc9DB4nkUajemhCmTIz3eiaKREZn2hQQqF79YTg== - dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - -"@babel/plugin-transform-parameters@^7.12.1", "@babel/plugin-transform-parameters@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.5.tgz#c3542dd3c39b42c8069936e48717a8d179d63a18" - integrity sha512-AVkFUBurORBREOmHRKo06FjHYgjrabpdqRSwq6+C7R5iTCZOsM4QbcB27St0a4U6fffyAOqh3s/qEfybAhfivg== +"@babel/plugin-transform-parameters@^7.12.1", "@babel/plugin-transform-parameters@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.15.tgz#719ca82a01d177af358df64a514d64c2e3edb114" + integrity sha512-hjk7qKIqhyzhhUvRT683TYQOFa/4cQKwQy7ALvTpODswN40MljzNDa0YldevS6tGbxwaEKVn502JmY0dP7qEtQ== dependencies: "@babel/helper-plugin-utils" "^7.22.5" @@ -1380,13 +943,13 @@ "@babel/helper-create-class-features-plugin" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-private-property-in-object@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.22.5.tgz#07a77f28cbb251546a43d175a1dda4cf3ef83e32" - integrity sha512-/9xnaTTJcVoBtSSmrVyhtSvO3kbqS2ODoh2juEU72c3aYonNF0OMGiaz2gjukyKM2wBBYJP38S4JiE0Wfb5VMQ== +"@babel/plugin-transform-private-property-in-object@^7.22.11": + version "7.22.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.22.11.tgz#ad45c4fc440e9cb84c718ed0906d96cf40f9a4e1" + integrity sha512-sSCbqZDBKHetvjSwpyWzhuHkmW5RummxJBVbYLkGkaiTOWGxml7SXt0iWa03bzxFIx7wOj3g/ILRd0RcJKBeSQ== dependencies: "@babel/helper-annotate-as-pure" "^7.22.5" - "@babel/helper-create-class-features-plugin" "^7.22.5" + "@babel/helper-create-class-features-plugin" "^7.22.11" "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" @@ -1437,13 +1000,13 @@ "@babel/helper-annotate-as-pure" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-regenerator@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.22.5.tgz#cd8a68b228a5f75fa01420e8cc2fc400f0fc32aa" - integrity sha512-rR7KePOE7gfEtNTh9Qw+iO3Q/e4DEsoQ+hdvM6QUDH7JRJ5qxq5AA52ZzBWbI5i9lfNuvySgOGP8ZN7LAmaiPw== +"@babel/plugin-transform-regenerator@^7.22.10": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.22.10.tgz#8ceef3bd7375c4db7652878b0241b2be5d0c3cca" + integrity sha512-F28b1mDt8KcT5bUyJc/U9nwzw6cV+UmTeRlXYIl2TNqMMJif0Jeey9/RQ3C4NOd2zp0/TRsDns9ttj2L523rsw== dependencies: "@babel/helper-plugin-utils" "^7.22.5" - regenerator-transform "^0.15.1" + regenerator-transform "^0.15.2" "@babel/plugin-transform-reserved-words@^7.22.5": version "7.22.5" @@ -1500,30 +1063,20 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-typescript@^7.21.3": - version "7.21.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.21.3.tgz#316c5be579856ea890a57ebc5116c5d064658f2b" - integrity sha512-RQxPz6Iqt8T0uw/WsJNReuBpWpBqs/n7mNo18sKLoTbMp+UrEekhH+pKSVC7gWz+DNjo9gryfV8YzCiT45RgMw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-create-class-features-plugin" "^7.21.0" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-typescript" "^7.20.0" - -"@babel/plugin-transform-typescript@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.22.5.tgz#5c0f7adfc1b5f38c4dbc8f79b1f0f8074134bd7d" - integrity sha512-SMubA9S7Cb5sGSFFUlqxyClTA9zWJ8qGQrppNUm05LtFuN1ELRFNndkix4zUJrC9F+YivWwa1dHMSyo0e0N9dA== +"@babel/plugin-transform-typescript@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.22.15.tgz#15adef906451d86349eb4b8764865c960eb54127" + integrity sha512-1uirS0TnijxvQLnlv5wQBwOX3E1wCFX7ITv+9pBV2wKEk4K+M5tqDaoNXnTH8tjEIYHLO98MwiTWO04Ggz4XuA== dependencies: "@babel/helper-annotate-as-pure" "^7.22.5" - "@babel/helper-create-class-features-plugin" "^7.22.5" + "@babel/helper-create-class-features-plugin" "^7.22.15" "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-typescript" "^7.22.5" -"@babel/plugin-transform-unicode-escapes@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.22.5.tgz#ce0c248522b1cb22c7c992d88301a5ead70e806c" - integrity sha512-biEmVg1IYB/raUO5wT1tgfacCef15Fbzhkx493D3urBI++6hpJ+RFG4SrWMn0NEZLfvilqKf3QDrRVZHo08FYg== +"@babel/plugin-transform-unicode-escapes@^7.22.10": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.22.10.tgz#c723f380f40a2b2f57a62df24c9005834c8616d9" + integrity sha512-lRfaRKGZCBqDlRU3UIFovdp9c9mEvlylmpod0/OatICsSfuQ9YFthRo1tpTkGsklEefZdqlEFdY4A2dwTb6ohg== dependencies: "@babel/helper-plugin-utils" "^7.22.5" @@ -1551,17 +1104,17 @@ "@babel/helper-create-regexp-features-plugin" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5" -"@babel/preset-env@^7.18.6", "@babel/preset-env@^7.19.4": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.22.5.tgz#3da66078b181f3d62512c51cf7014392c511504e" - integrity sha512-fj06hw89dpiZzGZtxn+QybifF07nNiZjZ7sazs2aVDcysAZVGjW7+7iFYxg6GLNM47R/thYfLdrXc+2f11Vi9A== +"@babel/preset-env@^7.18.6", "@babel/preset-env@^7.19.4", "@babel/preset-env@^7.23.0": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.23.2.tgz#1f22be0ff0e121113260337dbc3e58fafce8d059" + integrity sha512-BW3gsuDD+rvHL2VO2SjAUNTBe5YrjsTiDyqamPDWY723na3/yPQ65X5oQkFVJZ0o50/2d+svm1rkPoJeR1KxVQ== dependencies: - "@babel/compat-data" "^7.22.5" - "@babel/helper-compilation-targets" "^7.22.5" + "@babel/compat-data" "^7.23.2" + "@babel/helper-compilation-targets" "^7.22.15" "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-validator-option" "^7.22.5" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.22.5" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.22.5" + "@babel/helper-validator-option" "^7.22.15" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.22.15" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.22.15" "@babel/plugin-proposal-private-property-in-object" "7.21.0-placeholder-for-preset-env.2" "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-class-properties" "^7.12.13" @@ -1582,155 +1135,67 @@ "@babel/plugin-syntax-top-level-await" "^7.14.5" "@babel/plugin-syntax-unicode-sets-regex" "^7.18.6" "@babel/plugin-transform-arrow-functions" "^7.22.5" - "@babel/plugin-transform-async-generator-functions" "^7.22.5" + "@babel/plugin-transform-async-generator-functions" "^7.23.2" "@babel/plugin-transform-async-to-generator" "^7.22.5" "@babel/plugin-transform-block-scoped-functions" "^7.22.5" - "@babel/plugin-transform-block-scoping" "^7.22.5" + "@babel/plugin-transform-block-scoping" "^7.23.0" "@babel/plugin-transform-class-properties" "^7.22.5" - "@babel/plugin-transform-class-static-block" "^7.22.5" - "@babel/plugin-transform-classes" "^7.22.5" + "@babel/plugin-transform-class-static-block" "^7.22.11" + "@babel/plugin-transform-classes" "^7.22.15" "@babel/plugin-transform-computed-properties" "^7.22.5" - "@babel/plugin-transform-destructuring" "^7.22.5" + "@babel/plugin-transform-destructuring" "^7.23.0" "@babel/plugin-transform-dotall-regex" "^7.22.5" "@babel/plugin-transform-duplicate-keys" "^7.22.5" - "@babel/plugin-transform-dynamic-import" "^7.22.5" + "@babel/plugin-transform-dynamic-import" "^7.22.11" "@babel/plugin-transform-exponentiation-operator" "^7.22.5" - "@babel/plugin-transform-export-namespace-from" "^7.22.5" - "@babel/plugin-transform-for-of" "^7.22.5" + "@babel/plugin-transform-export-namespace-from" "^7.22.11" + "@babel/plugin-transform-for-of" "^7.22.15" "@babel/plugin-transform-function-name" "^7.22.5" - "@babel/plugin-transform-json-strings" "^7.22.5" + "@babel/plugin-transform-json-strings" "^7.22.11" "@babel/plugin-transform-literals" "^7.22.5" - "@babel/plugin-transform-logical-assignment-operators" "^7.22.5" + "@babel/plugin-transform-logical-assignment-operators" "^7.22.11" "@babel/plugin-transform-member-expression-literals" "^7.22.5" - "@babel/plugin-transform-modules-amd" "^7.22.5" - "@babel/plugin-transform-modules-commonjs" "^7.22.5" - "@babel/plugin-transform-modules-systemjs" "^7.22.5" + "@babel/plugin-transform-modules-amd" "^7.23.0" + "@babel/plugin-transform-modules-commonjs" "^7.23.0" + "@babel/plugin-transform-modules-systemjs" "^7.23.0" "@babel/plugin-transform-modules-umd" "^7.22.5" "@babel/plugin-transform-named-capturing-groups-regex" "^7.22.5" "@babel/plugin-transform-new-target" "^7.22.5" - "@babel/plugin-transform-nullish-coalescing-operator" "^7.22.5" - "@babel/plugin-transform-numeric-separator" "^7.22.5" - "@babel/plugin-transform-object-rest-spread" "^7.22.5" + "@babel/plugin-transform-nullish-coalescing-operator" "^7.22.11" + "@babel/plugin-transform-numeric-separator" "^7.22.11" + "@babel/plugin-transform-object-rest-spread" "^7.22.15" "@babel/plugin-transform-object-super" "^7.22.5" - "@babel/plugin-transform-optional-catch-binding" "^7.22.5" - "@babel/plugin-transform-optional-chaining" "^7.22.5" - "@babel/plugin-transform-parameters" "^7.22.5" + "@babel/plugin-transform-optional-catch-binding" "^7.22.11" + "@babel/plugin-transform-optional-chaining" "^7.23.0" + "@babel/plugin-transform-parameters" "^7.22.15" "@babel/plugin-transform-private-methods" "^7.22.5" - "@babel/plugin-transform-private-property-in-object" "^7.22.5" + "@babel/plugin-transform-private-property-in-object" "^7.22.11" "@babel/plugin-transform-property-literals" "^7.22.5" - "@babel/plugin-transform-regenerator" "^7.22.5" + "@babel/plugin-transform-regenerator" "^7.22.10" "@babel/plugin-transform-reserved-words" "^7.22.5" "@babel/plugin-transform-shorthand-properties" "^7.22.5" "@babel/plugin-transform-spread" "^7.22.5" "@babel/plugin-transform-sticky-regex" "^7.22.5" "@babel/plugin-transform-template-literals" "^7.22.5" "@babel/plugin-transform-typeof-symbol" "^7.22.5" - "@babel/plugin-transform-unicode-escapes" "^7.22.5" + "@babel/plugin-transform-unicode-escapes" "^7.22.10" "@babel/plugin-transform-unicode-property-regex" "^7.22.5" "@babel/plugin-transform-unicode-regex" "^7.22.5" "@babel/plugin-transform-unicode-sets-regex" "^7.22.5" - "@babel/preset-modules" "^0.1.5" - "@babel/types" "^7.22.5" - babel-plugin-polyfill-corejs2 "^0.4.3" - babel-plugin-polyfill-corejs3 "^0.8.1" - babel-plugin-polyfill-regenerator "^0.5.0" - core-js-compat "^3.30.2" - semver "^6.3.0" - -"@babel/preset-env@^7.21.4": - version "7.22.9" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.22.9.tgz#57f17108eb5dfd4c5c25a44c1977eba1df310ac7" - integrity sha512-wNi5H/Emkhll/bqPjsjQorSykrlfY5OWakd6AulLvMEytpKasMVUpVy8RL4qBIBs5Ac6/5i0/Rv0b/Fg6Eag/g== - dependencies: - "@babel/compat-data" "^7.22.9" - "@babel/helper-compilation-targets" "^7.22.9" - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-validator-option" "^7.22.5" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.22.5" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.22.5" - "@babel/plugin-proposal-private-property-in-object" "7.21.0-placeholder-for-preset-env.2" - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-class-properties" "^7.12.13" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - "@babel/plugin-syntax-dynamic-import" "^7.8.3" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - "@babel/plugin-syntax-import-assertions" "^7.22.5" - "@babel/plugin-syntax-import-attributes" "^7.22.5" - "@babel/plugin-syntax-import-meta" "^7.10.4" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - "@babel/plugin-syntax-top-level-await" "^7.14.5" - "@babel/plugin-syntax-unicode-sets-regex" "^7.18.6" - "@babel/plugin-transform-arrow-functions" "^7.22.5" - "@babel/plugin-transform-async-generator-functions" "^7.22.7" - "@babel/plugin-transform-async-to-generator" "^7.22.5" - "@babel/plugin-transform-block-scoped-functions" "^7.22.5" - "@babel/plugin-transform-block-scoping" "^7.22.5" - "@babel/plugin-transform-class-properties" "^7.22.5" - "@babel/plugin-transform-class-static-block" "^7.22.5" - "@babel/plugin-transform-classes" "^7.22.6" - "@babel/plugin-transform-computed-properties" "^7.22.5" - "@babel/plugin-transform-destructuring" "^7.22.5" - "@babel/plugin-transform-dotall-regex" "^7.22.5" - "@babel/plugin-transform-duplicate-keys" "^7.22.5" - "@babel/plugin-transform-dynamic-import" "^7.22.5" - "@babel/plugin-transform-exponentiation-operator" "^7.22.5" - "@babel/plugin-transform-export-namespace-from" "^7.22.5" - "@babel/plugin-transform-for-of" "^7.22.5" - "@babel/plugin-transform-function-name" "^7.22.5" - "@babel/plugin-transform-json-strings" "^7.22.5" - "@babel/plugin-transform-literals" "^7.22.5" - "@babel/plugin-transform-logical-assignment-operators" "^7.22.5" - "@babel/plugin-transform-member-expression-literals" "^7.22.5" - "@babel/plugin-transform-modules-amd" "^7.22.5" - "@babel/plugin-transform-modules-commonjs" "^7.22.5" - "@babel/plugin-transform-modules-systemjs" "^7.22.5" - "@babel/plugin-transform-modules-umd" "^7.22.5" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.22.5" - "@babel/plugin-transform-new-target" "^7.22.5" - "@babel/plugin-transform-nullish-coalescing-operator" "^7.22.5" - "@babel/plugin-transform-numeric-separator" "^7.22.5" - "@babel/plugin-transform-object-rest-spread" "^7.22.5" - "@babel/plugin-transform-object-super" "^7.22.5" - "@babel/plugin-transform-optional-catch-binding" "^7.22.5" - "@babel/plugin-transform-optional-chaining" "^7.22.6" - "@babel/plugin-transform-parameters" "^7.22.5" - "@babel/plugin-transform-private-methods" "^7.22.5" - "@babel/plugin-transform-private-property-in-object" "^7.22.5" - "@babel/plugin-transform-property-literals" "^7.22.5" - "@babel/plugin-transform-regenerator" "^7.22.5" - "@babel/plugin-transform-reserved-words" "^7.22.5" - "@babel/plugin-transform-shorthand-properties" "^7.22.5" - "@babel/plugin-transform-spread" "^7.22.5" - "@babel/plugin-transform-sticky-regex" "^7.22.5" - "@babel/plugin-transform-template-literals" "^7.22.5" - "@babel/plugin-transform-typeof-symbol" "^7.22.5" - "@babel/plugin-transform-unicode-escapes" "^7.22.5" - "@babel/plugin-transform-unicode-property-regex" "^7.22.5" - "@babel/plugin-transform-unicode-regex" "^7.22.5" - "@babel/plugin-transform-unicode-sets-regex" "^7.22.5" - "@babel/preset-modules" "^0.1.5" - "@babel/types" "^7.22.5" - babel-plugin-polyfill-corejs2 "^0.4.4" - babel-plugin-polyfill-corejs3 "^0.8.2" - babel-plugin-polyfill-regenerator "^0.5.1" + "@babel/preset-modules" "0.1.6-no-external-plugins" + "@babel/types" "^7.23.0" + babel-plugin-polyfill-corejs2 "^0.4.6" + babel-plugin-polyfill-corejs3 "^0.8.5" + babel-plugin-polyfill-regenerator "^0.5.3" core-js-compat "^3.31.0" semver "^6.3.1" -"@babel/preset-modules@^0.1.5": - version "0.1.5" - resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.5.tgz#ef939d6e7f268827e1841638dc6ff95515e115d9" - integrity sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA== +"@babel/preset-modules@0.1.6-no-external-plugins": + version "0.1.6-no-external-plugins" + resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz#ccb88a2c49c817236861fee7826080573b8a923a" + integrity sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" - "@babel/plugin-transform-dotall-regex" "^7.4.4" "@babel/types" "^7.4.4" esutils "^2.0.2" @@ -1746,27 +1211,16 @@ "@babel/plugin-transform-react-jsx-development" "^7.22.5" "@babel/plugin-transform-react-pure-annotations" "^7.22.5" -"@babel/preset-typescript@^7.18.6": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.22.5.tgz#16367d8b01d640e9a507577ed4ee54e0101e51c8" - integrity sha512-YbPaal9LxztSGhmndR46FmAbkJ/1fAsw293tSU+I5E5h+cnJ3d4GTwyUgGYmOXJYdGA+uNePle4qbaRzj2NISQ== +"@babel/preset-typescript@^7.18.6", "@babel/preset-typescript@^7.23.0": + version "7.23.2" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.23.2.tgz#c8de488130b7081f7e1482936ad3de5b018beef4" + integrity sha512-u4UJc1XsS1GhIGteM8rnGiIvf9rJpiVgMEeCnwlLA7WJPC+jcXWJAGxYmeqs5hOZD8BbAfnV5ezBOxQbb4OUxA== dependencies: "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-validator-option" "^7.22.5" + "@babel/helper-validator-option" "^7.22.15" "@babel/plugin-syntax-jsx" "^7.22.5" - "@babel/plugin-transform-modules-commonjs" "^7.22.5" - "@babel/plugin-transform-typescript" "^7.22.5" - -"@babel/preset-typescript@^7.21.4": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.21.5.tgz#68292c884b0e26070b4d66b202072d391358395f" - integrity sha512-iqe3sETat5EOrORXiQ6rWfoOg2y68Cs75B9wNxdPW4kixJxh7aXQE1KPdWLDniC24T/6dSnguF33W9j/ZZQcmA== - dependencies: - "@babel/helper-plugin-utils" "^7.21.5" - "@babel/helper-validator-option" "^7.21.0" - "@babel/plugin-syntax-jsx" "^7.21.4" - "@babel/plugin-transform-modules-commonjs" "^7.21.5" - "@babel/plugin-transform-typescript" "^7.21.3" + "@babel/plugin-transform-modules-commonjs" "^7.23.0" + "@babel/plugin-transform-typescript" "^7.22.15" "@babel/regjsgen@^0.8.0": version "0.8.0" @@ -1781,39 +1235,14 @@ core-js-pure "^3.30.2" regenerator-runtime "^0.13.11" -"@babel/runtime@^7.1.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.18.6", "@babel/runtime@^7.20.13": +"@babel/runtime@^7.1.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.18.6", "@babel/runtime@^7.20.13", "@babel/runtime@^7.8.4": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.5.tgz#8564dd588182ce0047d55d7a75e93921107b57ec" integrity sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA== dependencies: regenerator-runtime "^0.13.11" -"@babel/runtime@^7.8.4": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.7.tgz#fcb41a5a70550e04a7b708037c7c32f7f356d8fd" - integrity sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ== - dependencies: - regenerator-runtime "^0.13.11" - -"@babel/template@^7.12.7", "@babel/template@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.5.tgz#0c8c4d944509875849bd0344ff0050756eefc6ec" - integrity sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw== - dependencies: - "@babel/code-frame" "^7.22.5" - "@babel/parser" "^7.22.5" - "@babel/types" "^7.22.5" - -"@babel/template@^7.20.7", "@babel/template@^7.3.3": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.20.7.tgz#a15090c2839a83b02aa996c0b4994005841fd5a8" - integrity sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/parser" "^7.20.7" - "@babel/types" "^7.20.7" - -"@babel/template@^7.22.15": +"@babel/template@^7.12.7", "@babel/template@^7.22.15", "@babel/template@^7.22.5", "@babel/template@^7.3.3": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== @@ -1822,7 +1251,7 @@ "@babel/parser" "^7.22.15" "@babel/types" "^7.22.15" -"@babel/traverse@^7.12.9", "@babel/traverse@^7.18.8", "@babel/traverse@^7.20.7", "@babel/traverse@^7.21.5", "@babel/traverse@^7.22.5", "@babel/traverse@^7.22.6", "@babel/traverse@^7.22.8", "@babel/traverse@^7.7.2": +"@babel/traverse@^7.12.9", "@babel/traverse@^7.18.8", "@babel/traverse@^7.23.2", "@babel/traverse@^7.7.2": version "7.23.2" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8" integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw== @@ -1838,25 +1267,7 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.18.6", "@babel/types@^7.20.0", "@babel/types@^7.20.7", "@babel/types@^7.21.0", "@babel/types@^7.21.4", "@babel/types@^7.21.5", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.21.5.tgz#18dfbd47c39d3904d5db3d3dc2cc80bedb60e5b6" - integrity sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q== - dependencies: - "@babel/helper-string-parser" "^7.21.5" - "@babel/helper-validator-identifier" "^7.19.1" - to-fast-properties "^2.0.0" - -"@babel/types@^7.12.7", "@babel/types@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.5.tgz#cd93eeaab025880a3a47ec881f4b096a5b786fbe" - integrity sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA== - dependencies: - "@babel/helper-string-parser" "^7.22.5" - "@babel/helper-validator-identifier" "^7.22.5" - to-fast-properties "^2.0.0" - -"@babel/types@^7.22.15", "@babel/types@^7.23.0": +"@babel/types@^7.0.0", "@babel/types@^7.12.7", "@babel/types@^7.20.0", "@babel/types@^7.22.15", "@babel/types@^7.22.19", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb" integrity sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg== @@ -2572,15 +1983,7 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" -"@jridgewell/gen-mapping@^0.1.0": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" - integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== - dependencies: - "@jridgewell/set-array" "^1.0.0" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@jridgewell/gen-mapping@^0.3.0": +"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": version "0.3.3" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== @@ -2589,21 +1992,12 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/gen-mapping@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" - integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== - dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" - "@jridgewell/resolve-uri@3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== -"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": +"@jridgewell/set-array@^1.0.1": version "1.1.2" resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== @@ -2674,11 +2068,6 @@ resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz#323d72dd25103d0c4fbdce89dadf574a787b1f9b" integrity sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ== -"@nicolo-ribaudo/semver-v6@^6.3.3": - version "6.3.3" - resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/semver-v6/-/semver-v6-6.3.3.tgz#ea6d23ade78a325f7a52750aab1526b02b628c29" - integrity sha512-3Yc1fUTs69MG/uZbJlLSI3JISMn2UV2rg+1D/vROUqZyh3l6iYHCs7GMp+M40ZD7yOdDbYjJcU1oTJhrc+dGKg== - "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -3069,16 +2458,11 @@ expect "^29.0.0" pretty-format "^29.0.0" -"@types/json-schema@*", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8": +"@types/json-schema@*", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.12" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== -"@types/json-schema@^7.0.9": - version "7.0.11" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" - integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== - "@types/mdast@^3.0.0": version "3.0.11" resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.11.tgz#dc130f7e7d9306124286f6d6cee40cf4d14a3dc0" @@ -3953,53 +3337,29 @@ babel-plugin-jest-hoist@^29.2.0: "@types/babel__core" "^7.1.14" "@types/babel__traverse" "^7.0.6" -babel-plugin-polyfill-corejs2@^0.4.3: - version "0.4.3" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.3.tgz#75044d90ba5043a5fb559ac98496f62f3eb668fd" - integrity sha512-bM3gHc337Dta490gg+/AseNB9L4YLHxq1nGKZZSHbhXv4aTYU2MD2cjza1Ru4S6975YLTaL1K8uJf6ukJhhmtw== - dependencies: - "@babel/compat-data" "^7.17.7" - "@babel/helper-define-polyfill-provider" "^0.4.0" - semver "^6.1.1" - -babel-plugin-polyfill-corejs2@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.4.tgz#9f9a0e1cd9d645cc246a5e094db5c3aa913ccd2b" - integrity sha512-9WeK9snM1BfxB38goUEv2FLnA6ja07UMfazFHzCXUb3NyDZAwfXvQiURQ6guTTMeHcOsdknULm1PDhs4uWtKyA== +babel-plugin-polyfill-corejs2@^0.4.3, babel-plugin-polyfill-corejs2@^0.4.6: + version "0.4.6" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.6.tgz#b2df0251d8e99f229a8e60fc4efa9a68b41c8313" + integrity sha512-jhHiWVZIlnPbEUKSSNb9YoWcQGdlTLq7z1GHL4AjFxaoOUMuuEVJ+Y4pAaQUGOGk93YsVCKPbqbfw3m0SM6H8Q== dependencies: "@babel/compat-data" "^7.22.6" - "@babel/helper-define-polyfill-provider" "^0.4.1" - "@nicolo-ribaudo/semver-v6" "^6.3.3" + "@babel/helper-define-polyfill-provider" "^0.4.3" + semver "^6.3.1" -babel-plugin-polyfill-corejs3@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.1.tgz#39248263c38191f0d226f928d666e6db1b4b3a8a" - integrity sha512-ikFrZITKg1xH6pLND8zT14UPgjKHiGLqex7rGEZCH2EvhsneJaJPemmpQaIZV5AL03II+lXylw3UmddDK8RU5Q== +babel-plugin-polyfill-corejs3@^0.8.1, babel-plugin-polyfill-corejs3@^0.8.5: + version "0.8.5" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.5.tgz#a75fa1b0c3fc5bd6837f9ec465c0f48031b8cab1" + integrity sha512-Q6CdATeAvbScWPNLB8lzSO7fgUVBkQt6zLgNlfyeCr/EQaEQR+bWiBYYPYAFyE528BMjRhL+1QBMOI4jc/c5TA== dependencies: - "@babel/helper-define-polyfill-provider" "^0.4.0" - core-js-compat "^3.30.1" + "@babel/helper-define-polyfill-provider" "^0.4.3" + core-js-compat "^3.32.2" -babel-plugin-polyfill-corejs3@^0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.2.tgz#d406c5738d298cd9c66f64a94cf8d5904ce4cc5e" - integrity sha512-Cid+Jv1BrY9ReW9lIfNlNpsI53N+FN7gE+f73zLAUbr9C52W4gKLWSByx47pfDJsEysojKArqOtOKZSVIIUTuQ== +babel-plugin-polyfill-regenerator@^0.5.0, babel-plugin-polyfill-regenerator@^0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.3.tgz#d4c49e4b44614607c13fb769bcd85c72bb26a4a5" + integrity sha512-8sHeDOmXC8csczMrYEOf0UTNa4yE2SxV5JGeT/LP1n0OYVDUUFPxG9vdk2AlDlIit4t+Kf0xCtpgXPBwnn/9pw== dependencies: - "@babel/helper-define-polyfill-provider" "^0.4.1" - core-js-compat "^3.31.0" - -babel-plugin-polyfill-regenerator@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.0.tgz#e7344d88d9ef18a3c47ded99362ae4a757609380" - integrity sha512-hDJtKjMLVa7Z+LwnTCxoDLQj6wdc+B8dun7ayF2fYieI6OzfuvcLMB32ihJZ4UhCBwNYGl5bg/x/P9cMdnkc2g== - dependencies: - "@babel/helper-define-polyfill-provider" "^0.4.0" - -babel-plugin-polyfill-regenerator@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.1.tgz#ace7a5eced6dff7d5060c335c52064778216afd3" - integrity sha512-L8OyySuI6OSQ5hFy9O+7zFjyr4WhAfRjLIOkhQGYl+emwJkd/S4XXT1JpfrgR1jrQ1NcGiOh+yAdGlF8pnC3Jw== - dependencies: - "@babel/helper-define-polyfill-provider" "^0.4.1" + "@babel/helper-define-polyfill-provider" "^0.4.3" babel-preset-current-node-syntax@^1.0.0: version "1.0.1" @@ -4177,35 +3537,15 @@ braces@^3.0.2, braces@~3.0.2: dependencies: fill-range "^7.0.1" -browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.18.1, browserslist@^4.21.5: - version "4.21.8" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.8.tgz#db2498e1f4b80ed199c076248a094935860b6017" - integrity sha512-j+7xYe+v+q2Id9qbBeCI8WX5NmZSRe8es1+0xntD/+gaWXznP8tFEkv5IgSaHf5dS1YwVMbX/4W6m937mj+wQw== +browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.18.1, browserslist@^4.21.4, browserslist@^4.21.5, browserslist@^4.21.9, browserslist@^4.22.1: + version "4.22.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.1.tgz#ba91958d1a59b87dab6fed8dfbcb3da5e2e9c619" + integrity sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ== dependencies: - caniuse-lite "^1.0.30001502" - electron-to-chromium "^1.4.428" - node-releases "^2.0.12" - update-browserslist-db "^1.0.11" - -browserslist@^4.21.3, browserslist@^4.21.4: - version "4.21.4" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.4.tgz#e7496bbc67b9e39dd0f98565feccdcb0d4ff6987" - integrity sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw== - dependencies: - caniuse-lite "^1.0.30001400" - electron-to-chromium "^1.4.251" - node-releases "^2.0.6" - update-browserslist-db "^1.0.9" - -browserslist@^4.21.9: - version "4.21.9" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.9.tgz#e11bdd3c313d7e2a9e87e8b4b0c7872b13897635" - integrity sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg== - dependencies: - caniuse-lite "^1.0.30001503" - electron-to-chromium "^1.4.431" - node-releases "^2.0.12" - update-browserslist-db "^1.0.11" + caniuse-lite "^1.0.30001541" + electron-to-chromium "^1.4.535" + node-releases "^2.0.13" + update-browserslist-db "^1.0.13" bser@2.1.1: version "2.1.1" @@ -4288,7 +3628,7 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001400, caniuse-lite@^1.0.30001464, caniuse-lite@^1.0.30001502, caniuse-lite@^1.0.30001503: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001464, caniuse-lite@^1.0.30001541: version "1.0.30001551" resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001551.tgz" integrity sha512-vtBAez47BoGMMzlbYhfXrMV1kvRF2WP/lqiMuDu1Sb4EE4LKEgjopFDSRtZfdVnslNRpOqV/woE+Xgrwj6VQlg== @@ -4306,7 +3646,7 @@ ccount@^1.0.0: resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.1.0.tgz#246687debb6014735131be8abab2d93898f8d043" integrity sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg== -chalk@^2.0.0, chalk@^2.4.2: +chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -4690,7 +4030,7 @@ content-type@~1.0.4: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== -convert-source-map@^1.1.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: +convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.9.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== @@ -4734,19 +4074,12 @@ copy-webpack-plugin@^11.0.0: schema-utils "^4.0.0" serialize-javascript "^6.0.0" -core-js-compat@^3.30.1, core-js-compat@^3.30.2: - version "3.31.0" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.31.0.tgz#4030847c0766cc0e803dcdfb30055d7ef2064bf1" - integrity sha512-hM7YCu1cU6Opx7MXNu0NuumM0ezNeAeRKadixyiQELWY3vT3De9S4J5ZBMraWV2vZnrE1Cirl0GtFtDtMUXzPw== +core-js-compat@^3.31.0, core-js-compat@^3.32.2: + version "3.33.0" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.33.0.tgz#24aa230b228406450b2277b7c8bfebae932df966" + integrity sha512-0w4LcLXsVEuNkIqwjjf9rjCoPhK8uqA4tMRh4Ge26vfLtUutshn+aRJU21I9LCJlh2QQHfisNToLjw1XEJLTWw== dependencies: - browserslist "^4.21.5" - -core-js-compat@^3.31.0: - version "3.31.1" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.31.1.tgz#5084ad1a46858df50ff89ace152441a63ba7aae0" - integrity sha512-wIDWd2s5/5aJSdpOJHfSibxNODxoGoWOBHt8JSPB41NOE94M7kuTPZCYLOlTtuoXTsBPKobpJ6T+y0SSy5L9SA== - dependencies: - browserslist "^4.21.9" + browserslist "^4.22.1" core-js-pure@^3.30.2: version "3.31.0" @@ -5296,20 +4629,10 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== -electron-to-chromium@^1.4.251: - version "1.4.284" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz#61046d1e4cab3a25238f6bf7413795270f125592" - integrity sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA== - -electron-to-chromium@^1.4.428: - version "1.4.428" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.428.tgz#c31fc88e854f49d8305cdabf6ec934ff1588a902" - integrity sha512-L7uUknyY286of0AYC8CKfgWstD0Smk2DvHDi9F0GWQhSH90Bzi7iDrmCbZKz75tYJxeGSAc7TYeKpmbjMDoh1w== - -electron-to-chromium@^1.4.431: - version "1.4.459" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.459.tgz#25a23370f4ae8aaa8f77aaf00133aa4994f4148e" - integrity sha512-XXRS5NFv8nCrBL74Rm3qhJjA2VCsRFx0OjHKBMPI0otij56aun8UWiKTDABmd5/7GTR021pA4wivs+Ri6XCElg== +electron-to-chromium@^1.4.535: + version "1.4.561" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.561.tgz#816f31d9ae01fe58abbf469fca7e125b16befd85" + integrity sha512-eS5t4ulWOBfVHdq9SW2dxEaFarj1lPjvJ8PaYMOjY0DecBaj/t4ARziL2IPpDr4atyWwjLFGQ2vo/VCgQFezVQ== emittery@^0.13.1: version "0.13.1" @@ -6218,12 +5541,7 @@ got@^9.6.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.9: - version "4.2.10" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" - integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== - -graceful-fs@^4.2.4, graceful-fs@^4.2.6: +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -6737,13 +6055,6 @@ is-core-module@^2.11.0: dependencies: has "^1.0.3" -is-core-module@^2.9.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" - integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== - dependencies: - has "^1.0.3" - is-decimal@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.4.tgz#65a3a5958a1c5b63a706e1b333d7cd9f630d3fa5" @@ -7318,7 +6629,7 @@ jest-worker@^27.4.5: merge-stream "^2.0.0" supports-color "^8.0.0" -jest-worker@^29.1.2: +jest-worker@^29.1.2, jest-worker@^29.3.1: version "29.5.0" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.5.0.tgz#bdaefb06811bd3384d93f009755014d8acb4615d" integrity sha512-NcrQnevGoSp4b5kg+akIpthoAFHxPBcb5P6mYPY0fUNT+sSvmtu6jlkEle3anczUKIKEbMxFimk9oTP/tpIPgA== @@ -7328,16 +6639,6 @@ jest-worker@^29.1.2: merge-stream "^2.0.0" supports-color "^8.0.0" -jest-worker@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.3.1.tgz#e9462161017a9bb176380d721cab022661da3d6b" - integrity sha512-lY4AnnmsEWeiXirAIA0c9SDPbuCBq8IYuDVL8PMm0MZ2PEs2yPvRA/J64QBXuZp7CYKrDM/rmNrc9/i3KJQncw== - dependencies: - "@types/node" "*" - jest-util "^29.3.1" - merge-stream "^2.0.0" - supports-color "^8.0.0" - jest@^29.3.1: version "29.3.1" resolved "https://registry.yarnpkg.com/jest/-/jest-29.3.1.tgz#c130c0d551ae6b5459b8963747fed392ddbde122" @@ -7436,16 +6737,11 @@ json2mq@^0.2.0: dependencies: string-convert "^0.2.0" -json5@^2.1.2, json5@^2.2.2: +json5@^2.1.2, json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -json5@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.2.tgz#64471c5bdcc564c18f7c1d4df2e2297f2457c5ab" - integrity sha512-46Tk9JiOL2z7ytNQWFLpj99RZkVgeHf87yGQKsIkaPz1qSH9UczKH1rO7K3wgRselo0tYMUNfecYpm/p1vC7tQ== - jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -8067,15 +7363,10 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -node-releases@^2.0.12: - version "2.0.12" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.12.tgz#35627cc224a23bfb06fb3380f2b3afaaa7eb1039" - integrity sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ== - -node-releases@^2.0.6: - version "2.0.8" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.8.tgz#0f349cdc8fcfa39a92ac0be9bc48b7706292b9ae" - integrity sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A== +node-releases@^2.0.13: + version "2.0.13" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d" + integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" @@ -9673,10 +8964,10 @@ regenerator-runtime@^0.13.11: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== -regenerator-transform@^0.15.1: - version "0.15.1" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.1.tgz#f6c4e99fc1b4591f780db2586328e4d9a9d8dc56" - integrity sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg== +regenerator-transform@^0.15.2: + version "0.15.2" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.2.tgz#5bbae58b522098ebdf09bca2f83838929001c7a4" + integrity sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg== dependencies: "@babel/runtime" "^7.8.4" @@ -9685,18 +8976,6 @@ regexpp@^3.2.0: resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== -regexpu-core@^5.2.1: - version "5.2.2" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.2.2.tgz#3e4e5d12103b64748711c3aad69934d7718e75fc" - integrity sha512-T0+1Zp2wjF/juXMrMxHxidqGYn8U4R+zleSJhX9tQ1PUsS8a9UtYfbsF9LdiVgNX3kiX8RNaKM42nfSgvFJjmw== - dependencies: - regenerate "^1.4.2" - regenerate-unicode-properties "^10.1.0" - regjsgen "^0.7.1" - regjsparser "^0.9.1" - unicode-match-property-ecmascript "^2.0.0" - unicode-match-property-value-ecmascript "^2.1.0" - regexpu-core@^5.3.1: version "5.3.2" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.3.2.tgz#11a2b06884f3527aec3e93dbbf4a3b958a95546b" @@ -9723,11 +9002,6 @@ registry-url@^5.0.0: dependencies: rc "^1.2.8" -regjsgen@^0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.7.1.tgz#ee5ef30e18d3f09b7c369b76e7c2373ed25546f6" - integrity sha512-RAt+8H2ZEzHeYWxZ3H2z6tF18zyyOnlcdaafLrm21Bguj7uZy6ULibiAFdXEtKQY4Sy7wDTwDiOazasMLc4KPA== - regjsparser@^0.9.1: version "0.9.1" resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.9.1.tgz#272d05aa10c7c1f67095b1ff0addae8442fc5709" @@ -9865,16 +9139,7 @@ resolve.exports@^1.1.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== -resolve@^1.1.6, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -resolve@^1.3.2: +resolve@^1.1.6, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.3.2: version "1.22.2" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== @@ -10060,7 +9325,7 @@ semver@^5.4.1, semver@^5.6.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0, semver@^6.3.1: +semver@^6.0.0, semver@^6.2.0, semver@^6.3.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== @@ -10912,18 +10177,10 @@ unpipe@1.0.0, unpipe@~1.0.0: resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== -update-browserslist-db@^1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz#9a2a641ad2907ae7b3616506f4b977851db5b940" - integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA== - dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" - -update-browserslist-db@^1.0.9: - version "1.0.10" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3" - integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ== +update-browserslist-db@^1.0.13: + version "1.0.13" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" + integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== dependencies: escalade "^3.1.1" picocolors "^1.0.0" @@ -11178,15 +10435,7 @@ webpack-dev-server@^4.9.3: webpack-dev-middleware "^5.3.1" ws "^8.13.0" -webpack-merge@^5.7.3: - version "5.8.0" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.8.0.tgz#2b39dbf22af87776ad744c390223731d30a68f61" - integrity sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q== - dependencies: - clone-deep "^4.0.1" - wildcard "^2.0.0" - -webpack-merge@^5.8.0: +webpack-merge@^5.7.3, webpack-merge@^5.8.0: version "5.9.0" resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.9.0.tgz#dc160a1c4cf512ceca515cc231669e9ddb133826" integrity sha512-6NbRQw4+Sy50vYNTw7EyOn41OZItPiXB8GNv3INSoe3PSFaHJEz3SHTrYVaRm2LilNGnFUzh0FAwqPEmU/CwDg== -- 2.50.1.windows.1 From cff67c030b601106f68e9fb2aaa9bb60d371893f Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 19 Oct 2023 18:29:21 -0700 Subject: [PATCH 06/18] Better browserlist query string --- javascript/babel.config.cjs | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/javascript/babel.config.cjs b/javascript/babel.config.cjs index 62bbd880..82d64334 100644 --- a/javascript/babel.config.cjs +++ b/javascript/babel.config.cjs @@ -9,14 +9,22 @@ module.exports = { presets: [ - ['@babel/preset-env', { - targets: "> 5%, maintained node versions", - - // Preserve ES Modules - modules: false, - }], - ['@babel/preset-typescript', { - "rewriteImportExtensions": true - }], + [ + '@babel/preset-env', + { + targets: [ + 'maintained node versions', + '> 0.5%, last 2 versions, Firefox ESR, not dead', + ], + // Do not transform to another module system + modules: false, + }, + ], + [ + '@babel/preset-typescript', + { + rewriteImportExtensions: true, + }, + ], ], }; -- 2.50.1.windows.1 From 709d0175b30929fc5c4d71b3c23d430ccdaccd8e Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 19 Oct 2023 18:36:31 -0700 Subject: [PATCH 07/18] Fix linting of CJS --- .eslintrc.cjs | 88 ++++++++++++++++++++++++++++++++++++++ .eslintrc.js | 65 ---------------------------- javascript/just.config.cjs | 27 +++--------- 3 files changed, 94 insertions(+), 86 deletions(-) create mode 100644 .eslintrc.cjs delete mode 100644 .eslintrc.js diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 00000000..442ae8f0 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,88 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +module.exports = { + root: true, + ignorePatterns: [ + '/website', + '**/binaries/**', + '**/build/**', + '**/generated/**', + ], + overrides: [ + // Catch-all + { + files: ['**/*.?(m|c){j,t}s?(x)'], + extends: ['eslint:recommended', 'plugin:prettier/recommended'], + plugins: ['prettier'], + rules: { + 'no-unused-vars': ['error', {argsIgnorePattern: '^_'}], + 'no-var': 'error', + 'prefer-arrow-callback': 'error', + 'prefer-const': 'error', + 'prefer-object-spread': 'error', + 'prefer-spread': 'error', + 'require-await': 'error', + }, + env: { + es2020: true, + }, + parserOptions: { + ecmaVersion: 'latest', + }, + }, + // ES Modules + { + files: ['**/*.?(m){j,t}s?(x)'], + parserOptions: { + sourceType: 'module', + }, + }, + // CommonJS Modules + { + files: ['**/*.c{j,t}s?(x)'], + env: { + commonjs: true, + }, + parserOptions: { + sourceType: 'commonjs', + }, + }, + // TypeScript + { + files: ['**/*.?(m|c)ts?(x)'], + extends: ['plugin:@typescript-eslint/recommended'], + parser: '@typescript-eslint/parser', + parserOptions: { + project: true, + }, + plugins: ['@typescript-eslint'], + rules: { + '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/no-unused-vars': [ + 'error', + {argsIgnorePattern: '^_'}, + ], + '@typescript-eslint/no-var-requires': 'off', + }, + }, + // Node + { + files: ['**/.*rc.(c){j,t}s', '**/*.config.?(c){j,t}s'], + env: { + node: true, + }, + }, + // Jest + { + files: ['**/tests/**'], + extends: ['plugin:jest/recommended'], + }, + ], +}; diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index b22edd03..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -module.exports = { - root: true, - ignorePatterns: [ - '/website', - '**/binaries/**', - '**/build/**', - '**/generated/**', - ], - extends: ['eslint:recommended', 'plugin:prettier/recommended'], - plugins: ['prettier'], - rules: { - 'no-unused-vars': ['error', {argsIgnorePattern: '^_'}], - 'no-var': 'error', - 'prefer-arrow-callback': 'error', - 'prefer-const': 'error', - 'prefer-object-spread': 'error', - 'prefer-spread': 'error', - 'require-await': 'error', - }, - env: { - es2020: true, - }, - parserOptions: { - sourceType: 'module', - ecmaVersion: 'latest', - }, - overrides: [ - { - files: ['**/*.ts', '**/*.cts', '**/*.mts', '**/*.tsx'], - extends: ['plugin:@typescript-eslint/recommended'], - parser: '@typescript-eslint/parser', - parserOptions: { - project: true, - }, - plugins: ['@typescript-eslint'], - rules: { - '@typescript-eslint/ban-ts-comment': 'off', - '@typescript-eslint/no-unused-vars': [ - 'error', - {argsIgnorePattern: '^_'}, - ], - '@typescript-eslint/no-var-requires': 'off', - }, - }, - { - files: ['**/.eslintrc.js', '**/just.config.js'], - env: { - node: true, - }, - }, - { - files: ['**/tests/**'], - extends: ['plugin:jest/recommended'], - }, - ], -}; diff --git a/javascript/just.config.cjs b/javascript/just.config.cjs index 096352ec..634fc523 100644 --- a/javascript/just.config.cjs +++ b/javascript/just.config.cjs @@ -39,7 +39,7 @@ function defineFlavor(flavor, env) { jestTask({ config: path.join(__dirname, 'jest.config.js'), nodeArgs: ['--experimental-vm-modules'], - env + env, }), ); task( @@ -52,14 +52,7 @@ defineFlavor('web'); task('build', series(emcmakeGenerateTask(), cmakeBuildTask())); -task( - 'test', - series( - emcmakeGenerateTask(), - 'cmake-build:web', - 'jest:web', - ), -); +task('test', series(emcmakeGenerateTask(), 'cmake-build:web', 'jest:web')); task( 'benchmark', @@ -90,11 +83,7 @@ task( ), ); -function recursiveReplace( - obj, - pattern, - replacement, -) { +function recursiveReplace(obj, pattern, replacement) { for (const [key, value] of Object.entries(obj)) { if (typeof value === 'string') { obj[key] = value.replace(pattern, replacement); @@ -133,13 +122,9 @@ function runBenchTask() { ]; logger.info(['node', ...args].join(' ')); - return spawn( - node, - args, - { - stdio: 'inherit', - }, - ); + return spawn(node, args, { + stdio: 'inherit', + }); }; } -- 2.50.1.windows.1 From f3555048e46aebc2942279b7e36437ee1fe162b5 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 19 Oct 2023 18:50:59 -0700 Subject: [PATCH 08/18] Do not rewrite extensions in test env --- javascript/babel.config.cjs | 6 +++--- javascript/jest.config.js | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/javascript/babel.config.cjs b/javascript/babel.config.cjs index 82d64334..70edd37d 100644 --- a/javascript/babel.config.cjs +++ b/javascript/babel.config.cjs @@ -7,7 +7,7 @@ * @format */ -module.exports = { +module.exports = api => ({ presets: [ [ '@babel/preset-env', @@ -23,8 +23,8 @@ module.exports = { [ '@babel/preset-typescript', { - rewriteImportExtensions: true, + rewriteImportExtensions: !api.env('test'), }, ], ], -}; +}); diff --git a/javascript/jest.config.js b/javascript/jest.config.js index 6d697687..27844f5b 100644 --- a/javascript/jest.config.js +++ b/javascript/jest.config.js @@ -7,10 +7,8 @@ * @format */ -const config = { +export default { setupFiles: ['./jest.setup.js'], testRegex: '/tests/.*\\.test\\.ts$', extensionsToTreatAsEsm: ['.ts'], }; - -export default config; -- 2.50.1.windows.1 From 3cd7f2e312ffb559c271fa6267bcb0bb9267892e Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 19 Oct 2023 19:10:19 -0700 Subject: [PATCH 09/18] Fix wrapAssembly extensions not getting rewritten --- javascript/src/wrapAssembly.js | 147 ------------------ .../{wrapAssembly.d.ts => wrapAssembly.ts} | 145 ++++++++++++++++- 2 files changed, 139 insertions(+), 153 deletions(-) delete mode 100644 javascript/src/wrapAssembly.js rename javascript/src/{wrapAssembly.d.ts => wrapAssembly.ts} (55%) diff --git a/javascript/src/wrapAssembly.js b/javascript/src/wrapAssembly.js deleted file mode 100644 index eeeb8c30..00000000 --- a/javascript/src/wrapAssembly.js +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import {Unit, Direction} from './generated/YGEnums.ts'; -import YGEnums from './generated/YGEnums.ts'; - -export default function wrapAssembly(lib) { - function patch(prototype, name, fn) { - const original = prototype[name]; - - prototype[name] = function (...args) { - return fn.call(this, original, ...args); - }; - } - - for (const fnName of [ - 'setPosition', - 'setMargin', - 'setFlexBasis', - 'setWidth', - 'setHeight', - 'setMinWidth', - 'setMinHeight', - 'setMaxWidth', - 'setMaxHeight', - 'setPadding', - ]) { - const methods = { - [Unit.Point]: lib.Node.prototype[fnName], - [Unit.Percent]: lib.Node.prototype[`${fnName}Percent`], - [Unit.Auto]: lib.Node.prototype[`${fnName}Auto`], - }; - - patch(lib.Node.prototype, fnName, function (original, ...args) { - // We patch all these functions to add support for the following calls: - // .setWidth(100) / .setWidth("100%") / .setWidth(.getWidth()) / .setWidth("auto") - - const value = args.pop(); - let unit, asNumber; - - if (value === 'auto') { - unit = Unit.Auto; - asNumber = undefined; - } else if (typeof value === 'object') { - unit = value.unit; - asNumber = value.valueOf(); - } else { - unit = - typeof value === 'string' && value.endsWith('%') - ? Unit.Percent - : Unit.Point; - asNumber = parseFloat(value); - if (!Number.isNaN(value) && Number.isNaN(asNumber)) { - throw new Error(`Invalid value ${value} for ${fnName}`); - } - } - - if (!methods[unit]) - throw new Error( - `Failed to execute "${fnName}": Unsupported unit '${value}'`, - ); - - if (asNumber !== undefined) { - return methods[unit].call(this, ...args, asNumber); - } else { - return methods[unit].call(this, ...args); - } - }); - } - - function wrapMeasureFunction(measureFunction) { - return lib.MeasureCallback.implement({ - measure: (...args) => { - const {width, height} = measureFunction(...args); - return { - width: width ?? NaN, - height: height ?? NaN, - }; - }, - }); - } - - patch(lib.Node.prototype, 'setMeasureFunc', function (original, measureFunc) { - // This patch is just a convenience patch, since it helps write more - // idiomatic source code (such as .setMeasureFunc(null)) - if (measureFunc) { - return original.call(this, wrapMeasureFunction(measureFunc)); - } else { - return this.unsetMeasureFunc(); - } - }); - - function wrapDirtiedFunc(dirtiedFunction) { - return lib.DirtiedCallback.implement({dirtied: dirtiedFunction}); - } - - patch(lib.Node.prototype, 'setDirtiedFunc', function (original, dirtiedFunc) { - original.call(this, wrapDirtiedFunc(dirtiedFunc)); - }); - - patch(lib.Config.prototype, 'free', function () { - // Since we handle the memory allocation ourselves (via lib.Config.create), - // we also need to handle the deallocation - lib.Config.destroy(this); - }); - - patch(lib.Node, 'create', (_, config) => { - // We decide the constructor we want to call depending on the parameters - return config - ? lib.Node.createWithConfig(config) - : lib.Node.createDefault(); - }); - - patch(lib.Node.prototype, 'free', function () { - // Since we handle the memory allocation ourselves (via lib.Node.create), - // we also need to handle the deallocation - lib.Node.destroy(this); - }); - - patch(lib.Node.prototype, 'freeRecursive', function () { - for (let t = 0, T = this.getChildCount(); t < T; ++t) { - this.getChild(0).freeRecursive(); - } - this.free(); - }); - - patch( - lib.Node.prototype, - 'calculateLayout', - function (original, width = NaN, height = NaN, direction = Direction.LTR) { - // Just a small patch to add support for the function default parameters - return original.call(this, width, height, direction); - }, - ); - - return { - Config: lib.Config, - Node: lib.Node, - ...YGEnums, - }; -} diff --git a/javascript/src/wrapAssembly.d.ts b/javascript/src/wrapAssembly.ts similarity index 55% rename from javascript/src/wrapAssembly.d.ts rename to javascript/src/wrapAssembly.ts index b6e2cbab..0d55a2c6 100644 --- a/javascript/src/wrapAssembly.d.ts +++ b/javascript/src/wrapAssembly.ts @@ -6,10 +6,13 @@ * * @format */ +// @ts-nocheck + +import {Unit, Direction} from './generated/YGEnums.ts'; +import YGEnums from './generated/YGEnums.ts'; import type { Align, - Direction, Display, Edge, Errata, @@ -20,12 +23,9 @@ import type { MeasureMode, Overflow, PositionType, - Unit, Wrap, } from './generated/YGEnums'; -import YGEnums from './generated/YGEnums'; - type Layout = { left: number; right: number; @@ -179,5 +179,138 @@ export type Yoga = { }; } & typeof YGEnums; -declare const wrapAsm: (assembly: unknown) => Yoga; -export default wrapAsm; +export default function wrapAssembly(lib: unknown): Yoga { + function patch(prototype, name, fn) { + const original = prototype[name]; + + prototype[name] = function (...args) { + return fn.call(this, original, ...args); + }; + } + + for (const fnName of [ + 'setPosition', + 'setMargin', + 'setFlexBasis', + 'setWidth', + 'setHeight', + 'setMinWidth', + 'setMinHeight', + 'setMaxWidth', + 'setMaxHeight', + 'setPadding', + ]) { + const methods = { + [Unit.Point]: lib.Node.prototype[fnName], + [Unit.Percent]: lib.Node.prototype[`${fnName}Percent`], + [Unit.Auto]: lib.Node.prototype[`${fnName}Auto`], + }; + + patch(lib.Node.prototype, fnName, function (original, ...args) { + // We patch all these functions to add support for the following calls: + // .setWidth(100) / .setWidth("100%") / .setWidth(.getWidth()) / .setWidth("auto") + + const value = args.pop(); + let unit, asNumber; + + if (value === 'auto') { + unit = Unit.Auto; + asNumber = undefined; + } else if (typeof value === 'object') { + unit = value.unit; + asNumber = value.valueOf(); + } else { + unit = + typeof value === 'string' && value.endsWith('%') + ? Unit.Percent + : Unit.Point; + asNumber = parseFloat(value); + if (!Number.isNaN(value) && Number.isNaN(asNumber)) { + throw new Error(`Invalid value ${value} for ${fnName}`); + } + } + + if (!methods[unit]) + throw new Error( + `Failed to execute "${fnName}": Unsupported unit '${value}'`, + ); + + if (asNumber !== undefined) { + return methods[unit].call(this, ...args, asNumber); + } else { + return methods[unit].call(this, ...args); + } + }); + } + + function wrapMeasureFunction(measureFunction) { + return lib.MeasureCallback.implement({ + measure: (...args) => { + const {width, height} = measureFunction(...args); + return { + width: width ?? NaN, + height: height ?? NaN, + }; + }, + }); + } + + patch(lib.Node.prototype, 'setMeasureFunc', function (original, measureFunc) { + // This patch is just a convenience patch, since it helps write more + // idiomatic source code (such as .setMeasureFunc(null)) + if (measureFunc) { + return original.call(this, wrapMeasureFunction(measureFunc)); + } else { + return this.unsetMeasureFunc(); + } + }); + + function wrapDirtiedFunc(dirtiedFunction) { + return lib.DirtiedCallback.implement({dirtied: dirtiedFunction}); + } + + patch(lib.Node.prototype, 'setDirtiedFunc', function (original, dirtiedFunc) { + original.call(this, wrapDirtiedFunc(dirtiedFunc)); + }); + + patch(lib.Config.prototype, 'free', function () { + // Since we handle the memory allocation ourselves (via lib.Config.create), + // we also need to handle the deallocation + lib.Config.destroy(this); + }); + + patch(lib.Node, 'create', (_, config) => { + // We decide the constructor we want to call depending on the parameters + return config + ? lib.Node.createWithConfig(config) + : lib.Node.createDefault(); + }); + + patch(lib.Node.prototype, 'free', function () { + // Since we handle the memory allocation ourselves (via lib.Node.create), + // we also need to handle the deallocation + lib.Node.destroy(this); + }); + + patch(lib.Node.prototype, 'freeRecursive', function () { + for (let t = 0, T = this.getChildCount(); t < T; ++t) { + this.getChild(0).freeRecursive(); + } + this.free(); + }); + + patch( + lib.Node.prototype, + 'calculateLayout', + function (original, width = NaN, height = NaN, direction = Direction.LTR) { + // Just a small patch to add support for the function default parameters + return original.call(this, width, height, direction); + }, + ); + + return { + Config: lib.Config, + Node: lib.Node, + ...YGEnums, + }; +} -- 2.50.1.windows.1 From 8c60fb0924f14589af172679fa91a75abf9a7d8c Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 19 Oct 2023 19:17:46 -0700 Subject: [PATCH 10/18] . --- javascript/src/wrapAssembly.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/src/wrapAssembly.ts b/javascript/src/wrapAssembly.ts index 0d55a2c6..c9a9b56b 100644 --- a/javascript/src/wrapAssembly.ts +++ b/javascript/src/wrapAssembly.ts @@ -24,7 +24,7 @@ import type { Overflow, PositionType, Wrap, -} from './generated/YGEnums'; +} from './generated/YGEnums.ts'; type Layout = { left: number; @@ -179,7 +179,7 @@ export type Yoga = { }; } & typeof YGEnums; -export default function wrapAssembly(lib: unknown): Yoga { +export default function wrapAssembly(lib: any): Yoga { function patch(prototype, name, fn) { const original = prototype[name]; -- 2.50.1.windows.1 From a929b164eca7fb6f99d1588225be971a473ddd80 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 19 Oct 2023 20:23:46 -0700 Subject: [PATCH 11/18] Make extension rewriting opt-in instead of opt-out --- javascript/babel.config.cjs | 2 +- javascript/just.config.cjs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/javascript/babel.config.cjs b/javascript/babel.config.cjs index 70edd37d..7487d10e 100644 --- a/javascript/babel.config.cjs +++ b/javascript/babel.config.cjs @@ -23,7 +23,7 @@ module.exports = api => ({ [ '@babel/preset-typescript', { - rewriteImportExtensions: !api.env('test'), + rewriteImportExtensions: api.env('dist'), }, ], ], diff --git a/javascript/just.config.cjs b/javascript/just.config.cjs index 634fc523..ce8b91e5 100644 --- a/javascript/just.config.cjs +++ b/javascript/just.config.cjs @@ -107,6 +107,10 @@ function babelTransformTask(opts) { return spawn(node, [require.resolve('@babel/cli/bin/babel'), ...args], { cwd: __dirname, + env: { + // Trigger distribution-specific Babel transforms + NODE_ENV: 'dist', + } }); }; } -- 2.50.1.windows.1 From 44513406104502c4eb26ef85540a4dbfd2e7adb7 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 19 Oct 2023 20:31:55 -0700 Subject: [PATCH 12/18] Better limit tsconfig --- javascript/tsconfig.json | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/javascript/tsconfig.json b/javascript/tsconfig.json index ede5f35d..ddca7326 100644 --- a/javascript/tsconfig.json +++ b/javascript/tsconfig.json @@ -16,12 +16,7 @@ "yoga-layout": ["src"] } }, - "ts-node": { - "transpileOnly": true, - "esm": true - }, - "exclude": [ - "binaries/**/*", - "build/**/*" + "include": [ + "src/**/*" ] } -- 2.50.1.windows.1 From b4960085c6b5f53bf5db53efc5d3d4a8c16ec308 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 19 Oct 2023 21:04:33 -0700 Subject: [PATCH 13/18] Add better fallback --- javascript/just.config.cjs | 2 +- javascript/src/index.ts | 2 +- javascript/tsconfig.json | 3 ++- website-next/src/pages/index.module.css | 26 +++++++++++++++++++++++++ website-next/src/pages/index.tsx | 20 ++++++++++++------- 5 files changed, 43 insertions(+), 10 deletions(-) diff --git a/javascript/just.config.cjs b/javascript/just.config.cjs index ce8b91e5..f6a4815a 100644 --- a/javascript/just.config.cjs +++ b/javascript/just.config.cjs @@ -110,7 +110,7 @@ function babelTransformTask(opts) { env: { // Trigger distribution-specific Babel transforms NODE_ENV: 'dist', - } + }, }); }; } diff --git a/javascript/src/index.ts b/javascript/src/index.ts index 888257e7..af5b665a 100644 --- a/javascript/src/index.ts +++ b/javascript/src/index.ts @@ -9,7 +9,7 @@ // @ts-ignore untyped from Emscripten import loadYoga from '../binaries/web.js'; -import wrapAssembly from './wrapAssembly.js'; +import wrapAssembly from './wrapAssembly.ts'; export type { Config, diff --git a/javascript/tsconfig.json b/javascript/tsconfig.json index ddca7326..34a56fe3 100644 --- a/javascript/tsconfig.json +++ b/javascript/tsconfig.json @@ -17,6 +17,7 @@ } }, "include": [ - "src/**/*" + "src/**/*", + "tests/**/*" ] } diff --git a/website-next/src/pages/index.module.css b/website-next/src/pages/index.module.css index 180b0944..1d3762f4 100644 --- a/website-next/src/pages/index.module.css +++ b/website-next/src/pages/index.module.css @@ -28,3 +28,29 @@ align-items: center; justify-content: center; } + +.playgroundFallback { + height: 500px; + width: 100%; + background: linear-gradient(-90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px), + linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px), + linear-gradient(-90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px), + linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px), + linear-gradient( + transparent 4px, + #f5f5f5 4px, + #f5f5f5 97px, + transparent 97px + ), + linear-gradient(-90deg, #e5e5e5 1px, transparent 1px), + linear-gradient( + -90deg, + transparent 4px, + #f5f5f5 4px, + #f5f5f5 97px, + transparent 97px + ), + linear-gradient(#e5e5e5 1px, transparent 1px), #f5f5f5; + background-size: 10px 10px, 10px 10px, 100px 100px, 100px 100px, 100px 100px, + 100px 100px, 100px 100px, 100px 100px; +} diff --git a/website-next/src/pages/index.tsx b/website-next/src/pages/index.tsx index 5e6e1fcc..ff54a584 100644 --- a/website-next/src/pages/index.tsx +++ b/website-next/src/pages/index.tsx @@ -36,6 +36,18 @@ function HomepageHeader() { const LazyPlayground = React.lazy(() => import('../components/Playground')); +function ClientPlayground() { + const fallback =
; + return + {() => ( + + + + )} +; +} + + export default function Home(): JSX.Element { const {siteConfig} = useDocusaurusContext(); return ( @@ -45,13 +57,7 @@ export default function Home(): JSX.Element {
- - {() => ( - - - - )} - +
); -- 2.50.1.windows.1 From 1acbd2e85a9c84924fd451d5409130bae19d37ee Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 19 Oct 2023 22:36:48 -0700 Subject: [PATCH 14/18] Better async loading behavior --- .../src/components/Playground/index.css | 27 +++-- .../src/components/Playground/index.tsx | 98 ++++++++++--------- website-next/src/pages/index.tsx | 18 ++-- 3 files changed, 82 insertions(+), 61 deletions(-) diff --git a/website-next/src/components/Playground/index.css b/website-next/src/components/Playground/index.css index d81174de..8a835c31 100644 --- a/website-next/src/components/Playground/index.css +++ b/website-next/src/components/Playground/index.css @@ -5,19 +5,14 @@ * LICENSE file in the root directory of this source tree. */ - .PlaygroundContainer { +.PlaygroundContainer { display: flex; flex-direction: row; flex-grow: 1; width: 100%; } -.Playground { - display: flex; - flex-grow: 1; - position: relative; - width: 100%; - overflow: hidden; +.playground-background { background: linear-gradient(-90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px), linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px), linear-gradient(-90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px), @@ -41,6 +36,15 @@ 100px 100px, 100px 100px, 100px 100px; } +.Playground { + display: flex; + flex-grow: 1; + position: relative; + width: 100%; + overflow: hidden; + animation: playground-content-fade-in-frames 50ms ease-in; +} + .Playground > .YogaNode { margin: auto; position: static; @@ -72,3 +76,12 @@ .ant-modal-content { overflow: hidden; } + +@keyframes playground-content-fade-in-frames { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} diff --git a/website-next/src/components/Playground/index.tsx b/website-next/src/components/Playground/index.tsx index 19f90e74..410798fd 100644 --- a/website-next/src/components/Playground/index.tsx +++ b/website-next/src/components/Playground/index.tsx @@ -235,52 +235,58 @@ export default class Playground extends Component { : null; const playground = ( -
{ - this._containerRef = ref; - }}> - this.setState({selectedNodePath})} - onDoubleClick={this.onAdd} - direction={direction} - showGuides={this.props.showGuides} - /> - {!this.props.renderSidebar && ( - - {this.state.selectedNodePath ? ( - this.setState({[key]: value})} - direction={direction} - onRemove={ - selectedNodePath && selectedNodePath.length > 0 - ? this.onRemove - : undefined - } - onAdd={ - selectedNodePath && - selectedNodePath.length < this.props.maxDepth - ? this.onAdd - : undefined - } - /> - ) : ( -
- Select a node to edit its properties -
- )} -
- )} +
+
{ + this._containerRef = ref; + }}> + this.setState({selectedNodePath})} + onDoubleClick={this.onAdd} + direction={direction} + showGuides={this.props.showGuides} + /> + {!this.props.renderSidebar && ( + + {this.state.selectedNodePath ? ( + + this.setState({[key]: value}) + } + direction={direction} + onRemove={ + selectedNodePath && selectedNodePath.length > 0 + ? this.onRemove + : undefined + } + onAdd={ + selectedNodePath && + selectedNodePath.length < this.props.maxDepth + ? this.onAdd + : undefined + } + /> + ) : ( +
+ Select a node to edit its properties +
+ )} +
+ )} +
); diff --git a/website-next/src/pages/index.tsx b/website-next/src/pages/index.tsx index ff54a584..f3f933f1 100644 --- a/website-next/src/pages/index.tsx +++ b/website-next/src/pages/index.tsx @@ -38,15 +38,17 @@ const LazyPlayground = React.lazy(() => import('../components/Playground')); function ClientPlayground() { const fallback =
; - return - {() => ( - - - - )} -; -} + return ( + + {() => ( + + + + )} + + ); +} export default function Home(): JSX.Element { const {siteConfig} = useDocusaurusContext(); -- 2.50.1.windows.1 From 2ea4c043fdcd1824940beeff1df9af195d55fdf9 Mon Sep 17 00:00:00 2001 From: Joe Vilches Date: Mon, 23 Oct 2023 18:20:24 -0700 Subject: [PATCH 15/18] gentest support for position: static + initial test Summary: I am about to embark on supporting `position: static` in Yoga. The enum exists already (and is the default position type, lol) but does not actually do anything and just behaves like `position: relative`. My approach here is to write a bunch of tests to test for the various behaviors of static positions and then develop on Yoga afterwards to get those tests passing. To do this, we need to make a few changes to the gentest files as there is not support for adding `position: static` at the moment: * Make it so that the gentest code can physically write `YGPositionTypeStatic` if it encounters `position: static` in the style * Make it so that gentest.js knows that Yoga's default is actually static. This way the code generated in the tests will actually label nodes for non default values * Explicitly label the position type even when it is not declared in the style prop (with the exception of the default) * Regenerate all the tests Additionally I added the first, basic test: making sure insets do nothing on a statically positioned element. Reviewed By: NickGerleman Differential Revision: D50437855 fbshipit-source-id: 0e8bbf1c224d477ea4592b7563d0b70d2ffa79c8 --- gentest/fixtures/YGStaticPositionTest.html | 3 + gentest/gentest-cpp.js | 1 + gentest/gentest-java.js | 1 + gentest/gentest-javascript.js | 1 + gentest/gentest.js | 9 +- .../facebook/yoga/YGAbsolutePositionTest.java | 26 +++ .../com/facebook/yoga/YGAlignContentTest.java | 218 ++++++++++++++++++ .../com/facebook/yoga/YGAlignItemsTest.java | 120 ++++++++++ .../com/facebook/yoga/YGAlignSelfTest.java | 12 + .../com/facebook/yoga/YGAndroidNewsFeed.java | 17 ++ .../com/facebook/yoga/YGAspectRatioTest.java | 65 +++--- .../tests/com/facebook/yoga/YGBorderTest.java | 9 + .../com/facebook/yoga/YGDimensionTest.java | 5 + .../com/facebook/yoga/YGDisplayTest.java | 18 ++ .../facebook/yoga/YGFlexDirectionTest.java | 126 ++++++++++ java/tests/com/facebook/yoga/YGFlexTest.java | 33 +++ .../com/facebook/yoga/YGFlexWrapTest.java | 99 ++++++++ java/tests/com/facebook/yoga/YGGapTest.java | 125 ++++++++++ .../facebook/yoga/YGJustifyContentTest.java | 68 ++++++ .../tests/com/facebook/yoga/YGMarginTest.java | 87 +++++++ .../facebook/yoga/YGMinMaxDimensionTest.java | 68 ++++++ .../com/facebook/yoga/YGPaddingTest.java | 11 + .../com/facebook/yoga/YGPercentageTest.java | 60 +++++ .../com/facebook/yoga/YGRoundingTest.java | 62 +++++ .../com/facebook/yoga/YGSizeOverflowTest.java | 9 + .../facebook/yoga/YGStaticPositionTest.java | 59 +++++ .../generated/YGAbsolutePositionTest.test.ts | 26 +++ .../generated/YGAlignContentTest.test.ts | 218 ++++++++++++++++++ .../tests/generated/YGAlignItemsTest.test.ts | 120 ++++++++++ .../tests/generated/YGAlignSelfTest.test.ts | 12 + .../tests/generated/YGAndroidNewsFeed.test.ts | 17 ++ .../tests/generated/YGAspectRatioTest.test.ts | 65 +++--- .../tests/generated/YGBorderTest.test.ts | 9 + .../tests/generated/YGDimensionTest.test.ts | 5 + .../tests/generated/YGDisplayTest.test.ts | 18 ++ .../generated/YGFlexDirectionTest.test.ts | 126 ++++++++++ javascript/tests/generated/YGFlexTest.test.ts | 33 +++ .../tests/generated/YGFlexWrapTest.test.ts | 99 ++++++++ javascript/tests/generated/YGGapTest.test.ts | 125 ++++++++++ .../generated/YGJustifyContentTest.test.ts | 68 ++++++ .../tests/generated/YGMarginTest.test.ts | 87 +++++++ .../generated/YGMinMaxDimensionTest.test.ts | 68 ++++++ .../tests/generated/YGPaddingTest.test.ts | 11 + .../tests/generated/YGPercentageTest.test.ts | 60 +++++ .../tests/generated/YGRoundingTest.test.ts | 62 +++++ .../generated/YGSizeOverflowTest.test.ts | 9 + .../generated/YGStaticPositionTest.test.ts | 60 +++++ tests/YGFlexDirectionErrataTest.cpp | 20 ++ tests/YGRoundingMeasureFuncTest.cpp | 2 + tests/generated/YGAbsolutePositionTest.cpp | 26 +++ tests/generated/YGAlignContentTest.cpp | 218 ++++++++++++++++++ tests/generated/YGAlignItemsTest.cpp | 120 ++++++++++ tests/generated/YGAlignSelfTest.cpp | 12 + tests/generated/YGAndroidNewsFeed.cpp | 17 ++ tests/generated/YGAspectRatioTest.cpp | 65 +++--- tests/generated/YGBorderTest.cpp | 9 + tests/generated/YGDimensionTest.cpp | 5 + tests/generated/YGDisplayTest.cpp | 18 ++ tests/generated/YGFlexDirectionTest.cpp | 126 ++++++++++ tests/generated/YGFlexTest.cpp | 33 +++ tests/generated/YGFlexWrapTest.cpp | 99 ++++++++ tests/generated/YGGapTest.cpp | 125 ++++++++++ tests/generated/YGJustifyContentTest.cpp | 68 ++++++ tests/generated/YGMarginTest.cpp | 87 +++++++ tests/generated/YGMinMaxDimensionTest.cpp | 68 ++++++ tests/generated/YGPaddingTest.cpp | 11 + tests/generated/YGPercentageTest.cpp | 60 +++++ tests/generated/YGRoundingTest.cpp | 62 +++++ tests/generated/YGSizeOverflowTest.cpp | 9 + tests/generated/YGStaticPositionTest.cpp | 42 ++++ 70 files changed, 3824 insertions(+), 88 deletions(-) create mode 100644 gentest/fixtures/YGStaticPositionTest.html create mode 100644 java/tests/com/facebook/yoga/YGStaticPositionTest.java create mode 100644 javascript/tests/generated/YGStaticPositionTest.test.ts create mode 100644 tests/generated/YGStaticPositionTest.cpp diff --git a/gentest/fixtures/YGStaticPositionTest.html b/gentest/fixtures/YGStaticPositionTest.html new file mode 100644 index 00000000..95cc3095 --- /dev/null +++ b/gentest/fixtures/YGStaticPositionTest.html @@ -0,0 +1,3 @@ +
+
diff --git a/gentest/gentest-cpp.js b/gentest/gentest-cpp.js index 464eb2f6..02e5c070 100644 --- a/gentest/gentest-cpp.js +++ b/gentest/gentest-cpp.js @@ -127,6 +127,7 @@ CPPEmitter.prototype = Object.create(Emitter.prototype, { YGPositionTypeAbsolute: {value: 'YGPositionTypeAbsolute'}, YGPositionTypeRelative: {value: 'YGPositionTypeRelative'}, + YGPositionTypeStatic: {value: 'YGPositionTypeStatic'}, YGWrapNoWrap: {value: 'YGWrapNoWrap'}, YGWrapWrap: {value: 'YGWrapWrap'}, diff --git a/gentest/gentest-java.js b/gentest/gentest-java.js index 2154a611..6f131a1a 100644 --- a/gentest/gentest-java.js +++ b/gentest/gentest-java.js @@ -171,6 +171,7 @@ JavaEmitter.prototype = Object.create(Emitter.prototype, { YGPositionTypeAbsolute: {value: 'YogaPositionType.ABSOLUTE'}, YGPositionTypeRelative: {value: 'YogaPositionType.RELATIVE'}, + YGPositionTypeStatic: {value: 'YogaPositionType.STATIC'}, YGUndefined: {value: 'YogaConstants.UNDEFINED'}, diff --git a/gentest/gentest-javascript.js b/gentest/gentest-javascript.js index 69ebee84..858615ac 100644 --- a/gentest/gentest-javascript.js +++ b/gentest/gentest-javascript.js @@ -156,6 +156,7 @@ JavascriptEmitter.prototype = Object.create(Emitter.prototype, { YGPositionTypeAbsolute: {value: 'PositionType.Absolute'}, YGPositionTypeRelative: {value: 'PositionType.Relative'}, + YGPositionTypeStatic: {value: 'PositionType.Static'}, YGAuto: {value: "'auto'"}, YGUndefined: {value: 'undefined'}, diff --git a/gentest/gentest.js b/gentest/gentest.js index 6a83d6f5..48317bf8 100755 --- a/gentest/gentest.js +++ b/gentest/gentest.js @@ -165,7 +165,7 @@ function checkDefaultValues() { {style: 'justify-content', value: 'flex-start'}, {style: 'align-content', value: 'flex-start'}, {style: 'align-items', value: 'stretch'}, - {style: 'position', value: 'relative'}, + {style: 'position', value: 'static'}, {style: 'flex-wrap', value: 'nowrap'}, {style: 'overflow', value: 'visible'}, {style: 'flex-grow', value: '0'}, @@ -198,8 +198,7 @@ function setupTestTree( // Skip position info for root as it messes up tests if ( node.declaredStyle[style] === '' && - (style == 'position' || - style == 'left' || + (style == 'left' || style == 'top' || style == 'right' || style == 'bottom' || @@ -576,6 +575,8 @@ function positionValue(e, value) { switch (value) { case 'absolute': return e.YGPositionTypeAbsolute; + case 'static': + return e.YGPositionTypeStatic; default: return e.YGPositionTypeRelative; } @@ -642,7 +643,7 @@ function isDefaultStyleValue(style, value) { if (defaultStyle == null) { switch (style) { case 'position': - defaultStyle = new Set(['relative']); + defaultStyle = new Set(['static']); break; case 'left': diff --git a/java/tests/com/facebook/yoga/YGAbsolutePositionTest.java b/java/tests/com/facebook/yoga/YGAbsolutePositionTest.java index ba62eeab..bc684568 100644 --- a/java/tests/com/facebook/yoga/YGAbsolutePositionTest.java +++ b/java/tests/com/facebook/yoga/YGAbsolutePositionTest.java @@ -31,6 +31,7 @@ public class YGAbsolutePositionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); @@ -74,6 +75,7 @@ public class YGAbsolutePositionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); @@ -117,6 +119,7 @@ public class YGAbsolutePositionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); @@ -160,6 +163,7 @@ public class YGAbsolutePositionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); @@ -206,6 +210,7 @@ public class YGAbsolutePositionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setOverflow(YogaOverflow.HIDDEN); root.setWidth(50f); root.setHeight(50f); @@ -217,6 +222,7 @@ public class YGAbsolutePositionTest { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); root_child0.addChildAt(root_child0_child0, 0); @@ -263,6 +269,7 @@ public class YGAbsolutePositionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setMargin(YogaEdge.LEFT, 10f); root.setMargin(YogaEdge.TOP, 10f); root.setMargin(YogaEdge.RIGHT, 10f); @@ -382,6 +389,7 @@ public class YGAbsolutePositionTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setFlexGrow(1f); root.setWidth(110f); root.setHeight(100f); @@ -426,6 +434,7 @@ public class YGAbsolutePositionTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.FLEX_END); root.setAlignItems(YogaAlign.FLEX_END); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setFlexGrow(1f); root.setWidth(110f); root.setHeight(100f); @@ -469,6 +478,7 @@ public class YGAbsolutePositionTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setFlexGrow(1f); root.setWidth(110f); root.setHeight(100f); @@ -512,6 +522,7 @@ public class YGAbsolutePositionTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setFlexGrow(1f); root.setWidth(110f); root.setHeight(100f); @@ -554,6 +565,7 @@ public class YGAbsolutePositionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setFlexGrow(1f); root.setWidth(110f); root.setHeight(100f); @@ -599,6 +611,7 @@ public class YGAbsolutePositionTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setFlexGrow(1f); root.setWidth(110f); root.setHeight(100f); @@ -644,6 +657,7 @@ public class YGAbsolutePositionTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setFlexGrow(1f); root.setWidth(110f); root.setHeight(100f); @@ -689,6 +703,7 @@ public class YGAbsolutePositionTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setFlexGrow(1f); root.setWidth(110f); root.setHeight(100f); @@ -734,6 +749,7 @@ public class YGAbsolutePositionTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setFlexGrow(1f); root.setWidth(110f); root.setHeight(100f); @@ -777,6 +793,7 @@ public class YGAbsolutePositionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setPosition(YogaEdge.LEFT, 72f); root.setWidth(52f); root.setHeight(52f); @@ -803,6 +820,7 @@ public class YGAbsolutePositionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(200f); @@ -879,6 +897,7 @@ public class YGAbsolutePositionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP_REVERSE); root.setWidth(100f); root.setHeight(100f); @@ -922,6 +941,7 @@ public class YGAbsolutePositionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP_REVERSE); root.setWidth(100f); root.setHeight(100f); @@ -964,6 +984,7 @@ public class YGAbsolutePositionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP_REVERSE); root.setWidth(100f); root.setHeight(100f); @@ -1008,6 +1029,7 @@ public class YGAbsolutePositionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP_REVERSE); root.setWidth(100f); root.setHeight(100f); @@ -1051,9 +1073,11 @@ public class YGAbsolutePositionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(300f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(300f); root.addChildAt(root_child0, 0); @@ -1107,6 +1131,7 @@ public class YGAbsolutePositionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setPadding(YogaEdge.TOP, 10); root.setBorder(YogaEdge.TOP, 10f); root.setWidth(100f); @@ -1152,6 +1177,7 @@ public class YGAbsolutePositionTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.RELATIVE); root.setPadding(YogaEdge.TOP, 20); root.setPadding(YogaEdge.BOTTOM, 20); root.setWidth(100f); diff --git a/java/tests/com/facebook/yoga/YGAlignContentTest.java b/java/tests/com/facebook/yoga/YGAlignContentTest.java index 2df25682..cb2f38f9 100644 --- a/java/tests/com/facebook/yoga/YGAlignContentTest.java +++ b/java/tests/com/facebook/yoga/YGAlignContentTest.java @@ -32,15 +32,18 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(140f); root.setHeight(120f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); @@ -88,31 +91,37 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(50f); root_child3.setHeight(10f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(50f); root_child4.setHeight(10f); root.addChildAt(root_child4, 4); @@ -190,16 +199,19 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); @@ -246,6 +258,7 @@ public class YGAlignContentTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.LEFT, 60f); root.setBorder(YogaEdge.TOP, 60f); root.setBorder(YogaEdge.RIGHT, 60f); @@ -256,21 +269,25 @@ public class YGAlignContentTest { final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0.setJustifyContent(YogaJustify.CENTER); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWrap(YogaWrap.WRAP); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidthPercent(80f); root_child0_child0.setHeight(20f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidthPercent(80f); root_child0_child1.setHeight(20f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child2 = createNode(config); + root_child0_child2.setPositionType(YogaPositionType.RELATIVE); root_child0_child2.setWidthPercent(80f); root_child0_child2.setHeight(20f); root_child0.addChildAt(root_child0_child2, 2); @@ -337,6 +354,7 @@ public class YGAlignContentTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.LEFT, 60f); root.setBorder(YogaEdge.TOP, 60f); root.setBorder(YogaEdge.RIGHT, 60f); @@ -347,6 +365,7 @@ public class YGAlignContentTest { final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0.setJustifyContent(YogaJustify.CENTER); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWrap(YogaWrap.WRAP); root_child0.setHeight(10f); root_child0.setGap(YogaGutter.COLUMN, 10f); @@ -354,16 +373,19 @@ public class YGAlignContentTest { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidthPercent(80f); root_child0_child0.setHeight(20f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidthPercent(80f); root_child0_child1.setHeight(20f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child2 = createNode(config); + root_child0_child2.setPositionType(YogaPositionType.RELATIVE); root_child0_child2.setWidthPercent(80f); root_child0_child2.setHeight(20f); root_child0.addChildAt(root_child0_child2, 2); @@ -430,29 +452,35 @@ public class YGAlignContentTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(50f); root_child3.setHeight(10f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(50f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); @@ -528,17 +556,20 @@ public class YGAlignContentTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(120f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasisPercent(0f); root_child0.setWidth(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setFlexBasisPercent(0f); root_child1.setWidth(50f); @@ -546,10 +577,12 @@ public class YGAlignContentTest { root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setFlexGrow(1f); root_child3.setFlexShrink(1f); root_child3.setFlexBasisPercent(0f); @@ -557,6 +590,7 @@ public class YGAlignContentTest { root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(50f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); @@ -634,15 +668,18 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.FLEX_END); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(140f); root.setHeight(120f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); @@ -691,31 +728,37 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.FLEX_END); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(50f); root_child3.setHeight(10f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(50f); root_child4.setHeight(10f); root.addChildAt(root_child4, 4); @@ -794,16 +837,19 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.FLEX_END); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); @@ -850,6 +896,7 @@ public class YGAlignContentTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.LEFT, 60f); root.setBorder(YogaEdge.TOP, 60f); root.setBorder(YogaEdge.RIGHT, 60f); @@ -861,21 +908,25 @@ public class YGAlignContentTest { root_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setAlignContent(YogaAlign.FLEX_END); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWrap(YogaWrap.WRAP); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidthPercent(80f); root_child0_child0.setHeight(20f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidthPercent(80f); root_child0_child1.setHeight(20f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child2 = createNode(config); + root_child0_child2.setPositionType(YogaPositionType.RELATIVE); root_child0_child2.setWidthPercent(80f); root_child0_child2.setHeight(20f); root_child0.addChildAt(root_child0_child2, 2); @@ -942,6 +993,7 @@ public class YGAlignContentTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.LEFT, 60f); root.setBorder(YogaEdge.TOP, 60f); root.setBorder(YogaEdge.RIGHT, 60f); @@ -953,6 +1005,7 @@ public class YGAlignContentTest { root_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setAlignContent(YogaAlign.FLEX_END); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWrap(YogaWrap.WRAP); root_child0.setHeight(10f); root_child0.setGap(YogaGutter.COLUMN, 10f); @@ -960,16 +1013,19 @@ public class YGAlignContentTest { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidthPercent(80f); root_child0_child0.setHeight(20f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidthPercent(80f); root_child0_child1.setHeight(20f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child2 = createNode(config); + root_child0_child2.setPositionType(YogaPositionType.RELATIVE); root_child0_child2.setWidthPercent(80f); root_child0_child2.setHeight(20f); root_child0.addChildAt(root_child0_child2, 2); @@ -1038,15 +1094,18 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(140f); root.setHeight(120f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); @@ -1095,31 +1154,37 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(50f); root_child3.setHeight(10f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(50f); root_child4.setHeight(10f); root.addChildAt(root_child4, 4); @@ -1198,16 +1263,19 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); @@ -1254,6 +1322,7 @@ public class YGAlignContentTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.LEFT, 60f); root.setBorder(YogaEdge.TOP, 60f); root.setBorder(YogaEdge.RIGHT, 60f); @@ -1265,21 +1334,25 @@ public class YGAlignContentTest { root_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setAlignContent(YogaAlign.CENTER); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWrap(YogaWrap.WRAP); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidthPercent(80f); root_child0_child0.setHeight(20f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidthPercent(80f); root_child0_child1.setHeight(20f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child2 = createNode(config); + root_child0_child2.setPositionType(YogaPositionType.RELATIVE); root_child0_child2.setWidthPercent(80f); root_child0_child2.setHeight(20f); root_child0.addChildAt(root_child0_child2, 2); @@ -1346,6 +1419,7 @@ public class YGAlignContentTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.LEFT, 60f); root.setBorder(YogaEdge.TOP, 60f); root.setBorder(YogaEdge.RIGHT, 60f); @@ -1357,6 +1431,7 @@ public class YGAlignContentTest { root_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setAlignContent(YogaAlign.CENTER); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWrap(YogaWrap.WRAP); root_child0.setHeight(10f); root_child0.setGap(YogaGutter.COLUMN, 10f); @@ -1364,16 +1439,19 @@ public class YGAlignContentTest { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidthPercent(80f); root_child0_child0.setHeight(20f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidthPercent(80f); root_child0_child1.setHeight(20f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child2 = createNode(config); + root_child0_child2.setPositionType(YogaPositionType.RELATIVE); root_child0_child2.setWidthPercent(80f); root_child0_child2.setHeight(20f); root_child0.addChildAt(root_child0_child2, 2); @@ -1442,15 +1520,18 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.SPACE_BETWEEN); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(140f); root.setHeight(120f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); @@ -1499,31 +1580,37 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.SPACE_BETWEEN); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(50f); root_child3.setHeight(10f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(50f); root_child4.setHeight(10f); root.addChildAt(root_child4, 4); @@ -1602,16 +1689,19 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.SPACE_BETWEEN); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); @@ -1658,6 +1748,7 @@ public class YGAlignContentTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.LEFT, 60f); root.setBorder(YogaEdge.TOP, 60f); root.setBorder(YogaEdge.RIGHT, 60f); @@ -1669,21 +1760,25 @@ public class YGAlignContentTest { root_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setAlignContent(YogaAlign.SPACE_BETWEEN); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWrap(YogaWrap.WRAP); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidthPercent(80f); root_child0_child0.setHeight(20f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidthPercent(80f); root_child0_child1.setHeight(20f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child2 = createNode(config); + root_child0_child2.setPositionType(YogaPositionType.RELATIVE); root_child0_child2.setWidthPercent(80f); root_child0_child2.setHeight(20f); root_child0.addChildAt(root_child0_child2, 2); @@ -1750,6 +1845,7 @@ public class YGAlignContentTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.LEFT, 60f); root.setBorder(YogaEdge.TOP, 60f); root.setBorder(YogaEdge.RIGHT, 60f); @@ -1761,6 +1857,7 @@ public class YGAlignContentTest { root_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setAlignContent(YogaAlign.SPACE_BETWEEN); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWrap(YogaWrap.WRAP); root_child0.setHeight(10f); root_child0.setGap(YogaGutter.COLUMN, 10f); @@ -1768,16 +1865,19 @@ public class YGAlignContentTest { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidthPercent(80f); root_child0_child0.setHeight(20f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidthPercent(80f); root_child0_child1.setHeight(20f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child2 = createNode(config); + root_child0_child2.setPositionType(YogaPositionType.RELATIVE); root_child0_child2.setWidthPercent(80f); root_child0_child2.setHeight(20f); root_child0.addChildAt(root_child0_child2, 2); @@ -1846,15 +1946,18 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.SPACE_AROUND); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(140f); root.setHeight(120f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); @@ -1903,31 +2006,37 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.SPACE_AROUND); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(50f); root_child3.setHeight(10f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(50f); root_child4.setHeight(10f); root.addChildAt(root_child4, 4); @@ -2006,16 +2115,19 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.SPACE_AROUND); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); @@ -2062,6 +2174,7 @@ public class YGAlignContentTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.LEFT, 60f); root.setBorder(YogaEdge.TOP, 60f); root.setBorder(YogaEdge.RIGHT, 60f); @@ -2073,21 +2186,25 @@ public class YGAlignContentTest { root_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setAlignContent(YogaAlign.SPACE_AROUND); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWrap(YogaWrap.WRAP); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidthPercent(80f); root_child0_child0.setHeight(20f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidthPercent(80f); root_child0_child1.setHeight(20f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child2 = createNode(config); + root_child0_child2.setPositionType(YogaPositionType.RELATIVE); root_child0_child2.setWidthPercent(80f); root_child0_child2.setHeight(20f); root_child0.addChildAt(root_child0_child2, 2); @@ -2154,6 +2271,7 @@ public class YGAlignContentTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.LEFT, 60f); root.setBorder(YogaEdge.TOP, 60f); root.setBorder(YogaEdge.RIGHT, 60f); @@ -2165,6 +2283,7 @@ public class YGAlignContentTest { root_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setAlignContent(YogaAlign.SPACE_AROUND); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWrap(YogaWrap.WRAP); root_child0.setHeight(10f); root_child0.setGap(YogaGutter.COLUMN, 10f); @@ -2172,16 +2291,19 @@ public class YGAlignContentTest { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidthPercent(80f); root_child0_child0.setHeight(20f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidthPercent(80f); root_child0_child1.setHeight(20f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child2 = createNode(config); + root_child0_child2.setPositionType(YogaPositionType.RELATIVE); root_child0_child2.setWidthPercent(80f); root_child0_child2.setHeight(20f); root_child0.addChildAt(root_child0_child2, 2); @@ -2250,15 +2372,18 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.SPACE_EVENLY); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(140f); root.setHeight(120f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); @@ -2307,31 +2432,37 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.SPACE_EVENLY); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(50f); root_child3.setHeight(10f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(50f); root_child4.setHeight(10f); root.addChildAt(root_child4, 4); @@ -2410,16 +2541,19 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.SPACE_EVENLY); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); @@ -2466,6 +2600,7 @@ public class YGAlignContentTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.LEFT, 60f); root.setBorder(YogaEdge.TOP, 60f); root.setBorder(YogaEdge.RIGHT, 60f); @@ -2477,21 +2612,25 @@ public class YGAlignContentTest { root_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setAlignContent(YogaAlign.SPACE_EVENLY); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWrap(YogaWrap.WRAP); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidthPercent(80f); root_child0_child0.setHeight(20f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidthPercent(80f); root_child0_child1.setHeight(20f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child2 = createNode(config); + root_child0_child2.setPositionType(YogaPositionType.RELATIVE); root_child0_child2.setWidthPercent(80f); root_child0_child2.setHeight(20f); root_child0.addChildAt(root_child0_child2, 2); @@ -2558,6 +2697,7 @@ public class YGAlignContentTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.LEFT, 60f); root.setBorder(YogaEdge.TOP, 60f); root.setBorder(YogaEdge.RIGHT, 60f); @@ -2569,6 +2709,7 @@ public class YGAlignContentTest { root_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setAlignContent(YogaAlign.SPACE_EVENLY); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWrap(YogaWrap.WRAP); root_child0.setHeight(10f); root_child0.setGap(YogaGutter.COLUMN, 10f); @@ -2576,16 +2717,19 @@ public class YGAlignContentTest { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidthPercent(80f); root_child0_child0.setHeight(20f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidthPercent(80f); root_child0_child1.setHeight(20f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child2 = createNode(config); + root_child0_child2.setPositionType(YogaPositionType.RELATIVE); root_child0_child2.setWidthPercent(80f); root_child0_child2.setHeight(20f); root_child0.addChildAt(root_child0_child2, 2); @@ -2653,27 +2797,33 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setAlignContent(YogaAlign.STRETCH); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(50f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(50f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); @@ -2751,27 +2901,33 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.STRETCH); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(50f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(50f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); @@ -2849,33 +3005,40 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.STRETCH); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setFlexGrow(1f); root_child0_child0.setFlexShrink(1f); root_child0_child0.setFlexBasisPercent(0f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(50f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(50f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); @@ -2963,15 +3126,18 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.STRETCH); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setFlexShrink(1f); root_child1.setFlexBasisPercent(0f); @@ -2979,10 +3145,12 @@ public class YGAlignContentTest { root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setFlexGrow(1f); root_child3.setFlexShrink(1f); root_child3.setFlexBasisPercent(0f); @@ -2990,6 +3158,7 @@ public class YGAlignContentTest { root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(50f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); @@ -3067,15 +3236,18 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.STRETCH); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setFlexShrink(1f); root_child1.setFlexBasisPercent(0f); @@ -3083,16 +3255,19 @@ public class YGAlignContentTest { root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setFlexGrow(1f); root_child3.setFlexBasisPercent(0f); root_child3.setWidth(50f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(50f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); @@ -3170,15 +3345,18 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.STRETCH); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setMargin(YogaEdge.LEFT, 10f); root_child1.setMargin(YogaEdge.TOP, 10f); root_child1.setMargin(YogaEdge.RIGHT, 10f); @@ -3187,10 +3365,12 @@ public class YGAlignContentTest { root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setMargin(YogaEdge.LEFT, 10f); root_child3.setMargin(YogaEdge.TOP, 10f); root_child3.setMargin(YogaEdge.RIGHT, 10f); @@ -3199,6 +3379,7 @@ public class YGAlignContentTest { root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(50f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); @@ -3276,15 +3457,18 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.STRETCH); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setPadding(YogaEdge.LEFT, 10); root_child1.setPadding(YogaEdge.TOP, 10); root_child1.setPadding(YogaEdge.RIGHT, 10); @@ -3293,10 +3477,12 @@ public class YGAlignContentTest { root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setPadding(YogaEdge.LEFT, 10); root_child3.setPadding(YogaEdge.TOP, 10); root_child3.setPadding(YogaEdge.RIGHT, 10); @@ -3305,6 +3491,7 @@ public class YGAlignContentTest { root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(50f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); @@ -3382,15 +3569,18 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.STRETCH); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); @@ -3438,28 +3628,34 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.STRETCH); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(60f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(50f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(50f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); @@ -3537,28 +3733,34 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.STRETCH); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setMaxHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(50f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(50f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); @@ -3636,28 +3838,34 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.STRETCH); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setMinHeight(80f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(50f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(50f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); @@ -3734,21 +3942,25 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setAlignContent(YogaAlign.STRETCH); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(150f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setFlexGrow(1f); root_child0_child0.setFlexShrink(1f); root_child0_child0.setFlexBasisPercent(0f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setFlexShrink(1f); root_child1.setFlexBasisPercent(0f); @@ -3756,14 +3968,17 @@ public class YGAlignContentTest { root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setHeight(50f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setHeight(50f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setHeight(50f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); @@ -3850,17 +4065,20 @@ public class YGAlignContentTest { final YogaNode root = createNode(config); root.setAlignContent(YogaAlign.STRETCH); + root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0.setAlignContent(YogaAlign.STRETCH); root_child0.setAlignItems(YogaAlign.CENTER); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(100f); root_child0.setHeight(100f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); root_child0_child0.setAlignContent(YogaAlign.STRETCH); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); root_child0.addChildAt(root_child0_child0, 0); diff --git a/java/tests/com/facebook/yoga/YGAlignItemsTest.java b/java/tests/com/facebook/yoga/YGAlignItemsTest.java index 8a485155..06cb071f 100644 --- a/java/tests/com/facebook/yoga/YGAlignItemsTest.java +++ b/java/tests/com/facebook/yoga/YGAlignItemsTest.java @@ -31,10 +31,12 @@ public class YGAlignItemsTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); @@ -71,10 +73,12 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -112,10 +116,12 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.FLEX_START); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -153,10 +159,12 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.FLEX_END); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -195,15 +203,18 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignItems(YogaAlign.BASELINE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); @@ -252,20 +263,24 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignItems(YogaAlign.BASELINE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); + root_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child1_child0.setWidth(50f); root_child1_child0.setHeight(10f); root_child1.addChildAt(root_child1_child0, 0); @@ -324,37 +339,44 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignItems(YogaAlign.BASELINE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(60f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); root_child1.setFlexDirection(YogaFlexDirection.ROW); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWrap(YogaWrap.WRAP); root_child1.setWidth(50f); root_child1.setHeight(25f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); + root_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child1_child0.setWidth(25f); root_child1_child0.setHeight(20f); root_child1.addChildAt(root_child1_child0, 0); final YogaNode root_child1_child1 = createNode(config); + root_child1_child1.setPositionType(YogaPositionType.RELATIVE); root_child1_child1.setWidth(25f); root_child1_child1.setHeight(10f); root_child1.addChildAt(root_child1_child1, 1); final YogaNode root_child1_child2 = createNode(config); + root_child1_child2.setPositionType(YogaPositionType.RELATIVE); root_child1_child2.setWidth(25f); root_child1_child2.setHeight(20f); root_child1.addChildAt(root_child1_child2, 2); final YogaNode root_child1_child3 = createNode(config); + root_child1_child3.setPositionType(YogaPositionType.RELATIVE); root_child1_child3.setWidth(25f); root_child1_child3.setHeight(10f); root_child1.addChildAt(root_child1_child3, 3); @@ -443,39 +465,46 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignItems(YogaAlign.BASELINE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(60f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); root_child1.setFlexDirection(YogaFlexDirection.ROW); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWrap(YogaWrap.WRAP); root_child1.setWidth(50f); root_child1.setHeight(25f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); + root_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child1_child0.setWidth(25f); root_child1_child0.setHeight(20f); root_child1.addChildAt(root_child1_child0, 0); final YogaNode root_child1_child1 = createNode(config); root_child1_child1.setAlignSelf(YogaAlign.BASELINE); + root_child1_child1.setPositionType(YogaPositionType.RELATIVE); root_child1_child1.setWidth(25f); root_child1_child1.setHeight(10f); root_child1.addChildAt(root_child1_child1, 1); final YogaNode root_child1_child2 = createNode(config); + root_child1_child2.setPositionType(YogaPositionType.RELATIVE); root_child1_child2.setWidth(25f); root_child1_child2.setHeight(20f); root_child1.addChildAt(root_child1_child2, 2); final YogaNode root_child1_child3 = createNode(config); root_child1_child3.setAlignSelf(YogaAlign.BASELINE); + root_child1_child3.setPositionType(YogaPositionType.RELATIVE); root_child1_child3.setWidth(25f); root_child1_child3.setHeight(10f); root_child1.addChildAt(root_child1_child3, 3); @@ -564,38 +593,45 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignItems(YogaAlign.BASELINE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(60f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); root_child1.setFlexDirection(YogaFlexDirection.ROW); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWrap(YogaWrap.WRAP); root_child1.setWidth(50f); root_child1.setHeight(25f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); + root_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child1_child0.setWidth(25f); root_child1_child0.setHeight(20f); root_child1.addChildAt(root_child1_child0, 0); final YogaNode root_child1_child1 = createNode(config); + root_child1_child1.setPositionType(YogaPositionType.RELATIVE); root_child1_child1.setWidth(25f); root_child1_child1.setHeight(10f); root_child1.addChildAt(root_child1_child1, 1); final YogaNode root_child1_child2 = createNode(config); + root_child1_child2.setPositionType(YogaPositionType.RELATIVE); root_child1_child2.setWidth(25f); root_child1_child2.setHeight(20f); root_child1.addChildAt(root_child1_child2, 2); final YogaNode root_child1_child3 = createNode(config); root_child1_child3.setAlignSelf(YogaAlign.BASELINE); + root_child1_child3.setPositionType(YogaPositionType.RELATIVE); root_child1_child3.setWidth(25f); root_child1_child3.setHeight(10f); root_child1.addChildAt(root_child1_child3, 3); @@ -684,21 +720,25 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignItems(YogaAlign.BASELINE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setPosition(YogaEdge.TOP, 10f); root_child0.setWidth(50f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); + root_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child1_child0.setWidth(50f); root_child1_child0.setHeight(10f); root_child1.addChildAt(root_child1_child0, 0); @@ -757,21 +797,25 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignItems(YogaAlign.BASELINE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setPosition(YogaEdge.TOP, 5f); root_child1.setWidth(50f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); + root_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child1_child0.setWidth(50f); root_child1_child0.setHeight(10f); root_child1.addChildAt(root_child1_child0, 0); @@ -830,25 +874,30 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignItems(YogaAlign.BASELINE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(50f); root_child0_child0.setHeight(20f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); + root_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child1_child0.setWidth(50f); root_child1_child0.setHeight(15f); root_child1.addChildAt(root_child1_child0, 0); @@ -916,15 +965,18 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.BASELINE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); @@ -973,10 +1025,12 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignItems(YogaAlign.BASELINE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMargin(YogaEdge.LEFT, 5f); root_child0.setMargin(YogaEdge.TOP, 5f); root_child0.setMargin(YogaEdge.RIGHT, 5f); @@ -986,11 +1040,13 @@ public class YGAlignItemsTest { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); + root_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child1_child0.setMargin(YogaEdge.LEFT, 1f); root_child1_child0.setMargin(YogaEdge.TOP, 1f); root_child1_child0.setMargin(YogaEdge.RIGHT, 1f); @@ -1053,6 +1109,7 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignItems(YogaAlign.BASELINE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setPadding(YogaEdge.LEFT, 5); root.setPadding(YogaEdge.TOP, 5); root.setPadding(YogaEdge.RIGHT, 5); @@ -1061,11 +1118,13 @@ public class YGAlignItemsTest { root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setPadding(YogaEdge.LEFT, 5); root_child1.setPadding(YogaEdge.TOP, 5); root_child1.setPadding(YogaEdge.RIGHT, 5); @@ -1075,6 +1134,7 @@ public class YGAlignItemsTest { root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); + root_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child1_child0.setWidth(50f); root_child1_child0.setHeight(10f); root_child1.addChildAt(root_child1_child0, 0); @@ -1133,36 +1193,43 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignItems(YogaAlign.BASELINE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); + root_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child1_child0.setWidth(50f); root_child1_child0.setHeight(10f); root_child1.addChildAt(root_child1_child0, 0); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root_child2.setHeight(20f); root.addChildAt(root_child2, 2); final YogaNode root_child2_child0 = createNode(config); + root_child2_child0.setPositionType(YogaPositionType.RELATIVE); root_child2_child0.setWidth(50f); root_child2_child0.setHeight(10f); root_child2.addChildAt(root_child2_child0, 0); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(50f); root_child3.setHeight(50f); root.addChildAt(root_child3, 3); @@ -1251,36 +1318,43 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.BASELINE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(30f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); + root_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child1_child0.setWidth(20f); root_child1_child0.setHeight(20f); root_child1.addChildAt(root_child1_child0, 0); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(40f); root_child2.setHeight(70f); root.addChildAt(root_child2, 2); final YogaNode root_child2_child0 = createNode(config); + root_child2_child0.setPositionType(YogaPositionType.RELATIVE); root_child2_child0.setWidth(10f); root_child2_child0.setHeight(10f); root_child2.addChildAt(root_child2_child0, 0); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(50f); root_child3.setHeight(20f); root.addChildAt(root_child3, 3); @@ -1369,36 +1443,43 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.BASELINE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(30f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); + root_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child1_child0.setWidth(20f); root_child1_child0.setHeight(20f); root_child1.addChildAt(root_child1_child0, 0); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(40f); root_child2.setHeight(70f); root.addChildAt(root_child2, 2); final YogaNode root_child2_child0 = createNode(config); + root_child2_child0.setPositionType(YogaPositionType.RELATIVE); root_child2_child0.setWidth(10f); root_child2_child0.setHeight(10f); root_child2.addChildAt(root_child2_child0, 0); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(50f); root_child3.setHeight(20f); root.addChildAt(root_child3, 3); @@ -1487,36 +1568,43 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignItems(YogaAlign.BASELINE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); + root_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child1_child0.setWidth(50f); root_child1_child0.setHeight(10f); root_child1.addChildAt(root_child1_child0, 0); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root_child2.setHeight(20f); root.addChildAt(root_child2, 2); final YogaNode root_child2_child0 = createNode(config); + root_child2_child0.setPositionType(YogaPositionType.RELATIVE); root_child2_child0.setWidth(50f); root_child2_child0.setHeight(10f); root_child2.addChildAt(root_child2_child0, 0); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(50f); root_child3.setHeight(20f); root.addChildAt(root_child3, 3); @@ -1605,14 +1693,17 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(52f); root.setHeight(52f); final YogaNode root_child0 = createNode(config); root_child0.setAlignItems(YogaAlign.CENTER); + root_child0.setPositionType(YogaPositionType.RELATIVE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setMargin(YogaEdge.LEFT, 10f); root_child0_child0.setMargin(YogaEdge.RIGHT, 10f); root_child0_child0.setWidth(52f); @@ -1663,14 +1754,17 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(52f); root.setHeight(52f); final YogaNode root_child0 = createNode(config); root_child0.setAlignItems(YogaAlign.FLEX_END); + root_child0.setPositionType(YogaPositionType.RELATIVE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setMargin(YogaEdge.LEFT, 10f); root_child0_child0.setMargin(YogaEdge.RIGHT, 10f); root_child0_child0.setWidth(52f); @@ -1721,14 +1815,17 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(52f); root.setHeight(52f); final YogaNode root_child0 = createNode(config); root_child0.setAlignItems(YogaAlign.CENTER); + root_child0.setPositionType(YogaPositionType.RELATIVE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(72f); root_child0_child0.setHeight(72f); root_child0.addChildAt(root_child0_child0, 0); @@ -1777,14 +1874,17 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(52f); root.setHeight(52f); final YogaNode root_child0 = createNode(config); root_child0.setAlignItems(YogaAlign.FLEX_END); + root_child0.setPositionType(YogaPositionType.RELATIVE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(72f); root_child0_child0.setHeight(72f); root_child0.addChildAt(root_child0_child0, 0); @@ -1832,21 +1932,25 @@ public class YGAlignItemsTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setMargin(YogaEdge.TOP, 20f); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); root_child0.setJustifyContent(YogaJustify.CENTER); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexShrink(1f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setFlexGrow(1f); root_child0_child0.setFlexShrink(1f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child0.setWidth(20f); root_child0_child0_child0.setHeight(20f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); @@ -1903,21 +2007,25 @@ public class YGAlignItemsTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setMargin(YogaEdge.TOP, 20f); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); root_child0.setJustifyContent(YogaJustify.CENTER); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexShrink(1f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setFlexGrow(1f); root_child0_child0.setFlexShrink(1f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child0.setWidth(20f); root_child0_child0_child0.setHeight(20f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); @@ -1974,19 +2082,23 @@ public class YGAlignItemsTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(500f); root.setHeight(500f); final YogaNode root_child0 = createNode(config); root_child0.setAlignItems(YogaAlign.FLEX_START); + root_child0.setPositionType(YogaPositionType.RELATIVE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setFlexGrow(1f); root_child0_child0.setFlexShrink(1f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child0.setFlexGrow(1f); root_child0_child0_child0.setFlexShrink(1f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); @@ -2043,18 +2155,22 @@ public class YGAlignItemsTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(500f); root.setHeight(500f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setFlexGrow(1f); root_child0_child0.setFlexShrink(1f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child0.setFlexGrow(1f); root_child0_child0_child0.setFlexShrink(1f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); @@ -2111,19 +2227,23 @@ public class YGAlignItemsTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(500f); root.setHeight(500f); final YogaNode root_child0 = createNode(config); root_child0.setAlignItems(YogaAlign.FLEX_START); + root_child0.setPositionType(YogaPositionType.RELATIVE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setFlexGrow(1f); root_child0_child0.setFlexShrink(1f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child0.setFlexGrow(1f); root_child0_child0_child0.setFlexShrink(1f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); diff --git a/java/tests/com/facebook/yoga/YGAlignSelfTest.java b/java/tests/com/facebook/yoga/YGAlignSelfTest.java index 3d32e06f..e998b9d1 100644 --- a/java/tests/com/facebook/yoga/YGAlignSelfTest.java +++ b/java/tests/com/facebook/yoga/YGAlignSelfTest.java @@ -31,11 +31,13 @@ public class YGAlignSelfTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); root_child0.setAlignSelf(YogaAlign.CENTER); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -72,11 +74,13 @@ public class YGAlignSelfTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); root_child0.setAlignSelf(YogaAlign.FLEX_END); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -113,11 +117,13 @@ public class YGAlignSelfTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); root_child0.setAlignSelf(YogaAlign.FLEX_START); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -155,11 +161,13 @@ public class YGAlignSelfTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.FLEX_START); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); root_child0.setAlignSelf(YogaAlign.FLEX_END); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -197,22 +205,26 @@ public class YGAlignSelfTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); root_child0.setAlignSelf(YogaAlign.BASELINE); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); root_child1.setAlignSelf(YogaAlign.BASELINE); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); + root_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child1_child0.setWidth(50f); root_child1_child0.setHeight(10f); root_child1.addChildAt(root_child1_child0, 0); diff --git a/java/tests/com/facebook/yoga/YGAndroidNewsFeed.java b/java/tests/com/facebook/yoga/YGAndroidNewsFeed.java index 57f0726d..595ddd40 100644 --- a/java/tests/com/facebook/yoga/YGAndroidNewsFeed.java +++ b/java/tests/com/facebook/yoga/YGAndroidNewsFeed.java @@ -32,23 +32,28 @@ public class YGAndroidNewsFeed { final YogaNode root = createNode(config); root.setAlignContent(YogaAlign.STRETCH); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(1080f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); root_child0_child0.setAlignContent(YogaAlign.STRETCH); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); root_child0_child0_child0.setAlignContent(YogaAlign.STRETCH); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child0_child0_child0 = createNode(config); root_child0_child0_child0_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0_child0_child0_child0.setAlignContent(YogaAlign.STRETCH); root_child0_child0_child0_child0.setAlignItems(YogaAlign.FLEX_START); + root_child0_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child0_child0.setMargin(YogaEdge.START, 36f); root_child0_child0_child0_child0.setMargin(YogaEdge.TOP, 24f); root_child0_child0_child0.addChildAt(root_child0_child0_child0_child0, 0); @@ -56,16 +61,19 @@ public class YGAndroidNewsFeed { final YogaNode root_child0_child0_child0_child0_child0 = createNode(config); root_child0_child0_child0_child0_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0_child0_child0_child0_child0.setAlignContent(YogaAlign.STRETCH); + root_child0_child0_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child0_child0.addChildAt(root_child0_child0_child0_child0_child0, 0); final YogaNode root_child0_child0_child0_child0_child0_child0 = createNode(config); root_child0_child0_child0_child0_child0_child0.setAlignContent(YogaAlign.STRETCH); + root_child0_child0_child0_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child0_child0_child0_child0.setWidth(120f); root_child0_child0_child0_child0_child0_child0.setHeight(120f); root_child0_child0_child0_child0_child0.addChildAt(root_child0_child0_child0_child0_child0_child0, 0); final YogaNode root_child0_child0_child0_child0_child1 = createNode(config); root_child0_child0_child0_child0_child1.setAlignContent(YogaAlign.STRETCH); + root_child0_child0_child0_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child0_child0_child1.setFlexShrink(1f); root_child0_child0_child0_child0_child1.setMargin(YogaEdge.RIGHT, 36f); root_child0_child0_child0_child0_child1.setPadding(YogaEdge.LEFT, 36); @@ -77,22 +85,26 @@ public class YGAndroidNewsFeed { final YogaNode root_child0_child0_child0_child0_child1_child0 = createNode(config); root_child0_child0_child0_child0_child1_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0_child0_child0_child0_child1_child0.setAlignContent(YogaAlign.STRETCH); + root_child0_child0_child0_child0_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child0_child0_child1_child0.setFlexShrink(1f); root_child0_child0_child0_child0_child1.addChildAt(root_child0_child0_child0_child0_child1_child0, 0); final YogaNode root_child0_child0_child0_child0_child1_child1 = createNode(config); root_child0_child0_child0_child0_child1_child1.setAlignContent(YogaAlign.STRETCH); + root_child0_child0_child0_child0_child1_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child0_child0_child1_child1.setFlexShrink(1f); root_child0_child0_child0_child0_child1.addChildAt(root_child0_child0_child0_child0_child1_child1, 1); final YogaNode root_child0_child0_child1 = createNode(config); root_child0_child0_child1.setAlignContent(YogaAlign.STRETCH); + root_child0_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.addChildAt(root_child0_child0_child1, 1); final YogaNode root_child0_child0_child1_child0 = createNode(config); root_child0_child0_child1_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0_child0_child1_child0.setAlignContent(YogaAlign.STRETCH); root_child0_child0_child1_child0.setAlignItems(YogaAlign.FLEX_START); + root_child0_child0_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child1_child0.setMargin(YogaEdge.START, 174f); root_child0_child0_child1_child0.setMargin(YogaEdge.TOP, 24f); root_child0_child0_child1.addChildAt(root_child0_child0_child1_child0, 0); @@ -100,16 +112,19 @@ public class YGAndroidNewsFeed { final YogaNode root_child0_child0_child1_child0_child0 = createNode(config); root_child0_child0_child1_child0_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0_child0_child1_child0_child0.setAlignContent(YogaAlign.STRETCH); + root_child0_child0_child1_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child1_child0.addChildAt(root_child0_child0_child1_child0_child0, 0); final YogaNode root_child0_child0_child1_child0_child0_child0 = createNode(config); root_child0_child0_child1_child0_child0_child0.setAlignContent(YogaAlign.STRETCH); + root_child0_child0_child1_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child1_child0_child0_child0.setWidth(72f); root_child0_child0_child1_child0_child0_child0.setHeight(72f); root_child0_child0_child1_child0_child0.addChildAt(root_child0_child0_child1_child0_child0_child0, 0); final YogaNode root_child0_child0_child1_child0_child1 = createNode(config); root_child0_child0_child1_child0_child1.setAlignContent(YogaAlign.STRETCH); + root_child0_child0_child1_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child1_child0_child1.setFlexShrink(1f); root_child0_child0_child1_child0_child1.setMargin(YogaEdge.RIGHT, 36f); root_child0_child0_child1_child0_child1.setPadding(YogaEdge.LEFT, 36); @@ -121,11 +136,13 @@ public class YGAndroidNewsFeed { final YogaNode root_child0_child0_child1_child0_child1_child0 = createNode(config); root_child0_child0_child1_child0_child1_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0_child0_child1_child0_child1_child0.setAlignContent(YogaAlign.STRETCH); + root_child0_child0_child1_child0_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child1_child0_child1_child0.setFlexShrink(1f); root_child0_child0_child1_child0_child1.addChildAt(root_child0_child0_child1_child0_child1_child0, 0); final YogaNode root_child0_child0_child1_child0_child1_child1 = createNode(config); root_child0_child0_child1_child0_child1_child1.setAlignContent(YogaAlign.STRETCH); + root_child0_child0_child1_child0_child1_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child1_child0_child1_child1.setFlexShrink(1f); root_child0_child0_child1_child0_child1.addChildAt(root_child0_child0_child1_child0_child1_child1, 1); root.setDirection(YogaDirection.LTR); diff --git a/java/tests/com/facebook/yoga/YGAspectRatioTest.java b/java/tests/com/facebook/yoga/YGAspectRatioTest.java index bc06fb34..5d96ebd2 100644 --- a/java/tests/com/facebook/yoga/YGAspectRatioTest.java +++ b/java/tests/com/facebook/yoga/YGAspectRatioTest.java @@ -32,10 +32,12 @@ public class YGAspectRatioTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(300f); root.setHeight(300f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setOverflow(YogaOverflow.SCROLL); root_child0.setFlexGrow(1f); root_child0.setFlexShrink(1f); @@ -44,9 +46,11 @@ public class YGAspectRatioTest { final YogaNode root_child0_child0 = createNode(config); root_child0_child0.setFlexDirection(YogaFlexDirection.ROW); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child0.setFlexGrow(2f); root_child0_child0_child0.setFlexShrink(1f); root_child0_child0_child0.setFlexBasisPercent(0f); @@ -54,16 +58,19 @@ public class YGAspectRatioTest { root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child0_child1 = createNode(config); + root_child0_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child1.setWidth(5f); root_child0_child0.addChildAt(root_child0_child0_child1, 1); final YogaNode root_child0_child0_child2 = createNode(config); + root_child0_child0_child2.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child2.setFlexGrow(1f); root_child0_child0_child2.setFlexShrink(1f); root_child0_child0_child2.setFlexBasisPercent(0f); root_child0_child0.addChildAt(root_child0_child0_child2, 2); final YogaNode root_child0_child0_child2_child0 = createNode(config); + root_child0_child0_child2_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child2_child0.setFlexGrow(1f); root_child0_child0_child2_child0.setFlexShrink(1f); root_child0_child0_child2_child0.setFlexBasisPercent(0f); @@ -71,10 +78,12 @@ public class YGAspectRatioTest { root_child0_child0_child2.addChildAt(root_child0_child0_child2_child0, 0); final YogaNode root_child0_child0_child2_child0_child0 = createNode(config); + root_child0_child0_child2_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child2_child0_child0.setWidth(5f); root_child0_child0_child2_child0.addChildAt(root_child0_child0_child2_child0_child0, 0); final YogaNode root_child0_child0_child2_child0_child1 = createNode(config); + root_child0_child0_child2_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child2_child0_child1.setFlexGrow(1f); root_child0_child0_child2_child0_child1.setFlexShrink(1f); root_child0_child0_child2_child0_child1.setFlexBasisPercent(0f); @@ -95,28 +104,28 @@ public class YGAspectRatioTest { assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); - assertEquals(285f, root_child0_child0.getLayoutWidth(), 0.0f); - assertEquals(187f, root_child0_child0.getLayoutHeight(), 0.0f); + assertEquals(300f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(197f, root_child0_child0.getLayoutHeight(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); - assertEquals(187f, root_child0_child0_child0.getLayoutWidth(), 0.0f); - assertEquals(187f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + assertEquals(197f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(197f, root_child0_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(187f, root_child0_child0_child1.getLayoutX(), 0.0f); + assertEquals(197f, root_child0_child0_child1.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child1.getLayoutY(), 0.0f); assertEquals(5f, root_child0_child0_child1.getLayoutWidth(), 0.0f); - assertEquals(187f, root_child0_child0_child1.getLayoutHeight(), 0.0f); + assertEquals(197f, root_child0_child0_child1.getLayoutHeight(), 0.0f); - assertEquals(192f, root_child0_child0_child2.getLayoutX(), 0.0f); + assertEquals(202f, root_child0_child0_child2.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child2.getLayoutY(), 0.0f); - assertEquals(93f, root_child0_child0_child2.getLayoutWidth(), 0.0f); - assertEquals(187f, root_child0_child0_child2.getLayoutHeight(), 0.0f); + assertEquals(98f, root_child0_child0_child2.getLayoutWidth(), 0.0f); + assertEquals(197f, root_child0_child0_child2.getLayoutHeight(), 0.0f); assertEquals(0f, root_child0_child0_child2_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child2_child0.getLayoutY(), 0.0f); - assertEquals(93f, root_child0_child0_child2_child0.getLayoutWidth(), 0.0f); - assertEquals(187f, root_child0_child0_child2_child0.getLayoutHeight(), 0.0f); + assertEquals(98f, root_child0_child0_child2_child0.getLayoutWidth(), 0.0f); + assertEquals(197f, root_child0_child0_child2_child0.getLayoutHeight(), 0.0f); assertEquals(0f, root_child0_child0_child2_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child2_child0_child0.getLayoutY(), 0.0f); @@ -125,8 +134,8 @@ public class YGAspectRatioTest { assertEquals(0f, root_child0_child0_child2_child0_child1.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child2_child0_child1.getLayoutY(), 0.0f); - assertEquals(93f, root_child0_child0_child2_child0_child1.getLayoutWidth(), 0.0f); - assertEquals(187f, root_child0_child0_child2_child0_child1.getLayoutHeight(), 0.0f); + assertEquals(98f, root_child0_child0_child2_child0_child1.getLayoutWidth(), 0.0f); + assertEquals(197f, root_child0_child0_child2_child0_child1.getLayoutHeight(), 0.0f); root.setDirection(YogaDirection.RTL); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -141,40 +150,40 @@ public class YGAspectRatioTest { assertEquals(300f, root_child0.getLayoutWidth(), 0.0f); assertEquals(300f, root_child0.getLayoutHeight(), 0.0f); - assertEquals(30f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); - assertEquals(285f, root_child0_child0.getLayoutWidth(), 0.0f); - assertEquals(187f, root_child0_child0.getLayoutHeight(), 0.0f); + assertEquals(300f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(197f, root_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(98f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(103f, root_child0_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); - assertEquals(187f, root_child0_child0_child0.getLayoutWidth(), 0.0f); - assertEquals(187f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + assertEquals(197f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(197f, root_child0_child0_child0.getLayoutHeight(), 0.0f); - assertEquals(93f, root_child0_child0_child1.getLayoutX(), 0.0f); + assertEquals(98f, root_child0_child0_child1.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child1.getLayoutY(), 0.0f); assertEquals(5f, root_child0_child0_child1.getLayoutWidth(), 0.0f); - assertEquals(187f, root_child0_child0_child1.getLayoutHeight(), 0.0f); + assertEquals(197f, root_child0_child0_child1.getLayoutHeight(), 0.0f); assertEquals(0f, root_child0_child0_child2.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child2.getLayoutY(), 0.0f); - assertEquals(93f, root_child0_child0_child2.getLayoutWidth(), 0.0f); - assertEquals(187f, root_child0_child0_child2.getLayoutHeight(), 0.0f); + assertEquals(98f, root_child0_child0_child2.getLayoutWidth(), 0.0f); + assertEquals(197f, root_child0_child0_child2.getLayoutHeight(), 0.0f); assertEquals(0f, root_child0_child0_child2_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child2_child0.getLayoutY(), 0.0f); - assertEquals(93f, root_child0_child0_child2_child0.getLayoutWidth(), 0.0f); - assertEquals(187f, root_child0_child0_child2_child0.getLayoutHeight(), 0.0f); + assertEquals(98f, root_child0_child0_child2_child0.getLayoutWidth(), 0.0f); + assertEquals(197f, root_child0_child0_child2_child0.getLayoutHeight(), 0.0f); - assertEquals(88f, root_child0_child0_child2_child0_child0.getLayoutX(), 0.0f); + assertEquals(93f, root_child0_child0_child2_child0_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child2_child0_child0.getLayoutY(), 0.0f); assertEquals(5f, root_child0_child0_child2_child0_child0.getLayoutWidth(), 0.0f); assertEquals(0f, root_child0_child0_child2_child0_child0.getLayoutHeight(), 0.0f); assertEquals(0f, root_child0_child0_child2_child0_child1.getLayoutX(), 0.0f); assertEquals(0f, root_child0_child0_child2_child0_child1.getLayoutY(), 0.0f); - assertEquals(93f, root_child0_child0_child2_child0_child1.getLayoutWidth(), 0.0f); - assertEquals(187f, root_child0_child0_child2_child0_child1.getLayoutHeight(), 0.0f); + assertEquals(98f, root_child0_child0_child2_child0_child1.getLayoutWidth(), 0.0f); + assertEquals(197f, root_child0_child0_child2_child0_child1.getLayoutHeight(), 0.0f); } private YogaNode createNode(YogaConfig config) { diff --git a/java/tests/com/facebook/yoga/YGBorderTest.java b/java/tests/com/facebook/yoga/YGBorderTest.java index 27c071e4..160c0cbf 100644 --- a/java/tests/com/facebook/yoga/YGBorderTest.java +++ b/java/tests/com/facebook/yoga/YGBorderTest.java @@ -31,6 +31,7 @@ public class YGBorderTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.LEFT, 10f); root.setBorder(YogaEdge.TOP, 10f); root.setBorder(YogaEdge.RIGHT, 10f); @@ -58,12 +59,14 @@ public class YGBorderTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.LEFT, 10f); root.setBorder(YogaEdge.TOP, 10f); root.setBorder(YogaEdge.RIGHT, 10f); root.setBorder(YogaEdge.BOTTOM, 10f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -100,6 +103,7 @@ public class YGBorderTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.LEFT, 10f); root.setBorder(YogaEdge.TOP, 10f); root.setBorder(YogaEdge.RIGHT, 10f); @@ -108,6 +112,7 @@ public class YGBorderTest { root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); @@ -144,6 +149,7 @@ public class YGBorderTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.LEFT, 10f); root.setBorder(YogaEdge.TOP, 10f); root.setBorder(YogaEdge.RIGHT, 10f); @@ -152,6 +158,7 @@ public class YGBorderTest { root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); @@ -189,6 +196,7 @@ public class YGBorderTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.START, 10f); root.setBorder(YogaEdge.END, 20f); root.setBorder(YogaEdge.BOTTOM, 20f); @@ -196,6 +204,7 @@ public class YGBorderTest { root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); diff --git a/java/tests/com/facebook/yoga/YGDimensionTest.java b/java/tests/com/facebook/yoga/YGDimensionTest.java index 3156b664..393d02e6 100644 --- a/java/tests/com/facebook/yoga/YGDimensionTest.java +++ b/java/tests/com/facebook/yoga/YGDimensionTest.java @@ -31,8 +31,10 @@ public class YGDimensionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(100f); root_child0.setHeight(100f); root.addChildAt(root_child0, 0); @@ -69,11 +71,14 @@ public class YGDimensionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); root_child0.addChildAt(root_child0_child0, 0); diff --git a/java/tests/com/facebook/yoga/YGDisplayTest.java b/java/tests/com/facebook/yoga/YGDisplayTest.java index 2e6e7d45..0778b826 100644 --- a/java/tests/com/facebook/yoga/YGDisplayTest.java +++ b/java/tests/com/facebook/yoga/YGDisplayTest.java @@ -32,14 +32,17 @@ public class YGDisplayTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setDisplay(YogaDisplay.NONE); root.addChildAt(root_child1, 1); @@ -87,14 +90,17 @@ public class YGDisplayTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(20f); root_child1.setHeight(20f); root_child1.setDisplay(YogaDisplay.NONE); @@ -143,10 +149,12 @@ public class YGDisplayTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMargin(YogaEdge.LEFT, 10f); root_child0.setMargin(YogaEdge.TOP, 10f); root_child0.setMargin(YogaEdge.RIGHT, 10f); @@ -157,6 +165,7 @@ public class YGDisplayTest { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); @@ -203,16 +212,19 @@ public class YGDisplayTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexShrink(1f); root_child0.setFlexBasisPercent(0f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setFlexShrink(1f); root_child1.setFlexBasisPercent(0f); @@ -220,6 +232,7 @@ public class YGDisplayTest { root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); + root_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child1_child0.setFlexGrow(1f); root_child1_child0.setFlexShrink(1f); root_child1_child0.setFlexBasisPercent(0f); @@ -227,6 +240,7 @@ public class YGDisplayTest { root_child1.addChildAt(root_child1_child0, 0); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setFlexGrow(1f); root_child2.setFlexShrink(1f); root_child2.setFlexBasisPercent(0f); @@ -295,14 +309,17 @@ public class YGDisplayTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setPosition(YogaEdge.TOP, 10f); root_child1.setDisplay(YogaDisplay.NONE); @@ -350,6 +367,7 @@ public class YGDisplayTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); diff --git a/java/tests/com/facebook/yoga/YGFlexDirectionTest.java b/java/tests/com/facebook/yoga/YGFlexDirectionTest.java index af332b42..b6d35703 100644 --- a/java/tests/com/facebook/yoga/YGFlexDirectionTest.java +++ b/java/tests/com/facebook/yoga/YGFlexDirectionTest.java @@ -31,17 +31,21 @@ public class YGFlexDirectionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -98,17 +102,21 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -164,18 +172,22 @@ public class YGFlexDirectionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -232,18 +244,22 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -300,18 +316,22 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -368,18 +388,22 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -436,19 +460,23 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setMargin(YogaEdge.LEFT, 100f); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -505,19 +533,23 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setMargin(YogaEdge.START, 100f); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -574,19 +606,23 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setMargin(YogaEdge.RIGHT, 100f); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -643,19 +679,23 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setMargin(YogaEdge.END, 100f); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -712,19 +752,23 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setMargin(YogaEdge.TOP, 100f); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -781,19 +825,23 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setMargin(YogaEdge.BOTTOM, 100f); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -850,19 +898,23 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setPadding(YogaEdge.LEFT, 100); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -919,19 +971,23 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setPadding(YogaEdge.START, 100); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -988,19 +1044,23 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setPadding(YogaEdge.RIGHT, 100); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -1057,19 +1117,23 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setPadding(YogaEdge.END, 100); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -1126,19 +1190,23 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setPadding(YogaEdge.TOP, 100); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -1195,19 +1263,23 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setPadding(YogaEdge.BOTTOM, 100); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -1264,19 +1336,23 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.LEFT, 100f); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -1333,19 +1409,23 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.START, 100f); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -1402,19 +1482,23 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.RIGHT, 100f); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -1471,19 +1555,23 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.END, 100f); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -1540,19 +1628,23 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.TOP, 100f); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -1609,19 +1701,23 @@ public class YGFlexDirectionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setBorder(YogaEdge.BOTTOM, 100f); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -1677,25 +1773,30 @@ public class YGFlexDirectionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setPosition(YogaEdge.LEFT, 100f); root_child0.setWidth(100f); root_child0.setHeight(100f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidth(10f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child2 = createNode(config); + root_child0_child2.setPositionType(YogaPositionType.RELATIVE); root_child0_child2.setWidth(10f); root_child0.addChildAt(root_child0_child2, 2); root.setDirection(YogaDirection.LTR); @@ -1761,25 +1862,30 @@ public class YGFlexDirectionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setPosition(YogaEdge.START, 100f); root_child0.setWidth(100f); root_child0.setHeight(100f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidth(10f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child2 = createNode(config); + root_child0_child2.setPositionType(YogaPositionType.RELATIVE); root_child0_child2.setWidth(10f); root_child0.addChildAt(root_child0_child2, 2); root.setDirection(YogaDirection.LTR); @@ -1845,25 +1951,30 @@ public class YGFlexDirectionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setPosition(YogaEdge.RIGHT, 100f); root_child0.setWidth(100f); root_child0.setHeight(100f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidth(10f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child2 = createNode(config); + root_child0_child2.setPositionType(YogaPositionType.RELATIVE); root_child0_child2.setWidth(10f); root_child0.addChildAt(root_child0_child2, 2); root.setDirection(YogaDirection.LTR); @@ -1929,25 +2040,30 @@ public class YGFlexDirectionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setPosition(YogaEdge.END, 100f); root_child0.setWidth(100f); root_child0.setHeight(100f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidth(10f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child2 = createNode(config); + root_child0_child2.setPositionType(YogaPositionType.RELATIVE); root_child0_child2.setWidth(10f); root_child0.addChildAt(root_child0_child2, 2); root.setDirection(YogaDirection.LTR); @@ -2013,25 +2129,30 @@ public class YGFlexDirectionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setPosition(YogaEdge.TOP, 100f); root_child0.setWidth(100f); root_child0.setHeight(100f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidth(10f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child2 = createNode(config); + root_child0_child2.setPositionType(YogaPositionType.RELATIVE); root_child0_child2.setWidth(10f); root_child0.addChildAt(root_child0_child2, 2); root.setDirection(YogaDirection.LTR); @@ -2097,25 +2218,30 @@ public class YGFlexDirectionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setPosition(YogaEdge.BOTTOM, 100f); root_child0.setWidth(100f); root_child0.setHeight(100f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidth(10f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child2 = createNode(config); + root_child0_child2.setPositionType(YogaPositionType.RELATIVE); root_child0_child2.setWidth(10f); root_child0.addChildAt(root_child0_child2, 2); root.setDirection(YogaDirection.LTR); diff --git a/java/tests/com/facebook/yoga/YGFlexTest.java b/java/tests/com/facebook/yoga/YGFlexTest.java index 7de90047..9971d1cd 100644 --- a/java/tests/com/facebook/yoga/YGFlexTest.java +++ b/java/tests/com/facebook/yoga/YGFlexTest.java @@ -31,15 +31,18 @@ public class YGFlexTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasis(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); @@ -86,16 +89,19 @@ public class YGFlexTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(500f); root.setHeight(500f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexShrink(1f); root_child0.setWidth(500f); root_child0.setHeight(100f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexShrink(1f); root_child1.setWidth(500f); root_child1.setHeight(100f); @@ -144,16 +150,19 @@ public class YGFlexTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(500f); root.setHeight(500f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexShrink(1f); root_child0.setWidth(500f); root_child0.setHeight(100f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setFlexShrink(1f); root_child1.setWidth(500f); @@ -203,15 +212,18 @@ public class YGFlexTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasis(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); @@ -257,15 +269,18 @@ public class YGFlexTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexShrink(1f); root_child0.setFlexBasis(100f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexBasis(50f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); @@ -312,15 +327,18 @@ public class YGFlexTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexShrink(1f); root_child0.setFlexBasis(100f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexBasis(50f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); @@ -366,20 +384,24 @@ public class YGFlexTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setHeight(75f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexShrink(1f); root_child1.setWidth(50f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root_child2.setHeight(50f); root.addChildAt(root_child2, 2); @@ -436,21 +458,25 @@ public class YGFlexTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasis(50f); root_child0.setHeight(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setFlexGrow(1f); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); @@ -507,13 +533,16 @@ public class YGFlexTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setFlexGrow(1f); root_child0_child0.setFlexShrink(1f); root_child0.addChildAt(root_child0_child0, 0); @@ -560,19 +589,23 @@ public class YGFlexTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(500f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(0.2f); root_child0.setFlexBasis(40f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(0.2f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setFlexGrow(0.4f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); diff --git a/java/tests/com/facebook/yoga/YGFlexWrapTest.java b/java/tests/com/facebook/yoga/YGFlexWrapTest.java index ef52b0d7..f85521cc 100644 --- a/java/tests/com/facebook/yoga/YGFlexWrapTest.java +++ b/java/tests/com/facebook/yoga/YGFlexWrapTest.java @@ -31,25 +31,30 @@ public class YGFlexWrapTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(30f); root_child0.setHeight(30f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(30f); root_child1.setHeight(30f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(30f); root_child2.setHeight(30f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(30f); root_child3.setHeight(30f); root.addChildAt(root_child3, 3); @@ -117,25 +122,30 @@ public class YGFlexWrapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(30f); root_child0.setHeight(30f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(30f); root_child1.setHeight(30f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(30f); root_child2.setHeight(30f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(30f); root_child3.setHeight(30f); root.addChildAt(root_child3, 3); @@ -204,25 +214,30 @@ public class YGFlexWrapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignItems(YogaAlign.FLEX_END); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(30f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(30f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(30f); root_child2.setHeight(30f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(30f); root_child3.setHeight(30f); root.addChildAt(root_child3, 3); @@ -291,25 +306,30 @@ public class YGFlexWrapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(30f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(30f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(30f); root_child2.setHeight(30f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(30f); root_child3.setHeight(30f); root.addChildAt(root_child3, 3); @@ -377,16 +397,19 @@ public class YGFlexWrapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexBasis(50f); root_child0.setMinWidth(55f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexBasis(50f); root_child1.setMinWidth(55f); root_child1.setHeight(50f); @@ -434,23 +457,28 @@ public class YGFlexWrapTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0.setAlignItems(YogaAlign.FLEX_START); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWrap(YogaWrap.WRAP); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(100f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child0.setWidth(100f); root_child0_child0_child0.setHeight(100f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(100f); root_child1.setHeight(100f); root.addChildAt(root_child1, 1); @@ -518,15 +546,18 @@ public class YGFlexWrapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); @@ -573,30 +604,36 @@ public class YGFlexWrapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP_REVERSE); root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(30f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(30f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(30f); root_child2.setHeight(30f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(30f); root_child3.setHeight(40f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(30f); root_child4.setHeight(50f); root.addChildAt(root_child4, 4); @@ -675,30 +712,36 @@ public class YGFlexWrapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP_REVERSE); root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(30f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(30f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(30f); root_child2.setHeight(30f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(30f); root_child3.setHeight(40f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(30f); root_child4.setHeight(50f); root.addChildAt(root_child4, 4); @@ -776,30 +819,36 @@ public class YGFlexWrapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP_REVERSE); root.setWidth(300f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(30f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(30f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(30f); root_child2.setHeight(30f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(30f); root_child3.setHeight(40f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(30f); root_child4.setHeight(50f); root.addChildAt(root_child4, 4); @@ -878,30 +927,36 @@ public class YGFlexWrapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.STRETCH); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP_REVERSE); root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(30f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(30f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(30f); root_child2.setHeight(30f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(30f); root_child3.setHeight(40f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(30f); root_child4.setHeight(50f); root.addChildAt(root_child4, 4); @@ -980,30 +1035,36 @@ public class YGFlexWrapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.SPACE_AROUND); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP_REVERSE); root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(30f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(30f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(30f); root_child2.setHeight(30f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(30f); root_child3.setHeight(40f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(30f); root_child4.setHeight(50f); root.addChildAt(root_child4, 4); @@ -1081,31 +1142,37 @@ public class YGFlexWrapTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP_REVERSE); root.setWidth(200f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(30f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(30f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(30f); root_child2.setHeight(30f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(30f); root_child3.setHeight(40f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(30f); root_child4.setHeight(50f); root.addChildAt(root_child4, 4); @@ -1183,20 +1250,24 @@ public class YGFlexWrapTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWrap(YogaWrap.WRAP); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(150f); root_child0_child0.setHeight(80f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidth(80f); root_child0_child1.setHeight(80f); root_child0.addChildAt(root_child0_child1, 1); @@ -1254,20 +1325,24 @@ public class YGFlexWrapTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.FLEX_START); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWrap(YogaWrap.WRAP); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(150f); root_child0_child0.setHeight(80f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidth(80f); root_child0_child1.setHeight(80f); root_child0.addChildAt(root_child0_child1, 1); @@ -1325,20 +1400,24 @@ public class YGFlexWrapTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.FLEX_END); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWrap(YogaWrap.WRAP); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(150f); root_child0_child0.setHeight(80f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidth(80f); root_child0_child1.setHeight(80f); root_child0.addChildAt(root_child0_child1, 1); @@ -1398,17 +1477,20 @@ public class YGFlexWrapTest { root.setJustifyContent(YogaJustify.CENTER); root.setAlignContent(YogaAlign.CENTER); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(700f); root.setHeight(500f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(100f); root_child0.setHeight(500f); root_child0.setMaxHeight(200f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setMargin(YogaEdge.LEFT, 20f); root_child1.setMargin(YogaEdge.TOP, 20f); root_child1.setMargin(YogaEdge.RIGHT, 20f); @@ -1418,6 +1500,7 @@ public class YGFlexWrapTest { root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(100f); root_child2.setHeight(100f); root.addChildAt(root_child2, 2); @@ -1477,11 +1560,13 @@ public class YGFlexWrapTest { root.setJustifyContent(YogaJustify.CENTER); root.setAlignContent(YogaAlign.CENTER); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(700f); root.setHeight(500f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexShrink(1f); root_child0.setFlexBasisPercent(0f); @@ -1491,6 +1576,7 @@ public class YGFlexWrapTest { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setFlexShrink(1f); root_child1.setFlexBasisPercent(0f); @@ -1503,6 +1589,7 @@ public class YGFlexWrapTest { root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(100f); root_child2.setHeight(100f); root.addChildAt(root_child2, 2); @@ -1559,28 +1646,34 @@ public class YGFlexWrapTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(500f); root.setHeight(500f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWrap(YogaWrap.WRAP); root_child0.setWidth(85f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child0.setWidth(40f); root_child0_child0_child0.setHeight(40f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setMargin(YogaEdge.RIGHT, 10f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child1_child0 = createNode(config); + root_child0_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child1_child0.setWidth(40f); root_child0_child1_child0.setHeight(40f); root_child0_child1.addChildAt(root_child0_child1_child0, 0); @@ -1657,28 +1750,34 @@ public class YGFlexWrapTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(500f); root.setHeight(500f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWrap(YogaWrap.WRAP); root_child0.setWidth(70f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child0.setWidth(40f); root_child0_child0_child0.setHeight(40f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setMargin(YogaEdge.TOP, 10f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child1_child0 = createNode(config); + root_child0_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child1_child0.setWidth(40f); root_child0_child1_child0.setHeight(40f); root_child0_child1.addChildAt(root_child0_child1_child0, 0); diff --git a/java/tests/com/facebook/yoga/YGGapTest.java b/java/tests/com/facebook/yoga/YGGapTest.java index 148204c0..f115b59e 100644 --- a/java/tests/com/facebook/yoga/YGGapTest.java +++ b/java/tests/com/facebook/yoga/YGGapTest.java @@ -32,24 +32,28 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(80f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); root.setGap(YogaGutter.ROW, 20f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexShrink(1f); root_child0.setFlexBasisPercent(0f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setFlexShrink(1f); root_child1.setFlexBasisPercent(0f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setFlexGrow(1f); root_child2.setFlexShrink(1f); root_child2.setFlexBasisPercent(0f); @@ -108,19 +112,23 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(80f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(20f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -177,21 +185,25 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(80f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setFlexShrink(1f); root_child1.setFlexBasisPercent(0f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(20f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -248,11 +260,13 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(80f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexShrink(1f); root_child0.setFlexBasisPercent(0f); @@ -261,6 +275,7 @@ public class YGGapTest { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setFlexShrink(1f); root_child1.setFlexBasisPercent(0f); @@ -269,6 +284,7 @@ public class YGGapTest { root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setFlexGrow(1f); root_child2.setFlexShrink(1f); root_child2.setFlexBasisPercent(0f); @@ -329,52 +345,62 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(80f); root.setGap(YogaGutter.COLUMN, 10f); root.setGap(YogaGutter.ROW, 20f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(20f); root_child0.setHeight(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(20f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(20f); root_child2.setHeight(20f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(20f); root_child3.setHeight(20f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(20f); root_child4.setHeight(20f); root.addChildAt(root_child4, 4); final YogaNode root_child5 = createNode(config); + root_child5.setPositionType(YogaPositionType.RELATIVE); root_child5.setWidth(20f); root_child5.setHeight(20f); root.addChildAt(root_child5, 5); final YogaNode root_child6 = createNode(config); + root_child6.setPositionType(YogaPositionType.RELATIVE); root_child6.setWidth(20f); root_child6.setHeight(20f); root.addChildAt(root_child6, 6); final YogaNode root_child7 = createNode(config); + root_child7.setPositionType(YogaPositionType.RELATIVE); root_child7.setWidth(20f); root_child7.setHeight(20f); root.addChildAt(root_child7, 7); final YogaNode root_child8 = createNode(config); + root_child8.setPositionType(YogaPositionType.RELATIVE); root_child8.setWidth(20f); root_child8.setHeight(20f); root.addChildAt(root_child8, 8); @@ -492,6 +518,7 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(80f); root.setGap(YogaGutter.COLUMN, 10f); @@ -504,16 +531,19 @@ public class YGGapTest { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(20f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(20f); root_child2.setHeight(20f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(20f); root_child3.setHeight(20f); root.addChildAt(root_child3, 3); @@ -581,19 +611,23 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(20f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -651,19 +685,23 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setJustifyContent(YogaJustify.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(20f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -721,19 +759,23 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setJustifyContent(YogaJustify.FLEX_END); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(20f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -791,19 +833,23 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setJustifyContent(YogaJustify.SPACE_BETWEEN); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(20f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -861,19 +907,23 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setJustifyContent(YogaJustify.SPACE_AROUND); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(20f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -931,19 +981,23 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setJustifyContent(YogaJustify.SPACE_EVENLY); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(20f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -1000,6 +1054,7 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(100f); @@ -1007,31 +1062,37 @@ public class YGGapTest { root.setGap(YogaGutter.ROW, 20f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(20f); root_child0.setHeight(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(20f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(20f); root_child2.setHeight(20f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(20f); root_child3.setHeight(20f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(20f); root_child4.setHeight(20f); root.addChildAt(root_child4, 4); final YogaNode root_child5 = createNode(config); + root_child5.setPositionType(YogaPositionType.RELATIVE); root_child5.setWidth(20f); root_child5.setHeight(20f); root.addChildAt(root_child5, 5); @@ -1120,6 +1181,7 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(100f); @@ -1127,31 +1189,37 @@ public class YGGapTest { root.setGap(YogaGutter.ROW, 20f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(20f); root_child0.setHeight(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(20f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(20f); root_child2.setHeight(20f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(20f); root_child3.setHeight(20f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(20f); root_child4.setHeight(20f); root.addChildAt(root_child4, 4); final YogaNode root_child5 = createNode(config); + root_child5.setPositionType(YogaPositionType.RELATIVE); root_child5.setWidth(20f); root_child5.setHeight(20f); root.addChildAt(root_child5, 5); @@ -1240,6 +1308,7 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.FLEX_END); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(100f); @@ -1247,31 +1316,37 @@ public class YGGapTest { root.setGap(YogaGutter.ROW, 20f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(20f); root_child0.setHeight(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(20f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(20f); root_child2.setHeight(20f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(20f); root_child3.setHeight(20f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(20f); root_child4.setHeight(20f); root.addChildAt(root_child4, 4); final YogaNode root_child5 = createNode(config); + root_child5.setPositionType(YogaPositionType.RELATIVE); root_child5.setWidth(20f); root_child5.setHeight(20f); root.addChildAt(root_child5, 5); @@ -1360,6 +1435,7 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.SPACE_BETWEEN); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(100f); @@ -1367,31 +1443,37 @@ public class YGGapTest { root.setGap(YogaGutter.ROW, 20f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(20f); root_child0.setHeight(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(20f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(20f); root_child2.setHeight(20f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(20f); root_child3.setHeight(20f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(20f); root_child4.setHeight(20f); root.addChildAt(root_child4, 4); final YogaNode root_child5 = createNode(config); + root_child5.setPositionType(YogaPositionType.RELATIVE); root_child5.setWidth(20f); root_child5.setHeight(20f); root.addChildAt(root_child5, 5); @@ -1480,6 +1562,7 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.SPACE_AROUND); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(100f); @@ -1487,31 +1570,37 @@ public class YGGapTest { root.setGap(YogaGutter.ROW, 20f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(20f); root_child0.setHeight(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(20f); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(20f); root_child2.setHeight(20f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(20f); root_child3.setHeight(20f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(20f); root_child4.setHeight(20f); root.addChildAt(root_child4, 4); final YogaNode root_child5 = createNode(config); + root_child5.setPositionType(YogaPositionType.RELATIVE); root_child5.setWidth(20f); root_child5.setHeight(20f); root.addChildAt(root_child5, 5); @@ -1600,32 +1689,38 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.STRETCH); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(300f); root.setHeight(300f); root.setGap(YogaGutter.COLUMN, 5f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setMinWidth(60f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setMinWidth(60f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setFlexGrow(1f); root_child2.setMinWidth(60f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setFlexGrow(1f); root_child3.setMinWidth(60f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setFlexGrow(1f); root_child4.setMinWidth(60f); root.addChildAt(root_child4, 4); @@ -1703,18 +1798,22 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(30f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -1772,6 +1871,7 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignContent(YogaAlign.STRETCH); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(200f); @@ -1779,26 +1879,32 @@ public class YGGapTest { root.setGap(YogaGutter.ROW, 20f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(20f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(20f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(20f); root.addChildAt(root_child4, 4); final YogaNode root_child5 = createNode(config); + root_child5.setPositionType(YogaPositionType.RELATIVE); root_child5.setWidth(20f); root.addChildAt(root_child5, 5); root.setDirection(YogaDirection.LTR); @@ -1886,6 +1992,7 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignItems(YogaAlign.FLEX_END); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(200f); @@ -1893,26 +2000,32 @@ public class YGGapTest { root.setGap(YogaGutter.ROW, 20f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(20f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setWidth(20f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setWidth(20f); root.addChildAt(root_child4, 4); final YogaNode root_child5 = createNode(config); + root_child5.setPositionType(YogaPositionType.RELATIVE); root_child5.setWidth(20f); root.addChildAt(root_child5, 5); root.setDirection(YogaDirection.LTR); @@ -1998,11 +2111,13 @@ public class YGGapTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(200f); root.setGap(YogaGutter.ROW, 10f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexShrink(1f); root_child0.setFlexBasisPercent(0f); @@ -2011,6 +2126,7 @@ public class YGGapTest { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setFlexShrink(1f); root_child1.setFlexBasisPercent(0f); @@ -2019,6 +2135,7 @@ public class YGGapTest { root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setFlexGrow(1f); root_child2.setFlexShrink(1f); root_child2.setFlexBasisPercent(0f); @@ -2079,24 +2196,28 @@ public class YGGapTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(200f); root.setGap(YogaGutter.ROW, 10f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMargin(YogaEdge.TOP, 2f); root_child0.setMargin(YogaEdge.BOTTOM, 2f); root_child0.setWidth(60f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setMargin(YogaEdge.TOP, 10f); root_child1.setMargin(YogaEdge.BOTTOM, 10f); root_child1.setWidth(60f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setMargin(YogaEdge.TOP, 15f); root_child2.setMargin(YogaEdge.BOTTOM, 15f); root_child2.setWidth(60f); @@ -2154,18 +2275,22 @@ public class YGGapTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setGap(YogaGutter.ROW, 10f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setHeight(20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setHeight(30f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); diff --git a/java/tests/com/facebook/yoga/YGJustifyContentTest.java b/java/tests/com/facebook/yoga/YGJustifyContentTest.java index 89fde38e..af192df1 100644 --- a/java/tests/com/facebook/yoga/YGJustifyContentTest.java +++ b/java/tests/com/facebook/yoga/YGJustifyContentTest.java @@ -32,18 +32,22 @@ public class YGJustifyContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -101,18 +105,22 @@ public class YGJustifyContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setJustifyContent(YogaJustify.FLEX_END); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -170,18 +178,22 @@ public class YGJustifyContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setJustifyContent(YogaJustify.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -239,18 +251,22 @@ public class YGJustifyContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setJustifyContent(YogaJustify.SPACE_BETWEEN); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -308,18 +324,22 @@ public class YGJustifyContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setJustifyContent(YogaJustify.SPACE_AROUND); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -375,18 +395,22 @@ public class YGJustifyContentTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -443,18 +467,22 @@ public class YGJustifyContentTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.FLEX_END); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -511,18 +539,22 @@ public class YGJustifyContentTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -579,18 +611,22 @@ public class YGJustifyContentTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.SPACE_BETWEEN); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -647,18 +683,22 @@ public class YGJustifyContentTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.SPACE_AROUND); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -716,10 +756,12 @@ public class YGJustifyContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setJustifyContent(YogaJustify.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setMargin(YogaEdge.LEFT, 100f); root.setMinWidth(50f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(20f); root_child0.setHeight(20f); root.addChildAt(root_child0, 0); @@ -758,11 +800,13 @@ public class YGJustifyContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setJustifyContent(YogaJustify.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setMargin(YogaEdge.LEFT, 100f); root.setWidth(100f); root.setMaxWidth(80f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(20f); root_child0.setHeight(20f); root.addChildAt(root_child0, 0); @@ -800,10 +844,12 @@ public class YGJustifyContentTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setMargin(YogaEdge.TOP, 100f); root.setMinHeight(50f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(20f); root_child0.setHeight(20f); root.addChildAt(root_child0, 0); @@ -841,11 +887,13 @@ public class YGJustifyContentTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setMargin(YogaEdge.TOP, 100f); root.setHeight(100f); root.setMaxHeight(80f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(20f); root_child0.setHeight(20f); root.addChildAt(root_child0, 0); @@ -883,18 +931,22 @@ public class YGJustifyContentTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.SPACE_EVENLY); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -952,18 +1004,22 @@ public class YGJustifyContentTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setJustifyContent(YogaJustify.SPACE_EVENLY); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -1020,18 +1076,21 @@ public class YGJustifyContentTest { final YogaNode root = createNode(config); root.setAlignContent(YogaAlign.STRETCH); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(1000f); root.setHeight(1584f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0.setAlignContent(YogaAlign.STRETCH); + root_child0.setPositionType(YogaPositionType.RELATIVE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); root_child0_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0_child0.setJustifyContent(YogaJustify.CENTER); root_child0_child0.setAlignContent(YogaAlign.STRETCH); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setPadding(YogaEdge.LEFT, 100); root_child0_child0.setPadding(YogaEdge.RIGHT, 100); root_child0_child0.setMinWidth(400f); @@ -1040,6 +1099,7 @@ public class YGJustifyContentTest { final YogaNode root_child0_child0_child0 = createNode(config); root_child0_child0_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0_child0_child0.setAlignContent(YogaAlign.STRETCH); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child0.setWidth(300f); root_child0_child0_child0.setHeight(100f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); @@ -1097,18 +1157,21 @@ public class YGJustifyContentTest { final YogaNode root = createNode(config); root.setAlignContent(YogaAlign.STRETCH); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(1080f); root.setHeight(1584f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0.setAlignContent(YogaAlign.STRETCH); + root_child0.setPositionType(YogaPositionType.RELATIVE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); root_child0_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0_child0.setJustifyContent(YogaJustify.CENTER); root_child0_child0.setAlignContent(YogaAlign.STRETCH); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setPadding(YogaEdge.LEFT, 100); root_child0_child0.setPadding(YogaEdge.RIGHT, 100); root_child0_child0.setMinWidth(400f); @@ -1117,6 +1180,7 @@ public class YGJustifyContentTest { final YogaNode root_child0_child0_child0 = createNode(config); root_child0_child0_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0_child0_child0.setAlignContent(YogaAlign.STRETCH); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child0.setWidth(199f); root_child0_child0_child0.setHeight(100f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); @@ -1174,20 +1238,24 @@ public class YGJustifyContentTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(300f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0.setJustifyContent(YogaJustify.SPACE_BETWEEN); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMinWidth(200f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(50f); root_child0_child0.setHeight(50f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidth(50f); root_child0_child1.setHeight(50f); root_child0.addChildAt(root_child0_child1, 1); diff --git a/java/tests/com/facebook/yoga/YGMarginTest.java b/java/tests/com/facebook/yoga/YGMarginTest.java index b663aeb5..c0cb0b90 100644 --- a/java/tests/com/facebook/yoga/YGMarginTest.java +++ b/java/tests/com/facebook/yoga/YGMarginTest.java @@ -32,10 +32,12 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMargin(YogaEdge.START, 10f); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); @@ -72,10 +74,12 @@ public class YGMarginTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMargin(YogaEdge.TOP, 10f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -114,10 +118,12 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setJustifyContent(YogaJustify.FLEX_END); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMargin(YogaEdge.END, 10f); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); @@ -155,10 +161,12 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.FLEX_END); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMargin(YogaEdge.BOTTOM, 10f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -196,10 +204,12 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setMargin(YogaEdge.START, 10f); root_child0.setMargin(YogaEdge.END, 10f); @@ -237,10 +247,12 @@ public class YGMarginTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setMargin(YogaEdge.TOP, 10f); root_child0.setMargin(YogaEdge.BOTTOM, 10f); @@ -279,10 +291,12 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setMargin(YogaEdge.TOP, 10f); root_child0.setMargin(YogaEdge.BOTTOM, 10f); @@ -320,10 +334,12 @@ public class YGMarginTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setMargin(YogaEdge.START, 10f); root_child0.setMargin(YogaEdge.END, 10f); @@ -362,15 +378,18 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setMargin(YogaEdge.END, 10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); @@ -416,15 +435,18 @@ public class YGMarginTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setMargin(YogaEdge.BOTTOM, 10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); @@ -471,16 +493,19 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMarginAuto(YogaEdge.BOTTOM); root_child0.setWidth(50f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); @@ -528,16 +553,19 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMarginAuto(YogaEdge.TOP); root_child0.setWidth(50f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); @@ -585,10 +613,12 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMarginAuto(YogaEdge.TOP); root_child0.setMarginAuto(YogaEdge.BOTTOM); root_child0.setWidth(50f); @@ -596,6 +626,7 @@ public class YGMarginTest { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); @@ -643,10 +674,12 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMarginAuto(YogaEdge.TOP); root_child0.setMarginAuto(YogaEdge.BOTTOM); root_child0.setWidth(50f); @@ -654,6 +687,7 @@ public class YGMarginTest { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); @@ -701,22 +735,26 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMarginAuto(YogaEdge.TOP); root_child0.setWidth(50f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setMarginAuto(YogaEdge.TOP); root_child1.setWidth(50f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root_child2.setHeight(50f); root.addChildAt(root_child2, 2); @@ -775,22 +813,26 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMarginAuto(YogaEdge.RIGHT); root_child0.setWidth(50f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setMarginAuto(YogaEdge.RIGHT); root_child1.setWidth(50f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root_child2.setHeight(50f); root.addChildAt(root_child2, 2); @@ -849,10 +891,12 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMarginAuto(YogaEdge.LEFT); root_child0.setMarginAuto(YogaEdge.RIGHT); root_child0.setWidth(50f); @@ -860,6 +904,7 @@ public class YGMarginTest { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); @@ -906,10 +951,12 @@ public class YGMarginTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMarginAuto(YogaEdge.LEFT); root_child0.setMarginAuto(YogaEdge.RIGHT); root_child0.setWidth(50f); @@ -917,6 +964,7 @@ public class YGMarginTest { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); @@ -965,10 +1013,12 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMarginAuto(YogaEdge.START); root_child0.setMarginAuto(YogaEdge.END); root_child0.setWidth(50f); @@ -976,6 +1026,7 @@ public class YGMarginTest { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); @@ -1022,10 +1073,12 @@ public class YGMarginTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMarginAuto(YogaEdge.START); root_child0.setMarginAuto(YogaEdge.END); root_child0.setWidth(50f); @@ -1033,6 +1086,7 @@ public class YGMarginTest { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); @@ -1080,10 +1134,12 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMarginAuto(YogaEdge.LEFT); root_child0.setMarginAuto(YogaEdge.RIGHT); root_child0.setWidth(50f); @@ -1091,6 +1147,7 @@ public class YGMarginTest { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); @@ -1138,16 +1195,19 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMarginAuto(YogaEdge.LEFT); root_child0.setWidth(50f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); @@ -1195,16 +1255,19 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMarginAuto(YogaEdge.RIGHT); root_child0.setWidth(50f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); @@ -1252,10 +1315,12 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMarginAuto(YogaEdge.LEFT); root_child0.setMarginAuto(YogaEdge.RIGHT); root_child0.setWidth(50f); @@ -1263,6 +1328,7 @@ public class YGMarginTest { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); @@ -1309,10 +1375,12 @@ public class YGMarginTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMarginAuto(YogaEdge.TOP); root_child0.setMarginAuto(YogaEdge.BOTTOM); root_child0.setWidth(50f); @@ -1320,6 +1388,7 @@ public class YGMarginTest { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); @@ -1366,10 +1435,12 @@ public class YGMarginTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(250f); root.setHeight(250f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMargin(YogaEdge.TOP, 20f); root_child0.setWidth(100f); root_child0.setHeight(100f); @@ -1408,10 +1479,12 @@ public class YGMarginTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(250f); root.setHeight(250f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMargin(YogaEdge.LEFT, 20f); root_child0.setWidth(100f); root_child0.setMaxWidth(100f); @@ -1451,10 +1524,12 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(52f); root.setHeight(52f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMarginAuto(YogaEdge.LEFT); root_child0.setMarginAuto(YogaEdge.RIGHT); root_child0.setWidth(72f); @@ -1494,10 +1569,12 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(52f); root.setHeight(52f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMarginAuto(YogaEdge.LEFT); root_child0.setWidth(72f); root_child0.setHeight(72f); @@ -1536,10 +1613,12 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(52f); root.setHeight(52f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMargin(YogaEdge.LEFT, 10f); root_child0.setMarginAuto(YogaEdge.RIGHT); root_child0.setWidth(72f); @@ -1579,10 +1658,12 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(52f); root.setHeight(52f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMarginAuto(YogaEdge.LEFT); root_child0.setMargin(YogaEdge.RIGHT, 10f); root_child0.setWidth(72f); @@ -1622,10 +1703,12 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexShrink(1f); root_child0.setFlexBasisPercent(0f); @@ -1633,6 +1716,7 @@ public class YGMarginTest { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); @@ -1680,10 +1764,12 @@ public class YGMarginTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexShrink(1f); root_child0.setFlexBasisPercent(0f); @@ -1691,6 +1777,7 @@ public class YGMarginTest { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); diff --git a/java/tests/com/facebook/yoga/YGMinMaxDimensionTest.java b/java/tests/com/facebook/yoga/YGMinMaxDimensionTest.java index 30ca2663..66a1ecbb 100644 --- a/java/tests/com/facebook/yoga/YGMinMaxDimensionTest.java +++ b/java/tests/com/facebook/yoga/YGMinMaxDimensionTest.java @@ -31,10 +31,12 @@ public class YGMinMaxDimensionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMaxWidth(50f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -72,10 +74,12 @@ public class YGMinMaxDimensionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root_child0.setMaxHeight(50f); root.addChildAt(root_child0, 0); @@ -113,15 +117,18 @@ public class YGMinMaxDimensionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setMinHeight(60f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); @@ -169,15 +176,18 @@ public class YGMinMaxDimensionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setMinWidth(60f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); @@ -224,11 +234,13 @@ public class YGMinMaxDimensionTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setMinHeight(100f); root.setMaxHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(60f); root_child0.setHeight(60f); root.addChildAt(root_child0, 0); @@ -266,11 +278,13 @@ public class YGMinMaxDimensionTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setMinWidth(100f); root.setMaxWidth(200f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(60f); root_child0.setHeight(60f); root.addChildAt(root_child0, 0); @@ -308,20 +322,24 @@ public class YGMinMaxDimensionTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setMinHeight(100f); root.setMaxHeight(110f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(50f); root_child0.setHeight(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(50f); root_child2.setHeight(50f); root.addChildAt(root_child2, 2); @@ -378,16 +396,19 @@ public class YGMinMaxDimensionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setMinHeight(100f); root.setMaxHeight(500f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexShrink(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); @@ -435,14 +456,17 @@ public class YGMinMaxDimensionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); root.setAlignItems(YogaAlign.FLEX_START); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); + root_child0.setPositionType(YogaPositionType.RELATIVE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setFlexGrow(1f); root_child0_child0.setFlexBasis(0f); root_child0.addChildAt(root_child0_child0, 0); @@ -490,8 +514,10 @@ public class YGMinMaxDimensionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasis(0f); root_child0.setHeight(100f); @@ -529,14 +555,17 @@ public class YGMinMaxDimensionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setMinHeight(100f); root.setMaxHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); @@ -582,15 +611,18 @@ public class YGMinMaxDimensionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMaxWidth(100f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setFlexGrow(1f); root_child0_child0.setHeight(20f); root_child0.addChildAt(root_child0_child0, 0); @@ -637,15 +669,18 @@ public class YGMinMaxDimensionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMaxWidth(300f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setFlexGrow(1f); root_child0_child0.setHeight(20f); root_child0.addChildAt(root_child0_child0, 0); @@ -692,17 +727,20 @@ public class YGMinMaxDimensionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setFlexGrow(1f); root.setWidth(100f); root.setMinHeight(100f); root.setMaxHeight(500f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasis(200f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setHeight(100f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); @@ -748,22 +786,26 @@ public class YGMinMaxDimensionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setMinHeight(100f); root.setMaxHeight(500f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setMinHeight(100f); root_child0.setMaxHeight(500f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setFlexGrow(1f); root_child0_child0.setFlexBasis(200f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setHeight(100f); root_child0.addChildAt(root_child0_child1, 1); root.setDirection(YogaDirection.LTR); @@ -819,21 +861,25 @@ public class YGMinMaxDimensionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(500f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setMinHeight(100f); root_child0.setMaxHeight(500f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setFlexGrow(1f); root_child0_child0.setFlexBasis(200f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setHeight(100f); root_child0.addChildAt(root_child0_child1, 1); root.setDirection(YogaDirection.LTR); @@ -890,14 +936,17 @@ public class YGMinMaxDimensionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setMinWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setWidth(50f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); @@ -943,13 +992,16 @@ public class YGMinMaxDimensionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setMinHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); @@ -995,20 +1047,24 @@ public class YGMinMaxDimensionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMaxWidth(100f); root_child0.setHeight(100f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setFlexShrink(1f); root_child0_child0.setFlexBasis(100f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidth(50f); root_child0.addChildAt(root_child0_child1, 1); root.setDirection(YogaDirection.LTR); @@ -1064,15 +1120,18 @@ public class YGMinMaxDimensionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setMaxHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexShrink(1f); root_child0.setFlexBasis(100f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setHeight(50f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); @@ -1119,16 +1178,19 @@ public class YGMinMaxDimensionTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(120f); root.setHeight(50f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasis(0f); root_child0.setMinWidth(60f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setFlexBasisPercent(50f); root_child1.setMaxWidth(20f); @@ -1176,6 +1238,7 @@ public class YGMinMaxDimensionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(50f); root.setMinWidth(100f); root.setDirection(YogaDirection.LTR); @@ -1201,6 +1264,7 @@ public class YGMinMaxDimensionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setMaxWidth(100f); root.setDirection(YogaDirection.LTR); @@ -1226,6 +1290,7 @@ public class YGMinMaxDimensionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setHeight(50f); root.setMinHeight(100f); root.setDirection(YogaDirection.LTR); @@ -1251,6 +1316,7 @@ public class YGMinMaxDimensionTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setHeight(200f); root.setMaxHeight(100f); root.setDirection(YogaDirection.LTR); @@ -1277,10 +1343,12 @@ public class YGMinMaxDimensionTest { final YogaNode root = createNode(config); root.setAlignItems(YogaAlign.FLEX_START); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setMinWidthPercent(10f); root_child0.setMaxWidthPercent(10f); root_child0.setMinHeightPercent(10f); diff --git a/java/tests/com/facebook/yoga/YGPaddingTest.java b/java/tests/com/facebook/yoga/YGPaddingTest.java index 1f36d82f..09987307 100644 --- a/java/tests/com/facebook/yoga/YGPaddingTest.java +++ b/java/tests/com/facebook/yoga/YGPaddingTest.java @@ -31,6 +31,7 @@ public class YGPaddingTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setPadding(YogaEdge.LEFT, 10); root.setPadding(YogaEdge.TOP, 10); root.setPadding(YogaEdge.RIGHT, 10); @@ -58,12 +59,14 @@ public class YGPaddingTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setPadding(YogaEdge.LEFT, 10); root.setPadding(YogaEdge.TOP, 10); root.setPadding(YogaEdge.RIGHT, 10); root.setPadding(YogaEdge.BOTTOM, 10); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -100,6 +103,7 @@ public class YGPaddingTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setPadding(YogaEdge.LEFT, 10); root.setPadding(YogaEdge.TOP, 10); root.setPadding(YogaEdge.RIGHT, 10); @@ -108,6 +112,7 @@ public class YGPaddingTest { root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); @@ -144,6 +149,7 @@ public class YGPaddingTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setPadding(YogaEdge.LEFT, 10); root.setPadding(YogaEdge.TOP, 10); root.setPadding(YogaEdge.RIGHT, 10); @@ -152,6 +158,7 @@ public class YGPaddingTest { root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); @@ -189,6 +196,7 @@ public class YGPaddingTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setPadding(YogaEdge.START, 10); root.setPadding(YogaEdge.END, 20); root.setPadding(YogaEdge.BOTTOM, 20); @@ -196,6 +204,7 @@ public class YGPaddingTest { root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(10f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -234,10 +243,12 @@ public class YGPaddingTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.FLEX_END); root.setAlignItems(YogaAlign.FLEX_END); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setPadding(YogaEdge.LEFT, 20); root_child0.setPadding(YogaEdge.TOP, 20); root_child0.setPadding(YogaEdge.RIGHT, 20); diff --git a/java/tests/com/facebook/yoga/YGPercentageTest.java b/java/tests/com/facebook/yoga/YGPercentageTest.java index 36b8db14..aa7ac448 100644 --- a/java/tests/com/facebook/yoga/YGPercentageTest.java +++ b/java/tests/com/facebook/yoga/YGPercentageTest.java @@ -32,10 +32,12 @@ public class YGPercentageTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidthPercent(30f); root_child0.setHeightPercent(30f); root.addChildAt(root_child0, 0); @@ -73,10 +75,12 @@ public class YGPercentageTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(400f); root.setHeight(400f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setPositionPercent(YogaEdge.LEFT, 10f); root_child0.setPositionPercent(YogaEdge.TOP, 20f); root_child0.setWidthPercent(45f); @@ -116,10 +120,12 @@ public class YGPercentageTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(500f); root.setHeight(500f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setPositionPercent(YogaEdge.RIGHT, 20f); root_child0.setPositionPercent(YogaEdge.BOTTOM, 10f); root_child0.setWidthPercent(55f); @@ -159,15 +165,18 @@ public class YGPercentageTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasisPercent(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setFlexBasisPercent(25f); root.addChildAt(root_child1, 1); @@ -214,15 +223,18 @@ public class YGPercentageTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasisPercent(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setFlexBasisPercent(25f); root.addChildAt(root_child1, 1); @@ -270,15 +282,18 @@ public class YGPercentageTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setMinHeightPercent(60f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(2f); root_child1.setMinHeightPercent(10f); root.addChildAt(root_child1, 1); @@ -326,16 +341,19 @@ public class YGPercentageTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasisPercent(10f); root_child0.setMaxHeightPercent(60f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(4f); root_child1.setFlexBasisPercent(10f); root_child1.setMaxHeightPercent(20f); @@ -383,16 +401,19 @@ public class YGPercentageTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasisPercent(10f); root_child0.setMaxHeightPercent(60f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(4f); root_child1.setFlexBasisPercent(10f); root_child1.setMaxHeightPercent(20f); @@ -441,16 +462,19 @@ public class YGPercentageTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasisPercent(15f); root_child0.setMaxWidthPercent(60f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(4f); root_child1.setFlexBasisPercent(10f); root_child1.setMaxWidthPercent(20f); @@ -498,16 +522,19 @@ public class YGPercentageTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasisPercent(10f); root_child0.setMaxWidthPercent(60f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(4f); root_child1.setFlexBasisPercent(15f); root_child1.setMaxWidthPercent(20f); @@ -556,16 +583,19 @@ public class YGPercentageTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasisPercent(15f); root_child0.setMinWidthPercent(60f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(4f); root_child1.setFlexBasisPercent(10f); root_child1.setMinWidthPercent(20f); @@ -613,16 +643,19 @@ public class YGPercentageTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasisPercent(10f); root_child0.setMinWidthPercent(60f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(4f); root_child1.setFlexBasisPercent(15f); root_child1.setMinWidthPercent(20f); @@ -670,10 +703,12 @@ public class YGPercentageTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasisPercent(10f); root_child0.setMargin(YogaEdge.LEFT, 5f); @@ -688,6 +723,7 @@ public class YGPercentageTest { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setMargin(YogaEdge.LEFT, 5f); root_child0_child0.setMargin(YogaEdge.TOP, 5f); root_child0_child0.setMargin(YogaEdge.RIGHT, 5f); @@ -700,6 +736,7 @@ public class YGPercentageTest { root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child0.setMarginPercent(YogaEdge.LEFT, 5f); root_child0_child0_child0.setMarginPercent(YogaEdge.TOP, 5f); root_child0_child0_child0.setMarginPercent(YogaEdge.RIGHT, 5f); @@ -712,6 +749,7 @@ public class YGPercentageTest { root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(4f); root_child1.setFlexBasisPercent(15f); root_child1.setMinWidthPercent(20f); @@ -779,10 +817,12 @@ public class YGPercentageTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setMarginPercent(YogaEdge.LEFT, 10f); root_child0.setMarginPercent(YogaEdge.TOP, 10f); @@ -791,6 +831,7 @@ public class YGPercentageTest { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); root_child0.addChildAt(root_child0_child0, 0); @@ -837,10 +878,12 @@ public class YGPercentageTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setPaddingPercent(YogaEdge.LEFT, 10); root_child0.setPaddingPercent(YogaEdge.TOP, 10); @@ -849,6 +892,7 @@ public class YGPercentageTest { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); root_child0.addChildAt(root_child0_child0, 0); @@ -895,6 +939,7 @@ public class YGPercentageTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(100f); @@ -938,8 +983,10 @@ public class YGPercentageTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidthPercent(50f); root_child0.setHeightPercent(50f); root.addChildAt(root_child0, 0); @@ -977,22 +1024,27 @@ public class YGPercentageTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(350f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(100f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); + root_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child1_child0.setWidthPercent(100f); root_child1.addChildAt(root_child1_child0, 0); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setWidth(100f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -1060,24 +1112,29 @@ public class YGPercentageTest { final YogaNode root = createNode(config); root.setJustifyContent(YogaJustify.CENTER); root.setAlignItems(YogaAlign.CENTER); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); root_child0_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0_child0.setJustifyContent(YogaJustify.CENTER); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidthPercent(100f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child0_child1 = createNode(config); + root_child0_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child0_child1.setWidth(50f); root_child0_child0_child1.setHeight(50f); root_child0_child0.addChildAt(root_child0_child0_child1, 1); @@ -1144,6 +1201,7 @@ public class YGPercentageTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(60f); root.setHeight(50f); @@ -1156,10 +1214,12 @@ public class YGPercentageTest { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidthPercent(100f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setWidthPercent(100f); root_child0.addChildAt(root_child0_child1, 1); root.setDirection(YogaDirection.LTR); diff --git a/java/tests/com/facebook/yoga/YGRoundingTest.java b/java/tests/com/facebook/yoga/YGRoundingTest.java index 384b15e5..48426f81 100644 --- a/java/tests/com/facebook/yoga/YGRoundingTest.java +++ b/java/tests/com/facebook/yoga/YGRoundingTest.java @@ -32,18 +32,22 @@ public class YGRoundingTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setFlexGrow(1f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -100,26 +104,32 @@ public class YGRoundingTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(113f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setFlexGrow(1f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setPositionType(YogaPositionType.RELATIVE); root_child3.setFlexGrow(1f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); + root_child4.setPositionType(YogaPositionType.RELATIVE); root_child4.setFlexGrow(1f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); @@ -196,19 +206,23 @@ public class YGRoundingTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(101f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexShrink(1f); root_child0.setFlexBasis(100f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexBasis(25f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setFlexBasis(25f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); @@ -264,21 +278,25 @@ public class YGRoundingTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(113f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasis(50f); root_child0.setHeight(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setFlexGrow(1f); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); @@ -335,21 +353,25 @@ public class YGRoundingTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(87.4f); root.setHeight(113.4f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(0.7f); root_child0.setFlexBasis(50.3f); root_child0.setHeight(20.3f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1.6f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setFlexGrow(1.1f); root_child2.setHeight(10.7f); root.addChildAt(root_child2, 2); @@ -406,16 +428,19 @@ public class YGRoundingTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(87.4f); root.setHeight(113.4f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(0.7f); root_child0.setFlexBasis(50.3f); root_child0.setHeight(20.3f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setFlexGrow(1f); root_child0_child0.setFlexBasis(0.3f); root_child0_child0.setPosition(YogaEdge.BOTTOM, 13.3f); @@ -423,6 +448,7 @@ public class YGRoundingTest { root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); + root_child0_child1.setPositionType(YogaPositionType.RELATIVE); root_child0_child1.setFlexGrow(4f); root_child0_child1.setFlexBasis(0.3f); root_child0_child1.setPosition(YogaEdge.TOP, 13.3f); @@ -430,11 +456,13 @@ public class YGRoundingTest { root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1.6f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setFlexGrow(1.1f); root_child2.setHeight(10.7f); root.addChildAt(root_child2, 2); @@ -511,21 +539,25 @@ public class YGRoundingTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(113.4f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasis(50f); root_child0.setHeight(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setFlexGrow(1f); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); @@ -582,21 +614,25 @@ public class YGRoundingTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(113.6f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasis(50f); root_child0.setHeight(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setFlexGrow(1f); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); @@ -653,22 +689,26 @@ public class YGRoundingTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setPosition(YogaEdge.TOP, 0.3f); root.setWidth(100f); root.setHeight(113.4f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasis(50f); root_child0.setHeight(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setFlexGrow(1f); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); @@ -725,22 +765,26 @@ public class YGRoundingTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setPosition(YogaEdge.TOP, 0.7f); root.setWidth(100f); root.setHeight(113.4f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setFlexBasis(50f); root_child0.setHeight(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setFlexGrow(1f); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); @@ -798,24 +842,29 @@ public class YGRoundingTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(320f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); + root_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child1_child0.setFlexGrow(1f); root_child1_child0.setHeight(10f); root_child1.addChildAt(root_child1_child0, 0); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setFlexGrow(1f); root_child2.setHeight(10f); root.addChildAt(root_child2, 2); @@ -882,24 +931,29 @@ public class YGRoundingTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setHeight(320f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setWidth(10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setWidth(10f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); + root_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child1_child0.setFlexGrow(1f); root_child1_child0.setWidth(10f); root_child1.addChildAt(root_child1_child0, 0); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setFlexGrow(1f); root_child2.setWidth(10f); root.addChildAt(root_child2, 2); @@ -967,40 +1021,48 @@ public class YGRoundingTest { final YogaNode root = createNode(config); root.setFlexDirection(YogaFlexDirection.ROW); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(640f); root.setHeight(320f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setFlexGrow(1f); root_child0.setHeightPercent(100f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setPositionType(YogaPositionType.RELATIVE); root_child1.setFlexGrow(1f); root_child1.setHeightPercent(100f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); + root_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child1_child0.setFlexGrow(1f); root_child1_child0.setWidthPercent(100f); root_child1.addChildAt(root_child1_child0, 0); final YogaNode root_child1_child1 = createNode(config); + root_child1_child1.setPositionType(YogaPositionType.RELATIVE); root_child1_child1.setFlexGrow(1f); root_child1_child1.setWidthPercent(100f); root_child1.addChildAt(root_child1_child1, 1); final YogaNode root_child1_child1_child0 = createNode(config); + root_child1_child1_child0.setPositionType(YogaPositionType.RELATIVE); root_child1_child1_child0.setFlexGrow(1f); root_child1_child1_child0.setWidthPercent(100f); root_child1_child1.addChildAt(root_child1_child1_child0, 0); final YogaNode root_child1_child2 = createNode(config); + root_child1_child2.setPositionType(YogaPositionType.RELATIVE); root_child1_child2.setFlexGrow(1f); root_child1_child2.setWidthPercent(100f); root_child1.addChildAt(root_child1_child2, 2); final YogaNode root_child2 = createNode(config); + root_child2.setPositionType(YogaPositionType.RELATIVE); root_child2.setFlexGrow(1f); root_child2.setHeightPercent(100f); root.addChildAt(root_child2, 2); diff --git a/java/tests/com/facebook/yoga/YGSizeOverflowTest.java b/java/tests/com/facebook/yoga/YGSizeOverflowTest.java index 01b557b1..c67ba2cb 100644 --- a/java/tests/com/facebook/yoga/YGSizeOverflowTest.java +++ b/java/tests/com/facebook/yoga/YGSizeOverflowTest.java @@ -31,13 +31,16 @@ public class YGSizeOverflowTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(200f); root_child0_child0.setHeight(200f); root_child0.addChildAt(root_child0_child0, 0); @@ -84,15 +87,18 @@ public class YGSizeOverflowTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(100f); root_child0.setHeight(100f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(200f); root_child0_child0.setHeight(200f); root_child0.addChildAt(root_child0_child0, 0); @@ -139,14 +145,17 @@ public class YGSizeOverflowTest { config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); root_child0.setWidth(100f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); root_child0_child0.setWidth(100f); root_child0_child0.setHeight(200f); root_child0.addChildAt(root_child0_child0, 0); diff --git a/java/tests/com/facebook/yoga/YGStaticPositionTest.java b/java/tests/com/facebook/yoga/YGStaticPositionTest.java new file mode 100644 index 00000000..402ab10c --- /dev/null +++ b/java/tests/com/facebook/yoga/YGStaticPositionTest.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +// @generated by gentest/gentest.rb from gentest/fixtures/YGStaticPositionTest.html + +package com.facebook.yoga; + +import static org.junit.Assert.assertEquals; + +import org.junit.Ignore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +@RunWith(Parameterized.class) +public class YGStaticPositionTest { + @Parameterized.Parameters(name = "{0}") + public static Iterable nodeFactories() { + return TestParametrization.nodeFactories(); + } + + @Parameterized.Parameter public TestParametrization.NodeFactory mNodeFactory; + + @Test + @Ignore + public void test_static_position_insets_have_no_effect() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPosition(YogaEdge.LEFT, 50f); + root.setPosition(YogaEdge.TOP, 50f); + root.setWidth(100f); + root.setHeight(100f); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(100f, root.getLayoutWidth(), 0.0f); + assertEquals(100f, root.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(100f, root.getLayoutWidth(), 0.0f); + assertEquals(100f, root.getLayoutHeight(), 0.0f); + } + + private YogaNode createNode(YogaConfig config) { + return mNodeFactory.create(config); + } +} diff --git a/javascript/tests/generated/YGAbsolutePositionTest.test.ts b/javascript/tests/generated/YGAbsolutePositionTest.test.ts index 2ec0ce82..5f9b2d19 100644 --- a/javascript/tests/generated/YGAbsolutePositionTest.test.ts +++ b/javascript/tests/generated/YGAbsolutePositionTest.test.ts @@ -33,6 +33,7 @@ test('absolute_layout_width_height_start_top', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); @@ -82,6 +83,7 @@ test('absolute_layout_width_height_end_bottom', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); @@ -131,6 +133,7 @@ test('absolute_layout_start_top_end_bottom', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); @@ -180,6 +183,7 @@ test('absolute_layout_width_height_start_top_end_bottom', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); @@ -232,6 +236,7 @@ test('do_not_clamp_height_of_absolute_node_to_height_of_its_overflow_hidden_pare try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setOverflow(Overflow.Hidden); root.setWidth(50); root.setHeight(50); @@ -243,6 +248,7 @@ test('do_not_clamp_height_of_absolute_node_to_height_of_its_overflow_hidden_pare root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); root_child0.insertChild(root_child0_child0, 0); @@ -295,6 +301,7 @@ test('absolute_layout_within_border', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setMargin(Edge.Left, 10); root.setMargin(Edge.Top, 10); root.setMargin(Edge.Right, 10); @@ -420,6 +427,7 @@ test('absolute_layout_align_items_and_justify_content_center', () => { root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setFlexGrow(1); root.setWidth(110); root.setHeight(100); @@ -470,6 +478,7 @@ test('absolute_layout_align_items_and_justify_content_flex_end', () => { root = Yoga.Node.create(config); root.setJustifyContent(Justify.FlexEnd); root.setAlignItems(Align.FlexEnd); + root.setPositionType(PositionType.Absolute); root.setFlexGrow(1); root.setWidth(110); root.setHeight(100); @@ -519,6 +528,7 @@ test('absolute_layout_justify_content_center', () => { try { root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); + root.setPositionType(PositionType.Absolute); root.setFlexGrow(1); root.setWidth(110); root.setHeight(100); @@ -568,6 +578,7 @@ test('absolute_layout_align_items_center', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setFlexGrow(1); root.setWidth(110); root.setHeight(100); @@ -616,6 +627,7 @@ test('absolute_layout_align_items_center_on_child_only', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setFlexGrow(1); root.setWidth(110); root.setHeight(100); @@ -667,6 +679,7 @@ test('absolute_layout_align_items_and_justify_content_center_and_top_position', root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setFlexGrow(1); root.setWidth(110); root.setHeight(100); @@ -718,6 +731,7 @@ test('absolute_layout_align_items_and_justify_content_center_and_bottom_position root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setFlexGrow(1); root.setWidth(110); root.setHeight(100); @@ -769,6 +783,7 @@ test('absolute_layout_align_items_and_justify_content_center_and_left_position', root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setFlexGrow(1); root.setWidth(110); root.setHeight(100); @@ -820,6 +835,7 @@ test('absolute_layout_align_items_and_justify_content_center_and_right_position' root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setFlexGrow(1); root.setWidth(110); root.setHeight(100); @@ -869,6 +885,7 @@ test('position_root_with_rtl_should_position_withoutdirection', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setPosition(Edge.Left, 72); root.setWidth(52); root.setHeight(52); @@ -901,6 +918,7 @@ test('absolute_layout_percentage_bottom_based_on_parent_height', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(200); @@ -983,6 +1001,7 @@ test('absolute_layout_in_wrap_reverse_column_container', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.WrapReverse); root.setWidth(100); root.setHeight(100); @@ -1032,6 +1051,7 @@ test('absolute_layout_in_wrap_reverse_row_container', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.WrapReverse); root.setWidth(100); root.setHeight(100); @@ -1080,6 +1100,7 @@ test('absolute_layout_in_wrap_reverse_column_container_flex_end', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.WrapReverse); root.setWidth(100); root.setHeight(100); @@ -1130,6 +1151,7 @@ test('absolute_layout_in_wrap_reverse_row_container_flex_end', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.WrapReverse); root.setWidth(100); root.setHeight(100); @@ -1179,9 +1201,11 @@ test('percent_absolute_position_infinite_height', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(300); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(300); root.insertChild(root_child0, 0); @@ -1241,6 +1265,7 @@ test('absolute_layout_percentage_height_based_on_padded_parent', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setPadding(Edge.Top, 10); root.setBorder(Edge.Top, 10); root.setWidth(100); @@ -1292,6 +1317,7 @@ test('absolute_layout_percentage_height_based_on_padded_parent_and_align_items_c root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Relative); root.setPadding(Edge.Top, 20); root.setPadding(Edge.Bottom, 20); root.setWidth(100); diff --git a/javascript/tests/generated/YGAlignContentTest.test.ts b/javascript/tests/generated/YGAlignContentTest.test.ts index adfe3ee9..d36d42fa 100644 --- a/javascript/tests/generated/YGAlignContentTest.test.ts +++ b/javascript/tests/generated/YGAlignContentTest.test.ts @@ -34,15 +34,18 @@ test('align_content_flex_start_nowrap', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(140); root.setHeight(120); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(10); root.insertChild(root_child1, 1); @@ -96,31 +99,37 @@ test('align_content_flex_start_wrap', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root_child2.setHeight(10); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(50); root_child3.setHeight(10); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(50); root_child4.setHeight(10); root.insertChild(root_child4, 4); @@ -204,16 +213,19 @@ test('align_content_flex_start_wrap_singleline', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(10); root.insertChild(root_child1, 1); @@ -266,6 +278,7 @@ test('align_content_flex_start_wrapped_negative_space', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Left, 60); root.setBorder(Edge.Top, 60); root.setBorder(Edge.Right, 60); @@ -276,21 +289,25 @@ test('align_content_flex_start_wrapped_negative_space', () => { const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); root_child0.setJustifyContent(Justify.Center); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexWrap(Wrap.Wrap); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth("80%"); root_child0_child0.setHeight(20); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth("80%"); root_child0_child1.setHeight(20); root_child0.insertChild(root_child0_child1, 1); const root_child0_child2 = Yoga.Node.create(config); + root_child0_child2.setPositionType(PositionType.Relative); root_child0_child2.setWidth("80%"); root_child0_child2.setHeight(20); root_child0.insertChild(root_child0_child2, 2); @@ -363,6 +380,7 @@ test('align_content_flex_start_wrapped_negative_space_gap', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Left, 60); root.setBorder(Edge.Top, 60); root.setBorder(Edge.Right, 60); @@ -373,6 +391,7 @@ test('align_content_flex_start_wrapped_negative_space_gap', () => { const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); root_child0.setJustifyContent(Justify.Center); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexWrap(Wrap.Wrap); root_child0.setHeight(10); root_child0.setGap(Gutter.Column, 10); @@ -380,16 +399,19 @@ test('align_content_flex_start_wrapped_negative_space_gap', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth("80%"); root_child0_child0.setHeight(20); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth("80%"); root_child0_child1.setHeight(20); root_child0.insertChild(root_child0_child1, 1); const root_child0_child2 = Yoga.Node.create(config); + root_child0_child2.setPositionType(PositionType.Relative); root_child0_child2.setWidth("80%"); root_child0_child2.setHeight(20); root_child0.insertChild(root_child0_child2, 2); @@ -462,29 +484,35 @@ test('align_content_flex_start_without_height_on_children', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(50); root_child3.setHeight(10); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(50); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -566,17 +594,20 @@ test('align_content_flex_start_with_flex', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(120); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis("0%"); root_child0.setWidth(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setFlexBasis("0%"); root_child1.setWidth(50); @@ -584,10 +615,12 @@ test('align_content_flex_start_with_flex', () => { root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setFlexGrow(1); root_child3.setFlexShrink(1); root_child3.setFlexBasis("0%"); @@ -595,6 +628,7 @@ test('align_content_flex_start_with_flex', () => { root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(50); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -678,15 +712,18 @@ test('align_content_flex_end_nowrap', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.FlexEnd); + root.setPositionType(PositionType.Absolute); root.setWidth(140); root.setHeight(120); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(10); root.insertChild(root_child1, 1); @@ -741,31 +778,37 @@ test('align_content_flex_end_wrap', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.FlexEnd); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root_child2.setHeight(10); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(50); root_child3.setHeight(10); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(50); root_child4.setHeight(10); root.insertChild(root_child4, 4); @@ -850,16 +893,19 @@ test('align_content_flex_end_wrap_singleline', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.FlexEnd); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(10); root.insertChild(root_child1, 1); @@ -912,6 +958,7 @@ test('align_content_flex_end_wrapped_negative_space', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Left, 60); root.setBorder(Edge.Top, 60); root.setBorder(Edge.Right, 60); @@ -923,21 +970,25 @@ test('align_content_flex_end_wrapped_negative_space', () => { root_child0.setFlexDirection(FlexDirection.Row); root_child0.setJustifyContent(Justify.Center); root_child0.setAlignContent(Align.FlexEnd); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexWrap(Wrap.Wrap); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth("80%"); root_child0_child0.setHeight(20); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth("80%"); root_child0_child1.setHeight(20); root_child0.insertChild(root_child0_child1, 1); const root_child0_child2 = Yoga.Node.create(config); + root_child0_child2.setPositionType(PositionType.Relative); root_child0_child2.setWidth("80%"); root_child0_child2.setHeight(20); root_child0.insertChild(root_child0_child2, 2); @@ -1010,6 +1061,7 @@ test('align_content_flex_end_wrapped_negative_space_gap', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Left, 60); root.setBorder(Edge.Top, 60); root.setBorder(Edge.Right, 60); @@ -1021,6 +1073,7 @@ test('align_content_flex_end_wrapped_negative_space_gap', () => { root_child0.setFlexDirection(FlexDirection.Row); root_child0.setJustifyContent(Justify.Center); root_child0.setAlignContent(Align.FlexEnd); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexWrap(Wrap.Wrap); root_child0.setHeight(10); root_child0.setGap(Gutter.Column, 10); @@ -1028,16 +1081,19 @@ test('align_content_flex_end_wrapped_negative_space_gap', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth("80%"); root_child0_child0.setHeight(20); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth("80%"); root_child0_child1.setHeight(20); root_child0.insertChild(root_child0_child1, 1); const root_child0_child2 = Yoga.Node.create(config); + root_child0_child2.setPositionType(PositionType.Relative); root_child0_child2.setWidth("80%"); root_child0_child2.setHeight(20); root_child0.insertChild(root_child0_child2, 2); @@ -1112,15 +1168,18 @@ test('align_content_center_nowrap', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(140); root.setHeight(120); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(10); root.insertChild(root_child1, 1); @@ -1175,31 +1234,37 @@ test('align_content_center_wrap', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.Center); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root_child2.setHeight(10); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(50); root_child3.setHeight(10); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(50); root_child4.setHeight(10); root.insertChild(root_child4, 4); @@ -1284,16 +1349,19 @@ test('align_content_center_wrap_singleline', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.Center); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(10); root.insertChild(root_child1, 1); @@ -1346,6 +1414,7 @@ test('align_content_center_wrapped_negative_space', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Left, 60); root.setBorder(Edge.Top, 60); root.setBorder(Edge.Right, 60); @@ -1357,21 +1426,25 @@ test('align_content_center_wrapped_negative_space', () => { root_child0.setFlexDirection(FlexDirection.Row); root_child0.setJustifyContent(Justify.Center); root_child0.setAlignContent(Align.Center); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexWrap(Wrap.Wrap); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth("80%"); root_child0_child0.setHeight(20); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth("80%"); root_child0_child1.setHeight(20); root_child0.insertChild(root_child0_child1, 1); const root_child0_child2 = Yoga.Node.create(config); + root_child0_child2.setPositionType(PositionType.Relative); root_child0_child2.setWidth("80%"); root_child0_child2.setHeight(20); root_child0.insertChild(root_child0_child2, 2); @@ -1444,6 +1517,7 @@ test('align_content_center_wrapped_negative_space_gap', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Left, 60); root.setBorder(Edge.Top, 60); root.setBorder(Edge.Right, 60); @@ -1455,6 +1529,7 @@ test('align_content_center_wrapped_negative_space_gap', () => { root_child0.setFlexDirection(FlexDirection.Row); root_child0.setJustifyContent(Justify.Center); root_child0.setAlignContent(Align.Center); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexWrap(Wrap.Wrap); root_child0.setHeight(10); root_child0.setGap(Gutter.Column, 10); @@ -1462,16 +1537,19 @@ test('align_content_center_wrapped_negative_space_gap', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth("80%"); root_child0_child0.setHeight(20); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth("80%"); root_child0_child1.setHeight(20); root_child0.insertChild(root_child0_child1, 1); const root_child0_child2 = Yoga.Node.create(config); + root_child0_child2.setPositionType(PositionType.Relative); root_child0_child2.setWidth("80%"); root_child0_child2.setHeight(20); root_child0.insertChild(root_child0_child2, 2); @@ -1546,15 +1624,18 @@ test('align_content_space_between_nowrap', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.SpaceBetween); + root.setPositionType(PositionType.Absolute); root.setWidth(140); root.setHeight(120); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(10); root.insertChild(root_child1, 1); @@ -1609,31 +1690,37 @@ test('align_content_space_between_wrap', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.SpaceBetween); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root_child2.setHeight(10); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(50); root_child3.setHeight(10); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(50); root_child4.setHeight(10); root.insertChild(root_child4, 4); @@ -1718,16 +1805,19 @@ test('align_content_space_between_wrap_singleline', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.SpaceBetween); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(10); root.insertChild(root_child1, 1); @@ -1780,6 +1870,7 @@ test('align_content_space_between_wrapped_negative_space', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Left, 60); root.setBorder(Edge.Top, 60); root.setBorder(Edge.Right, 60); @@ -1791,21 +1882,25 @@ test('align_content_space_between_wrapped_negative_space', () => { root_child0.setFlexDirection(FlexDirection.Row); root_child0.setJustifyContent(Justify.Center); root_child0.setAlignContent(Align.SpaceBetween); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexWrap(Wrap.Wrap); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth("80%"); root_child0_child0.setHeight(20); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth("80%"); root_child0_child1.setHeight(20); root_child0.insertChild(root_child0_child1, 1); const root_child0_child2 = Yoga.Node.create(config); + root_child0_child2.setPositionType(PositionType.Relative); root_child0_child2.setWidth("80%"); root_child0_child2.setHeight(20); root_child0.insertChild(root_child0_child2, 2); @@ -1878,6 +1973,7 @@ test('align_content_space_between_wrapped_negative_space_gap', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Left, 60); root.setBorder(Edge.Top, 60); root.setBorder(Edge.Right, 60); @@ -1889,6 +1985,7 @@ test('align_content_space_between_wrapped_negative_space_gap', () => { root_child0.setFlexDirection(FlexDirection.Row); root_child0.setJustifyContent(Justify.Center); root_child0.setAlignContent(Align.SpaceBetween); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexWrap(Wrap.Wrap); root_child0.setHeight(10); root_child0.setGap(Gutter.Column, 10); @@ -1896,16 +1993,19 @@ test('align_content_space_between_wrapped_negative_space_gap', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth("80%"); root_child0_child0.setHeight(20); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth("80%"); root_child0_child1.setHeight(20); root_child0.insertChild(root_child0_child1, 1); const root_child0_child2 = Yoga.Node.create(config); + root_child0_child2.setPositionType(PositionType.Relative); root_child0_child2.setWidth("80%"); root_child0_child2.setHeight(20); root_child0.insertChild(root_child0_child2, 2); @@ -1980,15 +2080,18 @@ test('align_content_space_around_nowrap', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.SpaceAround); + root.setPositionType(PositionType.Absolute); root.setWidth(140); root.setHeight(120); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(10); root.insertChild(root_child1, 1); @@ -2043,31 +2146,37 @@ test('align_content_space_around_wrap', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.SpaceAround); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root_child2.setHeight(10); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(50); root_child3.setHeight(10); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(50); root_child4.setHeight(10); root.insertChild(root_child4, 4); @@ -2152,16 +2261,19 @@ test('align_content_space_around_wrap_singleline', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.SpaceAround); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(10); root.insertChild(root_child1, 1); @@ -2214,6 +2326,7 @@ test('align_content_space_around_wrapped_negative_space', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Left, 60); root.setBorder(Edge.Top, 60); root.setBorder(Edge.Right, 60); @@ -2225,21 +2338,25 @@ test('align_content_space_around_wrapped_negative_space', () => { root_child0.setFlexDirection(FlexDirection.Row); root_child0.setJustifyContent(Justify.Center); root_child0.setAlignContent(Align.SpaceAround); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexWrap(Wrap.Wrap); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth("80%"); root_child0_child0.setHeight(20); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth("80%"); root_child0_child1.setHeight(20); root_child0.insertChild(root_child0_child1, 1); const root_child0_child2 = Yoga.Node.create(config); + root_child0_child2.setPositionType(PositionType.Relative); root_child0_child2.setWidth("80%"); root_child0_child2.setHeight(20); root_child0.insertChild(root_child0_child2, 2); @@ -2312,6 +2429,7 @@ test('align_content_space_around_wrapped_negative_space_gap', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Left, 60); root.setBorder(Edge.Top, 60); root.setBorder(Edge.Right, 60); @@ -2323,6 +2441,7 @@ test('align_content_space_around_wrapped_negative_space_gap', () => { root_child0.setFlexDirection(FlexDirection.Row); root_child0.setJustifyContent(Justify.Center); root_child0.setAlignContent(Align.SpaceAround); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexWrap(Wrap.Wrap); root_child0.setHeight(10); root_child0.setGap(Gutter.Column, 10); @@ -2330,16 +2449,19 @@ test('align_content_space_around_wrapped_negative_space_gap', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth("80%"); root_child0_child0.setHeight(20); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth("80%"); root_child0_child1.setHeight(20); root_child0.insertChild(root_child0_child1, 1); const root_child0_child2 = Yoga.Node.create(config); + root_child0_child2.setPositionType(PositionType.Relative); root_child0_child2.setWidth("80%"); root_child0_child2.setHeight(20); root_child0.insertChild(root_child0_child2, 2); @@ -2414,15 +2536,18 @@ test('align_content_space_evenly_nowrap', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.SpaceEvenly); + root.setPositionType(PositionType.Absolute); root.setWidth(140); root.setHeight(120); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(10); root.insertChild(root_child1, 1); @@ -2477,31 +2602,37 @@ test('align_content_space_evenly_wrap', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.SpaceEvenly); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root_child2.setHeight(10); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(50); root_child3.setHeight(10); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(50); root_child4.setHeight(10); root.insertChild(root_child4, 4); @@ -2586,16 +2717,19 @@ test('align_content_space_evenly_wrap_singleline', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.SpaceEvenly); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(10); root.insertChild(root_child1, 1); @@ -2648,6 +2782,7 @@ test('align_content_space_evenly_wrapped_negative_space', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Left, 60); root.setBorder(Edge.Top, 60); root.setBorder(Edge.Right, 60); @@ -2659,21 +2794,25 @@ test('align_content_space_evenly_wrapped_negative_space', () => { root_child0.setFlexDirection(FlexDirection.Row); root_child0.setJustifyContent(Justify.Center); root_child0.setAlignContent(Align.SpaceEvenly); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexWrap(Wrap.Wrap); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth("80%"); root_child0_child0.setHeight(20); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth("80%"); root_child0_child1.setHeight(20); root_child0.insertChild(root_child0_child1, 1); const root_child0_child2 = Yoga.Node.create(config); + root_child0_child2.setPositionType(PositionType.Relative); root_child0_child2.setWidth("80%"); root_child0_child2.setHeight(20); root_child0.insertChild(root_child0_child2, 2); @@ -2746,6 +2885,7 @@ test('align_content_space_evenly_wrapped_negative_space_gap', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Left, 60); root.setBorder(Edge.Top, 60); root.setBorder(Edge.Right, 60); @@ -2757,6 +2897,7 @@ test('align_content_space_evenly_wrapped_negative_space_gap', () => { root_child0.setFlexDirection(FlexDirection.Row); root_child0.setJustifyContent(Justify.Center); root_child0.setAlignContent(Align.SpaceEvenly); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexWrap(Wrap.Wrap); root_child0.setHeight(10); root_child0.setGap(Gutter.Column, 10); @@ -2764,16 +2905,19 @@ test('align_content_space_evenly_wrapped_negative_space_gap', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth("80%"); root_child0_child0.setHeight(20); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth("80%"); root_child0_child1.setHeight(20); root_child0.insertChild(root_child0_child1, 1); const root_child0_child2 = Yoga.Node.create(config); + root_child0_child2.setPositionType(PositionType.Relative); root_child0_child2.setWidth("80%"); root_child0_child2.setHeight(20); root_child0.insertChild(root_child0_child2, 2); @@ -2847,27 +2991,33 @@ test('align_content_stretch', () => { try { root = Yoga.Node.create(config); root.setAlignContent(Align.Stretch); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(50); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(50); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2951,27 +3101,33 @@ test('align_content_stretch_row', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.Stretch); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(50); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(50); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3055,33 +3211,40 @@ test('align_content_stretch_row_with_children', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.Stretch); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setFlexGrow(1); root_child0_child0.setFlexShrink(1); root_child0_child0.setFlexBasis("0%"); root_child0.insertChild(root_child0_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(50); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(50); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3175,15 +3338,18 @@ test('align_content_stretch_row_with_flex', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.Stretch); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setFlexShrink(1); root_child1.setFlexBasis("0%"); @@ -3191,10 +3357,12 @@ test('align_content_stretch_row_with_flex', () => { root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setFlexGrow(1); root_child3.setFlexShrink(1); root_child3.setFlexBasis("0%"); @@ -3202,6 +3370,7 @@ test('align_content_stretch_row_with_flex', () => { root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(50); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3285,15 +3454,18 @@ test('align_content_stretch_row_with_flex_no_shrink', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.Stretch); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setFlexShrink(1); root_child1.setFlexBasis("0%"); @@ -3301,16 +3473,19 @@ test('align_content_stretch_row_with_flex_no_shrink', () => { root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setFlexGrow(1); root_child3.setFlexBasis("0%"); root_child3.setWidth(50); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(50); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3394,15 +3569,18 @@ test('align_content_stretch_row_with_margin', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.Stretch); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setMargin(Edge.Left, 10); root_child1.setMargin(Edge.Top, 10); root_child1.setMargin(Edge.Right, 10); @@ -3411,10 +3589,12 @@ test('align_content_stretch_row_with_margin', () => { root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setMargin(Edge.Left, 10); root_child3.setMargin(Edge.Top, 10); root_child3.setMargin(Edge.Right, 10); @@ -3423,6 +3603,7 @@ test('align_content_stretch_row_with_margin', () => { root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(50); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3506,15 +3687,18 @@ test('align_content_stretch_row_with_padding', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.Stretch); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setPadding(Edge.Left, 10); root_child1.setPadding(Edge.Top, 10); root_child1.setPadding(Edge.Right, 10); @@ -3523,10 +3707,12 @@ test('align_content_stretch_row_with_padding', () => { root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setPadding(Edge.Left, 10); root_child3.setPadding(Edge.Top, 10); root_child3.setPadding(Edge.Right, 10); @@ -3535,6 +3721,7 @@ test('align_content_stretch_row_with_padding', () => { root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(50); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3618,15 +3805,18 @@ test('align_content_stretch_row_with_single_row', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.Stretch); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3680,28 +3870,34 @@ test('align_content_stretch_row_with_fixed_height', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.Stretch); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(60); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(50); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(50); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3785,28 +3981,34 @@ test('align_content_stretch_row_with_max_height', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.Stretch); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setMaxHeight(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(50); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(50); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3890,28 +4092,34 @@ test('align_content_stretch_row_with_min_height', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.Stretch); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setMinHeight(80); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(50); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(50); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3994,21 +4202,25 @@ test('align_content_stretch_column', () => { try { root = Yoga.Node.create(config); root.setAlignContent(Align.Stretch); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(150); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setFlexGrow(1); root_child0_child0.setFlexShrink(1); root_child0_child0.setFlexBasis("0%"); root_child0.insertChild(root_child0_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setFlexShrink(1); root_child1.setFlexBasis("0%"); @@ -4016,14 +4228,17 @@ test('align_content_stretch_column', () => { root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setHeight(50); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setHeight(50); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setHeight(50); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -4116,17 +4331,20 @@ test('align_content_stretch_is_not_overriding_align_items', () => { try { root = Yoga.Node.create(config); root.setAlignContent(Align.Stretch); + root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); root_child0.setAlignContent(Align.Stretch); root_child0.setAlignItems(Align.Center); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(100); root_child0.setHeight(100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); root_child0_child0.setAlignContent(Align.Stretch); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); root_child0.insertChild(root_child0_child0, 0); diff --git a/javascript/tests/generated/YGAlignItemsTest.test.ts b/javascript/tests/generated/YGAlignItemsTest.test.ts index 24350c85..7b82d833 100644 --- a/javascript/tests/generated/YGAlignItemsTest.test.ts +++ b/javascript/tests/generated/YGAlignItemsTest.test.ts @@ -33,10 +33,12 @@ test('align_items_stretch', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setHeight(10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -79,10 +81,12 @@ test('align_items_center', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -126,10 +130,12 @@ test('align_items_flex_start', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.FlexStart); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -173,10 +179,12 @@ test('align_items_flex_end', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.FlexEnd); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -221,15 +229,18 @@ test('align_baseline', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignItems(Align.Baseline); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(20); root.insertChild(root_child1, 1); @@ -284,20 +295,24 @@ test('align_baseline_child', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignItems(Align.Baseline); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); + root_child1_child0.setPositionType(PositionType.Relative); root_child1_child0.setWidth(50); root_child1_child0.setHeight(10); root_child1.insertChild(root_child1_child0, 0); @@ -362,37 +377,44 @@ test('align_baseline_child_multiline', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignItems(Align.Baseline); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(60); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); root_child1.setFlexDirection(FlexDirection.Row); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexWrap(Wrap.Wrap); root_child1.setWidth(50); root_child1.setHeight(25); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); + root_child1_child0.setPositionType(PositionType.Relative); root_child1_child0.setWidth(25); root_child1_child0.setHeight(20); root_child1.insertChild(root_child1_child0, 0); const root_child1_child1 = Yoga.Node.create(config); + root_child1_child1.setPositionType(PositionType.Relative); root_child1_child1.setWidth(25); root_child1_child1.setHeight(10); root_child1.insertChild(root_child1_child1, 1); const root_child1_child2 = Yoga.Node.create(config); + root_child1_child2.setPositionType(PositionType.Relative); root_child1_child2.setWidth(25); root_child1_child2.setHeight(20); root_child1.insertChild(root_child1_child2, 2); const root_child1_child3 = Yoga.Node.create(config); + root_child1_child3.setPositionType(PositionType.Relative); root_child1_child3.setWidth(25); root_child1_child3.setHeight(10); root_child1.insertChild(root_child1_child3, 3); @@ -487,39 +509,46 @@ test('align_baseline_child_multiline_override', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignItems(Align.Baseline); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(60); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); root_child1.setFlexDirection(FlexDirection.Row); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexWrap(Wrap.Wrap); root_child1.setWidth(50); root_child1.setHeight(25); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); + root_child1_child0.setPositionType(PositionType.Relative); root_child1_child0.setWidth(25); root_child1_child0.setHeight(20); root_child1.insertChild(root_child1_child0, 0); const root_child1_child1 = Yoga.Node.create(config); root_child1_child1.setAlignSelf(Align.Baseline); + root_child1_child1.setPositionType(PositionType.Relative); root_child1_child1.setWidth(25); root_child1_child1.setHeight(10); root_child1.insertChild(root_child1_child1, 1); const root_child1_child2 = Yoga.Node.create(config); + root_child1_child2.setPositionType(PositionType.Relative); root_child1_child2.setWidth(25); root_child1_child2.setHeight(20); root_child1.insertChild(root_child1_child2, 2); const root_child1_child3 = Yoga.Node.create(config); root_child1_child3.setAlignSelf(Align.Baseline); + root_child1_child3.setPositionType(PositionType.Relative); root_child1_child3.setWidth(25); root_child1_child3.setHeight(10); root_child1.insertChild(root_child1_child3, 3); @@ -614,38 +643,45 @@ test('align_baseline_child_multiline_no_override_on_secondline', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignItems(Align.Baseline); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(60); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); root_child1.setFlexDirection(FlexDirection.Row); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexWrap(Wrap.Wrap); root_child1.setWidth(50); root_child1.setHeight(25); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); + root_child1_child0.setPositionType(PositionType.Relative); root_child1_child0.setWidth(25); root_child1_child0.setHeight(20); root_child1.insertChild(root_child1_child0, 0); const root_child1_child1 = Yoga.Node.create(config); + root_child1_child1.setPositionType(PositionType.Relative); root_child1_child1.setWidth(25); root_child1_child1.setHeight(10); root_child1.insertChild(root_child1_child1, 1); const root_child1_child2 = Yoga.Node.create(config); + root_child1_child2.setPositionType(PositionType.Relative); root_child1_child2.setWidth(25); root_child1_child2.setHeight(20); root_child1.insertChild(root_child1_child2, 2); const root_child1_child3 = Yoga.Node.create(config); root_child1_child3.setAlignSelf(Align.Baseline); + root_child1_child3.setPositionType(PositionType.Relative); root_child1_child3.setWidth(25); root_child1_child3.setHeight(10); root_child1.insertChild(root_child1_child3, 3); @@ -740,21 +776,25 @@ test('align_baseline_child_top', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignItems(Align.Baseline); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setPosition(Edge.Top, 10); root_child0.setWidth(50); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); + root_child1_child0.setPositionType(PositionType.Relative); root_child1_child0.setWidth(50); root_child1_child0.setHeight(10); root_child1.insertChild(root_child1_child0, 0); @@ -819,21 +859,25 @@ test('align_baseline_child_top2', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignItems(Align.Baseline); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setPosition(Edge.Top, 5); root_child1.setWidth(50); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); + root_child1_child0.setPositionType(PositionType.Relative); root_child1_child0.setWidth(50); root_child1_child0.setHeight(10); root_child1.insertChild(root_child1_child0, 0); @@ -898,25 +942,30 @@ test('align_baseline_double_nested_child', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignItems(Align.Baseline); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(50); root_child0_child0.setHeight(20); root_child0.insertChild(root_child0_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); + root_child1_child0.setPositionType(PositionType.Relative); root_child1_child0.setWidth(50); root_child1_child0.setHeight(15); root_child1.insertChild(root_child1_child0, 0); @@ -990,15 +1039,18 @@ test('align_baseline_column', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.Baseline); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(20); root.insertChild(root_child1, 1); @@ -1053,10 +1105,12 @@ test('align_baseline_child_margin', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignItems(Align.Baseline); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Left, 5); root_child0.setMargin(Edge.Top, 5); root_child0.setMargin(Edge.Right, 5); @@ -1066,11 +1120,13 @@ test('align_baseline_child_margin', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); + root_child1_child0.setPositionType(PositionType.Relative); root_child1_child0.setMargin(Edge.Left, 1); root_child1_child0.setMargin(Edge.Top, 1); root_child1_child0.setMargin(Edge.Right, 1); @@ -1139,6 +1195,7 @@ test('align_baseline_child_padding', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignItems(Align.Baseline); + root.setPositionType(PositionType.Absolute); root.setPadding(Edge.Left, 5); root.setPadding(Edge.Top, 5); root.setPadding(Edge.Right, 5); @@ -1147,11 +1204,13 @@ test('align_baseline_child_padding', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setPadding(Edge.Left, 5); root_child1.setPadding(Edge.Top, 5); root_child1.setPadding(Edge.Right, 5); @@ -1161,6 +1220,7 @@ test('align_baseline_child_padding', () => { root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); + root_child1_child0.setPositionType(PositionType.Relative); root_child1_child0.setWidth(50); root_child1_child0.setHeight(10); root_child1.insertChild(root_child1_child0, 0); @@ -1225,36 +1285,43 @@ test('align_baseline_multiline', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignItems(Align.Baseline); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); + root_child1_child0.setPositionType(PositionType.Relative); root_child1_child0.setWidth(50); root_child1_child0.setHeight(10); root_child1.insertChild(root_child1_child0, 0); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root_child2.setHeight(20); root.insertChild(root_child2, 2); const root_child2_child0 = Yoga.Node.create(config); + root_child2_child0.setPositionType(PositionType.Relative); root_child2_child0.setWidth(50); root_child2_child0.setHeight(10); root_child2.insertChild(root_child2_child0, 0); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(50); root_child3.setHeight(50); root.insertChild(root_child3, 3); @@ -1348,36 +1415,43 @@ test.skip('align_baseline_multiline_column', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.Baseline); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(30); root_child1.setHeight(50); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); + root_child1_child0.setPositionType(PositionType.Relative); root_child1_child0.setWidth(20); root_child1_child0.setHeight(20); root_child1.insertChild(root_child1_child0, 0); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(40); root_child2.setHeight(70); root.insertChild(root_child2, 2); const root_child2_child0 = Yoga.Node.create(config); + root_child2_child0.setPositionType(PositionType.Relative); root_child2_child0.setWidth(10); root_child2_child0.setHeight(10); root_child2.insertChild(root_child2_child0, 0); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(50); root_child3.setHeight(20); root.insertChild(root_child3, 3); @@ -1471,36 +1545,43 @@ test.skip('align_baseline_multiline_column2', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.Baseline); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(30); root_child1.setHeight(50); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); + root_child1_child0.setPositionType(PositionType.Relative); root_child1_child0.setWidth(20); root_child1_child0.setHeight(20); root_child1.insertChild(root_child1_child0, 0); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(40); root_child2.setHeight(70); root.insertChild(root_child2, 2); const root_child2_child0 = Yoga.Node.create(config); + root_child2_child0.setPositionType(PositionType.Relative); root_child2_child0.setWidth(10); root_child2_child0.setHeight(10); root_child2.insertChild(root_child2_child0, 0); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(50); root_child3.setHeight(20); root.insertChild(root_child3, 3); @@ -1595,36 +1676,43 @@ test('align_baseline_multiline_row_and_column', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignItems(Align.Baseline); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(50); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); + root_child1_child0.setPositionType(PositionType.Relative); root_child1_child0.setWidth(50); root_child1_child0.setHeight(10); root_child1.insertChild(root_child1_child0, 0); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root_child2.setHeight(20); root.insertChild(root_child2, 2); const root_child2_child0 = Yoga.Node.create(config); + root_child2_child0.setPositionType(PositionType.Relative); root_child2_child0.setWidth(50); root_child2_child0.setHeight(10); root_child2.insertChild(root_child2_child0, 0); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(50); root_child3.setHeight(20); root.insertChild(root_child3, 3); @@ -1719,14 +1807,17 @@ test('align_items_center_child_with_margin_bigger_than_parent', () => { root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(52); root.setHeight(52); const root_child0 = Yoga.Node.create(config); root_child0.setAlignItems(Align.Center); + root_child0.setPositionType(PositionType.Relative); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setMargin(Edge.Left, 10); root_child0_child0.setMargin(Edge.Right, 10); root_child0_child0.setWidth(52); @@ -1783,14 +1874,17 @@ test('align_items_flex_end_child_with_margin_bigger_than_parent', () => { root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(52); root.setHeight(52); const root_child0 = Yoga.Node.create(config); root_child0.setAlignItems(Align.FlexEnd); + root_child0.setPositionType(PositionType.Relative); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setMargin(Edge.Left, 10); root_child0_child0.setMargin(Edge.Right, 10); root_child0_child0.setWidth(52); @@ -1847,14 +1941,17 @@ test('align_items_center_child_without_margin_bigger_than_parent', () => { root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(52); root.setHeight(52); const root_child0 = Yoga.Node.create(config); root_child0.setAlignItems(Align.Center); + root_child0.setPositionType(PositionType.Relative); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(72); root_child0_child0.setHeight(72); root_child0.insertChild(root_child0_child0, 0); @@ -1909,14 +2006,17 @@ test('align_items_flex_end_child_without_margin_bigger_than_parent', () => { root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(52); root.setHeight(52); const root_child0 = Yoga.Node.create(config); root_child0.setAlignItems(Align.FlexEnd); + root_child0.setPositionType(PositionType.Relative); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(72); root_child0_child0.setHeight(72); root_child0.insertChild(root_child0_child0, 0); @@ -1970,21 +2070,25 @@ test('align_center_should_size_based_on_content', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setMargin(Edge.Top, 20); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); root_child0.setJustifyContent(Justify.Center); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexShrink(1); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setFlexGrow(1); root_child0_child0.setFlexShrink(1); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); root_child0_child0_child0.setWidth(20); root_child0_child0_child0.setHeight(20); root_child0_child0.insertChild(root_child0_child0_child0, 0); @@ -2047,21 +2151,25 @@ test('align_stretch_should_size_based_on_parent', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setMargin(Edge.Top, 20); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); root_child0.setJustifyContent(Justify.Center); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexShrink(1); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setFlexGrow(1); root_child0_child0.setFlexShrink(1); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); root_child0_child0_child0.setWidth(20); root_child0_child0_child0.setHeight(20); root_child0_child0.insertChild(root_child0_child0_child0, 0); @@ -2124,19 +2232,23 @@ test('align_flex_start_with_shrinking_children', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(500); root.setHeight(500); const root_child0 = Yoga.Node.create(config); root_child0.setAlignItems(Align.FlexStart); + root_child0.setPositionType(PositionType.Relative); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setFlexGrow(1); root_child0_child0.setFlexShrink(1); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); root_child0_child0_child0.setFlexGrow(1); root_child0_child0_child0.setFlexShrink(1); root_child0_child0.insertChild(root_child0_child0_child0, 0); @@ -2199,18 +2311,22 @@ test('align_flex_start_with_stretching_children', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(500); root.setHeight(500); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setFlexGrow(1); root_child0_child0.setFlexShrink(1); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); root_child0_child0_child0.setFlexGrow(1); root_child0_child0_child0.setFlexShrink(1); root_child0_child0.insertChild(root_child0_child0_child0, 0); @@ -2273,19 +2389,23 @@ test('align_flex_start_with_shrinking_children_with_stretch', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(500); root.setHeight(500); const root_child0 = Yoga.Node.create(config); root_child0.setAlignItems(Align.FlexStart); + root_child0.setPositionType(PositionType.Relative); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setFlexGrow(1); root_child0_child0.setFlexShrink(1); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); root_child0_child0_child0.setFlexGrow(1); root_child0_child0_child0.setFlexShrink(1); root_child0_child0.insertChild(root_child0_child0_child0, 0); diff --git a/javascript/tests/generated/YGAlignSelfTest.test.ts b/javascript/tests/generated/YGAlignSelfTest.test.ts index af12224e..ffdf8db2 100644 --- a/javascript/tests/generated/YGAlignSelfTest.test.ts +++ b/javascript/tests/generated/YGAlignSelfTest.test.ts @@ -33,11 +33,13 @@ test('align_self_center', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); root_child0.setAlignSelf(Align.Center); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -80,11 +82,13 @@ test('align_self_flex_end', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); root_child0.setAlignSelf(Align.FlexEnd); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -127,11 +131,13 @@ test('align_self_flex_start', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); root_child0.setAlignSelf(Align.FlexStart); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -175,11 +181,13 @@ test('align_self_flex_end_override_flex_start', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.FlexStart); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); root_child0.setAlignSelf(Align.FlexEnd); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -223,22 +231,26 @@ test('align_self_baseline', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); root_child0.setAlignSelf(Align.Baseline); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); root_child1.setAlignSelf(Align.Baseline); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); + root_child1_child0.setPositionType(PositionType.Relative); root_child1_child0.setWidth(50); root_child1_child0.setHeight(10); root_child1.insertChild(root_child1_child0, 0); diff --git a/javascript/tests/generated/YGAndroidNewsFeed.test.ts b/javascript/tests/generated/YGAndroidNewsFeed.test.ts index ff0dd916..e5034b35 100644 --- a/javascript/tests/generated/YGAndroidNewsFeed.test.ts +++ b/javascript/tests/generated/YGAndroidNewsFeed.test.ts @@ -34,23 +34,28 @@ test('android_news_feed', () => { try { root = Yoga.Node.create(config); root.setAlignContent(Align.Stretch); + root.setPositionType(PositionType.Absolute); root.setWidth(1080); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); root_child0_child0.setAlignContent(Align.Stretch); + root_child0_child0.setPositionType(PositionType.Relative); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); root_child0_child0_child0.setAlignContent(Align.Stretch); + root_child0_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child0_child0_child0 = Yoga.Node.create(config); root_child0_child0_child0_child0.setFlexDirection(FlexDirection.Row); root_child0_child0_child0_child0.setAlignContent(Align.Stretch); root_child0_child0_child0_child0.setAlignItems(Align.FlexStart); + root_child0_child0_child0_child0.setPositionType(PositionType.Relative); root_child0_child0_child0_child0.setMargin(Edge.Start, 36); root_child0_child0_child0_child0.setMargin(Edge.Top, 24); root_child0_child0_child0.insertChild(root_child0_child0_child0_child0, 0); @@ -58,16 +63,19 @@ test('android_news_feed', () => { const root_child0_child0_child0_child0_child0 = Yoga.Node.create(config); root_child0_child0_child0_child0_child0.setFlexDirection(FlexDirection.Row); root_child0_child0_child0_child0_child0.setAlignContent(Align.Stretch); + root_child0_child0_child0_child0_child0.setPositionType(PositionType.Relative); root_child0_child0_child0_child0.insertChild(root_child0_child0_child0_child0_child0, 0); const root_child0_child0_child0_child0_child0_child0 = Yoga.Node.create(config); root_child0_child0_child0_child0_child0_child0.setAlignContent(Align.Stretch); + root_child0_child0_child0_child0_child0_child0.setPositionType(PositionType.Relative); root_child0_child0_child0_child0_child0_child0.setWidth(120); root_child0_child0_child0_child0_child0_child0.setHeight(120); root_child0_child0_child0_child0_child0.insertChild(root_child0_child0_child0_child0_child0_child0, 0); const root_child0_child0_child0_child0_child1 = Yoga.Node.create(config); root_child0_child0_child0_child0_child1.setAlignContent(Align.Stretch); + root_child0_child0_child0_child0_child1.setPositionType(PositionType.Relative); root_child0_child0_child0_child0_child1.setFlexShrink(1); root_child0_child0_child0_child0_child1.setMargin(Edge.Right, 36); root_child0_child0_child0_child0_child1.setPadding(Edge.Left, 36); @@ -79,22 +87,26 @@ test('android_news_feed', () => { const root_child0_child0_child0_child0_child1_child0 = Yoga.Node.create(config); root_child0_child0_child0_child0_child1_child0.setFlexDirection(FlexDirection.Row); root_child0_child0_child0_child0_child1_child0.setAlignContent(Align.Stretch); + root_child0_child0_child0_child0_child1_child0.setPositionType(PositionType.Relative); root_child0_child0_child0_child0_child1_child0.setFlexShrink(1); root_child0_child0_child0_child0_child1.insertChild(root_child0_child0_child0_child0_child1_child0, 0); const root_child0_child0_child0_child0_child1_child1 = Yoga.Node.create(config); root_child0_child0_child0_child0_child1_child1.setAlignContent(Align.Stretch); + root_child0_child0_child0_child0_child1_child1.setPositionType(PositionType.Relative); root_child0_child0_child0_child0_child1_child1.setFlexShrink(1); root_child0_child0_child0_child0_child1.insertChild(root_child0_child0_child0_child0_child1_child1, 1); const root_child0_child0_child1 = Yoga.Node.create(config); root_child0_child0_child1.setAlignContent(Align.Stretch); + root_child0_child0_child1.setPositionType(PositionType.Relative); root_child0_child0.insertChild(root_child0_child0_child1, 1); const root_child0_child0_child1_child0 = Yoga.Node.create(config); root_child0_child0_child1_child0.setFlexDirection(FlexDirection.Row); root_child0_child0_child1_child0.setAlignContent(Align.Stretch); root_child0_child0_child1_child0.setAlignItems(Align.FlexStart); + root_child0_child0_child1_child0.setPositionType(PositionType.Relative); root_child0_child0_child1_child0.setMargin(Edge.Start, 174); root_child0_child0_child1_child0.setMargin(Edge.Top, 24); root_child0_child0_child1.insertChild(root_child0_child0_child1_child0, 0); @@ -102,16 +114,19 @@ test('android_news_feed', () => { const root_child0_child0_child1_child0_child0 = Yoga.Node.create(config); root_child0_child0_child1_child0_child0.setFlexDirection(FlexDirection.Row); root_child0_child0_child1_child0_child0.setAlignContent(Align.Stretch); + root_child0_child0_child1_child0_child0.setPositionType(PositionType.Relative); root_child0_child0_child1_child0.insertChild(root_child0_child0_child1_child0_child0, 0); const root_child0_child0_child1_child0_child0_child0 = Yoga.Node.create(config); root_child0_child0_child1_child0_child0_child0.setAlignContent(Align.Stretch); + root_child0_child0_child1_child0_child0_child0.setPositionType(PositionType.Relative); root_child0_child0_child1_child0_child0_child0.setWidth(72); root_child0_child0_child1_child0_child0_child0.setHeight(72); root_child0_child0_child1_child0_child0.insertChild(root_child0_child0_child1_child0_child0_child0, 0); const root_child0_child0_child1_child0_child1 = Yoga.Node.create(config); root_child0_child0_child1_child0_child1.setAlignContent(Align.Stretch); + root_child0_child0_child1_child0_child1.setPositionType(PositionType.Relative); root_child0_child0_child1_child0_child1.setFlexShrink(1); root_child0_child0_child1_child0_child1.setMargin(Edge.Right, 36); root_child0_child0_child1_child0_child1.setPadding(Edge.Left, 36); @@ -123,11 +138,13 @@ test('android_news_feed', () => { const root_child0_child0_child1_child0_child1_child0 = Yoga.Node.create(config); root_child0_child0_child1_child0_child1_child0.setFlexDirection(FlexDirection.Row); root_child0_child0_child1_child0_child1_child0.setAlignContent(Align.Stretch); + root_child0_child0_child1_child0_child1_child0.setPositionType(PositionType.Relative); root_child0_child0_child1_child0_child1_child0.setFlexShrink(1); root_child0_child0_child1_child0_child1.insertChild(root_child0_child0_child1_child0_child1_child0, 0); const root_child0_child0_child1_child0_child1_child1 = Yoga.Node.create(config); root_child0_child0_child1_child0_child1_child1.setAlignContent(Align.Stretch); + root_child0_child0_child1_child0_child1_child1.setPositionType(PositionType.Relative); root_child0_child0_child1_child0_child1_child1.setFlexShrink(1); root_child0_child0_child1_child0_child1.insertChild(root_child0_child0_child1_child0_child1_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); diff --git a/javascript/tests/generated/YGAspectRatioTest.test.ts b/javascript/tests/generated/YGAspectRatioTest.test.ts index c2ea8353..dc8e47aa 100644 --- a/javascript/tests/generated/YGAspectRatioTest.test.ts +++ b/javascript/tests/generated/YGAspectRatioTest.test.ts @@ -33,10 +33,12 @@ test.skip('aspect_ratio_does_not_stretch_cross_axis_dim', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(300); root.setHeight(300); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setOverflow(Overflow.Scroll); root_child0.setFlexGrow(1); root_child0.setFlexShrink(1); @@ -45,9 +47,11 @@ test.skip('aspect_ratio_does_not_stretch_cross_axis_dim', () => { const root_child0_child0 = Yoga.Node.create(config); root_child0_child0.setFlexDirection(FlexDirection.Row); + root_child0_child0.setPositionType(PositionType.Relative); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); root_child0_child0_child0.setFlexGrow(2); root_child0_child0_child0.setFlexShrink(1); root_child0_child0_child0.setFlexBasis("0%"); @@ -55,16 +59,19 @@ test.skip('aspect_ratio_does_not_stretch_cross_axis_dim', () => { root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child0_child1 = Yoga.Node.create(config); + root_child0_child0_child1.setPositionType(PositionType.Relative); root_child0_child0_child1.setWidth(5); root_child0_child0.insertChild(root_child0_child0_child1, 1); const root_child0_child0_child2 = Yoga.Node.create(config); + root_child0_child0_child2.setPositionType(PositionType.Relative); root_child0_child0_child2.setFlexGrow(1); root_child0_child0_child2.setFlexShrink(1); root_child0_child0_child2.setFlexBasis("0%"); root_child0_child0.insertChild(root_child0_child0_child2, 2); const root_child0_child0_child2_child0 = Yoga.Node.create(config); + root_child0_child0_child2_child0.setPositionType(PositionType.Relative); root_child0_child0_child2_child0.setFlexGrow(1); root_child0_child0_child2_child0.setFlexShrink(1); root_child0_child0_child2_child0.setFlexBasis("0%"); @@ -72,10 +79,12 @@ test.skip('aspect_ratio_does_not_stretch_cross_axis_dim', () => { root_child0_child0_child2.insertChild(root_child0_child0_child2_child0, 0); const root_child0_child0_child2_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child2_child0_child0.setPositionType(PositionType.Relative); root_child0_child0_child2_child0_child0.setWidth(5); root_child0_child0_child2_child0.insertChild(root_child0_child0_child2_child0_child0, 0); const root_child0_child0_child2_child0_child1 = Yoga.Node.create(config); + root_child0_child0_child2_child0_child1.setPositionType(PositionType.Relative); root_child0_child0_child2_child0_child1.setFlexGrow(1); root_child0_child0_child2_child0_child1.setFlexShrink(1); root_child0_child0_child2_child0_child1.setFlexBasis("0%"); @@ -95,28 +104,28 @@ test.skip('aspect_ratio_does_not_stretch_cross_axis_dim', () => { expect(root_child0_child0.getComputedLeft()).toBe(0); expect(root_child0_child0.getComputedTop()).toBe(0); - expect(root_child0_child0.getComputedWidth()).toBe(285); - expect(root_child0_child0.getComputedHeight()).toBe(187); + expect(root_child0_child0.getComputedWidth()).toBe(300); + expect(root_child0_child0.getComputedHeight()).toBe(197); expect(root_child0_child0_child0.getComputedLeft()).toBe(0); expect(root_child0_child0_child0.getComputedTop()).toBe(0); - expect(root_child0_child0_child0.getComputedWidth()).toBe(187); - expect(root_child0_child0_child0.getComputedHeight()).toBe(187); + expect(root_child0_child0_child0.getComputedWidth()).toBe(197); + expect(root_child0_child0_child0.getComputedHeight()).toBe(197); - expect(root_child0_child0_child1.getComputedLeft()).toBe(187); + expect(root_child0_child0_child1.getComputedLeft()).toBe(197); expect(root_child0_child0_child1.getComputedTop()).toBe(0); expect(root_child0_child0_child1.getComputedWidth()).toBe(5); - expect(root_child0_child0_child1.getComputedHeight()).toBe(187); + expect(root_child0_child0_child1.getComputedHeight()).toBe(197); - expect(root_child0_child0_child2.getComputedLeft()).toBe(192); + expect(root_child0_child0_child2.getComputedLeft()).toBe(202); expect(root_child0_child0_child2.getComputedTop()).toBe(0); - expect(root_child0_child0_child2.getComputedWidth()).toBe(93); - expect(root_child0_child0_child2.getComputedHeight()).toBe(187); + expect(root_child0_child0_child2.getComputedWidth()).toBe(98); + expect(root_child0_child0_child2.getComputedHeight()).toBe(197); expect(root_child0_child0_child2_child0.getComputedLeft()).toBe(0); expect(root_child0_child0_child2_child0.getComputedTop()).toBe(0); - expect(root_child0_child0_child2_child0.getComputedWidth()).toBe(93); - expect(root_child0_child0_child2_child0.getComputedHeight()).toBe(187); + expect(root_child0_child0_child2_child0.getComputedWidth()).toBe(98); + expect(root_child0_child0_child2_child0.getComputedHeight()).toBe(197); expect(root_child0_child0_child2_child0_child0.getComputedLeft()).toBe(0); expect(root_child0_child0_child2_child0_child0.getComputedTop()).toBe(0); @@ -125,8 +134,8 @@ test.skip('aspect_ratio_does_not_stretch_cross_axis_dim', () => { expect(root_child0_child0_child2_child0_child1.getComputedLeft()).toBe(0); expect(root_child0_child0_child2_child0_child1.getComputedTop()).toBe(0); - expect(root_child0_child0_child2_child0_child1.getComputedWidth()).toBe(93); - expect(root_child0_child0_child2_child0_child1.getComputedHeight()).toBe(187); + expect(root_child0_child0_child2_child0_child1.getComputedWidth()).toBe(98); + expect(root_child0_child0_child2_child0_child1.getComputedHeight()).toBe(197); root.calculateLayout(undefined, undefined, Direction.RTL); @@ -140,40 +149,40 @@ test.skip('aspect_ratio_does_not_stretch_cross_axis_dim', () => { expect(root_child0.getComputedWidth()).toBe(300); expect(root_child0.getComputedHeight()).toBe(300); - expect(root_child0_child0.getComputedLeft()).toBe(30); + expect(root_child0_child0.getComputedLeft()).toBe(0); expect(root_child0_child0.getComputedTop()).toBe(0); - expect(root_child0_child0.getComputedWidth()).toBe(285); - expect(root_child0_child0.getComputedHeight()).toBe(187); + expect(root_child0_child0.getComputedWidth()).toBe(300); + expect(root_child0_child0.getComputedHeight()).toBe(197); - expect(root_child0_child0_child0.getComputedLeft()).toBe(98); + expect(root_child0_child0_child0.getComputedLeft()).toBe(103); expect(root_child0_child0_child0.getComputedTop()).toBe(0); - expect(root_child0_child0_child0.getComputedWidth()).toBe(187); - expect(root_child0_child0_child0.getComputedHeight()).toBe(187); + expect(root_child0_child0_child0.getComputedWidth()).toBe(197); + expect(root_child0_child0_child0.getComputedHeight()).toBe(197); - expect(root_child0_child0_child1.getComputedLeft()).toBe(93); + expect(root_child0_child0_child1.getComputedLeft()).toBe(98); expect(root_child0_child0_child1.getComputedTop()).toBe(0); expect(root_child0_child0_child1.getComputedWidth()).toBe(5); - expect(root_child0_child0_child1.getComputedHeight()).toBe(187); + expect(root_child0_child0_child1.getComputedHeight()).toBe(197); expect(root_child0_child0_child2.getComputedLeft()).toBe(0); expect(root_child0_child0_child2.getComputedTop()).toBe(0); - expect(root_child0_child0_child2.getComputedWidth()).toBe(93); - expect(root_child0_child0_child2.getComputedHeight()).toBe(187); + expect(root_child0_child0_child2.getComputedWidth()).toBe(98); + expect(root_child0_child0_child2.getComputedHeight()).toBe(197); expect(root_child0_child0_child2_child0.getComputedLeft()).toBe(0); expect(root_child0_child0_child2_child0.getComputedTop()).toBe(0); - expect(root_child0_child0_child2_child0.getComputedWidth()).toBe(93); - expect(root_child0_child0_child2_child0.getComputedHeight()).toBe(187); + expect(root_child0_child0_child2_child0.getComputedWidth()).toBe(98); + expect(root_child0_child0_child2_child0.getComputedHeight()).toBe(197); - expect(root_child0_child0_child2_child0_child0.getComputedLeft()).toBe(88); + expect(root_child0_child0_child2_child0_child0.getComputedLeft()).toBe(93); expect(root_child0_child0_child2_child0_child0.getComputedTop()).toBe(0); expect(root_child0_child0_child2_child0_child0.getComputedWidth()).toBe(5); expect(root_child0_child0_child2_child0_child0.getComputedHeight()).toBe(0); expect(root_child0_child0_child2_child0_child1.getComputedLeft()).toBe(0); expect(root_child0_child0_child2_child0_child1.getComputedTop()).toBe(0); - expect(root_child0_child0_child2_child0_child1.getComputedWidth()).toBe(93); - expect(root_child0_child0_child2_child0_child1.getComputedHeight()).toBe(187); + expect(root_child0_child0_child2_child0_child1.getComputedWidth()).toBe(98); + expect(root_child0_child0_child2_child0_child1.getComputedHeight()).toBe(197); } finally { if (typeof root !== 'undefined') { root.freeRecursive(); diff --git a/javascript/tests/generated/YGBorderTest.test.ts b/javascript/tests/generated/YGBorderTest.test.ts index b7904c30..bd649596 100644 --- a/javascript/tests/generated/YGBorderTest.test.ts +++ b/javascript/tests/generated/YGBorderTest.test.ts @@ -33,6 +33,7 @@ test('border_no_size', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Left, 10); root.setBorder(Edge.Top, 10); root.setBorder(Edge.Right, 10); @@ -66,12 +67,14 @@ test('border_container_match_child', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Left, 10); root.setBorder(Edge.Top, 10); root.setBorder(Edge.Right, 10); root.setBorder(Edge.Bottom, 10); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -114,6 +117,7 @@ test('border_flex_child', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Left, 10); root.setBorder(Edge.Top, 10); root.setBorder(Edge.Right, 10); @@ -122,6 +126,7 @@ test('border_flex_child', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setWidth(10); root.insertChild(root_child0, 0); @@ -164,6 +169,7 @@ test('border_stretch_child', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Left, 10); root.setBorder(Edge.Top, 10); root.setBorder(Edge.Right, 10); @@ -172,6 +178,7 @@ test('border_stretch_child', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setHeight(10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -215,6 +222,7 @@ test('border_center_child', () => { root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Start, 10); root.setBorder(Edge.End, 20); root.setBorder(Edge.Bottom, 20); @@ -222,6 +230,7 @@ test('border_center_child', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root_child0.setHeight(10); root.insertChild(root_child0, 0); diff --git a/javascript/tests/generated/YGDimensionTest.test.ts b/javascript/tests/generated/YGDimensionTest.test.ts index 998f5cfd..71eb8e7c 100644 --- a/javascript/tests/generated/YGDimensionTest.test.ts +++ b/javascript/tests/generated/YGDimensionTest.test.ts @@ -33,8 +33,10 @@ test('wrap_child', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(100); root_child0.setHeight(100); root.insertChild(root_child0, 0); @@ -77,11 +79,14 @@ test('wrap_grandchild', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); root_child0.insertChild(root_child0_child0, 0); diff --git a/javascript/tests/generated/YGDisplayTest.test.ts b/javascript/tests/generated/YGDisplayTest.test.ts index 96cdd77c..8a7824d5 100644 --- a/javascript/tests/generated/YGDisplayTest.test.ts +++ b/javascript/tests/generated/YGDisplayTest.test.ts @@ -34,14 +34,17 @@ test('display_none', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setDisplay(Display.None); root.insertChild(root_child1, 1); @@ -95,14 +98,17 @@ test('display_none_fixed_size', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(20); root_child1.setHeight(20); root_child1.setDisplay(Display.None); @@ -157,10 +163,12 @@ test('display_none_with_margin', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Left, 10); root_child0.setMargin(Edge.Top, 10); root_child0.setMargin(Edge.Right, 10); @@ -171,6 +179,7 @@ test('display_none_with_margin', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -223,16 +232,19 @@ test('display_none_with_child', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexShrink(1); root_child0.setFlexBasis("0%"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setFlexShrink(1); root_child1.setFlexBasis("0%"); @@ -240,6 +252,7 @@ test('display_none_with_child', () => { root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); + root_child1_child0.setPositionType(PositionType.Relative); root_child1_child0.setFlexGrow(1); root_child1_child0.setFlexShrink(1); root_child1_child0.setFlexBasis("0%"); @@ -247,6 +260,7 @@ test('display_none_with_child', () => { root_child1.insertChild(root_child1_child0, 0); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setFlexGrow(1); root_child2.setFlexShrink(1); root_child2.setFlexBasis("0%"); @@ -321,14 +335,17 @@ test('display_none_with_position', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setPosition(Edge.Top, 10); root_child1.setDisplay(Display.None); @@ -382,6 +399,7 @@ test('display_none_with_position_absolute', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); diff --git a/javascript/tests/generated/YGFlexDirectionTest.test.ts b/javascript/tests/generated/YGFlexDirectionTest.test.ts index 87180643..807f7f35 100644 --- a/javascript/tests/generated/YGFlexDirectionTest.test.ts +++ b/javascript/tests/generated/YGFlexDirectionTest.test.ts @@ -33,17 +33,21 @@ test('flex_direction_column_no_height', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setHeight(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -106,17 +110,21 @@ test('flex_direction_row_no_width', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -178,18 +186,22 @@ test('flex_direction_column', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setHeight(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -252,18 +264,22 @@ test('flex_direction_row', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -326,18 +342,22 @@ test('flex_direction_column_reverse', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.ColumnReverse); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setHeight(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -400,18 +420,22 @@ test('flex_direction_row_reverse', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.RowReverse); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -474,19 +498,23 @@ test('flex_direction_row_reverse_margin_left', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.RowReverse); + root.setPositionType(PositionType.Absolute); root.setMargin(Edge.Left, 100); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -549,19 +577,23 @@ test('flex_direction_row_reverse_margin_start', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.RowReverse); + root.setPositionType(PositionType.Absolute); root.setMargin(Edge.Start, 100); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -624,19 +656,23 @@ test('flex_direction_row_reverse_margin_right', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.RowReverse); + root.setPositionType(PositionType.Absolute); root.setMargin(Edge.Right, 100); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -699,19 +735,23 @@ test('flex_direction_row_reverse_margin_end', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.RowReverse); + root.setPositionType(PositionType.Absolute); root.setMargin(Edge.End, 100); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -774,19 +814,23 @@ test('flex_direction_column_reverse_margin_top', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.ColumnReverse); + root.setPositionType(PositionType.Absolute); root.setMargin(Edge.Top, 100); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -849,19 +893,23 @@ test('flex_direction_column_reverse_margin_bottom', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.ColumnReverse); + root.setPositionType(PositionType.Absolute); root.setMargin(Edge.Bottom, 100); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -924,19 +972,23 @@ test('flex_direction_row_reverse_padding_left', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.RowReverse); + root.setPositionType(PositionType.Absolute); root.setPadding(Edge.Left, 100); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -999,19 +1051,23 @@ test('flex_direction_row_reverse_padding_start', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.RowReverse); + root.setPositionType(PositionType.Absolute); root.setPadding(Edge.Start, 100); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1074,19 +1130,23 @@ test('flex_direction_row_reverse_padding_right', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.RowReverse); + root.setPositionType(PositionType.Absolute); root.setPadding(Edge.Right, 100); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1149,19 +1209,23 @@ test('flex_direction_row_reverse_padding_end', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.RowReverse); + root.setPositionType(PositionType.Absolute); root.setPadding(Edge.End, 100); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1224,19 +1288,23 @@ test('flex_direction_column_reverse_padding_top', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.ColumnReverse); + root.setPositionType(PositionType.Absolute); root.setPadding(Edge.Top, 100); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1299,19 +1367,23 @@ test('flex_direction_column_reverse_padding_bottom', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.ColumnReverse); + root.setPositionType(PositionType.Absolute); root.setPadding(Edge.Bottom, 100); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1374,19 +1446,23 @@ test('flex_direction_row_reverse_border_left', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.RowReverse); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Left, 100); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1449,19 +1525,23 @@ test('flex_direction_row_reverse_border_start', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.RowReverse); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Start, 100); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1524,19 +1604,23 @@ test('flex_direction_row_reverse_border_right', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.RowReverse); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Right, 100); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1599,19 +1683,23 @@ test('flex_direction_row_reverse_border_end', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.RowReverse); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.End, 100); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1674,19 +1762,23 @@ test('flex_direction_column_reverse_border_top', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.ColumnReverse); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Top, 100); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1749,19 +1841,23 @@ test('flex_direction_column_reverse_border_bottom', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.ColumnReverse); + root.setPositionType(PositionType.Absolute); root.setBorder(Edge.Bottom, 100); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1823,25 +1919,30 @@ test('flex_direction_row_reverse_pos_left', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.RowReverse); + root_child0.setPositionType(PositionType.Relative); root_child0.setPosition(Edge.Left, 100); root_child0.setWidth(100); root_child0.setHeight(100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth(10); root_child0.insertChild(root_child0_child1, 1); const root_child0_child2 = Yoga.Node.create(config); + root_child0_child2.setPositionType(PositionType.Relative); root_child0_child2.setWidth(10); root_child0.insertChild(root_child0_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1913,25 +2014,30 @@ test('flex_direction_row_reverse_pos_start', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.RowReverse); + root_child0.setPositionType(PositionType.Relative); root_child0.setPosition(Edge.Start, 100); root_child0.setWidth(100); root_child0.setHeight(100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth(10); root_child0.insertChild(root_child0_child1, 1); const root_child0_child2 = Yoga.Node.create(config); + root_child0_child2.setPositionType(PositionType.Relative); root_child0_child2.setWidth(10); root_child0.insertChild(root_child0_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2003,25 +2109,30 @@ test('flex_direction_row_reverse_pos_right', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.RowReverse); + root_child0.setPositionType(PositionType.Relative); root_child0.setPosition(Edge.Right, 100); root_child0.setWidth(100); root_child0.setHeight(100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth(10); root_child0.insertChild(root_child0_child1, 1); const root_child0_child2 = Yoga.Node.create(config); + root_child0_child2.setPositionType(PositionType.Relative); root_child0_child2.setWidth(10); root_child0.insertChild(root_child0_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2093,25 +2204,30 @@ test('flex_direction_row_reverse_pos_end', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.RowReverse); + root_child0.setPositionType(PositionType.Relative); root_child0.setPosition(Edge.End, 100); root_child0.setWidth(100); root_child0.setHeight(100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth(10); root_child0.insertChild(root_child0_child1, 1); const root_child0_child2 = Yoga.Node.create(config); + root_child0_child2.setPositionType(PositionType.Relative); root_child0_child2.setWidth(10); root_child0.insertChild(root_child0_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2183,25 +2299,30 @@ test('flex_direction_column_reverse_pos_top', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.ColumnReverse); + root_child0.setPositionType(PositionType.Relative); root_child0.setPosition(Edge.Top, 100); root_child0.setWidth(100); root_child0.setHeight(100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth(10); root_child0.insertChild(root_child0_child1, 1); const root_child0_child2 = Yoga.Node.create(config); + root_child0_child2.setPositionType(PositionType.Relative); root_child0_child2.setWidth(10); root_child0.insertChild(root_child0_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2273,25 +2394,30 @@ test('flex_direction_column_reverse_pos_bottom', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.ColumnReverse); + root_child0.setPositionType(PositionType.Relative); root_child0.setPosition(Edge.Bottom, 100); root_child0.setWidth(100); root_child0.setHeight(100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth(10); root_child0.insertChild(root_child0_child1, 1); const root_child0_child2 = Yoga.Node.create(config); + root_child0_child2.setPositionType(PositionType.Relative); root_child0_child2.setWidth(10); root_child0.insertChild(root_child0_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); diff --git a/javascript/tests/generated/YGFlexTest.test.ts b/javascript/tests/generated/YGFlexTest.test.ts index af26541a..5b02c40d 100644 --- a/javascript/tests/generated/YGFlexTest.test.ts +++ b/javascript/tests/generated/YGFlexTest.test.ts @@ -33,15 +33,18 @@ test('flex_basis_flex_grow_column', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -94,16 +97,19 @@ test('flex_shrink_flex_grow_row', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(500); root.setHeight(500); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexShrink(1); root_child0.setWidth(500); root_child0.setHeight(100); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexShrink(1); root_child1.setWidth(500); root_child1.setHeight(100); @@ -158,16 +164,19 @@ test('flex_shrink_flex_grow_child_flex_shrink_other_child', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(500); root.setHeight(500); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexShrink(1); root_child0.setWidth(500); root_child0.setHeight(100); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setFlexShrink(1); root_child1.setWidth(500); @@ -223,15 +232,18 @@ test('flex_basis_flex_grow_row', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -283,15 +295,18 @@ test('flex_basis_flex_shrink_column', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexShrink(1); root_child0.setFlexBasis(100); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexBasis(50); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -344,15 +359,18 @@ test('flex_basis_flex_shrink_row', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexShrink(1); root_child0.setFlexBasis(100); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexBasis(50); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -404,20 +422,24 @@ test('flex_shrink_to_zero', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setHeight(75); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexShrink(1); root_child1.setWidth(50); root_child1.setHeight(50); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root_child2.setHeight(50); root.insertChild(root_child2, 2); @@ -480,21 +502,25 @@ test('flex_basis_overrides_main_size', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis(50); root_child0.setHeight(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setFlexGrow(1); root_child2.setHeight(10); root.insertChild(root_child2, 2); @@ -557,13 +583,16 @@ test('flex_grow_shrink_at_most', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setFlexGrow(1); root_child0_child0.setFlexShrink(1); root_child0.insertChild(root_child0_child0, 0); @@ -616,19 +645,23 @@ test('flex_grow_less_than_factor_one', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(500); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(0.2); root_child0.setFlexBasis(40); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(0.2); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setFlexGrow(0.4); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); diff --git a/javascript/tests/generated/YGFlexWrapTest.test.ts b/javascript/tests/generated/YGFlexWrapTest.test.ts index 7f2daaa8..cb2ac898 100644 --- a/javascript/tests/generated/YGFlexWrapTest.test.ts +++ b/javascript/tests/generated/YGFlexWrapTest.test.ts @@ -33,25 +33,30 @@ test('wrap_column', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(30); root_child0.setHeight(30); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(30); root_child1.setHeight(30); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(30); root_child2.setHeight(30); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(30); root_child3.setHeight(30); root.insertChild(root_child3, 3); @@ -125,25 +130,30 @@ test('wrap_row', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(30); root_child0.setHeight(30); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(30); root_child1.setHeight(30); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(30); root_child2.setHeight(30); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(30); root_child3.setHeight(30); root.insertChild(root_child3, 3); @@ -218,25 +228,30 @@ test('wrap_row_align_items_flex_end', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignItems(Align.FlexEnd); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(30); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(30); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(30); root_child2.setHeight(30); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(30); root_child3.setHeight(30); root.insertChild(root_child3, 3); @@ -311,25 +326,30 @@ test('wrap_row_align_items_center', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(30); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(30); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(30); root_child2.setHeight(30); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(30); root_child3.setHeight(30); root.insertChild(root_child3, 3); @@ -403,16 +423,19 @@ test('flex_wrap_children_with_min_main_overriding_flex_basis', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexBasis(50); root_child0.setMinWidth(55); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexBasis(50); root_child1.setMinWidth(55); root_child1.setHeight(50); @@ -466,23 +489,28 @@ test('flex_wrap_wrap_to_child_height', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); root_child0.setAlignItems(Align.FlexStart); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexWrap(Wrap.Wrap); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(100); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); root_child0_child0_child0.setWidth(100); root_child0_child0_child0.setHeight(100); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(100); root_child1.setHeight(100); root.insertChild(root_child1, 1); @@ -556,15 +584,18 @@ test('flex_wrap_align_stretch_fits_one_row', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -617,30 +648,36 @@ test('wrap_reverse_row_align_content_flex_start', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.WrapReverse); root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(30); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(30); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(30); root_child2.setHeight(30); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(30); root_child3.setHeight(40); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(30); root_child4.setHeight(50); root.insertChild(root_child4, 4); @@ -725,30 +762,36 @@ test('wrap_reverse_row_align_content_center', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.Center); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.WrapReverse); root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(30); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(30); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(30); root_child2.setHeight(30); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(30); root_child3.setHeight(40); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(30); root_child4.setHeight(50); root.insertChild(root_child4, 4); @@ -832,30 +875,36 @@ test('wrap_reverse_row_single_line_different_size', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.WrapReverse); root.setWidth(300); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(30); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(30); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(30); root_child2.setHeight(30); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(30); root_child3.setHeight(40); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(30); root_child4.setHeight(50); root.insertChild(root_child4, 4); @@ -940,30 +989,36 @@ test('wrap_reverse_row_align_content_stretch', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.Stretch); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.WrapReverse); root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(30); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(30); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(30); root_child2.setHeight(30); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(30); root_child3.setHeight(40); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(30); root_child4.setHeight(50); root.insertChild(root_child4, 4); @@ -1048,30 +1103,36 @@ test('wrap_reverse_row_align_content_space_around', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.SpaceAround); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.WrapReverse); root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(30); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(30); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(30); root_child2.setHeight(30); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(30); root_child3.setHeight(40); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(30); root_child4.setHeight(50); root.insertChild(root_child4, 4); @@ -1155,31 +1216,37 @@ test('wrap_reverse_column_fixed_size', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.WrapReverse); root.setWidth(200); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(30); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(30); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(30); root_child2.setHeight(30); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(30); root_child3.setHeight(40); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(30); root_child4.setHeight(50); root.insertChild(root_child4, 4); @@ -1263,20 +1330,24 @@ test('wrapped_row_within_align_items_center', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexWrap(Wrap.Wrap); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(150); root_child0_child0.setHeight(80); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth(80); root_child0_child1.setHeight(80); root_child0.insertChild(root_child0_child1, 1); @@ -1340,20 +1411,24 @@ test('wrapped_row_within_align_items_flex_start', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.FlexStart); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexWrap(Wrap.Wrap); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(150); root_child0_child0.setHeight(80); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth(80); root_child0_child1.setHeight(80); root_child0.insertChild(root_child0_child1, 1); @@ -1417,20 +1492,24 @@ test('wrapped_row_within_align_items_flex_end', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.FlexEnd); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexWrap(Wrap.Wrap); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(150); root_child0_child0.setHeight(80); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth(80); root_child0_child1.setHeight(80); root_child0.insertChild(root_child0_child1, 1); @@ -1496,17 +1575,20 @@ test('wrapped_column_max_height', () => { root.setJustifyContent(Justify.Center); root.setAlignContent(Align.Center); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(700); root.setHeight(500); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(100); root_child0.setHeight(500); root_child0.setMaxHeight(200); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setMargin(Edge.Left, 20); root_child1.setMargin(Edge.Top, 20); root_child1.setMargin(Edge.Right, 20); @@ -1516,6 +1598,7 @@ test('wrapped_column_max_height', () => { root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(100); root_child2.setHeight(100); root.insertChild(root_child2, 2); @@ -1581,11 +1664,13 @@ test('wrapped_column_max_height_flex', () => { root.setJustifyContent(Justify.Center); root.setAlignContent(Align.Center); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(700); root.setHeight(500); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexShrink(1); root_child0.setFlexBasis("0%"); @@ -1595,6 +1680,7 @@ test('wrapped_column_max_height_flex', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setFlexShrink(1); root_child1.setFlexBasis("0%"); @@ -1607,6 +1693,7 @@ test('wrapped_column_max_height_flex', () => { root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(100); root_child2.setHeight(100); root.insertChild(root_child2, 2); @@ -1669,28 +1756,34 @@ test('wrap_nodes_with_content_sizing_overflowing_margin', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(500); root.setHeight(500); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexWrap(Wrap.Wrap); root_child0.setWidth(85); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); root_child0_child0_child0.setWidth(40); root_child0_child0_child0.setHeight(40); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setMargin(Edge.Right, 10); root_child0.insertChild(root_child0_child1, 1); const root_child0_child1_child0 = Yoga.Node.create(config); + root_child0_child1_child0.setPositionType(PositionType.Relative); root_child0_child1_child0.setWidth(40); root_child0_child1_child0.setHeight(40); root_child0_child1.insertChild(root_child0_child1_child0, 0); @@ -1773,28 +1866,34 @@ test('wrap_nodes_with_content_sizing_margin_cross', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(500); root.setHeight(500); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexWrap(Wrap.Wrap); root_child0.setWidth(70); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); root_child0_child0_child0.setWidth(40); root_child0_child0_child0.setHeight(40); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setMargin(Edge.Top, 10); root_child0.insertChild(root_child0_child1, 1); const root_child0_child1_child0 = Yoga.Node.create(config); + root_child0_child1_child0.setPositionType(PositionType.Relative); root_child0_child1_child0.setWidth(40); root_child0_child1_child0.setHeight(40); root_child0_child1.insertChild(root_child0_child1_child0, 0); diff --git a/javascript/tests/generated/YGGapTest.test.ts b/javascript/tests/generated/YGGapTest.test.ts index caf9865e..40a2cfc3 100644 --- a/javascript/tests/generated/YGGapTest.test.ts +++ b/javascript/tests/generated/YGGapTest.test.ts @@ -34,24 +34,28 @@ test('column_gap_flexible', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(80); root.setHeight(100); root.setGap(Gutter.Column, 10); root.setGap(Gutter.Row, 20); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexShrink(1); root_child0.setFlexBasis("0%"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setFlexShrink(1); root_child1.setFlexBasis("0%"); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setFlexGrow(1); root_child2.setFlexShrink(1); root_child2.setFlexBasis("0%"); @@ -116,19 +120,23 @@ test('column_gap_inflexible', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(80); root.setHeight(100); root.setGap(Gutter.Column, 10); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(20); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -191,21 +199,25 @@ test('column_gap_mixed_flexible', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(80); root.setHeight(100); root.setGap(Gutter.Column, 10); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setFlexShrink(1); root_child1.setFlexBasis("0%"); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(20); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -268,11 +280,13 @@ test('column_gap_child_margins', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(80); root.setHeight(100); root.setGap(Gutter.Column, 10); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexShrink(1); root_child0.setFlexBasis("0%"); @@ -281,6 +295,7 @@ test('column_gap_child_margins', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setFlexShrink(1); root_child1.setFlexBasis("0%"); @@ -289,6 +304,7 @@ test('column_gap_child_margins', () => { root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setFlexGrow(1); root_child2.setFlexShrink(1); root_child2.setFlexBasis("0%"); @@ -355,52 +371,62 @@ test('column_row_gap_wrapping', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(80); root.setGap(Gutter.Column, 10); root.setGap(Gutter.Row, 20); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(20); root_child0.setHeight(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(20); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(20); root_child2.setHeight(20); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(20); root_child3.setHeight(20); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(20); root_child4.setHeight(20); root.insertChild(root_child4, 4); const root_child5 = Yoga.Node.create(config); + root_child5.setPositionType(PositionType.Relative); root_child5.setWidth(20); root_child5.setHeight(20); root.insertChild(root_child5, 5); const root_child6 = Yoga.Node.create(config); + root_child6.setPositionType(PositionType.Relative); root_child6.setWidth(20); root_child6.setHeight(20); root.insertChild(root_child6, 6); const root_child7 = Yoga.Node.create(config); + root_child7.setPositionType(PositionType.Relative); root_child7.setWidth(20); root_child7.setHeight(20); root.insertChild(root_child7, 7); const root_child8 = Yoga.Node.create(config); + root_child8.setPositionType(PositionType.Relative); root_child8.setWidth(20); root_child8.setHeight(20); root.insertChild(root_child8, 8); @@ -524,6 +550,7 @@ test('column_gap_start_index', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(80); root.setGap(Gutter.Column, 10); @@ -536,16 +563,19 @@ test('column_gap_start_index', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(20); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(20); root_child2.setHeight(20); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(20); root_child3.setHeight(20); root.insertChild(root_child3, 3); @@ -619,19 +649,23 @@ test('column_gap_justify_flex_start', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); root.setGap(Gutter.Column, 10); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(20); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -695,19 +729,23 @@ test('column_gap_justify_center', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setJustifyContent(Justify.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); root.setGap(Gutter.Column, 10); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(20); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -771,19 +809,23 @@ test('column_gap_justify_flex_end', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setJustifyContent(Justify.FlexEnd); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); root.setGap(Gutter.Column, 10); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(20); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -847,19 +889,23 @@ test('column_gap_justify_space_between', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setJustifyContent(Justify.SpaceBetween); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); root.setGap(Gutter.Column, 10); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(20); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -923,19 +969,23 @@ test('column_gap_justify_space_around', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setJustifyContent(Justify.SpaceAround); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); root.setGap(Gutter.Column, 10); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(20); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -999,19 +1049,23 @@ test('column_gap_justify_space_evenly', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setJustifyContent(Justify.SpaceEvenly); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); root.setGap(Gutter.Column, 10); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(20); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1074,6 +1128,7 @@ test('column_gap_wrap_align_flex_start', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(100); @@ -1081,31 +1136,37 @@ test('column_gap_wrap_align_flex_start', () => { root.setGap(Gutter.Row, 20); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(20); root_child0.setHeight(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(20); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(20); root_child2.setHeight(20); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(20); root_child3.setHeight(20); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(20); root_child4.setHeight(20); root.insertChild(root_child4, 4); const root_child5 = Yoga.Node.create(config); + root_child5.setPositionType(PositionType.Relative); root_child5.setWidth(20); root_child5.setHeight(20); root.insertChild(root_child5, 5); @@ -1200,6 +1261,7 @@ test('column_gap_wrap_align_center', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.Center); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(100); @@ -1207,31 +1269,37 @@ test('column_gap_wrap_align_center', () => { root.setGap(Gutter.Row, 20); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(20); root_child0.setHeight(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(20); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(20); root_child2.setHeight(20); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(20); root_child3.setHeight(20); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(20); root_child4.setHeight(20); root.insertChild(root_child4, 4); const root_child5 = Yoga.Node.create(config); + root_child5.setPositionType(PositionType.Relative); root_child5.setWidth(20); root_child5.setHeight(20); root.insertChild(root_child5, 5); @@ -1326,6 +1394,7 @@ test('column_gap_wrap_align_flex_end', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.FlexEnd); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(100); @@ -1333,31 +1402,37 @@ test('column_gap_wrap_align_flex_end', () => { root.setGap(Gutter.Row, 20); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(20); root_child0.setHeight(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(20); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(20); root_child2.setHeight(20); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(20); root_child3.setHeight(20); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(20); root_child4.setHeight(20); root.insertChild(root_child4, 4); const root_child5 = Yoga.Node.create(config); + root_child5.setPositionType(PositionType.Relative); root_child5.setWidth(20); root_child5.setHeight(20); root.insertChild(root_child5, 5); @@ -1452,6 +1527,7 @@ test('column_gap_wrap_align_space_between', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.SpaceBetween); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(100); @@ -1459,31 +1535,37 @@ test('column_gap_wrap_align_space_between', () => { root.setGap(Gutter.Row, 20); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(20); root_child0.setHeight(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(20); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(20); root_child2.setHeight(20); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(20); root_child3.setHeight(20); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(20); root_child4.setHeight(20); root.insertChild(root_child4, 4); const root_child5 = Yoga.Node.create(config); + root_child5.setPositionType(PositionType.Relative); root_child5.setWidth(20); root_child5.setHeight(20); root.insertChild(root_child5, 5); @@ -1578,6 +1660,7 @@ test('column_gap_wrap_align_space_around', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.SpaceAround); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(100); @@ -1585,31 +1668,37 @@ test('column_gap_wrap_align_space_around', () => { root.setGap(Gutter.Row, 20); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(20); root_child0.setHeight(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(20); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(20); root_child2.setHeight(20); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(20); root_child3.setHeight(20); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(20); root_child4.setHeight(20); root.insertChild(root_child4, 4); const root_child5 = Yoga.Node.create(config); + root_child5.setPositionType(PositionType.Relative); root_child5.setWidth(20); root_child5.setHeight(20); root.insertChild(root_child5, 5); @@ -1704,32 +1793,38 @@ test('column_gap_wrap_align_stretch', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.Stretch); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(300); root.setHeight(300); root.setGap(Gutter.Column, 5); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setMinWidth(60); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setMinWidth(60); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setFlexGrow(1); root_child2.setMinWidth(60); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setFlexGrow(1); root_child3.setMinWidth(60); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setFlexGrow(1); root_child4.setMinWidth(60); root.insertChild(root_child4, 4); @@ -1813,18 +1908,22 @@ test('column_gap_determines_parent_width', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setHeight(100); root.setGap(Gutter.Column, 10); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(30); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1888,6 +1987,7 @@ test('row_gap_align_items_stretch', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignContent(Align.Stretch); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(200); @@ -1895,26 +1995,32 @@ test('row_gap_align_items_stretch', () => { root.setGap(Gutter.Row, 20); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(20); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(20); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(20); root.insertChild(root_child4, 4); const root_child5 = Yoga.Node.create(config); + root_child5.setPositionType(PositionType.Relative); root_child5.setWidth(20); root.insertChild(root_child5, 5); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2008,6 +2114,7 @@ test('row_gap_align_items_end', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignItems(Align.FlexEnd); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(200); @@ -2015,26 +2122,32 @@ test('row_gap_align_items_end', () => { root.setGap(Gutter.Row, 20); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(20); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setWidth(20); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setWidth(20); root.insertChild(root_child4, 4); const root_child5 = Yoga.Node.create(config); + root_child5.setPositionType(PositionType.Relative); root_child5.setWidth(20); root.insertChild(root_child5, 5); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2126,11 +2239,13 @@ test('row_gap_column_child_margins', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(200); root.setGap(Gutter.Row, 10); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexShrink(1); root_child0.setFlexBasis("0%"); @@ -2139,6 +2254,7 @@ test('row_gap_column_child_margins', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setFlexShrink(1); root_child1.setFlexBasis("0%"); @@ -2147,6 +2263,7 @@ test('row_gap_column_child_margins', () => { root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setFlexGrow(1); root_child2.setFlexShrink(1); root_child2.setFlexBasis("0%"); @@ -2213,24 +2330,28 @@ test('row_gap_row_wrap_child_margins', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(200); root.setGap(Gutter.Row, 10); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Top, 2); root_child0.setMargin(Edge.Bottom, 2); root_child0.setWidth(60); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setMargin(Edge.Top, 10); root_child1.setMargin(Edge.Bottom, 10); root_child1.setWidth(60); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setMargin(Edge.Top, 15); root_child2.setMargin(Edge.Bottom, 15); root_child2.setWidth(60); @@ -2294,18 +2415,22 @@ test('row_gap_determines_parent_height', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setGap(Gutter.Row, 10); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setHeight(20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setHeight(30); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); diff --git a/javascript/tests/generated/YGJustifyContentTest.test.ts b/javascript/tests/generated/YGJustifyContentTest.test.ts index 8f7e813f..6022b95e 100644 --- a/javascript/tests/generated/YGJustifyContentTest.test.ts +++ b/javascript/tests/generated/YGJustifyContentTest.test.ts @@ -34,18 +34,22 @@ test('justify_content_row_flex_start', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -109,18 +113,22 @@ test('justify_content_row_flex_end', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setJustifyContent(Justify.FlexEnd); + root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -184,18 +192,22 @@ test('justify_content_row_center', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setJustifyContent(Justify.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -259,18 +271,22 @@ test('justify_content_row_space_between', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setJustifyContent(Justify.SpaceBetween); + root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -334,18 +350,22 @@ test('justify_content_row_space_around', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setJustifyContent(Justify.SpaceAround); + root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -407,18 +427,22 @@ test('justify_content_column_flex_start', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setHeight(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -481,18 +505,22 @@ test('justify_content_column_flex_end', () => { try { root = Yoga.Node.create(config); root.setJustifyContent(Justify.FlexEnd); + root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setHeight(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -555,18 +583,22 @@ test('justify_content_column_center', () => { try { root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setHeight(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -629,18 +661,22 @@ test('justify_content_column_space_between', () => { try { root = Yoga.Node.create(config); root.setJustifyContent(Justify.SpaceBetween); + root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setHeight(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -703,18 +739,22 @@ test('justify_content_column_space_around', () => { try { root = Yoga.Node.create(config); root.setJustifyContent(Justify.SpaceAround); + root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setHeight(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -778,10 +818,12 @@ test('justify_content_row_min_width_and_margin', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setJustifyContent(Justify.Center); + root.setPositionType(PositionType.Absolute); root.setMargin(Edge.Left, 100); root.setMinWidth(50); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(20); root_child0.setHeight(20); root.insertChild(root_child0, 0); @@ -826,11 +868,13 @@ test('justify_content_row_max_width_and_margin', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setJustifyContent(Justify.Center); + root.setPositionType(PositionType.Absolute); root.setMargin(Edge.Left, 100); root.setWidth(100); root.setMaxWidth(80); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(20); root_child0.setHeight(20); root.insertChild(root_child0, 0); @@ -874,10 +918,12 @@ test('justify_content_column_min_height_and_margin', () => { try { root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); + root.setPositionType(PositionType.Absolute); root.setMargin(Edge.Top, 100); root.setMinHeight(50); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(20); root_child0.setHeight(20); root.insertChild(root_child0, 0); @@ -921,11 +967,13 @@ test('justify_content_colunn_max_height_and_margin', () => { try { root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); + root.setPositionType(PositionType.Absolute); root.setMargin(Edge.Top, 100); root.setHeight(100); root.setMaxHeight(80); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(20); root_child0.setHeight(20); root.insertChild(root_child0, 0); @@ -969,18 +1017,22 @@ test('justify_content_column_space_evenly', () => { try { root = Yoga.Node.create(config); root.setJustifyContent(Justify.SpaceEvenly); + root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setHeight(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1044,18 +1096,22 @@ test('justify_content_row_space_evenly', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setJustifyContent(Justify.SpaceEvenly); + root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setHeight(10); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1118,18 +1174,21 @@ test('justify_content_min_width_with_padding_child_width_greater_than_parent', ( try { root = Yoga.Node.create(config); root.setAlignContent(Align.Stretch); + root.setPositionType(PositionType.Absolute); root.setWidth(1000); root.setHeight(1584); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); root_child0.setAlignContent(Align.Stretch); + root_child0.setPositionType(PositionType.Relative); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); root_child0_child0.setFlexDirection(FlexDirection.Row); root_child0_child0.setJustifyContent(Justify.Center); root_child0_child0.setAlignContent(Align.Stretch); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setPadding(Edge.Left, 100); root_child0_child0.setPadding(Edge.Right, 100); root_child0_child0.setMinWidth(400); @@ -1138,6 +1197,7 @@ test('justify_content_min_width_with_padding_child_width_greater_than_parent', ( const root_child0_child0_child0 = Yoga.Node.create(config); root_child0_child0_child0.setFlexDirection(FlexDirection.Row); root_child0_child0_child0.setAlignContent(Align.Stretch); + root_child0_child0_child0.setPositionType(PositionType.Relative); root_child0_child0_child0.setWidth(300); root_child0_child0_child0.setHeight(100); root_child0_child0.insertChild(root_child0_child0_child0, 0); @@ -1201,18 +1261,21 @@ test('justify_content_min_width_with_padding_child_width_lower_than_parent', () try { root = Yoga.Node.create(config); root.setAlignContent(Align.Stretch); + root.setPositionType(PositionType.Absolute); root.setWidth(1080); root.setHeight(1584); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); root_child0.setAlignContent(Align.Stretch); + root_child0.setPositionType(PositionType.Relative); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); root_child0_child0.setFlexDirection(FlexDirection.Row); root_child0_child0.setJustifyContent(Justify.Center); root_child0_child0.setAlignContent(Align.Stretch); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setPadding(Edge.Left, 100); root_child0_child0.setPadding(Edge.Right, 100); root_child0_child0.setMinWidth(400); @@ -1221,6 +1284,7 @@ test('justify_content_min_width_with_padding_child_width_lower_than_parent', () const root_child0_child0_child0 = Yoga.Node.create(config); root_child0_child0_child0.setFlexDirection(FlexDirection.Row); root_child0_child0_child0.setAlignContent(Align.Stretch); + root_child0_child0_child0.setPositionType(PositionType.Relative); root_child0_child0_child0.setWidth(199); root_child0_child0_child0.setHeight(100); root_child0_child0.insertChild(root_child0_child0_child0, 0); @@ -1284,20 +1348,24 @@ test('justify_content_space_between_indefinite_container_dim_with_free_space', ( try { root = Yoga.Node.create(config); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(300); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); root_child0.setJustifyContent(Justify.SpaceBetween); + root_child0.setPositionType(PositionType.Relative); root_child0.setMinWidth(200); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(50); root_child0_child0.setHeight(50); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth(50); root_child0_child1.setHeight(50); root_child0.insertChild(root_child0_child1, 1); diff --git a/javascript/tests/generated/YGMarginTest.test.ts b/javascript/tests/generated/YGMarginTest.test.ts index 19b5ad2a..86c07d71 100644 --- a/javascript/tests/generated/YGMarginTest.test.ts +++ b/javascript/tests/generated/YGMarginTest.test.ts @@ -34,10 +34,12 @@ test('margin_start', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Start, 10); root_child0.setWidth(10); root.insertChild(root_child0, 0); @@ -80,10 +82,12 @@ test('margin_top', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Top, 10); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -128,10 +132,12 @@ test('margin_end', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setJustifyContent(Justify.FlexEnd); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.End, 10); root_child0.setWidth(10); root.insertChild(root_child0, 0); @@ -175,10 +181,12 @@ test('margin_bottom', () => { try { root = Yoga.Node.create(config); root.setJustifyContent(Justify.FlexEnd); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Bottom, 10); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -222,10 +230,12 @@ test('margin_and_flex_row', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setMargin(Edge.Start, 10); root_child0.setMargin(Edge.End, 10); @@ -269,10 +279,12 @@ test('margin_and_flex_column', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setMargin(Edge.Top, 10); root_child0.setMargin(Edge.Bottom, 10); @@ -317,10 +329,12 @@ test('margin_and_stretch_row', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setMargin(Edge.Top, 10); root_child0.setMargin(Edge.Bottom, 10); @@ -364,10 +378,12 @@ test('margin_and_stretch_column', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setMargin(Edge.Start, 10); root_child0.setMargin(Edge.End, 10); @@ -412,15 +428,18 @@ test('margin_with_sibling_row', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setMargin(Edge.End, 10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -472,15 +491,18 @@ test('margin_with_sibling_column', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setMargin(Edge.Bottom, 10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -533,16 +555,19 @@ test('margin_auto_bottom', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Bottom, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(50); root.insertChild(root_child1, 1); @@ -596,16 +621,19 @@ test('margin_auto_top', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Top, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(50); root.insertChild(root_child1, 1); @@ -659,10 +687,12 @@ test('margin_auto_bottom_and_top', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Top, 'auto'); root_child0.setMargin(Edge.Bottom, 'auto'); root_child0.setWidth(50); @@ -670,6 +700,7 @@ test('margin_auto_bottom_and_top', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(50); root.insertChild(root_child1, 1); @@ -723,10 +754,12 @@ test('margin_auto_bottom_and_top_justify_center', () => { try { root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Top, 'auto'); root_child0.setMargin(Edge.Bottom, 'auto'); root_child0.setWidth(50); @@ -734,6 +767,7 @@ test('margin_auto_bottom_and_top_justify_center', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(50); root.insertChild(root_child1, 1); @@ -787,22 +821,26 @@ test('margin_auto_mutiple_children_column', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Top, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setMargin(Edge.Top, 'auto'); root_child1.setWidth(50); root_child1.setHeight(50); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root_child2.setHeight(50); root.insertChild(root_child2, 2); @@ -867,22 +905,26 @@ test('margin_auto_mutiple_children_row', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Right, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setMargin(Edge.Right, 'auto'); root_child1.setWidth(50); root_child1.setHeight(50); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root_child2.setHeight(50); root.insertChild(root_child2, 2); @@ -947,10 +989,12 @@ test('margin_auto_left_and_right_column', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Left, 'auto'); root_child0.setMargin(Edge.Right, 'auto'); root_child0.setWidth(50); @@ -958,6 +1002,7 @@ test('margin_auto_left_and_right_column', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(50); root.insertChild(root_child1, 1); @@ -1010,10 +1055,12 @@ test('margin_auto_left_and_right', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Left, 'auto'); root_child0.setMargin(Edge.Right, 'auto'); root_child0.setWidth(50); @@ -1021,6 +1068,7 @@ test('margin_auto_left_and_right', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(50); root.insertChild(root_child1, 1); @@ -1075,10 +1123,12 @@ test('margin_auto_start_and_end_column', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Start, 'auto'); root_child0.setMargin(Edge.End, 'auto'); root_child0.setWidth(50); @@ -1086,6 +1136,7 @@ test('margin_auto_start_and_end_column', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(50); root.insertChild(root_child1, 1); @@ -1138,10 +1189,12 @@ test('margin_auto_start_and_end', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Start, 'auto'); root_child0.setMargin(Edge.End, 'auto'); root_child0.setWidth(50); @@ -1149,6 +1202,7 @@ test('margin_auto_start_and_end', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(50); root.insertChild(root_child1, 1); @@ -1202,10 +1256,12 @@ test('margin_auto_left_and_right_column_and_center', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Left, 'auto'); root_child0.setMargin(Edge.Right, 'auto'); root_child0.setWidth(50); @@ -1213,6 +1269,7 @@ test('margin_auto_left_and_right_column_and_center', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(50); root.insertChild(root_child1, 1); @@ -1266,16 +1323,19 @@ test('margin_auto_left', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Left, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(50); root.insertChild(root_child1, 1); @@ -1329,16 +1389,19 @@ test('margin_auto_right', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Right, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(50); root.insertChild(root_child1, 1); @@ -1392,10 +1455,12 @@ test('margin_auto_left_and_right_stretch', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Left, 'auto'); root_child0.setMargin(Edge.Right, 'auto'); root_child0.setWidth(50); @@ -1403,6 +1468,7 @@ test('margin_auto_left_and_right_stretch', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(50); root.insertChild(root_child1, 1); @@ -1455,10 +1521,12 @@ test('margin_auto_top_and_bottom_stretch', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Top, 'auto'); root_child0.setMargin(Edge.Bottom, 'auto'); root_child0.setWidth(50); @@ -1466,6 +1534,7 @@ test('margin_auto_top_and_bottom_stretch', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(50); root.insertChild(root_child1, 1); @@ -1518,10 +1587,12 @@ test('margin_should_not_be_part_of_max_height', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(250); root.setHeight(250); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Top, 20); root_child0.setWidth(100); root_child0.setHeight(100); @@ -1566,10 +1637,12 @@ test('margin_should_not_be_part_of_max_width', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(250); root.setHeight(250); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Left, 20); root_child0.setWidth(100); root_child0.setMaxWidth(100); @@ -1615,10 +1688,12 @@ test('margin_auto_left_right_child_bigger_than_parent', () => { try { root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(52); root.setHeight(52); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Left, 'auto'); root_child0.setMargin(Edge.Right, 'auto'); root_child0.setWidth(72); @@ -1664,10 +1739,12 @@ test('margin_auto_left_child_bigger_than_parent', () => { try { root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(52); root.setHeight(52); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Left, 'auto'); root_child0.setWidth(72); root_child0.setHeight(72); @@ -1712,10 +1789,12 @@ test('margin_fix_left_auto_right_child_bigger_than_parent', () => { try { root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(52); root.setHeight(52); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Left, 10); root_child0.setMargin(Edge.Right, 'auto'); root_child0.setWidth(72); @@ -1761,10 +1840,12 @@ test('margin_auto_left_fix_right_child_bigger_than_parent', () => { try { root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(52); root.setHeight(52); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMargin(Edge.Left, 'auto'); root_child0.setMargin(Edge.Right, 10); root_child0.setWidth(72); @@ -1810,10 +1891,12 @@ test('margin_auto_top_stretching_child', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexShrink(1); root_child0.setFlexBasis("0%"); @@ -1821,6 +1904,7 @@ test('margin_auto_top_stretching_child', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(50); root.insertChild(root_child1, 1); @@ -1874,10 +1958,12 @@ test('margin_auto_left_stretching_child', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexShrink(1); root_child0.setFlexBasis("0%"); @@ -1885,6 +1971,7 @@ test('margin_auto_left_stretching_child', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(50); root.insertChild(root_child1, 1); diff --git a/javascript/tests/generated/YGMinMaxDimensionTest.test.ts b/javascript/tests/generated/YGMinMaxDimensionTest.test.ts index dc951060..a57f14c0 100644 --- a/javascript/tests/generated/YGMinMaxDimensionTest.test.ts +++ b/javascript/tests/generated/YGMinMaxDimensionTest.test.ts @@ -33,10 +33,12 @@ test('max_width', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMaxWidth(50); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -80,10 +82,12 @@ test('max_height', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root_child0.setMaxHeight(50); root.insertChild(root_child0, 0); @@ -126,15 +130,18 @@ test.skip('min_height', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setMinHeight(60); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -187,15 +194,18 @@ test.skip('min_width', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setMinWidth(60); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -248,11 +258,13 @@ test('justify_content_min_max', () => { try { root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setMinHeight(100); root.setMaxHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(60); root_child0.setHeight(60); root.insertChild(root_child0, 0); @@ -296,11 +308,13 @@ test('align_items_min_max', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setMinWidth(100); root.setMaxWidth(200); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(60); root_child0.setHeight(60); root.insertChild(root_child0, 0); @@ -344,20 +358,24 @@ test('justify_content_overflow_min_max', () => { try { root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); + root.setPositionType(PositionType.Absolute); root.setMinHeight(100); root.setMaxHeight(110); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(50); root_child0.setHeight(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root_child1.setHeight(50); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(50); root_child2.setHeight(50); root.insertChild(root_child2, 2); @@ -420,16 +438,19 @@ test('flex_grow_to_min', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setMinHeight(100); root.setMaxHeight(500); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexShrink(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setHeight(50); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -483,14 +504,17 @@ test('flex_grow_in_at_most_container', () => { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); root.setAlignItems(Align.FlexStart); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); + root_child0.setPositionType(PositionType.Relative); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setFlexGrow(1); root_child0_child0.setFlexBasis(0); root_child0.insertChild(root_child0_child0, 0); @@ -544,8 +568,10 @@ test('flex_grow_child', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis(0); root_child0.setHeight(100); @@ -589,14 +615,17 @@ test('flex_grow_within_constrained_min_max_column', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setMinHeight(100); root.setMaxHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setHeight(50); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -648,15 +677,18 @@ test('flex_grow_within_max_width', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(100); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); + root_child0.setPositionType(PositionType.Relative); root_child0.setMaxWidth(100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setFlexGrow(1); root_child0_child0.setHeight(20); root_child0.insertChild(root_child0_child0, 0); @@ -709,15 +741,18 @@ test('flex_grow_within_constrained_max_width', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(100); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); + root_child0.setPositionType(PositionType.Relative); root_child0.setMaxWidth(300); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setFlexGrow(1); root_child0_child0.setHeight(20); root_child0.insertChild(root_child0_child0, 0); @@ -770,17 +805,20 @@ test('flex_root_ignored', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setFlexGrow(1); root.setWidth(100); root.setMinHeight(100); root.setMaxHeight(500); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis(200); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setHeight(100); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -832,22 +870,26 @@ test('flex_grow_root_minimized', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setMinHeight(100); root.setMaxHeight(500); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setMinHeight(100); root_child0.setMaxHeight(500); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setFlexGrow(1); root_child0_child0.setFlexBasis(200); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setHeight(100); root_child0.insertChild(root_child0_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -909,21 +951,25 @@ test('flex_grow_height_maximized', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(500); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setMinHeight(100); root_child0.setMaxHeight(500); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setFlexGrow(1); root_child0_child0.setFlexBasis(200); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setHeight(100); root_child0.insertChild(root_child0_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -986,14 +1032,17 @@ test('flex_grow_within_constrained_min_row', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setMinWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setWidth(50); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1045,13 +1094,16 @@ test('flex_grow_within_constrained_min_column', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setMinHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setHeight(50); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1103,20 +1155,24 @@ test('flex_grow_within_constrained_max_row', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(200); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); + root_child0.setPositionType(PositionType.Relative); root_child0.setMaxWidth(100); root_child0.setHeight(100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setFlexShrink(1); root_child0_child0.setFlexBasis(100); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth(50); root_child0.insertChild(root_child0_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1178,15 +1234,18 @@ test('flex_grow_within_constrained_max_column', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setMaxHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexShrink(1); root_child0.setFlexBasis(100); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setHeight(50); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1239,16 +1298,19 @@ test('child_min_max_width_flexing', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(120); root.setHeight(50); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis(0); root_child0.setMinWidth(60); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setFlexBasis("50%"); root_child1.setMaxWidth(20); @@ -1302,6 +1364,7 @@ test('min_width_overrides_width', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(50); root.setMinWidth(100); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1333,6 +1396,7 @@ test('max_width_overrides_width', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setMaxWidth(100); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1364,6 +1428,7 @@ test('min_height_overrides_height', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setHeight(50); root.setMinHeight(100); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1395,6 +1460,7 @@ test('max_height_overrides_height', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setHeight(200); root.setMaxHeight(100); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1427,10 +1493,12 @@ test('min_max_percent_no_width_height', () => { try { root = Yoga.Node.create(config); root.setAlignItems(Align.FlexStart); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setMinWidth("10%"); root_child0.setMaxWidth("10%"); root_child0.setMinHeight("10%"); diff --git a/javascript/tests/generated/YGPaddingTest.test.ts b/javascript/tests/generated/YGPaddingTest.test.ts index 75e74b6a..1c6e63c5 100644 --- a/javascript/tests/generated/YGPaddingTest.test.ts +++ b/javascript/tests/generated/YGPaddingTest.test.ts @@ -33,6 +33,7 @@ test('padding_no_size', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setPadding(Edge.Left, 10); root.setPadding(Edge.Top, 10); root.setPadding(Edge.Right, 10); @@ -66,12 +67,14 @@ test('padding_container_match_child', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setPadding(Edge.Left, 10); root.setPadding(Edge.Top, 10); root.setPadding(Edge.Right, 10); root.setPadding(Edge.Bottom, 10); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -114,6 +117,7 @@ test('padding_flex_child', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setPadding(Edge.Left, 10); root.setPadding(Edge.Top, 10); root.setPadding(Edge.Right, 10); @@ -122,6 +126,7 @@ test('padding_flex_child', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setWidth(10); root.insertChild(root_child0, 0); @@ -164,6 +169,7 @@ test('padding_stretch_child', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setPadding(Edge.Left, 10); root.setPadding(Edge.Top, 10); root.setPadding(Edge.Right, 10); @@ -172,6 +178,7 @@ test('padding_stretch_child', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setHeight(10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -215,6 +222,7 @@ test('padding_center_child', () => { root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setPadding(Edge.Start, 10); root.setPadding(Edge.End, 20); root.setPadding(Edge.Bottom, 20); @@ -222,6 +230,7 @@ test('padding_center_child', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(10); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -266,10 +275,12 @@ test('child_with_padding_align_end', () => { root = Yoga.Node.create(config); root.setJustifyContent(Justify.FlexEnd); root.setAlignItems(Align.FlexEnd); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setPadding(Edge.Left, 20); root_child0.setPadding(Edge.Top, 20); root_child0.setPadding(Edge.Right, 20); diff --git a/javascript/tests/generated/YGPercentageTest.test.ts b/javascript/tests/generated/YGPercentageTest.test.ts index effa8763..c9358b91 100644 --- a/javascript/tests/generated/YGPercentageTest.test.ts +++ b/javascript/tests/generated/YGPercentageTest.test.ts @@ -34,10 +34,12 @@ test('percentage_width_height', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth("30%"); root_child0.setHeight("30%"); root.insertChild(root_child0, 0); @@ -81,10 +83,12 @@ test('percentage_position_left_top', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(400); root.setHeight(400); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setPosition(Edge.Left, "10%"); root_child0.setPosition(Edge.Top, "20%"); root_child0.setWidth("45%"); @@ -130,10 +134,12 @@ test('percentage_position_bottom_right', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(500); root.setHeight(500); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setPosition(Edge.Right, "20%"); root_child0.setPosition(Edge.Bottom, "10%"); root_child0.setWidth("55%"); @@ -179,15 +185,18 @@ test('percentage_flex_basis', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis("50%"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setFlexBasis("25%"); root.insertChild(root_child1, 1); @@ -240,15 +249,18 @@ test('percentage_flex_basis_cross', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis("50%"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setFlexBasis("25%"); root.insertChild(root_child1, 1); @@ -301,15 +313,18 @@ test.skip('percentage_flex_basis_cross_min_height', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setMinHeight("60%"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(2); root_child1.setMinHeight("10%"); root.insertChild(root_child1, 1); @@ -363,16 +378,19 @@ test('percentage_flex_basis_main_max_height', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis("10%"); root_child0.setMaxHeight("60%"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(4); root_child1.setFlexBasis("10%"); root_child1.setMaxHeight("20%"); @@ -426,16 +444,19 @@ test('percentage_flex_basis_cross_max_height', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis("10%"); root_child0.setMaxHeight("60%"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(4); root_child1.setFlexBasis("10%"); root_child1.setMaxHeight("20%"); @@ -490,16 +511,19 @@ test('percentage_flex_basis_main_max_width', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis("15%"); root_child0.setMaxWidth("60%"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(4); root_child1.setFlexBasis("10%"); root_child1.setMaxWidth("20%"); @@ -553,16 +577,19 @@ test('percentage_flex_basis_cross_max_width', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis("10%"); root_child0.setMaxWidth("60%"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(4); root_child1.setFlexBasis("15%"); root_child1.setMaxWidth("20%"); @@ -617,16 +644,19 @@ test('percentage_flex_basis_main_min_width', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis("15%"); root_child0.setMinWidth("60%"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(4); root_child1.setFlexBasis("10%"); root_child1.setMinWidth("20%"); @@ -680,16 +710,19 @@ test('percentage_flex_basis_cross_min_width', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis("10%"); root_child0.setMinWidth("60%"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(4); root_child1.setFlexBasis("15%"); root_child1.setMinWidth("20%"); @@ -743,10 +776,12 @@ test('percentage_multiple_nested_with_padding_margin_and_percentage_values', () try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis("10%"); root_child0.setMargin(Edge.Left, 5); @@ -761,6 +796,7 @@ test('percentage_multiple_nested_with_padding_margin_and_percentage_values', () root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setMargin(Edge.Left, 5); root_child0_child0.setMargin(Edge.Top, 5); root_child0_child0.setMargin(Edge.Right, 5); @@ -773,6 +809,7 @@ test('percentage_multiple_nested_with_padding_margin_and_percentage_values', () root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); root_child0_child0_child0.setMargin(Edge.Left, "5%"); root_child0_child0_child0.setMargin(Edge.Top, "5%"); root_child0_child0_child0.setMargin(Edge.Right, "5%"); @@ -785,6 +822,7 @@ test('percentage_multiple_nested_with_padding_margin_and_percentage_values', () root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(4); root_child1.setFlexBasis("15%"); root_child1.setMinWidth("20%"); @@ -858,10 +896,12 @@ test('percentage_margin_should_calculate_based_only_on_width', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setMargin(Edge.Left, "10%"); root_child0.setMargin(Edge.Top, "10%"); @@ -870,6 +910,7 @@ test('percentage_margin_should_calculate_based_only_on_width', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); root_child0.insertChild(root_child0_child0, 0); @@ -922,10 +963,12 @@ test('percentage_padding_should_calculate_based_only_on_width', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setPadding(Edge.Left, "10%"); root_child0.setPadding(Edge.Top, "10%"); @@ -934,6 +977,7 @@ test('percentage_padding_should_calculate_based_only_on_width', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); root_child0.insertChild(root_child0_child0, 0); @@ -986,6 +1030,7 @@ test('percentage_absolute_position', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(100); @@ -1035,8 +1080,10 @@ test('percentage_width_height_undefined_parent_size', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth("50%"); root_child0.setHeight("50%"); root.insertChild(root_child0, 0); @@ -1080,22 +1127,27 @@ test('percent_within_flex_grow', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(350); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(100); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); + root_child1_child0.setPositionType(PositionType.Relative); root_child1_child0.setWidth("100%"); root_child1.insertChild(root_child1_child0, 0); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setWidth(100); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1169,24 +1221,29 @@ test('percentage_container_in_wrapping_container', () => { root = Yoga.Node.create(config); root.setJustifyContent(Justify.Center); root.setAlignItems(Align.Center); + root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); root_child0_child0.setFlexDirection(FlexDirection.Row); root_child0_child0.setJustifyContent(Justify.Center); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth("100%"); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child0_child1 = Yoga.Node.create(config); + root_child0_child0_child1.setPositionType(PositionType.Relative); root_child0_child0_child1.setWidth(50); root_child0_child0_child1.setHeight(50); root_child0_child0.insertChild(root_child0_child0_child1, 1); @@ -1259,6 +1316,7 @@ test('percent_absolute_position', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(60); root.setHeight(50); @@ -1271,10 +1329,12 @@ test('percent_absolute_position', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth("100%"); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setWidth("100%"); root_child0.insertChild(root_child0_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); diff --git a/javascript/tests/generated/YGRoundingTest.test.ts b/javascript/tests/generated/YGRoundingTest.test.ts index 63c981bf..9c44d970 100644 --- a/javascript/tests/generated/YGRoundingTest.test.ts +++ b/javascript/tests/generated/YGRoundingTest.test.ts @@ -34,18 +34,22 @@ test('rounding_flex_basis_flex_grow_row_width_of_100', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setFlexGrow(1); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -108,26 +112,32 @@ test('rounding_flex_basis_flex_grow_row_prime_number_width', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(113); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setFlexGrow(1); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setPositionType(PositionType.Relative); root_child3.setFlexGrow(1); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); + root_child4.setPositionType(PositionType.Relative); root_child4.setFlexGrow(1); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -210,19 +220,23 @@ test('rounding_flex_basis_flex_shrink_row', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(101); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexShrink(1); root_child0.setFlexBasis(100); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexBasis(25); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setFlexBasis(25); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -284,21 +298,25 @@ test('rounding_flex_basis_overrides_main_size', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(113); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis(50); root_child0.setHeight(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setFlexGrow(1); root_child2.setHeight(10); root.insertChild(root_child2, 2); @@ -361,21 +379,25 @@ test('rounding_total_fractial', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(87.4); root.setHeight(113.4); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(0.7); root_child0.setFlexBasis(50.3); root_child0.setHeight(20.3); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1.6); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setFlexGrow(1.1); root_child2.setHeight(10.7); root.insertChild(root_child2, 2); @@ -438,16 +460,19 @@ test('rounding_total_fractial_nested', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(87.4); root.setHeight(113.4); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(0.7); root_child0.setFlexBasis(50.3); root_child0.setHeight(20.3); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setFlexGrow(1); root_child0_child0.setFlexBasis(0.3); root_child0_child0.setPosition(Edge.Bottom, 13.3); @@ -455,6 +480,7 @@ test('rounding_total_fractial_nested', () => { root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); + root_child0_child1.setPositionType(PositionType.Relative); root_child0_child1.setFlexGrow(4); root_child0_child1.setFlexBasis(0.3); root_child0_child1.setPosition(Edge.Top, 13.3); @@ -462,11 +488,13 @@ test('rounding_total_fractial_nested', () => { root_child0.insertChild(root_child0_child1, 1); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1.6); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setFlexGrow(1.1); root_child2.setHeight(10.7); root.insertChild(root_child2, 2); @@ -549,21 +577,25 @@ test('rounding_fractial_input_1', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(113.4); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis(50); root_child0.setHeight(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setFlexGrow(1); root_child2.setHeight(10); root.insertChild(root_child2, 2); @@ -626,21 +658,25 @@ test('rounding_fractial_input_2', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(113.6); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis(50); root_child0.setHeight(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setFlexGrow(1); root_child2.setHeight(10); root.insertChild(root_child2, 2); @@ -703,22 +739,26 @@ test('rounding_fractial_input_3', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setPosition(Edge.Top, 0.3); root.setWidth(100); root.setHeight(113.4); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis(50); root_child0.setHeight(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setFlexGrow(1); root_child2.setHeight(10); root.insertChild(root_child2, 2); @@ -781,22 +821,26 @@ test('rounding_fractial_input_4', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setPosition(Edge.Top, 0.7); root.setWidth(100); root.setHeight(113.4); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setFlexBasis(50); root_child0.setHeight(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setFlexGrow(1); root_child2.setHeight(10); root.insertChild(root_child2, 2); @@ -860,24 +904,29 @@ test('rounding_inner_node_controversy_horizontal', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(320); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setHeight(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setHeight(10); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); + root_child1_child0.setPositionType(PositionType.Relative); root_child1_child0.setFlexGrow(1); root_child1_child0.setHeight(10); root_child1.insertChild(root_child1_child0, 0); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setFlexGrow(1); root_child2.setHeight(10); root.insertChild(root_child2, 2); @@ -950,24 +999,29 @@ test('rounding_inner_node_controversy_vertical', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setHeight(320); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setWidth(10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setWidth(10); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); + root_child1_child0.setPositionType(PositionType.Relative); root_child1_child0.setFlexGrow(1); root_child1_child0.setWidth(10); root_child1.insertChild(root_child1_child0, 0); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setFlexGrow(1); root_child2.setWidth(10); root.insertChild(root_child2, 2); @@ -1041,40 +1095,48 @@ test('rounding_inner_node_controversy_combined', () => { try { root = Yoga.Node.create(config); root.setFlexDirection(FlexDirection.Row); + root.setPositionType(PositionType.Absolute); root.setWidth(640); root.setHeight(320); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setFlexGrow(1); root_child0.setHeight("100%"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setPositionType(PositionType.Relative); root_child1.setFlexGrow(1); root_child1.setHeight("100%"); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); + root_child1_child0.setPositionType(PositionType.Relative); root_child1_child0.setFlexGrow(1); root_child1_child0.setWidth("100%"); root_child1.insertChild(root_child1_child0, 0); const root_child1_child1 = Yoga.Node.create(config); + root_child1_child1.setPositionType(PositionType.Relative); root_child1_child1.setFlexGrow(1); root_child1_child1.setWidth("100%"); root_child1.insertChild(root_child1_child1, 1); const root_child1_child1_child0 = Yoga.Node.create(config); + root_child1_child1_child0.setPositionType(PositionType.Relative); root_child1_child1_child0.setFlexGrow(1); root_child1_child1_child0.setWidth("100%"); root_child1_child1.insertChild(root_child1_child1_child0, 0); const root_child1_child2 = Yoga.Node.create(config); + root_child1_child2.setPositionType(PositionType.Relative); root_child1_child2.setFlexGrow(1); root_child1_child2.setWidth("100%"); root_child1.insertChild(root_child1_child2, 2); const root_child2 = Yoga.Node.create(config); + root_child2.setPositionType(PositionType.Relative); root_child2.setFlexGrow(1); root_child2.setHeight("100%"); root.insertChild(root_child2, 2); diff --git a/javascript/tests/generated/YGSizeOverflowTest.test.ts b/javascript/tests/generated/YGSizeOverflowTest.test.ts index 436bcb89..887bbfbd 100644 --- a/javascript/tests/generated/YGSizeOverflowTest.test.ts +++ b/javascript/tests/generated/YGSizeOverflowTest.test.ts @@ -33,13 +33,16 @@ test('nested_overflowing_child', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(200); root_child0_child0.setHeight(200); root_child0.insertChild(root_child0_child0, 0); @@ -92,15 +95,18 @@ test('nested_overflowing_child_in_constraint_parent', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(100); root_child0.setHeight(100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(200); root_child0_child0.setHeight(200); root_child0.insertChild(root_child0_child0, 0); @@ -153,14 +159,17 @@ test('parent_wrap_child_size_overflowing_parent', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); root_child0.setWidth(100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); root_child0_child0.setWidth(100); root_child0_child0.setHeight(200); root_child0.insertChild(root_child0_child0, 0); diff --git a/javascript/tests/generated/YGStaticPositionTest.test.ts b/javascript/tests/generated/YGStaticPositionTest.test.ts new file mode 100644 index 00000000..ecd80b5e --- /dev/null +++ b/javascript/tests/generated/YGStaticPositionTest.test.ts @@ -0,0 +1,60 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +// @generated by gentest/gentest.rb from gentest/fixtures/YGStaticPositionTest.html + +import {Yoga} from "../tools/globals"; +import { + Align, + Direction, + Display, + Edge, + Errata, + ExperimentalFeature, + FlexDirection, + Gutter, + Justify, + MeasureMode, + Overflow, + PositionType, + Unit, + Wrap, +} from 'yoga-layout'; + +test.skip('static_position_insets_have_no_effect', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPosition(Edge.Left, 50); + root.setPosition(Edge.Top, 50); + root.setWidth(100); + root.setHeight(100); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(100); + expect(root.getComputedHeight()).toBe(100); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(100); + expect(root.getComputedHeight()).toBe(100); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); diff --git a/tests/YGFlexDirectionErrataTest.cpp b/tests/YGFlexDirectionErrataTest.cpp index df173c12..969c5177 100644 --- a/tests/YGFlexDirectionErrataTest.cpp +++ b/tests/YGFlexDirectionErrataTest.cpp @@ -442,10 +442,12 @@ TEST(YogaTest, flex_direction_row_reverse_pos_left_errata) { YGConfigSetErrata(config, YGErrata::YGErrataStartingEndingEdgeFromFlexDirection); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 100); YGNodeStyleSetWidth(root_child0, 100); @@ -453,14 +455,17 @@ TEST(YogaTest, flex_direction_row_reverse_pos_left_errata) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child1, 10); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child2, 10); YGNodeInsertChild(root_child0, root_child0_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -528,10 +533,12 @@ TEST(YogaTest, flex_direction_row_reverse_pos_right_errata) { YGConfigSetErrata(config, YGErrata::YGErrataStartingEndingEdgeFromFlexDirection); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeStyleSetPosition(root_child0, YGEdgeRight, 100); YGNodeStyleSetWidth(root_child0, 100); @@ -539,14 +546,17 @@ TEST(YogaTest, flex_direction_row_reverse_pos_right_errata) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child1, 10); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child2, 10); YGNodeInsertChild(root_child0, root_child0_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -614,10 +624,12 @@ TEST(YogaTest, flex_direction_column_reverse_pos_top_errata) { YGConfigSetErrata(config, YGErrata::YGErrataStartingEndingEdgeFromFlexDirection); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); YGNodeStyleSetPosition(root_child0, YGEdgeTop, 100); YGNodeStyleSetWidth(root_child0, 100); @@ -625,14 +637,17 @@ TEST(YogaTest, flex_direction_column_reverse_pos_top_errata) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child1, 10); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child2, 10); YGNodeInsertChild(root_child0, root_child0_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -700,10 +715,12 @@ TEST(YogaTest, flex_direction_column_reverse_pos_bottom_errata) { YGConfigSetErrata(config, YGErrata::YGErrataStartingEndingEdgeFromFlexDirection); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); YGNodeStyleSetPosition(root_child0, YGEdgeBottom, 100); YGNodeStyleSetWidth(root_child0, 100); @@ -711,14 +728,17 @@ TEST(YogaTest, flex_direction_column_reverse_pos_bottom_errata) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child1, 10); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child2, 10); YGNodeInsertChild(root_child0, root_child0_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); diff --git a/tests/YGRoundingMeasureFuncTest.cpp b/tests/YGRoundingMeasureFuncTest.cpp index 045089d7..d10aa404 100644 --- a/tests/YGRoundingMeasureFuncTest.cpp +++ b/tests/YGRoundingMeasureFuncTest.cpp @@ -117,9 +117,11 @@ TEST( rounding_feature_with_custom_measure_and_fractial_matching_scale) { const YGConfigRef config = YGConfigNew(); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 73.625); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeSetMeasureFunc(root_child0, _measureFractial); YGNodeInsertChild(root, root_child0, 0); diff --git a/tests/generated/YGAbsolutePositionTest.cpp b/tests/generated/YGAbsolutePositionTest.cpp index 6d4856df..ce614e86 100644 --- a/tests/generated/YGAbsolutePositionTest.cpp +++ b/tests/generated/YGAbsolutePositionTest.cpp @@ -16,6 +16,7 @@ TEST(YogaTest, absolute_layout_width_height_start_top) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); @@ -60,6 +61,7 @@ TEST(YogaTest, absolute_layout_width_height_end_bottom) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); @@ -104,6 +106,7 @@ TEST(YogaTest, absolute_layout_start_top_end_bottom) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); @@ -148,6 +151,7 @@ TEST(YogaTest, absolute_layout_width_height_start_top_end_bottom) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); @@ -195,6 +199,7 @@ TEST(YogaTest, do_not_clamp_height_of_absolute_node_to_height_of_its_overflow_hi const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetOverflow(root, YGOverflowHidden); YGNodeStyleSetWidth(root, 50); YGNodeStyleSetHeight(root, 50); @@ -206,6 +211,7 @@ TEST(YogaTest, do_not_clamp_height_of_absolute_node_to_height_of_its_overflow_hi YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); YGNodeInsertChild(root_child0, root_child0_child0, 0); @@ -253,6 +259,7 @@ TEST(YogaTest, absolute_layout_within_border) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMargin(root, YGEdgeLeft, 10); YGNodeStyleSetMargin(root, YGEdgeTop, 10); YGNodeStyleSetMargin(root, YGEdgeRight, 10); @@ -373,6 +380,7 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_center) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexGrow(root, 1); YGNodeStyleSetWidth(root, 110); YGNodeStyleSetHeight(root, 100); @@ -418,6 +426,7 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_flex_end) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexGrow(root, 1); YGNodeStyleSetWidth(root, 110); YGNodeStyleSetHeight(root, 100); @@ -462,6 +471,7 @@ TEST(YogaTest, absolute_layout_justify_content_center) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexGrow(root, 1); YGNodeStyleSetWidth(root, 110); YGNodeStyleSetHeight(root, 100); @@ -506,6 +516,7 @@ TEST(YogaTest, absolute_layout_align_items_center) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexGrow(root, 1); YGNodeStyleSetWidth(root, 110); YGNodeStyleSetHeight(root, 100); @@ -549,6 +560,7 @@ TEST(YogaTest, absolute_layout_align_items_center_on_child_only) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexGrow(root, 1); YGNodeStyleSetWidth(root, 110); YGNodeStyleSetHeight(root, 100); @@ -595,6 +607,7 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_top_po const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexGrow(root, 1); YGNodeStyleSetWidth(root, 110); YGNodeStyleSetHeight(root, 100); @@ -641,6 +654,7 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_bottom const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexGrow(root, 1); YGNodeStyleSetWidth(root, 110); YGNodeStyleSetHeight(root, 100); @@ -687,6 +701,7 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_left_p const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexGrow(root, 1); YGNodeStyleSetWidth(root, 110); YGNodeStyleSetHeight(root, 100); @@ -733,6 +748,7 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_right_ const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexGrow(root, 1); YGNodeStyleSetWidth(root, 110); YGNodeStyleSetHeight(root, 100); @@ -777,6 +793,7 @@ TEST(YogaTest, position_root_with_rtl_should_position_withoutdirection) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetPosition(root, YGEdgeLeft, 72); YGNodeStyleSetWidth(root, 52); YGNodeStyleSetHeight(root, 52); @@ -804,6 +821,7 @@ TEST(YogaTest, absolute_layout_percentage_bottom_based_on_parent_height) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 200); @@ -881,6 +899,7 @@ TEST(YogaTest, absolute_layout_in_wrap_reverse_column_container) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); @@ -925,6 +944,7 @@ TEST(YogaTest, absolute_layout_in_wrap_reverse_row_container) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); @@ -968,6 +988,7 @@ TEST(YogaTest, absolute_layout_in_wrap_reverse_column_container_flex_end) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); @@ -1013,6 +1034,7 @@ TEST(YogaTest, absolute_layout_in_wrap_reverse_row_container_flex_end) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); @@ -1057,9 +1079,11 @@ TEST(YogaTest, percent_absolute_position_infinite_height) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 300); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 300); YGNodeInsertChild(root, root_child0, 0); @@ -1114,6 +1138,7 @@ TEST(YogaTest, absolute_layout_percentage_height_based_on_padded_parent) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetPadding(root, YGEdgeTop, 10); YGNodeStyleSetBorder(root, YGEdgeTop, 10); YGNodeStyleSetWidth(root, 100); @@ -1160,6 +1185,7 @@ TEST(YogaTest, absolute_layout_percentage_height_based_on_padded_parent_and_alig const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeRelative); YGNodeStyleSetPadding(root, YGEdgeTop, 20); YGNodeStyleSetPadding(root, YGEdgeBottom, 20); YGNodeStyleSetWidth(root, 100); diff --git a/tests/generated/YGAlignContentTest.cpp b/tests/generated/YGAlignContentTest.cpp index 0a64faf0..89e4f43f 100644 --- a/tests/generated/YGAlignContentTest.cpp +++ b/tests/generated/YGAlignContentTest.cpp @@ -17,15 +17,18 @@ TEST(YogaTest, align_content_flex_start_nowrap) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); @@ -74,31 +77,37 @@ TEST(YogaTest, align_content_flex_start_wrap) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 50); YGNodeStyleSetHeight(root_child3, 10); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 50); YGNodeStyleSetHeight(root_child4, 10); YGNodeInsertChild(root, root_child4, 4); @@ -177,16 +186,19 @@ TEST(YogaTest, align_content_flex_start_wrap_singleline) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); @@ -234,6 +246,7 @@ TEST(YogaTest, align_content_flex_start_wrapped_negative_space) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeLeft, 60); YGNodeStyleSetBorder(root, YGEdgeTop, 60); YGNodeStyleSetBorder(root, YGEdgeRight, 60); @@ -244,21 +257,25 @@ TEST(YogaTest, align_content_flex_start_wrapped_negative_space) { const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child0, 80); YGNodeStyleSetHeight(root_child0_child0, 20); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child1, 80); YGNodeStyleSetHeight(root_child0_child1, 20); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child2, 80); YGNodeStyleSetHeight(root_child0_child2, 20); YGNodeInsertChild(root_child0, root_child0_child2, 2); @@ -326,6 +343,7 @@ TEST(YogaTest, align_content_flex_start_wrapped_negative_space_gap) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeLeft, 60); YGNodeStyleSetBorder(root, YGEdgeTop, 60); YGNodeStyleSetBorder(root, YGEdgeRight, 60); @@ -336,6 +354,7 @@ TEST(YogaTest, align_content_flex_start_wrapped_negative_space_gap) { const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetHeight(root_child0, 10); YGNodeStyleSetGap(root_child0, YGGutterColumn, 10); @@ -343,16 +362,19 @@ TEST(YogaTest, align_content_flex_start_wrapped_negative_space_gap) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child0, 80); YGNodeStyleSetHeight(root_child0_child0, 20); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child1, 80); YGNodeStyleSetHeight(root_child0_child1, 20); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child2, 80); YGNodeStyleSetHeight(root_child0_child2, 20); YGNodeInsertChild(root_child0, root_child0_child2, 2); @@ -420,29 +442,35 @@ TEST(YogaTest, align_content_flex_start_without_height_on_children) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 50); YGNodeStyleSetHeight(root_child3, 10); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 50); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -519,17 +547,20 @@ TEST(YogaTest, align_content_flex_start_with_flex) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 120); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 0); YGNodeStyleSetWidth(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 0); YGNodeStyleSetWidth(root_child1, 50); @@ -537,10 +568,12 @@ TEST(YogaTest, align_content_flex_start_with_flex) { YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child3, 1); YGNodeStyleSetFlexShrink(root_child3, 1); YGNodeStyleSetFlexBasisPercent(root_child3, 0); @@ -548,6 +581,7 @@ TEST(YogaTest, align_content_flex_start_with_flex) { YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 50); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -626,15 +660,18 @@ TEST(YogaTest, align_content_flex_end_nowrap) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignFlexEnd); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); @@ -684,31 +721,37 @@ TEST(YogaTest, align_content_flex_end_wrap) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignFlexEnd); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 50); YGNodeStyleSetHeight(root_child3, 10); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 50); YGNodeStyleSetHeight(root_child4, 10); YGNodeInsertChild(root, root_child4, 4); @@ -788,16 +831,19 @@ TEST(YogaTest, align_content_flex_end_wrap_singleline) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignFlexEnd); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); @@ -845,6 +891,7 @@ TEST(YogaTest, align_content_flex_end_wrapped_negative_space) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeLeft, 60); YGNodeStyleSetBorder(root, YGEdgeTop, 60); YGNodeStyleSetBorder(root, YGEdgeRight, 60); @@ -856,21 +903,25 @@ TEST(YogaTest, align_content_flex_end_wrapped_negative_space) { YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetAlignContent(root_child0, YGAlignFlexEnd); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child0, 80); YGNodeStyleSetHeight(root_child0_child0, 20); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child1, 80); YGNodeStyleSetHeight(root_child0_child1, 20); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child2, 80); YGNodeStyleSetHeight(root_child0_child2, 20); YGNodeInsertChild(root_child0, root_child0_child2, 2); @@ -938,6 +989,7 @@ TEST(YogaTest, align_content_flex_end_wrapped_negative_space_gap) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeLeft, 60); YGNodeStyleSetBorder(root, YGEdgeTop, 60); YGNodeStyleSetBorder(root, YGEdgeRight, 60); @@ -949,6 +1001,7 @@ TEST(YogaTest, align_content_flex_end_wrapped_negative_space_gap) { YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetAlignContent(root_child0, YGAlignFlexEnd); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetHeight(root_child0, 10); YGNodeStyleSetGap(root_child0, YGGutterColumn, 10); @@ -956,16 +1009,19 @@ TEST(YogaTest, align_content_flex_end_wrapped_negative_space_gap) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child0, 80); YGNodeStyleSetHeight(root_child0_child0, 20); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child1, 80); YGNodeStyleSetHeight(root_child0_child1, 20); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child2, 80); YGNodeStyleSetHeight(root_child0_child2, 20); YGNodeInsertChild(root_child0, root_child0_child2, 2); @@ -1035,15 +1091,18 @@ TEST(YogaTest, align_content_center_nowrap) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); @@ -1093,31 +1152,37 @@ TEST(YogaTest, align_content_center_wrap) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 50); YGNodeStyleSetHeight(root_child3, 10); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 50); YGNodeStyleSetHeight(root_child4, 10); YGNodeInsertChild(root, root_child4, 4); @@ -1197,16 +1262,19 @@ TEST(YogaTest, align_content_center_wrap_singleline) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); @@ -1254,6 +1322,7 @@ TEST(YogaTest, align_content_center_wrapped_negative_space) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeLeft, 60); YGNodeStyleSetBorder(root, YGEdgeTop, 60); YGNodeStyleSetBorder(root, YGEdgeRight, 60); @@ -1265,21 +1334,25 @@ TEST(YogaTest, align_content_center_wrapped_negative_space) { YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetAlignContent(root_child0, YGAlignCenter); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child0, 80); YGNodeStyleSetHeight(root_child0_child0, 20); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child1, 80); YGNodeStyleSetHeight(root_child0_child1, 20); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child2, 80); YGNodeStyleSetHeight(root_child0_child2, 20); YGNodeInsertChild(root_child0, root_child0_child2, 2); @@ -1347,6 +1420,7 @@ TEST(YogaTest, align_content_center_wrapped_negative_space_gap) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeLeft, 60); YGNodeStyleSetBorder(root, YGEdgeTop, 60); YGNodeStyleSetBorder(root, YGEdgeRight, 60); @@ -1358,6 +1432,7 @@ TEST(YogaTest, align_content_center_wrapped_negative_space_gap) { YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetAlignContent(root_child0, YGAlignCenter); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetHeight(root_child0, 10); YGNodeStyleSetGap(root_child0, YGGutterColumn, 10); @@ -1365,16 +1440,19 @@ TEST(YogaTest, align_content_center_wrapped_negative_space_gap) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child0, 80); YGNodeStyleSetHeight(root_child0_child0, 20); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child1, 80); YGNodeStyleSetHeight(root_child0_child1, 20); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child2, 80); YGNodeStyleSetHeight(root_child0_child2, 20); YGNodeInsertChild(root_child0, root_child0_child2, 2); @@ -1444,15 +1522,18 @@ TEST(YogaTest, align_content_space_between_nowrap) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignSpaceBetween); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); @@ -1502,31 +1583,37 @@ TEST(YogaTest, align_content_space_between_wrap) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignSpaceBetween); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 50); YGNodeStyleSetHeight(root_child3, 10); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 50); YGNodeStyleSetHeight(root_child4, 10); YGNodeInsertChild(root, root_child4, 4); @@ -1606,16 +1693,19 @@ TEST(YogaTest, align_content_space_between_wrap_singleline) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignSpaceBetween); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); @@ -1663,6 +1753,7 @@ TEST(YogaTest, align_content_space_between_wrapped_negative_space) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeLeft, 60); YGNodeStyleSetBorder(root, YGEdgeTop, 60); YGNodeStyleSetBorder(root, YGEdgeRight, 60); @@ -1674,21 +1765,25 @@ TEST(YogaTest, align_content_space_between_wrapped_negative_space) { YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceBetween); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child0, 80); YGNodeStyleSetHeight(root_child0_child0, 20); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child1, 80); YGNodeStyleSetHeight(root_child0_child1, 20); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child2, 80); YGNodeStyleSetHeight(root_child0_child2, 20); YGNodeInsertChild(root_child0, root_child0_child2, 2); @@ -1756,6 +1851,7 @@ TEST(YogaTest, align_content_space_between_wrapped_negative_space_gap) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeLeft, 60); YGNodeStyleSetBorder(root, YGEdgeTop, 60); YGNodeStyleSetBorder(root, YGEdgeRight, 60); @@ -1767,6 +1863,7 @@ TEST(YogaTest, align_content_space_between_wrapped_negative_space_gap) { YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceBetween); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetHeight(root_child0, 10); YGNodeStyleSetGap(root_child0, YGGutterColumn, 10); @@ -1774,16 +1871,19 @@ TEST(YogaTest, align_content_space_between_wrapped_negative_space_gap) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child0, 80); YGNodeStyleSetHeight(root_child0_child0, 20); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child1, 80); YGNodeStyleSetHeight(root_child0_child1, 20); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child2, 80); YGNodeStyleSetHeight(root_child0_child2, 20); YGNodeInsertChild(root_child0, root_child0_child2, 2); @@ -1853,15 +1953,18 @@ TEST(YogaTest, align_content_space_around_nowrap) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); @@ -1911,31 +2014,37 @@ TEST(YogaTest, align_content_space_around_wrap) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 50); YGNodeStyleSetHeight(root_child3, 10); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 50); YGNodeStyleSetHeight(root_child4, 10); YGNodeInsertChild(root, root_child4, 4); @@ -2015,16 +2124,19 @@ TEST(YogaTest, align_content_space_around_wrap_singleline) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); @@ -2072,6 +2184,7 @@ TEST(YogaTest, align_content_space_around_wrapped_negative_space) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeLeft, 60); YGNodeStyleSetBorder(root, YGEdgeTop, 60); YGNodeStyleSetBorder(root, YGEdgeRight, 60); @@ -2083,21 +2196,25 @@ TEST(YogaTest, align_content_space_around_wrapped_negative_space) { YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceAround); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child0, 80); YGNodeStyleSetHeight(root_child0_child0, 20); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child1, 80); YGNodeStyleSetHeight(root_child0_child1, 20); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child2, 80); YGNodeStyleSetHeight(root_child0_child2, 20); YGNodeInsertChild(root_child0, root_child0_child2, 2); @@ -2165,6 +2282,7 @@ TEST(YogaTest, align_content_space_around_wrapped_negative_space_gap) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeLeft, 60); YGNodeStyleSetBorder(root, YGEdgeTop, 60); YGNodeStyleSetBorder(root, YGEdgeRight, 60); @@ -2176,6 +2294,7 @@ TEST(YogaTest, align_content_space_around_wrapped_negative_space_gap) { YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceAround); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetHeight(root_child0, 10); YGNodeStyleSetGap(root_child0, YGGutterColumn, 10); @@ -2183,16 +2302,19 @@ TEST(YogaTest, align_content_space_around_wrapped_negative_space_gap) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child0, 80); YGNodeStyleSetHeight(root_child0_child0, 20); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child1, 80); YGNodeStyleSetHeight(root_child0_child1, 20); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child2, 80); YGNodeStyleSetHeight(root_child0_child2, 20); YGNodeInsertChild(root_child0, root_child0_child2, 2); @@ -2262,15 +2384,18 @@ TEST(YogaTest, align_content_space_evenly_nowrap) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignSpaceEvenly); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); @@ -2320,31 +2445,37 @@ TEST(YogaTest, align_content_space_evenly_wrap) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignSpaceEvenly); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 50); YGNodeStyleSetHeight(root_child3, 10); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 50); YGNodeStyleSetHeight(root_child4, 10); YGNodeInsertChild(root, root_child4, 4); @@ -2424,16 +2555,19 @@ TEST(YogaTest, align_content_space_evenly_wrap_singleline) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignSpaceEvenly); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); @@ -2481,6 +2615,7 @@ TEST(YogaTest, align_content_space_evenly_wrapped_negative_space) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeLeft, 60); YGNodeStyleSetBorder(root, YGEdgeTop, 60); YGNodeStyleSetBorder(root, YGEdgeRight, 60); @@ -2492,21 +2627,25 @@ TEST(YogaTest, align_content_space_evenly_wrapped_negative_space) { YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceEvenly); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child0, 80); YGNodeStyleSetHeight(root_child0_child0, 20); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child1, 80); YGNodeStyleSetHeight(root_child0_child1, 20); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child2, 80); YGNodeStyleSetHeight(root_child0_child2, 20); YGNodeInsertChild(root_child0, root_child0_child2, 2); @@ -2574,6 +2713,7 @@ TEST(YogaTest, align_content_space_evenly_wrapped_negative_space_gap) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeLeft, 60); YGNodeStyleSetBorder(root, YGEdgeTop, 60); YGNodeStyleSetBorder(root, YGEdgeRight, 60); @@ -2585,6 +2725,7 @@ TEST(YogaTest, align_content_space_evenly_wrapped_negative_space_gap) { YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceEvenly); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetHeight(root_child0, 10); YGNodeStyleSetGap(root_child0, YGGutterColumn, 10); @@ -2592,16 +2733,19 @@ TEST(YogaTest, align_content_space_evenly_wrapped_negative_space_gap) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child0, 80); YGNodeStyleSetHeight(root_child0_child0, 20); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child1, 80); YGNodeStyleSetHeight(root_child0_child1, 20); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child2, 80); YGNodeStyleSetHeight(root_child0_child2, 20); YGNodeInsertChild(root_child0, root_child0_child2, 2); @@ -2670,27 +2814,33 @@ TEST(YogaTest, align_content_stretch) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 50); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 50); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2769,27 +2919,33 @@ TEST(YogaTest, align_content_stretch_row) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 50); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 50); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2868,33 +3024,40 @@ TEST(YogaTest, align_content_stretch_row_with_children) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeStyleSetFlexShrink(root_child0_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0_child0, 0); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 50); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 50); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2983,15 +3146,18 @@ TEST(YogaTest, align_content_stretch_row_with_flex) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 0); @@ -2999,10 +3165,12 @@ TEST(YogaTest, align_content_stretch_row_with_flex) { YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child3, 1); YGNodeStyleSetFlexShrink(root_child3, 1); YGNodeStyleSetFlexBasisPercent(root_child3, 0); @@ -3010,6 +3178,7 @@ TEST(YogaTest, align_content_stretch_row_with_flex) { YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 50); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -3088,15 +3257,18 @@ TEST(YogaTest, align_content_stretch_row_with_flex_no_shrink) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 0); @@ -3104,16 +3276,19 @@ TEST(YogaTest, align_content_stretch_row_with_flex_no_shrink) { YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child3, 1); YGNodeStyleSetFlexBasisPercent(root_child3, 0); YGNodeStyleSetWidth(root_child3, 50); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 50); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -3192,15 +3367,18 @@ TEST(YogaTest, align_content_stretch_row_with_margin) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child1, YGEdgeLeft, 10); YGNodeStyleSetMargin(root_child1, YGEdgeTop, 10); YGNodeStyleSetMargin(root_child1, YGEdgeRight, 10); @@ -3209,10 +3387,12 @@ TEST(YogaTest, align_content_stretch_row_with_margin) { YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child3, YGEdgeLeft, 10); YGNodeStyleSetMargin(root_child3, YGEdgeTop, 10); YGNodeStyleSetMargin(root_child3, YGEdgeRight, 10); @@ -3221,6 +3401,7 @@ TEST(YogaTest, align_content_stretch_row_with_margin) { YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 50); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -3299,15 +3480,18 @@ TEST(YogaTest, align_content_stretch_row_with_padding) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetPadding(root_child1, YGEdgeLeft, 10); YGNodeStyleSetPadding(root_child1, YGEdgeTop, 10); YGNodeStyleSetPadding(root_child1, YGEdgeRight, 10); @@ -3316,10 +3500,12 @@ TEST(YogaTest, align_content_stretch_row_with_padding) { YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetPadding(root_child3, YGEdgeLeft, 10); YGNodeStyleSetPadding(root_child3, YGEdgeTop, 10); YGNodeStyleSetPadding(root_child3, YGEdgeRight, 10); @@ -3328,6 +3514,7 @@ TEST(YogaTest, align_content_stretch_row_with_padding) { YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 50); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -3406,15 +3593,18 @@ TEST(YogaTest, align_content_stretch_row_with_single_row) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -3463,28 +3653,34 @@ TEST(YogaTest, align_content_stretch_row_with_fixed_height) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 60); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 50); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 50); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -3563,28 +3759,34 @@ TEST(YogaTest, align_content_stretch_row_with_max_height) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetMaxHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 50); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 50); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -3663,28 +3865,34 @@ TEST(YogaTest, align_content_stretch_row_with_min_height) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetMinHeight(root_child1, 80); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 50); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 50); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -3762,21 +3970,25 @@ TEST(YogaTest, align_content_stretch_column) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 150); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeStyleSetFlexShrink(root_child0_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0_child0, 0); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 0); @@ -3784,14 +3996,17 @@ TEST(YogaTest, align_content_stretch_column) { YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child2, 50); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child3, 50); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child4, 50); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -3879,17 +4094,20 @@ TEST(YogaTest, align_content_stretch_is_not_overriding_align_items) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root_child0, YGAlignStretch); YGNodeStyleSetAlignItems(root_child0, YGAlignCenter); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignContent(root_child0_child0, YGAlignStretch); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); diff --git a/tests/generated/YGAlignItemsTest.cpp b/tests/generated/YGAlignItemsTest.cpp index 385c516c..08a55986 100644 --- a/tests/generated/YGAlignItemsTest.cpp +++ b/tests/generated/YGAlignItemsTest.cpp @@ -16,10 +16,12 @@ TEST(YogaTest, align_items_stretch) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -57,10 +59,12 @@ TEST(YogaTest, align_items_center) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -99,10 +103,12 @@ TEST(YogaTest, align_items_flex_start) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignFlexStart); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -141,10 +147,12 @@ TEST(YogaTest, align_items_flex_end) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -184,15 +192,18 @@ TEST(YogaTest, align_baseline) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); @@ -242,20 +253,24 @@ TEST(YogaTest, align_baseline_child) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child0, 50); YGNodeStyleSetHeight(root_child1_child0, 10); YGNodeInsertChild(root_child1, root_child1_child0, 0); @@ -315,37 +330,44 @@ TEST(YogaTest, align_baseline_child_multiline) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 60); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child1, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child1, YGWrapWrap); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 25); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child0, 25); YGNodeStyleSetHeight(root_child1_child0, 20); YGNodeInsertChild(root_child1, root_child1_child0, 0); const YGNodeRef root_child1_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child1, 25); YGNodeStyleSetHeight(root_child1_child1, 10); YGNodeInsertChild(root_child1, root_child1_child1, 1); const YGNodeRef root_child1_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child2, 25); YGNodeStyleSetHeight(root_child1_child2, 20); YGNodeInsertChild(root_child1, root_child1_child2, 2); const YGNodeRef root_child1_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child3, 25); YGNodeStyleSetHeight(root_child1_child3, 10); YGNodeInsertChild(root_child1, root_child1_child3, 3); @@ -435,39 +457,46 @@ TEST(YogaTest, align_baseline_child_multiline_override) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 60); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child1, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child1, YGWrapWrap); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 25); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child0, 25); YGNodeStyleSetHeight(root_child1_child0, 20); YGNodeInsertChild(root_child1, root_child1_child0, 0); const YGNodeRef root_child1_child1 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignSelf(root_child1_child1, YGAlignBaseline); + YGNodeStyleSetPositionType(root_child1_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child1, 25); YGNodeStyleSetHeight(root_child1_child1, 10); YGNodeInsertChild(root_child1, root_child1_child1, 1); const YGNodeRef root_child1_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child2, 25); YGNodeStyleSetHeight(root_child1_child2, 20); YGNodeInsertChild(root_child1, root_child1_child2, 2); const YGNodeRef root_child1_child3 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignSelf(root_child1_child3, YGAlignBaseline); + YGNodeStyleSetPositionType(root_child1_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child3, 25); YGNodeStyleSetHeight(root_child1_child3, 10); YGNodeInsertChild(root_child1, root_child1_child3, 3); @@ -557,38 +586,45 @@ TEST(YogaTest, align_baseline_child_multiline_no_override_on_secondline) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 60); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child1, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child1, YGWrapWrap); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 25); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child0, 25); YGNodeStyleSetHeight(root_child1_child0, 20); YGNodeInsertChild(root_child1, root_child1_child0, 0); const YGNodeRef root_child1_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child1, 25); YGNodeStyleSetHeight(root_child1_child1, 10); YGNodeInsertChild(root_child1, root_child1_child1, 1); const YGNodeRef root_child1_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child2, 25); YGNodeStyleSetHeight(root_child1_child2, 20); YGNodeInsertChild(root_child1, root_child1_child2, 2); const YGNodeRef root_child1_child3 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignSelf(root_child1_child3, YGAlignBaseline); + YGNodeStyleSetPositionType(root_child1_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child3, 25); YGNodeStyleSetHeight(root_child1_child3, 10); YGNodeInsertChild(root_child1, root_child1_child3, 3); @@ -678,21 +714,25 @@ TEST(YogaTest, align_baseline_child_top) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetPosition(root_child0, YGEdgeTop, 10); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child0, 50); YGNodeStyleSetHeight(root_child1_child0, 10); YGNodeInsertChild(root_child1, root_child1_child0, 0); @@ -752,21 +792,25 @@ TEST(YogaTest, align_baseline_child_top2) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetPosition(root_child1, YGEdgeTop, 5); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child0, 50); YGNodeStyleSetHeight(root_child1_child0, 10); YGNodeInsertChild(root_child1, root_child1_child0, 0); @@ -826,25 +870,30 @@ TEST(YogaTest, align_baseline_double_nested_child) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0, 20); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child0, 50); YGNodeStyleSetHeight(root_child1_child0, 15); YGNodeInsertChild(root_child1, root_child1_child0, 0); @@ -913,15 +962,18 @@ TEST(YogaTest, align_baseline_column) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); @@ -971,10 +1023,12 @@ TEST(YogaTest, align_baseline_child_margin) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 5); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5); YGNodeStyleSetMargin(root_child0, YGEdgeRight, 5); @@ -984,11 +1038,13 @@ TEST(YogaTest, align_baseline_child_margin) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child0, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child1_child0, YGEdgeLeft, 1); YGNodeStyleSetMargin(root_child1_child0, YGEdgeTop, 1); YGNodeStyleSetMargin(root_child1_child0, YGEdgeRight, 1); @@ -1052,6 +1108,7 @@ TEST(YogaTest, align_baseline_child_padding) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetPadding(root, YGEdgeLeft, 5); YGNodeStyleSetPadding(root, YGEdgeTop, 5); YGNodeStyleSetPadding(root, YGEdgeRight, 5); @@ -1060,11 +1117,13 @@ TEST(YogaTest, align_baseline_child_padding) { YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetPadding(root_child1, YGEdgeLeft, 5); YGNodeStyleSetPadding(root_child1, YGEdgeTop, 5); YGNodeStyleSetPadding(root_child1, YGEdgeRight, 5); @@ -1074,6 +1133,7 @@ TEST(YogaTest, align_baseline_child_padding) { YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child0, 50); YGNodeStyleSetHeight(root_child1_child0, 10); YGNodeInsertChild(root_child1, root_child1_child0, 0); @@ -1133,36 +1193,43 @@ TEST(YogaTest, align_baseline_multiline) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child0, 50); YGNodeStyleSetHeight(root_child1_child0, 10); YGNodeInsertChild(root_child1, root_child1_child0, 0); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeStyleSetHeight(root_child2, 20); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child2_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2_child0, 50); YGNodeStyleSetHeight(root_child2_child0, 10); YGNodeInsertChild(root_child2, root_child2_child0, 0); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 50); YGNodeStyleSetHeight(root_child3, 50); YGNodeInsertChild(root, root_child3, 3); @@ -1253,36 +1320,43 @@ TEST(YogaTest, align_baseline_multiline_column) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child0, 20); YGNodeStyleSetHeight(root_child1_child0, 20); YGNodeInsertChild(root_child1, root_child1_child0, 0); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 40); YGNodeStyleSetHeight(root_child2, 70); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child2_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2_child0, 10); YGNodeStyleSetHeight(root_child2_child0, 10); YGNodeInsertChild(root_child2, root_child2_child0, 0); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 50); YGNodeStyleSetHeight(root_child3, 20); YGNodeInsertChild(root, root_child3, 3); @@ -1373,36 +1447,43 @@ TEST(YogaTest, align_baseline_multiline_column2) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child0, 20); YGNodeStyleSetHeight(root_child1_child0, 20); YGNodeInsertChild(root_child1, root_child1_child0, 0); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 40); YGNodeStyleSetHeight(root_child2, 70); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child2_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2_child0, 10); YGNodeStyleSetHeight(root_child2_child0, 10); YGNodeInsertChild(root_child2, root_child2_child0, 0); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 50); YGNodeStyleSetHeight(root_child3, 20); YGNodeInsertChild(root, root_child3, 3); @@ -1492,36 +1573,43 @@ TEST(YogaTest, align_baseline_multiline_row_and_column) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child0, 50); YGNodeStyleSetHeight(root_child1_child0, 10); YGNodeInsertChild(root_child1, root_child1_child0, 0); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeStyleSetHeight(root_child2, 20); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child2_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2_child0, 50); YGNodeStyleSetHeight(root_child2_child0, 10); YGNodeInsertChild(root_child2, root_child2_child0, 0); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 50); YGNodeStyleSetHeight(root_child3, 20); YGNodeInsertChild(root, root_child3, 3); @@ -1611,14 +1699,17 @@ TEST(YogaTest, align_items_center_child_with_margin_bigger_than_parent) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 52); YGNodeStyleSetHeight(root, 52); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root_child0, YGAlignCenter); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 10); YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 10); YGNodeStyleSetWidth(root_child0_child0, 52); @@ -1670,14 +1761,17 @@ TEST(YogaTest, align_items_flex_end_child_with_margin_bigger_than_parent) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 52); YGNodeStyleSetHeight(root, 52); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root_child0, YGAlignFlexEnd); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 10); YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 10); YGNodeStyleSetWidth(root_child0_child0, 52); @@ -1729,14 +1823,17 @@ TEST(YogaTest, align_items_center_child_without_margin_bigger_than_parent) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 52); YGNodeStyleSetHeight(root, 52); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root_child0, YGAlignCenter); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 72); YGNodeStyleSetHeight(root_child0_child0, 72); YGNodeInsertChild(root_child0, root_child0_child0, 0); @@ -1786,14 +1883,17 @@ TEST(YogaTest, align_items_flex_end_child_without_margin_bigger_than_parent) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 52); YGNodeStyleSetHeight(root, 52); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root_child0, YGAlignFlexEnd); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 72); YGNodeStyleSetHeight(root_child0_child0, 72); YGNodeInsertChild(root_child0, root_child0_child0, 0); @@ -1842,21 +1942,25 @@ TEST(YogaTest, align_center_should_size_based_on_content) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMargin(root, YGEdgeTop, 20); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeStyleSetFlexShrink(root_child0_child0, 1); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0_child0, 20); YGNodeStyleSetHeight(root_child0_child0_child0, 20); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); @@ -1914,21 +2018,25 @@ TEST(YogaTest, align_stretch_should_size_based_on_parent) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMargin(root, YGEdgeTop, 20); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeStyleSetFlexShrink(root_child0_child0, 1); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0_child0, 20); YGNodeStyleSetHeight(root_child0_child0_child0, 20); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); @@ -1986,19 +2094,23 @@ TEST(YogaTest, align_flex_start_with_shrinking_children) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 500); YGNodeStyleSetHeight(root, 500); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root_child0, YGAlignFlexStart); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeStyleSetFlexShrink(root_child0_child0, 1); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0_child0, 1); YGNodeStyleSetFlexShrink(root_child0_child0_child0, 1); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); @@ -2056,18 +2168,22 @@ TEST(YogaTest, align_flex_start_with_stretching_children) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 500); YGNodeStyleSetHeight(root, 500); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeStyleSetFlexShrink(root_child0_child0, 1); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0_child0, 1); YGNodeStyleSetFlexShrink(root_child0_child0_child0, 1); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); @@ -2125,19 +2241,23 @@ TEST(YogaTest, align_flex_start_with_shrinking_children_with_stretch) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 500); YGNodeStyleSetHeight(root, 500); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root_child0, YGAlignFlexStart); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeStyleSetFlexShrink(root_child0_child0, 1); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0_child0, 1); YGNodeStyleSetFlexShrink(root_child0_child0_child0, 1); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); diff --git a/tests/generated/YGAlignSelfTest.cpp b/tests/generated/YGAlignSelfTest.cpp index dc8443ca..794242f5 100644 --- a/tests/generated/YGAlignSelfTest.cpp +++ b/tests/generated/YGAlignSelfTest.cpp @@ -16,11 +16,13 @@ TEST(YogaTest, align_self_center) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignSelf(root_child0, YGAlignCenter); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -58,11 +60,13 @@ TEST(YogaTest, align_self_flex_end) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexEnd); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -100,11 +104,13 @@ TEST(YogaTest, align_self_flex_start) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexStart); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -143,11 +149,13 @@ TEST(YogaTest, align_self_flex_end_override_flex_start) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignFlexStart); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexEnd); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -186,22 +194,26 @@ TEST(YogaTest, align_self_baseline) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignSelf(root_child0, YGAlignBaseline); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignSelf(root_child1, YGAlignBaseline); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1_child0, 50); YGNodeStyleSetHeight(root_child1_child0, 10); YGNodeInsertChild(root_child1, root_child1_child0, 0); diff --git a/tests/generated/YGAndroidNewsFeed.cpp b/tests/generated/YGAndroidNewsFeed.cpp index 2581a278..f62fae2f 100644 --- a/tests/generated/YGAndroidNewsFeed.cpp +++ b/tests/generated/YGAndroidNewsFeed.cpp @@ -17,23 +17,28 @@ TEST(YogaTest, android_news_feed) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 1080); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignContent(root_child0_child0, YGAlignStretch); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignContent(root_child0_child0_child0, YGAlignStretch); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); const YGNodeRef root_child0_child0_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0_child0_child0_child0, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root_child0_child0_child0_child0, YGAlignStretch); YGNodeStyleSetAlignItems(root_child0_child0_child0_child0, YGAlignFlexStart); + YGNodeStyleSetPositionType(root_child0_child0_child0_child0, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeStart, 36); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeTop, 24); YGNodeInsertChild(root_child0_child0_child0, root_child0_child0_child0_child0, 0); @@ -41,16 +46,19 @@ TEST(YogaTest, android_news_feed) { const YGNodeRef root_child0_child0_child0_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0_child0_child0_child0_child0, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root_child0_child0_child0_child0_child0, YGAlignStretch); + YGNodeStyleSetPositionType(root_child0_child0_child0_child0_child0, YGPositionTypeRelative); YGNodeInsertChild(root_child0_child0_child0_child0, root_child0_child0_child0_child0_child0, 0); const YGNodeRef root_child0_child0_child0_child0_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignContent(root_child0_child0_child0_child0_child0_child0, YGAlignStretch); + YGNodeStyleSetPositionType(root_child0_child0_child0_child0_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0_child0_child0_child0_child0, 120); YGNodeStyleSetHeight(root_child0_child0_child0_child0_child0_child0, 120); YGNodeInsertChild(root_child0_child0_child0_child0_child0, root_child0_child0_child0_child0_child0_child0, 0); const YGNodeRef root_child0_child0_child0_child0_child1 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignContent(root_child0_child0_child0_child0_child1, YGAlignStretch); + YGNodeStyleSetPositionType(root_child0_child0_child0_child0_child1, YGPositionTypeRelative); YGNodeStyleSetFlexShrink(root_child0_child0_child0_child0_child1, 1); YGNodeStyleSetMargin(root_child0_child0_child0_child0_child1, YGEdgeRight, 36); YGNodeStyleSetPadding(root_child0_child0_child0_child0_child1, YGEdgeLeft, 36); @@ -62,22 +70,26 @@ TEST(YogaTest, android_news_feed) { const YGNodeRef root_child0_child0_child0_child0_child1_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0_child0_child0_child0_child1_child0, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root_child0_child0_child0_child0_child1_child0, YGAlignStretch); + YGNodeStyleSetPositionType(root_child0_child0_child0_child0_child1_child0, YGPositionTypeRelative); YGNodeStyleSetFlexShrink(root_child0_child0_child0_child0_child1_child0, 1); YGNodeInsertChild(root_child0_child0_child0_child0_child1, root_child0_child0_child0_child0_child1_child0, 0); const YGNodeRef root_child0_child0_child0_child0_child1_child1 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignContent(root_child0_child0_child0_child0_child1_child1, YGAlignStretch); + YGNodeStyleSetPositionType(root_child0_child0_child0_child0_child1_child1, YGPositionTypeRelative); YGNodeStyleSetFlexShrink(root_child0_child0_child0_child0_child1_child1, 1); YGNodeInsertChild(root_child0_child0_child0_child0_child1, root_child0_child0_child0_child0_child1_child1, 1); const YGNodeRef root_child0_child0_child1 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignContent(root_child0_child0_child1, YGAlignStretch); + YGNodeStyleSetPositionType(root_child0_child0_child1, YGPositionTypeRelative); YGNodeInsertChild(root_child0_child0, root_child0_child0_child1, 1); const YGNodeRef root_child0_child0_child1_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0_child0_child1_child0, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root_child0_child0_child1_child0, YGAlignStretch); YGNodeStyleSetAlignItems(root_child0_child0_child1_child0, YGAlignFlexStart); + YGNodeStyleSetPositionType(root_child0_child0_child1_child0, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeStart, 174); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeTop, 24); YGNodeInsertChild(root_child0_child0_child1, root_child0_child0_child1_child0, 0); @@ -85,16 +97,19 @@ TEST(YogaTest, android_news_feed) { const YGNodeRef root_child0_child0_child1_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0_child0_child1_child0_child0, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root_child0_child0_child1_child0_child0, YGAlignStretch); + YGNodeStyleSetPositionType(root_child0_child0_child1_child0_child0, YGPositionTypeRelative); YGNodeInsertChild(root_child0_child0_child1_child0, root_child0_child0_child1_child0_child0, 0); const YGNodeRef root_child0_child0_child1_child0_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignContent(root_child0_child0_child1_child0_child0_child0, YGAlignStretch); + YGNodeStyleSetPositionType(root_child0_child0_child1_child0_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0_child1_child0_child0_child0, 72); YGNodeStyleSetHeight(root_child0_child0_child1_child0_child0_child0, 72); YGNodeInsertChild(root_child0_child0_child1_child0_child0, root_child0_child0_child1_child0_child0_child0, 0); const YGNodeRef root_child0_child0_child1_child0_child1 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignContent(root_child0_child0_child1_child0_child1, YGAlignStretch); + YGNodeStyleSetPositionType(root_child0_child0_child1_child0_child1, YGPositionTypeRelative); YGNodeStyleSetFlexShrink(root_child0_child0_child1_child0_child1, 1); YGNodeStyleSetMargin(root_child0_child0_child1_child0_child1, YGEdgeRight, 36); YGNodeStyleSetPadding(root_child0_child0_child1_child0_child1, YGEdgeLeft, 36); @@ -106,11 +121,13 @@ TEST(YogaTest, android_news_feed) { const YGNodeRef root_child0_child0_child1_child0_child1_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0_child0_child1_child0_child1_child0, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root_child0_child0_child1_child0_child1_child0, YGAlignStretch); + YGNodeStyleSetPositionType(root_child0_child0_child1_child0_child1_child0, YGPositionTypeRelative); YGNodeStyleSetFlexShrink(root_child0_child0_child1_child0_child1_child0, 1); YGNodeInsertChild(root_child0_child0_child1_child0_child1, root_child0_child0_child1_child0_child1_child0, 0); const YGNodeRef root_child0_child0_child1_child0_child1_child1 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignContent(root_child0_child0_child1_child0_child1_child1, YGAlignStretch); + YGNodeStyleSetPositionType(root_child0_child0_child1_child0_child1_child1, YGPositionTypeRelative); YGNodeStyleSetFlexShrink(root_child0_child0_child1_child0_child1_child1, 1); YGNodeInsertChild(root_child0_child0_child1_child0_child1, root_child0_child0_child1_child0_child1_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); diff --git a/tests/generated/YGAspectRatioTest.cpp b/tests/generated/YGAspectRatioTest.cpp index 3e823b32..040492e1 100644 --- a/tests/generated/YGAspectRatioTest.cpp +++ b/tests/generated/YGAspectRatioTest.cpp @@ -18,10 +18,12 @@ TEST(YogaTest, aspect_ratio_does_not_stretch_cross_axis_dim) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 300); YGNodeStyleSetHeight(root, 300); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetOverflow(root_child0, YGOverflowScroll); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexShrink(root_child0, 1); @@ -30,9 +32,11 @@ TEST(YogaTest, aspect_ratio_does_not_stretch_cross_axis_dim) { const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0_child0, 2); YGNodeStyleSetFlexShrink(root_child0_child0_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0_child0_child0, 0); @@ -40,16 +44,19 @@ TEST(YogaTest, aspect_ratio_does_not_stretch_cross_axis_dim) { YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); const YGNodeRef root_child0_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0_child1, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child1, 1); const YGNodeRef root_child0_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0_child2, 1); YGNodeStyleSetFlexShrink(root_child0_child0_child2, 1); YGNodeStyleSetFlexBasisPercent(root_child0_child0_child2, 0); YGNodeInsertChild(root_child0_child0, root_child0_child0_child2, 2); const YGNodeRef root_child0_child0_child2_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child2_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0_child2_child0, 1); YGNodeStyleSetFlexShrink(root_child0_child0_child2_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0_child0_child2_child0, 0); @@ -57,10 +64,12 @@ TEST(YogaTest, aspect_ratio_does_not_stretch_cross_axis_dim) { YGNodeInsertChild(root_child0_child0_child2, root_child0_child0_child2_child0, 0); const YGNodeRef root_child0_child0_child2_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child2_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0_child2_child0_child0, 5); YGNodeInsertChild(root_child0_child0_child2_child0, root_child0_child0_child2_child0_child0, 0); const YGNodeRef root_child0_child0_child2_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child2_child0_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0_child2_child0_child1, 1); YGNodeStyleSetFlexShrink(root_child0_child0_child2_child0_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child0_child0_child2_child0_child1, 0); @@ -80,28 +89,28 @@ TEST(YogaTest, aspect_ratio_does_not_stretch_cross_axis_dim) { ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); - ASSERT_FLOAT_EQ(285, YGNodeLayoutGetWidth(root_child0_child0)); - ASSERT_FLOAT_EQ(187, YGNodeLayoutGetHeight(root_child0_child0)); + ASSERT_FLOAT_EQ(300, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(197, YGNodeLayoutGetHeight(root_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); - ASSERT_FLOAT_EQ(187, YGNodeLayoutGetWidth(root_child0_child0_child0)); - ASSERT_FLOAT_EQ(187, YGNodeLayoutGetHeight(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(197, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(197, YGNodeLayoutGetHeight(root_child0_child0_child0)); - ASSERT_FLOAT_EQ(187, YGNodeLayoutGetLeft(root_child0_child0_child1)); + ASSERT_FLOAT_EQ(197, YGNodeLayoutGetLeft(root_child0_child0_child1)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child1)); ASSERT_FLOAT_EQ(5, YGNodeLayoutGetWidth(root_child0_child0_child1)); - ASSERT_FLOAT_EQ(187, YGNodeLayoutGetHeight(root_child0_child0_child1)); + ASSERT_FLOAT_EQ(197, YGNodeLayoutGetHeight(root_child0_child0_child1)); - ASSERT_FLOAT_EQ(192, YGNodeLayoutGetLeft(root_child0_child0_child2)); + ASSERT_FLOAT_EQ(202, YGNodeLayoutGetLeft(root_child0_child0_child2)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child2)); - ASSERT_FLOAT_EQ(93, YGNodeLayoutGetWidth(root_child0_child0_child2)); - ASSERT_FLOAT_EQ(187, YGNodeLayoutGetHeight(root_child0_child0_child2)); + ASSERT_FLOAT_EQ(98, YGNodeLayoutGetWidth(root_child0_child0_child2)); + ASSERT_FLOAT_EQ(197, YGNodeLayoutGetHeight(root_child0_child0_child2)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child2_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child2_child0)); - ASSERT_FLOAT_EQ(93, YGNodeLayoutGetWidth(root_child0_child0_child2_child0)); - ASSERT_FLOAT_EQ(187, YGNodeLayoutGetHeight(root_child0_child0_child2_child0)); + ASSERT_FLOAT_EQ(98, YGNodeLayoutGetWidth(root_child0_child0_child2_child0)); + ASSERT_FLOAT_EQ(197, YGNodeLayoutGetHeight(root_child0_child0_child2_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child2_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child2_child0_child0)); @@ -110,8 +119,8 @@ TEST(YogaTest, aspect_ratio_does_not_stretch_cross_axis_dim) { ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child2_child0_child1)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child2_child0_child1)); - ASSERT_FLOAT_EQ(93, YGNodeLayoutGetWidth(root_child0_child0_child2_child0_child1)); - ASSERT_FLOAT_EQ(187, YGNodeLayoutGetHeight(root_child0_child0_child2_child0_child1)); + ASSERT_FLOAT_EQ(98, YGNodeLayoutGetWidth(root_child0_child0_child2_child0_child1)); + ASSERT_FLOAT_EQ(197, YGNodeLayoutGetHeight(root_child0_child0_child2_child0_child1)); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); @@ -125,40 +134,40 @@ TEST(YogaTest, aspect_ratio_does_not_stretch_cross_axis_dim) { ASSERT_FLOAT_EQ(300, YGNodeLayoutGetWidth(root_child0)); ASSERT_FLOAT_EQ(300, YGNodeLayoutGetHeight(root_child0)); - ASSERT_FLOAT_EQ(30, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); - ASSERT_FLOAT_EQ(285, YGNodeLayoutGetWidth(root_child0_child0)); - ASSERT_FLOAT_EQ(187, YGNodeLayoutGetHeight(root_child0_child0)); + ASSERT_FLOAT_EQ(300, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(197, YGNodeLayoutGetHeight(root_child0_child0)); - ASSERT_FLOAT_EQ(98, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(103, YGNodeLayoutGetLeft(root_child0_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); - ASSERT_FLOAT_EQ(187, YGNodeLayoutGetWidth(root_child0_child0_child0)); - ASSERT_FLOAT_EQ(187, YGNodeLayoutGetHeight(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(197, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(197, YGNodeLayoutGetHeight(root_child0_child0_child0)); - ASSERT_FLOAT_EQ(93, YGNodeLayoutGetLeft(root_child0_child0_child1)); + ASSERT_FLOAT_EQ(98, YGNodeLayoutGetLeft(root_child0_child0_child1)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child1)); ASSERT_FLOAT_EQ(5, YGNodeLayoutGetWidth(root_child0_child0_child1)); - ASSERT_FLOAT_EQ(187, YGNodeLayoutGetHeight(root_child0_child0_child1)); + ASSERT_FLOAT_EQ(197, YGNodeLayoutGetHeight(root_child0_child0_child1)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child2)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child2)); - ASSERT_FLOAT_EQ(93, YGNodeLayoutGetWidth(root_child0_child0_child2)); - ASSERT_FLOAT_EQ(187, YGNodeLayoutGetHeight(root_child0_child0_child2)); + ASSERT_FLOAT_EQ(98, YGNodeLayoutGetWidth(root_child0_child0_child2)); + ASSERT_FLOAT_EQ(197, YGNodeLayoutGetHeight(root_child0_child0_child2)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child2_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child2_child0)); - ASSERT_FLOAT_EQ(93, YGNodeLayoutGetWidth(root_child0_child0_child2_child0)); - ASSERT_FLOAT_EQ(187, YGNodeLayoutGetHeight(root_child0_child0_child2_child0)); + ASSERT_FLOAT_EQ(98, YGNodeLayoutGetWidth(root_child0_child0_child2_child0)); + ASSERT_FLOAT_EQ(197, YGNodeLayoutGetHeight(root_child0_child0_child2_child0)); - ASSERT_FLOAT_EQ(88, YGNodeLayoutGetLeft(root_child0_child0_child2_child0_child0)); + ASSERT_FLOAT_EQ(93, YGNodeLayoutGetLeft(root_child0_child0_child2_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child2_child0_child0)); ASSERT_FLOAT_EQ(5, YGNodeLayoutGetWidth(root_child0_child0_child2_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetHeight(root_child0_child0_child2_child0_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child2_child0_child1)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child2_child0_child1)); - ASSERT_FLOAT_EQ(93, YGNodeLayoutGetWidth(root_child0_child0_child2_child0_child1)); - ASSERT_FLOAT_EQ(187, YGNodeLayoutGetHeight(root_child0_child0_child2_child0_child1)); + ASSERT_FLOAT_EQ(98, YGNodeLayoutGetWidth(root_child0_child0_child2_child0_child1)); + ASSERT_FLOAT_EQ(197, YGNodeLayoutGetHeight(root_child0_child0_child2_child0_child1)); YGNodeFreeRecursive(root); diff --git a/tests/generated/YGBorderTest.cpp b/tests/generated/YGBorderTest.cpp index 5ac82bec..28019ae2 100644 --- a/tests/generated/YGBorderTest.cpp +++ b/tests/generated/YGBorderTest.cpp @@ -16,6 +16,7 @@ TEST(YogaTest, border_no_size) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeLeft, 10); YGNodeStyleSetBorder(root, YGEdgeTop, 10); YGNodeStyleSetBorder(root, YGEdgeRight, 10); @@ -44,12 +45,14 @@ TEST(YogaTest, border_container_match_child) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeLeft, 10); YGNodeStyleSetBorder(root, YGEdgeTop, 10); YGNodeStyleSetBorder(root, YGEdgeRight, 10); YGNodeStyleSetBorder(root, YGEdgeBottom, 10); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -87,6 +90,7 @@ TEST(YogaTest, border_flex_child) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeLeft, 10); YGNodeStyleSetBorder(root, YGEdgeTop, 10); YGNodeStyleSetBorder(root, YGEdgeRight, 10); @@ -95,6 +99,7 @@ TEST(YogaTest, border_flex_child) { YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -132,6 +137,7 @@ TEST(YogaTest, border_stretch_child) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeLeft, 10); YGNodeStyleSetBorder(root, YGEdgeTop, 10); YGNodeStyleSetBorder(root, YGEdgeRight, 10); @@ -140,6 +146,7 @@ TEST(YogaTest, border_stretch_child) { YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -178,6 +185,7 @@ TEST(YogaTest, border_center_child) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeStart, 10); YGNodeStyleSetBorder(root, YGEdgeEnd, 20); YGNodeStyleSetBorder(root, YGEdgeBottom, 20); @@ -185,6 +193,7 @@ TEST(YogaTest, border_center_child) { YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); diff --git a/tests/generated/YGDimensionTest.cpp b/tests/generated/YGDimensionTest.cpp index 75221f3c..cdbe2a7a 100644 --- a/tests/generated/YGDimensionTest.cpp +++ b/tests/generated/YGDimensionTest.cpp @@ -16,8 +16,10 @@ TEST(YogaTest, wrap_child) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); @@ -55,11 +57,14 @@ TEST(YogaTest, wrap_grandchild) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); YGNodeInsertChild(root_child0, root_child0_child0, 0); diff --git a/tests/generated/YGDisplayTest.cpp b/tests/generated/YGDisplayTest.cpp index dd230ca1..6467bd4c 100644 --- a/tests/generated/YGDisplayTest.cpp +++ b/tests/generated/YGDisplayTest.cpp @@ -17,14 +17,17 @@ TEST(YogaTest, display_none) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetDisplay(root_child1, YGDisplayNone); YGNodeInsertChild(root, root_child1, 1); @@ -73,14 +76,17 @@ TEST(YogaTest, display_none_fixed_size) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 20); YGNodeStyleSetHeight(root_child1, 20); YGNodeStyleSetDisplay(root_child1, YGDisplayNone); @@ -130,10 +136,12 @@ TEST(YogaTest, display_none_with_margin) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 10); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10); YGNodeStyleSetMargin(root_child0, YGEdgeRight, 10); @@ -144,6 +152,7 @@ TEST(YogaTest, display_none_with_margin) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -191,16 +200,19 @@ TEST(YogaTest, display_none_with_child) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 0); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 0); @@ -208,6 +220,7 @@ TEST(YogaTest, display_none_with_child) { YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1_child0, 1); YGNodeStyleSetFlexShrink(root_child1_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child1_child0, 0); @@ -215,6 +228,7 @@ TEST(YogaTest, display_none_with_child) { YGNodeInsertChild(root_child1, root_child1_child0, 0); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetFlexShrink(root_child2, 1); YGNodeStyleSetFlexBasisPercent(root_child2, 0); @@ -284,14 +298,17 @@ TEST(YogaTest, display_none_with_position) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetPosition(root_child1, YGEdgeTop, 10); YGNodeStyleSetDisplay(root_child1, YGDisplayNone); @@ -340,6 +357,7 @@ TEST(YogaTest, display_none_with_position_absolute) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); diff --git a/tests/generated/YGFlexDirectionTest.cpp b/tests/generated/YGFlexDirectionTest.cpp index 789c0b80..703e5724 100644 --- a/tests/generated/YGFlexDirectionTest.cpp +++ b/tests/generated/YGFlexDirectionTest.cpp @@ -16,17 +16,21 @@ TEST(YogaTest, flex_direction_column_no_height) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -84,17 +88,21 @@ TEST(YogaTest, flex_direction_row_no_width) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -151,18 +159,22 @@ TEST(YogaTest, flex_direction_column) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -220,18 +232,22 @@ TEST(YogaTest, flex_direction_row) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -289,18 +305,22 @@ TEST(YogaTest, flex_direction_column_reverse) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -358,18 +378,22 @@ TEST(YogaTest, flex_direction_row_reverse) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -427,19 +451,23 @@ TEST(YogaTest, flex_direction_row_reverse_margin_left) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMargin(root, YGEdgeLeft, 100); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -497,19 +525,23 @@ TEST(YogaTest, flex_direction_row_reverse_margin_start) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMargin(root, YGEdgeStart, 100); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -567,19 +599,23 @@ TEST(YogaTest, flex_direction_row_reverse_margin_right) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMargin(root, YGEdgeRight, 100); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -637,19 +673,23 @@ TEST(YogaTest, flex_direction_row_reverse_margin_end) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMargin(root, YGEdgeEnd, 100); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -707,19 +747,23 @@ TEST(YogaTest, flex_direction_column_reverse_margin_top) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMargin(root, YGEdgeTop, 100); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -777,19 +821,23 @@ TEST(YogaTest, flex_direction_column_reverse_margin_bottom) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMargin(root, YGEdgeBottom, 100); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -847,19 +895,23 @@ TEST(YogaTest, flex_direction_row_reverse_padding_left) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetPadding(root, YGEdgeLeft, 100); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -917,19 +969,23 @@ TEST(YogaTest, flex_direction_row_reverse_padding_start) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetPadding(root, YGEdgeStart, 100); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -987,19 +1043,23 @@ TEST(YogaTest, flex_direction_row_reverse_padding_right) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetPadding(root, YGEdgeRight, 100); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1057,19 +1117,23 @@ TEST(YogaTest, flex_direction_row_reverse_padding_end) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetPadding(root, YGEdgeEnd, 100); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1127,19 +1191,23 @@ TEST(YogaTest, flex_direction_column_reverse_padding_top) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetPadding(root, YGEdgeTop, 100); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1197,19 +1265,23 @@ TEST(YogaTest, flex_direction_column_reverse_padding_bottom) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetPadding(root, YGEdgeBottom, 100); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1267,19 +1339,23 @@ TEST(YogaTest, flex_direction_row_reverse_border_left) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeLeft, 100); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1337,19 +1413,23 @@ TEST(YogaTest, flex_direction_row_reverse_border_start) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeStart, 100); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1407,19 +1487,23 @@ TEST(YogaTest, flex_direction_row_reverse_border_right) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeRight, 100); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1477,19 +1561,23 @@ TEST(YogaTest, flex_direction_row_reverse_border_end) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeEnd, 100); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1547,19 +1635,23 @@ TEST(YogaTest, flex_direction_column_reverse_border_top) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeTop, 100); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1617,19 +1709,23 @@ TEST(YogaTest, flex_direction_column_reverse_border_bottom) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetBorder(root, YGEdgeBottom, 100); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1686,25 +1782,30 @@ TEST(YogaTest, flex_direction_row_reverse_pos_left) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 100); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child1, 10); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child2, 10); YGNodeInsertChild(root_child0, root_child0_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1771,25 +1872,30 @@ TEST(YogaTest, flex_direction_row_reverse_pos_start) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetPosition(root_child0, YGEdgeStart, 100); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child1, 10); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child2, 10); YGNodeInsertChild(root_child0, root_child0_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1856,25 +1962,30 @@ TEST(YogaTest, flex_direction_row_reverse_pos_right) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetPosition(root_child0, YGEdgeRight, 100); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child1, 10); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child2, 10); YGNodeInsertChild(root_child0, root_child0_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1941,25 +2052,30 @@ TEST(YogaTest, flex_direction_row_reverse_pos_end) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetPosition(root_child0, YGEdgeEnd, 100); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child1, 10); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child2, 10); YGNodeInsertChild(root_child0, root_child0_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2026,25 +2142,30 @@ TEST(YogaTest, flex_direction_column_reverse_pos_top) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetPosition(root_child0, YGEdgeTop, 100); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child1, 10); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child2, 10); YGNodeInsertChild(root_child0, root_child0_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2111,25 +2232,30 @@ TEST(YogaTest, flex_direction_column_reverse_pos_bottom) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetPosition(root_child0, YGEdgeBottom, 100); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child1, 10); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child2, 10); YGNodeInsertChild(root_child0, root_child0_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); diff --git a/tests/generated/YGFlexTest.cpp b/tests/generated/YGFlexTest.cpp index 263934a9..52e4a476 100644 --- a/tests/generated/YGFlexTest.cpp +++ b/tests/generated/YGFlexTest.cpp @@ -16,15 +16,18 @@ TEST(YogaTest, flex_basis_flex_grow_column) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -72,16 +75,19 @@ TEST(YogaTest, flex_shrink_flex_grow_row) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 500); YGNodeStyleSetHeight(root, 500); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetWidth(root_child0, 500); YGNodeStyleSetHeight(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetWidth(root_child1, 500); YGNodeStyleSetHeight(root_child1, 100); @@ -131,16 +137,19 @@ TEST(YogaTest, flex_shrink_flex_grow_child_flex_shrink_other_child) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 500); YGNodeStyleSetHeight(root, 500); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetWidth(root_child0, 500); YGNodeStyleSetHeight(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetWidth(root_child1, 500); @@ -191,15 +200,18 @@ TEST(YogaTest, flex_basis_flex_grow_row) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -246,15 +258,18 @@ TEST(YogaTest, flex_basis_flex_shrink_column) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexBasis(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -302,15 +317,18 @@ TEST(YogaTest, flex_basis_flex_shrink_row) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexBasis(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -357,20 +375,24 @@ TEST(YogaTest, flex_shrink_to_zero) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetHeight(root, 75); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeStyleSetHeight(root_child2, 50); YGNodeInsertChild(root, root_child2, 2); @@ -428,21 +450,25 @@ TEST(YogaTest, flex_basis_overrides_main_size) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 50); YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); @@ -500,13 +526,16 @@ TEST(YogaTest, flex_grow_shrink_at_most) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeStyleSetFlexShrink(root_child0_child0, 1); YGNodeInsertChild(root_child0, root_child0_child0, 0); @@ -554,19 +583,23 @@ TEST(YogaTest, flex_grow_less_than_factor_one) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 500); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 0.2f); YGNodeStyleSetFlexBasis(root_child0, 40); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 0.2f); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child2, 0.4f); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); diff --git a/tests/generated/YGFlexWrapTest.cpp b/tests/generated/YGFlexWrapTest.cpp index 6c2f7567..d519a019 100644 --- a/tests/generated/YGFlexWrapTest.cpp +++ b/tests/generated/YGFlexWrapTest.cpp @@ -16,25 +16,30 @@ TEST(YogaTest, wrap_column) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 30); YGNodeStyleSetHeight(root_child0, 30); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 30); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 30); YGNodeStyleSetHeight(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 30); YGNodeStyleSetHeight(root_child3, 30); YGNodeInsertChild(root, root_child3, 3); @@ -103,25 +108,30 @@ TEST(YogaTest, wrap_row) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 30); YGNodeStyleSetHeight(root_child0, 30); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 30); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 30); YGNodeStyleSetHeight(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 30); YGNodeStyleSetHeight(root_child3, 30); YGNodeInsertChild(root, root_child3, 3); @@ -191,25 +201,30 @@ TEST(YogaTest, wrap_row_align_items_flex_end) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 30); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 30); YGNodeStyleSetHeight(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 30); YGNodeStyleSetHeight(root_child3, 30); YGNodeInsertChild(root, root_child3, 3); @@ -279,25 +294,30 @@ TEST(YogaTest, wrap_row_align_items_center) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 30); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 30); YGNodeStyleSetHeight(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 30); YGNodeStyleSetHeight(root_child3, 30); YGNodeInsertChild(root, root_child3, 3); @@ -366,16 +386,19 @@ TEST(YogaTest, flex_wrap_children_with_min_main_overriding_flex_basis) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexBasis(root_child0, 50); YGNodeStyleSetMinWidth(root_child0, 55); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexBasis(root_child1, 50); YGNodeStyleSetMinWidth(root_child1, 55); YGNodeStyleSetHeight(root_child1, 50); @@ -424,23 +447,28 @@ TEST(YogaTest, flex_wrap_wrap_to_child_height) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeStyleSetAlignItems(root_child0, YGAlignFlexStart); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0_child0, 100); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 100); YGNodeStyleSetHeight(root_child1, 100); YGNodeInsertChild(root, root_child1, 1); @@ -509,15 +537,18 @@ TEST(YogaTest, flex_wrap_align_stretch_fits_one_row) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -565,30 +596,36 @@ TEST(YogaTest, wrap_reverse_row_align_content_flex_start) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeStyleSetWidth(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 30); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 30); YGNodeStyleSetHeight(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 30); YGNodeStyleSetHeight(root_child3, 40); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 30); YGNodeStyleSetHeight(root_child4, 50); YGNodeInsertChild(root, root_child4, 4); @@ -668,30 +705,36 @@ TEST(YogaTest, wrap_reverse_row_align_content_center) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeStyleSetWidth(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 30); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 30); YGNodeStyleSetHeight(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 30); YGNodeStyleSetHeight(root_child3, 40); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 30); YGNodeStyleSetHeight(root_child4, 50); YGNodeInsertChild(root, root_child4, 4); @@ -770,30 +813,36 @@ TEST(YogaTest, wrap_reverse_row_single_line_different_size) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeStyleSetWidth(root, 300); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 30); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 30); YGNodeStyleSetHeight(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 30); YGNodeStyleSetHeight(root_child3, 40); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 30); YGNodeStyleSetHeight(root_child4, 50); YGNodeInsertChild(root, root_child4, 4); @@ -873,30 +922,36 @@ TEST(YogaTest, wrap_reverse_row_align_content_stretch) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeStyleSetWidth(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 30); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 30); YGNodeStyleSetHeight(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 30); YGNodeStyleSetHeight(root_child3, 40); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 30); YGNodeStyleSetHeight(root_child4, 50); YGNodeInsertChild(root, root_child4, 4); @@ -976,30 +1031,36 @@ TEST(YogaTest, wrap_reverse_row_align_content_space_around) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeStyleSetWidth(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 30); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 30); YGNodeStyleSetHeight(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 30); YGNodeStyleSetHeight(root_child3, 40); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 30); YGNodeStyleSetHeight(root_child4, 50); YGNodeInsertChild(root, root_child4, 4); @@ -1078,31 +1139,37 @@ TEST(YogaTest, wrap_reverse_column_fixed_size) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 30); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 30); YGNodeStyleSetHeight(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 30); YGNodeStyleSetHeight(root_child3, 40); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 30); YGNodeStyleSetHeight(root_child4, 50); YGNodeInsertChild(root, root_child4, 4); @@ -1181,20 +1248,24 @@ TEST(YogaTest, wrapped_row_within_align_items_center) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 150); YGNodeStyleSetHeight(root_child0_child0, 80); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child1, 80); YGNodeStyleSetHeight(root_child0_child1, 80); YGNodeInsertChild(root_child0, root_child0_child1, 1); @@ -1253,20 +1324,24 @@ TEST(YogaTest, wrapped_row_within_align_items_flex_start) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignFlexStart); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 150); YGNodeStyleSetHeight(root_child0_child0, 80); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child1, 80); YGNodeStyleSetHeight(root_child0_child1, 80); YGNodeInsertChild(root_child0, root_child0_child1, 1); @@ -1325,20 +1400,24 @@ TEST(YogaTest, wrapped_row_within_align_items_flex_end) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 150); YGNodeStyleSetHeight(root_child0_child0, 80); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child1, 80); YGNodeStyleSetHeight(root_child0_child1, 80); YGNodeInsertChild(root_child0, root_child0_child1, 1); @@ -1399,17 +1478,20 @@ TEST(YogaTest, wrapped_column_max_height) { YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetAlignContent(root, YGAlignCenter); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 700); YGNodeStyleSetHeight(root, 500); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 500); YGNodeStyleSetMaxHeight(root_child0, 200); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child1, YGEdgeLeft, 20); YGNodeStyleSetMargin(root_child1, YGEdgeTop, 20); YGNodeStyleSetMargin(root_child1, YGEdgeRight, 20); @@ -1419,6 +1501,7 @@ TEST(YogaTest, wrapped_column_max_height) { YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 100); YGNodeStyleSetHeight(root_child2, 100); YGNodeInsertChild(root, root_child2, 2); @@ -1479,11 +1562,13 @@ TEST(YogaTest, wrapped_column_max_height_flex) { YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetAlignContent(root, YGAlignCenter); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 700); YGNodeStyleSetHeight(root, 500); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 0); @@ -1493,6 +1578,7 @@ TEST(YogaTest, wrapped_column_max_height_flex) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 0); @@ -1505,6 +1591,7 @@ TEST(YogaTest, wrapped_column_max_height_flex) { YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 100); YGNodeStyleSetHeight(root_child2, 100); YGNodeInsertChild(root, root_child2, 2); @@ -1562,28 +1649,34 @@ TEST(YogaTest, wrap_nodes_with_content_sizing_overflowing_margin) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 500); YGNodeStyleSetHeight(root, 500); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetWidth(root_child0, 85); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0_child0, 40); YGNodeStyleSetHeight(root_child0_child0_child0, 40); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child0_child1, YGEdgeRight, 10); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child1_child0, 40); YGNodeStyleSetHeight(root_child0_child1_child0, 40); YGNodeInsertChild(root_child0_child1, root_child0_child1_child0, 0); @@ -1661,28 +1754,34 @@ TEST(YogaTest, wrap_nodes_with_content_sizing_margin_cross) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 500); YGNodeStyleSetHeight(root, 500); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetWidth(root_child0, 70); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0_child0, 40); YGNodeStyleSetHeight(root_child0_child0_child0, 40); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child0_child1, YGEdgeTop, 10); YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child0_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child1_child0, 40); YGNodeStyleSetHeight(root_child0_child1_child0, 40); YGNodeInsertChild(root_child0_child1, root_child0_child1_child0, 0); diff --git a/tests/generated/YGGapTest.cpp b/tests/generated/YGGapTest.cpp index efd6d364..53e3d795 100644 --- a/tests/generated/YGGapTest.cpp +++ b/tests/generated/YGGapTest.cpp @@ -17,24 +17,28 @@ TEST(YogaTest, column_gap_flexible) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 80); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); YGNodeStyleSetGap(root, YGGutterRow, 20); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 0); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 0); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetFlexShrink(root_child2, 1); YGNodeStyleSetFlexBasisPercent(root_child2, 0); @@ -94,19 +98,23 @@ TEST(YogaTest, column_gap_inflexible) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 80); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 20); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -164,21 +172,25 @@ TEST(YogaTest, column_gap_mixed_flexible) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 80); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 0); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 20); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -236,11 +248,13 @@ TEST(YogaTest, column_gap_child_margins) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 80); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 0); @@ -249,6 +263,7 @@ TEST(YogaTest, column_gap_child_margins) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 0); @@ -257,6 +272,7 @@ TEST(YogaTest, column_gap_child_margins) { YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetFlexShrink(root_child2, 1); YGNodeStyleSetFlexBasisPercent(root_child2, 0); @@ -318,52 +334,62 @@ TEST(YogaTest, column_row_gap_wrapping) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 80); YGNodeStyleSetGap(root, YGGutterColumn, 10); YGNodeStyleSetGap(root, YGGutterRow, 20); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 20); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 20); YGNodeStyleSetHeight(root_child2, 20); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 20); YGNodeStyleSetHeight(root_child3, 20); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 20); YGNodeStyleSetHeight(root_child4, 20); YGNodeInsertChild(root, root_child4, 4); const YGNodeRef root_child5 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child5, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child5, 20); YGNodeStyleSetHeight(root_child5, 20); YGNodeInsertChild(root, root_child5, 5); const YGNodeRef root_child6 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child6, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child6, 20); YGNodeStyleSetHeight(root_child6, 20); YGNodeInsertChild(root, root_child6, 6); const YGNodeRef root_child7 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child7, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child7, 20); YGNodeStyleSetHeight(root_child7, 20); YGNodeInsertChild(root, root_child7, 7); const YGNodeRef root_child8 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child8, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child8, 20); YGNodeStyleSetHeight(root_child8, 20); YGNodeInsertChild(root, root_child8, 8); @@ -482,6 +508,7 @@ TEST(YogaTest, column_gap_start_index) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 80); YGNodeStyleSetGap(root, YGGutterColumn, 10); @@ -494,16 +521,19 @@ TEST(YogaTest, column_gap_start_index) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 20); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 20); YGNodeStyleSetHeight(root_child2, 20); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 20); YGNodeStyleSetHeight(root_child3, 20); YGNodeInsertChild(root, root_child3, 3); @@ -572,19 +602,23 @@ TEST(YogaTest, column_gap_justify_flex_start) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 20); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -643,19 +677,23 @@ TEST(YogaTest, column_gap_justify_center) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 20); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -714,19 +752,23 @@ TEST(YogaTest, column_gap_justify_flex_end) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 20); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -785,19 +827,23 @@ TEST(YogaTest, column_gap_justify_space_between) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root, YGJustifySpaceBetween); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 20); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -856,19 +902,23 @@ TEST(YogaTest, column_gap_justify_space_around) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root, YGJustifySpaceAround); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 20); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -927,19 +977,23 @@ TEST(YogaTest, column_gap_justify_space_evenly) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root, YGJustifySpaceEvenly); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 20); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -997,6 +1051,7 @@ TEST(YogaTest, column_gap_wrap_align_flex_start) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); @@ -1004,31 +1059,37 @@ TEST(YogaTest, column_gap_wrap_align_flex_start) { YGNodeStyleSetGap(root, YGGutterRow, 20); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 20); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 20); YGNodeStyleSetHeight(root_child2, 20); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 20); YGNodeStyleSetHeight(root_child3, 20); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 20); YGNodeStyleSetHeight(root_child4, 20); YGNodeInsertChild(root, root_child4, 4); const YGNodeRef root_child5 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child5, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child5, 20); YGNodeStyleSetHeight(root_child5, 20); YGNodeInsertChild(root, root_child5, 5); @@ -1118,6 +1179,7 @@ TEST(YogaTest, column_gap_wrap_align_center) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); @@ -1125,31 +1187,37 @@ TEST(YogaTest, column_gap_wrap_align_center) { YGNodeStyleSetGap(root, YGGutterRow, 20); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 20); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 20); YGNodeStyleSetHeight(root_child2, 20); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 20); YGNodeStyleSetHeight(root_child3, 20); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 20); YGNodeStyleSetHeight(root_child4, 20); YGNodeInsertChild(root, root_child4, 4); const YGNodeRef root_child5 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child5, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child5, 20); YGNodeStyleSetHeight(root_child5, 20); YGNodeInsertChild(root, root_child5, 5); @@ -1239,6 +1307,7 @@ TEST(YogaTest, column_gap_wrap_align_flex_end) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignFlexEnd); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); @@ -1246,31 +1315,37 @@ TEST(YogaTest, column_gap_wrap_align_flex_end) { YGNodeStyleSetGap(root, YGGutterRow, 20); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 20); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 20); YGNodeStyleSetHeight(root_child2, 20); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 20); YGNodeStyleSetHeight(root_child3, 20); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 20); YGNodeStyleSetHeight(root_child4, 20); YGNodeInsertChild(root, root_child4, 4); const YGNodeRef root_child5 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child5, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child5, 20); YGNodeStyleSetHeight(root_child5, 20); YGNodeInsertChild(root, root_child5, 5); @@ -1360,6 +1435,7 @@ TEST(YogaTest, column_gap_wrap_align_space_between) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignSpaceBetween); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); @@ -1367,31 +1443,37 @@ TEST(YogaTest, column_gap_wrap_align_space_between) { YGNodeStyleSetGap(root, YGGutterRow, 20); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 20); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 20); YGNodeStyleSetHeight(root_child2, 20); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 20); YGNodeStyleSetHeight(root_child3, 20); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 20); YGNodeStyleSetHeight(root_child4, 20); YGNodeInsertChild(root, root_child4, 4); const YGNodeRef root_child5 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child5, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child5, 20); YGNodeStyleSetHeight(root_child5, 20); YGNodeInsertChild(root, root_child5, 5); @@ -1481,6 +1563,7 @@ TEST(YogaTest, column_gap_wrap_align_space_around) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); @@ -1488,31 +1571,37 @@ TEST(YogaTest, column_gap_wrap_align_space_around) { YGNodeStyleSetGap(root, YGGutterRow, 20); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 20); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 20); YGNodeStyleSetHeight(root_child2, 20); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 20); YGNodeStyleSetHeight(root_child3, 20); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 20); YGNodeStyleSetHeight(root_child4, 20); YGNodeInsertChild(root, root_child4, 4); const YGNodeRef root_child5 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child5, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child5, 20); YGNodeStyleSetHeight(root_child5, 20); YGNodeInsertChild(root, root_child5, 5); @@ -1602,32 +1691,38 @@ TEST(YogaTest, column_gap_wrap_align_stretch) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 300); YGNodeStyleSetHeight(root, 300); YGNodeStyleSetGap(root, YGGutterColumn, 5); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMinWidth(root_child0, 60); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetMinWidth(root_child1, 60); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetMinWidth(root_child2, 60); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child3, 1); YGNodeStyleSetMinWidth(root_child3, 60); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child4, 1); YGNodeStyleSetMinWidth(root_child4, 60); YGNodeInsertChild(root, root_child4, 4); @@ -1706,18 +1801,22 @@ TEST(YogaTest, column_gap_determines_parent_width) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1776,6 +1875,7 @@ TEST(YogaTest, row_gap_align_items_stretch) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 200); @@ -1783,26 +1883,32 @@ TEST(YogaTest, row_gap_align_items_stretch) { YGNodeStyleSetGap(root, YGGutterRow, 20); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 20); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 20); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 20); YGNodeInsertChild(root, root_child4, 4); const YGNodeRef root_child5 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child5, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child5, 20); YGNodeInsertChild(root, root_child5, 5); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1891,6 +1997,7 @@ TEST(YogaTest, row_gap_align_items_end) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 200); @@ -1898,26 +2005,32 @@ TEST(YogaTest, row_gap_align_items_end) { YGNodeStyleSetGap(root, YGGutterRow, 20); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 20); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child3, 20); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child4, 20); YGNodeInsertChild(root, root_child4, 4); const YGNodeRef root_child5 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child5, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child5, 20); YGNodeInsertChild(root, root_child5, 5); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2004,11 +2117,13 @@ TEST(YogaTest, row_gap_column_child_margins) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 200); YGNodeStyleSetGap(root, YGGutterRow, 10); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 0); @@ -2017,6 +2132,7 @@ TEST(YogaTest, row_gap_column_child_margins) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 0); @@ -2025,6 +2141,7 @@ TEST(YogaTest, row_gap_column_child_margins) { YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetFlexShrink(root_child2, 1); YGNodeStyleSetFlexBasisPercent(root_child2, 0); @@ -2086,24 +2203,28 @@ TEST(YogaTest, row_gap_row_wrap_child_margins) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 200); YGNodeStyleSetGap(root, YGGutterRow, 10); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 2); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 2); YGNodeStyleSetWidth(root_child0, 60); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child1, YGEdgeTop, 10); YGNodeStyleSetMargin(root_child1, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child1, 60); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child2, YGEdgeTop, 15); YGNodeStyleSetMargin(root_child2, YGEdgeBottom, 15); YGNodeStyleSetWidth(root_child2, 60); @@ -2162,18 +2283,22 @@ TEST(YogaTest, row_gap_determines_parent_height) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetGap(root, YGGutterRow, 10); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); diff --git a/tests/generated/YGJustifyContentTest.cpp b/tests/generated/YGJustifyContentTest.cpp index 1e0672c6..c3da3bd9 100644 --- a/tests/generated/YGJustifyContentTest.cpp +++ b/tests/generated/YGJustifyContentTest.cpp @@ -17,18 +17,22 @@ TEST(YogaTest, justify_content_row_flex_start) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -87,18 +91,22 @@ TEST(YogaTest, justify_content_row_flex_end) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -157,18 +165,22 @@ TEST(YogaTest, justify_content_row_center) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -227,18 +239,22 @@ TEST(YogaTest, justify_content_row_space_between) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root, YGJustifySpaceBetween); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -297,18 +313,22 @@ TEST(YogaTest, justify_content_row_space_around) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root, YGJustifySpaceAround); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -365,18 +385,22 @@ TEST(YogaTest, justify_content_column_flex_start) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -434,18 +458,22 @@ TEST(YogaTest, justify_content_column_flex_end) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -503,18 +531,22 @@ TEST(YogaTest, justify_content_column_center) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -572,18 +604,22 @@ TEST(YogaTest, justify_content_column_space_between) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifySpaceBetween); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -641,18 +677,22 @@ TEST(YogaTest, justify_content_column_space_around) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifySpaceAround); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -711,10 +751,12 @@ TEST(YogaTest, justify_content_row_min_width_and_margin) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMargin(root, YGEdgeLeft, 100); YGNodeStyleSetMinWidth(root, 50); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); @@ -754,11 +796,13 @@ TEST(YogaTest, justify_content_row_max_width_and_margin) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMargin(root, YGEdgeLeft, 100); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetMaxWidth(root, 80); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); @@ -797,10 +841,12 @@ TEST(YogaTest, justify_content_column_min_height_and_margin) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMargin(root, YGEdgeTop, 100); YGNodeStyleSetMinHeight(root, 50); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); @@ -839,11 +885,13 @@ TEST(YogaTest, justify_content_colunn_max_height_and_margin) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMargin(root, YGEdgeTop, 100); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetMaxHeight(root, 80); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); @@ -882,18 +930,22 @@ TEST(YogaTest, justify_content_column_space_evenly) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifySpaceEvenly); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -952,18 +1004,22 @@ TEST(YogaTest, justify_content_row_space_evenly) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root, YGJustifySpaceEvenly); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1021,18 +1077,21 @@ TEST(YogaTest, justify_content_min_width_with_padding_child_width_greater_than_p const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 1000); YGNodeStyleSetHeight(root, 1584); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root_child0, YGAlignStretch); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root_child0_child0, YGJustifyCenter); YGNodeStyleSetAlignContent(root_child0_child0, YGAlignStretch); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 100); YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 100); YGNodeStyleSetMinWidth(root_child0_child0, 400); @@ -1041,6 +1100,7 @@ TEST(YogaTest, justify_content_min_width_with_padding_child_width_greater_than_p const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0_child0_child0, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root_child0_child0_child0, YGAlignStretch); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0_child0, 300); YGNodeStyleSetHeight(root_child0_child0_child0, 100); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); @@ -1099,18 +1159,21 @@ TEST(YogaTest, justify_content_min_width_with_padding_child_width_lower_than_par const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 1080); YGNodeStyleSetHeight(root, 1584); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root_child0, YGAlignStretch); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root_child0_child0, YGJustifyCenter); YGNodeStyleSetAlignContent(root_child0_child0, YGAlignStretch); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 100); YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 100); YGNodeStyleSetMinWidth(root_child0_child0, 400); @@ -1119,6 +1182,7 @@ TEST(YogaTest, justify_content_min_width_with_padding_child_width_lower_than_par const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0_child0_child0, YGFlexDirectionRow); YGNodeStyleSetAlignContent(root_child0_child0_child0, YGAlignStretch); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0_child0, 199); YGNodeStyleSetHeight(root_child0_child0_child0, 100); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); @@ -1177,20 +1241,24 @@ TEST(YogaTest, justify_content_space_between_indefinite_container_dim_with_free_ const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 300); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root_child0, YGJustifySpaceBetween); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMinWidth(root_child0, 200); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0, 50); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child1, 50); YGNodeStyleSetHeight(root_child0_child1, 50); YGNodeInsertChild(root_child0, root_child0_child1, 1); diff --git a/tests/generated/YGMarginTest.cpp b/tests/generated/YGMarginTest.cpp index 478583e3..67b76c90 100644 --- a/tests/generated/YGMarginTest.cpp +++ b/tests/generated/YGMarginTest.cpp @@ -17,10 +17,12 @@ TEST(YogaTest, margin_start) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child0, YGEdgeStart, 10); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -58,10 +60,12 @@ TEST(YogaTest, margin_top) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -101,10 +105,12 @@ TEST(YogaTest, margin_end) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child0, YGEdgeEnd, 10); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -143,10 +149,12 @@ TEST(YogaTest, margin_bottom) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 10); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -185,10 +193,12 @@ TEST(YogaTest, margin_and_flex_row) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMargin(root_child0, YGEdgeStart, 10); YGNodeStyleSetMargin(root_child0, YGEdgeEnd, 10); @@ -227,10 +237,12 @@ TEST(YogaTest, margin_and_flex_column) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 10); @@ -270,10 +282,12 @@ TEST(YogaTest, margin_and_stretch_row) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 10); @@ -312,10 +326,12 @@ TEST(YogaTest, margin_and_stretch_column) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMargin(root_child0, YGEdgeStart, 10); YGNodeStyleSetMargin(root_child0, YGEdgeEnd, 10); @@ -355,15 +371,18 @@ TEST(YogaTest, margin_with_sibling_row) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMargin(root_child0, YGEdgeEnd, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -410,15 +429,18 @@ TEST(YogaTest, margin_with_sibling_column) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -466,16 +488,19 @@ TEST(YogaTest, margin_auto_bottom) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMarginAuto(root_child0, YGEdgeBottom); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); @@ -524,16 +549,19 @@ TEST(YogaTest, margin_auto_top) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); @@ -582,10 +610,12 @@ TEST(YogaTest, margin_auto_bottom_and_top) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop); YGNodeStyleSetMarginAuto(root_child0, YGEdgeBottom); YGNodeStyleSetWidth(root_child0, 50); @@ -593,6 +623,7 @@ TEST(YogaTest, margin_auto_bottom_and_top) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); @@ -641,10 +672,12 @@ TEST(YogaTest, margin_auto_bottom_and_top_justify_center) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop); YGNodeStyleSetMarginAuto(root_child0, YGEdgeBottom); YGNodeStyleSetWidth(root_child0, 50); @@ -652,6 +685,7 @@ TEST(YogaTest, margin_auto_bottom_and_top_justify_center) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); @@ -700,22 +734,26 @@ TEST(YogaTest, margin_auto_mutiple_children_column) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetMarginAuto(root_child1, YGEdgeTop); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeStyleSetHeight(root_child2, 50); YGNodeInsertChild(root, root_child2, 2); @@ -775,22 +813,26 @@ TEST(YogaTest, margin_auto_mutiple_children_row) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetMarginAuto(root_child1, YGEdgeRight); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeStyleSetHeight(root_child2, 50); YGNodeInsertChild(root, root_child2, 2); @@ -850,10 +892,12 @@ TEST(YogaTest, margin_auto_left_and_right_column) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeStyleSetWidth(root_child0, 50); @@ -861,6 +905,7 @@ TEST(YogaTest, margin_auto_left_and_right_column) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); @@ -908,10 +953,12 @@ TEST(YogaTest, margin_auto_left_and_right) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeStyleSetWidth(root_child0, 50); @@ -919,6 +966,7 @@ TEST(YogaTest, margin_auto_left_and_right) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); @@ -968,10 +1016,12 @@ TEST(YogaTest, margin_auto_start_and_end_column) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMarginAuto(root_child0, YGEdgeStart); YGNodeStyleSetMarginAuto(root_child0, YGEdgeEnd); YGNodeStyleSetWidth(root_child0, 50); @@ -979,6 +1029,7 @@ TEST(YogaTest, margin_auto_start_and_end_column) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); @@ -1026,10 +1077,12 @@ TEST(YogaTest, margin_auto_start_and_end) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMarginAuto(root_child0, YGEdgeStart); YGNodeStyleSetMarginAuto(root_child0, YGEdgeEnd); YGNodeStyleSetWidth(root_child0, 50); @@ -1037,6 +1090,7 @@ TEST(YogaTest, margin_auto_start_and_end) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); @@ -1085,10 +1139,12 @@ TEST(YogaTest, margin_auto_left_and_right_column_and_center) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeStyleSetWidth(root_child0, 50); @@ -1096,6 +1152,7 @@ TEST(YogaTest, margin_auto_left_and_right_column_and_center) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); @@ -1144,16 +1201,19 @@ TEST(YogaTest, margin_auto_left) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); @@ -1202,16 +1262,19 @@ TEST(YogaTest, margin_auto_right) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); @@ -1260,10 +1323,12 @@ TEST(YogaTest, margin_auto_left_and_right_stretch) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeStyleSetWidth(root_child0, 50); @@ -1271,6 +1336,7 @@ TEST(YogaTest, margin_auto_left_and_right_stretch) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); @@ -1318,10 +1384,12 @@ TEST(YogaTest, margin_auto_top_and_bottom_stretch) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop); YGNodeStyleSetMarginAuto(root_child0, YGEdgeBottom); YGNodeStyleSetWidth(root_child0, 50); @@ -1329,6 +1397,7 @@ TEST(YogaTest, margin_auto_top_and_bottom_stretch) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); @@ -1376,10 +1445,12 @@ TEST(YogaTest, margin_should_not_be_part_of_max_height) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 250); YGNodeStyleSetHeight(root, 250); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 20); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); @@ -1419,10 +1490,12 @@ TEST(YogaTest, margin_should_not_be_part_of_max_width) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 250); YGNodeStyleSetHeight(root, 250); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 20); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetMaxWidth(root_child0, 100); @@ -1463,10 +1536,12 @@ TEST(YogaTest, margin_auto_left_right_child_bigger_than_parent) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 52); YGNodeStyleSetHeight(root, 52); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeStyleSetWidth(root_child0, 72); @@ -1507,10 +1582,12 @@ TEST(YogaTest, margin_auto_left_child_bigger_than_parent) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 52); YGNodeStyleSetHeight(root, 52); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); YGNodeStyleSetWidth(root_child0, 72); YGNodeStyleSetHeight(root_child0, 72); @@ -1550,10 +1627,12 @@ TEST(YogaTest, margin_fix_left_auto_right_child_bigger_than_parent) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 52); YGNodeStyleSetHeight(root, 52); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 10); YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeStyleSetWidth(root_child0, 72); @@ -1594,10 +1673,12 @@ TEST(YogaTest, margin_auto_left_fix_right_child_bigger_than_parent) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 52); YGNodeStyleSetHeight(root, 52); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); YGNodeStyleSetMargin(root_child0, YGEdgeRight, 10); YGNodeStyleSetWidth(root_child0, 72); @@ -1638,10 +1719,12 @@ TEST(YogaTest, margin_auto_top_stretching_child) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 0); @@ -1649,6 +1732,7 @@ TEST(YogaTest, margin_auto_top_stretching_child) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); @@ -1697,10 +1781,12 @@ TEST(YogaTest, margin_auto_left_stretching_child) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 0); @@ -1708,6 +1794,7 @@ TEST(YogaTest, margin_auto_left_stretching_child) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); diff --git a/tests/generated/YGMinMaxDimensionTest.cpp b/tests/generated/YGMinMaxDimensionTest.cpp index 7cdd5c46..4937421c 100644 --- a/tests/generated/YGMinMaxDimensionTest.cpp +++ b/tests/generated/YGMinMaxDimensionTest.cpp @@ -16,10 +16,12 @@ TEST(YogaTest, max_width) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMaxWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -58,10 +60,12 @@ TEST(YogaTest, max_height) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetMaxHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); @@ -101,15 +105,18 @@ TEST(YogaTest, min_height) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMinHeight(root_child0, 60); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -159,15 +166,18 @@ TEST(YogaTest, min_width) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMinWidth(root_child0, 60); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -215,11 +225,13 @@ TEST(YogaTest, justify_content_min_max) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetMinHeight(root, 100); YGNodeStyleSetMaxHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 60); YGNodeStyleSetHeight(root_child0, 60); YGNodeInsertChild(root, root_child0, 0); @@ -258,11 +270,13 @@ TEST(YogaTest, align_items_min_max) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMinWidth(root, 100); YGNodeStyleSetMaxWidth(root, 200); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 60); YGNodeStyleSetHeight(root_child0, 60); YGNodeInsertChild(root, root_child0, 0); @@ -301,20 +315,24 @@ TEST(YogaTest, justify_content_overflow_min_max) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMinHeight(root, 100); YGNodeStyleSetMaxHeight(root, 110); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 50); YGNodeStyleSetHeight(root_child2, 50); YGNodeInsertChild(root, root_child2, 2); @@ -372,16 +390,19 @@ TEST(YogaTest, flex_grow_to_min) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetMinHeight(root, 100); YGNodeStyleSetMaxHeight(root, 500); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -430,14 +451,17 @@ TEST(YogaTest, flex_grow_in_at_most_container) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetAlignItems(root, YGAlignFlexStart); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeStyleSetFlexBasis(root_child0_child0, 0); YGNodeInsertChild(root_child0, root_child0_child0, 0); @@ -486,8 +510,10 @@ TEST(YogaTest, flex_grow_child) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 0); YGNodeStyleSetHeight(root_child0, 100); @@ -526,14 +552,17 @@ TEST(YogaTest, flex_grow_within_constrained_min_max_column) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMinHeight(root, 100); YGNodeStyleSetMaxHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -580,15 +609,18 @@ TEST(YogaTest, flex_grow_within_max_width) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMaxWidth(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeStyleSetHeight(root_child0_child0, 20); YGNodeInsertChild(root_child0, root_child0_child0, 0); @@ -636,15 +668,18 @@ TEST(YogaTest, flex_grow_within_constrained_max_width) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMaxWidth(root_child0, 300); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeStyleSetHeight(root_child0_child0, 20); YGNodeInsertChild(root_child0, root_child0_child0, 0); @@ -692,17 +727,20 @@ TEST(YogaTest, flex_root_ignored) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexGrow(root, 1); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetMinHeight(root, 100); YGNodeStyleSetMaxHeight(root, 500); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 200); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child1, 100); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -749,22 +787,26 @@ TEST(YogaTest, flex_grow_root_minimized) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetMinHeight(root, 100); YGNodeStyleSetMaxHeight(root, 500); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMinHeight(root_child0, 100); YGNodeStyleSetMaxHeight(root_child0, 500); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeStyleSetFlexBasis(root_child0_child0, 200); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child0_child1, 100); YGNodeInsertChild(root_child0, root_child0_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -821,21 +863,25 @@ TEST(YogaTest, flex_grow_height_maximized) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 500); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMinHeight(root_child0, 100); YGNodeStyleSetMaxHeight(root_child0, 500); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeStyleSetFlexBasis(root_child0_child0, 200); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child0_child1, 100); YGNodeInsertChild(root_child0, root_child0_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -893,14 +939,17 @@ TEST(YogaTest, flex_grow_within_constrained_min_row) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMinWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -947,13 +996,16 @@ TEST(YogaTest, flex_grow_within_constrained_min_column) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMinHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1000,20 +1052,24 @@ TEST(YogaTest, flex_grow_within_constrained_max_row) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMaxWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetFlexShrink(root_child0_child0, 1); YGNodeStyleSetFlexBasis(root_child0_child0, 100); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child1, 50); YGNodeInsertChild(root_child0, root_child0_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1070,15 +1126,18 @@ TEST(YogaTest, flex_grow_within_constrained_max_column) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetMaxHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1126,16 +1185,19 @@ TEST(YogaTest, child_min_max_width_flexing) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 120); YGNodeStyleSetHeight(root, 50); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 0); YGNodeStyleSetMinWidth(root_child0, 60); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 50); YGNodeStyleSetMaxWidth(root_child1, 20); @@ -1184,6 +1246,7 @@ TEST(YogaTest, min_width_overrides_width) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 50); YGNodeStyleSetMinWidth(root, 100); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1210,6 +1273,7 @@ TEST(YogaTest, max_width_overrides_width) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetMaxWidth(root, 100); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1236,6 +1300,7 @@ TEST(YogaTest, min_height_overrides_height) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetHeight(root, 50); YGNodeStyleSetMinHeight(root, 100); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1262,6 +1327,7 @@ TEST(YogaTest, max_height_overrides_height) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetHeight(root, 200); YGNodeStyleSetMaxHeight(root, 100); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1289,10 +1355,12 @@ TEST(YogaTest, min_max_percent_no_width_height) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root, YGAlignFlexStart); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetMinWidthPercent(root_child0, 10); YGNodeStyleSetMaxWidthPercent(root_child0, 10); YGNodeStyleSetMinHeightPercent(root_child0, 10); diff --git a/tests/generated/YGPaddingTest.cpp b/tests/generated/YGPaddingTest.cpp index b5496456..71c41ff1 100644 --- a/tests/generated/YGPaddingTest.cpp +++ b/tests/generated/YGPaddingTest.cpp @@ -16,6 +16,7 @@ TEST(YogaTest, padding_no_size) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetPadding(root, YGEdgeLeft, 10); YGNodeStyleSetPadding(root, YGEdgeTop, 10); YGNodeStyleSetPadding(root, YGEdgeRight, 10); @@ -44,12 +45,14 @@ TEST(YogaTest, padding_container_match_child) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetPadding(root, YGEdgeLeft, 10); YGNodeStyleSetPadding(root, YGEdgeTop, 10); YGNodeStyleSetPadding(root, YGEdgeRight, 10); YGNodeStyleSetPadding(root, YGEdgeBottom, 10); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -87,6 +90,7 @@ TEST(YogaTest, padding_flex_child) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetPadding(root, YGEdgeLeft, 10); YGNodeStyleSetPadding(root, YGEdgeTop, 10); YGNodeStyleSetPadding(root, YGEdgeRight, 10); @@ -95,6 +99,7 @@ TEST(YogaTest, padding_flex_child) { YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -132,6 +137,7 @@ TEST(YogaTest, padding_stretch_child) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetPadding(root, YGEdgeLeft, 10); YGNodeStyleSetPadding(root, YGEdgeTop, 10); YGNodeStyleSetPadding(root, YGEdgeRight, 10); @@ -140,6 +146,7 @@ TEST(YogaTest, padding_stretch_child) { YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -178,6 +185,7 @@ TEST(YogaTest, padding_center_child) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetPadding(root, YGEdgeStart, 10); YGNodeStyleSetPadding(root, YGEdgeEnd, 20); YGNodeStyleSetPadding(root, YGEdgeBottom, 20); @@ -185,6 +193,7 @@ TEST(YogaTest, padding_center_child) { YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -224,10 +233,12 @@ TEST(YogaTest, child_with_padding_align_end) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 20); YGNodeStyleSetPadding(root_child0, YGEdgeTop, 20); YGNodeStyleSetPadding(root_child0, YGEdgeRight, 20); diff --git a/tests/generated/YGPercentageTest.cpp b/tests/generated/YGPercentageTest.cpp index c31743d5..6e8d2f4b 100644 --- a/tests/generated/YGPercentageTest.cpp +++ b/tests/generated/YGPercentageTest.cpp @@ -17,10 +17,12 @@ TEST(YogaTest, percentage_width_height) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0, 30); YGNodeStyleSetHeightPercent(root_child0, 30); YGNodeInsertChild(root, root_child0, 0); @@ -59,10 +61,12 @@ TEST(YogaTest, percentage_position_left_top) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 400); YGNodeStyleSetHeight(root, 400); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetPositionPercent(root_child0, YGEdgeLeft, 10); YGNodeStyleSetPositionPercent(root_child0, YGEdgeTop, 20); YGNodeStyleSetWidthPercent(root_child0, 45); @@ -103,10 +107,12 @@ TEST(YogaTest, percentage_position_bottom_right) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 500); YGNodeStyleSetHeight(root, 500); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetPositionPercent(root_child0, YGEdgeRight, 20); YGNodeStyleSetPositionPercent(root_child0, YGEdgeBottom, 10); YGNodeStyleSetWidthPercent(root_child0, 55); @@ -147,15 +153,18 @@ TEST(YogaTest, percentage_flex_basis) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 25); YGNodeInsertChild(root, root_child1, 1); @@ -203,15 +212,18 @@ TEST(YogaTest, percentage_flex_basis_cross) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 25); YGNodeInsertChild(root, root_child1, 1); @@ -261,15 +273,18 @@ TEST(YogaTest, percentage_flex_basis_cross_min_height) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMinHeightPercent(root_child0, 60); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 2); YGNodeStyleSetMinHeightPercent(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); @@ -318,16 +333,19 @@ TEST(YogaTest, percentage_flex_basis_main_max_height) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 10); YGNodeStyleSetMaxHeightPercent(root_child0, 60); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 4); YGNodeStyleSetFlexBasisPercent(root_child1, 10); YGNodeStyleSetMaxHeightPercent(root_child1, 20); @@ -376,16 +394,19 @@ TEST(YogaTest, percentage_flex_basis_cross_max_height) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 10); YGNodeStyleSetMaxHeightPercent(root_child0, 60); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 4); YGNodeStyleSetFlexBasisPercent(root_child1, 10); YGNodeStyleSetMaxHeightPercent(root_child1, 20); @@ -435,16 +456,19 @@ TEST(YogaTest, percentage_flex_basis_main_max_width) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 15); YGNodeStyleSetMaxWidthPercent(root_child0, 60); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 4); YGNodeStyleSetFlexBasisPercent(root_child1, 10); YGNodeStyleSetMaxWidthPercent(root_child1, 20); @@ -493,16 +517,19 @@ TEST(YogaTest, percentage_flex_basis_cross_max_width) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 10); YGNodeStyleSetMaxWidthPercent(root_child0, 60); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 4); YGNodeStyleSetFlexBasisPercent(root_child1, 15); YGNodeStyleSetMaxWidthPercent(root_child1, 20); @@ -552,16 +579,19 @@ TEST(YogaTest, percentage_flex_basis_main_min_width) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 15); YGNodeStyleSetMinWidthPercent(root_child0, 60); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 4); YGNodeStyleSetFlexBasisPercent(root_child1, 10); YGNodeStyleSetMinWidthPercent(root_child1, 20); @@ -610,16 +640,19 @@ TEST(YogaTest, percentage_flex_basis_cross_min_width) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 10); YGNodeStyleSetMinWidthPercent(root_child0, 60); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 4); YGNodeStyleSetFlexBasisPercent(root_child1, 15); YGNodeStyleSetMinWidthPercent(root_child1, 20); @@ -668,10 +701,12 @@ TEST(YogaTest, percentage_multiple_nested_with_padding_margin_and_percentage_val YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 10); YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 5); @@ -686,6 +721,7 @@ TEST(YogaTest, percentage_multiple_nested_with_padding_margin_and_percentage_val YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 5); YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 5); YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 5); @@ -698,6 +734,7 @@ TEST(YogaTest, percentage_multiple_nested_with_padding_margin_and_percentage_val YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeLeft, 5); YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeTop, 5); YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeRight, 5); @@ -710,6 +747,7 @@ TEST(YogaTest, percentage_multiple_nested_with_padding_margin_and_percentage_val YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 4); YGNodeStyleSetFlexBasisPercent(root_child1, 15); YGNodeStyleSetMinWidthPercent(root_child1, 20); @@ -778,10 +816,12 @@ TEST(YogaTest, percentage_margin_should_calculate_based_only_on_width) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMarginPercent(root_child0, YGEdgeLeft, 10); YGNodeStyleSetMarginPercent(root_child0, YGEdgeTop, 10); @@ -790,6 +830,7 @@ TEST(YogaTest, percentage_margin_should_calculate_based_only_on_width) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); @@ -837,10 +878,12 @@ TEST(YogaTest, percentage_padding_should_calculate_based_only_on_width) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetPaddingPercent(root_child0, YGEdgeLeft, 10); YGNodeStyleSetPaddingPercent(root_child0, YGEdgeTop, 10); @@ -849,6 +892,7 @@ TEST(YogaTest, percentage_padding_should_calculate_based_only_on_width) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); @@ -896,6 +940,7 @@ TEST(YogaTest, percentage_absolute_position) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 100); @@ -940,8 +985,10 @@ TEST(YogaTest, percentage_width_height_undefined_parent_size) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0, 50); YGNodeStyleSetHeightPercent(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); @@ -980,22 +1027,27 @@ TEST(YogaTest, percent_within_flex_grow) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 350); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child0, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child1_child0, 100); YGNodeInsertChild(root_child1, root_child1_child0, 0); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child2, 100); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1064,24 +1116,29 @@ TEST(YogaTest, percentage_container_in_wrapping_container) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root_child0_child0, YGJustifyCenter); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child0, 100); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); const YGNodeRef root_child0_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0_child1, 50); YGNodeStyleSetHeight(root_child0_child0_child1, 50); YGNodeInsertChild(root_child0_child0, root_child0_child0_child1, 1); @@ -1149,6 +1206,7 @@ TEST(YogaTest, percent_absolute_position) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 60); YGNodeStyleSetHeight(root, 50); @@ -1161,10 +1219,12 @@ TEST(YogaTest, percent_absolute_position) { YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child0, 100); YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetWidthPercent(root_child0_child1, 100); YGNodeInsertChild(root_child0, root_child0_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); diff --git a/tests/generated/YGRoundingTest.cpp b/tests/generated/YGRoundingTest.cpp index 8ba79f77..2674bd78 100644 --- a/tests/generated/YGRoundingTest.cpp +++ b/tests/generated/YGRoundingTest.cpp @@ -17,18 +17,22 @@ TEST(YogaTest, rounding_flex_basis_flex_grow_row_width_of_100) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -86,26 +90,32 @@ TEST(YogaTest, rounding_flex_basis_flex_grow_row_prime_number_width) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 113); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeInsertChild(root, root_child2, 2); const YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child3, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child3, 1); YGNodeInsertChild(root, root_child3, 3); const YGNodeRef root_child4 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child4, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child4, 1); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -183,19 +193,23 @@ TEST(YogaTest, rounding_flex_basis_flex_shrink_row) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 101); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexBasis(root_child1, 25); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetFlexBasis(root_child2, 25); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -252,21 +266,25 @@ TEST(YogaTest, rounding_flex_basis_overrides_main_size) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 113); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 50); YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); @@ -324,21 +342,25 @@ TEST(YogaTest, rounding_total_fractial) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 87.4f); YGNodeStyleSetHeight(root, 113.4f); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 0.7f); YGNodeStyleSetFlexBasis(root_child0, 50.3f); YGNodeStyleSetHeight(root_child0, 20.3f); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1.6f); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child2, 1.1f); YGNodeStyleSetHeight(root_child2, 10.7f); YGNodeInsertChild(root, root_child2, 2); @@ -396,16 +418,19 @@ TEST(YogaTest, rounding_total_fractial_nested) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 87.4f); YGNodeStyleSetHeight(root, 113.4f); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 0.7f); YGNodeStyleSetFlexBasis(root_child0, 50.3f); YGNodeStyleSetHeight(root_child0, 20.3f); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeStyleSetFlexBasis(root_child0_child0, 0.3f); YGNodeStyleSetPosition(root_child0_child0, YGEdgeBottom, 13.3f); @@ -413,6 +438,7 @@ TEST(YogaTest, rounding_total_fractial_nested) { YGNodeInsertChild(root_child0, root_child0_child0, 0); const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0_child1, 4); YGNodeStyleSetFlexBasis(root_child0_child1, 0.3f); YGNodeStyleSetPosition(root_child0_child1, YGEdgeTop, 13.3f); @@ -420,11 +446,13 @@ TEST(YogaTest, rounding_total_fractial_nested) { YGNodeInsertChild(root_child0, root_child0_child1, 1); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1.6f); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child2, 1.1f); YGNodeStyleSetHeight(root_child2, 10.7f); YGNodeInsertChild(root, root_child2, 2); @@ -502,21 +530,25 @@ TEST(YogaTest, rounding_fractial_input_1) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 113.4f); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 50); YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); @@ -574,21 +606,25 @@ TEST(YogaTest, rounding_fractial_input_2) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 113.6f); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 50); YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); @@ -646,22 +682,26 @@ TEST(YogaTest, rounding_fractial_input_3) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetPosition(root, YGEdgeTop, 0.3f); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 113.4f); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 50); YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); @@ -719,22 +759,26 @@ TEST(YogaTest, rounding_fractial_input_4) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetPosition(root, YGEdgeTop, 0.7f); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 113.4f); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 50); YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); @@ -793,24 +837,29 @@ TEST(YogaTest, rounding_inner_node_controversy_horizontal) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 320); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1_child0, 1); YGNodeStyleSetHeight(root_child1_child0, 10); YGNodeInsertChild(root_child1, root_child1_child0, 0); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetHeight(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); @@ -878,24 +927,29 @@ TEST(YogaTest, rounding_inner_node_controversy_vertical) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetHeight(root, 320); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetWidth(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1_child0, 1); YGNodeStyleSetWidth(root_child1_child0, 10); YGNodeInsertChild(root_child1, root_child1_child0, 0); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetWidth(root_child2, 10); YGNodeInsertChild(root, root_child2, 2); @@ -964,40 +1018,48 @@ TEST(YogaTest, rounding_inner_node_controversy_combined) { const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 640); YGNodeStyleSetHeight(root, 320); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetHeightPercent(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetHeightPercent(root_child1, 100); YGNodeInsertChild(root, root_child1, 1); const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1_child0, 1); YGNodeStyleSetWidthPercent(root_child1_child0, 100); YGNodeInsertChild(root_child1, root_child1_child0, 0); const YGNodeRef root_child1_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child1, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1_child1, 1); YGNodeStyleSetWidthPercent(root_child1_child1, 100); YGNodeInsertChild(root_child1, root_child1_child1, 1); const YGNodeRef root_child1_child1_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child1_child0, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1_child1_child0, 1); YGNodeStyleSetWidthPercent(root_child1_child1_child0, 100); YGNodeInsertChild(root_child1_child1, root_child1_child1_child0, 0); const YGNodeRef root_child1_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child1_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child1_child2, 1); YGNodeStyleSetWidthPercent(root_child1_child2, 100); YGNodeInsertChild(root_child1, root_child1_child2, 2); const YGNodeRef root_child2 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child2, YGPositionTypeRelative); YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetHeightPercent(root_child2, 100); YGNodeInsertChild(root, root_child2, 2); diff --git a/tests/generated/YGSizeOverflowTest.cpp b/tests/generated/YGSizeOverflowTest.cpp index 090236a8..a4b157ca 100644 --- a/tests/generated/YGSizeOverflowTest.cpp +++ b/tests/generated/YGSizeOverflowTest.cpp @@ -16,13 +16,16 @@ TEST(YogaTest, nested_overflowing_child) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 200); YGNodeStyleSetHeight(root_child0_child0, 200); YGNodeInsertChild(root_child0, root_child0_child0, 0); @@ -70,15 +73,18 @@ TEST(YogaTest, nested_overflowing_child_in_constraint_parent) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 200); YGNodeStyleSetHeight(root_child0_child0, 200); YGNodeInsertChild(root_child0, root_child0_child0, 0); @@ -126,14 +132,17 @@ TEST(YogaTest, parent_wrap_child_size_overflowing_parent) { YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 200); YGNodeInsertChild(root_child0, root_child0_child0, 0); diff --git a/tests/generated/YGStaticPositionTest.cpp b/tests/generated/YGStaticPositionTest.cpp new file mode 100644 index 00000000..4a3cfec3 --- /dev/null +++ b/tests/generated/YGStaticPositionTest.cpp @@ -0,0 +1,42 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +// clang-format off +// @generated by gentest/gentest.rb from gentest/fixtures/YGStaticPositionTest.html + +#include +#include + +TEST(YogaTest, static_position_insets_have_no_effect) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPosition(root, YGEdgeLeft, 50); + YGNodeStyleSetPosition(root, YGEdgeTop, 50); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetHeight(root, 100); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} -- 2.50.1.windows.1 From 6cc9e582460ea501f1d3002f209f9991047efca7 Mon Sep 17 00:00:00 2001 From: Joe Vilches Date: Mon, 23 Oct 2023 18:20:24 -0700 Subject: [PATCH 16/18] Add more tests to eventually test position: static Summary: Doing some test-driven-development to support this feature, so I will start by adding a ton of tests to ensure the nuance of position: static is captured in Yoga. Specifically I have a slew of tests to capture: * Insets have no effect on static elements * Insets are relative to the nearest non-static ancestor * Percentage values for insets, padding, and margin of absolute children respect the correct dimension of the nearest non-static ancestor * Also added similar ones for static and relative children which should just respect their ancestor (static only because it is a flexbox by default) * This rule does NOT apply to border * The containing block for absolute children is the padding box of their nearest non-static ancestor * The containing block for static children is the content box of their parent (because all elements are flex containers in yoga, at least right now) Reviewed By: NickGerleman Differential Revision: D50475939 fbshipit-source-id: 7988ffc9bea3317875128dd1908d787b9b714a45 --- gentest/fixtures/YGStaticPositionTest.html | 327 +- .../facebook/yoga/YGStaticPositionTest.java | 2644 ++++++++++++++- .../generated/YGStaticPositionTest.test.ts | 2824 ++++++++++++++++- tests/generated/YGStaticPositionTest.cpp | 2716 +++++++++++++++- 4 files changed, 8494 insertions(+), 17 deletions(-) diff --git a/gentest/fixtures/YGStaticPositionTest.html b/gentest/fixtures/YGStaticPositionTest.html index 95cc3095..e73e35f3 100644 --- a/gentest/fixtures/YGStaticPositionTest.html +++ b/gentest/fixtures/YGStaticPositionTest.html @@ -1,3 +1,326 @@ -
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
diff --git a/java/tests/com/facebook/yoga/YGStaticPositionTest.java b/java/tests/com/facebook/yoga/YGStaticPositionTest.java index 402ab10c..e3be0f04 100644 --- a/java/tests/com/facebook/yoga/YGStaticPositionTest.java +++ b/java/tests/com/facebook/yoga/YGStaticPositionTest.java @@ -27,15 +27,19 @@ public class YGStaticPositionTest { @Test @Ignore - public void test_static_position_insets_have_no_effect() { + public void test_static_position_insets_have_no_effect_left_top() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); final YogaNode root = createNode(config); - root.setPosition(YogaEdge.LEFT, 50f); - root.setPosition(YogaEdge.TOP, 50f); - root.setWidth(100f); - root.setHeight(100f); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPosition(YogaEdge.LEFT, 50f); + root_child0.setPosition(YogaEdge.TOP, 50f); + root_child0.setWidth(100f); + root_child0.setHeight(100f); + root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -44,6 +48,11 @@ public class YGStaticPositionTest { assertEquals(100f, root.getLayoutWidth(), 0.0f); assertEquals(100f, root.getLayoutHeight(), 0.0f); + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0.getLayoutHeight(), 0.0f); + root.setDirection(YogaDirection.RTL); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -51,6 +60,2631 @@ public class YGStaticPositionTest { assertEquals(0f, root.getLayoutY(), 0.0f); assertEquals(100f, root.getLayoutWidth(), 0.0f); assertEquals(100f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_insets_have_no_effect_right_bottom() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPosition(YogaEdge.RIGHT, 50f); + root_child0.setPosition(YogaEdge.BOTTOM, 50f); + root_child0.setWidth(100f); + root_child0.setHeight(100f); + root.addChildAt(root_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(100f, root.getLayoutWidth(), 0.0f); + assertEquals(100f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(100f, root.getLayoutWidth(), 0.0f); + assertEquals(100f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_absolute_child_insets_relative_to_positioned_ancestor() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setMargin(YogaEdge.LEFT, 100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0_child0.setPosition(YogaEdge.LEFT, 50f); + root_child0_child0_child0.setPosition(YogaEdge.TOP, 50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_absolute_child_insets_relative_to_positioned_ancestor_deep() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setMargin(YogaEdge.LEFT, 100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setMargin(YogaEdge.LEFT, 100f); + root_child0_child0_child0.setWidth(100f); + root_child0_child0_child0.setHeight(100f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + + final YogaNode root_child0_child0_child0_child0 = createNode(config); + root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 100f); + root_child0_child0_child0_child0.setWidth(100f); + root_child0_child0_child0_child0.setHeight(100f); + root_child0_child0_child0.addChildAt(root_child0_child0_child0_child0, 0); + + final YogaNode root_child0_child0_child0_child0_child0 = createNode(config); + root_child0_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 100f); + root_child0_child0_child0_child0_child0.setWidth(100f); + root_child0_child0_child0_child0_child0.setHeight(100f); + root_child0_child0_child0_child0.addChildAt(root_child0_child0_child0_child0_child0, 0); + + final YogaNode root_child0_child0_child0_child0_child0_child0 = createNode(config); + root_child0_child0_child0_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0_child0_child0_child0_child0.setPosition(YogaEdge.LEFT, 50f); + root_child0_child0_child0_child0_child0_child0.setPosition(YogaEdge.TOP, 50f); + root_child0_child0_child0_child0_child0_child0.setWidth(50f); + root_child0_child0_child0_child0_child0_child0.setHeight(50f); + root_child0_child0_child0_child0_child0.addChildAt(root_child0_child0_child0_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(200f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(300f, root_child0_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(400f, root_child0_child0_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0_child0_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0_child0_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_absolute_child_width_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0_child0.setWidthPercent(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_relative_child_width_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0_child0_child0.setWidthPercent(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_static_child_width_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setWidthPercent(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_absolute_child_height_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeightPercent(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_relative_child_height_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeightPercent(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_static_child_height_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeightPercent(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_absolute_child_left_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0_child0.setPositionPercent(YogaEdge.LEFT, 50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_relative_child_left_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0_child0_child0.setPositionPercent(YogaEdge.LEFT, 50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(200f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_static_child_left_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionPercent(YogaEdge.LEFT, 50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_absolute_child_right_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0_child0.setPositionPercent(YogaEdge.RIGHT, 50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_relative_child_right_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0_child0_child0.setPositionPercent(YogaEdge.RIGHT, 50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(-50f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_static_child_right_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionPercent(YogaEdge.RIGHT, 50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_absolute_child_top_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0_child0.setPositionPercent(YogaEdge.TOP, 50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_relative_child_top_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0_child0_child0.setPositionPercent(YogaEdge.TOP, 50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_static_child_top_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionPercent(YogaEdge.TOP, 50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_absolute_child_bottom_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0_child0.setPositionPercent(YogaEdge.BOTTOM, 50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_relative_child_bottom_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0_child0_child0.setPositionPercent(YogaEdge.BOTTOM, 50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(-50f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(-50f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_static_child_bottom_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionPercent(YogaEdge.BOTTOM, 50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_absolute_child_margin_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0_child0.setMarginPercent(YogaEdge.LEFT, 50f); + root_child0_child0_child0.setMarginPercent(YogaEdge.TOP, 50f); + root_child0_child0_child0.setMarginPercent(YogaEdge.RIGHT, 50f); + root_child0_child0_child0.setMarginPercent(YogaEdge.BOTTOM, 50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_relative_child_margin_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0_child0_child0.setMarginPercent(YogaEdge.LEFT, 50f); + root_child0_child0_child0.setMarginPercent(YogaEdge.TOP, 50f); + root_child0_child0_child0.setMarginPercent(YogaEdge.RIGHT, 50f); + root_child0_child0_child0.setMarginPercent(YogaEdge.BOTTOM, 50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_static_child_margin_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setMarginPercent(YogaEdge.LEFT, 50f); + root_child0_child0_child0.setMarginPercent(YogaEdge.TOP, 50f); + root_child0_child0_child0.setMarginPercent(YogaEdge.RIGHT, 50f); + root_child0_child0_child0.setMarginPercent(YogaEdge.BOTTOM, 50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_absolute_child_padding_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0_child0.setPaddingPercent(YogaEdge.LEFT, 50); + root_child0_child0_child0.setPaddingPercent(YogaEdge.TOP, 50); + root_child0_child0_child0.setPaddingPercent(YogaEdge.RIGHT, 50); + root_child0_child0_child0.setPaddingPercent(YogaEdge.BOTTOM, 50); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_relative_child_padding_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0_child0_child0.setPaddingPercent(YogaEdge.LEFT, 50); + root_child0_child0_child0.setPaddingPercent(YogaEdge.TOP, 50); + root_child0_child0_child0.setPaddingPercent(YogaEdge.RIGHT, 50); + root_child0_child0_child0.setPaddingPercent(YogaEdge.BOTTOM, 50); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_static_child_padding_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPaddingPercent(YogaEdge.LEFT, 50); + root_child0_child0_child0.setPaddingPercent(YogaEdge.TOP, 50); + root_child0_child0_child0.setPaddingPercent(YogaEdge.RIGHT, 50); + root_child0_child0_child0.setPaddingPercent(YogaEdge.BOTTOM, 50); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_absolute_child_border_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_relative_child_border_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_static_child_border_percentage() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setWidth(200f); + root_child0.setHeight(200f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(200f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_absolute_child_containing_block_padding_box() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setPadding(YogaEdge.LEFT, 100); + root_child0.setPadding(YogaEdge.TOP, 100); + root_child0.setPadding(YogaEdge.RIGHT, 100); + root_child0.setPadding(YogaEdge.BOTTOM, 100); + root_child0.setWidth(400f); + root_child0.setHeight(400f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0_child0.setWidthPercent(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(400f, root.getLayoutWidth(), 0.0f); + assertEquals(400f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(400f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(400f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(400f, root.getLayoutWidth(), 0.0f); + assertEquals(400f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(400f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(400f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(200f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_relative_child_containing_block_padding_box() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setPadding(YogaEdge.LEFT, 100); + root_child0.setPadding(YogaEdge.TOP, 100); + root_child0.setPadding(YogaEdge.RIGHT, 100); + root_child0.setPadding(YogaEdge.BOTTOM, 100); + root_child0.setWidth(400f); + root_child0.setHeight(400f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0_child0_child0.setWidthPercent(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(400f, root.getLayoutWidth(), 0.0f); + assertEquals(400f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(400f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(400f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(400f, root.getLayoutWidth(), 0.0f); + assertEquals(400f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(400f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(400f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(200f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(250f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_static_child_containing_block_padding_box() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setPadding(YogaEdge.LEFT, 100); + root_child0.setPadding(YogaEdge.TOP, 100); + root_child0.setPadding(YogaEdge.RIGHT, 100); + root_child0.setPadding(YogaEdge.BOTTOM, 100); + root_child0.setWidth(400f); + root_child0.setHeight(400f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidth(100f); + root_child0_child0.setHeight(100f); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setWidthPercent(50f); + root_child0_child0_child0.setHeight(50f); + root_child0_child0.addChildAt(root_child0_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(400f, root.getLayoutWidth(), 0.0f); + assertEquals(400f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(400f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(400f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(400f, root.getLayoutWidth(), 0.0f); + assertEquals(400f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(400f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(400f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(200f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f); + + assertEquals(250f, root_child0_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_absolute_child_containing_block_content_box() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setPadding(YogaEdge.LEFT, 100); + root_child0.setPadding(YogaEdge.TOP, 100); + root_child0.setPadding(YogaEdge.RIGHT, 100); + root_child0.setPadding(YogaEdge.BOTTOM, 100); + root_child0.setWidth(400f); + root_child0.setHeight(400f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setWidthPercent(50f); + root_child0_child0.setHeight(50f); + root_child0.addChildAt(root_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(400f, root.getLayoutWidth(), 0.0f); + assertEquals(400f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(400f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(400f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(400f, root.getLayoutWidth(), 0.0f); + assertEquals(400f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(400f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(400f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(200f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_relative_child_containing_block_content_box() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setPadding(YogaEdge.LEFT, 100); + root_child0.setPadding(YogaEdge.TOP, 100); + root_child0.setPadding(YogaEdge.RIGHT, 100); + root_child0.setPadding(YogaEdge.BOTTOM, 100); + root_child0.setWidth(400f); + root_child0.setHeight(400f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0_child0.setWidthPercent(50f); + root_child0_child0.setHeight(50f); + root_child0.addChildAt(root_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(400f, root.getLayoutWidth(), 0.0f); + assertEquals(400f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(400f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(400f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(400f, root.getLayoutWidth(), 0.0f); + assertEquals(400f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(400f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(400f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(200f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_static_position_static_child_containing_block_content_box() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.RELATIVE); + root_child0.setPadding(YogaEdge.LEFT, 100); + root_child0.setPadding(YogaEdge.TOP, 100); + root_child0.setPadding(YogaEdge.RIGHT, 100); + root_child0.setPadding(YogaEdge.BOTTOM, 100); + root_child0.setWidth(400f); + root_child0.setHeight(400f); + root.addChildAt(root_child0, 0); + + final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setWidthPercent(50f); + root_child0_child0.setHeight(50f); + root_child0.addChildAt(root_child0_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(400f, root.getLayoutWidth(), 0.0f); + assertEquals(400f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(400f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(400f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(400f, root.getLayoutWidth(), 0.0f); + assertEquals(400f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(400f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(400f, root_child0.getLayoutHeight(), 0.0f); + + assertEquals(200f, root_child0_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutY(), 0.0f); + assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0_child0.getLayoutHeight(), 0.0f); } private YogaNode createNode(YogaConfig config) { diff --git a/javascript/tests/generated/YGStaticPositionTest.test.ts b/javascript/tests/generated/YGStaticPositionTest.test.ts index ecd80b5e..3733dee7 100644 --- a/javascript/tests/generated/YGStaticPositionTest.test.ts +++ b/javascript/tests/generated/YGStaticPositionTest.test.ts @@ -25,7 +25,7 @@ import { Wrap, } from 'yoga-layout'; -test.skip('static_position_insets_have_no_effect', () => { +test.skip('static_position_insets_have_no_effect_left_top', () => { const config = Yoga.Config.create(); let root; @@ -33,10 +33,14 @@ test.skip('static_position_insets_have_no_effect', () => { try { root = Yoga.Node.create(config); - root.setPosition(Edge.Left, 50); - root.setPosition(Edge.Top, 50); - root.setWidth(100); - root.setHeight(100); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPosition(Edge.Left, 50); + root_child0.setPosition(Edge.Top, 50); + root_child0.setWidth(100); + root_child0.setHeight(100); + root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); expect(root.getComputedLeft()).toBe(0); @@ -44,12 +48,2822 @@ test.skip('static_position_insets_have_no_effect', () => { expect(root.getComputedWidth()).toBe(100); expect(root.getComputedHeight()).toBe(100); + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(100); + expect(root_child0.getComputedHeight()).toBe(100); + root.calculateLayout(undefined, undefined, Direction.RTL); expect(root.getComputedLeft()).toBe(0); expect(root.getComputedTop()).toBe(0); expect(root.getComputedWidth()).toBe(100); expect(root.getComputedHeight()).toBe(100); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(100); + expect(root_child0.getComputedHeight()).toBe(100); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_insets_have_no_effect_right_bottom', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPosition(Edge.Right, 50); + root_child0.setPosition(Edge.Bottom, 50); + root_child0.setWidth(100); + root_child0.setHeight(100); + root.insertChild(root_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(100); + expect(root.getComputedHeight()).toBe(100); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(100); + expect(root_child0.getComputedHeight()).toBe(100); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(100); + expect(root.getComputedHeight()).toBe(100); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(100); + expect(root_child0.getComputedHeight()).toBe(100); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_absolute_child_insets_relative_to_positioned_ancestor', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setMargin(Edge.Left, 100); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0_child0.setPosition(Edge.Left, 50); + root_child0_child0_child0.setPosition(Edge.Top, 50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); + expect(root_child0_child0_child0.getComputedTop()).toBe(50); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); + expect(root_child0_child0_child0.getComputedTop()).toBe(50); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_absolute_child_insets_relative_to_positioned_ancestor_deep', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setMargin(Edge.Left, 100); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setMargin(Edge.Left, 100); + root_child0_child0_child0.setWidth(100); + root_child0_child0_child0.setHeight(100); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + + const root_child0_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0_child0.setMargin(Edge.Left, 100); + root_child0_child0_child0_child0.setWidth(100); + root_child0_child0_child0_child0.setHeight(100); + root_child0_child0_child0.insertChild(root_child0_child0_child0_child0, 0); + + const root_child0_child0_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0_child0_child0.setMargin(Edge.Left, 100); + root_child0_child0_child0_child0_child0.setWidth(100); + root_child0_child0_child0_child0_child0.setHeight(100); + root_child0_child0_child0_child0.insertChild(root_child0_child0_child0_child0_child0, 0); + + const root_child0_child0_child0_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0_child0_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0_child0_child0_child0_child0.setPosition(Edge.Left, 50); + root_child0_child0_child0_child0_child0_child0.setPosition(Edge.Top, 50); + root_child0_child0_child0_child0_child0_child0.setWidth(50); + root_child0_child0_child0_child0_child0_child0.setHeight(50); + root_child0_child0_child0_child0_child0.insertChild(root_child0_child0_child0_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(200); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0_child0.getComputedLeft()).toBe(300); + expect(root_child0_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0_child0_child0.getComputedLeft()).toBe(400); + expect(root_child0_child0_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0_child0_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0_child0_child0_child0.getComputedLeft()).toBe(50); + expect(root_child0_child0_child0_child0_child0_child0.getComputedTop()).toBe(50); + expect(root_child0_child0_child0_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0_child0_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0_child0_child0_child0.getComputedLeft()).toBe(50); + expect(root_child0_child0_child0_child0_child0_child0.getComputedTop()).toBe(50); + expect(root_child0_child0_child0_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_absolute_child_width_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0_child0.setWidth("50%"); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_relative_child_width_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); + root_child0_child0_child0.setWidth("50%"); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_static_child_width_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setWidth("50%"); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_absolute_child_height_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight("50%"); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(100); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(100); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_relative_child_height_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight("50%"); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_static_child_height_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight("50%"); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_absolute_child_left_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0_child0.setPosition(Edge.Left, "50%"); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_relative_child_left_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); + root_child0_child0_child0.setPosition(Edge.Left, "50%"); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(200); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_static_child_left_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPosition(Edge.Left, "50%"); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_absolute_child_right_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0_child0.setPosition(Edge.Right, "50%"); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_relative_child_right_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); + root_child0_child0_child0.setPosition(Edge.Right, "50%"); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(-50); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_static_child_right_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPosition(Edge.Right, "50%"); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_absolute_child_top_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0_child0.setPosition(Edge.Top, "50%"); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_relative_child_top_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); + root_child0_child0_child0.setPosition(Edge.Top, "50%"); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(50); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedTop()).toBe(50); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_static_child_top_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPosition(Edge.Top, "50%"); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_absolute_child_bottom_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0_child0.setPosition(Edge.Bottom, "50%"); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(50); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedTop()).toBe(50); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_relative_child_bottom_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); + root_child0_child0_child0.setPosition(Edge.Bottom, "50%"); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(-50); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedTop()).toBe(-50); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_static_child_bottom_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPosition(Edge.Bottom, "50%"); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_absolute_child_margin_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0_child0.setMargin(Edge.Left, "50%"); + root_child0_child0_child0.setMargin(Edge.Top, "50%"); + root_child0_child0_child0.setMargin(Edge.Right, "50%"); + root_child0_child0_child0.setMargin(Edge.Bottom, "50%"); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); + expect(root_child0_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_relative_child_margin_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); + root_child0_child0_child0.setMargin(Edge.Left, "50%"); + root_child0_child0_child0.setMargin(Edge.Top, "50%"); + root_child0_child0_child0.setMargin(Edge.Right, "50%"); + root_child0_child0_child0.setMargin(Edge.Bottom, "50%"); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); + expect(root_child0_child0_child0.getComputedTop()).toBe(50); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedTop()).toBe(50); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_static_child_margin_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setMargin(Edge.Left, "50%"); + root_child0_child0_child0.setMargin(Edge.Top, "50%"); + root_child0_child0_child0.setMargin(Edge.Right, "50%"); + root_child0_child0_child0.setMargin(Edge.Bottom, "50%"); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(50); + expect(root_child0_child0_child0.getComputedTop()).toBe(50); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedTop()).toBe(50); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_absolute_child_padding_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0_child0.setPadding(Edge.Left, "50%"); + root_child0_child0_child0.setPadding(Edge.Top, "50%"); + root_child0_child0_child0.setPadding(Edge.Right, "50%"); + root_child0_child0_child0.setPadding(Edge.Bottom, "50%"); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(200); + expect(root_child0_child0_child0.getComputedHeight()).toBe(200); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(200); + expect(root_child0_child0_child0.getComputedHeight()).toBe(200); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_relative_child_padding_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); + root_child0_child0_child0.setPadding(Edge.Left, "50%"); + root_child0_child0_child0.setPadding(Edge.Top, "50%"); + root_child0_child0_child0.setPadding(Edge.Right, "50%"); + root_child0_child0_child0.setPadding(Edge.Bottom, "50%"); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0_child0.getComputedHeight()).toBe(100); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0_child0.getComputedHeight()).toBe(100); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_static_child_padding_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPadding(Edge.Left, "50%"); + root_child0_child0_child0.setPadding(Edge.Top, "50%"); + root_child0_child0_child0.setPadding(Edge.Right, "50%"); + root_child0_child0_child0.setPadding(Edge.Bottom, "50%"); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0_child0.getComputedHeight()).toBe(100); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0_child0.getComputedHeight()).toBe(100); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_absolute_child_border_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_relative_child_border_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_static_child_border_percentage', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setWidth(200); + root_child0.setHeight(200); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(0); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(200); + expect(root_child0.getComputedHeight()).toBe(200); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(150); + expect(root_child0_child0_child0.getComputedTop()).toBe(0); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_absolute_child_containing_block_padding_box', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setPadding(Edge.Left, 100); + root_child0.setPadding(Edge.Top, 100); + root_child0.setPadding(Edge.Right, 100); + root_child0.setPadding(Edge.Bottom, 100); + root_child0.setWidth(400); + root_child0.setHeight(400); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0_child0.setWidth("50%"); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(400); + expect(root.getComputedHeight()).toBe(400); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(400); + expect(root_child0.getComputedHeight()).toBe(400); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0_child0.getComputedWidth()).toBe(200); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(400); + expect(root.getComputedHeight()).toBe(400); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(400); + expect(root_child0.getComputedHeight()).toBe(400); + + expect(root_child0_child0.getComputedLeft()).toBe(200); + expect(root_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0_child0.getComputedWidth()).toBe(200); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_relative_child_containing_block_padding_box', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setPadding(Edge.Left, 100); + root_child0.setPadding(Edge.Top, 100); + root_child0.setPadding(Edge.Right, 100); + root_child0.setPadding(Edge.Bottom, 100); + root_child0.setWidth(400); + root_child0.setHeight(400); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setPositionType(PositionType.Relative); + root_child0_child0_child0.setWidth("50%"); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(400); + expect(root.getComputedHeight()).toBe(400); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(400); + expect(root_child0.getComputedHeight()).toBe(400); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(400); + expect(root.getComputedHeight()).toBe(400); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(400); + expect(root_child0.getComputedHeight()).toBe(400); + + expect(root_child0_child0.getComputedLeft()).toBe(200); + expect(root_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(250); + expect(root_child0_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_static_child_containing_block_padding_box', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setPadding(Edge.Left, 100); + root_child0.setPadding(Edge.Top, 100); + root_child0.setPadding(Edge.Right, 100); + root_child0.setPadding(Edge.Bottom, 100); + root_child0.setWidth(400); + root_child0.setHeight(400); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth(100); + root_child0_child0.setHeight(100); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setWidth("50%"); + root_child0_child0_child0.setHeight(50); + root_child0_child0.insertChild(root_child0_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(400); + expect(root.getComputedHeight()).toBe(400); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(400); + expect(root_child0.getComputedHeight()).toBe(400); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(400); + expect(root.getComputedHeight()).toBe(400); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(400); + expect(root_child0.getComputedHeight()).toBe(400); + + expect(root_child0_child0.getComputedLeft()).toBe(200); + expect(root_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(100); + + expect(root_child0_child0_child0.getComputedLeft()).toBe(250); + expect(root_child0_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0_child0.getComputedWidth()).toBe(50); + expect(root_child0_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_absolute_child_containing_block_content_box', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setPadding(Edge.Left, 100); + root_child0.setPadding(Edge.Top, 100); + root_child0.setPadding(Edge.Right, 100); + root_child0.setPadding(Edge.Bottom, 100); + root_child0.setWidth(400); + root_child0.setHeight(400); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setWidth("50%"); + root_child0_child0.setHeight(50); + root_child0.insertChild(root_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(400); + expect(root.getComputedHeight()).toBe(400); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(400); + expect(root_child0.getComputedHeight()).toBe(400); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0.getComputedWidth()).toBe(200); + expect(root_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(400); + expect(root.getComputedHeight()).toBe(400); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(400); + expect(root_child0.getComputedHeight()).toBe(400); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0.getComputedWidth()).toBe(200); + expect(root_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_relative_child_containing_block_content_box', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setPadding(Edge.Left, 100); + root_child0.setPadding(Edge.Top, 100); + root_child0.setPadding(Edge.Right, 100); + root_child0.setPadding(Edge.Bottom, 100); + root_child0.setWidth(400); + root_child0.setHeight(400); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setPositionType(PositionType.Relative); + root_child0_child0.setWidth("50%"); + root_child0_child0.setHeight(50); + root_child0.insertChild(root_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(400); + expect(root.getComputedHeight()).toBe(400); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(400); + expect(root_child0.getComputedHeight()).toBe(400); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(400); + expect(root.getComputedHeight()).toBe(400); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(400); + expect(root_child0.getComputedHeight()).toBe(400); + + expect(root_child0_child0.getComputedLeft()).toBe(200); + expect(root_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('static_position_static_child_containing_block_content_box', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Relative); + root_child0.setPadding(Edge.Left, 100); + root_child0.setPadding(Edge.Top, 100); + root_child0.setPadding(Edge.Right, 100); + root_child0.setPadding(Edge.Bottom, 100); + root_child0.setWidth(400); + root_child0.setHeight(400); + root.insertChild(root_child0, 0); + + const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setWidth("50%"); + root_child0_child0.setHeight(50); + root_child0.insertChild(root_child0_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(400); + expect(root.getComputedHeight()).toBe(400); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(400); + expect(root_child0.getComputedHeight()).toBe(400); + + expect(root_child0_child0.getComputedLeft()).toBe(100); + expect(root_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(400); + expect(root.getComputedHeight()).toBe(400); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(400); + expect(root_child0.getComputedHeight()).toBe(400); + + expect(root_child0_child0.getComputedLeft()).toBe(200); + expect(root_child0_child0.getComputedTop()).toBe(100); + expect(root_child0_child0.getComputedWidth()).toBe(100); + expect(root_child0_child0.getComputedHeight()).toBe(50); } finally { if (typeof root !== 'undefined') { root.freeRecursive(); diff --git a/tests/generated/YGStaticPositionTest.cpp b/tests/generated/YGStaticPositionTest.cpp index 4a3cfec3..8867cfd1 100644 --- a/tests/generated/YGStaticPositionTest.cpp +++ b/tests/generated/YGStaticPositionTest.cpp @@ -11,17 +11,21 @@ #include #include -TEST(YogaTest, static_position_insets_have_no_effect) { +TEST(YogaTest, static_position_insets_have_no_effect_left_top) { GTEST_SKIP(); const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetPosition(root, YGEdgeLeft, 50); - YGNodeStyleSetPosition(root, YGEdgeTop, 50); - YGNodeStyleSetWidth(root, 100); - YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 50); + YGNodeStyleSetPosition(root_child0, YGEdgeTop, 50); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetHeight(root_child0, 100); + YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); @@ -29,6 +33,11 @@ TEST(YogaTest, static_position_insets_have_no_effect) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0)); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); @@ -36,6 +45,2703 @@ TEST(YogaTest, static_position_insets_have_no_effect) { ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_insets_have_no_effect_right_bottom) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPosition(root_child0, YGEdgeRight, 50); + YGNodeStyleSetPosition(root_child0, YGEdgeBottom, 50); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetHeight(root_child0, 100); + YGNodeInsertChild(root, root_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_absolute_child_insets_relative_to_positioned_ancestor) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeLeft, 50); + YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeTop, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_absolute_child_insets_relative_to_positioned_ancestor_deep) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 100); + YGNodeStyleSetWidth(root_child0_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child0, 100); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 100); + YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child0_child0, 100); + YGNodeInsertChild(root_child0_child0_child0, root_child0_child0_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetMargin(root_child0_child0_child0_child0_child0, YGEdgeLeft, 100); + YGNodeStyleSetWidth(root_child0_child0_child0_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child0_child0_child0, 100); + YGNodeInsertChild(root_child0_child0_child0_child0, root_child0_child0_child0_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0_child0_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetPosition(root_child0_child0_child0_child0_child0_child0, YGEdgeLeft, 50); + YGNodeStyleSetPosition(root_child0_child0_child0_child0_child0_child0, YGEdgeTop, 50); + YGNodeStyleSetWidth(root_child0_child0_child0_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0_child0_child0_child0, root_child0_child0_child0_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + ASSERT_FLOAT_EQ(300, YGNodeLayoutGetLeft(root_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0_child0)); + + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetLeft(root_child0_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0_child0_child0)); + + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0_child0_child0)); + + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_absolute_child_width_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_relative_child_width_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_static_child_width_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_absolute_child_height_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeightPercent(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_relative_child_height_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeightPercent(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_static_child_height_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeightPercent(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_absolute_child_left_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeLeft, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_relative_child_left_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeLeft, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_static_child_left_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeLeft, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_absolute_child_right_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeRight, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_relative_child_right_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeRight, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(-50, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_static_child_right_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeRight, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_absolute_child_top_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeTop, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_relative_child_top_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeTop, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_static_child_top_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeTop, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_absolute_child_bottom_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeBottom, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_relative_child_bottom_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeBottom, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(-50, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(-50, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_static_child_bottom_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeBottom, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_absolute_child_margin_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeLeft, 50); + YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeTop, 50); + YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeRight, 50); + YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeBottom, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_relative_child_margin_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); + YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeLeft, 50); + YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeTop, 50); + YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeRight, 50); + YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeBottom, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_static_child_margin_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeLeft, 50); + YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeTop, 50); + YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeRight, 50); + YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeBottom, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_absolute_child_padding_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeLeft, 50); + YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeTop, 50); + YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeRight, 50); + YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeBottom, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_relative_child_padding_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); + YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeLeft, 50); + YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeTop, 50); + YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeRight, 50); + YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeBottom, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_static_child_padding_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeLeft, 50); + YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeTop, 50); + YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeRight, 50); + YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeBottom, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_absolute_child_border_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_relative_child_border_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_static_child_border_percentage) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetWidth(root_child0, 200); + YGNodeStyleSetHeight(root_child0, 200); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_absolute_child_containing_block_padding_box) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 100); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 100); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 100); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 100); + YGNodeStyleSetWidth(root_child0, 400); + YGNodeStyleSetHeight(root_child0, 400); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_relative_child_containing_block_padding_box) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 100); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 100); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 100); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 100); + YGNodeStyleSetWidth(root_child0, 400); + YGNodeStyleSetHeight(root_child0, 400); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeRelative); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(250, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_static_child_containing_block_padding_box) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 100); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 100); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 100); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 100); + YGNodeStyleSetWidth(root_child0, 400); + YGNodeStyleSetHeight(root_child0, 400); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(250, YGNodeLayoutGetLeft(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_absolute_child_containing_block_content_box) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 100); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 100); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 100); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 100); + YGNodeStyleSetWidth(root_child0, 400); + YGNodeStyleSetHeight(root_child0, 400); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetWidthPercent(root_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0, 50); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_relative_child_containing_block_content_box) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 100); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 100); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 100); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 100); + YGNodeStyleSetWidth(root_child0, 400); + YGNodeStyleSetHeight(root_child0, 400); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeRelative); + YGNodeStyleSetWidthPercent(root_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0, 50); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, static_position_static_child_containing_block_content_box) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 100); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 100); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 100); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 100); + YGNodeStyleSetWidth(root_child0, 400); + YGNodeStyleSetHeight(root_child0, 400); + YGNodeInsertChild(root, root_child0, 0); + + const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidthPercent(root_child0_child0, 50); + YGNodeStyleSetHeight(root_child0_child0, 50); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(400, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0)); + YGNodeFreeRecursive(root); YGConfigFree(config); -- 2.50.1.windows.1 From 52ae53a7c8b95d988de5f29bac3a21f068e0eb87 Mon Sep 17 00:00:00 2001 From: Joe Vilches Date: Mon, 23 Oct 2023 18:20:24 -0700 Subject: [PATCH 17/18] Add errata supporting changes to position: static (#1434) Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1434 X-link: https://github.com/facebook/react-native/pull/41130 I will use this errata to gate my changes that actually make position: static behave like the web. We have future plans to make position: relative the default again but users could still have declared certain nodes as position: static, so I think this is needed regardless. Reviewed By: NickGerleman Differential Revision: D50506915 fbshipit-source-id: b0d9e6883167de6ff002352c9288053324464cb9 --- enums.py | 2 ++ java/com/facebook/yoga/YogaErrata.java | 2 ++ javascript/src/generated/YGEnums.ts | 2 ++ yoga/YGEnums.cpp | 2 ++ yoga/YGEnums.h | 1 + yoga/enums/Errata.h | 3 ++- 6 files changed, 11 insertions(+), 1 deletion(-) diff --git a/enums.py b/enums.py index 0c5207b2..749cb825 100755 --- a/enums.py +++ b/enums.py @@ -70,6 +70,8 @@ ENUMS = { ("StretchFlexBasis", 1 << 0), # Solely uses the flex-direction to determine starting and ending edges ("StartingEndingEdgeFromFlexDirection", 1 << 1), + # Position: static behaves like position: relative within Yoga + ("PositionStaticBehavesLikeRelative", 1 << 2), # Enable all incorrect behavior (preserve compatibility) ("All", 0x7FFFFFFF), # Enable all errata except for "StretchFlexBasis" (Defaults behavior diff --git a/java/com/facebook/yoga/YogaErrata.java b/java/com/facebook/yoga/YogaErrata.java index bafb6733..99f53f5a 100644 --- a/java/com/facebook/yoga/YogaErrata.java +++ b/java/com/facebook/yoga/YogaErrata.java @@ -13,6 +13,7 @@ public enum YogaErrata { NONE(0), STRETCH_FLEX_BASIS(1), STARTING_ENDING_EDGE_FROM_FLEX_DIRECTION(2), + POSITION_STATIC_BEHAVES_LIKE_RELATIVE(4), ALL(2147483647), CLASSIC(2147483646); @@ -31,6 +32,7 @@ public enum YogaErrata { case 0: return NONE; case 1: return STRETCH_FLEX_BASIS; case 2: return STARTING_ENDING_EDGE_FROM_FLEX_DIRECTION; + case 4: return POSITION_STATIC_BEHAVES_LIKE_RELATIVE; case 2147483647: return ALL; case 2147483646: return CLASSIC; default: throw new IllegalArgumentException("Unknown enum value: " + value); diff --git a/javascript/src/generated/YGEnums.ts b/javascript/src/generated/YGEnums.ts index 9f771abb..af4dc5f4 100644 --- a/javascript/src/generated/YGEnums.ts +++ b/javascript/src/generated/YGEnums.ts @@ -51,6 +51,7 @@ export enum Errata { None = 0, StretchFlexBasis = 1, StartingEndingEdgeFromFlexDirection = 2, + PositionStaticBehavesLikeRelative = 4, All = 2147483647, Classic = 2147483646, } @@ -162,6 +163,7 @@ const constants = { ERRATA_NONE: Errata.None, ERRATA_STRETCH_FLEX_BASIS: Errata.StretchFlexBasis, ERRATA_STARTING_ENDING_EDGE_FROM_FLEX_DIRECTION: Errata.StartingEndingEdgeFromFlexDirection, + ERRATA_POSITION_STATIC_BEHAVES_LIKE_RELATIVE: Errata.PositionStaticBehavesLikeRelative, ERRATA_ALL: Errata.All, ERRATA_CLASSIC: Errata.Classic, EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS: ExperimentalFeature.WebFlexBasis, diff --git a/yoga/YGEnums.cpp b/yoga/YGEnums.cpp index 77e5c802..04fd7be9 100644 --- a/yoga/YGEnums.cpp +++ b/yoga/YGEnums.cpp @@ -97,6 +97,8 @@ const char* YGErrataToString(const YGErrata value) { return "stretch-flex-basis"; case YGErrataStartingEndingEdgeFromFlexDirection: return "starting-ending-edge-from-flex-direction"; + case YGErrataPositionStaticBehavesLikeRelative: + return "position-static-behaves-like-relative"; case YGErrataAll: return "all"; case YGErrataClassic: diff --git a/yoga/YGEnums.h b/yoga/YGEnums.h index ef09668c..e1197444 100644 --- a/yoga/YGEnums.h +++ b/yoga/YGEnums.h @@ -57,6 +57,7 @@ YG_ENUM_DECL( YGErrataNone = 0, YGErrataStretchFlexBasis = 1, YGErrataStartingEndingEdgeFromFlexDirection = 2, + YGErrataPositionStaticBehavesLikeRelative = 4, YGErrataAll = 2147483647, YGErrataClassic = 2147483646) YG_DEFINE_ENUM_FLAG_OPERATORS(YGErrata) diff --git a/yoga/enums/Errata.h b/yoga/enums/Errata.h index 257e7b24..6a085bf5 100644 --- a/yoga/enums/Errata.h +++ b/yoga/enums/Errata.h @@ -19,6 +19,7 @@ enum class Errata : uint32_t { None = YGErrataNone, StretchFlexBasis = YGErrataStretchFlexBasis, StartingEndingEdgeFromFlexDirection = YGErrataStartingEndingEdgeFromFlexDirection, + PositionStaticBehavesLikeRelative = YGErrataPositionStaticBehavesLikeRelative, All = YGErrataAll, Classic = YGErrataClassic, }; @@ -27,7 +28,7 @@ YG_DEFINE_ENUM_FLAG_OPERATORS(Errata) template <> constexpr inline int32_t ordinalCount() { - return 5; + return 6; } template <> -- 2.50.1.windows.1 From 4f98bfe40a72aed0d5888d9d5c5d9c2340da7f4f Mon Sep 17 00:00:00 2001 From: Joe Vilches Date: Thu, 26 Oct 2023 10:12:04 -0700 Subject: [PATCH 18/18] Add tests for absolute positioning of children with padding in the parent Summary: I was playing around with absolute children and padding and noticed an issue so adding tests to track. Made a github issue: https://github.com/facebook/yoga/issues/1436 Reviewed By: yungsters Differential Revision: D50670457 fbshipit-source-id: 4672d1e8b831a0a42509d95e91178944fc0f5c06 --- gentest/fixtures/YGAbsolutePositionTest.html | 16 ++ .../facebook/yoga/YGAbsolutePositionTest.java | 175 ++++++++++++++++ .../generated/YGAbsolutePositionTest.test.ts | 196 ++++++++++++++++++ tests/generated/YGAbsolutePositionTest.cpp | 182 ++++++++++++++++ 4 files changed, 569 insertions(+) diff --git a/gentest/fixtures/YGAbsolutePositionTest.html b/gentest/fixtures/YGAbsolutePositionTest.html index d0f5e9ee..8ccdc14b 100644 --- a/gentest/fixtures/YGAbsolutePositionTest.html +++ b/gentest/fixtures/YGAbsolutePositionTest.html @@ -100,3 +100,19 @@
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
diff --git a/java/tests/com/facebook/yoga/YGAbsolutePositionTest.java b/java/tests/com/facebook/yoga/YGAbsolutePositionTest.java index bc684568..5b87cd30 100644 --- a/java/tests/com/facebook/yoga/YGAbsolutePositionTest.java +++ b/java/tests/com/facebook/yoga/YGAbsolutePositionTest.java @@ -1215,6 +1215,181 @@ public class YGAbsolutePositionTest { assertEquals(50f, root_child0.getLayoutHeight(), 0.0f); } + @Test + @Ignore + public void test_absolute_layout_padding_left() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + root.setPadding(YogaEdge.LEFT, 100); + root.setWidth(200f); + root.setHeight(200f); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0.setWidth(50f); + root_child0.setHeight(50f); + root.addChildAt(root_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(100f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(150f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_absolute_layout_padding_right() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + root.setPadding(YogaEdge.RIGHT, 100); + root.setWidth(200f); + root.setHeight(200f); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0.setWidth(50f); + root_child0.setHeight(50f); + root.addChildAt(root_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(50f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0.getLayoutHeight(), 0.0f); + } + + @Test + @Ignore + public void test_absolute_layout_padding_top() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + root.setPadding(YogaEdge.TOP, 100); + root.setWidth(200f); + root.setHeight(200f); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0.setWidth(50f); + root_child0.setHeight(50f); + root.addChildAt(root_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(150f, root_child0.getLayoutX(), 0.0f); + assertEquals(100f, root_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0.getLayoutHeight(), 0.0f); + } + + @Test + public void test_absolute_layout_padding_bottom() { + YogaConfig config = YogaConfigFactory.create(); + config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); + + final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + root.setPadding(YogaEdge.BOTTOM, 100); + root.setWidth(200f); + root.setHeight(200f); + + final YogaNode root_child0 = createNode(config); + root_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0.setWidth(50f); + root_child0.setHeight(50f); + root.addChildAt(root_child0, 0); + root.setDirection(YogaDirection.LTR); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(0f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0.getLayoutHeight(), 0.0f); + + root.setDirection(YogaDirection.RTL); + root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); + + assertEquals(0f, root.getLayoutX(), 0.0f); + assertEquals(0f, root.getLayoutY(), 0.0f); + assertEquals(200f, root.getLayoutWidth(), 0.0f); + assertEquals(200f, root.getLayoutHeight(), 0.0f); + + assertEquals(150f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutY(), 0.0f); + assertEquals(50f, root_child0.getLayoutWidth(), 0.0f); + assertEquals(50f, root_child0.getLayoutHeight(), 0.0f); + } + private YogaNode createNode(YogaConfig config) { return mNodeFactory.create(config); } diff --git a/javascript/tests/generated/YGAbsolutePositionTest.test.ts b/javascript/tests/generated/YGAbsolutePositionTest.test.ts index 5f9b2d19..02af3779 100644 --- a/javascript/tests/generated/YGAbsolutePositionTest.test.ts +++ b/javascript/tests/generated/YGAbsolutePositionTest.test.ts @@ -1359,3 +1359,199 @@ test('absolute_layout_percentage_height_based_on_padded_parent_and_align_items_c config.free(); } }); +test.skip('absolute_layout_padding_left', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + root.setPadding(Edge.Left, 100); + root.setWidth(200); + root.setHeight(200); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Absolute); + root_child0.setWidth(50); + root_child0.setHeight(50); + root.insertChild(root_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(100); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(50); + expect(root_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(150); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(50); + expect(root_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('absolute_layout_padding_right', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + root.setPadding(Edge.Right, 100); + root.setWidth(200); + root.setHeight(200); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Absolute); + root_child0.setWidth(50); + root_child0.setHeight(50); + root.insertChild(root_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(50); + expect(root_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(50); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(50); + expect(root_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test.skip('absolute_layout_padding_top', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + root.setPadding(Edge.Top, 100); + root.setWidth(200); + root.setHeight(200); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Absolute); + root_child0.setWidth(50); + root_child0.setHeight(50); + root.insertChild(root_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(100); + expect(root_child0.getComputedWidth()).toBe(50); + expect(root_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(150); + expect(root_child0.getComputedTop()).toBe(100); + expect(root_child0.getComputedWidth()).toBe(50); + expect(root_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); +test('absolute_layout_padding_bottom', () => { + const config = Yoga.Config.create(); + let root; + + config.setExperimentalFeatureEnabled(ExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true); + + try { + root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + root.setPadding(Edge.Bottom, 100); + root.setWidth(200); + root.setHeight(200); + + const root_child0 = Yoga.Node.create(config); + root_child0.setPositionType(PositionType.Absolute); + root_child0.setWidth(50); + root_child0.setHeight(50); + root.insertChild(root_child0, 0); + root.calculateLayout(undefined, undefined, Direction.LTR); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(0); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(50); + expect(root_child0.getComputedHeight()).toBe(50); + + root.calculateLayout(undefined, undefined, Direction.RTL); + + expect(root.getComputedLeft()).toBe(0); + expect(root.getComputedTop()).toBe(0); + expect(root.getComputedWidth()).toBe(200); + expect(root.getComputedHeight()).toBe(200); + + expect(root_child0.getComputedLeft()).toBe(150); + expect(root_child0.getComputedTop()).toBe(0); + expect(root_child0.getComputedWidth()).toBe(50); + expect(root_child0.getComputedHeight()).toBe(50); + } finally { + if (typeof root !== 'undefined') { + root.freeRecursive(); + } + + config.free(); + } +}); diff --git a/tests/generated/YGAbsolutePositionTest.cpp b/tests/generated/YGAbsolutePositionTest.cpp index ce614e86..c164c76f 100644 --- a/tests/generated/YGAbsolutePositionTest.cpp +++ b/tests/generated/YGAbsolutePositionTest.cpp @@ -1224,3 +1224,185 @@ TEST(YogaTest, absolute_layout_percentage_height_based_on_padded_parent_and_alig YGConfigFree(config); } + +TEST(YogaTest, absolute_layout_padding_left) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetPadding(root, YGEdgeLeft, 100); + YGNodeStyleSetWidth(root, 200); + YGNodeStyleSetHeight(root, 200); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); + YGNodeStyleSetWidth(root_child0, 50); + YGNodeStyleSetHeight(root_child0, 50); + YGNodeInsertChild(root, root_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, absolute_layout_padding_right) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetPadding(root, YGEdgeRight, 100); + YGNodeStyleSetWidth(root, 200); + YGNodeStyleSetHeight(root, 200); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); + YGNodeStyleSetWidth(root_child0, 50); + YGNodeStyleSetHeight(root_child0, 50); + YGNodeInsertChild(root, root_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, absolute_layout_padding_top) { + GTEST_SKIP(); + + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetPadding(root, YGEdgeTop, 100); + YGNodeStyleSetWidth(root, 200); + YGNodeStyleSetHeight(root, 200); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); + YGNodeStyleSetWidth(root_child0, 50); + YGNodeStyleSetHeight(root_child0, 50); + YGNodeInsertChild(root, root_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, absolute_layout_padding_bottom) { + const YGConfigRef config = YGConfigNew(); + YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); + + const YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetPadding(root, YGEdgeBottom, 100); + YGNodeStyleSetWidth(root, 200); + YGNodeStyleSetHeight(root, 200); + + const YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); + YGNodeStyleSetWidth(root_child0, 50); + YGNodeStyleSetHeight(root_child0, 50); + YGNodeInsertChild(root, root_child0, 0); + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0)); + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(150, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} -- 2.50.1.windows.1