| 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 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1077 String LayoutThemeMac::fileListNameForWidth(Locale& locale, const FileList* file
List, const Font& font, int width) const | 1077 String LayoutThemeMac::fileListNameForWidth(Locale& locale, const FileList* file
List, const Font& font, int width) const |
| 1078 { | 1078 { |
| 1079 if (width <= 0) | 1079 if (width <= 0) |
| 1080 return String(); | 1080 return String(); |
| 1081 | 1081 |
| 1082 String strToTruncate; | 1082 String strToTruncate; |
| 1083 if (fileList->isEmpty()) { | 1083 if (fileList->isEmpty()) { |
| 1084 strToTruncate = locale.queryString(WebLocalizedString::FileButtonNoFileS
electedLabel); | 1084 strToTruncate = locale.queryString(WebLocalizedString::FileButtonNoFileS
electedLabel); |
| 1085 } else if (fileList->length() == 1) { | 1085 } else if (fileList->length() == 1) { |
| 1086 File* file = fileList->item(0); | 1086 File* file = fileList->item(0); |
| 1087 if (file->userVisibility() == File::IsUserVisible) | 1087 if (file->getUserVisibility() == File::IsUserVisible) |
| 1088 strToTruncate = [[NSFileManager defaultManager] displayNameAtPath:(f
ileList->item(0)->path())]; | 1088 strToTruncate = [[NSFileManager defaultManager] displayNameAtPath:(f
ileList->item(0)->path())]; |
| 1089 else | 1089 else |
| 1090 strToTruncate = file->name(); | 1090 strToTruncate = file->name(); |
| 1091 } else { | 1091 } else { |
| 1092 // FIXME: Localization of fileList->length(). | 1092 // FIXME: Localization of fileList->length(). |
| 1093 return StringTruncator::rightTruncate(locale.queryString(WebLocalizedStr
ing::MultipleFileUploadText, String::number(fileList->length())), width, font); | 1093 return StringTruncator::rightTruncate(locale.queryString(WebLocalizedStr
ing::MultipleFileUploadText, String::number(fileList->length())), width, font); |
| 1094 } | 1094 } |
| 1095 | 1095 |
| 1096 return StringTruncator::centerTruncate(strToTruncate, width, font); | 1096 return StringTruncator::centerTruncate(strToTruncate, width, font); |
| 1097 } | 1097 } |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1167 | 1167 |
| 1168 bool LayoutThemeMac::shouldUseFallbackTheme(const ComputedStyle& style) const | 1168 bool LayoutThemeMac::shouldUseFallbackTheme(const ComputedStyle& style) const |
| 1169 { | 1169 { |
| 1170 ControlPart part = style.appearance(); | 1170 ControlPart part = style.appearance(); |
| 1171 if (part == CheckboxPart || part == RadioPart) | 1171 if (part == CheckboxPart || part == RadioPart) |
| 1172 return style.effectiveZoom() != 1; | 1172 return style.effectiveZoom() != 1; |
| 1173 return false; | 1173 return false; |
| 1174 } | 1174 } |
| 1175 | 1175 |
| 1176 } // namespace blink | 1176 } // namespace blink |
| OLD | NEW |