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 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
996 String strToTruncate; | 996 String strToTruncate; |
997 if (fileList->isEmpty()) { | 997 if (fileList->isEmpty()) { |
998 strToTruncate = locale.queryString(WebLocalizedString::FileButtonNoFileS
electedLabel); | 998 strToTruncate = locale.queryString(WebLocalizedString::FileButtonNoFileS
electedLabel); |
999 } else if (fileList->length() == 1) { | 999 } else if (fileList->length() == 1) { |
1000 File* file = fileList->item(0); | 1000 File* file = fileList->item(0); |
1001 if (file->getUserVisibility() == File::IsUserVisible) | 1001 if (file->getUserVisibility() == File::IsUserVisible) |
1002 strToTruncate = [[NSFileManager defaultManager] displayNameAtPath:(f
ileList->item(0)->path())]; | 1002 strToTruncate = [[NSFileManager defaultManager] displayNameAtPath:(f
ileList->item(0)->path())]; |
1003 else | 1003 else |
1004 strToTruncate = file->name(); | 1004 strToTruncate = file->name(); |
1005 } else { | 1005 } else { |
1006 // FIXME: Localization of fileList->length(). | 1006 return StringTruncator::rightTruncate(locale.queryString(WebLocalizedStr
ing::MultipleFileUploadText, locale.convertToLocalizedNumber(String::number(file
List->length()))), width, font); |
1007 return StringTruncator::rightTruncate(locale.queryString(WebLocalizedStr
ing::MultipleFileUploadText, String::number(fileList->length())), width, font); | |
1008 } | 1007 } |
1009 | 1008 |
1010 return StringTruncator::centerTruncate(strToTruncate, width, font); | 1009 return StringTruncator::centerTruncate(strToTruncate, width, font); |
1011 } | 1010 } |
1012 | 1011 |
1013 NSView* FlippedView() | 1012 NSView* FlippedView() |
1014 { | 1013 { |
1015 static NSView* view = [[BlinkFlippedView alloc] init]; | 1014 static NSView* view = [[BlinkFlippedView alloc] init]; |
1016 return view; | 1015 return view; |
1017 } | 1016 } |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1104 | 1103 |
1105 bool LayoutThemeMac::shouldUseFallbackTheme(const ComputedStyle& style) const | 1104 bool LayoutThemeMac::shouldUseFallbackTheme(const ComputedStyle& style) const |
1106 { | 1105 { |
1107 ControlPart part = style.appearance(); | 1106 ControlPart part = style.appearance(); |
1108 if (part == CheckboxPart || part == RadioPart) | 1107 if (part == CheckboxPart || part == RadioPart) |
1109 return style.effectiveZoom() != 1; | 1108 return style.effectiveZoom() != 1; |
1110 return false; | 1109 return false; |
1111 } | 1110 } |
1112 | 1111 |
1113 } // namespace blink | 1112 } // namespace blink |
OLD | NEW |