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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 2899663003: Make TextEmphasisFill 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) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
4 * reserved. 4 * reserved.
5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 switch (GetTextEmphasisMark()) { 1582 switch (GetTextEmphasisMark()) {
1583 case kTextEmphasisMarkNone: 1583 case kTextEmphasisMarkNone:
1584 return g_null_atom; 1584 return g_null_atom;
1585 case kTextEmphasisMarkCustom: 1585 case kTextEmphasisMarkCustom:
1586 return TextEmphasisCustomMark(); 1586 return TextEmphasisCustomMark();
1587 case kTextEmphasisMarkDot: { 1587 case kTextEmphasisMarkDot: {
1588 DEFINE_STATIC_LOCAL(AtomicString, filled_dot_string, 1588 DEFINE_STATIC_LOCAL(AtomicString, filled_dot_string,
1589 (&kBulletCharacter, 1)); 1589 (&kBulletCharacter, 1));
1590 DEFINE_STATIC_LOCAL(AtomicString, open_dot_string, 1590 DEFINE_STATIC_LOCAL(AtomicString, open_dot_string,
1591 (&kWhiteBulletCharacter, 1)); 1591 (&kWhiteBulletCharacter, 1));
1592 return GetTextEmphasisFill() == kTextEmphasisFillFilled 1592 return GetTextEmphasisFill() == TextEmphasisFill::kFilled
1593 ? filled_dot_string 1593 ? filled_dot_string
1594 : open_dot_string; 1594 : open_dot_string;
1595 } 1595 }
1596 case kTextEmphasisMarkCircle: { 1596 case kTextEmphasisMarkCircle: {
1597 DEFINE_STATIC_LOCAL(AtomicString, filled_circle_string, 1597 DEFINE_STATIC_LOCAL(AtomicString, filled_circle_string,
1598 (&kBlackCircleCharacter, 1)); 1598 (&kBlackCircleCharacter, 1));
1599 DEFINE_STATIC_LOCAL(AtomicString, open_circle_string, 1599 DEFINE_STATIC_LOCAL(AtomicString, open_circle_string,
1600 (&kWhiteCircleCharacter, 1)); 1600 (&kWhiteCircleCharacter, 1));
1601 return GetTextEmphasisFill() == kTextEmphasisFillFilled 1601 return GetTextEmphasisFill() == TextEmphasisFill::kFilled
1602 ? filled_circle_string 1602 ? filled_circle_string
1603 : open_circle_string; 1603 : open_circle_string;
1604 } 1604 }
1605 case kTextEmphasisMarkDoubleCircle: { 1605 case kTextEmphasisMarkDoubleCircle: {
1606 DEFINE_STATIC_LOCAL(AtomicString, filled_double_circle_string, 1606 DEFINE_STATIC_LOCAL(AtomicString, filled_double_circle_string,
1607 (&kFisheyeCharacter, 1)); 1607 (&kFisheyeCharacter, 1));
1608 DEFINE_STATIC_LOCAL(AtomicString, open_double_circle_string, 1608 DEFINE_STATIC_LOCAL(AtomicString, open_double_circle_string,
1609 (&kBullseyeCharacter, 1)); 1609 (&kBullseyeCharacter, 1));
1610 return GetTextEmphasisFill() == kTextEmphasisFillFilled 1610 return GetTextEmphasisFill() == TextEmphasisFill::kFilled
1611 ? filled_double_circle_string 1611 ? filled_double_circle_string
1612 : open_double_circle_string; 1612 : open_double_circle_string;
1613 } 1613 }
1614 case kTextEmphasisMarkTriangle: { 1614 case kTextEmphasisMarkTriangle: {
1615 DEFINE_STATIC_LOCAL(AtomicString, filled_triangle_string, 1615 DEFINE_STATIC_LOCAL(AtomicString, filled_triangle_string,
1616 (&kBlackUpPointingTriangleCharacter, 1)); 1616 (&kBlackUpPointingTriangleCharacter, 1));
1617 DEFINE_STATIC_LOCAL(AtomicString, open_triangle_string, 1617 DEFINE_STATIC_LOCAL(AtomicString, open_triangle_string,
1618 (&kWhiteUpPointingTriangleCharacter, 1)); 1618 (&kWhiteUpPointingTriangleCharacter, 1));
1619 return GetTextEmphasisFill() == kTextEmphasisFillFilled 1619 return GetTextEmphasisFill() == TextEmphasisFill::kFilled
1620 ? filled_triangle_string 1620 ? filled_triangle_string
1621 : open_triangle_string; 1621 : open_triangle_string;
1622 } 1622 }
1623 case kTextEmphasisMarkSesame: { 1623 case kTextEmphasisMarkSesame: {
1624 DEFINE_STATIC_LOCAL(AtomicString, filled_sesame_string, 1624 DEFINE_STATIC_LOCAL(AtomicString, filled_sesame_string,
1625 (&kSesameDotCharacter, 1)); 1625 (&kSesameDotCharacter, 1));
1626 DEFINE_STATIC_LOCAL(AtomicString, open_sesame_string, 1626 DEFINE_STATIC_LOCAL(AtomicString, open_sesame_string,
1627 (&kWhiteSesameDotCharacter, 1)); 1627 (&kWhiteSesameDotCharacter, 1));
1628 return GetTextEmphasisFill() == kTextEmphasisFillFilled 1628 return GetTextEmphasisFill() == TextEmphasisFill::kFilled
1629 ? filled_sesame_string 1629 ? filled_sesame_string
1630 : open_sesame_string; 1630 : open_sesame_string;
1631 } 1631 }
1632 case kTextEmphasisMarkAuto: 1632 case kTextEmphasisMarkAuto:
1633 NOTREACHED(); 1633 NOTREACHED();
1634 return g_null_atom; 1634 return g_null_atom;
1635 } 1635 }
1636 1636
1637 NOTREACHED(); 1637 NOTREACHED();
1638 return g_null_atom; 1638 return g_null_atom;
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
2475 if (value < 0) 2475 if (value < 0)
2476 fvalue -= 0.5f; 2476 fvalue -= 0.5f;
2477 else 2477 else
2478 fvalue += 0.5f; 2478 fvalue += 0.5f;
2479 } 2479 }
2480 2480
2481 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); 2481 return RoundForImpreciseConversion<int>(fvalue / zoom_factor);
2482 } 2482 }
2483 2483
2484 } // namespace blink 2484 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/core/style/ComputedStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698