All users were logged out of Bugzilla on October 13th, 2018

clipping doesn't work correctly

VERIFIED INVALID

Status

()

P3
normal
VERIFIED INVALID
19 years ago
10 years ago

People

(Reporter: martin.honnen, Assigned: pierre)

Tracking

Trunk
x86
Windows 98
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

19 years ago
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

19 years ago
Created attachment 6556 [details]
bug demo (clipping doesn't work correctly)

Comment 2

19 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

19 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
Last Resolved: 19 years ago
Resolution: --- → INVALID
(Assignee)

Comment 4

19 years ago
Created attachment 6596 [details]
revised testcase
(Reporter)

Comment 5

19 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.
(Assignee)

Comment 6

19 years ago
You're right Martin. See bug 11565 for more info.

Comment 7

18 years ago
Adding 'verifyme' keyword
Keywords: verifyme

Comment 8

18 years ago
verifying invalid
Status: RESOLVED → VERIFIED

Updated

10 years ago
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.