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

Function PiuPortComputeStyle

modules/piu/All/piuPort.c:75–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void PiuPortComputeStyle(PiuPort* self)
76{
77 xsMachine* the = (*self)->the;
78 PiuApplication* application = (*self)->application;
79 PiuContainer* container = (PiuContainer*)self;
80 PiuStyleLink* list = (*application)->styleList;
81 PiuStyleLink* chain = NULL;
82 while (container) {
83 PiuStyle* style = (*container)->style;
84 if (style) {
85 list = PiuStyleLinkMatch(the, list, chain, style);
86 chain = list;
87 }
88 container = (*container)->container;
89 }
90 if (chain) {
91 PiuStyle* result = PiuStyleLinkCompute(the, chain, application);
92 (*self)->computedStyle = result;
93 }
94}
95
96void PiuPortDraw(void* it, PiuView* view, PiuRectangle area)
97{

Callers 2

PiuPortBindFunction · 0.85
PiuPortCascadeFunction · 0.85

Calls 2

PiuStyleLinkMatchFunction · 0.85
PiuStyleLinkComputeFunction · 0.85

Tested by

no test coverage detected