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

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

Issue 2900633003: Make TextEmphasisMark an enum class. (Closed)
Patch Set: Rebase Created 3 years, 6 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 2838 matching lines...) Expand 10 before | Expand all | Expand 10 after
2849 return RenderTextDecorationFlagsToCSSValue( 2849 return RenderTextDecorationFlagsToCSSValue(
2850 style.TextDecorationsInEffect()); 2850 style.TextDecorationsInEffect());
2851 case CSSPropertyWebkitTextFillColor: 2851 case CSSPropertyWebkitTextFillColor:
2852 return CurrentColorOrValidColor(style, style.TextFillColor()); 2852 return CurrentColorOrValidColor(style, style.TextFillColor());
2853 case CSSPropertyWebkitTextEmphasisColor: 2853 case CSSPropertyWebkitTextEmphasisColor:
2854 return CurrentColorOrValidColor(style, style.TextEmphasisColor()); 2854 return CurrentColorOrValidColor(style, style.TextEmphasisColor());
2855 case CSSPropertyWebkitTextEmphasisPosition: 2855 case CSSPropertyWebkitTextEmphasisPosition:
2856 return CSSIdentifierValue::Create(style.GetTextEmphasisPosition()); 2856 return CSSIdentifierValue::Create(style.GetTextEmphasisPosition());
2857 case CSSPropertyWebkitTextEmphasisStyle: 2857 case CSSPropertyWebkitTextEmphasisStyle:
2858 switch (style.GetTextEmphasisMark()) { 2858 switch (style.GetTextEmphasisMark()) {
2859 case kTextEmphasisMarkNone: 2859 case TextEmphasisMark::kNone:
2860 return CSSIdentifierValue::Create(CSSValueNone); 2860 return CSSIdentifierValue::Create(CSSValueNone);
2861 case kTextEmphasisMarkCustom: 2861 case TextEmphasisMark::kCustom:
2862 return CSSStringValue::Create(style.TextEmphasisCustomMark()); 2862 return CSSStringValue::Create(style.TextEmphasisCustomMark());
2863 case kTextEmphasisMarkAuto: 2863 case TextEmphasisMark::kAuto:
2864 NOTREACHED(); 2864 NOTREACHED();
2865 // Fall through 2865 // Fall through
2866 case kTextEmphasisMarkDot: 2866 case TextEmphasisMark::kDot:
2867 case kTextEmphasisMarkCircle: 2867 case TextEmphasisMark::kCircle:
2868 case kTextEmphasisMarkDoubleCircle: 2868 case TextEmphasisMark::kDoubleCircle:
2869 case kTextEmphasisMarkTriangle: 2869 case TextEmphasisMark::kTriangle:
2870 case kTextEmphasisMarkSesame: { 2870 case TextEmphasisMark::kSesame: {
2871 CSSValueList* list = CSSValueList::CreateSpaceSeparated(); 2871 CSSValueList* list = CSSValueList::CreateSpaceSeparated();
2872 list->Append( 2872 list->Append(
2873 *CSSIdentifierValue::Create(style.GetTextEmphasisFill())); 2873 *CSSIdentifierValue::Create(style.GetTextEmphasisFill()));
2874 list->Append( 2874 list->Append(
2875 *CSSIdentifierValue::Create(style.GetTextEmphasisMark())); 2875 *CSSIdentifierValue::Create(style.GetTextEmphasisMark()));
2876 return list; 2876 return list;
2877 } 2877 }
2878 } 2878 }
2879 case CSSPropertyTextIndent: { 2879 case CSSPropertyTextIndent: {
2880 CSSValueList* list = CSSValueList::CreateSpaceSeparated(); 2880 CSSValueList* list = CSSValueList::CreateSpaceSeparated();
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
3753 case CSSPropertyAll: 3753 case CSSPropertyAll:
3754 return nullptr; 3754 return nullptr;
3755 default: 3755 default:
3756 break; 3756 break;
3757 } 3757 }
3758 NOTREACHED(); 3758 NOTREACHED();
3759 return nullptr; 3759 return nullptr;
3760 } 3760 }
3761 3761
3762 } // namespace blink 3762 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698