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

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

Issue 2635143002: Changed EBoxSizing to an enum class and renamed its members (Closed)
Patch Set: Aded k prefix Created 3 years, 11 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 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 if (!position.namedGridLine().isNull()) 1075 if (!position.namedGridLine().isNull())
1076 list->append(*CSSCustomIdentValue::create(position.namedGridLine())); 1076 list->append(*CSSCustomIdentValue::create(position.namedGridLine()));
1077 return list; 1077 return list;
1078 } 1078 }
1079 1079
1080 static LayoutRect sizingBox(const LayoutObject* layoutObject) { 1080 static LayoutRect sizingBox(const LayoutObject* layoutObject) {
1081 if (!layoutObject->isBox()) 1081 if (!layoutObject->isBox())
1082 return LayoutRect(); 1082 return LayoutRect();
1083 1083
1084 const LayoutBox* box = toLayoutBox(layoutObject); 1084 const LayoutBox* box = toLayoutBox(layoutObject);
1085 return box->style()->boxSizing() == BoxSizingBorderBox 1085 return box->style()->boxSizing() == EBoxSizing::kBorderBox
1086 ? box->borderBoxRect() 1086 ? box->borderBoxRect()
1087 : box->computedCSSContentBoxRect(); 1087 : box->computedCSSContentBoxRect();
1088 } 1088 }
1089 1089
1090 static CSSValue* renderTextDecorationFlagsToCSSValue(int textDecoration) { 1090 static CSSValue* renderTextDecorationFlagsToCSSValue(int textDecoration) {
1091 // Blink value is ignored. 1091 // Blink value is ignored.
1092 CSSValueList* list = CSSValueList::createSpaceSeparated(); 1092 CSSValueList* list = CSSValueList::createSpaceSeparated();
1093 if (textDecoration & TextDecorationUnderline) 1093 if (textDecoration & TextDecorationUnderline)
1094 list->append(*CSSIdentifierValue::create(CSSValueUnderline)); 1094 list->append(*CSSIdentifierValue::create(CSSValueUnderline));
1095 if (textDecoration & TextDecorationOverline) 1095 if (textDecoration & TextDecorationOverline)
(...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after
2855 return valueForFontVariantNumeric(style); 2855 return valueForFontVariantNumeric(style);
2856 case CSSPropertyZIndex: 2856 case CSSPropertyZIndex:
2857 if (style.hasAutoZIndex() || !style.isStackingContext()) 2857 if (style.hasAutoZIndex() || !style.isStackingContext())
2858 return CSSIdentifierValue::create(CSSValueAuto); 2858 return CSSIdentifierValue::create(CSSValueAuto);
2859 return CSSPrimitiveValue::create(style.zIndex(), 2859 return CSSPrimitiveValue::create(style.zIndex(),
2860 CSSPrimitiveValue::UnitType::Integer); 2860 CSSPrimitiveValue::UnitType::Integer);
2861 case CSSPropertyZoom: 2861 case CSSPropertyZoom:
2862 return CSSPrimitiveValue::create(style.zoom(), 2862 return CSSPrimitiveValue::create(style.zoom(),
2863 CSSPrimitiveValue::UnitType::Number); 2863 CSSPrimitiveValue::UnitType::Number);
2864 case CSSPropertyBoxSizing: 2864 case CSSPropertyBoxSizing:
2865 if (style.boxSizing() == BoxSizingContentBox) 2865 if (style.boxSizing() == EBoxSizing::kContentBox)
2866 return CSSIdentifierValue::create(CSSValueContentBox); 2866 return CSSIdentifierValue::create(CSSValueContentBox);
2867 return CSSIdentifierValue::create(CSSValueBorderBox); 2867 return CSSIdentifierValue::create(CSSValueBorderBox);
2868 case CSSPropertyWebkitAppRegion: 2868 case CSSPropertyWebkitAppRegion:
2869 return CSSIdentifierValue::create(style.getDraggableRegionMode() == 2869 return CSSIdentifierValue::create(style.getDraggableRegionMode() ==
2870 DraggableRegionDrag 2870 DraggableRegionDrag
2871 ? CSSValueDrag 2871 ? CSSValueDrag
2872 : CSSValueNoDrag); 2872 : CSSValueNoDrag);
2873 case CSSPropertyAnimationDelay: 2873 case CSSPropertyAnimationDelay:
2874 return valueForAnimationDelay(style.animations()); 2874 return valueForAnimationDelay(style.animations());
2875 case CSSPropertyAnimationDirection: { 2875 case CSSPropertyAnimationDirection: {
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
3641 case CSSPropertyAll: 3641 case CSSPropertyAll:
3642 return nullptr; 3642 return nullptr;
3643 default: 3643 default:
3644 break; 3644 break;
3645 } 3645 }
3646 ASSERT_NOT_REACHED(); 3646 ASSERT_NOT_REACHED();
3647 return nullptr; 3647 return nullptr;
3648 } 3648 }
3649 3649
3650 } // namespace blink 3650 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h ('k') | third_party/WebKit/Source/core/layout/LayoutBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698