| OLD | NEW |
| 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 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1579 | 1579 |
| 1580 // This makes us copy even if we may not be removing any items. | 1580 // This makes us copy even if we may not be removing any items. |
| 1581 CounterDirectiveMap& map = AccessCounterDirectives(); | 1581 CounterDirectiveMap& map = AccessCounterDirectives(); |
| 1582 typedef CounterDirectiveMap::iterator Iterator; | 1582 typedef CounterDirectiveMap::iterator Iterator; |
| 1583 | 1583 |
| 1584 Iterator end = map.end(); | 1584 Iterator end = map.end(); |
| 1585 for (Iterator it = map.begin(); it != end; ++it) | 1585 for (Iterator it = map.begin(); it != end; ++it) |
| 1586 it->value.ClearReset(); | 1586 it->value.ClearReset(); |
| 1587 } | 1587 } |
| 1588 | 1588 |
| 1589 AtomicString ComputedStyle::LocaleForLineBreakIterator() const { |
| 1590 LineBreakIteratorMode mode = LineBreakIteratorMode::kDefault; |
| 1591 switch (GetLineBreak()) { |
| 1592 case kLineBreakAuto: |
| 1593 case kLineBreakAfterWhiteSpace: |
| 1594 return Locale(); |
| 1595 case kLineBreakNormal: |
| 1596 mode = LineBreakIteratorMode::kNormal; |
| 1597 break; |
| 1598 case kLineBreakStrict: |
| 1599 mode = LineBreakIteratorMode::kStrict; |
| 1600 break; |
| 1601 case kLineBreakLoose: |
| 1602 mode = LineBreakIteratorMode::kLoose; |
| 1603 break; |
| 1604 } |
| 1605 if (const LayoutLocale* locale = GetFontDescription().Locale()) |
| 1606 return locale->LocaleWithBreakKeyword(mode); |
| 1607 return Locale(); |
| 1608 } |
| 1609 |
| 1589 Hyphenation* ComputedStyle::GetHyphenation() const { | 1610 Hyphenation* ComputedStyle::GetHyphenation() const { |
| 1590 return GetHyphens() == kHyphensAuto | 1611 return GetHyphens() == kHyphensAuto |
| 1591 ? GetFontDescription().LocaleOrDefault().GetHyphenation() | 1612 ? GetFontDescription().LocaleOrDefault().GetHyphenation() |
| 1592 : nullptr; | 1613 : nullptr; |
| 1593 } | 1614 } |
| 1594 | 1615 |
| 1595 const AtomicString& ComputedStyle::HyphenString() const { | 1616 const AtomicString& ComputedStyle::HyphenString() const { |
| 1596 const AtomicString& hyphenation_string = | 1617 const AtomicString& hyphenation_string = |
| 1597 rare_inherited_data_.Get()->hyphenation_string; | 1618 rare_inherited_data_.Get()->hyphenation_string; |
| 1598 if (!hyphenation_string.IsNull()) | 1619 if (!hyphenation_string.IsNull()) |
| (...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2506 if (value < 0) | 2527 if (value < 0) |
| 2507 fvalue -= 0.5f; | 2528 fvalue -= 0.5f; |
| 2508 else | 2529 else |
| 2509 fvalue += 0.5f; | 2530 fvalue += 0.5f; |
| 2510 } | 2531 } |
| 2511 | 2532 |
| 2512 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); | 2533 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); |
| 2513 } | 2534 } |
| 2514 | 2535 |
| 2515 } // namespace blink | 2536 } // namespace blink |
| OLD | NEW |