| 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 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; | 1340 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated()
; |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1813 case CSSPropertyWebkitColumnBreakBefore: | 1805 case CSSPropertyWebkitColumnBreakBefore: |
| 1814 return cssValuePool().createValue(style->columnBreakBefore()); | 1806 return cssValuePool().createValue(style->columnBreakBefore()); |
| 1815 case CSSPropertyWebkitColumnBreakInside: | 1807 case CSSPropertyWebkitColumnBreakInside: |
| 1816 return cssValuePool().createValue(style->columnBreakInside()); | 1808 return cssValuePool().createValue(style->columnBreakInside()); |
| 1817 case CSSPropertyWebkitColumnWidth: | 1809 case CSSPropertyWebkitColumnWidth: |
| 1818 if (style->hasAutoColumnWidth()) | 1810 if (style->hasAutoColumnWidth()) |
| 1819 return cssValuePool().createIdentifierValue(CSSValueAuto); | 1811 return cssValuePool().createIdentifierValue(CSSValueAuto); |
| 1820 return zoomAdjustedPixelValue(style->columnWidth(), *style); | 1812 return zoomAdjustedPixelValue(style->columnWidth(), *style); |
| 1821 case CSSPropertyTabSize: | 1813 case CSSPropertyTabSize: |
| 1822 return cssValuePool().createValue(style->tabSize(), CSSPrimitiveValu
e::CSS_NUMBER); | 1814 return cssValuePool().createValue(style->tabSize(), CSSPrimitiveValu
e::CSS_NUMBER); |
| 1823 case CSSPropertyWebkitRegionBreakAfter: | |
| 1824 return cssValuePool().createValue(style->regionBreakAfter()); | |
| 1825 case CSSPropertyWebkitRegionBreakBefore: | |
| 1826 return cssValuePool().createValue(style->regionBreakBefore()); | |
| 1827 case CSSPropertyWebkitRegionBreakInside: | |
| 1828 return cssValuePool().createValue(style->regionBreakInside()); | |
| 1829 case CSSPropertyCursor: { | 1815 case CSSPropertyCursor: { |
| 1830 RefPtrWillBeRawPtr<CSSValueList> list; | 1816 RefPtrWillBeRawPtr<CSSValueList> list; |
| 1831 CursorList* cursors = style->cursors(); | 1817 CursorList* cursors = style->cursors(); |
| 1832 if (cursors && cursors->size() > 0) { | 1818 if (cursors && cursors->size() > 0) { |
| 1833 list = CSSValueList::createCommaSeparated(); | 1819 list = CSSValueList::createCommaSeparated(); |
| 1834 for (unsigned i = 0; i < cursors->size(); ++i) | 1820 for (unsigned i = 0; i < cursors->size(); ++i) |
| 1835 if (StyleImage* image = cursors->at(i).image()) | 1821 if (StyleImage* image = cursors->at(i).image()) |
| 1836 list->append(image->cssValue()); | 1822 list->append(image->cssValue()); |
| 1837 } | 1823 } |
| 1838 RefPtr<CSSValue> value = cssValuePool().createValue(style->cursor())
; | 1824 RefPtr<CSSValue> value = cssValuePool().createValue(style->cursor())
; |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2609 case CSSPropertyCounterReset: | 2595 case CSSPropertyCounterReset: |
| 2610 return valueForCounterDirectives(*style, propertyID); | 2596 return valueForCounterDirectives(*style, propertyID); |
| 2611 case CSSPropertyWebkitClipPath: | 2597 case CSSPropertyWebkitClipPath: |
| 2612 if (ClipPathOperation* operation = style->clipPath()) { | 2598 if (ClipPathOperation* operation = style->clipPath()) { |
| 2613 if (operation->type() == ClipPathOperation::SHAPE) | 2599 if (operation->type() == ClipPathOperation::SHAPE) |
| 2614 return valueForBasicShape(*style, toShapeClipPathOperation(o
peration)->basicShape()); | 2600 return valueForBasicShape(*style, toShapeClipPathOperation(o
peration)->basicShape()); |
| 2615 if (operation->type() == ClipPathOperation::REFERENCE) | 2601 if (operation->type() == ClipPathOperation::REFERENCE) |
| 2616 return CSSPrimitiveValue::create(toReferenceClipPathOperatio
n(operation)->url(), CSSPrimitiveValue::CSS_URI); | 2602 return CSSPrimitiveValue::create(toReferenceClipPathOperatio
n(operation)->url(), CSSPrimitiveValue::CSS_URI); |
| 2617 } | 2603 } |
| 2618 return cssValuePool().createIdentifierValue(CSSValueNone); | 2604 return cssValuePool().createIdentifierValue(CSSValueNone); |
| 2619 case CSSPropertyWebkitFlowInto: | |
| 2620 if (style->flowThread().isNull()) | |
| 2621 return cssValuePool().createIdentifierValue(CSSValueNone); | |
| 2622 return cssValuePool().createValue(style->flowThread(), CSSPrimitiveV
alue::CSS_STRING); | |
| 2623 case CSSPropertyWebkitFlowFrom: | |
| 2624 if (!style->hasFlowFrom()) | |
| 2625 return cssValuePool().createIdentifierValue(CSSValueNone); | |
| 2626 return cssValuePool().createValue(style->regionThread(), CSSPrimitiv
eValue::CSS_STRING); | |
| 2627 case CSSPropertyWebkitRegionFragment: | |
| 2628 return cssValuePool().createValue(style->regionFragment()); | |
| 2629 case CSSPropertyWebkitWrapFlow: | 2605 case CSSPropertyWebkitWrapFlow: |
| 2630 return cssValuePool().createValue(style->wrapFlow()); | 2606 return cssValuePool().createValue(style->wrapFlow()); |
| 2631 case CSSPropertyShapeMargin: | 2607 case CSSPropertyShapeMargin: |
| 2632 return cssValuePool().createValue(style->shapeMargin()); | 2608 return cssValuePool().createValue(style->shapeMargin()); |
| 2633 case CSSPropertyShapePadding: | 2609 case CSSPropertyShapePadding: |
| 2634 return cssValuePool().createValue(style->shapePadding()); | 2610 return cssValuePool().createValue(style->shapePadding()); |
| 2635 case CSSPropertyShapeImageThreshold: | 2611 case CSSPropertyShapeImageThreshold: |
| 2636 return cssValuePool().createValue(style->shapeImageThreshold(), CSSP
rimitiveValue::CSS_NUMBER); | 2612 return cssValuePool().createValue(style->shapeImageThreshold(), CSSP
rimitiveValue::CSS_NUMBER); |
| 2637 case CSSPropertyShapeInside: | 2613 case CSSPropertyShapeInside: |
| 2638 if (!style->shapeInside()) | 2614 if (!style->shapeInside()) |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3052 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, | 3028 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, |
| 3053 CSSPropertyB
ackgroundClip }; | 3029 CSSPropertyB
ackgroundClip }; |
| 3054 | 3030 |
| 3055 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSlashSeparated()
; | 3031 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSlashSeparated()
; |
| 3056 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash
Seperator)))); | 3032 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash
Seperator)))); |
| 3057 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe
perator)))); | 3033 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa
ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe
perator)))); |
| 3058 return list.release(); | 3034 return list.release(); |
| 3059 } | 3035 } |
| 3060 | 3036 |
| 3061 } // namespace WebCore | 3037 } // namespace WebCore |
| OLD | NEW |