summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/android
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2009-10-09 17:07:41 +0100
committerSteve Block <steveblock@google.com>2009-10-20 00:45:05 +0100
commit8e1c14d2cd6633dac941b17af2bea9c045ee0140 (patch)
tree462ccf1f314221101a127d95d81a0419c8eb4301 /WebCore/platform/android
parente372b0aa0721bf108058f04c43ad1365058369b2 (diff)
downloadexternal_webkit-8e1c14d2cd6633dac941b17af2bea9c045ee0140.zip
external_webkit-8e1c14d2cd6633dac941b17af2bea9c045ee0140.tar.gz
external_webkit-8e1c14d2cd6633dac941b17af2bea9c045ee0140.tar.bz2
Merge webkit.org at R49305 : Update String::copy call sites to use new copy method.
See http://trac.webkit.org/changeset/49160 Change-Id: I75e1d6701f4d16fab7513f5924abf00e958e865c
Diffstat (limited to 'WebCore/platform/android')
-rw-r--r--WebCore/platform/android/FileChooserAndroid.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/WebCore/platform/android/FileChooserAndroid.cpp b/WebCore/platform/android/FileChooserAndroid.cpp
index d54c809..c293e66 100644
--- a/WebCore/platform/android/FileChooserAndroid.cpp
+++ b/WebCore/platform/android/FileChooserAndroid.cpp
@@ -36,7 +36,9 @@ String FileChooser::basenameForWidth(const Font& font, int width) const
return String();
// FIXME: This could be a lot faster, but assuming the data will not
// often be much longer than the provided width, this may be fast enough.
- String output = m_filenames[0].copy();
+ // If this does not need to be threadsafe, we can use crossThreadString().
+ // See http://trac.webkit.org/changeset/49160.
+ String output = m_filenames[0].threadsafeCopy();
while (font.width(TextRun(output.impl())) > width && output.length() > 4) {
output = output.replace(0, 4, String("..."));
}
@@ -58,4 +60,3 @@ String fileButtonNoFileSelectedLabel()
}
} // namesapce WebCore
-