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

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

Issue 1076623002: Remove our impressive amount of CSS Cursor code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « sky/engine/core/core.gni ('k') | sky/engine/core/css/CSSCursorImageValue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 CSSPropertyBorderTopLeftRadius, 103 CSSPropertyBorderTopLeftRadius,
104 CSSPropertyBorderTopRightRadius, 104 CSSPropertyBorderTopRightRadius,
105 CSSPropertyBorderTopStyle, 105 CSSPropertyBorderTopStyle,
106 CSSPropertyBorderTopWidth, 106 CSSPropertyBorderTopWidth,
107 CSSPropertyBottom, 107 CSSPropertyBottom,
108 CSSPropertyBoxShadow, 108 CSSPropertyBoxShadow,
109 CSSPropertyBoxSizing, 109 CSSPropertyBoxSizing,
110 CSSPropertyCaptionSide, 110 CSSPropertyCaptionSide,
111 CSSPropertyClip, 111 CSSPropertyClip,
112 CSSPropertyColor, 112 CSSPropertyColor,
113 CSSPropertyCursor,
114 CSSPropertyDirection, 113 CSSPropertyDirection,
115 CSSPropertyDisplay, 114 CSSPropertyDisplay,
116 CSSPropertyEmptyCells, 115 CSSPropertyEmptyCells,
117 CSSPropertyFontFamily, 116 CSSPropertyFontFamily,
118 CSSPropertyFontKerning, 117 CSSPropertyFontKerning,
119 CSSPropertyFontSize, 118 CSSPropertyFontSize,
120 CSSPropertyFontStretch, 119 CSSPropertyFontStretch,
121 CSSPropertyFontStyle, 120 CSSPropertyFontStyle,
122 CSSPropertyFontVariant, 121 CSSPropertyFontVariant,
123 CSSPropertyFontVariantLigatures, 122 CSSPropertyFontVariantLigatures,
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 return cssValuePool().createIdentifierValue(CSSValueClone); 1366 return cssValuePool().createIdentifierValue(CSSValueClone);
1368 case CSSPropertyBoxShadow: 1367 case CSSPropertyBoxShadow:
1369 case CSSPropertyWebkitBoxShadow: 1368 case CSSPropertyWebkitBoxShadow:
1370 return valueForShadowList(style->boxShadow(), *style, true); 1369 return valueForShadowList(style->boxShadow(), *style, true);
1371 case CSSPropertyCaptionSide: 1370 case CSSPropertyCaptionSide:
1372 return cssValuePool().createValue(style->captionSide()); 1371 return cssValuePool().createValue(style->captionSide());
1373 case CSSPropertyColor: 1372 case CSSPropertyColor:
1374 return cssValuePool().createColorValue(m_allowVisitedStyle ? style-> colorIncludingFallback(CSSPropertyColor).rgb() : style->color().rgb()); 1373 return cssValuePool().createColorValue(m_allowVisitedStyle ? style-> colorIncludingFallback(CSSPropertyColor).rgb() : style->color().rgb());
1375 case CSSPropertyTabSize: 1374 case CSSPropertyTabSize:
1376 return cssValuePool().createValue(style->tabSize(), CSSPrimitiveValu e::CSS_NUMBER); 1375 return cssValuePool().createValue(style->tabSize(), CSSPrimitiveValu e::CSS_NUMBER);
1377 case CSSPropertyCursor: {
1378 RefPtr<CSSValueList> list = nullptr;
1379 CursorList* cursors = style->cursors();
1380 if (cursors && cursors->size() > 0) {
1381 list = CSSValueList::createCommaSeparated();
1382 for (unsigned i = 0; i < cursors->size(); ++i)
1383 if (StyleImage* image = cursors->at(i).image())
1384 list->append(image->cssValue());
1385 }
1386 RefPtr<CSSValue> value = cssValuePool().createValue(style->cursor()) ;
1387 if (list) {
1388 list->append(value.release());
1389 return list.release();
1390 }
1391 return value.release();
1392 }
1393 case CSSPropertyDirection: 1376 case CSSPropertyDirection:
1394 return cssValuePool().createValue(style->direction()); 1377 return cssValuePool().createValue(style->direction());
1395 case CSSPropertyDisplay: 1378 case CSSPropertyDisplay:
1396 return cssValuePool().createValue(style->display()); 1379 return cssValuePool().createValue(style->display());
1397 case CSSPropertyEmptyCells: 1380 case CSSPropertyEmptyCells:
1398 return cssValuePool().createValue(style->emptyCells()); 1381 return cssValuePool().createValue(style->emptyCells());
1399 case CSSPropertyAlignContent: 1382 case CSSPropertyAlignContent:
1400 return cssValuePool().createValue(style->alignContent()); 1383 return cssValuePool().createValue(style->alignContent());
1401 case CSSPropertyAlignItems: 1384 case CSSPropertyAlignItems:
1402 return valueForItemPositionWithOverflowAlignment(resolveAlignmentAut o(style->alignItems(), m_node.get()), style->alignItemsOverflowAlignment(), NonL egacyPosition); 1385 return valueForItemPositionWithOverflowAlignment(resolveAlignmentAut o(style->alignItems(), m_node.get()), style->alignItemsOverflowAlignment(), NonL egacyPosition);
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
2306 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 2289 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
2307 CSSPropertyB ackgroundClip }; 2290 CSSPropertyB ackgroundClip };
2308 2291
2309 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); 2292 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
2310 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator)))); 2293 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(propertiesBeforeSlash Seperator))));
2311 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator)))); 2294 list->append(valuesForShorthandProperty(StylePropertyShorthand(CSSPropertyBa ckground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(propertiesAfterSlashSe perator))));
2312 return list.release(); 2295 return list.release();
2313 } 2296 }
2314 2297
2315 } // namespace blink 2298 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/core.gni ('k') | sky/engine/core/css/CSSCursorImageValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698