Closed
Bug 217225
Opened 21 years ago
Closed 21 years ago
[FIX]"Wrong parent style context"
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla1.6beta
People
(Reporter: Biesinger, Assigned: bzbarsky)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
716 bytes,
text/html
|
Details | |
9.31 KB,
patch
|
dbaron
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
frame: Text(0) (0x88c0000) style: 0x88bffd4 :-moz-non-element {} Wrong parent style context: style: 0x88bfd20 {} should be using: style: 0x88bff2c :-moz-button-content {} I'll attach the document that leads to the above warning
Reporter | ||
Comment 1•21 years ago
|
||
Assignee | ||
Comment 2•21 years ago
|
||
Is this the minimal testcase that produces this bug? Chances are, ReParentStyleContext is having issues here....
Assignee | ||
Comment 3•21 years ago
|
||
The basic problem is that ReParentStyleContext verifies the style tree both before and after changing the frame's style context. Now the code in nsHTMLButtonControlFrame::SetInitialChildList first sets the new parent on the child frame, then calls ReParentStyleContext. So the verification before reparenting fails, since the frame's parent's style context is not in fact the parent of the frame's style context (since the parent has already been changed). If I move the SetParent() call to after ReParentStyleContext, then the check _after_ the reparenting fails, since the style context now has the new parent's style context as a parent, but the new parent has not been set on the frame yet. On the other hand, VerifyStyleTree (in nsFrameManager.cpp) has a slight problem -- it never uses aParentContext. Passing that as the last arg to that first VerifyContextParent call makes all the warnings go away _if_ I reparent before calling SetParent (since the check after reparenting passes a non-null aParentContext to VerifyStyleTree). So what I think we should do is: 1) Change VerifyStyleTree to pass through aParentStyleContext to VerifyContextParent 2a) Document that the frame's position in the frame tree should be changed _after_ reparenting its style context. or 2b) Skip the integrity check at the beginning of ReParentStyleContext.
Assignee | ||
Updated•21 years ago
|
Assignee | ||
Comment 4•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
Attachment #134948 -
Flags: superreview?(dbaron)
Attachment #134948 -
Flags: review?(dbaron)
Assignee | ||
Comment 5•21 years ago
|
||
Taking
Assignee: dbaron → bz-vacation
Priority: -- → P3
Summary: "Wrong parent style context" → [FIX]"Wrong parent style context"
Target Milestone: --- → mozilla1.6beta
Comment on attachment 134948 [details] [diff] [review] Proposed patch r+sr=dbaron if you run the first-letter and perhaps first-line tests in the CSS1 test suite (and maybe others).
Attachment #134948 -
Flags: superreview?(dbaron)
Attachment #134948 -
Flags: superreview+
Attachment #134948 -
Flags: review?(dbaron)
Attachment #134948 -
Flags: review+
Assignee | ||
Comment 7•21 years ago
|
||
Ran such tests, and the results were good (nothing broken). Checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
*** Bug 133785 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•