Closed Bug 36811 Opened 25 years ago Closed 25 years ago

CSS background does not tile properly

Categories

(Core Graveyard :: GFX, defect, P3)

x86
Linux
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: tarnar, Assigned: attinasi)

References

()

Details

(Whiteboard: beta+ (landing by 5/10/00))

From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.14 i686; en-US; m16) Gecko/20000421 BuildID: 2000042113 The page is supposed to show a tiled image with a semi-transparent image above it. Mozilla renders the tiled image once, but doesn't actually tile it out. Also, if you scroll down so the tiled pace is out of sight, then back, it renders correctly. Page again: http://www.w3.org/Graphics/PNG/inline-alpha.html Reproducible: Always Steps to Reproduce: 1.Go to the page in question 2.Observe the non-tiled image 3.Scroll the page down, then back up so the grey area goes out of sight, then back into sight
Confirmed on Linux build 2000.04.21.13. Background image tiles erratically, expose event fixes it. -> Rendering
Assignee: troy → kmcclusk
Status: UNCONFIRMED → NEW
Component: Layout → Compositor
Ever confirmed: true
Don, I think this is a dup of one your existing tile bugs.
Assignee: kmcclusk → dcone
This is because for the initial update event.. the image is not loaded. The paint system thinks the background is validated..but it has not been loaded yet. When the event comes through that the image is loaded.. only the rect of the image is invalidated.. and then painted. If you invalidate the entire window after that..everything will be draw. Mark.. do you have a bug to dup this to.. do we know who will fix this...
Assignee: dcone → attinasi
I have not entered this bug yet, so we might as well use this one to track it. I'm not sure either whot this goes to... It is probably a CSS problem because it is in CSSRendering, however the rendering in there is definitely shared. I suggest we leave it in my queue and fix it post-haste - this is a nasty problem for a large number of pages. Marking M16 beta+
Status: NEW → ASSIGNED
Whiteboard: beta+
Target Milestone: --- → M16
Two problems here: 1) the nsFrameImageLoader has a method (Notify) that takes care of invalidating the correct area when an asynch image load completes. The problem is that the method only invalidates the size of the image (if the size is known), so when the image is *tiled* the invalidated region is only the size of a single tile. 2) nsCSSRendering::PaintBackground is passing the frame being rendered to the image loader. This is not sufficient when the frame being rendered is the BODY or HTML frame, because we need to invalidate the CANVAS frame in those cases. To fix problem 1 we change the nsFrameImageLoader::DamageRepairFrames to invalidate the frame's bounds, not just the image size. For problem 2 we need to work harder: the frame passed to the image loader needs to be swapped to the canvas frame when the frame being rendered is the HTML or BODY frame - this we can lookup by tags. I have straight-forward fixes for these now, and it works fine. The proper solution is more involved still and involves an interface change on nsIFrame. Basically, the method nsFrameImageLoader::DamageRepairFrames should call into the frame and let it invalidate itself as it sees fit. It should pass the size of the image if it knows it, so in many cases that is all that gets invalidated, however if the frame wants to do something different it can encapsulate that behavior. This approach will come post-release; the code will be so documented.
Whiteboard: beta+ → beta+ (landing by 5/10/00)
Fix checked in. Files Changed: nsCSSRendering.cpp, nsFrameImageLoader.cpp
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fixed in the July 14th build.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.