Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Side by Side Diff: Source/core/css/CSSComputedStyleDeclaration.cpp

Issue 15012010: Remove the CSS_COMPOSITING define, leaving the implementation under the runtime flag, since runtime… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: removed bogus test Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 #include "core/css/WebKitCSSFilterValue.h" 79 #include "core/css/WebKitCSSFilterValue.h"
80 #include "core/rendering/style/StyleCustomFilterProgram.h" 80 #include "core/rendering/style/StyleCustomFilterProgram.h"
81 81
82 namespace WebCore { 82 namespace WebCore {
83 83
84 // List of all properties we know how to compute, omitting shorthands. 84 // List of all properties we know how to compute, omitting shorthands.
85 // NOTE: Do not use this list, use computableProperties() instead 85 // NOTE: Do not use this list, use computableProperties() instead
86 // to respect runtime enabling of CSS properties. 86 // to respect runtime enabling of CSS properties.
87 static const CSSPropertyID staticComputableProperties[] = { 87 static const CSSPropertyID staticComputableProperties[] = {
88 CSSPropertyBackgroundAttachment, 88 CSSPropertyBackgroundAttachment,
89 #if ENABLE(CSS_COMPOSITING)
90 CSSPropertyBackgroundBlendMode, 89 CSSPropertyBackgroundBlendMode,
91 #endif
92 CSSPropertyBackgroundClip, 90 CSSPropertyBackgroundClip,
93 CSSPropertyBackgroundColor, 91 CSSPropertyBackgroundColor,
94 CSSPropertyBackgroundImage, 92 CSSPropertyBackgroundImage,
95 CSSPropertyBackgroundOrigin, 93 CSSPropertyBackgroundOrigin,
96 CSSPropertyBackgroundPosition, // more-specific background-position-x/y are non-standard 94 CSSPropertyBackgroundPosition, // more-specific background-position-x/y are non-standard
97 CSSPropertyBackgroundRepeat, 95 CSSPropertyBackgroundRepeat,
98 CSSPropertyBackgroundSize, 96 CSSPropertyBackgroundSize,
99 CSSPropertyBorderBottomColor, 97 CSSPropertyBorderBottomColor,
100 CSSPropertyBorderBottomLeftRadius, 98 CSSPropertyBorderBottomLeftRadius,
101 CSSPropertyBorderBottomRightRadius, 99 CSSPropertyBorderBottomRightRadius,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 CSSPropertyListStylePosition, 142 CSSPropertyListStylePosition,
145 CSSPropertyListStyleType, 143 CSSPropertyListStyleType,
146 CSSPropertyMarginBottom, 144 CSSPropertyMarginBottom,
147 CSSPropertyMarginLeft, 145 CSSPropertyMarginLeft,
148 CSSPropertyMarginRight, 146 CSSPropertyMarginRight,
149 CSSPropertyMarginTop, 147 CSSPropertyMarginTop,
150 CSSPropertyMaxHeight, 148 CSSPropertyMaxHeight,
151 CSSPropertyMaxWidth, 149 CSSPropertyMaxWidth,
152 CSSPropertyMinHeight, 150 CSSPropertyMinHeight,
153 CSSPropertyMinWidth, 151 CSSPropertyMinWidth,
154 #if ENABLE(CSS_COMPOSITING)
155 CSSPropertyMixBlendMode, 152 CSSPropertyMixBlendMode,
156 #endif
157 CSSPropertyOpacity, 153 CSSPropertyOpacity,
158 CSSPropertyOrphans, 154 CSSPropertyOrphans,
159 CSSPropertyOutlineColor, 155 CSSPropertyOutlineColor,
160 CSSPropertyOutlineOffset, 156 CSSPropertyOutlineOffset,
161 CSSPropertyOutlineStyle, 157 CSSPropertyOutlineStyle,
162 CSSPropertyOutlineWidth, 158 CSSPropertyOutlineWidth,
163 CSSPropertyOverflowWrap, 159 CSSPropertyOverflowWrap,
164 CSSPropertyOverflowX, 160 CSSPropertyOverflowX,
165 CSSPropertyOverflowY, 161 CSSPropertyOverflowY,
166 CSSPropertyPaddingBottom, 162 CSSPropertyPaddingBottom,
(...skipping 2431 matching lines...) Expand 10 before | Expand all | Expand 10 after
2598 return valueForBasicShape(style->shapeInside()->shape()); 2594 return valueForBasicShape(style->shapeInside()->shape());
2599 case CSSPropertyWebkitShapeOutside: 2595 case CSSPropertyWebkitShapeOutside:
2600 if (!style->shapeOutside()) 2596 if (!style->shapeOutside())
2601 return cssValuePool().createIdentifierValue(CSSValueAuto); 2597 return cssValuePool().createIdentifierValue(CSSValueAuto);
2602 ASSERT(style->shapeOutside()->type() == ExclusionShapeValue::SHAPE); 2598 ASSERT(style->shapeOutside()->type() == ExclusionShapeValue::SHAPE);
2603 return valueForBasicShape(style->shapeOutside()->shape()); 2599 return valueForBasicShape(style->shapeOutside()->shape());
2604 case CSSPropertyWebkitWrapThrough: 2600 case CSSPropertyWebkitWrapThrough:
2605 return cssValuePool().createValue(style->wrapThrough()); 2601 return cssValuePool().createValue(style->wrapThrough());
2606 case CSSPropertyWebkitFilter: 2602 case CSSPropertyWebkitFilter:
2607 return valueForFilter(renderer, style.get()); 2603 return valueForFilter(renderer, style.get());
2608 #if ENABLE(CSS_COMPOSITING)
2609 case CSSPropertyMixBlendMode: 2604 case CSSPropertyMixBlendMode:
2610 return cssValuePool().createValue(style->blendMode()); 2605 return cssValuePool().createValue(style->blendMode());
2611 2606
2612 case CSSPropertyBackgroundBlendMode: { 2607 case CSSPropertyBackgroundBlendMode: {
2613 const FillLayer* layers = style->backgroundLayers(); 2608 const FillLayer* layers = style->backgroundLayers();
2614 if (!layers->next()) 2609 if (!layers->next())
2615 return cssValuePool().createValue(layers->blendMode()); 2610 return cssValuePool().createValue(layers->blendMode());
2616 2611
2617 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated(); 2612 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
2618 for (const FillLayer* currLayer = layers; currLayer; currLayer = cur rLayer->next()) 2613 for (const FillLayer* currLayer = layers; currLayer; currLayer = cur rLayer->next())
2619 list->append(cssValuePool().createValue(currLayer->blendMode())) ; 2614 list->append(cssValuePool().createValue(currLayer->blendMode())) ;
2620 2615
2621 return list.release(); 2616 return list.release();
2622 } 2617 }
2623 #endif
2624 case CSSPropertyBackground: 2618 case CSSPropertyBackground:
2625 return getBackgroundShorthandValue(); 2619 return getBackgroundShorthandValue();
2626 case CSSPropertyBorder: { 2620 case CSSPropertyBorder: {
2627 RefPtr<CSSValue> value = getPropertyCSSValue(CSSPropertyBorderTop, D oNotUpdateLayout); 2621 RefPtr<CSSValue> value = getPropertyCSSValue(CSSPropertyBorderTop, D oNotUpdateLayout);
2628 const CSSPropertyID properties[3] = { CSSPropertyBorderRight, CSSPro pertyBorderBottom, 2622 const CSSPropertyID properties[3] = { CSSPropertyBorderRight, CSSPro pertyBorderBottom,
2629 CSSPropertyBorderLeft }; 2623 CSSPropertyBorderLeft };
2630 for (size_t i = 0; i < WTF_ARRAY_LENGTH(properties); ++i) { 2624 for (size_t i = 0; i < WTF_ARRAY_LENGTH(properties); ++i) {
2631 if (!compareCSSValuePtr<CSSValue>(value, getPropertyCSSValue(pro perties[i], DoNotUpdateLayout))) 2625 if (!compareCSSValuePtr<CSSValue>(value, getPropertyCSSValue(pro perties[i], DoNotUpdateLayout)))
2632 return 0; 2626 return 0;
2633 } 2627 }
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
2999 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 2993 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
3000 CSSPropertyB ackgroundClip }; 2994 CSSPropertyB ackgroundClip };
3001 2995
3002 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); 2996 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
3003 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlashSeperat or)))); 2997 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlashSeperat or))));
3004 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSeperator )))); 2998 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSeperator ))));
3005 return list.release(); 2999 return list.release();
3006 } 3000 }
3007 3001
3008 } // namespace WebCore 3002 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/webexposed/css-properties-as-js-properties-expected.txt ('k') | Source/core/css/CSSParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698