libcss
Loading...
Searching...
No Matches
dump_computed.h
Go to the documentation of this file.
1#include <libcss/computed.h>
2#include <libcss/properties.h>
3#include <libcss/types.h>
4
5static size_t dump_css_fixed(css_fixed f, char *ptr, size_t len)
6{
7#define ABS(x) (uint32_t)((x) < 0 ? -(x) : (x))
8 uint32_t uintpart = FIXTOINT(ABS(f));
9 /* + 500 to ensure round to nearest (division will truncate) */
10 uint32_t fracpart = ((ABS(f) & 0x3ff) * 1000 + 500) / (1 << 10);
11#undef ABS
12 size_t flen = 0;
13 char tmp[20];
14 size_t tlen = 0;
15 char *buf = ptr;
16
17 if (len == 0)
18 return 0;
19
20 if (f < 0) {
21 buf[0] = '-';
22 buf++;
23 len--;
24 }
25
26 do {
27 tmp[tlen] = "0123456789"[uintpart % 10];
28 tlen++;
29
30 uintpart /= 10;
31 } while (tlen < 20 && uintpart != 0);
32
33 while (tlen > 0 && len > 0) {
34 buf[0] = tmp[--tlen];
35 buf++;
36 len--;
37 }
38
39 if (len > 0) {
40 buf[0] = '.';
41 buf++;
42 len--;
43 }
44
45 do {
46 tmp[tlen] = "0123456789"[fracpart % 10];
47 tlen++;
48
49 fracpart /= 10;
50 } while (tlen < 20 && fracpart != 0);
51
52 while (tlen > 0 && len > 0) {
53 buf[0] = tmp[--tlen];
54 buf++;
55 flen++;
56 len--;
57 }
58
59 while (flen < 3 && len > 0) {
60 buf[0] = '0';
61 buf++;
62 flen++;
63 len--;
64 }
65
66 if (len > 0)
67 buf[0] = '\0';
68
69 return buf - ptr;
70}
71static size_t dump_css_number(css_fixed val, char *ptr, size_t len)
72{
73 if (INTTOFIX(FIXTOINT(val)) == val)
74 return snprintf(ptr, len, "%d", FIXTOINT(val));
75 else
76 return dump_css_fixed(val, ptr, len);
77}
78
79static size_t dump_css_unit(css_fixed val, css_unit unit, char *ptr, size_t len)
80{
81 size_t ret = dump_css_number(val, ptr, len);
82
83 switch (unit) {
84 case CSS_UNIT_PX:
85 ret += snprintf(ptr + ret, len - ret, "px");
86 break;
87 case CSS_UNIT_EX:
88 ret += snprintf(ptr + ret, len - ret, "ex");
89 break;
90 case CSS_UNIT_EM:
91 ret += snprintf(ptr + ret, len - ret, "em");
92 break;
93 case CSS_UNIT_IN:
94 ret += snprintf(ptr + ret, len - ret, "in");
95 break;
96 case CSS_UNIT_CM:
97 ret += snprintf(ptr + ret, len - ret, "cm");
98 break;
99 case CSS_UNIT_MM:
100 ret += snprintf(ptr + ret, len - ret, "mm");
101 break;
102 case CSS_UNIT_PT:
103 ret += snprintf(ptr + ret, len - ret, "pt");
104 break;
105 case CSS_UNIT_PC:
106 ret += snprintf(ptr + ret, len - ret, "pc");
107 break;
108 case CSS_UNIT_CH:
109 ret += snprintf(ptr + ret, len - ret, "ch");
110 break;
111 case CSS_UNIT_REM:
112 ret += snprintf(ptr + ret, len - ret, "rem");
113 break;
114 case CSS_UNIT_LH:
115 ret += snprintf(ptr + ret, len - ret, "lh");
116 break;
117 case CSS_UNIT_VH:
118 ret += snprintf(ptr + ret, len - ret, "vh");
119 break;
120 case CSS_UNIT_VW:
121 ret += snprintf(ptr + ret, len - ret, "vw");
122 break;
123 case CSS_UNIT_VI:
124 ret += snprintf(ptr + ret, len - ret, "vi");
125 break;
126 case CSS_UNIT_VB:
127 ret += snprintf(ptr + ret, len - ret, "vb");
128 break;
129 case CSS_UNIT_VMIN:
130 ret += snprintf(ptr + ret, len - ret, "vmin");
131 break;
132 case CSS_UNIT_VMAX:
133 ret += snprintf(ptr + ret, len - ret, "vmax");
134 break;
135 case CSS_UNIT_Q:
136 ret += snprintf(ptr + ret, len - ret, "q");
137 break;
138 case CSS_UNIT_PCT:
139 ret += snprintf(ptr + ret, len - ret, "%%");
140 break;
141 case CSS_UNIT_DEG:
142 ret += snprintf(ptr + ret, len - ret, "deg");
143 break;
144 case CSS_UNIT_GRAD:
145 ret += snprintf(ptr + ret, len - ret, "grad");
146 break;
147 case CSS_UNIT_RAD:
148 ret += snprintf(ptr + ret, len - ret, "rad");
149 break;
150 case CSS_UNIT_MS:
151 ret += snprintf(ptr + ret, len - ret, "ms");
152 break;
153 case CSS_UNIT_S:
154 ret += snprintf(ptr + ret, len - ret, "s");
155 break;
156 case CSS_UNIT_HZ:
157 ret += snprintf(ptr + ret, len - ret, "Hz");
158 break;
159 case CSS_UNIT_KHZ:
160 ret += snprintf(ptr + ret, len - ret, "kHz");
161 break;
162 case CSS_UNIT_CALC:
163 ret += snprintf(ptr + ret, len - ret, "calc()");
164 break;
165 }
166
167 return ret;
168}
169
170
171static void dump_computed_style(const css_computed_style *style, char *buf,
172 size_t *len, css_unit_ctx *unit_ctx)
173{
174 char *ptr = buf;
175 size_t wrote = 0;
176 uint8_t val;
177 css_color color = 0;
178 lwc_string *url = NULL;
179 css_fixed len1 = 0, len2 = 0;
180 css_unit unit1 = CSS_UNIT_PX, unit2 = CSS_UNIT_PX;
181 css_computed_clip_rect rect = { 0, 0, 0, 0, CSS_UNIT_PX, CSS_UNIT_PX,
182 CSS_UNIT_PX, CSS_UNIT_PX, true, true,
183 true, true };
184 const css_computed_content_item *content = NULL;
185 const css_computed_counter *counter = NULL;
186 lwc_string **string_list = NULL;
187 int32_t integer = 0;
188#ifdef USE_DEVICE
189 int pixels = 0;
190#endif
191
192 (void)unit_ctx; /* Avoid unused argument warnings in select.c case */
193
194 /* align-content */
195 val = css_computed_align_content(style);
196 switch (val) {
198 wrote = snprintf(ptr, *len, "align-content: inherit\n");
199 break;
201 wrote = snprintf(ptr, *len, "align-content: stretch\n");
202 break;
204 wrote = snprintf(ptr, *len, "align-content: flex-start\n");
205 break;
207 wrote = snprintf(ptr, *len, "align-content: flex-end\n");
208 break;
210 wrote = snprintf(ptr, *len, "align-content: center\n");
211 break;
213 wrote = snprintf(ptr, *len, "align-content: space-between\n");
214 break;
216 wrote = snprintf(ptr, *len, "align-content: space-around\n");
217 break;
219 wrote = snprintf(ptr, *len, "align-content: space-evenly\n");
220 break;
221 default:
222 wrote = 0;
223 break;
224 }
225 ptr += wrote;
226 *len -= wrote;
227
228 /* align-items */
229 val = css_computed_align_items(style);
230 switch (val) {
232 wrote = snprintf(ptr, *len, "align-items: inherit\n");
233 break;
235 wrote = snprintf(ptr, *len, "align-items: stretch\n");
236 break;
238 wrote = snprintf(ptr, *len, "align-items: flex-start\n");
239 break;
241 wrote = snprintf(ptr, *len, "align-items: flex-end\n");
242 break;
244 wrote = snprintf(ptr, *len, "align-items: center\n");
245 break;
247 wrote = snprintf(ptr, *len, "align-items: baseline\n");
248 break;
249 default:
250 wrote = 0;
251 break;
252 }
253 ptr += wrote;
254 *len -= wrote;
255
256 /* align-self */
257 val = css_computed_align_self(style);
258 switch (val) {
260 wrote = snprintf(ptr, *len, "align-self: inherit\n");
261 break;
263 wrote = snprintf(ptr, *len, "align-self: stretch\n");
264 break;
266 wrote = snprintf(ptr, *len, "align-self: flex-start\n");
267 break;
269 wrote = snprintf(ptr, *len, "align-self: flex-end\n");
270 break;
272 wrote = snprintf(ptr, *len, "align-self: center\n");
273 break;
275 wrote = snprintf(ptr, *len, "align-self: baseline\n");
276 break;
278 wrote = snprintf(ptr, *len, "align-self: auto\n");
279 break;
280 default:
281 wrote = 0;
282 break;
283 }
284 ptr += wrote;
285 *len -= wrote;
286
287 /* background-attachment */
289 switch (val) {
291 wrote = snprintf(ptr, *len, "background-attachment: inherit\n");
292 break;
294 wrote = snprintf(ptr, *len, "background-attachment: fixed\n");
295 break;
297 wrote = snprintf(ptr, *len, "background-attachment: scroll\n");
298 break;
299 default:
300 wrote = 0;
301 break;
302 }
303 ptr += wrote;
304 *len -= wrote;
305
306 /* background-color */
307 val = css_computed_background_color(style, &color);
308 switch (val) {
310 wrote = snprintf(ptr, *len, "background-color: inherit\n");
311 break;
313 wrote = snprintf(ptr, *len, "background-color: #%08x\n", color);
314 break;
315 default:
316 wrote = 0;
317 break;
318 }
319 ptr += wrote;
320 *len -= wrote;
321
322 /* background-image */
323 val = css_computed_background_image(style, &url);
324 if (val == CSS_BACKGROUND_IMAGE_INHERIT) {
325 wrote = snprintf(ptr, *len, "background-image: inherit\n");
326 } else if (val == CSS_BACKGROUND_IMAGE_IMAGE && url != NULL) {
327 wrote = snprintf(ptr, *len, "background-image: url('%.*s')\n",
328 (int) lwc_string_length(url),
329 lwc_string_data(url));
330 } else if (val == CSS_BACKGROUND_IMAGE_NONE) {
331 wrote = snprintf(ptr, *len, "background-image: none\n");
332 } else {
333 wrote = 0;
334 }
335 ptr += wrote;
336 *len -= wrote;
337
338 /* background-position */
339 val = css_computed_background_position(style, &len1, &unit1,
340 &len2, &unit2);
342 wrote = snprintf(ptr, *len, "background-position: inherit\n");
343 ptr += wrote;
344 *len -= wrote;
345 } else if (val == CSS_BACKGROUND_POSITION_SET) {
346 wrote = snprintf(ptr, *len, "background-position: ");
347 ptr += wrote;
348 *len -= wrote;
349
350 wrote = dump_css_unit(len1, unit1, ptr, *len);
351 ptr += wrote;
352 *len -= wrote;
353
354 wrote = snprintf(ptr, *len, " ");
355 ptr += wrote;
356 *len -= wrote;
357
358 wrote = dump_css_unit(len2, unit2, ptr, *len);
359 ptr += wrote;
360 *len -= wrote;
361
362 wrote = snprintf(ptr, *len, "\n");
363 ptr += wrote;
364 *len -= wrote;
365 }
366
367 /* background-repeat */
369 switch (val) {
371 wrote = snprintf(ptr, *len, "background-repeat: inherit\n");
372 break;
374 wrote = snprintf(ptr, *len, "background-repeat: repeat-x\n");
375 break;
377 wrote = snprintf(ptr, *len, "background-repeat: repeat-y\n");
378 break;
380 wrote = snprintf(ptr, *len, "background-repeat: repeat\n");
381 break;
383 wrote = snprintf(ptr, *len, "background-repeat: no-repeat\n");
384 break;
385 default:
386 wrote = 0;
387 break;
388 }
389 ptr += wrote;
390 *len -= wrote;
391
392 /* border-collapse */
393 val = css_computed_border_collapse(style);
394 switch (val) {
396 wrote = snprintf(ptr, *len, "border-collapse: inherit\n");
397 break;
399 wrote = snprintf(ptr, *len, "border-collapse: separate\n");
400 break;
402 wrote = snprintf(ptr, *len, "border-collapse: collapse\n");
403 break;
404 default:
405 wrote = 0;
406 break;
407 }
408 ptr += wrote;
409 *len -= wrote;
410
411 /* border-spacing */
412 val = css_computed_border_spacing(style, &len1, &unit1, &len2, &unit2);
413 if (val == CSS_BORDER_SPACING_INHERIT) {
414 wrote = snprintf(ptr, *len, "border-spacing: inherit\n");
415 ptr += wrote;
416 *len -= wrote;
417 } else if (val == CSS_BORDER_SPACING_SET) {
418 wrote = snprintf(ptr, *len, "border-spacing: ");
419 ptr += wrote;
420 *len -= wrote;
421
422 wrote = dump_css_unit(len1, unit1, ptr, *len);
423 ptr += wrote;
424 *len -= wrote;
425
426 wrote = snprintf(ptr, *len, " ");
427 ptr += wrote;
428 *len -= wrote;
429
430 wrote = dump_css_unit(len2, unit2, ptr, *len);
431 ptr += wrote;
432 *len -= wrote;
433
434 wrote = snprintf(ptr, *len, "\n");
435 ptr += wrote;
436 *len -= wrote;
437 }
438
439 /* border-top-color */
440 val = css_computed_border_top_color(style, &color);
441 switch (val) {
443 wrote = snprintf(ptr, *len, "border-top-color: inherit\n");
444 break;
446 wrote = snprintf(ptr, *len, "border-top-color: currentColor\n");
447 break;
449 wrote = snprintf(ptr, *len, "border-top-color: #%08x\n", color);
450 break;
451 default:
452 wrote = 0;
453 break;
454 }
455 ptr += wrote;
456 *len -= wrote;
457
458 /* border-right-color */
459 val = css_computed_border_right_color(style, &color);
460 switch (val) {
462 wrote = snprintf(ptr, *len, "border-right-color: inherit\n");
463 break;
465 wrote = snprintf(ptr, *len, "border-right-color: currentColor\n");
466 break;
468 wrote = snprintf(ptr, *len,
469 "border-right-color: #%08x\n", color);
470 break;
471 default:
472 wrote = 0;
473 break;
474 }
475 ptr += wrote;
476 *len -= wrote;
477
478 /* border-bottom-color */
479 val = css_computed_border_bottom_color(style, &color);
480 switch (val) {
482 wrote = snprintf(ptr, *len, "border-bottom-color: inherit\n");
483 break;
485 wrote = snprintf(ptr, *len, "border-bottom-color: currentColor\n");
486 break;
488 wrote = snprintf(ptr, *len,
489 "border-bottom-color: #%08x\n", color);
490 break;
491 default:
492 wrote = 0;
493 break;
494 }
495 ptr += wrote;
496 *len -= wrote;
497
498 /* border-left-color */
499 val = css_computed_border_left_color(style, &color);
500 switch (val) {
502 wrote = snprintf(ptr, *len, "border-left-color: inherit\n");
503 break;
505 wrote = snprintf(ptr, *len, "border-left-color: currentColor\n");
506 break;
508 wrote = snprintf(ptr, *len,
509 "border-left-color: #%08x\n", color);
510 break;
511 default:
512 wrote = 0;
513 break;
514 }
515 ptr += wrote;
516 *len -= wrote;
517
518 /* border-top-style */
520 switch (val) {
522 wrote = snprintf(ptr, *len, "border-top-style: inherit\n");
523 break;
525 wrote = snprintf(ptr, *len, "border-top-style: none\n");
526 break;
528 wrote = snprintf(ptr, *len, "border-top-style: hidden\n");
529 break;
531 wrote = snprintf(ptr, *len, "border-top-style: dotted\n");
532 break;
534 wrote = snprintf(ptr, *len, "border-top-style: dashed\n");
535 break;
537 wrote = snprintf(ptr, *len, "border-top-style: solid\n");
538 break;
540 wrote = snprintf(ptr, *len, "border-top-style: double\n");
541 break;
543 wrote = snprintf(ptr, *len, "border-top-style: groove\n");
544 break;
546 wrote = snprintf(ptr, *len, "border-top-style: ridge\n");
547 break;
549 wrote = snprintf(ptr, *len, "border-top-style: inset\n");
550 break;
552 wrote = snprintf(ptr, *len, "border-top-style: outset\n");
553 break;
554 default:
555 wrote = 0;
556 break;
557 }
558 ptr += wrote;
559 *len -= wrote;
560
561 /* border-right-style */
563 switch (val) {
565 wrote = snprintf(ptr, *len, "border-right-style: inherit\n");
566 break;
568 wrote = snprintf(ptr, *len, "border-right-style: none\n");
569 break;
571 wrote = snprintf(ptr, *len, "border-right-style: hidden\n");
572 break;
574 wrote = snprintf(ptr, *len, "border-right-style: dotted\n");
575 break;
577 wrote = snprintf(ptr, *len, "border-right-style: dashed\n");
578 break;
580 wrote = snprintf(ptr, *len, "border-right-style: solid\n");
581 break;
583 wrote = snprintf(ptr, *len, "border-right-style: double\n");
584 break;
586 wrote = snprintf(ptr, *len, "border-right-style: groove\n");
587 break;
589 wrote = snprintf(ptr, *len, "border-right-style: ridge\n");
590 break;
592 wrote = snprintf(ptr, *len, "border-right-style: inset\n");
593 break;
595 wrote = snprintf(ptr, *len, "border-right-style: outset\n");
596 break;
597 default:
598 wrote = 0;
599 break;
600 }
601 ptr += wrote;
602 *len -= wrote;
603
604 /* border-bottom-style */
606 switch (val) {
608 wrote = snprintf(ptr, *len, "border-bottom-style: inherit\n");
609 break;
611 wrote = snprintf(ptr, *len, "border-bottom-style: none\n");
612 break;
614 wrote = snprintf(ptr, *len, "border-bottom-style: hidden\n");
615 break;
617 wrote = snprintf(ptr, *len, "border-bottom-style: dotted\n");
618 break;
620 wrote = snprintf(ptr, *len, "border-bottom-style: dashed\n");
621 break;
623 wrote = snprintf(ptr, *len, "border-bottom-style: solid\n");
624 break;
626 wrote = snprintf(ptr, *len, "border-bottom-style: double\n");
627 break;
629 wrote = snprintf(ptr, *len, "border-bottom-style: groove\n");
630 break;
632 wrote = snprintf(ptr, *len, "border-bottom-style: ridge\n");
633 break;
635 wrote = snprintf(ptr, *len, "border-bottom-style: inset\n");
636 break;
638 wrote = snprintf(ptr, *len, "border-bottom-style: outset\n");
639 break;
640 default:
641 wrote = 0;
642 break;
643 }
644 ptr += wrote;
645 *len -= wrote;
646
647 /* border-left-style */
649 switch (val) {
651 wrote = snprintf(ptr, *len, "border-left-style: inherit\n");
652 break;
654 wrote = snprintf(ptr, *len, "border-left-style: none\n");
655 break;
657 wrote = snprintf(ptr, *len, "border-left-style: hidden\n");
658 break;
660 wrote = snprintf(ptr, *len, "border-left-style: dotted\n");
661 break;
663 wrote = snprintf(ptr, *len, "border-left-style: dashed\n");
664 break;
666 wrote = snprintf(ptr, *len, "border-left-style: solid\n");
667 break;
669 wrote = snprintf(ptr, *len, "border-left-style: double\n");
670 break;
672 wrote = snprintf(ptr, *len, "border-left-style: groove\n");
673 break;
675 wrote = snprintf(ptr, *len, "border-left-style: ridge\n");
676 break;
678 wrote = snprintf(ptr, *len, "border-left-style: inset\n");
679 break;
681 wrote = snprintf(ptr, *len, "border-left-style: outset\n");
682 break;
683 default:
684 wrote = 0;
685 break;
686 }
687 ptr += wrote;
688 *len -= wrote;
689
690 /* border-top-width */
691 val = css_computed_border_top_width(style, &len1, &unit1);
692 switch (val) {
694 wrote = snprintf(ptr, *len, "border-top-width: inherit\n");
695 break;
697 wrote = snprintf(ptr, *len, "border-top-width: thin\n");
698 break;
700 wrote = snprintf(ptr, *len, "border-top-width: medium\n");
701 break;
703 wrote = snprintf(ptr, *len, "border-top-width: thick\n");
704 break;
706 wrote = snprintf(ptr, *len, "border-top-width: ");
707 ptr += wrote;
708 *len -= wrote;
709
710 wrote = dump_css_unit(len1, unit1, ptr, *len);
711 ptr += wrote;
712 *len -= wrote;
713
714 wrote = snprintf(ptr, *len, "\n");
715 break;
716 default:
717 wrote = 0;
718 break;
719 }
720 ptr += wrote;
721 *len -= wrote;
722
723 /* border-right-width */
724 val = css_computed_border_right_width(style, &len1, &unit1);
725 switch (val) {
727 wrote = snprintf(ptr, *len, "border-right-width: inherit\n");
728 break;
730 wrote = snprintf(ptr, *len, "border-right-width: thin\n");
731 break;
733 wrote = snprintf(ptr, *len, "border-right-width: medium\n");
734 break;
736 wrote = snprintf(ptr, *len, "border-right-width: thick\n");
737 break;
739 wrote = snprintf(ptr, *len, "border-right-width: ");
740 ptr += wrote;
741 *len -= wrote;
742
743 wrote = dump_css_unit(len1, unit1, ptr, *len);
744 ptr += wrote;
745 *len -= wrote;
746
747 wrote = snprintf(ptr, *len, "\n");
748 break;
749 default:
750 wrote = 0;
751 break;
752 }
753 ptr += wrote;
754 *len -= wrote;
755
756 /* border-bottom-width */
757 val = css_computed_border_bottom_width(style, &len1, &unit1);
758 switch (val) {
760 wrote = snprintf(ptr, *len, "border-bottom-width: inherit\n");
761 break;
763 wrote = snprintf(ptr, *len, "border-bottom-width: thin\n");
764 break;
766 wrote = snprintf(ptr, *len, "border-bottom-width: medium\n");
767 break;
769 wrote = snprintf(ptr, *len, "border-bottom-width: thick\n");
770 break;
772 wrote = snprintf(ptr, *len, "border-bottom-width: ");
773 ptr += wrote;
774 *len -= wrote;
775
776 wrote = dump_css_unit(len1, unit1, ptr, *len);
777 ptr += wrote;
778 *len -= wrote;
779
780 wrote = snprintf(ptr, *len, "\n");
781 break;
782 default:
783 wrote = 0;
784 break;
785 }
786 ptr += wrote;
787 *len -= wrote;
788
789 /* border-left-width */
790 val = css_computed_border_left_width(style, &len1, &unit1);
791 switch (val) {
793 wrote = snprintf(ptr, *len, "border-left-width: inherit\n");
794 break;
796 wrote = snprintf(ptr, *len, "border-left-width: thin\n");
797 break;
799 wrote = snprintf(ptr, *len, "border-left-width: medium\n");
800 break;
802 wrote = snprintf(ptr, *len, "border-left-width: thick\n");
803 break;
805 wrote = snprintf(ptr, *len, "border-left-width: ");
806 ptr += wrote;
807 *len -= wrote;
808
809 wrote = dump_css_unit(len1, unit1, ptr, *len);
810 ptr += wrote;
811 *len -= wrote;
812
813 wrote = snprintf(ptr, *len, "\n");
814 break;
815 default:
816 wrote = 0;
817 break;
818 }
819 ptr += wrote;
820 *len -= wrote;
821
822 /* bottom */
823 val = css_computed_bottom(style, &len1, &unit1);
824 switch (val) {
826 wrote = snprintf(ptr, *len, "bottom: inherit\n");
827 break;
828 case CSS_BOTTOM_AUTO:
829 wrote = snprintf(ptr, *len, "bottom: auto\n");
830 break;
831 case CSS_BOTTOM_SET:
832 wrote = snprintf(ptr, *len, "bottom: ");
833 ptr += wrote;
834 *len -= wrote;
835
836 wrote = dump_css_unit(len1, unit1, ptr, *len);
837 ptr += wrote;
838 *len -= wrote;
839
840 wrote = snprintf(ptr, *len, "\n");
841 break;
842 default:
843 wrote = 0;
844 break;
845 }
846 ptr += wrote;
847 *len -= wrote;
848
849 /* box-sizing */
850 val = css_computed_box_sizing(style);
851 switch (val) {
853 wrote = snprintf(ptr, *len, "box-sizing: inherit\n");
854 break;
856 wrote = snprintf(ptr, *len, "box-sizing: content-box\n");
857 break;
859 wrote = snprintf(ptr, *len, "box-sizing: border-box\n");
860 break;
861 default:
862 wrote = 0;
863 printf("DISASTER!\n");
864 assert(0);
865 break;
866 }
867 ptr += wrote;
868 *len -= wrote;
869
870 /* break-after */
871 val = css_computed_break_after(style);
872 switch (val) {
874 wrote = snprintf(ptr, *len, "break-after: inherit\n");
875 break;
877 wrote = snprintf(ptr, *len, "break-after: auto\n");
878 break;
880 wrote = snprintf(ptr, *len, "break-after: always\n");
881 break;
883 wrote = snprintf(ptr, *len, "break-after: avoid\n");
884 break;
886 wrote = snprintf(ptr, *len, "break-after: left\n");
887 break;
889 wrote = snprintf(ptr, *len, "break-after: right\n");
890 break;
892 wrote = snprintf(ptr, *len, "break-after: page\n");
893 break;
895 wrote = snprintf(ptr, *len, "break-after: column\n");
896 break;
898 wrote = snprintf(ptr, *len, "break-after: avoid-page\n");
899 break;
901 wrote = snprintf(ptr, *len, "break-after: avoid-column\n");
902 break;
903 default:
904 wrote = 0;
905 break;
906 }
907 ptr += wrote;
908 *len -= wrote;
909
910 /* break-before */
911 val = css_computed_break_before(style);
912 switch (val) {
914 wrote = snprintf(ptr, *len, "break-before: inherit\n");
915 break;
917 wrote = snprintf(ptr, *len, "break-before: auto\n");
918 break;
920 wrote = snprintf(ptr, *len, "break-before: always\n");
921 break;
923 wrote = snprintf(ptr, *len, "break-before: avoid\n");
924 break;
926 wrote = snprintf(ptr, *len, "break-before: left\n");
927 break;
929 wrote = snprintf(ptr, *len, "break-before: right\n");
930 break;
932 wrote = snprintf(ptr, *len, "break-before: page\n");
933 break;
935 wrote = snprintf(ptr, *len, "break-before: column\n");
936 break;
938 wrote = snprintf(ptr, *len, "break-before: avoid-page\n");
939 break;
941 wrote = snprintf(ptr, *len, "break-before: avoid-column\n");
942 break;
943 default:
944 wrote = 0;
945 break;
946 }
947 ptr += wrote;
948 *len -= wrote;
949
950 /* break-inside */
951 val = css_computed_break_inside(style);
952 switch (val) {
954 wrote = snprintf(ptr, *len, "break-inside: inherit\n");
955 break;
957 wrote = snprintf(ptr, *len, "break-inside: auto\n");
958 break;
960 wrote = snprintf(ptr, *len, "break-inside: avoid\n");
961 break;
963 wrote = snprintf(ptr, *len, "break-inside: avoid-page\n");
964 break;
966 wrote = snprintf(ptr, *len, "break-inside: avoid-column\n");
967 break;
968 default:
969 wrote = 0;
970 break;
971 }
972 ptr += wrote;
973 *len -= wrote;
974
975 /* caption-side */
976 val = css_computed_caption_side(style);
977 switch (val) {
979 wrote = snprintf(ptr, *len, "caption-side: inherit\n");
980 break;
982 wrote = snprintf(ptr, *len, "caption-side: top\n");
983 break;
985 wrote = snprintf(ptr, *len, "caption-side: bottom\n");
986 break;
987 default:
988 wrote = 0;
989 break;
990 }
991 ptr += wrote;
992 *len -= wrote;
993
994 /* clear */
995 val = css_computed_clear(style);
996 switch (val) {
998 wrote = snprintf(ptr, *len, "clear: inherit\n");
999 break;
1000 case CSS_CLEAR_NONE:
1001 wrote = snprintf(ptr, *len, "clear: none\n");
1002 break;
1003 case CSS_CLEAR_LEFT:
1004 wrote = snprintf(ptr, *len, "clear: left\n");
1005 break;
1006 case CSS_CLEAR_RIGHT:
1007 wrote = snprintf(ptr, *len, "clear: right\n");
1008 break;
1009 case CSS_CLEAR_BOTH:
1010 wrote = snprintf(ptr, *len, "clear: both\n");
1011 break;
1012 default:
1013 wrote = 0;
1014 break;
1015 }
1016 ptr += wrote;
1017 *len -= wrote;
1018
1019 /* clip */
1020 val = css_computed_clip(style, &rect);
1021 switch (val) {
1022 case CSS_CLIP_INHERIT:
1023 wrote = snprintf(ptr, *len, "clip: inherit\n");
1024 break;
1025 case CSS_CLIP_AUTO:
1026 wrote = snprintf(ptr, *len, "clip: auto\n");
1027 break;
1028 case CSS_CLIP_RECT:
1029 wrote = snprintf(ptr, *len, "clip: rect( ");
1030 ptr += wrote;
1031 *len -= wrote;
1032
1033 if (rect.top_auto)
1034 wrote = snprintf(ptr, *len, "auto");
1035 else
1036 wrote = dump_css_unit(rect.top, rect.tunit,
1037 ptr, *len);
1038 wrote += snprintf(ptr + wrote, *len - wrote, ", ");
1039 ptr += wrote;
1040 *len -= wrote;
1041
1042 if (rect.right_auto)
1043 wrote = snprintf(ptr, *len, "auto");
1044 else
1045 wrote = dump_css_unit(rect.right, rect.runit,
1046 ptr, *len);
1047 wrote += snprintf(ptr + wrote, *len - wrote, ", ");
1048 ptr += wrote;
1049 *len -= wrote;
1050
1051 if (rect.bottom_auto)
1052 wrote = snprintf(ptr, *len, "auto");
1053 else
1054 wrote = dump_css_unit(rect.bottom, rect.bunit,
1055 ptr, *len);
1056 wrote += snprintf(ptr + wrote, *len - wrote, ", ");
1057 ptr += wrote;
1058 *len -= wrote;
1059
1060 if (rect.left_auto)
1061 wrote = snprintf(ptr, *len, "auto");
1062 else
1063 wrote = dump_css_unit(rect.left, rect.lunit,
1064 ptr, *len);
1065 wrote += snprintf(ptr + wrote, *len - wrote, ")\n");
1066 break;
1067 default:
1068 wrote = 0;
1069 break;
1070 }
1071 ptr += wrote;
1072 *len -= wrote;
1073
1074 /* color */
1075 val = css_computed_color(style, &color);
1076 if (val == CSS_COLOR_INHERIT) {
1077 wrote = snprintf(ptr, *len, "color: inherit\n");
1078 } else if (val == CSS_COLOR_COLOR) {
1079 wrote = snprintf(ptr, *len, "color: #%08x\n", color);
1080 }
1081 ptr += wrote;
1082 *len -= wrote;
1083
1084 /* column-count */
1085 val = css_computed_column_count(style, &integer);
1086 switch (val) {
1088 wrote = snprintf(ptr, *len, "column-count: inherit\n");
1089 break;
1091 wrote = snprintf(ptr, *len, "column-count: auto\n");
1092 break;
1094 wrote = snprintf(ptr, *len, "column-count: %d\n", integer);
1095 break;
1096 default:
1097 wrote = 0;
1098 break;
1099 }
1100 ptr += wrote;
1101 *len -= wrote;
1102
1103 /* column-fill */
1104 val = css_computed_column_fill(style);
1105 switch (val) {
1107 wrote = snprintf(ptr, *len, "column-fill: inherit\n");
1108 break;
1110 wrote = snprintf(ptr, *len, "column-fill: auto\n");
1111 break;
1113 wrote = snprintf(ptr, *len, "column-fill: balance\n");
1114 break;
1115 default:
1116 wrote = 0;
1117 break;
1118 }
1119 ptr += wrote;
1120 *len -= wrote;
1121
1122 /* column-gap */
1123 val = css_computed_column_gap(style, &len1, &unit1);
1124 switch (val) {
1126 wrote = snprintf(ptr, *len, "column-gap: inherit\n");
1127 break;
1129 wrote = snprintf(ptr, *len, "column-gap: normal\n");
1130 break;
1131 case CSS_COLUMN_GAP_SET:
1132 wrote = snprintf(ptr, *len, "column-gap: ");
1133 ptr += wrote;
1134 *len -= wrote;
1135
1136 wrote = dump_css_unit(len1, unit1, ptr, *len);
1137 ptr += wrote;
1138 *len -= wrote;
1139
1140 wrote = snprintf(ptr, *len, "\n");
1141 break;
1142 default:
1143 wrote = 0;
1144 break;
1145 }
1146 ptr += wrote;
1147 *len -= wrote;
1148
1149 /* column-rule-color */
1150 val = css_computed_column_rule_color(style, &color);
1151 switch (val) {
1153 wrote = snprintf(ptr, *len, "column-rule-color: inherit\n");
1154 break;
1156 wrote = snprintf(ptr, *len, "column-rule-color: currentColor\n");
1157 break;
1159 wrote = snprintf(ptr, *len, "column-rule-color: #%08x\n",
1160 color);
1161 break;
1162 }
1163 ptr += wrote;
1164 *len -= wrote;
1165
1166 /* column-rule-style */
1167 val = css_computed_column_rule_style(style);
1168 switch (val) {
1170 wrote = snprintf(ptr, *len, "column-rule-style: inherit\n");
1171 break;
1173 wrote = snprintf(ptr, *len, "column-rule-style: none\n");
1174 break;
1176 wrote = snprintf(ptr, *len, "column-rule-style: hidden\n");
1177 break;
1179 wrote = snprintf(ptr, *len, "column-rule-style: dotted\n");
1180 break;
1182 wrote = snprintf(ptr, *len, "column-rule-style: dashed\n");
1183 break;
1185 wrote = snprintf(ptr, *len, "column-rule-style: solid\n");
1186 break;
1188 wrote = snprintf(ptr, *len, "column-rule-style: double\n");
1189 break;
1191 wrote = snprintf(ptr, *len, "column-rule-style: groove\n");
1192 break;
1194 wrote = snprintf(ptr, *len, "column-rule-style: ridge\n");
1195 break;
1197 wrote = snprintf(ptr, *len, "column-rule-style: inset\n");
1198 break;
1200 wrote = snprintf(ptr, *len, "column-rule-style: outset\n");
1201 break;
1202 default:
1203 wrote = 0;
1204 break;
1205 }
1206 ptr += wrote;
1207 *len -= wrote;
1208
1209 /* column-rule-width */
1210 val = css_computed_column_rule_width(style, &len1, &unit1);
1211 switch (val) {
1213 wrote = snprintf(ptr, *len, "column-rule-width: inherit\n");
1214 break;
1216 wrote = snprintf(ptr, *len, "column-rule-width: thin\n");
1217 break;
1219 wrote = snprintf(ptr, *len, "column-rule-width: medium\n");
1220 break;
1222 wrote = snprintf(ptr, *len, "column-rule-width: thick\n");
1223 break;
1225 wrote = snprintf(ptr, *len, "column-rule-width: ");
1226 ptr += wrote;
1227 *len -= wrote;
1228
1229 wrote = dump_css_unit(len1, unit1, ptr, *len);
1230 ptr += wrote;
1231 *len -= wrote;
1232
1233 wrote = snprintf(ptr, *len, "\n");
1234 break;
1235 default:
1236 wrote = 0;
1237 break;
1238 }
1239 ptr += wrote;
1240 *len -= wrote;
1241
1242 /* column-span */
1243 val = css_computed_column_span(style);
1244 switch (val) {
1246 wrote = snprintf(ptr, *len, "column-span: inherit\n");
1247 break;
1249 wrote = snprintf(ptr, *len, "column-span: none\n");
1250 break;
1252 wrote = snprintf(ptr, *len, "column-span: all\n");
1253 break;
1254 default:
1255 wrote = 0;
1256 break;
1257 }
1258 ptr += wrote;
1259 *len -= wrote;
1260
1261 /* column-width */
1262 val = css_computed_column_width(style, &len1, &unit1);
1263 switch (val) {
1265 wrote = snprintf(ptr, *len, "column-width: inherit\n");
1266 break;
1268 wrote = snprintf(ptr, *len, "column-width: auto\n");
1269 break;
1271 wrote = snprintf(ptr, *len, "column-width: ");
1272 ptr += wrote;
1273 *len -= wrote;
1274
1275 wrote = dump_css_unit(len1, unit1, ptr, *len);
1276 ptr += wrote;
1277 *len -= wrote;
1278
1279 wrote = snprintf(ptr, *len, "\n");
1280 break;
1281 default:
1282 wrote = 0;
1283 break;
1284 }
1285 ptr += wrote;
1286 *len -= wrote;
1287
1288 /* content */
1289 val = css_computed_content(style, &content);
1290 switch (val) {
1292 wrote = snprintf(ptr, *len, "content: inherit\n");
1293 break;
1294 case CSS_CONTENT_NONE:
1295 wrote = snprintf(ptr, *len, "content: none\n");
1296 break;
1297 case CSS_CONTENT_NORMAL:
1298 wrote = snprintf(ptr, *len, "content: normal\n");
1299 break;
1300 case CSS_CONTENT_SET:
1301 wrote = snprintf(ptr, *len, "content:");
1302 ptr += wrote;
1303 *len -= wrote;
1304
1305 while (content->type != CSS_COMPUTED_CONTENT_NONE) {
1306 wrote = snprintf(ptr, *len, " ");
1307
1308 switch (content->type) {
1310 wrote += snprintf(ptr + wrote,
1311 *len - wrote,
1312 "\"%.*s\"",
1313 (int) lwc_string_length(
1314 content->data.string),
1315 lwc_string_data(
1316 content->data.string));
1317 break;
1319 wrote += snprintf(ptr + wrote,
1320 *len - wrote,
1321 "uri(\"%.*s\")",
1322 (int) lwc_string_length(
1323 content->data.uri),
1324 lwc_string_data(
1325 content->data.uri));
1326 break;
1328 wrote += snprintf(ptr + wrote,
1329 *len - wrote,
1330 "counter(%.*s)",
1331 (int) lwc_string_length(
1332 content->data.counter.name),
1333 lwc_string_data(
1334 content->data.counter.name));
1335 break;
1337 wrote += snprintf(ptr + wrote,
1338 *len - wrote,
1339 "counters(%.*s, "
1340 "\"%.*s\")",
1341 (int) lwc_string_length(
1342 content->data.counters.name),
1343 lwc_string_data(
1344 content->data.counters.name),
1345 (int) lwc_string_length(
1346 content->data.counters.sep),
1347 lwc_string_data(
1348 content->data.counters.sep));
1349 break;
1351 wrote += snprintf(ptr + wrote,
1352 *len - wrote,
1353 "attr(%.*s)",
1354 (int) lwc_string_length(
1355 content->data.attr),
1356 lwc_string_data(
1357 content->data.attr));
1358 break;
1360 wrote += snprintf(ptr + wrote,
1361 *len - wrote,
1362 "open-quote");
1363 break;
1365 wrote += snprintf(ptr + wrote,
1366 *len - wrote,
1367 "close-quote");
1368 break;
1370 wrote += snprintf(ptr + wrote,
1371 *len - wrote,
1372 "no-open-quote");
1373 break;
1375 wrote += snprintf(ptr + wrote,
1376 *len - wrote,
1377 "no-close-quote");
1378 break;
1379 }
1380
1381 ptr += wrote;
1382 *len -= wrote;
1383
1384 content++;
1385 }
1386
1387 wrote = snprintf(ptr, *len, "\n");
1388 break;
1389 default:
1390 wrote = 0;
1391 break;
1392 }
1393 ptr += wrote;
1394 *len -= wrote;
1395
1396 /* counter-increment */
1397 val = css_computed_counter_increment(style, &counter);
1398 if (val == CSS_COUNTER_INCREMENT_INHERIT) {
1399 wrote = snprintf(ptr, *len, "counter-increment: inherit\n");
1400 } else if (counter == NULL) {
1401 wrote = snprintf(ptr, *len, "counter-increment: none\n");
1402 } else {
1403 wrote = snprintf(ptr, *len, "counter-increment:");
1404 ptr += wrote;
1405 *len -= wrote;
1406
1407 while (counter->name != NULL) {
1408 wrote = snprintf(ptr, *len, " %.*s ",
1409 (int) lwc_string_length(counter->name),
1410 lwc_string_data(counter->name));
1411 ptr += wrote;
1412 *len -= wrote;
1413
1414 wrote = dump_css_fixed(counter->value, ptr, *len);
1415 ptr += wrote;
1416 *len -= wrote;
1417
1418 counter++;
1419 }
1420
1421 wrote = snprintf(ptr, *len, "\n");
1422 }
1423 ptr += wrote;
1424 *len -= wrote;
1425
1426 /* counter-reset */
1427 val = css_computed_counter_reset(style, &counter);
1428 if (val == CSS_COUNTER_RESET_INHERIT) {
1429 wrote = snprintf(ptr, *len, "counter-reset: inherit\n");
1430 } else if (counter == NULL) {
1431 wrote = snprintf(ptr, *len, "counter-reset: none\n");
1432 } else {
1433 wrote = snprintf(ptr, *len, "counter-reset:");
1434 ptr += wrote;
1435 *len -= wrote;
1436
1437 while (counter->name != NULL) {
1438 wrote = snprintf(ptr, *len, " %.*s ",
1439 (int) lwc_string_length(counter->name),
1440 lwc_string_data(counter->name));
1441 ptr += wrote;
1442 *len -= wrote;
1443
1444 wrote = dump_css_fixed(counter->value, ptr, *len);
1445 ptr += wrote;
1446 *len -= wrote;
1447
1448 counter++;
1449 }
1450
1451 wrote = snprintf(ptr, *len, "\n");
1452 }
1453 ptr += wrote;
1454 *len -= wrote;
1455
1456 /* cursor */
1457 val = css_computed_cursor(style, &string_list);
1458 wrote = snprintf(ptr, *len, "cursor:");
1459 ptr += wrote;
1460 *len -= wrote;
1461
1462 if (string_list != NULL) {
1463 while (*string_list != NULL) {
1464 wrote = snprintf(ptr, *len, " url('%.*s')",
1465 (int) lwc_string_length(*string_list),
1466 lwc_string_data(*string_list));
1467 ptr += wrote;
1468 *len -= wrote;
1469
1470 string_list++;
1471 }
1472 }
1473 switch (val) {
1474 case CSS_CURSOR_INHERIT:
1475 wrote = snprintf(ptr, *len, " inherit\n");
1476 break;
1477 case CSS_CURSOR_AUTO:
1478 wrote = snprintf(ptr, *len, " auto\n");
1479 break;
1481 wrote = snprintf(ptr, *len, " crosshair\n");
1482 break;
1483 case CSS_CURSOR_DEFAULT:
1484 wrote = snprintf(ptr, *len, " default\n");
1485 break;
1486 case CSS_CURSOR_POINTER:
1487 wrote = snprintf(ptr, *len, " pointer\n");
1488 break;
1489 case CSS_CURSOR_MOVE:
1490 wrote = snprintf(ptr, *len, " move\n");
1491 break;
1493 wrote = snprintf(ptr, *len, " e-resize\n");
1494 break;
1496 wrote = snprintf(ptr, *len, " ne-resize\n");
1497 break;
1499 wrote = snprintf(ptr, *len, " nw-resize\n");
1500 break;
1502 wrote = snprintf(ptr, *len, " n-resize\n");
1503 break;
1505 wrote = snprintf(ptr, *len, " se-resize\n");
1506 break;
1508 wrote = snprintf(ptr, *len, " sw-resize\n");
1509 break;
1511 wrote = snprintf(ptr, *len, " s-resize\n");
1512 break;
1514 wrote = snprintf(ptr, *len, " w-resize\n");
1515 break;
1516 case CSS_CURSOR_TEXT:
1517 wrote = snprintf(ptr, *len, " text\n");
1518 break;
1519 case CSS_CURSOR_WAIT:
1520 wrote = snprintf(ptr, *len, " wait\n");
1521 break;
1522 case CSS_CURSOR_HELP:
1523 wrote = snprintf(ptr, *len, " help\n");
1524 break;
1526 wrote = snprintf(ptr, *len, " progress\n");
1527 break;
1528 default:
1529 wrote = 0;
1530 break;
1531 }
1532 ptr += wrote;
1533 *len -= wrote;
1534
1535 /* direction */
1536 val = css_computed_direction(style);
1537 switch (val) {
1539 wrote = snprintf(ptr, *len, "direction: inherit\n");
1540 break;
1541 case CSS_DIRECTION_LTR:
1542 wrote = snprintf(ptr, *len, "direction: ltr\n");
1543 break;
1544 case CSS_DIRECTION_RTL:
1545 wrote = snprintf(ptr, *len, "direction: rtl\n");
1546 break;
1547 default:
1548 wrote = 0;
1549 break;
1550 }
1551 ptr += wrote;
1552 *len -= wrote;
1553
1554 /* display */
1555 val = css_computed_display_static(style);
1556 switch (val) {
1558 wrote = snprintf(ptr, *len, "display: inherit\n");
1559 break;
1560 case CSS_DISPLAY_INLINE:
1561 wrote = snprintf(ptr, *len, "display: inline\n");
1562 break;
1563 case CSS_DISPLAY_BLOCK:
1564 wrote = snprintf(ptr, *len, "display: block\n");
1565 break;
1567 wrote = snprintf(ptr, *len, "display: list-item\n");
1568 break;
1569 case CSS_DISPLAY_RUN_IN:
1570 wrote = snprintf(ptr, *len, "display: run-in\n");
1571 break;
1573 wrote = snprintf(ptr, *len, "display: inline-block\n");
1574 break;
1575 case CSS_DISPLAY_TABLE:
1576 wrote = snprintf(ptr, *len, "display: table\n");
1577 break;
1579 wrote = snprintf(ptr, *len, "display: inline-table\n");
1580 break;
1582 wrote = snprintf(ptr, *len, "display: table-row-group\n");
1583 break;
1585 wrote = snprintf(ptr, *len, "display: table-header-group\n");
1586 break;
1588 wrote = snprintf(ptr, *len, "display: table-footer-group\n");
1589 break;
1591 wrote = snprintf(ptr, *len, "display: table-row\n");
1592 break;
1594 wrote = snprintf(ptr, *len, "display: table-column-group\n");
1595 break;
1597 wrote = snprintf(ptr, *len, "display: table-column\n");
1598 break;
1600 wrote = snprintf(ptr, *len, "display: table-cell\n");
1601 break;
1603 wrote = snprintf(ptr, *len, "display: table-caption\n");
1604 break;
1605 case CSS_DISPLAY_NONE:
1606 wrote = snprintf(ptr, *len, "display: none\n");
1607 break;
1608 case CSS_DISPLAY_FLEX:
1609 wrote = snprintf(ptr, *len, "display: flex\n");
1610 break;
1612 wrote = snprintf(ptr, *len, "display: inline-flex\n");
1613 break;
1614 case CSS_DISPLAY_GRID:
1615 wrote = snprintf(ptr, *len, "display: grid\n");
1616 break;
1618 wrote = snprintf(ptr, *len, "display: inline-grid\n");
1619 break;
1620 default:
1621 wrote = 0;
1622 break;
1623 }
1624 ptr += wrote;
1625 *len -= wrote;
1626
1627 /* empty-cells */
1628 val = css_computed_empty_cells(style);
1629 switch (val) {
1631 wrote = snprintf(ptr, *len, "empty-cells: inherit\n");
1632 break;
1634 wrote = snprintf(ptr, *len, "empty-cells: show\n");
1635 break;
1637 wrote = snprintf(ptr, *len, "empty-cells: hide\n");
1638 break;
1639 default:
1640 wrote = 0;
1641 break;
1642 }
1643 ptr += wrote;
1644 *len -= wrote;
1645
1646 /* fill-opacity */
1647 val = css_computed_fill_opacity(style, &len1);
1648 switch (val) {
1650 wrote = snprintf(ptr, *len, "fill-opacity: inherit\n");
1651 break;
1653 wrote = snprintf(ptr, *len, "fill-opacity: ");
1654 ptr += wrote;
1655 *len -= wrote;
1656
1657 wrote = dump_css_fixed(len1, ptr, *len);
1658 ptr += wrote;
1659 *len -= wrote;
1660
1661 wrote = snprintf(ptr, *len, "\n");
1662 break;
1663 default:
1664 wrote = 0;
1665 break;
1666 }
1667 ptr += wrote;
1668 *len -= wrote;
1669
1670 /* flex-basis */
1671 val = css_computed_flex_basis(style, &len1, &unit1);
1672 switch (val) {
1674 wrote = snprintf(ptr, *len, "flex-basis: inherit\n");
1675 break;
1677 wrote = snprintf(ptr, *len, "flex-basis: auto\n");
1678 break;
1680 wrote = snprintf(ptr, *len, "flex-basis: content\n");
1681 break;
1682 case CSS_FLEX_BASIS_SET:
1683 wrote = snprintf(ptr, *len, "flex-basis: ");
1684 ptr += wrote;
1685 *len -= wrote;
1686
1687 wrote = dump_css_unit(len1, unit1, ptr, *len);
1688 ptr += wrote;
1689 *len -= wrote;
1690
1691 wrote = snprintf(ptr, *len, "\n");
1692 break;
1693 default:
1694 wrote = 0;
1695 break;
1696 }
1697 ptr += wrote;
1698 *len -= wrote;
1699
1700 /* flex-direction */
1701 val = css_computed_flex_direction(style);
1702 switch (val) {
1704 wrote = snprintf(ptr, *len, "flex-direction: inherit\n");
1705 break;
1707 wrote = snprintf(ptr, *len, "flex-direction: row\n");
1708 break;
1710 wrote = snprintf(ptr, *len, "flex-direction: row-reverse\n");
1711 break;
1713 wrote = snprintf(ptr, *len, "flex-direction: column\n");
1714 break;
1716 wrote = snprintf(ptr, *len, "flex-direction: column-reverse\n");
1717 break;
1718 default:
1719 wrote = 0;
1720 break;
1721 }
1722 ptr += wrote;
1723 *len -= wrote;
1724
1725 /* flex-grow */
1726 val = css_computed_flex_grow(style, &len1);
1727 switch (val) {
1729 wrote = snprintf(ptr, *len, "flex-grow: inherit\n");
1730 break;
1731 case CSS_FLEX_GROW_SET:
1732 wrote = snprintf(ptr, *len, "flex-grow: ");
1733 ptr += wrote;
1734 *len -= wrote;
1735
1736 wrote = dump_css_fixed(len1, ptr, *len);
1737 ptr += wrote;
1738 *len -= wrote;
1739
1740 wrote = snprintf(ptr, *len, "\n");
1741 break;
1742 default:
1743 wrote = 0;
1744 break;
1745 }
1746 ptr += wrote;
1747 *len -= wrote;
1748
1749 /* flex-shrink */
1750 val = css_computed_flex_shrink(style, &len1);
1751 switch (val) {
1753 wrote = snprintf(ptr, *len, "flex-shrink: inherit\n");
1754 break;
1756 wrote = snprintf(ptr, *len, "flex-shrink: ");
1757 ptr += wrote;
1758 *len -= wrote;
1759
1760 wrote = dump_css_fixed(len1, ptr, *len);
1761 ptr += wrote;
1762 *len -= wrote;
1763
1764 wrote = snprintf(ptr, *len, "\n");
1765 break;
1766 default:
1767 wrote = 0;
1768 break;
1769 }
1770 ptr += wrote;
1771 *len -= wrote;
1772
1773 /* flex-wrap */
1774 val = css_computed_flex_wrap(style);
1775 switch (val) {
1777 wrote = snprintf(ptr, *len, "flex-wrap: inherit\n");
1778 break;
1780 wrote = snprintf(ptr, *len, "flex-wrap: nowrap\n");
1781 break;
1782 case CSS_FLEX_WRAP_WRAP:
1783 wrote = snprintf(ptr, *len, "flex-wrap: wrap\n");
1784 break;
1786 wrote = snprintf(ptr, *len, "flex-wrap: wrap-reverse\n");
1787 break;
1788 default:
1789 wrote = 0;
1790 break;
1791 }
1792 ptr += wrote;
1793 *len -= wrote;
1794
1795 /* float */
1796 val = css_computed_float(style);
1797 switch (val) {
1798 case CSS_FLOAT_INHERIT:
1799 wrote = snprintf(ptr, *len, "float: inherit\n");
1800 break;
1801 case CSS_FLOAT_LEFT:
1802 wrote = snprintf(ptr, *len, "float: left\n");
1803 break;
1804 case CSS_FLOAT_RIGHT:
1805 wrote = snprintf(ptr, *len, "float: right\n");
1806 break;
1807 case CSS_FLOAT_NONE:
1808 wrote = snprintf(ptr, *len, "float: none\n");
1809 break;
1810 default:
1811 wrote = 0;
1812 break;
1813 }
1814 ptr += wrote;
1815 *len -= wrote;
1816
1817 /* font-family */
1818 val = css_computed_font_family(style, &string_list);
1819 if (val == CSS_FONT_FAMILY_INHERIT) {
1820 wrote = snprintf(ptr, *len, "font-family: inherit\n");
1821 ptr += wrote;
1822 *len -= wrote;
1823 } else {
1824 wrote = snprintf(ptr, *len, "font-family:");
1825 ptr += wrote;
1826 *len -= wrote;
1827
1828 if (string_list != NULL) {
1829 while (*string_list != NULL) {
1830 wrote = snprintf(ptr, *len, " \"%.*s\"",
1831 (int) lwc_string_length(*string_list),
1832 lwc_string_data(*string_list));
1833 ptr += wrote;
1834 *len -= wrote;
1835
1836 string_list++;
1837 }
1838 }
1839 switch (val) {
1841 wrote = snprintf(ptr, *len, " serif\n");
1842 break;
1844 wrote = snprintf(ptr, *len, " sans-serif\n");
1845 break;
1847 wrote = snprintf(ptr, *len, " cursive\n");
1848 break;
1850 wrote = snprintf(ptr, *len, " fantasy\n");
1851 break;
1853 wrote = snprintf(ptr, *len, " monospace\n");
1854 break;
1855 }
1856 ptr += wrote;
1857 *len -= wrote;
1858 }
1859
1860 /* font-size */
1861 val = css_computed_font_size(style, &len1, &unit1);
1862 switch (val) {
1864 wrote = snprintf(ptr, *len, "font-size: inherit\n");
1865 break;
1867 wrote = snprintf(ptr, *len, "font-size: xx-small\n");
1868 break;
1870 wrote = snprintf(ptr, *len, "font-size: x-small\n");
1871 break;
1873 wrote = snprintf(ptr, *len, "font-size: small\n");
1874 break;
1876 wrote = snprintf(ptr, *len, "font-size: medium\n");
1877 break;
1879 wrote = snprintf(ptr, *len, "font-size: large\n");
1880 break;
1882 wrote = snprintf(ptr, *len, "font-size: x-large\n");
1883 break;
1885 wrote = snprintf(ptr, *len, "font-size: xx-large\n");
1886 break;
1888 wrote = snprintf(ptr, *len, "font-size: larger\n");
1889 break;
1891 wrote = snprintf(ptr, *len, "font-size: smaller\n");
1892 break;
1894 wrote = snprintf(ptr, *len, "font-size: ");
1895 ptr += wrote;
1896 *len -= wrote;
1897
1898 wrote = dump_css_unit(len1, unit1, ptr, *len);
1899 ptr += wrote;
1900 *len -= wrote;
1901
1902 wrote = snprintf(ptr, *len, "\n");
1903 break;
1904 default:
1905 wrote = 0;
1906 break;
1907 }
1908 ptr += wrote;
1909 *len -= wrote;
1910
1911 /* font-style */
1912 val = css_computed_font_style(style);
1913 switch (val) {
1915 wrote = snprintf(ptr, *len, "font-style: inherit\n");
1916 break;
1918 wrote = snprintf(ptr, *len, "font-style: normal\n");
1919 break;
1921 wrote = snprintf(ptr, *len, "font-style: italic\n");
1922 break;
1924 wrote = snprintf(ptr, *len, "font-style: oblique\n");
1925 break;
1926 default:
1927 wrote = 0;
1928 break;
1929 }
1930 ptr += wrote;
1931 *len -= wrote;
1932
1933 /* font-variant */
1934 val = css_computed_font_variant(style);
1935 switch (val) {
1937 wrote = snprintf(ptr, *len, "font-variant: inherit\n");
1938 break;
1940 wrote = snprintf(ptr, *len, "font-variant: normal\n");
1941 break;
1943 wrote = snprintf(ptr, *len, "font-variant: small-caps\n");
1944 break;
1945 default:
1946 wrote = 0;
1947 break;
1948 }
1949 ptr += wrote;
1950 *len -= wrote;
1951
1952 /* font-weight */
1953 val = css_computed_font_weight(style);
1954 switch (val) {
1956 wrote = snprintf(ptr, *len, "font-weight: inherit\n");
1957 break;
1959 wrote = snprintf(ptr, *len, "font-weight: normal\n");
1960 break;
1962 wrote = snprintf(ptr, *len, "font-weight: bold\n");
1963 break;
1965 wrote = snprintf(ptr, *len, "font-weight: bolder\n");
1966 break;
1968 wrote = snprintf(ptr, *len, "font-weight: lighter\n");
1969 break;
1971 wrote = snprintf(ptr, *len, "font-weight: 100\n");
1972 break;
1974 wrote = snprintf(ptr, *len, "font-weight: 200\n");
1975 break;
1977 wrote = snprintf(ptr, *len, "font-weight: 300\n");
1978 break;
1980 wrote = snprintf(ptr, *len, "font-weight: 400\n");
1981 break;
1983 wrote = snprintf(ptr, *len, "font-weight: 500\n");
1984 break;
1986 wrote = snprintf(ptr, *len, "font-weight: 600\n");
1987 break;
1989 wrote = snprintf(ptr, *len, "font-weight: 700\n");
1990 break;
1992 wrote = snprintf(ptr, *len, "font-weight: 800\n");
1993 break;
1995 wrote = snprintf(ptr, *len, "font-weight: 900\n");
1996 break;
1997 default:
1998 wrote = 0;
1999 break;
2000 }
2001 ptr += wrote;
2002 *len -= wrote;
2003
2004 /* height */
2005 val = css_computed_height(style, &len1, &unit1);
2006 switch (val) {
2007 case CSS_HEIGHT_INHERIT:
2008 wrote = snprintf(ptr, *len, "height: inherit\n");
2009 break;
2010 case CSS_HEIGHT_AUTO:
2011 wrote = snprintf(ptr, *len, "height: auto\n");
2012 break;
2013 case CSS_HEIGHT_SET:
2014 wrote = snprintf(ptr, *len, "height: ");
2015 ptr += wrote;
2016 *len -= wrote;
2017
2018 wrote = dump_css_unit(len1, unit1, ptr, *len);
2019 ptr += wrote;
2020 *len -= wrote;
2021
2022 wrote = snprintf(ptr, *len, "\n");
2023 break;
2024 default:
2025 wrote = 0;
2026 break;
2027 }
2028 ptr += wrote;
2029 *len -= wrote;
2030
2031 /* justify-content */
2032 val = css_computed_justify_content(style);
2033 switch (val) {
2035 wrote = snprintf(ptr, *len, "justify-content: inherit\n");
2036 break;
2038 wrote = snprintf(ptr, *len, "justify-content: flex-start\n");
2039 break;
2041 wrote = snprintf(ptr, *len, "justify-content: flex-end\n");
2042 break;
2044 wrote = snprintf(ptr, *len, "justify-content: center\n");
2045 break;
2047 wrote = snprintf(ptr, *len, "justify-content: space-between\n");
2048 break;
2050 wrote = snprintf(ptr, *len, "justify-content: space-around\n");
2051 break;
2053 wrote = snprintf(ptr, *len, "justify-content: space-evenly\n");
2054 break;
2055 default:
2056 wrote = 0;
2057 break;
2058 }
2059 ptr += wrote;
2060 *len -= wrote;
2061
2062 /* left */
2063 val = css_computed_left(style, &len1, &unit1);
2064 switch (val) {
2065 case CSS_LEFT_INHERIT:
2066 wrote = snprintf(ptr, *len, "left: inherit\n");
2067 break;
2068 case CSS_LEFT_AUTO:
2069 wrote = snprintf(ptr, *len, "left: auto\n");
2070 break;
2071 case CSS_LEFT_SET:
2072 wrote = snprintf(ptr, *len, "left: ");
2073 ptr += wrote;
2074 *len -= wrote;
2075
2076 wrote = dump_css_unit(len1, unit1, ptr, *len);
2077 ptr += wrote;
2078 *len -= wrote;
2079
2080 wrote = snprintf(ptr, *len, "\n");
2081 break;
2082 default:
2083 wrote = 0;
2084 break;
2085 }
2086 ptr += wrote;
2087 *len -= wrote;
2088
2089 /* letter-spacing */
2090 val = css_computed_letter_spacing(style, &len1, &unit1);
2091 switch (val) {
2093 wrote = snprintf(ptr, *len, "letter-spacing: inherit\n");
2094 break;
2096 wrote = snprintf(ptr, *len, "letter-spacing: normal\n");
2097 break;
2099 wrote = snprintf(ptr, *len, "letter-spacing: ");
2100 ptr += wrote;
2101 *len -= wrote;
2102
2103 wrote = dump_css_unit(len1, unit1, ptr, *len);
2104 ptr += wrote;
2105 *len -= wrote;
2106
2107 wrote = snprintf(ptr, *len, "\n");
2108 break;
2109 default:
2110 wrote = 0;
2111 break;
2112 }
2113 ptr += wrote;
2114 *len -= wrote;
2115
2116 /* line-height */
2117 val = css_computed_line_height(style, &len1, &unit1);
2118 switch (val) {
2120 wrote = snprintf(ptr, *len, "line-height: inherit\n");
2121 break;
2123 wrote = snprintf(ptr, *len, "line-height: normal\n");
2124 break;
2126 wrote = snprintf(ptr, *len, "line-height: ");
2127 ptr += wrote;
2128 *len -= wrote;
2129
2130 wrote = dump_css_fixed(len1, ptr, *len);
2131 ptr += wrote;
2132 *len -= wrote;
2133
2134 wrote = snprintf(ptr, *len, "\n");
2135 break;
2137 wrote = snprintf(ptr, *len, "line-height: ");
2138 ptr += wrote;
2139 *len -= wrote;
2140
2141 wrote = dump_css_unit(len1, unit1, ptr, *len);
2142 ptr += wrote;
2143 *len -= wrote;
2144
2145 wrote = snprintf(ptr, *len, "\n");
2146 break;
2147 default:
2148 wrote = 0;
2149 break;
2150 }
2151 ptr += wrote;
2152 *len -= wrote;
2153
2154 /* list-style-image */
2155 val = css_computed_list_style_image(style, &url);
2156 if (val == CSS_LIST_STYLE_IMAGE_INHERIT) {
2157 wrote = snprintf(ptr, *len, "list-style-image: inherit\n");
2158 } else if (url != NULL) {
2159 wrote = snprintf(ptr, *len, "list-style-image: url('%.*s')\n",
2160 (int) lwc_string_length(url),
2161 lwc_string_data(url));
2162 } else if (val == CSS_LIST_STYLE_IMAGE_NONE) {
2163 wrote = snprintf(ptr, *len, "list-style-image: none\n");
2164 } else {
2165 wrote = 0;
2166 }
2167 ptr += wrote;
2168 *len -= wrote;
2169
2170 /* list-style-position */
2172 switch (val) {
2174 wrote = snprintf(ptr, *len, "list-style-position: inherit\n");
2175 break;
2177 wrote = snprintf(ptr, *len, "list-style-position: inside\n");
2178 break;
2180 wrote = snprintf(ptr, *len, "list-style-position: outside\n");
2181 break;
2182 default:
2183 wrote = 0;
2184 break;
2185 }
2186 ptr += wrote;
2187 *len -= wrote;
2188
2189 /* list-style-type */
2190 val = css_computed_list_style_type(style);
2191 switch (val) {
2193 wrote = snprintf(ptr, *len, "list-style-type: inherit\n");
2194 break;
2196 wrote = snprintf(ptr, *len, "list-style-type: disc\n");
2197 break;
2199 wrote = snprintf(ptr, *len, "list-style-type: circle\n");
2200 break;
2202 wrote = snprintf(ptr, *len, "list-style-type: square\n");
2203 break;
2205 wrote = snprintf(ptr, *len, "list-style-type: decimal\n");
2206 break;
2208 wrote = snprintf(ptr, *len,
2209 "list-style-type: decimal-leading-zero\n");
2210 break;
2212 wrote = snprintf(ptr, *len, "list-style-type: lower-roman\n");
2213 break;
2215 wrote = snprintf(ptr, *len, "list-style-type: upper-roman\n");
2216 break;
2218 wrote = snprintf(ptr, *len, "list-style-type: lower-greek\n");
2219 break;
2221 wrote = snprintf(ptr, *len, "list-style-type: lower-latin\n");
2222 break;
2224 wrote = snprintf(ptr, *len, "list-style-type: upper-latin\n");
2225 break;
2227 wrote = snprintf(ptr, *len, "list-style-type: armenian\n");
2228 break;
2230 wrote = snprintf(ptr, *len, "list-style-type: georgian\n");
2231 break;
2233 wrote = snprintf(ptr, *len, "list-style-type: lower-alpha\n");
2234 break;
2236 wrote = snprintf(ptr, *len, "list-style-type: upper-alpha\n");
2237 break;
2239 wrote = snprintf(ptr, *len, "list-style-type: none\n");
2240 break;
2241 default:
2242 wrote = 0;
2243 break;
2244 }
2245 ptr += wrote;
2246 *len -= wrote;
2247
2248 /* margin-top */
2249 val = css_computed_margin_top(style, &len1, &unit1);
2250 switch (val) {
2251 case CSS_MARGIN_INHERIT:
2252 wrote = snprintf(ptr, *len, "margin-top: inherit\n");
2253 break;
2254 case CSS_MARGIN_AUTO:
2255 wrote = snprintf(ptr, *len, "margin-top: auto\n");
2256 break;
2257 case CSS_MARGIN_SET:
2258 wrote = snprintf(ptr, *len, "margin-top: ");
2259 ptr += wrote;
2260 *len -= wrote;
2261
2262 wrote = dump_css_unit(len1, unit1, ptr, *len);
2263 ptr += wrote;
2264 *len -= wrote;
2265
2266 wrote = snprintf(ptr, *len, "\n");
2267 break;
2268 default:
2269 wrote = 0;
2270 break;
2271 }
2272 ptr += wrote;
2273 *len -= wrote;
2274
2275 /* margin-right */
2276 val = css_computed_margin_right(style, &len1, &unit1);
2277 switch (val) {
2278 case CSS_MARGIN_INHERIT:
2279 wrote = snprintf(ptr, *len, "margin-right: inherit\n");
2280 break;
2281 case CSS_MARGIN_AUTO:
2282 wrote = snprintf(ptr, *len, "margin-right: auto\n");
2283 break;
2284 case CSS_MARGIN_SET:
2285 wrote = snprintf(ptr, *len, "margin-right: ");
2286 ptr += wrote;
2287 *len -= wrote;
2288
2289 wrote = dump_css_unit(len1, unit1, ptr, *len);
2290 ptr += wrote;
2291 *len -= wrote;
2292
2293 wrote = snprintf(ptr, *len, "\n");
2294 break;
2295 default:
2296 wrote = 0;
2297 break;
2298 }
2299 ptr += wrote;
2300 *len -= wrote;
2301
2302 /* margin-bottom */
2303 val = css_computed_margin_bottom(style, &len1, &unit1);
2304 switch (val) {
2305 case CSS_MARGIN_INHERIT:
2306 wrote = snprintf(ptr, *len, "margin-bottom: inherit\n");
2307 break;
2308 case CSS_MARGIN_AUTO:
2309 wrote = snprintf(ptr, *len, "margin-bottom: auto\n");
2310 break;
2311 case CSS_MARGIN_SET:
2312 wrote = snprintf(ptr, *len, "margin-bottom: ");
2313 ptr += wrote;
2314 *len -= wrote;
2315
2316 wrote = dump_css_unit(len1, unit1, ptr, *len);
2317 ptr += wrote;
2318 *len -= wrote;
2319
2320 wrote = snprintf(ptr, *len, "\n");
2321 break;
2322 default:
2323 wrote = 0;
2324 break;
2325 }
2326 ptr += wrote;
2327 *len -= wrote;
2328
2329 /* margin-left */
2330 val = css_computed_margin_left(style, &len1, &unit1);
2331 switch (val) {
2332 case CSS_MARGIN_INHERIT:
2333 wrote = snprintf(ptr, *len, "margin-left: inherit\n");
2334 break;
2335 case CSS_MARGIN_AUTO:
2336 wrote = snprintf(ptr, *len, "margin-left: auto\n");
2337 break;
2338 case CSS_MARGIN_SET:
2339 wrote = snprintf(ptr, *len, "margin-left: ");
2340 ptr += wrote;
2341 *len -= wrote;
2342
2343 wrote = dump_css_unit(len1, unit1, ptr, *len);
2344 ptr += wrote;
2345 *len -= wrote;
2346
2347 wrote = snprintf(ptr, *len, "\n");
2348 break;
2349 default:
2350 wrote = 0;
2351 break;
2352 }
2353 ptr += wrote;
2354 *len -= wrote;
2355
2356 /* max-height */
2357 val = css_computed_max_height(style, &len1, &unit1);
2358 switch (val) {
2360 wrote = snprintf(ptr, *len, "max-height: inherit\n");
2361 break;
2363 wrote = snprintf(ptr, *len, "max-height: none\n");
2364 break;
2365 case CSS_MAX_HEIGHT_SET:
2366 wrote = snprintf(ptr, *len, "max-height: ");
2367 ptr += wrote;
2368 *len -= wrote;
2369
2370 wrote = dump_css_unit(len1, unit1, ptr, *len);
2371 ptr += wrote;
2372 *len -= wrote;
2373
2374 wrote = snprintf(ptr, *len, "\n");
2375 break;
2376 default:
2377 wrote = 0;
2378 break;
2379 }
2380 ptr += wrote;
2381 *len -= wrote;
2382
2383 /* max-width */
2384 val = css_computed_max_width(style, &len1, &unit1);
2385 switch (val) {
2387 wrote = snprintf(ptr, *len, "max-width: inherit\n");
2388 break;
2389 case CSS_MAX_WIDTH_NONE:
2390 wrote = snprintf(ptr, *len, "max-width: none\n");
2391 break;
2392 case CSS_MAX_WIDTH_SET:
2393 wrote = snprintf(ptr, *len, "max-width: ");
2394 ptr += wrote;
2395 *len -= wrote;
2396
2397 wrote = dump_css_unit(len1, unit1, ptr, *len);
2398 ptr += wrote;
2399 *len -= wrote;
2400
2401 wrote = snprintf(ptr, *len, "\n");
2402 break;
2403 default:
2404 wrote = 0;
2405 break;
2406 }
2407 ptr += wrote;
2408 *len -= wrote;
2409
2410 /* min-height */
2411 val = css_computed_min_height(style, &len1, &unit1);
2412 switch (val) {
2414 wrote = snprintf(ptr, *len, "min-height: inherit\n");
2415 break;
2417 wrote = snprintf(ptr, *len, "min-height: auto\n");
2418 break;
2419 case CSS_MIN_HEIGHT_SET:
2420 wrote = snprintf(ptr, *len, "min-height: ");
2421 ptr += wrote;
2422 *len -= wrote;
2423
2424 wrote = dump_css_unit(len1, unit1, ptr, *len);
2425 ptr += wrote;
2426 *len -= wrote;
2427
2428 wrote = snprintf(ptr, *len, "\n");
2429 break;
2430 default:
2431 wrote = 0;
2432 break;
2433 }
2434 ptr += wrote;
2435 *len -= wrote;
2436
2437 /* min-width */
2438 val = css_computed_min_width(style, &len1, &unit1);
2439 switch (val) {
2441 wrote = snprintf(ptr, *len, "min-width: inherit\n");
2442 break;
2443 case CSS_MIN_WIDTH_AUTO:
2444 wrote = snprintf(ptr, *len, "min-width: auto\n");
2445 break;
2446 case CSS_MIN_WIDTH_SET:
2447 wrote = snprintf(ptr, *len, "min-width: ");
2448 ptr += wrote;
2449 *len -= wrote;
2450
2451 wrote = dump_css_unit(len1, unit1, ptr, *len);
2452 ptr += wrote;
2453 *len -= wrote;
2454
2455 wrote = snprintf(ptr, *len, "\n");
2456 break;
2457 default:
2458 wrote = 0;
2459 break;
2460 }
2461 ptr += wrote;
2462 *len -= wrote;
2463
2464 /* opacity */
2465 val = css_computed_opacity(style, &len1);
2466 switch (val) {
2468 wrote = snprintf(ptr, *len, "opacity: inherit\n");
2469 break;
2470 case CSS_OPACITY_SET:
2471 wrote = snprintf(ptr, *len, "opacity: ");
2472 ptr += wrote;
2473 *len -= wrote;
2474
2475 wrote = dump_css_fixed(len1, ptr, *len);
2476 ptr += wrote;
2477 *len -= wrote;
2478
2479 wrote = snprintf(ptr, *len, "\n");
2480 break;
2481 default:
2482 wrote = 0;
2483 break;
2484 }
2485 ptr += wrote;
2486 *len -= wrote;
2487
2488 /* order */
2489 val = css_computed_order(style, &integer);
2490 switch (val) {
2491 case CSS_ORDER_INHERIT:
2492 wrote = snprintf(ptr, *len, "order: inherit\n");
2493 break;
2494 case CSS_ORDER_SET:
2495 wrote = snprintf(ptr, *len, "order: %d\n", integer);
2496 break;
2497 default:
2498 wrote = 0;
2499 break;
2500 }
2501 ptr += wrote;
2502 *len -= wrote;
2503
2504 /* outline-color */
2505 val = css_computed_outline_color(style, &color);
2506 switch (val) {
2508 wrote = snprintf(ptr, *len, "outline-color: inherit\n");
2509 break;
2511 wrote = snprintf(ptr, *len, "outline-color: invert\n");
2512 break;
2514 wrote = snprintf(ptr, *len, "outline-color: #%08x\n", color);
2515 break;
2516 default:
2517 wrote = 0;
2518 break;
2519 }
2520 ptr += wrote;
2521 *len -= wrote;
2522
2523 /* outline-style */
2524 val = css_computed_outline_style(style);
2525 switch (val) {
2527 wrote = snprintf(ptr, *len, "outline-style: inherit\n");
2528 break;
2530 wrote = snprintf(ptr, *len, "outline-style: none\n");
2531 break;
2533 wrote = snprintf(ptr, *len, "outline-style: dotted\n");
2534 break;
2536 wrote = snprintf(ptr, *len, "outline-style: dashed\n");
2537 break;
2539 wrote = snprintf(ptr, *len, "outline-style: solid\n");
2540 break;
2542 wrote = snprintf(ptr, *len, "outline-style: double\n");
2543 break;
2545 wrote = snprintf(ptr, *len, "outline-style: groove\n");
2546 break;
2548 wrote = snprintf(ptr, *len, "outline-style: ridge\n");
2549 break;
2551 wrote = snprintf(ptr, *len, "outline-style: inset\n");
2552 break;
2554 wrote = snprintf(ptr, *len, "outline-style: outset\n");
2555 break;
2556 default:
2557 wrote = 0;
2558 break;
2559 }
2560 ptr += wrote;
2561 *len -= wrote;
2562
2563 /* outline-width */
2564 val = css_computed_outline_width(style, &len1, &unit1);
2565 switch (val) {
2567 wrote = snprintf(ptr, *len, "outline-width: inherit\n");
2568 break;
2570 wrote = snprintf(ptr, *len, "outline-width: thin\n");
2571 break;
2573 wrote = snprintf(ptr, *len, "outline-width: medium\n");
2574 break;
2576 wrote = snprintf(ptr, *len, "outline-width: thick\n");
2577 break;
2579 wrote = snprintf(ptr, *len, "outline-width: ");
2580 ptr += wrote;
2581 *len -= wrote;
2582
2583 wrote = dump_css_unit(len1, unit1, ptr, *len);
2584 ptr += wrote;
2585 *len -= wrote;
2586
2587 wrote = snprintf(ptr, *len, "\n");
2588 break;
2589 default:
2590 wrote = 0;
2591 break;
2592 }
2593 ptr += wrote;
2594 *len -= wrote;
2595
2596 /* overflow-x */
2597 val = css_computed_overflow_x(style);
2598 switch (val) {
2600 wrote = snprintf(ptr, *len, "overflow-x: inherit\n");
2601 break;
2603 wrote = snprintf(ptr, *len, "overflow-x: visible\n");
2604 break;
2606 wrote = snprintf(ptr, *len, "overflow-x: hidden\n");
2607 break;
2609 wrote = snprintf(ptr, *len, "overflow-x: scroll\n");
2610 break;
2611 case CSS_OVERFLOW_AUTO:
2612 wrote = snprintf(ptr, *len, "overflow-x: auto\n");
2613 break;
2614 default:
2615 wrote = 0;
2616 break;
2617 }
2618 ptr += wrote;
2619 *len -= wrote;
2620
2621 /* overflow-y */
2622 val = css_computed_overflow_y(style);
2623 switch (val) {
2625 wrote = snprintf(ptr, *len, "overflow-y: inherit\n");
2626 break;
2628 wrote = snprintf(ptr, *len, "overflow-y: visible\n");
2629 break;
2631 wrote = snprintf(ptr, *len, "overflow-y: hidden\n");
2632 break;
2634 wrote = snprintf(ptr, *len, "overflow-y: scroll\n");
2635 break;
2636 case CSS_OVERFLOW_AUTO:
2637 wrote = snprintf(ptr, *len, "overflow-y: auto\n");
2638 break;
2639 default:
2640 wrote = 0;
2641 break;
2642 }
2643 ptr += wrote;
2644 *len -= wrote;
2645
2646 /* padding-top */
2647 val = css_computed_padding_top(style, &len1, &unit1);
2648 switch (val) {
2650 wrote = snprintf(ptr, *len, "padding-top: inherit\n");
2651 break;
2652 case CSS_PADDING_SET:
2653 wrote = snprintf(ptr, *len, "padding-top: ");
2654 ptr += wrote;
2655 *len -= wrote;
2656
2657 wrote = dump_css_unit(len1, unit1, ptr, *len);
2658 ptr += wrote;
2659 *len -= wrote;
2660
2661 wrote = snprintf(ptr, *len, "\n");
2662 break;
2663 default:
2664 wrote = 0;
2665 break;
2666 }
2667 ptr += wrote;
2668 *len -= wrote;
2669
2670 /* padding-right */
2671 val = css_computed_padding_right(style, &len1, &unit1);
2672 switch (val) {
2674 wrote = snprintf(ptr, *len, "padding-right: inherit\n");
2675 break;
2676 case CSS_PADDING_SET:
2677 wrote = snprintf(ptr, *len, "padding-right: ");
2678 ptr += wrote;
2679 *len -= wrote;
2680
2681 wrote = dump_css_unit(len1, unit1, ptr, *len);
2682 ptr += wrote;
2683 *len -= wrote;
2684
2685 wrote = snprintf(ptr, *len, "\n");
2686 break;
2687 default:
2688 wrote = 0;
2689 break;
2690 }
2691 ptr += wrote;
2692 *len -= wrote;
2693
2694 /* padding-bottom */
2695 val = css_computed_padding_bottom(style, &len1, &unit1);
2696 switch (val) {
2698 wrote = snprintf(ptr, *len, "padding-bottom: inherit\n");
2699 break;
2700 case CSS_PADDING_SET:
2701 wrote = snprintf(ptr, *len, "padding-bottom: ");
2702 ptr += wrote;
2703 *len -= wrote;
2704
2705 wrote = dump_css_unit(len1, unit1, ptr, *len);
2706 ptr += wrote;
2707 *len -= wrote;
2708
2709 wrote = snprintf(ptr, *len, "\n");
2710 break;
2711 default:
2712 wrote = 0;
2713 break;
2714 }
2715 ptr += wrote;
2716 *len -= wrote;
2717
2718 /* padding-left */
2719 val = css_computed_padding_left(style, &len1, &unit1);
2720 switch (val) {
2722 wrote = snprintf(ptr, *len, "padding-left: inherit\n");
2723 break;
2724 case CSS_PADDING_SET:
2725 wrote = snprintf(ptr, *len, "padding-left: ");
2726 ptr += wrote;
2727 *len -= wrote;
2728
2729 wrote = dump_css_unit(len1, unit1, ptr, *len);
2730 ptr += wrote;
2731 *len -= wrote;
2732
2733 wrote = snprintf(ptr, *len, "\n");
2734 break;
2735 default:
2736 wrote = 0;
2737 break;
2738 }
2739 ptr += wrote;
2740 *len -= wrote;
2741
2742 /* position */
2743 val = css_computed_position(style);
2744 switch (val) {
2746 wrote = snprintf(ptr, *len, "position: inherit\n");
2747 break;
2749 wrote = snprintf(ptr, *len, "position: static\n");
2750 break;
2752 wrote = snprintf(ptr, *len, "position: relative\n");
2753 break;
2755 wrote = snprintf(ptr, *len, "position: absolute\n");
2756 break;
2757 case CSS_POSITION_FIXED:
2758 wrote = snprintf(ptr, *len, "position: fixed\n");
2759 break;
2761 wrote = snprintf(ptr, *len, "position: sticky\n");
2762 break;
2763 default:
2764 wrote = 0;
2765 break;
2766 }
2767 ptr += wrote;
2768 *len -= wrote;
2769
2770 /* quotes */
2771 val = css_computed_quotes(style, &string_list);
2772 if (val == CSS_QUOTES_STRING && string_list != NULL) {
2773 wrote = snprintf(ptr, *len, "quotes:");
2774 ptr += wrote;
2775 *len -= wrote;
2776
2777 while (*string_list != NULL) {
2778 wrote = snprintf(ptr, *len, " \"%.*s\"",
2779 (int) lwc_string_length(*string_list),
2780 lwc_string_data(*string_list));
2781 ptr += wrote;
2782 *len -= wrote;
2783
2784 string_list++;
2785 }
2786
2787 wrote = snprintf(ptr, *len, "\n");
2788 } else {
2789 switch (val) {
2790 case CSS_QUOTES_INHERIT:
2791 wrote = snprintf(ptr, *len, "quotes: inherit\n");
2792 break;
2793 case CSS_QUOTES_NONE:
2794 wrote = snprintf(ptr, *len, "quotes: none\n");
2795 break;
2796 default:
2797 wrote = 0;
2798 break;
2799 }
2800 }
2801 ptr += wrote;
2802 *len -= wrote;
2803
2804 /* right */
2805 val = css_computed_right(style, &len1, &unit1);
2806 switch (val) {
2807 case CSS_RIGHT_INHERIT:
2808 wrote = snprintf(ptr, *len, "right: inherit\n");
2809 break;
2810 case CSS_RIGHT_AUTO:
2811 wrote = snprintf(ptr, *len, "right: auto\n");
2812 break;
2813 case CSS_RIGHT_SET:
2814 wrote = snprintf(ptr, *len, "right: ");
2815 ptr += wrote;
2816 *len -= wrote;
2817
2818 wrote = dump_css_unit(len1, unit1, ptr, *len);
2819 ptr += wrote;
2820 *len -= wrote;
2821
2822 wrote = snprintf(ptr, *len, "\n");
2823 break;
2824 default:
2825 wrote = 0;
2826 break;
2827 }
2828 ptr += wrote;
2829 *len -= wrote;
2830
2831 /* stroke-opacity */
2832 val = css_computed_stroke_opacity(style, &len1);
2833 switch (val) {
2835 wrote = snprintf(ptr, *len, "stroke-opacity: inherit\n");
2836 break;
2838 wrote = snprintf(ptr, *len, "stroke-opacity: ");
2839 ptr += wrote;
2840 *len -= wrote;
2841
2842 wrote = dump_css_fixed(len1, ptr, *len);
2843 ptr += wrote;
2844 *len -= wrote;
2845
2846 wrote = snprintf(ptr, *len, "\n");
2847 break;
2848 default:
2849 wrote = 0;
2850 break;
2851 }
2852 ptr += wrote;
2853 *len -= wrote;
2854
2855 /* table-layout */
2856 val = css_computed_table_layout(style);
2857 switch (val) {
2859 wrote = snprintf(ptr, *len, "table-layout: inherit\n");
2860 break;
2862 wrote = snprintf(ptr, *len, "table-layout: auto\n");
2863 break;
2865 wrote = snprintf(ptr, *len, "table-layout: fixed\n");
2866 break;
2867 default:
2868 wrote = 0;
2869 break;
2870 }
2871 ptr += wrote;
2872 *len -= wrote;
2873
2874 /* text-align */
2875 val = css_computed_text_align(style);
2876 switch (val) {
2878 wrote = snprintf(ptr, *len, "text-align: inherit\n");
2879 break;
2881 wrote = snprintf(ptr, *len, "text-align: left\n");
2882 break;
2884 wrote = snprintf(ptr, *len, "text-align: right\n");
2885 break;
2887 wrote = snprintf(ptr, *len, "text-align: center\n");
2888 break;
2890 wrote = snprintf(ptr, *len, "text-align: justify\n");
2891 break;
2893 wrote = snprintf(ptr, *len, "text-align: default\n");
2894 break;
2896 wrote = snprintf(ptr, *len, "text-align: -libcss-left\n");
2897 break;
2899 wrote = snprintf(ptr, *len, "text-align: -libcss-center\n");
2900 break;
2902 wrote = snprintf(ptr, *len, "text-align: -libcss-right\n");
2903 break;
2904 default:
2905 wrote = 0;
2906 break;
2907 }
2908 ptr += wrote;
2909 *len -= wrote;
2910
2911 /* text-decoration */
2912 val = css_computed_text_decoration(style);
2913 if (val == CSS_TEXT_DECORATION_INHERIT) {
2914 wrote = snprintf(ptr, *len, "text-decoration: inherit\n");
2915 ptr += wrote;
2916 *len -= wrote;
2917 } else if (val == CSS_TEXT_DECORATION_NONE) {
2918 wrote = snprintf(ptr, *len, "text-decoration: none\n");
2919 ptr += wrote;
2920 *len -= wrote;
2921 } else {
2922 wrote = snprintf(ptr, *len, "text-decoration:");
2923 ptr += wrote;
2924 *len -= wrote;
2925
2926 if (val & CSS_TEXT_DECORATION_BLINK) {
2927 wrote = snprintf(ptr, *len, " blink");
2928 ptr += wrote;
2929 *len -= wrote;
2930 }
2932 wrote = snprintf(ptr, *len, " line-through");
2933 ptr += wrote;
2934 *len -= wrote;
2935 }
2936 if (val & CSS_TEXT_DECORATION_OVERLINE) {
2937 wrote = snprintf(ptr, *len, " overline");
2938 ptr += wrote;
2939 *len -= wrote;
2940 }
2942 wrote = snprintf(ptr, *len, " underline");
2943 ptr += wrote;
2944 *len -= wrote;
2945 }
2946
2947 wrote = snprintf(ptr, *len, "\n");
2948 ptr += wrote;
2949 *len -= wrote;
2950 }
2951
2952 /* text-indent */
2953 val = css_computed_text_indent(style, &len1, &unit1);
2954 switch (val) {
2956 wrote = snprintf(ptr, *len, "text-indent: inherit\n");
2957 break;
2959 wrote = snprintf(ptr, *len, "text-indent: ");
2960 ptr += wrote;
2961 *len -= wrote;
2962
2963 wrote = dump_css_unit(len1, unit1, ptr, *len);
2964 ptr += wrote;
2965 *len -= wrote;
2966
2967 wrote = snprintf(ptr, *len, "\n");
2968 break;
2969 default:
2970 wrote = 0;
2971 break;
2972 }
2973 ptr += wrote;
2974 *len -= wrote;
2975
2976 /* text-transform */
2977 val = css_computed_text_transform(style);
2978 switch (val) {
2980 wrote = snprintf(ptr, *len, "text-transform: inherit\n");
2981 break;
2983 wrote = snprintf(ptr, *len, "text-transform: capitalize\n");
2984 break;
2986 wrote = snprintf(ptr, *len, "text-transform: uppercase\n");
2987 break;
2989 wrote = snprintf(ptr, *len, "text-transform: lowercase\n");
2990 break;
2992 wrote = snprintf(ptr, *len, "text-transform: none\n");
2993 break;
2994 default:
2995 wrote = 0;
2996 break;
2997 }
2998 ptr += wrote;
2999 *len -= wrote;
3000
3001 /* top */
3002 val = css_computed_top(style, &len1, &unit1);
3003 switch (val) {
3004 case CSS_TOP_INHERIT:
3005 wrote = snprintf(ptr, *len, "top: inherit\n");
3006 break;
3007 case CSS_TOP_AUTO:
3008 wrote = snprintf(ptr, *len, "top: auto\n");
3009 break;
3010 case CSS_TOP_SET:
3011 wrote = snprintf(ptr, *len, "top: ");
3012 ptr += wrote;
3013 *len -= wrote;
3014
3015 wrote = dump_css_unit(len1, unit1, ptr, *len);
3016 ptr += wrote;
3017 *len -= wrote;
3018
3019 wrote = snprintf(ptr, *len, "\n");
3020 break;
3021 default:
3022 wrote = 0;
3023 break;
3024 }
3025 ptr += wrote;
3026 *len -= wrote;
3027
3028 /* unicode-bidi */
3029 val = css_computed_unicode_bidi(style);
3030 switch (val) {
3032 wrote = snprintf(ptr, *len, "unicode-bidi: inherit\n");
3033 break;
3035 wrote = snprintf(ptr, *len, "unicode-bidi: normal\n");
3036 break;
3038 wrote = snprintf(ptr, *len, "unicode-bidi: embed\n");
3039 break;
3041 wrote = snprintf(ptr, *len, "unicode-bidi: bidi-override\n");
3042 break;
3043 default:
3044 wrote = 0;
3045 break;
3046 }
3047 ptr += wrote;
3048 *len -= wrote;
3049
3050 /* vertical-align */
3051 val = css_computed_vertical_align(style, &len1, &unit1);
3052 switch (val) {
3054 wrote = snprintf(ptr, *len, "vertical-align: inherit\n");
3055 break;
3057 wrote = snprintf(ptr, *len, "vertical-align: baseline\n");
3058 break;
3060 wrote = snprintf(ptr, *len, "vertical-align: sub\n");
3061 break;
3063 wrote = snprintf(ptr, *len, "vertical-align: super\n");
3064 break;
3066 wrote = snprintf(ptr, *len, "vertical-align: top\n");
3067 break;
3069 wrote = snprintf(ptr, *len, "vertical-align: text-top\n");
3070 break;
3072 wrote = snprintf(ptr, *len, "vertical-align: middle\n");
3073 break;
3075 wrote = snprintf(ptr, *len, "vertical-align: bottom\n");
3076 break;
3078 wrote = snprintf(ptr, *len, "vertical-align: text-bottom\n");
3079 break;
3081 wrote = snprintf(ptr, *len, "vertical-align: ");
3082 ptr += wrote;
3083 *len -= wrote;
3084
3085 wrote = dump_css_unit(len1, unit1, ptr, *len);
3086 ptr += wrote;
3087 *len -= wrote;
3088
3089 wrote = snprintf(ptr, *len, "\n");
3090 break;
3091 default:
3092 wrote = 0;
3093 break;
3094 }
3095 ptr += wrote;
3096 *len -= wrote;
3097
3098 /* visibility */
3099 val = css_computed_visibility(style);
3100 switch (val) {
3102 wrote = snprintf(ptr, *len, "visibility: inherit\n");
3103 break;
3105 wrote = snprintf(ptr, *len, "visibility: visible\n");
3106 break;
3108 wrote = snprintf(ptr, *len, "visibility: hidden\n");
3109 break;
3111 wrote = snprintf(ptr, *len, "visibility: collapse\n");
3112 break;
3113 default:
3114 wrote = 0;
3115 break;
3116 }
3117 ptr += wrote;
3118 *len -= wrote;
3119
3120 /* white-space */
3121 val = css_computed_white_space(style);
3122 switch (val) {
3124 wrote = snprintf(ptr, *len, "white-space: inherit\n");
3125 break;
3127 wrote = snprintf(ptr, *len, "white-space: normal\n");
3128 break;
3130 wrote = snprintf(ptr, *len, "white-space: pre\n");
3131 break;
3133 wrote = snprintf(ptr, *len, "white-space: nowrap\n");
3134 break;
3136 wrote = snprintf(ptr, *len, "white-space: pre-wrap\n");
3137 break;
3139 wrote = snprintf(ptr, *len, "white-space: pre-line\n");
3140 break;
3141 default:
3142 wrote = 0;
3143 break;
3144 }
3145 ptr += wrote;
3146 *len -= wrote;
3147
3148 /* width */
3149#ifdef USE_DEVICE
3150 val = css_computed_width_px(style, unit_ctx, 1024, &pixels);
3151#else
3152 val = css_computed_width(style, &len1, &unit1);
3153#endif
3154 switch (val) {
3155 case CSS_WIDTH_INHERIT:
3156 wrote = snprintf(ptr, *len, "width: inherit\n");
3157 break;
3158 case CSS_WIDTH_AUTO:
3159 wrote = snprintf(ptr, *len, "width: auto\n");
3160 break;
3161 case CSS_WIDTH_SET:
3162 wrote = snprintf(ptr, *len, "width: ");
3163 ptr += wrote;
3164 *len -= wrote;
3165
3166#ifdef USE_DEVICE
3167 wrote = dump_css_number(INTTOFIX(pixels), ptr, *len);
3168 ptr += wrote;
3169 *len -= wrote;
3170
3171 wrote = snprintf(ptr, *len, " pixels");
3172 ptr += wrote;
3173 *len -= wrote;
3174#else
3175 wrote = dump_css_unit(len1, unit1, ptr, *len);
3176 ptr += wrote;
3177 *len -= wrote;
3178#endif
3179
3180 wrote = snprintf(ptr, *len, "\n");
3181 break;
3182 default:
3183 wrote = 0;
3184 break;
3185 }
3186 ptr += wrote;
3187 *len -= wrote;
3188
3189 /* word-spacing */
3190 val = css_computed_word_spacing(style, &len1, &unit1);
3191 switch (val) {
3193 wrote = snprintf(ptr, *len, "word-spacing: inherit\n");
3194 break;
3196 wrote = snprintf(ptr, *len, "word-spacing: normal\n");
3197 break;
3199 wrote = snprintf(ptr, *len, "word-spacing: ");
3200 ptr += wrote;
3201 *len -= wrote;
3202
3203 wrote = dump_css_unit(len1, unit1, ptr, *len);
3204 ptr += wrote;
3205 *len -= wrote;
3206
3207 wrote = snprintf(ptr, *len, "\n");
3208 break;
3209 default:
3210 wrote = 0;
3211 break;
3212 }
3213 ptr += wrote;
3214 *len -= wrote;
3215
3216 /* writing-mode */
3217 val = css_computed_writing_mode(style);
3218 switch (val) {
3220 wrote = snprintf(ptr, *len, "writing-mode: inherit\n");
3221 break;
3223 wrote = snprintf(ptr, *len, "writing-mode: horizontal-tb\n");
3224 break;
3226 wrote = snprintf(ptr, *len, "writing-mode: vertical-rl\n");
3227 break;
3229 wrote = snprintf(ptr, *len, "writing-mode: vertical-lr\n");
3230 break;
3231 default:
3232 wrote = 0;
3233 break;
3234 }
3235 ptr += wrote;
3236 *len -= wrote;
3237
3238 /* z-index */
3239 val = css_computed_z_index(style, &integer);
3240 switch (val) {
3242 wrote = snprintf(ptr, *len, "z-index: inherit\n");
3243 break;
3244 case CSS_Z_INDEX_AUTO:
3245 wrote = snprintf(ptr, *len, "z-index: auto\n");
3246 break;
3247 case CSS_Z_INDEX_SET:
3248 wrote = snprintf(ptr, *len, "z-index: %d\n", integer);
3249 break;
3250 default:
3251 wrote = 0;
3252 break;
3253 }
3254 ptr += wrote;
3255 *len -= wrote;
3256}
3257
unit
Definition bytecode.h:49
#define ABS(x)
#define INTTOFIX(a)
Definition fpmath.h:127
#define FIXTOINT(a)
Definition fpmath.h:129
int32_t css_fixed
Definition fpmath.h:23
uint8_t css_computed_border_left_style(const css_computed_style *style)
Definition computed.c:1068
uint8_t css_computed_table_layout(const css_computed_style *style)
Definition computed.c:1088
uint8_t css_computed_counter_reset(const css_computed_style *style, const css_computed_counter **counters)
Definition computed.c:382
uint8_t css_computed_visibility(const css_computed_style *style)
Definition computed.c:1098
uint8_t css_computed_display_static(const css_computed_style *style)
Definition computed.c:1032
uint8_t css_computed_quotes(const css_computed_style *style, lwc_string ***quotes)
Definition computed.c:460
uint8_t css_computed_overflow_y(const css_computed_style *style)
Definition computed.c:867
uint8_t css_computed_list_style_type(const css_computed_style *style)
Definition computed.c:1078
uint8_t css_computed_outline_color(const css_computed_style *style, css_color *color)
Definition computed.c:339
uint8_t css_computed_column_width(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:986
uint8_t css_computed_max_width(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:696
uint8_t css_computed_column_gap(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:944
uint8_t css_computed_clear(const css_computed_style *style)
Definition computed.c:833
uint8_t css_computed_flex_basis(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:1155
uint8_t css_computed_column_rule_width(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:967
uint8_t css_computed_outline_width(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:345
uint8_t css_computed_unicode_bidi(const css_computed_style *style)
Definition computed.c:1093
uint8_t css_computed_content(const css_computed_style *style, const css_computed_content_item **content)
Definition computed.c:400
uint8_t css_computed_background_attachment(const css_computed_style *style)
Definition computed.c:670
uint8_t css_computed_width(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:753
uint8_t css_computed_color(const css_computed_style *style, css_color *color)
Definition computed.c:448
uint8_t css_computed_cursor(const css_computed_style *style, lwc_string ***urls)
Definition computed.c:388
uint8_t css_computed_border_top_width(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:418
uint8_t css_computed_flex_shrink(const css_computed_style *style, css_fixed *number)
Definition computed.c:1172
uint8_t css_computed_direction(const css_computed_style *style)
Definition computed.c:685
uint8_t css_computed_margin_right(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:652
uint8_t css_computed_list_style_image(const css_computed_style *style, lwc_string **url)
Definition computed.c:454
uint8_t css_computed_right(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:496
uint8_t css_computed_border_right_style(const css_computed_style *style)
Definition computed.c:1058
uint8_t css_computed_text_transform(const css_computed_style *style)
Definition computed.c:895
uint8_t css_computed_line_height(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:628
uint8_t css_computed_border_right_width(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:424
uint8_t css_computed_flex_wrap(const css_computed_style *style)
Definition computed.c:1178
uint8_t css_computed_background_color(const css_computed_style *style, css_color *color)
Definition computed.c:634
uint8_t css_computed_position(const css_computed_style *style)
Definition computed.c:872
uint8_t css_computed_padding_right(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:844
uint8_t css_computed_flex_grow(const css_computed_style *style, css_fixed *number)
Definition computed.c:1166
uint8_t css_computed_align_content(const css_computed_style *style)
Definition computed.c:1140
uint8_t css_computed_overflow_x(const css_computed_style *style)
Definition computed.c:862
uint8_t css_computed_border_right_color(const css_computed_style *style, css_color *color)
Definition computed.c:599
uint8_t css_computed_background_position(const css_computed_style *style, css_fixed *hlength, css_unit *hunit, css_fixed *vlength, css_unit *vunit)
Definition computed.c:911
uint8_t css_computed_text_indent(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:900
uint8_t css_computed_min_height(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:790
uint8_t css_computed_clip(const css_computed_style *style, css_computed_clip_rect *rect)
Definition computed.c:394
uint8_t css_computed_font_style(const css_computed_style *style)
Definition computed.c:785
uint8_t css_computed_left(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:560
uint8_t css_computed_border_bottom_width(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:430
uint8_t css_computed_margin_top(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:646
uint8_t css_computed_order(const css_computed_style *style, int32_t *order)
Definition computed.c:1188
uint8_t css_computed_border_top_color(const css_computed_style *style, css_color *color)
Definition computed.c:593
uint8_t css_computed_font_weight(const css_computed_style *style)
Definition computed.c:1073
uint8_t css_computed_max_height(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:690
uint8_t css_computed_box_sizing(const css_computed_style *style)
Definition computed.c:617
uint8_t css_computed_column_fill(const css_computed_style *style)
Definition computed.c:939
uint8_t css_computed_stroke_opacity(const css_computed_style *style, css_fixed *stroke_opacity)
Definition computed.c:889
uint8_t css_computed_top(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:466
uint8_t css_computed_break_inside(const css_computed_style *style)
Definition computed.c:928
uint8_t css_computed_column_count(const css_computed_style *style, int32_t *column_count)
Definition computed.c:933
uint8_t css_computed_padding_bottom(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:850
uint8_t css_computed_break_before(const css_computed_style *style)
Definition computed.c:923
uint8_t css_computed_fill_opacity(const css_computed_style *style, css_fixed *fill_opacity)
Definition computed.c:883
uint8_t css_computed_min_width(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:809
uint8_t css_computed_border_spacing(const css_computed_style *style, css_fixed *hlength, css_unit *hunit, css_fixed *vlength, css_unit *vunit)
Definition computed.c:358
uint8_t css_computed_border_top_style(const css_computed_style *style)
Definition computed.c:1053
uint8_t css_computed_border_left_color(const css_computed_style *style, css_color *color)
Definition computed.c:611
uint8_t css_computed_align_self(const css_computed_style *style)
Definition computed.c:1150
uint8_t css_computed_break_after(const css_computed_style *style)
Definition computed.c:918
uint8_t css_computed_column_rule_color(const css_computed_style *style, css_color *color)
Definition computed.c:950
uint8_t css_computed_vertical_align(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:406
uint8_t css_computed_text_align(const css_computed_style *style)
Definition computed.c:1108
uint8_t css_computed_list_style_position(const css_computed_style *style)
Definition computed.c:1103
uint8_t css_computed_text_decoration(const css_computed_style *style)
Definition computed.c:1042
uint8_t css_computed_border_left_width(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:436
uint8_t css_computed_font_family(const css_computed_style *style, lwc_string ***names)
Definition computed.c:1047
uint8_t css_computed_background_repeat(const css_computed_style *style)
Definition computed.c:828
uint8_t css_computed_padding_left(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:856
uint8_t css_computed_z_index(const css_computed_style *style, int32_t *z_index)
Definition computed.c:640
uint8_t css_computed_opacity(const css_computed_style *style, css_fixed *opacity)
Definition computed.c:877
uint8_t css_computed_white_space(const css_computed_style *style)
Definition computed.c:906
uint8_t css_computed_column_span(const css_computed_style *style)
Definition computed.c:981
uint8_t css_computed_margin_bottom(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:658
uint8_t css_computed_font_size(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:412
uint8_t css_computed_background_image(const css_computed_style *style, lwc_string **url)
Definition computed.c:442
uint8_t css_computed_caption_side(const css_computed_style *style)
Definition computed.c:680
uint8_t css_computed_counter_increment(const css_computed_style *style, const css_computed_counter **counters)
Definition computed.c:376
uint8_t css_computed_writing_mode(const css_computed_style *style)
Definition computed.c:371
uint8_t css_computed_bottom(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:529
uint8_t css_computed_width_px(const css_computed_style *style, const css_unit_ctx *unit_ctx, int available_px, int *px_out)
Definition computed.c:702
uint8_t css_computed_outline_style(const css_computed_style *style)
Definition computed.c:1083
uint8_t css_computed_word_spacing(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:365
uint8_t css_computed_border_bottom_color(const css_computed_style *style, css_color *color)
Definition computed.c:605
uint8_t css_computed_padding_top(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:838
uint8_t css_computed_column_rule_style(const css_computed_style *style)
Definition computed.c:962
uint8_t css_computed_justify_content(const css_computed_style *style)
Definition computed.c:1183
@ CSS_COMPUTED_CONTENT_NO_OPEN_QUOTE
Definition computed.h:58
@ CSS_COMPUTED_CONTENT_NONE
Definition computed.h:50
@ CSS_COMPUTED_CONTENT_STRING
Definition computed.h:51
@ CSS_COMPUTED_CONTENT_COUNTERS
Definition computed.h:54
@ CSS_COMPUTED_CONTENT_NO_CLOSE_QUOTE
Definition computed.h:59
@ CSS_COMPUTED_CONTENT_COUNTER
Definition computed.h:53
@ CSS_COMPUTED_CONTENT_CLOSE_QUOTE
Definition computed.h:57
@ CSS_COMPUTED_CONTENT_URI
Definition computed.h:52
@ CSS_COMPUTED_CONTENT_OPEN_QUOTE
Definition computed.h:56
@ CSS_COMPUTED_CONTENT_ATTR
Definition computed.h:55
uint8_t css_computed_empty_cells(const css_computed_style *style)
Definition computed.c:767
uint8_t css_computed_align_items(const css_computed_style *style)
Definition computed.c:1145
uint8_t css_computed_letter_spacing(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:333
uint8_t css_computed_float(const css_computed_style *style)
Definition computed.c:772
uint8_t css_computed_flex_direction(const css_computed_style *style)
Definition computed.c:1161
uint8_t css_computed_font_variant(const css_computed_style *style)
Definition computed.c:1037
uint8_t css_computed_border_bottom_style(const css_computed_style *style)
Definition computed.c:1063
uint8_t css_computed_border_collapse(const css_computed_style *style)
Definition computed.c:675
uint8_t css_computed_height(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:622
uint8_t css_computed_margin_left(const css_computed_style *style, css_fixed *length, css_unit *unit)
Definition computed.c:664
@ CSS_FLEX_WRAP_INHERIT
Definition properties.h:487
@ CSS_FLEX_WRAP_WRAP_REVERSE
Definition properties.h:490
@ CSS_FLEX_WRAP_NOWRAP
Definition properties.h:488
@ CSS_FLEX_WRAP_WRAP
Definition properties.h:489
@ CSS_FONT_STYLE_OBLIQUE
Definition properties.h:528
@ CSS_FONT_STYLE_ITALIC
Definition properties.h:527
@ CSS_FONT_STYLE_NORMAL
Definition properties.h:526
@ CSS_FONT_STYLE_INHERIT
Definition properties.h:525
@ CSS_ALIGN_ITEMS_INHERIT
Definition properties.h:159
@ CSS_ALIGN_ITEMS_STRETCH
Definition properties.h:160
@ CSS_ALIGN_ITEMS_FLEX_START
Definition properties.h:161
@ CSS_ALIGN_ITEMS_BASELINE
Definition properties.h:164
@ CSS_ALIGN_ITEMS_FLEX_END
Definition properties.h:162
@ CSS_ALIGN_ITEMS_CENTER
Definition properties.h:163
@ CSS_MAX_WIDTH_SET
Definition properties.h:672
@ CSS_MAX_WIDTH_INHERIT
Definition properties.h:671
@ CSS_MAX_WIDTH_NONE
Definition properties.h:673
@ CSS_BREAK_AFTER_RIGHT
Definition properties.h:266
@ CSS_BREAK_AFTER_AUTO
Definition properties.h:262
@ CSS_BREAK_AFTER_LEFT
Definition properties.h:265
@ CSS_BREAK_AFTER_AVOID
Definition properties.h:263
@ CSS_BREAK_AFTER_PAGE
Definition properties.h:267
@ CSS_BREAK_AFTER_AVOID_COLUMN
Definition properties.h:270
@ CSS_BREAK_AFTER_INHERIT
Definition properties.h:261
@ CSS_BREAK_AFTER_ALWAYS
Definition properties.h:264
@ CSS_BREAK_AFTER_COLUMN
Definition properties.h:268
@ CSS_BREAK_AFTER_AVOID_PAGE
Definition properties.h:269
@ CSS_FONT_WEIGHT_500
Definition properties.h:547
@ CSS_FONT_WEIGHT_100
Definition properties.h:543
@ CSS_FONT_WEIGHT_600
Definition properties.h:548
@ CSS_FONT_WEIGHT_300
Definition properties.h:545
@ CSS_FONT_WEIGHT_700
Definition properties.h:549
@ CSS_FONT_WEIGHT_INHERIT
Definition properties.h:538
@ CSS_FONT_WEIGHT_800
Definition properties.h:550
@ CSS_FONT_WEIGHT_BOLDER
Definition properties.h:541
@ CSS_FONT_WEIGHT_200
Definition properties.h:544
@ CSS_FONT_WEIGHT_LIGHTER
Definition properties.h:542
@ CSS_FONT_WEIGHT_NORMAL
Definition properties.h:539
@ CSS_FONT_WEIGHT_400
Definition properties.h:546
@ CSS_FONT_WEIGHT_900
Definition properties.h:551
@ CSS_FONT_WEIGHT_BOLD
Definition properties.h:540
@ CSS_BREAK_BEFORE_AVOID
Definition properties.h:276
@ CSS_BREAK_BEFORE_RIGHT
Definition properties.h:279
@ CSS_BREAK_BEFORE_AVOID_COLUMN
Definition properties.h:283
@ CSS_BREAK_BEFORE_PAGE
Definition properties.h:280
@ CSS_BREAK_BEFORE_COLUMN
Definition properties.h:281
@ CSS_BREAK_BEFORE_AUTO
Definition properties.h:275
@ CSS_BREAK_BEFORE_AVOID_PAGE
Definition properties.h:282
@ CSS_BREAK_BEFORE_LEFT
Definition properties.h:278
@ CSS_BREAK_BEFORE_ALWAYS
Definition properties.h:277
@ CSS_BREAK_BEFORE_INHERIT
Definition properties.h:274
@ CSS_TABLE_LAYOUT_INHERIT
Definition properties.h:796
@ CSS_TABLE_LAYOUT_FIXED
Definition properties.h:798
@ CSS_TABLE_LAYOUT_AUTO
Definition properties.h:797
@ CSS_ALIGN_SELF_STRETCH
Definition properties.h:169
@ CSS_ALIGN_SELF_AUTO
Definition properties.h:174
@ CSS_ALIGN_SELF_FLEX_START
Definition properties.h:170
@ CSS_ALIGN_SELF_INHERIT
Definition properties.h:168
@ CSS_ALIGN_SELF_CENTER
Definition properties.h:172
@ CSS_ALIGN_SELF_BASELINE
Definition properties.h:173
@ CSS_ALIGN_SELF_FLEX_END
Definition properties.h:171
@ CSS_FILL_OPACITY_SET
Definition properties.h:458
@ CSS_FILL_OPACITY_INHERIT
Definition properties.h:457
@ CSS_LIST_STYLE_TYPE_UPPER_ROMAN
Definition properties.h:610
@ CSS_LIST_STYLE_TYPE_LOWER_GREEK
Definition properties.h:611
@ CSS_LIST_STYLE_TYPE_SQUARE
Definition properties.h:606
@ CSS_LIST_STYLE_TYPE_LOWER_ROMAN
Definition properties.h:609
@ CSS_LIST_STYLE_TYPE_CIRCLE
Definition properties.h:605
@ CSS_LIST_STYLE_TYPE_NONE
Definition properties.h:618
@ CSS_LIST_STYLE_TYPE_ARMENIAN
Definition properties.h:614
@ CSS_LIST_STYLE_TYPE_UPPER_LATIN
Definition properties.h:613
@ CSS_LIST_STYLE_TYPE_INHERIT
Definition properties.h:603
@ CSS_LIST_STYLE_TYPE_DECIMAL_LEADING_ZERO
Definition properties.h:608
@ CSS_LIST_STYLE_TYPE_DECIMAL
Definition properties.h:607
@ CSS_LIST_STYLE_TYPE_DISC
Definition properties.h:604
@ CSS_LIST_STYLE_TYPE_LOWER_ALPHA
Definition properties.h:616
@ CSS_LIST_STYLE_TYPE_GEORGIAN
Definition properties.h:615
@ CSS_LIST_STYLE_TYPE_LOWER_LATIN
Definition properties.h:612
@ CSS_LIST_STYLE_TYPE_UPPER_ALPHA
Definition properties.h:617
@ CSS_WRITING_MODE_VERTICAL_RL
Definition properties.h:898
@ CSS_WRITING_MODE_INHERIT
Definition properties.h:896
@ CSS_WRITING_MODE_HORIZONTAL_TB
Definition properties.h:897
@ CSS_WRITING_MODE_VERTICAL_LR
Definition properties.h:899
@ CSS_FLEX_GROW_INHERIT
Definition properties.h:477
@ CSS_FLEX_GROW_SET
Definition properties.h:478
@ CSS_ALIGN_CONTENT_STRETCH
Definition properties.h:149
@ CSS_ALIGN_CONTENT_FLEX_END
Definition properties.h:151
@ CSS_ALIGN_CONTENT_INHERIT
Definition properties.h:148
@ CSS_ALIGN_CONTENT_SPACE_BETWEEN
Definition properties.h:153
@ CSS_ALIGN_CONTENT_FLEX_START
Definition properties.h:150
@ CSS_ALIGN_CONTENT_CENTER
Definition properties.h:152
@ CSS_ALIGN_CONTENT_SPACE_AROUND
Definition properties.h:154
@ CSS_ALIGN_CONTENT_SPACE_EVENLY
Definition properties.h:155
@ CSS_STROKE_OPACITY_INHERIT
Definition properties.h:791
@ CSS_STROKE_OPACITY_SET
Definition properties.h:792
@ CSS_RIGHT_INHERIT
Definition properties.h:785
@ CSS_RIGHT_AUTO
Definition properties.h:787
@ CSS_RIGHT_SET
Definition properties.h:786
@ CSS_BOX_SIZING_INHERIT
Definition properties.h:255
@ CSS_BOX_SIZING_BORDER_BOX
Definition properties.h:257
@ CSS_BOX_SIZING_CONTENT_BOX
Definition properties.h:256
@ CSS_DISPLAY_TABLE
Definition properties.h:433
@ CSS_DISPLAY_TABLE_HEADER_GROUP
Definition properties.h:436
@ CSS_DISPLAY_INLINE_TABLE
Definition properties.h:434
@ CSS_DISPLAY_TABLE_CAPTION
Definition properties.h:442
@ CSS_DISPLAY_LIST_ITEM
Definition properties.h:430
@ CSS_DISPLAY_TABLE_FOOTER_GROUP
Definition properties.h:437
@ CSS_DISPLAY_TABLE_ROW_GROUP
Definition properties.h:435
@ CSS_DISPLAY_GRID
Definition properties.h:446
@ CSS_DISPLAY_TABLE_COLUMN
Definition properties.h:440
@ CSS_DISPLAY_INHERIT
Definition properties.h:427
@ CSS_DISPLAY_RUN_IN
Definition properties.h:431
@ CSS_DISPLAY_FLEX
Definition properties.h:444
@ CSS_DISPLAY_NONE
Definition properties.h:443
@ CSS_DISPLAY_TABLE_COLUMN_GROUP
Definition properties.h:439
@ CSS_DISPLAY_INLINE
Definition properties.h:428
@ CSS_DISPLAY_TABLE_CELL
Definition properties.h:441
@ CSS_DISPLAY_INLINE_GRID
Definition properties.h:447
@ CSS_DISPLAY_TABLE_ROW
Definition properties.h:438
@ CSS_DISPLAY_BLOCK
Definition properties.h:429
@ CSS_DISPLAY_INLINE_BLOCK
Definition properties.h:432
@ CSS_DISPLAY_INLINE_FLEX
Definition properties.h:445
@ CSS_FLOAT_LEFT
Definition properties.h:495
@ CSS_FLOAT_RIGHT
Definition properties.h:496
@ CSS_FLOAT_NONE
Definition properties.h:497
@ CSS_FLOAT_INHERIT
Definition properties.h:494
@ CSS_COLUMN_GAP_INHERIT
Definition properties.h:332
@ CSS_COLUMN_GAP_NORMAL
Definition properties.h:334
@ CSS_COLUMN_GAP_SET
Definition properties.h:333
@ CSS_OUTLINE_STYLE_SOLID
Definition properties.h:710
@ CSS_OUTLINE_STYLE_DOUBLE
Definition properties.h:711
@ CSS_OUTLINE_STYLE_INSET
Definition properties.h:714
@ CSS_OUTLINE_STYLE_OUTSET
Definition properties.h:715
@ CSS_OUTLINE_STYLE_NONE
Definition properties.h:707
@ CSS_OUTLINE_STYLE_DASHED
Definition properties.h:709
@ CSS_OUTLINE_STYLE_DOTTED
Definition properties.h:708
@ CSS_OUTLINE_STYLE_RIDGE
Definition properties.h:713
@ CSS_OUTLINE_STYLE_INHERIT
Definition properties.h:706
@ CSS_OUTLINE_STYLE_GROOVE
Definition properties.h:712
@ CSS_BACKGROUND_POSITION_SET
Definition properties.h:198
@ CSS_BACKGROUND_POSITION_INHERIT
Definition properties.h:197
@ CSS_DIRECTION_RTL
Definition properties.h:423
@ CSS_DIRECTION_LTR
Definition properties.h:422
@ CSS_DIRECTION_INHERIT
Definition properties.h:421
@ CSS_BORDER_WIDTH_WIDTH
Definition properties.h:245
@ CSS_BORDER_WIDTH_THIN
Definition properties.h:242
@ CSS_BORDER_WIDTH_MEDIUM
Definition properties.h:243
@ CSS_BORDER_WIDTH_INHERIT
Definition properties.h:241
@ CSS_BORDER_WIDTH_THICK
Definition properties.h:244
@ CSS_FONT_FAMILY_MONOSPACE
Definition properties.h:507
@ CSS_FONT_FAMILY_SANS_SERIF
Definition properties.h:504
@ CSS_FONT_FAMILY_FANTASY
Definition properties.h:506
@ CSS_FONT_FAMILY_SERIF
Definition properties.h:503
@ CSS_FONT_FAMILY_INHERIT
Definition properties.h:501
@ CSS_FONT_FAMILY_CURSIVE
Definition properties.h:505
@ CSS_HEIGHT_SET
Definition properties.h:556
@ CSS_HEIGHT_INHERIT
Definition properties.h:555
@ CSS_HEIGHT_AUTO
Definition properties.h:557
@ CSS_PADDING_SET
Definition properties.h:741
@ CSS_PADDING_INHERIT
Definition properties.h:740
@ CSS_BORDER_SPACING_SET
Definition properties.h:217
@ CSS_BORDER_SPACING_INHERIT
Definition properties.h:216
@ CSS_CLEAR_INHERIT
Definition properties.h:301
@ CSS_CLEAR_LEFT
Definition properties.h:303
@ CSS_CLEAR_BOTH
Definition properties.h:305
@ CSS_CLEAR_RIGHT
Definition properties.h:304
@ CSS_CLEAR_NONE
Definition properties.h:302
@ CSS_FONT_VARIANT_INHERIT
Definition properties.h:532
@ CSS_FONT_VARIANT_SMALL_CAPS
Definition properties.h:534
@ CSS_FONT_VARIANT_NORMAL
Definition properties.h:533
@ CSS_FLEX_DIRECTION_ROW
Definition properties.h:470
@ CSS_FLEX_DIRECTION_INHERIT
Definition properties.h:469
@ CSS_FLEX_DIRECTION_COLUMN_REVERSE
Definition properties.h:473
@ CSS_FLEX_DIRECTION_COLUMN
Definition properties.h:472
@ CSS_FLEX_DIRECTION_ROW_REVERSE
Definition properties.h:471
@ CSS_MAX_HEIGHT_SET
Definition properties.h:666
@ CSS_MAX_HEIGHT_NONE
Definition properties.h:667
@ CSS_MAX_HEIGHT_INHERIT
Definition properties.h:665
@ CSS_TEXT_TRANSFORM_UPPERCASE
Definition properties.h:831
@ CSS_TEXT_TRANSFORM_CAPITALIZE
Definition properties.h:830
@ CSS_TEXT_TRANSFORM_INHERIT
Definition properties.h:829
@ CSS_TEXT_TRANSFORM_LOWERCASE
Definition properties.h:832
@ CSS_TEXT_TRANSFORM_NONE
Definition properties.h:833
@ CSS_BACKGROUND_REPEAT_INHERIT
Definition properties.h:202
@ CSS_BACKGROUND_REPEAT_REPEAT_Y
Definition properties.h:204
@ CSS_BACKGROUND_REPEAT_REPEAT
Definition properties.h:205
@ CSS_BACKGROUND_REPEAT_NO_REPEAT
Definition properties.h:206
@ CSS_BACKGROUND_REPEAT_REPEAT_X
Definition properties.h:203
@ CSS_COLUMN_RULE_WIDTH_MEDIUM
Definition properties.h:360
@ CSS_COLUMN_RULE_WIDTH_INHERIT
Definition properties.h:358
@ CSS_COLUMN_RULE_WIDTH_THICK
Definition properties.h:361
@ CSS_COLUMN_RULE_WIDTH_WIDTH
Definition properties.h:362
@ CSS_COLUMN_RULE_WIDTH_THIN
Definition properties.h:359
@ CSS_COLOR_INHERIT
Definition properties.h:315
@ CSS_COLOR_COLOR
Definition properties.h:316
@ CSS_COUNTER_INCREMENT_INHERIT
Definition properties.h:385
@ CSS_BREAK_INSIDE_AVOID
Definition properties.h:289
@ CSS_BREAK_INSIDE_INHERIT
Definition properties.h:287
@ CSS_BREAK_INSIDE_AVOID_PAGE
Definition properties.h:290
@ CSS_BREAK_INSIDE_AVOID_COLUMN
Definition properties.h:291
@ CSS_BREAK_INSIDE_AUTO
Definition properties.h:288
@ CSS_LIST_STYLE_POSITION_INSIDE
Definition properties.h:598
@ CSS_LIST_STYLE_POSITION_OUTSIDE
Definition properties.h:599
@ CSS_LIST_STYLE_POSITION_INHERIT
Definition properties.h:597
@ CSS_OUTLINE_WIDTH_WIDTH
Definition properties.h:723
@ CSS_OUTLINE_WIDTH_THICK
Definition properties.h:722
@ CSS_OUTLINE_WIDTH_INHERIT
Definition properties.h:719
@ CSS_OUTLINE_WIDTH_MEDIUM
Definition properties.h:721
@ CSS_OUTLINE_WIDTH_THIN
Definition properties.h:720
@ CSS_COLUMN_RULE_COLOR_COLOR
Definition properties.h:339
@ CSS_COLUMN_RULE_COLOR_INHERIT
Definition properties.h:338
@ CSS_COLUMN_RULE_COLOR_CURRENT_COLOR
Definition properties.h:340
@ CSS_LIST_STYLE_IMAGE_NONE
Definition properties.h:593
@ CSS_LIST_STYLE_IMAGE_INHERIT
Definition properties.h:590
@ CSS_WORD_SPACING_NORMAL
Definition properties.h:892
@ CSS_WORD_SPACING_INHERIT
Definition properties.h:890
@ CSS_WORD_SPACING_SET
Definition properties.h:891
@ CSS_EMPTY_CELLS_INHERIT
Definition properties.h:451
@ CSS_EMPTY_CELLS_SHOW
Definition properties.h:452
@ CSS_EMPTY_CELLS_HIDE
Definition properties.h:453
@ CSS_BACKGROUND_COLOR_INHERIT
Definition properties.h:184
@ CSS_BACKGROUND_COLOR_COLOR
Definition properties.h:185
@ CSS_VERTICAL_ALIGN_INHERIT
Definition properties.h:850
@ CSS_VERTICAL_ALIGN_SUB
Definition properties.h:852
@ CSS_VERTICAL_ALIGN_TEXT_TOP
Definition properties.h:855
@ CSS_VERTICAL_ALIGN_BOTTOM
Definition properties.h:857
@ CSS_VERTICAL_ALIGN_SUPER
Definition properties.h:853
@ CSS_VERTICAL_ALIGN_BASELINE
Definition properties.h:851
@ CSS_VERTICAL_ALIGN_TOP
Definition properties.h:854
@ CSS_VERTICAL_ALIGN_SET
Definition properties.h:859
@ CSS_VERTICAL_ALIGN_MIDDLE
Definition properties.h:856
@ CSS_VERTICAL_ALIGN_TEXT_BOTTOM
Definition properties.h:858
@ CSS_WIDTH_INHERIT
Definition properties.h:884
@ CSS_WIDTH_AUTO
Definition properties.h:886
@ CSS_WIDTH_SET
Definition properties.h:885
@ CSS_FLEX_SHRINK_INHERIT
Definition properties.h:482
@ CSS_FLEX_SHRINK_SET
Definition properties.h:483
@ CSS_CAPTION_SIDE_BOTTOM
Definition properties.h:297
@ CSS_CAPTION_SIDE_TOP
Definition properties.h:296
@ CSS_CAPTION_SIDE_INHERIT
Definition properties.h:295
@ CSS_MARGIN_AUTO
Definition properties.h:661
@ CSS_MARGIN_SET
Definition properties.h:660
@ CSS_MARGIN_INHERIT
Definition properties.h:659
@ CSS_BORDER_COLOR_CURRENT_COLOR
Definition properties.h:223
@ CSS_BORDER_COLOR_INHERIT
Definition properties.h:221
@ CSS_BORDER_COLOR_COLOR
Definition properties.h:222
@ CSS_WHITE_SPACE_INHERIT
Definition properties.h:870
@ CSS_WHITE_SPACE_PRE_WRAP
Definition properties.h:874
@ CSS_WHITE_SPACE_NORMAL
Definition properties.h:871
@ CSS_WHITE_SPACE_NOWRAP
Definition properties.h:873
@ CSS_WHITE_SPACE_PRE
Definition properties.h:872
@ CSS_WHITE_SPACE_PRE_LINE
Definition properties.h:875
@ CSS_COLUMN_RULE_STYLE_NONE
Definition properties.h:345
@ CSS_COLUMN_RULE_STYLE_OUTSET
Definition properties.h:354
@ CSS_COLUMN_RULE_STYLE_DOUBLE
Definition properties.h:350
@ CSS_COLUMN_RULE_STYLE_DOTTED
Definition properties.h:347
@ CSS_COLUMN_RULE_STYLE_RIDGE
Definition properties.h:352
@ CSS_COLUMN_RULE_STYLE_INSET
Definition properties.h:353
@ CSS_COLUMN_RULE_STYLE_GROOVE
Definition properties.h:351
@ CSS_COLUMN_RULE_STYLE_HIDDEN
Definition properties.h:346
@ CSS_COLUMN_RULE_STYLE_DASHED
Definition properties.h:348
@ CSS_COLUMN_RULE_STYLE_SOLID
Definition properties.h:349
@ CSS_COLUMN_RULE_STYLE_INHERIT
Definition properties.h:344
@ CSS_QUOTES_STRING
Definition properties.h:780
@ CSS_QUOTES_NONE
Definition properties.h:781
@ CSS_QUOTES_INHERIT
Definition properties.h:778
@ CSS_MIN_WIDTH_SET
Definition properties.h:684
@ CSS_MIN_WIDTH_INHERIT
Definition properties.h:683
@ CSS_MIN_WIDTH_AUTO
Definition properties.h:685
@ CSS_LEFT_AUTO
Definition properties.h:573
@ CSS_LEFT_INHERIT
Definition properties.h:571
@ CSS_LEFT_SET
Definition properties.h:572
@ CSS_OPACITY_INHERIT
Definition properties.h:689
@ CSS_OPACITY_SET
Definition properties.h:690
@ CSS_OUTLINE_COLOR_INHERIT
Definition properties.h:699
@ CSS_OUTLINE_COLOR_COLOR
Definition properties.h:700
@ CSS_OUTLINE_COLOR_INVERT
Definition properties.h:702
@ CSS_UNICODE_BIDI_EMBED
Definition properties.h:845
@ CSS_UNICODE_BIDI_NORMAL
Definition properties.h:844
@ CSS_UNICODE_BIDI_INHERIT
Definition properties.h:843
@ CSS_UNICODE_BIDI_BIDI_OVERRIDE
Definition properties.h:846
@ CSS_TOP_INHERIT
Definition properties.h:837
@ CSS_TOP_SET
Definition properties.h:838
@ CSS_TOP_AUTO
Definition properties.h:839
@ CSS_VISIBILITY_VISIBLE
Definition properties.h:864
@ CSS_VISIBILITY_HIDDEN
Definition properties.h:865
@ CSS_VISIBILITY_COLLAPSE
Definition properties.h:866
@ CSS_VISIBILITY_INHERIT
Definition properties.h:863
@ CSS_LETTER_SPACING_INHERIT
Definition properties.h:577
@ CSS_LETTER_SPACING_SET
Definition properties.h:578
@ CSS_LETTER_SPACING_NORMAL
Definition properties.h:579
@ CSS_FLEX_BASIS_SET
Definition properties.h:463
@ CSS_FLEX_BASIS_INHERIT
Definition properties.h:462
@ CSS_FLEX_BASIS_CONTENT
Definition properties.h:465
@ CSS_FLEX_BASIS_AUTO
Definition properties.h:464
@ CSS_POSITION_INHERIT
Definition properties.h:769
@ CSS_POSITION_FIXED
Definition properties.h:773
@ CSS_POSITION_ABSOLUTE
Definition properties.h:772
@ CSS_POSITION_RELATIVE
Definition properties.h:771
@ CSS_POSITION_STATIC
Definition properties.h:770
@ CSS_POSITION_STICKY
Definition properties.h:774
@ CSS_COLUMN_FILL_INHERIT
Definition properties.h:326
@ CSS_COLUMN_FILL_BALANCE
Definition properties.h:327
@ CSS_COLUMN_FILL_AUTO
Definition properties.h:328
@ CSS_CURSOR_TEXT
Definition properties.h:414
@ CSS_CURSOR_SE_RESIZE
Definition properties.h:410
@ CSS_CURSOR_POINTER
Definition properties.h:404
@ CSS_CURSOR_HELP
Definition properties.h:416
@ CSS_CURSOR_N_RESIZE
Definition properties.h:409
@ CSS_CURSOR_S_RESIZE
Definition properties.h:412
@ CSS_CURSOR_PROGRESS
Definition properties.h:417
@ CSS_CURSOR_WAIT
Definition properties.h:415
@ CSS_CURSOR_CROSSHAIR
Definition properties.h:402
@ CSS_CURSOR_MOVE
Definition properties.h:405
@ CSS_CURSOR_W_RESIZE
Definition properties.h:413
@ CSS_CURSOR_NE_RESIZE
Definition properties.h:407
@ CSS_CURSOR_INHERIT
Definition properties.h:399
@ CSS_CURSOR_AUTO
Definition properties.h:401
@ CSS_CURSOR_NW_RESIZE
Definition properties.h:408
@ CSS_CURSOR_DEFAULT
Definition properties.h:403
@ CSS_CURSOR_E_RESIZE
Definition properties.h:406
@ CSS_CURSOR_SW_RESIZE
Definition properties.h:411
@ CSS_BACKGROUND_IMAGE_NONE
Definition properties.h:192
@ CSS_BACKGROUND_IMAGE_INHERIT
Definition properties.h:190
@ CSS_BACKGROUND_IMAGE_IMAGE
Definition properties.h:193
@ CSS_TEXT_DECORATION_OVERLINE
Definition properties.h:819
@ CSS_TEXT_DECORATION_BLINK
Definition properties.h:817
@ CSS_TEXT_DECORATION_UNDERLINE
Definition properties.h:820
@ CSS_TEXT_DECORATION_LINE_THROUGH
Definition properties.h:818
@ CSS_TEXT_DECORATION_INHERIT
Definition properties.h:815
@ CSS_TEXT_DECORATION_NONE
Definition properties.h:816
@ CSS_OVERFLOW_INHERIT
Definition properties.h:727
@ CSS_OVERFLOW_SCROLL
Definition properties.h:730
@ CSS_OVERFLOW_VISIBLE
Definition properties.h:728
@ CSS_OVERFLOW_AUTO
Definition properties.h:731
@ CSS_OVERFLOW_HIDDEN
Definition properties.h:729
@ CSS_LINE_HEIGHT_DIMENSION
Definition properties.h:585
@ CSS_LINE_HEIGHT_NUMBER
Definition properties.h:584
@ CSS_LINE_HEIGHT_NORMAL
Definition properties.h:586
@ CSS_LINE_HEIGHT_INHERIT
Definition properties.h:583
@ CSS_BORDER_STYLE_NONE
Definition properties.h:228
@ CSS_BORDER_STYLE_HIDDEN
Definition properties.h:229
@ CSS_BORDER_STYLE_SOLID
Definition properties.h:232
@ CSS_BORDER_STYLE_RIDGE
Definition properties.h:235
@ CSS_BORDER_STYLE_DOUBLE
Definition properties.h:233
@ CSS_BORDER_STYLE_OUTSET
Definition properties.h:237
@ CSS_BORDER_STYLE_GROOVE
Definition properties.h:234
@ CSS_BORDER_STYLE_DOTTED
Definition properties.h:230
@ CSS_BORDER_STYLE_DASHED
Definition properties.h:231
@ CSS_BORDER_STYLE_INHERIT
Definition properties.h:227
@ CSS_BORDER_STYLE_INSET
Definition properties.h:236
@ CSS_BOTTOM_SET
Definition properties.h:250
@ CSS_BOTTOM_AUTO
Definition properties.h:251
@ CSS_BOTTOM_INHERIT
Definition properties.h:249
@ CSS_FONT_SIZE_MEDIUM
Definition properties.h:515
@ CSS_FONT_SIZE_DIMENSION
Definition properties.h:521
@ CSS_FONT_SIZE_INHERIT
Definition properties.h:511
@ CSS_FONT_SIZE_XX_SMALL
Definition properties.h:512
@ CSS_FONT_SIZE_SMALLER
Definition properties.h:520
@ CSS_FONT_SIZE_XX_LARGE
Definition properties.h:518
@ CSS_FONT_SIZE_LARGER
Definition properties.h:519
@ CSS_FONT_SIZE_X_SMALL
Definition properties.h:513
@ CSS_FONT_SIZE_X_LARGE
Definition properties.h:517
@ CSS_FONT_SIZE_LARGE
Definition properties.h:516
@ CSS_FONT_SIZE_SMALL
Definition properties.h:514
@ CSS_COUNTER_RESET_INHERIT
Definition properties.h:392
@ CSS_TEXT_ALIGN_INHERIT
Definition properties.h:802
@ CSS_TEXT_ALIGN_RIGHT
Definition properties.h:805
@ CSS_TEXT_ALIGN_CENTER
Definition properties.h:806
@ CSS_TEXT_ALIGN_DEFAULT
Definition properties.h:808
@ CSS_TEXT_ALIGN_JUSTIFY
Definition properties.h:807
@ CSS_TEXT_ALIGN_LIBCSS_LEFT
Definition properties.h:809
@ CSS_TEXT_ALIGN_LEFT
Definition properties.h:804
@ CSS_TEXT_ALIGN_LIBCSS_CENTER
Definition properties.h:810
@ CSS_TEXT_ALIGN_LIBCSS_RIGHT
Definition properties.h:811
@ CSS_COLUMN_SPAN_NONE
Definition properties.h:367
@ CSS_COLUMN_SPAN_INHERIT
Definition properties.h:366
@ CSS_COLUMN_SPAN_ALL
Definition properties.h:368
@ CSS_TEXT_INDENT_SET
Definition properties.h:825
@ CSS_TEXT_INDENT_INHERIT
Definition properties.h:824
@ CSS_BACKGROUND_ATTACHMENT_FIXED
Definition properties.h:179
@ CSS_BACKGROUND_ATTACHMENT_SCROLL
Definition properties.h:180
@ CSS_BACKGROUND_ATTACHMENT_INHERIT
Definition properties.h:178
@ CSS_MIN_HEIGHT_SET
Definition properties.h:678
@ CSS_MIN_HEIGHT_INHERIT
Definition properties.h:677
@ CSS_MIN_HEIGHT_AUTO
Definition properties.h:679
@ CSS_Z_INDEX_SET
Definition properties.h:904
@ CSS_Z_INDEX_AUTO
Definition properties.h:905
@ CSS_Z_INDEX_INHERIT
Definition properties.h:903
@ CSS_CONTENT_SET
Definition properties.h:381
@ CSS_CONTENT_NONE
Definition properties.h:379
@ CSS_CONTENT_NORMAL
Definition properties.h:380
@ CSS_CONTENT_INHERIT
Definition properties.h:378
@ CSS_BORDER_COLLAPSE_SEPARATE
Definition properties.h:211
@ CSS_BORDER_COLLAPSE_COLLAPSE
Definition properties.h:212
@ CSS_BORDER_COLLAPSE_INHERIT
Definition properties.h:210
@ CSS_CLIP_INHERIT
Definition properties.h:309
@ CSS_CLIP_AUTO
Definition properties.h:310
@ CSS_CLIP_RECT
Definition properties.h:311
@ CSS_COLUMN_COUNT_INHERIT
Definition properties.h:320
@ CSS_COLUMN_COUNT_SET
Definition properties.h:322
@ CSS_COLUMN_COUNT_AUTO
Definition properties.h:321
@ CSS_ORDER_INHERIT
Definition properties.h:694
@ CSS_ORDER_SET
Definition properties.h:695
@ CSS_COLUMN_WIDTH_SET
Definition properties.h:373
@ CSS_COLUMN_WIDTH_AUTO
Definition properties.h:374
@ CSS_COLUMN_WIDTH_INHERIT
Definition properties.h:372
@ CSS_JUSTIFY_CONTENT_SPACE_AROUND
Definition properties.h:566
@ CSS_JUSTIFY_CONTENT_SPACE_BETWEEN
Definition properties.h:565
@ CSS_JUSTIFY_CONTENT_SPACE_EVENLY
Definition properties.h:567
@ CSS_JUSTIFY_CONTENT_FLEX_END
Definition properties.h:563
@ CSS_JUSTIFY_CONTENT_FLEX_START
Definition properties.h:562
@ CSS_JUSTIFY_CONTENT_CENTER
Definition properties.h:564
@ CSS_JUSTIFY_CONTENT_INHERIT
Definition properties.h:561
Definition computed.h:32
css_unit tunit
Definition computed.h:38
bool right_auto
Definition computed.h:44
css_fixed left
Definition computed.h:36
css_fixed right
Definition computed.h:34
css_fixed bottom
Definition computed.h:35
bool bottom_auto
Definition computed.h:45
bool left_auto
Definition computed.h:46
css_unit lunit
Definition computed.h:41
css_unit bunit
Definition computed.h:40
css_unit runit
Definition computed.h:39
css_fixed top
Definition computed.h:33
bool top_auto
Definition computed.h:43
Definition computed.h:62
lwc_string * sep
Definition computed.h:74
struct css_computed_content_item::@0::@1 counter
union css_computed_content_item::@0 data
lwc_string * string
Definition computed.h:65
uint8_t type
Definition computed.h:63
lwc_string * attr
Definition computed.h:67
lwc_string * uri
Definition computed.h:66
lwc_string * name
Definition computed.h:69
struct css_computed_content_item::@0::@2 counters
Definition computed.h:27
lwc_string * name
Definition computed.h:28
css_fixed value
Definition computed.h:29
Definition autogenerated_computed.h:282
Definition unit.h:39
#define assert(expr)
Definition testutils.h:32
css_unit
Definition types.h:82
@ CSS_UNIT_HZ
Definition types.h:111
@ CSS_UNIT_PX
Definition types.h:83
@ CSS_UNIT_LH
Definition types.h:93
@ CSS_UNIT_VMIN
Definition types.h:98
@ CSS_UNIT_CALC
Definition types.h:114
@ CSS_UNIT_Q
Definition types.h:100
@ CSS_UNIT_VMAX
Definition types.h:99
@ CSS_UNIT_MM
Definition types.h:88
@ CSS_UNIT_EM
Definition types.h:85
@ CSS_UNIT_PCT
Definition types.h:102
@ CSS_UNIT_VI
Definition types.h:96
@ CSS_UNIT_MS
Definition types.h:108
@ CSS_UNIT_KHZ
Definition types.h:112
@ CSS_UNIT_CM
Definition types.h:87
@ CSS_UNIT_IN
Definition types.h:86
@ CSS_UNIT_REM
Definition types.h:92
@ CSS_UNIT_RAD
Definition types.h:106
@ CSS_UNIT_EX
Definition types.h:84
@ CSS_UNIT_PT
Definition types.h:89
@ CSS_UNIT_PC
Definition types.h:90
@ CSS_UNIT_GRAD
Definition types.h:105
@ CSS_UNIT_CH
Definition types.h:91
@ CSS_UNIT_DEG
Definition types.h:104
@ CSS_UNIT_S
Definition types.h:109
@ CSS_UNIT_VW
Definition types.h:95
@ CSS_UNIT_VH
Definition types.h:94
@ CSS_UNIT_VB
Definition types.h:97
uint32_t css_color
Definition types.h:79