Closed Bug 62543 Opened 25 years ago Closed 23 years ago

overflow:hidden not working on Linux with transparent GIFs

Categories

(Core :: Web Painting, defect, P3)

x86
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 78497
Future

People

(Reporter: simonl, Assigned: dcone)

Details

BuildID: 2000120808 UserAgent: Mozilla/5.0 (X11; U; Linux 2.2.17 i686; en-US; m18) Gecko/20001208 DESCRIPTION An absolutely positioned div has an image in it. The div has "overflow:hidden". Too, it either has width and height set, or it has clip:rect(...) set. EXPECTED BEHAVIOUR The div should be clipped, and the contained image should also be clipped so it always fits inside the visible part of the div. ACTUAL BEHAVIOUR Under Linux the image is not clipped at all. The div's background color is clipped. Thus overflow:hidden seems to affect the div itself, but not it's children. Things work as expected on Win32. Not tested on Mac. DETAILS The bug only happens when the image is a GIF with transparency. Non-transparent GIF's and JPEG's seem to not trigger the bug. Not tested with other image formats. There are two ways to clip the div, when "overflow:hidden" is set. Both of them work under Win32. The following is what happens under Linux: 1) Setting "clip:rect(0px, 18px, 18px, 0px)" (top,right,bottom,left order). This simply does not work at all. 2) Setting "width:18px; height:18px". This triggers strange behaviour: When loading the page the image is initially clipped, though not entirely correct, it seems to be clipped on 19 pixels height instead of 18. Only after refreshing the browser window (shade and unshade is enough; no need for resize) the entire image becomes visible. I have seen other display artifacts than the 19'th scanline, those however might be another bug, since they only occur with lots of nested divs and tables, and not in this test case (investigating this further). TEST CASES As simple as I could make them: http://www.mirrormind.com/tests/mozilla/clip.html http://www.mirrormind.com/tests/mozilla/width_height.html NOTES Probably this bug belongs to other (probably more) components; as a programmer I feel indications of something more than just a clipping issue: - How can it make a difference if the image is transparent or not? Is this something with image handling in general? - Why does the width/height case only happen after refreshing the display? Could it be that clipping is correct, but display refresh trashes clipping? - Finally, what does clipping have to do with Linux and Win32, clipping ought to be completely platform independent? However I don't know which components to assign this to otherwise, and I've already spent way too much time trying to figure out this bugzilla stuff.
Isn't |rect(0px, 18px, 18px, 0px)| an invalid rect? I'm not sure, I can never remember these things. Sending to views for confirmation and triage.
Assignee: pierre → kmcclusk
Component: Style System → Views
QA Contact: chrisd → petersen
I am seeing what is described in #2 under Details Platform: PC OS: Linux 2.2.16 Mozilla Build: 2000121908 M18 Trunk Build Very good bug report BTW. Marking as NEW.
Status: UNCONFIRMED → NEW
Ever confirmed: true
From CSS2 Errata: While CSS2 specifies that values of "rect()" specify offsets from the respective sides of the box, current implementations interpret values with respect to the top and left edges for all four values (top, right, bottom, and left). The Working Group proposes to revise CSS2 to conform to current practice.
Status: NEW → ASSIGNED
Setting milestone to Mozilla1.0.1
Target Milestone: --- → mozilla1.0.1
Clearing milestone.
Target Milestone: mozilla1.0.1 → ---
Don, At some point we need to handle clipping of transparent images.
Assignee: kmcclusk → dcone
Status: ASSIGNED → NEW
Target Milestone: --- → Future
*** This bug has been marked as a duplicate of 78497 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.