OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008, 2009 Google, Inc. | 3 * Copyright (C) 2008, 2009 Google, Inc. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 1722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1733 return m_textField.get(); | 1733 return m_textField.get(); |
1734 } | 1734 } |
1735 | 1735 |
1736 String RenderThemeChromiumMac::fileListNameForWidth(Locale& locale, const FileLi
st* fileList, const Font& font, int width) const | 1736 String RenderThemeChromiumMac::fileListNameForWidth(Locale& locale, const FileLi
st* fileList, const Font& font, int width) const |
1737 { | 1737 { |
1738 if (width <= 0) | 1738 if (width <= 0) |
1739 return String(); | 1739 return String(); |
1740 | 1740 |
1741 String strToTruncate; | 1741 String strToTruncate; |
1742 if (fileList->isEmpty()) { | 1742 if (fileList->isEmpty()) { |
1743 strToTruncate = locale.queryString(blink::WebLocalizedString::FileButton
NoFileSelectedLabel); | 1743 strToTruncate = locale.queryString(WebLocalizedString::FileButtonNoFileS
electedLabel); |
1744 } else if (fileList->length() == 1) { | 1744 } else if (fileList->length() == 1) { |
1745 File* file = fileList->item(0); | 1745 File* file = fileList->item(0); |
1746 if (file->userVisibility() == File::IsUserVisible) | 1746 if (file->userVisibility() == File::IsUserVisible) |
1747 strToTruncate = [[NSFileManager defaultManager] displayNameAtPath:(f
ileList->item(0)->path())]; | 1747 strToTruncate = [[NSFileManager defaultManager] displayNameAtPath:(f
ileList->item(0)->path())]; |
1748 else | 1748 else |
1749 strToTruncate = file->name(); | 1749 strToTruncate = file->name(); |
1750 } else { | 1750 } else { |
1751 // FIXME: Localization of fileList->length(). | 1751 // FIXME: Localization of fileList->length(). |
1752 return StringTruncator::rightTruncate(locale.queryString(blink::WebLocal
izedString::MultipleFileUploadText, String::number(fileList->length())), width,
font); | 1752 return StringTruncator::rightTruncate(locale.queryString(WebLocalizedStr
ing::MultipleFileUploadText, String::number(fileList->length())), width, font); |
1753 } | 1753 } |
1754 | 1754 |
1755 return StringTruncator::centerTruncate(strToTruncate, width, font); | 1755 return StringTruncator::centerTruncate(strToTruncate, width, font); |
1756 } | 1756 } |
1757 | 1757 |
1758 NSView* FlippedView() | 1758 NSView* FlippedView() |
1759 { | 1759 { |
1760 static NSView* view = [[RTCMFlippedView alloc] init]; | 1760 static NSView* view = [[RTCMFlippedView alloc] init]; |
1761 return view; | 1761 return view; |
1762 } | 1762 } |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1887 | 1887 |
1888 bool RenderThemeChromiumMac::shouldUseFallbackTheme(RenderStyle* style) const | 1888 bool RenderThemeChromiumMac::shouldUseFallbackTheme(RenderStyle* style) const |
1889 { | 1889 { |
1890 ControlPart part = style->appearance(); | 1890 ControlPart part = style->appearance(); |
1891 if (part == CheckboxPart || part == RadioPart) | 1891 if (part == CheckboxPart || part == RadioPart) |
1892 return style->effectiveZoom() != 1; | 1892 return style->effectiveZoom() != 1; |
1893 return false; | 1893 return false; |
1894 } | 1894 } |
1895 | 1895 |
1896 } // namespace blink | 1896 } // namespace blink |
OLD | NEW |