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

Side by Side Diff: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp

Issue 2670643004: Rename EDisplay values with k prefix. (Closed)
Patch Set: Rebase Created 3 years, 9 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. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 7 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
8 * Copyright (C) 2015 Google Inc. All rights reserved. 8 * Copyright (C) 2015 Google Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 2350 matching lines...) Expand 10 before | Expand all | Expand 10 after
2361 CSSPrimitiveValue::UnitType::Number); 2361 CSSPrimitiveValue::UnitType::Number);
2362 case CSSPropertyFlexWrap: 2362 case CSSPropertyFlexWrap:
2363 return CSSIdentifierValue::create(style.flexWrap()); 2363 return CSSIdentifierValue::create(style.flexWrap());
2364 case CSSPropertyJustifyContent: 2364 case CSSPropertyJustifyContent:
2365 return valueForContentPositionAndDistributionWithOverflowAlignment( 2365 return valueForContentPositionAndDistributionWithOverflowAlignment(
2366 style.justifyContent(), CSSValueFlexStart); 2366 style.justifyContent(), CSSValueFlexStart);
2367 case CSSPropertyOrder: 2367 case CSSPropertyOrder:
2368 return CSSPrimitiveValue::create(style.order(), 2368 return CSSPrimitiveValue::create(style.order(),
2369 CSSPrimitiveValue::UnitType::Number); 2369 CSSPrimitiveValue::UnitType::Number);
2370 case CSSPropertyFloat: 2370 case CSSPropertyFloat:
2371 if (style.display() != EDisplay::None && style.hasOutOfFlowPosition()) 2371 if (style.display() != EDisplay::kNone && style.hasOutOfFlowPosition())
2372 return CSSIdentifierValue::create(CSSValueNone); 2372 return CSSIdentifierValue::create(CSSValueNone);
2373 return CSSIdentifierValue::create(style.floating()); 2373 return CSSIdentifierValue::create(style.floating());
2374 case CSSPropertyFont: 2374 case CSSPropertyFont:
2375 return valueForFont(style); 2375 return valueForFont(style);
2376 case CSSPropertyFontFamily: 2376 case CSSPropertyFontFamily:
2377 return valueForFontFamily(style); 2377 return valueForFontFamily(style);
2378 case CSSPropertyFontSize: 2378 case CSSPropertyFontSize:
2379 return valueForFontSize(style); 2379 return valueForFontSize(style);
2380 case CSSPropertyFontSizeAdjust: 2380 case CSSPropertyFontSizeAdjust:
2381 if (style.hasFontSizeAdjust()) 2381 if (style.hasFontSizeAdjust())
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
2575 style); 2575 style);
2576 } 2576 }
2577 case CSSPropertyMarginRight: { 2577 case CSSPropertyMarginRight: {
2578 Length marginRight = style.marginRight(); 2578 Length marginRight = style.marginRight();
2579 if (marginRight.isFixed() || !layoutObject || !layoutObject->isBox()) 2579 if (marginRight.isFixed() || !layoutObject || !layoutObject->isBox())
2580 return zoomAdjustedPixelValueForLength(marginRight, style); 2580 return zoomAdjustedPixelValueForLength(marginRight, style);
2581 float value; 2581 float value;
2582 if (marginRight.isPercentOrCalc()) { 2582 if (marginRight.isPercentOrCalc()) {
2583 // LayoutBox gives a marginRight() that is the distance between the 2583 // LayoutBox gives a marginRight() that is the distance between the
2584 // right-edge of the child box and the right-edge of the containing box, 2584 // right-edge of the child box and the right-edge of the containing box,
2585 // when display == EDisplay::Block. Let's calculate the absolute value 2585 // when display == EDisplay::kBlock. Let's calculate the absolute value
2586 // of the specified margin-right % instead of relying on LayoutBox's 2586 // of the specified margin-right % instead of relying on LayoutBox's
2587 // marginRight() value. 2587 // marginRight() value.
2588 value = minimumValueForLength( 2588 value = minimumValueForLength(
2589 marginRight, toLayoutBox(layoutObject) 2589 marginRight, toLayoutBox(layoutObject)
2590 ->containingBlockLogicalWidthForContent()) 2590 ->containingBlockLogicalWidthForContent())
2591 .toFloat(); 2591 .toFloat();
2592 } else { 2592 } else {
2593 value = toLayoutBox(layoutObject)->marginRight().toFloat(); 2593 value = toLayoutBox(layoutObject)->marginRight().toFloat();
2594 } 2594 }
2595 return zoomAdjustedPixelValue(value, style); 2595 return zoomAdjustedPixelValue(value, style);
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
3675 case CSSPropertyAll: 3675 case CSSPropertyAll:
3676 return nullptr; 3676 return nullptr;
3677 default: 3677 default:
3678 break; 3678 break;
3679 } 3679 }
3680 ASSERT_NOT_REACHED(); 3680 ASSERT_NOT_REACHED();
3681 return nullptr; 3681 return nullptr;
3682 } 3682 }
3683 3683
3684 } // namespace blink 3684 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698