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

Side by Side Diff: sky/engine/core/css/CSSComputedStyleDeclaration.cpp

Issue 731863003: Remove CSSCompositing (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: preland Created 6 years, 1 month 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 static const CSSPropertyID staticComputableProperties[] = { 69 static const CSSPropertyID staticComputableProperties[] = {
70 CSSPropertyAnimationDelay, 70 CSSPropertyAnimationDelay,
71 CSSPropertyAnimationDirection, 71 CSSPropertyAnimationDirection,
72 CSSPropertyAnimationDuration, 72 CSSPropertyAnimationDuration,
73 CSSPropertyAnimationFillMode, 73 CSSPropertyAnimationFillMode,
74 CSSPropertyAnimationIterationCount, 74 CSSPropertyAnimationIterationCount,
75 CSSPropertyAnimationName, 75 CSSPropertyAnimationName,
76 CSSPropertyAnimationPlayState, 76 CSSPropertyAnimationPlayState,
77 CSSPropertyAnimationTimingFunction, 77 CSSPropertyAnimationTimingFunction,
78 CSSPropertyBackgroundAttachment, 78 CSSPropertyBackgroundAttachment,
79 CSSPropertyBackgroundBlendMode,
80 CSSPropertyBackgroundClip, 79 CSSPropertyBackgroundClip,
81 CSSPropertyBackgroundColor, 80 CSSPropertyBackgroundColor,
82 CSSPropertyBackgroundImage, 81 CSSPropertyBackgroundImage,
83 CSSPropertyBackgroundOrigin, 82 CSSPropertyBackgroundOrigin,
84 CSSPropertyBackgroundPosition, // more-specific background-position-x/y are non-standard 83 CSSPropertyBackgroundPosition, // more-specific background-position-x/y are non-standard
85 CSSPropertyBackgroundRepeat, 84 CSSPropertyBackgroundRepeat,
86 CSSPropertyBackgroundSize, 85 CSSPropertyBackgroundSize,
87 CSSPropertyBorderBottomColor, 86 CSSPropertyBorderBottomColor,
88 CSSPropertyBorderBottomLeftRadius, 87 CSSPropertyBorderBottomLeftRadius,
89 CSSPropertyBorderBottomRightRadius, 88 CSSPropertyBorderBottomRightRadius,
(...skipping 29 matching lines...) Expand all
119 CSSPropertyFontFamily, 118 CSSPropertyFontFamily,
120 CSSPropertyFontKerning, 119 CSSPropertyFontKerning,
121 CSSPropertyFontSize, 120 CSSPropertyFontSize,
122 CSSPropertyFontStretch, 121 CSSPropertyFontStretch,
123 CSSPropertyFontStyle, 122 CSSPropertyFontStyle,
124 CSSPropertyFontVariant, 123 CSSPropertyFontVariant,
125 CSSPropertyFontVariantLigatures, 124 CSSPropertyFontVariantLigatures,
126 CSSPropertyFontWeight, 125 CSSPropertyFontWeight,
127 CSSPropertyHeight, 126 CSSPropertyHeight,
128 CSSPropertyImageRendering, 127 CSSPropertyImageRendering,
129 CSSPropertyIsolation,
130 CSSPropertyLeft, 128 CSSPropertyLeft,
131 CSSPropertyLetterSpacing, 129 CSSPropertyLetterSpacing,
132 CSSPropertyLineHeight, 130 CSSPropertyLineHeight,
133 CSSPropertyListStyleImage, 131 CSSPropertyListStyleImage,
134 CSSPropertyListStylePosition, 132 CSSPropertyListStylePosition,
135 CSSPropertyListStyleType, 133 CSSPropertyListStyleType,
136 CSSPropertyMarginBottom, 134 CSSPropertyMarginBottom,
137 CSSPropertyMarginLeft, 135 CSSPropertyMarginLeft,
138 CSSPropertyMarginRight, 136 CSSPropertyMarginRight,
139 CSSPropertyMarginTop, 137 CSSPropertyMarginTop,
140 CSSPropertyMaxHeight, 138 CSSPropertyMaxHeight,
141 CSSPropertyMaxWidth, 139 CSSPropertyMaxWidth,
142 CSSPropertyMinHeight, 140 CSSPropertyMinHeight,
143 CSSPropertyMinWidth, 141 CSSPropertyMinWidth,
144 CSSPropertyMixBlendMode,
145 CSSPropertyObjectFit, 142 CSSPropertyObjectFit,
146 CSSPropertyObjectPosition, 143 CSSPropertyObjectPosition,
147 CSSPropertyOpacity, 144 CSSPropertyOpacity,
148 CSSPropertyOrphans, 145 CSSPropertyOrphans,
149 CSSPropertyOutlineColor, 146 CSSPropertyOutlineColor,
150 CSSPropertyOutlineOffset, 147 CSSPropertyOutlineOffset,
151 CSSPropertyOutlineStyle, 148 CSSPropertyOutlineStyle,
152 CSSPropertyOutlineWidth, 149 CSSPropertyOutlineWidth,
153 CSSPropertyOverflowWrap, 150 CSSPropertyOverflowWrap,
154 CSSPropertyOverflowX, 151 CSSPropertyOverflowX,
(...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 case CSSPropertyWebkitHighlight: 1561 case CSSPropertyWebkitHighlight:
1565 if (style->highlight() == nullAtom) 1562 if (style->highlight() == nullAtom)
1566 return cssValuePool().createIdentifierValue(CSSValueNone); 1563 return cssValuePool().createIdentifierValue(CSSValueNone);
1567 return cssValuePool().createValue(style->highlight(), CSSPrimitiveVa lue::CSS_STRING); 1564 return cssValuePool().createValue(style->highlight(), CSSPrimitiveVa lue::CSS_STRING);
1568 case CSSPropertyWebkitHyphenateCharacter: 1565 case CSSPropertyWebkitHyphenateCharacter:
1569 if (style->hyphenationString().isNull()) 1566 if (style->hyphenationString().isNull())
1570 return cssValuePool().createIdentifierValue(CSSValueAuto); 1567 return cssValuePool().createIdentifierValue(CSSValueAuto);
1571 return cssValuePool().createValue(style->hyphenationString(), CSSPri mitiveValue::CSS_STRING); 1568 return cssValuePool().createValue(style->hyphenationString(), CSSPri mitiveValue::CSS_STRING);
1572 case CSSPropertyImageRendering: 1569 case CSSPropertyImageRendering:
1573 return CSSPrimitiveValue::create(style->imageRendering()); 1570 return CSSPrimitiveValue::create(style->imageRendering());
1574 case CSSPropertyIsolation:
1575 return cssValuePool().createValue(style->isolation());
1576 case CSSPropertyLeft: 1571 case CSSPropertyLeft:
1577 return valueForPositionOffset(*style, CSSPropertyLeft, renderer); 1572 return valueForPositionOffset(*style, CSSPropertyLeft, renderer);
1578 case CSSPropertyLetterSpacing: 1573 case CSSPropertyLetterSpacing:
1579 if (!style->letterSpacing()) 1574 if (!style->letterSpacing())
1580 return cssValuePool().createIdentifierValue(CSSValueNormal); 1575 return cssValuePool().createIdentifierValue(CSSValueNormal);
1581 return pixelValue(style->letterSpacing(), *style); 1576 return pixelValue(style->letterSpacing(), *style);
1582 case CSSPropertyWebkitLineClamp: 1577 case CSSPropertyWebkitLineClamp:
1583 if (style->lineClamp().isNone()) 1578 if (style->lineClamp().isNone())
1584 return cssValuePool().createIdentifierValue(CSSValueNone); 1579 return cssValuePool().createIdentifierValue(CSSValueNone);
1585 return cssValuePool().createValue(style->lineClamp().value(), style- >lineClamp().isPercentage() ? CSSPrimitiveValue::CSS_PERCENTAGE : CSSPrimitiveVa lue::CSS_NUMBER); 1580 return cssValuePool().createValue(style->lineClamp().value(), style- >lineClamp().isPercentage() ? CSSPrimitiveValue::CSS_PERCENTAGE : CSSPrimitiveVa lue::CSS_NUMBER);
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
2164 case CSSPropertyWebkitLineBoxContain: 2159 case CSSPropertyWebkitLineBoxContain:
2165 return createLineBoxContainValue(style->lineBoxContain()); 2160 return createLineBoxContainValue(style->lineBoxContain());
2166 case CSSPropertyWebkitClipPath: 2161 case CSSPropertyWebkitClipPath:
2167 if (ClipPathOperation* operation = style->clipPath()) { 2162 if (ClipPathOperation* operation = style->clipPath()) {
2168 if (operation->type() == ClipPathOperation::SHAPE) 2163 if (operation->type() == ClipPathOperation::SHAPE)
2169 return valueForBasicShape(*style, toShapeClipPathOperation(o peration)->basicShape()); 2164 return valueForBasicShape(*style, toShapeClipPathOperation(o peration)->basicShape());
2170 } 2165 }
2171 return cssValuePool().createIdentifierValue(CSSValueNone); 2166 return cssValuePool().createIdentifierValue(CSSValueNone);
2172 case CSSPropertyWebkitFilter: 2167 case CSSPropertyWebkitFilter:
2173 return valueForFilter(renderer, *style); 2168 return valueForFilter(renderer, *style);
2174 case CSSPropertyMixBlendMode:
2175 return cssValuePool().createValue(style->blendMode());
2176 2169
2177 case CSSPropertyBackgroundBlendMode: {
2178 RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
2179 for (const FillLayer* currLayer = &style->backgroundLayers(); currLa yer; currLayer = currLayer->next())
2180 list->append(cssValuePool().createValue(currLayer->blendMode())) ;
2181 return list.release();
2182 }
2183 case CSSPropertyBackground: 2170 case CSSPropertyBackground:
2184 return valuesForBackgroundShorthand(); 2171 return valuesForBackgroundShorthand();
2185 case CSSPropertyBorder: { 2172 case CSSPropertyBorder: {
2186 RefPtr<CSSValue> value = getPropertyCSSValue(CSSPropertyBorderTop, D oNotUpdateLayout); 2173 RefPtr<CSSValue> value = getPropertyCSSValue(CSSPropertyBorderTop, D oNotUpdateLayout);
2187 const CSSPropertyID properties[3] = { CSSPropertyBorderRight, CSSPro pertyBorderBottom, 2174 const CSSPropertyID properties[3] = { CSSPropertyBorderRight, CSSPro pertyBorderBottom,
2188 CSSPropertyBorderLeft }; 2175 CSSPropertyBorderLeft };
2189 for (size_t i = 0; i < WTF_ARRAY_LENGTH(properties); ++i) { 2176 for (size_t i = 0; i < WTF_ARRAY_LENGTH(properties); ++i) {
2190 if (!compareCSSValuePtr<CSSValue>(value, getPropertyCSSValue(pro perties[i], DoNotUpdateLayout))) 2177 if (!compareCSSValuePtr<CSSValue>(value, getPropertyCSSValue(pro perties[i], DoNotUpdateLayout)))
2191 return nullptr; 2178 return nullptr;
2192 } 2179 }
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
2472 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 2459 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
2473 CSSPropertyB ackgroundClip }; 2460 CSSPropertyB ackgroundClip };
2474 2461
2475 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); 2462 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
2476 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator)))); 2463 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator))));
2477 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator)))); 2464 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator))));
2478 return list.release(); 2465 return list.release();
2479 } 2466 }
2480 2467
2481 } // namespace blink 2468 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl ('k') | sky/engine/core/css/CSSPrimitiveValueMappings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698