⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 89039 in webkit


Ignore:
Timestamp:
Jun 16, 2011, 10:33:18 AM (15 years ago)
Author:
Dimitri Glazkov
Message:

2011-06-15 Dimitri Glazkov <Dimitri Glazkov>

Reviewed by Kent Tamura.

Move FileChooser::basenameForWidth to RenderTheme::fileListNameForWidth, eliminate gnarly FileChooserFoo proliferation.
https://bugs.webkit.org/show_bug.cgi?id=62748

Refactoring, covered by existing tests.

  • CMakeListsEfl.txt: Removed FileChooserFoo from build system.
  • CMakeListsWinCE.txt: Ditto.
  • GNUmakefile.list.am: Ditto.
  • WebCore.gypi: Ditto.
  • WebCore.order: Ditto.
  • WebCore.pro: Ditto.
  • WebCore.vcproj/WebCore.vcproj: Ditto.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • platform/FileChooser.h: Removed baseNameForWidth decl.
  • platform/FileSystem.h: Removed now-unnecessary Chromium-specific cruft.
  • platform/android/FileChooserAndroid.cpp: Removed.
  • platform/brew/FileChooserBrew.cpp: Removed.
  • platform/chromium/FileChooserChromium.cpp: Removed.
  • platform/chromium/FileSystemChromiumLinux.cpp: Removed now-unnecessary code.
  • platform/chromium/FileSystemChromiumMac.mm: Ditto.
  • platform/chromium/FileSystemChromiumWin.cpp: Ditto.
  • platform/efl/FileChooserEfl.cpp: Removed.
  • platform/gtk/FileChooserGtk.cpp: Removed.
  • platform/gtk/RenderThemeGtk.cpp: (WebCore::stringByAdoptingFileSystemRepresentation): Moved from FileChooserGtk. (WebCore::RenderThemeGtk::fileListNameForWidth): Ditto.
  • platform/gtk/RenderThemeGtk.h: Added decl.
  • platform/haiku/FileChooserHaiku.cpp: Removed.
  • platform/mac/FileChooserMac.mm: Removed.
  • platform/qt/FileChooserQt.cpp: Removed.
  • platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::RenderThemeQt): Moved from FileChooserQt. (WebCore::RenderThemeQt::fileListNameForWidth): Ditto.
  • platform/qt/RenderThemeQt.h: Adde decl.
  • platform/win/FileChooserWin.cpp: Removed.
  • platform/wx/FileChooserWx.cpp: Removed.
  • rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::fileTextValue): Changed to use RenderTheme.
  • rendering/RenderTheme.cpp: (WebCore::RenderTheme::fileListNameForWidth): Added default impl.
  • rendering/RenderTheme.h: Added decl.
  • rendering/RenderThemeMac.h: Ditto.
  • rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::fileListNameForWidth): Added default Mac impl.
