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

eric at webkit.org eric at webkit.org
Wed Apr 7 23:32:31 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit a731ff1b630879871caf82d96fd6f078239517b0
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 12 01:46:24 2009 +0000

    2009-11-11  Kent Tamura  <tkent at chromium.org>
    
            Reviewed by Darin Adler.
    
            Print the file text of a file upload control in DumpRenderTree for ease of tests.
            https://bugs.webkit.org/show_bug.cgi?id=31195
    
            * platform/mac-leopard/fast/forms/file-input-disabled-expected.txt:
            * platform/mac/fast/forms/box-shadow-override-expected.txt:
            * platform/mac/fast/forms/file-input-direction-expected.txt:
            * platform/mac/fast/forms/file-input-disabled-expected.txt:
            * platform/mac/fast/forms/form-element-geometry-expected.txt:
            * platform/mac/fast/forms/hidden-input-file-expected.txt:
            * platform/mac/fast/forms/input-appearance-height-expected.txt:
            * platform/mac/fast/forms/input-value-expected.txt:
            * platform/win/fast/forms/box-shadow-override-expected.txt:
            * platform/win/fast/forms/file-input-disabled-expected.txt:
            * platform/win/fast/forms/input-appearance-height-expected.txt:
            * platform/win/fast/forms/input-value-expected.txt:
    2009-11-11  Kent Tamura  <tkent at chromium.org>
    
            Reviewed by Darin Adler.
    
            Print the file text of a file upload control in DumpRenderTree for ease of tests.
            https://bugs.webkit.org/show_bug.cgi?id=31195
    
            * rendering/RenderFileUploadControl.cpp:
            (WebCore::RenderFileUploadControl::paintObject):
            (WebCore::RenderFileUploadControl::fileTextValue):
            * rendering/RenderFileUploadControl.h:
            (WebCore::RenderFileUploadControl::isFileUploadControl):
            (WebCore::toRenderFileUploadControl):
            * rendering/RenderObject.h:
            (WebCore::RenderObject::isFileUploadControl):
            * rendering/RenderTreeAsText.cpp:
            (WebCore::operator<<):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50851 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index d7d8d01..b85abbd 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,23 @@
+2009-11-11  Kent Tamura  <tkent at chromium.org>
+
+        Reviewed by Darin Adler.
+
+        Print the file text of a file upload control in DumpRenderTree for ease of tests.
+        https://bugs.webkit.org/show_bug.cgi?id=31195
+
+        * platform/mac-leopard/fast/forms/file-input-disabled-expected.txt:
+        * platform/mac/fast/forms/box-shadow-override-expected.txt:
+        * platform/mac/fast/forms/file-input-direction-expected.txt:
+        * platform/mac/fast/forms/file-input-disabled-expected.txt:
+        * platform/mac/fast/forms/form-element-geometry-expected.txt:
+        * platform/mac/fast/forms/hidden-input-file-expected.txt:
+        * platform/mac/fast/forms/input-appearance-height-expected.txt:
+        * platform/mac/fast/forms/input-value-expected.txt:
+        * platform/win/fast/forms/box-shadow-override-expected.txt:
+        * platform/win/fast/forms/file-input-disabled-expected.txt:
+        * platform/win/fast/forms/input-appearance-height-expected.txt:
+        * platform/win/fast/forms/input-value-expected.txt:
+
 2009-11-11  Erik Arvidsson  <arv at chromium.org>
 
         Reviewed by Dmitri Titov.
