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?
Yes. Is that a problem?
Currently, I do that that way:
nsCSSPseudoElements::Type pseudoType = nsCSSPseudoElements::ePseudo_mozProgressBar;
nsIFrame* barFrame = mBarDiv->GetPrimaryFrame();
newStyleContext = barFrame->PresContext()->StyleSet()->
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.
In CreateAnonymousContent, mBarDiv->GetPrimaryFrame() is null.
But shouldn't barFrame->GetParent() just be |this| above?
(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?
|PresContext()->StyleSet()|. |this| has the same prescontext as barFrame would!
Created attachment 531068 [details] [diff] [review]
r=bz (over IRC)
Backed out in http://hg.mozilla.org/mozilla-central/rev/dd9ba28d2bd9 to resolve bug 655860.
The regression wasn't caused by these patches. Re-landed: