Changeset 50851 in webkit
- Timestamp:
- Nov 11, 2009 5:46:24 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r50845 r50851 1 2009-11-11 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Darin Adler. 4 5 Print the file text of a file upload control in DumpRenderTree for ease of tests. 6 https://bugs.webkit.org/show_bug.cgi?id=31195 7 8 * platform/mac-leopard/fast/forms/file-input-disabled-expected.txt: 9 * platform/mac/fast/forms/box-shadow-override-expected.txt: 10 * platform/mac/fast/forms/file-input-direction-expected.txt: 11 * platform/mac/fast/forms/file-input-disabled-expected.txt: 12 * platform/mac/fast/forms/form-element-geometry-expected.txt: 13 * platform/mac/fast/forms/hidden-input-file-expected.txt: 14 * platform/mac/fast/forms/input-appearance-height-expected.txt: 15 * platform/mac/fast/forms/input-value-expected.txt: 16 * platform/win/fast/forms/box-shadow-override-expected.txt: 17 * platform/win/fast/forms/file-input-disabled-expected.txt: 18 * platform/win/fast/forms/input-appearance-height-expected.txt: 19 * platform/win/fast/forms/input-value-expected.txt: 20 1 21 2009-11-11 Erik Arvidsson <arv@chromium.org> 2 22 -
trunk/LayoutTests/platform/mac-leopard/fast/forms/file-input-disabled-expected.txt
r42380 r50851 14 14 RenderText {#text} at (0,38) size 86x18 15 15 text run at (0,38) width 86: " Select File: " 16 RenderFileUploadControl {INPUT} at (88,39) size 237x18 16 RenderFileUploadControl {INPUT} at (88,39) size 237x18 "no file selected" 17 17 RenderButton {INPUT} at (0,0) size 78x18 [color=#808080] [bgcolor=#C0C0C0] 18 18 RenderBlock (anonymous) at (8,2) size 62x13 -
trunk/LayoutTests/platform/mac/fast/forms/box-shadow-override-expected.txt
r43007 r50851 39 39 RenderText {#text} at (177,9) size 4x18 40 40 text run at (177,9) width 4: " " 41 RenderFileUploadControl {INPUT} at (183,10) size 237x18 41 RenderFileUploadControl {INPUT} at (183,10) size 237x18 "no file selected" 42 42 RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0] 43 43 RenderBlock (anonymous) at (8,2) size 62x13 -
trunk/LayoutTests/platform/mac/fast/forms/file-input-direction-expected.txt
r30635 r50851 21 21 RenderTableCell {TH} at (2,36) size 83x2 [r=1 c=0 rs=1 cs=1] 22 22 RenderTableCell {TD} at (87,24) size 245x26 [border: (1px solid #000000)] [r=1 c=1 rs=1 cs=1] 23 RenderFileUploadControl {INPUT} at (4,4) size 237x18 23 RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected" 24 24 RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0] 25 25 RenderBlock (anonymous) at (8,2) size 62x13 … … 27 27 text run at (0,0) width 62: "Choose File" 28 28 RenderTableCell {TD} at (334,24) size 245x26 [border: (1px solid #000000)] [r=1 c=2 rs=1 cs=1] 29 RenderFileUploadControl {INPUT} at (4,4) size 237x18 29 RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected" 30 30 RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0] 31 31 RenderBlock (anonymous) at (8,2) size 62x13 … … 33 33 text run at (0,0) width 62: "Choose File" 34 34 RenderTableCell {TD} at (581,24) size 245x26 [border: (1px solid #000000)] [r=1 c=3 rs=1 cs=1] 35 RenderFileUploadControl {INPUT} at (4,4) size 237x18 35 RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected" 36 36 RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0] 37 37 RenderBlock (anonymous) at (8,2) size 62x13 … … 39 39 text run at (0,0) width 62: "Choose File" 40 40 RenderTableCell {TD} at (828,24) size 245x26 [border: (1px solid #000000)] [r=1 c=4 rs=1 cs=1] 41 RenderFileUploadControl {INPUT} at (4,4) size 237x18 41 RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected" 42 42 RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0] 43 43 RenderBlock (anonymous) at (8,2) size 62x13 … … 49 49 text run at (1,1) width 81: "direction:ltr" 50 50 RenderTableCell {TD} at (87,52) size 245x26 [border: (1px solid #000000)] [r=2 c=1 rs=1 cs=1] 51 RenderFileUploadControl {INPUT} at (4,4) size 237x18 51 RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected" 52 52 RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0] 53 53 RenderBlock (anonymous) at (8,2) size 62x13 … … 55 55 text run at (0,0) width 62: "Choose File" 56 56 RenderTableCell {TD} at (334,52) size 245x26 [border: (1px solid #000000)] [r=2 c=2 rs=1 cs=1] 57 RenderFileUploadControl {INPUT} at (4,4) size 237x18 57 RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected" 58 58 RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0] 59 59 RenderBlock (anonymous) at (8,2) size 62x13 … … 61 61 text run at (0,0) width 62: "Choose File" 62 62 RenderTableCell {TD} at (581,52) size 245x26 [border: (1px solid #000000)] [r=2 c=3 rs=1 cs=1] 63 RenderFileUploadControl {INPUT} at (4,4) size 237x18 63 RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected" 64 64 RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0] 65 65 RenderBlock (anonymous) at (8,2) size 62x13 … … 67 67 text run at (0,0) width 62: "Choose File" 68 68 RenderTableCell {TD} at (828,52) size 245x26 [border: (1px solid #000000)] [r=2 c=4 rs=1 cs=1] 69 RenderFileUploadControl {INPUT} at (4,4) size 237x18 69 RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected" 70 70 RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0] 71 71 RenderBlock (anonymous) at (8,2) size 62x13 … … 77 77 text run at (1,1) width 81: "direction:rtl" 78 78 RenderTableCell {TD} at (87,80) size 245x26 [border: (1px solid #000000)] [r=3 c=1 rs=1 cs=1] 79 RenderFileUploadControl {INPUT} at (4,4) size 237x18 79 RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected" 80 80 RenderButton {INPUT} at (159,0) size 78x18 [bgcolor=#C0C0C0] 81 81 RenderBlock (anonymous) at (8,2) size 62x13 … … 83 83 text run at (0,0) width 62: "Choose File" 84 84 RenderTableCell {TD} at (334,80) size 245x26 [border: (1px solid #000000)] [r=3 c=2 rs=1 cs=1] 85 RenderFileUploadControl {INPUT} at (4,4) size 237x18 85 RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected" 86 86 RenderButton {INPUT} at (159,0) size 78x18 [bgcolor=#C0C0C0] 87 87 RenderBlock (anonymous) at (8,2) size 62x13 … … 89 89 text run at (0,0) width 62: "Choose File" 90 90 RenderTableCell {TD} at (581,80) size 245x26 [border: (1px solid #000000)] [r=3 c=3 rs=1 cs=1] 91 RenderFileUploadControl {INPUT} at (4,4) size 237x18 91 RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected" 92 92 RenderButton {INPUT} at (159,0) size 78x18 [bgcolor=#C0C0C0] 93 93 RenderBlock (anonymous) at (8,2) size 62x13 … … 95 95 text run at (0,0) width 62: "Choose File" 96 96 RenderTableCell {TD} at (828,80) size 245x26 [border: (1px solid #000000)] [r=3 c=4 rs=1 cs=1] 97 RenderFileUploadControl {INPUT} at (4,4) size 237x18 97 RenderFileUploadControl {INPUT} at (4,4) size 237x18 "no file selected" 98 98 RenderButton {INPUT} at (159,0) size 78x18 [bgcolor=#C0C0C0] 99 99 RenderBlock (anonymous) at (8,2) size 62x13 -
trunk/LayoutTests/platform/mac/fast/forms/file-input-disabled-expected.txt
r42380 r50851 14 14 RenderText {#text} at (0,38) size 86x18 15 15 text run at (0,38) width 86: " Select File: " 16 RenderFileUploadControl {INPUT} at (88,39) size 237x18 16 RenderFileUploadControl {INPUT} at (88,39) size 237x18 "no file selected" 17 17 RenderButton {INPUT} at (0,0) size 78x18 [color=#7F7F7F] [bgcolor=#C0C0C0] 18 18 RenderBlock (anonymous) at (8,2) size 62x13 -
trunk/LayoutTests/platform/mac/fast/forms/form-element-geometry-expected.txt
r47440 r50851 101 101 RenderTableCell {TD} at (126,2) size 243x24 [r=0 c=2 rs=1 cs=1] 102 102 RenderBlock {DIV} at (1,1) size 241x22 [border: (2px solid #0000FF)] 103 RenderFileUploadControl {INPUT} at (2,2) size 237x18 103 RenderFileUploadControl {INPUT} at (2,2) size 237x18 "no file selected" 104 104 RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0] 105 105 RenderBlock (anonymous) at (8,2) size 62x13 … … 179 179 RenderText {#text} at (105,22) size 4x18 180 180 text run at (105,22) width 4: " " 181 RenderFileUploadControl {INPUT} at (111,23) size 237x18 181 RenderFileUploadControl {INPUT} at (111,23) size 237x18 "no file selected" 182 182 RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0] 183 183 RenderBlock (anonymous) at (8,2) size 62x13 -
trunk/LayoutTests/platform/mac/fast/forms/hidden-input-file-expected.txt
r30635 r50851 6 6 RenderText {#text} at (0,1) size 524x18 7 7 text run at (0,1) width 524: "This tests that the whole file input control is hidden when visibility is set to hidden. " 8 RenderFileUploadControl {INPUT} at (526,2) size 237x18 8 RenderFileUploadControl {INPUT} at (526,2) size 237x18 "no file selected" 9 9 RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0] 10 10 RenderBlock (anonymous) at (8,2) size 62x13 -
trunk/LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.txt
r43007 r50851 28 28 RenderText {#text} at (0,66) size 24x18 29 29 text run at (0,66) width 24: "file " 30 RenderFileUploadControl {INPUT} at (26,67) size 237x18 30 RenderFileUploadControl {INPUT} at (26,67) size 237x18 "no file selected" 31 31 RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0] 32 32 RenderBlock (anonymous) at (8,2) size 62x13 -
trunk/LayoutTests/platform/mac/fast/forms/input-value-expected.txt
r43007 r50851 192 192 text run at (1,1) width 204: "file with value property changed" 193 193 RenderTableCell {TD} at (389,318) size 243x24 [r=13 c=1 rs=1 cs=1] 194 RenderFileUploadControl {INPUT} at (3,3) size 237x18 194 RenderFileUploadControl {INPUT} at (3,3) size 237x18 "no file selected" 195 195 RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0] 196 196 RenderBlock (anonymous) at (8,2) size 62x13 -
trunk/LayoutTests/platform/win/fast/forms/box-shadow-override-expected.txt
r43007 r50851 39 39 RenderText {#text} at (177,9) size 4x18 40 40 text run at (177,9) width 4: " " 41 RenderFileUploadControl {INPUT} at (183,10) size 237x18 41 RenderFileUploadControl {INPUT} at (183,10) size 237x18 "no file selected" 42 42 RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0] 43 43 RenderBlock (anonymous) at (8,2) size 62x13 -
trunk/LayoutTests/platform/win/fast/forms/file-input-disabled-expected.txt
r42383 r50851 14 14 RenderText {#text} at (0,38) size 86x18 15 15 text run at (0,38) width 86: " Select File: " 16 RenderFileUploadControl {INPUT} at (88,39) size 237x18 16 RenderFileUploadControl {INPUT} at (88,39) size 237x18 "no file selected" 17 17 RenderButton {INPUT} at (0,0) size 78x18 [color=#808080] [bgcolor=#C0C0C0] 18 18 RenderBlock (anonymous) at (8,2) size 62x13 -
trunk/LayoutTests/platform/win/fast/forms/input-appearance-height-expected.txt
r43007 r50851 28 28 RenderText {#text} at (0,66) size 24x18 29 29 text run at (0,66) width 24: "file " 30 RenderFileUploadControl {INPUT} at (26,67) size 237x18 30 RenderFileUploadControl {INPUT} at (26,67) size 237x18 "no file selected" 31 31 RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0] 32 32 RenderBlock (anonymous) at (8,2) size 62x13 -
trunk/LayoutTests/platform/win/fast/forms/input-value-expected.txt
r43007 r50851 192 192 text run at (1,1) width 204: "file with value property changed" 193 193 RenderTableCell {TD} at (389,318) size 243x24 [r=13 c=1 rs=1 cs=1] 194 RenderFileUploadControl {INPUT} at (3,3) size 237x18 194 RenderFileUploadControl {INPUT} at (3,3) size 237x18 "no file selected" 195 195 RenderButton {INPUT} at (0,0) size 78x18 [bgcolor=#C0C0C0] 196 196 RenderBlock (anonymous) at (8,2) size 62x13 -
trunk/WebCore/ChangeLog
r50850 r50851 1 2009-11-11 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Darin Adler. 4 5 Print the file text of a file upload control in DumpRenderTree for ease of tests. 6 https://bugs.webkit.org/show_bug.cgi?id=31195 7 8 * rendering/RenderFileUploadControl.cpp: 9 (WebCore::RenderFileUploadControl::paintObject): 10 (WebCore::RenderFileUploadControl::fileTextValue): 11 * rendering/RenderFileUploadControl.h: 12 (WebCore::RenderFileUploadControl::isFileUploadControl): 13 (WebCore::toRenderFileUploadControl): 14 * rendering/RenderObject.h: 15 (WebCore::RenderObject::isFileUploadControl): 16 * rendering/RenderTreeAsText.cpp: 17 (WebCore::operator<<): 18 1 19 2009-11-11 Gavin Barraclough <barraclough@apple.com> 2 20 -
trunk/WebCore/rendering/RenderFileUploadControl.cpp
r50760 r50851 188 188 189 189 if (paintInfo.phase == PaintPhaseForeground) { 190 const String& displayedFilename = m_fileChooser->basenameForWidth(style()->font(), maxFilenameWidth());190 const String& displayedFilename = fileTextValue(); 191 191 unsigned length = displayedFilename.length(); 192 192 const UChar* string = displayedFilename.characters(); … … 288 288 } 289 289 290 String RenderFileUploadControl::fileTextValue() 290 String RenderFileUploadControl::fileTextValue() const 291 291 { 292 292 return m_fileChooser->basenameForWidth(style()->font(), maxFilenameWidth()); -
trunk/WebCore/rendering/RenderFileUploadControl.h
r46815 r50851 38 38 virtual ~RenderFileUploadControl(); 39 39 40 virtual bool isFileUploadControl() const { return true; } 41 40 42 void click(); 41 43 … … 45 47 46 48 String buttonValue(); 47 String fileTextValue() ;49 String fileTextValue() const; 48 50 49 51 bool allowsMultipleFiles(); … … 67 69 inline RenderFileUploadControl* toRenderFileUploadControl(RenderObject* object) 68 70 { 69 ASSERT(!object || !strcmp(object->renderName(), "RenderFileUploadControl"));71 ASSERT(!object || object->isFileUploadControl()); 70 72 return static_cast<RenderFileUploadControl*>(object); 73 } 74 75 inline const RenderFileUploadControl* toRenderFileUploadControl(const RenderObject* object) 76 { 77 ASSERT(!object || object->isFileUploadControl()); 78 return static_cast<const RenderFileUploadControl*>(object); 71 79 } 72 80 -
trunk/WebCore/rendering/RenderObject.h
r50397 r50851 254 254 virtual bool isCounter() const { return false; } 255 255 virtual bool isFieldset() const { return false; } 256 virtual bool isFileUploadControl() const { return false; } 256 257 virtual bool isFrame() const { return false; } 257 258 virtual bool isFrameSet() const { return false; } -
trunk/WebCore/rendering/RenderTreeAsText.cpp
r50345 r50851 37 37 #include "InlineTextBox.h" 38 38 #include "RenderBR.h" 39 #include "RenderFileUploadControl.h" 39 40 #include "RenderInline.h" 40 41 #include "RenderListMarker.h" … … 218 219 219 220 if (!(o.isText() && !o.isBR())) { 221 if (o.isFileUploadControl()) { 222 ts << " " << quoteAndEscapeNonPrintables(toRenderFileUploadControl(&o)->fileTextValue()); 223 } 220 224 if (o.parent() && (o.parent()->style()->color() != o.style()->color())) 221 225 ts << " [color=" << o.style()->color().name() << "]";
Note: See TracChangeset
for help on using the changeset viewer.