@triniwiz/nativescript-masonkit 1.0.0-beta.106 → 1.0.0-beta.108
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common.d.ts +22 -2
- package/common.js +143 -21
- package/common.js.map +1 -1
- package/css-shorthands.js +11 -1
- package/css-shorthands.js.map +1 -1
- package/img/index.ios.js +1 -1
- package/img/index.ios.js.map +1 -1
- package/input/index.ios.js +1 -1
- package/input/index.ios.js.map +1 -1
- package/li/index.ios.js +1 -1
- package/li/index.ios.js.map +1 -1
- package/list/index.ios.js +2 -2
- package/list/index.ios.js.map +1 -1
- package/package.json +1 -1
- package/platforms/android/masonkit-release.aar +0 -0
- package/platforms/ios/Mason.xcframework/Info.plist +11 -11
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +7 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +33 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +1779 -1631
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +5 -4
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +5 -4
- package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +8713 -8674
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +14 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +33 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +1779 -1631
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +5 -4
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +5 -4
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +1779 -1631
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +5 -4
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +5 -4
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +28 -28
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +8708 -8668
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/x86_64/Mason.yml +8310 -8286
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Headers/Mason-Swift.h +7 -0
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Headers/mason_native.h +33 -0
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-xros.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.abi.json +1779 -1631
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.private.swiftinterface +5 -4
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.swiftinterface +5 -4
- package/platforms/ios/Mason.xcframework/xros-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +8204 -8166
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Headers/Mason-Swift.h +7 -0
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Headers/mason_native.h +33 -0
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-xros-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.abi.json +1779 -1631
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.private.swiftinterface +5 -4
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.swiftinterface +5 -4
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/_CodeSignature/CodeResources +16 -16
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +8204 -8166
- package/properties.js +86 -0
- package/properties.js.map +1 -1
- package/scroll/index.android.js +3 -1
- package/scroll/index.android.js.map +1 -1
- package/scroll/index.ios.js +5 -2
- package/scroll/index.ios.js.map +1 -1
- package/style.d.ts +29 -6
- package/style.js +257 -216
- package/style.js.map +1 -1
- package/text/index.android.js +9 -2
- package/text/index.android.js.map +1 -1
- package/text/index.ios.js +12 -3
- package/text/index.ios.js.map +1 -1
- package/textarea/index.ios.js +1 -1
- package/textarea/index.ios.js.map +1 -1
- package/view/index.ios.js +1 -0
- package/view/index.ios.js.map +1 -1
package/style.js
CHANGED
|
@@ -493,28 +493,43 @@ function parseLengthPercentage(type, value) {
|
|
|
493
493
|
return { value, unit: '%' };
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
|
+
// The 128-bit dirty mask as four signed 32-bit words, low to high (the
|
|
497
|
+
// syncStyleParts argument order). Plain numbers: BigInt ops allocate.
|
|
496
498
|
class StateKeys {
|
|
497
|
-
constructor(
|
|
498
|
-
this.
|
|
499
|
+
constructor(w0, w1, w2, w3) {
|
|
500
|
+
this.w0 = w0;
|
|
501
|
+
this.w1 = w1;
|
|
502
|
+
this.w2 = w2;
|
|
503
|
+
this.w3 = w3;
|
|
499
504
|
}
|
|
500
505
|
static flag(n) {
|
|
501
|
-
|
|
506
|
+
const bit = (1 << (n & 31)) | 0;
|
|
507
|
+
switch (n >> 5) {
|
|
508
|
+
case 0:
|
|
509
|
+
return new StateKeys(bit, 0, 0, 0);
|
|
510
|
+
case 1:
|
|
511
|
+
return new StateKeys(0, bit, 0, 0);
|
|
512
|
+
case 2:
|
|
513
|
+
return new StateKeys(0, 0, bit, 0);
|
|
514
|
+
default:
|
|
515
|
+
return new StateKeys(0, 0, 0, bit);
|
|
516
|
+
}
|
|
502
517
|
}
|
|
503
|
-
|
|
504
|
-
get
|
|
505
|
-
return this.
|
|
518
|
+
/** The mask as one unsigned 128-bit value (tests and diagnostics). */
|
|
519
|
+
get bits() {
|
|
520
|
+
return wordsToBigInt(this.w0, this.w1, this.w2, this.w3);
|
|
506
521
|
}
|
|
507
522
|
or(other) {
|
|
508
|
-
return new StateKeys(this.
|
|
523
|
+
return new StateKeys(this.w0 | other.w0, this.w1 | other.w1, this.w2 | other.w2, this.w3 | other.w3);
|
|
509
524
|
}
|
|
510
525
|
and(other) {
|
|
511
|
-
return new StateKeys(this.
|
|
526
|
+
return new StateKeys(this.w0 & other.w0, this.w1 & other.w1, this.w2 & other.w2, this.w3 & other.w3);
|
|
512
527
|
}
|
|
513
528
|
hasFlag(flag) {
|
|
514
|
-
return (this.
|
|
529
|
+
return (this.w0 & flag.w0) !== 0 || (this.w1 & flag.w1) !== 0 || (this.w2 & flag.w2) !== 0 || (this.w3 & flag.w3) !== 0;
|
|
515
530
|
}
|
|
516
531
|
}
|
|
517
|
-
StateKeys.NONE = new StateKeys(
|
|
532
|
+
StateKeys.NONE = new StateKeys(0, 0, 0, 0);
|
|
518
533
|
StateKeys.DISPLAY = StateKeys.flag(0);
|
|
519
534
|
StateKeys.POSITION = StateKeys.flag(1);
|
|
520
535
|
StateKeys.DIRECTION = StateKeys.flag(2);
|
|
@@ -594,6 +609,10 @@ StateKeys.HYPHENS = StateKeys.flag(75);
|
|
|
594
609
|
StateKeys.CARET_COLOR = StateKeys.flag(76);
|
|
595
610
|
StateKeys.WORD_SPACING = StateKeys.flag(77);
|
|
596
611
|
StateKeys.FONT_STRETCH = StateKeys.flag(78);
|
|
612
|
+
StateKeys.DISPLAY_AND_MODE = StateKeys.DISPLAY.or(StateKeys.DISPLAY_MODE);
|
|
613
|
+
function wordsToBigInt(w0, w1, w2, w3) {
|
|
614
|
+
return BigInt(w0 >>> 0) | (BigInt(w1 >>> 0) << 32n) | (BigInt(w2 >>> 0) << 64n) | (BigInt(w3 >>> 0) << 96n);
|
|
615
|
+
}
|
|
597
616
|
const getInt8 = (view, offset) => {
|
|
598
617
|
return view.getInt8(offset);
|
|
599
618
|
};
|
|
@@ -606,37 +625,6 @@ const getUint8 = (view, offset) => {
|
|
|
606
625
|
const setUint8 = (view, offset, value) => {
|
|
607
626
|
view.setUint8(offset, value);
|
|
608
627
|
};
|
|
609
|
-
const splitBigIntToInt64Parts = (value) => {
|
|
610
|
-
const MASK64 = (1n << 64n) - 1n;
|
|
611
|
-
const LOW = value & MASK64;
|
|
612
|
-
let HIGH = value >> 64n;
|
|
613
|
-
// Ensure HIGH fits into signed 64-bit range
|
|
614
|
-
const SIGN_BIT = 1n << 63n;
|
|
615
|
-
if ((HIGH & SIGN_BIT) !== 0n) {
|
|
616
|
-
// convert to signed representation
|
|
617
|
-
HIGH = HIGH - (1n << 64n);
|
|
618
|
-
}
|
|
619
|
-
let lowSigned = LOW;
|
|
620
|
-
if ((LOW & SIGN_BIT) !== 0n) {
|
|
621
|
-
lowSigned = LOW - (1n << 64n);
|
|
622
|
-
}
|
|
623
|
-
return [lowSigned.toString(), HIGH.toString()];
|
|
624
|
-
};
|
|
625
|
-
// Android-only fast path for syncStyle(): splits the 128-bit dirty mask into
|
|
626
|
-
// four signed 32-bit words (plain {N} int marshalling) instead of two 64-bit
|
|
627
|
-
// decimal strings. Recombined via (high32 << 32) | (low32 & 0xffffffff) in
|
|
628
|
-
// Element.syncStyleParts.
|
|
629
|
-
const splitBigIntToInt32Parts = (value) => {
|
|
630
|
-
const MASK64 = (1n << 64n) - 1n;
|
|
631
|
-
const MASK32 = 0xffffffffn;
|
|
632
|
-
const LOW = value & MASK64;
|
|
633
|
-
const HIGH = (value >> 64n) & MASK64;
|
|
634
|
-
const lowLow32 = Number(BigInt.asIntN(32, LOW & MASK32));
|
|
635
|
-
const lowHigh32 = Number(BigInt.asIntN(32, (LOW >> 32n) & MASK32));
|
|
636
|
-
const highLow32 = Number(BigInt.asIntN(32, HIGH & MASK32));
|
|
637
|
-
const highHigh32 = Number(BigInt.asIntN(32, (HIGH >> 32n) & MASK32));
|
|
638
|
-
return [lowLow32, lowHigh32, highLow32, highHigh32];
|
|
639
|
-
};
|
|
640
628
|
const getInt16 = (view, offset) => {
|
|
641
629
|
return view.getInt16(offset, true);
|
|
642
630
|
};
|
|
@@ -1167,6 +1155,14 @@ function androidWritableStyleBuffer(nativeView) {
|
|
|
1167
1155
|
}
|
|
1168
1156
|
return typeof style.getWritableValue === 'function' ? style.getWritableValue() : style.getValues();
|
|
1169
1157
|
}
|
|
1158
|
+
let appleWritableStyleValues;
|
|
1159
|
+
// Newer frameworks return the node's own (copied-on-write) buffer in one call.
|
|
1160
|
+
function appleHasWritableStyleValues(nativeView) {
|
|
1161
|
+
if (appleWritableStyleValues === undefined && nativeView) {
|
|
1162
|
+
appleWritableStyleValues = typeof nativeView.mason_writableStyleValues === 'function';
|
|
1163
|
+
}
|
|
1164
|
+
return !!appleWritableStyleValues;
|
|
1165
|
+
}
|
|
1170
1166
|
function windowsStyleValues(nativeView) {
|
|
1171
1167
|
if (nativeView?.Node)
|
|
1172
1168
|
return masonEngine().StyleValues(nativeView);
|
|
@@ -1188,7 +1184,13 @@ function cssInitialIfReset(value, initial) {
|
|
|
1188
1184
|
}
|
|
1189
1185
|
export class Style {
|
|
1190
1186
|
constructor() {
|
|
1191
|
-
this.
|
|
1187
|
+
this._bufferRequested = false;
|
|
1188
|
+
// Dirty mask words (StateKeys layout); `_hasDirty` false means clean.
|
|
1189
|
+
this._d0 = 0;
|
|
1190
|
+
this._d1 = 0;
|
|
1191
|
+
this._d2 = 0;
|
|
1192
|
+
this._d3 = 0;
|
|
1193
|
+
this._hasDirty = false;
|
|
1192
1194
|
this.inBatch = false;
|
|
1193
1195
|
this._syncScheduled = false;
|
|
1194
1196
|
// Buffer bytes before this turn's first write. Frameworks often undo and
|
|
@@ -1199,39 +1201,86 @@ export class Style {
|
|
|
1199
1201
|
this._synced = false;
|
|
1200
1202
|
}
|
|
1201
1203
|
static fromView(view, nativeView) {
|
|
1202
|
-
//console.time('fromView');
|
|
1203
1204
|
const ret = new Style();
|
|
1204
1205
|
ret.view_ = view;
|
|
1205
1206
|
ret.nativeView = nativeView;
|
|
1207
|
+
return ret;
|
|
1208
|
+
}
|
|
1209
|
+
get style_view() {
|
|
1210
|
+
if (!this._bufferRequested)
|
|
1211
|
+
this.loadBuffer(false);
|
|
1212
|
+
return this._sv;
|
|
1213
|
+
}
|
|
1214
|
+
set style_view(value) {
|
|
1215
|
+
this._bufferRequested = true;
|
|
1216
|
+
this._sv = value;
|
|
1217
|
+
}
|
|
1218
|
+
get i8View() {
|
|
1219
|
+
if (!this._bufferRequested)
|
|
1220
|
+
this.loadBuffer(false);
|
|
1221
|
+
if (this._i8 === undefined && this._sv)
|
|
1222
|
+
this._i8 = new Int8Array(this._sv.buffer, this._sv.byteOffset, this._sv.byteLength);
|
|
1223
|
+
return this._i8;
|
|
1224
|
+
}
|
|
1225
|
+
set i8View(value) {
|
|
1226
|
+
this._i8 = value;
|
|
1227
|
+
}
|
|
1228
|
+
get u8View() {
|
|
1229
|
+
if (!this._bufferRequested)
|
|
1230
|
+
this.loadBuffer(false);
|
|
1231
|
+
if (this._u8 === undefined && this._sv)
|
|
1232
|
+
this._u8 = new Uint8Array(this._sv.buffer, this._sv.byteOffset, this._sv.byteLength);
|
|
1233
|
+
return this._u8;
|
|
1234
|
+
}
|
|
1235
|
+
set u8View(value) {
|
|
1236
|
+
this._u8 = value;
|
|
1237
|
+
}
|
|
1238
|
+
/** The native MasonStyle, fetched once (each `nativeView.style` read is a bridge call). */
|
|
1239
|
+
get appleStyle() {
|
|
1240
|
+
if (this._appleStyle === undefined) {
|
|
1241
|
+
this._appleStyle = (this.nativeView?.style ?? NSCMason.shared.styleForViewOrNode(this.nativeView));
|
|
1242
|
+
}
|
|
1243
|
+
return this._appleStyle;
|
|
1244
|
+
}
|
|
1245
|
+
// The byte views are rarely read, so they are made on demand.
|
|
1246
|
+
setBuffer(buffer) {
|
|
1247
|
+
this._bufferRequested = true;
|
|
1248
|
+
this._sv = new DataView(buffer);
|
|
1249
|
+
this._i8 = undefined;
|
|
1250
|
+
this._u8 = undefined;
|
|
1251
|
+
}
|
|
1252
|
+
// A new node shares the arena's default buffer, so a style whose first use
|
|
1253
|
+
// is a write asks for its own copy up front instead of fetching twice.
|
|
1254
|
+
loadBuffer(writable) {
|
|
1255
|
+
this._bufferRequested = true;
|
|
1206
1256
|
if (__ANDROID__) {
|
|
1207
|
-
|
|
1208
|
-
ret.style_view = new DataView(buffer);
|
|
1209
|
-
ret.i8View = new Int8Array(buffer);
|
|
1210
|
-
ret.u8View = new Uint8Array(buffer);
|
|
1257
|
+
this.setBuffer(ArrayBuffer.from(androidWritableStyleBuffer(this.nativeView)));
|
|
1211
1258
|
}
|
|
1212
1259
|
else if (__APPLE__) {
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1260
|
+
const nativeView = this.nativeView;
|
|
1261
|
+
let data = null;
|
|
1262
|
+
if (writable && appleHasWritableStyleValues(nativeView)) {
|
|
1263
|
+
data = nativeView.mason_writableStyleValues();
|
|
1216
1264
|
}
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1265
|
+
if (!data) {
|
|
1266
|
+
const style = this.appleStyle;
|
|
1267
|
+
if (writable)
|
|
1268
|
+
style.prepareMut();
|
|
1269
|
+
data = style.values;
|
|
1270
|
+
}
|
|
1271
|
+
this.setBuffer(interop.bufferFromData(data));
|
|
1222
1272
|
}
|
|
1223
1273
|
else if (__WINDOWS__) {
|
|
1224
1274
|
// Live IBuffer over the engine's arena style memory; the @nativescript/windows runtime
|
|
1225
1275
|
// projects it as a writable ArrayBuffer, so the same StyleKeys-offset writes used on
|
|
1226
1276
|
// iOS/Android land straight in the node's style.
|
|
1227
1277
|
//@ts-ignore
|
|
1228
|
-
|
|
1229
|
-
ret.style_view = new DataView(buffer);
|
|
1230
|
-
ret.i8View = new Int8Array(buffer);
|
|
1231
|
-
ret.u8View = new Uint8Array(buffer);
|
|
1278
|
+
this.setBuffer(NSWinRT.interop.arrayBufferFromBuffer(windowsStyleValues(this.nativeView)));
|
|
1232
1279
|
}
|
|
1233
|
-
|
|
1234
|
-
|
|
1280
|
+
}
|
|
1281
|
+
/** The dirty mask as one value, `-1n` when clean (tests and diagnostics). */
|
|
1282
|
+
get isDirty() {
|
|
1283
|
+
return this._hasDirty ? wordsToBigInt(this._d0, this._d1, this._d2, this._d3) : -1n;
|
|
1235
1284
|
}
|
|
1236
1285
|
static fromPseudo(pseudo, view, nativeView) {
|
|
1237
1286
|
var mask = -1;
|
|
@@ -1305,13 +1354,11 @@ export class Style {
|
|
|
1305
1354
|
const HIGH_OFFSET = StyleKeys.PSEUDO_SET_MASK_HIGH;
|
|
1306
1355
|
if (this.style_view.byteLength < HIGH_OFFSET + 8)
|
|
1307
1356
|
return;
|
|
1308
|
-
const
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
this.style_view.setBigUint64(LOW_OFFSET, low | keyLow, true);
|
|
1314
|
-
this.style_view.setBigUint64(HIGH_OFFSET, high | keyHigh, true);
|
|
1357
|
+
const v = this.style_view;
|
|
1358
|
+
setInt32(v, LOW_OFFSET, getInt32(v, LOW_OFFSET) | key.w0);
|
|
1359
|
+
setInt32(v, LOW_OFFSET + 4, getInt32(v, LOW_OFFSET + 4) | key.w1);
|
|
1360
|
+
setInt32(v, HIGH_OFFSET, getInt32(v, HIGH_OFFSET) | key.w2);
|
|
1361
|
+
setInt32(v, HIGH_OFFSET + 4, getInt32(v, HIGH_OFFSET + 4) | key.w3);
|
|
1315
1362
|
}
|
|
1316
1363
|
commitState(value) {
|
|
1317
1364
|
if (this._pseudo) {
|
|
@@ -1503,7 +1550,7 @@ export class Style {
|
|
|
1503
1550
|
}
|
|
1504
1551
|
}
|
|
1505
1552
|
setBorderColor(value) {
|
|
1506
|
-
if (!(__WINDOWS__ || __ANDROID__) || !this.style_view)
|
|
1553
|
+
if (!(__WINDOWS__ || __ANDROID__ || __APPLE__) || !this.style_view)
|
|
1507
1554
|
return;
|
|
1508
1555
|
const c = parseSidesColorShorthand(String(value ?? ''));
|
|
1509
1556
|
this.writeBorderSide('top', null, null, c.t);
|
|
@@ -1522,13 +1569,14 @@ export class Style {
|
|
|
1522
1569
|
this.commitState(StateKeys.BORDER_COLOR);
|
|
1523
1570
|
}
|
|
1524
1571
|
resetState() {
|
|
1525
|
-
this.
|
|
1572
|
+
this._hasDirty = false;
|
|
1573
|
+
this._d0 = this._d1 = this._d2 = this._d3 = 0;
|
|
1526
1574
|
}
|
|
1527
1575
|
syncStyle() {
|
|
1528
1576
|
this._synced = true;
|
|
1529
1577
|
const snapshot = this._turnSnapshot;
|
|
1530
1578
|
this._turnSnapshot = undefined;
|
|
1531
|
-
if (snapshot && this.
|
|
1579
|
+
if (snapshot && this._hasDirty && bytesEqual(snapshot, this.u8View)) {
|
|
1532
1580
|
this.resetState();
|
|
1533
1581
|
return;
|
|
1534
1582
|
}
|
|
@@ -1537,18 +1585,16 @@ export class Style {
|
|
|
1537
1585
|
}
|
|
1538
1586
|
_sendSync() {
|
|
1539
1587
|
if (__ANDROID__) {
|
|
1540
|
-
const [lowLow, lowHigh, highLow, highHigh] = splitBigIntToInt32Parts(this.isDirty);
|
|
1541
1588
|
//@ts-ignore
|
|
1542
1589
|
const view = this.view?.android ?? this.view._view;
|
|
1543
1590
|
// @ts-ignore - syncStyleParts is a newer native method; typings regenerate from the AAR separately.
|
|
1544
|
-
view.syncStyleParts(
|
|
1591
|
+
view.syncStyleParts(this._d0, this._d1, this._d2, this._d3);
|
|
1545
1592
|
}
|
|
1546
1593
|
else if (__APPLE__) {
|
|
1547
|
-
const [low, high] = splitBigIntToInt64Parts(this.isDirty);
|
|
1548
1594
|
//@ts-ignore
|
|
1549
1595
|
const view = this.view?.ios ?? this.view._view;
|
|
1550
1596
|
// @ts-ignore
|
|
1551
|
-
view.
|
|
1597
|
+
view.mason_syncStyleParts(this._d0, this._d1, this._d2, this._d3);
|
|
1552
1598
|
}
|
|
1553
1599
|
else if (__WINDOWS__) {
|
|
1554
1600
|
// The Windows elements re-read the whole buffer, so the dirty bits aren't passed.
|
|
@@ -1572,12 +1618,11 @@ export class Style {
|
|
|
1572
1618
|
if (this._turnSnapshot === undefined) {
|
|
1573
1619
|
this._turnSnapshot = false;
|
|
1574
1620
|
}
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
}
|
|
1621
|
+
this._d0 |= value.w0;
|
|
1622
|
+
this._d1 |= value.w1;
|
|
1623
|
+
this._d2 |= value.w2;
|
|
1624
|
+
this._d3 |= value.w3;
|
|
1625
|
+
this._hasDirty = true;
|
|
1581
1626
|
if (!this.inBatch) {
|
|
1582
1627
|
// Coalesce rapid-fire property changes (e.g. CSS batch apply) into a
|
|
1583
1628
|
// single syncStyle() call on the next microtask. This avoids N
|
|
@@ -1591,7 +1636,7 @@ export class Style {
|
|
|
1591
1636
|
}
|
|
1592
1637
|
_flushScheduledSync() {
|
|
1593
1638
|
this._syncScheduled = false;
|
|
1594
|
-
if (this.
|
|
1639
|
+
if (this._hasDirty) {
|
|
1595
1640
|
this.syncStyle();
|
|
1596
1641
|
}
|
|
1597
1642
|
}
|
|
@@ -1620,40 +1665,18 @@ export class Style {
|
|
|
1620
1665
|
return own > 0 ? own : cssUnits.rootFontSize;
|
|
1621
1666
|
}
|
|
1622
1667
|
prepareMut() {
|
|
1623
|
-
// always mut
|
|
1624
1668
|
if (this._pseudo) {
|
|
1625
1669
|
return;
|
|
1626
1670
|
}
|
|
1627
|
-
if (this.
|
|
1671
|
+
if (!this._bufferRequested) {
|
|
1672
|
+
this.loadBuffer(true);
|
|
1673
|
+
}
|
|
1674
|
+
if (this._turnSnapshot === undefined && !this._hasDirty && this._sv) {
|
|
1628
1675
|
this._turnSnapshot = this._synced ? this.u8View.slice() : false;
|
|
1629
1676
|
}
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
let style = this.nativeView?.style;
|
|
1634
|
-
if (!style) {
|
|
1635
|
-
style = NSCMason.shared.styleForViewOrNode(this.nativeView);
|
|
1636
|
-
}
|
|
1637
|
-
style.prepareMut();
|
|
1638
|
-
const styleBuffer = style.values;
|
|
1639
|
-
const buffer = interop.bufferFromData(styleBuffer);
|
|
1640
|
-
this.style_view = new DataView(buffer);
|
|
1641
|
-
this.i8View = new Int8Array(buffer);
|
|
1642
|
-
this.u8View = new Uint8Array(buffer);
|
|
1643
|
-
}
|
|
1644
|
-
if (__ANDROID__) {
|
|
1645
|
-
const buffer = ArrayBuffer.from(androidWritableStyleBuffer(this.nativeView));
|
|
1646
|
-
this.style_view = new DataView(buffer);
|
|
1647
|
-
this.i8View = new Int8Array(buffer);
|
|
1648
|
-
this.u8View = new Uint8Array(buffer);
|
|
1649
|
-
}
|
|
1650
|
-
if (__WINDOWS__) {
|
|
1651
|
-
//@ts-ignore
|
|
1652
|
-
const buffer = NSWinRT.interop.arrayBufferFromBuffer(windowsStyleValues(this.nativeView));
|
|
1653
|
-
this.style_view = new DataView(buffer);
|
|
1654
|
-
this.i8View = new Int8Array(buffer);
|
|
1655
|
-
this.u8View = new Uint8Array(buffer);
|
|
1656
|
-
}
|
|
1677
|
+
if (getUint32(this._sv, StyleKeys.REF_COUNT) !== 1) {
|
|
1678
|
+
// Still the shared buffer (read before the first write): take a copy.
|
|
1679
|
+
this.loadBuffer(true);
|
|
1657
1680
|
}
|
|
1658
1681
|
}
|
|
1659
1682
|
get boxSizing() {
|
|
@@ -2039,14 +2062,7 @@ export class Style {
|
|
|
2039
2062
|
this.prepareMut();
|
|
2040
2063
|
setInt8(this.style_view, StyleKeys.DISPLAY, display);
|
|
2041
2064
|
setInt8(this.style_view, StyleKeys.DISPLAY_MODE, displayMode);
|
|
2042
|
-
|
|
2043
|
-
this.isDirty = StateKeys.DISPLAY_MODE.bits;
|
|
2044
|
-
}
|
|
2045
|
-
else {
|
|
2046
|
-
this.isDirty = this.isDirty | StateKeys.DISPLAY_MODE.bits;
|
|
2047
|
-
}
|
|
2048
|
-
// DISPLAY/DISPLAY_MODE are disjoint bits; use .or(), not .and()
|
|
2049
|
-
this.commitState(StateKeys.DISPLAY.or(StateKeys.DISPLAY_MODE));
|
|
2065
|
+
this.commitState(StateKeys.DISPLAY_AND_MODE);
|
|
2050
2066
|
}
|
|
2051
2067
|
}
|
|
2052
2068
|
get position() {
|
|
@@ -2201,8 +2217,12 @@ export class Style {
|
|
|
2201
2217
|
setInt8(this.style_view, StyleKeys.MIN_WIDTH_TYPE, 2);
|
|
2202
2218
|
setFloat32(this.style_view, StyleKeys.MIN_WIDTH_VALUE, value.value);
|
|
2203
2219
|
break;
|
|
2220
|
+
default:
|
|
2221
|
+
return;
|
|
2204
2222
|
}
|
|
2205
2223
|
break;
|
|
2224
|
+
default:
|
|
2225
|
+
return;
|
|
2206
2226
|
}
|
|
2207
2227
|
this.commitState(StateKeys.MIN_SIZE);
|
|
2208
2228
|
}
|
|
@@ -2242,8 +2262,12 @@ export class Style {
|
|
|
2242
2262
|
setInt8(this.style_view, StyleKeys.MIN_HEIGHT_TYPE, 2);
|
|
2243
2263
|
setFloat32(this.style_view, StyleKeys.MIN_HEIGHT_VALUE, value.value);
|
|
2244
2264
|
break;
|
|
2265
|
+
default:
|
|
2266
|
+
return;
|
|
2245
2267
|
}
|
|
2246
2268
|
break;
|
|
2269
|
+
default:
|
|
2270
|
+
return;
|
|
2247
2271
|
}
|
|
2248
2272
|
this.commitState(StateKeys.MIN_SIZE);
|
|
2249
2273
|
}
|
|
@@ -2283,8 +2307,12 @@ export class Style {
|
|
|
2283
2307
|
setInt8(this.style_view, StyleKeys.WIDTH_TYPE, 2);
|
|
2284
2308
|
setFloat32(this.style_view, StyleKeys.WIDTH_VALUE, value.value);
|
|
2285
2309
|
break;
|
|
2310
|
+
default:
|
|
2311
|
+
return;
|
|
2286
2312
|
}
|
|
2287
2313
|
break;
|
|
2314
|
+
default:
|
|
2315
|
+
return;
|
|
2288
2316
|
}
|
|
2289
2317
|
this.commitState(StateKeys.SIZE);
|
|
2290
2318
|
}
|
|
@@ -2324,8 +2352,12 @@ export class Style {
|
|
|
2324
2352
|
setInt8(this.style_view, StyleKeys.HEIGHT_TYPE, 2);
|
|
2325
2353
|
setFloat32(this.style_view, StyleKeys.HEIGHT_VALUE, value.value);
|
|
2326
2354
|
break;
|
|
2355
|
+
default:
|
|
2356
|
+
return;
|
|
2327
2357
|
}
|
|
2328
2358
|
break;
|
|
2359
|
+
default:
|
|
2360
|
+
return;
|
|
2329
2361
|
}
|
|
2330
2362
|
this.commitState(StateKeys.SIZE);
|
|
2331
2363
|
}
|
|
@@ -2365,8 +2397,12 @@ export class Style {
|
|
|
2365
2397
|
setInt8(this.style_view, StyleKeys.MAX_WIDTH_TYPE, 2);
|
|
2366
2398
|
setFloat32(this.style_view, StyleKeys.MAX_WIDTH_VALUE, value.value);
|
|
2367
2399
|
break;
|
|
2400
|
+
default:
|
|
2401
|
+
return;
|
|
2368
2402
|
}
|
|
2369
2403
|
break;
|
|
2404
|
+
default:
|
|
2405
|
+
return;
|
|
2370
2406
|
}
|
|
2371
2407
|
this.commitState(StateKeys.MAX_SIZE);
|
|
2372
2408
|
}
|
|
@@ -2406,8 +2442,12 @@ export class Style {
|
|
|
2406
2442
|
setInt8(this.style_view, StyleKeys.MAX_HEIGHT_TYPE, 2);
|
|
2407
2443
|
setFloat32(this.style_view, StyleKeys.MAX_HEIGHT_VALUE, value.value);
|
|
2408
2444
|
break;
|
|
2445
|
+
default:
|
|
2446
|
+
return;
|
|
2409
2447
|
}
|
|
2410
2448
|
break;
|
|
2449
|
+
default:
|
|
2450
|
+
return;
|
|
2411
2451
|
}
|
|
2412
2452
|
this.commitState(StateKeys.MAX_SIZE);
|
|
2413
2453
|
}
|
|
@@ -3720,7 +3760,7 @@ export class Style {
|
|
|
3720
3760
|
return nodeHelper().getGridAutoRows(this.nativeView);
|
|
3721
3761
|
}
|
|
3722
3762
|
if (__APPLE__) {
|
|
3723
|
-
return this.
|
|
3763
|
+
return this.appleStyle.gridAutoRows;
|
|
3724
3764
|
}
|
|
3725
3765
|
return '';
|
|
3726
3766
|
}
|
|
@@ -3734,7 +3774,7 @@ export class Style {
|
|
|
3734
3774
|
nodeHelper().setGridAutoRows(this.nativeView, value);
|
|
3735
3775
|
}
|
|
3736
3776
|
if (__APPLE__) {
|
|
3737
|
-
this.
|
|
3777
|
+
this.appleStyle.gridAutoRows = value;
|
|
3738
3778
|
}
|
|
3739
3779
|
if (__WINDOWS__) {
|
|
3740
3780
|
windowsSetGrid(this.nativeView, 'gridAutoRows', value);
|
|
@@ -3748,7 +3788,7 @@ export class Style {
|
|
|
3748
3788
|
return nodeHelper().getGridAutoColumns(this.nativeView);
|
|
3749
3789
|
}
|
|
3750
3790
|
if (__APPLE__) {
|
|
3751
|
-
return this.
|
|
3791
|
+
return this.appleStyle.gridAutoColumns;
|
|
3752
3792
|
}
|
|
3753
3793
|
return '';
|
|
3754
3794
|
}
|
|
@@ -3762,7 +3802,7 @@ export class Style {
|
|
|
3762
3802
|
nodeHelper().setGridAutoColumns(this.nativeView, value);
|
|
3763
3803
|
}
|
|
3764
3804
|
if (__APPLE__) {
|
|
3765
|
-
this.
|
|
3805
|
+
this.appleStyle.gridAutoColumns = value;
|
|
3766
3806
|
}
|
|
3767
3807
|
if (__WINDOWS__) {
|
|
3768
3808
|
windowsSetGrid(this.nativeView, 'gridAutoColumns', value);
|
|
@@ -3810,7 +3850,7 @@ export class Style {
|
|
|
3810
3850
|
nodeHelper().setGridColumn(this.nativeView, value);
|
|
3811
3851
|
}
|
|
3812
3852
|
if (__APPLE__) {
|
|
3813
|
-
this.
|
|
3853
|
+
this.appleStyle.gridColumn = value;
|
|
3814
3854
|
}
|
|
3815
3855
|
if (__WINDOWS__) {
|
|
3816
3856
|
windowsSetGrid(this.nativeView, 'gridColumn', value);
|
|
@@ -3824,7 +3864,7 @@ export class Style {
|
|
|
3824
3864
|
return nodeHelper().getGridColumn(this.nativeView);
|
|
3825
3865
|
}
|
|
3826
3866
|
if (__APPLE__) {
|
|
3827
|
-
return this.
|
|
3867
|
+
return this.appleStyle.gridColumn;
|
|
3828
3868
|
}
|
|
3829
3869
|
return '';
|
|
3830
3870
|
}
|
|
@@ -3836,7 +3876,7 @@ export class Style {
|
|
|
3836
3876
|
return nodeHelper().getGridColumnStart(this.nativeView);
|
|
3837
3877
|
}
|
|
3838
3878
|
if (__APPLE__) {
|
|
3839
|
-
return this.
|
|
3879
|
+
return this.appleStyle.gridColumnStart;
|
|
3840
3880
|
}
|
|
3841
3881
|
return '';
|
|
3842
3882
|
}
|
|
@@ -3850,7 +3890,7 @@ export class Style {
|
|
|
3850
3890
|
nodeHelper().setGridColumnStart(this.nativeView, value);
|
|
3851
3891
|
}
|
|
3852
3892
|
if (__APPLE__) {
|
|
3853
|
-
this.
|
|
3893
|
+
this.appleStyle.gridColumnStart = value;
|
|
3854
3894
|
}
|
|
3855
3895
|
if (__WINDOWS__) {
|
|
3856
3896
|
windowsSetGrid(this.nativeView, 'gridColumnStart', value);
|
|
@@ -3864,7 +3904,7 @@ export class Style {
|
|
|
3864
3904
|
return nodeHelper().getGridColumnEnd(this.nativeView);
|
|
3865
3905
|
}
|
|
3866
3906
|
if (__APPLE__) {
|
|
3867
|
-
return this.
|
|
3907
|
+
return this.appleStyle.gridColumnEnd;
|
|
3868
3908
|
}
|
|
3869
3909
|
return '';
|
|
3870
3910
|
}
|
|
@@ -3878,7 +3918,7 @@ export class Style {
|
|
|
3878
3918
|
nodeHelper().setGridColumnEnd(this.nativeView, value);
|
|
3879
3919
|
}
|
|
3880
3920
|
if (__APPLE__) {
|
|
3881
|
-
this.
|
|
3921
|
+
this.appleStyle.gridColumnEnd = value;
|
|
3882
3922
|
}
|
|
3883
3923
|
if (__WINDOWS__) {
|
|
3884
3924
|
windowsSetGrid(this.nativeView, 'gridColumnEnd', value);
|
|
@@ -3894,7 +3934,7 @@ export class Style {
|
|
|
3894
3934
|
nodeHelper().setGridRow(this.nativeView, value);
|
|
3895
3935
|
}
|
|
3896
3936
|
if (__APPLE__) {
|
|
3897
|
-
this.
|
|
3937
|
+
this.appleStyle.gridRow = value;
|
|
3898
3938
|
}
|
|
3899
3939
|
if (__WINDOWS__) {
|
|
3900
3940
|
windowsSetGrid(this.nativeView, 'gridRow', value);
|
|
@@ -3908,7 +3948,7 @@ export class Style {
|
|
|
3908
3948
|
return nodeHelper().getGridRow(this.nativeView);
|
|
3909
3949
|
}
|
|
3910
3950
|
if (__APPLE__) {
|
|
3911
|
-
return this.
|
|
3951
|
+
return this.appleStyle.gridRow;
|
|
3912
3952
|
}
|
|
3913
3953
|
return '';
|
|
3914
3954
|
}
|
|
@@ -3920,7 +3960,7 @@ export class Style {
|
|
|
3920
3960
|
return nodeHelper().getGridRowStart(this.nativeView);
|
|
3921
3961
|
}
|
|
3922
3962
|
if (__APPLE__) {
|
|
3923
|
-
return this.
|
|
3963
|
+
return this.appleStyle.gridRowStart;
|
|
3924
3964
|
}
|
|
3925
3965
|
return '';
|
|
3926
3966
|
}
|
|
@@ -3934,7 +3974,7 @@ export class Style {
|
|
|
3934
3974
|
nodeHelper().setGridRowStart(this.nativeView, value);
|
|
3935
3975
|
}
|
|
3936
3976
|
if (__APPLE__) {
|
|
3937
|
-
this.
|
|
3977
|
+
this.appleStyle.gridRowStart = value;
|
|
3938
3978
|
}
|
|
3939
3979
|
if (__WINDOWS__) {
|
|
3940
3980
|
windowsSetGrid(this.nativeView, 'gridRowStart', value);
|
|
@@ -3948,7 +3988,7 @@ export class Style {
|
|
|
3948
3988
|
return nodeHelper().getGridRowEnd(this.nativeView);
|
|
3949
3989
|
}
|
|
3950
3990
|
if (__APPLE__) {
|
|
3951
|
-
return this.
|
|
3991
|
+
return this.appleStyle.gridRowEnd;
|
|
3952
3992
|
}
|
|
3953
3993
|
return '';
|
|
3954
3994
|
}
|
|
@@ -3962,7 +4002,7 @@ export class Style {
|
|
|
3962
4002
|
nodeHelper().setGridRowEnd(this.nativeView, value);
|
|
3963
4003
|
}
|
|
3964
4004
|
if (__APPLE__) {
|
|
3965
|
-
this.
|
|
4005
|
+
this.appleStyle.gridRowEnd = value;
|
|
3966
4006
|
}
|
|
3967
4007
|
if (__WINDOWS__) {
|
|
3968
4008
|
windowsSetGrid(this.nativeView, 'gridRowEnd', value);
|
|
@@ -3978,7 +4018,7 @@ export class Style {
|
|
|
3978
4018
|
nodeHelper().setGridArea(this.nativeView, value);
|
|
3979
4019
|
}
|
|
3980
4020
|
if (__APPLE__) {
|
|
3981
|
-
this.
|
|
4021
|
+
this.appleStyle.gridArea = value;
|
|
3982
4022
|
}
|
|
3983
4023
|
if (__WINDOWS__) {
|
|
3984
4024
|
windowsSetGrid(this.nativeView, 'gridArea', value);
|
|
@@ -3992,7 +4032,7 @@ export class Style {
|
|
|
3992
4032
|
return nodeHelper().getGridArea(this.nativeView);
|
|
3993
4033
|
}
|
|
3994
4034
|
if (__APPLE__) {
|
|
3995
|
-
return this.
|
|
4035
|
+
return this.appleStyle.gridArea;
|
|
3996
4036
|
}
|
|
3997
4037
|
return '';
|
|
3998
4038
|
}
|
|
@@ -4006,7 +4046,7 @@ export class Style {
|
|
|
4006
4046
|
nodeHelper().setGridTemplateRows(this.nativeView, value);
|
|
4007
4047
|
}
|
|
4008
4048
|
if (__APPLE__) {
|
|
4009
|
-
this.
|
|
4049
|
+
this.appleStyle.gridTemplateRows = value;
|
|
4010
4050
|
}
|
|
4011
4051
|
if (__WINDOWS__) {
|
|
4012
4052
|
windowsSetGrid(this.nativeView, 'gridTemplateRows', value);
|
|
@@ -4020,7 +4060,7 @@ export class Style {
|
|
|
4020
4060
|
return nodeHelper().getGridTemplateRows(this.nativeView);
|
|
4021
4061
|
}
|
|
4022
4062
|
if (__APPLE__) {
|
|
4023
|
-
return this.
|
|
4063
|
+
return this.appleStyle.gridTemplateRows;
|
|
4024
4064
|
}
|
|
4025
4065
|
return '';
|
|
4026
4066
|
}
|
|
@@ -4032,7 +4072,7 @@ export class Style {
|
|
|
4032
4072
|
return nodeHelper().getGridTemplateColumns(this.nativeView);
|
|
4033
4073
|
}
|
|
4034
4074
|
if (__APPLE__) {
|
|
4035
|
-
return this.
|
|
4075
|
+
return this.appleStyle.gridTemplateColumns;
|
|
4036
4076
|
}
|
|
4037
4077
|
return '';
|
|
4038
4078
|
}
|
|
@@ -4046,7 +4086,7 @@ export class Style {
|
|
|
4046
4086
|
nodeHelper().setGridTemplateColumns(this.nativeView, value);
|
|
4047
4087
|
}
|
|
4048
4088
|
if (__APPLE__) {
|
|
4049
|
-
this.
|
|
4089
|
+
this.appleStyle.gridTemplateColumns = value;
|
|
4050
4090
|
}
|
|
4051
4091
|
if (__WINDOWS__) {
|
|
4052
4092
|
windowsSetGrid(this.nativeView, 'gridTemplateColumns', value);
|
|
@@ -4060,7 +4100,7 @@ export class Style {
|
|
|
4060
4100
|
return nodeHelper().getGridTemplateAreas(this.nativeView);
|
|
4061
4101
|
}
|
|
4062
4102
|
if (__APPLE__) {
|
|
4063
|
-
return this.
|
|
4103
|
+
return this.appleStyle.gridTemplateAreas;
|
|
4064
4104
|
}
|
|
4065
4105
|
return '';
|
|
4066
4106
|
}
|
|
@@ -4074,7 +4114,7 @@ export class Style {
|
|
|
4074
4114
|
nodeHelper().setGridTemplateAreas(this.nativeView, value);
|
|
4075
4115
|
}
|
|
4076
4116
|
if (__APPLE__) {
|
|
4077
|
-
this.
|
|
4117
|
+
this.appleStyle.gridTemplateAreas = value;
|
|
4078
4118
|
}
|
|
4079
4119
|
if (__WINDOWS__) {
|
|
4080
4120
|
windowsSetGrid(this.nativeView, 'gridTemplateAreas', value);
|
|
@@ -4243,7 +4283,8 @@ export class Style {
|
|
|
4243
4283
|
// length — TYPE 0 means "multiply by the resolved font size".
|
|
4244
4284
|
const unitless = /^-?[\d.]+$/.test(t);
|
|
4245
4285
|
this.prepareMut();
|
|
4246
|
-
|
|
4286
|
+
// An absolute line-height is stored in CSS px (iOS points, Android dip), as the number path.
|
|
4287
|
+
setFloat32(this.style_view, StyleKeys.LINE_HEIGHT, unitless ? finite(parseFloat(t) || 0) : layout.toDeviceIndependentPixels(tokenToDevicePx(t, parseFloat(t) || 0)));
|
|
4247
4288
|
setUint8(this.style_view, StyleKeys.LINE_HEIGHT_STATE, 1);
|
|
4248
4289
|
setUint8(this.style_view, StyleKeys.LINE_HEIGHT_TYPE, unitless ? 0 : 1);
|
|
4249
4290
|
this.commitState(StateKeys.LINE_HEIGHT);
|
|
@@ -4261,14 +4302,14 @@ export class Style {
|
|
|
4261
4302
|
switch (value.unit) {
|
|
4262
4303
|
case 'dip':
|
|
4263
4304
|
this.prepareMut();
|
|
4264
|
-
setFloat32(this.style_view, StyleKeys.LINE_HEIGHT,
|
|
4305
|
+
setFloat32(this.style_view, StyleKeys.LINE_HEIGHT, value.value);
|
|
4265
4306
|
setUint8(this.style_view, StyleKeys.LINE_HEIGHT_STATE, 1);
|
|
4266
4307
|
setUint8(this.style_view, StyleKeys.LINE_HEIGHT_TYPE, 1);
|
|
4267
4308
|
this.commitState(StateKeys.LINE_HEIGHT);
|
|
4268
4309
|
break;
|
|
4269
4310
|
case 'px':
|
|
4270
4311
|
this.prepareMut();
|
|
4271
|
-
setFloat32(this.style_view, StyleKeys.LINE_HEIGHT, layout.
|
|
4312
|
+
setFloat32(this.style_view, StyleKeys.LINE_HEIGHT, layout.toDeviceIndependentPixels(value.value));
|
|
4272
4313
|
setUint8(this.style_view, StyleKeys.LINE_HEIGHT_STATE, 1);
|
|
4273
4314
|
setUint8(this.style_view, StyleKeys.LINE_HEIGHT_TYPE, 1);
|
|
4274
4315
|
this.commitState(StateKeys.LINE_HEIGHT);
|
|
@@ -4426,13 +4467,13 @@ export class Style {
|
|
|
4426
4467
|
return nodeHelper().getBackground(this.nativeView);
|
|
4427
4468
|
}
|
|
4428
4469
|
if (__APPLE__) {
|
|
4429
|
-
return this.
|
|
4470
|
+
return this.appleStyle.background;
|
|
4430
4471
|
}
|
|
4431
4472
|
return '';
|
|
4432
4473
|
}
|
|
4433
4474
|
set background(value) {
|
|
4434
4475
|
value = this.coerceCssStringValue(value);
|
|
4435
|
-
this.setPseudoCssStringValue('background', value, () => nodeHelper().setBackground(this.nativeView, value), () => (this.
|
|
4476
|
+
this.setPseudoCssStringValue('background', value, () => nodeHelper().setBackground(this.nativeView, value), () => (this.appleStyle.background = value));
|
|
4436
4477
|
}
|
|
4437
4478
|
get backgroundImage() {
|
|
4438
4479
|
if (!this.nativeView) {
|
|
@@ -4442,13 +4483,13 @@ export class Style {
|
|
|
4442
4483
|
return nodeHelper().getBackgroundImage(this.nativeView);
|
|
4443
4484
|
}
|
|
4444
4485
|
if (__APPLE__) {
|
|
4445
|
-
return this.
|
|
4486
|
+
return this.appleStyle.backgroundImage;
|
|
4446
4487
|
}
|
|
4447
4488
|
return '';
|
|
4448
4489
|
}
|
|
4449
4490
|
set backgroundImage(value) {
|
|
4450
4491
|
value = this.coerceCssStringValue(value);
|
|
4451
|
-
this.setPseudoCssStringValue('background-image', value, () => nodeHelper().setBackgroundImage(this.nativeView, value), () => (this.
|
|
4492
|
+
this.setPseudoCssStringValue('background-image', value, () => nodeHelper().setBackgroundImage(this.nativeView, value), () => (this.appleStyle.backgroundImage = value));
|
|
4452
4493
|
}
|
|
4453
4494
|
get backgroundRepeat() {
|
|
4454
4495
|
if (!this.nativeView) {
|
|
@@ -4458,13 +4499,13 @@ export class Style {
|
|
|
4458
4499
|
return nodeHelper().getBackgroundRepeat(this.nativeView);
|
|
4459
4500
|
}
|
|
4460
4501
|
if (__APPLE__) {
|
|
4461
|
-
return this.
|
|
4502
|
+
return this.appleStyle.backgroundRepeat;
|
|
4462
4503
|
}
|
|
4463
4504
|
return '';
|
|
4464
4505
|
}
|
|
4465
4506
|
set backgroundRepeat(value) {
|
|
4466
4507
|
value = this.coerceCssStringValue(value);
|
|
4467
|
-
this.setPseudoCssStringValue('background-repeat', value, () => nodeHelper().setBackgroundRepeat(this.nativeView, value), () => (this.
|
|
4508
|
+
this.setPseudoCssStringValue('background-repeat', value, () => nodeHelper().setBackgroundRepeat(this.nativeView, value), () => (this.appleStyle.backgroundRepeat = value));
|
|
4468
4509
|
}
|
|
4469
4510
|
get backgroundPosition() {
|
|
4470
4511
|
if (!this.nativeView) {
|
|
@@ -4474,13 +4515,13 @@ export class Style {
|
|
|
4474
4515
|
return nodeHelper().getBackgroundPosition(this.nativeView);
|
|
4475
4516
|
}
|
|
4476
4517
|
if (__APPLE__) {
|
|
4477
|
-
return this.
|
|
4518
|
+
return this.appleStyle.backgroundPosition;
|
|
4478
4519
|
}
|
|
4479
4520
|
return '';
|
|
4480
4521
|
}
|
|
4481
4522
|
set backgroundPosition(value) {
|
|
4482
4523
|
value = this.coerceCssStringValue(value);
|
|
4483
|
-
this.setPseudoCssStringValue('background-position', value, () => nodeHelper().setBackgroundPosition(this.nativeView, value), () => (this.
|
|
4524
|
+
this.setPseudoCssStringValue('background-position', value, () => nodeHelper().setBackgroundPosition(this.nativeView, value), () => (this.appleStyle.backgroundPosition = value));
|
|
4484
4525
|
}
|
|
4485
4526
|
get backgroundSize() {
|
|
4486
4527
|
if (!this.nativeView) {
|
|
@@ -4490,13 +4531,13 @@ export class Style {
|
|
|
4490
4531
|
return nodeHelper().getBackgroundSize(this.nativeView);
|
|
4491
4532
|
}
|
|
4492
4533
|
if (__APPLE__) {
|
|
4493
|
-
return this.
|
|
4534
|
+
return this.appleStyle.backgroundSize;
|
|
4494
4535
|
}
|
|
4495
4536
|
return '';
|
|
4496
4537
|
}
|
|
4497
4538
|
set backgroundSize(value) {
|
|
4498
4539
|
value = this.coerceCssStringValue(value);
|
|
4499
|
-
this.setPseudoCssStringValue('background-size', value, () => nodeHelper().setBackgroundSize(this.nativeView, value), () => (this.
|
|
4540
|
+
this.setPseudoCssStringValue('background-size', value, () => nodeHelper().setBackgroundSize(this.nativeView, value), () => (this.appleStyle.backgroundSize = value));
|
|
4500
4541
|
}
|
|
4501
4542
|
get backgroundClip() {
|
|
4502
4543
|
if (!this.nativeView) {
|
|
@@ -4506,13 +4547,13 @@ export class Style {
|
|
|
4506
4547
|
return nodeHelper().getBackgroundClip(this.nativeView);
|
|
4507
4548
|
}
|
|
4508
4549
|
if (__APPLE__) {
|
|
4509
|
-
return this.
|
|
4550
|
+
return this.appleStyle.backgroundClip;
|
|
4510
4551
|
}
|
|
4511
4552
|
return '';
|
|
4512
4553
|
}
|
|
4513
4554
|
set backgroundClip(value) {
|
|
4514
4555
|
value = this.coerceCssStringValue(value);
|
|
4515
|
-
this.setPseudoCssStringValue('background-clip', value, () => nodeHelper().setBackgroundClip(this.nativeView, value), () => (this.
|
|
4556
|
+
this.setPseudoCssStringValue('background-clip', value, () => nodeHelper().setBackgroundClip(this.nativeView, value), () => (this.appleStyle.backgroundClip = value));
|
|
4516
4557
|
}
|
|
4517
4558
|
get backgroundPositionX() {
|
|
4518
4559
|
if (!this.nativeView) {
|
|
@@ -4522,13 +4563,13 @@ export class Style {
|
|
|
4522
4563
|
return nodeHelper().getBackgroundPositionX(this.nativeView);
|
|
4523
4564
|
}
|
|
4524
4565
|
if (__APPLE__) {
|
|
4525
|
-
return this.
|
|
4566
|
+
return this.appleStyle.backgroundPositionX;
|
|
4526
4567
|
}
|
|
4527
4568
|
return '';
|
|
4528
4569
|
}
|
|
4529
4570
|
set backgroundPositionX(value) {
|
|
4530
4571
|
value = cssInitialIfReset(this.coerceCssStringValue(value), '0%');
|
|
4531
|
-
this.setPseudoCssStringValue('background-position-x', value, () => nodeHelper().setBackgroundPositionX(this.nativeView, value), () => (this.
|
|
4572
|
+
this.setPseudoCssStringValue('background-position-x', value, () => nodeHelper().setBackgroundPositionX(this.nativeView, value), () => (this.appleStyle.backgroundPositionX = value));
|
|
4532
4573
|
}
|
|
4533
4574
|
get backgroundPositionY() {
|
|
4534
4575
|
if (!this.nativeView) {
|
|
@@ -4538,13 +4579,13 @@ export class Style {
|
|
|
4538
4579
|
return nodeHelper().getBackgroundPositionY(this.nativeView);
|
|
4539
4580
|
}
|
|
4540
4581
|
if (__APPLE__) {
|
|
4541
|
-
return this.
|
|
4582
|
+
return this.appleStyle.backgroundPositionY;
|
|
4542
4583
|
}
|
|
4543
4584
|
return '';
|
|
4544
4585
|
}
|
|
4545
4586
|
set backgroundPositionY(value) {
|
|
4546
4587
|
value = cssInitialIfReset(this.coerceCssStringValue(value), '0%');
|
|
4547
|
-
this.setPseudoCssStringValue('background-position-y', value, () => nodeHelper().setBackgroundPositionY(this.nativeView, value), () => (this.
|
|
4588
|
+
this.setPseudoCssStringValue('background-position-y', value, () => nodeHelper().setBackgroundPositionY(this.nativeView, value), () => (this.appleStyle.backgroundPositionY = value));
|
|
4548
4589
|
}
|
|
4549
4590
|
get backgroundOrigin() {
|
|
4550
4591
|
if (!this.nativeView) {
|
|
@@ -4554,13 +4595,13 @@ export class Style {
|
|
|
4554
4595
|
return nodeHelper().getBackgroundOrigin(this.nativeView);
|
|
4555
4596
|
}
|
|
4556
4597
|
if (__APPLE__) {
|
|
4557
|
-
return this.
|
|
4598
|
+
return this.appleStyle.backgroundOrigin;
|
|
4558
4599
|
}
|
|
4559
4600
|
return '';
|
|
4560
4601
|
}
|
|
4561
4602
|
set backgroundOrigin(value) {
|
|
4562
4603
|
value = cssInitialIfReset(this.coerceCssStringValue(value), 'padding-box');
|
|
4563
|
-
this.setPseudoCssStringValue('background-origin', value, () => nodeHelper().setBackgroundOrigin(this.nativeView, value), () => (this.
|
|
4604
|
+
this.setPseudoCssStringValue('background-origin', value, () => nodeHelper().setBackgroundOrigin(this.nativeView, value), () => (this.appleStyle.backgroundOrigin = value));
|
|
4564
4605
|
}
|
|
4565
4606
|
get backgroundAttachment() {
|
|
4566
4607
|
if (!this.nativeView) {
|
|
@@ -4570,13 +4611,13 @@ export class Style {
|
|
|
4570
4611
|
return nodeHelper().getBackgroundAttachment(this.nativeView);
|
|
4571
4612
|
}
|
|
4572
4613
|
if (__APPLE__) {
|
|
4573
|
-
return this.
|
|
4614
|
+
return this.appleStyle.backgroundAttachment;
|
|
4574
4615
|
}
|
|
4575
4616
|
return '';
|
|
4576
4617
|
}
|
|
4577
4618
|
set backgroundAttachment(value) {
|
|
4578
4619
|
value = cssInitialIfReset(this.coerceCssStringValue(value), 'scroll');
|
|
4579
|
-
this.setPseudoCssStringValue('background-attachment', value, () => nodeHelper().setBackgroundAttachment(this.nativeView, value), () => (this.
|
|
4620
|
+
this.setPseudoCssStringValue('background-attachment', value, () => nodeHelper().setBackgroundAttachment(this.nativeView, value), () => (this.appleStyle.backgroundAttachment = value));
|
|
4580
4621
|
}
|
|
4581
4622
|
get backgroundBlendMode() {
|
|
4582
4623
|
if (!this.nativeView) {
|
|
@@ -4586,13 +4627,13 @@ export class Style {
|
|
|
4586
4627
|
return nodeHelper().getBackgroundBlendMode(this.nativeView);
|
|
4587
4628
|
}
|
|
4588
4629
|
if (__APPLE__) {
|
|
4589
|
-
return this.
|
|
4630
|
+
return this.appleStyle.backgroundBlendMode;
|
|
4590
4631
|
}
|
|
4591
4632
|
return '';
|
|
4592
4633
|
}
|
|
4593
4634
|
set backgroundBlendMode(value) {
|
|
4594
4635
|
value = cssInitialIfReset(this.coerceCssStringValue(value), 'normal');
|
|
4595
|
-
this.setPseudoCssStringValue('background-blend-mode', value, () => nodeHelper().setBackgroundBlendMode(this.nativeView, value), () => (this.
|
|
4636
|
+
this.setPseudoCssStringValue('background-blend-mode', value, () => nodeHelper().setBackgroundBlendMode(this.nativeView, value), () => (this.appleStyle.backgroundBlendMode = value));
|
|
4596
4637
|
}
|
|
4597
4638
|
hasBorderRadius() {
|
|
4598
4639
|
const view = this.style_view;
|
|
@@ -4612,7 +4653,7 @@ export class Style {
|
|
|
4612
4653
|
return this._borderRadiusCss ?? nodeHelper().getBorderRadius(this.nativeView);
|
|
4613
4654
|
}
|
|
4614
4655
|
if (__APPLE__) {
|
|
4615
|
-
return this.
|
|
4656
|
+
return this._borderRadiusCss ?? this.appleStyle.borderRadius;
|
|
4616
4657
|
}
|
|
4617
4658
|
if (__WINDOWS__ && this.style_view) {
|
|
4618
4659
|
// Read back so a single corner longhand keeps the other three instead of resetting them to 0.
|
|
@@ -4625,12 +4666,12 @@ export class Style {
|
|
|
4625
4666
|
}
|
|
4626
4667
|
set borderRadius(value) {
|
|
4627
4668
|
value = this.coerceCssStringValue(value);
|
|
4628
|
-
if (__ANDROID__ && this.nativeView && !this._pseudo && this._writeBorderRadius(value, deviceScale())) {
|
|
4669
|
+
if ((__ANDROID__ || __APPLE__) && this.nativeView && !this._pseudo && this._writeBorderRadius(value, deviceScale())) {
|
|
4629
4670
|
return;
|
|
4630
4671
|
}
|
|
4631
4672
|
if (!this._pseudo)
|
|
4632
4673
|
this._borderRadiusCss = undefined;
|
|
4633
|
-
this.setPseudoCssStringValue('border-radius', value, () => nodeHelper().setBorderRadius(this.nativeView, value), () => (this.
|
|
4674
|
+
this.setPseudoCssStringValue('border-radius', value, () => nodeHelper().setBorderRadius(this.nativeView, value), () => (this.appleStyle.borderRadius = value));
|
|
4634
4675
|
}
|
|
4635
4676
|
_writeCornerRadius(corner, radius, shorthand, scale = deviceScale()) {
|
|
4636
4677
|
if (!this.nativeView || this._pseudo || !this.style_view)
|
|
@@ -4741,7 +4782,7 @@ export class Style {
|
|
|
4741
4782
|
return nodeHelper().getFontFamily(this.nativeView);
|
|
4742
4783
|
}
|
|
4743
4784
|
if (__APPLE__) {
|
|
4744
|
-
return this.
|
|
4785
|
+
return this.appleStyle.fontFamily;
|
|
4745
4786
|
}
|
|
4746
4787
|
return '';
|
|
4747
4788
|
}
|
|
@@ -4749,11 +4790,11 @@ export class Style {
|
|
|
4749
4790
|
// style-buffer field, so it can't be written through the shared buffer.
|
|
4750
4791
|
set fontFamily(value) {
|
|
4751
4792
|
value = this.coerceCssStringValue(value);
|
|
4752
|
-
this.setPseudoCssStringValue('font-family', value, () => nodeHelper().setFontFamily(this.nativeView, value), () => (this.
|
|
4793
|
+
this.setPseudoCssStringValue('font-family', value, () => nodeHelper().setFontFamily(this.nativeView, value), () => (this.appleStyle.fontFamily = value));
|
|
4753
4794
|
}
|
|
4754
4795
|
set textDecoration(value) {
|
|
4755
4796
|
value = this.coerceCssStringValue(value);
|
|
4756
|
-
this.setPseudoCssStringValue('text-decoration', value, () => nodeHelper().setTextDecoration(this.nativeView, value), () => this.
|
|
4797
|
+
this.setPseudoCssStringValue('text-decoration', value, () => nodeHelper().setTextDecoration(this.nativeView, value), () => this.appleStyle.setTextDecoration(value));
|
|
4757
4798
|
}
|
|
4758
4799
|
get textDecorationLine() {
|
|
4759
4800
|
if (!this.nativeView) {
|
|
@@ -4763,7 +4804,7 @@ export class Style {
|
|
|
4763
4804
|
return nodeHelper().getTextDecorationLine(this.nativeView);
|
|
4764
4805
|
}
|
|
4765
4806
|
if (__APPLE__) {
|
|
4766
|
-
return this.
|
|
4807
|
+
return this.appleStyle.textDecorationLine;
|
|
4767
4808
|
}
|
|
4768
4809
|
if (__WINDOWS__ && this.style_view) {
|
|
4769
4810
|
return textDecorationLineToCss(getUint8(this.style_view, StyleKeys.DECORATION_LINE));
|
|
@@ -4772,7 +4813,7 @@ export class Style {
|
|
|
4772
4813
|
}
|
|
4773
4814
|
set textDecorationLine(value) {
|
|
4774
4815
|
value = cssInitialIfReset(this.coerceCssStringValue(value), 'none');
|
|
4775
|
-
this.setPseudoCssStringValue('text-decoration-line', value, () => nodeHelper().setTextDecorationLine(this.nativeView, value), () => (this.
|
|
4816
|
+
this.setPseudoCssStringValue('text-decoration-line', value, () => nodeHelper().setTextDecorationLine(this.nativeView, value), () => (this.appleStyle.textDecorationLine = value));
|
|
4776
4817
|
}
|
|
4777
4818
|
get textDecorationStyle() {
|
|
4778
4819
|
if (!this.nativeView) {
|
|
@@ -4782,7 +4823,7 @@ export class Style {
|
|
|
4782
4823
|
return nodeHelper().getTextDecorationStyle(this.nativeView);
|
|
4783
4824
|
}
|
|
4784
4825
|
if (__APPLE__) {
|
|
4785
|
-
return this.
|
|
4826
|
+
return this.appleStyle.textDecorationStyle;
|
|
4786
4827
|
}
|
|
4787
4828
|
if (__WINDOWS__ && this.style_view) {
|
|
4788
4829
|
return textDecorationStyleToCss(getUint8(this.style_view, StyleKeys.DECORATION_STYLE));
|
|
@@ -4791,7 +4832,7 @@ export class Style {
|
|
|
4791
4832
|
}
|
|
4792
4833
|
set textDecorationStyle(value) {
|
|
4793
4834
|
value = cssInitialIfReset(this.coerceCssStringValue(value), 'solid');
|
|
4794
|
-
this.setPseudoCssStringValue('text-decoration-style', value, () => nodeHelper().setTextDecorationStyle(this.nativeView, value), () => (this.
|
|
4835
|
+
this.setPseudoCssStringValue('text-decoration-style', value, () => nodeHelper().setTextDecorationStyle(this.nativeView, value), () => (this.appleStyle.textDecorationStyle = value));
|
|
4795
4836
|
}
|
|
4796
4837
|
get textDecorationColor() {
|
|
4797
4838
|
if (!this.nativeView) {
|
|
@@ -4801,7 +4842,7 @@ export class Style {
|
|
|
4801
4842
|
return nodeHelper().getTextDecorationColor(this.nativeView);
|
|
4802
4843
|
}
|
|
4803
4844
|
if (__APPLE__) {
|
|
4804
|
-
return this.
|
|
4845
|
+
return this.appleStyle.textDecorationColor;
|
|
4805
4846
|
}
|
|
4806
4847
|
if (__WINDOWS__ && this.style_view) {
|
|
4807
4848
|
const argb = getUint32(this.style_view, StyleKeys.DECORATION_COLOR);
|
|
@@ -4811,7 +4852,7 @@ export class Style {
|
|
|
4811
4852
|
}
|
|
4812
4853
|
set textDecorationColor(value) {
|
|
4813
4854
|
value = cssInitialIfReset(this.coerceCssStringValue(value), 'currentcolor');
|
|
4814
|
-
this.setPseudoCssStringValue('text-decoration-color', value, () => nodeHelper().setTextDecorationColor(this.nativeView, value), () => (this.
|
|
4855
|
+
this.setPseudoCssStringValue('text-decoration-color', value, () => nodeHelper().setTextDecorationColor(this.nativeView, value), () => (this.appleStyle.textDecorationColor = value));
|
|
4815
4856
|
}
|
|
4816
4857
|
get border() {
|
|
4817
4858
|
if (!this.nativeView) {
|
|
@@ -4821,13 +4862,13 @@ export class Style {
|
|
|
4821
4862
|
return nodeHelper().getBorder(this.nativeView);
|
|
4822
4863
|
}
|
|
4823
4864
|
if (__APPLE__) {
|
|
4824
|
-
return this.
|
|
4865
|
+
return this.appleStyle.border;
|
|
4825
4866
|
}
|
|
4826
4867
|
return '';
|
|
4827
4868
|
}
|
|
4828
4869
|
set border(value) {
|
|
4829
4870
|
value = this.coerceCssStringValue(value);
|
|
4830
|
-
this.setPseudoCssStringValue('border', value, () => nodeHelper().setBorder(this.nativeView, value), () => (this.
|
|
4871
|
+
this.setPseudoCssStringValue('border', value, () => nodeHelper().setBorder(this.nativeView, value), () => (this.appleStyle.border = value));
|
|
4831
4872
|
}
|
|
4832
4873
|
get paddingCss() {
|
|
4833
4874
|
if (!this.nativeView)
|
|
@@ -4836,7 +4877,7 @@ export class Style {
|
|
|
4836
4877
|
return nodeHelper().getPaddingCssValue(this.nativeView);
|
|
4837
4878
|
}
|
|
4838
4879
|
if (__APPLE__) {
|
|
4839
|
-
return this.
|
|
4880
|
+
return this.appleStyle.paddingCss;
|
|
4840
4881
|
}
|
|
4841
4882
|
return '';
|
|
4842
4883
|
}
|
|
@@ -4844,7 +4885,7 @@ export class Style {
|
|
|
4844
4885
|
// a bare number is dip, matching other numeric setters; Android's
|
|
4845
4886
|
// native parser treats "px" as unscaled device pixels, "dip" as scaled
|
|
4846
4887
|
const strValue = typeof value === 'number' ? `${value}dip` : value;
|
|
4847
|
-
this.setPseudoCssStringValue('padding', strValue, () => nodeHelper().setPaddingCss(this.nativeView, strValue), () => (this.
|
|
4888
|
+
this.setPseudoCssStringValue('padding', strValue, () => nodeHelper().setPaddingCss(this.nativeView, strValue), () => (this.appleStyle.paddingCss = strValue));
|
|
4848
4889
|
}
|
|
4849
4890
|
get marginCss() {
|
|
4850
4891
|
if (!this.nativeView)
|
|
@@ -4853,14 +4894,14 @@ export class Style {
|
|
|
4853
4894
|
return nodeHelper().getMarginCssValue(this.nativeView);
|
|
4854
4895
|
}
|
|
4855
4896
|
if (__APPLE__) {
|
|
4856
|
-
return this.
|
|
4897
|
+
return this.appleStyle.marginCss;
|
|
4857
4898
|
}
|
|
4858
4899
|
return '';
|
|
4859
4900
|
}
|
|
4860
4901
|
set marginCss(value) {
|
|
4861
4902
|
// See the comment on `paddingCss` above — same dip-vs-px mislabeling fix.
|
|
4862
4903
|
const strValue = typeof value === 'number' ? `${value}dip` : value;
|
|
4863
|
-
this.setPseudoCssStringValue('margin', strValue, () => nodeHelper().setMarginCss(this.nativeView, strValue), () => (this.
|
|
4904
|
+
this.setPseudoCssStringValue('margin', strValue, () => nodeHelper().setMarginCss(this.nativeView, strValue), () => (this.appleStyle.marginCss = strValue));
|
|
4864
4905
|
}
|
|
4865
4906
|
get insetCss() {
|
|
4866
4907
|
if (!this.nativeView)
|
|
@@ -4869,42 +4910,42 @@ export class Style {
|
|
|
4869
4910
|
return nodeHelper().getInsetCssValue(this.nativeView);
|
|
4870
4911
|
}
|
|
4871
4912
|
if (__APPLE__) {
|
|
4872
|
-
return this.
|
|
4913
|
+
return this.appleStyle.insetCss;
|
|
4873
4914
|
}
|
|
4874
4915
|
return '';
|
|
4875
4916
|
}
|
|
4876
4917
|
set insetCss(value) {
|
|
4877
4918
|
// See the comment on `paddingCss` above — same dip-vs-px mislabeling fix.
|
|
4878
4919
|
const strValue = typeof value === 'number' ? `${value}dip` : value;
|
|
4879
|
-
this.setPseudoCssStringValue('inset', strValue, () => nodeHelper().setInsetCss(this.nativeView, strValue), () => (this.
|
|
4920
|
+
this.setPseudoCssStringValue('inset', strValue, () => nodeHelper().setInsetCss(this.nativeView, strValue), () => (this.appleStyle.insetCss = strValue));
|
|
4880
4921
|
}
|
|
4881
4922
|
get borderLeft() {
|
|
4882
4923
|
return '';
|
|
4883
4924
|
}
|
|
4884
4925
|
set borderLeft(value) {
|
|
4885
4926
|
value = this.coerceCssStringValue(value);
|
|
4886
|
-
this.setPseudoCssStringValue('border-left', value, () => nodeHelper().setBorderLeft(this.nativeView, value), () => (this.
|
|
4927
|
+
this.setPseudoCssStringValue('border-left', value, () => nodeHelper().setBorderLeft(this.nativeView, value), () => (this.appleStyle.borderLeft = value));
|
|
4887
4928
|
}
|
|
4888
4929
|
get borderTop() {
|
|
4889
4930
|
return '';
|
|
4890
4931
|
}
|
|
4891
4932
|
set borderTop(value) {
|
|
4892
4933
|
value = this.coerceCssStringValue(value);
|
|
4893
|
-
this.setPseudoCssStringValue('border-top', value, () => nodeHelper().setBorderTop(this.nativeView, value), () => (this.
|
|
4934
|
+
this.setPseudoCssStringValue('border-top', value, () => nodeHelper().setBorderTop(this.nativeView, value), () => (this.appleStyle.borderTop = value));
|
|
4894
4935
|
}
|
|
4895
4936
|
get borderRight() {
|
|
4896
4937
|
return '';
|
|
4897
4938
|
}
|
|
4898
4939
|
set borderRight(value) {
|
|
4899
4940
|
value = this.coerceCssStringValue(value);
|
|
4900
|
-
this.setPseudoCssStringValue('border-right', value, () => nodeHelper().setBorderRight(this.nativeView, value), () => (this.
|
|
4941
|
+
this.setPseudoCssStringValue('border-right', value, () => nodeHelper().setBorderRight(this.nativeView, value), () => (this.appleStyle.borderRight = value));
|
|
4901
4942
|
}
|
|
4902
4943
|
get borderBottom() {
|
|
4903
4944
|
return '';
|
|
4904
4945
|
}
|
|
4905
4946
|
set borderBottom(value) {
|
|
4906
4947
|
value = this.coerceCssStringValue(value);
|
|
4907
|
-
this.setPseudoCssStringValue('border-bottom', value, () => nodeHelper().setBorderBottom(this.nativeView, value), () => (this.
|
|
4948
|
+
this.setPseudoCssStringValue('border-bottom', value, () => nodeHelper().setBorderBottom(this.nativeView, value), () => (this.appleStyle.borderBottom = value));
|
|
4908
4949
|
}
|
|
4909
4950
|
get filter() {
|
|
4910
4951
|
if (!this.nativeView) {
|
|
@@ -4914,13 +4955,13 @@ export class Style {
|
|
|
4914
4955
|
return nodeHelper().getFilter(this.nativeView);
|
|
4915
4956
|
}
|
|
4916
4957
|
if (__APPLE__) {
|
|
4917
|
-
return this.
|
|
4958
|
+
return this.appleStyle.filter;
|
|
4918
4959
|
}
|
|
4919
4960
|
return '';
|
|
4920
4961
|
}
|
|
4921
4962
|
set filter(value) {
|
|
4922
4963
|
value = this.coerceCssStringValue(value);
|
|
4923
|
-
this.setPseudoCssStringValue('filter', value, () => nodeHelper().setFilter(this.nativeView, value), () => (this.
|
|
4964
|
+
this.setPseudoCssStringValue('filter', value, () => nodeHelper().setFilter(this.nativeView, value), () => (this.appleStyle.filter = value));
|
|
4924
4965
|
}
|
|
4925
4966
|
get boxShadow() {
|
|
4926
4967
|
if (!this.nativeView) {
|
|
@@ -4930,7 +4971,7 @@ export class Style {
|
|
|
4930
4971
|
return nodeHelper().getBoxShadow(this.nativeView);
|
|
4931
4972
|
}
|
|
4932
4973
|
if (__APPLE__) {
|
|
4933
|
-
return this.
|
|
4974
|
+
return this.appleStyle.boxShadow;
|
|
4934
4975
|
}
|
|
4935
4976
|
return '';
|
|
4936
4977
|
}
|
|
@@ -4942,7 +4983,7 @@ export class Style {
|
|
|
4942
4983
|
}
|
|
4943
4984
|
set boxShadow(value) {
|
|
4944
4985
|
value = this.coerceCssStringValue(value);
|
|
4945
|
-
this.setPseudoCssStringValue('box-shadow', value, () => nodeHelper().setBoxShadow(this.nativeView, value), () => (this.
|
|
4986
|
+
this.setPseudoCssStringValue('box-shadow', value, () => nodeHelper().setBoxShadow(this.nativeView, value), () => (this.appleStyle.boxShadow = value));
|
|
4946
4987
|
}
|
|
4947
4988
|
get transform() {
|
|
4948
4989
|
if (!this.nativeView) {
|
|
@@ -4952,13 +4993,13 @@ export class Style {
|
|
|
4952
4993
|
return nodeHelper().getTransform(this.nativeView);
|
|
4953
4994
|
}
|
|
4954
4995
|
if (__APPLE__) {
|
|
4955
|
-
return this.
|
|
4996
|
+
return this.appleStyle.transform;
|
|
4956
4997
|
}
|
|
4957
4998
|
return '';
|
|
4958
4999
|
}
|
|
4959
5000
|
set transform(value) {
|
|
4960
5001
|
value = this.coerceCssStringValue(value);
|
|
4961
|
-
this.setPseudoCssStringValue('transform', value, () => nodeHelper().setTransform(this.nativeView, value), () => (this.
|
|
5002
|
+
this.setPseudoCssStringValue('transform', value, () => nodeHelper().setTransform(this.nativeView, value), () => (this.appleStyle.transform = value));
|
|
4962
5003
|
}
|
|
4963
5004
|
get verticalAlign() {
|
|
4964
5005
|
const isPercent = getUint8(this.style_view, StyleKeys.VERTICAL_ALIGN_IS_PERCENT_OFFSET) == 1;
|
|
@@ -5116,13 +5157,13 @@ export class Style {
|
|
|
5116
5157
|
return nodeHelper().getTextShadow(this.nativeView);
|
|
5117
5158
|
}
|
|
5118
5159
|
if (__APPLE__) {
|
|
5119
|
-
return this.
|
|
5160
|
+
return this.appleStyle.textShadow;
|
|
5120
5161
|
}
|
|
5121
5162
|
return '';
|
|
5122
5163
|
}
|
|
5123
5164
|
set textShadow(value) {
|
|
5124
5165
|
value = this.coerceCssStringValue(value);
|
|
5125
|
-
this.setPseudoCssStringValue('text-shadow', value, () => nodeHelper().setTextShadow(this.nativeView, value), () => (this.
|
|
5166
|
+
this.setPseudoCssStringValue('text-shadow', value, () => nodeHelper().setTextShadow(this.nativeView, value), () => (this.appleStyle.textShadow = value));
|
|
5126
5167
|
}
|
|
5127
5168
|
get zIndex() {
|
|
5128
5169
|
return getInt32(this.style_view, StyleKeys.Z_INDEX);
|
|
@@ -5204,7 +5245,7 @@ export class Style {
|
|
|
5204
5245
|
}
|
|
5205
5246
|
set cornerShape(value) {
|
|
5206
5247
|
value = this.coerceCssStringValue(value);
|
|
5207
|
-
this.setPseudoCssStringValue('corner-shape', value, () => nodeHelper().setCornerShape(this.nativeView, value), () => (this.
|
|
5248
|
+
this.setPseudoCssStringValue('corner-shape', value, () => nodeHelper().setCornerShape(this.nativeView, value), () => (this.appleStyle.cornerShape = value));
|
|
5208
5249
|
}
|
|
5209
5250
|
get cornerShape() {
|
|
5210
5251
|
if (!this.nativeView) {
|
|
@@ -5214,7 +5255,7 @@ export class Style {
|
|
|
5214
5255
|
return nodeHelper().getCornerShape(this.nativeView);
|
|
5215
5256
|
}
|
|
5216
5257
|
if (__APPLE__) {
|
|
5217
|
-
return this.
|
|
5258
|
+
return this.appleStyle.cornerShape;
|
|
5218
5259
|
}
|
|
5219
5260
|
return '';
|
|
5220
5261
|
}
|
|
@@ -5225,13 +5266,13 @@ export class Style {
|
|
|
5225
5266
|
return nodeHelper().getCornerShapeTopLeft(this.nativeView);
|
|
5226
5267
|
}
|
|
5227
5268
|
if (__APPLE__) {
|
|
5228
|
-
return this.
|
|
5269
|
+
return this.appleStyle.cornerShapeTopLeft;
|
|
5229
5270
|
}
|
|
5230
5271
|
return '';
|
|
5231
5272
|
}
|
|
5232
5273
|
set cornerShapeTopLeft(value) {
|
|
5233
5274
|
value = this.coerceCssStringValue(value);
|
|
5234
|
-
this.setPseudoCssStringValue('corner-shape-top-left', value, () => nodeHelper().setCornerShapeTopLeft(this.nativeView, value), () => (this.
|
|
5275
|
+
this.setPseudoCssStringValue('corner-shape-top-left', value, () => nodeHelper().setCornerShapeTopLeft(this.nativeView, value), () => (this.appleStyle.cornerShapeTopLeft = value));
|
|
5235
5276
|
}
|
|
5236
5277
|
get cornerShapeTopRight() {
|
|
5237
5278
|
if (!this.nativeView)
|
|
@@ -5240,13 +5281,13 @@ export class Style {
|
|
|
5240
5281
|
return nodeHelper().getCornerShapeTopRight(this.nativeView);
|
|
5241
5282
|
}
|
|
5242
5283
|
if (__APPLE__) {
|
|
5243
|
-
return this.
|
|
5284
|
+
return this.appleStyle.cornerShapeTopRight;
|
|
5244
5285
|
}
|
|
5245
5286
|
return '';
|
|
5246
5287
|
}
|
|
5247
5288
|
set cornerShapeTopRight(value) {
|
|
5248
5289
|
value = this.coerceCssStringValue(value);
|
|
5249
|
-
this.setPseudoCssStringValue('corner-shape-top-right', value, () => nodeHelper().setCornerShapeTopRight(this.nativeView, value), () => (this.
|
|
5290
|
+
this.setPseudoCssStringValue('corner-shape-top-right', value, () => nodeHelper().setCornerShapeTopRight(this.nativeView, value), () => (this.appleStyle.cornerShapeTopRight = value));
|
|
5250
5291
|
}
|
|
5251
5292
|
get cornerShapeBottomRight() {
|
|
5252
5293
|
if (!this.nativeView)
|
|
@@ -5255,13 +5296,13 @@ export class Style {
|
|
|
5255
5296
|
return nodeHelper().getCornerShapeBottomRight(this.nativeView);
|
|
5256
5297
|
}
|
|
5257
5298
|
if (__APPLE__) {
|
|
5258
|
-
return this.
|
|
5299
|
+
return this.appleStyle.cornerShapeBottomRight;
|
|
5259
5300
|
}
|
|
5260
5301
|
return '';
|
|
5261
5302
|
}
|
|
5262
5303
|
set cornerShapeBottomRight(value) {
|
|
5263
5304
|
value = this.coerceCssStringValue(value);
|
|
5264
|
-
this.setPseudoCssStringValue('corner-shape-bottom-right', value, () => nodeHelper().setCornerShapeBottomRight(this.nativeView, value), () => (this.
|
|
5305
|
+
this.setPseudoCssStringValue('corner-shape-bottom-right', value, () => nodeHelper().setCornerShapeBottomRight(this.nativeView, value), () => (this.appleStyle.cornerShapeBottomRight = value));
|
|
5265
5306
|
}
|
|
5266
5307
|
get cornerShapeBottomLeft() {
|
|
5267
5308
|
if (!this.nativeView)
|
|
@@ -5270,13 +5311,13 @@ export class Style {
|
|
|
5270
5311
|
return nodeHelper().getCornerShapeBottomLeft(this.nativeView);
|
|
5271
5312
|
}
|
|
5272
5313
|
if (__APPLE__) {
|
|
5273
|
-
return this.
|
|
5314
|
+
return this.appleStyle.cornerShapeBottomLeft;
|
|
5274
5315
|
}
|
|
5275
5316
|
return '';
|
|
5276
5317
|
}
|
|
5277
5318
|
set cornerShapeBottomLeft(value) {
|
|
5278
5319
|
value = this.coerceCssStringValue(value);
|
|
5279
|
-
this.setPseudoCssStringValue('corner-shape-bottom-left', value, () => nodeHelper().setCornerShapeBottomLeft(this.nativeView, value), () => (this.
|
|
5320
|
+
this.setPseudoCssStringValue('corner-shape-bottom-left', value, () => nodeHelper().setCornerShapeBottomLeft(this.nativeView, value), () => (this.appleStyle.cornerShapeBottomLeft = value));
|
|
5280
5321
|
}
|
|
5281
5322
|
get objectPosition() {
|
|
5282
5323
|
if (!this.style_view)
|
|
@@ -5418,13 +5459,13 @@ export class Style {
|
|
|
5418
5459
|
return nodeHelper().getBorderImage(this.nativeView);
|
|
5419
5460
|
}
|
|
5420
5461
|
if (__APPLE__) {
|
|
5421
|
-
return this.
|
|
5462
|
+
return this.appleStyle.borderImage;
|
|
5422
5463
|
}
|
|
5423
5464
|
return '';
|
|
5424
5465
|
}
|
|
5425
5466
|
set borderImage(value) {
|
|
5426
5467
|
value = this.coerceCssStringValue(value);
|
|
5427
|
-
this.setPseudoCssStringValue('border-image', value, () => nodeHelper().setBorderImage(this.nativeView, value), () => (this.
|
|
5468
|
+
this.setPseudoCssStringValue('border-image', value, () => nodeHelper().setBorderImage(this.nativeView, value), () => (this.appleStyle.borderImage = value));
|
|
5428
5469
|
}
|
|
5429
5470
|
set 'border-image'(value) {
|
|
5430
5471
|
this.borderImage = value;
|
|
@@ -5465,13 +5506,13 @@ export class Style {
|
|
|
5465
5506
|
return nodeHelper().getFontFeatureSettings(this.nativeView);
|
|
5466
5507
|
}
|
|
5467
5508
|
if (__APPLE__) {
|
|
5468
|
-
return this.
|
|
5509
|
+
return this.appleStyle.fontFeatureSettings;
|
|
5469
5510
|
}
|
|
5470
5511
|
return 'normal';
|
|
5471
5512
|
}
|
|
5472
5513
|
set fontFeatureSettings(value) {
|
|
5473
5514
|
value = this.coerceCssStringValue(value);
|
|
5474
|
-
this.setPseudoCssStringValue('font-feature-settings', value, () => nodeHelper().setFontFeatureSettings(this.nativeView, value), () => (this.
|
|
5515
|
+
this.setPseudoCssStringValue('font-feature-settings', value, () => nodeHelper().setFontFeatureSettings(this.nativeView, value), () => (this.appleStyle.fontFeatureSettings = value));
|
|
5475
5516
|
}
|
|
5476
5517
|
set 'font-feature-settings'(value) {
|
|
5477
5518
|
this.fontFeatureSettings = value;
|
|
@@ -5571,13 +5612,13 @@ export class Style {
|
|
|
5571
5612
|
return nodeHelper().getBackdropFilter(this.nativeView);
|
|
5572
5613
|
}
|
|
5573
5614
|
if (__APPLE__) {
|
|
5574
|
-
return this.
|
|
5615
|
+
return this.appleStyle.backdropFilter;
|
|
5575
5616
|
}
|
|
5576
5617
|
return '';
|
|
5577
5618
|
}
|
|
5578
5619
|
set backdropFilter(value) {
|
|
5579
5620
|
value = this.coerceCssStringValue(value);
|
|
5580
|
-
this.setPseudoCssStringValue('backdrop-filter', value, () => nodeHelper().setBackdropFilter(this.nativeView, value), () => (this.
|
|
5621
|
+
this.setPseudoCssStringValue('backdrop-filter', value, () => nodeHelper().setBackdropFilter(this.nativeView, value), () => (this.appleStyle.backdropFilter = value));
|
|
5581
5622
|
}
|
|
5582
5623
|
set 'backdrop-filter'(value) {
|
|
5583
5624
|
this.backdropFilter = value;
|