[webkit-reviews] review granted: [Bug 85286] [GTK] Compilation warnings in RenderTheme : [Attachment 139770] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed May 2 08:14:20 PDT 2012
Martin Robinson <mrobinson at webkit.org> has granted Philippe Normand
<pnormand at igalia.com>'s request for review:
Bug 85286: [GTK] Compilation warnings in RenderTheme
https://bugs.webkit.org/show_bug.cgi?id=85286
Attachment 139770: Patch
https://bugs.webkit.org/attachment.cgi?id=139770&action=review
------- Additional Comments from Martin Robinson <mrobinson at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=139770&action=review
> Source/WebCore/platform/gtk/RenderThemeGtk.cpp:707
> String string = fileButtonNoFileSelectedLabel();
> if (multipleFilesAllowed)
> string = fileButtonNoFilesSelectedLabel();
>
> - if (fileList->length() == 1) {
> - CString systemFilename =
fileSystemRepresentation(fileList->item(0)->path());
> - gchar* systemBasename = g_path_get_basename(systemFilename.data());
> - } else if (fileList->length() > 1)
> - return
StringTruncator::rightTruncate(multipleFileUploadText(fileList->length()),
width, font, StringTruncator::EnableRoundingHacks);
> + if (fileList->length())
> + string = pathGetFileName(fileList->item(0)->path());
Now that I look at this again, it seems like it should be structured as an
if-else if-else block:
String string;
if (fileList->length())
string = pathGetFileName(fileList->item(0)->path());
else if (multipleFilesAllowed)
string = fileButtonNoFilesSelectedLabel();
else if
string = fileButtonNoFileSelectedLabel();
Sorry for not mentioning it before.
More information about the webkit-reviews
mailing list