Closed
Bug 145531
Opened 23 years ago
Closed 22 years ago
border applied inside a <hr/>
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bugzilla_kl, Unassigned)
References
()
Details
(Keywords: helpwanted, Whiteboard: [good first bug])
If I have a <hr/> with height:5px;border-width:2px;, the border is applied
inside this height, as on MSIE's box-bug.
Comment 1•23 years ago
|
||
Our rendering of <hr> is kinda screwy anyway IIRC. Testcase in URL. Confirming
on a week old linux CVS build.
Comment 2•23 years ago
|
||
Hmm.. <hr> claims to have -moz-box-sizing:content-box... that looks ok...
| Reporter | ||
Comment 3•23 years ago
|
||
-moz-border-sizing:border-box makes it even worse, the <hr/> has no even the
given height and is still way smaler, then a <div> with the same settings
Updated•23 years ago
|
QA Contact: petersen → moied
Comment 4•23 years ago
|
||
Changing QA Contact to Moied
Updated•23 years ago
|
Priority: -- → P4
Target Milestone: --- → Future
Comment 5•22 years ago
|
||
In case anyone cares, the problem is the weirdness that is nsHRFrame::Paint().
In particular, note that it paints completely inside mBorderPadding -- that's wrong.
Assignee: attinasi → other
Keywords: helpwanted
Priority: P4 → --
QA Contact: moied → ian
Whiteboard: [good first bug]
Target Milestone: Future → ---
Comment 6•22 years ago
|
||
I've been looking at this, and I have a patch that seems to fix it. The problem
was that nsCSSRendering::PaintBorder expected the full rect in which it could
paint its border in. In all cases, it was receiving a height of |mThickness| and
a y0 of (mRect.height - mThickness) / 2. This was causing it to paint the 100px
borders in a space of 200px, shrinking the actual hr to a mere pixel. The change
is a bit more complex than just changing HRuleFrame::Paint() to give it the
correct height of |mRect.height|. This is because if |mThickness| + 2px was
smaller than a "line" (as determined by the font size), |mRect.height| would
grow bigger than |mThickness|. In this case, we still needed to use the old
method of painting. My patch adds an internal flag to |HRuleFrame| which
indicates which size it should use for painting.
On another note, I've never seen |mBorderPadding.anything| be anything other
than 0. My patch doesn't use it because of this, is there any case in which
mBorderPadding can change?
Comment 7•22 years ago
|
||
Ian's patch in bug 38370 should fix this by making the abomination that is
nsHRFrame go away....
And mBorderPadding is nonzero if the styles are set accordingly and content-box
sizing is used....
Depends on: 38370
Comment 8•22 years ago
|
||
Because that patch is better, and mine may still have problems, might as well
leave this bug alone and wait for that bug to be fixed.
Comment 9•22 years ago
|
||
Fixed by bug 38370
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•