| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
/* |
|
2
|
|
|
|
|
|
|
Copyright (C) 2016-2017 Alexander Borisov |
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or |
|
5
|
|
|
|
|
|
|
modify it under the terms of the GNU Lesser General Public |
|
6
|
|
|
|
|
|
|
License as published by the Free Software Foundation; either |
|
7
|
|
|
|
|
|
|
version 2.1 of the License, or (at your option) any later version. |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful, |
|
10
|
|
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11
|
|
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
12
|
|
|
|
|
|
|
Lesser General Public License for more details. |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public |
|
15
|
|
|
|
|
|
|
License along with this library; if not, write to the Free Software |
|
16
|
|
|
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Author: lex.borisov@gmail.com (Alexander Borisov) |
|
19
|
|
|
|
|
|
|
*/ |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
#include "mycss/declaration/entry_destroy.h" |
|
22
|
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
mycss_declaration_entry_t * mycss_declaration_entry_destroy_undef(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy) |
|
24
|
|
|
|
|
|
|
{ |
|
25
|
0
|
0
|
|
|
|
|
if(decl_entry->value) |
|
26
|
0
|
|
|
|
|
|
decl_entry->value = mycss_values_destroy(declaration->ref_entry, decl_entry->value); |
|
27
|
|
|
|
|
|
|
|
|
28
|
0
|
0
|
|
|
|
|
if(self_destroy) { |
|
29
|
0
|
|
|
|
|
|
mcobject_free(declaration->mcobject_entries, decl_entry); |
|
30
|
0
|
|
|
|
|
|
return NULL; |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
return decl_entry; |
|
34
|
|
|
|
|
|
|
} |
|
35
|
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
mycss_declaration_entry_t * mycss_declaration_entry_destroy_type_list(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy) |
|
37
|
|
|
|
|
|
|
{ |
|
38
|
0
|
|
|
|
|
|
decl_entry->value = mycss_values_destroy_type_list(declaration->ref_entry, decl_entry->value, true); |
|
39
|
|
|
|
|
|
|
|
|
40
|
0
|
0
|
|
|
|
|
if(self_destroy) { |
|
41
|
0
|
|
|
|
|
|
mcobject_free(declaration->mcobject_entries, decl_entry); |
|
42
|
0
|
|
|
|
|
|
return NULL; |
|
43
|
|
|
|
|
|
|
} |
|
44
|
|
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
return decl_entry; |
|
46
|
|
|
|
|
|
|
} |
|
47
|
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
mycss_declaration_entry_t * mycss_declaration_entry_destroy_padding(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy) |
|
49
|
|
|
|
|
|
|
{ |
|
50
|
0
|
|
|
|
|
|
decl_entry->value = mycss_values_destroy_shorthand_four(declaration->ref_entry, decl_entry->value, true); |
|
51
|
|
|
|
|
|
|
|
|
52
|
0
|
0
|
|
|
|
|
if(self_destroy) { |
|
53
|
0
|
|
|
|
|
|
mcobject_free(declaration->mcobject_entries, decl_entry); |
|
54
|
0
|
|
|
|
|
|
return NULL; |
|
55
|
|
|
|
|
|
|
} |
|
56
|
|
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
return decl_entry; |
|
58
|
|
|
|
|
|
|
} |
|
59
|
|
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
|
mycss_declaration_entry_t * mycss_declaration_entry_destroy_margin(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy) |
|
61
|
|
|
|
|
|
|
{ |
|
62
|
0
|
|
|
|
|
|
return mycss_declaration_entry_destroy_padding(declaration, decl_entry, self_destroy); |
|
63
|
|
|
|
|
|
|
} |
|
64
|
|
|
|
|
|
|
|
|
65
|
0
|
|
|
|
|
|
mycss_declaration_entry_t * mycss_declaration_entry_destroy_border_width(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy) |
|
66
|
|
|
|
|
|
|
{ |
|
67
|
0
|
|
|
|
|
|
return mycss_declaration_entry_destroy_padding(declaration, decl_entry, self_destroy); |
|
68
|
|
|
|
|
|
|
} |
|
69
|
|
|
|
|
|
|
|
|
70
|
0
|
|
|
|
|
|
mycss_declaration_entry_t * mycss_declaration_entry_destroy_border_radius(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy) |
|
71
|
|
|
|
|
|
|
{ |
|
72
|
0
|
|
|
|
|
|
return mycss_declaration_entry_destroy_padding(declaration, decl_entry, self_destroy); |
|
73
|
|
|
|
|
|
|
} |
|
74
|
|
|
|
|
|
|
|
|
75
|
0
|
|
|
|
|
|
mycss_declaration_entry_t * mycss_declaration_entry_destroy_border_style(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy) |
|
76
|
|
|
|
|
|
|
{ |
|
77
|
0
|
|
|
|
|
|
return mycss_declaration_entry_destroy_padding(declaration, decl_entry, self_destroy); |
|
78
|
|
|
|
|
|
|
} |
|
79
|
|
|
|
|
|
|
|
|
80
|
0
|
|
|
|
|
|
mycss_declaration_entry_t * mycss_declaration_entry_destroy_border_color(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy) |
|
81
|
|
|
|
|
|
|
{ |
|
82
|
0
|
|
|
|
|
|
return mycss_declaration_entry_destroy_padding(declaration, decl_entry, self_destroy); |
|
83
|
|
|
|
|
|
|
} |
|
84
|
|
|
|
|
|
|
|
|
85
|
0
|
|
|
|
|
|
mycss_declaration_entry_t * mycss_declaration_entry_destroy_font(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy) |
|
86
|
|
|
|
|
|
|
{ |
|
87
|
0
|
|
|
|
|
|
decl_entry->value = mycss_values_destroy_font(declaration->ref_entry, decl_entry->value, true); |
|
88
|
|
|
|
|
|
|
|
|
89
|
0
|
0
|
|
|
|
|
if(self_destroy) { |
|
90
|
0
|
|
|
|
|
|
mcobject_free(declaration->mcobject_entries, decl_entry); |
|
91
|
0
|
|
|
|
|
|
return NULL; |
|
92
|
|
|
|
|
|
|
} |
|
93
|
|
|
|
|
|
|
|
|
94
|
0
|
|
|
|
|
|
return decl_entry; |
|
95
|
|
|
|
|
|
|
} |
|
96
|
|
|
|
|
|
|
|
|
97
|
0
|
|
|
|
|
|
mycss_declaration_entry_t * mycss_declaration_entry_destroy_border_x(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy) |
|
98
|
|
|
|
|
|
|
{ |
|
99
|
0
|
|
|
|
|
|
decl_entry->value = mycss_values_destroy_border(declaration->ref_entry, decl_entry->value, true); |
|
100
|
|
|
|
|
|
|
|
|
101
|
0
|
0
|
|
|
|
|
if(self_destroy) { |
|
102
|
0
|
|
|
|
|
|
mcobject_free(declaration->mcobject_entries, decl_entry); |
|
103
|
0
|
|
|
|
|
|
return NULL; |
|
104
|
|
|
|
|
|
|
} |
|
105
|
|
|
|
|
|
|
|
|
106
|
0
|
|
|
|
|
|
return decl_entry; |
|
107
|
|
|
|
|
|
|
} |
|
108
|
|
|
|
|
|
|
|
|
109
|
0
|
|
|
|
|
|
mycss_declaration_entry_t * mycss_declaration_entry_destroy_border_top_right_radius(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy) |
|
110
|
|
|
|
|
|
|
{ |
|
111
|
0
|
|
|
|
|
|
decl_entry->value = mycss_values_destroy_shorthand_two_type(declaration->ref_entry, decl_entry->value, true); |
|
112
|
|
|
|
|
|
|
|
|
113
|
0
|
0
|
|
|
|
|
if(self_destroy) { |
|
114
|
0
|
|
|
|
|
|
mcobject_free(declaration->mcobject_entries, decl_entry); |
|
115
|
0
|
|
|
|
|
|
return NULL; |
|
116
|
|
|
|
|
|
|
} |
|
117
|
|
|
|
|
|
|
|
|
118
|
0
|
|
|
|
|
|
return decl_entry; |
|
119
|
|
|
|
|
|
|
} |
|
120
|
|
|
|
|
|
|
|
|
121
|
0
|
|
|
|
|
|
mycss_declaration_entry_t * mycss_declaration_entry_destroy_border_top_left_radius(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy) |
|
122
|
|
|
|
|
|
|
{ |
|
123
|
0
|
|
|
|
|
|
decl_entry->value = mycss_values_destroy_shorthand_two_type(declaration->ref_entry, decl_entry->value, true); |
|
124
|
|
|
|
|
|
|
|
|
125
|
0
|
0
|
|
|
|
|
if(self_destroy) { |
|
126
|
0
|
|
|
|
|
|
mcobject_free(declaration->mcobject_entries, decl_entry); |
|
127
|
0
|
|
|
|
|
|
return NULL; |
|
128
|
|
|
|
|
|
|
} |
|
129
|
|
|
|
|
|
|
|
|
130
|
0
|
|
|
|
|
|
return decl_entry; |
|
131
|
|
|
|
|
|
|
} |
|
132
|
|
|
|
|
|
|
|
|
133
|
0
|
|
|
|
|
|
mycss_declaration_entry_t * mycss_declaration_entry_destroy_border_bottom_right_radius(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy) |
|
134
|
|
|
|
|
|
|
{ |
|
135
|
0
|
|
|
|
|
|
decl_entry->value = mycss_values_destroy_shorthand_two_type(declaration->ref_entry, decl_entry->value, true); |
|
136
|
|
|
|
|
|
|
|
|
137
|
0
|
0
|
|
|
|
|
if(self_destroy) { |
|
138
|
0
|
|
|
|
|
|
mcobject_free(declaration->mcobject_entries, decl_entry); |
|
139
|
0
|
|
|
|
|
|
return NULL; |
|
140
|
|
|
|
|
|
|
} |
|
141
|
|
|
|
|
|
|
|
|
142
|
0
|
|
|
|
|
|
return decl_entry; |
|
143
|
|
|
|
|
|
|
} |
|
144
|
|
|
|
|
|
|
|
|
145
|
0
|
|
|
|
|
|
mycss_declaration_entry_t * mycss_declaration_entry_destroy_border_bottom_left_radius(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy) |
|
146
|
|
|
|
|
|
|
{ |
|
147
|
0
|
|
|
|
|
|
decl_entry->value = mycss_values_destroy_shorthand_two_type(declaration->ref_entry, decl_entry->value, true); |
|
148
|
|
|
|
|
|
|
|
|
149
|
0
|
0
|
|
|
|
|
if(self_destroy) { |
|
150
|
0
|
|
|
|
|
|
mcobject_free(declaration->mcobject_entries, decl_entry); |
|
151
|
0
|
|
|
|
|
|
return NULL; |
|
152
|
|
|
|
|
|
|
} |
|
153
|
|
|
|
|
|
|
|
|
154
|
0
|
|
|
|
|
|
return decl_entry; |
|
155
|
|
|
|
|
|
|
} |
|
156
|
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
|
|
158
|
0
|
|
|
|
|
|
mycss_declaration_entry_t * mycss_declaration_entry_destroy_background(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy) |
|
159
|
|
|
|
|
|
|
{ |
|
160
|
0
|
|
|
|
|
|
decl_entry->value = mycss_values_destroy_background(declaration->ref_entry, decl_entry->value, true); |
|
161
|
|
|
|
|
|
|
|
|
162
|
0
|
0
|
|
|
|
|
if(self_destroy) { |
|
163
|
0
|
|
|
|
|
|
mcobject_free(declaration->mcobject_entries, decl_entry); |
|
164
|
0
|
|
|
|
|
|
return NULL; |
|
165
|
|
|
|
|
|
|
} |
|
166
|
|
|
|
|
|
|
|
|
167
|
0
|
|
|
|
|
|
return decl_entry; |
|
168
|
|
|
|
|
|
|
} |
|
169
|
|
|
|
|
|
|
|
|
170
|
0
|
|
|
|
|
|
mycss_declaration_entry_t * mycss_declaration_entry_destroy_background_image(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy) |
|
171
|
|
|
|
|
|
|
{ |
|
172
|
0
|
|
|
|
|
|
decl_entry->value = mycss_values_destroy_image_list(declaration->ref_entry, decl_entry->value, true); |
|
173
|
|
|
|
|
|
|
|
|
174
|
0
|
0
|
|
|
|
|
if(self_destroy) { |
|
175
|
0
|
|
|
|
|
|
mcobject_free(declaration->mcobject_entries, decl_entry); |
|
176
|
0
|
|
|
|
|
|
return NULL; |
|
177
|
|
|
|
|
|
|
} |
|
178
|
|
|
|
|
|
|
|
|
179
|
0
|
|
|
|
|
|
return decl_entry; |
|
180
|
|
|
|
|
|
|
} |
|
181
|
|
|
|
|
|
|
|
|
182
|
0
|
|
|
|
|
|
mycss_declaration_entry_t * mycss_declaration_entry_destroy_background_repeat(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy) |
|
183
|
|
|
|
|
|
|
{ |
|
184
|
0
|
|
|
|
|
|
decl_entry->value = mycss_values_destroy_background_repeat(declaration->ref_entry, decl_entry->value, true); |
|
185
|
|
|
|
|
|
|
|
|
186
|
0
|
0
|
|
|
|
|
if(self_destroy) { |
|
187
|
0
|
|
|
|
|
|
mcobject_free(declaration->mcobject_entries, decl_entry); |
|
188
|
0
|
|
|
|
|
|
return NULL; |
|
189
|
|
|
|
|
|
|
} |
|
190
|
|
|
|
|
|
|
|
|
191
|
0
|
|
|
|
|
|
return decl_entry; |
|
192
|
|
|
|
|
|
|
} |
|
193
|
|
|
|
|
|
|
|
|
194
|
0
|
|
|
|
|
|
mycss_declaration_entry_t * mycss_declaration_entry_destroy_background_position(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy) |
|
195
|
|
|
|
|
|
|
{ |
|
196
|
0
|
|
|
|
|
|
decl_entry->value = mycss_values_destroy_background_position(declaration->ref_entry, decl_entry->value, true); |
|
197
|
|
|
|
|
|
|
|
|
198
|
0
|
0
|
|
|
|
|
if(self_destroy) { |
|
199
|
0
|
|
|
|
|
|
mcobject_free(declaration->mcobject_entries, decl_entry); |
|
200
|
0
|
|
|
|
|
|
return NULL; |
|
201
|
|
|
|
|
|
|
} |
|
202
|
|
|
|
|
|
|
|
|
203
|
0
|
|
|
|
|
|
return decl_entry; |
|
204
|
|
|
|
|
|
|
} |
|
205
|
|
|
|
|
|
|
|
|
206
|
0
|
|
|
|
|
|
mycss_declaration_entry_t * mycss_declaration_entry_destroy_background_size(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy) |
|
207
|
|
|
|
|
|
|
{ |
|
208
|
0
|
|
|
|
|
|
decl_entry->value = mycss_values_destroy_background_size(declaration->ref_entry, decl_entry->value, true); |
|
209
|
|
|
|
|
|
|
|
|
210
|
0
|
0
|
|
|
|
|
if(self_destroy) { |
|
211
|
0
|
|
|
|
|
|
mcobject_free(declaration->mcobject_entries, decl_entry); |
|
212
|
0
|
|
|
|
|
|
return NULL; |
|
213
|
|
|
|
|
|
|
} |
|
214
|
|
|
|
|
|
|
|
|
215
|
0
|
|
|
|
|
|
return decl_entry; |
|
216
|
|
|
|
|
|
|
} |
|
217
|
|
|
|
|
|
|
|
|
218
|
0
|
|
|
|
|
|
mycss_declaration_entry_t * mycss_declaration_entry_destroy_border_spacing(mycss_declaration_t* declaration, mycss_declaration_entry_t* decl_entry, bool self_destroy) |
|
219
|
|
|
|
|
|
|
{ |
|
220
|
0
|
|
|
|
|
|
decl_entry->value = mycss_values_destroy_shorthand_two_type(declaration->ref_entry, decl_entry->value, true); |
|
221
|
|
|
|
|
|
|
|
|
222
|
0
|
0
|
|
|
|
|
if(self_destroy) { |
|
223
|
0
|
|
|
|
|
|
mcobject_free(declaration->mcobject_entries, decl_entry); |
|
224
|
0
|
|
|
|
|
|
return NULL; |
|
225
|
|
|
|
|
|
|
} |
|
226
|
|
|
|
|
|
|
|
|
227
|
0
|
|
|
|
|
|
return decl_entry; |
|
228
|
|
|
|
|
|
|
} |
|
229
|
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
|