Closed
Bug 353860
Opened 18 years ago
Closed 18 years ago
-moz-border-radius-topleft, margin-left (mixed units) interacting to leave 1px gaps between background images depending on the window size (in firefox: vertical lines in tabs UI)
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha5
People
(Reporter: ispiked, Assigned: vlad)
References
Details
(Keywords: testcase)
Attachments
(6 files, 1 obsolete file)
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060922 Minefield/3.0a1
Steps to reproduce:
1. Open a browser window and hit Ctrl+T about 5-10 times until you see the lines appear on tabs.
Bug 347482 tracked this issue when the new theme landed on branch, and it was supposedly fixed by bug 350139.
Reporter | ||
Comment 1•18 years ago
|
||
Comment 3•18 years ago
|
||
I see something similar under windows (see http://img141.imageshack.us/img141/6854/screenshot001by8.png)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060922 Minefield/3.0a1 ID:2006092205 [cairo]
-> PC / All ?
OS: Linux → All
Comment 4•18 years ago
|
||
on the branch, I worked around this opacity issue with images with built in opacity.
looking at the css on the trunk, we don't have the opacity rules, but it would be worth double checking with DOMi to see if there is any opacity coming from somewhere else.
see bug #347482 for some history about this problem.
Depends on: 347482
Comment 5•18 years ago
|
||
This is what I see: The transparency is inside of the images only. The boxes are positioned correctly, but some the left and right background images are shifted by 1px to the right. On the right side of the tab, this results in an uncovered line (that's -moz-dialog). On the left side of the tab, the image overlays the middle part (which shouldn't be possible).
Comment 6•18 years ago
|
||
Looks like border-radius is causing this. I've just experienced the same behavior while playing with my website's CSS.
Comment 7•18 years ago
|
||
I'd say this needs to be moved to Core.
Comment 8•18 years ago
|
||
btw, I can't reproduce this with Gecko 1.8. I wonder if this problem is related to bug 347482 at all.
Updated•18 years ago
|
Flags: blocking1.9?
Comment 9•18 years ago
|
||
Resizing the window makes the problem come and go.
The involvement of margin makes me think this depends on bug 177805.
Comment 10•18 years ago
|
||
dao, thanks for that reduced test case.
> btw, I can't reproduce this with Gecko 1.8. I wonder if this problem is related
> to bug 347482 at all.
I can't either, so I think you are right.
> I'd say this needs to be moved to Core.
I'll move it to core.
Summary: Vertical lines on tabs are back → -moz-border-radius-topleft, margin-left (mixed units) interacting to leave 1px gaps between background images depending on the window size (in firefox: vertical lines in tabs UI)
Whiteboard: [have test case]
Updated•18 years ago
|
Product: Firefox → Core
Updated•18 years ago
|
Component: Tabbed Browser → Layout
QA Contact: tabbed.browser → layout
Comment 11•18 years ago
|
||
(In reply to comment #9)
> The involvement of margin makes me think this depends on bug 177805.
Here's a summary for different margin-left values (all using -moz-border-radius):
0 works
10px works
1em works
10.5px fails
.6em fails
Comment 12•18 years ago
|
||
dao, with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070204 Minefield/3.0a2pre, I still see this (depending on the size of my window.)
try this:
javascript:top.resizeTo(1245,400);
then load
https://bugzilla.mozilla.org/attachment.cgi?id=240925
Comment 13•18 years ago
|
||
Yes, it still occurs when document.documentElement.clientWidth in attachment 240925 [details] is even.
Comment 14•18 years ago
|
||
Apparently bug 177805 made this worse. The with-border-radius case (without margin-left) in attachment 240925 [details] fails now.
Comment 15•18 years ago
|
||
Should investigate whether bug 371434 fixes this.
Updated•18 years ago
|
Flags: blocking1.9? → blocking1.9+
Comment 16•18 years ago
|
||
(In reply to comment #15)
> Should investigate whether bug 371434 fixes this.
It didn't so far. Note that the image in the testcase doen't really look scaled and that there's also a background color.
Comment 17•18 years ago
|
||
the only difference here is margin left is .6 (gap) vs .7 (no gap)
Updated•18 years ago
|
Attachment #259213 -
Attachment is patch: false
Attachment #259213 -
Attachment mime type: text/plain → text/html
Comment 18•18 years ago
|
||
this screen shot comes from my Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a3pre) Gecko/20070313 Minefield/3.0a3pre build.
Updated•18 years ago
|
Comment 19•18 years ago
|
||
-> both boxes (or their backgrounds only?!) are cut off
Comment 20•18 years ago
|
||
(In reply to comment #19)
> -> both boxes (or their backgrounds only?!) are cut off
... not really cut off, as the rounded edge on the right is still intact.
Comment 21•18 years ago
|
||
With my default font-size I see the gap in the lower box.
Try changing font-sizes (Ctrl++, Ctrl+-) and see how the gaps change every time.
Isn't this a px vs em unit problem? Mixing px and em is a really bad idea in general.
Comment 22•18 years ago
|
||
> With my default font-size I see the gap in the lower box.
> Try changing font-sizes (Ctrl++, Ctrl+-) and see how the gaps change every
> time.
I see the same thing, thanks for pointing that out Arpad.
> Isn't this a px vs em unit problem? Mixing px and em is a really bad idea in
> general.
I'll leave that question and comment for roc to answer.
Comment 23•18 years ago
|
||
(In reply to comment #21)
> Isn't this a px vs em unit problem?
It's obviously related to em, but that doesn't mean that any of the test cases should fail. As you can see in attachment 259225 [details], width:42px for .a is violated as well as width:8px for .b.
> Mixing px and em is a really bad idea in general.
As long as you know what you're doing and as long as the rendering engine isn't broken ;), it's not a bad idea at all.
Flags: in-testsuite?
Comment 24•18 years ago
|
||
Ah, ok, so what's different about border-radius is that you're going through nsCSSRendering::PaintRoundedBackground instead of nsCSSRendering::PaintBackgroundColor, which means you get a FillPolygon instead of a FillRect.
So that probably means this is the same underlying problem as bug 363220.
I should probably add tests that stress PaintRoundedBackground to layout/reftests/pixel-rounding/, at least if vlad's not eliminating it in his border rewrite.
Comment 25•18 years ago
|
||
I checked in a bunch of tests for this, although they're all currently marked as random until I can evaluate their state on various platforms.
Updated•18 years ago
|
Flags: in-testsuite? → in-testsuite+
Assignee | ||
Updated•18 years ago
|
Assignee: nobody → vladimir
Assignee | ||
Updated•18 years ago
|
Target Milestone: --- → mozilla1.9alpha5
Comment 26•18 years ago
|
||
Attachment #240925 -
Attachment is obsolete: true
Assignee | ||
Comment 27•18 years ago
|
||
This is fixed by the patch in bug 379505; the testcases seem to work, and there's no more cruft in the tabbar. The main underlying issue is that the rectangle that's given in the border radius case was:
x: 6000 y: 30 width: 6000: height: 120 -- 60 twips/pixel, so that's
100, 0.5 and 100x2
So the rectangle that was being rendered wasn't pixel aligned, and so there was visible fringing. I think that beforehand, the mechanism that was being used to render the approximated rounded rectangle wasn't getting rounded by by thebes rendering context wrapper.
Assignee | ||
Comment 28•18 years ago
|
||
I just landed a partial fix for this with the patch in bug 379505; however, things seem shifted down by 1px, and I'm not sure if that's still this bug or another. Adding margin-bottom: 1px ! important makes everything look like Fx2. Not sure if this bug should be closed or not.
Comment 29•18 years ago
|
||
(In reply to comment #28)
> I just landed a partial fix for this with the patch in bug 379505; however,
> things seem shifted down by 1px, and I'm not sure if that's still this bug or
> another.
It's bug 369882.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 30•18 years ago
|
||
Ok; marking this as passing -- the reftests that were marked as failing due to this bug are also passing now.
You need to log in
before you can comment on or make changes to this bug.
Description
•