OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> | 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. | 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 CSSPropertyWebkitTransformOrigin, | 323 CSSPropertyWebkitTransformOrigin, |
324 CSSPropertyWebkitTransformStyle, | 324 CSSPropertyWebkitTransformStyle, |
325 CSSPropertyWebkitTransitionDelay, | 325 CSSPropertyWebkitTransitionDelay, |
326 CSSPropertyWebkitTransitionDuration, | 326 CSSPropertyWebkitTransitionDuration, |
327 CSSPropertyWebkitTransitionProperty, | 327 CSSPropertyWebkitTransitionProperty, |
328 CSSPropertyWebkitTransitionTimingFunction, | 328 CSSPropertyWebkitTransitionTimingFunction, |
329 CSSPropertyWebkitUserDrag, | 329 CSSPropertyWebkitUserDrag, |
330 CSSPropertyWebkitUserModify, | 330 CSSPropertyWebkitUserModify, |
331 CSSPropertyWebkitUserSelect, | 331 CSSPropertyWebkitUserSelect, |
332 CSSPropertyWebkitWritingMode, | 332 CSSPropertyWebkitWritingMode, |
333 CSSPropertyWebkitFlowInto, | |
334 CSSPropertyWebkitFlowFrom, | |
335 CSSPropertyWebkitRegionBreakAfter, | |
336 CSSPropertyWebkitRegionBreakBefore, | |
337 CSSPropertyWebkitRegionBreakInside, | |
338 CSSPropertyWebkitRegionFragment, | |
339 CSSPropertyWebkitAppRegion, | 333 CSSPropertyWebkitAppRegion, |
340 CSSPropertyWebkitWrapFlow, | 334 CSSPropertyWebkitWrapFlow, |
341 CSSPropertyWebkitWrapThrough, | 335 CSSPropertyWebkitWrapThrough, |
342 CSSPropertyBufferedRendering, | 336 CSSPropertyBufferedRendering, |
343 CSSPropertyClipPath, | 337 CSSPropertyClipPath, |
344 CSSPropertyClipRule, | 338 CSSPropertyClipRule, |
345 CSSPropertyMask, | 339 CSSPropertyMask, |
346 CSSPropertyFilter, | 340 CSSPropertyFilter, |
347 CSSPropertyFloodColor, | 341 CSSPropertyFloodColor, |
348 CSSPropertyFloodOpacity, | 342 CSSPropertyFloodOpacity, |
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1328 const CounterContent* counter = static_cast<const CounterContentData
*>(contentData)->counter(); | 1322 const CounterContent* counter = static_cast<const CounterContentData
*>(contentData)->counter(); |
1329 ASSERT(counter); | 1323 ASSERT(counter); |
1330 list->append(cssValuePool().createValue(counter->identifier(), CSSPr
imitiveValue::CSS_COUNTER_NAME)); | 1324 list->append(cssValuePool().createValue(counter->identifier(), CSSPr
imitiveValue::CSS_COUNTER_NAME)); |
1331 } else if (contentData->isImage()) { | 1325 } else if (contentData->isImage()) { |
1332 const StyleImage* image = static_cast<const ImageContentData*>(conte
ntData)->image(); | 1326 const StyleImage* image = static_cast<const ImageContentData*>(conte
ntData)->image(); |
1333 ASSERT(image); | 1327 ASSERT(image); |
1334 list->append(image->cssValue()); | 1328 list->append(image->cssValue()); |
1335 } else if (contentData->isText()) | 1329 } else if (contentData->isText()) |
1336 list->append(cssValuePool().createValue(static_cast<const TextConten
tData*>(contentData)->text(), CSSPrimitiveValue::CSS_STRING)); | 1330 list->append(cssValuePool().createValue(static_cast<const TextConten
tData*>(contentData)->text(), CSSPrimitiveValue::CSS_STRING)); |
1337 } | 1331 } |
1338 if (style.hasFlowFrom()) | |
1339 list->append(cssValuePool().createValue(style.regionThread(), CSSPrimiti
veValue::CSS_STRING)); | |
1340 return list.release(); | 1332 return list.release(); |
1341 } | 1333 } |
1342 | 1334 |
1343 static PassRefPtr<CSSValue> valueForCounterDirectives(const RenderStyle& style,
CSSPropertyID propertyID) | 1335 static PassRefPtr<CSSValue> valueForCounterDirectives(const RenderStyle& style,
CSSPropertyID propertyID) |
1344 { | 1336 { |
1345 const CounterDirectiveMap* map = style.counterDirectives(); | 1337 const CounterDirectiveMap* map = style.counterDirectives(); |
1346 if (!map) | 1338 if (!map) |
1347 return 0; | 1339 return 0; |
1348 | 1340 |
1349 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); | 1341 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1825 case CSSPropertyWebkitColumnBreakBefore: | 1817 case CSSPropertyWebkitColumnBreakBefore: |
1826 return cssValuePool().createValue(style->columnBreakBefore()); | 1818 return cssValuePool().createValue(style->columnBreakBefore()); |
1827 case CSSPropertyWebkitColumnBreakInside: | 1819 case CSSPropertyWebkitColumnBreakInside: |
1828 return cssValuePool().createValue(style->columnBreakInside()); | 1820 return cssValuePool().createValue(style->columnBreakInside()); |
1829 case CSSPropertyWebkitColumnWidth: | 1821 case CSSPropertyWebkitColumnWidth: |
1830 if (style->hasAutoColumnWidth()) | 1822 if (style->hasAutoColumnWidth()) |
1831 return cssValuePool().createIdentifierValue(CSSValueAuto); | 1823 return cssValuePool().createIdentifierValue(CSSValueAuto); |
1832 return zoomAdjustedPixelValue(style->columnWidth(), *style); | 1824 return zoomAdjustedPixelValue(style->columnWidth(), *style); |
1833 case CSSPropertyTabSize: | 1825 case CSSPropertyTabSize: |
1834 return cssValuePool().createValue(style->tabSize(), CSSPrimitiveValu
e::CSS_NUMBER); | 1826 return cssValuePool().createValue(style->tabSize(), CSSPrimitiveValu
e::CSS_NUMBER); |
1835 case CSSPropertyWebkitRegionBreakAfter: | |
1836 return cssValuePool().createValue(style->regionBreakAfter()); | |
1837 case CSSPropertyWebkitRegionBreakBefore: | |
1838 return cssValuePool().createValue(style->regionBreakBefore()); | |
1839 case CSSPropertyWebkitRegionBreakInside: | |
1840 return cssValuePool().createValue(style->regionBreakInside()); | |
1841 case CSSPropertyCursor: { | 1827 case CSSPropertyCursor: { |
1842 RefPtr<CSSValueList> list; | 1828 RefPtr<CSSValueList> list; |
1843 CursorList* cursors = style->cursors(); | 1829 CursorList* cursors = style->cursors(); |
1844 if (cursors && cursors->size() > 0) { | 1830 if (cursors && cursors->size() > 0) { |
1845 list = CSSValueList::createCommaSeparated(); | 1831 list = CSSValueList::createCommaSeparated(); |
1846 for (unsigned i = 0; i < cursors->size(); ++i) | 1832 for (unsigned i = 0; i < cursors->size(); ++i) |
1847 if (StyleImage* image = cursors->at(i).image()) | 1833 if (StyleImage* image = cursors->at(i).image()) |
1848 list->append(image->cssValue()); | 1834 list->append(image->cssValue()); |
1849 } | 1835 } |
1850 RefPtr<CSSValue> value = cssValuePool().createValue(style->cursor())
; | 1836 RefPtr<CSSValue> value = cssValuePool().createValue(style->cursor())
; |
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2621 case CSSPropertyCounterReset: | 2607 case CSSPropertyCounterReset: |
2622 return valueForCounterDirectives(*style, propertyID); | 2608 return valueForCounterDirectives(*style, propertyID); |
2623 case CSSPropertyWebkitClipPath: | 2609 case CSSPropertyWebkitClipPath: |
2624 if (ClipPathOperation* operation = style->clipPath()) { | 2610 if (ClipPathOperation* operation = style->clipPath()) { |
2625 if (operation->type() == ClipPathOperation::SHAPE) | 2611 if (operation->type() == ClipPathOperation::SHAPE) |
2626 return valueForBasicShape(*style, toShapeClipPathOperation(o
peration)->basicShape()); | 2612 return valueForBasicShape(*style, toShapeClipPathOperation(o
peration)->basicShape()); |
2627 if (operation->type() == ClipPathOperation::REFERENCE) | 2613 if (operation->type() == ClipPathOperation::REFERENCE) |
2628 return CSSPrimitiveValue::create(toReferenceClipPathOperatio
n(operation)->url(), CSSPrimitiveValue::CSS_URI); | 2614 return CSSPrimitiveValue::create(toReferenceClipPathOperatio
n(operation)->url(), CSSPrimitiveValue::CSS_URI); |
2629 } | 2615 } |
2630 return cssValuePool().createIdentifierValue(CSSValueNone); | 2616 return cssValuePool().createIdentifierValue(CSSValueNone); |
2631 case CSSPropertyWebkitFlowInto: | |
2632 if (style->flowThread().isNull()) | |
2633 return cssValuePool().createIdentifierValue(CSSValueNone); | |
2634 return cssValuePool().createValue(style->flowThread(), CSSPrimitiveV
alue::CSS_STRING); | |
2635 case CSSPropertyWebkitFlowFrom: | |
2636 if (!style->hasFlowFrom()) | |
2637 return cssValuePool().createIdentifierValue(CSSValueNone); | |
2638 return cssValuePool().createValue(style->regionThread(), CSSPrimitiv
eValue::CSS_STRING); | |
2639 case CSSPropertyWebkitRegionFragment: | |
2640 return cssValuePool().createValue(style->regionFragment()); | |
2641 case CSSPropertyWebkitWrapFlow: | 2617 case CSSPropertyWebkitWrapFlow: |
2642 return cssValuePool().createValue(style->wrapFlow()); | 2618 return cssValuePool().createValue(style->wrapFlow()); |
2643 case CSSPropertyShapeMargin: | 2619 case CSSPropertyShapeMargin: |
2644 return cssValuePool().createValue(style->shapeMargin()); | 2620 return cssValuePool().createValue(style->shapeMargin()); |
2645 case CSSPropertyShapePadding: | 2621 case CSSPropertyShapePadding: |
2646 return cssValuePool().createValue(style->shapePadding()); | 2622 return cssValuePool().createValue(style->shapePadding()); |
2647 case CSSPropertyShapeImageThreshold: | 2623 case CSSPropertyShapeImageThreshold: |
2648 return cssValuePool().createValue(style->shapeImageThreshold(), CSSP
rimitiveValue::CSS_NUMBER); | 2624 return cssValuePool().createValue(style->shapeImageThreshold(), CSSP
rimitiveValue::CSS_NUMBER); |
2649 case CSSPropertyShapeInside: | 2625 case CSSPropertyShapeInside: |
2650 if (!style->shapeInside()) | 2626 if (!style->shapeInside()) |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3146 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, | 3122 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, |
3147 CSSPropertyB
ackgroundClip }; | 3123 CSSPropertyB
ackgroundClip }; |
3148 | 3124 |
3149 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); | 3125 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); |
3150 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash
Seperator)))); | 3126 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash
Seperator)))); |
3151 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe
perator)))); | 3127 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe
perator)))); |
3152 return list.release(); | 3128 return list.release(); |
3153 } | 3129 } |
3154 | 3130 |
3155 } // namespace WebCore | 3131 } // namespace WebCore |
OLD | NEW |