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

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

Issue 2885363005: Make Hyphens an enum class. (Closed)
Patch Set: 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 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after
1556 case LineBreak::kLoose: 1556 case LineBreak::kLoose:
1557 mode = LineBreakIteratorMode::kLoose; 1557 mode = LineBreakIteratorMode::kLoose;
1558 break; 1558 break;
1559 } 1559 }
1560 if (const LayoutLocale* locale = GetFontDescription().Locale()) 1560 if (const LayoutLocale* locale = GetFontDescription().Locale())
1561 return locale->LocaleWithBreakKeyword(mode); 1561 return locale->LocaleWithBreakKeyword(mode);
1562 return Locale(); 1562 return Locale();
1563 } 1563 }
1564 1564
1565 Hyphenation* ComputedStyle::GetHyphenation() const { 1565 Hyphenation* ComputedStyle::GetHyphenation() const {
1566 return GetHyphens() == kHyphensAuto 1566 return GetHyphens() == Hyphens::kAuto
1567 ? GetFontDescription().LocaleOrDefault().GetHyphenation() 1567 ? GetFontDescription().LocaleOrDefault().GetHyphenation()
1568 : nullptr; 1568 : nullptr;
1569 } 1569 }
1570 1570
1571 const AtomicString& ComputedStyle::HyphenString() const { 1571 const AtomicString& ComputedStyle::HyphenString() const {
1572 const AtomicString& hyphenation_string = 1572 const AtomicString& hyphenation_string =
1573 rare_inherited_data_.Get()->hyphenation_string_; 1573 rare_inherited_data_.Get()->hyphenation_string_;
1574 if (!hyphenation_string.IsNull()) 1574 if (!hyphenation_string.IsNull())
1575 return hyphenation_string; 1575 return hyphenation_string;
1576 1576
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
2482 if (value < 0) 2482 if (value < 0)
2483 fvalue -= 0.5f; 2483 fvalue -= 0.5f;
2484 else 2484 else
2485 fvalue += 0.5f; 2485 fvalue += 0.5f;
2486 } 2486 }
2487 2487
2488 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); 2488 return RoundForImpreciseConversion<int>(fvalue / zoom_factor);
2489 } 2489 }
2490 2490
2491 } // namespace blink 2491 } // 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