Closed Bug 75882 Opened 24 years ago Closed 24 years ago

dynamically clipped parts of elements hide what is below them

Categories

(Core :: Layout, defect)

x86
Windows 98
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: wo, Assigned: karnaze)

Details

Attachments

(1 file)

When an element is being clipped, one should see what is below it (in z-order). But if there is another positioned element under the clipped parts, the parts that should be visible only appear after you force a redraw of the page by e.g. resizing the window. This only happens if the clipping is done via JavaScript. It's a bit difficult to explain. To see what's happening just open the attachment. You should see a (clipped) red box in front of a blue box. But in fact, the part of the blue box where the clipped region of the red box is is not visible. Here is the source of the testcase: <html><head><title></title> <style type="text/css"> #menu { position:absolute; top:80px; left:20px; width:400px; height:200px; z-index:10; background-color:blue; clip:rect(0px 400px 200px 0px); } #menuhi { position:absolute; top:85px; left:20px; width:600px; height:200px; z-index:20; background-color:red; clip:rect(0px 100px 200px 0px); } </style> </head> <body bgcolor="yellow"> <div id="menu"></div> <div id="menuhi"></div> <br> <script> onload=function(){ document.getElementById('menuhi').style.clip='rect(0px 200px 200px 100px)'; } </script> </body> </html> There are several open bugs about clipping, this one might in particular be related to bug 41188 and maybe also bug 72412.
Attached file testcase
I can repoduce this with 2001-04-09-04, Win NT, but sometimes it works for me (when viewing locally). Looks like a timing problem. Another weird behavior with the testcase: - Right-click inside the region where the unclipped red box is (most parts of the blue box); dismiss context menu -> background instead of the blue box is repainted - Right-click outside that region; dismiss context menu -> parts of the blue box are repainted Confirming. BTW, bug 41188 seems not to be related (works for me).
Status: UNCONFIRMED → NEW
Ever confirmed: true
I can add some information about this since i tested it a lot, and i can say that it's the: background-color:red; that's evil. if you remove that and all other background-colors nestling downward to HTMLDocumentElement, it works just fine. and it doesn't matter if you have a layer or an image, i tried with both, and the problem occured with <img> too, if i had the background set. so just remove background and it works, but i _would_ be nice if it worked with it set too :)
Works for me with 2001-05-12-08, Win NT. My internet connection speed has increased since my last try :) so I don't close this bug until others can confirm it. For the behavior I mentioned in my last comment see bug 76698.
yep, works for me as well - 2001-05-13-08, win98.
Marking WORKSFORME.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: