Update gentest to account for box sizing (#1700)

Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1700

tsia, need to teach gentest to write box sizing now.

Reviewed By: NickGerleman

Differential Revision: D63138372

fbshipit-source-id: 29072b3e602fe77edb14a8857a83e5bba4c92205
This commit is contained in:
Joe Vilches
2024-09-25 15:46:55 -07:00
committed by Facebook GitHub Bot
parent 43d920eab0
commit 8277df7e1f
30 changed files with 281 additions and 24 deletions

View File

@@ -30,6 +30,7 @@ JavascriptEmitter.prototype = Object.create(Emitter.prototype, {
this.push('import {');
this.pushIndent();
this.push('Align,');
this.push('BoxSizing,');
this.push('Direction,');
this.push('Display,');
this.push('Edge,');
@@ -171,6 +172,9 @@ JavascriptEmitter.prototype = Object.create(Emitter.prototype, {
YGDisplayFlex: {value: 'Display.Flex'},
YGDisplayNone: {value: 'Display.None'},
YGBoxSizingBorderBox: {value: 'BoxSizing.BorderBox'},
YGBoxSizingContentBox: {value: 'BoxSizing.ContentBox'},
YGNodeCalculateLayout: {
value: function (node, dir, _experiments) {
this.push(node + '.calculateLayout(undefined, undefined, ' + dir + ');');
@@ -410,6 +414,12 @@ JavascriptEmitter.prototype = Object.create(Emitter.prototype, {
},
},
YGNodeStyleSetBoxSizing: {
value: function (nodeName, value) {
this.push(nodeName + '.setBoxSizing(' + toValueJavascript(value) + ');');
},
},
YGNodeSetMeasureFunc: {
value: function (nodeName, innerText) {
this.push(