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

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

Issue 700703002: Remove more float machinery. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « no previous file | sky/engine/core/css/CSSPrimitiveValueMappings.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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 CSSPropertyBorderRightWidth, 104 CSSPropertyBorderRightWidth,
105 CSSPropertyBorderTopColor, 105 CSSPropertyBorderTopColor,
106 CSSPropertyBorderTopLeftRadius, 106 CSSPropertyBorderTopLeftRadius,
107 CSSPropertyBorderTopRightRadius, 107 CSSPropertyBorderTopRightRadius,
108 CSSPropertyBorderTopStyle, 108 CSSPropertyBorderTopStyle,
109 CSSPropertyBorderTopWidth, 109 CSSPropertyBorderTopWidth,
110 CSSPropertyBottom, 110 CSSPropertyBottom,
111 CSSPropertyBoxShadow, 111 CSSPropertyBoxShadow,
112 CSSPropertyBoxSizing, 112 CSSPropertyBoxSizing,
113 CSSPropertyCaptionSide, 113 CSSPropertyCaptionSide,
114 CSSPropertyClear,
115 CSSPropertyClip, 114 CSSPropertyClip,
116 CSSPropertyColor, 115 CSSPropertyColor,
117 CSSPropertyCursor, 116 CSSPropertyCursor,
118 CSSPropertyDirection, 117 CSSPropertyDirection,
119 CSSPropertyDisplay, 118 CSSPropertyDisplay,
120 CSSPropertyEmptyCells, 119 CSSPropertyEmptyCells,
121 CSSPropertyFloat,
122 CSSPropertyFontFamily, 120 CSSPropertyFontFamily,
123 CSSPropertyFontKerning, 121 CSSPropertyFontKerning,
124 CSSPropertyFontSize, 122 CSSPropertyFontSize,
125 CSSPropertyFontStretch, 123 CSSPropertyFontStretch,
126 CSSPropertyFontStyle, 124 CSSPropertyFontStyle,
127 CSSPropertyFontVariant, 125 CSSPropertyFontVariant,
128 CSSPropertyFontVariantLigatures, 126 CSSPropertyFontVariantLigatures,
129 CSSPropertyFontWeight, 127 CSSPropertyFontWeight,
130 CSSPropertyHeight, 128 CSSPropertyHeight,
131 CSSPropertyImageRendering, 129 CSSPropertyImageRendering,
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after
1495 return valueForPositionOffset(*style, CSSPropertyBottom, renderer); 1493 return valueForPositionOffset(*style, CSSPropertyBottom, renderer);
1496 case CSSPropertyWebkitBoxDecorationBreak: 1494 case CSSPropertyWebkitBoxDecorationBreak:
1497 if (style->boxDecorationBreak() == DSLICE) 1495 if (style->boxDecorationBreak() == DSLICE)
1498 return cssValuePool().createIdentifierValue(CSSValueSlice); 1496 return cssValuePool().createIdentifierValue(CSSValueSlice);
1499 return cssValuePool().createIdentifierValue(CSSValueClone); 1497 return cssValuePool().createIdentifierValue(CSSValueClone);
1500 case CSSPropertyBoxShadow: 1498 case CSSPropertyBoxShadow:
1501 case CSSPropertyWebkitBoxShadow: 1499 case CSSPropertyWebkitBoxShadow:
1502 return valueForShadowList(style->boxShadow(), *style, true); 1500 return valueForShadowList(style->boxShadow(), *style, true);
1503 case CSSPropertyCaptionSide: 1501 case CSSPropertyCaptionSide:
1504 return cssValuePool().createValue(style->captionSide()); 1502 return cssValuePool().createValue(style->captionSide());
1505 case CSSPropertyClear:
1506 return cssValuePool().createValue(style->clear());
1507 case CSSPropertyColor: 1503 case CSSPropertyColor:
1508 return cssValuePool().createColorValue(m_allowVisitedStyle ? style-> colorIncludingFallback(CSSPropertyColor).rgb() : style->color().rgb()); 1504 return cssValuePool().createColorValue(m_allowVisitedStyle ? style-> colorIncludingFallback(CSSPropertyColor).rgb() : style->color().rgb());
1509 case CSSPropertyWebkitPrintColorAdjust: 1505 case CSSPropertyWebkitPrintColorAdjust:
1510 return cssValuePool().createValue(style->printColorAdjust()); 1506 return cssValuePool().createValue(style->printColorAdjust());
1511 case CSSPropertyTabSize: 1507 case CSSPropertyTabSize:
1512 return cssValuePool().createValue(style->tabSize(), CSSPrimitiveValu e::CSS_NUMBER); 1508 return cssValuePool().createValue(style->tabSize(), CSSPrimitiveValu e::CSS_NUMBER);
1513 case CSSPropertyCursor: { 1509 case CSSPropertyCursor: {
1514 RefPtr<CSSValueList> list = nullptr; 1510 RefPtr<CSSValueList> list = nullptr;
1515 CursorList* cursors = style->cursors(); 1511 CursorList* cursors = style->cursors();
1516 if (cursors && cursors->size() > 0) { 1512 if (cursors && cursors->size() > 0) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 case CSSPropertyFlexGrow: 1545 case CSSPropertyFlexGrow:
1550 return cssValuePool().createValue(style->flexGrow()); 1546 return cssValuePool().createValue(style->flexGrow());
1551 case CSSPropertyFlexShrink: 1547 case CSSPropertyFlexShrink:
1552 return cssValuePool().createValue(style->flexShrink()); 1548 return cssValuePool().createValue(style->flexShrink());
1553 case CSSPropertyFlexWrap: 1549 case CSSPropertyFlexWrap:
1554 return cssValuePool().createValue(style->flexWrap()); 1550 return cssValuePool().createValue(style->flexWrap());
1555 case CSSPropertyJustifyContent: 1551 case CSSPropertyJustifyContent:
1556 return cssValuePool().createValue(style->justifyContent()); 1552 return cssValuePool().createValue(style->justifyContent());
1557 case CSSPropertyOrder: 1553 case CSSPropertyOrder:
1558 return cssValuePool().createValue(style->order(), CSSPrimitiveValue: :CSS_NUMBER); 1554 return cssValuePool().createValue(style->order(), CSSPrimitiveValue: :CSS_NUMBER);
1559 case CSSPropertyFloat:
1560 if (style->display() != NONE && style->hasOutOfFlowPosition())
1561 return cssValuePool().createIdentifierValue(CSSValueNone);
1562 return cssValuePool().createValue(style->floating());
1563 case CSSPropertyFont: { 1555 case CSSPropertyFont: {
1564 RefPtr<CSSFontValue> computedFont = CSSFontValue::create(); 1556 RefPtr<CSSFontValue> computedFont = CSSFontValue::create();
1565 computedFont->style = valueForFontStyle(*style); 1557 computedFont->style = valueForFontStyle(*style);
1566 computedFont->variant = valueForFontVariant(*style); 1558 computedFont->variant = valueForFontVariant(*style);
1567 computedFont->weight = valueForFontWeight(*style); 1559 computedFont->weight = valueForFontWeight(*style);
1568 computedFont->stretch = valueForFontStretch(*style); 1560 computedFont->stretch = valueForFontStretch(*style);
1569 computedFont->size = valueForFontSize(*style); 1561 computedFont->size = valueForFontSize(*style);
1570 computedFont->lineHeight = valueForLineHeight(*style); 1562 computedFont->lineHeight = valueForLineHeight(*style);
1571 computedFont->family = valueForFontFamily(*style); 1563 computedFont->family = valueForFontFamily(*style);
1572 return computedFont.release(); 1564 return computedFont.release();
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
2543 return list.release(); 2535 return list.release();
2544 } 2536 }
2545 2537
2546 void CSSComputedStyleDeclaration::trace(Visitor* visitor) 2538 void CSSComputedStyleDeclaration::trace(Visitor* visitor)
2547 { 2539 {
2548 visitor->trace(m_node); 2540 visitor->trace(m_node);
2549 CSSStyleDeclaration::trace(visitor); 2541 CSSStyleDeclaration::trace(visitor);
2550 } 2542 }
2551 2543
2552 } // namespace blink 2544 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/css/CSSPrimitiveValueMappings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698