[FIXr]"Wrong parent style context" with xul:scrollbox, display: list-item

RESOLVED FIXED in mozilla1.9alpha8

Status

()

Core
Layout
P3
minor
RESOLVED FIXED
11 years ago
10 years ago

People

(Reporter: Jesse Ruderman, Assigned: bz)

Tracking

(Blocks: 1 bug, {testcase})

Trunk
mozilla1.9alpha8
testcase
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

11 years ago
Created attachment 271337 [details]
testcase

Loading the testcase triggers:

frame: Bullet(scrollbox)(1) (0x3dba97d0) style: 0x3dac2068 :-moz-list-bullet {}
Wrong parent style context:  style: 0x3dba8d40 :-moz-scrolled-content {}
should be using:  style: 0x3dbb57bc {}
Created attachment 271631 [details] [diff] [review]
Proposed fix
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #271631 - Flags: superreview?(dbaron)
Attachment #271631 - Flags: review?(dbaron)
OS: Mac OS X → All
Priority: -- → P3
Hardware: PC → All
Summary: "Wrong parent style context" with xul:scrollbox, display: list-item → [FIX]"Wrong parent style context" with xul:scrollbox, display: list-item
Target Milestone: --- → mozilla1.9beta2
Comment on attachment 271631 [details] [diff] [review]
Proposed fix

This patch makes sense, but I'm wondering if CorrectStyleParentFrame is doing the right thing here...
I think so... it's parenting pseudo-element frames to the nearest non-anonymous-box ancestor.  I think that's what we want to be doing.  In particular, for a scrollable list-item it's parenting to the scrollframe (which is the frame that actually has the styles for the node) instead of what we used to be doing, which was parenting to the anonymous blockframe inside the scrollframe.
Comment on attachment 271631 [details] [diff] [review]
Proposed fix

Ah, right, :-moz-list-bullet is a pseudoelement, not an anonbox.

r+sr=dbaron
Attachment #271631 - Flags: superreview?(dbaron)
Attachment #271631 - Flags: superreview+
Attachment #271631 - Flags: review?(dbaron)
Attachment #271631 - Flags: review+
Summary: [FIX]"Wrong parent style context" with xul:scrollbox, display: list-item → [FIXr]"Wrong parent style context" with xul:scrollbox, display: list-item
Comment on attachment 271631 [details] [diff] [review]
Proposed fix

Give bullets on scrollable list items the right style context parent.  Shouldn't have any effect on rendering, really, but will prevent our internal style context tree integrity checks from failing.
Attachment #271631 - Flags: approval1.9?
Comment on attachment 271631 [details] [diff] [review]
Proposed fix

a19=dbaron
Attachment #271631 - Flags: approval1.9? → approval1.9+
Fixed.
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: mozilla1.9 M9 → mozilla1.9 M8
(Reporter)

Comment 8

10 years ago
Crashtest checked in.  "Wrong parent style context" is now an assertion, so once assertions turn Tinderbox orange, this will be properly regression-tested.
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.