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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 CSSPropertyWebkitTransformOrigin, | 322 CSSPropertyWebkitTransformOrigin, |
323 CSSPropertyWebkitTransformStyle, | 323 CSSPropertyWebkitTransformStyle, |
324 CSSPropertyWebkitTransitionDelay, | 324 CSSPropertyWebkitTransitionDelay, |
325 CSSPropertyWebkitTransitionDuration, | 325 CSSPropertyWebkitTransitionDuration, |
326 CSSPropertyWebkitTransitionProperty, | 326 CSSPropertyWebkitTransitionProperty, |
327 CSSPropertyWebkitTransitionTimingFunction, | 327 CSSPropertyWebkitTransitionTimingFunction, |
328 CSSPropertyWebkitUserDrag, | 328 CSSPropertyWebkitUserDrag, |
329 CSSPropertyWebkitUserModify, | 329 CSSPropertyWebkitUserModify, |
330 CSSPropertyWebkitUserSelect, | 330 CSSPropertyWebkitUserSelect, |
331 CSSPropertyWebkitWritingMode, | 331 CSSPropertyWebkitWritingMode, |
332 CSSPropertyWebkitFlowInto, | |
333 CSSPropertyWebkitFlowFrom, | |
334 CSSPropertyWebkitRegionBreakAfter, | |
335 CSSPropertyWebkitRegionBreakBefore, | |
336 CSSPropertyWebkitRegionBreakInside, | |
337 CSSPropertyWebkitRegionFragment, | |
338 CSSPropertyWebkitAppRegion, | 332 CSSPropertyWebkitAppRegion, |
339 CSSPropertyWebkitWrapFlow, | 333 CSSPropertyWebkitWrapFlow, |
340 CSSPropertyWebkitWrapThrough, | 334 CSSPropertyWebkitWrapThrough, |
341 CSSPropertyBufferedRendering, | 335 CSSPropertyBufferedRendering, |
342 CSSPropertyClipPath, | 336 CSSPropertyClipPath, |
343 CSSPropertyClipRule, | 337 CSSPropertyClipRule, |
344 CSSPropertyMask, | 338 CSSPropertyMask, |
345 CSSPropertyFilter, | 339 CSSPropertyFilter, |
346 CSSPropertyFloodColor, | 340 CSSPropertyFloodColor, |
347 CSSPropertyFloodOpacity, | 341 CSSPropertyFloodOpacity, |
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1327 const CounterContent* counter = static_cast<const CounterContentData
*>(contentData)->counter(); | 1321 const CounterContent* counter = static_cast<const CounterContentData
*>(contentData)->counter(); |
1328 ASSERT(counter); | 1322 ASSERT(counter); |
1329 list->append(cssValuePool().createValue(counter->identifier(), CSSPr
imitiveValue::CSS_COUNTER_NAME)); | 1323 list->append(cssValuePool().createValue(counter->identifier(), CSSPr
imitiveValue::CSS_COUNTER_NAME)); |
1330 } else if (contentData->isImage()) { | 1324 } else if (contentData->isImage()) { |
1331 const StyleImage* image = static_cast<const ImageContentData*>(conte
ntData)->image(); | 1325 const StyleImage* image = static_cast<const ImageContentData*>(conte
ntData)->image(); |
1332 ASSERT(image); | 1326 ASSERT(image); |
1333 list->append(image->cssValue()); | 1327 list->append(image->cssValue()); |
1334 } else if (contentData->isText()) | 1328 } else if (contentData->isText()) |
1335 list->append(cssValuePool().createValue(static_cast<const TextConten
tData*>(contentData)->text(), CSSPrimitiveValue::CSS_STRING)); | 1329 list->append(cssValuePool().createValue(static_cast<const TextConten
tData*>(contentData)->text(), CSSPrimitiveValue::CSS_STRING)); |
1336 } | 1330 } |
1337 if (style.hasFlowFrom()) | |
1338 list->append(cssValuePool().createValue(style.regionThread(), CSSPrimiti
veValue::CSS_STRING)); | |
1339 return list.release(); | 1331 return list.release(); |
1340 } | 1332 } |
1341 | 1333 |
1342 static PassRefPtr<CSSValue> valueForCounterDirectives(const RenderStyle& style,
CSSPropertyID propertyID) | 1334 static PassRefPtr<CSSValue> valueForCounterDirectives(const RenderStyle& style,
CSSPropertyID propertyID) |
1343 { | 1335 { |
1344 const CounterDirectiveMap* map = style.counterDirectives(); | 1336 const CounterDirectiveMap* map = style.counterDirectives(); |
1345 if (!map) | 1337 if (!map) |
1346 return 0; | 1338 return 0; |
1347 | 1339 |
1348 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); | 1340 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1796 return cssValuePool().createColorValue(m_allowVisitedStyle ? style->
visitedDependentColor(CSSPropertyColor).rgb() : style->color().rgb()); | 1788 return cssValuePool().createColorValue(m_allowVisitedStyle ? style->
visitedDependentColor(CSSPropertyColor).rgb() : style->color().rgb()); |
1797 case CSSPropertyWebkitPrintColorAdjust: | 1789 case CSSPropertyWebkitPrintColorAdjust: |
1798 return cssValuePool().createValue(style->printColorAdjust()); | 1790 return cssValuePool().createValue(style->printColorAdjust()); |
1799 case CSSPropertyWebkitColumnAxis: | 1791 case CSSPropertyWebkitColumnAxis: |
1800 return cssValuePool().createValue(style->columnAxis()); | 1792 return cssValuePool().createValue(style->columnAxis()); |
1801 case CSSPropertyWebkitColumnCount: | 1793 case CSSPropertyWebkitColumnCount: |
1802 if (style->hasAutoColumnCount()) | 1794 if (style->hasAutoColumnCount()) |
1803 return cssValuePool().createIdentifierValue(CSSValueAuto); | 1795 return cssValuePool().createIdentifierValue(CSSValueAuto); |
1804 return cssValuePool().createValue(style->columnCount(), CSSPrimitive
Value::CSS_NUMBER); | 1796 return cssValuePool().createValue(style->columnCount(), CSSPrimitive
Value::CSS_NUMBER); |
1805 case CSSPropertyColumnFill: | 1797 case CSSPropertyColumnFill: |
1806 if (RuntimeEnabledFeatures::regionBasedColumnsEnabled()) | |
1807 return cssValuePool().createValue(style->columnFill()); | |
1808 return 0; | 1798 return 0; |
1809 case CSSPropertyWebkitColumnGap: | 1799 case CSSPropertyWebkitColumnGap: |
1810 if (style->hasNormalColumnGap()) | 1800 if (style->hasNormalColumnGap()) |
1811 return cssValuePool().createIdentifierValue(CSSValueNormal); | 1801 return cssValuePool().createIdentifierValue(CSSValueNormal); |
1812 return zoomAdjustedPixelValue(style->columnGap(), *style); | 1802 return zoomAdjustedPixelValue(style->columnGap(), *style); |
1813 case CSSPropertyWebkitColumnProgression: | 1803 case CSSPropertyWebkitColumnProgression: |
1814 return cssValuePool().createValue(style->columnProgression()); | 1804 return cssValuePool().createValue(style->columnProgression()); |
1815 case CSSPropertyWebkitColumnRuleColor: | 1805 case CSSPropertyWebkitColumnRuleColor: |
1816 return m_allowVisitedStyle ? cssValuePool().createColorValue(style->
visitedDependentColor(CSSPropertyOutlineColor).rgb()) : currentColorOrValidColor
(*style, style->columnRuleColor()); | 1806 return m_allowVisitedStyle ? cssValuePool().createColorValue(style->
visitedDependentColor(CSSPropertyOutlineColor).rgb()) : currentColorOrValidColor
(*style, style->columnRuleColor()); |
1817 case CSSPropertyWebkitColumnRuleStyle: | 1807 case CSSPropertyWebkitColumnRuleStyle: |
1818 return cssValuePool().createValue(style->columnRuleStyle()); | 1808 return cssValuePool().createValue(style->columnRuleStyle()); |
1819 case CSSPropertyWebkitColumnRuleWidth: | 1809 case CSSPropertyWebkitColumnRuleWidth: |
1820 return zoomAdjustedPixelValue(style->columnRuleWidth(), *style); | 1810 return zoomAdjustedPixelValue(style->columnRuleWidth(), *style); |
1821 case CSSPropertyWebkitColumnSpan: | 1811 case CSSPropertyWebkitColumnSpan: |
1822 return cssValuePool().createIdentifierValue(style->columnSpan() ? CS
SValueAll : CSSValueNone); | 1812 return cssValuePool().createIdentifierValue(style->columnSpan() ? CS
SValueAll : CSSValueNone); |
1823 case CSSPropertyWebkitColumnBreakAfter: | 1813 case CSSPropertyWebkitColumnBreakAfter: |
1824 return cssValuePool().createValue(style->columnBreakAfter()); | 1814 return cssValuePool().createValue(style->columnBreakAfter()); |
1825 case CSSPropertyWebkitColumnBreakBefore: | 1815 case CSSPropertyWebkitColumnBreakBefore: |
1826 return cssValuePool().createValue(style->columnBreakBefore()); | 1816 return cssValuePool().createValue(style->columnBreakBefore()); |
1827 case CSSPropertyWebkitColumnBreakInside: | 1817 case CSSPropertyWebkitColumnBreakInside: |
1828 return cssValuePool().createValue(style->columnBreakInside()); | 1818 return cssValuePool().createValue(style->columnBreakInside()); |
1829 case CSSPropertyWebkitColumnWidth: | 1819 case CSSPropertyWebkitColumnWidth: |
1830 if (style->hasAutoColumnWidth()) | 1820 if (style->hasAutoColumnWidth()) |
1831 return cssValuePool().createIdentifierValue(CSSValueAuto); | 1821 return cssValuePool().createIdentifierValue(CSSValueAuto); |
1832 return zoomAdjustedPixelValue(style->columnWidth(), *style); | 1822 return zoomAdjustedPixelValue(style->columnWidth(), *style); |
1833 case CSSPropertyTabSize: | 1823 case CSSPropertyTabSize: |
1834 return cssValuePool().createValue(style->tabSize(), CSSPrimitiveValu
e::CSS_NUMBER); | 1824 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: { | 1825 case CSSPropertyCursor: { |
1842 RefPtr<CSSValueList> list; | 1826 RefPtr<CSSValueList> list; |
1843 CursorList* cursors = style->cursors(); | 1827 CursorList* cursors = style->cursors(); |
1844 if (cursors && cursors->size() > 0) { | 1828 if (cursors && cursors->size() > 0) { |
1845 list = CSSValueList::createCommaSeparated(); | 1829 list = CSSValueList::createCommaSeparated(); |
1846 for (unsigned i = 0; i < cursors->size(); ++i) | 1830 for (unsigned i = 0; i < cursors->size(); ++i) |
1847 if (StyleImage* image = cursors->at(i).image()) | 1831 if (StyleImage* image = cursors->at(i).image()) |
1848 list->append(image->cssValue()); | 1832 list->append(image->cssValue()); |
1849 } | 1833 } |
1850 RefPtr<CSSValue> value = cssValuePool().createValue(style->cursor())
; | 1834 RefPtr<CSSValue> value = cssValuePool().createValue(style->cursor())
; |
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2619 case CSSPropertyCounterReset: | 2603 case CSSPropertyCounterReset: |
2620 return valueForCounterDirectives(*style, propertyID); | 2604 return valueForCounterDirectives(*style, propertyID); |
2621 case CSSPropertyWebkitClipPath: | 2605 case CSSPropertyWebkitClipPath: |
2622 if (ClipPathOperation* operation = style->clipPath()) { | 2606 if (ClipPathOperation* operation = style->clipPath()) { |
2623 if (operation->type() == ClipPathOperation::SHAPE) | 2607 if (operation->type() == ClipPathOperation::SHAPE) |
2624 return valueForBasicShape(*style, toShapeClipPathOperation(o
peration)->basicShape()); | 2608 return valueForBasicShape(*style, toShapeClipPathOperation(o
peration)->basicShape()); |
2625 if (operation->type() == ClipPathOperation::REFERENCE) | 2609 if (operation->type() == ClipPathOperation::REFERENCE) |
2626 return CSSPrimitiveValue::create(toReferenceClipPathOperatio
n(operation)->url(), CSSPrimitiveValue::CSS_URI); | 2610 return CSSPrimitiveValue::create(toReferenceClipPathOperatio
n(operation)->url(), CSSPrimitiveValue::CSS_URI); |
2627 } | 2611 } |
2628 return cssValuePool().createIdentifierValue(CSSValueNone); | 2612 return cssValuePool().createIdentifierValue(CSSValueNone); |
2629 case CSSPropertyWebkitFlowInto: | |
2630 if (style->flowThread().isNull()) | |
2631 return cssValuePool().createIdentifierValue(CSSValueNone); | |
2632 return cssValuePool().createValue(style->flowThread(), CSSPrimitiveV
alue::CSS_STRING); | |
2633 case CSSPropertyWebkitFlowFrom: | |
2634 if (!style->hasFlowFrom()) | |
2635 return cssValuePool().createIdentifierValue(CSSValueNone); | |
2636 return cssValuePool().createValue(style->regionThread(), CSSPrimitiv
eValue::CSS_STRING); | |
2637 case CSSPropertyWebkitRegionFragment: | |
2638 return cssValuePool().createValue(style->regionFragment()); | |
2639 case CSSPropertyWebkitWrapFlow: | 2613 case CSSPropertyWebkitWrapFlow: |
2640 return cssValuePool().createValue(style->wrapFlow()); | 2614 return cssValuePool().createValue(style->wrapFlow()); |
2641 case CSSPropertyShapeMargin: | 2615 case CSSPropertyShapeMargin: |
2642 return cssValuePool().createValue(style->shapeMargin()); | 2616 return cssValuePool().createValue(style->shapeMargin()); |
2643 case CSSPropertyShapePadding: | 2617 case CSSPropertyShapePadding: |
2644 return cssValuePool().createValue(style->shapePadding()); | 2618 return cssValuePool().createValue(style->shapePadding()); |
2645 case CSSPropertyShapeImageThreshold: | 2619 case CSSPropertyShapeImageThreshold: |
2646 return cssValuePool().createValue(style->shapeImageThreshold(), CSSP
rimitiveValue::CSS_NUMBER); | 2620 return cssValuePool().createValue(style->shapeImageThreshold(), CSSP
rimitiveValue::CSS_NUMBER); |
2647 case CSSPropertyShapeInside: | 2621 case CSSPropertyShapeInside: |
2648 if (!style->shapeInside()) | 2622 if (!style->shapeInside()) |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3144 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, | 3118 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, |
3145 CSSPropertyB
ackgroundClip }; | 3119 CSSPropertyB
ackgroundClip }; |
3146 | 3120 |
3147 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); | 3121 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); |
3148 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash
Seperator)))); | 3122 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash
Seperator)))); |
3149 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe
perator)))); | 3123 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe
perator)))); |
3150 return list.release(); | 3124 return list.release(); |
3151 } | 3125 } |
3152 | 3126 |
3153 } // namespace WebCore | 3127 } // namespace WebCore |
OLD | NEW |