Bug 10824 - REGRESSION: "no file selected" placeholder text missing from file upload control
Summary: REGRESSION: "no file selected" placeholder text missing from file upload control
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Normal
Assignee: Adam Roben (:aroben)
URL: data:text/html,Look:%20<input%20type=...
Keywords: Regression
Depends on:
Blocks:
 
Reported: 2006-09-12 13:59 PDT by mitz
Modified: 2006-09-19 10:39 PDT (History)
0 users

See Also:


Attachments
Use a RenderBlock instead of a RenderFlexibleBox to hold the filename (11.28 KB, patch)
2006-09-17 16:47 PDT, Adam Roben (:aroben)
no flags Details | Formatted Diff | Diff
Same fix, without change to project.pbxproj (11.24 KB, patch)
2006-09-17 16:49 PDT, Adam Roben (:aroben)
no flags Details | Formatted Diff | Diff
For real this time (9.87 KB, patch)
2006-09-17 16:50 PDT, Adam Roben (:aroben)
no flags Details | Formatted Diff | Diff
Remove RenderFileUploadInnerFileBox and draw text ourselves, update layout tests (40.72 KB, patch)
2006-09-18 17:38 PDT, Adam Roben (:aroben)
adele: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2006-09-12 13:59:57 PDT
About 50% of the time, the URL renders without the "no file selected" placeholder text. Reloading sometimes makes it appear and sometimes makes it disappear.
Comment 1 Adam Roben (:aroben) 2006-09-17 16:47:36 PDT
Created attachment 10610 [details]
Use a RenderBlock instead of a RenderFlexibleBox to hold the filename

(Fix suggested by Hyatt) This patch fixes the problem by making RenderFileUploadInnerFileBox a subclass of RenderBlock instead of RenderFlexibleBox. Ultimately, we should handle the truncation of the filename in the engine, which would get rid of this problem in a much better way and we wouldn't need to call updateIconAndFilename() from within layout(). See rdar://problem/4736216 for more info.
Comment 2 Adam Roben (:aroben) 2006-09-17 16:49:27 PDT
Created attachment 10611 [details]
Same fix, without change to project.pbxproj
Comment 3 Adam Roben (:aroben) 2006-09-17 16:50:22 PDT
Created attachment 10612 [details]
For real this time
Comment 4 Adam Roben (:aroben) 2006-09-17 20:49:31 PDT
Comment on attachment 10612 [details]
For real this time

Need to update some test results. Coming soon.
Comment 5 Adam Roben (:aroben) 2006-09-18 17:38:30 PDT
Created attachment 10635 [details]
Remove RenderFileUploadInnerFileBox and draw text ourselves, update layout tests

This patch takes a completely different approach (also suggested by Hyatt). This does away with RenderFileUploadInnerFileBox and draws the filename text within paintObject() using drawText().
Comment 6 Adele Peterson 2006-09-18 22:16:59 PDT
Comment on attachment 10635 [details]
Remove RenderFileUploadInnerFileBox and draw text ourselves, update layout tests

I think we still need to set white-space: nowrap on the button.  Adam and I discussed this, and he's going to check that out before checking in.
Comment 7 Adam Roben (:aroben) 2006-09-19 10:18:51 PDT
Added back the NOWRAP rule.

WebCore changes landed as r16448. LayoutTests changes landed as r16449.