MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / PiuTextUncomputeStyles

Function PiuTextUncomputeStyles

modules/piu/All/piuText.c:1074–1101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1072}
1073
1074void PiuTextUncomputeStyles(PiuText* self, PiuApplication* application, PiuView* view)
1075{
1076 PiuTextBuffer* nodeBuffer = (*self)->nodeBuffer;
1077 PiuTextOffset nodeOffset = sizeof(PiuTextBufferRecord);
1078 PiuTextOffset nodeLimit = (PiuTextOffset)(*nodeBuffer)->current;
1079 while (nodeOffset < nodeLimit) {
1080 switch (KIND(nodeOffset)) {
1081 case piuTextNodeBeginBlockKind:
1082 case piuTextNodeBeginSpanKind: {
1083 PiuTextNodeBegin node = NODE(nodeOffset);
1084 if (node->computedStyle) {
1085 #ifdef piuGPU
1086 PiuStyleUnbind(node->computedStyle, application, view);
1087 #endif
1088 node->computedStyle = NULL;
1089 }
1090 nodeOffset += sizeof(PiuTextNodeBeginRecord);
1091 } break;
1092 case piuTextNodeEndBlockKind:
1093 case piuTextNodeEndSpanKind:
1094 nodeOffset += sizeof(PiuTextNodeEndRecord);
1095 break;
1096 case piuTextNodeStringKind:
1097 nodeOffset += sizeof(PiuTextNodeStringRecord);
1098 break;
1099 }
1100 }
1101}
1102
1103void PiuText_create(xsMachine* the)
1104{

Callers 2

PiuTextCascadeFunction · 0.85
PiuTextUnbindFunction · 0.85

Calls 1

PiuStyleUnbindFunction · 0.85

Tested by

no test coverage detected