Closed Bug 87540 Opened 23 years ago Closed 23 years ago

last line of image not drawing

Categories

(Core :: Layout, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: tor, Assigned: tor)

References

()

Details

(Whiteboard: critical for 0.9.2; r=kmcclusk, sr=blizzard, a=asa, critical for 0.9.2)

Attachments

(1 file)

Sometimes the last line of an image isn't being drawn when it first loads, but will appear if you expose the window. The test case I use is the URL included - hit reload and eventually you'll see the last line of the actor headshot not draw. The dirty rectangle turns out to be just too small. This appears to result from the r.y-=1 in nsImageFrame::OnDataAvailable. There's a XXX comment nearby that suggests that was added because the decoders were 1-indexing the position. I've checked all the decoders and they are 0-indexing. Removing this seems to fix the problem.
r/sr=blizzard
Whiteboard: critical for 0.9.2
Whiteboard: critical for 0.9.2 → critical for 0.9.2; r=?, sr=blizzard, a=?
The offset was put in because I was seeing that JPEG's were rendering with lines missing when incrementally loaded. In the debugger on WINNT, I noticed that when the first scan line is passed to nsImageFrame::OnDataAvailable it was passed as 1 not 0 in the aRect arguments r.y. This was causing gaps in the JPEG's when loading. As a test you should try loading resource:///res/samples/test2.html and confirm that the raptor.jpg does not have any missing lines.
Hmm... I think my checkin 1.30 of nsJPEGDecoder.cpp (14-May-2001) had the side effect of shifting from one-indexing to zero-indexing. For the particular example you suggested, the update rects for raptor.jpg are: 0 0 250 48 0 48 250 112 0 160 250 10
Since your seeing 0-based values being passed to OnDataAvailable when loading the test case and I assume your not seeing any missing lines when incrementally loading images. r=kmcclusk@netscape.com
Not seeing any jpeg draw artifacts, from 100x100 thumbnails to 3000x2000+ images (courtesy of nasa). Thanks.
Whiteboard: critical for 0.9.2; r=?, sr=blizzard, a=? → critical for 0.9.2; r=kmcclusk, sr=blizzard, a=?
a= asa@mozilla.org for checkin to 0.9.2. (on behalf of drivers)
Checked into 0.9.2 branch and trunk.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Whiteboard: critical for 0.9.2; r=kmcclusk, sr=blizzard, a=? → critical for 0.9.2; r=kmcclusk, sr=blizzard, a=asa, critical for 0.9.2
Status: RESOLVED → VERIFIED
Verified on build: 2001-06-27-04-Trunk platform: Win NT The test case resource:///res/samples/test2.html loads fine.
SPAM. HTML Element component deprecated, changing component to Layout. See bug 88132 for details.
Component: HTML Element → Layout
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: