[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

tkent at chromium.org tkent at chromium.org
Wed Apr 7 23:33:14 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit d69358a429e779dc66b4e885067c2e6034e24c59
Author: tkent at chromium.org <tkent at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 12 06:43:52 2009 +0000

    2009-11-11  Kent Tamura  <tkent at chromium.org>
    
            Reviewed by Darin Adler.
    
            A test for a bug that RenderFileUploadControl isn't initialized with
            multiple files. This test is skipped on ports which have no
            eventSender.beginDragWithFiles().
            https://bugs.webkit.org/show_bug.cgi?id=31195
    
            * fast/forms/input-file-re-render.html: Added.
            * platform/gtk/Skipped:
            * platform/mac/fast/forms/input-file-re-render-expected.checksum: Added.
            * platform/mac/fast/forms/input-file-re-render-expected.png: Added.
            * platform/mac/fast/forms/input-file-re-render-expected.txt: Added.
            * platform/qt/Skipped:
            * platform/win/Skipped:
    2009-11-11  Kent Tamura  <tkent at chromium.org>
    
            Reviewed by Darin Adler.
    
            Fix a bug that RenderFileUploadControl isn't initialized with multiple files.
            https://bugs.webkit.org/show_bug.cgi?id=31195
    
            Test: fast/forms/input-file-re-render.html
    
            * rendering/RenderFileUploadControl.cpp:
            (WebCore::RenderFileUploadControl::RenderFileUploadControl):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50868 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 3c35801..8ac9d65 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,20 @@
+2009-11-11  Kent Tamura  <tkent at chromium.org>
+
+        Reviewed by Darin Adler.
+
+        A test for a bug that RenderFileUploadControl isn't initialized with
+        multiple files. This test is skipped on ports which have no
+        eventSender.beginDragWithFiles().
+        https://bugs.webkit.org/show_bug.cgi?id=31195
+
+        * fast/forms/input-file-re-render.html: Added.
+        * platform/gtk/Skipped:
+        * platform/mac/fast/forms/input-file-re-render-expected.checksum: Added.
+        * platform/mac/fast/forms/input-file-re-render-expected.png: Added.
+        * platform/mac/fast/forms/input-file-re-render-expected.txt: Added.
+        * platform/qt/Skipped:
+        * platform/win/Skipped:
+
 2009-11-11  Daniel Bates  <dbates at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/LayoutTests/fast/forms/input-file-re-render.html b/LayoutTests/fast/forms/input-file-re-render.html
new file mode 100644
index 0000000..0fac5c9
--- /dev/null
+++ b/LayoutTests/fast/forms/input-file-re-render.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<body>
+<form>
+  <input type="file" name="file" multiple id="file">
+</form>
+<p>The file upload control above should have text '2 files,' not a filename.</p>
+
+<script>
+function startTest()
+{
+    var input = document.getElementById('file');
+
+    // Drop 2 files to the control.
+    eventSender.beginDragWithFiles(['input-file-re-render.html', 'script-tests/TEMPLATE.html']);
+    eventSender.mouseMoveTo(10, 10);
+    eventSender.mouseUp();
+
+    // Delete the renderer.
+    input.style.display = 'none';
+
+    // Attach a renderer again.
+    input.style.display = 'inline-block';
+
+    layoutTestController.notifyDone();
+}
+
+if (window.eventSender) {
+    window.onload = startTest;
+    layoutTestController.waitUntilDone();
+}
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index e947311..4a0fdc5 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -1353,6 +1353,7 @@ fast/forms/focus-control-to-page.html
 fast/forms/focus-selection-input.html
 fast/forms/focus-selection-textarea.html
 fast/forms/get-file-upload.html
+fast/forms/input-file-re-render.html
 fast/forms/legend-access-key.html
 fast/forms/listbox-onchange.html
 fast/forms/listbox-selection.html
diff --git a/LayoutTests/platform/mac/fast/forms/input-file-re-render-expected.txt b/LayoutTests/platform/mac/fast/forms/input-file-re-render-expected.txt
new file mode 100644
index 0000000..2d4facf
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/forms/input-file-re-render-expected.txt
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x80
+  RenderBlock {HTML} at (0,0) size 800x80
+    RenderBody {BODY} at (8,8) size 784x56
+      RenderBlock {FORM} at (0,0) size 784x22
+        RenderFileUploadControl {INPUT} at (2,2) size 237x18 "2 files"
+          RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0]
+            RenderBlock (anonymous) at (8,2) size 62x13
+              RenderText at (0,0) size 62x13
+                text run at (0,0) width 62: "Choose File"
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {P} at (0,38) size 784x18
+        RenderText {#text} at (0,0) size 442x18
+          text run at (0,0) width 442: "The file upload control above should have text '2 files,' not a filename."
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 824c6c8..cd6d640 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -181,6 +181,7 @@ editing/pasteboard/file-input-files-access.html
 fast/events/drag-to-navigate.html
 fast/events/prevent-drag-to-navigate.html
 fast/forms/get-file-upload.html
+fast/forms/input-file-re-render.html
 fast/events/drag-file-crash.html
 http/tests/security/clipboard/clipboard-file-access.html
 
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index bcc33ad..163dd20 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -182,6 +182,7 @@ editing/pasteboard/file-input-files-access.html
 fast/events/drag-to-navigate.html
 fast/events/prevent-drag-to-navigate.html
 fast/forms/get-file-upload.html
+fast/forms/input-file-re-render.html
 http/tests/security/clipboard/clipboard-file-access.html
 fast/events/drag-file-crash.html
 
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4f9f3c0..6953867 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2009-11-11  Kent Tamura  <tkent at chromium.org>
+
+        Reviewed by Darin Adler.
+
+        Fix a bug that RenderFileUploadControl isn't initialized with multiple files.
+        https://bugs.webkit.org/show_bug.cgi?id=31195
+
+        Test: fast/forms/input-file-re-render.html
+
+        * rendering/RenderFileUploadControl.cpp:
+        (WebCore::RenderFileUploadControl::RenderFileUploadControl):
+
 2009-11-09  Dumitru Daniliuc  <dumi at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/WebCore/rendering/RenderFileUploadControl.cpp b/WebCore/rendering/RenderFileUploadControl.cpp
index 50ea337..37ee8fb 100644
--- a/WebCore/rendering/RenderFileUploadControl.cpp
+++ b/WebCore/rendering/RenderFileUploadControl.cpp
@@ -64,9 +64,11 @@ RenderFileUploadControl::RenderFileUploadControl(HTMLInputElement* input)
     : RenderBlock(input)
     , m_button(0)
 {
+    FileList* list = input->files();
     Vector<String> filenames;
-    // FIXME: The following code passes only the first file even if the input has multiple files.
-    filenames.append(input->value());
+    unsigned length = list ? list->length() : 0;
+    for (unsigned i = 0; i < length; ++i)
+        filenames.append(list->item(i)->path());
     m_fileChooser = FileChooser::create(this, filenames);
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list