Closed
Bug 31922
Opened 24 years ago
Closed 24 years ago
clipping doesn't work correctly
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
VERIFIED
INVALID
People
(Reporter: martin.honnen, Assigned: pierre)
Details
Attachments
(2 files)
In the following <HTML> <HEAD> <STYLE> #outerLayer1 { position: absolute; left: 100px; top: 100px; width: 100px; height: 100px; background-color: lime; layer-background-color: lime; } #outerLayer2 { position: absolute; left: 100px; top: 201px; width: 100px; height: 100px; clip: rect(30px 70px 70px 30px); overflow: hidden; background-color: lime; layer-background-color: lime; } #innerLayer1, #innerLayer2 { position: absolute; left: 40px; top: 40px; width: 20px; height: 20px; background-color: orange; layer-background-color: orange; } </STYLE> <SCRIPT> </SCRIPT> </HEAD> <BODY> <DIV ID="outerLayer1"> <DIV ID="innerLayer1"> </DIV> </DIV> <DIV ID="outerLayer2"> <DIV ID="innerLayer2"> </DIV> </DIV> </BODY> </HTML> the outerLayer2 gets not correctly clipped. Only innerLayer2 is visible though there should be 10px wide lime "border" around it.
Reporter | ||
Comment 1•24 years ago
|
||
Comment 2•24 years ago
|
||
Maybe a term could be 'ClipBy' since that is what its doing[opposed to NS4 & IE's 'ClipTo'] clipBy (10, 10, 10, 10) would clip the left by each side by 10px, where as in IE and NS4 would render this invisible because of it would clip to the pixel respective coords with Element.
Assignee | ||
Comment 3•24 years ago
|
||
The code contains 2 errors: - The coordinates of a rect() should be separated with commas. - The values inside the clip rect specify *offsets* from the respective sides of the box, not the actual coordinates of the clip rect. See http://www.w3.org/TR/REC-CSS2/visufx.html#propdef-clip for more info. I'm going to attach a revised testcase (no... innerLayer2 is not larger than innerLayer2 :-) Closed as Invalid.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
Assignee | ||
Comment 4•24 years ago
|
||
Reporter | ||
Comment 5•24 years ago
|
||
Why is http://bugzilla.mozilla.org/show_bug.cgi?id=11565 mentioning It was decided that clip should behave as defined in the positioning working draft and as implemented by Navigator and IE, i.e., not as defined by the CSS2 spec IE and NN4 interpret the clip values as coordinates.
You need to log in
before you can comment on or make changes to this bug.
Description
•