diff --git a/LayoutTests/platform/mac-leopard/fast/forms/file-input-disabled-expected.txt b/LayoutTests/platform/mac-leopard/fast/forms/file-input-disabled-expected.txt
index 40ae6e7..1691a33 100644
--- a/LayoutTests/platform/mac-leopard/fast/forms/file-input-disabled-expected.txt
+++ b/LayoutTests/platform/mac-leopard/fast/forms/file-input-disabled-expected.txt
@@ -13,7 +13,7 @@ layer at (0,0) size 800x600
           RenderBR {BR} at (0,19) size 0x18
           RenderText {#text} at (0,38) size 86x18
             text run at (0,38) width 86: "  Select File:  "
-          RenderFileUploadControl {INPUT} at (88,39) size 237x18
+          RenderFileUploadControl {INPUT} at (88,39) size 237x18 "no file selected"
             RenderButton {INPUT} at (0,0) size 78x18 [color=#808080] [bgcolor=#C0C0C0]
               RenderBlock (anonymous) at (8,2) size 62x13
                 RenderText at (0,0) size 62x13
diff --git a/LayoutTests/platform/mac/fast/forms/box-shadow-override-expected.txt b/LayoutTests/platform/mac/fast/forms/box-shadow-override-expected.txt
index 8092878..e7e2a00 100644
--- a/LayoutTests/platform/mac/fast/forms/box-shadow-override-expected.txt
+++ b/LayoutTests/platform/mac/fast/forms/box-shadow-override-expected.txt
@@ -38,7 +38,7 @@ layer at (0,0) size 800x600
           RenderBlock {DIV} at (57,0) size 15x15
         RenderText {#text} at (177,9) size 4x18
           text run at (177,9) width 4: " "
-        RenderFileUploadControl {INPUT} at (183,10) size 237x18
+        RenderFileUploadControl {INPUT} at (183,10) size 237x18 "no file selected"
           RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0]
             RenderBlock (anonymous) at (8,2) size 62x13
               RenderText at (0,0) size 62x13
diff --git a/LayoutTests/platform/mac/fast/forms/file-input-direction-expected.txt b/LayoutTests/platform/mac/fast/forms/file-input-direction-expected.txt
index d23eb6a..c4dcfa3 100644
--- a/LayoutTests/platform/mac/fast/forms/file-input-direction-expected.txt
+++ b/LayoutTests/platform/mac/fast/forms/file-input-direction-expected.txt
@@ -20,25 +20,25 @@ layer at (0,0) size 1083x585
           RenderTableRow {TR} at (0,24) size 1075x26
             RenderTableCell {TH} at (2,36) size 83x2 [r=1 c=0 rs=1 cs=1]
             RenderTableCell {TD} at (87,24) size 245x26 [border: (1px solid #000000)] [r=1 c=1 rs=1 cs=1]
-              RenderFileUploadControl {INPUT} at (4,4) size 237x18
+              RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected"
                 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"
             RenderTableCell {TD} at (334,24) size 245x26 [border: (1px solid #000000)] [r=1 c=2 rs=1 cs=1]
-              RenderFileUploadControl {INPUT} at (4,4) size 237x18
+              RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected"
                 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"
             RenderTableCell {TD} at (581,24) size 245x26 [border: (1px solid #000000)] [r=1 c=3 rs=1 cs=1]
-              RenderFileUploadControl {INPUT} at (4,4) size 237x18
+              RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected"
                 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"
             RenderTableCell {TD} at (828,24) size 245x26 [border: (1px solid #000000)] [r=1 c=4 rs=1 cs=1]
-              RenderFileUploadControl {INPUT} at (4,4) size 237x18
+              RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected"
                 RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0]
                   RenderBlock (anonymous) at (8,2) size 62x13
                     RenderText at (0,0) size 62x13
@@ -48,25 +48,25 @@ layer at (0,0) size 1083x585
               RenderText {#text} at (1,1) size 81x18
                 text run at (1,1) width 81: "direction:ltr"
             RenderTableCell {TD} at (87,52) size 245x26 [border: (1px solid #000000)] [r=2 c=1 rs=1 cs=1]
-              RenderFileUploadControl {INPUT} at (4,4) size 237x18
+              RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected"
                 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"
             RenderTableCell {TD} at (334,52) size 245x26 [border: (1px solid #000000)] [r=2 c=2 rs=1 cs=1]
-              RenderFileUploadControl {INPUT} at (4,4) size 237x18
+              RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected"
                 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"
             RenderTableCell {TD} at (581,52) size 245x26 [border: (1px solid #000000)] [r=2 c=3 rs=1 cs=1]
-              RenderFileUploadControl {INPUT} at (4,4) size 237x18
+              RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected"
                 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"
             RenderTableCell {TD} at (828,52) size 245x26 [border: (1px solid #000000)] [r=2 c=4 rs=1 cs=1]
-              RenderFileUploadControl {INPUT} at (4,4) size 237x18
+              RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected"
                 RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0]
                   RenderBlock (anonymous) at (8,2) size 62x13
                     RenderText at (0,0) size 62x13
@@ -76,25 +76,25 @@ layer at (0,0) size 1083x585
               RenderText {#text} at (1,1) size 81x18
                 text run at (1,1) width 81: "direction:rtl"
             RenderTableCell {TD} at (87,80) size 245x26 [border: (1px solid #000000)] [r=3 c=1 rs=1 cs=1]
-              RenderFileUploadControl {INPUT} at (4,4) size 237x18
+              RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected"
                 RenderButton {INPUT} at (159,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"
             RenderTableCell {TD} at (334,80) size 245x26 [border: (1px solid #000000)] [r=3 c=2 rs=1 cs=1]
-              RenderFileUploadControl {INPUT} at (4,4) size 237x18
+              RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected"
                 RenderButton {INPUT} at (159,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"
             RenderTableCell {TD} at (581,80) size 245x26 [border: (1px solid #000000)] [r=3 c=3 rs=1 cs=1]
-              RenderFileUploadControl {INPUT} at (4,4) size 237x18
+              RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected"
                 RenderButton {INPUT} at (159,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"
             RenderTableCell {TD} at (828,80) size 245x26 [border: (1px solid #000000)] [r=3 c=4 rs=1 cs=1]
-              RenderFileUploadControl {INPUT} at (4,4) size 237x18
+              RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected"
                 RenderButton {INPUT} at (159,0) size 78x18 [bgcolor=#C0C0C0]
                   RenderBlock (anonymous) at (8,2) size 62x13
                     RenderText at (0,0) size 62x13
diff --git a/LayoutTests/platform/mac/fast/forms/file-input-disabled-expected.txt b/LayoutTests/platform/mac/fast/forms/file-input-disabled-expected.txt
index ca6bcfe..bc7f8a6 100644
--- a/LayoutTests/platform/mac/fast/forms/file-input-disabled-expected.txt
+++ b/LayoutTests/platform/mac/fast/forms/file-input-disabled-expected.txt
@@ -13,7 +13,7 @@ layer at (0,0) size 800x600
           RenderBR {BR} at (0,19) size 0x18
           RenderText {#text} at (0,38) size 86x18
             text run at (0,38) width 86: "  Select File:  "
-          RenderFileUploadControl {INPUT} at (88,39) size 237x18
+          RenderFileUploadControl {INPUT} at (88,39) size 237x18 "no file selected"
             RenderButton {INPUT} at (0,0) size 78x18 [color=#7F7F7F] [bgcolor=#C0C0C0]
               RenderBlock (anonymous) at (8,2) size 62x13
                 RenderText at (0,0) size 62x13
diff --git a/LayoutTests/platform/mac/fast/forms/form-element-geometry-expected.txt b/LayoutTests/platform/mac/fast/forms/form-element-geometry-expected.txt
index 41cf98f..e4d8995 100644
--- a/LayoutTests/platform/mac/fast/forms/form-element-geometry-expected.txt
+++ b/LayoutTests/platform/mac/fast/forms/form-element-geometry-expected.txt
@@ -100,7 +100,7 @@ layer at (0,0) size 785x630
                 RenderListBox {SELECT} at (2,2) size 34x57 [bgcolor=#FFFFFF] [border: (1px inset #808080)]
             RenderTableCell {TD} at (126,2) size 243x24 [r=0 c=2 rs=1 cs=1]
               RenderBlock {DIV} at (1,1) size 241x22 [border: (2px solid #0000FF)]
-                RenderFileUploadControl {INPUT} at (2,2) size 237x18
+                RenderFileUploadControl {INPUT} at (2,2) size 237x18 "no file selected"
                   RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0]
                     RenderBlock (anonymous) at (8,2) size 62x13
                       RenderText at (0,0) size 62x13
@@ -178,7 +178,7 @@ layer at (0,0) size 785x630
         RenderTextControl {INPUT} at (29,22) size 74x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
         RenderText {#text} at (105,22) size 4x18
           text run at (105,22) width 4: " "
-        RenderFileUploadControl {INPUT} at (111,23) size 237x18
+        RenderFileUploadControl {INPUT} at (111,23) size 237x18 "no file selected"
           RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0]
             RenderBlock (anonymous) at (8,2) size 62x13
               RenderText at (0,0) size 62x13
diff --git a/LayoutTests/platform/mac/fast/forms/hidden-input-file-expected.txt b/LayoutTests/platform/mac/fast/forms/hidden-input-file-expected.txt
index 2bd8a01..0277d3c 100644
--- a/LayoutTests/platform/mac/fast/forms/hidden-input-file-expected.txt
+++ b/LayoutTests/platform/mac/fast/forms/hidden-input-file-expected.txt
@@ -5,7 +5,7 @@ layer at (0,0) size 800x600
     RenderBody {BODY} at (8,8) size 784x584
       RenderText {#text} at (0,1) size 524x18
         text run at (0,1) width 524: "This tests that the whole file input control is hidden when visibility is set to hidden. "
-      RenderFileUploadControl {INPUT} at (526,2) size 237x18
+      RenderFileUploadControl {INPUT} at (526,2) size 237x18 "no file selected"
         RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0]
           RenderBlock (anonymous) at (8,2) size 62x13
             RenderText at (0,0) size 62x13
diff --git a/LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.txt b/LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.txt
index 4fe1e5e..6fe23e8 100644
--- a/LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.txt
+++ b/LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.txt
@@ -27,7 +27,7 @@ layer at (0,0) size 800x600
         RenderBR {BR} at (87,60) size 0x0
         RenderText {#text} at (0,66) size 24x18
           text run at (0,66) width 24: "file "
-        RenderFileUploadControl {INPUT} at (26,67) size 237x18
+        RenderFileUploadControl {INPUT} at (26,67) size 237x18 "no file selected"
           RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0]
             RenderBlock (anonymous) at (8,2) size 62x13
               RenderText at (0,0) size 62x13
diff --git a/LayoutTests/platform/mac/fast/forms/input-value-expected.txt b/LayoutTests/platform/mac/fast/forms/input-value-expected.txt
index bab96ff..2a30ea2 100644
--- a/LayoutTests/platform/mac/fast/forms/input-value-expected.txt
+++ b/LayoutTests/platform/mac/fast/forms/input-value-expected.txt
@@ -191,7 +191,7 @@ layer at (0,0) size 800x600
                 RenderText {#text} at (1,1) size 204x18
                   text run at (1,1) width 204: "file with value property changed"
               RenderTableCell {TD} at (389,318) size 243x24 [r=13 c=1 rs=1 cs=1]
-                RenderFileUploadControl {INPUT} at (3,3) size 237x18
+                RenderFileUploadControl {INPUT} at (3,3) size 237x18 "no file selected"
                   RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0]
                     RenderBlock (anonymous) at (8,2) size 62x13
                       RenderText at (0,0) size 62x13
diff --git a/LayoutTests/platform/win/fast/forms/box-shadow-override-expected.txt b/LayoutTests/platform/win/fast/forms/box-shadow-override-expected.txt
index 069a098..96f0c02 100644
--- a/LayoutTests/platform/win/fast/forms/box-shadow-override-expected.txt
+++ b/LayoutTests/platform/win/fast/forms/box-shadow-override-expected.txt
@@ -38,7 +38,7 @@ layer at (0,0) size 800x600
           RenderBlock {DIV} at (57,0) size 15x15
         RenderText {#text} at (177,9) size 4x18
           text run at (177,9) width 4: " "
-        RenderFileUploadControl {INPUT} at (183,10) size 237x18
+        RenderFileUploadControl {INPUT} at (183,10) size 237x18 "no file selected"
           RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0]
             RenderBlock (anonymous) at (8,2) size 62x13
               RenderText at (0,0) size 62x13
diff --git a/LayoutTests/platform/win/fast/forms/file-input-disabled-expected.txt b/LayoutTests/platform/win/fast/forms/file-input-disabled-expected.txt
index 40ae6e7..1691a33 100644
--- a/LayoutTests/platform/win/fast/forms/file-input-disabled-expected.txt
+++ b/LayoutTests/platform/win/fast/forms/file-input-disabled-expected.txt
@@ -13,7 +13,7 @@ layer at (0,0) size 800x600
           RenderBR {BR} at (0,19) size 0x18
           RenderText {#text} at (0,38) size 86x18
             text run at (0,38) width 86: "  Select File:  "
-          RenderFileUploadControl {INPUT} at (88,39) size 237x18
+          RenderFileUploadControl {INPUT} at (88,39) size 237x18 "no file selected"
             RenderButton {INPUT} at (0,0) size 78x18 [color=#808080] [bgcolor=#C0C0C0]
               RenderBlock (anonymous) at (8,2) size 62x13
                 RenderText at (0,0) size 62x13
diff --git a/LayoutTests/platform/win/fast/forms/input-appearance-height-expected.txt b/LayoutTests/platform/win/fast/forms/input-appearance-height-expected.txt
index 572dd1b..f812410 100644
--- a/LayoutTests/platform/win/fast/forms/input-appearance-height-expected.txt
+++ b/LayoutTests/platform/win/fast/forms/input-appearance-height-expected.txt
@@ -27,7 +27,7 @@ layer at (0,0) size 800x600
         RenderBR {BR} at (87,60) size 0x0
         RenderText {#text} at (0,66) size 24x18
           text run at (0,66) width 24: "file "
-        RenderFileUploadControl {INPUT} at (26,67) size 237x18
+        RenderFileUploadControl {INPUT} at (26,67) size 237x18 "no file selected"
           RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0]
             RenderBlock (anonymous) at (8,2) size 62x13
               RenderText at (0,0) size 62x13
diff --git a/LayoutTests/platform/win/fast/forms/input-value-expected.txt b/LayoutTests/platform/win/fast/forms/input-value-expected.txt
index df23790..dd64d11 100644
--- a/LayoutTests/platform/win/fast/forms/input-value-expected.txt
+++ b/LayoutTests/platform/win/fast/forms/input-value-expected.txt
@@ -191,7 +191,7 @@ layer at (0,0) size 800x600
                 RenderText {#text} at (1,1) size 204x18
                   text run at (1,1) width 204: "file with value property changed"
               RenderTableCell {TD} at (389,318) size 243x24 [r=13 c=1 rs=1 cs=1]
-                RenderFileUploadControl {INPUT} at (3,3) size 237x18
+                RenderFileUploadControl {INPUT} at (3,3) size 237x18 "no file selected"
                   RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0]
                     RenderBlock (anonymous) at (8,2) size 62x13
                       RenderText at (0,0) size 62x13
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3bbf9b6..c8fc95b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2009-11-11  Kent Tamura  <tkent at chromium.org>
+
+        Reviewed by Darin Adler.
+
+        Print the file text of a file upload control in DumpRenderTree for ease of tests.
+        https://bugs.webkit.org/show_bug.cgi?id=31195
+
+        * rendering/RenderFileUploadControl.cpp:
+        (WebCore::RenderFileUploadControl::paintObject):
+        (WebCore::RenderFileUploadControl::fileTextValue):
+        * rendering/RenderFileUploadControl.h:
+        (WebCore::RenderFileUploadControl::isFileUploadControl):
+        (WebCore::toRenderFileUploadControl):
+        * rendering/RenderObject.h:
+        (WebCore::RenderObject::isFileUploadControl):
+        * rendering/RenderTreeAsText.cpp:
+        (WebCore::operator<<):
+
 2009-11-11  Gavin Barraclough  <barraclough at apple.com>
 
         Reviewed by Sam Weinig.
diff --git a/WebCore/rendering/RenderFileUploadControl.cpp b/WebCore/rendering/RenderFileUploadControl.cpp
index 0a49288..50ea337 100644
--- a/WebCore/rendering/RenderFileUploadControl.cpp
+++ b/WebCore/rendering/RenderFileUploadControl.cpp
@@ -187,7 +187,7 @@ void RenderFileUploadControl::paintObject(PaintInfo& paintInfo, int tx, int ty)
     }
 
     if (paintInfo.phase == PaintPhaseForeground) {
-        const String& displayedFilename = m_fileChooser->basenameForWidth(style()->font(), maxFilenameWidth());        
+        const String& displayedFilename = fileTextValue();
         unsigned length = displayedFilename.length();
         const UChar* string = displayedFilename.characters();
         TextRun textRun(string, length, false, 0, 0, style()->direction() == RTL, style()->unicodeBidi() == Override);
@@ -287,7 +287,7 @@ String RenderFileUploadControl::buttonValue()
     return m_button->value();
 }
 
-String RenderFileUploadControl::fileTextValue()
+String RenderFileUploadControl::fileTextValue() const
 {
     return m_fileChooser->basenameForWidth(style()->font(), maxFilenameWidth());
 }
diff --git a/WebCore/rendering/RenderFileUploadControl.h b/WebCore/rendering/RenderFileUploadControl.h
index bd7d62a..72ba308 100644
--- a/WebCore/rendering/RenderFileUploadControl.h
+++ b/WebCore/rendering/RenderFileUploadControl.h
@@ -37,6 +37,8 @@ public:
     RenderFileUploadControl(HTMLInputElement*);
     virtual ~RenderFileUploadControl();
 
+    virtual bool isFileUploadControl() const { return true; }
+
     void click();
 
     void valueChanged();
@@ -44,7 +46,7 @@ public:
     void receiveDroppedFiles(const Vector<String>&);
 
     String buttonValue();
-    String fileTextValue();
+    String fileTextValue() const;
     
     bool allowsMultipleFiles();
 
@@ -66,10 +68,16 @@ private:
 
 inline RenderFileUploadControl* toRenderFileUploadControl(RenderObject* object)
 {
-    ASSERT(!object || !strcmp(object->renderName(), "RenderFileUploadControl"));
+    ASSERT(!object || object->isFileUploadControl());
     return static_cast<RenderFileUploadControl*>(object);
 }
 
+inline const RenderFileUploadControl* toRenderFileUploadControl(const RenderObject* object)
+{
+    ASSERT(!object || object->isFileUploadControl());
+    return static_cast<const RenderFileUploadControl*>(object);
+}
+
 // This will catch anyone doing an unnecessary cast.
 void toRenderFileUploadControl(const RenderFileUploadControl*);
 
diff --git a/WebCore/rendering/RenderObject.h b/WebCore/rendering/RenderObject.h
index acfdd49..6bcbdfb 100644
--- a/WebCore/rendering/RenderObject.h
+++ b/WebCore/rendering/RenderObject.h
@@ -253,6 +253,7 @@ public:
     virtual bool isBoxModelObject() const { return false; }
     virtual bool isCounter() const { return false; }
     virtual bool isFieldset() const { return false; }
+    virtual bool isFileUploadControl() const { return false; }
     virtual bool isFrame() const { return false; }
     virtual bool isFrameSet() const { return false; }
     virtual bool isImage() const { return false; }
diff --git a/WebCore/rendering/RenderTreeAsText.cpp b/WebCore/rendering/RenderTreeAsText.cpp
index 855b399..120deb4 100644
--- a/WebCore/rendering/RenderTreeAsText.cpp
+++ b/WebCore/rendering/RenderTreeAsText.cpp
@@ -36,6 +36,7 @@
 #include "HTMLNames.h"
 #include "InlineTextBox.h"
 #include "RenderBR.h"
+#include "RenderFileUploadControl.h"
 #include "RenderInline.h"
 #include "RenderListMarker.h"
 #include "RenderTableCell.h"
@@ -217,6 +218,9 @@ static TextStream &operator<<(TextStream& ts, const RenderObject& o)
     ts << " " << r;
 
     if (!(o.isText() && !o.isBR())) {
+        if (o.isFileUploadControl()) {
+            ts << " " << quoteAndEscapeNonPrintables(toRenderFileUploadControl(&o)->fileTextValue());
+        }
         if (o.parent() && (o.parent()->style()->color() != o.style()->color()))
             ts << " [color=" << o.style()->color().name() << "]";
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list