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

Side by Side Diff: Source/core/rendering/RenderThemeChromiumMac.mm

Issue 235373005: Handle JS-created files in <input type="file">. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed visibility bug. Created 6 years, 5 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) 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 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after
1756 1756
1757 String RenderThemeChromiumMac::fileListNameForWidth(Locale& locale, const FileLi st* fileList, const Font& font, int width) const 1757 String RenderThemeChromiumMac::fileListNameForWidth(Locale& locale, const FileLi st* fileList, const Font& font, int width) const
1758 { 1758 {
1759 if (width <= 0) 1759 if (width <= 0)
1760 return String(); 1760 return String();
1761 1761
1762 String strToTruncate; 1762 String strToTruncate;
1763 if (fileList->isEmpty()) { 1763 if (fileList->isEmpty()) {
1764 strToTruncate = locale.queryString(blink::WebLocalizedString::FileButton NoFileSelectedLabel); 1764 strToTruncate = locale.queryString(blink::WebLocalizedString::FileButton NoFileSelectedLabel);
1765 } else if (fileList->length() == 1) { 1765 } else if (fileList->length() == 1) {
1766 strToTruncate = [[NSFileManager defaultManager] displayNameAtPath:(fileL ist->item(0)->path())]; 1766 File* file = fileList->item(0);
1767 if (file->userVisibility() == File::IsUserVisible)
1768 strToTruncate = [[NSFileManager defaultManager] displayNameAtPath:(f ileList->item(0)->path())];
1769 else
1770 strToTruncate = file->name();
1767 } else { 1771 } else {
1768 // FIXME: Localization of fileList->length(). 1772 // FIXME: Localization of fileList->length().
1769 return StringTruncator::rightTruncate(locale.queryString(blink::WebLocal izedString::MultipleFileUploadText, String::number(fileList->length())), width, font); 1773 return StringTruncator::rightTruncate(locale.queryString(blink::WebLocal izedString::MultipleFileUploadText, String::number(fileList->length())), width, font);
1770 } 1774 }
1771 1775
1772 return StringTruncator::centerTruncate(strToTruncate, width, font); 1776 return StringTruncator::centerTruncate(strToTruncate, width, font);
1773 } 1777 }
1774 1778
1775 NSView* FlippedView() 1779 NSView* FlippedView()
1776 { 1780 {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1904 1908
1905 bool RenderThemeChromiumMac::shouldUseFallbackTheme(RenderStyle* style) const 1909 bool RenderThemeChromiumMac::shouldUseFallbackTheme(RenderStyle* style) const
1906 { 1910 {
1907 ControlPart part = style->appearance(); 1911 ControlPart part = style->appearance();
1908 if (part == CheckboxPart || part == RadioPart) 1912 if (part == CheckboxPart || part == RadioPart)
1909 return style->effectiveZoom() != 1; 1913 return style->effectiveZoom() != 1;
1910 return false; 1914 return false;
1911 } 1915 }
1912 1916
1913 } // namespace blink 1917 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/forms/FileInputType.cpp ('k') | Source/modules/filesystem/DOMFileSystemSync.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698