| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 #include "CustomFilterTransformParameter.h" | 78 #include "CustomFilterTransformParameter.h" |
| 79 #include "WebKitCSSArrayFunctionValue.h" | 79 #include "WebKitCSSArrayFunctionValue.h" |
| 80 #include "WebKitCSSMixFunctionValue.h" | 80 #include "WebKitCSSMixFunctionValue.h" |
| 81 #endif | 81 #endif |
| 82 | 82 |
| 83 #if ENABLE(CSS_FILTERS) | 83 #if ENABLE(CSS_FILTERS) |
| 84 #include "StyleCustomFilterProgram.h" | 84 #include "StyleCustomFilterProgram.h" |
| 85 #include "WebKitCSSFilterValue.h" | 85 #include "WebKitCSSFilterValue.h" |
| 86 #endif | 86 #endif |
| 87 | 87 |
| 88 #if ENABLE(DASHBOARD_SUPPORT) | |
| 89 #include "DashboardRegion.h" | |
| 90 #endif | |
| 91 | |
| 92 namespace WebCore { | 88 namespace WebCore { |
| 93 | 89 |
| 94 // List of all properties we know how to compute, omitting shorthands. | 90 // List of all properties we know how to compute, omitting shorthands. |
| 95 static const CSSPropertyID computedProperties[] = { | 91 static const CSSPropertyID computedProperties[] = { |
| 96 CSSPropertyBackgroundAttachment, | 92 CSSPropertyBackgroundAttachment, |
| 97 CSSPropertyBackgroundClip, | 93 CSSPropertyBackgroundClip, |
| 98 CSSPropertyBackgroundColor, | 94 CSSPropertyBackgroundColor, |
| 99 CSSPropertyBackgroundImage, | 95 CSSPropertyBackgroundImage, |
| 100 CSSPropertyBackgroundOrigin, | 96 CSSPropertyBackgroundOrigin, |
| 101 CSSPropertyBackgroundPosition, // more-specific background-position-x/y are
non-standard | 97 CSSPropertyBackgroundPosition, // more-specific background-position-x/y are
non-standard |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 CSSPropertyWebkitColumnGap, | 257 CSSPropertyWebkitColumnGap, |
| 262 CSSPropertyWebkitColumnProgression, | 258 CSSPropertyWebkitColumnProgression, |
| 263 CSSPropertyWebkitColumnRuleColor, | 259 CSSPropertyWebkitColumnRuleColor, |
| 264 CSSPropertyWebkitColumnRuleStyle, | 260 CSSPropertyWebkitColumnRuleStyle, |
| 265 CSSPropertyWebkitColumnRuleWidth, | 261 CSSPropertyWebkitColumnRuleWidth, |
| 266 CSSPropertyWebkitColumnSpan, | 262 CSSPropertyWebkitColumnSpan, |
| 267 CSSPropertyWebkitColumnWidth, | 263 CSSPropertyWebkitColumnWidth, |
| 268 #if ENABLE(CURSOR_VISIBILITY) | 264 #if ENABLE(CURSOR_VISIBILITY) |
| 269 CSSPropertyWebkitCursorVisibility, | 265 CSSPropertyWebkitCursorVisibility, |
| 270 #endif | 266 #endif |
| 271 #if ENABLE(DASHBOARD_SUPPORT) | |
| 272 CSSPropertyWebkitDashboardRegion, | |
| 273 #endif | |
| 274 #if ENABLE(CSS_FILTERS) | 267 #if ENABLE(CSS_FILTERS) |
| 275 CSSPropertyWebkitFilter, | 268 CSSPropertyWebkitFilter, |
| 276 #endif | 269 #endif |
| 277 CSSPropertyWebkitAlignContent, | 270 CSSPropertyWebkitAlignContent, |
| 278 CSSPropertyWebkitAlignItems, | 271 CSSPropertyWebkitAlignItems, |
| 279 CSSPropertyWebkitAlignSelf, | 272 CSSPropertyWebkitAlignSelf, |
| 280 CSSPropertyWebkitFlexBasis, | 273 CSSPropertyWebkitFlexBasis, |
| 281 CSSPropertyWebkitFlexGrow, | 274 CSSPropertyWebkitFlexGrow, |
| 282 CSSPropertyWebkitFlexShrink, | 275 CSSPropertyWebkitFlexShrink, |
| 283 CSSPropertyWebkitFlexDirection, | 276 CSSPropertyWebkitFlexDirection, |
| (...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2302 case CSSPropertyZIndex: | 2295 case CSSPropertyZIndex: |
| 2303 if (style->hasAutoZIndex()) | 2296 if (style->hasAutoZIndex()) |
| 2304 return cssValuePool().createIdentifierValue(CSSValueAuto); | 2297 return cssValuePool().createIdentifierValue(CSSValueAuto); |
| 2305 return cssValuePool().createValue(style->zIndex(), CSSPrimitiveValue
::CSS_NUMBER); | 2298 return cssValuePool().createValue(style->zIndex(), CSSPrimitiveValue
::CSS_NUMBER); |
| 2306 case CSSPropertyZoom: | 2299 case CSSPropertyZoom: |
| 2307 return cssValuePool().createValue(style->zoom(), CSSPrimitiveValue::
CSS_NUMBER); | 2300 return cssValuePool().createValue(style->zoom(), CSSPrimitiveValue::
CSS_NUMBER); |
| 2308 case CSSPropertyBoxSizing: | 2301 case CSSPropertyBoxSizing: |
| 2309 if (style->boxSizing() == CONTENT_BOX) | 2302 if (style->boxSizing() == CONTENT_BOX) |
| 2310 return cssValuePool().createIdentifierValue(CSSValueContentBox); | 2303 return cssValuePool().createIdentifierValue(CSSValueContentBox); |
| 2311 return cssValuePool().createIdentifierValue(CSSValueBorderBox); | 2304 return cssValuePool().createIdentifierValue(CSSValueBorderBox); |
| 2312 #if ENABLE(DASHBOARD_SUPPORT) | |
| 2313 case CSSPropertyWebkitDashboardRegion: | |
| 2314 { | |
| 2315 const Vector<StyleDashboardRegion>& regions = style->dashboardRegion
s(); | |
| 2316 unsigned count = regions.size(); | |
| 2317 if (count == 1 && regions[0].type == StyleDashboardRegion::None) | |
| 2318 return cssValuePool().createIdentifierValue(CSSValueNone); | |
| 2319 | |
| 2320 RefPtr<DashboardRegion> firstRegion; | |
| 2321 DashboardRegion* previousRegion = 0; | |
| 2322 for (unsigned i = 0; i < count; i++) { | |
| 2323 RefPtr<DashboardRegion> region = DashboardRegion::create(); | |
| 2324 StyleDashboardRegion styleRegion = regions[i]; | |
| 2325 | |
| 2326 region->m_label = styleRegion.label; | |
| 2327 LengthBox offset = styleRegion.offset; | |
| 2328 region->setTop(zoomAdjustedPixelValue(offset.top().value(), styl
e.get())); | |
| 2329 region->setRight(zoomAdjustedPixelValue(offset.right().value(),
style.get())); | |
| 2330 region->setBottom(zoomAdjustedPixelValue(offset.bottom().value()
, style.get())); | |
| 2331 region->setLeft(zoomAdjustedPixelValue(offset.left().value(), st
yle.get())); | |
| 2332 region->m_isRectangle = (styleRegion.type == StyleDashboardRegio
n::Rectangle); | |
| 2333 region->m_isCircle = (styleRegion.type == StyleDashboardRegion::
Circle); | |
| 2334 | |
| 2335 if (previousRegion) | |
| 2336 previousRegion->m_next = region; | |
| 2337 else | |
| 2338 firstRegion = region; | |
| 2339 previousRegion = region.get(); | |
| 2340 } | |
| 2341 return cssValuePool().createValue(firstRegion.release()); | |
| 2342 } | |
| 2343 #endif | |
| 2344 #if ENABLE(DRAGGABLE_REGION) | 2305 #if ENABLE(DRAGGABLE_REGION) |
| 2345 case CSSPropertyWebkitAppRegion: | 2306 case CSSPropertyWebkitAppRegion: |
| 2346 return cssValuePool().createIdentifierValue(style->getDraggableRegio
nMode() == DraggableRegionDrag ? CSSValueDrag : CSSValueNoDrag); | 2307 return cssValuePool().createIdentifierValue(style->getDraggableRegio
nMode() == DraggableRegionDrag ? CSSValueDrag : CSSValueNoDrag); |
| 2347 #endif | 2308 #endif |
| 2348 case CSSPropertyWebkitAnimationDelay: | 2309 case CSSPropertyWebkitAnimationDelay: |
| 2349 return getDelayValue(style->animations()); | 2310 return getDelayValue(style->animations()); |
| 2350 case CSSPropertyWebkitAnimationDirection: { | 2311 case CSSPropertyWebkitAnimationDirection: { |
| 2351 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); | 2312 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); |
| 2352 const AnimationList* t = style->animations(); | 2313 const AnimationList* t = style->animations(); |
| 2353 if (t) { | 2314 if (t) { |
| (...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3066 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, | 3027 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, |
| 3067 CSSPropertyB
ackgroundClip }; | 3028 CSSPropertyB
ackgroundClip }; |
| 3068 | 3029 |
| 3069 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); | 3030 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); |
| 3070 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlashSeperat
or)))); | 3031 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlashSeperat
or)))); |
| 3071 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSeperator
)))); | 3032 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSeperator
)))); |
| 3072 return list.release(); | 3033 return list.release(); |
| 3073 } | 3034 } |
| 3074 | 3035 |
| 3075 } // namespace WebCore | 3036 } // namespace WebCore |
| OLD | NEW |