Location:
trunk/Source/WebCore
Files:
10 deleted
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/CMakeListsEfl.txt

    r88711 r89039  
    3131  platform/efl/DragImageEfl.cpp
    3232  platform/efl/EventLoopEfl.cpp
    33   platform/efl/FileChooserEfl.cpp
    3433  platform/efl/FileSystemEfl.cpp
    3534  platform/efl/KURLEfl.cpp
  • trunk/Source/WebCore/CMakeListsWinCE.txt

    r88711 r89039  
    5656    platform/win/EditorWin.cpp
    5757    platform/win/EventLoopWin.cpp
    58     platform/win/FileChooserWin.cpp
    5958    platform/win/KeyEventWin.cpp
    6059    platform/win/LanguageWin.cpp
  • trunk/Source/WebCore/ChangeLog

    r89036 r89039  
     12011-06-15  Dimitri Glazkov  <dglazkov@chromium.org>
     2
     3        Reviewed by Kent Tamura.
     4
     5        Move FileChooser::basenameForWidth to RenderTheme::fileListNameForWidth, eliminate gnarly FileChooserFoo proliferation.
     6        https://bugs.webkit.org/show_bug.cgi?id=62748
     7
     8        Refactoring, covered by existing tests.
     9
     10        * CMakeListsEfl.txt: Removed FileChooserFoo from build system.
     11        * CMakeListsWinCE.txt: Ditto.
     12        * GNUmakefile.list.am: Ditto.
     13        * WebCore.gypi: Ditto.
     14        * WebCore.order: Ditto.
     15        * WebCore.pro: Ditto.
     16        * WebCore.vcproj/WebCore.vcproj: Ditto.
     17        * WebCore.xcodeproj/project.pbxproj: Ditto.
     18        * platform/FileChooser.h: Removed baseNameForWidth decl.
     19        * platform/FileSystem.h: Removed now-unnecessary Chromium-specific cruft.
     20        * platform/android/FileChooserAndroid.cpp: Removed.
     21        * platform/brew/FileChooserBrew.cpp: Removed.
     22        * platform/chromium/FileChooserChromium.cpp: Removed.
     23        * platform/chromium/FileSystemChromiumLinux.cpp: Removed now-unnecessary code.
     24        * platform/chromium/FileSystemChromiumMac.mm: Ditto.
     25        * platform/chromium/FileSystemChromiumWin.cpp: Ditto.
     26        * platform/efl/FileChooserEfl.cpp: Removed.
     27        * platform/gtk/FileChooserGtk.cpp: Removed.
     28        * platform/gtk/RenderThemeGtk.cpp:
     29        (WebCore::stringByAdoptingFileSystemRepresentation): Moved from FileChooserGtk.
     30        (WebCore::RenderThemeGtk::fileListNameForWidth): Ditto.
     31        * platform/gtk/RenderThemeGtk.h: Added decl.
     32        * platform/haiku/FileChooserHaiku.cpp: Removed.
     33        * platform/mac/FileChooserMac.mm: Removed.
     34        * platform/qt/FileChooserQt.cpp: Removed.
     35        * platform/qt/RenderThemeQt.cpp:
     36        (WebCore::RenderThemeQt::RenderThemeQt): Moved from FileChooserQt.
     37        (WebCore::RenderThemeQt::fileListNameForWidth): Ditto.
     38        * platform/qt/RenderThemeQt.h: Adde decl.
     39        * platform/win/FileChooserWin.cpp: Removed.
     40        * platform/wx/FileChooserWx.cpp: Removed.
     41        * rendering/RenderFileUploadControl.cpp:
     42        (WebCore::RenderFileUploadControl::fileTextValue): Changed to use RenderTheme.
     43        * rendering/RenderTheme.cpp:
     44        (WebCore::RenderTheme::fileListNameForWidth): Added default impl.
     45        * rendering/RenderTheme.h: Added decl.
     46        * rendering/RenderThemeMac.h: Ditto.
     47        * rendering/RenderThemeMac.mm:
     48        (WebCore::RenderThemeMac::fileListNameForWidth): Added default Mac impl.
     49
    1502011-06-16  Vsevolod Vlasov  <vsevik@chromium.org>
    251
  • trunk/Source/WebCore/GNUmakefile.list.am

    r89036 r89039  
    38053805        Source/WebCore/platform/gtk/DragImageGtk.cpp \
    38063806        Source/WebCore/platform/gtk/EventLoopGtk.cpp \
    3807         Source/WebCore/platform/gtk/FileChooserGtk.cpp \
    38083807        Source/WebCore/platform/gtk/FileSystemGtk.cpp \
    38093808        Source/WebCore/platform/gtk/GtkClickCounter.cpp \
  • trunk/Source/WebCore/WebCore.gypi

    r89036 r89039  
    36603660            'platform/android/DragDataAndroid.cpp',
    36613661            'platform/android/EventLoopAndroid.cpp',
    3662             'platform/android/FileChooserAndroid.cpp',
    36633662            'platform/android/FileSystemAndroid.cpp',
    36643663            'platform/android/GeolocationServiceAndroid.cpp',
     
    37673766            'platform/brew/DragDataBrew.cpp',
    37683767            'platform/brew/EventLoopBrew.cpp',
    3769             'platform/brew/FileChooserBrew.cpp',
    37703768            'platform/brew/FileSystemBrew.cpp',
    37713769            'platform/brew/KURLBrew.cpp',
     
    38223820            'platform/chromium/DragImageChromiumSkia.cpp',
    38233821            'platform/chromium/DragImageRef.h',
    3824             'platform/chromium/FileChooserChromium.cpp',
    38253822            'platform/chromium/FileSystemChromium.cpp',
    38263823            'platform/chromium/FileSystemChromiumLinux.cpp',
     
    38863883            'platform/efl/DragImageEfl.cpp',
    38873884            'platform/efl/EventLoopEfl.cpp',
    3888             'platform/efl/FileChooserEfl.cpp',
    38893885            'platform/efl/FileSystemEfl.cpp',
    38903886            'platform/efl/KURLEfl.cpp',
     
    45924588            'platform/gtk/DragImageGtk.cpp',
    45934589            'platform/gtk/EventLoopGtk.cpp',
    4594             'platform/gtk/FileChooserGtk.cpp',
    45954590            'platform/gtk/FileSystemGtk.cpp',
    45964591            'platform/gtk/GOwnPtrGtk.cpp',
     
    46454640            'platform/haiku/DragImageHaiku.cpp',
    46464641            'platform/haiku/EventLoopHaiku.cpp',
    4647             'platform/haiku/FileChooserHaiku.cpp',
    46484642            'platform/haiku/FileSystemHaiku.cpp',
    46494643            'platform/haiku/LocalizedStringsHaiku.cpp',
     
    47134707            'platform/mac/DragImageMac.mm',
    47144708            'platform/mac/EventLoopMac.mm',
    4715             'platform/mac/FileChooserMac.mm',
    47164709            'platform/mac/FileSystemMac.mm',
    47174710            'platform/mac/HTMLConverter.h',
     
    49304923            'platform/qt/DragImageQt.cpp',
    49314924            'platform/qt/EventLoopQt.cpp',
    4932             'platform/qt/FileChooserQt.cpp',
    49334925            'platform/qt/FileSystemQt.cpp',
    49344926            'platform/qt/KURLQt.cpp',
     
    50625054            'platform/win/EditorWin.cpp',
    50635055            'platform/win/EventLoopWin.cpp',
    5064             'platform/win/FileChooserWin.cpp',
    50655056            'platform/win/FileSystemWin.cpp',
    50665057            'platform/win/GDIObjectCounter.cpp',
     
    51195110            'platform/wx/DragImageWx.cpp',
    51205111            'platform/wx/EventLoopWx.cpp',
    5121             'platform/wx/FileChooserWx.cpp',
    51225112            'platform/wx/FileSystemWx.cpp',
    51235113            'platform/wx/KURLWx.cpp',
  • trunk/Source/WebCore/WebCore.order

    r88952 r89039  
    75657565__ZNK7WebCore13FileInputType12isFileUploadEv
    75667566__ZN7WebCore23RenderFileUploadControl11paintObjectERNS_9PaintInfoEii
    7567 __ZNK7WebCore11FileChooser16basenameForWidthERKNS_4FontEi
    75687567__ZN7WebCore29fileButtonNoFileSelectedLabelEv
    75697568__ZN7WebCore27DefaultLocalizationStrategy29fileButtonNoFileSelectedLabelEv
  • trunk/Source/WebCore/WebCore.pro

    r89036 r89039  
    25382538    platform/qt/DragImageQt.cpp \
    25392539    platform/qt/EventLoopQt.cpp \
    2540     platform/qt/FileChooserQt.cpp \
    25412540    platform/qt/FileSystemQt.cpp \
    25422541    platform/qt/SharedBufferQt.cpp \
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r89036 r89039  
    2687826878                                </File>
    2687926879                                <File
    26880                                         RelativePath="..\platform\win\FileChooserWin.cpp"
    26881                                         >
    26882                                 </File>
    26883                                 <File
    2688426880                                        RelativePath="..\platform\win\FileSystemWin.cpp"
    2688526881                                        >
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r89036 r89039  
    6161                0668E1900ADD9640004128E0 /* PopupMenuMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0668E18E0ADD9640004128E0 /* PopupMenuMac.mm */; };
    6262                066C772B0AB603B700238CC4 /* FileChooser.h in Headers */ = {isa = PBXBuildFile; fileRef = 066C772A0AB603B700238CC4 /* FileChooser.h */; settings = {ATTRIBUTES = (Private, ); }; };
    63                 066C772D0AB603D200238CC4 /* FileChooserMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 066C772C0AB603D200238CC4 /* FileChooserMac.mm */; };
    6463                066C77300AB603FD00238CC4 /* RenderFileUploadControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 066C772E0AB603FD00238CC4 /* RenderFileUploadControl.cpp */; };
    6564                066C77310AB603FD00238CC4 /* RenderFileUploadControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 066C772F0AB603FD00238CC4 /* RenderFileUploadControl.h */; };
     
    63636362                0668E18E0ADD9640004128E0 /* PopupMenuMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = PopupMenuMac.mm; sourceTree = "<group>"; };
    63646363                066C772A0AB603B700238CC4 /* FileChooser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FileChooser.h; sourceTree = "<group>"; };
    6365                 066C772C0AB603D200238CC4 /* FileChooserMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = FileChooserMac.mm; sourceTree = "<group>"; };
    63666364                066C772E0AB603FD00238CC4 /* RenderFileUploadControl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderFileUploadControl.cpp; sourceTree = "<group>"; };
    63676365                066C772F0AB603FD00238CC4 /* RenderFileUploadControl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderFileUploadControl.h; sourceTree = "<group>"; };
     
    1417214170                                5DC87EEF11716DF2001C0E6D /* EmptyProtocolDefinitions.h */,
    1417314171                                1CA19E030DC255950065A994 /* EventLoopMac.mm */,
    14174                                 066C772C0AB603D200238CC4 /* FileChooserMac.mm */,
    1417514172                                514B3F750C722055000530DF /* FileSystemMac.mm */,
    1417614173                                935C476C09AC4D6300A6AAB4 /* FoundationExtras.h */,
     
    2386523862                                976D6C80122B8A3D001FD1F7 /* File.cpp in Sources */,
    2386623863                                934FE9E50B5CA539003E4A73 /* FileChooser.cpp in Sources */,
    23867                                 066C772D0AB603D200238CC4 /* FileChooserMac.mm in Sources */,
    2386823864                                89878561122CA064003AABDA /* FileEntry.cpp in Sources */,
    2386923865                                893C480E1248BD3A002B3D86 /* FileEntrySync.cpp in Sources */,
  • trunk/Source/WebCore/platform/FileChooser.h

    r88977 r89039  
    6262
    6363    const Vector<String>& filenames() const { return m_filenames; }
    64     String basenameForWidth(const Font&, int width) const;
    6564
    6665    Icon* icon() const { return m_icon.get(); }
  • trunk/Source/WebCore/platform/FileSystem.h

    r84059 r89039  
    202202#endif
    203203
    204 #if PLATFORM(CHROMIUM)
    205 String pathGetDisplayFileName(const String&);
    206 #endif
    207 
    208204#if PLATFORM(GTK)
    209205String filenameToString(const char*);
  • trunk/Source/WebCore/platform/chromium/FileSystemChromiumLinux.cpp

    r48095 r89039  
    3939}
    4040
    41 String pathGetDisplayFileName(const String& path)
    42 {
    43     return pathGetFileName(path);
    44 }
    45 
    4641} // namespace WebCore
  • trunk/Source/WebCore/platform/chromium/FileSystemChromiumMac.mm

    r48095 r89039  
    4242}
    4343
    44 String pathGetDisplayFileName(const String& path)
    45 {
    46     return [[NSFileManager defaultManager] displayNameAtPath:path];
    47 }
    48 
    4944} // namespace WebCore
  • trunk/Source/WebCore/platform/chromium/FileSystemChromiumWin.cpp

    r48095 r89039  
    4242}
    4343
    44 String pathGetDisplayFileName(const String& path)
    45 {
    46     return pathGetFileName(path);
    47 }
    48 
    4944} // namespace WebCore
  • trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp

    r88405 r89039  
    2727
    2828#include "CSSValueKeywords.h"
     29#include "FileSystem.h"
    2930#include "GOwnPtr.h"
    3031#include "Gradient.h"
     
    3334#include "HTMLMediaElement.h"
    3435#include "HTMLNames.h"
     36#include "LocalizedStrings.h"
    3537#include "MediaControlElements.h"
    3638#include "PaintInfo.h"
     
    3840#include "RenderBox.h"
    3941#include "RenderObject.h"
     42#include "StringTruncator.h"
    4043#include "TimeRanges.h"
    4144#include "UserAgentStyleSheets.h"
    4245#include <gdk/gdk.h>
     46#include <glib.h>
    4347#include <gtk/gtk.h>
     48#include <wtf/text/CString.h>
    4449
    4550#if ENABLE(PROGRESS_TAG)
     
    678683#endif
    679684
    680 }
     685static bool stringByAdoptingFileSystemRepresentation(gchar* systemFilename, String& result)
     686{
     687    if (!systemFilename)
     688        return false;
     689
     690    result = filenameToString(systemFilename);
     691    g_free(systemFilename);
     692
     693    return true;
     694}
     695
     696String RenderThemeGtk::fileListNameForWidth(const Vector<String>& filenames, const Font& font, int width)
     697{
     698    if (width <= 0)
     699        return String();
     700
     701    String string = fileButtonNoFileSelectedLabel();
     702
     703    if (filenames.size() == 1) {
     704        CString systemFilename = fileSystemRepresentation(filenames[0]);
     705        gchar* systemBasename = g_path_get_basename(systemFilename.data());
     706        stringByAdoptingFileSystemRepresentation(systemBasename, string);
     707    } else if (filenames.size() > 1)
     708        return StringTruncator::rightTruncate(multipleFileUploadText(filenames.size()), width, font);
     709
     710    return StringTruncator::centerTruncate(string, width, font);
     711}
     712
     713}
  • trunk/Source/WebCore/platform/gtk/RenderThemeGtk.h

    r88405 r89039  
    176176
    177177private:
     178    virtual String fileListNameForWidth(const Vector<String>& filenames, const Font&, int width);
     179
    178180    void platformInit();
    179181    static void setTextInputBorders(RenderStyle*);
  • trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp

    r88787 r89039  
    4848#include "QtMobileWebStyle.h"
    4949#endif
     50#include "LocalizedStrings.h"
    5051#if ENABLE(VIDEO)
    5152#include "MediaControlElements.h"
     
    7071#include <QApplication>
    7172#include <QColor>
     73#include <QCoreApplication>
    7274#include <QFile>
     75#include <QFontMetrics>
    7376#include <QLineEdit>
    7477#include <QMacStyle>
     
    15011504}
    15021505
     1506String RenderThemeQt::fileListNameForWidth(const Vector<String>& filenames, const Font& font, int width)
     1507{
     1508    if (width <= 0)
     1509        return String();
     1510
     1511    String string;
     1512    if (filenames.isEmpty())
     1513        string = fileButtonNoFileSelectedLabel();
     1514    else if (filenames.size() == 1) {
     1515        String fname = filenames[0];
     1516        QFontMetrics fm(f.font());
     1517        string = fm.elidedText(fname, Qt::ElideLeft, width);
     1518    } else {
     1519        int n = filenames.size();
     1520        string = QCoreApplication::translate("QWebPage", "%n file(s)",
     1521                                             "number of chosen file",
     1522                                             QCoreApplication::CodecForTr, n);
     1523    }
     1524
     1525    return string;
     1526}
     1527
    15031528}
    15041529
  • trunk/Source/WebCore/platform/qt/RenderThemeQt.h

    r88410 r89039  
    161161    virtual bool hasOwnDisabledStateHandlingFor(ControlPart) const { return true; }
    162162private:
     163    virtual String fileListNameForWidth(const Vector<String>& filenames, const Font&, int width);
     164
    163165    void paintMediaBackground(QPainter* painter, const IntRect& r) const;
    164166    double mediaControlsBaselineOpacity() const;
  • trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp

    r88622 r89039  
    316316String RenderFileUploadControl::fileTextValue() const
    317317{
    318     return m_fileChooser->basenameForWidth(style()->font(), maxFilenameWidth());
     318    return theme()->fileListNameForWidth(m_fileChooser->filenames(), style()->font(), maxFilenameWidth());
    319319}
    320320   
  • trunk/Source/WebCore/rendering/RenderTheme.cpp

    r88757 r89039  
    2525#include "CSSValueKeywords.h"
    2626#include "Document.h"
     27#include "FileSystem.h"
    2728#include "FloatConversion.h"
    2829#include "FocusController.h"
     
    3334#include "HTMLInputElement.h"
    3435#include "HTMLNames.h"
     36#include "LocalizedStrings.h"
    3537#include "MediaControlElements.h"
    3638#include "Page.h"
     
    3941#include "RenderView.h"
    4042#include "Settings.h"
     43#include "StringTruncator.h"
    4144#include "TextControlInnerElements.h"
    4245
     
    10921095}
    10931096
     1097String RenderTheme::fileListNameForWidth(const Vector<String>& filenames, const Font& font, int width)
     1098{
     1099    if (width <= 0)
     1100        return String();
     1101
     1102    String string;
     1103    if (filenames.isEmpty())
     1104        string = fileButtonNoFileSelectedLabel();
     1105    else if (filenames.size() == 1)
     1106        string = pathGetFileName(filenames[0]);
     1107    else
     1108        return StringTruncator::rightTruncate(multipleFileUploadText(filenames.size()), width, font);
     1109
     1110    return StringTruncator::centerTruncate(string, width, font);
     1111}
     1112
     1113
    10941114} // namespace WebCore
  • trunk/Source/WebCore/rendering/RenderTheme.h

    r88405 r89039  
    204204    virtual bool shouldShowPlaceholderWhenFocused() const { return false; }
    205205    virtual bool shouldHaveSpinButton(HTMLInputElement*) const;
     206
     207    virtual String fileListNameForWidth(const Vector<String>& filenames, const Font&, int width);
    206208
    207209protected:
  • trunk/Source/WebCore/rendering/RenderThemeMac.h

    r88405 r89039  
    178178
    179179private:
     180    virtual String fileListNameForWidth(const Vector<String>& filenames, const Font&, int width) const;
    180181
    181182    IntRect inflateRect(const IntRect&, const IntSize&, const int* margins, float zoomLevel = 1.0f) const;
  • trunk/Source/WebCore/rendering/RenderThemeMac.mm

    r88469 r89039  
    3535#import "ImageBuffer.h"
    3636#import "LocalCurrentGraphicsContext.h"
     37#import "LocalizedStrings.h"
    3738#import "MediaControlElements.h"
    3839#import "PaintInfo.h"
     
    4243#import "RenderView.h"
    4344#import "SharedBuffer.h"
     45#import "StringTruncator.h"
    4446#import "TimeRanges.h"
    4547#import "ThemeMac.h"
     
    20502052}
    20512053
     2054String RenderThemeMac::fileListNameForWidth(const Vector<String>& filenames, const Font& font, int width) const
     2055{
     2056    if (width <= 0)
     2057        return String();
     2058
     2059    String strToTruncate;
     2060    if (filenames.isEmpty())
     2061        strToTruncate = fileButtonNoFileSelectedLabel();
     2062    else if (filenames.size() == 1)
     2063        strToTruncate = [[NSFileManager defaultManager] displayNameAtPath:(filenames[0])];
     2064    else
     2065        return StringTruncator::rightTruncate(multipleFileUploadText(filenames.size()), width, font);
     2066
     2067    return StringTruncator::centerTruncate(strToTruncate, width, font);
     2068}
     2069
    20522070} // namespace WebCore
Note: See TracChangeset for help on using the changeset viewer.