Closed
Bug 151351
Opened 23 years ago
Closed 23 years ago
overflow="hidden" will be visible on 2nd+ childern
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: michael, Assigned: jst)
References
()
Details
Attachments
(1 file)
|
1.11 KB,
text/html
|
Details |
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.1a) Gecko/20020611
BuildID: 2002061103
If you have one layer then 2 nested childern (or more) thier overflow="hidden"
will be visible
Reproducible: Always
Steps to Reproduce:
1.view the Additional Information
2.
3.
<html>
<head>
<script>
window.onload = function() {
a= document.createElement("DIV")
a.style.position = "absolute"
a.innerHTML="parent Red | width:200 height:200"
a.style.left = 50 + "px"
a.style.top = 50 + "px"
a.style.width = 200 + "px"
a.style.height = 200 + "px"
a.style.backgroundColor = "red"
a.style.overflow = "hidden"
b= document.createElement("DIV")
b.style.position = "absolute"
b.innerHTML="child to Red | width:400 height:100"
b.style.left = 20 + "px"
b.style.top = 20 + "px"
b.style.width = 400 + "px"
b.style.height = 100 + "px"
b.style.backgroundColor = "green"
b.style.overflow = "hidden"
c= document.createElement("DIV")
c.style.position = "absolute"
c.innerHTML="child to Green | width:400 height:30"
c.style.left = 20 + "px"
c.style.top = 20 + "px"
c.style.width = 400 + "px"
c.style.height = 60 + "px"
c.style.backgroundColor = "olive"
c.style.overflow = "hidden"
b.appendChild(c)
a.appendChild(b)
document.body.appendChild(a)
};
</script>
</head>
<body>
</body>
</html>
Comment 1•23 years ago
|
||
I can verify this is a problem on Linux with build 2002061004. Interesting
note: <shift> refresh a couple of times will force it to render correctly, but
any repaint(scroll, resize) will cause it to revert back.
I don't even pretent to understand the CSS2 spec, but it seems to indicate that
the clipping region of children should check their ansestors and should be the
intersection of all these clipping rects. In fact, adding:
clip: rect(auto, 180px, auto, auto);
To the 2nd <div>(first child div) fixes the problem. Since clipping is set to
(auto) by default, the browser should have calculated this as the clipping
region for this div and specifying it should have been redundent code, but the
browser renders it differently.
Checking the DOM inspector looking at computed style reveals nothing but
"clip:auto". Not sure why it does not compute the clipping region, but it is
not relevant.
Anyway...looks like a bug. :(
Os->All
Platform->All
Severity->Normal
http://www.w3.org/TR/REC-CSS2/visufx.html#overflow
Severity: major → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
Hardware: Macintosh → All
Comment 2•23 years ago
|
||
Test Case in plain html with and without clip style.
| Reporter | ||
Comment 3•23 years ago
|
||
The problem is still there when you set the correct width to the clip ie:
clip: rect(auto, 400px, auto, auto)
The parent layer is not to be cliped less then the child
| Reporter | ||
Comment 4•23 years ago
|
||
Ignore my last comment (#3) I was in error.
The testcase is correct.
Sorry long night :(
Updated•23 years ago
|
QA Contact: desale → stummala
Comment 5•23 years ago
|
||
Michael, Greg:
This was a regression in Mozilla 1.1a and works for me now (it worked with
Mozilla 1.0.0).
Please try yourself and resolve this bug as WORKSFORME if you also don't see it
with a current build.
Comment 6•23 years ago
|
||
-> WFM
I saw this with 1.1a but not in recent builds.
Reopen if you see it again.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
Component: DOM: Core → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•