Closed
Bug 654990
Opened 14 years ago
Closed 14 years ago
Don't use SetInitialChildList to specify the style context of the progress bar anonymous child
Categories
(Core :: Layout: Form Controls, defect)
Core
Layout: Form Controls
Tracking
()
RESOLVED
FIXED
mozilla6
People
(Reporter: mounir, Assigned: mounir)
References
Details
Attachments
(1 file)
(deleted),
patch
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•14 years ago
|
||
Boris, I believe I have to pass the style context of the anonymous child to AppendElements in ::CreateAnonymousContent, right? Do I have to resolve the style in ::CreateAnonymousContent?
Comment 2•14 years ago
|
||
Yes. Is that a problem?
Assignee | ||
Comment 3•14 years ago
|
||
Currently, I do that that way:
nsCSSPseudoElements::Type pseudoType = nsCSSPseudoElements::ePseudo_mozProgressBar;
nsRefPtr<nsStyleContext> newStyleContext;
nsIFrame* barFrame = mBarDiv->GetPrimaryFrame();
newStyleContext = barFrame->PresContext()->StyleSet()->
ResolvePseudoElementStyle(mContent->AsElement(), pseudoType,
barFrame->GetParent()->GetStyleContext());
When moving this code to ::CreateAnonymousContent I got a crash that let me think barFrame's parent isn't initialized yet. Given that mBarDiv is freshly created, I was wondering if the parent's frame wasn't set later.
Comment 4•14 years ago
|
||
In CreateAnonymousContent, mBarDiv->GetPrimaryFrame() is null.
But shouldn't barFrame->GetParent() just be |this| above?
Assignee | ||
Comment 5•14 years ago
|
||
(In reply to comment #4)
> In CreateAnonymousContent, mBarDiv->GetPrimaryFrame() is null.
>
> But shouldn't barFrame->GetParent() just be |this| above?
Should be, yes. I was just over cautious. Though, how can I do |barFrame->PresContext()->StyleSet()->| now?
Comment 6•14 years ago
|
||
|PresContext()->StyleSet()|. |this| has the same prescontext as barFrame would!
Assignee | ||
Comment 7•14 years ago
|
||
r=bz (over IRC)
Assignee: nobody → mounir.lamouri
Status: NEW → ASSIGNED
Assignee | ||
Comment 8•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla6
Comment 9•14 years ago
|
||
Backed out in http://hg.mozilla.org/mozilla-central/rev/dd9ba28d2bd9 to resolve bug 655860.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 10•14 years ago
|
||
The regression wasn't caused by these patches. Re-landed:
http://hg.mozilla.org/mozilla-central/rev/8d378453a8ac
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•