[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
abarth at webkit.org
abarth at webkit.org
Wed Dec 22 12:46:36 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 63038daf3796692f753bf23343b6c91c52fcae26
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Aug 30 01:16:15 2010 +0000
2010-08-29 Adam Barth <abarth at webkit.org>
Reviewed by Darin Adler.
Implement HTML5's fakepath
https://bugs.webkit.org/show_bug.cgi?id=29000
Update expectations for this pasteboard test to include our new friend
fakepath.
* editing/pasteboard/file-input-files-access-expected.txt:
2010-08-29 Adam Barth <abarth at webkit.org>
Reviewed by Darin Adler.
Implement HTML5's fakepath
https://bugs.webkit.org/show_bug.cgi?id=29000
The HTML 5 spec says to prepend C:\fakepath\ to the value of an
<input type="file"> control, so that's what we do now.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::value):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66343 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index b107c3a..b42cb94 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-08-29 Adam Barth <abarth at webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Implement HTML5's fakepath
+ https://bugs.webkit.org/show_bug.cgi?id=29000
+
+ Update expectations for this pasteboard test to include our new friend
+ fakepath.
+
+ * editing/pasteboard/file-input-files-access-expected.txt:
+
2010-08-29 Mihai Parparita <mihaip at chromium.org>
Reviewed by Tony Chang.
@@ -47812,4 +47824,4 @@
* platform/mac/editing/pasteboard/styled-element-markup-expected.checksum: Replaced.
* platform/mac/editing/pasteboard/styled-element-markup-expected.png: Replaced.
* platform/mac/editing/pasteboard/subframe-dragndrop-1-expected.che
-svn
\ No newline at end of file
+svn
diff --git a/LayoutTests/editing/pasteboard/file-input-files-access-expected.txt b/LayoutTests/editing/pasteboard/file-input-files-access-expected.txt
index e394101..ffdfcbe 100644
--- a/LayoutTests/editing/pasteboard/file-input-files-access-expected.txt
+++ b/LayoutTests/editing/pasteboard/file-input-files-access-expected.txt
@@ -4,7 +4,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
Dragging a single (non-existant) file to a file input control:
-PASS fileInput.value is "DRTFakeFile"
+FAIL fileInput.value should be DRTFakeFile. Was C:\fakepath\DRTFakeFile.
PASS fileInput.files.length is 1
PASS fileInput.files[0].name is "DRTFakeFile"
PASS fileInput.files[0].type is ""
@@ -12,7 +12,7 @@ PASS fileInput.files[0].size is 0
PASS fileInput.files[0].fileName is "DRTFakeFile"
PASS fileInput.files[0].fileSize is 0
Dragging a real file to a file input control:
-PASS fileInput.value is "apple.gif"
+FAIL fileInput.value should be apple.gif. Was C:\fakepath\apple.gif.
PASS fileInput.files.length is 1
PASS fileInput.files[0].name is "apple.gif"
PASS fileInput.files[0].type is "image/gif"
@@ -20,21 +20,21 @@ PASS fileInput.files[0].size is 1476
PASS fileInput.files[0].fileName is "apple.gif"
PASS fileInput.files[0].fileSize is 1476
Dragging a directory onto an file input control:
-FAIL fileInput.value should be . Was directory-for-dragging.
+FAIL fileInput.value should be . Was C:\fakepath\directory-for-dragging.
FAIL fileInput.files.length should be 0. Was 1.
FIXME: Single-file input elements should refuse multi-file drags. See https://bugs.webkit.org/show_bug.cgi?id=25913
Dragging two files to a single-file input control:
-FAIL fileInput.value should be . Was apple.gif.
+FAIL fileInput.value should be . Was C:\fakepath\apple.gif.
FAIL fileInput.files.length should be 0. Was 1.
Dragging a file and a directory onto a single-file input control:
-FAIL fileInput.value should be . Was apple.gif.
+FAIL fileInput.value should be . Was C:\fakepath\apple.gif.
FAIL fileInput.files.length should be 0. Was 1.
FIXME: elements should refuse drags including directories: https://bugs.webkit.org/show_bug.cgi?id=25879. The page is given File objects corresponding to directories, but form submission will fail.
Dragging a directory and a file onto a single-file input control:
-FAIL fileInput.value should be . Was directory-for-dragging.
+FAIL fileInput.value should be . Was C:\fakepath\directory-for-dragging.
FAIL fileInput.files.length should be 0. Was 1.
Dragging two files to a multi-file input control:
-PASS fileInput.value is "apple.gif"
+FAIL fileInput.value should be apple.gif. Was C:\fakepath\apple.gif.
PASS fileInput.files.length is 2
PASS fileInput.files[0].name is "apple.gif"
PASS fileInput.files[0].type is "image/gif"
@@ -47,11 +47,11 @@ PASS fileInput.files[1].size is 2593
PASS fileInput.files[1].fileName is "mozilla.gif"
PASS fileInput.files[1].fileSize is 2593
Dragging a file and a directory onto a mutli-file input control:
-FAIL fileInput.value should be . Was apple.gif.
+FAIL fileInput.value should be . Was C:\fakepath\apple.gif.
FAIL fileInput.files.length should be 0. Was 2.
FIXME: elements should refuse drags including directories: https://bugs.webkit.org/show_bug.cgi?id=25879. The page is given File objects corresponding to directories, but form submission will fail.
Dragging a directory and a file onto a mutli-file input control:
-FAIL fileInput.value should be . Was directory-for-dragging.
+FAIL fileInput.value should be . Was C:\fakepath\directory-for-dragging.
FAIL fileInput.files.length should be 0. Was 2.
Dragging to a disabled file input control:
PASS fileInput.value is ""
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e1c36f2..78a8bbc 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-08-29 Adam Barth <abarth at webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Implement HTML5's fakepath
+ https://bugs.webkit.org/show_bug.cgi?id=29000
+
+ The HTML 5 spec says to prepend C:\fakepath\ to the value of an
+ <input type="file"> control, so that's what we do now.
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::value):
+
2010-08-29 Sheriff Bot <webkit.review.bot at gmail.com>
Unreviewed, rolling out r66329.
diff --git a/WebCore/html/HTMLInputElement.cpp b/WebCore/html/HTMLInputElement.cpp
index 16d7358..992e233 100644
--- a/WebCore/html/HTMLInputElement.cpp
+++ b/WebCore/html/HTMLInputElement.cpp
@@ -1498,11 +1498,16 @@ void HTMLInputElement::copyNonAttributeProperties(const Element* source)
String HTMLInputElement::value() const
{
- // The HTML5 spec (as of the 10/24/08 working draft) says that the value attribute isn't applicable to the file upload control
- // but we don't want to break existing websites, who may be relying on being able to get the file name as a value.
if (inputType() == FILE) {
- if (!m_fileList->isEmpty())
- return m_fileList->item(0)->fileName();
+ if (!m_fileList->isEmpty()) {
+ // HTML5 tells us that we're supposed to use this goofy value for
+ // file input controls. Historically, browsers reveals the real
+ // file path, but that's a privacy problem. Code on the web
+ // decided to try to parse the value by looking for backslashes
+ // (because that's what Windows file paths use). To be compatible
+ // with that code, we make up a fake path for the file.
+ return "C:\\fakepath\\" + m_fileList->item(0)->fileName();
+ }
return String();
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list