Closed Bug 187419 Opened 22 years ago Closed 20 years ago

[FIX]{inc}List item marker images draw incompletely on initial load or forced reload

Categories

(Core :: Layout: Block and Inline, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla1.7final

People

(Reporter: bugmail, Assigned: bzbarsky)

References

Details

(Keywords: testcase)

Attachments

(3 files, 1 obsolete file)

When a document accesses document.cookie and a list item has an image-type
marker, when the document is force-reloaded Mozilla does not draw the bottom row
of pixels of the image in that context, though it does completely draw the same
image in an IMG element context.

To reproduce:
1. Access the attached testcase
2. Hold shift and click Reload

Observe the list item marker image is truncated on the bottom, while the IMG
element showing the same image draws completely.

Always reproducible using FizzillaMach/2002122907. Not reproducible using
Chimera/2002123004 or Win32/2002102704.
I see this on Windows 2000 as well, using 2003010108.
Setting All/All per comment 3 (though I initially couldn't reproduce it using
Win32/2002102704 on Virtual PC 5 on Mac OS X, as I mentioned in comment 0).
OS: MacOS X → All
Hardware: Macintosh → All
cookies have nothing with this case. I could see same effect in WinXP build
20021230 on this code:

<html><head></head><body>
<ul style="list-style-image:
url('http://home.earthlink.net/~markbessey/Wedding/Diamond,%20small.png');">
<li>List item; bottom row of image does not display on shift-reload</li>
</ul>
</body></html>
Attached file Simplified testcase
given that this happens on multiple OSes, I have doubts that this is indeed a
GFX bug... the image gfx code is different on each platform, and I don't think
that it cares about reloads

I rather believe that this is a bug somewhere in the layout code that's
responsible for lists.

-> Layout for further triage, not sure which layout component this belongs in

if you can reproduce this with non-list images (ie. <img src="...">), please
change the component to image:layout
Assignee: jdunn → other
Component: Image: GFX → Layout
QA Contact: tpreston → ian
Keywords: testcase
Summary: List item marker images draw incompletely when document reads document.cookie → List item marker images draw incompletely on forced reload
Attachment #110483 - Attachment is obsolete: true
Attachment #110486 - Attachment description: Sinplyfied testcase → Simplified testcase
My testing indicates this bug was introduced between
FizzillaCFM/2002-10-30-11-trunk (which doesn't exhibit the problem) and
FizzillaCFM/2002-11-08-08-trunk (which does).
2002110208 doesn't show the problem. (I'm reasonably certain this is a trunk
build (as I'm usually pretty good with labeling my downloads), but as it from
the day after the 1.2 branch was cut (according to the roadmap), I'm not
completely confident about this and it might be from the branch as well. Any way
to check for certain?)
Reassigning to L:B&I per Hixie.
Assignee: other → block-and-inline
Component: Layout → Layout: Block & Inline
Summary: List item marker images draw incompletely on forced reload → List item marker images draw incompletely on initial load or forced reload
I seem to find that the image does not redraw at all, instead the standard
list-item-marker is drawn and resized to the size of the intended image.

Build 2003010108 WinXP
*** Bug 205457 has been marked as a duplicate of this bug. ***
*** Bug 191490 has been marked as a duplicate of this bug. ***
John Musarra, please attach a screenshot demonstrating that you are seeing
exactly the same problem on Windows as you mention in your comment 3.
John, never mind. I can reproduce this using Win32/2003050714 (1.4b) on W2K on
Virtual PC 6.

(I think comment 11 is another problem entirely.)
Blocks: 206602
Is this the same problem or should it be a new Bug?
Bottom of image is cutoff - only top 1/2 inch shows.
Complete image is downloaded from server - right mouse on image - "View Image",
displays entire image.

http://renewnyc.com/plan_des_dev/wtc_site/new_design_plans/selected_libeskind/indv_elements.asp
Re: comment 17
Just at a quick glance, your issue is not the same as this bug and it is related
to that page's style sheet.  If I disable style sheets and load your page, the
image loads fine and complete.
I've seen this in various Mozilla builds on both Windows and Linux for a while,
and I think what's going on is just that the layout doesn't adjust after the
image is loaded.

When you first load the page, if the image isn't in cache, it doesn't know how
tall the image is, and uses the default size.  After it loads the image, it just
shows as much as will fit in the space already allocated, instead of adjusting
the line or box height.

When you come back to the page, it already knows how tall the image is, so it
sets the size correctly in the first place, and the entire image appears.

I first noticed this when I had two pages using the same technique and an
overlap in which images were used as bullets.  On the second page, those images
that had appeared on the first showed up correctly, while those which were new
showed up truncated.
Summary: List item marker images draw incompletely on initial load or forced reload → {inc}List item marker images draw incompletely on initial load or forced reload
Attached patch FixSplinter Review
The problem was that some list markers set a bottom padding on the frame.  This
persisted across reflows, was taken into account when painting but not when
sizing to the image's intrinsic size.  So some of the image could get cut off
(an amount equal to the padding size).
Comment on attachment 145239 [details] [diff] [review]
Fix

David, would you review?
Attachment #145239 - Flags: superreview?(dbaron)
Attachment #145239 - Flags: review?(dbaron)
Assignee: core.layout.block-and-inline → bzbarsky
Priority: -- → P1
Summary: {inc}List item marker images draw incompletely on initial load or forced reload → [FIX]{inc}List item marker images draw incompletely on initial load or forced reload
Target Milestone: --- → mozilla1.7final
Attachment #145239 - Flags: superreview?(dbaron)
Attachment #145239 - Flags: superreview+
Attachment #145239 - Flags: review?(dbaron)
Attachment #145239 - Flags: review+
Attachment #145239 - Flags: approval1.7?
Comment on attachment 145239 [details] [diff] [review]
Fix

a=chofmann for 1.7
Attachment #145239 - Flags: approval1.7? → approval1.7+
Checked in for 1.7
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
V 20040402 PC/WinXP
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: