Closed
Bug 374297
Opened 18 years ago
Closed 17 years ago
[FIX]"Wrong parent style context" involving table pseudo frames
Categories
(Core :: CSS Parsing and Computation, defect, P1)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla1.9beta1
People
(Reporter: MatsPalmgren_bugz, Assigned: bzbarsky)
References
Details
(Keywords: testcase)
Attachments
(4 files)
1.69 KB,
text/html
|
Details | |
367 bytes,
text/html
|
Details | |
366 bytes,
text/html
|
Details | |
4.19 KB,
patch
|
dbaron
:
review+
dbaron
:
superreview+
dbaron
:
approval1.9+
|
Details | Diff | Splinter Review |
"Wrong parent style context" involving table pseudo frames
I don't know if it's the VerifyContextParent() code
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/layout/base/nsFrameManager.cpp&rev=1.244&root=/cvsroot&mark=805#804
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/layout/generic/nsFrame.cpp&rev=3.712&root=/cvsroot&mark=5479-5485#5461
that is wrong or if it's the frame constructor that needs to resolve the style
using GetParentStyleContextFrame() rather than GetParent(), or something else...
What is the correct style context tree for these frames?
![]() |
Assignee | |
Comment 1•18 years ago
|
||
Mats, do you have a testcase that gives you that frame tree? I wonder whether bug 323656 helps here.
Depends on: 323656
Reporter | ||
Comment 2•18 years ago
|
||
The testcases in bug 307992 and other tests of that nature does this a lot.
![]() |
Assignee | |
Comment 3•18 years ago
|
||
Yeah, the patch in bug 323656 fixes the ones in that bug.
![]() |
Assignee | |
Comment 4•18 years ago
|
||
Now that bug bug 323656 is fixed, is this still a problem?
Reporter | ||
Comment 5•18 years ago
|
||
frame: Table(table)(0) (0x165e9a8) style: 0x165e868 {}
Wrong parent style context: style: 0x165a408 {}
should be using: style: 0x165a6c8 :-moz-cell-content {}
![]() |
Assignee | |
Comment 6•18 years ago
|
||
Ah, indeed. The patch for bug 323656 missed a case. Filed bug 377603 on that.
![]() |
Assignee | |
Comment 7•18 years ago
|
||
OK. That should be better, I hope! Any other cases?
Reporter | ||
Comment 8•18 years ago
|
||
frame: TableCell(th)(0) (0x157cc48) style: 0x157ca98 {}
Wrong parent style context: style: 0x157c5b0 {}
should be using: style: 0x1581228 {}
![]() |
Assignee | |
Comment 9•18 years ago
|
||
Ah, that case is interesting.
We resolve style on the <table> first. This recurses down to the table cell, we resolve style on that, discover that it needs a reframe, do NOT set the new style context on it (because we need the old one to properly tear down the frame) and bail out.
Then we process our restyled frames (of which we have two: te table and the th). The table is processed first, so we mark it as needing reflow, then verify the style tree. At this point the table cell still has the "wrong" (old) style context.
Maybe we should just verify the style tree starting at the "rootmost" of the frames we process in one processing loop?
In any case, that all doesn't depend on table pseudos; there aren't any table pseudos in this case, in fact.
QA Contact: ian → style-system
Comment 10•18 years ago
|
||
This seems to be the last known "Wrong parent style context" bug. Once it's fixed, I can easily determine whether there are other ways to hit "Wrong parent style context" :)
![]() |
Assignee | |
Comment 11•18 years ago
|
||
This is actually a case of the warning being wrong, basically... We're verifying an invariant at a time when there's no reason it should hold. :(
![]() |
Assignee | |
Comment 12•17 years ago
|
||
This is the last case I know of where we get these warnings incorrectly, so I turned them into asserts. This patch fixes this bug and bug 382204.
The asserts will fire on the testcase in bug 396645, but that's the only case I know of where they will fire.
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #281549 -
Flags: superreview?(dbaron)
Attachment #281549 -
Flags: review?(dbaron)
![]() |
Assignee | |
Updated•17 years ago
|
OS: Linux → All
Priority: -- → P1
Hardware: PC → All
Summary: "Wrong parent style context" involving table pseudo frames → [FIX]"Wrong parent style context" involving table pseudo frames
Target Milestone: --- → mozilla1.9 M9
Comment on attachment 281549 [details] [diff] [review]
Like so
r+sr+a1.9=dbaron. Sorry for the delay.
Attachment #281549 -
Flags: superreview?(dbaron)
Attachment #281549 -
Flags: superreview+
Attachment #281549 -
Flags: review?(dbaron)
Attachment #281549 -
Flags: review+
Attachment #281549 -
Flags: approval1.9+
![]() |
Assignee | |
Comment 14•17 years ago
|
||
Fixed.
Would be nice to add the testcases (which would assert if they were still failing, now) to whatever bug 397725 decides on.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Comment 15•17 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.
Description
•