Skip to content

Commit 5ee00ec

Browse files
Merge branch 'main' into css-grid-1-data-structures
2 parents 8d4b7ff + d039679 commit 5ee00ec

132 files changed

Lines changed: 5259 additions & 3649 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/validate-android.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
- 'release-*'
99
workflow_dispatch:
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
build:
1316
name: Build [${{ matrix.os }}][${{ matrix.mode }}]

.github/workflows/validate-cpp.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
env:
1212
GTEST_COLOR: 1
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
test:
1619
name: Build and Test [${{ matrix.toolchain }}][${{ matrix.mode }}]

.github/workflows/validate-js.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
env:
1212
FORCE_COLOR: 3
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
benchmark:
1619
name: Benchmark [${{ matrix.os }}]

.github/workflows/validate-swiftpm.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
- 'release-*'
99
workflow_dispatch:
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
test:
1316
name: Build

.github/workflows/validate-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
- main
88
workflow_dispatch:
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
validate:
1215
name: Validate

.github/workflows/validate-website.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- main
1010
workflow_dispatch:
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
build_next:
1417
name: Build

enums.py

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@
8686
# Absolute nodes will resolve percentages against the inner size of
8787
# their containing node, not the padding box
8888
("AbsolutePercentAgainstInnerSize", 1 << 2),
89+
# Treat main-axis `min-{width,height}: undefined` as "no floor"
90+
# instead of the CSS §4.5 automatic minimum (which derives a
91+
# content-based floor from the item's min-content size). Set by
92+
# default on new configs to preserve pre-§4.5 Yoga shrink behavior.
93+
# Clear this bit to opt into the spec-correct CSS §4.5 floor.
94+
("MinSizeUndefinedInsteadOfAuto", 1 << 3),
8995
# Enable all incorrect behavior (preserve compatibility)
9096
("All", 0x7FFFFFFF),
9197
# Enable all errata except for "StretchFlexBasis" (Defaults behavior
@@ -95,7 +101,27 @@
95101
}
96102

97103
# Temporary filter enums to not upgrade all enums at once
98-
KOTLIN_ENUM_NAMES = {"Direction"}
104+
KOTLIN_ENUM_NAMES = {
105+
"Direction",
106+
"Align",
107+
"BoxSizing",
108+
"Dimension",
109+
"Display",
110+
"Edge",
111+
"Errata",
112+
"ExperimentalFeature",
113+
"FlexDirection",
114+
"GridTrackType",
115+
"Gutter",
116+
"Justify",
117+
"LogLevel",
118+
"MeasureMode",
119+
"NodeType",
120+
"Overflow",
121+
"PositionType",
122+
"Unit",
123+
"Wrap",
124+
}
99125

100126
ENUMS_KOTLIN = {name: ENUMS[name] for name in KOTLIN_ENUM_NAMES}
101127
ENUMS_JAVA = {
@@ -294,6 +320,9 @@ def to_hyphenated_lower(symbol):
294320
with open(root + "/java/com/facebook/yoga/Yoga%s.kt" % name, "w") as f:
295321
f.write(get_license("kotlin"))
296322
f.write("package com.facebook.yoga\n\n")
323+
if name in DO_NOT_STRIP:
324+
f.write("import com.facebook.yoga.annotations.DoNotStrip\n\n")
325+
f.write("@DoNotStrip\n")
297326
f.write("public enum class Yoga%s(public val intValue: Int) {\n" % name)
298327
if len(values) > 0:
299328
for value in values:
@@ -311,6 +340,8 @@ def to_hyphenated_lower(symbol):
311340
f.write(" public fun intValue(): Int = intValue\n")
312341
f.write("\n")
313342
f.write(" public companion object {\n")
343+
if name in DO_NOT_STRIP:
344+
f.write(" @DoNotStrip\n")
314345
f.write(" @JvmStatic\n")
315346
f.write(" public fun fromInt(value: Int): Yoga%s =\n" % name)
316347
f.write(" when (value) {\n")

gentest/src/CssToYoga.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99

1010
import type Emitter from './emitters/Emitter.ts';
11-
import type {ParsedStyles, ValueWithUnit} from './Types.ts';
11+
import type {ParsedStyles, ValueWithUnit} from './types.ts';
1212

1313
const INVISIBLE_BORDER_STYLES = new Set(['none', 'initial']);
1414

gentest/src/buildLayoutTree.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99

1010
import type {WebDriver} from 'selenium-webdriver';
11-
import type {LayoutNode} from './Types.ts';
11+
import type {LayoutNode} from './types.ts';
1212

1313
/**
1414
* Build the layout tree by querying the DOM via a single executeScript call.

gentest/src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import readline from 'node:readline/promises';
1818
import signedsource from 'signedsource';
1919
import {glob} from 'glob';
2020

21-
import type {LayoutNode} from './Types.ts';
21+
import type {LayoutNode} from './types.ts';
2222
import {createChromePool} from './ChromePool.ts';
2323
import buildLayoutTree from './buildLayoutTree.ts';
2424
import {CppEmitter} from './emitters/CppEmitter.ts';

0 commit comments

Comments
 (0)