Change the way we determine the style context parent frame to skip css anonboxes unless we're determining the style context parent for something that isitself a css anon box (and is not a non-element frame). Fixes bug 323656(which is where the patch is), bug 85872, bug 280610. As far as I can tell,also fixes bug 317876, bug 372376, bug 374297. r+sr=dbaron
This commit is contained in:
@@ -6654,17 +6654,12 @@ already_AddRefed<nsStyleContext>
|
||||
nsCSSFrameConstructor::ResolveStyleContext(nsIFrame* aParentFrame,
|
||||
nsIContent* aContent)
|
||||
{
|
||||
aParentFrame = nsFrame::CorrectStyleParentFrame(aParentFrame, nsnull);
|
||||
|
||||
// Resolve the style context based on the content object and the parent
|
||||
// style context
|
||||
nsStyleContext* parentStyleContext = aParentFrame->GetStyleContext();
|
||||
|
||||
// skip past any parents that are scrolled-content. We want to inherit directly
|
||||
// from the outer scroll frame.
|
||||
while (parentStyleContext && parentStyleContext->GetPseudoType() ==
|
||||
nsCSSAnonBoxes::scrolledContent) {
|
||||
parentStyleContext = parentStyleContext->GetParent();
|
||||
}
|
||||
|
||||
nsStyleSet *styleSet = mPresShell->StyleSet();
|
||||
|
||||
if (aContent->IsNodeOfType(nsINode::eELEMENT)) {
|
||||
@@ -11216,7 +11211,10 @@ nsCSSFrameConstructor::ProcessChildren(nsFrameConstructorState& aState,
|
||||
// XXXbz ideally, this would do all the pushing of various
|
||||
// containing blocks as needed, so callers don't have to do it...
|
||||
nsresult rv = NS_OK;
|
||||
nsStyleContext* styleContext = aFrame->GetStyleContext();
|
||||
// :before/:after content should have the same style context parent
|
||||
// as normal kids.
|
||||
nsStyleContext* styleContext =
|
||||
nsFrame::CorrectStyleParentFrame(aFrame, nsnull)->GetStyleContext();
|
||||
|
||||
if (aCanHaveGeneratedContent) {
|
||||
// Probe for generated content before
|
||||
|
||||
Reference in New Issue
Block a user