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

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

Issue 2905493008: Make TextIndentType an enum class. (Closed)
Patch Set: Rebase Created 3 years, 7 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 8 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
9 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 9 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
10 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 10 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 for (auto& list_value : ToCSSValueList(value)) { 482 for (auto& list_value : ToCSSValueList(value)) {
483 if (list_value->IsPrimitiveValue()) { 483 if (list_value->IsPrimitiveValue()) {
484 length_or_percentage_value = 484 length_or_percentage_value =
485 ToCSSPrimitiveValue(*list_value) 485 ToCSSPrimitiveValue(*list_value)
486 .ConvertToLength(state.CssToLengthConversionData()); 486 .ConvertToLength(state.CssToLengthConversionData());
487 } else if (ToCSSIdentifierValue(*list_value).GetValueID() == 487 } else if (ToCSSIdentifierValue(*list_value).GetValueID() ==
488 CSSValueEachLine) { 488 CSSValueEachLine) {
489 text_indent_line_value = TextIndentLine::kEachLine; 489 text_indent_line_value = TextIndentLine::kEachLine;
490 } else if (ToCSSIdentifierValue(*list_value).GetValueID() == 490 } else if (ToCSSIdentifierValue(*list_value).GetValueID() ==
491 CSSValueHanging) { 491 CSSValueHanging) {
492 text_indent_type_value = kTextIndentHanging; 492 text_indent_type_value = TextIndentType::kHanging;
493 } else { 493 } else {
494 NOTREACHED(); 494 NOTREACHED();
495 } 495 }
496 } 496 }
497 497
498 state.Style()->SetTextIndent(length_or_percentage_value); 498 state.Style()->SetTextIndent(length_or_percentage_value);
499 state.Style()->SetTextIndentLine(text_indent_line_value); 499 state.Style()->SetTextIndentLine(text_indent_line_value);
500 state.Style()->SetTextIndentType(text_indent_type_value); 500 state.Style()->SetTextIndentType(text_indent_type_value);
501 } 501 }
502 502
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 state.Style()->SetCaretColor( 987 state.Style()->SetCaretColor(
988 StyleBuilderConverter::ConvertStyleAutoColor(state, value)); 988 StyleBuilderConverter::ConvertStyleAutoColor(state, value));
989 } 989 }
990 if (state.ApplyPropertyToVisitedLinkStyle()) { 990 if (state.ApplyPropertyToVisitedLinkStyle()) {
991 state.Style()->SetVisitedLinkCaretColor( 991 state.Style()->SetVisitedLinkCaretColor(
992 StyleBuilderConverter::ConvertStyleAutoColor(state, value, true)); 992 StyleBuilderConverter::ConvertStyleAutoColor(state, value, true));
993 } 993 }
994 } 994 }
995 995
996 } // namespace blink 996 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698