Bug 212366. Make nsFrameInnerFrame be a moz-anonymous-box pseudoelement. This stops style on an IFRAME from being applied to both the outerframe and the innerframe. r+sr=dbaron

This commit is contained in:
uid502 2003-11-01 01:34:06 +00:00
parent 3c577e40d2
commit 2de14973bc
2 changed files with 8 additions and 6 deletions

View File

@ -94,6 +94,7 @@
#include "nsIRenderingContext.h"
#include "nsIFrameFrame.h"
#include "nsAutoPtr.h"
#include "nsCSSAnonBoxes.h"
// For Accessibility
#ifdef ACCESSIBILITY
@ -409,9 +410,9 @@ nsHTMLFrameOuterFrame::Init(nsIPresContext* aPresContext,
mFrames.SetFrames(firstChild);
// Resolve the style context for the inner frame
nsresult rv = NS_OK;
nsRefPtr<nsStyleContext> innerStyleContext;
innerStyleContext = aPresContext->ResolveStyleContextFor(mContent,
mStyleContext);
nsRefPtr<nsStyleContext> innerStyleContext
= aPresContext->ResolvePseudoStyleContextFor(aContent,
nsCSSAnonBoxes::mozAnonymousBlock, mStyleContext);
rv = firstChild->Init(aPresContext, mContent, this, innerStyleContext, nsnull);
if (NS_FAILED(rv)){
NS_WARNING( "Error initializing InnerFrame in nsHTMLFrameOuterFrame");

View File

@ -94,6 +94,7 @@
#include "nsIRenderingContext.h"
#include "nsIFrameFrame.h"
#include "nsAutoPtr.h"
#include "nsCSSAnonBoxes.h"
// For Accessibility
#ifdef ACCESSIBILITY
@ -409,9 +410,9 @@ nsHTMLFrameOuterFrame::Init(nsIPresContext* aPresContext,
mFrames.SetFrames(firstChild);
// Resolve the style context for the inner frame
nsresult rv = NS_OK;
nsRefPtr<nsStyleContext> innerStyleContext;
innerStyleContext = aPresContext->ResolveStyleContextFor(mContent,
mStyleContext);
nsRefPtr<nsStyleContext> innerStyleContext
= aPresContext->ResolvePseudoStyleContextFor(aContent,
nsCSSAnonBoxes::mozAnonymousBlock, mStyleContext);
rv = firstChild->Init(aPresContext, mContent, this, innerStyleContext, nsnull);
if (NS_FAILED(rv)){
NS_WARNING( "Error initializing InnerFrame in nsHTMLFrameOuterFrame");