Closed Bug 571281 Opened 14 years ago Closed 14 years ago

inside list marker not drawn if list-item has overflow other than visible

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a5

People

(Reporter: crazy-daniel, Assigned: bzbarsky)

References

Details

(Keywords: css2, regression)

Attachments

(2 files, 1 obsolete file)

Attached file simple testcase
If I set overflow of a list-item to anything except 'visible', the marker box is never rendered.

Note that this bug is about overflow applied to list items, not on list item containers like ul or ol where we have enough bugs about.

In the case of list-style-position: outside, the marker has apparently never been rendered in Gecko history.
In the case of list-style-position: inside, there is a regression.

I don't have a smaller range for that than Firefox 3.0 worked, 3.6 up to current nightlies don't work.

Currently CSS 2.1 defines

> 'overflow' on the element does not clip the marker box.

See http://www.w3.org/TR/CSS2/generate.html#propdef-list-style-position
We're not even creating the bullet frame in those cases (which is why the "inside" case is broken too).
OK, that regressed when we stopped inheriting the display:list-item into the scrolledframe in bug 456484.
Blocks: 456484
Attached patch Fix the regression (obsolete) — Splinter Review
I'm really not sure how to make the scrollframe not clip the bullet (or how that would even behave... when scrolling presumably the bullet would need to be _outside_ the scrollframe?).  We should spin that off into a separate bug.
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #450441 - Flags: review?(roc)
Though I should note that neither webkit nor presto implement the outside bullet behavior, so either it's a recent spec change or it's seriously at risk.
(In reply to comment #4)
> Though I should note that neither webkit nor presto implement the outside
> bullet behavior, so either it's a recent spec change or it's seriously at risk.

The definition was added between the 19 July 2007 and 23 April 2009 CRs.

IE doesn't implement that behaviour either (I was about to file a bug over there).

However, if I got a list with a lot of content in each list-item, and I clip that using overflow, I'd still expect the bullets to render. There seems to be no other way that doesn't require additional code.
Right; I understand why the spec's proposed behavior is desirable.  It just happens to be a huge pain to implement given the other constraints the spec places on list bullets (like inheriting various properties from the list, for example!).
Yeah, I thought so..

I still think the spec shouldn't change. Else we probably cut off a path we'd like to go in the future. But for now the implementation would be low priority.

Hmm, thinking of Level 3 Lists out of interest. Can we estimate whether the implementation of a ::marker pseudo-element (or whatever it will end up with) would ease the difficulty of this problem?
Not really.  We effectively have an internal pseudo-element for the bullet already.
Comment on attachment 450441 [details] [diff] [review]
Fix the regression

Hmm, I wonder if this will fail if you have -moz-column set on the list-item? Maybe we should check the primary frame of the frame's element?
I considered that, but was worried about table pseudo stuff.  I guess that shouldn't be an issue, though....  OK, I'll do that.  And add a test for the column case (though how columns are supposed to interact with bullets... <sigh>).
> Hmm, I wonder if this will fail if you have -moz-column set on the list-item?

Yes, indeed.  I'll add a test for that.
But we can't use the primary frame, because in SetInitialChildList (which is where this code is) that's not set yet.
Attached patch Like so?Splinter Review
Attachment #450441 - Attachment is obsolete: true
Attachment #450570 - Flags: review?(roc)
Attachment #450441 - Flags: review?(roc)
Comment on attachment 450570 [details] [diff] [review]
Like so?

This works, but only because an outer table frame can't appear here (since table frames can't be NS_DISPLAY_LIST_ITEM). You might want to mention that in a comment.
Attachment #450570 - Flags: review?(roc) → review+
> You might want to mention that in a comment.

Done.
Pushed http://hg.mozilla.org/mozilla-central/rev/574993ec2aee

Filed bug 571564 on outside markers.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Summary: list marker not drawn if list-item has overflow other than visible → inside list marker not drawn if list-item has overflow other than visible
Target Milestone: --- → mozilla1.9.3a5
Depends on: 571618
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: