Created attachment 44600 [details] Screenshot with german locale It simply too small, please see screenshot.
Apple's Safari shows a shorter string: "Keine Datei ausgewählt". Maybe changing the german localisation in qt_de.ts is the easiest fix.
Please follow the QtWebKit bug reporting guidelines when reporting bugs. See http://trac.webkit.org/wiki/QtWebKitBugs Specifically: - The 'QtWebKit' component should be used for bugs/features in the public QtWebKit API layer, not to signify that the bug is specific to the Qt port of WebKit http://trac.webkit.org/wiki/QtWebKitBugs#Component
Hi Nils - which browser are you seeing this in exactly? You haven't provided enough information to reproduce this bug so I have to close as INVALID for now. (I suspect it's not even a webkit bug as the screenshot looks like a dialog from a specific browser.)
Hi Robert, this problem is specific to QtWebKit. Best regards Nils
(In reply to comment #4) > Hi Robert, > > this problem is specific to QtWebKit. > > Best regards > > Nils Can you provide a full screenshot of the problem. Is the affected text in a webpage or in a dialog box?
Created attachment 50891 [details] Screenshot of Qt Demobrowser This screenshot shows a typical use of an upload form (input type="file") as rendered by Qt Webkit.
Perfect, get you now. In FileChooserQt.cpp: String FileChooser::basenameForWidth(const Font& f, int width) const { if (width <= 0) return String(); String string; if (m_filenames.isEmpty()) string = fileButtonNoFileSelectedLabel(); else if (m_filenames.size() == 1) { String fname = m_filenames[0]; QFontMetrics fm(f.font()); string = fm.elidedText(fname, Qt::ElideLeft, width); } else { int n = m_filenames.size(); string = QCoreApplication::translate("QWebPage", "%n file(s)", "number of chosen file", QCoreApplication::CodecForTr, n); } return string; } is not checking that the width of the localized string is equal to or less than the width of the file input element. I haven't reproduced this directly but it definitely looks like a bug.
Trying to change this to NEW!
This is an issue for not just German, and in some cases it's impossible to come up with a shorter translation. <rdar://problem/4481028>
Changing title to reflect language-agnostic nature of bug :)
Created attachment 127697 [details] Patch
Comment on attachment 127697 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=127697&action=review The code change looks fine, but how do we know that this doesn’t break the layout of existing websites? Also, is there precedent for the user’s preferred UI language affecting the layout of webpages? (To answer my own question: yes, the default line-breaking behavior depends on the user’s preferred UI language; but it is not something authors can rely on anyway). > Source/WebCore/rendering/RenderFileUploadControl.cpp:189 > + m_maxPreferredLogicalWidth = (int)ceilf(max(minDefaultLabelWidth, defaultLabelWidth)); Please change this to a static_cast<int> if it’s even necessary.
Comment on attachment 127697 [details] Patch r=me
http://trac.webkit.org/changeset/108261