1 /* derived from PR optimization/11440 */
3 extern void abort (void);
4 extern void exit (int);
12 STATIC
, RELATIVE
, ABSOLUTE
, FIXED
14 typedef enum EPosition EPosition
;
18 FNONE
= 0, FLEFT
, FRIGHT
20 typedef enum EFloat EFloat
;
25 short m_verticalPosition
;
29 bool m_minMaxKnown
: 1;
32 bool m_positioned
: 1;
33 bool m_overhangingContents
: 1;
34 bool m_relPositioned
: 1;
35 bool m_paintSpecial
: 1;
37 bool m_isAnonymous
: 1;
38 bool m_recalcMinMax
: 1;
43 bool m_mouseInside
: 1;
44 bool m_hasFirstLine
: 1;
45 bool m_isSelectionBorder
: 1;
47 bool (*isTableCell
) (struct RenderBox
*this);
50 typedef struct RenderBox RenderBox
;
54 struct NonInheritedFlags
60 unsigned int _display
: 4;
61 unsigned int _bg_repeat
: 2;
62 bool _bg_attachment
: 1;
63 unsigned int _overflow
: 4 ;
64 unsigned int _vertical_align
: 4;
65 unsigned int _clear
: 2;
66 EPosition _position
: 2;
68 unsigned int _table_layout
: 1;
69 bool _flowAroundFloats
:1;
71 unsigned int _styleType
: 3;
74 bool _clipSpecified
: 1;
75 unsigned int _unicodeBidi
: 2;
83 typedef struct RenderStyle RenderStyle
;
85 extern void RenderObject_setStyle(RenderBox
*this, RenderStyle
*_style
);
86 extern void removeFromSpecialObjects(RenderBox
*this);
90 void RenderBox_setStyle(RenderBox
*thisin
, RenderStyle
*_style
)
92 RenderBox
*this = thisin
;
96 tmp
= this->m_positioned
;
100 RenderObject_setStyle(this, _style
);
102 tmppo
= _style
->noninherited_flags
.f
._position
;
110 this->m_positioned
= ltrue
;
121 this->m_positioned
= ltrue
;
122 removeFromSpecialObjects(this);
126 this->m_positioned
= lfalse
;
129 tmpf
= _style
->noninherited_flags
.f
._floating
;
131 if(!this->isTableCell (this) && !(tmpf
== FNONE
))
134 this->m_floating
= ltrue
;
138 tmpp
= _style
->noninherited_flags
.f
._position
;
139 if (tmpp
== RELATIVE
)
142 this->m_relPositioned
= ltrue
;
153 RenderStyle g__style
;
155 void RenderObject_setStyle(RenderBox
*this, RenderStyle
*_style
)
161 void removeFromSpecialObjects(RenderBox
*this)
166 bool RenderBox_isTableCell (RenderBox
*this)
175 g_this
.m_relPositioned
= false;
176 g_this
.m_positioned
= false;
177 g_this
.m_floating
= false;
178 g_this
.isTableCell
= RenderBox_isTableCell
;
180 g__style
.noninherited_flags
.f
._position
= FIXED
;
181 g__style
.noninherited_flags
.f
._floating
= FNONE
;
183 RenderBox_setStyle (&g_this
, &g__style
);
185 if (g_this
.m_positioned
!= true)
187 if (g_this
.m_relPositioned
!= false)
189 if (g_this
.m_floating
!= false)