Closed Bug 417246 Opened 14 years ago Closed 14 years ago

In FF3 the top border of an element is rendered with a smaller height if: * the DIV is empty and * border-top-style is not (dotted or dashed) and border-bottom-style is (dotted or dashed) and * border-top-width is greater than border-bottom-width

Categories

(Core :: Layout, defect, P2)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: dpopa, Assigned: vlad)

Details

(Keywords: regression, testcase)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4pre) Gecko/2008021204 Minefield/3.0b4pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4pre) Gecko/2008021204 Minefield/3.0b4pre ID:2008021204

In FF3 the top border of an element is rendered with a smaller height if: * the DIV is empty and * border-top-style is not (dotted or dashed) and border-bottom-style is (dotted or dashed) and * border-top-width is greater than border-bottom-width. See attachment.

Reproducible: Always
See attachment 303034 [details] for bug 379303
This does not reproduce on FF2.
I see this on linux, too.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking1.9?
Keywords: regression, testcase
OS: Windows XP → All
Hardware: PC → All
Version: unspecified → Trunk
How about steps to reproduce?
See attachment 303034 [details] of the bug 379303
You can change the top and bottom border styles and widths to see the bug in action. You can trigger the bug with any combination of the border styles marked with a red background.

 
In FF3:

    * create an empty DIV
 and
    * set border-top-style other than (dotted or dashed) and border-bottom-style to (dotted or dashed)
 and
    * set border-top-width to a value s greater than the border-bottom-width

Actual results: the top border is rendered with a smaller width than specified.


Use the following css for any empty DIV (or other tag):
{
  background-color: red; /*so we can see the background*/
  border-top: 30px solid lime;
  border-bottom: 10px dashed blue;
} 

Results:
- the top border should be 30px all but instead it appears to be 20px
- the red background can be seen through what should have been the lower 10px of the top border
- the bottom border appears solid instead of dashed.
Flags: blocking1.9? → blocking1.9+
Priority: -- → P3
This may be same as bug 417543
This is almost certainly a regression from Vlad's border work. Shouldn't be hard to fix and I think we should fix it.
Assignee: nobody → vladimir
Flags: blocking1.9+
Priority: P3 → P2
(In reply to comment #7)
> Created an attachment (id=306423) [details]
> an actual testcase
> 

Could use attachment 303034 [details] of the bug 379303

It's much better to have a very simple testcase than a rather complex dynamic testcase.
That's true only if the testcase covers all the possible combinations, as described in the bug description. Your testcase covers only one.

It's true, the developer may need to verify his code against only one case, but I really tried to make sure he get it right in all cases.
If you want to test a lot of cases, make a set of testcases, or one testcase that contains a lot of elements that test the different cases. Asking people to click on a lot of options to test everything is not helpful.
So the problem is this code here:

http://mxr.mozilla.org/seamonkey/source/layout/base/nsCSSRendering.cpp#1121

The way rendering with dotted bits work is we first render the corners, and then we go back and fill in the sides.  This is done to avoid weird discontinuities at the corners when using dotted/dashed borders, especially with rounded borders.  The problem in this case is that there really aren't any corners.  But this halfWidth/halfHeight stuff, I can't remember what that was protecting against.  Removing the halfWidth/halfHeight clamping fixes the problem, and I don't see anything wrong with any of my testcases.  Running reftests now.
Reftests say everything's ok, so let's get rid of that code.
Attachment #307321 - Flags: review?(roc)
Flags: tracking1.9+
So what happens now if you have a very small DIV with very large border-radius?
checked in, along with the reftests.
Flags: in-testsuite+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.