diff options
author | Leon Scroggins <scroggo@google.com> | 2009-10-02 15:55:01 -0400 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2009-10-09 13:46:58 -0400 |
commit | bf280393189a33efa29a33c0d96c84710484f2f7 (patch) | |
tree | 084219fe1caff06c871fdf567426d42d7f79dafb /WebCore | |
parent | b7460af0ad232b4bea4893febafe08895a3ef35b (diff) | |
download | external_webkit-bf280393189a33efa29a33c0d96c84710484f2f7.zip external_webkit-bf280393189a33efa29a33c0d96c84710484f2f7.tar.gz external_webkit-bf280393189a33efa29a33c0d96c84710484f2f7.tar.bz2 |
File upload.
Webkit implementation for passing in the data for file uploads.
Requires a change to frameworks/base to not break things; also
requires a change to packages/apps/Browser to work.
Fixes http://b/issue?id=675743
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/Android.mk | 1 | ||||
-rw-r--r-- | WebCore/WebCorePrefixAndroid.h | 4 | ||||
-rw-r--r-- | WebCore/platform/android/FileChooserAndroid.cpp | 4 | ||||
-rw-r--r-- | WebCore/platform/android/TemporaryLinkStubs.cpp | 12 | ||||
-rw-r--r-- | WebCore/rendering/RenderFileUploadControl.cpp | 4 |
5 files changed, 2 insertions, 23 deletions
diff --git a/WebCore/Android.mk b/WebCore/Android.mk index 595f5a5..bd97d03 100644 --- a/WebCore/Android.mk +++ b/WebCore/Android.mk @@ -37,7 +37,6 @@ # editing/BackForwardListChromium.cpp \ # editing/SmartReplace*.cpp \ # history/BackForwardListChromium.cpp \ -# html/FileList.cpp \ # html/HTMLElementsAllInOne.cpp \ # loader/CachedXBLDocument.cpp \ # loader/CachedXSLStyleSheet.cpp \ diff --git a/WebCore/WebCorePrefixAndroid.h b/WebCore/WebCorePrefixAndroid.h index 01e9b28..068ae98 100644 --- a/WebCore/WebCorePrefixAndroid.h +++ b/WebCore/WebCorePrefixAndroid.h @@ -98,10 +98,6 @@ typedef unsigned char flex_uint8_t; #define ANDROID_MULTIPLE_WINDOWS #define ANDROID_CSS_TAP_HIGHLIGHT_COLOR -// Hack to make File Upload buttons draw disabled. -// Will be removed if/when we get file uploads working. -#define ANDROID_DISABLE_UPLOAD - #define ANDROID_BLOCK_NETWORK_IMAGE // Changes needed to support native plugins (npapi.h). If the change is generic, diff --git a/WebCore/platform/android/FileChooserAndroid.cpp b/WebCore/platform/android/FileChooserAndroid.cpp index ec1b758..d54c809 100644 --- a/WebCore/platform/android/FileChooserAndroid.cpp +++ b/WebCore/platform/android/FileChooserAndroid.cpp @@ -38,7 +38,7 @@ String FileChooser::basenameForWidth(const Font& font, int width) const // often be much longer than the provided width, this may be fast enough. String output = m_filenames[0].copy(); while (font.width(TextRun(output.impl())) > width && output.length() > 4) { - output = output.replace(output.length() - 4, 4, String("...")); + output = output.replace(0, 4, String("...")); } return output; } @@ -49,7 +49,7 @@ String FileChooser::basenameForWidth(const Font& font, int width) const // second string is rendered on the screen when no file has been selected. String fileButtonChooseFileLabel() { - return String("Uploads Disabled"); + return String("Upload a file"); } String fileButtonNoFileSelectedLabel() diff --git a/WebCore/platform/android/TemporaryLinkStubs.cpp b/WebCore/platform/android/TemporaryLinkStubs.cpp index 33344ed..39c0bb7 100644 --- a/WebCore/platform/android/TemporaryLinkStubs.cpp +++ b/WebCore/platform/android/TemporaryLinkStubs.cpp @@ -46,7 +46,6 @@ #include "EditCommand.h" #include "Editor.h" #include "File.h" -#include "FileList.h" #include "Font.h" #include "Frame.h" #include "FrameLoader.h" @@ -506,17 +505,6 @@ ScrollbarTheme* ScrollbarTheme::nativeTheme() } // namespace WebCore -FileList::FileList() -{ - notImplemented(); -} - -File* FileList::item(unsigned index) const -{ - notImplemented(); - return 0; -} - AXObjectCache::~AXObjectCache() { notImplemented(); diff --git a/WebCore/rendering/RenderFileUploadControl.cpp b/WebCore/rendering/RenderFileUploadControl.cpp index 9b5579c..72623f7 100644 --- a/WebCore/rendering/RenderFileUploadControl.cpp +++ b/WebCore/rendering/RenderFileUploadControl.cpp @@ -134,11 +134,7 @@ void RenderFileUploadControl::updateFromElement() addChild(renderer); } -#ifndef ANDROID_DISABLE_UPLOAD m_button->setDisabled(!theme()->isEnabled(this)); -#else - m_button->setDisabled(true); -#endif // This only supports clearing out the files, but that's OK because for // security reasons that's the only change the DOM is allowed to make. |