Closed Bug 287168 Opened 19 years ago Closed 19 years ago

CSS clip property doesn't work on Linux

Categories

(Core :: Web Painting, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: spaceman.23, Assigned: roc)

References

()

Details

Attachments

(4 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0

This is a Linux specific bug. The clip property doesn't seems to work on
elements like DIV or SPAN.


Reproducible: Always

Steps to Reproduce:
1. go to http://spaceman.23.free.fr/clipbug/clipbug.html with a linux gecko browser
2. go to the same URL with a windows gecko browser
Actual Results:  
The image is not clipped when using a linux gecko browser

Expected Results:  
The image should be cliped
Flags: blocking-aviary1.1?
Flags: blocking-aviary1.1?
Did it work before? Does it work in a recently nightly?
I tested with firefox release: 0.8, 0.9, 1.0 and mozilla 1.7.2. Someone told me
it fails on galeon too. But it works well on Windows and MacOS releases.

This CSS property probably never worked on linux gecko bowsers. 
And of course, it doesn't work on nightlies too.
Is it the clip property, or image drawing? Have you tried clipping something
other than an image?
Yes you are true: the text in the <div> is clipped. 
But the background image of the <div> is not clipped under Linux.
are you using a GTK1 or GTK2 build?
I usualy use Firefox1.0x/GTK2 but I tested with Firefox0.8/GTK1. The same bug
occurs 
what nightly build did you test with?
I tested with: 
- firefox 0.8(GTK1 &GTK2), 0.9, 1.0, 1.0.2, nigthly(Mozilla/5.0 (X11; U; Linux
i686; en-US; rv:1.8b2) Gecko/20050405) 
- mozilla 1.7.2(Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.2) Gecko/20040804)

The bug occured in all this versions. 
Attached patch fixSplinter Review
GTK image tiling code ignores the clip rect in most cases. It also
misinterprets the 'valid' out parameter of GetClipRect. This patch fixes the
issues.
Attachment #180331 - Flags: superreview?(blizzard)
Attachment #180331 - Flags: review?(tor)
Comment on attachment 180331 [details] [diff] [review]
fix

I think your change to SlowTile won't work, due to Xlib not seperating
the concept of the clip mask and rectangles, so only one can be set
(the second overrides the first).  You'll need to intersect it with
aTileRect and draw the result in the gdk_window_copy_area.

You've got some debug printfs in nsCSSRendering.cpp and
nsPresShell.cpp that should be removed.
Attachment #180331 - Flags: review?(tor) → review-
Attached patch fix #2Splinter Review
Here's the code that does what you want.
Attachment #180331 - Attachment is obsolete: true
Attachment #180432 - Flags: superreview?(blizzard)
Attachment #180432 - Flags: review?(tor)
Attachment #180331 - Attachment is obsolete: false
Attachment #180331 - Flags: superreview?(blizzard)
Attachment #180432 - Flags: review?(tor) → review+
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #180432 - Flags: superreview?(blizzard) → superreview+
Comment on attachment 180432 [details] [diff] [review]
fix #2

fixes a rather embarrassing longstanding clipping bug on Linux
Attachment #180432 - Flags: approval1.8b2?
Comment on attachment 180432 [details] [diff] [review]
fix #2

a=chofmann
Attachment #180432 - Flags: approval1.8b2? → approval1.8b2+
checked in
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
The fix for this bug has caused bug 291965.
Attached file testcase (obsolete) —
for safekeeping, here's the testcase I used.
oops, I need to fix this image
Attachment #182103 - Attachment is obsolete: true
Wow thank you for fixing this bug finally!!
Thank you, Thank you, Thank you!!
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: