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

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

Issue 2882103002: Make ELineBreak 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) 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 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 typedef CounterDirectiveMap::iterator Iterator; 1572 typedef CounterDirectiveMap::iterator Iterator;
1573 1573
1574 Iterator end = map.end(); 1574 Iterator end = map.end();
1575 for (Iterator it = map.begin(); it != end; ++it) 1575 for (Iterator it = map.begin(); it != end; ++it)
1576 it->value.ClearReset(); 1576 it->value.ClearReset();
1577 } 1577 }
1578 1578
1579 AtomicString ComputedStyle::LocaleForLineBreakIterator() const { 1579 AtomicString ComputedStyle::LocaleForLineBreakIterator() const {
1580 LineBreakIteratorMode mode = LineBreakIteratorMode::kDefault; 1580 LineBreakIteratorMode mode = LineBreakIteratorMode::kDefault;
1581 switch (GetLineBreak()) { 1581 switch (GetLineBreak()) {
1582 case kLineBreakAuto: 1582 case LineBreak::kAuto:
1583 case kLineBreakAfterWhiteSpace: 1583 case LineBreak::kAfterWhiteSpace:
1584 return Locale(); 1584 return Locale();
1585 case kLineBreakNormal: 1585 case LineBreak::kNormal:
1586 mode = LineBreakIteratorMode::kNormal; 1586 mode = LineBreakIteratorMode::kNormal;
1587 break; 1587 break;
1588 case kLineBreakStrict: 1588 case LineBreak::kStrict:
1589 mode = LineBreakIteratorMode::kStrict; 1589 mode = LineBreakIteratorMode::kStrict;
1590 break; 1590 break;
1591 case kLineBreakLoose: 1591 case LineBreak::kLoose:
1592 mode = LineBreakIteratorMode::kLoose; 1592 mode = LineBreakIteratorMode::kLoose;
1593 break; 1593 break;
1594 } 1594 }
1595 if (const LayoutLocale* locale = GetFontDescription().Locale()) 1595 if (const LayoutLocale* locale = GetFontDescription().Locale())
1596 return locale->LocaleWithBreakKeyword(mode); 1596 return locale->LocaleWithBreakKeyword(mode);
1597 return Locale(); 1597 return Locale();
1598 } 1598 }
1599 1599
1600 Hyphenation* ComputedStyle::GetHyphenation() const { 1600 Hyphenation* ComputedStyle::GetHyphenation() const {
1601 return GetHyphens() == kHyphensAuto 1601 return GetHyphens() == kHyphensAuto
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
2518 if (value < 0) 2518 if (value < 0)
2519 fvalue -= 0.5f; 2519 fvalue -= 0.5f;
2520 else 2520 else
2521 fvalue += 0.5f; 2521 fvalue += 0.5f;
2522 } 2522 }
2523 2523
2524 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); 2524 return RoundForImpreciseConversion<int>(fvalue / zoom_factor);
2525 } 2525 }
2526 2526
2527 } // namespace blink 2527 } // 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