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
Родитель 929da51150
Коммит e07dc7ad7e
2 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -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");

Просмотреть файл

@ -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");