Closed
Bug 304004
Opened 19 years ago
Closed 19 years ago
contents of button not renderer equally when using style:position:absolute;
Categories
(Core :: Layout: Form Controls, defect)
Core
Layout: Form Controls
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: egonknapen, Assigned: bzbarsky)
References
Details
Attachments
(2 files)
|
864 bytes,
text/html
|
Details | |
|
3.23 KB,
patch
|
dbaron
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050807 Firefox/1.0+ Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050807 Firefox/1.0+ Following two lines, produce different results: <input type=button value="hello" style="width:40px;"><br> <input type=button value="hello" style="width:40px; position:absolute;"> It seems when using position:absolute; an extra padding is added. Reproducible: Always Steps to Reproduce: 1. just put two lines above in an html page 2. 3. Actual Results: the first 'hello' is renderer in the center of the button the second 'hello' is renderer as if there is a padding of around 5px to the left. Expected Results: the second button should have been renderer just the same as the first one. The following removes the extra padding effect <input type=button value="hello" style="width:40px; position:absolute; padding:0px;"> But the question is still, where does that extra padding come from.
Comment 1•19 years ago
|
||
This testcase is not really concise, but it does show (at least to me) that the default rendering (without position:absolute) seems to be something special in some way. I can't reproduce such a thing with normal css and <div>'s. Maybe this code has got something to do with it: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/forms/nsHTMLButtonControlFrame.cpp&rev=3.191&root=/cvsroot#535
Updated•19 years ago
|
Component: General → Layout: Form Controls
Product: Firefox → Core
QA Contact: general → layout.form-controls
Version: unspecified → Trunk
| Assignee | ||
Comment 2•19 years ago
|
||
What's happening here is that our internal block is not shrink-wrap for cases when the button is a block (as here, when it's positioned). And that repositioning hack only kicks in for cases when the internal block is shrink-wrap (so only for inline buttons). Not sure offhand what we can do about that... :(
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
| Assignee | ||
Comment 3•19 years ago
|
||
Although frankly, why are we only doing this for inlines? Block-level buttons lay out pretty much the same way, from what I can tell...
| Assignee | ||
Comment 4•19 years ago
|
||
I did some digging around to see why the code is this way, and came on some totally commentless kipp checkins... I don't see why we want this behavior difference, frankly.
Attachment #203970 -
Flags: superreview?(dbaron)
Attachment #203970 -
Flags: review?(dbaron)
Comment on attachment 203970 [details] [diff] [review] Proposed change This is the stuff that's going to make finishing the reflow branch so much fun.
Attachment #203970 -
Flags: superreview?(dbaron)
Attachment #203970 -
Flags: superreview+
Attachment #203970 -
Flags: review?(dbaron)
Attachment #203970 -
Flags: review+
| Assignee | ||
Updated•19 years ago
|
Assignee: nobody → bzbarsky
Target Milestone: --- → mozilla1.9alpha
| Assignee | ||
Comment 6•19 years ago
|
||
Fixed
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 7•19 years ago
|
||
Verified with the testcase, using: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20051124 Firefox/1.6a1 Thanks, Boris!
You need to log in
before you can comment on or make changes to this bug.
Description
•