1 | /* This file is automatically generated from CSSProperties.json by makeprop, do not edit */ |
2 | |
3 | #include "config.h" |
4 | #include "StyleBuilder.h" |
5 | |
6 | #include "CSSPrimitiveValueMappings.h" |
7 | #include "CSSProperty.h" |
8 | #include "RenderStyle.h" |
9 | #include "StyleBuilderConverter.h" |
10 | #include "StyleBuilderCustom.h" |
11 | #include "StylePropertyShorthand.h" |
12 | #include "StyleResolver.h" |
13 | |
14 | namespace WebCore { |
15 | |
16 | class StyleBuilderFunctions { |
17 | public: |
18 | static void applyInitialColor(StyleResolver& styleResolver) |
19 | { |
20 | if (styleResolver.applyPropertyToRegularStyle()) |
21 | styleResolver.style()->setColor(RenderStyle::initialColor()); |
22 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
23 | styleResolver.style()->setVisitedLinkColor(RenderStyle::initialColor()); |
24 | } |
25 | static void applyInheritColor(StyleResolver& styleResolver) |
26 | { |
27 | Color color = styleResolver.parentStyle()->color(); |
28 | if (styleResolver.applyPropertyToRegularStyle()) |
29 | styleResolver.style()->setColor(color); |
30 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
31 | styleResolver.style()->setVisitedLinkColor(color); |
32 | } |
33 | static void applyValueColor(StyleResolver& styleResolver, CSSValue& value) |
34 | { |
35 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
36 | if (primitiveValue.valueID() == CSSValueCurrentcolor) { |
37 | applyInheritColor(styleResolver); |
38 | return; |
39 | } |
40 | if (styleResolver.applyPropertyToRegularStyle()) |
41 | styleResolver.style()->setColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
42 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
43 | styleResolver.style()->setVisitedLinkColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
44 | } |
45 | static void applyInitialColorScheme(StyleResolver& styleResolver) |
46 | { |
47 | styleResolver.style()->setColorScheme(RenderStyle::initialColorScheme()); |
48 | } |
49 | static void applyInheritColorScheme(StyleResolver& styleResolver) |
50 | { |
51 | styleResolver.style()->setColorScheme(forwardInheritedValue(styleResolver.parentStyle()->colorScheme())); |
52 | } |
53 | static void applyInitialDirection(StyleResolver& styleResolver) |
54 | { |
55 | styleResolver.style()->setDirection(RenderStyle::initialDirection()); |
56 | } |
57 | static void applyInheritDirection(StyleResolver& styleResolver) |
58 | { |
59 | styleResolver.style()->setDirection(forwardInheritedValue(styleResolver.parentStyle()->direction())); |
60 | } |
61 | static void applyInitialDisplay(StyleResolver& styleResolver) |
62 | { |
63 | styleResolver.style()->setDisplay(RenderStyle::initialDisplay()); |
64 | } |
65 | static void applyValueFontFeatureSettings(StyleResolver& styleResolver, CSSValue& value) |
66 | { |
67 | auto fontDescription = styleResolver.fontDescription(); |
68 | fontDescription.setFeatureSettings(StyleBuilderConverter::convertFontFeatureSettings(styleResolver, value)); |
69 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
70 | } |
71 | static void applyInitialFontOpticalSizing(StyleResolver& styleResolver) |
72 | { |
73 | auto fontDescription = styleResolver.fontDescription(); |
74 | fontDescription.setOpticalSizing(FontCascadeDescription::initialOpticalSizing()); |
75 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
76 | } |
77 | static void applyInheritFontOpticalSizing(StyleResolver& styleResolver) |
78 | { |
79 | auto fontDescription = styleResolver.fontDescription(); |
80 | fontDescription.setOpticalSizing(styleResolver.parentFontDescription().opticalSizing()); |
81 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
82 | } |
83 | static void applyValueFontOpticalSizing(StyleResolver& styleResolver, CSSValue& value) |
84 | { |
85 | auto fontDescription = styleResolver.fontDescription(); |
86 | fontDescription.setOpticalSizing(downcast<CSSPrimitiveValue>(value)); |
87 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
88 | } |
89 | static void applyInitialFontStretch(StyleResolver& styleResolver) |
90 | { |
91 | auto fontDescription = styleResolver.fontDescription(); |
92 | fontDescription.setStretch(FontCascadeDescription::initialStretch()); |
93 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
94 | } |
95 | static void applyInheritFontStretch(StyleResolver& styleResolver) |
96 | { |
97 | auto fontDescription = styleResolver.fontDescription(); |
98 | fontDescription.setStretch(styleResolver.parentFontDescription().stretch()); |
99 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
100 | } |
101 | static void applyValueFontStretch(StyleResolver& styleResolver, CSSValue& value) |
102 | { |
103 | auto fontDescription = styleResolver.fontDescription(); |
104 | fontDescription.setStretch(StyleBuilderConverter::convertFontStretch(styleResolver, value)); |
105 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
106 | } |
107 | static void applyInitialFontSynthesis(StyleResolver& styleResolver) |
108 | { |
109 | auto fontDescription = styleResolver.fontDescription(); |
110 | fontDescription.setFontSynthesis(FontCascadeDescription::initialFontSynthesis()); |
111 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
112 | } |
113 | static void applyInheritFontSynthesis(StyleResolver& styleResolver) |
114 | { |
115 | auto fontDescription = styleResolver.fontDescription(); |
116 | fontDescription.setFontSynthesis(styleResolver.parentFontDescription().fontSynthesis()); |
117 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
118 | } |
119 | static void applyValueFontSynthesis(StyleResolver& styleResolver, CSSValue& value) |
120 | { |
121 | auto fontDescription = styleResolver.fontDescription(); |
122 | fontDescription.setFontSynthesis(StyleBuilderConverter::convertFontSynthesis(styleResolver, value)); |
123 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
124 | } |
125 | static void applyInitialFontVariantAlternates(StyleResolver& styleResolver) |
126 | { |
127 | auto fontDescription = styleResolver.fontDescription(); |
128 | fontDescription.setVariantAlternates(FontCascadeDescription::initialVariantAlternates()); |
129 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
130 | } |
131 | static void applyInheritFontVariantAlternates(StyleResolver& styleResolver) |
132 | { |
133 | auto fontDescription = styleResolver.fontDescription(); |
134 | fontDescription.setVariantAlternates(styleResolver.parentFontDescription().variantAlternates()); |
135 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
136 | } |
137 | static void applyValueFontVariantAlternates(StyleResolver& styleResolver, CSSValue& value) |
138 | { |
139 | auto fontDescription = styleResolver.fontDescription(); |
140 | fontDescription.setVariantAlternates(downcast<CSSPrimitiveValue>(value)); |
141 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
142 | } |
143 | static void applyInitialFontVariantCaps(StyleResolver& styleResolver) |
144 | { |
145 | auto fontDescription = styleResolver.fontDescription(); |
146 | fontDescription.setVariantCaps(FontCascadeDescription::initialVariantCaps()); |
147 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
148 | } |
149 | static void applyInheritFontVariantCaps(StyleResolver& styleResolver) |
150 | { |
151 | auto fontDescription = styleResolver.fontDescription(); |
152 | fontDescription.setVariantCaps(styleResolver.parentFontDescription().variantCaps()); |
153 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
154 | } |
155 | static void applyValueFontVariantCaps(StyleResolver& styleResolver, CSSValue& value) |
156 | { |
157 | auto fontDescription = styleResolver.fontDescription(); |
158 | fontDescription.setVariantCaps(downcast<CSSPrimitiveValue>(value)); |
159 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
160 | } |
161 | static void applyInitialFontVariantPosition(StyleResolver& styleResolver) |
162 | { |
163 | auto fontDescription = styleResolver.fontDescription(); |
164 | fontDescription.setVariantPosition(FontCascadeDescription::initialVariantPosition()); |
165 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
166 | } |
167 | static void applyInheritFontVariantPosition(StyleResolver& styleResolver) |
168 | { |
169 | auto fontDescription = styleResolver.fontDescription(); |
170 | fontDescription.setVariantPosition(styleResolver.parentFontDescription().variantPosition()); |
171 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
172 | } |
173 | static void applyValueFontVariantPosition(StyleResolver& styleResolver, CSSValue& value) |
174 | { |
175 | auto fontDescription = styleResolver.fontDescription(); |
176 | fontDescription.setVariantPosition(downcast<CSSPrimitiveValue>(value)); |
177 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
178 | } |
179 | static void applyValueFontVariationSettings(StyleResolver& styleResolver, CSSValue& value) |
180 | { |
181 | auto fontDescription = styleResolver.fontDescription(); |
182 | fontDescription.setVariationSettings(StyleBuilderConverter::convertFontVariationSettings(styleResolver, value)); |
183 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
184 | } |
185 | static void applyInitialFontWeight(StyleResolver& styleResolver) |
186 | { |
187 | auto fontDescription = styleResolver.fontDescription(); |
188 | fontDescription.setWeight(FontCascadeDescription::initialWeight()); |
189 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
190 | } |
191 | static void applyInheritFontWeight(StyleResolver& styleResolver) |
192 | { |
193 | auto fontDescription = styleResolver.fontDescription(); |
194 | fontDescription.setWeight(styleResolver.parentFontDescription().weight()); |
195 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
196 | } |
197 | static void applyValueFontWeight(StyleResolver& styleResolver, CSSValue& value) |
198 | { |
199 | auto fontDescription = styleResolver.fontDescription(); |
200 | fontDescription.setWeight(StyleBuilderConverter::convertFontWeight(styleResolver, value)); |
201 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
202 | } |
203 | static void applyInitialTextRendering(StyleResolver& styleResolver) |
204 | { |
205 | auto fontDescription = styleResolver.fontDescription(); |
206 | fontDescription.setTextRenderingMode(FontCascadeDescription::initialTextRenderingMode()); |
207 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
208 | } |
209 | static void applyInheritTextRendering(StyleResolver& styleResolver) |
210 | { |
211 | auto fontDescription = styleResolver.fontDescription(); |
212 | fontDescription.setTextRenderingMode(styleResolver.parentFontDescription().textRenderingMode()); |
213 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
214 | } |
215 | static void applyValueTextRendering(StyleResolver& styleResolver, CSSValue& value) |
216 | { |
217 | auto fontDescription = styleResolver.fontDescription(); |
218 | fontDescription.setTextRenderingMode(downcast<CSSPrimitiveValue>(value)); |
219 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
220 | } |
221 | static void applyInitialWritingMode(StyleResolver& styleResolver) |
222 | { |
223 | styleResolver.style()->setWritingMode(RenderStyle::initialWritingMode()); |
224 | } |
225 | static void applyInheritWritingMode(StyleResolver& styleResolver) |
226 | { |
227 | styleResolver.style()->setWritingMode(forwardInheritedValue(styleResolver.parentStyle()->writingMode())); |
228 | } |
229 | static void applyInitialWebkitFontKerning(StyleResolver& styleResolver) |
230 | { |
231 | auto fontDescription = styleResolver.fontDescription(); |
232 | fontDescription.setKerning(FontCascadeDescription::initialKerning()); |
233 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
234 | } |
235 | static void applyInheritWebkitFontKerning(StyleResolver& styleResolver) |
236 | { |
237 | auto fontDescription = styleResolver.fontDescription(); |
238 | fontDescription.setKerning(styleResolver.parentFontDescription().kerning()); |
239 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
240 | } |
241 | static void applyValueWebkitFontKerning(StyleResolver& styleResolver, CSSValue& value) |
242 | { |
243 | auto fontDescription = styleResolver.fontDescription(); |
244 | fontDescription.setKerning(downcast<CSSPrimitiveValue>(value)); |
245 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
246 | } |
247 | static void applyInitialWebkitFontSmoothing(StyleResolver& styleResolver) |
248 | { |
249 | auto fontDescription = styleResolver.fontDescription(); |
250 | fontDescription.setFontSmoothing(FontCascadeDescription::initialFontSmoothing()); |
251 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
252 | } |
253 | static void applyInheritWebkitFontSmoothing(StyleResolver& styleResolver) |
254 | { |
255 | auto fontDescription = styleResolver.fontDescription(); |
256 | fontDescription.setFontSmoothing(styleResolver.parentFontDescription().fontSmoothing()); |
257 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
258 | } |
259 | static void applyValueWebkitFontSmoothing(StyleResolver& styleResolver, CSSValue& value) |
260 | { |
261 | auto fontDescription = styleResolver.fontDescription(); |
262 | fontDescription.setFontSmoothing(downcast<CSSPrimitiveValue>(value)); |
263 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
264 | } |
265 | static void applyInitialWebkitLocale(StyleResolver& styleResolver) |
266 | { |
267 | auto fontDescription = styleResolver.fontDescription(); |
268 | fontDescription.setLocale(FontCascadeDescription::initialLocale()); |
269 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
270 | } |
271 | static void applyInheritWebkitLocale(StyleResolver& styleResolver) |
272 | { |
273 | auto fontDescription = styleResolver.fontDescription(); |
274 | fontDescription.setLocale(styleResolver.parentFontDescription().locale()); |
275 | styleResolver.setFontDescription(WTFMove(fontDescription)); |
276 | } |
277 | static void applyInitialWebkitTextOrientation(StyleResolver& styleResolver) |
278 | { |
279 | styleResolver.style()->setTextOrientation(RenderStyle::initialTextOrientation()); |
280 | } |
281 | static void applyInheritWebkitTextOrientation(StyleResolver& styleResolver) |
282 | { |
283 | styleResolver.style()->setTextOrientation(forwardInheritedValue(styleResolver.parentStyle()->textOrientation())); |
284 | } |
285 | static void applyInitialWebkitTextZoom(StyleResolver& styleResolver) |
286 | { |
287 | styleResolver.style()->setTextZoom(RenderStyle::initialTextZoom()); |
288 | } |
289 | static void applyInheritWebkitTextZoom(StyleResolver& styleResolver) |
290 | { |
291 | styleResolver.style()->setTextZoom(forwardInheritedValue(styleResolver.parentStyle()->textZoom())); |
292 | } |
293 | static void applyInitialAlignContent(StyleResolver& styleResolver) |
294 | { |
295 | styleResolver.style()->setAlignContent(RenderStyle::initialContentAlignment()); |
296 | } |
297 | static void applyInheritAlignContent(StyleResolver& styleResolver) |
298 | { |
299 | styleResolver.style()->setAlignContent(forwardInheritedValue(styleResolver.parentStyle()->alignContent())); |
300 | } |
301 | static void applyValueAlignContent(StyleResolver& styleResolver, CSSValue& value) |
302 | { |
303 | styleResolver.style()->setAlignContent(StyleBuilderConverter::convertContentAlignmentData(styleResolver, value)); |
304 | } |
305 | static void applyInitialAlignItems(StyleResolver& styleResolver) |
306 | { |
307 | styleResolver.style()->setAlignItems(RenderStyle::initialDefaultAlignment()); |
308 | } |
309 | static void applyInheritAlignItems(StyleResolver& styleResolver) |
310 | { |
311 | styleResolver.style()->setAlignItems(forwardInheritedValue(styleResolver.parentStyle()->alignItems())); |
312 | } |
313 | static void applyValueAlignItems(StyleResolver& styleResolver, CSSValue& value) |
314 | { |
315 | styleResolver.style()->setAlignItems(StyleBuilderConverter::convertSelfOrDefaultAlignmentData(styleResolver, value)); |
316 | } |
317 | static void applyInitialAlignSelf(StyleResolver& styleResolver) |
318 | { |
319 | styleResolver.style()->setAlignSelf(RenderStyle::initialSelfAlignment()); |
320 | } |
321 | static void applyInheritAlignSelf(StyleResolver& styleResolver) |
322 | { |
323 | styleResolver.style()->setAlignSelf(forwardInheritedValue(styleResolver.parentStyle()->alignSelf())); |
324 | } |
325 | static void applyValueAlignSelf(StyleResolver& styleResolver, CSSValue& value) |
326 | { |
327 | styleResolver.style()->setAlignSelf(StyleBuilderConverter::convertSelfOrDefaultAlignmentData(styleResolver, value)); |
328 | } |
329 | static void applyInitialAlignmentBaseline(StyleResolver& styleResolver) |
330 | { |
331 | styleResolver.style()->accessSVGStyle().setAlignmentBaseline(SVGRenderStyle::initialAlignmentBaseline()); |
332 | } |
333 | static void applyInheritAlignmentBaseline(StyleResolver& styleResolver) |
334 | { |
335 | styleResolver.style()->accessSVGStyle().setAlignmentBaseline(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().alignmentBaseline())); |
336 | } |
337 | static void applyValueAlignmentBaseline(StyleResolver& styleResolver, CSSValue& value) |
338 | { |
339 | styleResolver.style()->accessSVGStyle().setAlignmentBaseline(downcast<CSSPrimitiveValue>(value)); |
340 | } |
341 | static void applyInitialAlt(StyleResolver& styleResolver) |
342 | { |
343 | styleResolver.style()->setContentAltText(RenderStyle::initialContentAltText()); |
344 | } |
345 | static void applyInheritAlt(StyleResolver& styleResolver) |
346 | { |
347 | styleResolver.style()->setContentAltText(forwardInheritedValue(styleResolver.parentStyle()->contentAltText())); |
348 | } |
349 | static void applyInitialAnimationDelay(StyleResolver& styleResolver) |
350 | { |
351 | AnimationList& list = styleResolver.style()->ensureAnimations(); |
352 | if (list.isEmpty()) |
353 | list.append(Animation::create()); |
354 | list.animation(0).setDelay(Animation::initialDelay()); |
355 | for (size_t i = 1; i < list.size(); ++i) |
356 | list.animation(i).clearDelay(); |
357 | } |
358 | static void applyInheritAnimationDelay(StyleResolver& styleResolver) |
359 | { |
360 | auto& list = styleResolver.style()->ensureAnimations(); |
361 | auto* parentList = styleResolver.parentStyle()->animations(); |
362 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
363 | for ( ; i < parentSize && parentList->animation(i).isDelaySet(); ++i) { |
364 | if (list.size() <= i) |
365 | list.append(Animation::create()); |
366 | list.animation(i).setDelay(parentList->animation(i).delay()); |
367 | list.animation(i).setAnimationMode(parentList->animation(i).animationMode()); |
368 | } |
369 | |
370 | // Reset any remaining animations to not have the property set. |
371 | for ( ; i < list.size(); ++i) |
372 | list.animation(i).clearDelay(); |
373 | } |
374 | static void applyValueAnimationDelay(StyleResolver& styleResolver, CSSValue& value) |
375 | { |
376 | AnimationList& list = styleResolver.style()->ensureAnimations(); |
377 | size_t childIndex = 0; |
378 | if (is<CSSValueList>(value)) { |
379 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
380 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
381 | if (childIndex <= list.size()) |
382 | list.append(Animation::create()); |
383 | styleResolver.styleMap()->mapAnimationDelay(list.animation(childIndex), currentValue); |
384 | ++childIndex; |
385 | } |
386 | } else { |
387 | if (list.isEmpty()) |
388 | list.append(Animation::create()); |
389 | styleResolver.styleMap()->mapAnimationDelay(list.animation(childIndex), value); |
390 | childIndex = 1; |
391 | } |
392 | for ( ; childIndex < list.size(); ++childIndex) { |
393 | /* Reset all remaining animations to not have the property set. */ |
394 | list.animation(childIndex).clearDelay(); |
395 | } |
396 | } |
397 | static void applyInitialAnimationDirection(StyleResolver& styleResolver) |
398 | { |
399 | AnimationList& list = styleResolver.style()->ensureAnimations(); |
400 | if (list.isEmpty()) |
401 | list.append(Animation::create()); |
402 | list.animation(0).setDirection(Animation::initialDirection()); |
403 | for (size_t i = 1; i < list.size(); ++i) |
404 | list.animation(i).clearDirection(); |
405 | } |
406 | static void applyInheritAnimationDirection(StyleResolver& styleResolver) |
407 | { |
408 | auto& list = styleResolver.style()->ensureAnimations(); |
409 | auto* parentList = styleResolver.parentStyle()->animations(); |
410 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
411 | for ( ; i < parentSize && parentList->animation(i).isDirectionSet(); ++i) { |
412 | if (list.size() <= i) |
413 | list.append(Animation::create()); |
414 | list.animation(i).setDirection(parentList->animation(i).direction()); |
415 | list.animation(i).setAnimationMode(parentList->animation(i).animationMode()); |
416 | } |
417 | |
418 | // Reset any remaining animations to not have the property set. |
419 | for ( ; i < list.size(); ++i) |
420 | list.animation(i).clearDirection(); |
421 | } |
422 | static void applyValueAnimationDirection(StyleResolver& styleResolver, CSSValue& value) |
423 | { |
424 | AnimationList& list = styleResolver.style()->ensureAnimations(); |
425 | size_t childIndex = 0; |
426 | if (is<CSSValueList>(value)) { |
427 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
428 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
429 | if (childIndex <= list.size()) |
430 | list.append(Animation::create()); |
431 | styleResolver.styleMap()->mapAnimationDirection(list.animation(childIndex), currentValue); |
432 | ++childIndex; |
433 | } |
434 | } else { |
435 | if (list.isEmpty()) |
436 | list.append(Animation::create()); |
437 | styleResolver.styleMap()->mapAnimationDirection(list.animation(childIndex), value); |
438 | childIndex = 1; |
439 | } |
440 | for ( ; childIndex < list.size(); ++childIndex) { |
441 | /* Reset all remaining animations to not have the property set. */ |
442 | list.animation(childIndex).clearDirection(); |
443 | } |
444 | } |
445 | static void applyInitialAnimationDuration(StyleResolver& styleResolver) |
446 | { |
447 | AnimationList& list = styleResolver.style()->ensureAnimations(); |
448 | if (list.isEmpty()) |
449 | list.append(Animation::create()); |
450 | list.animation(0).setDuration(Animation::initialDuration()); |
451 | for (size_t i = 1; i < list.size(); ++i) |
452 | list.animation(i).clearDuration(); |
453 | } |
454 | static void applyInheritAnimationDuration(StyleResolver& styleResolver) |
455 | { |
456 | auto& list = styleResolver.style()->ensureAnimations(); |
457 | auto* parentList = styleResolver.parentStyle()->animations(); |
458 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
459 | for ( ; i < parentSize && parentList->animation(i).isDurationSet(); ++i) { |
460 | if (list.size() <= i) |
461 | list.append(Animation::create()); |
462 | list.animation(i).setDuration(parentList->animation(i).duration()); |
463 | list.animation(i).setAnimationMode(parentList->animation(i).animationMode()); |
464 | } |
465 | |
466 | // Reset any remaining animations to not have the property set. |
467 | for ( ; i < list.size(); ++i) |
468 | list.animation(i).clearDuration(); |
469 | } |
470 | static void applyValueAnimationDuration(StyleResolver& styleResolver, CSSValue& value) |
471 | { |
472 | AnimationList& list = styleResolver.style()->ensureAnimations(); |
473 | size_t childIndex = 0; |
474 | if (is<CSSValueList>(value)) { |
475 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
476 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
477 | if (childIndex <= list.size()) |
478 | list.append(Animation::create()); |
479 | styleResolver.styleMap()->mapAnimationDuration(list.animation(childIndex), currentValue); |
480 | ++childIndex; |
481 | } |
482 | } else { |
483 | if (list.isEmpty()) |
484 | list.append(Animation::create()); |
485 | styleResolver.styleMap()->mapAnimationDuration(list.animation(childIndex), value); |
486 | childIndex = 1; |
487 | } |
488 | for ( ; childIndex < list.size(); ++childIndex) { |
489 | /* Reset all remaining animations to not have the property set. */ |
490 | list.animation(childIndex).clearDuration(); |
491 | } |
492 | } |
493 | static void applyInitialAnimationFillMode(StyleResolver& styleResolver) |
494 | { |
495 | AnimationList& list = styleResolver.style()->ensureAnimations(); |
496 | if (list.isEmpty()) |
497 | list.append(Animation::create()); |
498 | list.animation(0).setFillMode(Animation::initialFillMode()); |
499 | for (size_t i = 1; i < list.size(); ++i) |
500 | list.animation(i).clearFillMode(); |
501 | } |
502 | static void applyInheritAnimationFillMode(StyleResolver& styleResolver) |
503 | { |
504 | auto& list = styleResolver.style()->ensureAnimations(); |
505 | auto* parentList = styleResolver.parentStyle()->animations(); |
506 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
507 | for ( ; i < parentSize && parentList->animation(i).isFillModeSet(); ++i) { |
508 | if (list.size() <= i) |
509 | list.append(Animation::create()); |
510 | list.animation(i).setFillMode(parentList->animation(i).fillMode()); |
511 | list.animation(i).setAnimationMode(parentList->animation(i).animationMode()); |
512 | } |
513 | |
514 | // Reset any remaining animations to not have the property set. |
515 | for ( ; i < list.size(); ++i) |
516 | list.animation(i).clearFillMode(); |
517 | } |
518 | static void applyValueAnimationFillMode(StyleResolver& styleResolver, CSSValue& value) |
519 | { |
520 | AnimationList& list = styleResolver.style()->ensureAnimations(); |
521 | size_t childIndex = 0; |
522 | if (is<CSSValueList>(value)) { |
523 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
524 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
525 | if (childIndex <= list.size()) |
526 | list.append(Animation::create()); |
527 | styleResolver.styleMap()->mapAnimationFillMode(list.animation(childIndex), currentValue); |
528 | ++childIndex; |
529 | } |
530 | } else { |
531 | if (list.isEmpty()) |
532 | list.append(Animation::create()); |
533 | styleResolver.styleMap()->mapAnimationFillMode(list.animation(childIndex), value); |
534 | childIndex = 1; |
535 | } |
536 | for ( ; childIndex < list.size(); ++childIndex) { |
537 | /* Reset all remaining animations to not have the property set. */ |
538 | list.animation(childIndex).clearFillMode(); |
539 | } |
540 | } |
541 | static void applyInitialAnimationIterationCount(StyleResolver& styleResolver) |
542 | { |
543 | AnimationList& list = styleResolver.style()->ensureAnimations(); |
544 | if (list.isEmpty()) |
545 | list.append(Animation::create()); |
546 | list.animation(0).setIterationCount(Animation::initialIterationCount()); |
547 | for (size_t i = 1; i < list.size(); ++i) |
548 | list.animation(i).clearIterationCount(); |
549 | } |
550 | static void applyInheritAnimationIterationCount(StyleResolver& styleResolver) |
551 | { |
552 | auto& list = styleResolver.style()->ensureAnimations(); |
553 | auto* parentList = styleResolver.parentStyle()->animations(); |
554 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
555 | for ( ; i < parentSize && parentList->animation(i).isIterationCountSet(); ++i) { |
556 | if (list.size() <= i) |
557 | list.append(Animation::create()); |
558 | list.animation(i).setIterationCount(parentList->animation(i).iterationCount()); |
559 | list.animation(i).setAnimationMode(parentList->animation(i).animationMode()); |
560 | } |
561 | |
562 | // Reset any remaining animations to not have the property set. |
563 | for ( ; i < list.size(); ++i) |
564 | list.animation(i).clearIterationCount(); |
565 | } |
566 | static void applyValueAnimationIterationCount(StyleResolver& styleResolver, CSSValue& value) |
567 | { |
568 | AnimationList& list = styleResolver.style()->ensureAnimations(); |
569 | size_t childIndex = 0; |
570 | if (is<CSSValueList>(value)) { |
571 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
572 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
573 | if (childIndex <= list.size()) |
574 | list.append(Animation::create()); |
575 | styleResolver.styleMap()->mapAnimationIterationCount(list.animation(childIndex), currentValue); |
576 | ++childIndex; |
577 | } |
578 | } else { |
579 | if (list.isEmpty()) |
580 | list.append(Animation::create()); |
581 | styleResolver.styleMap()->mapAnimationIterationCount(list.animation(childIndex), value); |
582 | childIndex = 1; |
583 | } |
584 | for ( ; childIndex < list.size(); ++childIndex) { |
585 | /* Reset all remaining animations to not have the property set. */ |
586 | list.animation(childIndex).clearIterationCount(); |
587 | } |
588 | } |
589 | static void applyInitialAnimationName(StyleResolver& styleResolver) |
590 | { |
591 | AnimationList& list = styleResolver.style()->ensureAnimations(); |
592 | if (list.isEmpty()) |
593 | list.append(Animation::create()); |
594 | list.animation(0).setName(Animation::initialName()); |
595 | for (size_t i = 1; i < list.size(); ++i) |
596 | list.animation(i).clearName(); |
597 | } |
598 | static void applyInheritAnimationName(StyleResolver& styleResolver) |
599 | { |
600 | auto& list = styleResolver.style()->ensureAnimations(); |
601 | auto* parentList = styleResolver.parentStyle()->animations(); |
602 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
603 | for ( ; i < parentSize && parentList->animation(i).isNameSet(); ++i) { |
604 | if (list.size() <= i) |
605 | list.append(Animation::create()); |
606 | list.animation(i).setName(parentList->animation(i).name()); |
607 | list.animation(i).setAnimationMode(parentList->animation(i).animationMode()); |
608 | } |
609 | |
610 | // Reset any remaining animations to not have the property set. |
611 | for ( ; i < list.size(); ++i) |
612 | list.animation(i).clearName(); |
613 | } |
614 | static void applyValueAnimationName(StyleResolver& styleResolver, CSSValue& value) |
615 | { |
616 | AnimationList& list = styleResolver.style()->ensureAnimations(); |
617 | size_t childIndex = 0; |
618 | if (is<CSSValueList>(value)) { |
619 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
620 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
621 | if (childIndex <= list.size()) |
622 | list.append(Animation::create()); |
623 | styleResolver.styleMap()->mapAnimationName(list.animation(childIndex), currentValue); |
624 | ++childIndex; |
625 | } |
626 | } else { |
627 | if (list.isEmpty()) |
628 | list.append(Animation::create()); |
629 | styleResolver.styleMap()->mapAnimationName(list.animation(childIndex), value); |
630 | childIndex = 1; |
631 | } |
632 | for ( ; childIndex < list.size(); ++childIndex) { |
633 | /* Reset all remaining animations to not have the property set. */ |
634 | list.animation(childIndex).clearName(); |
635 | } |
636 | } |
637 | static void applyInitialAnimationPlayState(StyleResolver& styleResolver) |
638 | { |
639 | AnimationList& list = styleResolver.style()->ensureAnimations(); |
640 | if (list.isEmpty()) |
641 | list.append(Animation::create()); |
642 | list.animation(0).setPlayState(Animation::initialPlayState()); |
643 | for (size_t i = 1; i < list.size(); ++i) |
644 | list.animation(i).clearPlayState(); |
645 | } |
646 | static void applyInheritAnimationPlayState(StyleResolver& styleResolver) |
647 | { |
648 | auto& list = styleResolver.style()->ensureAnimations(); |
649 | auto* parentList = styleResolver.parentStyle()->animations(); |
650 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
651 | for ( ; i < parentSize && parentList->animation(i).isPlayStateSet(); ++i) { |
652 | if (list.size() <= i) |
653 | list.append(Animation::create()); |
654 | list.animation(i).setPlayState(parentList->animation(i).playState()); |
655 | list.animation(i).setAnimationMode(parentList->animation(i).animationMode()); |
656 | } |
657 | |
658 | // Reset any remaining animations to not have the property set. |
659 | for ( ; i < list.size(); ++i) |
660 | list.animation(i).clearPlayState(); |
661 | } |
662 | static void applyValueAnimationPlayState(StyleResolver& styleResolver, CSSValue& value) |
663 | { |
664 | AnimationList& list = styleResolver.style()->ensureAnimations(); |
665 | size_t childIndex = 0; |
666 | if (is<CSSValueList>(value)) { |
667 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
668 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
669 | if (childIndex <= list.size()) |
670 | list.append(Animation::create()); |
671 | styleResolver.styleMap()->mapAnimationPlayState(list.animation(childIndex), currentValue); |
672 | ++childIndex; |
673 | } |
674 | } else { |
675 | if (list.isEmpty()) |
676 | list.append(Animation::create()); |
677 | styleResolver.styleMap()->mapAnimationPlayState(list.animation(childIndex), value); |
678 | childIndex = 1; |
679 | } |
680 | for ( ; childIndex < list.size(); ++childIndex) { |
681 | /* Reset all remaining animations to not have the property set. */ |
682 | list.animation(childIndex).clearPlayState(); |
683 | } |
684 | } |
685 | static void applyInitialAnimationTimingFunction(StyleResolver& styleResolver) |
686 | { |
687 | AnimationList& list = styleResolver.style()->ensureAnimations(); |
688 | if (list.isEmpty()) |
689 | list.append(Animation::create()); |
690 | list.animation(0).setTimingFunction(Animation::initialTimingFunction()); |
691 | for (size_t i = 1; i < list.size(); ++i) |
692 | list.animation(i).clearTimingFunction(); |
693 | } |
694 | static void applyInheritAnimationTimingFunction(StyleResolver& styleResolver) |
695 | { |
696 | auto& list = styleResolver.style()->ensureAnimations(); |
697 | auto* parentList = styleResolver.parentStyle()->animations(); |
698 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
699 | for ( ; i < parentSize && parentList->animation(i).isTimingFunctionSet(); ++i) { |
700 | if (list.size() <= i) |
701 | list.append(Animation::create()); |
702 | list.animation(i).setTimingFunction(parentList->animation(i).timingFunction()); |
703 | list.animation(i).setAnimationMode(parentList->animation(i).animationMode()); |
704 | } |
705 | |
706 | // Reset any remaining animations to not have the property set. |
707 | for ( ; i < list.size(); ++i) |
708 | list.animation(i).clearTimingFunction(); |
709 | } |
710 | static void applyValueAnimationTimingFunction(StyleResolver& styleResolver, CSSValue& value) |
711 | { |
712 | AnimationList& list = styleResolver.style()->ensureAnimations(); |
713 | size_t childIndex = 0; |
714 | if (is<CSSValueList>(value)) { |
715 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
716 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
717 | if (childIndex <= list.size()) |
718 | list.append(Animation::create()); |
719 | styleResolver.styleMap()->mapAnimationTimingFunction(list.animation(childIndex), currentValue); |
720 | ++childIndex; |
721 | } |
722 | } else { |
723 | if (list.isEmpty()) |
724 | list.append(Animation::create()); |
725 | styleResolver.styleMap()->mapAnimationTimingFunction(list.animation(childIndex), value); |
726 | childIndex = 1; |
727 | } |
728 | for ( ; childIndex < list.size(); ++childIndex) { |
729 | /* Reset all remaining animations to not have the property set. */ |
730 | list.animation(childIndex).clearTimingFunction(); |
731 | } |
732 | } |
733 | static void applyInitialBackgroundAttachment(StyleResolver& styleResolver) |
734 | { |
735 | // Check for (single-layer) no-op before clearing anything. |
736 | auto& layers = styleResolver.style()->backgroundLayers(); |
737 | if (!layers.next() && (!layers.isAttachmentSet() || layers.attachment() == FillLayer::initialFillAttachment(FillLayerType::Background))) |
738 | return; |
739 | |
740 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
741 | child->setAttachment(FillLayer::initialFillAttachment(FillLayerType::Background)); |
742 | for (child = child->next(); child; child = child->next()) |
743 | child->clearAttachment(); |
744 | } |
745 | static void applyInheritBackgroundAttachment(StyleResolver& styleResolver) |
746 | { |
747 | // Check for no-op before copying anything. |
748 | if (styleResolver.parentStyle()->backgroundLayers() == styleResolver.style()->backgroundLayers()) |
749 | return; |
750 | |
751 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
752 | FillLayer* previousChild = nullptr; |
753 | for (auto* parent = &styleResolver.parentStyle()->backgroundLayers(); parent && parent->isAttachmentSet(); parent = parent->next()) { |
754 | if (!child) { |
755 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
756 | child = previousChild->next(); |
757 | } |
758 | child->setAttachment(parent->attachment()); |
759 | previousChild = child; |
760 | child = previousChild->next(); |
761 | } |
762 | for (; child; child = child->next()) |
763 | child->clearAttachment(); |
764 | } |
765 | static void applyValueBackgroundAttachment(StyleResolver& styleResolver, CSSValue& value) |
766 | { |
767 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
768 | FillLayer* previousChild = nullptr; |
769 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
770 | // Walk each value and put it into a layer, creating new layers as needed. |
771 | for (auto& item : downcast<CSSValueList>(value)) { |
772 | if (!child) { |
773 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
774 | child = previousChild->next(); |
775 | } |
776 | styleResolver.styleMap()->mapFillAttachment(CSSPropertyBackgroundAttachment, *child, item); |
777 | previousChild = child; |
778 | child = child->next(); |
779 | } |
780 | } else { |
781 | styleResolver.styleMap()->mapFillAttachment(CSSPropertyBackgroundAttachment, *child, value); |
782 | child = child->next(); |
783 | } |
784 | for (; child; child = child->next()) |
785 | child->clearAttachment(); |
786 | } |
787 | static void applyInitialBackgroundBlendMode(StyleResolver& styleResolver) |
788 | { |
789 | // Check for (single-layer) no-op before clearing anything. |
790 | auto& layers = styleResolver.style()->backgroundLayers(); |
791 | if (!layers.next() && (!layers.isBlendModeSet() || layers.blendMode() == FillLayer::initialFillBlendMode(FillLayerType::Background))) |
792 | return; |
793 | |
794 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
795 | child->setBlendMode(FillLayer::initialFillBlendMode(FillLayerType::Background)); |
796 | for (child = child->next(); child; child = child->next()) |
797 | child->clearBlendMode(); |
798 | } |
799 | static void applyInheritBackgroundBlendMode(StyleResolver& styleResolver) |
800 | { |
801 | // Check for no-op before copying anything. |
802 | if (styleResolver.parentStyle()->backgroundLayers() == styleResolver.style()->backgroundLayers()) |
803 | return; |
804 | |
805 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
806 | FillLayer* previousChild = nullptr; |
807 | for (auto* parent = &styleResolver.parentStyle()->backgroundLayers(); parent && parent->isBlendModeSet(); parent = parent->next()) { |
808 | if (!child) { |
809 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
810 | child = previousChild->next(); |
811 | } |
812 | child->setBlendMode(parent->blendMode()); |
813 | previousChild = child; |
814 | child = previousChild->next(); |
815 | } |
816 | for (; child; child = child->next()) |
817 | child->clearBlendMode(); |
818 | } |
819 | static void applyValueBackgroundBlendMode(StyleResolver& styleResolver, CSSValue& value) |
820 | { |
821 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
822 | FillLayer* previousChild = nullptr; |
823 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
824 | // Walk each value and put it into a layer, creating new layers as needed. |
825 | for (auto& item : downcast<CSSValueList>(value)) { |
826 | if (!child) { |
827 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
828 | child = previousChild->next(); |
829 | } |
830 | styleResolver.styleMap()->mapFillBlendMode(CSSPropertyBackgroundBlendMode, *child, item); |
831 | previousChild = child; |
832 | child = child->next(); |
833 | } |
834 | } else { |
835 | styleResolver.styleMap()->mapFillBlendMode(CSSPropertyBackgroundBlendMode, *child, value); |
836 | child = child->next(); |
837 | } |
838 | for (; child; child = child->next()) |
839 | child->clearBlendMode(); |
840 | } |
841 | static void applyInitialBackgroundClip(StyleResolver& styleResolver) |
842 | { |
843 | // Check for (single-layer) no-op before clearing anything. |
844 | auto& layers = styleResolver.style()->backgroundLayers(); |
845 | if (!layers.next() && (!layers.isClipSet() || layers.clip() == FillLayer::initialFillClip(FillLayerType::Background))) |
846 | return; |
847 | |
848 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
849 | child->setClip(FillLayer::initialFillClip(FillLayerType::Background)); |
850 | for (child = child->next(); child; child = child->next()) |
851 | child->clearClip(); |
852 | } |
853 | static void applyInheritBackgroundClip(StyleResolver& styleResolver) |
854 | { |
855 | // Check for no-op before copying anything. |
856 | if (styleResolver.parentStyle()->backgroundLayers() == styleResolver.style()->backgroundLayers()) |
857 | return; |
858 | |
859 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
860 | FillLayer* previousChild = nullptr; |
861 | for (auto* parent = &styleResolver.parentStyle()->backgroundLayers(); parent && parent->isClipSet(); parent = parent->next()) { |
862 | if (!child) { |
863 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
864 | child = previousChild->next(); |
865 | } |
866 | child->setClip(parent->clip()); |
867 | previousChild = child; |
868 | child = previousChild->next(); |
869 | } |
870 | for (; child; child = child->next()) |
871 | child->clearClip(); |
872 | } |
873 | static void applyValueBackgroundClip(StyleResolver& styleResolver, CSSValue& value) |
874 | { |
875 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
876 | FillLayer* previousChild = nullptr; |
877 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
878 | // Walk each value and put it into a layer, creating new layers as needed. |
879 | for (auto& item : downcast<CSSValueList>(value)) { |
880 | if (!child) { |
881 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
882 | child = previousChild->next(); |
883 | } |
884 | styleResolver.styleMap()->mapFillClip(CSSPropertyBackgroundClip, *child, item); |
885 | previousChild = child; |
886 | child = child->next(); |
887 | } |
888 | } else { |
889 | styleResolver.styleMap()->mapFillClip(CSSPropertyBackgroundClip, *child, value); |
890 | child = child->next(); |
891 | } |
892 | for (; child; child = child->next()) |
893 | child->clearClip(); |
894 | } |
895 | static void applyInitialBackgroundColor(StyleResolver& styleResolver) |
896 | { |
897 | if (styleResolver.applyPropertyToRegularStyle()) |
898 | styleResolver.style()->setBackgroundColor(RenderStyle::initialBackgroundColor()); |
899 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
900 | styleResolver.style()->setVisitedLinkBackgroundColor(RenderStyle::initialBackgroundColor()); |
901 | } |
902 | static void applyInheritBackgroundColor(StyleResolver& styleResolver) |
903 | { |
904 | Color color = styleResolver.parentStyle()->backgroundColor(); |
905 | if (styleResolver.applyPropertyToRegularStyle()) |
906 | styleResolver.style()->setBackgroundColor(color); |
907 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
908 | styleResolver.style()->setVisitedLinkBackgroundColor(color); |
909 | } |
910 | static void applyValueBackgroundColor(StyleResolver& styleResolver, CSSValue& value) |
911 | { |
912 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
913 | if (styleResolver.applyPropertyToRegularStyle()) |
914 | styleResolver.style()->setBackgroundColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
915 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
916 | styleResolver.style()->setVisitedLinkBackgroundColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
917 | } |
918 | static void applyInitialBackgroundImage(StyleResolver& styleResolver) |
919 | { |
920 | // Check for (single-layer) no-op before clearing anything. |
921 | auto& layers = styleResolver.style()->backgroundLayers(); |
922 | if (!layers.next() && (!layers.isImageSet() || layers.image() == FillLayer::initialFillImage(FillLayerType::Background))) |
923 | return; |
924 | |
925 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
926 | child->setImage(FillLayer::initialFillImage(FillLayerType::Background)); |
927 | for (child = child->next(); child; child = child->next()) |
928 | child->clearImage(); |
929 | } |
930 | static void applyInheritBackgroundImage(StyleResolver& styleResolver) |
931 | { |
932 | // Check for no-op before copying anything. |
933 | if (styleResolver.parentStyle()->backgroundLayers() == styleResolver.style()->backgroundLayers()) |
934 | return; |
935 | |
936 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
937 | FillLayer* previousChild = nullptr; |
938 | for (auto* parent = &styleResolver.parentStyle()->backgroundLayers(); parent && parent->isImageSet(); parent = parent->next()) { |
939 | if (!child) { |
940 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
941 | child = previousChild->next(); |
942 | } |
943 | child->setImage(parent->image()); |
944 | previousChild = child; |
945 | child = previousChild->next(); |
946 | } |
947 | for (; child; child = child->next()) |
948 | child->clearImage(); |
949 | } |
950 | static void applyValueBackgroundImage(StyleResolver& styleResolver, CSSValue& value) |
951 | { |
952 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
953 | FillLayer* previousChild = nullptr; |
954 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
955 | // Walk each value and put it into a layer, creating new layers as needed. |
956 | for (auto& item : downcast<CSSValueList>(value)) { |
957 | if (!child) { |
958 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
959 | child = previousChild->next(); |
960 | } |
961 | styleResolver.styleMap()->mapFillImage(CSSPropertyBackgroundImage, *child, item); |
962 | previousChild = child; |
963 | child = child->next(); |
964 | } |
965 | } else { |
966 | styleResolver.styleMap()->mapFillImage(CSSPropertyBackgroundImage, *child, value); |
967 | child = child->next(); |
968 | } |
969 | for (; child; child = child->next()) |
970 | child->clearImage(); |
971 | } |
972 | static void applyInitialBackgroundOrigin(StyleResolver& styleResolver) |
973 | { |
974 | // Check for (single-layer) no-op before clearing anything. |
975 | auto& layers = styleResolver.style()->backgroundLayers(); |
976 | if (!layers.next() && (!layers.isOriginSet() || layers.origin() == FillLayer::initialFillOrigin(FillLayerType::Background))) |
977 | return; |
978 | |
979 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
980 | child->setOrigin(FillLayer::initialFillOrigin(FillLayerType::Background)); |
981 | for (child = child->next(); child; child = child->next()) |
982 | child->clearOrigin(); |
983 | } |
984 | static void applyInheritBackgroundOrigin(StyleResolver& styleResolver) |
985 | { |
986 | // Check for no-op before copying anything. |
987 | if (styleResolver.parentStyle()->backgroundLayers() == styleResolver.style()->backgroundLayers()) |
988 | return; |
989 | |
990 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
991 | FillLayer* previousChild = nullptr; |
992 | for (auto* parent = &styleResolver.parentStyle()->backgroundLayers(); parent && parent->isOriginSet(); parent = parent->next()) { |
993 | if (!child) { |
994 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
995 | child = previousChild->next(); |
996 | } |
997 | child->setOrigin(parent->origin()); |
998 | previousChild = child; |
999 | child = previousChild->next(); |
1000 | } |
1001 | for (; child; child = child->next()) |
1002 | child->clearOrigin(); |
1003 | } |
1004 | static void applyValueBackgroundOrigin(StyleResolver& styleResolver, CSSValue& value) |
1005 | { |
1006 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
1007 | FillLayer* previousChild = nullptr; |
1008 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
1009 | // Walk each value and put it into a layer, creating new layers as needed. |
1010 | for (auto& item : downcast<CSSValueList>(value)) { |
1011 | if (!child) { |
1012 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
1013 | child = previousChild->next(); |
1014 | } |
1015 | styleResolver.styleMap()->mapFillOrigin(CSSPropertyBackgroundOrigin, *child, item); |
1016 | previousChild = child; |
1017 | child = child->next(); |
1018 | } |
1019 | } else { |
1020 | styleResolver.styleMap()->mapFillOrigin(CSSPropertyBackgroundOrigin, *child, value); |
1021 | child = child->next(); |
1022 | } |
1023 | for (; child; child = child->next()) |
1024 | child->clearOrigin(); |
1025 | } |
1026 | static void applyInitialBackgroundPositionX(StyleResolver& styleResolver) |
1027 | { |
1028 | // Check for (single-layer) no-op before clearing anything. |
1029 | auto& layers = styleResolver.style()->backgroundLayers(); |
1030 | if (!layers.next() && (!layers.isXPositionSet() || layers.xPosition() == FillLayer::initialFillXPosition(FillLayerType::Background))) |
1031 | return; |
1032 | |
1033 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
1034 | child->setXPosition(FillLayer::initialFillXPosition(FillLayerType::Background)); |
1035 | for (child = child->next(); child; child = child->next()) |
1036 | child->clearXPosition(); |
1037 | } |
1038 | static void applyInheritBackgroundPositionX(StyleResolver& styleResolver) |
1039 | { |
1040 | // Check for no-op before copying anything. |
1041 | if (styleResolver.parentStyle()->backgroundLayers() == styleResolver.style()->backgroundLayers()) |
1042 | return; |
1043 | |
1044 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
1045 | FillLayer* previousChild = nullptr; |
1046 | for (auto* parent = &styleResolver.parentStyle()->backgroundLayers(); parent && parent->isXPositionSet(); parent = parent->next()) { |
1047 | if (!child) { |
1048 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
1049 | child = previousChild->next(); |
1050 | } |
1051 | child->setXPosition(parent->xPosition()); |
1052 | previousChild = child; |
1053 | child = previousChild->next(); |
1054 | } |
1055 | for (; child; child = child->next()) |
1056 | child->clearXPosition(); |
1057 | } |
1058 | static void applyValueBackgroundPositionX(StyleResolver& styleResolver, CSSValue& value) |
1059 | { |
1060 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
1061 | FillLayer* previousChild = nullptr; |
1062 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
1063 | // Walk each value and put it into a layer, creating new layers as needed. |
1064 | for (auto& item : downcast<CSSValueList>(value)) { |
1065 | if (!child) { |
1066 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
1067 | child = previousChild->next(); |
1068 | } |
1069 | styleResolver.styleMap()->mapFillXPosition(CSSPropertyBackgroundPositionX, *child, item); |
1070 | previousChild = child; |
1071 | child = child->next(); |
1072 | } |
1073 | } else { |
1074 | styleResolver.styleMap()->mapFillXPosition(CSSPropertyBackgroundPositionX, *child, value); |
1075 | child = child->next(); |
1076 | } |
1077 | for (; child; child = child->next()) |
1078 | child->clearXPosition(); |
1079 | } |
1080 | static void applyInitialBackgroundPositionY(StyleResolver& styleResolver) |
1081 | { |
1082 | // Check for (single-layer) no-op before clearing anything. |
1083 | auto& layers = styleResolver.style()->backgroundLayers(); |
1084 | if (!layers.next() && (!layers.isYPositionSet() || layers.yPosition() == FillLayer::initialFillYPosition(FillLayerType::Background))) |
1085 | return; |
1086 | |
1087 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
1088 | child->setYPosition(FillLayer::initialFillYPosition(FillLayerType::Background)); |
1089 | for (child = child->next(); child; child = child->next()) |
1090 | child->clearYPosition(); |
1091 | } |
1092 | static void applyInheritBackgroundPositionY(StyleResolver& styleResolver) |
1093 | { |
1094 | // Check for no-op before copying anything. |
1095 | if (styleResolver.parentStyle()->backgroundLayers() == styleResolver.style()->backgroundLayers()) |
1096 | return; |
1097 | |
1098 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
1099 | FillLayer* previousChild = nullptr; |
1100 | for (auto* parent = &styleResolver.parentStyle()->backgroundLayers(); parent && parent->isYPositionSet(); parent = parent->next()) { |
1101 | if (!child) { |
1102 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
1103 | child = previousChild->next(); |
1104 | } |
1105 | child->setYPosition(parent->yPosition()); |
1106 | previousChild = child; |
1107 | child = previousChild->next(); |
1108 | } |
1109 | for (; child; child = child->next()) |
1110 | child->clearYPosition(); |
1111 | } |
1112 | static void applyValueBackgroundPositionY(StyleResolver& styleResolver, CSSValue& value) |
1113 | { |
1114 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
1115 | FillLayer* previousChild = nullptr; |
1116 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
1117 | // Walk each value and put it into a layer, creating new layers as needed. |
1118 | for (auto& item : downcast<CSSValueList>(value)) { |
1119 | if (!child) { |
1120 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
1121 | child = previousChild->next(); |
1122 | } |
1123 | styleResolver.styleMap()->mapFillYPosition(CSSPropertyBackgroundPositionY, *child, item); |
1124 | previousChild = child; |
1125 | child = child->next(); |
1126 | } |
1127 | } else { |
1128 | styleResolver.styleMap()->mapFillYPosition(CSSPropertyBackgroundPositionY, *child, value); |
1129 | child = child->next(); |
1130 | } |
1131 | for (; child; child = child->next()) |
1132 | child->clearYPosition(); |
1133 | } |
1134 | static void applyInitialBackgroundRepeatX(StyleResolver& styleResolver) |
1135 | { |
1136 | // Check for (single-layer) no-op before clearing anything. |
1137 | auto& layers = styleResolver.style()->backgroundLayers(); |
1138 | if (!layers.next() && (!layers.isRepeatXSet() || layers.repeatX() == FillLayer::initialFillRepeatX(FillLayerType::Background))) |
1139 | return; |
1140 | |
1141 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
1142 | child->setRepeatX(FillLayer::initialFillRepeatX(FillLayerType::Background)); |
1143 | for (child = child->next(); child; child = child->next()) |
1144 | child->clearRepeatX(); |
1145 | } |
1146 | static void applyInheritBackgroundRepeatX(StyleResolver& styleResolver) |
1147 | { |
1148 | // Check for no-op before copying anything. |
1149 | if (styleResolver.parentStyle()->backgroundLayers() == styleResolver.style()->backgroundLayers()) |
1150 | return; |
1151 | |
1152 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
1153 | FillLayer* previousChild = nullptr; |
1154 | for (auto* parent = &styleResolver.parentStyle()->backgroundLayers(); parent && parent->isRepeatXSet(); parent = parent->next()) { |
1155 | if (!child) { |
1156 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
1157 | child = previousChild->next(); |
1158 | } |
1159 | child->setRepeatX(parent->repeatX()); |
1160 | previousChild = child; |
1161 | child = previousChild->next(); |
1162 | } |
1163 | for (; child; child = child->next()) |
1164 | child->clearRepeatX(); |
1165 | } |
1166 | static void applyValueBackgroundRepeatX(StyleResolver& styleResolver, CSSValue& value) |
1167 | { |
1168 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
1169 | FillLayer* previousChild = nullptr; |
1170 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
1171 | // Walk each value and put it into a layer, creating new layers as needed. |
1172 | for (auto& item : downcast<CSSValueList>(value)) { |
1173 | if (!child) { |
1174 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
1175 | child = previousChild->next(); |
1176 | } |
1177 | styleResolver.styleMap()->mapFillRepeatX(CSSPropertyBackgroundRepeatX, *child, item); |
1178 | previousChild = child; |
1179 | child = child->next(); |
1180 | } |
1181 | } else { |
1182 | styleResolver.styleMap()->mapFillRepeatX(CSSPropertyBackgroundRepeatX, *child, value); |
1183 | child = child->next(); |
1184 | } |
1185 | for (; child; child = child->next()) |
1186 | child->clearRepeatX(); |
1187 | } |
1188 | static void applyInitialBackgroundRepeatY(StyleResolver& styleResolver) |
1189 | { |
1190 | // Check for (single-layer) no-op before clearing anything. |
1191 | auto& layers = styleResolver.style()->backgroundLayers(); |
1192 | if (!layers.next() && (!layers.isRepeatYSet() || layers.repeatY() == FillLayer::initialFillRepeatY(FillLayerType::Background))) |
1193 | return; |
1194 | |
1195 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
1196 | child->setRepeatY(FillLayer::initialFillRepeatY(FillLayerType::Background)); |
1197 | for (child = child->next(); child; child = child->next()) |
1198 | child->clearRepeatY(); |
1199 | } |
1200 | static void applyInheritBackgroundRepeatY(StyleResolver& styleResolver) |
1201 | { |
1202 | // Check for no-op before copying anything. |
1203 | if (styleResolver.parentStyle()->backgroundLayers() == styleResolver.style()->backgroundLayers()) |
1204 | return; |
1205 | |
1206 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
1207 | FillLayer* previousChild = nullptr; |
1208 | for (auto* parent = &styleResolver.parentStyle()->backgroundLayers(); parent && parent->isRepeatYSet(); parent = parent->next()) { |
1209 | if (!child) { |
1210 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
1211 | child = previousChild->next(); |
1212 | } |
1213 | child->setRepeatY(parent->repeatY()); |
1214 | previousChild = child; |
1215 | child = previousChild->next(); |
1216 | } |
1217 | for (; child; child = child->next()) |
1218 | child->clearRepeatY(); |
1219 | } |
1220 | static void applyValueBackgroundRepeatY(StyleResolver& styleResolver, CSSValue& value) |
1221 | { |
1222 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
1223 | FillLayer* previousChild = nullptr; |
1224 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
1225 | // Walk each value and put it into a layer, creating new layers as needed. |
1226 | for (auto& item : downcast<CSSValueList>(value)) { |
1227 | if (!child) { |
1228 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
1229 | child = previousChild->next(); |
1230 | } |
1231 | styleResolver.styleMap()->mapFillRepeatY(CSSPropertyBackgroundRepeatY, *child, item); |
1232 | previousChild = child; |
1233 | child = child->next(); |
1234 | } |
1235 | } else { |
1236 | styleResolver.styleMap()->mapFillRepeatY(CSSPropertyBackgroundRepeatY, *child, value); |
1237 | child = child->next(); |
1238 | } |
1239 | for (; child; child = child->next()) |
1240 | child->clearRepeatY(); |
1241 | } |
1242 | static void applyInitialBackgroundSize(StyleResolver& styleResolver) |
1243 | { |
1244 | // Check for (single-layer) no-op before clearing anything. |
1245 | auto& layers = styleResolver.style()->backgroundLayers(); |
1246 | if (!layers.next() && (!layers.isSizeSet() || layers.size() == FillLayer::initialFillSize(FillLayerType::Background))) |
1247 | return; |
1248 | |
1249 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
1250 | child->setSize(FillLayer::initialFillSize(FillLayerType::Background)); |
1251 | for (child = child->next(); child; child = child->next()) |
1252 | child->clearSize(); |
1253 | } |
1254 | static void applyInheritBackgroundSize(StyleResolver& styleResolver) |
1255 | { |
1256 | // Check for no-op before copying anything. |
1257 | if (styleResolver.parentStyle()->backgroundLayers() == styleResolver.style()->backgroundLayers()) |
1258 | return; |
1259 | |
1260 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
1261 | FillLayer* previousChild = nullptr; |
1262 | for (auto* parent = &styleResolver.parentStyle()->backgroundLayers(); parent && parent->isSizeSet(); parent = parent->next()) { |
1263 | if (!child) { |
1264 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
1265 | child = previousChild->next(); |
1266 | } |
1267 | child->setSize(parent->size()); |
1268 | previousChild = child; |
1269 | child = previousChild->next(); |
1270 | } |
1271 | for (; child; child = child->next()) |
1272 | child->clearSize(); |
1273 | } |
1274 | static void applyValueBackgroundSize(StyleResolver& styleResolver, CSSValue& value) |
1275 | { |
1276 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
1277 | FillLayer* previousChild = nullptr; |
1278 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
1279 | // Walk each value and put it into a layer, creating new layers as needed. |
1280 | for (auto& item : downcast<CSSValueList>(value)) { |
1281 | if (!child) { |
1282 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
1283 | child = previousChild->next(); |
1284 | } |
1285 | styleResolver.styleMap()->mapFillSize(CSSPropertyBackgroundSize, *child, item); |
1286 | previousChild = child; |
1287 | child = child->next(); |
1288 | } |
1289 | } else { |
1290 | styleResolver.styleMap()->mapFillSize(CSSPropertyBackgroundSize, *child, value); |
1291 | child = child->next(); |
1292 | } |
1293 | for (; child; child = child->next()) |
1294 | child->clearSize(); |
1295 | } |
1296 | static void applyInitialBaselineShift(StyleResolver& styleResolver) |
1297 | { |
1298 | styleResolver.style()->accessSVGStyle().setBaselineShift(SVGRenderStyle::initialBaselineShift()); |
1299 | } |
1300 | static void applyInheritBaselineShift(StyleResolver& styleResolver) |
1301 | { |
1302 | styleResolver.style()->accessSVGStyle().setBaselineShift(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().baselineShift())); |
1303 | } |
1304 | static void applyInitialBorderBottomColor(StyleResolver& styleResolver) |
1305 | { |
1306 | if (styleResolver.applyPropertyToRegularStyle()) |
1307 | styleResolver.style()->setBorderBottomColor(RenderStyle::invalidColor()); |
1308 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
1309 | styleResolver.style()->setVisitedLinkBorderBottomColor(RenderStyle::invalidColor()); |
1310 | } |
1311 | static void applyInheritBorderBottomColor(StyleResolver& styleResolver) |
1312 | { |
1313 | Color color = styleResolver.parentStyle()->borderBottomColor(); |
1314 | if (!color.isValid()) |
1315 | color = styleResolver.parentStyle()->color(); |
1316 | if (styleResolver.applyPropertyToRegularStyle()) |
1317 | styleResolver.style()->setBorderBottomColor(color); |
1318 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
1319 | styleResolver.style()->setVisitedLinkBorderBottomColor(color); |
1320 | } |
1321 | static void applyValueBorderBottomColor(StyleResolver& styleResolver, CSSValue& value) |
1322 | { |
1323 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
1324 | if (styleResolver.applyPropertyToRegularStyle()) |
1325 | styleResolver.style()->setBorderBottomColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
1326 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
1327 | styleResolver.style()->setVisitedLinkBorderBottomColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
1328 | } |
1329 | static void applyInitialBorderBottomLeftRadius(StyleResolver& styleResolver) |
1330 | { |
1331 | styleResolver.style()->setBorderBottomLeftRadius(RenderStyle::initialBorderRadius()); |
1332 | } |
1333 | static void applyInheritBorderBottomLeftRadius(StyleResolver& styleResolver) |
1334 | { |
1335 | styleResolver.style()->setBorderBottomLeftRadius(forwardInheritedValue(styleResolver.parentStyle()->borderBottomLeftRadius())); |
1336 | } |
1337 | static void applyValueBorderBottomLeftRadius(StyleResolver& styleResolver, CSSValue& value) |
1338 | { |
1339 | styleResolver.style()->setBorderBottomLeftRadius(StyleBuilderConverter::convertRadius(styleResolver, value)); |
1340 | } |
1341 | static void applyInitialBorderBottomRightRadius(StyleResolver& styleResolver) |
1342 | { |
1343 | styleResolver.style()->setBorderBottomRightRadius(RenderStyle::initialBorderRadius()); |
1344 | } |
1345 | static void applyInheritBorderBottomRightRadius(StyleResolver& styleResolver) |
1346 | { |
1347 | styleResolver.style()->setBorderBottomRightRadius(forwardInheritedValue(styleResolver.parentStyle()->borderBottomRightRadius())); |
1348 | } |
1349 | static void applyValueBorderBottomRightRadius(StyleResolver& styleResolver, CSSValue& value) |
1350 | { |
1351 | styleResolver.style()->setBorderBottomRightRadius(StyleBuilderConverter::convertRadius(styleResolver, value)); |
1352 | } |
1353 | static void applyInitialBorderBottomStyle(StyleResolver& styleResolver) |
1354 | { |
1355 | styleResolver.style()->setBorderBottomStyle(RenderStyle::initialBorderStyle()); |
1356 | } |
1357 | static void applyInheritBorderBottomStyle(StyleResolver& styleResolver) |
1358 | { |
1359 | styleResolver.style()->setBorderBottomStyle(forwardInheritedValue(styleResolver.parentStyle()->borderBottomStyle())); |
1360 | } |
1361 | static void applyValueBorderBottomStyle(StyleResolver& styleResolver, CSSValue& value) |
1362 | { |
1363 | styleResolver.style()->setBorderBottomStyle(downcast<CSSPrimitiveValue>(value)); |
1364 | } |
1365 | static void applyInitialBorderBottomWidth(StyleResolver& styleResolver) |
1366 | { |
1367 | styleResolver.style()->setBorderBottomWidth(RenderStyle::initialBorderWidth()); |
1368 | } |
1369 | static void applyInheritBorderBottomWidth(StyleResolver& styleResolver) |
1370 | { |
1371 | styleResolver.style()->setBorderBottomWidth(forwardInheritedValue(styleResolver.parentStyle()->borderBottomWidth())); |
1372 | } |
1373 | static void applyValueBorderBottomWidth(StyleResolver& styleResolver, CSSValue& value) |
1374 | { |
1375 | styleResolver.style()->setBorderBottomWidth(StyleBuilderConverter::convertLineWidth<float>(styleResolver, value)); |
1376 | } |
1377 | static void applyInitialBorderCollapse(StyleResolver& styleResolver) |
1378 | { |
1379 | styleResolver.style()->setBorderCollapse(RenderStyle::initialBorderCollapse()); |
1380 | } |
1381 | static void applyInheritBorderCollapse(StyleResolver& styleResolver) |
1382 | { |
1383 | styleResolver.style()->setBorderCollapse(forwardInheritedValue(styleResolver.parentStyle()->borderCollapse())); |
1384 | } |
1385 | static void applyValueBorderCollapse(StyleResolver& styleResolver, CSSValue& value) |
1386 | { |
1387 | styleResolver.style()->setBorderCollapse(downcast<CSSPrimitiveValue>(value)); |
1388 | } |
1389 | static void applyInitialBorderImageSource(StyleResolver& styleResolver) |
1390 | { |
1391 | styleResolver.style()->setBorderImageSource(RenderStyle::initialBorderImageSource()); |
1392 | } |
1393 | static void applyInheritBorderImageSource(StyleResolver& styleResolver) |
1394 | { |
1395 | styleResolver.style()->setBorderImageSource(forwardInheritedValue(styleResolver.parentStyle()->borderImageSource())); |
1396 | } |
1397 | static void applyValueBorderImageSource(StyleResolver& styleResolver, CSSValue& value) |
1398 | { |
1399 | styleResolver.style()->setBorderImageSource(StyleBuilderConverter::convertStyleImage<CSSPropertyBorderImageSource>(styleResolver, value)); |
1400 | } |
1401 | static void applyInitialBorderLeftColor(StyleResolver& styleResolver) |
1402 | { |
1403 | if (styleResolver.applyPropertyToRegularStyle()) |
1404 | styleResolver.style()->setBorderLeftColor(RenderStyle::invalidColor()); |
1405 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
1406 | styleResolver.style()->setVisitedLinkBorderLeftColor(RenderStyle::invalidColor()); |
1407 | } |
1408 | static void applyInheritBorderLeftColor(StyleResolver& styleResolver) |
1409 | { |
1410 | Color color = styleResolver.parentStyle()->borderLeftColor(); |
1411 | if (!color.isValid()) |
1412 | color = styleResolver.parentStyle()->color(); |
1413 | if (styleResolver.applyPropertyToRegularStyle()) |
1414 | styleResolver.style()->setBorderLeftColor(color); |
1415 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
1416 | styleResolver.style()->setVisitedLinkBorderLeftColor(color); |
1417 | } |
1418 | static void applyValueBorderLeftColor(StyleResolver& styleResolver, CSSValue& value) |
1419 | { |
1420 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
1421 | if (styleResolver.applyPropertyToRegularStyle()) |
1422 | styleResolver.style()->setBorderLeftColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
1423 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
1424 | styleResolver.style()->setVisitedLinkBorderLeftColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
1425 | } |
1426 | static void applyInitialBorderLeftStyle(StyleResolver& styleResolver) |
1427 | { |
1428 | styleResolver.style()->setBorderLeftStyle(RenderStyle::initialBorderStyle()); |
1429 | } |
1430 | static void applyInheritBorderLeftStyle(StyleResolver& styleResolver) |
1431 | { |
1432 | styleResolver.style()->setBorderLeftStyle(forwardInheritedValue(styleResolver.parentStyle()->borderLeftStyle())); |
1433 | } |
1434 | static void applyValueBorderLeftStyle(StyleResolver& styleResolver, CSSValue& value) |
1435 | { |
1436 | styleResolver.style()->setBorderLeftStyle(downcast<CSSPrimitiveValue>(value)); |
1437 | } |
1438 | static void applyInitialBorderLeftWidth(StyleResolver& styleResolver) |
1439 | { |
1440 | styleResolver.style()->setBorderLeftWidth(RenderStyle::initialBorderWidth()); |
1441 | } |
1442 | static void applyInheritBorderLeftWidth(StyleResolver& styleResolver) |
1443 | { |
1444 | styleResolver.style()->setBorderLeftWidth(forwardInheritedValue(styleResolver.parentStyle()->borderLeftWidth())); |
1445 | } |
1446 | static void applyValueBorderLeftWidth(StyleResolver& styleResolver, CSSValue& value) |
1447 | { |
1448 | styleResolver.style()->setBorderLeftWidth(StyleBuilderConverter::convertLineWidth<float>(styleResolver, value)); |
1449 | } |
1450 | static void applyInitialBorderRightColor(StyleResolver& styleResolver) |
1451 | { |
1452 | if (styleResolver.applyPropertyToRegularStyle()) |
1453 | styleResolver.style()->setBorderRightColor(RenderStyle::invalidColor()); |
1454 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
1455 | styleResolver.style()->setVisitedLinkBorderRightColor(RenderStyle::invalidColor()); |
1456 | } |
1457 | static void applyInheritBorderRightColor(StyleResolver& styleResolver) |
1458 | { |
1459 | Color color = styleResolver.parentStyle()->borderRightColor(); |
1460 | if (!color.isValid()) |
1461 | color = styleResolver.parentStyle()->color(); |
1462 | if (styleResolver.applyPropertyToRegularStyle()) |
1463 | styleResolver.style()->setBorderRightColor(color); |
1464 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
1465 | styleResolver.style()->setVisitedLinkBorderRightColor(color); |
1466 | } |
1467 | static void applyValueBorderRightColor(StyleResolver& styleResolver, CSSValue& value) |
1468 | { |
1469 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
1470 | if (styleResolver.applyPropertyToRegularStyle()) |
1471 | styleResolver.style()->setBorderRightColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
1472 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
1473 | styleResolver.style()->setVisitedLinkBorderRightColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
1474 | } |
1475 | static void applyInitialBorderRightStyle(StyleResolver& styleResolver) |
1476 | { |
1477 | styleResolver.style()->setBorderRightStyle(RenderStyle::initialBorderStyle()); |
1478 | } |
1479 | static void applyInheritBorderRightStyle(StyleResolver& styleResolver) |
1480 | { |
1481 | styleResolver.style()->setBorderRightStyle(forwardInheritedValue(styleResolver.parentStyle()->borderRightStyle())); |
1482 | } |
1483 | static void applyValueBorderRightStyle(StyleResolver& styleResolver, CSSValue& value) |
1484 | { |
1485 | styleResolver.style()->setBorderRightStyle(downcast<CSSPrimitiveValue>(value)); |
1486 | } |
1487 | static void applyInitialBorderRightWidth(StyleResolver& styleResolver) |
1488 | { |
1489 | styleResolver.style()->setBorderRightWidth(RenderStyle::initialBorderWidth()); |
1490 | } |
1491 | static void applyInheritBorderRightWidth(StyleResolver& styleResolver) |
1492 | { |
1493 | styleResolver.style()->setBorderRightWidth(forwardInheritedValue(styleResolver.parentStyle()->borderRightWidth())); |
1494 | } |
1495 | static void applyValueBorderRightWidth(StyleResolver& styleResolver, CSSValue& value) |
1496 | { |
1497 | styleResolver.style()->setBorderRightWidth(StyleBuilderConverter::convertLineWidth<float>(styleResolver, value)); |
1498 | } |
1499 | static void applyInitialBorderTopColor(StyleResolver& styleResolver) |
1500 | { |
1501 | if (styleResolver.applyPropertyToRegularStyle()) |
1502 | styleResolver.style()->setBorderTopColor(RenderStyle::invalidColor()); |
1503 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
1504 | styleResolver.style()->setVisitedLinkBorderTopColor(RenderStyle::invalidColor()); |
1505 | } |
1506 | static void applyInheritBorderTopColor(StyleResolver& styleResolver) |
1507 | { |
1508 | Color color = styleResolver.parentStyle()->borderTopColor(); |
1509 | if (!color.isValid()) |
1510 | color = styleResolver.parentStyle()->color(); |
1511 | if (styleResolver.applyPropertyToRegularStyle()) |
1512 | styleResolver.style()->setBorderTopColor(color); |
1513 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
1514 | styleResolver.style()->setVisitedLinkBorderTopColor(color); |
1515 | } |
1516 | static void applyValueBorderTopColor(StyleResolver& styleResolver, CSSValue& value) |
1517 | { |
1518 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
1519 | if (styleResolver.applyPropertyToRegularStyle()) |
1520 | styleResolver.style()->setBorderTopColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
1521 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
1522 | styleResolver.style()->setVisitedLinkBorderTopColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
1523 | } |
1524 | static void applyInitialBorderTopLeftRadius(StyleResolver& styleResolver) |
1525 | { |
1526 | styleResolver.style()->setBorderTopLeftRadius(RenderStyle::initialBorderRadius()); |
1527 | } |
1528 | static void applyInheritBorderTopLeftRadius(StyleResolver& styleResolver) |
1529 | { |
1530 | styleResolver.style()->setBorderTopLeftRadius(forwardInheritedValue(styleResolver.parentStyle()->borderTopLeftRadius())); |
1531 | } |
1532 | static void applyValueBorderTopLeftRadius(StyleResolver& styleResolver, CSSValue& value) |
1533 | { |
1534 | styleResolver.style()->setBorderTopLeftRadius(StyleBuilderConverter::convertRadius(styleResolver, value)); |
1535 | } |
1536 | static void applyInitialBorderTopRightRadius(StyleResolver& styleResolver) |
1537 | { |
1538 | styleResolver.style()->setBorderTopRightRadius(RenderStyle::initialBorderRadius()); |
1539 | } |
1540 | static void applyInheritBorderTopRightRadius(StyleResolver& styleResolver) |
1541 | { |
1542 | styleResolver.style()->setBorderTopRightRadius(forwardInheritedValue(styleResolver.parentStyle()->borderTopRightRadius())); |
1543 | } |
1544 | static void applyValueBorderTopRightRadius(StyleResolver& styleResolver, CSSValue& value) |
1545 | { |
1546 | styleResolver.style()->setBorderTopRightRadius(StyleBuilderConverter::convertRadius(styleResolver, value)); |
1547 | } |
1548 | static void applyInitialBorderTopStyle(StyleResolver& styleResolver) |
1549 | { |
1550 | styleResolver.style()->setBorderTopStyle(RenderStyle::initialBorderStyle()); |
1551 | } |
1552 | static void applyInheritBorderTopStyle(StyleResolver& styleResolver) |
1553 | { |
1554 | styleResolver.style()->setBorderTopStyle(forwardInheritedValue(styleResolver.parentStyle()->borderTopStyle())); |
1555 | } |
1556 | static void applyValueBorderTopStyle(StyleResolver& styleResolver, CSSValue& value) |
1557 | { |
1558 | styleResolver.style()->setBorderTopStyle(downcast<CSSPrimitiveValue>(value)); |
1559 | } |
1560 | static void applyInitialBorderTopWidth(StyleResolver& styleResolver) |
1561 | { |
1562 | styleResolver.style()->setBorderTopWidth(RenderStyle::initialBorderWidth()); |
1563 | } |
1564 | static void applyInheritBorderTopWidth(StyleResolver& styleResolver) |
1565 | { |
1566 | styleResolver.style()->setBorderTopWidth(forwardInheritedValue(styleResolver.parentStyle()->borderTopWidth())); |
1567 | } |
1568 | static void applyValueBorderTopWidth(StyleResolver& styleResolver, CSSValue& value) |
1569 | { |
1570 | styleResolver.style()->setBorderTopWidth(StyleBuilderConverter::convertLineWidth<float>(styleResolver, value)); |
1571 | } |
1572 | static void applyInitialBottom(StyleResolver& styleResolver) |
1573 | { |
1574 | styleResolver.style()->setBottom(RenderStyle::initialOffset()); |
1575 | } |
1576 | static void applyInheritBottom(StyleResolver& styleResolver) |
1577 | { |
1578 | styleResolver.style()->setBottom(forwardInheritedValue(styleResolver.parentStyle()->bottom())); |
1579 | } |
1580 | static void applyValueBottom(StyleResolver& styleResolver, CSSValue& value) |
1581 | { |
1582 | styleResolver.style()->setBottom(StyleBuilderConverter::convertLengthOrAuto(styleResolver, value)); |
1583 | } |
1584 | static void applyInitialBoxSizing(StyleResolver& styleResolver) |
1585 | { |
1586 | styleResolver.style()->setBoxSizing(RenderStyle::initialBoxSizing()); |
1587 | } |
1588 | static void applyInheritBoxSizing(StyleResolver& styleResolver) |
1589 | { |
1590 | styleResolver.style()->setBoxSizing(forwardInheritedValue(styleResolver.parentStyle()->boxSizing())); |
1591 | } |
1592 | static void applyValueBoxSizing(StyleResolver& styleResolver, CSSValue& value) |
1593 | { |
1594 | styleResolver.style()->setBoxSizing(downcast<CSSPrimitiveValue>(value)); |
1595 | } |
1596 | static void applyInitialBreakAfter(StyleResolver& styleResolver) |
1597 | { |
1598 | styleResolver.style()->setBreakAfter(RenderStyle::initialBreakBetween()); |
1599 | } |
1600 | static void applyInheritBreakAfter(StyleResolver& styleResolver) |
1601 | { |
1602 | styleResolver.style()->setBreakAfter(forwardInheritedValue(styleResolver.parentStyle()->breakAfter())); |
1603 | } |
1604 | static void applyValueBreakAfter(StyleResolver& styleResolver, CSSValue& value) |
1605 | { |
1606 | styleResolver.style()->setBreakAfter(downcast<CSSPrimitiveValue>(value)); |
1607 | } |
1608 | static void applyInitialBreakBefore(StyleResolver& styleResolver) |
1609 | { |
1610 | styleResolver.style()->setBreakBefore(RenderStyle::initialBreakBetween()); |
1611 | } |
1612 | static void applyInheritBreakBefore(StyleResolver& styleResolver) |
1613 | { |
1614 | styleResolver.style()->setBreakBefore(forwardInheritedValue(styleResolver.parentStyle()->breakBefore())); |
1615 | } |
1616 | static void applyValueBreakBefore(StyleResolver& styleResolver, CSSValue& value) |
1617 | { |
1618 | styleResolver.style()->setBreakBefore(downcast<CSSPrimitiveValue>(value)); |
1619 | } |
1620 | static void applyInitialBreakInside(StyleResolver& styleResolver) |
1621 | { |
1622 | styleResolver.style()->setBreakInside(RenderStyle::initialBreakInside()); |
1623 | } |
1624 | static void applyInheritBreakInside(StyleResolver& styleResolver) |
1625 | { |
1626 | styleResolver.style()->setBreakInside(forwardInheritedValue(styleResolver.parentStyle()->breakInside())); |
1627 | } |
1628 | static void applyValueBreakInside(StyleResolver& styleResolver, CSSValue& value) |
1629 | { |
1630 | styleResolver.style()->setBreakInside(downcast<CSSPrimitiveValue>(value)); |
1631 | } |
1632 | static void applyInitialBufferedRendering(StyleResolver& styleResolver) |
1633 | { |
1634 | styleResolver.style()->accessSVGStyle().setBufferedRendering(SVGRenderStyle::initialBufferedRendering()); |
1635 | } |
1636 | static void applyInheritBufferedRendering(StyleResolver& styleResolver) |
1637 | { |
1638 | styleResolver.style()->accessSVGStyle().setBufferedRendering(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().bufferedRendering())); |
1639 | } |
1640 | static void applyValueBufferedRendering(StyleResolver& styleResolver, CSSValue& value) |
1641 | { |
1642 | styleResolver.style()->accessSVGStyle().setBufferedRendering(downcast<CSSPrimitiveValue>(value)); |
1643 | } |
1644 | static void applyInitialCaptionSide(StyleResolver& styleResolver) |
1645 | { |
1646 | styleResolver.style()->setCaptionSide(RenderStyle::initialCaptionSide()); |
1647 | } |
1648 | static void applyInheritCaptionSide(StyleResolver& styleResolver) |
1649 | { |
1650 | styleResolver.style()->setCaptionSide(forwardInheritedValue(styleResolver.parentStyle()->captionSide())); |
1651 | } |
1652 | static void applyValueCaptionSide(StyleResolver& styleResolver, CSSValue& value) |
1653 | { |
1654 | styleResolver.style()->setCaptionSide(downcast<CSSPrimitiveValue>(value)); |
1655 | } |
1656 | static void applyInitialCaretColor(StyleResolver& styleResolver) |
1657 | { |
1658 | if (styleResolver.applyPropertyToRegularStyle()) |
1659 | styleResolver.style()->setCaretColor(RenderStyle::invalidColor()); |
1660 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
1661 | styleResolver.style()->setVisitedLinkCaretColor(RenderStyle::invalidColor()); |
1662 | } |
1663 | static void applyInheritCaretColor(StyleResolver& styleResolver) |
1664 | { |
1665 | Color color = styleResolver.parentStyle()->caretColor(); |
1666 | if (!color.isValid()) |
1667 | color = styleResolver.parentStyle()->color(); |
1668 | if (styleResolver.applyPropertyToRegularStyle()) |
1669 | styleResolver.style()->setCaretColor(color); |
1670 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
1671 | styleResolver.style()->setVisitedLinkCaretColor(color); |
1672 | } |
1673 | static void applyValueCaretColor(StyleResolver& styleResolver, CSSValue& value) |
1674 | { |
1675 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
1676 | if (styleResolver.applyPropertyToRegularStyle()) |
1677 | styleResolver.style()->setCaretColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
1678 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
1679 | styleResolver.style()->setVisitedLinkCaretColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
1680 | } |
1681 | static void applyInitialClear(StyleResolver& styleResolver) |
1682 | { |
1683 | styleResolver.style()->setClear(RenderStyle::initialClear()); |
1684 | } |
1685 | static void applyInheritClear(StyleResolver& styleResolver) |
1686 | { |
1687 | styleResolver.style()->setClear(forwardInheritedValue(styleResolver.parentStyle()->clear())); |
1688 | } |
1689 | static void applyValueClear(StyleResolver& styleResolver, CSSValue& value) |
1690 | { |
1691 | styleResolver.style()->setClear(downcast<CSSPrimitiveValue>(value)); |
1692 | } |
1693 | static void applyInitialClipPath(StyleResolver& styleResolver) |
1694 | { |
1695 | styleResolver.style()->accessSVGStyle().setClipperResource(SVGRenderStyle::initialClipperResource()); |
1696 | } |
1697 | static void applyInheritClipPath(StyleResolver& styleResolver) |
1698 | { |
1699 | styleResolver.style()->accessSVGStyle().setClipperResource(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().clipperResource())); |
1700 | } |
1701 | static void applyValueClipPath(StyleResolver& styleResolver, CSSValue& value) |
1702 | { |
1703 | styleResolver.style()->accessSVGStyle().setClipperResource(StyleBuilderConverter::convertSVGURIReference(styleResolver, value)); |
1704 | } |
1705 | static void applyInitialClipRule(StyleResolver& styleResolver) |
1706 | { |
1707 | styleResolver.style()->accessSVGStyle().setClipRule(SVGRenderStyle::initialClipRule()); |
1708 | } |
1709 | static void applyInheritClipRule(StyleResolver& styleResolver) |
1710 | { |
1711 | styleResolver.style()->accessSVGStyle().setClipRule(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().clipRule())); |
1712 | } |
1713 | static void applyValueClipRule(StyleResolver& styleResolver, CSSValue& value) |
1714 | { |
1715 | styleResolver.style()->accessSVGStyle().setClipRule(downcast<CSSPrimitiveValue>(value)); |
1716 | } |
1717 | static void applyInitialColorInterpolation(StyleResolver& styleResolver) |
1718 | { |
1719 | styleResolver.style()->accessSVGStyle().setColorInterpolation(SVGRenderStyle::initialColorInterpolation()); |
1720 | } |
1721 | static void applyInheritColorInterpolation(StyleResolver& styleResolver) |
1722 | { |
1723 | styleResolver.style()->accessSVGStyle().setColorInterpolation(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().colorInterpolation())); |
1724 | } |
1725 | static void applyValueColorInterpolation(StyleResolver& styleResolver, CSSValue& value) |
1726 | { |
1727 | styleResolver.style()->accessSVGStyle().setColorInterpolation(downcast<CSSPrimitiveValue>(value)); |
1728 | } |
1729 | static void applyInitialColorInterpolationFilters(StyleResolver& styleResolver) |
1730 | { |
1731 | styleResolver.style()->accessSVGStyle().setColorInterpolationFilters(SVGRenderStyle::initialColorInterpolationFilters()); |
1732 | } |
1733 | static void applyInheritColorInterpolationFilters(StyleResolver& styleResolver) |
1734 | { |
1735 | styleResolver.style()->accessSVGStyle().setColorInterpolationFilters(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().colorInterpolationFilters())); |
1736 | } |
1737 | static void applyValueColorInterpolationFilters(StyleResolver& styleResolver, CSSValue& value) |
1738 | { |
1739 | styleResolver.style()->accessSVGStyle().setColorInterpolationFilters(downcast<CSSPrimitiveValue>(value)); |
1740 | } |
1741 | static void applyInitialColorRendering(StyleResolver& styleResolver) |
1742 | { |
1743 | styleResolver.style()->accessSVGStyle().setColorRendering(SVGRenderStyle::initialColorRendering()); |
1744 | } |
1745 | static void applyInheritColorRendering(StyleResolver& styleResolver) |
1746 | { |
1747 | styleResolver.style()->accessSVGStyle().setColorRendering(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().colorRendering())); |
1748 | } |
1749 | static void applyValueColorRendering(StyleResolver& styleResolver, CSSValue& value) |
1750 | { |
1751 | styleResolver.style()->accessSVGStyle().setColorRendering(downcast<CSSPrimitiveValue>(value)); |
1752 | } |
1753 | static void applyInitialColumnCount(StyleResolver& styleResolver) |
1754 | { |
1755 | styleResolver.style()->setHasAutoColumnCount(); |
1756 | } |
1757 | static void applyInheritColumnCount(StyleResolver& styleResolver) |
1758 | { |
1759 | if (styleResolver.parentStyle()->hasAutoColumnCount()) { |
1760 | styleResolver.style()->setHasAutoColumnCount(); |
1761 | return; |
1762 | } |
1763 | styleResolver.style()->setColumnCount(forwardInheritedValue(styleResolver.parentStyle()->columnCount())); |
1764 | } |
1765 | static void applyValueColumnCount(StyleResolver& styleResolver, CSSValue& value) |
1766 | { |
1767 | if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueAuto) { |
1768 | styleResolver.style()->setHasAutoColumnCount(); |
1769 | return; |
1770 | } |
1771 | styleResolver.style()->setColumnCount(downcast<CSSPrimitiveValue>(value)); |
1772 | } |
1773 | static void applyInitialColumnFill(StyleResolver& styleResolver) |
1774 | { |
1775 | styleResolver.style()->setColumnFill(RenderStyle::initialColumnFill()); |
1776 | } |
1777 | static void applyInheritColumnFill(StyleResolver& styleResolver) |
1778 | { |
1779 | styleResolver.style()->setColumnFill(forwardInheritedValue(styleResolver.parentStyle()->columnFill())); |
1780 | } |
1781 | static void applyValueColumnFill(StyleResolver& styleResolver, CSSValue& value) |
1782 | { |
1783 | styleResolver.style()->setColumnFill(downcast<CSSPrimitiveValue>(value)); |
1784 | } |
1785 | static void applyInitialColumnGap(StyleResolver& styleResolver) |
1786 | { |
1787 | styleResolver.style()->setColumnGap(RenderStyle::initialColumnGap()); |
1788 | } |
1789 | static void applyInheritColumnGap(StyleResolver& styleResolver) |
1790 | { |
1791 | styleResolver.style()->setColumnGap(forwardInheritedValue(styleResolver.parentStyle()->columnGap())); |
1792 | } |
1793 | static void applyValueColumnGap(StyleResolver& styleResolver, CSSValue& value) |
1794 | { |
1795 | styleResolver.style()->setColumnGap(StyleBuilderConverter::convertGapLength(styleResolver, value)); |
1796 | } |
1797 | static void applyInitialColumnRuleColor(StyleResolver& styleResolver) |
1798 | { |
1799 | if (styleResolver.applyPropertyToRegularStyle()) |
1800 | styleResolver.style()->setColumnRuleColor(RenderStyle::invalidColor()); |
1801 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
1802 | styleResolver.style()->setVisitedLinkColumnRuleColor(RenderStyle::invalidColor()); |
1803 | } |
1804 | static void applyInheritColumnRuleColor(StyleResolver& styleResolver) |
1805 | { |
1806 | Color color = styleResolver.parentStyle()->columnRuleColor(); |
1807 | if (!color.isValid()) |
1808 | color = styleResolver.parentStyle()->color(); |
1809 | if (styleResolver.applyPropertyToRegularStyle()) |
1810 | styleResolver.style()->setColumnRuleColor(color); |
1811 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
1812 | styleResolver.style()->setVisitedLinkColumnRuleColor(color); |
1813 | } |
1814 | static void applyValueColumnRuleColor(StyleResolver& styleResolver, CSSValue& value) |
1815 | { |
1816 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
1817 | if (styleResolver.applyPropertyToRegularStyle()) |
1818 | styleResolver.style()->setColumnRuleColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
1819 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
1820 | styleResolver.style()->setVisitedLinkColumnRuleColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
1821 | } |
1822 | static void applyInitialColumnRuleStyle(StyleResolver& styleResolver) |
1823 | { |
1824 | styleResolver.style()->setColumnRuleStyle(RenderStyle::initialBorderStyle()); |
1825 | } |
1826 | static void applyInheritColumnRuleStyle(StyleResolver& styleResolver) |
1827 | { |
1828 | styleResolver.style()->setColumnRuleStyle(forwardInheritedValue(styleResolver.parentStyle()->columnRuleStyle())); |
1829 | } |
1830 | static void applyValueColumnRuleStyle(StyleResolver& styleResolver, CSSValue& value) |
1831 | { |
1832 | styleResolver.style()->setColumnRuleStyle(downcast<CSSPrimitiveValue>(value)); |
1833 | } |
1834 | static void applyInitialColumnRuleWidth(StyleResolver& styleResolver) |
1835 | { |
1836 | styleResolver.style()->setColumnRuleWidth(RenderStyle::initialColumnRuleWidth()); |
1837 | } |
1838 | static void applyInheritColumnRuleWidth(StyleResolver& styleResolver) |
1839 | { |
1840 | styleResolver.style()->setColumnRuleWidth(forwardInheritedValue(styleResolver.parentStyle()->columnRuleWidth())); |
1841 | } |
1842 | static void applyValueColumnRuleWidth(StyleResolver& styleResolver, CSSValue& value) |
1843 | { |
1844 | styleResolver.style()->setColumnRuleWidth(StyleBuilderConverter::convertLineWidth<unsigned short>(styleResolver, value)); |
1845 | } |
1846 | static void applyInitialColumnSpan(StyleResolver& styleResolver) |
1847 | { |
1848 | styleResolver.style()->setColumnSpan(RenderStyle::initialColumnSpan()); |
1849 | } |
1850 | static void applyInheritColumnSpan(StyleResolver& styleResolver) |
1851 | { |
1852 | styleResolver.style()->setColumnSpan(forwardInheritedValue(styleResolver.parentStyle()->columnSpan())); |
1853 | } |
1854 | static void applyValueColumnSpan(StyleResolver& styleResolver, CSSValue& value) |
1855 | { |
1856 | styleResolver.style()->setColumnSpan(downcast<CSSPrimitiveValue>(value)); |
1857 | } |
1858 | static void applyInitialColumnWidth(StyleResolver& styleResolver) |
1859 | { |
1860 | styleResolver.style()->setHasAutoColumnWidth(); |
1861 | } |
1862 | static void applyInheritColumnWidth(StyleResolver& styleResolver) |
1863 | { |
1864 | if (styleResolver.parentStyle()->hasAutoColumnWidth()) { |
1865 | styleResolver.style()->setHasAutoColumnWidth(); |
1866 | return; |
1867 | } |
1868 | styleResolver.style()->setColumnWidth(forwardInheritedValue(styleResolver.parentStyle()->columnWidth())); |
1869 | } |
1870 | static void applyValueColumnWidth(StyleResolver& styleResolver, CSSValue& value) |
1871 | { |
1872 | if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueAuto) { |
1873 | styleResolver.style()->setHasAutoColumnWidth(); |
1874 | return; |
1875 | } |
1876 | styleResolver.style()->setColumnWidth(StyleBuilderConverter::convertComputedLength<float>(styleResolver, value)); |
1877 | } |
1878 | static void applyInitialCx(StyleResolver& styleResolver) |
1879 | { |
1880 | styleResolver.style()->setCx(RenderStyle::initialZeroLength()); |
1881 | } |
1882 | static void applyInheritCx(StyleResolver& styleResolver) |
1883 | { |
1884 | styleResolver.style()->setCx(forwardInheritedValue(styleResolver.parentStyle()->cx())); |
1885 | } |
1886 | static void applyValueCx(StyleResolver& styleResolver, CSSValue& value) |
1887 | { |
1888 | styleResolver.style()->setCx(StyleBuilderConverter::convertLength(styleResolver, value)); |
1889 | } |
1890 | static void applyInitialCy(StyleResolver& styleResolver) |
1891 | { |
1892 | styleResolver.style()->setCy(RenderStyle::initialZeroLength()); |
1893 | } |
1894 | static void applyInheritCy(StyleResolver& styleResolver) |
1895 | { |
1896 | styleResolver.style()->setCy(forwardInheritedValue(styleResolver.parentStyle()->cy())); |
1897 | } |
1898 | static void applyValueCy(StyleResolver& styleResolver, CSSValue& value) |
1899 | { |
1900 | styleResolver.style()->setCy(StyleBuilderConverter::convertLength(styleResolver, value)); |
1901 | } |
1902 | static void applyInitialDominantBaseline(StyleResolver& styleResolver) |
1903 | { |
1904 | styleResolver.style()->accessSVGStyle().setDominantBaseline(SVGRenderStyle::initialDominantBaseline()); |
1905 | } |
1906 | static void applyInheritDominantBaseline(StyleResolver& styleResolver) |
1907 | { |
1908 | styleResolver.style()->accessSVGStyle().setDominantBaseline(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().dominantBaseline())); |
1909 | } |
1910 | static void applyValueDominantBaseline(StyleResolver& styleResolver, CSSValue& value) |
1911 | { |
1912 | styleResolver.style()->accessSVGStyle().setDominantBaseline(downcast<CSSPrimitiveValue>(value)); |
1913 | } |
1914 | static void applyInitialEmptyCells(StyleResolver& styleResolver) |
1915 | { |
1916 | styleResolver.style()->setEmptyCells(RenderStyle::initialEmptyCells()); |
1917 | } |
1918 | static void applyInheritEmptyCells(StyleResolver& styleResolver) |
1919 | { |
1920 | styleResolver.style()->setEmptyCells(forwardInheritedValue(styleResolver.parentStyle()->emptyCells())); |
1921 | } |
1922 | static void applyValueEmptyCells(StyleResolver& styleResolver, CSSValue& value) |
1923 | { |
1924 | styleResolver.style()->setEmptyCells(downcast<CSSPrimitiveValue>(value)); |
1925 | } |
1926 | static void applyInitialFillOpacity(StyleResolver& styleResolver) |
1927 | { |
1928 | styleResolver.style()->accessSVGStyle().setFillOpacity(SVGRenderStyle::initialFillOpacity()); |
1929 | } |
1930 | static void applyInheritFillOpacity(StyleResolver& styleResolver) |
1931 | { |
1932 | styleResolver.style()->accessSVGStyle().setFillOpacity(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().fillOpacity())); |
1933 | } |
1934 | static void applyValueFillOpacity(StyleResolver& styleResolver, CSSValue& value) |
1935 | { |
1936 | styleResolver.style()->accessSVGStyle().setFillOpacity(StyleBuilderConverter::convertOpacity(styleResolver, value)); |
1937 | } |
1938 | static void applyInitialFillRule(StyleResolver& styleResolver) |
1939 | { |
1940 | styleResolver.style()->accessSVGStyle().setFillRule(SVGRenderStyle::initialFillRule()); |
1941 | } |
1942 | static void applyInheritFillRule(StyleResolver& styleResolver) |
1943 | { |
1944 | styleResolver.style()->accessSVGStyle().setFillRule(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().fillRule())); |
1945 | } |
1946 | static void applyValueFillRule(StyleResolver& styleResolver, CSSValue& value) |
1947 | { |
1948 | styleResolver.style()->accessSVGStyle().setFillRule(downcast<CSSPrimitiveValue>(value)); |
1949 | } |
1950 | static void applyInitialFilter(StyleResolver& styleResolver) |
1951 | { |
1952 | styleResolver.style()->setFilter(RenderStyle::initialFilter()); |
1953 | } |
1954 | static void applyInheritFilter(StyleResolver& styleResolver) |
1955 | { |
1956 | styleResolver.style()->setFilter(forwardInheritedValue(styleResolver.parentStyle()->filter())); |
1957 | } |
1958 | static void applyValueFilter(StyleResolver& styleResolver, CSSValue& value) |
1959 | { |
1960 | auto convertedValue = StyleBuilderConverter::convertFilterOperations(styleResolver, value); |
1961 | if (convertedValue) |
1962 | styleResolver.style()->setFilter(WTFMove(convertedValue.value())); |
1963 | } |
1964 | static void applyInitialFlexBasis(StyleResolver& styleResolver) |
1965 | { |
1966 | styleResolver.style()->setFlexBasis(RenderStyle::initialFlexBasis()); |
1967 | } |
1968 | static void applyInheritFlexBasis(StyleResolver& styleResolver) |
1969 | { |
1970 | styleResolver.style()->setFlexBasis(forwardInheritedValue(styleResolver.parentStyle()->flexBasis())); |
1971 | } |
1972 | static void applyValueFlexBasis(StyleResolver& styleResolver, CSSValue& value) |
1973 | { |
1974 | styleResolver.style()->setFlexBasis(StyleBuilderConverter::convertLengthOrAuto(styleResolver, value)); |
1975 | } |
1976 | static void applyInitialFlexDirection(StyleResolver& styleResolver) |
1977 | { |
1978 | styleResolver.style()->setFlexDirection(RenderStyle::initialFlexDirection()); |
1979 | } |
1980 | static void applyInheritFlexDirection(StyleResolver& styleResolver) |
1981 | { |
1982 | styleResolver.style()->setFlexDirection(forwardInheritedValue(styleResolver.parentStyle()->flexDirection())); |
1983 | } |
1984 | static void applyValueFlexDirection(StyleResolver& styleResolver, CSSValue& value) |
1985 | { |
1986 | styleResolver.style()->setFlexDirection(downcast<CSSPrimitiveValue>(value)); |
1987 | } |
1988 | static void applyInitialFlexGrow(StyleResolver& styleResolver) |
1989 | { |
1990 | styleResolver.style()->setFlexGrow(RenderStyle::initialFlexGrow()); |
1991 | } |
1992 | static void applyInheritFlexGrow(StyleResolver& styleResolver) |
1993 | { |
1994 | styleResolver.style()->setFlexGrow(forwardInheritedValue(styleResolver.parentStyle()->flexGrow())); |
1995 | } |
1996 | static void applyValueFlexGrow(StyleResolver& styleResolver, CSSValue& value) |
1997 | { |
1998 | styleResolver.style()->setFlexGrow(downcast<CSSPrimitiveValue>(value)); |
1999 | } |
2000 | static void applyInitialFlexShrink(StyleResolver& styleResolver) |
2001 | { |
2002 | styleResolver.style()->setFlexShrink(RenderStyle::initialFlexShrink()); |
2003 | } |
2004 | static void applyInheritFlexShrink(StyleResolver& styleResolver) |
2005 | { |
2006 | styleResolver.style()->setFlexShrink(forwardInheritedValue(styleResolver.parentStyle()->flexShrink())); |
2007 | } |
2008 | static void applyValueFlexShrink(StyleResolver& styleResolver, CSSValue& value) |
2009 | { |
2010 | styleResolver.style()->setFlexShrink(downcast<CSSPrimitiveValue>(value)); |
2011 | } |
2012 | static void applyInitialFlexWrap(StyleResolver& styleResolver) |
2013 | { |
2014 | styleResolver.style()->setFlexWrap(RenderStyle::initialFlexWrap()); |
2015 | } |
2016 | static void applyInheritFlexWrap(StyleResolver& styleResolver) |
2017 | { |
2018 | styleResolver.style()->setFlexWrap(forwardInheritedValue(styleResolver.parentStyle()->flexWrap())); |
2019 | } |
2020 | static void applyValueFlexWrap(StyleResolver& styleResolver, CSSValue& value) |
2021 | { |
2022 | styleResolver.style()->setFlexWrap(downcast<CSSPrimitiveValue>(value)); |
2023 | } |
2024 | static void applyInitialFloat(StyleResolver& styleResolver) |
2025 | { |
2026 | styleResolver.style()->setFloating(RenderStyle::initialFloating()); |
2027 | } |
2028 | static void applyInheritFloat(StyleResolver& styleResolver) |
2029 | { |
2030 | styleResolver.style()->setFloating(forwardInheritedValue(styleResolver.parentStyle()->floating())); |
2031 | } |
2032 | static void applyValueFloat(StyleResolver& styleResolver, CSSValue& value) |
2033 | { |
2034 | styleResolver.style()->setFloating(downcast<CSSPrimitiveValue>(value)); |
2035 | } |
2036 | static void applyInitialFloodColor(StyleResolver& styleResolver) |
2037 | { |
2038 | styleResolver.style()->accessSVGStyle().setFloodColor(SVGRenderStyle::initialFloodColor()); |
2039 | } |
2040 | static void applyInheritFloodColor(StyleResolver& styleResolver) |
2041 | { |
2042 | styleResolver.style()->accessSVGStyle().setFloodColor(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().floodColor())); |
2043 | } |
2044 | static void applyValueFloodColor(StyleResolver& styleResolver, CSSValue& value) |
2045 | { |
2046 | styleResolver.style()->accessSVGStyle().setFloodColor(StyleBuilderConverter::convertSVGColor(styleResolver, value)); |
2047 | } |
2048 | static void applyInitialFloodOpacity(StyleResolver& styleResolver) |
2049 | { |
2050 | styleResolver.style()->accessSVGStyle().setFloodOpacity(SVGRenderStyle::initialFloodOpacity()); |
2051 | } |
2052 | static void applyInheritFloodOpacity(StyleResolver& styleResolver) |
2053 | { |
2054 | styleResolver.style()->accessSVGStyle().setFloodOpacity(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().floodOpacity())); |
2055 | } |
2056 | static void applyValueFloodOpacity(StyleResolver& styleResolver, CSSValue& value) |
2057 | { |
2058 | styleResolver.style()->accessSVGStyle().setFloodOpacity(StyleBuilderConverter::convertOpacity(styleResolver, value)); |
2059 | } |
2060 | static void applyInitialGlyphOrientationHorizontal(StyleResolver& styleResolver) |
2061 | { |
2062 | styleResolver.style()->accessSVGStyle().setGlyphOrientationHorizontal(SVGRenderStyle::initialGlyphOrientationHorizontal()); |
2063 | } |
2064 | static void applyInheritGlyphOrientationHorizontal(StyleResolver& styleResolver) |
2065 | { |
2066 | styleResolver.style()->accessSVGStyle().setGlyphOrientationHorizontal(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().glyphOrientationHorizontal())); |
2067 | } |
2068 | static void applyValueGlyphOrientationHorizontal(StyleResolver& styleResolver, CSSValue& value) |
2069 | { |
2070 | styleResolver.style()->accessSVGStyle().setGlyphOrientationHorizontal(StyleBuilderConverter::convertGlyphOrientation(styleResolver, value)); |
2071 | } |
2072 | static void applyInitialGlyphOrientationVertical(StyleResolver& styleResolver) |
2073 | { |
2074 | styleResolver.style()->accessSVGStyle().setGlyphOrientationVertical(SVGRenderStyle::initialGlyphOrientationVertical()); |
2075 | } |
2076 | static void applyInheritGlyphOrientationVertical(StyleResolver& styleResolver) |
2077 | { |
2078 | styleResolver.style()->accessSVGStyle().setGlyphOrientationVertical(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().glyphOrientationVertical())); |
2079 | } |
2080 | static void applyValueGlyphOrientationVertical(StyleResolver& styleResolver, CSSValue& value) |
2081 | { |
2082 | styleResolver.style()->accessSVGStyle().setGlyphOrientationVertical(StyleBuilderConverter::convertGlyphOrientationOrAuto(styleResolver, value)); |
2083 | } |
2084 | static void applyInitialGridAutoColumns(StyleResolver& styleResolver) |
2085 | { |
2086 | styleResolver.style()->setGridAutoColumns(RenderStyle::initialGridAutoColumns()); |
2087 | } |
2088 | static void applyInheritGridAutoColumns(StyleResolver& styleResolver) |
2089 | { |
2090 | styleResolver.style()->setGridAutoColumns(forwardInheritedValue(styleResolver.parentStyle()->gridAutoColumns())); |
2091 | } |
2092 | static void applyValueGridAutoColumns(StyleResolver& styleResolver, CSSValue& value) |
2093 | { |
2094 | styleResolver.style()->setGridAutoColumns(StyleBuilderConverter::convertGridTrackSizeList(styleResolver, value)); |
2095 | } |
2096 | static void applyInitialGridAutoFlow(StyleResolver& styleResolver) |
2097 | { |
2098 | styleResolver.style()->setGridAutoFlow(RenderStyle::initialGridAutoFlow()); |
2099 | } |
2100 | static void applyInheritGridAutoFlow(StyleResolver& styleResolver) |
2101 | { |
2102 | styleResolver.style()->setGridAutoFlow(forwardInheritedValue(styleResolver.parentStyle()->gridAutoFlow())); |
2103 | } |
2104 | static void applyValueGridAutoFlow(StyleResolver& styleResolver, CSSValue& value) |
2105 | { |
2106 | styleResolver.style()->setGridAutoFlow(StyleBuilderConverter::convertGridAutoFlow(styleResolver, value)); |
2107 | } |
2108 | static void applyInitialGridAutoRows(StyleResolver& styleResolver) |
2109 | { |
2110 | styleResolver.style()->setGridAutoRows(RenderStyle::initialGridAutoRows()); |
2111 | } |
2112 | static void applyInheritGridAutoRows(StyleResolver& styleResolver) |
2113 | { |
2114 | styleResolver.style()->setGridAutoRows(forwardInheritedValue(styleResolver.parentStyle()->gridAutoRows())); |
2115 | } |
2116 | static void applyValueGridAutoRows(StyleResolver& styleResolver, CSSValue& value) |
2117 | { |
2118 | styleResolver.style()->setGridAutoRows(StyleBuilderConverter::convertGridTrackSizeList(styleResolver, value)); |
2119 | } |
2120 | static void applyInitialGridColumnEnd(StyleResolver& styleResolver) |
2121 | { |
2122 | styleResolver.style()->setGridItemColumnEnd(RenderStyle::initialGridItemColumnEnd()); |
2123 | } |
2124 | static void applyInheritGridColumnEnd(StyleResolver& styleResolver) |
2125 | { |
2126 | styleResolver.style()->setGridItemColumnEnd(forwardInheritedValue(styleResolver.parentStyle()->gridItemColumnEnd())); |
2127 | } |
2128 | static void applyValueGridColumnEnd(StyleResolver& styleResolver, CSSValue& value) |
2129 | { |
2130 | auto convertedValue = StyleBuilderConverter::convertGridPosition(styleResolver, value); |
2131 | if (convertedValue) |
2132 | styleResolver.style()->setGridItemColumnEnd(WTFMove(convertedValue.value())); |
2133 | } |
2134 | static void applyInitialGridColumnStart(StyleResolver& styleResolver) |
2135 | { |
2136 | styleResolver.style()->setGridItemColumnStart(RenderStyle::initialGridItemColumnStart()); |
2137 | } |
2138 | static void applyInheritGridColumnStart(StyleResolver& styleResolver) |
2139 | { |
2140 | styleResolver.style()->setGridItemColumnStart(forwardInheritedValue(styleResolver.parentStyle()->gridItemColumnStart())); |
2141 | } |
2142 | static void applyValueGridColumnStart(StyleResolver& styleResolver, CSSValue& value) |
2143 | { |
2144 | auto convertedValue = StyleBuilderConverter::convertGridPosition(styleResolver, value); |
2145 | if (convertedValue) |
2146 | styleResolver.style()->setGridItemColumnStart(WTFMove(convertedValue.value())); |
2147 | } |
2148 | static void applyInitialGridRowEnd(StyleResolver& styleResolver) |
2149 | { |
2150 | styleResolver.style()->setGridItemRowEnd(RenderStyle::initialGridItemRowEnd()); |
2151 | } |
2152 | static void applyInheritGridRowEnd(StyleResolver& styleResolver) |
2153 | { |
2154 | styleResolver.style()->setGridItemRowEnd(forwardInheritedValue(styleResolver.parentStyle()->gridItemRowEnd())); |
2155 | } |
2156 | static void applyValueGridRowEnd(StyleResolver& styleResolver, CSSValue& value) |
2157 | { |
2158 | auto convertedValue = StyleBuilderConverter::convertGridPosition(styleResolver, value); |
2159 | if (convertedValue) |
2160 | styleResolver.style()->setGridItemRowEnd(WTFMove(convertedValue.value())); |
2161 | } |
2162 | static void applyInitialGridRowStart(StyleResolver& styleResolver) |
2163 | { |
2164 | styleResolver.style()->setGridItemRowStart(RenderStyle::initialGridItemRowStart()); |
2165 | } |
2166 | static void applyInheritGridRowStart(StyleResolver& styleResolver) |
2167 | { |
2168 | styleResolver.style()->setGridItemRowStart(forwardInheritedValue(styleResolver.parentStyle()->gridItemRowStart())); |
2169 | } |
2170 | static void applyValueGridRowStart(StyleResolver& styleResolver, CSSValue& value) |
2171 | { |
2172 | auto convertedValue = StyleBuilderConverter::convertGridPosition(styleResolver, value); |
2173 | if (convertedValue) |
2174 | styleResolver.style()->setGridItemRowStart(WTFMove(convertedValue.value())); |
2175 | } |
2176 | static void applyInitialHangingPunctuation(StyleResolver& styleResolver) |
2177 | { |
2178 | styleResolver.style()->setHangingPunctuation(RenderStyle::initialHangingPunctuation()); |
2179 | } |
2180 | static void applyInheritHangingPunctuation(StyleResolver& styleResolver) |
2181 | { |
2182 | styleResolver.style()->setHangingPunctuation(forwardInheritedValue(styleResolver.parentStyle()->hangingPunctuation())); |
2183 | } |
2184 | static void applyValueHangingPunctuation(StyleResolver& styleResolver, CSSValue& value) |
2185 | { |
2186 | styleResolver.style()->setHangingPunctuation(StyleBuilderConverter::convertHangingPunctuation(styleResolver, value)); |
2187 | } |
2188 | static void applyInitialHeight(StyleResolver& styleResolver) |
2189 | { |
2190 | styleResolver.style()->setHeight(RenderStyle::initialSize()); |
2191 | } |
2192 | static void applyInheritHeight(StyleResolver& styleResolver) |
2193 | { |
2194 | styleResolver.style()->setHeight(forwardInheritedValue(styleResolver.parentStyle()->height())); |
2195 | } |
2196 | static void applyValueHeight(StyleResolver& styleResolver, CSSValue& value) |
2197 | { |
2198 | styleResolver.style()->setHeight(StyleBuilderConverter::convertLengthSizing(styleResolver, value)); |
2199 | } |
2200 | static void applyInitialImageRendering(StyleResolver& styleResolver) |
2201 | { |
2202 | styleResolver.style()->setImageRendering(RenderStyle::initialImageRendering()); |
2203 | } |
2204 | static void applyInheritImageRendering(StyleResolver& styleResolver) |
2205 | { |
2206 | styleResolver.style()->setImageRendering(forwardInheritedValue(styleResolver.parentStyle()->imageRendering())); |
2207 | } |
2208 | static void applyValueImageRendering(StyleResolver& styleResolver, CSSValue& value) |
2209 | { |
2210 | styleResolver.style()->setImageRendering(downcast<CSSPrimitiveValue>(value)); |
2211 | } |
2212 | static void applyInitialJustifyContent(StyleResolver& styleResolver) |
2213 | { |
2214 | styleResolver.style()->setJustifyContent(RenderStyle::initialContentAlignment()); |
2215 | } |
2216 | static void applyInheritJustifyContent(StyleResolver& styleResolver) |
2217 | { |
2218 | styleResolver.style()->setJustifyContent(forwardInheritedValue(styleResolver.parentStyle()->justifyContent())); |
2219 | } |
2220 | static void applyValueJustifyContent(StyleResolver& styleResolver, CSSValue& value) |
2221 | { |
2222 | styleResolver.style()->setJustifyContent(StyleBuilderConverter::convertContentAlignmentData(styleResolver, value)); |
2223 | } |
2224 | static void applyInitialJustifyItems(StyleResolver& styleResolver) |
2225 | { |
2226 | styleResolver.style()->setJustifyItems(RenderStyle::initialJustifyItems()); |
2227 | } |
2228 | static void applyInheritJustifyItems(StyleResolver& styleResolver) |
2229 | { |
2230 | styleResolver.style()->setJustifyItems(forwardInheritedValue(styleResolver.parentStyle()->justifyItems())); |
2231 | } |
2232 | static void applyValueJustifyItems(StyleResolver& styleResolver, CSSValue& value) |
2233 | { |
2234 | styleResolver.style()->setJustifyItems(StyleBuilderConverter::convertSelfOrDefaultAlignmentData(styleResolver, value)); |
2235 | } |
2236 | static void applyInitialJustifySelf(StyleResolver& styleResolver) |
2237 | { |
2238 | styleResolver.style()->setJustifySelf(RenderStyle::initialSelfAlignment()); |
2239 | } |
2240 | static void applyInheritJustifySelf(StyleResolver& styleResolver) |
2241 | { |
2242 | styleResolver.style()->setJustifySelf(forwardInheritedValue(styleResolver.parentStyle()->justifySelf())); |
2243 | } |
2244 | static void applyValueJustifySelf(StyleResolver& styleResolver, CSSValue& value) |
2245 | { |
2246 | styleResolver.style()->setJustifySelf(StyleBuilderConverter::convertSelfOrDefaultAlignmentData(styleResolver, value)); |
2247 | } |
2248 | static void applyInitialKerning(StyleResolver& styleResolver) |
2249 | { |
2250 | styleResolver.style()->accessSVGStyle().setKerning(SVGRenderStyle::initialKerning()); |
2251 | } |
2252 | static void applyInheritKerning(StyleResolver& styleResolver) |
2253 | { |
2254 | styleResolver.style()->accessSVGStyle().setKerning(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().kerning())); |
2255 | } |
2256 | static void applyValueKerning(StyleResolver& styleResolver, CSSValue& value) |
2257 | { |
2258 | styleResolver.style()->accessSVGStyle().setKerning(StyleBuilderConverter::convertSVGLengthValue(styleResolver, value)); |
2259 | } |
2260 | static void applyInitialLeft(StyleResolver& styleResolver) |
2261 | { |
2262 | styleResolver.style()->setLeft(RenderStyle::initialOffset()); |
2263 | } |
2264 | static void applyInheritLeft(StyleResolver& styleResolver) |
2265 | { |
2266 | styleResolver.style()->setLeft(forwardInheritedValue(styleResolver.parentStyle()->left())); |
2267 | } |
2268 | static void applyValueLeft(StyleResolver& styleResolver, CSSValue& value) |
2269 | { |
2270 | styleResolver.style()->setLeft(StyleBuilderConverter::convertLengthOrAuto(styleResolver, value)); |
2271 | } |
2272 | static void applyInitialLetterSpacing(StyleResolver& styleResolver) |
2273 | { |
2274 | styleResolver.style()->setLetterSpacing(RenderStyle::initialLetterSpacing()); |
2275 | } |
2276 | static void applyInheritLetterSpacing(StyleResolver& styleResolver) |
2277 | { |
2278 | styleResolver.style()->setLetterSpacing(forwardInheritedValue(styleResolver.parentStyle()->letterSpacing())); |
2279 | } |
2280 | static void applyValueLetterSpacing(StyleResolver& styleResolver, CSSValue& value) |
2281 | { |
2282 | styleResolver.style()->setLetterSpacing(StyleBuilderConverter::convertSpacing(styleResolver, value)); |
2283 | } |
2284 | static void applyInitialLightingColor(StyleResolver& styleResolver) |
2285 | { |
2286 | styleResolver.style()->accessSVGStyle().setLightingColor(SVGRenderStyle::initialLightingColor()); |
2287 | } |
2288 | static void applyInheritLightingColor(StyleResolver& styleResolver) |
2289 | { |
2290 | styleResolver.style()->accessSVGStyle().setLightingColor(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().lightingColor())); |
2291 | } |
2292 | static void applyValueLightingColor(StyleResolver& styleResolver, CSSValue& value) |
2293 | { |
2294 | styleResolver.style()->accessSVGStyle().setLightingColor(StyleBuilderConverter::convertSVGColor(styleResolver, value)); |
2295 | } |
2296 | static void applyInitialLineBreak(StyleResolver& styleResolver) |
2297 | { |
2298 | styleResolver.style()->setLineBreak(RenderStyle::initialLineBreak()); |
2299 | } |
2300 | static void applyInheritLineBreak(StyleResolver& styleResolver) |
2301 | { |
2302 | styleResolver.style()->setLineBreak(forwardInheritedValue(styleResolver.parentStyle()->lineBreak())); |
2303 | } |
2304 | static void applyValueLineBreak(StyleResolver& styleResolver, CSSValue& value) |
2305 | { |
2306 | styleResolver.style()->setLineBreak(downcast<CSSPrimitiveValue>(value)); |
2307 | } |
2308 | static void applyInitialLineHeight(StyleResolver& styleResolver) |
2309 | { |
2310 | styleResolver.style()->setLineHeight(RenderStyle::initialLineHeight()); |
2311 | } |
2312 | static void applyInheritLineHeight(StyleResolver& styleResolver) |
2313 | { |
2314 | styleResolver.style()->setLineHeight(forwardInheritedValue(styleResolver.parentStyle()->specifiedLineHeight())); |
2315 | } |
2316 | static void applyValueLineHeight(StyleResolver& styleResolver, CSSValue& value) |
2317 | { |
2318 | auto convertedValue = StyleBuilderConverter::convertLineHeight(styleResolver, value); |
2319 | if (convertedValue) |
2320 | styleResolver.style()->setLineHeight(WTFMove(convertedValue.value())); |
2321 | } |
2322 | static void applyInitialListStyleImage(StyleResolver& styleResolver) |
2323 | { |
2324 | styleResolver.style()->setListStyleImage(RenderStyle::initialListStyleImage()); |
2325 | } |
2326 | static void applyInheritListStyleImage(StyleResolver& styleResolver) |
2327 | { |
2328 | styleResolver.style()->setListStyleImage(forwardInheritedValue(styleResolver.parentStyle()->listStyleImage())); |
2329 | } |
2330 | static void applyValueListStyleImage(StyleResolver& styleResolver, CSSValue& value) |
2331 | { |
2332 | styleResolver.style()->setListStyleImage(StyleBuilderConverter::convertStyleImage<CSSPropertyListStyleImage>(styleResolver, value)); |
2333 | } |
2334 | static void applyInitialListStylePosition(StyleResolver& styleResolver) |
2335 | { |
2336 | styleResolver.style()->setListStylePosition(RenderStyle::initialListStylePosition()); |
2337 | } |
2338 | static void applyInheritListStylePosition(StyleResolver& styleResolver) |
2339 | { |
2340 | styleResolver.style()->setListStylePosition(forwardInheritedValue(styleResolver.parentStyle()->listStylePosition())); |
2341 | } |
2342 | static void applyValueListStylePosition(StyleResolver& styleResolver, CSSValue& value) |
2343 | { |
2344 | styleResolver.style()->setListStylePosition(downcast<CSSPrimitiveValue>(value)); |
2345 | } |
2346 | static void applyInitialListStyleType(StyleResolver& styleResolver) |
2347 | { |
2348 | styleResolver.style()->setListStyleType(RenderStyle::initialListStyleType()); |
2349 | } |
2350 | static void applyInheritListStyleType(StyleResolver& styleResolver) |
2351 | { |
2352 | styleResolver.style()->setListStyleType(forwardInheritedValue(styleResolver.parentStyle()->listStyleType())); |
2353 | } |
2354 | static void applyValueListStyleType(StyleResolver& styleResolver, CSSValue& value) |
2355 | { |
2356 | styleResolver.style()->setListStyleType(downcast<CSSPrimitiveValue>(value)); |
2357 | } |
2358 | static void applyInitialMarginBottom(StyleResolver& styleResolver) |
2359 | { |
2360 | styleResolver.style()->setMarginBottom(RenderStyle::initialMargin()); |
2361 | } |
2362 | static void applyInheritMarginBottom(StyleResolver& styleResolver) |
2363 | { |
2364 | styleResolver.style()->setMarginBottom(forwardInheritedValue(styleResolver.parentStyle()->marginBottom())); |
2365 | } |
2366 | static void applyValueMarginBottom(StyleResolver& styleResolver, CSSValue& value) |
2367 | { |
2368 | styleResolver.style()->setMarginBottom(StyleBuilderConverter::convertLengthOrAuto(styleResolver, value)); |
2369 | } |
2370 | static void applyInitialMarginLeft(StyleResolver& styleResolver) |
2371 | { |
2372 | styleResolver.style()->setMarginLeft(RenderStyle::initialMargin()); |
2373 | } |
2374 | static void applyInheritMarginLeft(StyleResolver& styleResolver) |
2375 | { |
2376 | styleResolver.style()->setMarginLeft(forwardInheritedValue(styleResolver.parentStyle()->marginLeft())); |
2377 | } |
2378 | static void applyValueMarginLeft(StyleResolver& styleResolver, CSSValue& value) |
2379 | { |
2380 | styleResolver.style()->setMarginLeft(StyleBuilderConverter::convertLengthOrAuto(styleResolver, value)); |
2381 | } |
2382 | static void applyInitialMarginRight(StyleResolver& styleResolver) |
2383 | { |
2384 | styleResolver.style()->setMarginRight(RenderStyle::initialMargin()); |
2385 | } |
2386 | static void applyInheritMarginRight(StyleResolver& styleResolver) |
2387 | { |
2388 | styleResolver.style()->setMarginRight(forwardInheritedValue(styleResolver.parentStyle()->marginRight())); |
2389 | } |
2390 | static void applyValueMarginRight(StyleResolver& styleResolver, CSSValue& value) |
2391 | { |
2392 | styleResolver.style()->setMarginRight(StyleBuilderConverter::convertLengthOrAuto(styleResolver, value)); |
2393 | } |
2394 | static void applyInitialMarginTop(StyleResolver& styleResolver) |
2395 | { |
2396 | styleResolver.style()->setMarginTop(RenderStyle::initialMargin()); |
2397 | } |
2398 | static void applyInheritMarginTop(StyleResolver& styleResolver) |
2399 | { |
2400 | styleResolver.style()->setMarginTop(forwardInheritedValue(styleResolver.parentStyle()->marginTop())); |
2401 | } |
2402 | static void applyValueMarginTop(StyleResolver& styleResolver, CSSValue& value) |
2403 | { |
2404 | styleResolver.style()->setMarginTop(StyleBuilderConverter::convertLengthOrAuto(styleResolver, value)); |
2405 | } |
2406 | static void applyInitialMarkerEnd(StyleResolver& styleResolver) |
2407 | { |
2408 | styleResolver.style()->accessSVGStyle().setMarkerEndResource(SVGRenderStyle::initialMarkerEndResource()); |
2409 | } |
2410 | static void applyInheritMarkerEnd(StyleResolver& styleResolver) |
2411 | { |
2412 | styleResolver.style()->accessSVGStyle().setMarkerEndResource(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().markerEndResource())); |
2413 | } |
2414 | static void applyValueMarkerEnd(StyleResolver& styleResolver, CSSValue& value) |
2415 | { |
2416 | styleResolver.style()->accessSVGStyle().setMarkerEndResource(StyleBuilderConverter::convertSVGURIReference(styleResolver, value)); |
2417 | } |
2418 | static void applyInitialMarkerMid(StyleResolver& styleResolver) |
2419 | { |
2420 | styleResolver.style()->accessSVGStyle().setMarkerMidResource(SVGRenderStyle::initialMarkerMidResource()); |
2421 | } |
2422 | static void applyInheritMarkerMid(StyleResolver& styleResolver) |
2423 | { |
2424 | styleResolver.style()->accessSVGStyle().setMarkerMidResource(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().markerMidResource())); |
2425 | } |
2426 | static void applyValueMarkerMid(StyleResolver& styleResolver, CSSValue& value) |
2427 | { |
2428 | styleResolver.style()->accessSVGStyle().setMarkerMidResource(StyleBuilderConverter::convertSVGURIReference(styleResolver, value)); |
2429 | } |
2430 | static void applyInitialMarkerStart(StyleResolver& styleResolver) |
2431 | { |
2432 | styleResolver.style()->accessSVGStyle().setMarkerStartResource(SVGRenderStyle::initialMarkerStartResource()); |
2433 | } |
2434 | static void applyInheritMarkerStart(StyleResolver& styleResolver) |
2435 | { |
2436 | styleResolver.style()->accessSVGStyle().setMarkerStartResource(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().markerStartResource())); |
2437 | } |
2438 | static void applyValueMarkerStart(StyleResolver& styleResolver, CSSValue& value) |
2439 | { |
2440 | styleResolver.style()->accessSVGStyle().setMarkerStartResource(StyleBuilderConverter::convertSVGURIReference(styleResolver, value)); |
2441 | } |
2442 | static void applyInitialMask(StyleResolver& styleResolver) |
2443 | { |
2444 | styleResolver.style()->accessSVGStyle().setMaskerResource(SVGRenderStyle::initialMaskerResource()); |
2445 | } |
2446 | static void applyInheritMask(StyleResolver& styleResolver) |
2447 | { |
2448 | styleResolver.style()->accessSVGStyle().setMaskerResource(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().maskerResource())); |
2449 | } |
2450 | static void applyValueMask(StyleResolver& styleResolver, CSSValue& value) |
2451 | { |
2452 | styleResolver.style()->accessSVGStyle().setMaskerResource(StyleBuilderConverter::convertSVGURIReference(styleResolver, value)); |
2453 | } |
2454 | static void applyInitialMaskType(StyleResolver& styleResolver) |
2455 | { |
2456 | styleResolver.style()->accessSVGStyle().setMaskType(SVGRenderStyle::initialMaskType()); |
2457 | } |
2458 | static void applyInheritMaskType(StyleResolver& styleResolver) |
2459 | { |
2460 | styleResolver.style()->accessSVGStyle().setMaskType(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().maskType())); |
2461 | } |
2462 | static void applyValueMaskType(StyleResolver& styleResolver, CSSValue& value) |
2463 | { |
2464 | styleResolver.style()->accessSVGStyle().setMaskType(downcast<CSSPrimitiveValue>(value)); |
2465 | } |
2466 | static void applyInitialMaxHeight(StyleResolver& styleResolver) |
2467 | { |
2468 | styleResolver.style()->setMaxHeight(RenderStyle::initialMaxSize()); |
2469 | } |
2470 | static void applyInheritMaxHeight(StyleResolver& styleResolver) |
2471 | { |
2472 | styleResolver.style()->setMaxHeight(forwardInheritedValue(styleResolver.parentStyle()->maxHeight())); |
2473 | } |
2474 | static void applyValueMaxHeight(StyleResolver& styleResolver, CSSValue& value) |
2475 | { |
2476 | styleResolver.style()->setMaxHeight(StyleBuilderConverter::convertLengthMaxSizing(styleResolver, value)); |
2477 | } |
2478 | static void applyInitialMaxWidth(StyleResolver& styleResolver) |
2479 | { |
2480 | styleResolver.style()->setMaxWidth(RenderStyle::initialMaxSize()); |
2481 | } |
2482 | static void applyInheritMaxWidth(StyleResolver& styleResolver) |
2483 | { |
2484 | styleResolver.style()->setMaxWidth(forwardInheritedValue(styleResolver.parentStyle()->maxWidth())); |
2485 | } |
2486 | static void applyValueMaxWidth(StyleResolver& styleResolver, CSSValue& value) |
2487 | { |
2488 | styleResolver.style()->setMaxWidth(StyleBuilderConverter::convertLengthMaxSizing(styleResolver, value)); |
2489 | } |
2490 | static void applyInitialMinHeight(StyleResolver& styleResolver) |
2491 | { |
2492 | styleResolver.style()->setMinHeight(RenderStyle::initialMinSize()); |
2493 | } |
2494 | static void applyInheritMinHeight(StyleResolver& styleResolver) |
2495 | { |
2496 | styleResolver.style()->setMinHeight(forwardInheritedValue(styleResolver.parentStyle()->minHeight())); |
2497 | } |
2498 | static void applyValueMinHeight(StyleResolver& styleResolver, CSSValue& value) |
2499 | { |
2500 | styleResolver.style()->setMinHeight(StyleBuilderConverter::convertLengthSizing(styleResolver, value)); |
2501 | } |
2502 | static void applyInitialMinWidth(StyleResolver& styleResolver) |
2503 | { |
2504 | styleResolver.style()->setMinWidth(RenderStyle::initialMinSize()); |
2505 | } |
2506 | static void applyInheritMinWidth(StyleResolver& styleResolver) |
2507 | { |
2508 | styleResolver.style()->setMinWidth(forwardInheritedValue(styleResolver.parentStyle()->minWidth())); |
2509 | } |
2510 | static void applyValueMinWidth(StyleResolver& styleResolver, CSSValue& value) |
2511 | { |
2512 | styleResolver.style()->setMinWidth(StyleBuilderConverter::convertLengthSizing(styleResolver, value)); |
2513 | } |
2514 | static void applyInitialObjectFit(StyleResolver& styleResolver) |
2515 | { |
2516 | styleResolver.style()->setObjectFit(RenderStyle::initialObjectFit()); |
2517 | } |
2518 | static void applyInheritObjectFit(StyleResolver& styleResolver) |
2519 | { |
2520 | styleResolver.style()->setObjectFit(forwardInheritedValue(styleResolver.parentStyle()->objectFit())); |
2521 | } |
2522 | static void applyValueObjectFit(StyleResolver& styleResolver, CSSValue& value) |
2523 | { |
2524 | styleResolver.style()->setObjectFit(downcast<CSSPrimitiveValue>(value)); |
2525 | } |
2526 | static void applyInitialObjectPosition(StyleResolver& styleResolver) |
2527 | { |
2528 | styleResolver.style()->setObjectPosition(RenderStyle::initialObjectPosition()); |
2529 | } |
2530 | static void applyInheritObjectPosition(StyleResolver& styleResolver) |
2531 | { |
2532 | styleResolver.style()->setObjectPosition(forwardInheritedValue(styleResolver.parentStyle()->objectPosition())); |
2533 | } |
2534 | static void applyValueObjectPosition(StyleResolver& styleResolver, CSSValue& value) |
2535 | { |
2536 | styleResolver.style()->setObjectPosition(StyleBuilderConverter::convertObjectPosition(styleResolver, value)); |
2537 | } |
2538 | static void applyInitialOpacity(StyleResolver& styleResolver) |
2539 | { |
2540 | styleResolver.style()->setOpacity(RenderStyle::initialOpacity()); |
2541 | } |
2542 | static void applyInheritOpacity(StyleResolver& styleResolver) |
2543 | { |
2544 | styleResolver.style()->setOpacity(forwardInheritedValue(styleResolver.parentStyle()->opacity())); |
2545 | } |
2546 | static void applyValueOpacity(StyleResolver& styleResolver, CSSValue& value) |
2547 | { |
2548 | styleResolver.style()->setOpacity(downcast<CSSPrimitiveValue>(value)); |
2549 | } |
2550 | static void applyInitialOrder(StyleResolver& styleResolver) |
2551 | { |
2552 | styleResolver.style()->setOrder(RenderStyle::initialOrder()); |
2553 | } |
2554 | static void applyInheritOrder(StyleResolver& styleResolver) |
2555 | { |
2556 | styleResolver.style()->setOrder(forwardInheritedValue(styleResolver.parentStyle()->order())); |
2557 | } |
2558 | static void applyValueOrder(StyleResolver& styleResolver, CSSValue& value) |
2559 | { |
2560 | styleResolver.style()->setOrder(downcast<CSSPrimitiveValue>(value)); |
2561 | } |
2562 | static void applyInitialOrphans(StyleResolver& styleResolver) |
2563 | { |
2564 | styleResolver.style()->setHasAutoOrphans(); |
2565 | } |
2566 | static void applyInheritOrphans(StyleResolver& styleResolver) |
2567 | { |
2568 | if (styleResolver.parentStyle()->hasAutoOrphans()) { |
2569 | styleResolver.style()->setHasAutoOrphans(); |
2570 | return; |
2571 | } |
2572 | styleResolver.style()->setOrphans(forwardInheritedValue(styleResolver.parentStyle()->orphans())); |
2573 | } |
2574 | static void applyValueOrphans(StyleResolver& styleResolver, CSSValue& value) |
2575 | { |
2576 | if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueAuto) { |
2577 | styleResolver.style()->setHasAutoOrphans(); |
2578 | return; |
2579 | } |
2580 | styleResolver.style()->setOrphans(downcast<CSSPrimitiveValue>(value)); |
2581 | } |
2582 | static void applyInitialOutlineColor(StyleResolver& styleResolver) |
2583 | { |
2584 | if (styleResolver.applyPropertyToRegularStyle()) |
2585 | styleResolver.style()->setOutlineColor(RenderStyle::invalidColor()); |
2586 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
2587 | styleResolver.style()->setVisitedLinkOutlineColor(RenderStyle::invalidColor()); |
2588 | } |
2589 | static void applyInheritOutlineColor(StyleResolver& styleResolver) |
2590 | { |
2591 | Color color = styleResolver.parentStyle()->outlineColor(); |
2592 | if (!color.isValid()) |
2593 | color = styleResolver.parentStyle()->color(); |
2594 | if (styleResolver.applyPropertyToRegularStyle()) |
2595 | styleResolver.style()->setOutlineColor(color); |
2596 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
2597 | styleResolver.style()->setVisitedLinkOutlineColor(color); |
2598 | } |
2599 | static void applyValueOutlineColor(StyleResolver& styleResolver, CSSValue& value) |
2600 | { |
2601 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
2602 | if (styleResolver.applyPropertyToRegularStyle()) |
2603 | styleResolver.style()->setOutlineColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
2604 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
2605 | styleResolver.style()->setVisitedLinkOutlineColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
2606 | } |
2607 | static void applyInitialOutlineOffset(StyleResolver& styleResolver) |
2608 | { |
2609 | styleResolver.style()->setOutlineOffset(RenderStyle::initialOutlineOffset()); |
2610 | } |
2611 | static void applyInheritOutlineOffset(StyleResolver& styleResolver) |
2612 | { |
2613 | styleResolver.style()->setOutlineOffset(forwardInheritedValue(styleResolver.parentStyle()->outlineOffset())); |
2614 | } |
2615 | static void applyValueOutlineOffset(StyleResolver& styleResolver, CSSValue& value) |
2616 | { |
2617 | styleResolver.style()->setOutlineOffset(StyleBuilderConverter::convertComputedLength<float>(styleResolver, value)); |
2618 | } |
2619 | static void applyInitialOutlineWidth(StyleResolver& styleResolver) |
2620 | { |
2621 | styleResolver.style()->setOutlineWidth(RenderStyle::initialOutlineWidth()); |
2622 | } |
2623 | static void applyInheritOutlineWidth(StyleResolver& styleResolver) |
2624 | { |
2625 | styleResolver.style()->setOutlineWidth(forwardInheritedValue(styleResolver.parentStyle()->outlineWidth())); |
2626 | } |
2627 | static void applyValueOutlineWidth(StyleResolver& styleResolver, CSSValue& value) |
2628 | { |
2629 | styleResolver.style()->setOutlineWidth(StyleBuilderConverter::convertLineWidth<float>(styleResolver, value)); |
2630 | } |
2631 | static void applyInitialOverflowWrap(StyleResolver& styleResolver) |
2632 | { |
2633 | styleResolver.style()->setOverflowWrap(RenderStyle::initialOverflowWrap()); |
2634 | } |
2635 | static void applyInheritOverflowWrap(StyleResolver& styleResolver) |
2636 | { |
2637 | styleResolver.style()->setOverflowWrap(forwardInheritedValue(styleResolver.parentStyle()->overflowWrap())); |
2638 | } |
2639 | static void applyValueOverflowWrap(StyleResolver& styleResolver, CSSValue& value) |
2640 | { |
2641 | styleResolver.style()->setOverflowWrap(downcast<CSSPrimitiveValue>(value)); |
2642 | } |
2643 | static void applyInitialOverflowX(StyleResolver& styleResolver) |
2644 | { |
2645 | styleResolver.style()->setOverflowX(RenderStyle::initialOverflowX()); |
2646 | } |
2647 | static void applyInheritOverflowX(StyleResolver& styleResolver) |
2648 | { |
2649 | styleResolver.style()->setOverflowX(forwardInheritedValue(styleResolver.parentStyle()->overflowX())); |
2650 | } |
2651 | static void applyValueOverflowX(StyleResolver& styleResolver, CSSValue& value) |
2652 | { |
2653 | styleResolver.style()->setOverflowX(downcast<CSSPrimitiveValue>(value)); |
2654 | } |
2655 | static void applyInitialOverflowY(StyleResolver& styleResolver) |
2656 | { |
2657 | styleResolver.style()->setOverflowY(RenderStyle::initialOverflowY()); |
2658 | } |
2659 | static void applyInheritOverflowY(StyleResolver& styleResolver) |
2660 | { |
2661 | styleResolver.style()->setOverflowY(forwardInheritedValue(styleResolver.parentStyle()->overflowY())); |
2662 | } |
2663 | static void applyValueOverflowY(StyleResolver& styleResolver, CSSValue& value) |
2664 | { |
2665 | styleResolver.style()->setOverflowY(downcast<CSSPrimitiveValue>(value)); |
2666 | } |
2667 | static void applyInitialPaddingBottom(StyleResolver& styleResolver) |
2668 | { |
2669 | styleResolver.style()->setPaddingBottom(RenderStyle::initialPadding()); |
2670 | } |
2671 | static void applyInheritPaddingBottom(StyleResolver& styleResolver) |
2672 | { |
2673 | styleResolver.style()->setPaddingBottom(forwardInheritedValue(styleResolver.parentStyle()->paddingBottom())); |
2674 | } |
2675 | static void applyValuePaddingBottom(StyleResolver& styleResolver, CSSValue& value) |
2676 | { |
2677 | styleResolver.style()->setPaddingBottom(StyleBuilderConverter::convertLength(styleResolver, value)); |
2678 | } |
2679 | static void applyInitialPaddingLeft(StyleResolver& styleResolver) |
2680 | { |
2681 | styleResolver.style()->setPaddingLeft(RenderStyle::initialPadding()); |
2682 | } |
2683 | static void applyInheritPaddingLeft(StyleResolver& styleResolver) |
2684 | { |
2685 | styleResolver.style()->setPaddingLeft(forwardInheritedValue(styleResolver.parentStyle()->paddingLeft())); |
2686 | } |
2687 | static void applyValuePaddingLeft(StyleResolver& styleResolver, CSSValue& value) |
2688 | { |
2689 | styleResolver.style()->setPaddingLeft(StyleBuilderConverter::convertLength(styleResolver, value)); |
2690 | } |
2691 | static void applyInitialPaddingRight(StyleResolver& styleResolver) |
2692 | { |
2693 | styleResolver.style()->setPaddingRight(RenderStyle::initialPadding()); |
2694 | } |
2695 | static void applyInheritPaddingRight(StyleResolver& styleResolver) |
2696 | { |
2697 | styleResolver.style()->setPaddingRight(forwardInheritedValue(styleResolver.parentStyle()->paddingRight())); |
2698 | } |
2699 | static void applyValuePaddingRight(StyleResolver& styleResolver, CSSValue& value) |
2700 | { |
2701 | styleResolver.style()->setPaddingRight(StyleBuilderConverter::convertLength(styleResolver, value)); |
2702 | } |
2703 | static void applyInitialPaddingTop(StyleResolver& styleResolver) |
2704 | { |
2705 | styleResolver.style()->setPaddingTop(RenderStyle::initialPadding()); |
2706 | } |
2707 | static void applyInheritPaddingTop(StyleResolver& styleResolver) |
2708 | { |
2709 | styleResolver.style()->setPaddingTop(forwardInheritedValue(styleResolver.parentStyle()->paddingTop())); |
2710 | } |
2711 | static void applyValuePaddingTop(StyleResolver& styleResolver, CSSValue& value) |
2712 | { |
2713 | styleResolver.style()->setPaddingTop(StyleBuilderConverter::convertLength(styleResolver, value)); |
2714 | } |
2715 | static void applyInitialPaintOrder(StyleResolver& styleResolver) |
2716 | { |
2717 | styleResolver.style()->setPaintOrder(RenderStyle::initialPaintOrder()); |
2718 | } |
2719 | static void applyInheritPaintOrder(StyleResolver& styleResolver) |
2720 | { |
2721 | styleResolver.style()->setPaintOrder(forwardInheritedValue(styleResolver.parentStyle()->paintOrder())); |
2722 | } |
2723 | static void applyValuePaintOrder(StyleResolver& styleResolver, CSSValue& value) |
2724 | { |
2725 | styleResolver.style()->setPaintOrder(StyleBuilderConverter::convertPaintOrder(styleResolver, value)); |
2726 | } |
2727 | static void applyInitialPerspective(StyleResolver& styleResolver) |
2728 | { |
2729 | styleResolver.style()->setPerspective(RenderStyle::initialPerspective()); |
2730 | } |
2731 | static void applyInheritPerspective(StyleResolver& styleResolver) |
2732 | { |
2733 | styleResolver.style()->setPerspective(forwardInheritedValue(styleResolver.parentStyle()->perspective())); |
2734 | } |
2735 | static void applyValuePerspective(StyleResolver& styleResolver, CSSValue& value) |
2736 | { |
2737 | auto convertedValue = StyleBuilderConverter::convertPerspective(styleResolver, value); |
2738 | if (convertedValue) |
2739 | styleResolver.style()->setPerspective(WTFMove(convertedValue.value())); |
2740 | } |
2741 | static void applyInitialPerspectiveOriginX(StyleResolver& styleResolver) |
2742 | { |
2743 | styleResolver.style()->setPerspectiveOriginX(RenderStyle::initialPerspectiveOriginX()); |
2744 | } |
2745 | static void applyInheritPerspectiveOriginX(StyleResolver& styleResolver) |
2746 | { |
2747 | styleResolver.style()->setPerspectiveOriginX(forwardInheritedValue(styleResolver.parentStyle()->perspectiveOriginX())); |
2748 | } |
2749 | static void applyValuePerspectiveOriginX(StyleResolver& styleResolver, CSSValue& value) |
2750 | { |
2751 | styleResolver.style()->setPerspectiveOriginX(StyleBuilderConverter::convertPositionComponentX(styleResolver, value)); |
2752 | } |
2753 | static void applyInitialPerspectiveOriginY(StyleResolver& styleResolver) |
2754 | { |
2755 | styleResolver.style()->setPerspectiveOriginY(RenderStyle::initialPerspectiveOriginY()); |
2756 | } |
2757 | static void applyInheritPerspectiveOriginY(StyleResolver& styleResolver) |
2758 | { |
2759 | styleResolver.style()->setPerspectiveOriginY(forwardInheritedValue(styleResolver.parentStyle()->perspectiveOriginY())); |
2760 | } |
2761 | static void applyValuePerspectiveOriginY(StyleResolver& styleResolver, CSSValue& value) |
2762 | { |
2763 | styleResolver.style()->setPerspectiveOriginY(StyleBuilderConverter::convertPositionComponentY(styleResolver, value)); |
2764 | } |
2765 | static void applyInitialPointerEvents(StyleResolver& styleResolver) |
2766 | { |
2767 | styleResolver.style()->setPointerEvents(RenderStyle::initialPointerEvents()); |
2768 | } |
2769 | static void applyInheritPointerEvents(StyleResolver& styleResolver) |
2770 | { |
2771 | styleResolver.style()->setPointerEvents(forwardInheritedValue(styleResolver.parentStyle()->pointerEvents())); |
2772 | } |
2773 | static void applyValuePointerEvents(StyleResolver& styleResolver, CSSValue& value) |
2774 | { |
2775 | styleResolver.style()->setPointerEvents(downcast<CSSPrimitiveValue>(value)); |
2776 | } |
2777 | static void applyInitialPosition(StyleResolver& styleResolver) |
2778 | { |
2779 | styleResolver.style()->setPosition(RenderStyle::initialPosition()); |
2780 | } |
2781 | static void applyInheritPosition(StyleResolver& styleResolver) |
2782 | { |
2783 | styleResolver.style()->setPosition(forwardInheritedValue(styleResolver.parentStyle()->position())); |
2784 | } |
2785 | static void applyValuePosition(StyleResolver& styleResolver, CSSValue& value) |
2786 | { |
2787 | styleResolver.style()->setPosition(downcast<CSSPrimitiveValue>(value)); |
2788 | } |
2789 | static void applyInitialQuotes(StyleResolver& styleResolver) |
2790 | { |
2791 | styleResolver.style()->setQuotes(RenderStyle::initialQuotes()); |
2792 | } |
2793 | static void applyInheritQuotes(StyleResolver& styleResolver) |
2794 | { |
2795 | styleResolver.style()->setQuotes(forwardInheritedValue(styleResolver.parentStyle()->quotes())); |
2796 | } |
2797 | static void applyValueQuotes(StyleResolver& styleResolver, CSSValue& value) |
2798 | { |
2799 | styleResolver.style()->setQuotes(StyleBuilderConverter::convertQuotes(styleResolver, value)); |
2800 | } |
2801 | static void applyInitialR(StyleResolver& styleResolver) |
2802 | { |
2803 | styleResolver.style()->setR(RenderStyle::initialZeroLength()); |
2804 | } |
2805 | static void applyInheritR(StyleResolver& styleResolver) |
2806 | { |
2807 | styleResolver.style()->setR(forwardInheritedValue(styleResolver.parentStyle()->r())); |
2808 | } |
2809 | static void applyValueR(StyleResolver& styleResolver, CSSValue& value) |
2810 | { |
2811 | styleResolver.style()->setR(StyleBuilderConverter::convertLength(styleResolver, value)); |
2812 | } |
2813 | static void applyInitialResize(StyleResolver& styleResolver) |
2814 | { |
2815 | styleResolver.style()->setResize(RenderStyle::initialResize()); |
2816 | } |
2817 | static void applyInheritResize(StyleResolver& styleResolver) |
2818 | { |
2819 | styleResolver.style()->setResize(forwardInheritedValue(styleResolver.parentStyle()->resize())); |
2820 | } |
2821 | static void applyValueResize(StyleResolver& styleResolver, CSSValue& value) |
2822 | { |
2823 | styleResolver.style()->setResize(StyleBuilderConverter::convertResize(styleResolver, value)); |
2824 | } |
2825 | static void applyInitialRight(StyleResolver& styleResolver) |
2826 | { |
2827 | styleResolver.style()->setRight(RenderStyle::initialOffset()); |
2828 | } |
2829 | static void applyInheritRight(StyleResolver& styleResolver) |
2830 | { |
2831 | styleResolver.style()->setRight(forwardInheritedValue(styleResolver.parentStyle()->right())); |
2832 | } |
2833 | static void applyValueRight(StyleResolver& styleResolver, CSSValue& value) |
2834 | { |
2835 | styleResolver.style()->setRight(StyleBuilderConverter::convertLengthOrAuto(styleResolver, value)); |
2836 | } |
2837 | static void applyInitialRowGap(StyleResolver& styleResolver) |
2838 | { |
2839 | styleResolver.style()->setRowGap(RenderStyle::initialRowGap()); |
2840 | } |
2841 | static void applyInheritRowGap(StyleResolver& styleResolver) |
2842 | { |
2843 | styleResolver.style()->setRowGap(forwardInheritedValue(styleResolver.parentStyle()->rowGap())); |
2844 | } |
2845 | static void applyValueRowGap(StyleResolver& styleResolver, CSSValue& value) |
2846 | { |
2847 | styleResolver.style()->setRowGap(StyleBuilderConverter::convertGapLength(styleResolver, value)); |
2848 | } |
2849 | static void applyInitialRx(StyleResolver& styleResolver) |
2850 | { |
2851 | styleResolver.style()->setRx(RenderStyle::initialZeroLength()); |
2852 | } |
2853 | static void applyInheritRx(StyleResolver& styleResolver) |
2854 | { |
2855 | styleResolver.style()->setRx(forwardInheritedValue(styleResolver.parentStyle()->rx())); |
2856 | } |
2857 | static void applyValueRx(StyleResolver& styleResolver, CSSValue& value) |
2858 | { |
2859 | styleResolver.style()->setRx(StyleBuilderConverter::convertLength(styleResolver, value)); |
2860 | } |
2861 | static void applyInitialRy(StyleResolver& styleResolver) |
2862 | { |
2863 | styleResolver.style()->setRy(RenderStyle::initialZeroLength()); |
2864 | } |
2865 | static void applyInheritRy(StyleResolver& styleResolver) |
2866 | { |
2867 | styleResolver.style()->setRy(forwardInheritedValue(styleResolver.parentStyle()->ry())); |
2868 | } |
2869 | static void applyValueRy(StyleResolver& styleResolver, CSSValue& value) |
2870 | { |
2871 | styleResolver.style()->setRy(StyleBuilderConverter::convertLength(styleResolver, value)); |
2872 | } |
2873 | static void applyInitialShapeImageThreshold(StyleResolver& styleResolver) |
2874 | { |
2875 | styleResolver.style()->setShapeImageThreshold(RenderStyle::initialShapeImageThreshold()); |
2876 | } |
2877 | static void applyInheritShapeImageThreshold(StyleResolver& styleResolver) |
2878 | { |
2879 | styleResolver.style()->setShapeImageThreshold(forwardInheritedValue(styleResolver.parentStyle()->shapeImageThreshold())); |
2880 | } |
2881 | static void applyValueShapeImageThreshold(StyleResolver& styleResolver, CSSValue& value) |
2882 | { |
2883 | styleResolver.style()->setShapeImageThreshold(StyleBuilderConverter::convertNumberOrAuto<float>(styleResolver, value)); |
2884 | } |
2885 | static void applyInitialShapeMargin(StyleResolver& styleResolver) |
2886 | { |
2887 | styleResolver.style()->setShapeMargin(RenderStyle::initialShapeMargin()); |
2888 | } |
2889 | static void applyInheritShapeMargin(StyleResolver& styleResolver) |
2890 | { |
2891 | styleResolver.style()->setShapeMargin(forwardInheritedValue(styleResolver.parentStyle()->shapeMargin())); |
2892 | } |
2893 | static void applyValueShapeMargin(StyleResolver& styleResolver, CSSValue& value) |
2894 | { |
2895 | styleResolver.style()->setShapeMargin(StyleBuilderConverter::convertLength(styleResolver, value)); |
2896 | } |
2897 | static void applyInitialShapeOutside(StyleResolver& styleResolver) |
2898 | { |
2899 | styleResolver.style()->setShapeOutside(RenderStyle::initialShapeOutside()); |
2900 | } |
2901 | static void applyInheritShapeOutside(StyleResolver& styleResolver) |
2902 | { |
2903 | styleResolver.style()->setShapeOutside(forwardInheritedValue(styleResolver.parentStyle()->shapeOutside())); |
2904 | } |
2905 | static void applyValueShapeOutside(StyleResolver& styleResolver, CSSValue& value) |
2906 | { |
2907 | styleResolver.style()->setShapeOutside(StyleBuilderConverter::convertShapeValue(styleResolver, value)); |
2908 | } |
2909 | static void applyInitialShapeRendering(StyleResolver& styleResolver) |
2910 | { |
2911 | styleResolver.style()->accessSVGStyle().setShapeRendering(SVGRenderStyle::initialShapeRendering()); |
2912 | } |
2913 | static void applyInheritShapeRendering(StyleResolver& styleResolver) |
2914 | { |
2915 | styleResolver.style()->accessSVGStyle().setShapeRendering(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().shapeRendering())); |
2916 | } |
2917 | static void applyValueShapeRendering(StyleResolver& styleResolver, CSSValue& value) |
2918 | { |
2919 | styleResolver.style()->accessSVGStyle().setShapeRendering(downcast<CSSPrimitiveValue>(value)); |
2920 | } |
2921 | static void applyInitialSpeakAs(StyleResolver& styleResolver) |
2922 | { |
2923 | styleResolver.style()->setSpeakAs(RenderStyle::initialSpeakAs()); |
2924 | } |
2925 | static void applyInheritSpeakAs(StyleResolver& styleResolver) |
2926 | { |
2927 | styleResolver.style()->setSpeakAs(forwardInheritedValue(styleResolver.parentStyle()->speakAs())); |
2928 | } |
2929 | static void applyValueSpeakAs(StyleResolver& styleResolver, CSSValue& value) |
2930 | { |
2931 | styleResolver.style()->setSpeakAs(StyleBuilderConverter::convertSpeakAs(styleResolver, value)); |
2932 | } |
2933 | static void applyInitialStopColor(StyleResolver& styleResolver) |
2934 | { |
2935 | styleResolver.style()->accessSVGStyle().setStopColor(SVGRenderStyle::initialStopColor()); |
2936 | } |
2937 | static void applyInheritStopColor(StyleResolver& styleResolver) |
2938 | { |
2939 | styleResolver.style()->accessSVGStyle().setStopColor(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().stopColor())); |
2940 | } |
2941 | static void applyValueStopColor(StyleResolver& styleResolver, CSSValue& value) |
2942 | { |
2943 | styleResolver.style()->accessSVGStyle().setStopColor(StyleBuilderConverter::convertSVGColor(styleResolver, value)); |
2944 | } |
2945 | static void applyInitialStopOpacity(StyleResolver& styleResolver) |
2946 | { |
2947 | styleResolver.style()->accessSVGStyle().setStopOpacity(SVGRenderStyle::initialStopOpacity()); |
2948 | } |
2949 | static void applyInheritStopOpacity(StyleResolver& styleResolver) |
2950 | { |
2951 | styleResolver.style()->accessSVGStyle().setStopOpacity(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().stopOpacity())); |
2952 | } |
2953 | static void applyValueStopOpacity(StyleResolver& styleResolver, CSSValue& value) |
2954 | { |
2955 | styleResolver.style()->accessSVGStyle().setStopOpacity(StyleBuilderConverter::convertOpacity(styleResolver, value)); |
2956 | } |
2957 | static void applyInitialStrokeColor(StyleResolver& styleResolver) |
2958 | { |
2959 | if (styleResolver.applyPropertyToRegularStyle()) |
2960 | styleResolver.style()->setStrokeColor(RenderStyle::invalidColor()); |
2961 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
2962 | styleResolver.style()->setVisitedLinkStrokeColor(RenderStyle::invalidColor()); |
2963 | } |
2964 | static void applyInheritStrokeColor(StyleResolver& styleResolver) |
2965 | { |
2966 | Color color = styleResolver.parentStyle()->strokeColor(); |
2967 | if (!color.isValid()) |
2968 | color = styleResolver.parentStyle()->color(); |
2969 | if (styleResolver.applyPropertyToRegularStyle()) |
2970 | styleResolver.style()->setStrokeColor(color); |
2971 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
2972 | styleResolver.style()->setVisitedLinkStrokeColor(color); |
2973 | } |
2974 | static void applyInitialStrokeDasharray(StyleResolver& styleResolver) |
2975 | { |
2976 | styleResolver.style()->accessSVGStyle().setStrokeDashArray(SVGRenderStyle::initialStrokeDashArray()); |
2977 | } |
2978 | static void applyInheritStrokeDasharray(StyleResolver& styleResolver) |
2979 | { |
2980 | styleResolver.style()->accessSVGStyle().setStrokeDashArray(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().strokeDashArray())); |
2981 | } |
2982 | static void applyValueStrokeDasharray(StyleResolver& styleResolver, CSSValue& value) |
2983 | { |
2984 | styleResolver.style()->accessSVGStyle().setStrokeDashArray(StyleBuilderConverter::convertStrokeDashArray(styleResolver, value)); |
2985 | } |
2986 | static void applyInitialStrokeDashoffset(StyleResolver& styleResolver) |
2987 | { |
2988 | styleResolver.style()->setStrokeDashOffset(RenderStyle::initialZeroLength()); |
2989 | } |
2990 | static void applyInheritStrokeDashoffset(StyleResolver& styleResolver) |
2991 | { |
2992 | styleResolver.style()->setStrokeDashOffset(forwardInheritedValue(styleResolver.parentStyle()->strokeDashOffset())); |
2993 | } |
2994 | static void applyValueStrokeDashoffset(StyleResolver& styleResolver, CSSValue& value) |
2995 | { |
2996 | styleResolver.style()->setStrokeDashOffset(StyleBuilderConverter::convertLength(styleResolver, value)); |
2997 | } |
2998 | static void applyInitialStrokeLinecap(StyleResolver& styleResolver) |
2999 | { |
3000 | styleResolver.style()->setCapStyle(RenderStyle::initialCapStyle()); |
3001 | } |
3002 | static void applyInheritStrokeLinecap(StyleResolver& styleResolver) |
3003 | { |
3004 | styleResolver.style()->setCapStyle(forwardInheritedValue(styleResolver.parentStyle()->capStyle())); |
3005 | } |
3006 | static void applyValueStrokeLinecap(StyleResolver& styleResolver, CSSValue& value) |
3007 | { |
3008 | styleResolver.style()->setCapStyle(downcast<CSSPrimitiveValue>(value)); |
3009 | } |
3010 | static void applyInitialStrokeLinejoin(StyleResolver& styleResolver) |
3011 | { |
3012 | styleResolver.style()->setJoinStyle(RenderStyle::initialJoinStyle()); |
3013 | } |
3014 | static void applyInheritStrokeLinejoin(StyleResolver& styleResolver) |
3015 | { |
3016 | styleResolver.style()->setJoinStyle(forwardInheritedValue(styleResolver.parentStyle()->joinStyle())); |
3017 | } |
3018 | static void applyValueStrokeLinejoin(StyleResolver& styleResolver, CSSValue& value) |
3019 | { |
3020 | styleResolver.style()->setJoinStyle(downcast<CSSPrimitiveValue>(value)); |
3021 | } |
3022 | static void applyInitialStrokeMiterlimit(StyleResolver& styleResolver) |
3023 | { |
3024 | styleResolver.style()->setStrokeMiterLimit(RenderStyle::initialStrokeMiterLimit()); |
3025 | } |
3026 | static void applyInheritStrokeMiterlimit(StyleResolver& styleResolver) |
3027 | { |
3028 | styleResolver.style()->setStrokeMiterLimit(forwardInheritedValue(styleResolver.parentStyle()->strokeMiterLimit())); |
3029 | } |
3030 | static void applyValueStrokeMiterlimit(StyleResolver& styleResolver, CSSValue& value) |
3031 | { |
3032 | styleResolver.style()->setStrokeMiterLimit(StyleBuilderConverter::convertNumber<float>(styleResolver, value)); |
3033 | } |
3034 | static void applyInitialStrokeOpacity(StyleResolver& styleResolver) |
3035 | { |
3036 | styleResolver.style()->accessSVGStyle().setStrokeOpacity(SVGRenderStyle::initialStrokeOpacity()); |
3037 | } |
3038 | static void applyInheritStrokeOpacity(StyleResolver& styleResolver) |
3039 | { |
3040 | styleResolver.style()->accessSVGStyle().setStrokeOpacity(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().strokeOpacity())); |
3041 | } |
3042 | static void applyValueStrokeOpacity(StyleResolver& styleResolver, CSSValue& value) |
3043 | { |
3044 | styleResolver.style()->accessSVGStyle().setStrokeOpacity(StyleBuilderConverter::convertOpacity(styleResolver, value)); |
3045 | } |
3046 | static void applyInitialStrokeWidth(StyleResolver& styleResolver) |
3047 | { |
3048 | styleResolver.style()->setStrokeWidth(RenderStyle::initialOneLength()); |
3049 | } |
3050 | static void applyInheritStrokeWidth(StyleResolver& styleResolver) |
3051 | { |
3052 | styleResolver.style()->setStrokeWidth(forwardInheritedValue(styleResolver.parentStyle()->strokeWidth())); |
3053 | } |
3054 | static void applyInitialTabSize(StyleResolver& styleResolver) |
3055 | { |
3056 | styleResolver.style()->setTabSize(RenderStyle::initialTabSize()); |
3057 | } |
3058 | static void applyInheritTabSize(StyleResolver& styleResolver) |
3059 | { |
3060 | styleResolver.style()->setTabSize(forwardInheritedValue(styleResolver.parentStyle()->tabSize())); |
3061 | } |
3062 | static void applyValueTabSize(StyleResolver& styleResolver, CSSValue& value) |
3063 | { |
3064 | styleResolver.style()->setTabSize(downcast<CSSPrimitiveValue>(value)); |
3065 | } |
3066 | static void applyInitialTableLayout(StyleResolver& styleResolver) |
3067 | { |
3068 | styleResolver.style()->setTableLayout(RenderStyle::initialTableLayout()); |
3069 | } |
3070 | static void applyInheritTableLayout(StyleResolver& styleResolver) |
3071 | { |
3072 | styleResolver.style()->setTableLayout(forwardInheritedValue(styleResolver.parentStyle()->tableLayout())); |
3073 | } |
3074 | static void applyValueTableLayout(StyleResolver& styleResolver, CSSValue& value) |
3075 | { |
3076 | styleResolver.style()->setTableLayout(downcast<CSSPrimitiveValue>(value)); |
3077 | } |
3078 | static void applyInheritTextAlign(StyleResolver& styleResolver) |
3079 | { |
3080 | styleResolver.style()->setTextAlign(forwardInheritedValue(styleResolver.parentStyle()->textAlign())); |
3081 | } |
3082 | static void applyInitialTextAnchor(StyleResolver& styleResolver) |
3083 | { |
3084 | styleResolver.style()->accessSVGStyle().setTextAnchor(SVGRenderStyle::initialTextAnchor()); |
3085 | } |
3086 | static void applyInheritTextAnchor(StyleResolver& styleResolver) |
3087 | { |
3088 | styleResolver.style()->accessSVGStyle().setTextAnchor(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().textAnchor())); |
3089 | } |
3090 | static void applyValueTextAnchor(StyleResolver& styleResolver, CSSValue& value) |
3091 | { |
3092 | styleResolver.style()->accessSVGStyle().setTextAnchor(downcast<CSSPrimitiveValue>(value)); |
3093 | } |
3094 | static void applyInitialTextDecoration(StyleResolver& styleResolver) |
3095 | { |
3096 | styleResolver.style()->setTextDecoration(RenderStyle::initialTextDecoration()); |
3097 | } |
3098 | static void applyInheritTextDecoration(StyleResolver& styleResolver) |
3099 | { |
3100 | styleResolver.style()->setTextDecoration(forwardInheritedValue(styleResolver.parentStyle()->textDecoration())); |
3101 | } |
3102 | static void applyValueTextDecoration(StyleResolver& styleResolver, CSSValue& value) |
3103 | { |
3104 | styleResolver.style()->setTextDecoration(StyleBuilderConverter::convertTextDecoration(styleResolver, value)); |
3105 | } |
3106 | static void applyInitialTextDecorationColor(StyleResolver& styleResolver) |
3107 | { |
3108 | if (styleResolver.applyPropertyToRegularStyle()) |
3109 | styleResolver.style()->setTextDecorationColor(RenderStyle::invalidColor()); |
3110 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
3111 | styleResolver.style()->setVisitedLinkTextDecorationColor(RenderStyle::invalidColor()); |
3112 | } |
3113 | static void applyInheritTextDecorationColor(StyleResolver& styleResolver) |
3114 | { |
3115 | Color color = styleResolver.parentStyle()->textDecorationColor(); |
3116 | if (!color.isValid()) |
3117 | color = styleResolver.parentStyle()->color(); |
3118 | if (styleResolver.applyPropertyToRegularStyle()) |
3119 | styleResolver.style()->setTextDecorationColor(color); |
3120 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
3121 | styleResolver.style()->setVisitedLinkTextDecorationColor(color); |
3122 | } |
3123 | static void applyValueTextDecorationColor(StyleResolver& styleResolver, CSSValue& value) |
3124 | { |
3125 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
3126 | if (styleResolver.applyPropertyToRegularStyle()) |
3127 | styleResolver.style()->setTextDecorationColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
3128 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
3129 | styleResolver.style()->setVisitedLinkTextDecorationColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
3130 | } |
3131 | static void applyInitialTextDecorationLine(StyleResolver& styleResolver) |
3132 | { |
3133 | styleResolver.style()->setTextDecoration(RenderStyle::initialTextDecoration()); |
3134 | } |
3135 | static void applyInheritTextDecorationLine(StyleResolver& styleResolver) |
3136 | { |
3137 | styleResolver.style()->setTextDecoration(forwardInheritedValue(styleResolver.parentStyle()->textDecoration())); |
3138 | } |
3139 | static void applyValueTextDecorationLine(StyleResolver& styleResolver, CSSValue& value) |
3140 | { |
3141 | styleResolver.style()->setTextDecoration(StyleBuilderConverter::convertTextDecoration(styleResolver, value)); |
3142 | } |
3143 | static void applyInitialTextDecorationSkip(StyleResolver& styleResolver) |
3144 | { |
3145 | styleResolver.style()->setTextDecorationSkip(RenderStyle::initialTextDecorationSkip()); |
3146 | } |
3147 | static void applyInheritTextDecorationSkip(StyleResolver& styleResolver) |
3148 | { |
3149 | styleResolver.style()->setTextDecorationSkip(forwardInheritedValue(styleResolver.parentStyle()->textDecorationSkip())); |
3150 | } |
3151 | static void applyValueTextDecorationSkip(StyleResolver& styleResolver, CSSValue& value) |
3152 | { |
3153 | styleResolver.style()->setTextDecorationSkip(StyleBuilderConverter::convertTextDecorationSkip(styleResolver, value)); |
3154 | } |
3155 | static void applyInitialTextDecorationStyle(StyleResolver& styleResolver) |
3156 | { |
3157 | styleResolver.style()->setTextDecorationStyle(RenderStyle::initialTextDecorationStyle()); |
3158 | } |
3159 | static void applyInheritTextDecorationStyle(StyleResolver& styleResolver) |
3160 | { |
3161 | styleResolver.style()->setTextDecorationStyle(forwardInheritedValue(styleResolver.parentStyle()->textDecorationStyle())); |
3162 | } |
3163 | static void applyValueTextDecorationStyle(StyleResolver& styleResolver, CSSValue& value) |
3164 | { |
3165 | styleResolver.style()->setTextDecorationStyle(downcast<CSSPrimitiveValue>(value)); |
3166 | } |
3167 | static void applyInitialTextDecorationThickness(StyleResolver& styleResolver) |
3168 | { |
3169 | styleResolver.style()->setTextDecorationThickness(RenderStyle::initialTextDecorationThickness()); |
3170 | } |
3171 | static void applyInheritTextDecorationThickness(StyleResolver& styleResolver) |
3172 | { |
3173 | styleResolver.style()->setTextDecorationThickness(forwardInheritedValue(styleResolver.parentStyle()->textDecorationThickness())); |
3174 | } |
3175 | static void applyValueTextDecorationThickness(StyleResolver& styleResolver, CSSValue& value) |
3176 | { |
3177 | styleResolver.style()->setTextDecorationThickness(StyleBuilderConverter::convertTextDecorationThickness(styleResolver, value)); |
3178 | } |
3179 | static void applyInitialTextOverflow(StyleResolver& styleResolver) |
3180 | { |
3181 | styleResolver.style()->setTextOverflow(RenderStyle::initialTextOverflow()); |
3182 | } |
3183 | static void applyInheritTextOverflow(StyleResolver& styleResolver) |
3184 | { |
3185 | styleResolver.style()->setTextOverflow(forwardInheritedValue(styleResolver.parentStyle()->textOverflow())); |
3186 | } |
3187 | static void applyValueTextOverflow(StyleResolver& styleResolver, CSSValue& value) |
3188 | { |
3189 | styleResolver.style()->setTextOverflow(downcast<CSSPrimitiveValue>(value)); |
3190 | } |
3191 | static void applyInitialTextTransform(StyleResolver& styleResolver) |
3192 | { |
3193 | styleResolver.style()->setTextTransform(RenderStyle::initialTextTransform()); |
3194 | } |
3195 | static void applyInheritTextTransform(StyleResolver& styleResolver) |
3196 | { |
3197 | styleResolver.style()->setTextTransform(forwardInheritedValue(styleResolver.parentStyle()->textTransform())); |
3198 | } |
3199 | static void applyValueTextTransform(StyleResolver& styleResolver, CSSValue& value) |
3200 | { |
3201 | styleResolver.style()->setTextTransform(downcast<CSSPrimitiveValue>(value)); |
3202 | } |
3203 | static void applyInitialTextUnderlineOffset(StyleResolver& styleResolver) |
3204 | { |
3205 | styleResolver.style()->setTextUnderlineOffset(RenderStyle::initialTextUnderlineOffset()); |
3206 | } |
3207 | static void applyInheritTextUnderlineOffset(StyleResolver& styleResolver) |
3208 | { |
3209 | styleResolver.style()->setTextUnderlineOffset(forwardInheritedValue(styleResolver.parentStyle()->textUnderlineOffset())); |
3210 | } |
3211 | static void applyValueTextUnderlineOffset(StyleResolver& styleResolver, CSSValue& value) |
3212 | { |
3213 | styleResolver.style()->setTextUnderlineOffset(StyleBuilderConverter::convertTextUnderlineOffset(styleResolver, value)); |
3214 | } |
3215 | static void applyInitialTextUnderlinePosition(StyleResolver& styleResolver) |
3216 | { |
3217 | styleResolver.style()->setTextUnderlinePosition(RenderStyle::initialTextUnderlinePosition()); |
3218 | } |
3219 | static void applyInheritTextUnderlinePosition(StyleResolver& styleResolver) |
3220 | { |
3221 | styleResolver.style()->setTextUnderlinePosition(forwardInheritedValue(styleResolver.parentStyle()->textUnderlinePosition())); |
3222 | } |
3223 | static void applyValueTextUnderlinePosition(StyleResolver& styleResolver, CSSValue& value) |
3224 | { |
3225 | styleResolver.style()->setTextUnderlinePosition(downcast<CSSPrimitiveValue>(value)); |
3226 | } |
3227 | static void applyInitialTop(StyleResolver& styleResolver) |
3228 | { |
3229 | styleResolver.style()->setTop(RenderStyle::initialOffset()); |
3230 | } |
3231 | static void applyInheritTop(StyleResolver& styleResolver) |
3232 | { |
3233 | styleResolver.style()->setTop(forwardInheritedValue(styleResolver.parentStyle()->top())); |
3234 | } |
3235 | static void applyValueTop(StyleResolver& styleResolver, CSSValue& value) |
3236 | { |
3237 | styleResolver.style()->setTop(StyleBuilderConverter::convertLengthOrAuto(styleResolver, value)); |
3238 | } |
3239 | static void applyInitialTransform(StyleResolver& styleResolver) |
3240 | { |
3241 | styleResolver.style()->setTransform(RenderStyle::initialTransform()); |
3242 | } |
3243 | static void applyInheritTransform(StyleResolver& styleResolver) |
3244 | { |
3245 | styleResolver.style()->setTransform(forwardInheritedValue(styleResolver.parentStyle()->transform())); |
3246 | } |
3247 | static void applyValueTransform(StyleResolver& styleResolver, CSSValue& value) |
3248 | { |
3249 | styleResolver.style()->setTransform(StyleBuilderConverter::convertTransform(styleResolver, value)); |
3250 | } |
3251 | static void applyInitialTransformBox(StyleResolver& styleResolver) |
3252 | { |
3253 | styleResolver.style()->setTransformBox(RenderStyle::initialTransformBox()); |
3254 | } |
3255 | static void applyInheritTransformBox(StyleResolver& styleResolver) |
3256 | { |
3257 | styleResolver.style()->setTransformBox(forwardInheritedValue(styleResolver.parentStyle()->transformBox())); |
3258 | } |
3259 | static void applyValueTransformBox(StyleResolver& styleResolver, CSSValue& value) |
3260 | { |
3261 | styleResolver.style()->setTransformBox(downcast<CSSPrimitiveValue>(value)); |
3262 | } |
3263 | static void applyInitialTransformOriginX(StyleResolver& styleResolver) |
3264 | { |
3265 | styleResolver.style()->setTransformOriginX(RenderStyle::initialTransformOriginX()); |
3266 | } |
3267 | static void applyInheritTransformOriginX(StyleResolver& styleResolver) |
3268 | { |
3269 | styleResolver.style()->setTransformOriginX(forwardInheritedValue(styleResolver.parentStyle()->transformOriginX())); |
3270 | } |
3271 | static void applyValueTransformOriginX(StyleResolver& styleResolver, CSSValue& value) |
3272 | { |
3273 | styleResolver.style()->setTransformOriginX(StyleBuilderConverter::convertPositionComponentX(styleResolver, value)); |
3274 | } |
3275 | static void applyInitialTransformOriginY(StyleResolver& styleResolver) |
3276 | { |
3277 | styleResolver.style()->setTransformOriginY(RenderStyle::initialTransformOriginY()); |
3278 | } |
3279 | static void applyInheritTransformOriginY(StyleResolver& styleResolver) |
3280 | { |
3281 | styleResolver.style()->setTransformOriginY(forwardInheritedValue(styleResolver.parentStyle()->transformOriginY())); |
3282 | } |
3283 | static void applyValueTransformOriginY(StyleResolver& styleResolver, CSSValue& value) |
3284 | { |
3285 | styleResolver.style()->setTransformOriginY(StyleBuilderConverter::convertPositionComponentY(styleResolver, value)); |
3286 | } |
3287 | static void applyInitialTransformOriginZ(StyleResolver& styleResolver) |
3288 | { |
3289 | styleResolver.style()->setTransformOriginZ(RenderStyle::initialTransformOriginZ()); |
3290 | } |
3291 | static void applyInheritTransformOriginZ(StyleResolver& styleResolver) |
3292 | { |
3293 | styleResolver.style()->setTransformOriginZ(forwardInheritedValue(styleResolver.parentStyle()->transformOriginZ())); |
3294 | } |
3295 | static void applyValueTransformOriginZ(StyleResolver& styleResolver, CSSValue& value) |
3296 | { |
3297 | styleResolver.style()->setTransformOriginZ(StyleBuilderConverter::convertComputedLength<float>(styleResolver, value)); |
3298 | } |
3299 | static void applyInitialTransformStyle(StyleResolver& styleResolver) |
3300 | { |
3301 | styleResolver.style()->setTransformStyle3D(RenderStyle::initialTransformStyle3D()); |
3302 | } |
3303 | static void applyInheritTransformStyle(StyleResolver& styleResolver) |
3304 | { |
3305 | styleResolver.style()->setTransformStyle3D(forwardInheritedValue(styleResolver.parentStyle()->transformStyle3D())); |
3306 | } |
3307 | static void applyValueTransformStyle(StyleResolver& styleResolver, CSSValue& value) |
3308 | { |
3309 | styleResolver.style()->setTransformStyle3D(downcast<CSSPrimitiveValue>(value)); |
3310 | } |
3311 | static void applyInitialTransitionDelay(StyleResolver& styleResolver) |
3312 | { |
3313 | AnimationList& list = styleResolver.style()->ensureTransitions(); |
3314 | if (list.isEmpty()) |
3315 | list.append(Animation::create()); |
3316 | list.animation(0).setDelay(Animation::initialDelay()); |
3317 | for (size_t i = 1; i < list.size(); ++i) |
3318 | list.animation(i).clearDelay(); |
3319 | } |
3320 | static void applyInheritTransitionDelay(StyleResolver& styleResolver) |
3321 | { |
3322 | auto& list = styleResolver.style()->ensureTransitions(); |
3323 | auto* parentList = styleResolver.parentStyle()->transitions(); |
3324 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
3325 | for ( ; i < parentSize && parentList->animation(i).isDelaySet(); ++i) { |
3326 | if (list.size() <= i) |
3327 | list.append(Animation::create()); |
3328 | list.animation(i).setDelay(parentList->animation(i).delay()); |
3329 | list.animation(i).setAnimationMode(parentList->animation(i).animationMode()); |
3330 | } |
3331 | |
3332 | // Reset any remaining animations to not have the property set. |
3333 | for ( ; i < list.size(); ++i) |
3334 | list.animation(i).clearDelay(); |
3335 | } |
3336 | static void applyValueTransitionDelay(StyleResolver& styleResolver, CSSValue& value) |
3337 | { |
3338 | AnimationList& list = styleResolver.style()->ensureTransitions(); |
3339 | size_t childIndex = 0; |
3340 | if (is<CSSValueList>(value)) { |
3341 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
3342 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
3343 | if (childIndex <= list.size()) |
3344 | list.append(Animation::create()); |
3345 | styleResolver.styleMap()->mapAnimationDelay(list.animation(childIndex), currentValue); |
3346 | ++childIndex; |
3347 | } |
3348 | } else { |
3349 | if (list.isEmpty()) |
3350 | list.append(Animation::create()); |
3351 | styleResolver.styleMap()->mapAnimationDelay(list.animation(childIndex), value); |
3352 | childIndex = 1; |
3353 | } |
3354 | for ( ; childIndex < list.size(); ++childIndex) { |
3355 | /* Reset all remaining animations to not have the property set. */ |
3356 | list.animation(childIndex).clearDelay(); |
3357 | } |
3358 | } |
3359 | static void applyInitialTransitionDuration(StyleResolver& styleResolver) |
3360 | { |
3361 | AnimationList& list = styleResolver.style()->ensureTransitions(); |
3362 | if (list.isEmpty()) |
3363 | list.append(Animation::create()); |
3364 | list.animation(0).setDuration(Animation::initialDuration()); |
3365 | for (size_t i = 1; i < list.size(); ++i) |
3366 | list.animation(i).clearDuration(); |
3367 | } |
3368 | static void applyInheritTransitionDuration(StyleResolver& styleResolver) |
3369 | { |
3370 | auto& list = styleResolver.style()->ensureTransitions(); |
3371 | auto* parentList = styleResolver.parentStyle()->transitions(); |
3372 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
3373 | for ( ; i < parentSize && parentList->animation(i).isDurationSet(); ++i) { |
3374 | if (list.size() <= i) |
3375 | list.append(Animation::create()); |
3376 | list.animation(i).setDuration(parentList->animation(i).duration()); |
3377 | list.animation(i).setAnimationMode(parentList->animation(i).animationMode()); |
3378 | } |
3379 | |
3380 | // Reset any remaining animations to not have the property set. |
3381 | for ( ; i < list.size(); ++i) |
3382 | list.animation(i).clearDuration(); |
3383 | } |
3384 | static void applyValueTransitionDuration(StyleResolver& styleResolver, CSSValue& value) |
3385 | { |
3386 | AnimationList& list = styleResolver.style()->ensureTransitions(); |
3387 | size_t childIndex = 0; |
3388 | if (is<CSSValueList>(value)) { |
3389 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
3390 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
3391 | if (childIndex <= list.size()) |
3392 | list.append(Animation::create()); |
3393 | styleResolver.styleMap()->mapAnimationDuration(list.animation(childIndex), currentValue); |
3394 | ++childIndex; |
3395 | } |
3396 | } else { |
3397 | if (list.isEmpty()) |
3398 | list.append(Animation::create()); |
3399 | styleResolver.styleMap()->mapAnimationDuration(list.animation(childIndex), value); |
3400 | childIndex = 1; |
3401 | } |
3402 | for ( ; childIndex < list.size(); ++childIndex) { |
3403 | /* Reset all remaining animations to not have the property set. */ |
3404 | list.animation(childIndex).clearDuration(); |
3405 | } |
3406 | } |
3407 | static void applyInitialTransitionProperty(StyleResolver& styleResolver) |
3408 | { |
3409 | AnimationList& list = styleResolver.style()->ensureTransitions(); |
3410 | if (list.isEmpty()) |
3411 | list.append(Animation::create()); |
3412 | list.animation(0).setProperty(Animation::initialProperty()); |
3413 | for (size_t i = 1; i < list.size(); ++i) |
3414 | list.animation(i).clearProperty(); |
3415 | } |
3416 | static void applyInheritTransitionProperty(StyleResolver& styleResolver) |
3417 | { |
3418 | auto& list = styleResolver.style()->ensureTransitions(); |
3419 | auto* parentList = styleResolver.parentStyle()->transitions(); |
3420 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
3421 | for ( ; i < parentSize && parentList->animation(i).isPropertySet(); ++i) { |
3422 | if (list.size() <= i) |
3423 | list.append(Animation::create()); |
3424 | list.animation(i).setProperty(parentList->animation(i).property()); |
3425 | list.animation(i).setAnimationMode(parentList->animation(i).animationMode()); |
3426 | } |
3427 | |
3428 | // Reset any remaining animations to not have the property set. |
3429 | for ( ; i < list.size(); ++i) |
3430 | list.animation(i).clearProperty(); |
3431 | } |
3432 | static void applyValueTransitionProperty(StyleResolver& styleResolver, CSSValue& value) |
3433 | { |
3434 | AnimationList& list = styleResolver.style()->ensureTransitions(); |
3435 | size_t childIndex = 0; |
3436 | if (is<CSSValueList>(value)) { |
3437 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
3438 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
3439 | if (childIndex <= list.size()) |
3440 | list.append(Animation::create()); |
3441 | styleResolver.styleMap()->mapAnimationProperty(list.animation(childIndex), currentValue); |
3442 | ++childIndex; |
3443 | } |
3444 | } else { |
3445 | if (list.isEmpty()) |
3446 | list.append(Animation::create()); |
3447 | styleResolver.styleMap()->mapAnimationProperty(list.animation(childIndex), value); |
3448 | childIndex = 1; |
3449 | } |
3450 | for ( ; childIndex < list.size(); ++childIndex) { |
3451 | /* Reset all remaining animations to not have the property set. */ |
3452 | list.animation(childIndex).clearProperty(); |
3453 | } |
3454 | } |
3455 | static void applyInitialTransitionTimingFunction(StyleResolver& styleResolver) |
3456 | { |
3457 | AnimationList& list = styleResolver.style()->ensureTransitions(); |
3458 | if (list.isEmpty()) |
3459 | list.append(Animation::create()); |
3460 | list.animation(0).setTimingFunction(Animation::initialTimingFunction()); |
3461 | for (size_t i = 1; i < list.size(); ++i) |
3462 | list.animation(i).clearTimingFunction(); |
3463 | } |
3464 | static void applyInheritTransitionTimingFunction(StyleResolver& styleResolver) |
3465 | { |
3466 | auto& list = styleResolver.style()->ensureTransitions(); |
3467 | auto* parentList = styleResolver.parentStyle()->transitions(); |
3468 | size_t i = 0, parentSize = parentList ? parentList->size() : 0; |
3469 | for ( ; i < parentSize && parentList->animation(i).isTimingFunctionSet(); ++i) { |
3470 | if (list.size() <= i) |
3471 | list.append(Animation::create()); |
3472 | list.animation(i).setTimingFunction(parentList->animation(i).timingFunction()); |
3473 | list.animation(i).setAnimationMode(parentList->animation(i).animationMode()); |
3474 | } |
3475 | |
3476 | // Reset any remaining animations to not have the property set. |
3477 | for ( ; i < list.size(); ++i) |
3478 | list.animation(i).clearTimingFunction(); |
3479 | } |
3480 | static void applyValueTransitionTimingFunction(StyleResolver& styleResolver, CSSValue& value) |
3481 | { |
3482 | AnimationList& list = styleResolver.style()->ensureTransitions(); |
3483 | size_t childIndex = 0; |
3484 | if (is<CSSValueList>(value)) { |
3485 | /* Walk each value and put it into an animation, creating new animations as needed. */ |
3486 | for (auto& currentValue : downcast<CSSValueList>(value)) { |
3487 | if (childIndex <= list.size()) |
3488 | list.append(Animation::create()); |
3489 | styleResolver.styleMap()->mapAnimationTimingFunction(list.animation(childIndex), currentValue); |
3490 | ++childIndex; |
3491 | } |
3492 | } else { |
3493 | if (list.isEmpty()) |
3494 | list.append(Animation::create()); |
3495 | styleResolver.styleMap()->mapAnimationTimingFunction(list.animation(childIndex), value); |
3496 | childIndex = 1; |
3497 | } |
3498 | for ( ; childIndex < list.size(); ++childIndex) { |
3499 | /* Reset all remaining animations to not have the property set. */ |
3500 | list.animation(childIndex).clearTimingFunction(); |
3501 | } |
3502 | } |
3503 | static void applyInitialUnicodeBidi(StyleResolver& styleResolver) |
3504 | { |
3505 | styleResolver.style()->setUnicodeBidi(RenderStyle::initialUnicodeBidi()); |
3506 | } |
3507 | static void applyInheritUnicodeBidi(StyleResolver& styleResolver) |
3508 | { |
3509 | styleResolver.style()->setUnicodeBidi(forwardInheritedValue(styleResolver.parentStyle()->unicodeBidi())); |
3510 | } |
3511 | static void applyValueUnicodeBidi(StyleResolver& styleResolver, CSSValue& value) |
3512 | { |
3513 | styleResolver.style()->setUnicodeBidi(downcast<CSSPrimitiveValue>(value)); |
3514 | } |
3515 | static void applyInitialVectorEffect(StyleResolver& styleResolver) |
3516 | { |
3517 | styleResolver.style()->accessSVGStyle().setVectorEffect(SVGRenderStyle::initialVectorEffect()); |
3518 | } |
3519 | static void applyInheritVectorEffect(StyleResolver& styleResolver) |
3520 | { |
3521 | styleResolver.style()->accessSVGStyle().setVectorEffect(forwardInheritedValue(styleResolver.parentStyle()->svgStyle().vectorEffect())); |
3522 | } |
3523 | static void applyValueVectorEffect(StyleResolver& styleResolver, CSSValue& value) |
3524 | { |
3525 | styleResolver.style()->accessSVGStyle().setVectorEffect(downcast<CSSPrimitiveValue>(value)); |
3526 | } |
3527 | static void applyInitialVerticalAlign(StyleResolver& styleResolver) |
3528 | { |
3529 | styleResolver.style()->setVerticalAlign(RenderStyle::initialVerticalAlign()); |
3530 | } |
3531 | static void applyInheritVerticalAlign(StyleResolver& styleResolver) |
3532 | { |
3533 | styleResolver.style()->setVerticalAlign(forwardInheritedValue(styleResolver.parentStyle()->verticalAlign())); |
3534 | } |
3535 | static void applyInitialVisibility(StyleResolver& styleResolver) |
3536 | { |
3537 | styleResolver.style()->setVisibility(RenderStyle::initialVisibility()); |
3538 | } |
3539 | static void applyInheritVisibility(StyleResolver& styleResolver) |
3540 | { |
3541 | styleResolver.style()->setVisibility(forwardInheritedValue(styleResolver.parentStyle()->visibility())); |
3542 | } |
3543 | static void applyValueVisibility(StyleResolver& styleResolver, CSSValue& value) |
3544 | { |
3545 | styleResolver.style()->setVisibility(downcast<CSSPrimitiveValue>(value)); |
3546 | } |
3547 | static void applyInitialWhiteSpace(StyleResolver& styleResolver) |
3548 | { |
3549 | styleResolver.style()->setWhiteSpace(RenderStyle::initialWhiteSpace()); |
3550 | } |
3551 | static void applyInheritWhiteSpace(StyleResolver& styleResolver) |
3552 | { |
3553 | styleResolver.style()->setWhiteSpace(forwardInheritedValue(styleResolver.parentStyle()->whiteSpace())); |
3554 | } |
3555 | static void applyValueWhiteSpace(StyleResolver& styleResolver, CSSValue& value) |
3556 | { |
3557 | styleResolver.style()->setWhiteSpace(downcast<CSSPrimitiveValue>(value)); |
3558 | } |
3559 | static void applyInitialWidows(StyleResolver& styleResolver) |
3560 | { |
3561 | styleResolver.style()->setHasAutoWidows(); |
3562 | } |
3563 | static void applyInheritWidows(StyleResolver& styleResolver) |
3564 | { |
3565 | if (styleResolver.parentStyle()->hasAutoWidows()) { |
3566 | styleResolver.style()->setHasAutoWidows(); |
3567 | return; |
3568 | } |
3569 | styleResolver.style()->setWidows(forwardInheritedValue(styleResolver.parentStyle()->widows())); |
3570 | } |
3571 | static void applyValueWidows(StyleResolver& styleResolver, CSSValue& value) |
3572 | { |
3573 | if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueAuto) { |
3574 | styleResolver.style()->setHasAutoWidows(); |
3575 | return; |
3576 | } |
3577 | styleResolver.style()->setWidows(downcast<CSSPrimitiveValue>(value)); |
3578 | } |
3579 | static void applyInitialWidth(StyleResolver& styleResolver) |
3580 | { |
3581 | styleResolver.style()->setWidth(RenderStyle::initialSize()); |
3582 | } |
3583 | static void applyInheritWidth(StyleResolver& styleResolver) |
3584 | { |
3585 | styleResolver.style()->setWidth(forwardInheritedValue(styleResolver.parentStyle()->width())); |
3586 | } |
3587 | static void applyValueWidth(StyleResolver& styleResolver, CSSValue& value) |
3588 | { |
3589 | styleResolver.style()->setWidth(StyleBuilderConverter::convertLengthSizing(styleResolver, value)); |
3590 | } |
3591 | static void applyInitialWillChange(StyleResolver& styleResolver) |
3592 | { |
3593 | styleResolver.style()->setWillChange(RenderStyle::initialWillChange()); |
3594 | } |
3595 | static void applyInheritWillChange(StyleResolver& styleResolver) |
3596 | { |
3597 | styleResolver.style()->setWillChange(forwardInheritedValue(styleResolver.parentStyle()->willChange())); |
3598 | } |
3599 | static void applyInitialWordBreak(StyleResolver& styleResolver) |
3600 | { |
3601 | styleResolver.style()->setWordBreak(RenderStyle::initialWordBreak()); |
3602 | } |
3603 | static void applyInheritWordBreak(StyleResolver& styleResolver) |
3604 | { |
3605 | styleResolver.style()->setWordBreak(forwardInheritedValue(styleResolver.parentStyle()->wordBreak())); |
3606 | } |
3607 | static void applyValueWordBreak(StyleResolver& styleResolver, CSSValue& value) |
3608 | { |
3609 | styleResolver.style()->setWordBreak(downcast<CSSPrimitiveValue>(value)); |
3610 | } |
3611 | static void applyInitialWordSpacing(StyleResolver& styleResolver) |
3612 | { |
3613 | styleResolver.style()->setWordSpacing(RenderStyle::initialWordSpacing()); |
3614 | } |
3615 | static void applyInheritWordSpacing(StyleResolver& styleResolver) |
3616 | { |
3617 | styleResolver.style()->setWordSpacing(forwardInheritedValue(styleResolver.parentStyle()->wordSpacing())); |
3618 | } |
3619 | static void applyValueWordSpacing(StyleResolver& styleResolver, CSSValue& value) |
3620 | { |
3621 | auto convertedValue = StyleBuilderConverter::convertWordSpacing(styleResolver, value); |
3622 | if (convertedValue) |
3623 | styleResolver.style()->setWordSpacing(WTFMove(convertedValue.value())); |
3624 | } |
3625 | static void applyInitialWordWrap(StyleResolver& styleResolver) |
3626 | { |
3627 | styleResolver.style()->setOverflowWrap(RenderStyle::initialOverflowWrap()); |
3628 | } |
3629 | static void applyInheritWordWrap(StyleResolver& styleResolver) |
3630 | { |
3631 | styleResolver.style()->setOverflowWrap(forwardInheritedValue(styleResolver.parentStyle()->overflowWrap())); |
3632 | } |
3633 | static void applyValueWordWrap(StyleResolver& styleResolver, CSSValue& value) |
3634 | { |
3635 | styleResolver.style()->setOverflowWrap(downcast<CSSPrimitiveValue>(value)); |
3636 | } |
3637 | static void applyInitialX(StyleResolver& styleResolver) |
3638 | { |
3639 | styleResolver.style()->setX(RenderStyle::initialZeroLength()); |
3640 | } |
3641 | static void applyInheritX(StyleResolver& styleResolver) |
3642 | { |
3643 | styleResolver.style()->setX(forwardInheritedValue(styleResolver.parentStyle()->x())); |
3644 | } |
3645 | static void applyValueX(StyleResolver& styleResolver, CSSValue& value) |
3646 | { |
3647 | styleResolver.style()->setX(StyleBuilderConverter::convertLength(styleResolver, value)); |
3648 | } |
3649 | static void applyInitialY(StyleResolver& styleResolver) |
3650 | { |
3651 | styleResolver.style()->setY(RenderStyle::initialZeroLength()); |
3652 | } |
3653 | static void applyInheritY(StyleResolver& styleResolver) |
3654 | { |
3655 | styleResolver.style()->setY(forwardInheritedValue(styleResolver.parentStyle()->y())); |
3656 | } |
3657 | static void applyValueY(StyleResolver& styleResolver, CSSValue& value) |
3658 | { |
3659 | styleResolver.style()->setY(StyleBuilderConverter::convertLength(styleResolver, value)); |
3660 | } |
3661 | static void applyInitialZIndex(StyleResolver& styleResolver) |
3662 | { |
3663 | styleResolver.style()->setHasAutoZIndex(); |
3664 | } |
3665 | static void applyInheritZIndex(StyleResolver& styleResolver) |
3666 | { |
3667 | if (styleResolver.parentStyle()->hasAutoZIndex()) { |
3668 | styleResolver.style()->setHasAutoZIndex(); |
3669 | return; |
3670 | } |
3671 | styleResolver.style()->setZIndex(forwardInheritedValue(styleResolver.parentStyle()->zIndex())); |
3672 | } |
3673 | static void applyValueZIndex(StyleResolver& styleResolver, CSSValue& value) |
3674 | { |
3675 | if (downcast<CSSPrimitiveValue>(value).valueID() == CSSValueAuto) { |
3676 | styleResolver.style()->setHasAutoZIndex(); |
3677 | return; |
3678 | } |
3679 | styleResolver.style()->setZIndex(downcast<CSSPrimitiveValue>(value)); |
3680 | } |
3681 | static void applyInitialAppleColorFilter(StyleResolver& styleResolver) |
3682 | { |
3683 | styleResolver.style()->setAppleColorFilter(RenderStyle::initialAppleColorFilter()); |
3684 | } |
3685 | static void applyInheritAppleColorFilter(StyleResolver& styleResolver) |
3686 | { |
3687 | styleResolver.style()->setAppleColorFilter(forwardInheritedValue(styleResolver.parentStyle()->appleColorFilter())); |
3688 | } |
3689 | static void applyValueAppleColorFilter(StyleResolver& styleResolver, CSSValue& value) |
3690 | { |
3691 | auto convertedValue = StyleBuilderConverter::convertFilterOperations(styleResolver, value); |
3692 | if (convertedValue) |
3693 | styleResolver.style()->setAppleColorFilter(WTFMove(convertedValue.value())); |
3694 | } |
3695 | static void applyInitialWebkitAppearance(StyleResolver& styleResolver) |
3696 | { |
3697 | styleResolver.style()->setAppearance(RenderStyle::initialAppearance()); |
3698 | } |
3699 | static void applyInheritWebkitAppearance(StyleResolver& styleResolver) |
3700 | { |
3701 | styleResolver.style()->setAppearance(forwardInheritedValue(styleResolver.parentStyle()->appearance())); |
3702 | } |
3703 | static void applyValueWebkitAppearance(StyleResolver& styleResolver, CSSValue& value) |
3704 | { |
3705 | styleResolver.style()->setAppearance(downcast<CSSPrimitiveValue>(value)); |
3706 | } |
3707 | static void applyInitialWebkitBackfaceVisibility(StyleResolver& styleResolver) |
3708 | { |
3709 | styleResolver.style()->setBackfaceVisibility(RenderStyle::initialBackfaceVisibility()); |
3710 | } |
3711 | static void applyInheritWebkitBackfaceVisibility(StyleResolver& styleResolver) |
3712 | { |
3713 | styleResolver.style()->setBackfaceVisibility(forwardInheritedValue(styleResolver.parentStyle()->backfaceVisibility())); |
3714 | } |
3715 | static void applyValueWebkitBackfaceVisibility(StyleResolver& styleResolver, CSSValue& value) |
3716 | { |
3717 | styleResolver.style()->setBackfaceVisibility(downcast<CSSPrimitiveValue>(value)); |
3718 | } |
3719 | static void applyInitialWebkitBackgroundClip(StyleResolver& styleResolver) |
3720 | { |
3721 | // Check for (single-layer) no-op before clearing anything. |
3722 | auto& layers = styleResolver.style()->backgroundLayers(); |
3723 | if (!layers.next() && (!layers.isClipSet() || layers.clip() == FillLayer::initialFillClip(FillLayerType::Background))) |
3724 | return; |
3725 | |
3726 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
3727 | child->setClip(FillLayer::initialFillClip(FillLayerType::Background)); |
3728 | for (child = child->next(); child; child = child->next()) |
3729 | child->clearClip(); |
3730 | } |
3731 | static void applyInheritWebkitBackgroundClip(StyleResolver& styleResolver) |
3732 | { |
3733 | // Check for no-op before copying anything. |
3734 | if (styleResolver.parentStyle()->backgroundLayers() == styleResolver.style()->backgroundLayers()) |
3735 | return; |
3736 | |
3737 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
3738 | FillLayer* previousChild = nullptr; |
3739 | for (auto* parent = &styleResolver.parentStyle()->backgroundLayers(); parent && parent->isClipSet(); parent = parent->next()) { |
3740 | if (!child) { |
3741 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
3742 | child = previousChild->next(); |
3743 | } |
3744 | child->setClip(parent->clip()); |
3745 | previousChild = child; |
3746 | child = previousChild->next(); |
3747 | } |
3748 | for (; child; child = child->next()) |
3749 | child->clearClip(); |
3750 | } |
3751 | static void applyValueWebkitBackgroundClip(StyleResolver& styleResolver, CSSValue& value) |
3752 | { |
3753 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
3754 | FillLayer* previousChild = nullptr; |
3755 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
3756 | // Walk each value and put it into a layer, creating new layers as needed. |
3757 | for (auto& item : downcast<CSSValueList>(value)) { |
3758 | if (!child) { |
3759 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
3760 | child = previousChild->next(); |
3761 | } |
3762 | styleResolver.styleMap()->mapFillClip(CSSPropertyWebkitBackgroundClip, *child, item); |
3763 | previousChild = child; |
3764 | child = child->next(); |
3765 | } |
3766 | } else { |
3767 | styleResolver.styleMap()->mapFillClip(CSSPropertyWebkitBackgroundClip, *child, value); |
3768 | child = child->next(); |
3769 | } |
3770 | for (; child; child = child->next()) |
3771 | child->clearClip(); |
3772 | } |
3773 | static void applyInitialWebkitBackgroundComposite(StyleResolver& styleResolver) |
3774 | { |
3775 | // Check for (single-layer) no-op before clearing anything. |
3776 | auto& layers = styleResolver.style()->backgroundLayers(); |
3777 | if (!layers.next() && (!layers.isCompositeSet() || layers.composite() == FillLayer::initialFillComposite(FillLayerType::Background))) |
3778 | return; |
3779 | |
3780 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
3781 | child->setComposite(FillLayer::initialFillComposite(FillLayerType::Background)); |
3782 | for (child = child->next(); child; child = child->next()) |
3783 | child->clearComposite(); |
3784 | } |
3785 | static void applyInheritWebkitBackgroundComposite(StyleResolver& styleResolver) |
3786 | { |
3787 | // Check for no-op before copying anything. |
3788 | if (styleResolver.parentStyle()->backgroundLayers() == styleResolver.style()->backgroundLayers()) |
3789 | return; |
3790 | |
3791 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
3792 | FillLayer* previousChild = nullptr; |
3793 | for (auto* parent = &styleResolver.parentStyle()->backgroundLayers(); parent && parent->isCompositeSet(); parent = parent->next()) { |
3794 | if (!child) { |
3795 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
3796 | child = previousChild->next(); |
3797 | } |
3798 | child->setComposite(parent->composite()); |
3799 | previousChild = child; |
3800 | child = previousChild->next(); |
3801 | } |
3802 | for (; child; child = child->next()) |
3803 | child->clearComposite(); |
3804 | } |
3805 | static void applyValueWebkitBackgroundComposite(StyleResolver& styleResolver, CSSValue& value) |
3806 | { |
3807 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
3808 | FillLayer* previousChild = nullptr; |
3809 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
3810 | // Walk each value and put it into a layer, creating new layers as needed. |
3811 | for (auto& item : downcast<CSSValueList>(value)) { |
3812 | if (!child) { |
3813 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
3814 | child = previousChild->next(); |
3815 | } |
3816 | styleResolver.styleMap()->mapFillComposite(CSSPropertyWebkitBackgroundComposite, *child, item); |
3817 | previousChild = child; |
3818 | child = child->next(); |
3819 | } |
3820 | } else { |
3821 | styleResolver.styleMap()->mapFillComposite(CSSPropertyWebkitBackgroundComposite, *child, value); |
3822 | child = child->next(); |
3823 | } |
3824 | for (; child; child = child->next()) |
3825 | child->clearComposite(); |
3826 | } |
3827 | static void applyInitialWebkitBackgroundOrigin(StyleResolver& styleResolver) |
3828 | { |
3829 | // Check for (single-layer) no-op before clearing anything. |
3830 | auto& layers = styleResolver.style()->backgroundLayers(); |
3831 | if (!layers.next() && (!layers.isOriginSet() || layers.origin() == FillLayer::initialFillOrigin(FillLayerType::Background))) |
3832 | return; |
3833 | |
3834 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
3835 | child->setOrigin(FillLayer::initialFillOrigin(FillLayerType::Background)); |
3836 | for (child = child->next(); child; child = child->next()) |
3837 | child->clearOrigin(); |
3838 | } |
3839 | static void applyInheritWebkitBackgroundOrigin(StyleResolver& styleResolver) |
3840 | { |
3841 | // Check for no-op before copying anything. |
3842 | if (styleResolver.parentStyle()->backgroundLayers() == styleResolver.style()->backgroundLayers()) |
3843 | return; |
3844 | |
3845 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
3846 | FillLayer* previousChild = nullptr; |
3847 | for (auto* parent = &styleResolver.parentStyle()->backgroundLayers(); parent && parent->isOriginSet(); parent = parent->next()) { |
3848 | if (!child) { |
3849 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
3850 | child = previousChild->next(); |
3851 | } |
3852 | child->setOrigin(parent->origin()); |
3853 | previousChild = child; |
3854 | child = previousChild->next(); |
3855 | } |
3856 | for (; child; child = child->next()) |
3857 | child->clearOrigin(); |
3858 | } |
3859 | static void applyValueWebkitBackgroundOrigin(StyleResolver& styleResolver, CSSValue& value) |
3860 | { |
3861 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
3862 | FillLayer* previousChild = nullptr; |
3863 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
3864 | // Walk each value and put it into a layer, creating new layers as needed. |
3865 | for (auto& item : downcast<CSSValueList>(value)) { |
3866 | if (!child) { |
3867 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
3868 | child = previousChild->next(); |
3869 | } |
3870 | styleResolver.styleMap()->mapFillOrigin(CSSPropertyWebkitBackgroundOrigin, *child, item); |
3871 | previousChild = child; |
3872 | child = child->next(); |
3873 | } |
3874 | } else { |
3875 | styleResolver.styleMap()->mapFillOrigin(CSSPropertyWebkitBackgroundOrigin, *child, value); |
3876 | child = child->next(); |
3877 | } |
3878 | for (; child; child = child->next()) |
3879 | child->clearOrigin(); |
3880 | } |
3881 | static void applyInitialWebkitBackgroundSize(StyleResolver& styleResolver) |
3882 | { |
3883 | // Check for (single-layer) no-op before clearing anything. |
3884 | auto& layers = styleResolver.style()->backgroundLayers(); |
3885 | if (!layers.next() && (!layers.isSizeSet() || layers.size() == FillLayer::initialFillSize(FillLayerType::Background))) |
3886 | return; |
3887 | |
3888 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
3889 | child->setSize(FillLayer::initialFillSize(FillLayerType::Background)); |
3890 | for (child = child->next(); child; child = child->next()) |
3891 | child->clearSize(); |
3892 | } |
3893 | static void applyInheritWebkitBackgroundSize(StyleResolver& styleResolver) |
3894 | { |
3895 | // Check for no-op before copying anything. |
3896 | if (styleResolver.parentStyle()->backgroundLayers() == styleResolver.style()->backgroundLayers()) |
3897 | return; |
3898 | |
3899 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
3900 | FillLayer* previousChild = nullptr; |
3901 | for (auto* parent = &styleResolver.parentStyle()->backgroundLayers(); parent && parent->isSizeSet(); parent = parent->next()) { |
3902 | if (!child) { |
3903 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
3904 | child = previousChild->next(); |
3905 | } |
3906 | child->setSize(parent->size()); |
3907 | previousChild = child; |
3908 | child = previousChild->next(); |
3909 | } |
3910 | for (; child; child = child->next()) |
3911 | child->clearSize(); |
3912 | } |
3913 | static void applyValueWebkitBackgroundSize(StyleResolver& styleResolver, CSSValue& value) |
3914 | { |
3915 | auto* child = &styleResolver.style()->ensureBackgroundLayers(); |
3916 | FillLayer* previousChild = nullptr; |
3917 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
3918 | // Walk each value and put it into a layer, creating new layers as needed. |
3919 | for (auto& item : downcast<CSSValueList>(value)) { |
3920 | if (!child) { |
3921 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Background)); |
3922 | child = previousChild->next(); |
3923 | } |
3924 | styleResolver.styleMap()->mapFillSize(CSSPropertyWebkitBackgroundSize, *child, item); |
3925 | previousChild = child; |
3926 | child = child->next(); |
3927 | } |
3928 | } else { |
3929 | styleResolver.styleMap()->mapFillSize(CSSPropertyWebkitBackgroundSize, *child, value); |
3930 | child = child->next(); |
3931 | } |
3932 | for (; child; child = child->next()) |
3933 | child->clearSize(); |
3934 | } |
3935 | static void applyInitialWebkitBorderFit(StyleResolver& styleResolver) |
3936 | { |
3937 | styleResolver.style()->setBorderFit(RenderStyle::initialBorderFit()); |
3938 | } |
3939 | static void applyInheritWebkitBorderFit(StyleResolver& styleResolver) |
3940 | { |
3941 | styleResolver.style()->setBorderFit(forwardInheritedValue(styleResolver.parentStyle()->borderFit())); |
3942 | } |
3943 | static void applyValueWebkitBorderFit(StyleResolver& styleResolver, CSSValue& value) |
3944 | { |
3945 | styleResolver.style()->setBorderFit(downcast<CSSPrimitiveValue>(value)); |
3946 | } |
3947 | static void applyInitialWebkitBorderHorizontalSpacing(StyleResolver& styleResolver) |
3948 | { |
3949 | styleResolver.style()->setHorizontalBorderSpacing(RenderStyle::initialHorizontalBorderSpacing()); |
3950 | } |
3951 | static void applyInheritWebkitBorderHorizontalSpacing(StyleResolver& styleResolver) |
3952 | { |
3953 | styleResolver.style()->setHorizontalBorderSpacing(forwardInheritedValue(styleResolver.parentStyle()->horizontalBorderSpacing())); |
3954 | } |
3955 | static void applyValueWebkitBorderHorizontalSpacing(StyleResolver& styleResolver, CSSValue& value) |
3956 | { |
3957 | styleResolver.style()->setHorizontalBorderSpacing(StyleBuilderConverter::convertComputedLength<float>(styleResolver, value)); |
3958 | } |
3959 | static void applyInitialWebkitBorderImage(StyleResolver& styleResolver) |
3960 | { |
3961 | styleResolver.style()->setBorderImage(RenderStyle::initialNinePieceImage()); |
3962 | } |
3963 | static void applyInheritWebkitBorderImage(StyleResolver& styleResolver) |
3964 | { |
3965 | styleResolver.style()->setBorderImage(forwardInheritedValue(styleResolver.parentStyle()->borderImage())); |
3966 | } |
3967 | static void applyValueWebkitBorderImage(StyleResolver& styleResolver, CSSValue& value) |
3968 | { |
3969 | styleResolver.style()->setBorderImage(StyleBuilderConverter::convertBorderImage<CSSPropertyWebkitBorderImage>(styleResolver, value)); |
3970 | } |
3971 | static void applyInitialWebkitBorderVerticalSpacing(StyleResolver& styleResolver) |
3972 | { |
3973 | styleResolver.style()->setVerticalBorderSpacing(RenderStyle::initialVerticalBorderSpacing()); |
3974 | } |
3975 | static void applyInheritWebkitBorderVerticalSpacing(StyleResolver& styleResolver) |
3976 | { |
3977 | styleResolver.style()->setVerticalBorderSpacing(forwardInheritedValue(styleResolver.parentStyle()->verticalBorderSpacing())); |
3978 | } |
3979 | static void applyValueWebkitBorderVerticalSpacing(StyleResolver& styleResolver, CSSValue& value) |
3980 | { |
3981 | styleResolver.style()->setVerticalBorderSpacing(StyleBuilderConverter::convertComputedLength<float>(styleResolver, value)); |
3982 | } |
3983 | static void applyInitialWebkitBoxAlign(StyleResolver& styleResolver) |
3984 | { |
3985 | styleResolver.style()->setBoxAlign(RenderStyle::initialBoxAlign()); |
3986 | } |
3987 | static void applyInheritWebkitBoxAlign(StyleResolver& styleResolver) |
3988 | { |
3989 | styleResolver.style()->setBoxAlign(forwardInheritedValue(styleResolver.parentStyle()->boxAlign())); |
3990 | } |
3991 | static void applyValueWebkitBoxAlign(StyleResolver& styleResolver, CSSValue& value) |
3992 | { |
3993 | styleResolver.style()->setBoxAlign(downcast<CSSPrimitiveValue>(value)); |
3994 | } |
3995 | static void applyInitialWebkitBoxDecorationBreak(StyleResolver& styleResolver) |
3996 | { |
3997 | styleResolver.style()->setBoxDecorationBreak(RenderStyle::initialBoxDecorationBreak()); |
3998 | } |
3999 | static void applyInheritWebkitBoxDecorationBreak(StyleResolver& styleResolver) |
4000 | { |
4001 | styleResolver.style()->setBoxDecorationBreak(forwardInheritedValue(styleResolver.parentStyle()->boxDecorationBreak())); |
4002 | } |
4003 | static void applyValueWebkitBoxDecorationBreak(StyleResolver& styleResolver, CSSValue& value) |
4004 | { |
4005 | styleResolver.style()->setBoxDecorationBreak(downcast<CSSPrimitiveValue>(value)); |
4006 | } |
4007 | static void applyInitialWebkitBoxDirection(StyleResolver& styleResolver) |
4008 | { |
4009 | styleResolver.style()->setBoxDirection(RenderStyle::initialBoxDirection()); |
4010 | } |
4011 | static void applyInheritWebkitBoxDirection(StyleResolver& styleResolver) |
4012 | { |
4013 | styleResolver.style()->setBoxDirection(forwardInheritedValue(styleResolver.parentStyle()->boxDirection())); |
4014 | } |
4015 | static void applyValueWebkitBoxDirection(StyleResolver& styleResolver, CSSValue& value) |
4016 | { |
4017 | styleResolver.style()->setBoxDirection(downcast<CSSPrimitiveValue>(value)); |
4018 | } |
4019 | static void applyInitialWebkitBoxFlex(StyleResolver& styleResolver) |
4020 | { |
4021 | styleResolver.style()->setBoxFlex(RenderStyle::initialBoxFlex()); |
4022 | } |
4023 | static void applyInheritWebkitBoxFlex(StyleResolver& styleResolver) |
4024 | { |
4025 | styleResolver.style()->setBoxFlex(forwardInheritedValue(styleResolver.parentStyle()->boxFlex())); |
4026 | } |
4027 | static void applyValueWebkitBoxFlex(StyleResolver& styleResolver, CSSValue& value) |
4028 | { |
4029 | styleResolver.style()->setBoxFlex(downcast<CSSPrimitiveValue>(value)); |
4030 | } |
4031 | static void applyInitialWebkitBoxFlexGroup(StyleResolver& styleResolver) |
4032 | { |
4033 | styleResolver.style()->setBoxFlexGroup(RenderStyle::initialBoxFlexGroup()); |
4034 | } |
4035 | static void applyInheritWebkitBoxFlexGroup(StyleResolver& styleResolver) |
4036 | { |
4037 | styleResolver.style()->setBoxFlexGroup(forwardInheritedValue(styleResolver.parentStyle()->boxFlexGroup())); |
4038 | } |
4039 | static void applyValueWebkitBoxFlexGroup(StyleResolver& styleResolver, CSSValue& value) |
4040 | { |
4041 | styleResolver.style()->setBoxFlexGroup(downcast<CSSPrimitiveValue>(value)); |
4042 | } |
4043 | static void applyInitialWebkitBoxLines(StyleResolver& styleResolver) |
4044 | { |
4045 | styleResolver.style()->setBoxLines(RenderStyle::initialBoxLines()); |
4046 | } |
4047 | static void applyInheritWebkitBoxLines(StyleResolver& styleResolver) |
4048 | { |
4049 | styleResolver.style()->setBoxLines(forwardInheritedValue(styleResolver.parentStyle()->boxLines())); |
4050 | } |
4051 | static void applyValueWebkitBoxLines(StyleResolver& styleResolver, CSSValue& value) |
4052 | { |
4053 | styleResolver.style()->setBoxLines(downcast<CSSPrimitiveValue>(value)); |
4054 | } |
4055 | static void applyInitialWebkitBoxOrdinalGroup(StyleResolver& styleResolver) |
4056 | { |
4057 | styleResolver.style()->setBoxOrdinalGroup(RenderStyle::initialBoxOrdinalGroup()); |
4058 | } |
4059 | static void applyInheritWebkitBoxOrdinalGroup(StyleResolver& styleResolver) |
4060 | { |
4061 | styleResolver.style()->setBoxOrdinalGroup(forwardInheritedValue(styleResolver.parentStyle()->boxOrdinalGroup())); |
4062 | } |
4063 | static void applyValueWebkitBoxOrdinalGroup(StyleResolver& styleResolver, CSSValue& value) |
4064 | { |
4065 | styleResolver.style()->setBoxOrdinalGroup(downcast<CSSPrimitiveValue>(value)); |
4066 | } |
4067 | static void applyInitialWebkitBoxOrient(StyleResolver& styleResolver) |
4068 | { |
4069 | styleResolver.style()->setBoxOrient(RenderStyle::initialBoxOrient()); |
4070 | } |
4071 | static void applyInheritWebkitBoxOrient(StyleResolver& styleResolver) |
4072 | { |
4073 | styleResolver.style()->setBoxOrient(forwardInheritedValue(styleResolver.parentStyle()->boxOrient())); |
4074 | } |
4075 | static void applyValueWebkitBoxOrient(StyleResolver& styleResolver, CSSValue& value) |
4076 | { |
4077 | styleResolver.style()->setBoxOrient(downcast<CSSPrimitiveValue>(value)); |
4078 | } |
4079 | static void applyInitialWebkitBoxPack(StyleResolver& styleResolver) |
4080 | { |
4081 | styleResolver.style()->setBoxPack(RenderStyle::initialBoxPack()); |
4082 | } |
4083 | static void applyInheritWebkitBoxPack(StyleResolver& styleResolver) |
4084 | { |
4085 | styleResolver.style()->setBoxPack(forwardInheritedValue(styleResolver.parentStyle()->boxPack())); |
4086 | } |
4087 | static void applyValueWebkitBoxPack(StyleResolver& styleResolver, CSSValue& value) |
4088 | { |
4089 | styleResolver.style()->setBoxPack(downcast<CSSPrimitiveValue>(value)); |
4090 | } |
4091 | static void applyInitialWebkitBoxReflect(StyleResolver& styleResolver) |
4092 | { |
4093 | styleResolver.style()->setBoxReflect(RenderStyle::initialBoxReflect()); |
4094 | } |
4095 | static void applyInheritWebkitBoxReflect(StyleResolver& styleResolver) |
4096 | { |
4097 | styleResolver.style()->setBoxReflect(forwardInheritedValue(styleResolver.parentStyle()->boxReflect())); |
4098 | } |
4099 | static void applyValueWebkitBoxReflect(StyleResolver& styleResolver, CSSValue& value) |
4100 | { |
4101 | styleResolver.style()->setBoxReflect(StyleBuilderConverter::convertReflection(styleResolver, value)); |
4102 | } |
4103 | static void applyInitialWebkitClipPath(StyleResolver& styleResolver) |
4104 | { |
4105 | styleResolver.style()->setClipPath(RenderStyle::initialClipPath()); |
4106 | } |
4107 | static void applyInheritWebkitClipPath(StyleResolver& styleResolver) |
4108 | { |
4109 | styleResolver.style()->setClipPath(forwardInheritedValue(styleResolver.parentStyle()->clipPath())); |
4110 | } |
4111 | static void applyValueWebkitClipPath(StyleResolver& styleResolver, CSSValue& value) |
4112 | { |
4113 | styleResolver.style()->setClipPath(StyleBuilderConverter::convertClipPath(styleResolver, value)); |
4114 | } |
4115 | static void applyInitialWebkitColumnAxis(StyleResolver& styleResolver) |
4116 | { |
4117 | styleResolver.style()->setColumnAxis(RenderStyle::initialColumnAxis()); |
4118 | } |
4119 | static void applyInheritWebkitColumnAxis(StyleResolver& styleResolver) |
4120 | { |
4121 | styleResolver.style()->setColumnAxis(forwardInheritedValue(styleResolver.parentStyle()->columnAxis())); |
4122 | } |
4123 | static void applyValueWebkitColumnAxis(StyleResolver& styleResolver, CSSValue& value) |
4124 | { |
4125 | styleResolver.style()->setColumnAxis(downcast<CSSPrimitiveValue>(value)); |
4126 | } |
4127 | static void applyInitialWebkitColumnProgression(StyleResolver& styleResolver) |
4128 | { |
4129 | styleResolver.style()->setColumnProgression(RenderStyle::initialColumnProgression()); |
4130 | } |
4131 | static void applyInheritWebkitColumnProgression(StyleResolver& styleResolver) |
4132 | { |
4133 | styleResolver.style()->setColumnProgression(forwardInheritedValue(styleResolver.parentStyle()->columnProgression())); |
4134 | } |
4135 | static void applyValueWebkitColumnProgression(StyleResolver& styleResolver, CSSValue& value) |
4136 | { |
4137 | styleResolver.style()->setColumnProgression(downcast<CSSPrimitiveValue>(value)); |
4138 | } |
4139 | static void applyInitialWebkitHyphenateCharacter(StyleResolver& styleResolver) |
4140 | { |
4141 | styleResolver.style()->setHyphenationString(RenderStyle::initialHyphenationString()); |
4142 | } |
4143 | static void applyInheritWebkitHyphenateCharacter(StyleResolver& styleResolver) |
4144 | { |
4145 | styleResolver.style()->setHyphenationString(forwardInheritedValue(styleResolver.parentStyle()->hyphenationString())); |
4146 | } |
4147 | static void applyValueWebkitHyphenateCharacter(StyleResolver& styleResolver, CSSValue& value) |
4148 | { |
4149 | styleResolver.style()->setHyphenationString(StyleBuilderConverter::convertStringOrAuto(styleResolver, value)); |
4150 | } |
4151 | static void applyInitialWebkitHyphenateLimitAfter(StyleResolver& styleResolver) |
4152 | { |
4153 | styleResolver.style()->setHyphenationLimitAfter(RenderStyle::initialHyphenationLimitAfter()); |
4154 | } |
4155 | static void applyInheritWebkitHyphenateLimitAfter(StyleResolver& styleResolver) |
4156 | { |
4157 | styleResolver.style()->setHyphenationLimitAfter(forwardInheritedValue(styleResolver.parentStyle()->hyphenationLimitAfter())); |
4158 | } |
4159 | static void applyValueWebkitHyphenateLimitAfter(StyleResolver& styleResolver, CSSValue& value) |
4160 | { |
4161 | styleResolver.style()->setHyphenationLimitAfter(StyleBuilderConverter::convertNumberOrAuto<short>(styleResolver, value)); |
4162 | } |
4163 | static void applyInitialWebkitHyphenateLimitBefore(StyleResolver& styleResolver) |
4164 | { |
4165 | styleResolver.style()->setHyphenationLimitBefore(RenderStyle::initialHyphenationLimitBefore()); |
4166 | } |
4167 | static void applyInheritWebkitHyphenateLimitBefore(StyleResolver& styleResolver) |
4168 | { |
4169 | styleResolver.style()->setHyphenationLimitBefore(forwardInheritedValue(styleResolver.parentStyle()->hyphenationLimitBefore())); |
4170 | } |
4171 | static void applyValueWebkitHyphenateLimitBefore(StyleResolver& styleResolver, CSSValue& value) |
4172 | { |
4173 | styleResolver.style()->setHyphenationLimitBefore(StyleBuilderConverter::convertNumberOrAuto<short>(styleResolver, value)); |
4174 | } |
4175 | static void applyInitialWebkitHyphenateLimitLines(StyleResolver& styleResolver) |
4176 | { |
4177 | styleResolver.style()->setHyphenationLimitLines(RenderStyle::initialHyphenationLimitLines()); |
4178 | } |
4179 | static void applyInheritWebkitHyphenateLimitLines(StyleResolver& styleResolver) |
4180 | { |
4181 | styleResolver.style()->setHyphenationLimitLines(forwardInheritedValue(styleResolver.parentStyle()->hyphenationLimitLines())); |
4182 | } |
4183 | static void applyValueWebkitHyphenateLimitLines(StyleResolver& styleResolver, CSSValue& value) |
4184 | { |
4185 | styleResolver.style()->setHyphenationLimitLines(StyleBuilderConverter::convertWebkitHyphenateLimitLines(styleResolver, value)); |
4186 | } |
4187 | static void applyInitialWebkitHyphens(StyleResolver& styleResolver) |
4188 | { |
4189 | styleResolver.style()->setHyphens(RenderStyle::initialHyphens()); |
4190 | } |
4191 | static void applyInheritWebkitHyphens(StyleResolver& styleResolver) |
4192 | { |
4193 | styleResolver.style()->setHyphens(forwardInheritedValue(styleResolver.parentStyle()->hyphens())); |
4194 | } |
4195 | static void applyValueWebkitHyphens(StyleResolver& styleResolver, CSSValue& value) |
4196 | { |
4197 | styleResolver.style()->setHyphens(downcast<CSSPrimitiveValue>(value)); |
4198 | } |
4199 | static void applyInitialWebkitInitialLetter(StyleResolver& styleResolver) |
4200 | { |
4201 | styleResolver.style()->setInitialLetter(RenderStyle::initialInitialLetter()); |
4202 | } |
4203 | static void applyInheritWebkitInitialLetter(StyleResolver& styleResolver) |
4204 | { |
4205 | styleResolver.style()->setInitialLetter(forwardInheritedValue(styleResolver.parentStyle()->initialLetter())); |
4206 | } |
4207 | static void applyValueWebkitInitialLetter(StyleResolver& styleResolver, CSSValue& value) |
4208 | { |
4209 | styleResolver.style()->setInitialLetter(StyleBuilderConverter::convertInitialLetter(styleResolver, value)); |
4210 | } |
4211 | static void applyInitialWebkitLineAlign(StyleResolver& styleResolver) |
4212 | { |
4213 | styleResolver.style()->setLineAlign(RenderStyle::initialLineAlign()); |
4214 | } |
4215 | static void applyInheritWebkitLineAlign(StyleResolver& styleResolver) |
4216 | { |
4217 | styleResolver.style()->setLineAlign(forwardInheritedValue(styleResolver.parentStyle()->lineAlign())); |
4218 | } |
4219 | static void applyValueWebkitLineAlign(StyleResolver& styleResolver, CSSValue& value) |
4220 | { |
4221 | styleResolver.style()->setLineAlign(downcast<CSSPrimitiveValue>(value)); |
4222 | } |
4223 | static void applyInitialWebkitLineBoxContain(StyleResolver& styleResolver) |
4224 | { |
4225 | styleResolver.style()->setLineBoxContain(RenderStyle::initialLineBoxContain()); |
4226 | } |
4227 | static void applyInheritWebkitLineBoxContain(StyleResolver& styleResolver) |
4228 | { |
4229 | styleResolver.style()->setLineBoxContain(forwardInheritedValue(styleResolver.parentStyle()->lineBoxContain())); |
4230 | } |
4231 | static void applyValueWebkitLineBoxContain(StyleResolver& styleResolver, CSSValue& value) |
4232 | { |
4233 | styleResolver.style()->setLineBoxContain(StyleBuilderConverter::convertLineBoxContain(styleResolver, value)); |
4234 | } |
4235 | static void applyInitialWebkitLineClamp(StyleResolver& styleResolver) |
4236 | { |
4237 | styleResolver.style()->setLineClamp(RenderStyle::initialLineClamp()); |
4238 | } |
4239 | static void applyInheritWebkitLineClamp(StyleResolver& styleResolver) |
4240 | { |
4241 | styleResolver.style()->setLineClamp(forwardInheritedValue(styleResolver.parentStyle()->lineClamp())); |
4242 | } |
4243 | static void applyValueWebkitLineClamp(StyleResolver& styleResolver, CSSValue& value) |
4244 | { |
4245 | styleResolver.style()->setLineClamp(downcast<CSSPrimitiveValue>(value)); |
4246 | } |
4247 | static void applyInitialWebkitLineGrid(StyleResolver& styleResolver) |
4248 | { |
4249 | styleResolver.style()->setLineGrid(RenderStyle::initialLineGrid()); |
4250 | } |
4251 | static void applyInheritWebkitLineGrid(StyleResolver& styleResolver) |
4252 | { |
4253 | styleResolver.style()->setLineGrid(forwardInheritedValue(styleResolver.parentStyle()->lineGrid())); |
4254 | } |
4255 | static void applyValueWebkitLineGrid(StyleResolver& styleResolver, CSSValue& value) |
4256 | { |
4257 | styleResolver.style()->setLineGrid(StyleBuilderConverter::convertStringOrNone(styleResolver, value)); |
4258 | } |
4259 | static void applyInitialWebkitLineSnap(StyleResolver& styleResolver) |
4260 | { |
4261 | styleResolver.style()->setLineSnap(RenderStyle::initialLineSnap()); |
4262 | } |
4263 | static void applyInheritWebkitLineSnap(StyleResolver& styleResolver) |
4264 | { |
4265 | styleResolver.style()->setLineSnap(forwardInheritedValue(styleResolver.parentStyle()->lineSnap())); |
4266 | } |
4267 | static void applyValueWebkitLineSnap(StyleResolver& styleResolver, CSSValue& value) |
4268 | { |
4269 | styleResolver.style()->setLineSnap(downcast<CSSPrimitiveValue>(value)); |
4270 | } |
4271 | static void applyInitialWebkitMarginAfterCollapse(StyleResolver& styleResolver) |
4272 | { |
4273 | styleResolver.style()->setMarginAfterCollapse(RenderStyle::initialMarginAfterCollapse()); |
4274 | } |
4275 | static void applyInheritWebkitMarginAfterCollapse(StyleResolver& styleResolver) |
4276 | { |
4277 | styleResolver.style()->setMarginAfterCollapse(forwardInheritedValue(styleResolver.parentStyle()->marginAfterCollapse())); |
4278 | } |
4279 | static void applyValueWebkitMarginAfterCollapse(StyleResolver& styleResolver, CSSValue& value) |
4280 | { |
4281 | styleResolver.style()->setMarginAfterCollapse(downcast<CSSPrimitiveValue>(value)); |
4282 | } |
4283 | static void applyInitialWebkitMarginBeforeCollapse(StyleResolver& styleResolver) |
4284 | { |
4285 | styleResolver.style()->setMarginBeforeCollapse(RenderStyle::initialMarginBeforeCollapse()); |
4286 | } |
4287 | static void applyInheritWebkitMarginBeforeCollapse(StyleResolver& styleResolver) |
4288 | { |
4289 | styleResolver.style()->setMarginBeforeCollapse(forwardInheritedValue(styleResolver.parentStyle()->marginBeforeCollapse())); |
4290 | } |
4291 | static void applyValueWebkitMarginBeforeCollapse(StyleResolver& styleResolver, CSSValue& value) |
4292 | { |
4293 | styleResolver.style()->setMarginBeforeCollapse(downcast<CSSPrimitiveValue>(value)); |
4294 | } |
4295 | static void applyInitialWebkitMarginBottomCollapse(StyleResolver& styleResolver) |
4296 | { |
4297 | styleResolver.style()->setMarginAfterCollapse(RenderStyle::initialMarginAfterCollapse()); |
4298 | } |
4299 | static void applyInheritWebkitMarginBottomCollapse(StyleResolver& styleResolver) |
4300 | { |
4301 | styleResolver.style()->setMarginAfterCollapse(forwardInheritedValue(styleResolver.parentStyle()->marginAfterCollapse())); |
4302 | } |
4303 | static void applyValueWebkitMarginBottomCollapse(StyleResolver& styleResolver, CSSValue& value) |
4304 | { |
4305 | styleResolver.style()->setMarginAfterCollapse(downcast<CSSPrimitiveValue>(value)); |
4306 | } |
4307 | static void applyInitialWebkitMarginTopCollapse(StyleResolver& styleResolver) |
4308 | { |
4309 | styleResolver.style()->setMarginBeforeCollapse(RenderStyle::initialMarginBeforeCollapse()); |
4310 | } |
4311 | static void applyInheritWebkitMarginTopCollapse(StyleResolver& styleResolver) |
4312 | { |
4313 | styleResolver.style()->setMarginBeforeCollapse(forwardInheritedValue(styleResolver.parentStyle()->marginBeforeCollapse())); |
4314 | } |
4315 | static void applyValueWebkitMarginTopCollapse(StyleResolver& styleResolver, CSSValue& value) |
4316 | { |
4317 | styleResolver.style()->setMarginBeforeCollapse(downcast<CSSPrimitiveValue>(value)); |
4318 | } |
4319 | static void applyInitialWebkitMarqueeDirection(StyleResolver& styleResolver) |
4320 | { |
4321 | styleResolver.style()->setMarqueeDirection(RenderStyle::initialMarqueeDirection()); |
4322 | } |
4323 | static void applyInheritWebkitMarqueeDirection(StyleResolver& styleResolver) |
4324 | { |
4325 | styleResolver.style()->setMarqueeDirection(forwardInheritedValue(styleResolver.parentStyle()->marqueeDirection())); |
4326 | } |
4327 | static void applyValueWebkitMarqueeDirection(StyleResolver& styleResolver, CSSValue& value) |
4328 | { |
4329 | styleResolver.style()->setMarqueeDirection(downcast<CSSPrimitiveValue>(value)); |
4330 | } |
4331 | static void applyInitialWebkitMarqueeIncrement(StyleResolver& styleResolver) |
4332 | { |
4333 | styleResolver.style()->setMarqueeIncrement(RenderStyle::initialMarqueeIncrement()); |
4334 | } |
4335 | static void applyInheritWebkitMarqueeIncrement(StyleResolver& styleResolver) |
4336 | { |
4337 | styleResolver.style()->setMarqueeIncrement(forwardInheritedValue(styleResolver.parentStyle()->marqueeIncrement())); |
4338 | } |
4339 | static void applyValueWebkitMarqueeIncrement(StyleResolver& styleResolver, CSSValue& value) |
4340 | { |
4341 | auto convertedValue = StyleBuilderConverter::convertMarqueeIncrement(styleResolver, value); |
4342 | if (convertedValue) |
4343 | styleResolver.style()->setMarqueeIncrement(WTFMove(convertedValue.value())); |
4344 | } |
4345 | static void applyInitialWebkitMarqueeRepetition(StyleResolver& styleResolver) |
4346 | { |
4347 | styleResolver.style()->setMarqueeLoopCount(RenderStyle::initialMarqueeLoopCount()); |
4348 | } |
4349 | static void applyInheritWebkitMarqueeRepetition(StyleResolver& styleResolver) |
4350 | { |
4351 | styleResolver.style()->setMarqueeLoopCount(forwardInheritedValue(styleResolver.parentStyle()->marqueeLoopCount())); |
4352 | } |
4353 | static void applyValueWebkitMarqueeRepetition(StyleResolver& styleResolver, CSSValue& value) |
4354 | { |
4355 | styleResolver.style()->setMarqueeLoopCount(StyleBuilderConverter::convertMarqueeRepetition(styleResolver, value)); |
4356 | } |
4357 | static void applyInitialWebkitMarqueeSpeed(StyleResolver& styleResolver) |
4358 | { |
4359 | styleResolver.style()->setMarqueeSpeed(RenderStyle::initialMarqueeSpeed()); |
4360 | } |
4361 | static void applyInheritWebkitMarqueeSpeed(StyleResolver& styleResolver) |
4362 | { |
4363 | styleResolver.style()->setMarqueeSpeed(forwardInheritedValue(styleResolver.parentStyle()->marqueeSpeed())); |
4364 | } |
4365 | static void applyValueWebkitMarqueeSpeed(StyleResolver& styleResolver, CSSValue& value) |
4366 | { |
4367 | styleResolver.style()->setMarqueeSpeed(StyleBuilderConverter::convertMarqueeSpeed(styleResolver, value)); |
4368 | } |
4369 | static void applyInitialWebkitMarqueeStyle(StyleResolver& styleResolver) |
4370 | { |
4371 | styleResolver.style()->setMarqueeBehavior(RenderStyle::initialMarqueeBehavior()); |
4372 | } |
4373 | static void applyInheritWebkitMarqueeStyle(StyleResolver& styleResolver) |
4374 | { |
4375 | styleResolver.style()->setMarqueeBehavior(forwardInheritedValue(styleResolver.parentStyle()->marqueeBehavior())); |
4376 | } |
4377 | static void applyValueWebkitMarqueeStyle(StyleResolver& styleResolver, CSSValue& value) |
4378 | { |
4379 | styleResolver.style()->setMarqueeBehavior(downcast<CSSPrimitiveValue>(value)); |
4380 | } |
4381 | static void applyInitialWebkitMaskBoxImage(StyleResolver& styleResolver) |
4382 | { |
4383 | styleResolver.style()->setMaskBoxImage(RenderStyle::initialNinePieceImage()); |
4384 | } |
4385 | static void applyInheritWebkitMaskBoxImage(StyleResolver& styleResolver) |
4386 | { |
4387 | styleResolver.style()->setMaskBoxImage(forwardInheritedValue(styleResolver.parentStyle()->maskBoxImage())); |
4388 | } |
4389 | static void applyValueWebkitMaskBoxImage(StyleResolver& styleResolver, CSSValue& value) |
4390 | { |
4391 | styleResolver.style()->setMaskBoxImage(StyleBuilderConverter::convertBorderMask<CSSPropertyWebkitMaskBoxImage>(styleResolver, value)); |
4392 | } |
4393 | static void applyInitialWebkitMaskBoxImageSource(StyleResolver& styleResolver) |
4394 | { |
4395 | styleResolver.style()->setMaskBoxImageSource(RenderStyle::initialMaskBoxImageSource()); |
4396 | } |
4397 | static void applyInheritWebkitMaskBoxImageSource(StyleResolver& styleResolver) |
4398 | { |
4399 | styleResolver.style()->setMaskBoxImageSource(forwardInheritedValue(styleResolver.parentStyle()->maskBoxImageSource())); |
4400 | } |
4401 | static void applyValueWebkitMaskBoxImageSource(StyleResolver& styleResolver, CSSValue& value) |
4402 | { |
4403 | styleResolver.style()->setMaskBoxImageSource(StyleBuilderConverter::convertStyleImage<CSSPropertyWebkitMaskBoxImageSource>(styleResolver, value)); |
4404 | } |
4405 | static void applyInitialWebkitMaskClip(StyleResolver& styleResolver) |
4406 | { |
4407 | // Check for (single-layer) no-op before clearing anything. |
4408 | auto& layers = styleResolver.style()->maskLayers(); |
4409 | if (!layers.next() && (!layers.isClipSet() || layers.clip() == FillLayer::initialFillClip(FillLayerType::Mask))) |
4410 | return; |
4411 | |
4412 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4413 | child->setClip(FillLayer::initialFillClip(FillLayerType::Mask)); |
4414 | for (child = child->next(); child; child = child->next()) |
4415 | child->clearClip(); |
4416 | } |
4417 | static void applyInheritWebkitMaskClip(StyleResolver& styleResolver) |
4418 | { |
4419 | // Check for no-op before copying anything. |
4420 | if (styleResolver.parentStyle()->maskLayers() == styleResolver.style()->maskLayers()) |
4421 | return; |
4422 | |
4423 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4424 | FillLayer* previousChild = nullptr; |
4425 | for (auto* parent = &styleResolver.parentStyle()->maskLayers(); parent && parent->isClipSet(); parent = parent->next()) { |
4426 | if (!child) { |
4427 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Mask)); |
4428 | child = previousChild->next(); |
4429 | } |
4430 | child->setClip(parent->clip()); |
4431 | previousChild = child; |
4432 | child = previousChild->next(); |
4433 | } |
4434 | for (; child; child = child->next()) |
4435 | child->clearClip(); |
4436 | } |
4437 | static void applyValueWebkitMaskClip(StyleResolver& styleResolver, CSSValue& value) |
4438 | { |
4439 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4440 | FillLayer* previousChild = nullptr; |
4441 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
4442 | // Walk each value and put it into a layer, creating new layers as needed. |
4443 | for (auto& item : downcast<CSSValueList>(value)) { |
4444 | if (!child) { |
4445 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Mask)); |
4446 | child = previousChild->next(); |
4447 | } |
4448 | styleResolver.styleMap()->mapFillClip(CSSPropertyWebkitMaskClip, *child, item); |
4449 | previousChild = child; |
4450 | child = child->next(); |
4451 | } |
4452 | } else { |
4453 | styleResolver.styleMap()->mapFillClip(CSSPropertyWebkitMaskClip, *child, value); |
4454 | child = child->next(); |
4455 | } |
4456 | for (; child; child = child->next()) |
4457 | child->clearClip(); |
4458 | } |
4459 | static void applyInitialWebkitMaskComposite(StyleResolver& styleResolver) |
4460 | { |
4461 | // Check for (single-layer) no-op before clearing anything. |
4462 | auto& layers = styleResolver.style()->maskLayers(); |
4463 | if (!layers.next() && (!layers.isCompositeSet() || layers.composite() == FillLayer::initialFillComposite(FillLayerType::Mask))) |
4464 | return; |
4465 | |
4466 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4467 | child->setComposite(FillLayer::initialFillComposite(FillLayerType::Mask)); |
4468 | for (child = child->next(); child; child = child->next()) |
4469 | child->clearComposite(); |
4470 | } |
4471 | static void applyInheritWebkitMaskComposite(StyleResolver& styleResolver) |
4472 | { |
4473 | // Check for no-op before copying anything. |
4474 | if (styleResolver.parentStyle()->maskLayers() == styleResolver.style()->maskLayers()) |
4475 | return; |
4476 | |
4477 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4478 | FillLayer* previousChild = nullptr; |
4479 | for (auto* parent = &styleResolver.parentStyle()->maskLayers(); parent && parent->isCompositeSet(); parent = parent->next()) { |
4480 | if (!child) { |
4481 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Mask)); |
4482 | child = previousChild->next(); |
4483 | } |
4484 | child->setComposite(parent->composite()); |
4485 | previousChild = child; |
4486 | child = previousChild->next(); |
4487 | } |
4488 | for (; child; child = child->next()) |
4489 | child->clearComposite(); |
4490 | } |
4491 | static void applyValueWebkitMaskComposite(StyleResolver& styleResolver, CSSValue& value) |
4492 | { |
4493 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4494 | FillLayer* previousChild = nullptr; |
4495 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
4496 | // Walk each value and put it into a layer, creating new layers as needed. |
4497 | for (auto& item : downcast<CSSValueList>(value)) { |
4498 | if (!child) { |
4499 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Mask)); |
4500 | child = previousChild->next(); |
4501 | } |
4502 | styleResolver.styleMap()->mapFillComposite(CSSPropertyWebkitMaskComposite, *child, item); |
4503 | previousChild = child; |
4504 | child = child->next(); |
4505 | } |
4506 | } else { |
4507 | styleResolver.styleMap()->mapFillComposite(CSSPropertyWebkitMaskComposite, *child, value); |
4508 | child = child->next(); |
4509 | } |
4510 | for (; child; child = child->next()) |
4511 | child->clearComposite(); |
4512 | } |
4513 | static void applyInitialWebkitMaskImage(StyleResolver& styleResolver) |
4514 | { |
4515 | // Check for (single-layer) no-op before clearing anything. |
4516 | auto& layers = styleResolver.style()->maskLayers(); |
4517 | if (!layers.next() && (!layers.isImageSet() || layers.image() == FillLayer::initialFillImage(FillLayerType::Mask))) |
4518 | return; |
4519 | |
4520 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4521 | child->setImage(FillLayer::initialFillImage(FillLayerType::Mask)); |
4522 | for (child = child->next(); child; child = child->next()) |
4523 | child->clearImage(); |
4524 | } |
4525 | static void applyInheritWebkitMaskImage(StyleResolver& styleResolver) |
4526 | { |
4527 | // Check for no-op before copying anything. |
4528 | if (styleResolver.parentStyle()->maskLayers() == styleResolver.style()->maskLayers()) |
4529 | return; |
4530 | |
4531 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4532 | FillLayer* previousChild = nullptr; |
4533 | for (auto* parent = &styleResolver.parentStyle()->maskLayers(); parent && parent->isImageSet(); parent = parent->next()) { |
4534 | if (!child) { |
4535 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Mask)); |
4536 | child = previousChild->next(); |
4537 | } |
4538 | child->setImage(parent->image()); |
4539 | previousChild = child; |
4540 | child = previousChild->next(); |
4541 | } |
4542 | for (; child; child = child->next()) |
4543 | child->clearImage(); |
4544 | } |
4545 | static void applyValueWebkitMaskImage(StyleResolver& styleResolver, CSSValue& value) |
4546 | { |
4547 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4548 | FillLayer* previousChild = nullptr; |
4549 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
4550 | // Walk each value and put it into a layer, creating new layers as needed. |
4551 | for (auto& item : downcast<CSSValueList>(value)) { |
4552 | if (!child) { |
4553 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Mask)); |
4554 | child = previousChild->next(); |
4555 | } |
4556 | styleResolver.styleMap()->mapFillImage(CSSPropertyWebkitMaskImage, *child, item); |
4557 | previousChild = child; |
4558 | child = child->next(); |
4559 | } |
4560 | } else { |
4561 | styleResolver.styleMap()->mapFillImage(CSSPropertyWebkitMaskImage, *child, value); |
4562 | child = child->next(); |
4563 | } |
4564 | for (; child; child = child->next()) |
4565 | child->clearImage(); |
4566 | } |
4567 | static void applyInitialWebkitMaskOrigin(StyleResolver& styleResolver) |
4568 | { |
4569 | // Check for (single-layer) no-op before clearing anything. |
4570 | auto& layers = styleResolver.style()->maskLayers(); |
4571 | if (!layers.next() && (!layers.isOriginSet() || layers.origin() == FillLayer::initialFillOrigin(FillLayerType::Mask))) |
4572 | return; |
4573 | |
4574 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4575 | child->setOrigin(FillLayer::initialFillOrigin(FillLayerType::Mask)); |
4576 | for (child = child->next(); child; child = child->next()) |
4577 | child->clearOrigin(); |
4578 | } |
4579 | static void applyInheritWebkitMaskOrigin(StyleResolver& styleResolver) |
4580 | { |
4581 | // Check for no-op before copying anything. |
4582 | if (styleResolver.parentStyle()->maskLayers() == styleResolver.style()->maskLayers()) |
4583 | return; |
4584 | |
4585 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4586 | FillLayer* previousChild = nullptr; |
4587 | for (auto* parent = &styleResolver.parentStyle()->maskLayers(); parent && parent->isOriginSet(); parent = parent->next()) { |
4588 | if (!child) { |
4589 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Mask)); |
4590 | child = previousChild->next(); |
4591 | } |
4592 | child->setOrigin(parent->origin()); |
4593 | previousChild = child; |
4594 | child = previousChild->next(); |
4595 | } |
4596 | for (; child; child = child->next()) |
4597 | child->clearOrigin(); |
4598 | } |
4599 | static void applyValueWebkitMaskOrigin(StyleResolver& styleResolver, CSSValue& value) |
4600 | { |
4601 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4602 | FillLayer* previousChild = nullptr; |
4603 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
4604 | // Walk each value and put it into a layer, creating new layers as needed. |
4605 | for (auto& item : downcast<CSSValueList>(value)) { |
4606 | if (!child) { |
4607 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Mask)); |
4608 | child = previousChild->next(); |
4609 | } |
4610 | styleResolver.styleMap()->mapFillOrigin(CSSPropertyWebkitMaskOrigin, *child, item); |
4611 | previousChild = child; |
4612 | child = child->next(); |
4613 | } |
4614 | } else { |
4615 | styleResolver.styleMap()->mapFillOrigin(CSSPropertyWebkitMaskOrigin, *child, value); |
4616 | child = child->next(); |
4617 | } |
4618 | for (; child; child = child->next()) |
4619 | child->clearOrigin(); |
4620 | } |
4621 | static void applyInitialWebkitMaskPositionX(StyleResolver& styleResolver) |
4622 | { |
4623 | // Check for (single-layer) no-op before clearing anything. |
4624 | auto& layers = styleResolver.style()->maskLayers(); |
4625 | if (!layers.next() && (!layers.isXPositionSet() || layers.xPosition() == FillLayer::initialFillXPosition(FillLayerType::Mask))) |
4626 | return; |
4627 | |
4628 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4629 | child->setXPosition(FillLayer::initialFillXPosition(FillLayerType::Mask)); |
4630 | for (child = child->next(); child; child = child->next()) |
4631 | child->clearXPosition(); |
4632 | } |
4633 | static void applyInheritWebkitMaskPositionX(StyleResolver& styleResolver) |
4634 | { |
4635 | // Check for no-op before copying anything. |
4636 | if (styleResolver.parentStyle()->maskLayers() == styleResolver.style()->maskLayers()) |
4637 | return; |
4638 | |
4639 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4640 | FillLayer* previousChild = nullptr; |
4641 | for (auto* parent = &styleResolver.parentStyle()->maskLayers(); parent && parent->isXPositionSet(); parent = parent->next()) { |
4642 | if (!child) { |
4643 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Mask)); |
4644 | child = previousChild->next(); |
4645 | } |
4646 | child->setXPosition(parent->xPosition()); |
4647 | previousChild = child; |
4648 | child = previousChild->next(); |
4649 | } |
4650 | for (; child; child = child->next()) |
4651 | child->clearXPosition(); |
4652 | } |
4653 | static void applyValueWebkitMaskPositionX(StyleResolver& styleResolver, CSSValue& value) |
4654 | { |
4655 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4656 | FillLayer* previousChild = nullptr; |
4657 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
4658 | // Walk each value and put it into a layer, creating new layers as needed. |
4659 | for (auto& item : downcast<CSSValueList>(value)) { |
4660 | if (!child) { |
4661 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Mask)); |
4662 | child = previousChild->next(); |
4663 | } |
4664 | styleResolver.styleMap()->mapFillXPosition(CSSPropertyWebkitMaskPositionX, *child, item); |
4665 | previousChild = child; |
4666 | child = child->next(); |
4667 | } |
4668 | } else { |
4669 | styleResolver.styleMap()->mapFillXPosition(CSSPropertyWebkitMaskPositionX, *child, value); |
4670 | child = child->next(); |
4671 | } |
4672 | for (; child; child = child->next()) |
4673 | child->clearXPosition(); |
4674 | } |
4675 | static void applyInitialWebkitMaskPositionY(StyleResolver& styleResolver) |
4676 | { |
4677 | // Check for (single-layer) no-op before clearing anything. |
4678 | auto& layers = styleResolver.style()->maskLayers(); |
4679 | if (!layers.next() && (!layers.isYPositionSet() || layers.yPosition() == FillLayer::initialFillYPosition(FillLayerType::Mask))) |
4680 | return; |
4681 | |
4682 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4683 | child->setYPosition(FillLayer::initialFillYPosition(FillLayerType::Mask)); |
4684 | for (child = child->next(); child; child = child->next()) |
4685 | child->clearYPosition(); |
4686 | } |
4687 | static void applyInheritWebkitMaskPositionY(StyleResolver& styleResolver) |
4688 | { |
4689 | // Check for no-op before copying anything. |
4690 | if (styleResolver.parentStyle()->maskLayers() == styleResolver.style()->maskLayers()) |
4691 | return; |
4692 | |
4693 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4694 | FillLayer* previousChild = nullptr; |
4695 | for (auto* parent = &styleResolver.parentStyle()->maskLayers(); parent && parent->isYPositionSet(); parent = parent->next()) { |
4696 | if (!child) { |
4697 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Mask)); |
4698 | child = previousChild->next(); |
4699 | } |
4700 | child->setYPosition(parent->yPosition()); |
4701 | previousChild = child; |
4702 | child = previousChild->next(); |
4703 | } |
4704 | for (; child; child = child->next()) |
4705 | child->clearYPosition(); |
4706 | } |
4707 | static void applyValueWebkitMaskPositionY(StyleResolver& styleResolver, CSSValue& value) |
4708 | { |
4709 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4710 | FillLayer* previousChild = nullptr; |
4711 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
4712 | // Walk each value and put it into a layer, creating new layers as needed. |
4713 | for (auto& item : downcast<CSSValueList>(value)) { |
4714 | if (!child) { |
4715 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Mask)); |
4716 | child = previousChild->next(); |
4717 | } |
4718 | styleResolver.styleMap()->mapFillYPosition(CSSPropertyWebkitMaskPositionY, *child, item); |
4719 | previousChild = child; |
4720 | child = child->next(); |
4721 | } |
4722 | } else { |
4723 | styleResolver.styleMap()->mapFillYPosition(CSSPropertyWebkitMaskPositionY, *child, value); |
4724 | child = child->next(); |
4725 | } |
4726 | for (; child; child = child->next()) |
4727 | child->clearYPosition(); |
4728 | } |
4729 | static void applyInitialWebkitMaskRepeatX(StyleResolver& styleResolver) |
4730 | { |
4731 | // Check for (single-layer) no-op before clearing anything. |
4732 | auto& layers = styleResolver.style()->maskLayers(); |
4733 | if (!layers.next() && (!layers.isRepeatXSet() || layers.repeatX() == FillLayer::initialFillRepeatX(FillLayerType::Mask))) |
4734 | return; |
4735 | |
4736 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4737 | child->setRepeatX(FillLayer::initialFillRepeatX(FillLayerType::Mask)); |
4738 | for (child = child->next(); child; child = child->next()) |
4739 | child->clearRepeatX(); |
4740 | } |
4741 | static void applyInheritWebkitMaskRepeatX(StyleResolver& styleResolver) |
4742 | { |
4743 | // Check for no-op before copying anything. |
4744 | if (styleResolver.parentStyle()->maskLayers() == styleResolver.style()->maskLayers()) |
4745 | return; |
4746 | |
4747 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4748 | FillLayer* previousChild = nullptr; |
4749 | for (auto* parent = &styleResolver.parentStyle()->maskLayers(); parent && parent->isRepeatXSet(); parent = parent->next()) { |
4750 | if (!child) { |
4751 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Mask)); |
4752 | child = previousChild->next(); |
4753 | } |
4754 | child->setRepeatX(parent->repeatX()); |
4755 | previousChild = child; |
4756 | child = previousChild->next(); |
4757 | } |
4758 | for (; child; child = child->next()) |
4759 | child->clearRepeatX(); |
4760 | } |
4761 | static void applyValueWebkitMaskRepeatX(StyleResolver& styleResolver, CSSValue& value) |
4762 | { |
4763 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4764 | FillLayer* previousChild = nullptr; |
4765 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
4766 | // Walk each value and put it into a layer, creating new layers as needed. |
4767 | for (auto& item : downcast<CSSValueList>(value)) { |
4768 | if (!child) { |
4769 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Mask)); |
4770 | child = previousChild->next(); |
4771 | } |
4772 | styleResolver.styleMap()->mapFillRepeatX(CSSPropertyWebkitMaskRepeatX, *child, item); |
4773 | previousChild = child; |
4774 | child = child->next(); |
4775 | } |
4776 | } else { |
4777 | styleResolver.styleMap()->mapFillRepeatX(CSSPropertyWebkitMaskRepeatX, *child, value); |
4778 | child = child->next(); |
4779 | } |
4780 | for (; child; child = child->next()) |
4781 | child->clearRepeatX(); |
4782 | } |
4783 | static void applyInitialWebkitMaskRepeatY(StyleResolver& styleResolver) |
4784 | { |
4785 | // Check for (single-layer) no-op before clearing anything. |
4786 | auto& layers = styleResolver.style()->maskLayers(); |
4787 | if (!layers.next() && (!layers.isRepeatYSet() || layers.repeatY() == FillLayer::initialFillRepeatY(FillLayerType::Mask))) |
4788 | return; |
4789 | |
4790 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4791 | child->setRepeatY(FillLayer::initialFillRepeatY(FillLayerType::Mask)); |
4792 | for (child = child->next(); child; child = child->next()) |
4793 | child->clearRepeatY(); |
4794 | } |
4795 | static void applyInheritWebkitMaskRepeatY(StyleResolver& styleResolver) |
4796 | { |
4797 | // Check for no-op before copying anything. |
4798 | if (styleResolver.parentStyle()->maskLayers() == styleResolver.style()->maskLayers()) |
4799 | return; |
4800 | |
4801 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4802 | FillLayer* previousChild = nullptr; |
4803 | for (auto* parent = &styleResolver.parentStyle()->maskLayers(); parent && parent->isRepeatYSet(); parent = parent->next()) { |
4804 | if (!child) { |
4805 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Mask)); |
4806 | child = previousChild->next(); |
4807 | } |
4808 | child->setRepeatY(parent->repeatY()); |
4809 | previousChild = child; |
4810 | child = previousChild->next(); |
4811 | } |
4812 | for (; child; child = child->next()) |
4813 | child->clearRepeatY(); |
4814 | } |
4815 | static void applyValueWebkitMaskRepeatY(StyleResolver& styleResolver, CSSValue& value) |
4816 | { |
4817 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4818 | FillLayer* previousChild = nullptr; |
4819 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
4820 | // Walk each value and put it into a layer, creating new layers as needed. |
4821 | for (auto& item : downcast<CSSValueList>(value)) { |
4822 | if (!child) { |
4823 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Mask)); |
4824 | child = previousChild->next(); |
4825 | } |
4826 | styleResolver.styleMap()->mapFillRepeatY(CSSPropertyWebkitMaskRepeatY, *child, item); |
4827 | previousChild = child; |
4828 | child = child->next(); |
4829 | } |
4830 | } else { |
4831 | styleResolver.styleMap()->mapFillRepeatY(CSSPropertyWebkitMaskRepeatY, *child, value); |
4832 | child = child->next(); |
4833 | } |
4834 | for (; child; child = child->next()) |
4835 | child->clearRepeatY(); |
4836 | } |
4837 | static void applyInitialWebkitMaskSize(StyleResolver& styleResolver) |
4838 | { |
4839 | // Check for (single-layer) no-op before clearing anything. |
4840 | auto& layers = styleResolver.style()->maskLayers(); |
4841 | if (!layers.next() && (!layers.isSizeSet() || layers.size() == FillLayer::initialFillSize(FillLayerType::Mask))) |
4842 | return; |
4843 | |
4844 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4845 | child->setSize(FillLayer::initialFillSize(FillLayerType::Mask)); |
4846 | for (child = child->next(); child; child = child->next()) |
4847 | child->clearSize(); |
4848 | } |
4849 | static void applyInheritWebkitMaskSize(StyleResolver& styleResolver) |
4850 | { |
4851 | // Check for no-op before copying anything. |
4852 | if (styleResolver.parentStyle()->maskLayers() == styleResolver.style()->maskLayers()) |
4853 | return; |
4854 | |
4855 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4856 | FillLayer* previousChild = nullptr; |
4857 | for (auto* parent = &styleResolver.parentStyle()->maskLayers(); parent && parent->isSizeSet(); parent = parent->next()) { |
4858 | if (!child) { |
4859 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Mask)); |
4860 | child = previousChild->next(); |
4861 | } |
4862 | child->setSize(parent->size()); |
4863 | previousChild = child; |
4864 | child = previousChild->next(); |
4865 | } |
4866 | for (; child; child = child->next()) |
4867 | child->clearSize(); |
4868 | } |
4869 | static void applyValueWebkitMaskSize(StyleResolver& styleResolver, CSSValue& value) |
4870 | { |
4871 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4872 | FillLayer* previousChild = nullptr; |
4873 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
4874 | // Walk each value and put it into a layer, creating new layers as needed. |
4875 | for (auto& item : downcast<CSSValueList>(value)) { |
4876 | if (!child) { |
4877 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Mask)); |
4878 | child = previousChild->next(); |
4879 | } |
4880 | styleResolver.styleMap()->mapFillSize(CSSPropertyWebkitMaskSize, *child, item); |
4881 | previousChild = child; |
4882 | child = child->next(); |
4883 | } |
4884 | } else { |
4885 | styleResolver.styleMap()->mapFillSize(CSSPropertyWebkitMaskSize, *child, value); |
4886 | child = child->next(); |
4887 | } |
4888 | for (; child; child = child->next()) |
4889 | child->clearSize(); |
4890 | } |
4891 | static void applyInitialWebkitMaskSourceType(StyleResolver& styleResolver) |
4892 | { |
4893 | // Check for (single-layer) no-op before clearing anything. |
4894 | auto& layers = styleResolver.style()->maskLayers(); |
4895 | if (!layers.next() && (!layers.isMaskSourceTypeSet() || layers.maskSourceType() == FillLayer::initialFillMaskSourceType(FillLayerType::Mask))) |
4896 | return; |
4897 | |
4898 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4899 | child->setMaskSourceType(FillLayer::initialFillMaskSourceType(FillLayerType::Mask)); |
4900 | for (child = child->next(); child; child = child->next()) |
4901 | child->clearMaskSourceType(); |
4902 | } |
4903 | static void applyInheritWebkitMaskSourceType(StyleResolver& styleResolver) |
4904 | { |
4905 | // Check for no-op before copying anything. |
4906 | if (styleResolver.parentStyle()->maskLayers() == styleResolver.style()->maskLayers()) |
4907 | return; |
4908 | |
4909 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4910 | FillLayer* previousChild = nullptr; |
4911 | for (auto* parent = &styleResolver.parentStyle()->maskLayers(); parent && parent->isMaskSourceTypeSet(); parent = parent->next()) { |
4912 | if (!child) { |
4913 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Mask)); |
4914 | child = previousChild->next(); |
4915 | } |
4916 | child->setMaskSourceType(parent->maskSourceType()); |
4917 | previousChild = child; |
4918 | child = previousChild->next(); |
4919 | } |
4920 | for (; child; child = child->next()) |
4921 | child->clearMaskSourceType(); |
4922 | } |
4923 | static void applyValueWebkitMaskSourceType(StyleResolver& styleResolver, CSSValue& value) |
4924 | { |
4925 | auto* child = &styleResolver.style()->ensureMaskLayers(); |
4926 | FillLayer* previousChild = nullptr; |
4927 | if (is<CSSValueList>(value) && !is<CSSImageSetValue>(value)) { |
4928 | // Walk each value and put it into a layer, creating new layers as needed. |
4929 | for (auto& item : downcast<CSSValueList>(value)) { |
4930 | if (!child) { |
4931 | previousChild->setNext(std::make_unique<FillLayer>(FillLayerType::Mask)); |
4932 | child = previousChild->next(); |
4933 | } |
4934 | styleResolver.styleMap()->mapFillMaskSourceType(CSSPropertyWebkitMaskSourceType, *child, item); |
4935 | previousChild = child; |
4936 | child = child->next(); |
4937 | } |
4938 | } else { |
4939 | styleResolver.styleMap()->mapFillMaskSourceType(CSSPropertyWebkitMaskSourceType, *child, value); |
4940 | child = child->next(); |
4941 | } |
4942 | for (; child; child = child->next()) |
4943 | child->clearMaskSourceType(); |
4944 | } |
4945 | static void applyInitialWebkitNbspMode(StyleResolver& styleResolver) |
4946 | { |
4947 | styleResolver.style()->setNBSPMode(RenderStyle::initialNBSPMode()); |
4948 | } |
4949 | static void applyInheritWebkitNbspMode(StyleResolver& styleResolver) |
4950 | { |
4951 | styleResolver.style()->setNBSPMode(forwardInheritedValue(styleResolver.parentStyle()->nbspMode())); |
4952 | } |
4953 | static void applyValueWebkitNbspMode(StyleResolver& styleResolver, CSSValue& value) |
4954 | { |
4955 | styleResolver.style()->setNBSPMode(downcast<CSSPrimitiveValue>(value)); |
4956 | } |
4957 | static void applyInitialWebkitPrintColorAdjust(StyleResolver& styleResolver) |
4958 | { |
4959 | styleResolver.style()->setPrintColorAdjust(RenderStyle::initialPrintColorAdjust()); |
4960 | } |
4961 | static void applyInheritWebkitPrintColorAdjust(StyleResolver& styleResolver) |
4962 | { |
4963 | styleResolver.style()->setPrintColorAdjust(forwardInheritedValue(styleResolver.parentStyle()->printColorAdjust())); |
4964 | } |
4965 | static void applyValueWebkitPrintColorAdjust(StyleResolver& styleResolver, CSSValue& value) |
4966 | { |
4967 | styleResolver.style()->setPrintColorAdjust(downcast<CSSPrimitiveValue>(value)); |
4968 | } |
4969 | static void applyInitialWebkitRtlOrdering(StyleResolver& styleResolver) |
4970 | { |
4971 | styleResolver.style()->setRTLOrdering(RenderStyle::initialRTLOrdering()); |
4972 | } |
4973 | static void applyInheritWebkitRtlOrdering(StyleResolver& styleResolver) |
4974 | { |
4975 | styleResolver.style()->setRTLOrdering(forwardInheritedValue(styleResolver.parentStyle()->rtlOrdering())); |
4976 | } |
4977 | static void applyValueWebkitRtlOrdering(StyleResolver& styleResolver, CSSValue& value) |
4978 | { |
4979 | styleResolver.style()->setRTLOrdering(downcast<CSSPrimitiveValue>(value)); |
4980 | } |
4981 | static void applyInitialWebkitRubyPosition(StyleResolver& styleResolver) |
4982 | { |
4983 | styleResolver.style()->setRubyPosition(RenderStyle::initialRubyPosition()); |
4984 | } |
4985 | static void applyInheritWebkitRubyPosition(StyleResolver& styleResolver) |
4986 | { |
4987 | styleResolver.style()->setRubyPosition(forwardInheritedValue(styleResolver.parentStyle()->rubyPosition())); |
4988 | } |
4989 | static void applyValueWebkitRubyPosition(StyleResolver& styleResolver, CSSValue& value) |
4990 | { |
4991 | styleResolver.style()->setRubyPosition(downcast<CSSPrimitiveValue>(value)); |
4992 | } |
4993 | static void applyInitialWebkitTapHighlightColor(StyleResolver& styleResolver) |
4994 | { |
4995 | styleResolver.style()->setTapHighlightColor(RenderStyle::initialTapHighlightColor()); |
4996 | } |
4997 | static void applyInheritWebkitTapHighlightColor(StyleResolver& styleResolver) |
4998 | { |
4999 | styleResolver.style()->setTapHighlightColor(forwardInheritedValue(styleResolver.parentStyle()->tapHighlightColor())); |
5000 | } |
5001 | static void applyValueWebkitTapHighlightColor(StyleResolver& styleResolver, CSSValue& value) |
5002 | { |
5003 | styleResolver.style()->setTapHighlightColor(StyleBuilderConverter::convertTapHighlightColor(styleResolver, value)); |
5004 | } |
5005 | static void applyInitialWebkitTextCombine(StyleResolver& styleResolver) |
5006 | { |
5007 | styleResolver.style()->setTextCombine(RenderStyle::initialTextCombine()); |
5008 | } |
5009 | static void applyInheritWebkitTextCombine(StyleResolver& styleResolver) |
5010 | { |
5011 | styleResolver.style()->setTextCombine(forwardInheritedValue(styleResolver.parentStyle()->textCombine())); |
5012 | } |
5013 | static void applyValueWebkitTextCombine(StyleResolver& styleResolver, CSSValue& value) |
5014 | { |
5015 | styleResolver.style()->setTextCombine(downcast<CSSPrimitiveValue>(value)); |
5016 | } |
5017 | static void applyInitialWebkitTextEmphasisColor(StyleResolver& styleResolver) |
5018 | { |
5019 | if (styleResolver.applyPropertyToRegularStyle()) |
5020 | styleResolver.style()->setTextEmphasisColor(RenderStyle::invalidColor()); |
5021 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
5022 | styleResolver.style()->setVisitedLinkTextEmphasisColor(RenderStyle::invalidColor()); |
5023 | } |
5024 | static void applyInheritWebkitTextEmphasisColor(StyleResolver& styleResolver) |
5025 | { |
5026 | Color color = styleResolver.parentStyle()->textEmphasisColor(); |
5027 | if (!color.isValid()) |
5028 | color = styleResolver.parentStyle()->color(); |
5029 | if (styleResolver.applyPropertyToRegularStyle()) |
5030 | styleResolver.style()->setTextEmphasisColor(color); |
5031 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
5032 | styleResolver.style()->setVisitedLinkTextEmphasisColor(color); |
5033 | } |
5034 | static void applyValueWebkitTextEmphasisColor(StyleResolver& styleResolver, CSSValue& value) |
5035 | { |
5036 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
5037 | if (styleResolver.applyPropertyToRegularStyle()) |
5038 | styleResolver.style()->setTextEmphasisColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
5039 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
5040 | styleResolver.style()->setVisitedLinkTextEmphasisColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
5041 | } |
5042 | static void applyInitialWebkitTextEmphasisPosition(StyleResolver& styleResolver) |
5043 | { |
5044 | styleResolver.style()->setTextEmphasisPosition(RenderStyle::initialTextEmphasisPosition()); |
5045 | } |
5046 | static void applyInheritWebkitTextEmphasisPosition(StyleResolver& styleResolver) |
5047 | { |
5048 | styleResolver.style()->setTextEmphasisPosition(forwardInheritedValue(styleResolver.parentStyle()->textEmphasisPosition())); |
5049 | } |
5050 | static void applyValueWebkitTextEmphasisPosition(StyleResolver& styleResolver, CSSValue& value) |
5051 | { |
5052 | styleResolver.style()->setTextEmphasisPosition(StyleBuilderConverter::convertTextEmphasisPosition(styleResolver, value)); |
5053 | } |
5054 | static void applyInitialWebkitTextFillColor(StyleResolver& styleResolver) |
5055 | { |
5056 | if (styleResolver.applyPropertyToRegularStyle()) |
5057 | styleResolver.style()->setTextFillColor(RenderStyle::invalidColor()); |
5058 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
5059 | styleResolver.style()->setVisitedLinkTextFillColor(RenderStyle::invalidColor()); |
5060 | } |
5061 | static void applyInheritWebkitTextFillColor(StyleResolver& styleResolver) |
5062 | { |
5063 | Color color = styleResolver.parentStyle()->textFillColor(); |
5064 | if (!color.isValid()) |
5065 | color = styleResolver.parentStyle()->color(); |
5066 | if (styleResolver.applyPropertyToRegularStyle()) |
5067 | styleResolver.style()->setTextFillColor(color); |
5068 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
5069 | styleResolver.style()->setVisitedLinkTextFillColor(color); |
5070 | } |
5071 | static void applyValueWebkitTextFillColor(StyleResolver& styleResolver, CSSValue& value) |
5072 | { |
5073 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
5074 | if (styleResolver.applyPropertyToRegularStyle()) |
5075 | styleResolver.style()->setTextFillColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
5076 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
5077 | styleResolver.style()->setVisitedLinkTextFillColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
5078 | } |
5079 | static void applyInitialWebkitTextSecurity(StyleResolver& styleResolver) |
5080 | { |
5081 | styleResolver.style()->setTextSecurity(RenderStyle::initialTextSecurity()); |
5082 | } |
5083 | static void applyInheritWebkitTextSecurity(StyleResolver& styleResolver) |
5084 | { |
5085 | styleResolver.style()->setTextSecurity(forwardInheritedValue(styleResolver.parentStyle()->textSecurity())); |
5086 | } |
5087 | static void applyValueWebkitTextSecurity(StyleResolver& styleResolver, CSSValue& value) |
5088 | { |
5089 | styleResolver.style()->setTextSecurity(downcast<CSSPrimitiveValue>(value)); |
5090 | } |
5091 | static void applyInitialWebkitTextStrokeColor(StyleResolver& styleResolver) |
5092 | { |
5093 | if (styleResolver.applyPropertyToRegularStyle()) |
5094 | styleResolver.style()->setTextStrokeColor(RenderStyle::invalidColor()); |
5095 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
5096 | styleResolver.style()->setVisitedLinkTextStrokeColor(RenderStyle::invalidColor()); |
5097 | } |
5098 | static void applyInheritWebkitTextStrokeColor(StyleResolver& styleResolver) |
5099 | { |
5100 | Color color = styleResolver.parentStyle()->textStrokeColor(); |
5101 | if (!color.isValid()) |
5102 | color = styleResolver.parentStyle()->color(); |
5103 | if (styleResolver.applyPropertyToRegularStyle()) |
5104 | styleResolver.style()->setTextStrokeColor(color); |
5105 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
5106 | styleResolver.style()->setVisitedLinkTextStrokeColor(color); |
5107 | } |
5108 | static void applyValueWebkitTextStrokeColor(StyleResolver& styleResolver, CSSValue& value) |
5109 | { |
5110 | auto& primitiveValue = downcast<CSSPrimitiveValue>(value); |
5111 | if (styleResolver.applyPropertyToRegularStyle()) |
5112 | styleResolver.style()->setTextStrokeColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ false)); |
5113 | if (styleResolver.applyPropertyToVisitedLinkStyle()) |
5114 | styleResolver.style()->setVisitedLinkTextStrokeColor(styleResolver.colorFromPrimitiveValue(primitiveValue, /* forVisitedLink */ true)); |
5115 | } |
5116 | static void applyInitialWebkitTextStrokeWidth(StyleResolver& styleResolver) |
5117 | { |
5118 | styleResolver.style()->setTextStrokeWidth(RenderStyle::initialTextStrokeWidth()); |
5119 | } |
5120 | static void applyInheritWebkitTextStrokeWidth(StyleResolver& styleResolver) |
5121 | { |
5122 | styleResolver.style()->setTextStrokeWidth(forwardInheritedValue(styleResolver.parentStyle()->textStrokeWidth())); |
5123 | } |
5124 | static void applyValueWebkitTextStrokeWidth(StyleResolver& styleResolver, CSSValue& value) |
5125 | { |
5126 | styleResolver.style()->setTextStrokeWidth(StyleBuilderConverter::convertTextStrokeWidth(styleResolver, value)); |
5127 | } |
5128 | static void applyInitialWebkitTransformStyle(StyleResolver& styleResolver) |
5129 | { |
5130 | styleResolver.style()->setTransformStyle3D(RenderStyle::initialTransformStyle3D()); |
5131 | } |
5132 | static void applyInheritWebkitTransformStyle(StyleResolver& styleResolver) |
5133 | { |
5134 | styleResolver.style()->setTransformStyle3D(forwardInheritedValue(styleResolver.parentStyle()->transformStyle3D())); |
5135 | } |
5136 | static void applyValueWebkitTransformStyle(StyleResolver& styleResolver, CSSValue& value) |
5137 | { |
5138 | styleResolver.style()->setTransformStyle3D(downcast<CSSPrimitiveValue>(value)); |
5139 | } |
5140 | static void applyInitialWebkitUserDrag(StyleResolver& styleResolver) |
5141 | { |
5142 | styleResolver.style()->setUserDrag(RenderStyle::initialUserDrag()); |
5143 | } |
5144 | static void applyInheritWebkitUserDrag(StyleResolver& styleResolver) |
5145 | { |
5146 | styleResolver.style()->setUserDrag(forwardInheritedValue(styleResolver.parentStyle()->userDrag())); |
5147 | } |
5148 | static void applyValueWebkitUserDrag(StyleResolver& styleResolver, CSSValue& value) |
5149 | { |
5150 | styleResolver.style()->setUserDrag(downcast<CSSPrimitiveValue>(value)); |
5151 | } |
5152 | static void applyInitialWebkitUserModify(StyleResolver& styleResolver) |
5153 | { |
5154 | styleResolver.style()->setUserModify(RenderStyle::initialUserModify()); |
5155 | } |
5156 | static void applyInheritWebkitUserModify(StyleResolver& styleResolver) |
5157 | { |
5158 | styleResolver.style()->setUserModify(forwardInheritedValue(styleResolver.parentStyle()->userModify())); |
5159 | } |
5160 | static void applyValueWebkitUserModify(StyleResolver& styleResolver, CSSValue& value) |
5161 | { |
5162 | styleResolver.style()->setUserModify(downcast<CSSPrimitiveValue>(value)); |
5163 | } |
5164 | static void applyInitialWebkitUserSelect(StyleResolver& styleResolver) |
5165 | { |
5166 | styleResolver.style()->setUserSelect(RenderStyle::initialUserSelect()); |
5167 | } |
5168 | static void applyInheritWebkitUserSelect(StyleResolver& styleResolver) |
5169 | { |
5170 | styleResolver.style()->setUserSelect(forwardInheritedValue(styleResolver.parentStyle()->userSelect())); |
5171 | } |
5172 | static void applyValueWebkitUserSelect(StyleResolver& styleResolver, CSSValue& value) |
5173 | { |
5174 | styleResolver.style()->setUserSelect(downcast<CSSPrimitiveValue>(value)); |
5175 | } |
5176 | }; |
5177 | |
5178 | void StyleBuilder::applyProperty(CSSPropertyID property, StyleResolver& styleResolver, CSSValue& value, bool isInitial, bool isInherit, const CSSRegisteredCustomProperty* registered) |
5179 | { |
5180 | switch (property) { |
5181 | case CSSPropertyInvalid: |
5182 | break; |
5183 | case CSSPropertyCustom: { |
5184 | auto& customProperty = downcast<CSSCustomPropertyValue>(value); |
5185 | if (isInitial) |
5186 | StyleBuilderCustom::applyInitialCustomProperty(styleResolver, registered, customProperty.name()); |
5187 | else if (isInherit) |
5188 | StyleBuilderCustom::applyInheritCustomProperty(styleResolver, registered, customProperty.name()); |
5189 | else |
5190 | StyleBuilderCustom::applyValueCustomProperty(styleResolver, registered, customProperty); |
5191 | break; |
5192 | } |
5193 | case CSSPropertyColor: |
5194 | if (isInitial) |
5195 | StyleBuilderFunctions::applyInitialColor(styleResolver); |
5196 | else if (isInherit) |
5197 | StyleBuilderFunctions::applyInheritColor(styleResolver); |
5198 | else |
5199 | StyleBuilderFunctions::applyValueColor(styleResolver, value); |
5200 | break; |
5201 | case CSSPropertyColorScheme: |
5202 | if (isInitial) |
5203 | StyleBuilderFunctions::applyInitialColorScheme(styleResolver); |
5204 | else if (isInherit) |
5205 | StyleBuilderFunctions::applyInheritColorScheme(styleResolver); |
5206 | else |
5207 | StyleBuilderCustom::applyValueColorScheme(styleResolver, value); |
5208 | break; |
5209 | case CSSPropertyDirection: |
5210 | if (isInitial) |
5211 | StyleBuilderFunctions::applyInitialDirection(styleResolver); |
5212 | else if (isInherit) |
5213 | StyleBuilderFunctions::applyInheritDirection(styleResolver); |
5214 | else |
5215 | StyleBuilderCustom::applyValueDirection(styleResolver, value); |
5216 | break; |
5217 | case CSSPropertyDisplay: |
5218 | if (isInitial) |
5219 | StyleBuilderFunctions::applyInitialDisplay(styleResolver); |
5220 | else if (isInherit) |
5221 | StyleBuilderCustom::applyInheritDisplay(styleResolver); |
5222 | else |
5223 | StyleBuilderCustom::applyValueDisplay(styleResolver, value); |
5224 | break; |
5225 | case CSSPropertyFontFamily: |
5226 | if (isInitial) |
5227 | StyleBuilderCustom::applyInitialFontFamily(styleResolver); |
5228 | else if (isInherit) |
5229 | StyleBuilderCustom::applyInheritFontFamily(styleResolver); |
5230 | else |
5231 | StyleBuilderCustom::applyValueFontFamily(styleResolver, value); |
5232 | break; |
5233 | case CSSPropertyFontFeatureSettings: |
5234 | if (isInitial) |
5235 | StyleBuilderCustom::applyInitialFontFeatureSettings(styleResolver); |
5236 | else if (isInherit) |
5237 | StyleBuilderCustom::applyInheritFontFeatureSettings(styleResolver); |
5238 | else |
5239 | StyleBuilderFunctions::applyValueFontFeatureSettings(styleResolver, value); |
5240 | break; |
5241 | case CSSPropertyFontOpticalSizing: |
5242 | if (isInitial) |
5243 | StyleBuilderFunctions::applyInitialFontOpticalSizing(styleResolver); |
5244 | else if (isInherit) |
5245 | StyleBuilderFunctions::applyInheritFontOpticalSizing(styleResolver); |
5246 | else |
5247 | StyleBuilderFunctions::applyValueFontOpticalSizing(styleResolver, value); |
5248 | break; |
5249 | case CSSPropertyFontSize: |
5250 | if (isInitial) |
5251 | StyleBuilderCustom::applyInitialFontSize(styleResolver); |
5252 | else if (isInherit) |
5253 | StyleBuilderCustom::applyInheritFontSize(styleResolver); |
5254 | else |
5255 | StyleBuilderCustom::applyValueFontSize(styleResolver, value); |
5256 | break; |
5257 | case CSSPropertyFontStretch: |
5258 | if (isInitial) |
5259 | StyleBuilderFunctions::applyInitialFontStretch(styleResolver); |
5260 | else if (isInherit) |
5261 | StyleBuilderFunctions::applyInheritFontStretch(styleResolver); |
5262 | else |
5263 | StyleBuilderFunctions::applyValueFontStretch(styleResolver, value); |
5264 | break; |
5265 | case CSSPropertyFontStyle: |
5266 | if (isInitial) |
5267 | StyleBuilderCustom::applyInitialFontStyle(styleResolver); |
5268 | else if (isInherit) |
5269 | StyleBuilderCustom::applyInheritFontStyle(styleResolver); |
5270 | else |
5271 | StyleBuilderCustom::applyValueFontStyle(styleResolver, value); |
5272 | break; |
5273 | case CSSPropertyFontSynthesis: |
5274 | if (isInitial) |
5275 | StyleBuilderFunctions::applyInitialFontSynthesis(styleResolver); |
5276 | else if (isInherit) |
5277 | StyleBuilderFunctions::applyInheritFontSynthesis(styleResolver); |
5278 | else |
5279 | StyleBuilderFunctions::applyValueFontSynthesis(styleResolver, value); |
5280 | break; |
5281 | case CSSPropertyFontVariantAlternates: |
5282 | if (isInitial) |
5283 | StyleBuilderFunctions::applyInitialFontVariantAlternates(styleResolver); |
5284 | else if (isInherit) |
5285 | StyleBuilderFunctions::applyInheritFontVariantAlternates(styleResolver); |
5286 | else |
5287 | StyleBuilderFunctions::applyValueFontVariantAlternates(styleResolver, value); |
5288 | break; |
5289 | case CSSPropertyFontVariantCaps: |
5290 | if (isInitial) |
5291 | StyleBuilderFunctions::applyInitialFontVariantCaps(styleResolver); |
5292 | else if (isInherit) |
5293 | StyleBuilderFunctions::applyInheritFontVariantCaps(styleResolver); |
5294 | else |
5295 | StyleBuilderFunctions::applyValueFontVariantCaps(styleResolver, value); |
5296 | break; |
5297 | case CSSPropertyFontVariantEastAsian: |
5298 | if (isInitial) |
5299 | StyleBuilderCustom::applyInitialFontVariantEastAsian(styleResolver); |
5300 | else if (isInherit) |
5301 | StyleBuilderCustom::applyInheritFontVariantEastAsian(styleResolver); |
5302 | else |
5303 | StyleBuilderCustom::applyValueFontVariantEastAsian(styleResolver, value); |
5304 | break; |
5305 | case CSSPropertyFontVariantLigatures: |
5306 | if (isInitial) |
5307 | StyleBuilderCustom::applyInitialFontVariantLigatures(styleResolver); |
5308 | else if (isInherit) |
5309 | StyleBuilderCustom::applyInheritFontVariantLigatures(styleResolver); |
5310 | else |
5311 | StyleBuilderCustom::applyValueFontVariantLigatures(styleResolver, value); |
5312 | break; |
5313 | case CSSPropertyFontVariantNumeric: |
5314 | if (isInitial) |
5315 | StyleBuilderCustom::applyInitialFontVariantNumeric(styleResolver); |
5316 | else if (isInherit) |
5317 | StyleBuilderCustom::applyInheritFontVariantNumeric(styleResolver); |
5318 | else |
5319 | StyleBuilderCustom::applyValueFontVariantNumeric(styleResolver, value); |
5320 | break; |
5321 | case CSSPropertyFontVariantPosition: |
5322 | if (isInitial) |
5323 | StyleBuilderFunctions::applyInitialFontVariantPosition(styleResolver); |
5324 | else if (isInherit) |
5325 | StyleBuilderFunctions::applyInheritFontVariantPosition(styleResolver); |
5326 | else |
5327 | StyleBuilderFunctions::applyValueFontVariantPosition(styleResolver, value); |
5328 | break; |
5329 | case CSSPropertyFontVariationSettings: |
5330 | if (isInitial) |
5331 | StyleBuilderCustom::applyInitialFontVariationSettings(styleResolver); |
5332 | else if (isInherit) |
5333 | StyleBuilderCustom::applyInheritFontVariationSettings(styleResolver); |
5334 | else |
5335 | StyleBuilderFunctions::applyValueFontVariationSettings(styleResolver, value); |
5336 | break; |
5337 | case CSSPropertyFontWeight: |
5338 | if (isInitial) |
5339 | StyleBuilderFunctions::applyInitialFontWeight(styleResolver); |
5340 | else if (isInherit) |
5341 | StyleBuilderFunctions::applyInheritFontWeight(styleResolver); |
5342 | else |
5343 | StyleBuilderFunctions::applyValueFontWeight(styleResolver, value); |
5344 | break; |
5345 | case CSSPropertyTextRendering: |
5346 | if (isInitial) |
5347 | StyleBuilderFunctions::applyInitialTextRendering(styleResolver); |
5348 | else if (isInherit) |
5349 | StyleBuilderFunctions::applyInheritTextRendering(styleResolver); |
5350 | else |
5351 | StyleBuilderFunctions::applyValueTextRendering(styleResolver, value); |
5352 | break; |
5353 | case CSSPropertyWritingMode: |
5354 | if (isInitial) |
5355 | StyleBuilderFunctions::applyInitialWritingMode(styleResolver); |
5356 | else if (isInherit) |
5357 | StyleBuilderFunctions::applyInheritWritingMode(styleResolver); |
5358 | else |
5359 | StyleBuilderCustom::applyValueWritingMode(styleResolver, value); |
5360 | break; |
5361 | case CSSPropertyZoom: |
5362 | if (isInitial) |
5363 | StyleBuilderCustom::applyInitialZoom(styleResolver); |
5364 | else if (isInherit) |
5365 | StyleBuilderCustom::applyInheritZoom(styleResolver); |
5366 | else |
5367 | StyleBuilderCustom::applyValueZoom(styleResolver, value); |
5368 | break; |
5369 | case CSSPropertyWebkitFontKerning: |
5370 | if (isInitial) |
5371 | StyleBuilderFunctions::applyInitialWebkitFontKerning(styleResolver); |
5372 | else if (isInherit) |
5373 | StyleBuilderFunctions::applyInheritWebkitFontKerning(styleResolver); |
5374 | else |
5375 | StyleBuilderFunctions::applyValueWebkitFontKerning(styleResolver, value); |
5376 | break; |
5377 | case CSSPropertyWebkitFontSmoothing: |
5378 | if (isInitial) |
5379 | StyleBuilderFunctions::applyInitialWebkitFontSmoothing(styleResolver); |
5380 | else if (isInherit) |
5381 | StyleBuilderFunctions::applyInheritWebkitFontSmoothing(styleResolver); |
5382 | else |
5383 | StyleBuilderFunctions::applyValueWebkitFontSmoothing(styleResolver, value); |
5384 | break; |
5385 | case CSSPropertyWebkitLocale: |
5386 | if (isInitial) |
5387 | StyleBuilderFunctions::applyInitialWebkitLocale(styleResolver); |
5388 | else if (isInherit) |
5389 | StyleBuilderFunctions::applyInheritWebkitLocale(styleResolver); |
5390 | else |
5391 | StyleBuilderCustom::applyValueWebkitLocale(styleResolver, value); |
5392 | break; |
5393 | case CSSPropertyWebkitTextOrientation: |
5394 | if (isInitial) |
5395 | StyleBuilderFunctions::applyInitialWebkitTextOrientation(styleResolver); |
5396 | else if (isInherit) |
5397 | StyleBuilderFunctions::applyInheritWebkitTextOrientation(styleResolver); |
5398 | else |
5399 | StyleBuilderCustom::applyValueWebkitTextOrientation(styleResolver, value); |
5400 | break; |
5401 | case CSSPropertyWebkitTextZoom: |
5402 | if (isInitial) |
5403 | StyleBuilderFunctions::applyInitialWebkitTextZoom(styleResolver); |
5404 | else if (isInherit) |
5405 | StyleBuilderFunctions::applyInheritWebkitTextZoom(styleResolver); |
5406 | else |
5407 | StyleBuilderCustom::applyValueWebkitTextZoom(styleResolver, value); |
5408 | break; |
5409 | case CSSPropertyAlignContent: |
5410 | if (isInitial) |
5411 | StyleBuilderFunctions::applyInitialAlignContent(styleResolver); |
5412 | else if (isInherit) |
5413 | StyleBuilderFunctions::applyInheritAlignContent(styleResolver); |
5414 | else |
5415 | StyleBuilderFunctions::applyValueAlignContent(styleResolver, value); |
5416 | break; |
5417 | case CSSPropertyAlignItems: |
5418 | if (isInitial) |
5419 | StyleBuilderFunctions::applyInitialAlignItems(styleResolver); |
5420 | else if (isInherit) |
5421 | StyleBuilderFunctions::applyInheritAlignItems(styleResolver); |
5422 | else |
5423 | StyleBuilderFunctions::applyValueAlignItems(styleResolver, value); |
5424 | break; |
5425 | case CSSPropertyAlignSelf: |
5426 | if (isInitial) |
5427 | StyleBuilderFunctions::applyInitialAlignSelf(styleResolver); |
5428 | else if (isInherit) |
5429 | StyleBuilderFunctions::applyInheritAlignSelf(styleResolver); |
5430 | else |
5431 | StyleBuilderFunctions::applyValueAlignSelf(styleResolver, value); |
5432 | break; |
5433 | case CSSPropertyAlignmentBaseline: |
5434 | if (isInitial) |
5435 | StyleBuilderFunctions::applyInitialAlignmentBaseline(styleResolver); |
5436 | else if (isInherit) |
5437 | StyleBuilderFunctions::applyInheritAlignmentBaseline(styleResolver); |
5438 | else |
5439 | StyleBuilderFunctions::applyValueAlignmentBaseline(styleResolver, value); |
5440 | break; |
5441 | case CSSPropertyAll: |
5442 | ASSERT(isShorthandCSSProperty(property)); |
5443 | ASSERT_NOT_REACHED(); |
5444 | break; |
5445 | case CSSPropertyAlt: |
5446 | if (isInitial) |
5447 | StyleBuilderFunctions::applyInitialAlt(styleResolver); |
5448 | else if (isInherit) |
5449 | StyleBuilderFunctions::applyInheritAlt(styleResolver); |
5450 | else |
5451 | StyleBuilderCustom::applyValueAlt(styleResolver, value); |
5452 | break; |
5453 | case CSSPropertyAnimation: |
5454 | ASSERT(isShorthandCSSProperty(property)); |
5455 | ASSERT_NOT_REACHED(); |
5456 | break; |
5457 | case CSSPropertyAnimationDelay: |
5458 | if (isInitial) |
5459 | StyleBuilderFunctions::applyInitialAnimationDelay(styleResolver); |
5460 | else if (isInherit) |
5461 | StyleBuilderFunctions::applyInheritAnimationDelay(styleResolver); |
5462 | else |
5463 | StyleBuilderFunctions::applyValueAnimationDelay(styleResolver, value); |
5464 | break; |
5465 | case CSSPropertyAnimationDirection: |
5466 | if (isInitial) |
5467 | StyleBuilderFunctions::applyInitialAnimationDirection(styleResolver); |
5468 | else if (isInherit) |
5469 | StyleBuilderFunctions::applyInheritAnimationDirection(styleResolver); |
5470 | else |
5471 | StyleBuilderFunctions::applyValueAnimationDirection(styleResolver, value); |
5472 | break; |
5473 | case CSSPropertyAnimationDuration: |
5474 | if (isInitial) |
5475 | StyleBuilderFunctions::applyInitialAnimationDuration(styleResolver); |
5476 | else if (isInherit) |
5477 | StyleBuilderFunctions::applyInheritAnimationDuration(styleResolver); |
5478 | else |
5479 | StyleBuilderFunctions::applyValueAnimationDuration(styleResolver, value); |
5480 | break; |
5481 | case CSSPropertyAnimationFillMode: |
5482 | if (isInitial) |
5483 | StyleBuilderFunctions::applyInitialAnimationFillMode(styleResolver); |
5484 | else if (isInherit) |
5485 | StyleBuilderFunctions::applyInheritAnimationFillMode(styleResolver); |
5486 | else |
5487 | StyleBuilderFunctions::applyValueAnimationFillMode(styleResolver, value); |
5488 | break; |
5489 | case CSSPropertyAnimationIterationCount: |
5490 | if (isInitial) |
5491 | StyleBuilderFunctions::applyInitialAnimationIterationCount(styleResolver); |
5492 | else if (isInherit) |
5493 | StyleBuilderFunctions::applyInheritAnimationIterationCount(styleResolver); |
5494 | else |
5495 | StyleBuilderFunctions::applyValueAnimationIterationCount(styleResolver, value); |
5496 | break; |
5497 | case CSSPropertyAnimationName: |
5498 | if (isInitial) |
5499 | StyleBuilderFunctions::applyInitialAnimationName(styleResolver); |
5500 | else if (isInherit) |
5501 | StyleBuilderFunctions::applyInheritAnimationName(styleResolver); |
5502 | else |
5503 | StyleBuilderFunctions::applyValueAnimationName(styleResolver, value); |
5504 | break; |
5505 | case CSSPropertyAnimationPlayState: |
5506 | if (isInitial) |
5507 | StyleBuilderFunctions::applyInitialAnimationPlayState(styleResolver); |
5508 | else if (isInherit) |
5509 | StyleBuilderFunctions::applyInheritAnimationPlayState(styleResolver); |
5510 | else |
5511 | StyleBuilderFunctions::applyValueAnimationPlayState(styleResolver, value); |
5512 | break; |
5513 | case CSSPropertyAnimationTimingFunction: |
5514 | if (isInitial) |
5515 | StyleBuilderFunctions::applyInitialAnimationTimingFunction(styleResolver); |
5516 | else if (isInherit) |
5517 | StyleBuilderFunctions::applyInheritAnimationTimingFunction(styleResolver); |
5518 | else |
5519 | StyleBuilderFunctions::applyValueAnimationTimingFunction(styleResolver, value); |
5520 | break; |
5521 | case CSSPropertyBackground: |
5522 | ASSERT(isShorthandCSSProperty(property)); |
5523 | ASSERT_NOT_REACHED(); |
5524 | break; |
5525 | case CSSPropertyBackgroundAttachment: |
5526 | if (isInitial) |
5527 | StyleBuilderFunctions::applyInitialBackgroundAttachment(styleResolver); |
5528 | else if (isInherit) |
5529 | StyleBuilderFunctions::applyInheritBackgroundAttachment(styleResolver); |
5530 | else |
5531 | StyleBuilderFunctions::applyValueBackgroundAttachment(styleResolver, value); |
5532 | break; |
5533 | case CSSPropertyBackgroundBlendMode: |
5534 | if (isInitial) |
5535 | StyleBuilderFunctions::applyInitialBackgroundBlendMode(styleResolver); |
5536 | else if (isInherit) |
5537 | StyleBuilderFunctions::applyInheritBackgroundBlendMode(styleResolver); |
5538 | else |
5539 | StyleBuilderFunctions::applyValueBackgroundBlendMode(styleResolver, value); |
5540 | break; |
5541 | case CSSPropertyBackgroundClip: |
5542 | if (isInitial) |
5543 | StyleBuilderFunctions::applyInitialBackgroundClip(styleResolver); |
5544 | else if (isInherit) |
5545 | StyleBuilderFunctions::applyInheritBackgroundClip(styleResolver); |
5546 | else |
5547 | StyleBuilderFunctions::applyValueBackgroundClip(styleResolver, value); |
5548 | break; |
5549 | case CSSPropertyBackgroundColor: |
5550 | if (isInitial) |
5551 | StyleBuilderFunctions::applyInitialBackgroundColor(styleResolver); |
5552 | else if (isInherit) |
5553 | StyleBuilderFunctions::applyInheritBackgroundColor(styleResolver); |
5554 | else |
5555 | StyleBuilderFunctions::applyValueBackgroundColor(styleResolver, value); |
5556 | break; |
5557 | case CSSPropertyBackgroundImage: |
5558 | if (isInitial) |
5559 | StyleBuilderFunctions::applyInitialBackgroundImage(styleResolver); |
5560 | else if (isInherit) |
5561 | StyleBuilderFunctions::applyInheritBackgroundImage(styleResolver); |
5562 | else |
5563 | StyleBuilderFunctions::applyValueBackgroundImage(styleResolver, value); |
5564 | break; |
5565 | case CSSPropertyBackgroundOrigin: |
5566 | if (isInitial) |
5567 | StyleBuilderFunctions::applyInitialBackgroundOrigin(styleResolver); |
5568 | else if (isInherit) |
5569 | StyleBuilderFunctions::applyInheritBackgroundOrigin(styleResolver); |
5570 | else |
5571 | StyleBuilderFunctions::applyValueBackgroundOrigin(styleResolver, value); |
5572 | break; |
5573 | case CSSPropertyBackgroundPosition: |
5574 | ASSERT(isShorthandCSSProperty(property)); |
5575 | ASSERT_NOT_REACHED(); |
5576 | break; |
5577 | case CSSPropertyBackgroundPositionX: |
5578 | if (isInitial) |
5579 | StyleBuilderFunctions::applyInitialBackgroundPositionX(styleResolver); |
5580 | else if (isInherit) |
5581 | StyleBuilderFunctions::applyInheritBackgroundPositionX(styleResolver); |
5582 | else |
5583 | StyleBuilderFunctions::applyValueBackgroundPositionX(styleResolver, value); |
5584 | break; |
5585 | case CSSPropertyBackgroundPositionY: |
5586 | if (isInitial) |
5587 | StyleBuilderFunctions::applyInitialBackgroundPositionY(styleResolver); |
5588 | else if (isInherit) |
5589 | StyleBuilderFunctions::applyInheritBackgroundPositionY(styleResolver); |
5590 | else |
5591 | StyleBuilderFunctions::applyValueBackgroundPositionY(styleResolver, value); |
5592 | break; |
5593 | case CSSPropertyBackgroundRepeat: |
5594 | ASSERT(isShorthandCSSProperty(property)); |
5595 | ASSERT_NOT_REACHED(); |
5596 | break; |
5597 | case CSSPropertyBackgroundRepeatX: |
5598 | if (isInitial) |
5599 | StyleBuilderFunctions::applyInitialBackgroundRepeatX(styleResolver); |
5600 | else if (isInherit) |
5601 | StyleBuilderFunctions::applyInheritBackgroundRepeatX(styleResolver); |
5602 | else |
5603 | StyleBuilderFunctions::applyValueBackgroundRepeatX(styleResolver, value); |
5604 | break; |
5605 | case CSSPropertyBackgroundRepeatY: |
5606 | if (isInitial) |
5607 | StyleBuilderFunctions::applyInitialBackgroundRepeatY(styleResolver); |
5608 | else if (isInherit) |
5609 | StyleBuilderFunctions::applyInheritBackgroundRepeatY(styleResolver); |
5610 | else |
5611 | StyleBuilderFunctions::applyValueBackgroundRepeatY(styleResolver, value); |
5612 | break; |
5613 | case CSSPropertyBackgroundSize: |
5614 | if (isInitial) |
5615 | StyleBuilderFunctions::applyInitialBackgroundSize(styleResolver); |
5616 | else if (isInherit) |
5617 | StyleBuilderFunctions::applyInheritBackgroundSize(styleResolver); |
5618 | else |
5619 | StyleBuilderFunctions::applyValueBackgroundSize(styleResolver, value); |
5620 | break; |
5621 | case CSSPropertyBaselineShift: |
5622 | if (isInitial) |
5623 | StyleBuilderFunctions::applyInitialBaselineShift(styleResolver); |
5624 | else if (isInherit) |
5625 | StyleBuilderFunctions::applyInheritBaselineShift(styleResolver); |
5626 | else |
5627 | StyleBuilderCustom::applyValueBaselineShift(styleResolver, value); |
5628 | break; |
5629 | case CSSPropertyBlockSize: |
5630 | break; |
5631 | case CSSPropertyBorder: |
5632 | ASSERT(isShorthandCSSProperty(property)); |
5633 | ASSERT_NOT_REACHED(); |
5634 | break; |
5635 | case CSSPropertyBorderBlock: |
5636 | ASSERT(isShorthandCSSProperty(property)); |
5637 | ASSERT_NOT_REACHED(); |
5638 | break; |
5639 | case CSSPropertyBorderBlockColor: |
5640 | ASSERT(isShorthandCSSProperty(property)); |
5641 | ASSERT_NOT_REACHED(); |
5642 | break; |
5643 | case CSSPropertyBorderBlockEnd: |
5644 | ASSERT(isShorthandCSSProperty(property)); |
5645 | ASSERT_NOT_REACHED(); |
5646 | break; |
5647 | case CSSPropertyBorderBlockEndColor: |
5648 | break; |
5649 | case CSSPropertyBorderBlockEndStyle: |
5650 | break; |
5651 | case CSSPropertyBorderBlockEndWidth: |
5652 | break; |
5653 | case CSSPropertyBorderBlockStart: |
5654 | ASSERT(isShorthandCSSProperty(property)); |
5655 | ASSERT_NOT_REACHED(); |
5656 | break; |
5657 | case CSSPropertyBorderBlockStartColor: |
5658 | break; |
5659 | case CSSPropertyBorderBlockStartStyle: |
5660 | break; |
5661 | case CSSPropertyBorderBlockStartWidth: |
5662 | break; |
5663 | case CSSPropertyBorderBlockStyle: |
5664 | ASSERT(isShorthandCSSProperty(property)); |
5665 | ASSERT_NOT_REACHED(); |
5666 | break; |
5667 | case CSSPropertyBorderBlockWidth: |
5668 | ASSERT(isShorthandCSSProperty(property)); |
5669 | ASSERT_NOT_REACHED(); |
5670 | break; |
5671 | case CSSPropertyBorderBottom: |
5672 | ASSERT(isShorthandCSSProperty(property)); |
5673 | ASSERT_NOT_REACHED(); |
5674 | break; |
5675 | case CSSPropertyBorderBottomColor: |
5676 | if (isInitial) |
5677 | StyleBuilderFunctions::applyInitialBorderBottomColor(styleResolver); |
5678 | else if (isInherit) |
5679 | StyleBuilderFunctions::applyInheritBorderBottomColor(styleResolver); |
5680 | else |
5681 | StyleBuilderFunctions::applyValueBorderBottomColor(styleResolver, value); |
5682 | break; |
5683 | case CSSPropertyBorderBottomLeftRadius: |
5684 | if (isInitial) |
5685 | StyleBuilderFunctions::applyInitialBorderBottomLeftRadius(styleResolver); |
5686 | else if (isInherit) |
5687 | StyleBuilderFunctions::applyInheritBorderBottomLeftRadius(styleResolver); |
5688 | else |
5689 | StyleBuilderFunctions::applyValueBorderBottomLeftRadius(styleResolver, value); |
5690 | break; |
5691 | case CSSPropertyBorderBottomRightRadius: |
5692 | if (isInitial) |
5693 | StyleBuilderFunctions::applyInitialBorderBottomRightRadius(styleResolver); |
5694 | else if (isInherit) |
5695 | StyleBuilderFunctions::applyInheritBorderBottomRightRadius(styleResolver); |
5696 | else |
5697 | StyleBuilderFunctions::applyValueBorderBottomRightRadius(styleResolver, value); |
5698 | break; |
5699 | case CSSPropertyBorderBottomStyle: |
5700 | if (isInitial) |
5701 | StyleBuilderFunctions::applyInitialBorderBottomStyle(styleResolver); |
5702 | else if (isInherit) |
5703 | StyleBuilderFunctions::applyInheritBorderBottomStyle(styleResolver); |
5704 | else |
5705 | StyleBuilderFunctions::applyValueBorderBottomStyle(styleResolver, value); |
5706 | break; |
5707 | case CSSPropertyBorderBottomWidth: |
5708 | if (isInitial) |
5709 | StyleBuilderFunctions::applyInitialBorderBottomWidth(styleResolver); |
5710 | else if (isInherit) |
5711 | StyleBuilderFunctions::applyInheritBorderBottomWidth(styleResolver); |
5712 | else |
5713 | StyleBuilderFunctions::applyValueBorderBottomWidth(styleResolver, value); |
5714 | break; |
5715 | case CSSPropertyBorderCollapse: |
5716 | if (isInitial) |
5717 | StyleBuilderFunctions::applyInitialBorderCollapse(styleResolver); |
5718 | else if (isInherit) |
5719 | StyleBuilderFunctions::applyInheritBorderCollapse(styleResolver); |
5720 | else |
5721 | StyleBuilderFunctions::applyValueBorderCollapse(styleResolver, value); |
5722 | break; |
5723 | case CSSPropertyBorderColor: |
5724 | ASSERT(isShorthandCSSProperty(property)); |
5725 | ASSERT_NOT_REACHED(); |
5726 | break; |
5727 | case CSSPropertyBorderImage: |
5728 | ASSERT(isShorthandCSSProperty(property)); |
5729 | ASSERT_NOT_REACHED(); |
5730 | break; |
5731 | case CSSPropertyBorderImageOutset: |
5732 | if (isInitial) |
5733 | StyleBuilderCustom::applyInitialBorderImageOutset(styleResolver); |
5734 | else if (isInherit) |
5735 | StyleBuilderCustom::applyInheritBorderImageOutset(styleResolver); |
5736 | else |
5737 | StyleBuilderCustom::applyValueBorderImageOutset(styleResolver, value); |
5738 | break; |
5739 | case CSSPropertyBorderImageRepeat: |
5740 | if (isInitial) |
5741 | StyleBuilderCustom::applyInitialBorderImageRepeat(styleResolver); |
5742 | else if (isInherit) |
5743 | StyleBuilderCustom::applyInheritBorderImageRepeat(styleResolver); |
5744 | else |
5745 | StyleBuilderCustom::applyValueBorderImageRepeat(styleResolver, value); |
5746 | break; |
5747 | case CSSPropertyBorderImageSlice: |
5748 | if (isInitial) |
5749 | StyleBuilderCustom::applyInitialBorderImageSlice(styleResolver); |
5750 | else if (isInherit) |
5751 | StyleBuilderCustom::applyInheritBorderImageSlice(styleResolver); |
5752 | else |
5753 | StyleBuilderCustom::applyValueBorderImageSlice(styleResolver, value); |
5754 | break; |
5755 | case CSSPropertyBorderImageSource: |
5756 | if (isInitial) |
5757 | StyleBuilderFunctions::applyInitialBorderImageSource(styleResolver); |
5758 | else if (isInherit) |
5759 | StyleBuilderFunctions::applyInheritBorderImageSource(styleResolver); |
5760 | else |
5761 | StyleBuilderFunctions::applyValueBorderImageSource(styleResolver, value); |
5762 | break; |
5763 | case CSSPropertyBorderImageWidth: |
5764 | if (isInitial) |
5765 | StyleBuilderCustom::applyInitialBorderImageWidth(styleResolver); |
5766 | else if (isInherit) |
5767 | StyleBuilderCustom::applyInheritBorderImageWidth(styleResolver); |
5768 | else |
5769 | StyleBuilderCustom::applyValueBorderImageWidth(styleResolver, value); |
5770 | break; |
5771 | case CSSPropertyBorderInline: |
5772 | ASSERT(isShorthandCSSProperty(property)); |
5773 | ASSERT_NOT_REACHED(); |
5774 | break; |
5775 | case CSSPropertyBorderInlineColor: |
5776 | ASSERT(isShorthandCSSProperty(property)); |
5777 | ASSERT_NOT_REACHED(); |
5778 | break; |
5779 | case CSSPropertyBorderInlineEnd: |
5780 | ASSERT(isShorthandCSSProperty(property)); |
5781 | ASSERT_NOT_REACHED(); |
5782 | break; |
5783 | case CSSPropertyBorderInlineEndColor: |
5784 | break; |
5785 | case CSSPropertyBorderInlineEndStyle: |
5786 | break; |
5787 | case CSSPropertyBorderInlineEndWidth: |
5788 | break; |
5789 | case CSSPropertyBorderInlineStart: |
5790 | ASSERT(isShorthandCSSProperty(property)); |
5791 | ASSERT_NOT_REACHED(); |
5792 | break; |
5793 | case CSSPropertyBorderInlineStartColor: |
5794 | break; |
5795 | case CSSPropertyBorderInlineStartStyle: |
5796 | break; |
5797 | case CSSPropertyBorderInlineStartWidth: |
5798 | break; |
5799 | case CSSPropertyBorderInlineStyle: |
5800 | ASSERT(isShorthandCSSProperty(property)); |
5801 | ASSERT_NOT_REACHED(); |
5802 | break; |
5803 | case CSSPropertyBorderInlineWidth: |
5804 | ASSERT(isShorthandCSSProperty(property)); |
5805 | ASSERT_NOT_REACHED(); |
5806 | break; |
5807 | case CSSPropertyBorderLeft: |
5808 | ASSERT(isShorthandCSSProperty(property)); |
5809 | ASSERT_NOT_REACHED(); |
5810 | break; |
5811 | case CSSPropertyBorderLeftColor: |
5812 | if (isInitial) |
5813 | StyleBuilderFunctions::applyInitialBorderLeftColor(styleResolver); |
5814 | else if (isInherit) |
5815 | StyleBuilderFunctions::applyInheritBorderLeftColor(styleResolver); |
5816 | else |
5817 | StyleBuilderFunctions::applyValueBorderLeftColor(styleResolver, value); |
5818 | break; |
5819 | case CSSPropertyBorderLeftStyle: |
5820 | if (isInitial) |
5821 | StyleBuilderFunctions::applyInitialBorderLeftStyle(styleResolver); |
5822 | else if (isInherit) |
5823 | StyleBuilderFunctions::applyInheritBorderLeftStyle(styleResolver); |
5824 | else |
5825 | StyleBuilderFunctions::applyValueBorderLeftStyle(styleResolver, value); |
5826 | break; |
5827 | case CSSPropertyBorderLeftWidth: |
5828 | if (isInitial) |
5829 | StyleBuilderFunctions::applyInitialBorderLeftWidth(styleResolver); |
5830 | else if (isInherit) |
5831 | StyleBuilderFunctions::applyInheritBorderLeftWidth(styleResolver); |
5832 | else |
5833 | StyleBuilderFunctions::applyValueBorderLeftWidth(styleResolver, value); |
5834 | break; |
5835 | case CSSPropertyBorderRadius: |
5836 | ASSERT(isShorthandCSSProperty(property)); |
5837 | ASSERT_NOT_REACHED(); |
5838 | break; |
5839 | case CSSPropertyBorderRight: |
5840 | ASSERT(isShorthandCSSProperty(property)); |
5841 | ASSERT_NOT_REACHED(); |
5842 | break; |
5843 | case CSSPropertyBorderRightColor: |
5844 | if (isInitial) |
5845 | StyleBuilderFunctions::applyInitialBorderRightColor(styleResolver); |
5846 | else if (isInherit) |
5847 | StyleBuilderFunctions::applyInheritBorderRightColor(styleResolver); |
5848 | else |
5849 | StyleBuilderFunctions::applyValueBorderRightColor(styleResolver, value); |
5850 | break; |
5851 | case CSSPropertyBorderRightStyle: |
5852 | if (isInitial) |
5853 | StyleBuilderFunctions::applyInitialBorderRightStyle(styleResolver); |
5854 | else if (isInherit) |
5855 | StyleBuilderFunctions::applyInheritBorderRightStyle(styleResolver); |
5856 | else |
5857 | StyleBuilderFunctions::applyValueBorderRightStyle(styleResolver, value); |
5858 | break; |
5859 | case CSSPropertyBorderRightWidth: |
5860 | if (isInitial) |
5861 | StyleBuilderFunctions::applyInitialBorderRightWidth(styleResolver); |
5862 | else if (isInherit) |
5863 | StyleBuilderFunctions::applyInheritBorderRightWidth(styleResolver); |
5864 | else |
5865 | StyleBuilderFunctions::applyValueBorderRightWidth(styleResolver, value); |
5866 | break; |
5867 | case CSSPropertyBorderSpacing: |
5868 | ASSERT(isShorthandCSSProperty(property)); |
5869 | ASSERT_NOT_REACHED(); |
5870 | break; |
5871 | case CSSPropertyBorderStyle: |
5872 | ASSERT(isShorthandCSSProperty(property)); |
5873 | ASSERT_NOT_REACHED(); |
5874 | break; |
5875 | case CSSPropertyBorderTop: |
5876 | ASSERT(isShorthandCSSProperty(property)); |
5877 | ASSERT_NOT_REACHED(); |
5878 | break; |
5879 | case CSSPropertyBorderTopColor: |
5880 | if (isInitial) |
5881 | StyleBuilderFunctions::applyInitialBorderTopColor(styleResolver); |
5882 | else if (isInherit) |
5883 | StyleBuilderFunctions::applyInheritBorderTopColor(styleResolver); |
5884 | else |
5885 | StyleBuilderFunctions::applyValueBorderTopColor(styleResolver, value); |
5886 | break; |
5887 | case CSSPropertyBorderTopLeftRadius: |
5888 | if (isInitial) |
5889 | StyleBuilderFunctions::applyInitialBorderTopLeftRadius(styleResolver); |
5890 | else if (isInherit) |
5891 | StyleBuilderFunctions::applyInheritBorderTopLeftRadius(styleResolver); |
5892 | else |
5893 | StyleBuilderFunctions::applyValueBorderTopLeftRadius(styleResolver, value); |
5894 | break; |
5895 | case CSSPropertyBorderTopRightRadius: |
5896 | if (isInitial) |
5897 | StyleBuilderFunctions::applyInitialBorderTopRightRadius(styleResolver); |
5898 | else if (isInherit) |
5899 | StyleBuilderFunctions::applyInheritBorderTopRightRadius(styleResolver); |
5900 | else |
5901 | StyleBuilderFunctions::applyValueBorderTopRightRadius(styleResolver, value); |
5902 | break; |
5903 | case CSSPropertyBorderTopStyle: |
5904 | if (isInitial) |
5905 | StyleBuilderFunctions::applyInitialBorderTopStyle(styleResolver); |
5906 | else if (isInherit) |
5907 | StyleBuilderFunctions::applyInheritBorderTopStyle(styleResolver); |
5908 | else |
5909 | StyleBuilderFunctions::applyValueBorderTopStyle(styleResolver, value); |
5910 | break; |
5911 | case CSSPropertyBorderTopWidth: |
5912 | if (isInitial) |
5913 | StyleBuilderFunctions::applyInitialBorderTopWidth(styleResolver); |
5914 | else if (isInherit) |
5915 | StyleBuilderFunctions::applyInheritBorderTopWidth(styleResolver); |
5916 | else |
5917 | StyleBuilderFunctions::applyValueBorderTopWidth(styleResolver, value); |
5918 | break; |
5919 | case CSSPropertyBorderWidth: |
5920 | ASSERT(isShorthandCSSProperty(property)); |
5921 | ASSERT_NOT_REACHED(); |
5922 | break; |
5923 | case CSSPropertyBottom: |
5924 | if (isInitial) |
5925 | StyleBuilderFunctions::applyInitialBottom(styleResolver); |
5926 | else if (isInherit) |
5927 | StyleBuilderFunctions::applyInheritBottom(styleResolver); |
5928 | else |
5929 | StyleBuilderFunctions::applyValueBottom(styleResolver, value); |
5930 | break; |
5931 | case CSSPropertyBoxShadow: |
5932 | if (isInitial) |
5933 | StyleBuilderCustom::applyInitialBoxShadow(styleResolver); |
5934 | else if (isInherit) |
5935 | StyleBuilderCustom::applyInheritBoxShadow(styleResolver); |
5936 | else |
5937 | StyleBuilderCustom::applyValueBoxShadow(styleResolver, value); |
5938 | break; |
5939 | case CSSPropertyBoxSizing: |
5940 | if (isInitial) |
5941 | StyleBuilderFunctions::applyInitialBoxSizing(styleResolver); |
5942 | else if (isInherit) |
5943 | StyleBuilderFunctions::applyInheritBoxSizing(styleResolver); |
5944 | else |
5945 | StyleBuilderFunctions::applyValueBoxSizing(styleResolver, value); |
5946 | break; |
5947 | case CSSPropertyBreakAfter: |
5948 | if (isInitial) |
5949 | StyleBuilderFunctions::applyInitialBreakAfter(styleResolver); |
5950 | else if (isInherit) |
5951 | StyleBuilderFunctions::applyInheritBreakAfter(styleResolver); |
5952 | else |
5953 | StyleBuilderFunctions::applyValueBreakAfter(styleResolver, value); |
5954 | break; |
5955 | case CSSPropertyBreakBefore: |
5956 | if (isInitial) |
5957 | StyleBuilderFunctions::applyInitialBreakBefore(styleResolver); |
5958 | else if (isInherit) |
5959 | StyleBuilderFunctions::applyInheritBreakBefore(styleResolver); |
5960 | else |
5961 | StyleBuilderFunctions::applyValueBreakBefore(styleResolver, value); |
5962 | break; |
5963 | case CSSPropertyBreakInside: |
5964 | if (isInitial) |
5965 | StyleBuilderFunctions::applyInitialBreakInside(styleResolver); |
5966 | else if (isInherit) |
5967 | StyleBuilderFunctions::applyInheritBreakInside(styleResolver); |
5968 | else |
5969 | StyleBuilderFunctions::applyValueBreakInside(styleResolver, value); |
5970 | break; |
5971 | case CSSPropertyBufferedRendering: |
5972 | if (isInitial) |
5973 | StyleBuilderFunctions::applyInitialBufferedRendering(styleResolver); |
5974 | else if (isInherit) |
5975 | StyleBuilderFunctions::applyInheritBufferedRendering(styleResolver); |
5976 | else |
5977 | StyleBuilderFunctions::applyValueBufferedRendering(styleResolver, value); |
5978 | break; |
5979 | case CSSPropertyCaptionSide: |
5980 | if (isInitial) |
5981 | StyleBuilderFunctions::applyInitialCaptionSide(styleResolver); |
5982 | else if (isInherit) |
5983 | StyleBuilderFunctions::applyInheritCaptionSide(styleResolver); |
5984 | else |
5985 | StyleBuilderFunctions::applyValueCaptionSide(styleResolver, value); |
5986 | break; |
5987 | case CSSPropertyCaretColor: |
5988 | if (isInitial) |
5989 | StyleBuilderFunctions::applyInitialCaretColor(styleResolver); |
5990 | else if (isInherit) |
5991 | StyleBuilderFunctions::applyInheritCaretColor(styleResolver); |
5992 | else |
5993 | StyleBuilderFunctions::applyValueCaretColor(styleResolver, value); |
5994 | break; |
5995 | case CSSPropertyClear: |
5996 | if (isInitial) |
5997 | StyleBuilderFunctions::applyInitialClear(styleResolver); |
5998 | else if (isInherit) |
5999 | StyleBuilderFunctions::applyInheritClear(styleResolver); |
6000 | else |
6001 | StyleBuilderFunctions::applyValueClear(styleResolver, value); |
6002 | break; |
6003 | case CSSPropertyClip: |
6004 | if (isInitial) |
6005 | StyleBuilderCustom::applyInitialClip(styleResolver); |
6006 | else if (isInherit) |
6007 | StyleBuilderCustom::applyInheritClip(styleResolver); |
6008 | else |
6009 | StyleBuilderCustom::applyValueClip(styleResolver, value); |
6010 | break; |
6011 | case CSSPropertyClipPath: |
6012 | if (isInitial) |
6013 | StyleBuilderFunctions::applyInitialClipPath(styleResolver); |
6014 | else if (isInherit) |
6015 | StyleBuilderFunctions::applyInheritClipPath(styleResolver); |
6016 | else |
6017 | StyleBuilderFunctions::applyValueClipPath(styleResolver, value); |
6018 | break; |
6019 | case CSSPropertyClipRule: |
6020 | if (isInitial) |
6021 | StyleBuilderFunctions::applyInitialClipRule(styleResolver); |
6022 | else if (isInherit) |
6023 | StyleBuilderFunctions::applyInheritClipRule(styleResolver); |
6024 | else |
6025 | StyleBuilderFunctions::applyValueClipRule(styleResolver, value); |
6026 | break; |
6027 | case CSSPropertyColorInterpolation: |
6028 | if (isInitial) |
6029 | StyleBuilderFunctions::applyInitialColorInterpolation(styleResolver); |
6030 | else if (isInherit) |
6031 | StyleBuilderFunctions::applyInheritColorInterpolation(styleResolver); |
6032 | else |
6033 | StyleBuilderFunctions::applyValueColorInterpolation(styleResolver, value); |
6034 | break; |
6035 | case CSSPropertyColorInterpolationFilters: |
6036 | if (isInitial) |
6037 | StyleBuilderFunctions::applyInitialColorInterpolationFilters(styleResolver); |
6038 | else if (isInherit) |
6039 | StyleBuilderFunctions::applyInheritColorInterpolationFilters(styleResolver); |
6040 | else |
6041 | StyleBuilderFunctions::applyValueColorInterpolationFilters(styleResolver, value); |
6042 | break; |
6043 | case CSSPropertyColorProfile: |
6044 | break; |
6045 | case CSSPropertyColorRendering: |
6046 | if (isInitial) |
6047 | StyleBuilderFunctions::applyInitialColorRendering(styleResolver); |
6048 | else if (isInherit) |
6049 | StyleBuilderFunctions::applyInheritColorRendering(styleResolver); |
6050 | else |
6051 | StyleBuilderFunctions::applyValueColorRendering(styleResolver, value); |
6052 | break; |
6053 | case CSSPropertyColumnCount: |
6054 | if (isInitial) |
6055 | StyleBuilderFunctions::applyInitialColumnCount(styleResolver); |
6056 | else if (isInherit) |
6057 | StyleBuilderFunctions::applyInheritColumnCount(styleResolver); |
6058 | else |
6059 | StyleBuilderFunctions::applyValueColumnCount(styleResolver, value); |
6060 | break; |
6061 | case CSSPropertyColumnFill: |
6062 | if (isInitial) |
6063 | StyleBuilderFunctions::applyInitialColumnFill(styleResolver); |
6064 | else if (isInherit) |
6065 | StyleBuilderFunctions::applyInheritColumnFill(styleResolver); |
6066 | else |
6067 | StyleBuilderFunctions::applyValueColumnFill(styleResolver, value); |
6068 | break; |
6069 | case CSSPropertyColumnGap: |
6070 | if (isInitial) |
6071 | StyleBuilderFunctions::applyInitialColumnGap(styleResolver); |
6072 | else if (isInherit) |
6073 | StyleBuilderFunctions::applyInheritColumnGap(styleResolver); |
6074 | else |
6075 | StyleBuilderFunctions::applyValueColumnGap(styleResolver, value); |
6076 | break; |
6077 | case CSSPropertyColumnRule: |
6078 | ASSERT(isShorthandCSSProperty(property)); |
6079 | ASSERT_NOT_REACHED(); |
6080 | break; |
6081 | case CSSPropertyColumnRuleColor: |
6082 | if (isInitial) |
6083 | StyleBuilderFunctions::applyInitialColumnRuleColor(styleResolver); |
6084 | else if (isInherit) |
6085 | StyleBuilderFunctions::applyInheritColumnRuleColor(styleResolver); |
6086 | else |
6087 | StyleBuilderFunctions::applyValueColumnRuleColor(styleResolver, value); |
6088 | break; |
6089 | case CSSPropertyColumnRuleStyle: |
6090 | if (isInitial) |
6091 | StyleBuilderFunctions::applyInitialColumnRuleStyle(styleResolver); |
6092 | else if (isInherit) |
6093 | StyleBuilderFunctions::applyInheritColumnRuleStyle(styleResolver); |
6094 | else |
6095 | StyleBuilderFunctions::applyValueColumnRuleStyle(styleResolver, value); |
6096 | break; |
6097 | case CSSPropertyColumnRuleWidth: |
6098 | if (isInitial) |
6099 | StyleBuilderFunctions::applyInitialColumnRuleWidth(styleResolver); |
6100 | else if (isInherit) |
6101 | StyleBuilderFunctions::applyInheritColumnRuleWidth(styleResolver); |
6102 | else |
6103 | StyleBuilderFunctions::applyValueColumnRuleWidth(styleResolver, value); |
6104 | break; |
6105 | case CSSPropertyColumnSpan: |
6106 | if (isInitial) |
6107 | StyleBuilderFunctions::applyInitialColumnSpan(styleResolver); |
6108 | else if (isInherit) |
6109 | StyleBuilderFunctions::applyInheritColumnSpan(styleResolver); |
6110 | else |
6111 | StyleBuilderFunctions::applyValueColumnSpan(styleResolver, value); |
6112 | break; |
6113 | case CSSPropertyColumnWidth: |
6114 | if (isInitial) |
6115 | StyleBuilderFunctions::applyInitialColumnWidth(styleResolver); |
6116 | else if (isInherit) |
6117 | StyleBuilderFunctions::applyInheritColumnWidth(styleResolver); |
6118 | else |
6119 | StyleBuilderFunctions::applyValueColumnWidth(styleResolver, value); |
6120 | break; |
6121 | case CSSPropertyColumns: |
6122 | ASSERT(isShorthandCSSProperty(property)); |
6123 | ASSERT_NOT_REACHED(); |
6124 | break; |
6125 | case CSSPropertyContent: |
6126 | if (isInitial) |
6127 | StyleBuilderCustom::applyInitialContent(styleResolver); |
6128 | else if (isInherit) |
6129 | StyleBuilderCustom::applyInheritContent(styleResolver); |
6130 | else |
6131 | StyleBuilderCustom::applyValueContent(styleResolver, value); |
6132 | break; |
6133 | case CSSPropertyCounterIncrement: |
6134 | if (isInitial) |
6135 | StyleBuilderCustom::applyInitialCounterIncrement(styleResolver); |
6136 | else if (isInherit) |
6137 | StyleBuilderCustom::applyInheritCounterIncrement(styleResolver); |
6138 | else |
6139 | StyleBuilderCustom::applyValueCounterIncrement(styleResolver, value); |
6140 | break; |
6141 | case CSSPropertyCounterReset: |
6142 | if (isInitial) |
6143 | StyleBuilderCustom::applyInitialCounterReset(styleResolver); |
6144 | else if (isInherit) |
6145 | StyleBuilderCustom::applyInheritCounterReset(styleResolver); |
6146 | else |
6147 | StyleBuilderCustom::applyValueCounterReset(styleResolver, value); |
6148 | break; |
6149 | case CSSPropertyCursor: |
6150 | if (isInitial) |
6151 | StyleBuilderCustom::applyInitialCursor(styleResolver); |
6152 | else if (isInherit) |
6153 | StyleBuilderCustom::applyInheritCursor(styleResolver); |
6154 | else |
6155 | StyleBuilderCustom::applyValueCursor(styleResolver, value); |
6156 | break; |
6157 | case CSSPropertyCx: |
6158 | if (isInitial) |
6159 | StyleBuilderFunctions::applyInitialCx(styleResolver); |
6160 | else if (isInherit) |
6161 | StyleBuilderFunctions::applyInheritCx(styleResolver); |
6162 | else |
6163 | StyleBuilderFunctions::applyValueCx(styleResolver, value); |
6164 | break; |
6165 | case CSSPropertyCy: |
6166 | if (isInitial) |
6167 | StyleBuilderFunctions::applyInitialCy(styleResolver); |
6168 | else if (isInherit) |
6169 | StyleBuilderFunctions::applyInheritCy(styleResolver); |
6170 | else |
6171 | StyleBuilderFunctions::applyValueCy(styleResolver, value); |
6172 | break; |
6173 | case CSSPropertyDominantBaseline: |
6174 | if (isInitial) |
6175 | StyleBuilderFunctions::applyInitialDominantBaseline(styleResolver); |
6176 | else if (isInherit) |
6177 | StyleBuilderFunctions::applyInheritDominantBaseline(styleResolver); |
6178 | else |
6179 | StyleBuilderFunctions::applyValueDominantBaseline(styleResolver, value); |
6180 | break; |
6181 | case CSSPropertyEmptyCells: |
6182 | if (isInitial) |
6183 | StyleBuilderFunctions::applyInitialEmptyCells(styleResolver); |
6184 | else if (isInherit) |
6185 | StyleBuilderFunctions::applyInheritEmptyCells(styleResolver); |
6186 | else |
6187 | StyleBuilderFunctions::applyValueEmptyCells(styleResolver, value); |
6188 | break; |
6189 | case CSSPropertyEnableBackground: |
6190 | break; |
6191 | case CSSPropertyFill: |
6192 | if (isInitial) |
6193 | StyleBuilderCustom::applyInitialFill(styleResolver); |
6194 | else if (isInherit) |
6195 | StyleBuilderCustom::applyInheritFill(styleResolver); |
6196 | else |
6197 | StyleBuilderCustom::applyValueFill(styleResolver, value); |
6198 | break; |
6199 | case CSSPropertyFillOpacity: |
6200 | if (isInitial) |
6201 | StyleBuilderFunctions::applyInitialFillOpacity(styleResolver); |
6202 | else if (isInherit) |
6203 | StyleBuilderFunctions::applyInheritFillOpacity(styleResolver); |
6204 | else |
6205 | StyleBuilderFunctions::applyValueFillOpacity(styleResolver, value); |
6206 | break; |
6207 | case CSSPropertyFillRule: |
6208 | if (isInitial) |
6209 | StyleBuilderFunctions::applyInitialFillRule(styleResolver); |
6210 | else if (isInherit) |
6211 | StyleBuilderFunctions::applyInheritFillRule(styleResolver); |
6212 | else |
6213 | StyleBuilderFunctions::applyValueFillRule(styleResolver, value); |
6214 | break; |
6215 | case CSSPropertyFilter: |
6216 | if (isInitial) |
6217 | StyleBuilderFunctions::applyInitialFilter(styleResolver); |
6218 | else if (isInherit) |
6219 | StyleBuilderFunctions::applyInheritFilter(styleResolver); |
6220 | else |
6221 | StyleBuilderFunctions::applyValueFilter(styleResolver, value); |
6222 | break; |
6223 | case CSSPropertyFlex: |
6224 | ASSERT(isShorthandCSSProperty(property)); |
6225 | ASSERT_NOT_REACHED(); |
6226 | break; |
6227 | case CSSPropertyFlexBasis: |
6228 | if (isInitial) |
6229 | StyleBuilderFunctions::applyInitialFlexBasis(styleResolver); |
6230 | else if (isInherit) |
6231 | StyleBuilderFunctions::applyInheritFlexBasis(styleResolver); |
6232 | else |
6233 | StyleBuilderFunctions::applyValueFlexBasis(styleResolver, value); |
6234 | break; |
6235 | case CSSPropertyFlexDirection: |
6236 | if (isInitial) |
6237 | StyleBuilderFunctions::applyInitialFlexDirection(styleResolver); |
6238 | else if (isInherit) |
6239 | StyleBuilderFunctions::applyInheritFlexDirection(styleResolver); |
6240 | else |
6241 | StyleBuilderFunctions::applyValueFlexDirection(styleResolver, value); |
6242 | break; |
6243 | case CSSPropertyFlexFlow: |
6244 | ASSERT(isShorthandCSSProperty(property)); |
6245 | ASSERT_NOT_REACHED(); |
6246 | break; |
6247 | case CSSPropertyFlexGrow: |
6248 | if (isInitial) |
6249 | StyleBuilderFunctions::applyInitialFlexGrow(styleResolver); |
6250 | else if (isInherit) |
6251 | StyleBuilderFunctions::applyInheritFlexGrow(styleResolver); |
6252 | else |
6253 | StyleBuilderFunctions::applyValueFlexGrow(styleResolver, value); |
6254 | break; |
6255 | case CSSPropertyFlexShrink: |
6256 | if (isInitial) |
6257 | StyleBuilderFunctions::applyInitialFlexShrink(styleResolver); |
6258 | else if (isInherit) |
6259 | StyleBuilderFunctions::applyInheritFlexShrink(styleResolver); |
6260 | else |
6261 | StyleBuilderFunctions::applyValueFlexShrink(styleResolver, value); |
6262 | break; |
6263 | case CSSPropertyFlexWrap: |
6264 | if (isInitial) |
6265 | StyleBuilderFunctions::applyInitialFlexWrap(styleResolver); |
6266 | else if (isInherit) |
6267 | StyleBuilderFunctions::applyInheritFlexWrap(styleResolver); |
6268 | else |
6269 | StyleBuilderFunctions::applyValueFlexWrap(styleResolver, value); |
6270 | break; |
6271 | case CSSPropertyFloat: |
6272 | if (isInitial) |
6273 | StyleBuilderFunctions::applyInitialFloat(styleResolver); |
6274 | else if (isInherit) |
6275 | StyleBuilderFunctions::applyInheritFloat(styleResolver); |
6276 | else |
6277 | StyleBuilderFunctions::applyValueFloat(styleResolver, value); |
6278 | break; |
6279 | case CSSPropertyFloodColor: |
6280 | if (isInitial) |
6281 | StyleBuilderFunctions::applyInitialFloodColor(styleResolver); |
6282 | else if (isInherit) |
6283 | StyleBuilderFunctions::applyInheritFloodColor(styleResolver); |
6284 | else |
6285 | StyleBuilderFunctions::applyValueFloodColor(styleResolver, value); |
6286 | break; |
6287 | case CSSPropertyFloodOpacity: |
6288 | if (isInitial) |
6289 | StyleBuilderFunctions::applyInitialFloodOpacity(styleResolver); |
6290 | else if (isInherit) |
6291 | StyleBuilderFunctions::applyInheritFloodOpacity(styleResolver); |
6292 | else |
6293 | StyleBuilderFunctions::applyValueFloodOpacity(styleResolver, value); |
6294 | break; |
6295 | case CSSPropertyFont: |
6296 | ASSERT(isShorthandCSSProperty(property)); |
6297 | ASSERT_NOT_REACHED(); |
6298 | break; |
6299 | case CSSPropertyFontDisplay: |
6300 | break; |
6301 | case CSSPropertyFontVariant: |
6302 | ASSERT(isShorthandCSSProperty(property)); |
6303 | ASSERT_NOT_REACHED(); |
6304 | break; |
6305 | case CSSPropertyGap: |
6306 | ASSERT(isShorthandCSSProperty(property)); |
6307 | ASSERT_NOT_REACHED(); |
6308 | break; |
6309 | case CSSPropertyGlyphOrientationHorizontal: |
6310 | if (isInitial) |
6311 | StyleBuilderFunctions::applyInitialGlyphOrientationHorizontal(styleResolver); |
6312 | else if (isInherit) |
6313 | StyleBuilderFunctions::applyInheritGlyphOrientationHorizontal(styleResolver); |
6314 | else |
6315 | StyleBuilderFunctions::applyValueGlyphOrientationHorizontal(styleResolver, value); |
6316 | break; |
6317 | case CSSPropertyGlyphOrientationVertical: |
6318 | if (isInitial) |
6319 | StyleBuilderFunctions::applyInitialGlyphOrientationVertical(styleResolver); |
6320 | else if (isInherit) |
6321 | StyleBuilderFunctions::applyInheritGlyphOrientationVertical(styleResolver); |
6322 | else |
6323 | StyleBuilderFunctions::applyValueGlyphOrientationVertical(styleResolver, value); |
6324 | break; |
6325 | case CSSPropertyGrid: |
6326 | ASSERT(isShorthandCSSProperty(property)); |
6327 | ASSERT_NOT_REACHED(); |
6328 | break; |
6329 | case CSSPropertyGridArea: |
6330 | ASSERT(isShorthandCSSProperty(property)); |
6331 | ASSERT_NOT_REACHED(); |
6332 | break; |
6333 | case CSSPropertyGridAutoColumns: |
6334 | if (isInitial) |
6335 | StyleBuilderFunctions::applyInitialGridAutoColumns(styleResolver); |
6336 | else if (isInherit) |
6337 | StyleBuilderFunctions::applyInheritGridAutoColumns(styleResolver); |
6338 | else |
6339 | StyleBuilderFunctions::applyValueGridAutoColumns(styleResolver, value); |
6340 | break; |
6341 | case CSSPropertyGridAutoFlow: |
6342 | if (isInitial) |
6343 | StyleBuilderFunctions::applyInitialGridAutoFlow(styleResolver); |
6344 | else if (isInherit) |
6345 | StyleBuilderFunctions::applyInheritGridAutoFlow(styleResolver); |
6346 | else |
6347 | StyleBuilderFunctions::applyValueGridAutoFlow(styleResolver, value); |
6348 | break; |
6349 | case CSSPropertyGridAutoRows: |
6350 | if (isInitial) |
6351 | StyleBuilderFunctions::applyInitialGridAutoRows(styleResolver); |
6352 | else if (isInherit) |
6353 | StyleBuilderFunctions::applyInheritGridAutoRows(styleResolver); |
6354 | else |
6355 | StyleBuilderFunctions::applyValueGridAutoRows(styleResolver, value); |
6356 | break; |
6357 | case CSSPropertyGridColumn: |
6358 | ASSERT(isShorthandCSSProperty(property)); |
6359 | ASSERT_NOT_REACHED(); |
6360 | break; |
6361 | case CSSPropertyGridColumnEnd: |
6362 | if (isInitial) |
6363 | StyleBuilderFunctions::applyInitialGridColumnEnd(styleResolver); |
6364 | else if (isInherit) |
6365 | StyleBuilderFunctions::applyInheritGridColumnEnd(styleResolver); |
6366 | else |
6367 | StyleBuilderFunctions::applyValueGridColumnEnd(styleResolver, value); |
6368 | break; |
6369 | case CSSPropertyGridColumnStart: |
6370 | if (isInitial) |
6371 | StyleBuilderFunctions::applyInitialGridColumnStart(styleResolver); |
6372 | else if (isInherit) |
6373 | StyleBuilderFunctions::applyInheritGridColumnStart(styleResolver); |
6374 | else |
6375 | StyleBuilderFunctions::applyValueGridColumnStart(styleResolver, value); |
6376 | break; |
6377 | case CSSPropertyGridRow: |
6378 | ASSERT(isShorthandCSSProperty(property)); |
6379 | ASSERT_NOT_REACHED(); |
6380 | break; |
6381 | case CSSPropertyGridRowEnd: |
6382 | if (isInitial) |
6383 | StyleBuilderFunctions::applyInitialGridRowEnd(styleResolver); |
6384 | else if (isInherit) |
6385 | StyleBuilderFunctions::applyInheritGridRowEnd(styleResolver); |
6386 | else |
6387 | StyleBuilderFunctions::applyValueGridRowEnd(styleResolver, value); |
6388 | break; |
6389 | case CSSPropertyGridRowStart: |
6390 | if (isInitial) |
6391 | StyleBuilderFunctions::applyInitialGridRowStart(styleResolver); |
6392 | else if (isInherit) |
6393 | StyleBuilderFunctions::applyInheritGridRowStart(styleResolver); |
6394 | else |
6395 | StyleBuilderFunctions::applyValueGridRowStart(styleResolver, value); |
6396 | break; |
6397 | case CSSPropertyGridTemplate: |
6398 | ASSERT(isShorthandCSSProperty(property)); |
6399 | ASSERT_NOT_REACHED(); |
6400 | break; |
6401 | case CSSPropertyGridTemplateAreas: |
6402 | if (isInitial) |
6403 | StyleBuilderCustom::applyInitialGridTemplateAreas(styleResolver); |
6404 | else if (isInherit) |
6405 | StyleBuilderCustom::applyInheritGridTemplateAreas(styleResolver); |
6406 | else |
6407 | StyleBuilderCustom::applyValueGridTemplateAreas(styleResolver, value); |
6408 | break; |
6409 | case CSSPropertyGridTemplateColumns: |
6410 | if (isInitial) |
6411 | StyleBuilderCustom::applyInitialGridTemplateColumns(styleResolver); |
6412 | else if (isInherit) |
6413 | StyleBuilderCustom::applyInheritGridTemplateColumns(styleResolver); |
6414 | else |
6415 | StyleBuilderCustom::applyValueGridTemplateColumns(styleResolver, value); |
6416 | break; |
6417 | case CSSPropertyGridTemplateRows: |
6418 | if (isInitial) |
6419 | StyleBuilderCustom::applyInitialGridTemplateRows(styleResolver); |
6420 | else if (isInherit) |
6421 | StyleBuilderCustom::applyInheritGridTemplateRows(styleResolver); |
6422 | else |
6423 | StyleBuilderCustom::applyValueGridTemplateRows(styleResolver, value); |
6424 | break; |
6425 | case CSSPropertyHangingPunctuation: |
6426 | if (isInitial) |
6427 | StyleBuilderFunctions::applyInitialHangingPunctuation(styleResolver); |
6428 | else if (isInherit) |
6429 | StyleBuilderFunctions::applyInheritHangingPunctuation(styleResolver); |
6430 | else |
6431 | StyleBuilderFunctions::applyValueHangingPunctuation(styleResolver, value); |
6432 | break; |
6433 | case CSSPropertyHeight: |
6434 | if (isInitial) |
6435 | StyleBuilderFunctions::applyInitialHeight(styleResolver); |
6436 | else if (isInherit) |
6437 | StyleBuilderFunctions::applyInheritHeight(styleResolver); |
6438 | else |
6439 | StyleBuilderFunctions::applyValueHeight(styleResolver, value); |
6440 | break; |
6441 | case CSSPropertyImageRendering: |
6442 | if (isInitial) |
6443 | StyleBuilderFunctions::applyInitialImageRendering(styleResolver); |
6444 | else if (isInherit) |
6445 | StyleBuilderFunctions::applyInheritImageRendering(styleResolver); |
6446 | else |
6447 | StyleBuilderFunctions::applyValueImageRendering(styleResolver, value); |
6448 | break; |
6449 | case CSSPropertyInlineSize: |
6450 | break; |
6451 | case CSSPropertyInset: |
6452 | ASSERT(isShorthandCSSProperty(property)); |
6453 | ASSERT_NOT_REACHED(); |
6454 | break; |
6455 | case CSSPropertyInsetBlock: |
6456 | ASSERT(isShorthandCSSProperty(property)); |
6457 | ASSERT_NOT_REACHED(); |
6458 | break; |
6459 | case CSSPropertyInsetBlockEnd: |
6460 | break; |
6461 | case CSSPropertyInsetBlockStart: |
6462 | break; |
6463 | case CSSPropertyInsetInline: |
6464 | ASSERT(isShorthandCSSProperty(property)); |
6465 | ASSERT_NOT_REACHED(); |
6466 | break; |
6467 | case CSSPropertyInsetInlineEnd: |
6468 | break; |
6469 | case CSSPropertyInsetInlineStart: |
6470 | break; |
6471 | case CSSPropertyJustifyContent: |
6472 | if (isInitial) |
6473 | StyleBuilderFunctions::applyInitialJustifyContent(styleResolver); |
6474 | else if (isInherit) |
6475 | StyleBuilderFunctions::applyInheritJustifyContent(styleResolver); |
6476 | else |
6477 | StyleBuilderFunctions::applyValueJustifyContent(styleResolver, value); |
6478 | break; |
6479 | case CSSPropertyJustifyItems: |
6480 | if (isInitial) |
6481 | StyleBuilderFunctions::applyInitialJustifyItems(styleResolver); |
6482 | else if (isInherit) |
6483 | StyleBuilderFunctions::applyInheritJustifyItems(styleResolver); |
6484 | else |
6485 | StyleBuilderFunctions::applyValueJustifyItems(styleResolver, value); |
6486 | break; |
6487 | case CSSPropertyJustifySelf: |
6488 | if (isInitial) |
6489 | StyleBuilderFunctions::applyInitialJustifySelf(styleResolver); |
6490 | else if (isInherit) |
6491 | StyleBuilderFunctions::applyInheritJustifySelf(styleResolver); |
6492 | else |
6493 | StyleBuilderFunctions::applyValueJustifySelf(styleResolver, value); |
6494 | break; |
6495 | case CSSPropertyKerning: |
6496 | if (isInitial) |
6497 | StyleBuilderFunctions::applyInitialKerning(styleResolver); |
6498 | else if (isInherit) |
6499 | StyleBuilderFunctions::applyInheritKerning(styleResolver); |
6500 | else |
6501 | StyleBuilderFunctions::applyValueKerning(styleResolver, value); |
6502 | break; |
6503 | case CSSPropertyLeft: |
6504 | if (isInitial) |
6505 | StyleBuilderFunctions::applyInitialLeft(styleResolver); |
6506 | else if (isInherit) |
6507 | StyleBuilderFunctions::applyInheritLeft(styleResolver); |
6508 | else |
6509 | StyleBuilderFunctions::applyValueLeft(styleResolver, value); |
6510 | break; |
6511 | case CSSPropertyLetterSpacing: |
6512 | if (isInitial) |
6513 | StyleBuilderFunctions::applyInitialLetterSpacing(styleResolver); |
6514 | else if (isInherit) |
6515 | StyleBuilderFunctions::applyInheritLetterSpacing(styleResolver); |
6516 | else |
6517 | StyleBuilderFunctions::applyValueLetterSpacing(styleResolver, value); |
6518 | break; |
6519 | case CSSPropertyLightingColor: |
6520 | if (isInitial) |
6521 | StyleBuilderFunctions::applyInitialLightingColor(styleResolver); |
6522 | else if (isInherit) |
6523 | StyleBuilderFunctions::applyInheritLightingColor(styleResolver); |
6524 | else |
6525 | StyleBuilderFunctions::applyValueLightingColor(styleResolver, value); |
6526 | break; |
6527 | case CSSPropertyLineBreak: |
6528 | if (isInitial) |
6529 | StyleBuilderFunctions::applyInitialLineBreak(styleResolver); |
6530 | else if (isInherit) |
6531 | StyleBuilderFunctions::applyInheritLineBreak(styleResolver); |
6532 | else |
6533 | StyleBuilderFunctions::applyValueLineBreak(styleResolver, value); |
6534 | break; |
6535 | case CSSPropertyLineHeight: |
6536 | if (isInitial) |
6537 | StyleBuilderFunctions::applyInitialLineHeight(styleResolver); |
6538 | else if (isInherit) |
6539 | StyleBuilderFunctions::applyInheritLineHeight(styleResolver); |
6540 | else |
6541 | StyleBuilderFunctions::applyValueLineHeight(styleResolver, value); |
6542 | break; |
6543 | case CSSPropertyListStyle: |
6544 | ASSERT(isShorthandCSSProperty(property)); |
6545 | ASSERT_NOT_REACHED(); |
6546 | break; |
6547 | case CSSPropertyListStyleImage: |
6548 | if (isInitial) |
6549 | StyleBuilderFunctions::applyInitialListStyleImage(styleResolver); |
6550 | else if (isInherit) |
6551 | StyleBuilderFunctions::applyInheritListStyleImage(styleResolver); |
6552 | else |
6553 | StyleBuilderFunctions::applyValueListStyleImage(styleResolver, value); |
6554 | break; |
6555 | case CSSPropertyListStylePosition: |
6556 | if (isInitial) |
6557 | StyleBuilderFunctions::applyInitialListStylePosition(styleResolver); |
6558 | else if (isInherit) |
6559 | StyleBuilderFunctions::applyInheritListStylePosition(styleResolver); |
6560 | else |
6561 | StyleBuilderFunctions::applyValueListStylePosition(styleResolver, value); |
6562 | break; |
6563 | case CSSPropertyListStyleType: |
6564 | if (isInitial) |
6565 | StyleBuilderFunctions::applyInitialListStyleType(styleResolver); |
6566 | else if (isInherit) |
6567 | StyleBuilderFunctions::applyInheritListStyleType(styleResolver); |
6568 | else |
6569 | StyleBuilderFunctions::applyValueListStyleType(styleResolver, value); |
6570 | break; |
6571 | case CSSPropertyMargin: |
6572 | ASSERT(isShorthandCSSProperty(property)); |
6573 | ASSERT_NOT_REACHED(); |
6574 | break; |
6575 | case CSSPropertyMarginBlock: |
6576 | ASSERT(isShorthandCSSProperty(property)); |
6577 | ASSERT_NOT_REACHED(); |
6578 | break; |
6579 | case CSSPropertyMarginBlockEnd: |
6580 | break; |
6581 | case CSSPropertyMarginBlockStart: |
6582 | break; |
6583 | case CSSPropertyMarginBottom: |
6584 | if (isInitial) |
6585 | StyleBuilderFunctions::applyInitialMarginBottom(styleResolver); |
6586 | else if (isInherit) |
6587 | StyleBuilderFunctions::applyInheritMarginBottom(styleResolver); |
6588 | else |
6589 | StyleBuilderFunctions::applyValueMarginBottom(styleResolver, value); |
6590 | break; |
6591 | case CSSPropertyMarginInline: |
6592 | ASSERT(isShorthandCSSProperty(property)); |
6593 | ASSERT_NOT_REACHED(); |
6594 | break; |
6595 | case CSSPropertyMarginInlineEnd: |
6596 | break; |
6597 | case CSSPropertyMarginInlineStart: |
6598 | break; |
6599 | case CSSPropertyMarginLeft: |
6600 | if (isInitial) |
6601 | StyleBuilderFunctions::applyInitialMarginLeft(styleResolver); |
6602 | else if (isInherit) |
6603 | StyleBuilderFunctions::applyInheritMarginLeft(styleResolver); |
6604 | else |
6605 | StyleBuilderFunctions::applyValueMarginLeft(styleResolver, value); |
6606 | break; |
6607 | case CSSPropertyMarginRight: |
6608 | if (isInitial) |
6609 | StyleBuilderFunctions::applyInitialMarginRight(styleResolver); |
6610 | else if (isInherit) |
6611 | StyleBuilderFunctions::applyInheritMarginRight(styleResolver); |
6612 | else |
6613 | StyleBuilderFunctions::applyValueMarginRight(styleResolver, value); |
6614 | break; |
6615 | case CSSPropertyMarginTop: |
6616 | if (isInitial) |
6617 | StyleBuilderFunctions::applyInitialMarginTop(styleResolver); |
6618 | else if (isInherit) |
6619 | StyleBuilderFunctions::applyInheritMarginTop(styleResolver); |
6620 | else |
6621 | StyleBuilderFunctions::applyValueMarginTop(styleResolver, value); |
6622 | break; |
6623 | case CSSPropertyMarker: |
6624 | ASSERT(isShorthandCSSProperty(property)); |
6625 | ASSERT_NOT_REACHED(); |
6626 | break; |
6627 | case CSSPropertyMarkerEnd: |
6628 | if (isInitial) |
6629 | StyleBuilderFunctions::applyInitialMarkerEnd(styleResolver); |
6630 | else if (isInherit) |
6631 | StyleBuilderFunctions::applyInheritMarkerEnd(styleResolver); |
6632 | else |
6633 | StyleBuilderFunctions::applyValueMarkerEnd(styleResolver, value); |
6634 | break; |
6635 | case CSSPropertyMarkerMid: |
6636 | if (isInitial) |
6637 | StyleBuilderFunctions::applyInitialMarkerMid(styleResolver); |
6638 | else if (isInherit) |
6639 | StyleBuilderFunctions::applyInheritMarkerMid(styleResolver); |
6640 | else |
6641 | StyleBuilderFunctions::applyValueMarkerMid(styleResolver, value); |
6642 | break; |
6643 | case CSSPropertyMarkerStart: |
6644 | if (isInitial) |
6645 | StyleBuilderFunctions::applyInitialMarkerStart(styleResolver); |
6646 | else if (isInherit) |
6647 | StyleBuilderFunctions::applyInheritMarkerStart(styleResolver); |
6648 | else |
6649 | StyleBuilderFunctions::applyValueMarkerStart(styleResolver, value); |
6650 | break; |
6651 | case CSSPropertyMask: |
6652 | if (isInitial) |
6653 | StyleBuilderFunctions::applyInitialMask(styleResolver); |
6654 | else if (isInherit) |
6655 | StyleBuilderFunctions::applyInheritMask(styleResolver); |
6656 | else |
6657 | StyleBuilderFunctions::applyValueMask(styleResolver, value); |
6658 | break; |
6659 | case CSSPropertyMaskType: |
6660 | if (isInitial) |
6661 | StyleBuilderFunctions::applyInitialMaskType(styleResolver); |
6662 | else if (isInherit) |
6663 | StyleBuilderFunctions::applyInheritMaskType(styleResolver); |
6664 | else |
6665 | StyleBuilderFunctions::applyValueMaskType(styleResolver, value); |
6666 | break; |
6667 | case CSSPropertyMaxBlockSize: |
6668 | break; |
6669 | case CSSPropertyMaxHeight: |
6670 | if (isInitial) |
6671 | StyleBuilderFunctions::applyInitialMaxHeight(styleResolver); |
6672 | else if (isInherit) |
6673 | StyleBuilderFunctions::applyInheritMaxHeight(styleResolver); |
6674 | else |
6675 | StyleBuilderFunctions::applyValueMaxHeight(styleResolver, value); |
6676 | break; |
6677 | case CSSPropertyMaxInlineSize: |
6678 | break; |
6679 | case CSSPropertyMaxWidth: |
6680 | if (isInitial) |
6681 | StyleBuilderFunctions::applyInitialMaxWidth(styleResolver); |
6682 | else if (isInherit) |
6683 | StyleBuilderFunctions::applyInheritMaxWidth(styleResolver); |
6684 | else |
6685 | StyleBuilderFunctions::applyValueMaxWidth(styleResolver, value); |
6686 | break; |
6687 | case CSSPropertyMinBlockSize: |
6688 | break; |
6689 | case CSSPropertyMinHeight: |
6690 | if (isInitial) |
6691 | StyleBuilderFunctions::applyInitialMinHeight(styleResolver); |
6692 | else if (isInherit) |
6693 | StyleBuilderFunctions::applyInheritMinHeight(styleResolver); |
6694 | else |
6695 | StyleBuilderFunctions::applyValueMinHeight(styleResolver, value); |
6696 | break; |
6697 | case CSSPropertyMinInlineSize: |
6698 | break; |
6699 | case CSSPropertyMinWidth: |
6700 | if (isInitial) |
6701 | StyleBuilderFunctions::applyInitialMinWidth(styleResolver); |
6702 | else if (isInherit) |
6703 | StyleBuilderFunctions::applyInheritMinWidth(styleResolver); |
6704 | else |
6705 | StyleBuilderFunctions::applyValueMinWidth(styleResolver, value); |
6706 | break; |
6707 | case CSSPropertyObjectFit: |
6708 | if (isInitial) |
6709 | StyleBuilderFunctions::applyInitialObjectFit(styleResolver); |
6710 | else if (isInherit) |
6711 | StyleBuilderFunctions::applyInheritObjectFit(styleResolver); |
6712 | else |
6713 | StyleBuilderFunctions::applyValueObjectFit(styleResolver, value); |
6714 | break; |
6715 | case CSSPropertyObjectPosition: |
6716 | if (isInitial) |
6717 | StyleBuilderFunctions::applyInitialObjectPosition(styleResolver); |
6718 | else if (isInherit) |
6719 | StyleBuilderFunctions::applyInheritObjectPosition(styleResolver); |
6720 | else |
6721 | StyleBuilderFunctions::applyValueObjectPosition(styleResolver, value); |
6722 | break; |
6723 | case CSSPropertyOpacity: |
6724 | if (isInitial) |
6725 | StyleBuilderFunctions::applyInitialOpacity(styleResolver); |
6726 | else if (isInherit) |
6727 | StyleBuilderFunctions::applyInheritOpacity(styleResolver); |
6728 | else |
6729 | StyleBuilderFunctions::applyValueOpacity(styleResolver, value); |
6730 | break; |
6731 | case CSSPropertyOrder: |
6732 | if (isInitial) |
6733 | StyleBuilderFunctions::applyInitialOrder(styleResolver); |
6734 | else if (isInherit) |
6735 | StyleBuilderFunctions::applyInheritOrder(styleResolver); |
6736 | else |
6737 | StyleBuilderFunctions::applyValueOrder(styleResolver, value); |
6738 | break; |
6739 | case CSSPropertyOrphans: |
6740 | if (isInitial) |
6741 | StyleBuilderFunctions::applyInitialOrphans(styleResolver); |
6742 | else if (isInherit) |
6743 | StyleBuilderFunctions::applyInheritOrphans(styleResolver); |
6744 | else |
6745 | StyleBuilderFunctions::applyValueOrphans(styleResolver, value); |
6746 | break; |
6747 | case CSSPropertyOutline: |
6748 | ASSERT(isShorthandCSSProperty(property)); |
6749 | ASSERT_NOT_REACHED(); |
6750 | break; |
6751 | case CSSPropertyOutlineColor: |
6752 | if (isInitial) |
6753 | StyleBuilderFunctions::applyInitialOutlineColor(styleResolver); |
6754 | else if (isInherit) |
6755 | StyleBuilderFunctions::applyInheritOutlineColor(styleResolver); |
6756 | else |
6757 | StyleBuilderFunctions::applyValueOutlineColor(styleResolver, value); |
6758 | break; |
6759 | case CSSPropertyOutlineOffset: |
6760 | if (isInitial) |
6761 | StyleBuilderFunctions::applyInitialOutlineOffset(styleResolver); |
6762 | else if (isInherit) |
6763 | StyleBuilderFunctions::applyInheritOutlineOffset(styleResolver); |
6764 | else |
6765 | StyleBuilderFunctions::applyValueOutlineOffset(styleResolver, value); |
6766 | break; |
6767 | case CSSPropertyOutlineStyle: |
6768 | if (isInitial) |
6769 | StyleBuilderCustom::applyInitialOutlineStyle(styleResolver); |
6770 | else if (isInherit) |
6771 | StyleBuilderCustom::applyInheritOutlineStyle(styleResolver); |
6772 | else |
6773 | StyleBuilderCustom::applyValueOutlineStyle(styleResolver, value); |
6774 | break; |
6775 | case CSSPropertyOutlineWidth: |
6776 | if (isInitial) |
6777 | StyleBuilderFunctions::applyInitialOutlineWidth(styleResolver); |
6778 | else if (isInherit) |
6779 | StyleBuilderFunctions::applyInheritOutlineWidth(styleResolver); |
6780 | else |
6781 | StyleBuilderFunctions::applyValueOutlineWidth(styleResolver, value); |
6782 | break; |
6783 | case CSSPropertyOverflow: |
6784 | ASSERT(isShorthandCSSProperty(property)); |
6785 | ASSERT_NOT_REACHED(); |
6786 | break; |
6787 | case CSSPropertyOverflowWrap: |
6788 | if (isInitial) |
6789 | StyleBuilderFunctions::applyInitialOverflowWrap(styleResolver); |
6790 | else if (isInherit) |
6791 | StyleBuilderFunctions::applyInheritOverflowWrap(styleResolver); |
6792 | else |
6793 | StyleBuilderFunctions::applyValueOverflowWrap(styleResolver, value); |
6794 | break; |
6795 | case CSSPropertyOverflowX: |
6796 | if (isInitial) |
6797 | StyleBuilderFunctions::applyInitialOverflowX(styleResolver); |
6798 | else if (isInherit) |
6799 | StyleBuilderFunctions::applyInheritOverflowX(styleResolver); |
6800 | else |
6801 | StyleBuilderFunctions::applyValueOverflowX(styleResolver, value); |
6802 | break; |
6803 | case CSSPropertyOverflowY: |
6804 | if (isInitial) |
6805 | StyleBuilderFunctions::applyInitialOverflowY(styleResolver); |
6806 | else if (isInherit) |
6807 | StyleBuilderFunctions::applyInheritOverflowY(styleResolver); |
6808 | else |
6809 | StyleBuilderFunctions::applyValueOverflowY(styleResolver, value); |
6810 | break; |
6811 | case CSSPropertyPadding: |
6812 | ASSERT(isShorthandCSSProperty(property)); |
6813 | ASSERT_NOT_REACHED(); |
6814 | break; |
6815 | case CSSPropertyPaddingBlock: |
6816 | ASSERT(isShorthandCSSProperty(property)); |
6817 | ASSERT_NOT_REACHED(); |
6818 | break; |
6819 | case CSSPropertyPaddingBlockEnd: |
6820 | break; |
6821 | case CSSPropertyPaddingBlockStart: |
6822 | break; |
6823 | case CSSPropertyPaddingBottom: |
6824 | if (isInitial) |
6825 | StyleBuilderFunctions::applyInitialPaddingBottom(styleResolver); |
6826 | else if (isInherit) |
6827 | StyleBuilderFunctions::applyInheritPaddingBottom(styleResolver); |
6828 | else |
6829 | StyleBuilderFunctions::applyValuePaddingBottom(styleResolver, value); |
6830 | break; |
6831 | case CSSPropertyPaddingInline: |
6832 | ASSERT(isShorthandCSSProperty(property)); |
6833 | ASSERT_NOT_REACHED(); |
6834 | break; |
6835 | case CSSPropertyPaddingInlineEnd: |
6836 | break; |
6837 | case CSSPropertyPaddingInlineStart: |
6838 | break; |
6839 | case CSSPropertyPaddingLeft: |
6840 | if (isInitial) |
6841 | StyleBuilderFunctions::applyInitialPaddingLeft(styleResolver); |
6842 | else if (isInherit) |
6843 | StyleBuilderFunctions::applyInheritPaddingLeft(styleResolver); |
6844 | else |
6845 | StyleBuilderFunctions::applyValuePaddingLeft(styleResolver, value); |
6846 | break; |
6847 | case CSSPropertyPaddingRight: |
6848 | if (isInitial) |
6849 | StyleBuilderFunctions::applyInitialPaddingRight(styleResolver); |
6850 | else if (isInherit) |
6851 | StyleBuilderFunctions::applyInheritPaddingRight(styleResolver); |
6852 | else |
6853 | StyleBuilderFunctions::applyValuePaddingRight(styleResolver, value); |
6854 | break; |
6855 | case CSSPropertyPaddingTop: |
6856 | if (isInitial) |
6857 | StyleBuilderFunctions::applyInitialPaddingTop(styleResolver); |
6858 | else if (isInherit) |
6859 | StyleBuilderFunctions::applyInheritPaddingTop(styleResolver); |
6860 | else |
6861 | StyleBuilderFunctions::applyValuePaddingTop(styleResolver, value); |
6862 | break; |
6863 | case CSSPropertyPage: |
6864 | break; |
6865 | case CSSPropertyPageBreakAfter: |
6866 | ASSERT(isShorthandCSSProperty(property)); |
6867 | ASSERT_NOT_REACHED(); |
6868 | break; |
6869 | case CSSPropertyPageBreakBefore: |
6870 | ASSERT(isShorthandCSSProperty(property)); |
6871 | ASSERT_NOT_REACHED(); |
6872 | break; |
6873 | case CSSPropertyPageBreakInside: |
6874 | ASSERT(isShorthandCSSProperty(property)); |
6875 | ASSERT_NOT_REACHED(); |
6876 | break; |
6877 | case CSSPropertyPaintOrder: |
6878 | if (isInitial) |
6879 | StyleBuilderFunctions::applyInitialPaintOrder(styleResolver); |
6880 | else if (isInherit) |
6881 | StyleBuilderFunctions::applyInheritPaintOrder(styleResolver); |
6882 | else |
6883 | StyleBuilderFunctions::applyValuePaintOrder(styleResolver, value); |
6884 | break; |
6885 | case CSSPropertyPerspective: |
6886 | if (isInitial) |
6887 | StyleBuilderFunctions::applyInitialPerspective(styleResolver); |
6888 | else if (isInherit) |
6889 | StyleBuilderFunctions::applyInheritPerspective(styleResolver); |
6890 | else |
6891 | StyleBuilderFunctions::applyValuePerspective(styleResolver, value); |
6892 | break; |
6893 | case CSSPropertyPerspectiveOrigin: |
6894 | ASSERT(isShorthandCSSProperty(property)); |
6895 | ASSERT_NOT_REACHED(); |
6896 | break; |
6897 | case CSSPropertyPerspectiveOriginX: |
6898 | if (isInitial) |
6899 | StyleBuilderFunctions::applyInitialPerspectiveOriginX(styleResolver); |
6900 | else if (isInherit) |
6901 | StyleBuilderFunctions::applyInheritPerspectiveOriginX(styleResolver); |
6902 | else |
6903 | StyleBuilderFunctions::applyValuePerspectiveOriginX(styleResolver, value); |
6904 | break; |
6905 | case CSSPropertyPerspectiveOriginY: |
6906 | if (isInitial) |
6907 | StyleBuilderFunctions::applyInitialPerspectiveOriginY(styleResolver); |
6908 | else if (isInherit) |
6909 | StyleBuilderFunctions::applyInheritPerspectiveOriginY(styleResolver); |
6910 | else |
6911 | StyleBuilderFunctions::applyValuePerspectiveOriginY(styleResolver, value); |
6912 | break; |
6913 | case CSSPropertyPlaceContent: |
6914 | ASSERT(isShorthandCSSProperty(property)); |
6915 | ASSERT_NOT_REACHED(); |
6916 | break; |
6917 | case CSSPropertyPlaceItems: |
6918 | ASSERT(isShorthandCSSProperty(property)); |
6919 | ASSERT_NOT_REACHED(); |
6920 | break; |
6921 | case CSSPropertyPlaceSelf: |
6922 | ASSERT(isShorthandCSSProperty(property)); |
6923 | ASSERT_NOT_REACHED(); |
6924 | break; |
6925 | case CSSPropertyPointerEvents: |
6926 | if (isInitial) |
6927 | StyleBuilderFunctions::applyInitialPointerEvents(styleResolver); |
6928 | else if (isInherit) |
6929 | StyleBuilderFunctions::applyInheritPointerEvents(styleResolver); |
6930 | else |
6931 | StyleBuilderFunctions::applyValuePointerEvents(styleResolver, value); |
6932 | break; |
6933 | case CSSPropertyPosition: |
6934 | if (isInitial) |
6935 | StyleBuilderFunctions::applyInitialPosition(styleResolver); |
6936 | else if (isInherit) |
6937 | StyleBuilderFunctions::applyInheritPosition(styleResolver); |
6938 | else |
6939 | StyleBuilderFunctions::applyValuePosition(styleResolver, value); |
6940 | break; |
6941 | case CSSPropertyQuotes: |
6942 | if (isInitial) |
6943 | StyleBuilderFunctions::applyInitialQuotes(styleResolver); |
6944 | else if (isInherit) |
6945 | StyleBuilderFunctions::applyInheritQuotes(styleResolver); |
6946 | else |
6947 | StyleBuilderFunctions::applyValueQuotes(styleResolver, value); |
6948 | break; |
6949 | case CSSPropertyR: |
6950 | if (isInitial) |
6951 | StyleBuilderFunctions::applyInitialR(styleResolver); |
6952 | else if (isInherit) |
6953 | StyleBuilderFunctions::applyInheritR(styleResolver); |
6954 | else |
6955 | StyleBuilderFunctions::applyValueR(styleResolver, value); |
6956 | break; |
6957 | case CSSPropertyResize: |
6958 | if (isInitial) |
6959 | StyleBuilderFunctions::applyInitialResize(styleResolver); |
6960 | else if (isInherit) |
6961 | StyleBuilderFunctions::applyInheritResize(styleResolver); |
6962 | else |
6963 | StyleBuilderFunctions::applyValueResize(styleResolver, value); |
6964 | break; |
6965 | case CSSPropertyRight: |
6966 | if (isInitial) |
6967 | StyleBuilderFunctions::applyInitialRight(styleResolver); |
6968 | else if (isInherit) |
6969 | StyleBuilderFunctions::applyInheritRight(styleResolver); |
6970 | else |
6971 | StyleBuilderFunctions::applyValueRight(styleResolver, value); |
6972 | break; |
6973 | case CSSPropertyRowGap: |
6974 | if (isInitial) |
6975 | StyleBuilderFunctions::applyInitialRowGap(styleResolver); |
6976 | else if (isInherit) |
6977 | StyleBuilderFunctions::applyInheritRowGap(styleResolver); |
6978 | else |
6979 | StyleBuilderFunctions::applyValueRowGap(styleResolver, value); |
6980 | break; |
6981 | case CSSPropertyRx: |
6982 | if (isInitial) |
6983 | StyleBuilderFunctions::applyInitialRx(styleResolver); |
6984 | else if (isInherit) |
6985 | StyleBuilderFunctions::applyInheritRx(styleResolver); |
6986 | else |
6987 | StyleBuilderFunctions::applyValueRx(styleResolver, value); |
6988 | break; |
6989 | case CSSPropertyRy: |
6990 | if (isInitial) |
6991 | StyleBuilderFunctions::applyInitialRy(styleResolver); |
6992 | else if (isInherit) |
6993 | StyleBuilderFunctions::applyInheritRy(styleResolver); |
6994 | else |
6995 | StyleBuilderFunctions::applyValueRy(styleResolver, value); |
6996 | break; |
6997 | case CSSPropertyShapeImageThreshold: |
6998 | if (isInitial) |
6999 | StyleBuilderFunctions::applyInitialShapeImageThreshold(styleResolver); |
7000 | else if (isInherit) |
7001 | StyleBuilderFunctions::applyInheritShapeImageThreshold(styleResolver); |
7002 | else |
7003 | StyleBuilderFunctions::applyValueShapeImageThreshold(styleResolver, value); |
7004 | break; |
7005 | case CSSPropertyShapeMargin: |
7006 | if (isInitial) |
7007 | StyleBuilderFunctions::applyInitialShapeMargin(styleResolver); |
7008 | else if (isInherit) |
7009 | StyleBuilderFunctions::applyInheritShapeMargin(styleResolver); |
7010 | else |
7011 | StyleBuilderFunctions::applyValueShapeMargin(styleResolver, value); |
7012 | break; |
7013 | case CSSPropertyShapeOutside: |
7014 | if (isInitial) |
7015 | StyleBuilderFunctions::applyInitialShapeOutside(styleResolver); |
7016 | else if (isInherit) |
7017 | StyleBuilderFunctions::applyInheritShapeOutside(styleResolver); |
7018 | else |
7019 | StyleBuilderFunctions::applyValueShapeOutside(styleResolver, value); |
7020 | break; |
7021 | case CSSPropertyShapeRendering: |
7022 | if (isInitial) |
7023 | StyleBuilderFunctions::applyInitialShapeRendering(styleResolver); |
7024 | else if (isInherit) |
7025 | StyleBuilderFunctions::applyInheritShapeRendering(styleResolver); |
7026 | else |
7027 | StyleBuilderFunctions::applyValueShapeRendering(styleResolver, value); |
7028 | break; |
7029 | case CSSPropertySize: |
7030 | if (isInitial) |
7031 | StyleBuilderCustom::applyInitialSize(styleResolver); |
7032 | else if (isInherit) |
7033 | StyleBuilderCustom::applyInheritSize(styleResolver); |
7034 | else |
7035 | StyleBuilderCustom::applyValueSize(styleResolver, value); |
7036 | break; |
7037 | case CSSPropertySpeakAs: |
7038 | if (isInitial) |
7039 | StyleBuilderFunctions::applyInitialSpeakAs(styleResolver); |
7040 | else if (isInherit) |
7041 | StyleBuilderFunctions::applyInheritSpeakAs(styleResolver); |
7042 | else |
7043 | StyleBuilderFunctions::applyValueSpeakAs(styleResolver, value); |
7044 | break; |
7045 | case CSSPropertySrc: |
7046 | break; |
7047 | case CSSPropertyStopColor: |
7048 | if (isInitial) |
7049 | StyleBuilderFunctions::applyInitialStopColor(styleResolver); |
7050 | else if (isInherit) |
7051 | StyleBuilderFunctions::applyInheritStopColor(styleResolver); |
7052 | else |
7053 | StyleBuilderFunctions::applyValueStopColor(styleResolver, value); |
7054 | break; |
7055 | case CSSPropertyStopOpacity: |
7056 | if (isInitial) |
7057 | StyleBuilderFunctions::applyInitialStopOpacity(styleResolver); |
7058 | else if (isInherit) |
7059 | StyleBuilderFunctions::applyInheritStopOpacity(styleResolver); |
7060 | else |
7061 | StyleBuilderFunctions::applyValueStopOpacity(styleResolver, value); |
7062 | break; |
7063 | case CSSPropertyStroke: |
7064 | if (isInitial) |
7065 | StyleBuilderCustom::applyInitialStroke(styleResolver); |
7066 | else if (isInherit) |
7067 | StyleBuilderCustom::applyInheritStroke(styleResolver); |
7068 | else |
7069 | StyleBuilderCustom::applyValueStroke(styleResolver, value); |
7070 | break; |
7071 | case CSSPropertyStrokeColor: |
7072 | if (isInitial) |
7073 | StyleBuilderFunctions::applyInitialStrokeColor(styleResolver); |
7074 | else if (isInherit) |
7075 | StyleBuilderFunctions::applyInheritStrokeColor(styleResolver); |
7076 | else |
7077 | StyleBuilderCustom::applyValueStrokeColor(styleResolver, value); |
7078 | break; |
7079 | case CSSPropertyStrokeDasharray: |
7080 | if (isInitial) |
7081 | StyleBuilderFunctions::applyInitialStrokeDasharray(styleResolver); |
7082 | else if (isInherit) |
7083 | StyleBuilderFunctions::applyInheritStrokeDasharray(styleResolver); |
7084 | else |
7085 | StyleBuilderFunctions::applyValueStrokeDasharray(styleResolver, value); |
7086 | break; |
7087 | case CSSPropertyStrokeDashoffset: |
7088 | if (isInitial) |
7089 | StyleBuilderFunctions::applyInitialStrokeDashoffset(styleResolver); |
7090 | else if (isInherit) |
7091 | StyleBuilderFunctions::applyInheritStrokeDashoffset(styleResolver); |
7092 | else |
7093 | StyleBuilderFunctions::applyValueStrokeDashoffset(styleResolver, value); |
7094 | break; |
7095 | case CSSPropertyStrokeLinecap: |
7096 | if (isInitial) |
7097 | StyleBuilderFunctions::applyInitialStrokeLinecap(styleResolver); |
7098 | else if (isInherit) |
7099 | StyleBuilderFunctions::applyInheritStrokeLinecap(styleResolver); |
7100 | else |
7101 | StyleBuilderFunctions::applyValueStrokeLinecap(styleResolver, value); |
7102 | break; |
7103 | case CSSPropertyStrokeLinejoin: |
7104 | if (isInitial) |
7105 | StyleBuilderFunctions::applyInitialStrokeLinejoin(styleResolver); |
7106 | else if (isInherit) |
7107 | StyleBuilderFunctions::applyInheritStrokeLinejoin(styleResolver); |
7108 | else |
7109 | StyleBuilderFunctions::applyValueStrokeLinejoin(styleResolver, value); |
7110 | break; |
7111 | case CSSPropertyStrokeMiterlimit: |
7112 | if (isInitial) |
7113 | StyleBuilderFunctions::applyInitialStrokeMiterlimit(styleResolver); |
7114 | else if (isInherit) |
7115 | StyleBuilderFunctions::applyInheritStrokeMiterlimit(styleResolver); |
7116 | else |
7117 | StyleBuilderFunctions::applyValueStrokeMiterlimit(styleResolver, value); |
7118 | break; |
7119 | case CSSPropertyStrokeOpacity: |
7120 | if (isInitial) |
7121 | StyleBuilderFunctions::applyInitialStrokeOpacity(styleResolver); |
7122 | else if (isInherit) |
7123 | StyleBuilderFunctions::applyInheritStrokeOpacity(styleResolver); |
7124 | else |
7125 | StyleBuilderFunctions::applyValueStrokeOpacity(styleResolver, value); |
7126 | break; |
7127 | case CSSPropertyStrokeWidth: |
7128 | if (isInitial) |
7129 | StyleBuilderFunctions::applyInitialStrokeWidth(styleResolver); |
7130 | else if (isInherit) |
7131 | StyleBuilderFunctions::applyInheritStrokeWidth(styleResolver); |
7132 | else |
7133 | StyleBuilderCustom::applyValueStrokeWidth(styleResolver, value); |
7134 | break; |
7135 | case CSSPropertyTabSize: |
7136 | if (isInitial) |
7137 | StyleBuilderFunctions::applyInitialTabSize(styleResolver); |
7138 | else if (isInherit) |
7139 | StyleBuilderFunctions::applyInheritTabSize(styleResolver); |
7140 | else |
7141 | StyleBuilderFunctions::applyValueTabSize(styleResolver, value); |
7142 | break; |
7143 | case CSSPropertyTableLayout: |
7144 | if (isInitial) |
7145 | StyleBuilderFunctions::applyInitialTableLayout(styleResolver); |
7146 | else if (isInherit) |
7147 | StyleBuilderFunctions::applyInheritTableLayout(styleResolver); |
7148 | else |
7149 | StyleBuilderFunctions::applyValueTableLayout(styleResolver, value); |
7150 | break; |
7151 | case CSSPropertyTextAlign: |
7152 | if (isInitial) |
7153 | StyleBuilderCustom::applyInitialTextAlign(styleResolver); |
7154 | else if (isInherit) |
7155 | StyleBuilderFunctions::applyInheritTextAlign(styleResolver); |
7156 | else |
7157 | StyleBuilderCustom::applyValueTextAlign(styleResolver, value); |
7158 | break; |
7159 | case CSSPropertyTextAnchor: |
7160 | if (isInitial) |
7161 | StyleBuilderFunctions::applyInitialTextAnchor(styleResolver); |
7162 | else if (isInherit) |
7163 | StyleBuilderFunctions::applyInheritTextAnchor(styleResolver); |
7164 | else |
7165 | StyleBuilderFunctions::applyValueTextAnchor(styleResolver, value); |
7166 | break; |
7167 | case CSSPropertyTextDecoration: |
7168 | if (isInitial) |
7169 | StyleBuilderFunctions::applyInitialTextDecoration(styleResolver); |
7170 | else if (isInherit) |
7171 | StyleBuilderFunctions::applyInheritTextDecoration(styleResolver); |
7172 | else |
7173 | StyleBuilderFunctions::applyValueTextDecoration(styleResolver, value); |
7174 | break; |
7175 | case CSSPropertyTextDecorationColor: |
7176 | if (isInitial) |
7177 | StyleBuilderFunctions::applyInitialTextDecorationColor(styleResolver); |
7178 | else if (isInherit) |
7179 | StyleBuilderFunctions::applyInheritTextDecorationColor(styleResolver); |
7180 | else |
7181 | StyleBuilderFunctions::applyValueTextDecorationColor(styleResolver, value); |
7182 | break; |
7183 | case CSSPropertyTextDecorationLine: |
7184 | if (isInitial) |
7185 | StyleBuilderFunctions::applyInitialTextDecorationLine(styleResolver); |
7186 | else if (isInherit) |
7187 | StyleBuilderFunctions::applyInheritTextDecorationLine(styleResolver); |
7188 | else |
7189 | StyleBuilderFunctions::applyValueTextDecorationLine(styleResolver, value); |
7190 | break; |
7191 | case CSSPropertyTextDecorationSkip: |
7192 | if (isInitial) |
7193 | StyleBuilderFunctions::applyInitialTextDecorationSkip(styleResolver); |
7194 | else if (isInherit) |
7195 | StyleBuilderFunctions::applyInheritTextDecorationSkip(styleResolver); |
7196 | else |
7197 | StyleBuilderFunctions::applyValueTextDecorationSkip(styleResolver, value); |
7198 | break; |
7199 | case CSSPropertyTextDecorationStyle: |
7200 | if (isInitial) |
7201 | StyleBuilderFunctions::applyInitialTextDecorationStyle(styleResolver); |
7202 | else if (isInherit) |
7203 | StyleBuilderFunctions::applyInheritTextDecorationStyle(styleResolver); |
7204 | else |
7205 | StyleBuilderFunctions::applyValueTextDecorationStyle(styleResolver, value); |
7206 | break; |
7207 | case CSSPropertyTextDecorationThickness: |
7208 | if (isInitial) |
7209 | StyleBuilderFunctions::applyInitialTextDecorationThickness(styleResolver); |
7210 | else if (isInherit) |
7211 | StyleBuilderFunctions::applyInheritTextDecorationThickness(styleResolver); |
7212 | else |
7213 | StyleBuilderFunctions::applyValueTextDecorationThickness(styleResolver, value); |
7214 | break; |
7215 | case CSSPropertyTextIndent: |
7216 | if (isInitial) |
7217 | StyleBuilderCustom::applyInitialTextIndent(styleResolver); |
7218 | else if (isInherit) |
7219 | StyleBuilderCustom::applyInheritTextIndent(styleResolver); |
7220 | else |
7221 | StyleBuilderCustom::applyValueTextIndent(styleResolver, value); |
7222 | break; |
7223 | case CSSPropertyTextOverflow: |
7224 | if (isInitial) |
7225 | StyleBuilderFunctions::applyInitialTextOverflow(styleResolver); |
7226 | else if (isInherit) |
7227 | StyleBuilderFunctions::applyInheritTextOverflow(styleResolver); |
7228 | else |
7229 | StyleBuilderFunctions::applyValueTextOverflow(styleResolver, value); |
7230 | break; |
7231 | case CSSPropertyTextShadow: |
7232 | if (isInitial) |
7233 | StyleBuilderCustom::applyInitialTextShadow(styleResolver); |
7234 | else if (isInherit) |
7235 | StyleBuilderCustom::applyInheritTextShadow(styleResolver); |
7236 | else |
7237 | StyleBuilderCustom::applyValueTextShadow(styleResolver, value); |
7238 | break; |
7239 | case CSSPropertyTextTransform: |
7240 | if (isInitial) |
7241 | StyleBuilderFunctions::applyInitialTextTransform(styleResolver); |
7242 | else if (isInherit) |
7243 | StyleBuilderFunctions::applyInheritTextTransform(styleResolver); |
7244 | else |
7245 | StyleBuilderFunctions::applyValueTextTransform(styleResolver, value); |
7246 | break; |
7247 | case CSSPropertyTextUnderlineOffset: |
7248 | if (isInitial) |
7249 | StyleBuilderFunctions::applyInitialTextUnderlineOffset(styleResolver); |
7250 | else if (isInherit) |
7251 | StyleBuilderFunctions::applyInheritTextUnderlineOffset(styleResolver); |
7252 | else |
7253 | StyleBuilderFunctions::applyValueTextUnderlineOffset(styleResolver, value); |
7254 | break; |
7255 | case CSSPropertyTextUnderlinePosition: |
7256 | if (isInitial) |
7257 | StyleBuilderFunctions::applyInitialTextUnderlinePosition(styleResolver); |
7258 | else if (isInherit) |
7259 | StyleBuilderFunctions::applyInheritTextUnderlinePosition(styleResolver); |
7260 | else |
7261 | StyleBuilderFunctions::applyValueTextUnderlinePosition(styleResolver, value); |
7262 | break; |
7263 | case CSSPropertyTop: |
7264 | if (isInitial) |
7265 | StyleBuilderFunctions::applyInitialTop(styleResolver); |
7266 | else if (isInherit) |
7267 | StyleBuilderFunctions::applyInheritTop(styleResolver); |
7268 | else |
7269 | StyleBuilderFunctions::applyValueTop(styleResolver, value); |
7270 | break; |
7271 | case CSSPropertyTransform: |
7272 | if (isInitial) |
7273 | StyleBuilderFunctions::applyInitialTransform(styleResolver); |
7274 | else if (isInherit) |
7275 | StyleBuilderFunctions::applyInheritTransform(styleResolver); |
7276 | else |
7277 | StyleBuilderFunctions::applyValueTransform(styleResolver, value); |
7278 | break; |
7279 | case CSSPropertyTransformBox: |
7280 | if (isInitial) |
7281 | StyleBuilderFunctions::applyInitialTransformBox(styleResolver); |
7282 | else if (isInherit) |
7283 | StyleBuilderFunctions::applyInheritTransformBox(styleResolver); |
7284 | else |
7285 | StyleBuilderFunctions::applyValueTransformBox(styleResolver, value); |
7286 | break; |
7287 | case CSSPropertyTransformOrigin: |
7288 | ASSERT(isShorthandCSSProperty(property)); |
7289 | ASSERT_NOT_REACHED(); |
7290 | break; |
7291 | case CSSPropertyTransformOriginX: |
7292 | if (isInitial) |
7293 | StyleBuilderFunctions::applyInitialTransformOriginX(styleResolver); |
7294 | else if (isInherit) |
7295 | StyleBuilderFunctions::applyInheritTransformOriginX(styleResolver); |
7296 | else |
7297 | StyleBuilderFunctions::applyValueTransformOriginX(styleResolver, value); |
7298 | break; |
7299 | case CSSPropertyTransformOriginY: |
7300 | if (isInitial) |
7301 | StyleBuilderFunctions::applyInitialTransformOriginY(styleResolver); |
7302 | else if (isInherit) |
7303 | StyleBuilderFunctions::applyInheritTransformOriginY(styleResolver); |
7304 | else |
7305 | StyleBuilderFunctions::applyValueTransformOriginY(styleResolver, value); |
7306 | break; |
7307 | case CSSPropertyTransformOriginZ: |
7308 | if (isInitial) |
7309 | StyleBuilderFunctions::applyInitialTransformOriginZ(styleResolver); |
7310 | else if (isInherit) |
7311 | StyleBuilderFunctions::applyInheritTransformOriginZ(styleResolver); |
7312 | else |
7313 | StyleBuilderFunctions::applyValueTransformOriginZ(styleResolver, value); |
7314 | break; |
7315 | case CSSPropertyTransformStyle: |
7316 | if (isInitial) |
7317 | StyleBuilderFunctions::applyInitialTransformStyle(styleResolver); |
7318 | else if (isInherit) |
7319 | StyleBuilderFunctions::applyInheritTransformStyle(styleResolver); |
7320 | else |
7321 | StyleBuilderFunctions::applyValueTransformStyle(styleResolver, value); |
7322 | break; |
7323 | case CSSPropertyTransition: |
7324 | ASSERT(isShorthandCSSProperty(property)); |
7325 | ASSERT_NOT_REACHED(); |
7326 | break; |
7327 | case CSSPropertyTransitionDelay: |
7328 | if (isInitial) |
7329 | StyleBuilderFunctions::applyInitialTransitionDelay(styleResolver); |
7330 | else if (isInherit) |
7331 | StyleBuilderFunctions::applyInheritTransitionDelay(styleResolver); |
7332 | else |
7333 | StyleBuilderFunctions::applyValueTransitionDelay(styleResolver, value); |
7334 | break; |
7335 | case CSSPropertyTransitionDuration: |
7336 | if (isInitial) |
7337 | StyleBuilderFunctions::applyInitialTransitionDuration(styleResolver); |
7338 | else if (isInherit) |
7339 | StyleBuilderFunctions::applyInheritTransitionDuration(styleResolver); |
7340 | else |
7341 | StyleBuilderFunctions::applyValueTransitionDuration(styleResolver, value); |
7342 | break; |
7343 | case CSSPropertyTransitionProperty: |
7344 | if (isInitial) |
7345 | StyleBuilderFunctions::applyInitialTransitionProperty(styleResolver); |
7346 | else if (isInherit) |
7347 | StyleBuilderFunctions::applyInheritTransitionProperty(styleResolver); |
7348 | else |
7349 | StyleBuilderFunctions::applyValueTransitionProperty(styleResolver, value); |
7350 | break; |
7351 | case CSSPropertyTransitionTimingFunction: |
7352 | if (isInitial) |
7353 | StyleBuilderFunctions::applyInitialTransitionTimingFunction(styleResolver); |
7354 | else if (isInherit) |
7355 | StyleBuilderFunctions::applyInheritTransitionTimingFunction(styleResolver); |
7356 | else |
7357 | StyleBuilderFunctions::applyValueTransitionTimingFunction(styleResolver, value); |
7358 | break; |
7359 | case CSSPropertyUnicodeBidi: |
7360 | if (isInitial) |
7361 | StyleBuilderFunctions::applyInitialUnicodeBidi(styleResolver); |
7362 | else if (isInherit) |
7363 | StyleBuilderFunctions::applyInheritUnicodeBidi(styleResolver); |
7364 | else |
7365 | StyleBuilderFunctions::applyValueUnicodeBidi(styleResolver, value); |
7366 | break; |
7367 | case CSSPropertyUnicodeRange: |
7368 | break; |
7369 | case CSSPropertyVectorEffect: |
7370 | if (isInitial) |
7371 | StyleBuilderFunctions::applyInitialVectorEffect(styleResolver); |
7372 | else if (isInherit) |
7373 | StyleBuilderFunctions::applyInheritVectorEffect(styleResolver); |
7374 | else |
7375 | StyleBuilderFunctions::applyValueVectorEffect(styleResolver, value); |
7376 | break; |
7377 | case CSSPropertyVerticalAlign: |
7378 | if (isInitial) |
7379 | StyleBuilderFunctions::applyInitialVerticalAlign(styleResolver); |
7380 | else if (isInherit) |
7381 | StyleBuilderFunctions::applyInheritVerticalAlign(styleResolver); |
7382 | else |
7383 | StyleBuilderCustom::applyValueVerticalAlign(styleResolver, value); |
7384 | break; |
7385 | case CSSPropertyVisibility: |
7386 | if (isInitial) |
7387 | StyleBuilderFunctions::applyInitialVisibility(styleResolver); |
7388 | else if (isInherit) |
7389 | StyleBuilderFunctions::applyInheritVisibility(styleResolver); |
7390 | else |
7391 | StyleBuilderFunctions::applyValueVisibility(styleResolver, value); |
7392 | break; |
7393 | case CSSPropertyWhiteSpace: |
7394 | if (isInitial) |
7395 | StyleBuilderFunctions::applyInitialWhiteSpace(styleResolver); |
7396 | else if (isInherit) |
7397 | StyleBuilderFunctions::applyInheritWhiteSpace(styleResolver); |
7398 | else |
7399 | StyleBuilderFunctions::applyValueWhiteSpace(styleResolver, value); |
7400 | break; |
7401 | case CSSPropertyWidows: |
7402 | if (isInitial) |
7403 | StyleBuilderFunctions::applyInitialWidows(styleResolver); |
7404 | else if (isInherit) |
7405 | StyleBuilderFunctions::applyInheritWidows(styleResolver); |
7406 | else |
7407 | StyleBuilderFunctions::applyValueWidows(styleResolver, value); |
7408 | break; |
7409 | case CSSPropertyWidth: |
7410 | if (isInitial) |
7411 | StyleBuilderFunctions::applyInitialWidth(styleResolver); |
7412 | else if (isInherit) |
7413 | StyleBuilderFunctions::applyInheritWidth(styleResolver); |
7414 | else |
7415 | StyleBuilderFunctions::applyValueWidth(styleResolver, value); |
7416 | break; |
7417 | case CSSPropertyWillChange: |
7418 | if (isInitial) |
7419 | StyleBuilderFunctions::applyInitialWillChange(styleResolver); |
7420 | else if (isInherit) |
7421 | StyleBuilderFunctions::applyInheritWillChange(styleResolver); |
7422 | else |
7423 | StyleBuilderCustom::applyValueWillChange(styleResolver, value); |
7424 | break; |
7425 | case CSSPropertyWordBreak: |
7426 | if (isInitial) |
7427 | StyleBuilderFunctions::applyInitialWordBreak(styleResolver); |
7428 | else if (isInherit) |
7429 | StyleBuilderFunctions::applyInheritWordBreak(styleResolver); |
7430 | else |
7431 | StyleBuilderFunctions::applyValueWordBreak(styleResolver, value); |
7432 | break; |
7433 | case CSSPropertyWordSpacing: |
7434 | if (isInitial) |
7435 | StyleBuilderFunctions::applyInitialWordSpacing(styleResolver); |
7436 | else if (isInherit) |
7437 | StyleBuilderFunctions::applyInheritWordSpacing(styleResolver); |
7438 | else |
7439 | StyleBuilderFunctions::applyValueWordSpacing(styleResolver, value); |
7440 | break; |
7441 | case CSSPropertyWordWrap: |
7442 | if (isInitial) |
7443 | StyleBuilderFunctions::applyInitialWordWrap(styleResolver); |
7444 | else if (isInherit) |
7445 | StyleBuilderFunctions::applyInheritWordWrap(styleResolver); |
7446 | else |
7447 | StyleBuilderFunctions::applyValueWordWrap(styleResolver, value); |
7448 | break; |
7449 | case CSSPropertyX: |
7450 | if (isInitial) |
7451 | StyleBuilderFunctions::applyInitialX(styleResolver); |
7452 | else if (isInherit) |
7453 | StyleBuilderFunctions::applyInheritX(styleResolver); |
7454 | else |
7455 | StyleBuilderFunctions::applyValueX(styleResolver, value); |
7456 | break; |
7457 | case CSSPropertyY: |
7458 | if (isInitial) |
7459 | StyleBuilderFunctions::applyInitialY(styleResolver); |
7460 | else if (isInherit) |
7461 | StyleBuilderFunctions::applyInheritY(styleResolver); |
7462 | else |
7463 | StyleBuilderFunctions::applyValueY(styleResolver, value); |
7464 | break; |
7465 | case CSSPropertyZIndex: |
7466 | if (isInitial) |
7467 | StyleBuilderFunctions::applyInitialZIndex(styleResolver); |
7468 | else if (isInherit) |
7469 | StyleBuilderFunctions::applyInheritZIndex(styleResolver); |
7470 | else |
7471 | StyleBuilderFunctions::applyValueZIndex(styleResolver, value); |
7472 | break; |
7473 | case CSSPropertyAppleColorFilter: |
7474 | if (isInitial) |
7475 | StyleBuilderFunctions::applyInitialAppleColorFilter(styleResolver); |
7476 | else if (isInherit) |
7477 | StyleBuilderFunctions::applyInheritAppleColorFilter(styleResolver); |
7478 | else |
7479 | StyleBuilderFunctions::applyValueAppleColorFilter(styleResolver, value); |
7480 | break; |
7481 | case CSSPropertyWebkitAppearance: |
7482 | if (isInitial) |
7483 | StyleBuilderFunctions::applyInitialWebkitAppearance(styleResolver); |
7484 | else if (isInherit) |
7485 | StyleBuilderFunctions::applyInheritWebkitAppearance(styleResolver); |
7486 | else |
7487 | StyleBuilderFunctions::applyValueWebkitAppearance(styleResolver, value); |
7488 | break; |
7489 | case CSSPropertyWebkitAspectRatio: |
7490 | if (isInitial) |
7491 | StyleBuilderCustom::applyInitialWebkitAspectRatio(styleResolver); |
7492 | else if (isInherit) |
7493 | StyleBuilderCustom::applyInheritWebkitAspectRatio(styleResolver); |
7494 | else |
7495 | StyleBuilderCustom::applyValueWebkitAspectRatio(styleResolver, value); |
7496 | break; |
7497 | case CSSPropertyWebkitBackfaceVisibility: |
7498 | if (isInitial) |
7499 | StyleBuilderFunctions::applyInitialWebkitBackfaceVisibility(styleResolver); |
7500 | else if (isInherit) |
7501 | StyleBuilderFunctions::applyInheritWebkitBackfaceVisibility(styleResolver); |
7502 | else |
7503 | StyleBuilderFunctions::applyValueWebkitBackfaceVisibility(styleResolver, value); |
7504 | break; |
7505 | case CSSPropertyWebkitBackgroundClip: |
7506 | if (isInitial) |
7507 | StyleBuilderFunctions::applyInitialWebkitBackgroundClip(styleResolver); |
7508 | else if (isInherit) |
7509 | StyleBuilderFunctions::applyInheritWebkitBackgroundClip(styleResolver); |
7510 | else |
7511 | StyleBuilderFunctions::applyValueWebkitBackgroundClip(styleResolver, value); |
7512 | break; |
7513 | case CSSPropertyWebkitBackgroundComposite: |
7514 | if (isInitial) |
7515 | StyleBuilderFunctions::applyInitialWebkitBackgroundComposite(styleResolver); |
7516 | else if (isInherit) |
7517 | StyleBuilderFunctions::applyInheritWebkitBackgroundComposite(styleResolver); |
7518 | else |
7519 | StyleBuilderFunctions::applyValueWebkitBackgroundComposite(styleResolver, value); |
7520 | break; |
7521 | case CSSPropertyWebkitBackgroundOrigin: |
7522 | if (isInitial) |
7523 | StyleBuilderFunctions::applyInitialWebkitBackgroundOrigin(styleResolver); |
7524 | else if (isInherit) |
7525 | StyleBuilderFunctions::applyInheritWebkitBackgroundOrigin(styleResolver); |
7526 | else |
7527 | StyleBuilderFunctions::applyValueWebkitBackgroundOrigin(styleResolver, value); |
7528 | break; |
7529 | case CSSPropertyWebkitBackgroundSize: |
7530 | if (isInitial) |
7531 | StyleBuilderFunctions::applyInitialWebkitBackgroundSize(styleResolver); |
7532 | else if (isInherit) |
7533 | StyleBuilderFunctions::applyInheritWebkitBackgroundSize(styleResolver); |
7534 | else |
7535 | StyleBuilderFunctions::applyValueWebkitBackgroundSize(styleResolver, value); |
7536 | break; |
7537 | case CSSPropertyWebkitBorderFit: |
7538 | if (isInitial) |
7539 | StyleBuilderFunctions::applyInitialWebkitBorderFit(styleResolver); |
7540 | else if (isInherit) |
7541 | StyleBuilderFunctions::applyInheritWebkitBorderFit(styleResolver); |
7542 | else |
7543 | StyleBuilderFunctions::applyValueWebkitBorderFit(styleResolver, value); |
7544 | break; |
7545 | case CSSPropertyWebkitBorderHorizontalSpacing: |
7546 | if (isInitial) |
7547 | StyleBuilderFunctions::applyInitialWebkitBorderHorizontalSpacing(styleResolver); |
7548 | else if (isInherit) |
7549 | StyleBuilderFunctions::applyInheritWebkitBorderHorizontalSpacing(styleResolver); |
7550 | else |
7551 | StyleBuilderFunctions::applyValueWebkitBorderHorizontalSpacing(styleResolver, value); |
7552 | break; |
7553 | case CSSPropertyWebkitBorderImage: |
7554 | if (isInitial) |
7555 | StyleBuilderFunctions::applyInitialWebkitBorderImage(styleResolver); |
7556 | else if (isInherit) |
7557 | StyleBuilderFunctions::applyInheritWebkitBorderImage(styleResolver); |
7558 | else |
7559 | StyleBuilderFunctions::applyValueWebkitBorderImage(styleResolver, value); |
7560 | break; |
7561 | case CSSPropertyWebkitBorderRadius: |
7562 | ASSERT(isShorthandCSSProperty(property)); |
7563 | ASSERT_NOT_REACHED(); |
7564 | break; |
7565 | case CSSPropertyWebkitBorderVerticalSpacing: |
7566 | if (isInitial) |
7567 | StyleBuilderFunctions::applyInitialWebkitBorderVerticalSpacing(styleResolver); |
7568 | else if (isInherit) |
7569 | StyleBuilderFunctions::applyInheritWebkitBorderVerticalSpacing(styleResolver); |
7570 | else |
7571 | StyleBuilderFunctions::applyValueWebkitBorderVerticalSpacing(styleResolver, value); |
7572 | break; |
7573 | case CSSPropertyWebkitBoxAlign: |
7574 | if (isInitial) |
7575 | StyleBuilderFunctions::applyInitialWebkitBoxAlign(styleResolver); |
7576 | else if (isInherit) |
7577 | StyleBuilderFunctions::applyInheritWebkitBoxAlign(styleResolver); |
7578 | else |
7579 | StyleBuilderFunctions::applyValueWebkitBoxAlign(styleResolver, value); |
7580 | break; |
7581 | case CSSPropertyWebkitBoxDecorationBreak: |
7582 | if (isInitial) |
7583 | StyleBuilderFunctions::applyInitialWebkitBoxDecorationBreak(styleResolver); |
7584 | else if (isInherit) |
7585 | StyleBuilderFunctions::applyInheritWebkitBoxDecorationBreak(styleResolver); |
7586 | else |
7587 | StyleBuilderFunctions::applyValueWebkitBoxDecorationBreak(styleResolver, value); |
7588 | break; |
7589 | case CSSPropertyWebkitBoxDirection: |
7590 | if (isInitial) |
7591 | StyleBuilderFunctions::applyInitialWebkitBoxDirection(styleResolver); |
7592 | else if (isInherit) |
7593 | StyleBuilderFunctions::applyInheritWebkitBoxDirection(styleResolver); |
7594 | else |
7595 | StyleBuilderFunctions::applyValueWebkitBoxDirection(styleResolver, value); |
7596 | break; |
7597 | case CSSPropertyWebkitBoxFlex: |
7598 | if (isInitial) |
7599 | StyleBuilderFunctions::applyInitialWebkitBoxFlex(styleResolver); |
7600 | else if (isInherit) |
7601 | StyleBuilderFunctions::applyInheritWebkitBoxFlex(styleResolver); |
7602 | else |
7603 | StyleBuilderFunctions::applyValueWebkitBoxFlex(styleResolver, value); |
7604 | break; |
7605 | case CSSPropertyWebkitBoxFlexGroup: |
7606 | if (isInitial) |
7607 | StyleBuilderFunctions::applyInitialWebkitBoxFlexGroup(styleResolver); |
7608 | else if (isInherit) |
7609 | StyleBuilderFunctions::applyInheritWebkitBoxFlexGroup(styleResolver); |
7610 | else |
7611 | StyleBuilderFunctions::applyValueWebkitBoxFlexGroup(styleResolver, value); |
7612 | break; |
7613 | case CSSPropertyWebkitBoxLines: |
7614 | if (isInitial) |
7615 | StyleBuilderFunctions::applyInitialWebkitBoxLines(styleResolver); |
7616 | else if (isInherit) |
7617 | StyleBuilderFunctions::applyInheritWebkitBoxLines(styleResolver); |
7618 | else |
7619 | StyleBuilderFunctions::applyValueWebkitBoxLines(styleResolver, value); |
7620 | break; |
7621 | case CSSPropertyWebkitBoxOrdinalGroup: |
7622 | if (isInitial) |
7623 | StyleBuilderFunctions::applyInitialWebkitBoxOrdinalGroup(styleResolver); |
7624 | else if (isInherit) |
7625 | StyleBuilderFunctions::applyInheritWebkitBoxOrdinalGroup(styleResolver); |
7626 | else |
7627 | StyleBuilderFunctions::applyValueWebkitBoxOrdinalGroup(styleResolver, value); |
7628 | break; |
7629 | case CSSPropertyWebkitBoxOrient: |
7630 | if (isInitial) |
7631 | StyleBuilderFunctions::applyInitialWebkitBoxOrient(styleResolver); |
7632 | else if (isInherit) |
7633 | StyleBuilderFunctions::applyInheritWebkitBoxOrient(styleResolver); |
7634 | else |
7635 | StyleBuilderFunctions::applyValueWebkitBoxOrient(styleResolver, value); |
7636 | break; |
7637 | case CSSPropertyWebkitBoxPack: |
7638 | if (isInitial) |
7639 | StyleBuilderFunctions::applyInitialWebkitBoxPack(styleResolver); |
7640 | else if (isInherit) |
7641 | StyleBuilderFunctions::applyInheritWebkitBoxPack(styleResolver); |
7642 | else |
7643 | StyleBuilderFunctions::applyValueWebkitBoxPack(styleResolver, value); |
7644 | break; |
7645 | case CSSPropertyWebkitBoxReflect: |
7646 | if (isInitial) |
7647 | StyleBuilderFunctions::applyInitialWebkitBoxReflect(styleResolver); |
7648 | else if (isInherit) |
7649 | StyleBuilderFunctions::applyInheritWebkitBoxReflect(styleResolver); |
7650 | else |
7651 | StyleBuilderFunctions::applyValueWebkitBoxReflect(styleResolver, value); |
7652 | break; |
7653 | case CSSPropertyWebkitBoxShadow: |
7654 | if (isInitial) |
7655 | StyleBuilderCustom::applyInitialWebkitBoxShadow(styleResolver); |
7656 | else if (isInherit) |
7657 | StyleBuilderCustom::applyInheritWebkitBoxShadow(styleResolver); |
7658 | else |
7659 | StyleBuilderCustom::applyValueWebkitBoxShadow(styleResolver, value); |
7660 | break; |
7661 | case CSSPropertyWebkitClipPath: |
7662 | if (isInitial) |
7663 | StyleBuilderFunctions::applyInitialWebkitClipPath(styleResolver); |
7664 | else if (isInherit) |
7665 | StyleBuilderFunctions::applyInheritWebkitClipPath(styleResolver); |
7666 | else |
7667 | StyleBuilderFunctions::applyValueWebkitClipPath(styleResolver, value); |
7668 | break; |
7669 | case CSSPropertyWebkitColumnAxis: |
7670 | if (isInitial) |
7671 | StyleBuilderFunctions::applyInitialWebkitColumnAxis(styleResolver); |
7672 | else if (isInherit) |
7673 | StyleBuilderFunctions::applyInheritWebkitColumnAxis(styleResolver); |
7674 | else |
7675 | StyleBuilderFunctions::applyValueWebkitColumnAxis(styleResolver, value); |
7676 | break; |
7677 | case CSSPropertyWebkitColumnBreakAfter: |
7678 | ASSERT(isShorthandCSSProperty(property)); |
7679 | ASSERT_NOT_REACHED(); |
7680 | break; |
7681 | case CSSPropertyWebkitColumnBreakBefore: |
7682 | ASSERT(isShorthandCSSProperty(property)); |
7683 | ASSERT_NOT_REACHED(); |
7684 | break; |
7685 | case CSSPropertyWebkitColumnBreakInside: |
7686 | ASSERT(isShorthandCSSProperty(property)); |
7687 | ASSERT_NOT_REACHED(); |
7688 | break; |
7689 | case CSSPropertyWebkitColumnProgression: |
7690 | if (isInitial) |
7691 | StyleBuilderFunctions::applyInitialWebkitColumnProgression(styleResolver); |
7692 | else if (isInherit) |
7693 | StyleBuilderFunctions::applyInheritWebkitColumnProgression(styleResolver); |
7694 | else |
7695 | StyleBuilderFunctions::applyValueWebkitColumnProgression(styleResolver, value); |
7696 | break; |
7697 | case CSSPropertyWebkitFontSizeDelta: |
7698 | break; |
7699 | case CSSPropertyWebkitHyphenateCharacter: |
7700 | if (isInitial) |
7701 | StyleBuilderFunctions::applyInitialWebkitHyphenateCharacter(styleResolver); |
7702 | else if (isInherit) |
7703 | StyleBuilderFunctions::applyInheritWebkitHyphenateCharacter(styleResolver); |
7704 | else |
7705 | StyleBuilderFunctions::applyValueWebkitHyphenateCharacter(styleResolver, value); |
7706 | break; |
7707 | case CSSPropertyWebkitHyphenateLimitAfter: |
7708 | if (isInitial) |
7709 | StyleBuilderFunctions::applyInitialWebkitHyphenateLimitAfter(styleResolver); |
7710 | else if (isInherit) |
7711 | StyleBuilderFunctions::applyInheritWebkitHyphenateLimitAfter(styleResolver); |
7712 | else |
7713 | StyleBuilderFunctions::applyValueWebkitHyphenateLimitAfter(styleResolver, value); |
7714 | break; |
7715 | case CSSPropertyWebkitHyphenateLimitBefore: |
7716 | if (isInitial) |
7717 | StyleBuilderFunctions::applyInitialWebkitHyphenateLimitBefore(styleResolver); |
7718 | else if (isInherit) |
7719 | StyleBuilderFunctions::applyInheritWebkitHyphenateLimitBefore(styleResolver); |
7720 | else |
7721 | StyleBuilderFunctions::applyValueWebkitHyphenateLimitBefore(styleResolver, value); |
7722 | break; |
7723 | case CSSPropertyWebkitHyphenateLimitLines: |
7724 | if (isInitial) |
7725 | StyleBuilderFunctions::applyInitialWebkitHyphenateLimitLines(styleResolver); |
7726 | else if (isInherit) |
7727 | StyleBuilderFunctions::applyInheritWebkitHyphenateLimitLines(styleResolver); |
7728 | else |
7729 | StyleBuilderFunctions::applyValueWebkitHyphenateLimitLines(styleResolver, value); |
7730 | break; |
7731 | case CSSPropertyWebkitHyphens: |
7732 | if (isInitial) |
7733 | StyleBuilderFunctions::applyInitialWebkitHyphens(styleResolver); |
7734 | else if (isInherit) |
7735 | StyleBuilderFunctions::applyInheritWebkitHyphens(styleResolver); |
7736 | else |
7737 | StyleBuilderFunctions::applyValueWebkitHyphens(styleResolver, value); |
7738 | break; |
7739 | case CSSPropertyWebkitInitialLetter: |
7740 | if (isInitial) |
7741 | StyleBuilderFunctions::applyInitialWebkitInitialLetter(styleResolver); |
7742 | else if (isInherit) |
7743 | StyleBuilderFunctions::applyInheritWebkitInitialLetter(styleResolver); |
7744 | else |
7745 | StyleBuilderFunctions::applyValueWebkitInitialLetter(styleResolver, value); |
7746 | break; |
7747 | case CSSPropertyWebkitLineAlign: |
7748 | if (isInitial) |
7749 | StyleBuilderFunctions::applyInitialWebkitLineAlign(styleResolver); |
7750 | else if (isInherit) |
7751 | StyleBuilderFunctions::applyInheritWebkitLineAlign(styleResolver); |
7752 | else |
7753 | StyleBuilderFunctions::applyValueWebkitLineAlign(styleResolver, value); |
7754 | break; |
7755 | case CSSPropertyWebkitLineBoxContain: |
7756 | if (isInitial) |
7757 | StyleBuilderFunctions::applyInitialWebkitLineBoxContain(styleResolver); |
7758 | else if (isInherit) |
7759 | StyleBuilderFunctions::applyInheritWebkitLineBoxContain(styleResolver); |
7760 | else |
7761 | StyleBuilderFunctions::applyValueWebkitLineBoxContain(styleResolver, value); |
7762 | break; |
7763 | case CSSPropertyWebkitLineClamp: |
7764 | if (isInitial) |
7765 | StyleBuilderFunctions::applyInitialWebkitLineClamp(styleResolver); |
7766 | else if (isInherit) |
7767 | StyleBuilderFunctions::applyInheritWebkitLineClamp(styleResolver); |
7768 | else |
7769 | StyleBuilderFunctions::applyValueWebkitLineClamp(styleResolver, value); |
7770 | break; |
7771 | case CSSPropertyWebkitLineGrid: |
7772 | if (isInitial) |
7773 | StyleBuilderFunctions::applyInitialWebkitLineGrid(styleResolver); |
7774 | else if (isInherit) |
7775 | StyleBuilderFunctions::applyInheritWebkitLineGrid(styleResolver); |
7776 | else |
7777 | StyleBuilderFunctions::applyValueWebkitLineGrid(styleResolver, value); |
7778 | break; |
7779 | case CSSPropertyWebkitLineSnap: |
7780 | if (isInitial) |
7781 | StyleBuilderFunctions::applyInitialWebkitLineSnap(styleResolver); |
7782 | else if (isInherit) |
7783 | StyleBuilderFunctions::applyInheritWebkitLineSnap(styleResolver); |
7784 | else |
7785 | StyleBuilderFunctions::applyValueWebkitLineSnap(styleResolver, value); |
7786 | break; |
7787 | case CSSPropertyWebkitMarginAfterCollapse: |
7788 | if (isInitial) |
7789 | StyleBuilderFunctions::applyInitialWebkitMarginAfterCollapse(styleResolver); |
7790 | else if (isInherit) |
7791 | StyleBuilderFunctions::applyInheritWebkitMarginAfterCollapse(styleResolver); |
7792 | else |
7793 | StyleBuilderFunctions::applyValueWebkitMarginAfterCollapse(styleResolver, value); |
7794 | break; |
7795 | case CSSPropertyWebkitMarginBeforeCollapse: |
7796 | if (isInitial) |
7797 | StyleBuilderFunctions::applyInitialWebkitMarginBeforeCollapse(styleResolver); |
7798 | else if (isInherit) |
7799 | StyleBuilderFunctions::applyInheritWebkitMarginBeforeCollapse(styleResolver); |
7800 | else |
7801 | StyleBuilderFunctions::applyValueWebkitMarginBeforeCollapse(styleResolver, value); |
7802 | break; |
7803 | case CSSPropertyWebkitMarginBottomCollapse: |
7804 | if (isInitial) |
7805 | StyleBuilderFunctions::applyInitialWebkitMarginBottomCollapse(styleResolver); |
7806 | else if (isInherit) |
7807 | StyleBuilderFunctions::applyInheritWebkitMarginBottomCollapse(styleResolver); |
7808 | else |
7809 | StyleBuilderFunctions::applyValueWebkitMarginBottomCollapse(styleResolver, value); |
7810 | break; |
7811 | case CSSPropertyWebkitMarginCollapse: |
7812 | ASSERT(isShorthandCSSProperty(property)); |
7813 | ASSERT_NOT_REACHED(); |
7814 | break; |
7815 | case CSSPropertyWebkitMarginTopCollapse: |
7816 | if (isInitial) |
7817 | StyleBuilderFunctions::applyInitialWebkitMarginTopCollapse(styleResolver); |
7818 | else if (isInherit) |
7819 | StyleBuilderFunctions::applyInheritWebkitMarginTopCollapse(styleResolver); |
7820 | else |
7821 | StyleBuilderFunctions::applyValueWebkitMarginTopCollapse(styleResolver, value); |
7822 | break; |
7823 | case CSSPropertyWebkitMarquee: |
7824 | ASSERT(isShorthandCSSProperty(property)); |
7825 | ASSERT_NOT_REACHED(); |
7826 | break; |
7827 | case CSSPropertyWebkitMarqueeDirection: |
7828 | if (isInitial) |
7829 | StyleBuilderFunctions::applyInitialWebkitMarqueeDirection(styleResolver); |
7830 | else if (isInherit) |
7831 | StyleBuilderFunctions::applyInheritWebkitMarqueeDirection(styleResolver); |
7832 | else |
7833 | StyleBuilderFunctions::applyValueWebkitMarqueeDirection(styleResolver, value); |
7834 | break; |
7835 | case CSSPropertyWebkitMarqueeIncrement: |
7836 | if (isInitial) |
7837 | StyleBuilderFunctions::applyInitialWebkitMarqueeIncrement(styleResolver); |
7838 | else if (isInherit) |
7839 | StyleBuilderFunctions::applyInheritWebkitMarqueeIncrement(styleResolver); |
7840 | else |
7841 | StyleBuilderFunctions::applyValueWebkitMarqueeIncrement(styleResolver, value); |
7842 | break; |
7843 | case CSSPropertyWebkitMarqueeRepetition: |
7844 | if (isInitial) |
7845 | StyleBuilderFunctions::applyInitialWebkitMarqueeRepetition(styleResolver); |
7846 | else if (isInherit) |
7847 | StyleBuilderFunctions::applyInheritWebkitMarqueeRepetition(styleResolver); |
7848 | else |
7849 | StyleBuilderFunctions::applyValueWebkitMarqueeRepetition(styleResolver, value); |
7850 | break; |
7851 | case CSSPropertyWebkitMarqueeSpeed: |
7852 | if (isInitial) |
7853 | StyleBuilderFunctions::applyInitialWebkitMarqueeSpeed(styleResolver); |
7854 | else if (isInherit) |
7855 | StyleBuilderFunctions::applyInheritWebkitMarqueeSpeed(styleResolver); |
7856 | else |
7857 | StyleBuilderFunctions::applyValueWebkitMarqueeSpeed(styleResolver, value); |
7858 | break; |
7859 | case CSSPropertyWebkitMarqueeStyle: |
7860 | if (isInitial) |
7861 | StyleBuilderFunctions::applyInitialWebkitMarqueeStyle(styleResolver); |
7862 | else if (isInherit) |
7863 | StyleBuilderFunctions::applyInheritWebkitMarqueeStyle(styleResolver); |
7864 | else |
7865 | StyleBuilderFunctions::applyValueWebkitMarqueeStyle(styleResolver, value); |
7866 | break; |
7867 | case CSSPropertyWebkitMask: |
7868 | ASSERT(isShorthandCSSProperty(property)); |
7869 | ASSERT_NOT_REACHED(); |
7870 | break; |
7871 | case CSSPropertyWebkitMaskBoxImage: |
7872 | if (isInitial) |
7873 | StyleBuilderFunctions::applyInitialWebkitMaskBoxImage(styleResolver); |
7874 | else if (isInherit) |
7875 | StyleBuilderFunctions::applyInheritWebkitMaskBoxImage(styleResolver); |
7876 | else |
7877 | StyleBuilderFunctions::applyValueWebkitMaskBoxImage(styleResolver, value); |
7878 | break; |
7879 | case CSSPropertyWebkitMaskBoxImageOutset: |
7880 | if (isInitial) |
7881 | StyleBuilderCustom::applyInitialWebkitMaskBoxImageOutset(styleResolver); |
7882 | else if (isInherit) |
7883 | StyleBuilderCustom::applyInheritWebkitMaskBoxImageOutset(styleResolver); |
7884 | else |
7885 | StyleBuilderCustom::applyValueWebkitMaskBoxImageOutset(styleResolver, value); |
7886 | break; |
7887 | case CSSPropertyWebkitMaskBoxImageRepeat: |
7888 | if (isInitial) |
7889 | StyleBuilderCustom::applyInitialWebkitMaskBoxImageRepeat(styleResolver); |
7890 | else if (isInherit) |
7891 | StyleBuilderCustom::applyInheritWebkitMaskBoxImageRepeat(styleResolver); |
7892 | else |
7893 | StyleBuilderCustom::applyValueWebkitMaskBoxImageRepeat(styleResolver, value); |
7894 | break; |
7895 | case CSSPropertyWebkitMaskBoxImageSlice: |
7896 | if (isInitial) |
7897 | StyleBuilderCustom::applyInitialWebkitMaskBoxImageSlice(styleResolver); |
7898 | else if (isInherit) |
7899 | StyleBuilderCustom::applyInheritWebkitMaskBoxImageSlice(styleResolver); |
7900 | else |
7901 | StyleBuilderCustom::applyValueWebkitMaskBoxImageSlice(styleResolver, value); |
7902 | break; |
7903 | case CSSPropertyWebkitMaskBoxImageSource: |
7904 | if (isInitial) |
7905 | StyleBuilderFunctions::applyInitialWebkitMaskBoxImageSource(styleResolver); |
7906 | else if (isInherit) |
7907 | StyleBuilderFunctions::applyInheritWebkitMaskBoxImageSource(styleResolver); |
7908 | else |
7909 | StyleBuilderFunctions::applyValueWebkitMaskBoxImageSource(styleResolver, value); |
7910 | break; |
7911 | case CSSPropertyWebkitMaskBoxImageWidth: |
7912 | if (isInitial) |
7913 | StyleBuilderCustom::applyInitialWebkitMaskBoxImageWidth(styleResolver); |
7914 | else if (isInherit) |
7915 | StyleBuilderCustom::applyInheritWebkitMaskBoxImageWidth(styleResolver); |
7916 | else |
7917 | StyleBuilderCustom::applyValueWebkitMaskBoxImageWidth(styleResolver, value); |
7918 | break; |
7919 | case CSSPropertyWebkitMaskClip: |
7920 | if (isInitial) |
7921 | StyleBuilderFunctions::applyInitialWebkitMaskClip(styleResolver); |
7922 | else if (isInherit) |
7923 | StyleBuilderFunctions::applyInheritWebkitMaskClip(styleResolver); |
7924 | else |
7925 | StyleBuilderFunctions::applyValueWebkitMaskClip(styleResolver, value); |
7926 | break; |
7927 | case CSSPropertyWebkitMaskComposite: |
7928 | if (isInitial) |
7929 | StyleBuilderFunctions::applyInitialWebkitMaskComposite(styleResolver); |
7930 | else if (isInherit) |
7931 | StyleBuilderFunctions::applyInheritWebkitMaskComposite(styleResolver); |
7932 | else |
7933 | StyleBuilderFunctions::applyValueWebkitMaskComposite(styleResolver, value); |
7934 | break; |
7935 | case CSSPropertyWebkitMaskImage: |
7936 | if (isInitial) |
7937 | StyleBuilderFunctions::applyInitialWebkitMaskImage(styleResolver); |
7938 | else if (isInherit) |
7939 | StyleBuilderFunctions::applyInheritWebkitMaskImage(styleResolver); |
7940 | else |
7941 | StyleBuilderFunctions::applyValueWebkitMaskImage(styleResolver, value); |
7942 | break; |
7943 | case CSSPropertyWebkitMaskOrigin: |
7944 | if (isInitial) |
7945 | StyleBuilderFunctions::applyInitialWebkitMaskOrigin(styleResolver); |
7946 | else if (isInherit) |
7947 | StyleBuilderFunctions::applyInheritWebkitMaskOrigin(styleResolver); |
7948 | else |
7949 | StyleBuilderFunctions::applyValueWebkitMaskOrigin(styleResolver, value); |
7950 | break; |
7951 | case CSSPropertyWebkitMaskPosition: |
7952 | ASSERT(isShorthandCSSProperty(property)); |
7953 | ASSERT_NOT_REACHED(); |
7954 | break; |
7955 | case CSSPropertyWebkitMaskPositionX: |
7956 | if (isInitial) |
7957 | StyleBuilderFunctions::applyInitialWebkitMaskPositionX(styleResolver); |
7958 | else if (isInherit) |
7959 | StyleBuilderFunctions::applyInheritWebkitMaskPositionX(styleResolver); |
7960 | else |
7961 | StyleBuilderFunctions::applyValueWebkitMaskPositionX(styleResolver, value); |
7962 | break; |
7963 | case CSSPropertyWebkitMaskPositionY: |
7964 | if (isInitial) |
7965 | StyleBuilderFunctions::applyInitialWebkitMaskPositionY(styleResolver); |
7966 | else if (isInherit) |
7967 | StyleBuilderFunctions::applyInheritWebkitMaskPositionY(styleResolver); |
7968 | else |
7969 | StyleBuilderFunctions::applyValueWebkitMaskPositionY(styleResolver, value); |
7970 | break; |
7971 | case CSSPropertyWebkitMaskRepeat: |
7972 | ASSERT(isShorthandCSSProperty(property)); |
7973 | ASSERT_NOT_REACHED(); |
7974 | break; |
7975 | case CSSPropertyWebkitMaskRepeatX: |
7976 | if (isInitial) |
7977 | StyleBuilderFunctions::applyInitialWebkitMaskRepeatX(styleResolver); |
7978 | else if (isInherit) |
7979 | StyleBuilderFunctions::applyInheritWebkitMaskRepeatX(styleResolver); |
7980 | else |
7981 | StyleBuilderFunctions::applyValueWebkitMaskRepeatX(styleResolver, value); |
7982 | break; |
7983 | case CSSPropertyWebkitMaskRepeatY: |
7984 | if (isInitial) |
7985 | StyleBuilderFunctions::applyInitialWebkitMaskRepeatY(styleResolver); |
7986 | else if (isInherit) |
7987 | StyleBuilderFunctions::applyInheritWebkitMaskRepeatY(styleResolver); |
7988 | else |
7989 | StyleBuilderFunctions::applyValueWebkitMaskRepeatY(styleResolver, value); |
7990 | break; |
7991 | case CSSPropertyWebkitMaskSize: |
7992 | if (isInitial) |
7993 | StyleBuilderFunctions::applyInitialWebkitMaskSize(styleResolver); |
7994 | else if (isInherit) |
7995 | StyleBuilderFunctions::applyInheritWebkitMaskSize(styleResolver); |
7996 | else |
7997 | StyleBuilderFunctions::applyValueWebkitMaskSize(styleResolver, value); |
7998 | break; |
7999 | case CSSPropertyWebkitMaskSourceType: |
8000 | if (isInitial) |
8001 | StyleBuilderFunctions::applyInitialWebkitMaskSourceType(styleResolver); |
8002 | else if (isInherit) |
8003 | StyleBuilderFunctions::applyInheritWebkitMaskSourceType(styleResolver); |
8004 | else |
8005 | StyleBuilderFunctions::applyValueWebkitMaskSourceType(styleResolver, value); |
8006 | break; |
8007 | case CSSPropertyWebkitNbspMode: |
8008 | if (isInitial) |
8009 | StyleBuilderFunctions::applyInitialWebkitNbspMode(styleResolver); |
8010 | else if (isInherit) |
8011 | StyleBuilderFunctions::applyInheritWebkitNbspMode(styleResolver); |
8012 | else |
8013 | StyleBuilderFunctions::applyValueWebkitNbspMode(styleResolver, value); |
8014 | break; |
8015 | case CSSPropertyWebkitPrintColorAdjust: |
8016 | if (isInitial) |
8017 | StyleBuilderFunctions::applyInitialWebkitPrintColorAdjust(styleResolver); |
8018 | else if (isInherit) |
8019 | StyleBuilderFunctions::applyInheritWebkitPrintColorAdjust(styleResolver); |
8020 | else |
8021 | StyleBuilderFunctions::applyValueWebkitPrintColorAdjust(styleResolver, value); |
8022 | break; |
8023 | case CSSPropertyWebkitRtlOrdering: |
8024 | if (isInitial) |
8025 | StyleBuilderFunctions::applyInitialWebkitRtlOrdering(styleResolver); |
8026 | else if (isInherit) |
8027 | StyleBuilderFunctions::applyInheritWebkitRtlOrdering(styleResolver); |
8028 | else |
8029 | StyleBuilderFunctions::applyValueWebkitRtlOrdering(styleResolver, value); |
8030 | break; |
8031 | case CSSPropertyWebkitRubyPosition: |
8032 | if (isInitial) |
8033 | StyleBuilderFunctions::applyInitialWebkitRubyPosition(styleResolver); |
8034 | else if (isInherit) |
8035 | StyleBuilderFunctions::applyInheritWebkitRubyPosition(styleResolver); |
8036 | else |
8037 | StyleBuilderFunctions::applyValueWebkitRubyPosition(styleResolver, value); |
8038 | break; |
8039 | case CSSPropertyWebkitTapHighlightColor: |
8040 | if (isInitial) |
8041 | StyleBuilderFunctions::applyInitialWebkitTapHighlightColor(styleResolver); |
8042 | else if (isInherit) |
8043 | StyleBuilderFunctions::applyInheritWebkitTapHighlightColor(styleResolver); |
8044 | else |
8045 | StyleBuilderFunctions::applyValueWebkitTapHighlightColor(styleResolver, value); |
8046 | break; |
8047 | case CSSPropertyWebkitTextCombine: |
8048 | if (isInitial) |
8049 | StyleBuilderFunctions::applyInitialWebkitTextCombine(styleResolver); |
8050 | else if (isInherit) |
8051 | StyleBuilderFunctions::applyInheritWebkitTextCombine(styleResolver); |
8052 | else |
8053 | StyleBuilderFunctions::applyValueWebkitTextCombine(styleResolver, value); |
8054 | break; |
8055 | case CSSPropertyWebkitTextDecoration: |
8056 | ASSERT(isShorthandCSSProperty(property)); |
8057 | ASSERT_NOT_REACHED(); |
8058 | break; |
8059 | case CSSPropertyWebkitTextDecorationsInEffect: |
8060 | break; |
8061 | case CSSPropertyWebkitTextEmphasis: |
8062 | ASSERT(isShorthandCSSProperty(property)); |
8063 | ASSERT_NOT_REACHED(); |
8064 | break; |
8065 | case CSSPropertyWebkitTextEmphasisColor: |
8066 | if (isInitial) |
8067 | StyleBuilderFunctions::applyInitialWebkitTextEmphasisColor(styleResolver); |
8068 | else if (isInherit) |
8069 | StyleBuilderFunctions::applyInheritWebkitTextEmphasisColor(styleResolver); |
8070 | else |
8071 | StyleBuilderFunctions::applyValueWebkitTextEmphasisColor(styleResolver, value); |
8072 | break; |
8073 | case CSSPropertyWebkitTextEmphasisPosition: |
8074 | if (isInitial) |
8075 | StyleBuilderFunctions::applyInitialWebkitTextEmphasisPosition(styleResolver); |
8076 | else if (isInherit) |
8077 | StyleBuilderFunctions::applyInheritWebkitTextEmphasisPosition(styleResolver); |
8078 | else |
8079 | StyleBuilderFunctions::applyValueWebkitTextEmphasisPosition(styleResolver, value); |
8080 | break; |
8081 | case CSSPropertyWebkitTextEmphasisStyle: |
8082 | if (isInitial) |
8083 | StyleBuilderCustom::applyInitialWebkitTextEmphasisStyle(styleResolver); |
8084 | else if (isInherit) |
8085 | StyleBuilderCustom::applyInheritWebkitTextEmphasisStyle(styleResolver); |
8086 | else |
8087 | StyleBuilderCustom::applyValueWebkitTextEmphasisStyle(styleResolver, value); |
8088 | break; |
8089 | case CSSPropertyWebkitTextFillColor: |
8090 | if (isInitial) |
8091 | StyleBuilderFunctions::applyInitialWebkitTextFillColor(styleResolver); |
8092 | else if (isInherit) |
8093 | StyleBuilderFunctions::applyInheritWebkitTextFillColor(styleResolver); |
8094 | else |
8095 | StyleBuilderFunctions::applyValueWebkitTextFillColor(styleResolver, value); |
8096 | break; |
8097 | case CSSPropertyWebkitTextSecurity: |
8098 | if (isInitial) |
8099 | StyleBuilderFunctions::applyInitialWebkitTextSecurity(styleResolver); |
8100 | else if (isInherit) |
8101 | StyleBuilderFunctions::applyInheritWebkitTextSecurity(styleResolver); |
8102 | else |
8103 | StyleBuilderFunctions::applyValueWebkitTextSecurity(styleResolver, value); |
8104 | break; |
8105 | case CSSPropertyWebkitTextStroke: |
8106 | ASSERT(isShorthandCSSProperty(property)); |
8107 | ASSERT_NOT_REACHED(); |
8108 | break; |
8109 | case CSSPropertyWebkitTextStrokeColor: |
8110 | if (isInitial) |
8111 | StyleBuilderFunctions::applyInitialWebkitTextStrokeColor(styleResolver); |
8112 | else if (isInherit) |
8113 | StyleBuilderFunctions::applyInheritWebkitTextStrokeColor(styleResolver); |
8114 | else |
8115 | StyleBuilderFunctions::applyValueWebkitTextStrokeColor(styleResolver, value); |
8116 | break; |
8117 | case CSSPropertyWebkitTextStrokeWidth: |
8118 | if (isInitial) |
8119 | StyleBuilderFunctions::applyInitialWebkitTextStrokeWidth(styleResolver); |
8120 | else if (isInherit) |
8121 | StyleBuilderFunctions::applyInheritWebkitTextStrokeWidth(styleResolver); |
8122 | else |
8123 | StyleBuilderFunctions::applyValueWebkitTextStrokeWidth(styleResolver, value); |
8124 | break; |
8125 | case CSSPropertyWebkitTransformStyle: |
8126 | if (isInitial) |
8127 | StyleBuilderFunctions::applyInitialWebkitTransformStyle(styleResolver); |
8128 | else if (isInherit) |
8129 | StyleBuilderFunctions::applyInheritWebkitTransformStyle(styleResolver); |
8130 | else |
8131 | StyleBuilderFunctions::applyValueWebkitTransformStyle(styleResolver, value); |
8132 | break; |
8133 | case CSSPropertyWebkitUserDrag: |
8134 | if (isInitial) |
8135 | StyleBuilderFunctions::applyInitialWebkitUserDrag(styleResolver); |
8136 | else if (isInherit) |
8137 | StyleBuilderFunctions::applyInheritWebkitUserDrag(styleResolver); |
8138 | else |
8139 | StyleBuilderFunctions::applyValueWebkitUserDrag(styleResolver, value); |
8140 | break; |
8141 | case CSSPropertyWebkitUserModify: |
8142 | if (isInitial) |
8143 | StyleBuilderFunctions::applyInitialWebkitUserModify(styleResolver); |
8144 | else if (isInherit) |
8145 | StyleBuilderFunctions::applyInheritWebkitUserModify(styleResolver); |
8146 | else |
8147 | StyleBuilderFunctions::applyValueWebkitUserModify(styleResolver, value); |
8148 | break; |
8149 | case CSSPropertyWebkitUserSelect: |
8150 | if (isInitial) |
8151 | StyleBuilderFunctions::applyInitialWebkitUserSelect(styleResolver); |
8152 | else if (isInherit) |
8153 | StyleBuilderFunctions::applyInheritWebkitUserSelect(styleResolver); |
8154 | else |
8155 | StyleBuilderFunctions::applyValueWebkitUserSelect(styleResolver, value); |
8156 | break; |
8157 | }; |
8158 | } |
8159 | |
8160 | } // namespace WebCore |
8161 | |