Closed Bug 500141 Opened 16 years ago Closed 15 years ago

border-radius joins to a side with border-*-style:none broken since Firefox 3.5

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla2.0b8
Tracking Status
blocking2.0 --- final+

People

(Reporter: bugzilla, Assigned: dbaron)

References

(Blocks 1 open bug, )

Details

(Keywords: regression, testcase)

Attachments

(8 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1) Gecko/20090616 Firefox/3.5 (.NET CLR 3.5.30729) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1) Gecko/20090616 Firefox/3.5 (.NET CLR 3.5.30729) The border radius implementation seems to have changed in Firefox 3.5. The edges of the header at the demo URL no longer touch the background, presumably because the border radius is fairly large. I don't know if this is intended, but it looks weird to me. Reproducible: Always Still happens with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090623 Minefield/3.6a1pre, presumably an issue on all OSes.
Attached file testcase
Attached file Simpler testcase
Probably occurs on any element, and border-color seems related.
Status: UNCONFIRMED → NEW
Component: General → Layout
Ever confirmed: true
Keywords: regression, testcase
Product: Firefox → Core
QA Contact: general → layout
Version: unspecified → 1.9.1 Branch
This is almost certainly fallout from bug 456219, but I'm hesitant to call it a regression; I would say the current rendering is closer to the specified behavior than the old rendering, though clearly worse in terms of appearance. The test case I'm attaching has three columns (if your window is wide enough): on the left are the same pair of constructs that appear in attachment 384841 [details], only revised to eliminate dependence on font size. The middle column shows what happens if you make the left and right borders be a very thin red line instead of 'none', and the right column has SVG renderings of what I think we *should* be drawing. What's going on is, because the borders at top and bottom are solid and the borders at left and right are 'none', we clip background painting to the padding box. The padding box is bent inward by the border-radius specification, on the theory that there *will be* a border drawn on all four sides. But the border actually drawn at left and right is 'none' so we get these white gaps. What *should* be happening at upper left, as I read the spec, is that the blue paint should extend into the white region, as shown at the far right. This is just the logical extrapolation of the behavior in the middle top. The middle top shows a second bug in this area: there should be no white gaps in that case either. We are not choosing the boundary between border sides correctly when there is no or a very thin border on one side and a very thick border on the other. The bottom row shows a third bug: the default black border-color should not behave differently from an explicitly specified border-color. I'm putting this on my list, but before I start messing with the code, I would appreciate a second opinion on the appropriate behavior here.
Assignee: nobody → zweinberg
Status: NEW → ASSIGNED
Attachment #384911 - Attachment mime type: text/html → application/xhtml+xml
gah, either I picked the wrong file or bugzilla decided to eat my embedded SVG.
Attachment #384911 - Attachment is obsolete: true
Attachment #384911 - Attachment mime type: application/xhtml+xml → text/html
The SVG seems pretty close to what I'd expect, except for the issue that the border-box of the boxes aren't actually rectangles, so we should be hitting the radius-reduction case and thus getting some straight segments along the top and bottom. I think the SVG is showing what I'd expect if the testcase used elliptical border-radii (moz-border-radius: 72pt / 61pt, I think).
(In reply to comment #6) > The SVG seems pretty close to what I'd expect, except for the issue that the > border-box of the boxes aren't actually rectangles, so we should be hitting the > radius-reduction case and thus getting some straight segments along the top and > bottom. Yeah, I forgot about radius reduction when I did the SVG version.
Here's another test case, with a related SVG, demonstrating how I think this case should be rendered, in a case where border-radii reduction doesn't need to take place. If people agree, this could be reftested.
I would expect border-style: none; to be treated the same as border-style: solid; border-width: 0; No? Your renderings on the right in the SVG look close to correct to me.
(In reply to comment #10) > I would expect border-style: none; to be treated the same as border-style: > solid; border-width: 0; No? Your renderings on the right in the SVG look close > to correct to me. That makes sense to me. Could we maybe get an example of this case added to css3-background?
Sure! Throw me the CSS you want and I'll get a reference rendering added. :)
Version: 1.9.1 Branch → Trunk
I no longer work for Mozilla, I am deassigning myself from bugs I have no intention of working on as a volunteer.
Assignee: zackw → nobody
Status: ASSIGNED → NEW
OS: Windows XP → All
Hardware: x86 → All
Summary: Thick border radius broken since Firefox 3.5 → Thick border-radius broken since Firefox 3.5
A common aspect to this testcase is that the joins are broken when they're a transition to border-*-style: none, but they work fine with border-*-width: 0. That, plus attachment 385837 [details] seems to show (as Zack pointed out in comment 4) a bug in our ability to (as an optimization) adjust the background fill area between border-box and padding box; I'm guessing we're not checking for the initial (use-text-color) border-color correctly.
Summary: Thick border-radius broken since Firefox 3.5 → border-radius joins to a side with border-*-style:none broken since Firefox 3.5
I think this should block, given that we're turning on border-radius.
Assignee: nobody → dbaron
blocking2.0: --- → final+
(In reply to comment #18) > That, plus attachment 385837 [details] seems to show (as Zack pointed out in comment 4) a > bug in our ability to (as an optimization) adjust the background fill area > between border-box and padding box; I'm guessing we're not checking for the > initial (use-text-color) border-color correctly. And, for the record, IsOpaqueBorderEdge has the comment: // We don't know the foreground color here, so if it's being used // we must assume it might be transparent. if (isForeground) return PR_FALSE;
http://hg.mozilla.org/mozilla-central/rev/bb8146cbac63 ... but I really need to get a test in as well.
Flags: in-testsuite?
Priority: -- → P3
Target Milestone: --- → mozilla2.0b8
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Testcase #three in attachment 384912 [details] still isn't right, though...
Reopening for that; I'm suspicious of the calculation of k in MaybeMoveToMidPoint.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Depends on: 608458
... and add comments explaining what this function *actually* does.
Attachment #488952 - Flags: review?(roc)
Comment on attachment 488952 [details] [diff] [review] fix the issue in comment 24 +// Given three points, p0, p1, and midPoint, move p1 further in to the +// rectangle What rectangle?
Attachment #488952 - Flags: review?(roc) → review+
I added reftests for the two issues fixed by recent patches in this bug: http://hg.mozilla.org/mozilla-central/rev/b80c7aadda83 (one for each patch; the first based on tests above). I filed bug 613266 on the remaining issue in attachment 488954 [details]. Marking this bug as fixed.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
The second test had a one-pixel error on Windows opt builds only: http://hg.mozilla.org/mozilla-central/rev/1d85ad54b112 (I ran try server on three platforms, debug only)
(In reply to comment #31) > The second test had a one-pixel error on Windows opt builds only: > http://hg.mozilla.org/mozilla-central/rev/1d85ad54b112 > (I ran try server on three platforms, debug only) Therefore I marked it as random on Windows: http://hg.mozilla.org/mozilla-central/rev/1d85ad54b112
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: