[Webkit-unassigned] [Bug 64692] File upload control - filename text not aligned with button text
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 21 12:02:26 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=64692
--- Comment #15 from dubroy at chromium.org 2011-07-21 12:02:26 PST ---
I did test on Mac, and it doesn't cause a regression. But you're right -- I should figure out why.
After some experimentation, it seems that on Mac, the RenderButton always has 0 padding, margin, and border.
Using the following test:
<!doctype html>
<title></title>
<input type="file" style="border: 2px solid black;"></input>
The render tree on Mac is the following:
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x42
RenderBlock {HTML} at (0,0) size 800x42
RenderBody {BODY} at (8,8) size 784x26
RenderFileUploadControl {INPUT} at (2,2) size 241x22 "no file selected" [border: (2px solid #000000)]
RenderButton {INPUT} at (2,2) 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
#EOF
And on Chromium Linux:
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x46
RenderBlock {HTML} at (0,0) size 800x46
RenderBody {BODY} at (8,8) size 784x30
RenderFileUploadControl {INPUT} at (2,2) size 242x26 "No file chosen" [border: (2px solid #000000)]
RenderButton {INPUT} at (2,2) size 85x22 [bgcolor=#DDDDDD] [border: (2px outset #DDDDDD)]
RenderBlock (anonymous) at (8,3) size 69x16
RenderText at (0,0) size 69x16
text run at (0,0) width 69: "Choose File"
RenderText {#text} at (0,0) size 0x0
#EOF
Note that on Chromium Linux, the RenderButton inside the FileUploadControl has a 2px border as well. I don't know why that's the case though.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list