libcss
Loading...
Searching...
No Matches
autogenerated_propget.h
Go to the documentation of this file.
1/*
2 * This file is part of LibCSS
3 * Licensed under the MIT License,
4 * http://www.opensource.org/licenses/mit-license.php
5 * Copyright 2017 The NetSurf Project
6 */
7
8#ifndef CSS_COMPUTED_PROPGET_H_
9#define CSS_COMPUTED_PROPGET_H_
10
11
12#define ALIGN_CONTENT_INDEX 10
13#define ALIGN_CONTENT_SHIFT 20
14#define ALIGN_CONTENT_MASK 0x700000
15static inline uint8_t get_align_content_bits(const css_computed_style *style)
16{
17 uint32_t bits = style->i.bits[ALIGN_CONTENT_INDEX];
18 bits &= ALIGN_CONTENT_MASK;
19 bits >>= ALIGN_CONTENT_SHIFT;
20
21 /* 3bits: ttt : type */
22 return (bits & 0x7);
23}
24static inline uint8_t get_align_content(const css_computed_style *style)
25{
26 uint32_t bits = style->i.bits[ALIGN_CONTENT_INDEX];
27 bits &= ALIGN_CONTENT_MASK;
28 bits >>= ALIGN_CONTENT_SHIFT;
29
30 /* 3bits: ttt : type */
31
32 return (bits & 0x7);
33}
34#undef ALIGN_CONTENT_INDEX
35#undef ALIGN_CONTENT_SHIFT
36#undef ALIGN_CONTENT_MASK
37
38#define ALIGN_ITEMS_INDEX 10
39#define ALIGN_ITEMS_SHIFT 23
40#define ALIGN_ITEMS_MASK 0x3800000
41static inline uint8_t get_align_items_bits(const css_computed_style *style)
42{
43 uint32_t bits = style->i.bits[ALIGN_ITEMS_INDEX];
44 bits &= ALIGN_ITEMS_MASK;
45 bits >>= ALIGN_ITEMS_SHIFT;
46
47 /* 3bits: ttt : type */
48 return (bits & 0x7);
49}
50static inline uint8_t get_align_items(const css_computed_style *style)
51{
52 uint32_t bits = style->i.bits[ALIGN_ITEMS_INDEX];
53 bits &= ALIGN_ITEMS_MASK;
54 bits >>= ALIGN_ITEMS_SHIFT;
55
56 /* 3bits: ttt : type */
57
58 return (bits & 0x7);
59}
60#undef ALIGN_ITEMS_INDEX
61#undef ALIGN_ITEMS_SHIFT
62#undef ALIGN_ITEMS_MASK
63
64#define ALIGN_SELF_INDEX 10
65#define ALIGN_SELF_SHIFT 26
66#define ALIGN_SELF_MASK 0x1c000000
67static inline uint8_t get_align_self_bits(const css_computed_style *style)
68{
69 uint32_t bits = style->i.bits[ALIGN_SELF_INDEX];
70 bits &= ALIGN_SELF_MASK;
71 bits >>= ALIGN_SELF_SHIFT;
72
73 /* 3bits: ttt : type */
74 return (bits & 0x7);
75}
76static inline uint8_t get_align_self(const css_computed_style *style)
77{
78 uint32_t bits = style->i.bits[ALIGN_SELF_INDEX];
79 bits &= ALIGN_SELF_MASK;
80 bits >>= ALIGN_SELF_SHIFT;
81
82 /* 3bits: ttt : type */
83
84 return (bits & 0x7);
85}
86#undef ALIGN_SELF_INDEX
87#undef ALIGN_SELF_SHIFT
88#undef ALIGN_SELF_MASK
89
90#define BACKGROUND_ATTACHMENT_INDEX 14
91#define BACKGROUND_ATTACHMENT_SHIFT 28
92#define BACKGROUND_ATTACHMENT_MASK 0x30000000
93static inline uint8_t get_background_attachment_bits(const css_computed_style
94 *style)
95{
96 uint32_t bits = style->i.bits[BACKGROUND_ATTACHMENT_INDEX];
99
100 /* 2bits: tt : type */
101 return (bits & 0x3);
102}
103static inline uint8_t get_background_attachment(const css_computed_style *style)
104{
105 uint32_t bits = style->i.bits[BACKGROUND_ATTACHMENT_INDEX];
108
109 /* 2bits: tt : type */
110
111 return (bits & 0x3);
112}
113#undef BACKGROUND_ATTACHMENT_INDEX
114#undef BACKGROUND_ATTACHMENT_SHIFT
115#undef BACKGROUND_ATTACHMENT_MASK
116
117#define BACKGROUND_COLOR_INDEX 14
118#define BACKGROUND_COLOR_SHIFT 30
119#define BACKGROUND_COLOR_MASK 0xc0000000
120static inline uint8_t get_background_color_bits(const css_computed_style *style)
121{
122 uint32_t bits = style->i.bits[BACKGROUND_COLOR_INDEX];
123 bits &= BACKGROUND_COLOR_MASK;
124 bits >>= BACKGROUND_COLOR_SHIFT;
125
126 /* 2bits: tt : type */
127 return (bits & 0x3);
128}
129static inline uint8_t get_background_color(const css_computed_style *style,
130 css_color *color)
131{
132 uint32_t bits = style->i.bits[BACKGROUND_COLOR_INDEX];
133 bits &= BACKGROUND_COLOR_MASK;
134 bits >>= BACKGROUND_COLOR_SHIFT;
135
136 /* 2bits: tt : type */
137 *color = style->i.background_color;
138
139 return (bits & 0x3);
140}
141#undef BACKGROUND_COLOR_INDEX
142#undef BACKGROUND_COLOR_SHIFT
143#undef BACKGROUND_COLOR_MASK
144
145#define BACKGROUND_IMAGE_INDEX 14
146#define BACKGROUND_IMAGE_SHIFT 16
147#define BACKGROUND_IMAGE_MASK 0x10000
148static inline uint8_t get_background_image_bits(const css_computed_style *style)
149{
150 uint32_t bits = style->i.bits[BACKGROUND_IMAGE_INDEX];
151 bits &= BACKGROUND_IMAGE_MASK;
152 bits >>= BACKGROUND_IMAGE_SHIFT;
153
154 /* 1bit: t : type */
155 return (bits & 0x1);
156}
157static inline uint8_t get_background_image(const css_computed_style *style,
158 lwc_string **string)
159{
160 uint32_t bits = style->i.bits[BACKGROUND_IMAGE_INDEX];
161 bits &= BACKGROUND_IMAGE_MASK;
162 bits >>= BACKGROUND_IMAGE_SHIFT;
163
164 /* 1bit: t : type */
165 *string = style->i.background_image;
166
167 return (bits & 0x1);
168}
169#undef BACKGROUND_IMAGE_INDEX
170#undef BACKGROUND_IMAGE_SHIFT
171#undef BACKGROUND_IMAGE_MASK
172
173#define BACKGROUND_POSITION_INDEX 12
174#define BACKGROUND_POSITION_SHIFT 10
175#define BACKGROUND_POSITION_MASK 0x1ffc00
176static inline uint8_t get_background_position_bits(const css_computed_style
177 *style)
178{
179 uint32_t bits = style->i.bits[BACKGROUND_POSITION_INDEX];
182
183 /* 11bits: aaaaabbbbbt : unit_a | unit_b | type */
184 return (bits & 0x1);
185}
186static inline uint8_t get_background_position(const css_computed_style *style,
187 css_fixed *length_a, css_unit *unit_a, css_fixed *length_b,
188 css_unit *unit_b)
189{
190 uint32_t bits = style->i.bits[BACKGROUND_POSITION_INDEX];
193
194 /* 11bits: aaaaabbbbbt : unit_a | unit_b | type */
195 if ((bits & 0x1) == CSS_BACKGROUND_POSITION_SET) {
196 *length_a = style->i.background_position_a;
197 *length_b = style->i.background_position_b;
198 *unit_a = bits >> 6;
199 *unit_b = (bits & 0x3e) >> 1;
200 }
201
202 return (bits & 0x1);
203}
204#undef BACKGROUND_POSITION_INDEX
205#undef BACKGROUND_POSITION_SHIFT
206#undef BACKGROUND_POSITION_MASK
207
208#define BACKGROUND_REPEAT_INDEX 10
209#define BACKGROUND_REPEAT_SHIFT 29
210#define BACKGROUND_REPEAT_MASK 0xe0000000
211static inline uint8_t get_background_repeat_bits(const css_computed_style
212 *style)
213{
214 uint32_t bits = style->i.bits[BACKGROUND_REPEAT_INDEX];
217
218 /* 3bits: ttt : type */
219 return (bits & 0x7);
220}
221static inline uint8_t get_background_repeat(const css_computed_style *style)
222{
223 uint32_t bits = style->i.bits[BACKGROUND_REPEAT_INDEX];
226
227 /* 3bits: ttt : type */
228
229 return (bits & 0x7);
230}
231#undef BACKGROUND_REPEAT_INDEX
232#undef BACKGROUND_REPEAT_SHIFT
233#undef BACKGROUND_REPEAT_MASK
234
235#define BORDER_BOTTOM_COLOR_INDEX 11
236#define BORDER_BOTTOM_COLOR_SHIFT 0
237#define BORDER_BOTTOM_COLOR_MASK 0x3
238static inline uint8_t get_border_bottom_color_bits(const css_computed_style
239 *style)
240{
241 uint32_t bits = style->i.bits[BORDER_BOTTOM_COLOR_INDEX];
244
245 /* 2bits: tt : type */
246 return (bits & 0x3);
247}
248static inline uint8_t get_border_bottom_color(const css_computed_style *style,
249 css_color *color)
250{
251 uint32_t bits = style->i.bits[BORDER_BOTTOM_COLOR_INDEX];
254
255 /* 2bits: tt : type */
256 *color = style->i.border_bottom_color;
257
258 return (bits & 0x3);
259}
260#undef BORDER_BOTTOM_COLOR_INDEX
261#undef BORDER_BOTTOM_COLOR_SHIFT
262#undef BORDER_BOTTOM_COLOR_MASK
263
264#define BORDER_BOTTOM_STYLE_INDEX 13
265#define BORDER_BOTTOM_STYLE_SHIFT 28
266#define BORDER_BOTTOM_STYLE_MASK 0xf0000000
267static inline uint8_t get_border_bottom_style_bits(const css_computed_style
268 *style)
269{
270 uint32_t bits = style->i.bits[BORDER_BOTTOM_STYLE_INDEX];
273
274 /* 4bits: tttt : type */
275 return (bits & 0xf);
276}
277static inline uint8_t get_border_bottom_style(const css_computed_style *style)
278{
279 uint32_t bits = style->i.bits[BORDER_BOTTOM_STYLE_INDEX];
282
283 /* 4bits: tttt : type */
284
285 return (bits & 0xf);
286}
287#undef BORDER_BOTTOM_STYLE_INDEX
288#undef BORDER_BOTTOM_STYLE_SHIFT
289#undef BORDER_BOTTOM_STYLE_MASK
290
291#define BORDER_BOTTOM_WIDTH_INDEX 0
292#define BORDER_BOTTOM_WIDTH_SHIFT 0
293#define BORDER_BOTTOM_WIDTH_MASK 0xff
294static inline uint8_t get_border_bottom_width_bits(const css_computed_style
295 *style)
296{
297 uint32_t bits = style->i.bits[BORDER_BOTTOM_WIDTH_INDEX];
300
301 /* 8bits: uuuuuttt : unit | type */
302 return (bits & 0x7);
303}
304static inline uint8_t get_border_bottom_width(const css_computed_style *style,
305 css_fixed *length, css_unit *unit)
306{
307 uint32_t bits = style->i.bits[BORDER_BOTTOM_WIDTH_INDEX];
310
311 /* 8bits: uuuuuttt : unit | type */
312 if ((bits & 0x7) == CSS_BORDER_WIDTH_WIDTH) {
313 *length = style->i.border_bottom_width;
314 *unit = bits >> 3;
315 }
316
317 return (bits & 0x7);
318}
319#undef BORDER_BOTTOM_WIDTH_INDEX
320#undef BORDER_BOTTOM_WIDTH_SHIFT
321#undef BORDER_BOTTOM_WIDTH_MASK
322
323#define BORDER_COLLAPSE_INDEX 11
324#define BORDER_COLLAPSE_SHIFT 2
325#define BORDER_COLLAPSE_MASK 0xc
326static inline uint8_t get_border_collapse_bits(const css_computed_style *style)
327{
328 uint32_t bits = style->i.bits[BORDER_COLLAPSE_INDEX];
329 bits &= BORDER_COLLAPSE_MASK;
330 bits >>= BORDER_COLLAPSE_SHIFT;
331
332 /* 2bits: tt : type */
333 return (bits & 0x3);
334}
335static inline uint8_t get_border_collapse(const css_computed_style *style)
336{
337 uint32_t bits = style->i.bits[BORDER_COLLAPSE_INDEX];
338 bits &= BORDER_COLLAPSE_MASK;
339 bits >>= BORDER_COLLAPSE_SHIFT;
340
341 /* 2bits: tt : type */
342
343 return (bits & 0x3);
344}
345#undef BORDER_COLLAPSE_INDEX
346#undef BORDER_COLLAPSE_SHIFT
347#undef BORDER_COLLAPSE_MASK
348
349#define BORDER_LEFT_COLOR_INDEX 11
350#define BORDER_LEFT_COLOR_SHIFT 4
351#define BORDER_LEFT_COLOR_MASK 0x30
352static inline uint8_t get_border_left_color_bits(const css_computed_style
353 *style)
354{
355 uint32_t bits = style->i.bits[BORDER_LEFT_COLOR_INDEX];
358
359 /* 2bits: tt : type */
360 return (bits & 0x3);
361}
362static inline uint8_t get_border_left_color(const css_computed_style *style,
363 css_color *color)
364{
365 uint32_t bits = style->i.bits[BORDER_LEFT_COLOR_INDEX];
368
369 /* 2bits: tt : type */
370 *color = style->i.border_left_color;
371
372 return (bits & 0x3);
373}
374#undef BORDER_LEFT_COLOR_INDEX
375#undef BORDER_LEFT_COLOR_SHIFT
376#undef BORDER_LEFT_COLOR_MASK
377
378#define BORDER_LEFT_STYLE_INDEX 9
379#define BORDER_LEFT_STYLE_SHIFT 3
380#define BORDER_LEFT_STYLE_MASK 0x78
381static inline uint8_t get_border_left_style_bits(const css_computed_style
382 *style)
383{
384 uint32_t bits = style->i.bits[BORDER_LEFT_STYLE_INDEX];
387
388 /* 4bits: tttt : type */
389 return (bits & 0xf);
390}
391static inline uint8_t get_border_left_style(const css_computed_style *style)
392{
393 uint32_t bits = style->i.bits[BORDER_LEFT_STYLE_INDEX];
396
397 /* 4bits: tttt : type */
398
399 return (bits & 0xf);
400}
401#undef BORDER_LEFT_STYLE_INDEX
402#undef BORDER_LEFT_STYLE_SHIFT
403#undef BORDER_LEFT_STYLE_MASK
404
405#define BORDER_LEFT_WIDTH_INDEX 0
406#define BORDER_LEFT_WIDTH_SHIFT 8
407#define BORDER_LEFT_WIDTH_MASK 0xff00
408static inline uint8_t get_border_left_width_bits(const css_computed_style
409 *style)
410{
411 uint32_t bits = style->i.bits[BORDER_LEFT_WIDTH_INDEX];
414
415 /* 8bits: uuuuuttt : unit | type */
416 return (bits & 0x7);
417}
418static inline uint8_t get_border_left_width(const css_computed_style *style,
419 css_fixed *length, css_unit *unit)
420{
421 uint32_t bits = style->i.bits[BORDER_LEFT_WIDTH_INDEX];
424
425 /* 8bits: uuuuuttt : unit | type */
426 if ((bits & 0x7) == CSS_BORDER_WIDTH_WIDTH) {
427 *length = style->i.border_left_width;
428 *unit = bits >> 3;
429 }
430
431 return (bits & 0x7);
432}
433#undef BORDER_LEFT_WIDTH_INDEX
434#undef BORDER_LEFT_WIDTH_SHIFT
435#undef BORDER_LEFT_WIDTH_MASK
436
437#define BORDER_RIGHT_COLOR_INDEX 11
438#define BORDER_RIGHT_COLOR_SHIFT 6
439#define BORDER_RIGHT_COLOR_MASK 0xc0
440static inline uint8_t get_border_right_color_bits(const css_computed_style
441 *style)
442{
443 uint32_t bits = style->i.bits[BORDER_RIGHT_COLOR_INDEX];
446
447 /* 2bits: tt : type */
448 return (bits & 0x3);
449}
450static inline uint8_t get_border_right_color(const css_computed_style *style,
451 css_color *color)
452{
453 uint32_t bits = style->i.bits[BORDER_RIGHT_COLOR_INDEX];
456
457 /* 2bits: tt : type */
458 *color = style->i.border_right_color;
459
460 return (bits & 0x3);
461}
462#undef BORDER_RIGHT_COLOR_INDEX
463#undef BORDER_RIGHT_COLOR_SHIFT
464#undef BORDER_RIGHT_COLOR_MASK
465
466#define BORDER_RIGHT_STYLE_INDEX 9
467#define BORDER_RIGHT_STYLE_SHIFT 7
468#define BORDER_RIGHT_STYLE_MASK 0x780
469static inline uint8_t get_border_right_style_bits(const css_computed_style
470 *style)
471{
472 uint32_t bits = style->i.bits[BORDER_RIGHT_STYLE_INDEX];
475
476 /* 4bits: tttt : type */
477 return (bits & 0xf);
478}
479static inline uint8_t get_border_right_style(const css_computed_style *style)
480{
481 uint32_t bits = style->i.bits[BORDER_RIGHT_STYLE_INDEX];
484
485 /* 4bits: tttt : type */
486
487 return (bits & 0xf);
488}
489#undef BORDER_RIGHT_STYLE_INDEX
490#undef BORDER_RIGHT_STYLE_SHIFT
491#undef BORDER_RIGHT_STYLE_MASK
492
493#define BORDER_RIGHT_WIDTH_INDEX 0
494#define BORDER_RIGHT_WIDTH_SHIFT 16
495#define BORDER_RIGHT_WIDTH_MASK 0xff0000
496static inline uint8_t get_border_right_width_bits(const css_computed_style
497 *style)
498{
499 uint32_t bits = style->i.bits[BORDER_RIGHT_WIDTH_INDEX];
502
503 /* 8bits: uuuuuttt : unit | type */
504 return (bits & 0x7);
505}
506static inline uint8_t get_border_right_width(const css_computed_style *style,
507 css_fixed *length, css_unit *unit)
508{
509 uint32_t bits = style->i.bits[BORDER_RIGHT_WIDTH_INDEX];
512
513 /* 8bits: uuuuuttt : unit | type */
514 if ((bits & 0x7) == CSS_BORDER_WIDTH_WIDTH) {
515 *length = style->i.border_right_width;
516 *unit = bits >> 3;
517 }
518
519 return (bits & 0x7);
520}
521#undef BORDER_RIGHT_WIDTH_INDEX
522#undef BORDER_RIGHT_WIDTH_SHIFT
523#undef BORDER_RIGHT_WIDTH_MASK
524
525#define BORDER_SPACING_INDEX 12
526#define BORDER_SPACING_SHIFT 21
527#define BORDER_SPACING_MASK 0xffe00000
528static inline uint8_t get_border_spacing_bits(const css_computed_style *style)
529{
530 uint32_t bits = style->i.bits[BORDER_SPACING_INDEX];
531 bits &= BORDER_SPACING_MASK;
532 bits >>= BORDER_SPACING_SHIFT;
533
534 /* 11bits: aaaaabbbbbt : unit_a | unit_b | type */
535 return (bits & 0x1);
536}
537static inline uint8_t get_border_spacing(const css_computed_style *style,
538 css_fixed *length_a, css_unit *unit_a, css_fixed *length_b,
539 css_unit *unit_b)
540{
541 uint32_t bits = style->i.bits[BORDER_SPACING_INDEX];
542 bits &= BORDER_SPACING_MASK;
543 bits >>= BORDER_SPACING_SHIFT;
544
545 /* 11bits: aaaaabbbbbt : unit_a | unit_b | type */
546 if ((bits & 0x1) == CSS_BORDER_SPACING_SET) {
547 *length_a = style->i.border_spacing_a;
548 *length_b = style->i.border_spacing_b;
549 *unit_a = bits >> 6;
550 *unit_b = (bits & 0x3e) >> 1;
551 }
552
553 return (bits & 0x1);
554}
555#undef BORDER_SPACING_INDEX
556#undef BORDER_SPACING_SHIFT
557#undef BORDER_SPACING_MASK
558
559#define BORDER_TOP_COLOR_INDEX 11
560#define BORDER_TOP_COLOR_SHIFT 8
561#define BORDER_TOP_COLOR_MASK 0x300
562static inline uint8_t get_border_top_color_bits(const css_computed_style *style)
563{
564 uint32_t bits = style->i.bits[BORDER_TOP_COLOR_INDEX];
565 bits &= BORDER_TOP_COLOR_MASK;
566 bits >>= BORDER_TOP_COLOR_SHIFT;
567
568 /* 2bits: tt : type */
569 return (bits & 0x3);
570}
571static inline uint8_t get_border_top_color(const css_computed_style *style,
572 css_color *color)
573{
574 uint32_t bits = style->i.bits[BORDER_TOP_COLOR_INDEX];
575 bits &= BORDER_TOP_COLOR_MASK;
576 bits >>= BORDER_TOP_COLOR_SHIFT;
577
578 /* 2bits: tt : type */
579 *color = style->i.border_top_color;
580
581 return (bits & 0x3);
582}
583#undef BORDER_TOP_COLOR_INDEX
584#undef BORDER_TOP_COLOR_SHIFT
585#undef BORDER_TOP_COLOR_MASK
586
587#define BORDER_TOP_STYLE_INDEX 9
588#define BORDER_TOP_STYLE_SHIFT 11
589#define BORDER_TOP_STYLE_MASK 0x7800
590static inline uint8_t get_border_top_style_bits(const css_computed_style *style)
591{
592 uint32_t bits = style->i.bits[BORDER_TOP_STYLE_INDEX];
593 bits &= BORDER_TOP_STYLE_MASK;
594 bits >>= BORDER_TOP_STYLE_SHIFT;
595
596 /* 4bits: tttt : type */
597 return (bits & 0xf);
598}
599static inline uint8_t get_border_top_style(const css_computed_style *style)
600{
601 uint32_t bits = style->i.bits[BORDER_TOP_STYLE_INDEX];
602 bits &= BORDER_TOP_STYLE_MASK;
603 bits >>= BORDER_TOP_STYLE_SHIFT;
604
605 /* 4bits: tttt : type */
606
607 return (bits & 0xf);
608}
609#undef BORDER_TOP_STYLE_INDEX
610#undef BORDER_TOP_STYLE_SHIFT
611#undef BORDER_TOP_STYLE_MASK
612
613#define BORDER_TOP_WIDTH_INDEX 0
614#define BORDER_TOP_WIDTH_SHIFT 24
615#define BORDER_TOP_WIDTH_MASK 0xff000000
616static inline uint8_t get_border_top_width_bits(const css_computed_style *style)
617{
618 uint32_t bits = style->i.bits[BORDER_TOP_WIDTH_INDEX];
619 bits &= BORDER_TOP_WIDTH_MASK;
620 bits >>= BORDER_TOP_WIDTH_SHIFT;
621
622 /* 8bits: uuuuuttt : unit | type */
623 return (bits & 0x7);
624}
625static inline uint8_t get_border_top_width(const css_computed_style *style,
626 css_fixed *length, css_unit *unit)
627{
628 uint32_t bits = style->i.bits[BORDER_TOP_WIDTH_INDEX];
629 bits &= BORDER_TOP_WIDTH_MASK;
630 bits >>= BORDER_TOP_WIDTH_SHIFT;
631
632 /* 8bits: uuuuuttt : unit | type */
633 if ((bits & 0x7) == CSS_BORDER_WIDTH_WIDTH) {
634 *length = style->i.border_top_width;
635 *unit = bits >> 3;
636 }
637
638 return (bits & 0x7);
639}
640#undef BORDER_TOP_WIDTH_INDEX
641#undef BORDER_TOP_WIDTH_SHIFT
642#undef BORDER_TOP_WIDTH_MASK
643
644#define BOTTOM_INDEX 3
645#define BOTTOM_SHIFT 11
646#define BOTTOM_MASK 0x3f800
647static inline uint8_t get_bottom_bits(const css_computed_style *style)
648{
649 uint32_t bits = style->i.bits[BOTTOM_INDEX];
650 bits &= BOTTOM_MASK;
651 bits >>= BOTTOM_SHIFT;
652
653 /* 7bits: uuuuutt : unit | type */
654 return (bits & 0x3);
655}
656static inline uint8_t get_bottom(const css_computed_style *style, css_fixed
657 *length, css_unit *unit)
658{
659 uint32_t bits = style->i.bits[BOTTOM_INDEX];
660 bits &= BOTTOM_MASK;
661 bits >>= BOTTOM_SHIFT;
662
663 /* 7bits: uuuuutt : unit | type */
664 if ((bits & 0x3) == CSS_BOTTOM_SET) {
665 *length = style->i.bottom;
666 *unit = bits >> 2;
667 }
668
669 return (bits & 0x3);
670}
671#undef BOTTOM_INDEX
672#undef BOTTOM_SHIFT
673#undef BOTTOM_MASK
674
675#define BOX_SIZING_INDEX 11
676#define BOX_SIZING_SHIFT 10
677#define BOX_SIZING_MASK 0xc00
678static inline uint8_t get_box_sizing_bits(const css_computed_style *style)
679{
680 uint32_t bits = style->i.bits[BOX_SIZING_INDEX];
681 bits &= BOX_SIZING_MASK;
682 bits >>= BOX_SIZING_SHIFT;
683
684 /* 2bits: tt : type */
685 return (bits & 0x3);
686}
687static inline uint8_t get_box_sizing(const css_computed_style *style)
688{
689 uint32_t bits = style->i.bits[BOX_SIZING_INDEX];
690 bits &= BOX_SIZING_MASK;
691 bits >>= BOX_SIZING_SHIFT;
692
693 /* 2bits: tt : type */
694
695 return (bits & 0x3);
696}
697#undef BOX_SIZING_INDEX
698#undef BOX_SIZING_SHIFT
699#undef BOX_SIZING_MASK
700
701#define BREAK_AFTER_INDEX 9
702#define BREAK_AFTER_SHIFT 15
703#define BREAK_AFTER_MASK 0x78000
704static inline uint8_t get_break_after_bits(const css_computed_style *style)
705{
706 uint32_t bits = style->i.bits[BREAK_AFTER_INDEX];
707 bits &= BREAK_AFTER_MASK;
708 bits >>= BREAK_AFTER_SHIFT;
709
710 /* 4bits: tttt : type */
711 return (bits & 0xf);
712}
713static inline uint8_t get_break_after(const css_computed_style *style)
714{
715 uint32_t bits = style->i.bits[BREAK_AFTER_INDEX];
716 bits &= BREAK_AFTER_MASK;
717 bits >>= BREAK_AFTER_SHIFT;
718
719 /* 4bits: tttt : type */
720
721 return (bits & 0xf);
722}
723#undef BREAK_AFTER_INDEX
724#undef BREAK_AFTER_SHIFT
725#undef BREAK_AFTER_MASK
726
727#define BREAK_BEFORE_INDEX 9
728#define BREAK_BEFORE_SHIFT 19
729#define BREAK_BEFORE_MASK 0x780000
730static inline uint8_t get_break_before_bits(const css_computed_style *style)
731{
732 uint32_t bits = style->i.bits[BREAK_BEFORE_INDEX];
733 bits &= BREAK_BEFORE_MASK;
734 bits >>= BREAK_BEFORE_SHIFT;
735
736 /* 4bits: tttt : type */
737 return (bits & 0xf);
738}
739static inline uint8_t get_break_before(const css_computed_style *style)
740{
741 uint32_t bits = style->i.bits[BREAK_BEFORE_INDEX];
742 bits &= BREAK_BEFORE_MASK;
743 bits >>= BREAK_BEFORE_SHIFT;
744
745 /* 4bits: tttt : type */
746
747 return (bits & 0xf);
748}
749#undef BREAK_BEFORE_INDEX
750#undef BREAK_BEFORE_SHIFT
751#undef BREAK_BEFORE_MASK
752
753#define BREAK_INSIDE_INDEX 9
754#define BREAK_INSIDE_SHIFT 23
755#define BREAK_INSIDE_MASK 0x7800000
756static inline uint8_t get_break_inside_bits(const css_computed_style *style)
757{
758 uint32_t bits = style->i.bits[BREAK_INSIDE_INDEX];
759 bits &= BREAK_INSIDE_MASK;
760 bits >>= BREAK_INSIDE_SHIFT;
761
762 /* 4bits: tttt : type */
763 return (bits & 0xf);
764}
765static inline uint8_t get_break_inside(const css_computed_style *style)
766{
767 uint32_t bits = style->i.bits[BREAK_INSIDE_INDEX];
768 bits &= BREAK_INSIDE_MASK;
769 bits >>= BREAK_INSIDE_SHIFT;
770
771 /* 4bits: tttt : type */
772
773 return (bits & 0xf);
774}
775#undef BREAK_INSIDE_INDEX
776#undef BREAK_INSIDE_SHIFT
777#undef BREAK_INSIDE_MASK
778
779#define CAPTION_SIDE_INDEX 11
780#define CAPTION_SIDE_SHIFT 12
781#define CAPTION_SIDE_MASK 0x3000
782static inline uint8_t get_caption_side_bits(const css_computed_style *style)
783{
784 uint32_t bits = style->i.bits[CAPTION_SIDE_INDEX];
785 bits &= CAPTION_SIDE_MASK;
786 bits >>= CAPTION_SIDE_SHIFT;
787
788 /* 2bits: tt : type */
789 return (bits & 0x3);
790}
791static inline uint8_t get_caption_side(const css_computed_style *style)
792{
793 uint32_t bits = style->i.bits[CAPTION_SIDE_INDEX];
794 bits &= CAPTION_SIDE_MASK;
795 bits >>= CAPTION_SIDE_SHIFT;
796
797 /* 2bits: tt : type */
798
799 return (bits & 0x3);
800}
801#undef CAPTION_SIDE_INDEX
802#undef CAPTION_SIDE_SHIFT
803#undef CAPTION_SIDE_MASK
804
805#define CLEAR_INDEX 13
806#define CLEAR_SHIFT 1
807#define CLEAR_MASK 0xe
808static inline uint8_t get_clear_bits(const css_computed_style *style)
809{
810 uint32_t bits = style->i.bits[CLEAR_INDEX];
811 bits &= CLEAR_MASK;
812 bits >>= CLEAR_SHIFT;
813
814 /* 3bits: ttt : type */
815 return (bits & 0x7);
816}
817static inline uint8_t get_clear(const css_computed_style *style)
818{
819 uint32_t bits = style->i.bits[CLEAR_INDEX];
820 bits &= CLEAR_MASK;
821 bits >>= CLEAR_SHIFT;
822
823 /* 3bits: ttt : type */
824
825 return (bits & 0x7);
826}
827#undef CLEAR_INDEX
828#undef CLEAR_SHIFT
829#undef CLEAR_MASK
830
831#define CLIP_INDEX 2
832#define CLIP_SHIFT 6
833#define CLIP_MASK 0xffffffc0
834static inline uint8_t get_clip_bits(const css_computed_style *style)
835{
836 uint32_t bits = style->i.bits[CLIP_INDEX];
837 bits &= CLIP_MASK;
838 bits >>= CLIP_SHIFT;
839
840 /* 26bits: aaaaabbbbbcccccdddddtttttt : unit_a | unit_b | unit_c |
841 unit_d | type */
842 return (bits & 0x3f);
843}
844static inline uint8_t get_clip(
845 const css_computed_style *style,
847{
848 uint32_t bits = style->i.bits[CLIP_INDEX];
849 bits &= CLIP_MASK;
850 bits >>= CLIP_SHIFT;
851
852 /*
853 26bits: tt tttr rrrr bbbb blll llTR BLyy:
854 units: top | right | bottom | left
855 opcodes: top | right | bottom | left | type
856 */
857
858 if ((bits & 0x3) == CSS_CLIP_RECT) {
859 rect->left_auto = (bits & 0x4);
860 rect->bottom_auto = (bits & 0x8);
861 rect->right_auto = (bits & 0x10);
862 rect->top_auto = (bits & 0x20);
863
864 rect->top = style->i.clip_a;
865 rect->tunit = bits & 0x3e00000 >> 21;
866
867 rect->right = style->i.clip_b;
868 rect->runit = bits & 0x1f0000 >> 16;
869
870 rect->bottom = style->i.clip_c;
871 rect->bunit = (bits & 0xf800) >> 11;
872
873 rect->left = style->i.clip_d;
874 rect->lunit = (bits & 0x7c0) >> 6;
875 }
876
877 return (bits & 0x3);
878}
879#undef CLIP_INDEX
880#undef CLIP_SHIFT
881#undef CLIP_MASK
882
883#define COLOR_INDEX 14
884#define COLOR_SHIFT 17
885#define COLOR_MASK 0x20000
886static inline uint8_t get_color_bits(const css_computed_style *style)
887{
888 uint32_t bits = style->i.bits[COLOR_INDEX];
889 bits &= COLOR_MASK;
890 bits >>= COLOR_SHIFT;
891
892 /* 1bit: t : type */
893 return (bits & 0x1);
894}
895static inline uint8_t get_color(const css_computed_style *style, css_color
896 *color)
897{
898 uint32_t bits = style->i.bits[COLOR_INDEX];
899 bits &= COLOR_MASK;
900 bits >>= COLOR_SHIFT;
901
902 /* 1bit: t : type */
903 *color = style->i.color;
904
905 return (bits & 0x1);
906}
907#undef COLOR_INDEX
908#undef COLOR_SHIFT
909#undef COLOR_MASK
910
911#define COLUMN_COUNT_INDEX 11
912#define COLUMN_COUNT_SHIFT 14
913#define COLUMN_COUNT_MASK 0xc000
914static inline uint8_t get_column_count_bits(const css_computed_style *style)
915{
916 uint32_t bits = style->i.bits[COLUMN_COUNT_INDEX];
917 bits &= COLUMN_COUNT_MASK;
918 bits >>= COLUMN_COUNT_SHIFT;
919
920 /* 2bits: tt : type */
921 return (bits & 0x3);
922}
923static inline uint8_t get_column_count(const css_computed_style *style, int32_t
924 *integer)
925{
926 uint32_t bits = style->i.bits[COLUMN_COUNT_INDEX];
927 bits &= COLUMN_COUNT_MASK;
928 bits >>= COLUMN_COUNT_SHIFT;
929
930 /* 2bits: tt : type */
931 *integer = style->i.column_count;
932
933 return (bits & 0x3);
934}
935#undef COLUMN_COUNT_INDEX
936#undef COLUMN_COUNT_SHIFT
937#undef COLUMN_COUNT_MASK
938
939#define COLUMN_FILL_INDEX 11
940#define COLUMN_FILL_SHIFT 16
941#define COLUMN_FILL_MASK 0x30000
942static inline uint8_t get_column_fill_bits(const css_computed_style *style)
943{
944 uint32_t bits = style->i.bits[COLUMN_FILL_INDEX];
945 bits &= COLUMN_FILL_MASK;
946 bits >>= COLUMN_FILL_SHIFT;
947
948 /* 2bits: tt : type */
949 return (bits & 0x3);
950}
951static inline uint8_t get_column_fill(const css_computed_style *style)
952{
953 uint32_t bits = style->i.bits[COLUMN_FILL_INDEX];
954 bits &= COLUMN_FILL_MASK;
955 bits >>= COLUMN_FILL_SHIFT;
956
957 /* 2bits: tt : type */
958
959 return (bits & 0x3);
960}
961#undef COLUMN_FILL_INDEX
962#undef COLUMN_FILL_SHIFT
963#undef COLUMN_FILL_MASK
964
965#define COLUMN_GAP_INDEX 3
966#define COLUMN_GAP_SHIFT 18
967#define COLUMN_GAP_MASK 0x1fc0000
968static inline uint8_t get_column_gap_bits(const css_computed_style *style)
969{
970 uint32_t bits = style->i.bits[COLUMN_GAP_INDEX];
971 bits &= COLUMN_GAP_MASK;
972 bits >>= COLUMN_GAP_SHIFT;
973
974 /* 7bits: uuuuutt : unit | type */
975 return (bits & 0x3);
976}
977static inline uint8_t get_column_gap(const css_computed_style *style, css_fixed
978 *length, css_unit *unit)
979{
980 uint32_t bits = style->i.bits[COLUMN_GAP_INDEX];
981 bits &= COLUMN_GAP_MASK;
982 bits >>= COLUMN_GAP_SHIFT;
983
984 /* 7bits: uuuuutt : unit | type */
985 if ((bits & 0x3) == CSS_COLUMN_GAP_SET) {
986 *length = style->i.column_gap;
987 *unit = bits >> 2;
988 }
989
990 return (bits & 0x3);
991}
992#undef COLUMN_GAP_INDEX
993#undef COLUMN_GAP_SHIFT
994#undef COLUMN_GAP_MASK
995
996#define COLUMN_RULE_COLOR_INDEX 11
997#define COLUMN_RULE_COLOR_SHIFT 18
998#define COLUMN_RULE_COLOR_MASK 0xc0000
999static inline uint8_t get_column_rule_color_bits(const css_computed_style
1000 *style)
1001{
1002 uint32_t bits = style->i.bits[COLUMN_RULE_COLOR_INDEX];
1003 bits &= COLUMN_RULE_COLOR_MASK;
1004 bits >>= COLUMN_RULE_COLOR_SHIFT;
1005
1006 /* 2bits: tt : type */
1007 return (bits & 0x3);
1008}
1009static inline uint8_t get_column_rule_color(const css_computed_style *style,
1010 css_color *color)
1011{
1012 uint32_t bits = style->i.bits[COLUMN_RULE_COLOR_INDEX];
1013 bits &= COLUMN_RULE_COLOR_MASK;
1014 bits >>= COLUMN_RULE_COLOR_SHIFT;
1015
1016 /* 2bits: tt : type */
1017 *color = style->i.column_rule_color;
1018
1019 return (bits & 0x3);
1020}
1021#undef COLUMN_RULE_COLOR_INDEX
1022#undef COLUMN_RULE_COLOR_SHIFT
1023#undef COLUMN_RULE_COLOR_MASK
1024
1025#define COLUMN_RULE_STYLE_INDEX 7
1026#define COLUMN_RULE_STYLE_SHIFT 0
1027#define COLUMN_RULE_STYLE_MASK 0xf
1028static inline uint8_t get_column_rule_style_bits(const css_computed_style
1029 *style)
1030{
1031 uint32_t bits = style->i.bits[COLUMN_RULE_STYLE_INDEX];
1032 bits &= COLUMN_RULE_STYLE_MASK;
1033 bits >>= COLUMN_RULE_STYLE_SHIFT;
1034
1035 /* 4bits: tttt : type */
1036 return (bits & 0xf);
1037}
1038static inline uint8_t get_column_rule_style(const css_computed_style *style)
1039{
1040 uint32_t bits = style->i.bits[COLUMN_RULE_STYLE_INDEX];
1041 bits &= COLUMN_RULE_STYLE_MASK;
1042 bits >>= COLUMN_RULE_STYLE_SHIFT;
1043
1044 /* 4bits: tttt : type */
1045
1046 return (bits & 0xf);
1047}
1048#undef COLUMN_RULE_STYLE_INDEX
1049#undef COLUMN_RULE_STYLE_SHIFT
1050#undef COLUMN_RULE_STYLE_MASK
1051
1052#define COLUMN_RULE_WIDTH_INDEX 1
1053#define COLUMN_RULE_WIDTH_SHIFT 7
1054#define COLUMN_RULE_WIDTH_MASK 0x7f80
1055static inline uint8_t get_column_rule_width_bits(const css_computed_style
1056 *style)
1057{
1058 uint32_t bits = style->i.bits[COLUMN_RULE_WIDTH_INDEX];
1059 bits &= COLUMN_RULE_WIDTH_MASK;
1060 bits >>= COLUMN_RULE_WIDTH_SHIFT;
1061
1062 /* 8bits: uuuuuttt : unit | type */
1063 return (bits & 0x7);
1064}
1065static inline uint8_t get_column_rule_width(const css_computed_style *style,
1066 css_fixed *length, css_unit *unit)
1067{
1068 uint32_t bits = style->i.bits[COLUMN_RULE_WIDTH_INDEX];
1069 bits &= COLUMN_RULE_WIDTH_MASK;
1070 bits >>= COLUMN_RULE_WIDTH_SHIFT;
1071
1072 /* 8bits: uuuuuttt : unit | type */
1073 if ((bits & 0x7) == CSS_COLUMN_RULE_WIDTH_WIDTH) {
1074 *length = style->i.column_rule_width;
1075 *unit = bits >> 3;
1076 }
1077
1078 return (bits & 0x7);
1079}
1080#undef COLUMN_RULE_WIDTH_INDEX
1081#undef COLUMN_RULE_WIDTH_SHIFT
1082#undef COLUMN_RULE_WIDTH_MASK
1083
1084#define COLUMN_SPAN_INDEX 11
1085#define COLUMN_SPAN_SHIFT 20
1086#define COLUMN_SPAN_MASK 0x300000
1087static inline uint8_t get_column_span_bits(const css_computed_style *style)
1088{
1089 uint32_t bits = style->i.bits[COLUMN_SPAN_INDEX];
1090 bits &= COLUMN_SPAN_MASK;
1091 bits >>= COLUMN_SPAN_SHIFT;
1092
1093 /* 2bits: tt : type */
1094 return (bits & 0x3);
1095}
1096static inline uint8_t get_column_span(const css_computed_style *style)
1097{
1098 uint32_t bits = style->i.bits[COLUMN_SPAN_INDEX];
1099 bits &= COLUMN_SPAN_MASK;
1100 bits >>= COLUMN_SPAN_SHIFT;
1101
1102 /* 2bits: tt : type */
1103
1104 return (bits & 0x3);
1105}
1106#undef COLUMN_SPAN_INDEX
1107#undef COLUMN_SPAN_SHIFT
1108#undef COLUMN_SPAN_MASK
1109
1110#define COLUMN_WIDTH_INDEX 3
1111#define COLUMN_WIDTH_SHIFT 25
1112#define COLUMN_WIDTH_MASK 0xfe000000
1113static inline uint8_t get_column_width_bits(const css_computed_style *style)
1114{
1115 uint32_t bits = style->i.bits[COLUMN_WIDTH_INDEX];
1116 bits &= COLUMN_WIDTH_MASK;
1117 bits >>= COLUMN_WIDTH_SHIFT;
1118
1119 /* 7bits: uuuuutt : unit | type */
1120 return (bits & 0x3);
1121}
1122static inline uint8_t get_column_width(const css_computed_style *style,
1123 css_fixed *length, css_unit *unit)
1124{
1125 uint32_t bits = style->i.bits[COLUMN_WIDTH_INDEX];
1126 bits &= COLUMN_WIDTH_MASK;
1127 bits >>= COLUMN_WIDTH_SHIFT;
1128
1129 /* 7bits: uuuuutt : unit | type */
1130 if ((bits & 0x3) == CSS_COLUMN_WIDTH_SET) {
1131 *length = style->i.column_width;
1132 *unit = bits >> 2;
1133 }
1134
1135 return (bits & 0x3);
1136}
1137#undef COLUMN_WIDTH_INDEX
1138#undef COLUMN_WIDTH_SHIFT
1139#undef COLUMN_WIDTH_MASK
1140
1141#define CONTENT_INDEX 11
1142#define CONTENT_SHIFT 22
1143#define CONTENT_MASK 0xc00000
1144static inline uint8_t get_content_bits(const css_computed_style *style)
1145{
1146 uint32_t bits = style->i.bits[CONTENT_INDEX];
1147 bits &= CONTENT_MASK;
1148 bits >>= CONTENT_SHIFT;
1149
1150 /* 2bits: tt : type */
1151 return (bits & 0x3);
1152}
1153static inline uint8_t get_content(const css_computed_style *style, const
1154 css_computed_content_item **content_item)
1155{
1156 uint32_t bits = style->i.bits[CONTENT_INDEX];
1157 bits &= CONTENT_MASK;
1158 bits >>= CONTENT_SHIFT;
1159
1160 /* 2bits: tt : type */
1161 if ((bits & 0x3) == CSS_CONTENT_SET) {
1162 *content_item = style->content;
1163 }
1164
1165 return (bits & 0x3);
1166}
1167#undef CONTENT_INDEX
1168#undef CONTENT_SHIFT
1169#undef CONTENT_MASK
1170
1171#define COUNTER_INCREMENT_INDEX 14
1172#define COUNTER_INCREMENT_SHIFT 18
1173#define COUNTER_INCREMENT_MASK 0x40000
1174static inline uint8_t get_counter_increment_bits(const css_computed_style
1175 *style)
1176{
1177 uint32_t bits = style->i.bits[COUNTER_INCREMENT_INDEX];
1178 bits &= COUNTER_INCREMENT_MASK;
1179 bits >>= COUNTER_INCREMENT_SHIFT;
1180
1181 /* 1bit: t : type */
1182 return (bits & 0x1);
1183}
1184static inline uint8_t get_counter_increment(const css_computed_style *style,
1185 const css_computed_counter **counter_arr)
1186{
1187 uint32_t bits = style->i.bits[COUNTER_INCREMENT_INDEX];
1188 bits &= COUNTER_INCREMENT_MASK;
1189 bits >>= COUNTER_INCREMENT_SHIFT;
1190
1191 /* 1bit: t : type */
1192 *counter_arr = style->counter_increment;
1193
1194 return (bits & 0x1);
1195}
1196#undef COUNTER_INCREMENT_INDEX
1197#undef COUNTER_INCREMENT_SHIFT
1198#undef COUNTER_INCREMENT_MASK
1199
1200#define COUNTER_RESET_INDEX 14
1201#define COUNTER_RESET_SHIFT 19
1202#define COUNTER_RESET_MASK 0x80000
1203static inline uint8_t get_counter_reset_bits(const css_computed_style *style)
1204{
1205 uint32_t bits = style->i.bits[COUNTER_RESET_INDEX];
1206 bits &= COUNTER_RESET_MASK;
1207 bits >>= COUNTER_RESET_SHIFT;
1208
1209 /* 1bit: t : type */
1210 return (bits & 0x1);
1211}
1212static inline uint8_t get_counter_reset(const css_computed_style *style, const
1213 css_computed_counter **counter_arr)
1214{
1215 uint32_t bits = style->i.bits[COUNTER_RESET_INDEX];
1216 bits &= COUNTER_RESET_MASK;
1217 bits >>= COUNTER_RESET_SHIFT;
1218
1219 /* 1bit: t : type */
1220 *counter_arr = style->counter_reset;
1221
1222 return (bits & 0x1);
1223}
1224#undef COUNTER_RESET_INDEX
1225#undef COUNTER_RESET_SHIFT
1226#undef COUNTER_RESET_MASK
1227
1228#define CURSOR_INDEX 9
1229#define CURSOR_SHIFT 27
1230#define CURSOR_MASK 0xf8000000
1231static inline uint8_t get_cursor_bits(const css_computed_style *style)
1232{
1233 uint32_t bits = style->i.bits[CURSOR_INDEX];
1234 bits &= CURSOR_MASK;
1235 bits >>= CURSOR_SHIFT;
1236
1237 /* 5bits: ttttt : type */
1238 return (bits & 0x1f);
1239}
1240static inline uint8_t get_cursor(const css_computed_style *style, lwc_string
1241 ***string_arr)
1242{
1243 uint32_t bits = style->i.bits[CURSOR_INDEX];
1244 bits &= CURSOR_MASK;
1245 bits >>= CURSOR_SHIFT;
1246
1247 /* 5bits: ttttt : type */
1248 *string_arr = style->cursor;
1249
1250 return (bits & 0x1f);
1251}
1252#undef CURSOR_INDEX
1253#undef CURSOR_SHIFT
1254#undef CURSOR_MASK
1255
1256#define DIRECTION_INDEX 11
1257#define DIRECTION_SHIFT 24
1258#define DIRECTION_MASK 0x3000000
1259static inline uint8_t get_direction_bits(const css_computed_style *style)
1260{
1261 uint32_t bits = style->i.bits[DIRECTION_INDEX];
1262 bits &= DIRECTION_MASK;
1263 bits >>= DIRECTION_SHIFT;
1264
1265 /* 2bits: tt : type */
1266 return (bits & 0x3);
1267}
1268static inline uint8_t get_direction(const css_computed_style *style)
1269{
1270 uint32_t bits = style->i.bits[DIRECTION_INDEX];
1271 bits &= DIRECTION_MASK;
1272 bits >>= DIRECTION_SHIFT;
1273
1274 /* 2bits: tt : type */
1275
1276 return (bits & 0x3);
1277}
1278#undef DIRECTION_INDEX
1279#undef DIRECTION_SHIFT
1280#undef DIRECTION_MASK
1281
1282#define DISPLAY_INDEX 8
1283#define DISPLAY_SHIFT 3
1284#define DISPLAY_MASK 0xf8
1285static inline uint8_t get_display_bits(const css_computed_style *style)
1286{
1287 uint32_t bits = style->i.bits[DISPLAY_INDEX];
1288 bits &= DISPLAY_MASK;
1289 bits >>= DISPLAY_SHIFT;
1290
1291 /* 5bits: ttttt : type */
1292 return (bits & 0x1f);
1293}
1294static inline uint8_t get_display(const css_computed_style *style)
1295{
1296 uint32_t bits = style->i.bits[DISPLAY_INDEX];
1297 bits &= DISPLAY_MASK;
1298 bits >>= DISPLAY_SHIFT;
1299
1300 /* 5bits: ttttt : type */
1301
1302 return (bits & 0x1f);
1303}
1304#undef DISPLAY_INDEX
1305#undef DISPLAY_SHIFT
1306#undef DISPLAY_MASK
1307
1308#define EMPTY_CELLS_INDEX 11
1309#define EMPTY_CELLS_SHIFT 26
1310#define EMPTY_CELLS_MASK 0xc000000
1311static inline uint8_t get_empty_cells_bits(const css_computed_style *style)
1312{
1313 uint32_t bits = style->i.bits[EMPTY_CELLS_INDEX];
1314 bits &= EMPTY_CELLS_MASK;
1315 bits >>= EMPTY_CELLS_SHIFT;
1316
1317 /* 2bits: tt : type */
1318 return (bits & 0x3);
1319}
1320static inline uint8_t get_empty_cells(const css_computed_style *style)
1321{
1322 uint32_t bits = style->i.bits[EMPTY_CELLS_INDEX];
1323 bits &= EMPTY_CELLS_MASK;
1324 bits >>= EMPTY_CELLS_SHIFT;
1325
1326 /* 2bits: tt : type */
1327
1328 return (bits & 0x3);
1329}
1330#undef EMPTY_CELLS_INDEX
1331#undef EMPTY_CELLS_SHIFT
1332#undef EMPTY_CELLS_MASK
1333
1334#define FILL_OPACITY_INDEX 14
1335#define FILL_OPACITY_SHIFT 20
1336#define FILL_OPACITY_MASK 0x100000
1337static inline uint8_t get_fill_opacity_bits(const css_computed_style *style)
1338{
1339 uint32_t bits = style->i.bits[FILL_OPACITY_INDEX];
1340 bits &= FILL_OPACITY_MASK;
1341 bits >>= FILL_OPACITY_SHIFT;
1342
1343 /* 1bit: t : type */
1344 return (bits & 0x1);
1345}
1346static inline uint8_t get_fill_opacity(const css_computed_style *style,
1347 css_fixed *fixed)
1348{
1349 uint32_t bits = style->i.bits[FILL_OPACITY_INDEX];
1350 bits &= FILL_OPACITY_MASK;
1351 bits >>= FILL_OPACITY_SHIFT;
1352
1353 /* 1bit: t : type */
1354 if ((bits & 0x1) == CSS_FILL_OPACITY_SET) {
1355 *fixed = style->i.fill_opacity;
1356 }
1357
1358 return (bits & 0x1);
1359}
1360#undef FILL_OPACITY_INDEX
1361#undef FILL_OPACITY_SHIFT
1362#undef FILL_OPACITY_MASK
1363
1364#define FLEX_BASIS_INDEX 7
1365#define FLEX_BASIS_SHIFT 4
1366#define FLEX_BASIS_MASK 0x7f0
1367static inline uint8_t get_flex_basis_bits(const css_computed_style *style)
1368{
1369 uint32_t bits = style->i.bits[FLEX_BASIS_INDEX];
1370 bits &= FLEX_BASIS_MASK;
1371 bits >>= FLEX_BASIS_SHIFT;
1372
1373 /* 7bits: uuuuutt : unit | type */
1374 return (bits & 0x3);
1375}
1376static inline uint8_t get_flex_basis(const css_computed_style *style, css_fixed
1377 *length, css_unit *unit)
1378{
1379 uint32_t bits = style->i.bits[FLEX_BASIS_INDEX];
1380 bits &= FLEX_BASIS_MASK;
1381 bits >>= FLEX_BASIS_SHIFT;
1382
1383 /* 7bits: uuuuutt : unit | type */
1384 if ((bits & 0x3) == CSS_FLEX_BASIS_SET) {
1385 *length = style->i.flex_basis;
1386 *unit = bits >> 2;
1387 }
1388
1389 return (bits & 0x3);
1390}
1391#undef FLEX_BASIS_INDEX
1392#undef FLEX_BASIS_SHIFT
1393#undef FLEX_BASIS_MASK
1394
1395#define FLEX_DIRECTION_INDEX 13
1396#define FLEX_DIRECTION_SHIFT 4
1397#define FLEX_DIRECTION_MASK 0x70
1398static inline uint8_t get_flex_direction_bits(const css_computed_style *style)
1399{
1400 uint32_t bits = style->i.bits[FLEX_DIRECTION_INDEX];
1401 bits &= FLEX_DIRECTION_MASK;
1402 bits >>= FLEX_DIRECTION_SHIFT;
1403
1404 /* 3bits: ttt : type */
1405 return (bits & 0x7);
1406}
1407static inline uint8_t get_flex_direction(const css_computed_style *style)
1408{
1409 uint32_t bits = style->i.bits[FLEX_DIRECTION_INDEX];
1410 bits &= FLEX_DIRECTION_MASK;
1411 bits >>= FLEX_DIRECTION_SHIFT;
1412
1413 /* 3bits: ttt : type */
1414
1415 return (bits & 0x7);
1416}
1417#undef FLEX_DIRECTION_INDEX
1418#undef FLEX_DIRECTION_SHIFT
1419#undef FLEX_DIRECTION_MASK
1420
1421#define FLEX_GROW_INDEX 14
1422#define FLEX_GROW_SHIFT 21
1423#define FLEX_GROW_MASK 0x200000
1424static inline uint8_t get_flex_grow_bits(const css_computed_style *style)
1425{
1426 uint32_t bits = style->i.bits[FLEX_GROW_INDEX];
1427 bits &= FLEX_GROW_MASK;
1428 bits >>= FLEX_GROW_SHIFT;
1429
1430 /* 1bit: t : type */
1431 return (bits & 0x1);
1432}
1433static inline uint8_t get_flex_grow(const css_computed_style *style, css_fixed
1434 *fixed)
1435{
1436 uint32_t bits = style->i.bits[FLEX_GROW_INDEX];
1437 bits &= FLEX_GROW_MASK;
1438 bits >>= FLEX_GROW_SHIFT;
1439
1440 /* 1bit: t : type */
1441 if ((bits & 0x1) == CSS_FLEX_GROW_SET) {
1442 *fixed = style->i.flex_grow;
1443 }
1444
1445 return (bits & 0x1);
1446}
1447#undef FLEX_GROW_INDEX
1448#undef FLEX_GROW_SHIFT
1449#undef FLEX_GROW_MASK
1450
1451#define FLEX_SHRINK_INDEX 14
1452#define FLEX_SHRINK_SHIFT 22
1453#define FLEX_SHRINK_MASK 0x400000
1454static inline uint8_t get_flex_shrink_bits(const css_computed_style *style)
1455{
1456 uint32_t bits = style->i.bits[FLEX_SHRINK_INDEX];
1457 bits &= FLEX_SHRINK_MASK;
1458 bits >>= FLEX_SHRINK_SHIFT;
1459
1460 /* 1bit: t : type */
1461 return (bits & 0x1);
1462}
1463static inline uint8_t get_flex_shrink(const css_computed_style *style,
1464 css_fixed *fixed)
1465{
1466 uint32_t bits = style->i.bits[FLEX_SHRINK_INDEX];
1467 bits &= FLEX_SHRINK_MASK;
1468 bits >>= FLEX_SHRINK_SHIFT;
1469
1470 /* 1bit: t : type */
1471 if ((bits & 0x1) == CSS_FLEX_SHRINK_SET) {
1472 *fixed = style->i.flex_shrink;
1473 }
1474
1475 return (bits & 0x1);
1476}
1477#undef FLEX_SHRINK_INDEX
1478#undef FLEX_SHRINK_SHIFT
1479#undef FLEX_SHRINK_MASK
1480
1481#define FLEX_WRAP_INDEX 11
1482#define FLEX_WRAP_SHIFT 28
1483#define FLEX_WRAP_MASK 0x30000000
1484static inline uint8_t get_flex_wrap_bits(const css_computed_style *style)
1485{
1486 uint32_t bits = style->i.bits[FLEX_WRAP_INDEX];
1487 bits &= FLEX_WRAP_MASK;
1488 bits >>= FLEX_WRAP_SHIFT;
1489
1490 /* 2bits: tt : type */
1491 return (bits & 0x3);
1492}
1493static inline uint8_t get_flex_wrap(const css_computed_style *style)
1494{
1495 uint32_t bits = style->i.bits[FLEX_WRAP_INDEX];
1496 bits &= FLEX_WRAP_MASK;
1497 bits >>= FLEX_WRAP_SHIFT;
1498
1499 /* 2bits: tt : type */
1500
1501 return (bits & 0x3);
1502}
1503#undef FLEX_WRAP_INDEX
1504#undef FLEX_WRAP_SHIFT
1505#undef FLEX_WRAP_MASK
1506
1507#define FLOAT_INDEX 11
1508#define FLOAT_SHIFT 30
1509#define FLOAT_MASK 0xc0000000
1510static inline uint8_t get_float_bits(const css_computed_style *style)
1511{
1512 uint32_t bits = style->i.bits[FLOAT_INDEX];
1513 bits &= FLOAT_MASK;
1514 bits >>= FLOAT_SHIFT;
1515
1516 /* 2bits: tt : type */
1517 return (bits & 0x3);
1518}
1519static inline uint8_t get_float(const css_computed_style *style)
1520{
1521 uint32_t bits = style->i.bits[FLOAT_INDEX];
1522 bits &= FLOAT_MASK;
1523 bits >>= FLOAT_SHIFT;
1524
1525 /* 2bits: tt : type */
1526
1527 return (bits & 0x3);
1528}
1529#undef FLOAT_INDEX
1530#undef FLOAT_SHIFT
1531#undef FLOAT_MASK
1532
1533#define FONT_FAMILY_INDEX 13
1534#define FONT_FAMILY_SHIFT 7
1535#define FONT_FAMILY_MASK 0x380
1536static inline uint8_t get_font_family_bits(const css_computed_style *style)
1537{
1538 uint32_t bits = style->i.bits[FONT_FAMILY_INDEX];
1539 bits &= FONT_FAMILY_MASK;
1540 bits >>= FONT_FAMILY_SHIFT;
1541
1542 /* 3bits: ttt : type */
1543 return (bits & 0x7);
1544}
1545static inline uint8_t get_font_family(const css_computed_style *style,
1546 lwc_string ***string_arr)
1547{
1548 uint32_t bits = style->i.bits[FONT_FAMILY_INDEX];
1549 bits &= FONT_FAMILY_MASK;
1550 bits >>= FONT_FAMILY_SHIFT;
1551
1552 /* 3bits: ttt : type */
1553 *string_arr = style->font_family;
1554
1555 return (bits & 0x7);
1556}
1557#undef FONT_FAMILY_INDEX
1558#undef FONT_FAMILY_SHIFT
1559#undef FONT_FAMILY_MASK
1560
1561#define FONT_SIZE_INDEX 1
1562#define FONT_SIZE_SHIFT 23
1563#define FONT_SIZE_MASK 0xff800000
1564static inline uint8_t get_font_size_bits(const css_computed_style *style)
1565{
1566 uint32_t bits = style->i.bits[FONT_SIZE_INDEX];
1567 bits &= FONT_SIZE_MASK;
1568 bits >>= FONT_SIZE_SHIFT;
1569
1570 /* 9bits: uuuuutttt : unit | type */
1571 return (bits & 0xf);
1572}
1573static inline uint8_t get_font_size(const css_computed_style *style, css_fixed
1574 *length, css_unit *unit)
1575{
1576 uint32_t bits = style->i.bits[FONT_SIZE_INDEX];
1577 bits &= FONT_SIZE_MASK;
1578 bits >>= FONT_SIZE_SHIFT;
1579
1580 /* 9bits: uuuuutttt : unit | type */
1581 if ((bits & 0xf) == CSS_FONT_SIZE_DIMENSION) {
1582 *length = style->i.font_size;
1583 *unit = bits >> 4;
1584 }
1585
1586 return (bits & 0xf);
1587}
1588#undef FONT_SIZE_INDEX
1589#undef FONT_SIZE_SHIFT
1590#undef FONT_SIZE_MASK
1591
1592#define FONT_STYLE_INDEX 10
1593#define FONT_STYLE_SHIFT 0
1594#define FONT_STYLE_MASK 0x3
1595static inline uint8_t get_font_style_bits(const css_computed_style *style)
1596{
1597 uint32_t bits = style->i.bits[FONT_STYLE_INDEX];
1598 bits &= FONT_STYLE_MASK;
1599 bits >>= FONT_STYLE_SHIFT;
1600
1601 /* 2bits: tt : type */
1602 return (bits & 0x3);
1603}
1604static inline uint8_t get_font_style(const css_computed_style *style)
1605{
1606 uint32_t bits = style->i.bits[FONT_STYLE_INDEX];
1607 bits &= FONT_STYLE_MASK;
1608 bits >>= FONT_STYLE_SHIFT;
1609
1610 /* 2bits: tt : type */
1611
1612 return (bits & 0x3);
1613}
1614#undef FONT_STYLE_INDEX
1615#undef FONT_STYLE_SHIFT
1616#undef FONT_STYLE_MASK
1617
1618#define FONT_VARIANT_INDEX 10
1619#define FONT_VARIANT_SHIFT 2
1620#define FONT_VARIANT_MASK 0xc
1621static inline uint8_t get_font_variant_bits(const css_computed_style *style)
1622{
1623 uint32_t bits = style->i.bits[FONT_VARIANT_INDEX];
1624 bits &= FONT_VARIANT_MASK;
1625 bits >>= FONT_VARIANT_SHIFT;
1626
1627 /* 2bits: tt : type */
1628 return (bits & 0x3);
1629}
1630static inline uint8_t get_font_variant(const css_computed_style *style)
1631{
1632 uint32_t bits = style->i.bits[FONT_VARIANT_INDEX];
1633 bits &= FONT_VARIANT_MASK;
1634 bits >>= FONT_VARIANT_SHIFT;
1635
1636 /* 2bits: tt : type */
1637
1638 return (bits & 0x3);
1639}
1640#undef FONT_VARIANT_INDEX
1641#undef FONT_VARIANT_SHIFT
1642#undef FONT_VARIANT_MASK
1643
1644#define FONT_WEIGHT_INDEX 6
1645#define FONT_WEIGHT_SHIFT 0
1646#define FONT_WEIGHT_MASK 0xf
1647static inline uint8_t get_font_weight_bits(const css_computed_style *style)
1648{
1649 uint32_t bits = style->i.bits[FONT_WEIGHT_INDEX];
1650 bits &= FONT_WEIGHT_MASK;
1651 bits >>= FONT_WEIGHT_SHIFT;
1652
1653 /* 4bits: tttt : type */
1654 return (bits & 0xf);
1655}
1656static inline uint8_t get_font_weight(const css_computed_style *style)
1657{
1658 uint32_t bits = style->i.bits[FONT_WEIGHT_INDEX];
1659 bits &= FONT_WEIGHT_MASK;
1660 bits >>= FONT_WEIGHT_SHIFT;
1661
1662 /* 4bits: tttt : type */
1663
1664 return (bits & 0xf);
1665}
1666#undef FONT_WEIGHT_INDEX
1667#undef FONT_WEIGHT_SHIFT
1668#undef FONT_WEIGHT_MASK
1669
1670#define HEIGHT_INDEX 7
1671#define HEIGHT_SHIFT 11
1672#define HEIGHT_MASK 0x3f800
1673static inline uint8_t get_height_bits(const css_computed_style *style)
1674{
1675 uint32_t bits = style->i.bits[HEIGHT_INDEX];
1676 bits &= HEIGHT_MASK;
1677 bits >>= HEIGHT_SHIFT;
1678
1679 /* 7bits: uuuuutt : unit | type */
1680 return (bits & 0x3);
1681}
1682static inline uint8_t get_height(const css_computed_style *style, css_fixed
1683 *length, css_unit *unit)
1684{
1685 uint32_t bits = style->i.bits[HEIGHT_INDEX];
1686 bits &= HEIGHT_MASK;
1687 bits >>= HEIGHT_SHIFT;
1688
1689 /* 7bits: uuuuutt : unit | type */
1690 if ((bits & 0x3) == CSS_HEIGHT_SET) {
1691 *length = style->i.height;
1692 *unit = bits >> 2;
1693 }
1694
1695 return (bits & 0x3);
1696}
1697#undef HEIGHT_INDEX
1698#undef HEIGHT_SHIFT
1699#undef HEIGHT_MASK
1700
1701#define JUSTIFY_CONTENT_INDEX 13
1702#define JUSTIFY_CONTENT_SHIFT 10
1703#define JUSTIFY_CONTENT_MASK 0x1c00
1704static inline uint8_t get_justify_content_bits(const css_computed_style *style)
1705{
1706 uint32_t bits = style->i.bits[JUSTIFY_CONTENT_INDEX];
1707 bits &= JUSTIFY_CONTENT_MASK;
1708 bits >>= JUSTIFY_CONTENT_SHIFT;
1709
1710 /* 3bits: ttt : type */
1711 return (bits & 0x7);
1712}
1713static inline uint8_t get_justify_content(const css_computed_style *style)
1714{
1715 uint32_t bits = style->i.bits[JUSTIFY_CONTENT_INDEX];
1716 bits &= JUSTIFY_CONTENT_MASK;
1717 bits >>= JUSTIFY_CONTENT_SHIFT;
1718
1719 /* 3bits: ttt : type */
1720
1721 return (bits & 0x7);
1722}
1723#undef JUSTIFY_CONTENT_INDEX
1724#undef JUSTIFY_CONTENT_SHIFT
1725#undef JUSTIFY_CONTENT_MASK
1726
1727#define LEFT_INDEX 7
1728#define LEFT_SHIFT 18
1729#define LEFT_MASK 0x1fc0000
1730static inline uint8_t get_left_bits(const css_computed_style *style)
1731{
1732 uint32_t bits = style->i.bits[LEFT_INDEX];
1733 bits &= LEFT_MASK;
1734 bits >>= LEFT_SHIFT;
1735
1736 /* 7bits: uuuuutt : unit | type */
1737 return (bits & 0x3);
1738}
1739static inline uint8_t get_left(const css_computed_style *style, css_fixed
1740 *length, css_unit *unit)
1741{
1742 uint32_t bits = style->i.bits[LEFT_INDEX];
1743 bits &= LEFT_MASK;
1744 bits >>= LEFT_SHIFT;
1745
1746 /* 7bits: uuuuutt : unit | type */
1747 if ((bits & 0x3) == CSS_LEFT_SET) {
1748 *length = style->i.left;
1749 *unit = bits >> 2;
1750 }
1751
1752 return (bits & 0x3);
1753}
1754#undef LEFT_INDEX
1755#undef LEFT_SHIFT
1756#undef LEFT_MASK
1757
1758#define LETTER_SPACING_INDEX 7
1759#define LETTER_SPACING_SHIFT 25
1760#define LETTER_SPACING_MASK 0xfe000000
1761static inline uint8_t get_letter_spacing_bits(const css_computed_style *style)
1762{
1763 uint32_t bits = style->i.bits[LETTER_SPACING_INDEX];
1764 bits &= LETTER_SPACING_MASK;
1765 bits >>= LETTER_SPACING_SHIFT;
1766
1767 /* 7bits: uuuuutt : unit | type */
1768 return (bits & 0x3);
1769}
1770static inline uint8_t get_letter_spacing(const css_computed_style *style,
1771 css_fixed *length, css_unit *unit)
1772{
1773 uint32_t bits = style->i.bits[LETTER_SPACING_INDEX];
1774 bits &= LETTER_SPACING_MASK;
1775 bits >>= LETTER_SPACING_SHIFT;
1776
1777 /* 7bits: uuuuutt : unit | type */
1778 if ((bits & 0x3) == CSS_LETTER_SPACING_SET) {
1779 *length = style->i.letter_spacing;
1780 *unit = bits >> 2;
1781 }
1782
1783 return (bits & 0x3);
1784}
1785#undef LETTER_SPACING_INDEX
1786#undef LETTER_SPACING_SHIFT
1787#undef LETTER_SPACING_MASK
1788
1789#define LINE_HEIGHT_INDEX 6
1790#define LINE_HEIGHT_SHIFT 4
1791#define LINE_HEIGHT_MASK 0x7f0
1792static inline uint8_t get_line_height_bits(const css_computed_style *style)
1793{
1794 uint32_t bits = style->i.bits[LINE_HEIGHT_INDEX];
1795 bits &= LINE_HEIGHT_MASK;
1796 bits >>= LINE_HEIGHT_SHIFT;
1797
1798 /* 7bits: uuuuutt : unit | type */
1799 return (bits & 0x3);
1800}
1801static inline uint8_t get_line_height(
1802 const css_computed_style *style,
1803 css_fixed *length, css_unit *unit)
1804{
1805 uint32_t bits = style->i.bits[LINE_HEIGHT_INDEX];
1806 bits &= LINE_HEIGHT_MASK;
1807 bits >>= LINE_HEIGHT_SHIFT;
1808
1809 /* 7bits: uuuuutt : units | type */
1810 if ((bits & 0x3) == CSS_LINE_HEIGHT_NUMBER ||
1811 (bits & 0x3) == CSS_LINE_HEIGHT_DIMENSION) {
1812 *length = style->i.line_height;
1813 }
1814
1815 if ((bits & 0x3) == CSS_LINE_HEIGHT_DIMENSION) {
1816 *unit = bits >> 2;
1817 }
1818
1819 return (bits & 0x3);
1820}
1821#undef LINE_HEIGHT_INDEX
1822#undef LINE_HEIGHT_SHIFT
1823#undef LINE_HEIGHT_MASK
1824
1825#define LIST_STYLE_IMAGE_INDEX 14
1826#define LIST_STYLE_IMAGE_SHIFT 23
1827#define LIST_STYLE_IMAGE_MASK 0x800000
1828static inline uint8_t get_list_style_image_bits(const css_computed_style *style)
1829{
1830 uint32_t bits = style->i.bits[LIST_STYLE_IMAGE_INDEX];
1831 bits &= LIST_STYLE_IMAGE_MASK;
1832 bits >>= LIST_STYLE_IMAGE_SHIFT;
1833
1834 /* 1bit: t : type */
1835 return (bits & 0x1);
1836}
1837static inline uint8_t get_list_style_image(const css_computed_style *style,
1838 lwc_string **string)
1839{
1840 uint32_t bits = style->i.bits[LIST_STYLE_IMAGE_INDEX];
1841 bits &= LIST_STYLE_IMAGE_MASK;
1842 bits >>= LIST_STYLE_IMAGE_SHIFT;
1843
1844 /* 1bit: t : type */
1845 *string = style->i.list_style_image;
1846
1847 return (bits & 0x1);
1848}
1849#undef LIST_STYLE_IMAGE_INDEX
1850#undef LIST_STYLE_IMAGE_SHIFT
1851#undef LIST_STYLE_IMAGE_MASK
1852
1853#define LIST_STYLE_POSITION_INDEX 10
1854#define LIST_STYLE_POSITION_SHIFT 4
1855#define LIST_STYLE_POSITION_MASK 0x30
1856static inline uint8_t get_list_style_position_bits(const css_computed_style
1857 *style)
1858{
1859 uint32_t bits = style->i.bits[LIST_STYLE_POSITION_INDEX];
1862
1863 /* 2bits: tt : type */
1864 return (bits & 0x3);
1865}
1866static inline uint8_t get_list_style_position(const css_computed_style *style)
1867{
1868 uint32_t bits = style->i.bits[LIST_STYLE_POSITION_INDEX];
1871
1872 /* 2bits: tt : type */
1873
1874 return (bits & 0x3);
1875}
1876#undef LIST_STYLE_POSITION_INDEX
1877#undef LIST_STYLE_POSITION_SHIFT
1878#undef LIST_STYLE_POSITION_MASK
1879
1880#define LIST_STYLE_TYPE_INDEX 8
1881#define LIST_STYLE_TYPE_SHIFT 8
1882#define LIST_STYLE_TYPE_MASK 0x3f00
1883static inline uint8_t get_list_style_type_bits(const css_computed_style *style)
1884{
1885 uint32_t bits = style->i.bits[LIST_STYLE_TYPE_INDEX];
1886 bits &= LIST_STYLE_TYPE_MASK;
1887 bits >>= LIST_STYLE_TYPE_SHIFT;
1888
1889 /* 6bits: tttttt : type */
1890 return (bits & 0x3f);
1891}
1892static inline uint8_t get_list_style_type(const css_computed_style *style)
1893{
1894 uint32_t bits = style->i.bits[LIST_STYLE_TYPE_INDEX];
1895 bits &= LIST_STYLE_TYPE_MASK;
1896 bits >>= LIST_STYLE_TYPE_SHIFT;
1897
1898 /* 6bits: tttttt : type */
1899
1900 return (bits & 0x3f);
1901}
1902#undef LIST_STYLE_TYPE_INDEX
1903#undef LIST_STYLE_TYPE_SHIFT
1904#undef LIST_STYLE_TYPE_MASK
1905
1906#define MARGIN_BOTTOM_INDEX 6
1907#define MARGIN_BOTTOM_SHIFT 11
1908#define MARGIN_BOTTOM_MASK 0x3f800
1909static inline uint8_t get_margin_bottom_bits(const css_computed_style *style)
1910{
1911 uint32_t bits = style->i.bits[MARGIN_BOTTOM_INDEX];
1912 bits &= MARGIN_BOTTOM_MASK;
1913 bits >>= MARGIN_BOTTOM_SHIFT;
1914
1915 /* 7bits: uuuuutt : unit | type */
1916 return (bits & 0x3);
1917}
1918static inline uint8_t get_margin_bottom(const css_computed_style *style,
1919 css_fixed *length, css_unit *unit)
1920{
1921 uint32_t bits = style->i.bits[MARGIN_BOTTOM_INDEX];
1922 bits &= MARGIN_BOTTOM_MASK;
1923 bits >>= MARGIN_BOTTOM_SHIFT;
1924
1925 /* 7bits: uuuuutt : unit | type */
1926 if ((bits & 0x3) == CSS_MARGIN_SET) {
1927 *length = style->i.margin_bottom;
1928 *unit = bits >> 2;
1929 }
1930
1931 return (bits & 0x3);
1932}
1933#undef MARGIN_BOTTOM_INDEX
1934#undef MARGIN_BOTTOM_SHIFT
1935#undef MARGIN_BOTTOM_MASK
1936
1937#define MARGIN_LEFT_INDEX 6
1938#define MARGIN_LEFT_SHIFT 18
1939#define MARGIN_LEFT_MASK 0x1fc0000
1940static inline uint8_t get_margin_left_bits(const css_computed_style *style)
1941{
1942 uint32_t bits = style->i.bits[MARGIN_LEFT_INDEX];
1943 bits &= MARGIN_LEFT_MASK;
1944 bits >>= MARGIN_LEFT_SHIFT;
1945
1946 /* 7bits: uuuuutt : unit | type */
1947 return (bits & 0x3);
1948}
1949static inline uint8_t get_margin_left(const css_computed_style *style,
1950 css_fixed *length, css_unit *unit)
1951{
1952 uint32_t bits = style->i.bits[MARGIN_LEFT_INDEX];
1953 bits &= MARGIN_LEFT_MASK;
1954 bits >>= MARGIN_LEFT_SHIFT;
1955
1956 /* 7bits: uuuuutt : unit | type */
1957 if ((bits & 0x3) == CSS_MARGIN_SET) {
1958 *length = style->i.margin_left;
1959 *unit = bits >> 2;
1960 }
1961
1962 return (bits & 0x3);
1963}
1964#undef MARGIN_LEFT_INDEX
1965#undef MARGIN_LEFT_SHIFT
1966#undef MARGIN_LEFT_MASK
1967
1968#define MARGIN_RIGHT_INDEX 6
1969#define MARGIN_RIGHT_SHIFT 25
1970#define MARGIN_RIGHT_MASK 0xfe000000
1971static inline uint8_t get_margin_right_bits(const css_computed_style *style)
1972{
1973 uint32_t bits = style->i.bits[MARGIN_RIGHT_INDEX];
1974 bits &= MARGIN_RIGHT_MASK;
1975 bits >>= MARGIN_RIGHT_SHIFT;
1976
1977 /* 7bits: uuuuutt : unit | type */
1978 return (bits & 0x3);
1979}
1980static inline uint8_t get_margin_right(const css_computed_style *style,
1981 css_fixed *length, css_unit *unit)
1982{
1983 uint32_t bits = style->i.bits[MARGIN_RIGHT_INDEX];
1984 bits &= MARGIN_RIGHT_MASK;
1985 bits >>= MARGIN_RIGHT_SHIFT;
1986
1987 /* 7bits: uuuuutt : unit | type */
1988 if ((bits & 0x3) == CSS_MARGIN_SET) {
1989 *length = style->i.margin_right;
1990 *unit = bits >> 2;
1991 }
1992
1993 return (bits & 0x3);
1994}
1995#undef MARGIN_RIGHT_INDEX
1996#undef MARGIN_RIGHT_SHIFT
1997#undef MARGIN_RIGHT_MASK
1998
1999#define MARGIN_TOP_INDEX 5
2000#define MARGIN_TOP_SHIFT 4
2001#define MARGIN_TOP_MASK 0x7f0
2002static inline uint8_t get_margin_top_bits(const css_computed_style *style)
2003{
2004 uint32_t bits = style->i.bits[MARGIN_TOP_INDEX];
2005 bits &= MARGIN_TOP_MASK;
2006 bits >>= MARGIN_TOP_SHIFT;
2007
2008 /* 7bits: uuuuutt : unit | type */
2009 return (bits & 0x3);
2010}
2011static inline uint8_t get_margin_top(const css_computed_style *style, css_fixed
2012 *length, css_unit *unit)
2013{
2014 uint32_t bits = style->i.bits[MARGIN_TOP_INDEX];
2015 bits &= MARGIN_TOP_MASK;
2016 bits >>= MARGIN_TOP_SHIFT;
2017
2018 /* 7bits: uuuuutt : unit | type */
2019 if ((bits & 0x3) == CSS_MARGIN_SET) {
2020 *length = style->i.margin_top;
2021 *unit = bits >> 2;
2022 }
2023
2024 return (bits & 0x3);
2025}
2026#undef MARGIN_TOP_INDEX
2027#undef MARGIN_TOP_SHIFT
2028#undef MARGIN_TOP_MASK
2029
2030#define MAX_HEIGHT_INDEX 5
2031#define MAX_HEIGHT_SHIFT 11
2032#define MAX_HEIGHT_MASK 0x3f800
2033static inline uint8_t get_max_height_bits(const css_computed_style *style)
2034{
2035 uint32_t bits = style->i.bits[MAX_HEIGHT_INDEX];
2036 bits &= MAX_HEIGHT_MASK;
2037 bits >>= MAX_HEIGHT_SHIFT;
2038
2039 /* 7bits: uuuuutt : unit | type */
2040 return (bits & 0x3);
2041}
2042static inline uint8_t get_max_height(const css_computed_style *style, css_fixed
2043 *length, css_unit *unit)
2044{
2045 uint32_t bits = style->i.bits[MAX_HEIGHT_INDEX];
2046 bits &= MAX_HEIGHT_MASK;
2047 bits >>= MAX_HEIGHT_SHIFT;
2048
2049 /* 7bits: uuuuutt : unit | type */
2050 if ((bits & 0x3) == CSS_MAX_HEIGHT_SET) {
2051 *length = style->i.max_height;
2052 *unit = bits >> 2;
2053 }
2054
2055 return (bits & 0x3);
2056}
2057#undef MAX_HEIGHT_INDEX
2058#undef MAX_HEIGHT_SHIFT
2059#undef MAX_HEIGHT_MASK
2060
2061#define MAX_WIDTH_INDEX 5
2062#define MAX_WIDTH_SHIFT 18
2063#define MAX_WIDTH_MASK 0x1fc0000
2064static inline uint8_t get_max_width_bits(const css_computed_style *style)
2065{
2066 uint32_t bits = style->i.bits[MAX_WIDTH_INDEX];
2067 bits &= MAX_WIDTH_MASK;
2068 bits >>= MAX_WIDTH_SHIFT;
2069
2070 /* 7bits: uuuuutt : unit | type */
2071 return (bits & 0x3);
2072}
2073static inline uint8_t get_max_width(const css_computed_style *style, css_fixed
2074 *length, css_unit *unit)
2075{
2076 uint32_t bits = style->i.bits[MAX_WIDTH_INDEX];
2077 bits &= MAX_WIDTH_MASK;
2078 bits >>= MAX_WIDTH_SHIFT;
2079
2080 /* 7bits: uuuuutt : unit | type */
2081 if ((bits & 0x3) == CSS_MAX_WIDTH_SET) {
2082 *length = style->i.max_width;
2083 *unit = bits >> 2;
2084 }
2085
2086 return (bits & 0x3);
2087}
2088#undef MAX_WIDTH_INDEX
2089#undef MAX_WIDTH_SHIFT
2090#undef MAX_WIDTH_MASK
2091
2092#define MIN_HEIGHT_INDEX 5
2093#define MIN_HEIGHT_SHIFT 25
2094#define MIN_HEIGHT_MASK 0xfe000000
2095static inline uint8_t get_min_height_bits(const css_computed_style *style)
2096{
2097 uint32_t bits = style->i.bits[MIN_HEIGHT_INDEX];
2098 bits &= MIN_HEIGHT_MASK;
2099 bits >>= MIN_HEIGHT_SHIFT;
2100
2101 /* 7bits: uuuuutt : unit | type */
2102 return (bits & 0x3);
2103}
2104static inline uint8_t get_min_height(const css_computed_style *style, css_fixed
2105 *length, css_unit *unit)
2106{
2107 uint32_t bits = style->i.bits[MIN_HEIGHT_INDEX];
2108 bits &= MIN_HEIGHT_MASK;
2109 bits >>= MIN_HEIGHT_SHIFT;
2110
2111 /* 7bits: uuuuutt : unit | type */
2112 if ((bits & 0x3) == CSS_MIN_HEIGHT_SET) {
2113 *length = style->i.min_height;
2114 *unit = bits >> 2;
2115 }
2116
2117 return (bits & 0x3);
2118}
2119#undef MIN_HEIGHT_INDEX
2120#undef MIN_HEIGHT_SHIFT
2121#undef MIN_HEIGHT_MASK
2122
2123#define MIN_WIDTH_INDEX 4
2124#define MIN_WIDTH_SHIFT 4
2125#define MIN_WIDTH_MASK 0x7f0
2126static inline uint8_t get_min_width_bits(const css_computed_style *style)
2127{
2128 uint32_t bits = style->i.bits[MIN_WIDTH_INDEX];
2129 bits &= MIN_WIDTH_MASK;
2130 bits >>= MIN_WIDTH_SHIFT;
2131
2132 /* 7bits: uuuuutt : unit | type */
2133 return (bits & 0x3);
2134}
2135static inline uint8_t get_min_width(const css_computed_style *style, css_fixed
2136 *length, css_unit *unit)
2137{
2138 uint32_t bits = style->i.bits[MIN_WIDTH_INDEX];
2139 bits &= MIN_WIDTH_MASK;
2140 bits >>= MIN_WIDTH_SHIFT;
2141
2142 /* 7bits: uuuuutt : unit | type */
2143 if ((bits & 0x3) == CSS_MIN_WIDTH_SET) {
2144 *length = style->i.min_width;
2145 *unit = bits >> 2;
2146 }
2147
2148 return (bits & 0x3);
2149}
2150#undef MIN_WIDTH_INDEX
2151#undef MIN_WIDTH_SHIFT
2152#undef MIN_WIDTH_MASK
2153
2154#define OPACITY_INDEX 14
2155#define OPACITY_SHIFT 24
2156#define OPACITY_MASK 0x1000000
2157static inline uint8_t get_opacity_bits(const css_computed_style *style)
2158{
2159 uint32_t bits = style->i.bits[OPACITY_INDEX];
2160 bits &= OPACITY_MASK;
2161 bits >>= OPACITY_SHIFT;
2162
2163 /* 1bit: t : type */
2164 return (bits & 0x1);
2165}
2166static inline uint8_t get_opacity(const css_computed_style *style, css_fixed
2167 *fixed)
2168{
2169 uint32_t bits = style->i.bits[OPACITY_INDEX];
2170 bits &= OPACITY_MASK;
2171 bits >>= OPACITY_SHIFT;
2172
2173 /* 1bit: t : type */
2174 if ((bits & 0x1) == CSS_OPACITY_SET) {
2175 *fixed = style->i.opacity;
2176 }
2177
2178 return (bits & 0x1);
2179}
2180#undef OPACITY_INDEX
2181#undef OPACITY_SHIFT
2182#undef OPACITY_MASK
2183
2184#define ORDER_INDEX 14
2185#define ORDER_SHIFT 25
2186#define ORDER_MASK 0x2000000
2187static inline uint8_t get_order_bits(const css_computed_style *style)
2188{
2189 uint32_t bits = style->i.bits[ORDER_INDEX];
2190 bits &= ORDER_MASK;
2191 bits >>= ORDER_SHIFT;
2192
2193 /* 1bit: t : type */
2194 return (bits & 0x1);
2195}
2196static inline uint8_t get_order(const css_computed_style *style, int32_t
2197 *integer)
2198{
2199 uint32_t bits = style->i.bits[ORDER_INDEX];
2200 bits &= ORDER_MASK;
2201 bits >>= ORDER_SHIFT;
2202
2203 /* 1bit: t : type */
2204 if ((bits & 0x1) == CSS_ORDER_SET) {
2205 *integer = style->i.order;
2206 }
2207
2208 return (bits & 0x1);
2209}
2210#undef ORDER_INDEX
2211#undef ORDER_SHIFT
2212#undef ORDER_MASK
2213
2214#define ORPHANS_INDEX 14
2215#define ORPHANS_SHIFT 26
2216#define ORPHANS_MASK 0x4000000
2217static inline uint8_t get_orphans_bits(const css_computed_style *style)
2218{
2219 uint32_t bits = style->i.bits[ORPHANS_INDEX];
2220 bits &= ORPHANS_MASK;
2221 bits >>= ORPHANS_SHIFT;
2222
2223 /* 1bit: t : type */
2224 return (bits & 0x1);
2225}
2226static inline uint8_t get_orphans(const css_computed_style *style, int32_t
2227 *integer)
2228{
2229 uint32_t bits = style->i.bits[ORPHANS_INDEX];
2230 bits &= ORPHANS_MASK;
2231 bits >>= ORPHANS_SHIFT;
2232
2233 /* 1bit: t : type */
2234 *integer = style->i.orphans;
2235
2236 return (bits & 0x1);
2237}
2238#undef ORPHANS_INDEX
2239#undef ORPHANS_SHIFT
2240#undef ORPHANS_MASK
2241
2242#define OUTLINE_COLOR_INDEX 10
2243#define OUTLINE_COLOR_SHIFT 6
2244#define OUTLINE_COLOR_MASK 0xc0
2245static inline uint8_t get_outline_color_bits(const css_computed_style *style)
2246{
2247 uint32_t bits = style->i.bits[OUTLINE_COLOR_INDEX];
2248 bits &= OUTLINE_COLOR_MASK;
2249 bits >>= OUTLINE_COLOR_SHIFT;
2250
2251 /* 2bits: tt : type */
2252 return (bits & 0x3);
2253}
2254static inline uint8_t get_outline_color(const css_computed_style *style,
2255 css_color *color)
2256{
2257 uint32_t bits = style->i.bits[OUTLINE_COLOR_INDEX];
2258 bits &= OUTLINE_COLOR_MASK;
2259 bits >>= OUTLINE_COLOR_SHIFT;
2260
2261 /* 2bits: tt : type */
2262 if ((bits & 0x3) == CSS_OUTLINE_COLOR_COLOR) {
2263 *color = style->i.outline_color;
2264 }
2265
2266 return (bits & 0x3);
2267}
2268#undef OUTLINE_COLOR_INDEX
2269#undef OUTLINE_COLOR_SHIFT
2270#undef OUTLINE_COLOR_MASK
2271
2272#define OUTLINE_STYLE_INDEX 5
2273#define OUTLINE_STYLE_SHIFT 0
2274#define OUTLINE_STYLE_MASK 0xf
2275static inline uint8_t get_outline_style_bits(const css_computed_style *style)
2276{
2277 uint32_t bits = style->i.bits[OUTLINE_STYLE_INDEX];
2278 bits &= OUTLINE_STYLE_MASK;
2279 bits >>= OUTLINE_STYLE_SHIFT;
2280
2281 /* 4bits: tttt : type */
2282 return (bits & 0xf);
2283}
2284static inline uint8_t get_outline_style(const css_computed_style *style)
2285{
2286 uint32_t bits = style->i.bits[OUTLINE_STYLE_INDEX];
2287 bits &= OUTLINE_STYLE_MASK;
2288 bits >>= OUTLINE_STYLE_SHIFT;
2289
2290 /* 4bits: tttt : type */
2291
2292 return (bits & 0xf);
2293}
2294#undef OUTLINE_STYLE_INDEX
2295#undef OUTLINE_STYLE_SHIFT
2296#undef OUTLINE_STYLE_MASK
2297
2298#define OUTLINE_WIDTH_INDEX 1
2299#define OUTLINE_WIDTH_SHIFT 15
2300#define OUTLINE_WIDTH_MASK 0x7f8000
2301static inline uint8_t get_outline_width_bits(const css_computed_style *style)
2302{
2303 uint32_t bits = style->i.bits[OUTLINE_WIDTH_INDEX];
2304 bits &= OUTLINE_WIDTH_MASK;
2305 bits >>= OUTLINE_WIDTH_SHIFT;
2306
2307 /* 8bits: uuuuuttt : unit | type */
2308 return (bits & 0x7);
2309}
2310static inline uint8_t get_outline_width(const css_computed_style *style,
2311 css_fixed *length, css_unit *unit)
2312{
2313 uint32_t bits = style->i.bits[OUTLINE_WIDTH_INDEX];
2314 bits &= OUTLINE_WIDTH_MASK;
2315 bits >>= OUTLINE_WIDTH_SHIFT;
2316
2317 /* 8bits: uuuuuttt : unit | type */
2318 if ((bits & 0x7) == CSS_OUTLINE_WIDTH_WIDTH) {
2319 *length = style->i.outline_width;
2320 *unit = bits >> 3;
2321 }
2322
2323 return (bits & 0x7);
2324}
2325#undef OUTLINE_WIDTH_INDEX
2326#undef OUTLINE_WIDTH_SHIFT
2327#undef OUTLINE_WIDTH_MASK
2328
2329#define OVERFLOW_X_INDEX 13
2330#define OVERFLOW_X_SHIFT 13
2331#define OVERFLOW_X_MASK 0xe000
2332static inline uint8_t get_overflow_x_bits(const css_computed_style *style)
2333{
2334 uint32_t bits = style->i.bits[OVERFLOW_X_INDEX];
2335 bits &= OVERFLOW_X_MASK;
2336 bits >>= OVERFLOW_X_SHIFT;
2337
2338 /* 3bits: ttt : type */
2339 return (bits & 0x7);
2340}
2341static inline uint8_t get_overflow_x(const css_computed_style *style)
2342{
2343 uint32_t bits = style->i.bits[OVERFLOW_X_INDEX];
2344 bits &= OVERFLOW_X_MASK;
2345 bits >>= OVERFLOW_X_SHIFT;
2346
2347 /* 3bits: ttt : type */
2348
2349 return (bits & 0x7);
2350}
2351#undef OVERFLOW_X_INDEX
2352#undef OVERFLOW_X_SHIFT
2353#undef OVERFLOW_X_MASK
2354
2355#define OVERFLOW_Y_INDEX 13
2356#define OVERFLOW_Y_SHIFT 16
2357#define OVERFLOW_Y_MASK 0x70000
2358static inline uint8_t get_overflow_y_bits(const css_computed_style *style)
2359{
2360 uint32_t bits = style->i.bits[OVERFLOW_Y_INDEX];
2361 bits &= OVERFLOW_Y_MASK;
2362 bits >>= OVERFLOW_Y_SHIFT;
2363
2364 /* 3bits: ttt : type */
2365 return (bits & 0x7);
2366}
2367static inline uint8_t get_overflow_y(const css_computed_style *style)
2368{
2369 uint32_t bits = style->i.bits[OVERFLOW_Y_INDEX];
2370 bits &= OVERFLOW_Y_MASK;
2371 bits >>= OVERFLOW_Y_SHIFT;
2372
2373 /* 3bits: ttt : type */
2374
2375 return (bits & 0x7);
2376}
2377#undef OVERFLOW_Y_INDEX
2378#undef OVERFLOW_Y_SHIFT
2379#undef OVERFLOW_Y_MASK
2380
2381#define PADDING_BOTTOM_INDEX 8
2382#define PADDING_BOTTOM_SHIFT 14
2383#define PADDING_BOTTOM_MASK 0xfc000
2384static inline uint8_t get_padding_bottom_bits(const css_computed_style *style)
2385{
2386 uint32_t bits = style->i.bits[PADDING_BOTTOM_INDEX];
2387 bits &= PADDING_BOTTOM_MASK;
2388 bits >>= PADDING_BOTTOM_SHIFT;
2389
2390 /* 6bits: uuuuut : unit | type */
2391 return (bits & 0x1);
2392}
2393static inline uint8_t get_padding_bottom(const css_computed_style *style,
2394 css_fixed *length, css_unit *unit)
2395{
2396 uint32_t bits = style->i.bits[PADDING_BOTTOM_INDEX];
2397 bits &= PADDING_BOTTOM_MASK;
2398 bits >>= PADDING_BOTTOM_SHIFT;
2399
2400 /* 6bits: uuuuut : unit | type */
2401 if ((bits & 0x1) == CSS_PADDING_SET) {
2402 *length = style->i.padding_bottom;
2403 *unit = bits >> 1;
2404 }
2405
2406 return (bits & 0x1);
2407}
2408#undef PADDING_BOTTOM_INDEX
2409#undef PADDING_BOTTOM_SHIFT
2410#undef PADDING_BOTTOM_MASK
2411
2412#define PADDING_LEFT_INDEX 8
2413#define PADDING_LEFT_SHIFT 20
2414#define PADDING_LEFT_MASK 0x3f00000
2415static inline uint8_t get_padding_left_bits(const css_computed_style *style)
2416{
2417 uint32_t bits = style->i.bits[PADDING_LEFT_INDEX];
2418 bits &= PADDING_LEFT_MASK;
2419 bits >>= PADDING_LEFT_SHIFT;
2420
2421 /* 6bits: uuuuut : unit | type */
2422 return (bits & 0x1);
2423}
2424static inline uint8_t get_padding_left(const css_computed_style *style,
2425 css_fixed *length, css_unit *unit)
2426{
2427 uint32_t bits = style->i.bits[PADDING_LEFT_INDEX];
2428 bits &= PADDING_LEFT_MASK;
2429 bits >>= PADDING_LEFT_SHIFT;
2430
2431 /* 6bits: uuuuut : unit | type */
2432 if ((bits & 0x1) == CSS_PADDING_SET) {
2433 *length = style->i.padding_left;
2434 *unit = bits >> 1;
2435 }
2436
2437 return (bits & 0x1);
2438}
2439#undef PADDING_LEFT_INDEX
2440#undef PADDING_LEFT_SHIFT
2441#undef PADDING_LEFT_MASK
2442
2443#define PADDING_RIGHT_INDEX 8
2444#define PADDING_RIGHT_SHIFT 26
2445#define PADDING_RIGHT_MASK 0xfc000000
2446static inline uint8_t get_padding_right_bits(const css_computed_style *style)
2447{
2448 uint32_t bits = style->i.bits[PADDING_RIGHT_INDEX];
2449 bits &= PADDING_RIGHT_MASK;
2450 bits >>= PADDING_RIGHT_SHIFT;
2451
2452 /* 6bits: uuuuut : unit | type */
2453 return (bits & 0x1);
2454}
2455static inline uint8_t get_padding_right(const css_computed_style *style,
2456 css_fixed *length, css_unit *unit)
2457{
2458 uint32_t bits = style->i.bits[PADDING_RIGHT_INDEX];
2459 bits &= PADDING_RIGHT_MASK;
2460 bits >>= PADDING_RIGHT_SHIFT;
2461
2462 /* 6bits: uuuuut : unit | type */
2463 if ((bits & 0x1) == CSS_PADDING_SET) {
2464 *length = style->i.padding_right;
2465 *unit = bits >> 1;
2466 }
2467
2468 return (bits & 0x1);
2469}
2470#undef PADDING_RIGHT_INDEX
2471#undef PADDING_RIGHT_SHIFT
2472#undef PADDING_RIGHT_MASK
2473
2474#define PADDING_TOP_INDEX 3
2475#define PADDING_TOP_SHIFT 5
2476#define PADDING_TOP_MASK 0x7e0
2477static inline uint8_t get_padding_top_bits(const css_computed_style *style)
2478{
2479 uint32_t bits = style->i.bits[PADDING_TOP_INDEX];
2480 bits &= PADDING_TOP_MASK;
2481 bits >>= PADDING_TOP_SHIFT;
2482
2483 /* 6bits: uuuuut : unit | type */
2484 return (bits & 0x1);
2485}
2486static inline uint8_t get_padding_top(const css_computed_style *style,
2487 css_fixed *length, css_unit *unit)
2488{
2489 uint32_t bits = style->i.bits[PADDING_TOP_INDEX];
2490 bits &= PADDING_TOP_MASK;
2491 bits >>= PADDING_TOP_SHIFT;
2492
2493 /* 6bits: uuuuut : unit | type */
2494 if ((bits & 0x1) == CSS_PADDING_SET) {
2495 *length = style->i.padding_top;
2496 *unit = bits >> 1;
2497 }
2498
2499 return (bits & 0x1);
2500}
2501#undef PADDING_TOP_INDEX
2502#undef PADDING_TOP_SHIFT
2503#undef PADDING_TOP_MASK
2504
2505#define PAGE_BREAK_AFTER_INDEX 13
2506#define PAGE_BREAK_AFTER_SHIFT 19
2507#define PAGE_BREAK_AFTER_MASK 0x380000
2508static inline uint8_t get_page_break_after_bits(const css_computed_style *style)
2509{
2510 uint32_t bits = style->i.bits[PAGE_BREAK_AFTER_INDEX];
2511 bits &= PAGE_BREAK_AFTER_MASK;
2512 bits >>= PAGE_BREAK_AFTER_SHIFT;
2513
2514 /* 3bits: ttt : type */
2515 return (bits & 0x7);
2516}
2517static inline uint8_t get_page_break_after(const css_computed_style *style)
2518{
2519 uint32_t bits = style->i.bits[PAGE_BREAK_AFTER_INDEX];
2520 bits &= PAGE_BREAK_AFTER_MASK;
2521 bits >>= PAGE_BREAK_AFTER_SHIFT;
2522
2523 /* 3bits: ttt : type */
2524
2525 return (bits & 0x7);
2526}
2527#undef PAGE_BREAK_AFTER_INDEX
2528#undef PAGE_BREAK_AFTER_SHIFT
2529#undef PAGE_BREAK_AFTER_MASK
2530
2531#define PAGE_BREAK_BEFORE_INDEX 13
2532#define PAGE_BREAK_BEFORE_SHIFT 22
2533#define PAGE_BREAK_BEFORE_MASK 0x1c00000
2534static inline uint8_t get_page_break_before_bits(const css_computed_style
2535 *style)
2536{
2537 uint32_t bits = style->i.bits[PAGE_BREAK_BEFORE_INDEX];
2538 bits &= PAGE_BREAK_BEFORE_MASK;
2539 bits >>= PAGE_BREAK_BEFORE_SHIFT;
2540
2541 /* 3bits: ttt : type */
2542 return (bits & 0x7);
2543}
2544static inline uint8_t get_page_break_before(const css_computed_style *style)
2545{
2546 uint32_t bits = style->i.bits[PAGE_BREAK_BEFORE_INDEX];
2547 bits &= PAGE_BREAK_BEFORE_MASK;
2548 bits >>= PAGE_BREAK_BEFORE_SHIFT;
2549
2550 /* 3bits: ttt : type */
2551
2552 return (bits & 0x7);
2553}
2554#undef PAGE_BREAK_BEFORE_INDEX
2555#undef PAGE_BREAK_BEFORE_SHIFT
2556#undef PAGE_BREAK_BEFORE_MASK
2557
2558#define PAGE_BREAK_INSIDE_INDEX 10
2559#define PAGE_BREAK_INSIDE_SHIFT 8
2560#define PAGE_BREAK_INSIDE_MASK 0x300
2561static inline uint8_t get_page_break_inside_bits(const css_computed_style
2562 *style)
2563{
2564 uint32_t bits = style->i.bits[PAGE_BREAK_INSIDE_INDEX];
2565 bits &= PAGE_BREAK_INSIDE_MASK;
2566 bits >>= PAGE_BREAK_INSIDE_SHIFT;
2567
2568 /* 2bits: tt : type */
2569 return (bits & 0x3);
2570}
2571static inline uint8_t get_page_break_inside(const css_computed_style *style)
2572{
2573 uint32_t bits = style->i.bits[PAGE_BREAK_INSIDE_INDEX];
2574 bits &= PAGE_BREAK_INSIDE_MASK;
2575 bits >>= PAGE_BREAK_INSIDE_SHIFT;
2576
2577 /* 2bits: tt : type */
2578
2579 return (bits & 0x3);
2580}
2581#undef PAGE_BREAK_INSIDE_INDEX
2582#undef PAGE_BREAK_INSIDE_SHIFT
2583#undef PAGE_BREAK_INSIDE_MASK
2584
2585#define POSITION_INDEX 13
2586#define POSITION_SHIFT 25
2587#define POSITION_MASK 0xe000000
2588static inline uint8_t get_position_bits(const css_computed_style *style)
2589{
2590 uint32_t bits = style->i.bits[POSITION_INDEX];
2591 bits &= POSITION_MASK;
2592 bits >>= POSITION_SHIFT;
2593
2594 /* 3bits: ttt : type */
2595 return (bits & 0x7);
2596}
2597static inline uint8_t get_position(const css_computed_style *style)
2598{
2599 uint32_t bits = style->i.bits[POSITION_INDEX];
2600 bits &= POSITION_MASK;
2601 bits >>= POSITION_SHIFT;
2602
2603 /* 3bits: ttt : type */
2604
2605 return (bits & 0x7);
2606}
2607#undef POSITION_INDEX
2608#undef POSITION_SHIFT
2609#undef POSITION_MASK
2610
2611#define QUOTES_INDEX 14
2612#define QUOTES_SHIFT 27
2613#define QUOTES_MASK 0x8000000
2614static inline uint8_t get_quotes_bits(const css_computed_style *style)
2615{
2616 uint32_t bits = style->i.bits[QUOTES_INDEX];
2617 bits &= QUOTES_MASK;
2618 bits >>= QUOTES_SHIFT;
2619
2620 /* 1bit: t : type */
2621 return (bits & 0x1);
2622}
2623static inline uint8_t get_quotes(const css_computed_style *style, lwc_string
2624 ***string_arr)
2625{
2626 uint32_t bits = style->i.bits[QUOTES_INDEX];
2627 bits &= QUOTES_MASK;
2628 bits >>= QUOTES_SHIFT;
2629
2630 /* 1bit: t : type */
2631 *string_arr = style->quotes;
2632
2633 return (bits & 0x1);
2634}
2635#undef QUOTES_INDEX
2636#undef QUOTES_SHIFT
2637#undef QUOTES_MASK
2638
2639#define RIGHT_INDEX 4
2640#define RIGHT_SHIFT 11
2641#define RIGHT_MASK 0x3f800
2642static inline uint8_t get_right_bits(const css_computed_style *style)
2643{
2644 uint32_t bits = style->i.bits[RIGHT_INDEX];
2645 bits &= RIGHT_MASK;
2646 bits >>= RIGHT_SHIFT;
2647
2648 /* 7bits: uuuuutt : unit | type */
2649 return (bits & 0x3);
2650}
2651static inline uint8_t get_right(const css_computed_style *style, css_fixed
2652 *length, css_unit *unit)
2653{
2654 uint32_t bits = style->i.bits[RIGHT_INDEX];
2655 bits &= RIGHT_MASK;
2656 bits >>= RIGHT_SHIFT;
2657
2658 /* 7bits: uuuuutt : unit | type */
2659 if ((bits & 0x3) == CSS_RIGHT_SET) {
2660 *length = style->i.right;
2661 *unit = bits >> 2;
2662 }
2663
2664 return (bits & 0x3);
2665}
2666#undef RIGHT_INDEX
2667#undef RIGHT_SHIFT
2668#undef RIGHT_MASK
2669
2670#define STROKE_OPACITY_INDEX 13
2671#define STROKE_OPACITY_SHIFT 0
2672#define STROKE_OPACITY_MASK 0x1
2673static inline uint8_t get_stroke_opacity_bits(const css_computed_style *style)
2674{
2675 uint32_t bits = style->i.bits[STROKE_OPACITY_INDEX];
2676 bits &= STROKE_OPACITY_MASK;
2677 bits >>= STROKE_OPACITY_SHIFT;
2678
2679 /* 1bit: t : type */
2680 return (bits & 0x1);
2681}
2682static inline uint8_t get_stroke_opacity(const css_computed_style *style,
2683 css_fixed *fixed)
2684{
2685 uint32_t bits = style->i.bits[STROKE_OPACITY_INDEX];
2686 bits &= STROKE_OPACITY_MASK;
2687 bits >>= STROKE_OPACITY_SHIFT;
2688
2689 /* 1bit: t : type */
2690 if ((bits & 0x1) == CSS_STROKE_OPACITY_SET) {
2691 *fixed = style->i.stroke_opacity;
2692 }
2693
2694 return (bits & 0x1);
2695}
2696#undef STROKE_OPACITY_INDEX
2697#undef STROKE_OPACITY_SHIFT
2698#undef STROKE_OPACITY_MASK
2699
2700#define TABLE_LAYOUT_INDEX 10
2701#define TABLE_LAYOUT_SHIFT 10
2702#define TABLE_LAYOUT_MASK 0xc00
2703static inline uint8_t get_table_layout_bits(const css_computed_style *style)
2704{
2705 uint32_t bits = style->i.bits[TABLE_LAYOUT_INDEX];
2706 bits &= TABLE_LAYOUT_MASK;
2707 bits >>= TABLE_LAYOUT_SHIFT;
2708
2709 /* 2bits: tt : type */
2710 return (bits & 0x3);
2711}
2712static inline uint8_t get_table_layout(const css_computed_style *style)
2713{
2714 uint32_t bits = style->i.bits[TABLE_LAYOUT_INDEX];
2715 bits &= TABLE_LAYOUT_MASK;
2716 bits >>= TABLE_LAYOUT_SHIFT;
2717
2718 /* 2bits: tt : type */
2719
2720 return (bits & 0x3);
2721}
2722#undef TABLE_LAYOUT_INDEX
2723#undef TABLE_LAYOUT_SHIFT
2724#undef TABLE_LAYOUT_MASK
2725
2726#define TEXT_ALIGN_INDEX 4
2727#define TEXT_ALIGN_SHIFT 0
2728#define TEXT_ALIGN_MASK 0xf
2729static inline uint8_t get_text_align_bits(const css_computed_style *style)
2730{
2731 uint32_t bits = style->i.bits[TEXT_ALIGN_INDEX];
2732 bits &= TEXT_ALIGN_MASK;
2733 bits >>= TEXT_ALIGN_SHIFT;
2734
2735 /* 4bits: tttt : type */
2736 return (bits & 0xf);
2737}
2738static inline uint8_t get_text_align(const css_computed_style *style)
2739{
2740 uint32_t bits = style->i.bits[TEXT_ALIGN_INDEX];
2741 bits &= TEXT_ALIGN_MASK;
2742 bits >>= TEXT_ALIGN_SHIFT;
2743
2744 /* 4bits: tttt : type */
2745
2746 return (bits & 0xf);
2747}
2748#undef TEXT_ALIGN_INDEX
2749#undef TEXT_ALIGN_SHIFT
2750#undef TEXT_ALIGN_MASK
2751
2752#define TEXT_DECORATION_INDEX 3
2753#define TEXT_DECORATION_SHIFT 0
2754#define TEXT_DECORATION_MASK 0x1f
2755static inline uint8_t get_text_decoration_bits(const css_computed_style *style)
2756{
2757 uint32_t bits = style->i.bits[TEXT_DECORATION_INDEX];
2758 bits &= TEXT_DECORATION_MASK;
2759 bits >>= TEXT_DECORATION_SHIFT;
2760
2761 /* 5bits: ttttt : type */
2762 return (bits & 0x1f);
2763}
2764static inline uint8_t get_text_decoration(const css_computed_style *style)
2765{
2766 uint32_t bits = style->i.bits[TEXT_DECORATION_INDEX];
2767 bits &= TEXT_DECORATION_MASK;
2768 bits >>= TEXT_DECORATION_SHIFT;
2769
2770 /* 5bits: ttttt : type */
2771
2772 return (bits & 0x1f);
2773}
2774#undef TEXT_DECORATION_INDEX
2775#undef TEXT_DECORATION_SHIFT
2776#undef TEXT_DECORATION_MASK
2777
2778#define TEXT_INDENT_INDEX 2
2779#define TEXT_INDENT_SHIFT 0
2780#define TEXT_INDENT_MASK 0x3f
2781static inline uint8_t get_text_indent_bits(const css_computed_style *style)
2782{
2783 uint32_t bits = style->i.bits[TEXT_INDENT_INDEX];
2784 bits &= TEXT_INDENT_MASK;
2785 bits >>= TEXT_INDENT_SHIFT;
2786
2787 /* 6bits: uuuuut : unit | type */
2788 return (bits & 0x1);
2789}
2790static inline uint8_t get_text_indent(const css_computed_style *style,
2791 css_fixed *length, css_unit *unit)
2792{
2793 uint32_t bits = style->i.bits[TEXT_INDENT_INDEX];
2794 bits &= TEXT_INDENT_MASK;
2795 bits >>= TEXT_INDENT_SHIFT;
2796
2797 /* 6bits: uuuuut : unit | type */
2798 if ((bits & 0x1) == CSS_TEXT_INDENT_SET) {
2799 *length = style->i.text_indent;
2800 *unit = bits >> 1;
2801 }
2802
2803 return (bits & 0x1);
2804}
2805#undef TEXT_INDENT_INDEX
2806#undef TEXT_INDENT_SHIFT
2807#undef TEXT_INDENT_MASK
2808
2809#define TEXT_TRANSFORM_INDEX 9
2810#define TEXT_TRANSFORM_SHIFT 0
2811#define TEXT_TRANSFORM_MASK 0x7
2812static inline uint8_t get_text_transform_bits(const css_computed_style *style)
2813{
2814 uint32_t bits = style->i.bits[TEXT_TRANSFORM_INDEX];
2815 bits &= TEXT_TRANSFORM_MASK;
2816 bits >>= TEXT_TRANSFORM_SHIFT;
2817
2818 /* 3bits: ttt : type */
2819 return (bits & 0x7);
2820}
2821static inline uint8_t get_text_transform(const css_computed_style *style)
2822{
2823 uint32_t bits = style->i.bits[TEXT_TRANSFORM_INDEX];
2824 bits &= TEXT_TRANSFORM_MASK;
2825 bits >>= TEXT_TRANSFORM_SHIFT;
2826
2827 /* 3bits: ttt : type */
2828
2829 return (bits & 0x7);
2830}
2831#undef TEXT_TRANSFORM_INDEX
2832#undef TEXT_TRANSFORM_SHIFT
2833#undef TEXT_TRANSFORM_MASK
2834
2835#define TOP_INDEX 4
2836#define TOP_SHIFT 18
2837#define TOP_MASK 0x1fc0000
2838static inline uint8_t get_top_bits(const css_computed_style *style)
2839{
2840 uint32_t bits = style->i.bits[TOP_INDEX];
2841 bits &= TOP_MASK;
2842 bits >>= TOP_SHIFT;
2843
2844 /* 7bits: uuuuutt : unit | type */
2845 return (bits & 0x3);
2846}
2847static inline uint8_t get_top(const css_computed_style *style, css_fixed
2848 *length, css_unit *unit)
2849{
2850 uint32_t bits = style->i.bits[TOP_INDEX];
2851 bits &= TOP_MASK;
2852 bits >>= TOP_SHIFT;
2853
2854 /* 7bits: uuuuutt : unit | type */
2855 if ((bits & 0x3) == CSS_TOP_SET) {
2856 *length = style->i.top;
2857 *unit = bits >> 2;
2858 }
2859
2860 return (bits & 0x3);
2861}
2862#undef TOP_INDEX
2863#undef TOP_SHIFT
2864#undef TOP_MASK
2865
2866#define UNICODE_BIDI_INDEX 10
2867#define UNICODE_BIDI_SHIFT 12
2868#define UNICODE_BIDI_MASK 0x3000
2869static inline uint8_t get_unicode_bidi_bits(const css_computed_style *style)
2870{
2871 uint32_t bits = style->i.bits[UNICODE_BIDI_INDEX];
2872 bits &= UNICODE_BIDI_MASK;
2873 bits >>= UNICODE_BIDI_SHIFT;
2874
2875 /* 2bits: tt : type */
2876 return (bits & 0x3);
2877}
2878static inline uint8_t get_unicode_bidi(const css_computed_style *style)
2879{
2880 uint32_t bits = style->i.bits[UNICODE_BIDI_INDEX];
2881 bits &= UNICODE_BIDI_MASK;
2882 bits >>= UNICODE_BIDI_SHIFT;
2883
2884 /* 2bits: tt : type */
2885
2886 return (bits & 0x3);
2887}
2888#undef UNICODE_BIDI_INDEX
2889#undef UNICODE_BIDI_SHIFT
2890#undef UNICODE_BIDI_MASK
2891
2892#define VERTICAL_ALIGN_INDEX 12
2893#define VERTICAL_ALIGN_SHIFT 1
2894#define VERTICAL_ALIGN_MASK 0x3fe
2895static inline uint8_t get_vertical_align_bits(const css_computed_style *style)
2896{
2897 uint32_t bits = style->i.bits[VERTICAL_ALIGN_INDEX];
2898 bits &= VERTICAL_ALIGN_MASK;
2899 bits >>= VERTICAL_ALIGN_SHIFT;
2900
2901 /* 9bits: uuuuutttt : unit | type */
2902 return (bits & 0xf);
2903}
2904static inline uint8_t get_vertical_align(const css_computed_style *style,
2905 css_fixed *length, css_unit *unit)
2906{
2907 uint32_t bits = style->i.bits[VERTICAL_ALIGN_INDEX];
2908 bits &= VERTICAL_ALIGN_MASK;
2909 bits >>= VERTICAL_ALIGN_SHIFT;
2910
2911 /* 9bits: uuuuutttt : unit | type */
2912 if ((bits & 0xf) == CSS_VERTICAL_ALIGN_SET) {
2913 *length = style->i.vertical_align;
2914 *unit = bits >> 4;
2915 }
2916
2917 return (bits & 0xf);
2918}
2919#undef VERTICAL_ALIGN_INDEX
2920#undef VERTICAL_ALIGN_SHIFT
2921#undef VERTICAL_ALIGN_MASK
2922
2923#define VISIBILITY_INDEX 10
2924#define VISIBILITY_SHIFT 14
2925#define VISIBILITY_MASK 0xc000
2926static inline uint8_t get_visibility_bits(const css_computed_style *style)
2927{
2928 uint32_t bits = style->i.bits[VISIBILITY_INDEX];
2929 bits &= VISIBILITY_MASK;
2930 bits >>= VISIBILITY_SHIFT;
2931
2932 /* 2bits: tt : type */
2933 return (bits & 0x3);
2934}
2935static inline uint8_t get_visibility(const css_computed_style *style)
2936{
2937 uint32_t bits = style->i.bits[VISIBILITY_INDEX];
2938 bits &= VISIBILITY_MASK;
2939 bits >>= VISIBILITY_SHIFT;
2940
2941 /* 2bits: tt : type */
2942
2943 return (bits & 0x3);
2944}
2945#undef VISIBILITY_INDEX
2946#undef VISIBILITY_SHIFT
2947#undef VISIBILITY_MASK
2948
2949#define WHITE_SPACE_INDEX 8
2950#define WHITE_SPACE_SHIFT 0
2951#define WHITE_SPACE_MASK 0x7
2952static inline uint8_t get_white_space_bits(const css_computed_style *style)
2953{
2954 uint32_t bits = style->i.bits[WHITE_SPACE_INDEX];
2955 bits &= WHITE_SPACE_MASK;
2956 bits >>= WHITE_SPACE_SHIFT;
2957
2958 /* 3bits: ttt : type */
2959 return (bits & 0x7);
2960}
2961static inline uint8_t get_white_space(const css_computed_style *style)
2962{
2963 uint32_t bits = style->i.bits[WHITE_SPACE_INDEX];
2964 bits &= WHITE_SPACE_MASK;
2965 bits >>= WHITE_SPACE_SHIFT;
2966
2967 /* 3bits: ttt : type */
2968
2969 return (bits & 0x7);
2970}
2971#undef WHITE_SPACE_INDEX
2972#undef WHITE_SPACE_SHIFT
2973#undef WHITE_SPACE_MASK
2974
2975#define WIDOWS_INDEX 12
2976#define WIDOWS_SHIFT 0
2977#define WIDOWS_MASK 0x1
2978static inline uint8_t get_widows_bits(const css_computed_style *style)
2979{
2980 uint32_t bits = style->i.bits[WIDOWS_INDEX];
2981 bits &= WIDOWS_MASK;
2982 bits >>= WIDOWS_SHIFT;
2983
2984 /* 1bit: t : type */
2985 return (bits & 0x1);
2986}
2987static inline uint8_t get_widows(const css_computed_style *style, int32_t
2988 *integer)
2989{
2990 uint32_t bits = style->i.bits[WIDOWS_INDEX];
2991 bits &= WIDOWS_MASK;
2992 bits >>= WIDOWS_SHIFT;
2993
2994 /* 1bit: t : type */
2995 *integer = style->i.widows;
2996
2997 return (bits & 0x1);
2998}
2999#undef WIDOWS_INDEX
3000#undef WIDOWS_SHIFT
3001#undef WIDOWS_MASK
3002
3003#define WIDTH_INDEX 4
3004#define WIDTH_SHIFT 25
3005#define WIDTH_MASK 0xfe000000
3006static inline uint8_t get_width_bits(const css_computed_style *style)
3007{
3008 uint32_t bits = style->i.bits[WIDTH_INDEX];
3009 bits &= WIDTH_MASK;
3010 bits >>= WIDTH_SHIFT;
3011
3012 /* 7bits: uuuuutt : unit | type */
3013 return (bits & 0x3);
3014}
3015static inline uint8_t get_width(const css_computed_style *style,
3017{
3018 uint32_t bits = style->i.bits[WIDTH_INDEX];
3019 bits &= WIDTH_MASK;
3020 bits >>= WIDTH_SHIFT;
3021
3022 /* 7bits: uuuuutt : unit | type */
3023 if ((bits & 0x3) == CSS_WIDTH_SET) {
3024 *length = style->i.width;
3025 *unit = bits >> 2;
3026 }
3027
3028 return (bits & 0x3);
3029}
3030#undef WIDTH_INDEX
3031#undef WIDTH_SHIFT
3032#undef WIDTH_MASK
3033
3034#define WORD_SPACING_INDEX 1
3035#define WORD_SPACING_SHIFT 0
3036#define WORD_SPACING_MASK 0x7f
3037static inline uint8_t get_word_spacing_bits(const css_computed_style *style)
3038{
3039 uint32_t bits = style->i.bits[WORD_SPACING_INDEX];
3040 bits &= WORD_SPACING_MASK;
3041 bits >>= WORD_SPACING_SHIFT;
3042
3043 /* 7bits: uuuuutt : unit | type */
3044 return (bits & 0x3);
3045}
3046static inline uint8_t get_word_spacing(const css_computed_style *style,
3047 css_fixed *length, css_unit *unit)
3048{
3049 uint32_t bits = style->i.bits[WORD_SPACING_INDEX];
3050 bits &= WORD_SPACING_MASK;
3051 bits >>= WORD_SPACING_SHIFT;
3052
3053 /* 7bits: uuuuutt : unit | type */
3054 if ((bits & 0x3) == CSS_WORD_SPACING_SET) {
3055 *length = style->i.word_spacing;
3056 *unit = bits >> 2;
3057 }
3058
3059 return (bits & 0x3);
3060}
3061#undef WORD_SPACING_INDEX
3062#undef WORD_SPACING_SHIFT
3063#undef WORD_SPACING_MASK
3064
3065#define WRITING_MODE_INDEX 10
3066#define WRITING_MODE_SHIFT 16
3067#define WRITING_MODE_MASK 0x30000
3068static inline uint8_t get_writing_mode_bits(const css_computed_style *style)
3069{
3070 uint32_t bits = style->i.bits[WRITING_MODE_INDEX];
3071 bits &= WRITING_MODE_MASK;
3072 bits >>= WRITING_MODE_SHIFT;
3073
3074 /* 2bits: tt : type */
3075 return (bits & 0x3);
3076}
3077static inline uint8_t get_writing_mode(const css_computed_style *style)
3078{
3079 uint32_t bits = style->i.bits[WRITING_MODE_INDEX];
3080 bits &= WRITING_MODE_MASK;
3081 bits >>= WRITING_MODE_SHIFT;
3082
3083 /* 2bits: tt : type */
3084
3085 return (bits & 0x3);
3086}
3087#undef WRITING_MODE_INDEX
3088#undef WRITING_MODE_SHIFT
3089#undef WRITING_MODE_MASK
3090
3091#define Z_INDEX_INDEX 10
3092#define Z_INDEX_SHIFT 18
3093#define Z_INDEX_MASK 0xc0000
3094static inline uint8_t get_z_index_bits(const css_computed_style *style)
3095{
3096 uint32_t bits = style->i.bits[Z_INDEX_INDEX];
3097 bits &= Z_INDEX_MASK;
3098 bits >>= Z_INDEX_SHIFT;
3099
3100 /* 2bits: tt : type */
3101 return (bits & 0x3);
3102}
3103static inline uint8_t get_z_index(const css_computed_style *style, int32_t
3104 *integer)
3105{
3106 uint32_t bits = style->i.bits[Z_INDEX_INDEX];
3107 bits &= Z_INDEX_MASK;
3108 bits >>= Z_INDEX_SHIFT;
3109
3110 /* 2bits: tt : type */
3111 *integer = style->i.z_index;
3112
3113 return (bits & 0x3);
3114}
3115#undef Z_INDEX_INDEX
3116#undef Z_INDEX_SHIFT
3117#undef Z_INDEX_MASK
3118
3119#endif
#define BORDER_LEFT_STYLE_MASK
Definition autogenerated_propget.h:380
#define TOP_INDEX
Definition autogenerated_propget.h:2835
#define COUNTER_RESET_INDEX
Definition autogenerated_propget.h:1200
#define VISIBILITY_SHIFT
Definition autogenerated_propget.h:2924
#define OUTLINE_WIDTH_MASK
Definition autogenerated_propget.h:2300
#define STROKE_OPACITY_SHIFT
Definition autogenerated_propget.h:2671
#define BORDER_BOTTOM_WIDTH_MASK
Definition autogenerated_propget.h:293
#define PADDING_TOP_MASK
Definition autogenerated_propget.h:2476
#define PADDING_TOP_SHIFT
Definition autogenerated_propget.h:2475
#define LIST_STYLE_POSITION_SHIFT
Definition autogenerated_propget.h:1854
#define TABLE_LAYOUT_SHIFT
Definition autogenerated_propget.h:2701
#define FLEX_GROW_MASK
Definition autogenerated_propget.h:1423
#define BORDER_TOP_STYLE_MASK
Definition autogenerated_propget.h:589
#define FLEX_WRAP_MASK
Definition autogenerated_propget.h:1483
#define BORDER_RIGHT_COLOR_MASK
Definition autogenerated_propget.h:439
#define BORDER_LEFT_COLOR_SHIFT
Definition autogenerated_propget.h:350
#define BORDER_BOTTOM_STYLE_INDEX
Definition autogenerated_propget.h:264
#define MARGIN_BOTTOM_SHIFT
Definition autogenerated_propget.h:1907
#define COLUMN_RULE_COLOR_MASK
Definition autogenerated_propget.h:998
#define COUNTER_INCREMENT_SHIFT
Definition autogenerated_propget.h:1172
#define ALIGN_SELF_MASK
Definition autogenerated_propget.h:66
#define LEFT_INDEX
Definition autogenerated_propget.h:1727
#define COLOR_INDEX
Definition autogenerated_propget.h:883
#define OUTLINE_WIDTH_INDEX
Definition autogenerated_propget.h:2298
#define WHITE_SPACE_MASK
Definition autogenerated_propget.h:2951
#define FLEX_SHRINK_INDEX
Definition autogenerated_propget.h:1451
#define PADDING_TOP_INDEX
Definition autogenerated_propget.h:2474
#define WORD_SPACING_SHIFT
Definition autogenerated_propget.h:3035
#define BOX_SIZING_INDEX
Definition autogenerated_propget.h:675
#define WIDOWS_MASK
Definition autogenerated_propget.h:2977
#define DISPLAY_MASK
Definition autogenerated_propget.h:1284
#define FONT_SIZE_MASK
Definition autogenerated_propget.h:1563
#define TOP_SHIFT
Definition autogenerated_propget.h:2836
#define DISPLAY_INDEX
Definition autogenerated_propget.h:1282
#define BREAK_BEFORE_INDEX
Definition autogenerated_propget.h:727
#define OVERFLOW_X_SHIFT
Definition autogenerated_propget.h:2330
#define BORDER_COLLAPSE_SHIFT
Definition autogenerated_propget.h:324
#define WORD_SPACING_INDEX
Definition autogenerated_propget.h:3034
#define COLUMN_FILL_MASK
Definition autogenerated_propget.h:941
#define TEXT_TRANSFORM_MASK
Definition autogenerated_propget.h:2811
#define MIN_HEIGHT_INDEX
Definition autogenerated_propget.h:2092
#define COLUMN_WIDTH_INDEX
Definition autogenerated_propget.h:1110
#define CONTENT_SHIFT
Definition autogenerated_propget.h:1142
#define CONTENT_MASK
Definition autogenerated_propget.h:1143
#define LIST_STYLE_IMAGE_INDEX
Definition autogenerated_propget.h:1825
#define BORDER_LEFT_WIDTH_INDEX
Definition autogenerated_propget.h:405
#define PADDING_BOTTOM_INDEX
Definition autogenerated_propget.h:2381
#define PADDING_LEFT_SHIFT
Definition autogenerated_propget.h:2413
#define PAGE_BREAK_BEFORE_MASK
Definition autogenerated_propget.h:2533
#define BORDER_BOTTOM_WIDTH_SHIFT
Definition autogenerated_propget.h:292
#define MAX_HEIGHT_SHIFT
Definition autogenerated_propget.h:2031
#define MARGIN_LEFT_MASK
Definition autogenerated_propget.h:1939
#define EMPTY_CELLS_SHIFT
Definition autogenerated_propget.h:1309
#define LEFT_SHIFT
Definition autogenerated_propget.h:1728
#define BACKGROUND_REPEAT_INDEX
Definition autogenerated_propget.h:208
#define MARGIN_LEFT_SHIFT
Definition autogenerated_propget.h:1938
#define DISPLAY_SHIFT
Definition autogenerated_propget.h:1283
#define BORDER_SPACING_MASK
Definition autogenerated_propget.h:527
#define VISIBILITY_MASK
Definition autogenerated_propget.h:2925
#define FONT_SIZE_INDEX
Definition autogenerated_propget.h:1561
#define BACKGROUND_REPEAT_SHIFT
Definition autogenerated_propget.h:209
#define WIDTH_SHIFT
Definition autogenerated_propget.h:3004
#define TEXT_ALIGN_SHIFT
Definition autogenerated_propget.h:2727
#define OVERFLOW_Y_SHIFT
Definition autogenerated_propget.h:2356
#define ALIGN_CONTENT_INDEX
Definition autogenerated_propget.h:12
#define VERTICAL_ALIGN_SHIFT
Definition autogenerated_propget.h:2893
#define WIDTH_INDEX
Definition autogenerated_propget.h:3003
#define ALIGN_CONTENT_MASK
Definition autogenerated_propget.h:14
#define COLUMN_SPAN_INDEX
Definition autogenerated_propget.h:1084
#define WRITING_MODE_SHIFT
Definition autogenerated_propget.h:3066
#define CLEAR_SHIFT
Definition autogenerated_propget.h:806
#define FLOAT_INDEX
Definition autogenerated_propget.h:1507
#define COLOR_MASK
Definition autogenerated_propget.h:885
#define FONT_WEIGHT_SHIFT
Definition autogenerated_propget.h:1645
#define COLUMN_RULE_COLOR_INDEX
Definition autogenerated_propget.h:996
#define MAX_WIDTH_INDEX
Definition autogenerated_propget.h:2061
#define MARGIN_BOTTOM_INDEX
Definition autogenerated_propget.h:1906
#define ALIGN_SELF_SHIFT
Definition autogenerated_propget.h:65
#define ALIGN_CONTENT_SHIFT
Definition autogenerated_propget.h:13
#define FONT_WEIGHT_INDEX
Definition autogenerated_propget.h:1644
#define UNICODE_BIDI_INDEX
Definition autogenerated_propget.h:2866
#define COLUMN_COUNT_INDEX
Definition autogenerated_propget.h:911
#define STROKE_OPACITY_INDEX
Definition autogenerated_propget.h:2670
#define BORDER_RIGHT_COLOR_INDEX
Definition autogenerated_propget.h:437
#define BORDER_RIGHT_STYLE_INDEX
Definition autogenerated_propget.h:466
#define MARGIN_LEFT_INDEX
Definition autogenerated_propget.h:1937
#define BORDER_TOP_WIDTH_INDEX
Definition autogenerated_propget.h:613
#define BORDER_SPACING_INDEX
Definition autogenerated_propget.h:525
#define DIRECTION_SHIFT
Definition autogenerated_propget.h:1257
#define PADDING_RIGHT_SHIFT
Definition autogenerated_propget.h:2444
#define FONT_STYLE_SHIFT
Definition autogenerated_propget.h:1593
#define RIGHT_SHIFT
Definition autogenerated_propget.h:2640
#define RIGHT_INDEX
Definition autogenerated_propget.h:2639
#define OUTLINE_STYLE_INDEX
Definition autogenerated_propget.h:2272
#define RIGHT_MASK
Definition autogenerated_propget.h:2641
#define MAX_HEIGHT_MASK
Definition autogenerated_propget.h:2032
#define BORDER_TOP_WIDTH_SHIFT
Definition autogenerated_propget.h:614
#define BORDER_RIGHT_WIDTH_INDEX
Definition autogenerated_propget.h:493
#define BACKGROUND_POSITION_INDEX
Definition autogenerated_propget.h:173
#define COLUMN_RULE_STYLE_SHIFT
Definition autogenerated_propget.h:1026
#define FLEX_GROW_SHIFT
Definition autogenerated_propget.h:1422
#define COUNTER_INCREMENT_MASK
Definition autogenerated_propget.h:1173
#define LINE_HEIGHT_SHIFT
Definition autogenerated_propget.h:1790
#define BREAK_BEFORE_MASK
Definition autogenerated_propget.h:729
#define MIN_WIDTH_MASK
Definition autogenerated_propget.h:2125
#define MARGIN_RIGHT_INDEX
Definition autogenerated_propget.h:1968
#define BORDER_BOTTOM_COLOR_MASK
Definition autogenerated_propget.h:237
#define BOX_SIZING_MASK
Definition autogenerated_propget.h:677
#define COLUMN_GAP_SHIFT
Definition autogenerated_propget.h:966
#define FLEX_BASIS_MASK
Definition autogenerated_propget.h:1366
#define FLEX_GROW_INDEX
Definition autogenerated_propget.h:1421
#define PADDING_LEFT_MASK
Definition autogenerated_propget.h:2414
#define TABLE_LAYOUT_INDEX
Definition autogenerated_propget.h:2700
#define PAGE_BREAK_INSIDE_SHIFT
Definition autogenerated_propget.h:2559
#define JUSTIFY_CONTENT_INDEX
Definition autogenerated_propget.h:1701
#define WHITE_SPACE_INDEX
Definition autogenerated_propget.h:2949
#define COUNTER_RESET_SHIFT
Definition autogenerated_propget.h:1201
#define MIN_WIDTH_INDEX
Definition autogenerated_propget.h:2123
#define Z_INDEX_SHIFT
Definition autogenerated_propget.h:3092
#define BORDER_SPACING_SHIFT
Definition autogenerated_propget.h:526
#define TABLE_LAYOUT_MASK
Definition autogenerated_propget.h:2702
#define BORDER_BOTTOM_COLOR_SHIFT
Definition autogenerated_propget.h:236
#define OUTLINE_STYLE_SHIFT
Definition autogenerated_propget.h:2273
#define PAGE_BREAK_AFTER_MASK
Definition autogenerated_propget.h:2507
#define CLIP_MASK
Definition autogenerated_propget.h:833
#define PAGE_BREAK_BEFORE_INDEX
Definition autogenerated_propget.h:2531
#define WHITE_SPACE_SHIFT
Definition autogenerated_propget.h:2950
#define BACKGROUND_REPEAT_MASK
Definition autogenerated_propget.h:210
#define MARGIN_TOP_INDEX
Definition autogenerated_propget.h:1999
#define FILL_OPACITY_INDEX
Definition autogenerated_propget.h:1334
#define WIDTH_MASK
Definition autogenerated_propget.h:3005
#define COLUMN_FILL_SHIFT
Definition autogenerated_propget.h:940
#define BOTTOM_SHIFT
Definition autogenerated_propget.h:645
#define BOX_SIZING_SHIFT
Definition autogenerated_propget.h:676
#define FONT_STYLE_INDEX
Definition autogenerated_propget.h:1592
#define BACKGROUND_ATTACHMENT_SHIFT
Definition autogenerated_propget.h:91
#define ORDER_INDEX
Definition autogenerated_propget.h:2184
#define ALIGN_SELF_INDEX
Definition autogenerated_propget.h:64
#define TEXT_TRANSFORM_INDEX
Definition autogenerated_propget.h:2809
#define BREAK_INSIDE_MASK
Definition autogenerated_propget.h:755
#define ORPHANS_SHIFT
Definition autogenerated_propget.h:2215
#define CAPTION_SIDE_INDEX
Definition autogenerated_propget.h:779
#define LIST_STYLE_TYPE_INDEX
Definition autogenerated_propget.h:1880
#define CLIP_SHIFT
Definition autogenerated_propget.h:832
#define FLEX_BASIS_SHIFT
Definition autogenerated_propget.h:1365
#define COLUMN_RULE_STYLE_INDEX
Definition autogenerated_propget.h:1025
#define BOTTOM_MASK
Definition autogenerated_propget.h:646
#define COLUMN_RULE_WIDTH_INDEX
Definition autogenerated_propget.h:1052
#define CONTENT_INDEX
Definition autogenerated_propget.h:1141
#define PAGE_BREAK_AFTER_SHIFT
Definition autogenerated_propget.h:2506
#define PAGE_BREAK_BEFORE_SHIFT
Definition autogenerated_propget.h:2532
#define UNICODE_BIDI_SHIFT
Definition autogenerated_propget.h:2867
#define COLOR_SHIFT
Definition autogenerated_propget.h:884
#define OPACITY_INDEX
Definition autogenerated_propget.h:2154
#define FLEX_BASIS_INDEX
Definition autogenerated_propget.h:1364
#define BORDER_BOTTOM_COLOR_INDEX
Definition autogenerated_propget.h:235
#define BORDER_TOP_STYLE_SHIFT
Definition autogenerated_propget.h:588
#define CURSOR_INDEX
Definition autogenerated_propget.h:1228
#define BORDER_COLLAPSE_MASK
Definition autogenerated_propget.h:325
#define VISIBILITY_INDEX
Definition autogenerated_propget.h:2923
#define MARGIN_TOP_SHIFT
Definition autogenerated_propget.h:2000
#define LIST_STYLE_IMAGE_SHIFT
Definition autogenerated_propget.h:1826
#define WIDOWS_INDEX
Definition autogenerated_propget.h:2975
#define CLEAR_INDEX
Definition autogenerated_propget.h:805
#define OUTLINE_COLOR_MASK
Definition autogenerated_propget.h:2244
#define FLEX_SHRINK_MASK
Definition autogenerated_propget.h:1453
#define TEXT_INDENT_SHIFT
Definition autogenerated_propget.h:2779
#define LETTER_SPACING_INDEX
Definition autogenerated_propget.h:1758
#define FONT_SIZE_SHIFT
Definition autogenerated_propget.h:1562
#define BORDER_BOTTOM_STYLE_MASK
Definition autogenerated_propget.h:266
#define LEFT_MASK
Definition autogenerated_propget.h:1729
#define VERTICAL_ALIGN_MASK
Definition autogenerated_propget.h:2894
#define CURSOR_MASK
Definition autogenerated_propget.h:1230
#define TOP_MASK
Definition autogenerated_propget.h:2837
#define BORDER_LEFT_WIDTH_MASK
Definition autogenerated_propget.h:407
#define TEXT_ALIGN_INDEX
Definition autogenerated_propget.h:2726
#define CURSOR_SHIFT
Definition autogenerated_propget.h:1229
#define UNICODE_BIDI_MASK
Definition autogenerated_propget.h:2868
#define COUNTER_INCREMENT_INDEX
Definition autogenerated_propget.h:1171
#define LINE_HEIGHT_MASK
Definition autogenerated_propget.h:1791
#define MAX_WIDTH_MASK
Definition autogenerated_propget.h:2063
#define OPACITY_SHIFT
Definition autogenerated_propget.h:2155
#define DIRECTION_INDEX
Definition autogenerated_propget.h:1256
#define CAPTION_SIDE_MASK
Definition autogenerated_propget.h:781
#define PADDING_BOTTOM_SHIFT
Definition autogenerated_propget.h:2382
#define STROKE_OPACITY_MASK
Definition autogenerated_propget.h:2672
#define OVERFLOW_X_MASK
Definition autogenerated_propget.h:2331
#define LIST_STYLE_TYPE_SHIFT
Definition autogenerated_propget.h:1881
#define QUOTES_MASK
Definition autogenerated_propget.h:2613
#define FONT_VARIANT_MASK
Definition autogenerated_propget.h:1620
#define MARGIN_TOP_MASK
Definition autogenerated_propget.h:2001
#define COLUMN_WIDTH_MASK
Definition autogenerated_propget.h:1112
#define COLUMN_RULE_WIDTH_MASK
Definition autogenerated_propget.h:1054
#define COLUMN_SPAN_SHIFT
Definition autogenerated_propget.h:1085
#define POSITION_SHIFT
Definition autogenerated_propget.h:2586
#define FLEX_WRAP_SHIFT
Definition autogenerated_propget.h:1482
#define MAX_HEIGHT_INDEX
Definition autogenerated_propget.h:2030
#define BACKGROUND_IMAGE_INDEX
Definition autogenerated_propget.h:145
#define OUTLINE_COLOR_INDEX
Definition autogenerated_propget.h:2242
#define BREAK_INSIDE_SHIFT
Definition autogenerated_propget.h:754
#define COUNTER_RESET_MASK
Definition autogenerated_propget.h:1202
#define JUSTIFY_CONTENT_SHIFT
Definition autogenerated_propget.h:1702
#define MIN_HEIGHT_MASK
Definition autogenerated_propget.h:2094
#define FONT_WEIGHT_MASK
Definition autogenerated_propget.h:1646
#define COLUMN_GAP_INDEX
Definition autogenerated_propget.h:965
#define FONT_VARIANT_SHIFT
Definition autogenerated_propget.h:1619
#define FONT_VARIANT_INDEX
Definition autogenerated_propget.h:1618
#define ALIGN_ITEMS_INDEX
Definition autogenerated_propget.h:38
#define OVERFLOW_X_INDEX
Definition autogenerated_propget.h:2329
#define ALIGN_ITEMS_MASK
Definition autogenerated_propget.h:40
#define BREAK_AFTER_INDEX
Definition autogenerated_propget.h:701
#define BORDER_LEFT_STYLE_SHIFT
Definition autogenerated_propget.h:379
#define LIST_STYLE_POSITION_MASK
Definition autogenerated_propget.h:1855
#define OVERFLOW_Y_INDEX
Definition autogenerated_propget.h:2355
#define BACKGROUND_IMAGE_MASK
Definition autogenerated_propget.h:147
#define HEIGHT_MASK
Definition autogenerated_propget.h:1672
#define BORDER_BOTTOM_STYLE_SHIFT
Definition autogenerated_propget.h:265
#define VERTICAL_ALIGN_INDEX
Definition autogenerated_propget.h:2892
#define WORD_SPACING_MASK
Definition autogenerated_propget.h:3036
#define COLUMN_WIDTH_SHIFT
Definition autogenerated_propget.h:1111
#define FONT_FAMILY_SHIFT
Definition autogenerated_propget.h:1534
#define BORDER_RIGHT_STYLE_SHIFT
Definition autogenerated_propget.h:467
#define WIDOWS_SHIFT
Definition autogenerated_propget.h:2976
#define TEXT_INDENT_MASK
Definition autogenerated_propget.h:2780
#define OUTLINE_WIDTH_SHIFT
Definition autogenerated_propget.h:2299
#define FLEX_DIRECTION_SHIFT
Definition autogenerated_propget.h:1396
#define MIN_WIDTH_SHIFT
Definition autogenerated_propget.h:2124
#define MIN_HEIGHT_SHIFT
Definition autogenerated_propget.h:2093
#define FLOAT_SHIFT
Definition autogenerated_propget.h:1508
#define OUTLINE_COLOR_SHIFT
Definition autogenerated_propget.h:2243
#define BORDER_LEFT_COLOR_INDEX
Definition autogenerated_propget.h:349
#define TEXT_ALIGN_MASK
Definition autogenerated_propget.h:2728
#define ORDER_MASK
Definition autogenerated_propget.h:2186
#define BORDER_LEFT_STYLE_INDEX
Definition autogenerated_propget.h:378
#define BORDER_RIGHT_STYLE_MASK
Definition autogenerated_propget.h:468
#define ALIGN_ITEMS_SHIFT
Definition autogenerated_propget.h:39
#define BORDER_LEFT_WIDTH_SHIFT
Definition autogenerated_propget.h:406
#define LETTER_SPACING_SHIFT
Definition autogenerated_propget.h:1759
#define LETTER_SPACING_MASK
Definition autogenerated_propget.h:1760
#define BORDER_RIGHT_COLOR_SHIFT
Definition autogenerated_propget.h:438
#define FILL_OPACITY_MASK
Definition autogenerated_propget.h:1336
#define PAGE_BREAK_INSIDE_INDEX
Definition autogenerated_propget.h:2558
#define FONT_FAMILY_MASK
Definition autogenerated_propget.h:1535
#define BORDER_TOP_COLOR_INDEX
Definition autogenerated_propget.h:559
#define PADDING_RIGHT_MASK
Definition autogenerated_propget.h:2445
#define BORDER_BOTTOM_WIDTH_INDEX
Definition autogenerated_propget.h:291
#define BREAK_INSIDE_INDEX
Definition autogenerated_propget.h:753
#define LIST_STYLE_TYPE_MASK
Definition autogenerated_propget.h:1882
#define FLEX_WRAP_INDEX
Definition autogenerated_propget.h:1481
#define EMPTY_CELLS_INDEX
Definition autogenerated_propget.h:1308
#define MARGIN_RIGHT_SHIFT
Definition autogenerated_propget.h:1969
#define WRITING_MODE_INDEX
Definition autogenerated_propget.h:3065
#define LINE_HEIGHT_INDEX
Definition autogenerated_propget.h:1789
#define PADDING_RIGHT_INDEX
Definition autogenerated_propget.h:2443
#define BORDER_TOP_COLOR_SHIFT
Definition autogenerated_propget.h:560
#define COLUMN_RULE_WIDTH_SHIFT
Definition autogenerated_propget.h:1053
#define BORDER_RIGHT_WIDTH_SHIFT
Definition autogenerated_propget.h:494
#define BREAK_BEFORE_SHIFT
Definition autogenerated_propget.h:728
#define FLEX_DIRECTION_INDEX
Definition autogenerated_propget.h:1395
#define MARGIN_BOTTOM_MASK
Definition autogenerated_propget.h:1908
#define FLEX_SHRINK_SHIFT
Definition autogenerated_propget.h:1452
#define Z_INDEX_MASK
Definition autogenerated_propget.h:3093
#define TEXT_DECORATION_INDEX
Definition autogenerated_propget.h:2752
#define FLOAT_MASK
Definition autogenerated_propget.h:1509
#define PAGE_BREAK_INSIDE_MASK
Definition autogenerated_propget.h:2560
#define BACKGROUND_POSITION_MASK
Definition autogenerated_propget.h:175
#define BORDER_TOP_STYLE_INDEX
Definition autogenerated_propget.h:587
#define ORDER_SHIFT
Definition autogenerated_propget.h:2185
#define COLUMN_RULE_STYLE_MASK
Definition autogenerated_propget.h:1027
#define BACKGROUND_COLOR_SHIFT
Definition autogenerated_propget.h:118
#define FLEX_DIRECTION_MASK
Definition autogenerated_propget.h:1397
#define WRITING_MODE_MASK
Definition autogenerated_propget.h:3067
#define Z_INDEX_INDEX
Definition autogenerated_propget.h:3091
#define COLUMN_RULE_COLOR_SHIFT
Definition autogenerated_propget.h:997
#define QUOTES_INDEX
Definition autogenerated_propget.h:2611
#define OVERFLOW_Y_MASK
Definition autogenerated_propget.h:2357
#define TEXT_DECORATION_MASK
Definition autogenerated_propget.h:2754
#define QUOTES_SHIFT
Definition autogenerated_propget.h:2612
#define CAPTION_SIDE_SHIFT
Definition autogenerated_propget.h:780
#define ORPHANS_MASK
Definition autogenerated_propget.h:2216
#define BACKGROUND_COLOR_INDEX
Definition autogenerated_propget.h:117
#define PADDING_LEFT_INDEX
Definition autogenerated_propget.h:2412
#define HEIGHT_INDEX
Definition autogenerated_propget.h:1670
#define POSITION_MASK
Definition autogenerated_propget.h:2587
#define EMPTY_CELLS_MASK
Definition autogenerated_propget.h:1310
#define OUTLINE_STYLE_MASK
Definition autogenerated_propget.h:2274
#define MAX_WIDTH_SHIFT
Definition autogenerated_propget.h:2062
#define JUSTIFY_CONTENT_MASK
Definition autogenerated_propget.h:1703
#define BORDER_TOP_COLOR_MASK
Definition autogenerated_propget.h:561
#define LIST_STYLE_IMAGE_MASK
Definition autogenerated_propget.h:1827
#define FONT_FAMILY_INDEX
Definition autogenerated_propget.h:1533
#define ORPHANS_INDEX
Definition autogenerated_propget.h:2214
#define BACKGROUND_ATTACHMENT_MASK
Definition autogenerated_propget.h:92
#define DIRECTION_MASK
Definition autogenerated_propget.h:1258
#define TEXT_DECORATION_SHIFT
Definition autogenerated_propget.h:2753
#define COLUMN_COUNT_MASK
Definition autogenerated_propget.h:913
#define BORDER_LEFT_COLOR_MASK
Definition autogenerated_propget.h:351
#define PADDING_BOTTOM_MASK
Definition autogenerated_propget.h:2383
#define BOTTOM_INDEX
Definition autogenerated_propget.h:644
#define FONT_STYLE_MASK
Definition autogenerated_propget.h:1594
#define BORDER_TOP_WIDTH_MASK
Definition autogenerated_propget.h:615
#define PAGE_BREAK_AFTER_INDEX
Definition autogenerated_propget.h:2505
#define TEXT_TRANSFORM_SHIFT
Definition autogenerated_propget.h:2810
#define CLIP_INDEX
Definition autogenerated_propget.h:831
#define FILL_OPACITY_SHIFT
Definition autogenerated_propget.h:1335
#define CLEAR_MASK
Definition autogenerated_propget.h:807
#define BORDER_RIGHT_WIDTH_MASK
Definition autogenerated_propget.h:495
#define BACKGROUND_POSITION_SHIFT
Definition autogenerated_propget.h:174
#define COLUMN_GAP_MASK
Definition autogenerated_propget.h:967
#define COLUMN_SPAN_MASK
Definition autogenerated_propget.h:1086
#define BREAK_AFTER_MASK
Definition autogenerated_propget.h:703
#define COLUMN_COUNT_SHIFT
Definition autogenerated_propget.h:912
#define TEXT_INDENT_INDEX
Definition autogenerated_propget.h:2778
#define BREAK_AFTER_SHIFT
Definition autogenerated_propget.h:702
#define OPACITY_MASK
Definition autogenerated_propget.h:2156
#define BACKGROUND_IMAGE_SHIFT
Definition autogenerated_propget.h:146
#define BACKGROUND_COLOR_MASK
Definition autogenerated_propget.h:119
#define MARGIN_RIGHT_MASK
Definition autogenerated_propget.h:1970
#define BORDER_COLLAPSE_INDEX
Definition autogenerated_propget.h:323
#define LIST_STYLE_POSITION_INDEX
Definition autogenerated_propget.h:1853
#define HEIGHT_SHIFT
Definition autogenerated_propget.h:1671
#define BACKGROUND_ATTACHMENT_INDEX
Definition autogenerated_propget.h:90
#define COLUMN_FILL_INDEX
Definition autogenerated_propget.h:939
#define POSITION_INDEX
Definition autogenerated_propget.h:2585
unit
Definition bytecode.h:49
int32_t css_fixed
Definition fpmath.h:23
@ CSS_MAX_WIDTH_SET
Definition properties.h:672
@ CSS_FILL_OPACITY_SET
Definition properties.h:458
@ CSS_FLEX_GROW_SET
Definition properties.h:478
@ CSS_STROKE_OPACITY_SET
Definition properties.h:792
@ CSS_RIGHT_SET
Definition properties.h:786
@ CSS_COLUMN_GAP_SET
Definition properties.h:333
@ CSS_BACKGROUND_POSITION_SET
Definition properties.h:198
@ CSS_BORDER_WIDTH_WIDTH
Definition properties.h:245
@ CSS_HEIGHT_SET
Definition properties.h:556
@ CSS_PADDING_SET
Definition properties.h:741
@ CSS_BORDER_SPACING_SET
Definition properties.h:217
@ CSS_MAX_HEIGHT_SET
Definition properties.h:666
@ CSS_COLUMN_RULE_WIDTH_WIDTH
Definition properties.h:362
@ CSS_OUTLINE_WIDTH_WIDTH
Definition properties.h:723
@ CSS_WORD_SPACING_SET
Definition properties.h:891
@ CSS_VERTICAL_ALIGN_SET
Definition properties.h:859
@ CSS_WIDTH_SET
Definition properties.h:885
@ CSS_FLEX_SHRINK_SET
Definition properties.h:483
@ CSS_MARGIN_SET
Definition properties.h:660
@ CSS_MIN_WIDTH_SET
Definition properties.h:684
@ CSS_LEFT_SET
Definition properties.h:572
@ CSS_OPACITY_SET
Definition properties.h:690
@ CSS_OUTLINE_COLOR_COLOR
Definition properties.h:700
@ CSS_TOP_SET
Definition properties.h:838
@ CSS_LETTER_SPACING_SET
Definition properties.h:578
@ CSS_FLEX_BASIS_SET
Definition properties.h:463
@ CSS_LINE_HEIGHT_DIMENSION
Definition properties.h:585
@ CSS_LINE_HEIGHT_NUMBER
Definition properties.h:584
@ CSS_BOTTOM_SET
Definition properties.h:250
@ CSS_FONT_SIZE_DIMENSION
Definition properties.h:521
@ CSS_TEXT_INDENT_SET
Definition properties.h:825
@ CSS_MIN_HEIGHT_SET
Definition properties.h:678
@ CSS_CONTENT_SET
Definition properties.h:381
@ CSS_CLIP_RECT
Definition properties.h:311
@ CSS_ORDER_SET
Definition properties.h:695
@ CSS_COLUMN_WIDTH_SET
Definition properties.h:373
dict style
Definition select_config.py:26
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
Definition computed.h:27
Definition autogenerated_computed.h:282
css_unit
Definition types.h:82
uint32_t css_color
Definition types.h:79
Definition autogenerated_computed.h:13