Closed
Bug 78497
Opened 24 years ago
Closed 23 years ago
transparent images within absolute positioned div not clipped
Categories
(Core :: Web Painting, defect, P2)
Tracking
()
VERIFIED
FIXED
Future
People
(Reporter: simon, Assigned: tor)
References
()
Details
(Keywords: platform-parity)
Attachments
(3 files, 1 obsolete file)
|
2.97 KB,
image/gif
|
Details | |
|
1.20 KB,
text/html
|
Details | |
|
2.79 KB,
patch
|
pavlov
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.4.3-22mdk i686; en-US; rv:0.8.1+)
Gecko/20010430
BuildID: 2001043021
If clipping a div that has say 5 images in a line widthwise and you want to see
the middle 3 images, it wont clip at all. I've tried the various overflow
options. I'm using the xbdhtml cross browser code (netscapes). Under NS4/IE it
allows me a 'viewport' onto the div, but mozilla shows everything that should be
clipped off - it also activates hyperlinks for the incorrect images.
Reproducible: Always
Steps to Reproduce:
1. Use html like following:
<div id=buttons style="position:absolute; overflow:hidden">
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td><a href="link1.html">
<img src="images/button.gif" width=100 height=82>
</a></td>
<td><a href="link2.html">
<img src="images/button2.gif" width=100 height=82>
</a></td>
</tr>
</table>
</div>
2. Set a rect clip to view just the first image and clip the second off.
elt = document.getElementById("buttons")
elt.style.clip = 'rect(' + cliptop + ' ' +
clipright + ' ' + clipbottom + ' ' + clipleft +')';
3. Fire up browser and be dissapointed! Text works fine, images don't.
Actual Results: Shows all images in div, complete with mouse over events
Expected Results: Show clipped region only
Text clipping fine. Tried transparent/non-transparent - both fail. NS4 and IE fine.
Comment 1•24 years ago
|
||
Simon, could you attach a testcase? That will greatly expedite the fixing of
this bug.
| Reporter | ||
Comment 2•24 years ago
|
||
Hi, sorry about not having an attachment - It's the first time I've seen
bugzilla! I've set up a test page:
http://www.mintsource.org
Under NS4, you see 3 images at a time, on mozilla all are showed.
Cheers!
Comment 3•24 years ago
|
||
For the record-- the images are clipped properly on Win98 Build 2001050104 (only
three show at a time). The hyperlinks are still active on images outside the
clipping area though; I don't know if this is correct behavior or not.
| Reporter | ||
Comment 4•24 years ago
|
||
MacOS Build 2001032613 - 0.8.1 does the same thing as the Win98 Build
2001050104, images are clipped but hyperlinks not clipped off.
Comment 5•24 years ago
|
||
Images appear clipped correctly too under the May 8th build. Reporter, you may
want to pull a fresh build.
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Reporter | ||
Comment 6•24 years ago
|
||
Still having the same problem under Linux build 2001051108. I'll check out the
mac etc builds when I get back to the office. I am suprised more people aren't
tripping over this, is this a duplicate of a different bug? This'll break quite
a few of the dhtml sites I know.
Updated•24 years ago
|
Target Milestone: --- → mozilla0.9.3
Updated•24 years ago
|
Target Milestone: mozilla0.9.3 → mozilla0.9.4
| Reporter | ||
Comment 7•24 years ago
|
||
Specifying a z-index for abosulte positioned div fails. The default stacking
order determined by element declaration on page is not being overridden. This
can be seen when requiring an absolute positioned div to pop up above its
relative position i.e. negative top values.
Summary: images within absolute positioned div not clipped → images within absolute positioned div not clipped - z-index ordering broken
Updated•24 years ago
|
Target Milestone: mozilla0.9.4 → mozilla0.9.5
| Reporter | ||
Comment 9•24 years ago
|
||
New URL for testing - moved the test files under bugzilla subdirectory. Changed
platform and OS to all, since all platforms I've tested show at least some of
the problems described.
OS: Linux → All
Hardware: PC → All
Updated•24 years ago
|
Status: NEW → ASSIGNED
Target Milestone: mozilla0.9.6 → mozilla0.9.8
Comment 10•23 years ago
|
||
Works for me on WINNT, build 2001111903.
Fails on Linux. Looks like it's an issue with clipping images on Linux.
OS: All → Linux
Hardware: All → PC
| Reporter | ||
Comment 11•23 years ago
|
||
The behaviours need to be clipped off as well as the images. I have no Windows
to test whether images only are clipped.
Updated•23 years ago
|
Target Milestone: mozilla0.9.8 → mozilla0.9.9
Updated•23 years ago
|
Target Milestone: mozilla0.9.9 → mozilla1.0.1
Comment 12•23 years ago
|
||
Bulk moving Mozilla1.01 bugs to future-P1. I will pull from the future-P1 list
to schedule bugs for post Mozilla1.0 milestones
Priority: -- → P1
Target Milestone: mozilla1.0.1 → Future
| Reporter | ||
Comment 13•23 years ago
|
||
I retested with windows, and it's definitely only the image display that's being
clipped. Behaviours are left unclipped and also the scrollbar appears, implying
that space is being allocated for clipped off elements.
I updated the test page to http://www.mintsource.org/bugzilla btw. Cheers!
Comment 14•23 years ago
|
||
I'm definitely seeing this on current linux... I'll attempt to reduce this
unholy hell of javascript to a reasonable size...
Comment 15•23 years ago
|
||
Comment 16•23 years ago
|
||
The problem is that opaque images are being clipped fine, but images with
transparency (I use a GIF here, but PNG does the same thing) are not clipped
correctly.
In all cases, clicking outside the clip area does not trigger links.
Updated•23 years ago
|
Summary: images within absolute positioned div not clipped - z-index ordering broken → transparent images within absolute positioned div not clipped
Updated•23 years ago
|
Priority: P1 → P2
Comment 17•23 years ago
|
||
*** Bug 158615 has been marked as a duplicate of this bug. ***
Comment 18•23 years ago
|
||
This is apparently linux-only.
This bug makes using clip in mozilla somewhat painful... It looks like it just
does not work.
Keywords: pp
Comment 19•23 years ago
|
||
hmm, this will probably break some site functionality, as clipped images are
being used more and more. Can't think of a major site atm though.
Comment 20•23 years ago
|
||
Not Linux only - I have had a report that it also affects (at least) the Irix
version.
I'm surprised this bug is only marked to be fixed at some "future" date,
seeing as it will effectively prevent Mozilla from working with several DHTML
libraries and create an unholy mess at other sites using dynamic content! I
really want to support Moz with my own API (Gamelib - a library for people
wishing to write arcade games and windowing systems using javascript) but this
is a serious problem. I have worked around other problems, but this is a
sticker!
I also wonder why Netscape 6 on Linux is not affected by the bug?!
Comment 21•23 years ago
|
||
"Linux only" means "GTK port only" in this context.... (though it may be a
problem in the Xlib and QT ports too; if I find someone using them I'll ask).
Comment 22•23 years ago
|
||
tor is the image king! he can fix anything!
Comment 23•23 years ago
|
||
The test page http://www.mintsource.org/bugzilla looks OK to me (3 images
in view) using Mozilla 1.1b (Build ID 2002072104), Win95. When I hit the
scroll_left or scroll_right button, scrolling and clipping happens.
Glenn
Comment 24•23 years ago
|
||
Yeah, that's because it affects the *nix versions, not Windows. See the
comments a few inches above your last one.
*** Bug 62543 has been marked as a duplicate of this bug. ***
This is not a views bug. This is an image bug. nsImageGTK simply ignores
clipping when painting images with 1-bit alpha. Look here:
http://lxr.mozilla.org/seamonkey/source/gfx/src/gtk/nsImageGTK.cpp#776
You can see that the 1-bit case creates a new GC and is just ignoring any clip
region that may have been set on aContext.
Unfortunately there doesn't seem to be a way to combine a clip mask with a clip
region in GDK, so the 1-bit case will have to take another path.
Over to tor.
Assignee: kmcclusk → tor
Severity: normal → major
Status: ASSIGNED → NEW
| Assignee | ||
Comment 27•23 years ago
|
||
You need a call to FreeRects in there.
| Assignee | ||
Comment 29•23 years ago
|
||
Attachment #99582 -
Attachment is obsolete: true
Attachment #99697 -
Flags: superreview+
Comment on attachment 99697 [details] [diff] [review]
plug memory leak
sr=roc+moz
Comment 31•23 years ago
|
||
Comment on attachment 99697 [details] [diff] [review]
plug memory leak
r=pavlov
Attachment #99697 -
Flags: review+
| Assignee | ||
Comment 32•23 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 33•23 years ago
|
||
Verified fixed, linux/gtkfe. Testcases work fine.
Status: RESOLVED → VERIFIED
Updated•7 years ago
|
Component: Layout: View Rendering → Layout: Web Painting
You need to log in
before you can comment on or make changes to this bug.
Description
•