Bug 10840 - REGRESSION: Shadow of file upload button is clipped
Summary: REGRESSION: Shadow of file upload button is clipped
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,<input%20type="button"...
Keywords: Regression
Depends on:
Blocks:
 
Reported: 2006-09-13 09:16 PDT by mitz
Modified: 2006-11-02 19:25 PST (History)
2 users (show)

See Also:


Attachments
Screenshot (2.75 KB, image/png)
2006-09-13 09:18 PDT, mitz
no flags Details
Fix: Expand the clip 2px in height (1.82 KB, patch)
2006-09-14 15:48 PDT, Adam Roben (:aroben)
timothy: 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-13 09:16:58 PDT
The shadow below the new file upload button is clipped. See URL and attached screenshot.
Comment 1 mitz 2006-09-13 09:18:04 PDT
Created attachment 10531 [details]
Screenshot
Comment 2 Adam Roben (:aroben) 2006-09-13 10:27:16 PDT
Looks like we just need a little vertical padding to fix this. RenderFileUploadControl pushes a clip in paint() based on the size of the renderer, so we just need to increase the height to keep from clipping the shadow.
Comment 3 David Kilzer (:ddkilzer) 2006-09-13 11:02:04 PDT
Do we need a 'NativeFileUpload' keyword in Bugzilla?
Comment 4 Adam Roben (:aroben) 2006-09-13 11:20:14 PDT
(In reply to comment #3)
> Do we need a 'NativeFileUpload' keyword in Bugzilla?

Adele just created one, and I've added it to the relevant bugs
Comment 5 Adam Roben (:aroben) 2006-09-14 15:48:41 PDT
Created attachment 10560 [details]
Fix: Expand the clip 2px in height

This can be fixed by adding 2px to the height of the clip to allow the shadow to draw. See patch.

P.S. There's something oddly satisfying about using the new upload control to upload a patch to fix the new upload control.
Comment 6 mitz 2006-09-14 23:23:14 PDT
(In reply to comment #5)
> Created an attachment (id=10560) [edit]
> Fix: Expand the clip 2px in height
> 
> This can be fixed by adding 2px to the height of the clip to allow the shadow
> to draw. See patch.
> 

Hmm... this works well for the default style on the Mac (in which case you might as well not clip), but in other cases, i.e. when the button is style (for example, by increasing the font size, which selects a bigger Mac button with bigger shadow, or by using a non-themed button) or set a smaller height for the upload control, it seems to me that this patch will defeat the purpose of clipping, and might also not repaint those 2 pixels (in fact, that's true for the default case too, but it's currently common to all Mac buttons).
Comment 7 Anders Carlsson 2006-11-02 19:25:13 PST
Committed revision 17555.