Support style changes for leaf frames

This commit is contained in:
kipp%netscape.com 1998-09-25 16:33:38 +00:00
Родитель 6fdfd094d8
Коммит 1c24cf2f69
4 изменённых файлов: 42 добавлений и 6 удалений

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

@ -16,10 +16,12 @@
* Reserved.
*/
#include "nsLeafFrame.h"
#include "nsIStyleContext.h"
#include "nsHTMLContainerFrame.h"
#include "nsCSSRendering.h"
#include "nsHTMLParts.h"
#include "nsHTMLAtoms.h"
#include "nsIPresShell.h"
#include "nsIStyleContext.h"
nsLeafFrame::nsLeafFrame(nsIContent* aContent, nsIFrame* aParentFrame)
: nsFrame(aContent, aParentFrame)
@ -121,3 +123,15 @@ NS_METHOD nsLeafFrame::ContentChanged(nsIPresShell* aShell,
return result;
}
NS_IMETHODIMP
nsLeafFrame::AttributeChanged(nsIPresShell* aShell,
nsIPresContext* aPresContext,
nsIContent* aChild,
nsIAtom* aAttribute)
{
if (nsHTMLAtoms::style == aAttribute) {
nsHTMLContainerFrame::ApplyStyleChangeToTree(*aPresContext, this);
nsHTMLContainerFrame::StyleChangeReflow(*aPresContext, this);
}
return NS_OK;
}

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

@ -28,19 +28,23 @@
*/
class nsLeafFrame : public nsFrame {
public:
// nsIFrame replacements
NS_IMETHOD Paint(nsIPresContext& aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect);
NS_IMETHOD Reflow(nsIPresContext& aPresContext,
nsReflowMetrics& aDesiredSize,
const nsReflowState& aReflowState,
nsReflowStatus& aStatus);
NS_IMETHOD ContentChanged(nsIPresShell* aShell,
nsIPresContext* aPresContext,
nsIContent* aChild,
nsISupports* aSubContent);
NS_IMETHOD AttributeChanged(nsIPresShell* aShell,
nsIPresContext* aPresContext,
nsIContent* aChild,
nsIAtom* aAttribute);
protected:
nsLeafFrame(nsIContent* aContent, nsIFrame* aParentFrame);

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

@ -16,10 +16,12 @@
* Reserved.
*/
#include "nsLeafFrame.h"
#include "nsIStyleContext.h"
#include "nsHTMLContainerFrame.h"
#include "nsCSSRendering.h"
#include "nsHTMLParts.h"
#include "nsHTMLAtoms.h"
#include "nsIPresShell.h"
#include "nsIStyleContext.h"
nsLeafFrame::nsLeafFrame(nsIContent* aContent, nsIFrame* aParentFrame)
: nsFrame(aContent, aParentFrame)
@ -121,3 +123,15 @@ NS_METHOD nsLeafFrame::ContentChanged(nsIPresShell* aShell,
return result;
}
NS_IMETHODIMP
nsLeafFrame::AttributeChanged(nsIPresShell* aShell,
nsIPresContext* aPresContext,
nsIContent* aChild,
nsIAtom* aAttribute)
{
if (nsHTMLAtoms::style == aAttribute) {
nsHTMLContainerFrame::ApplyStyleChangeToTree(*aPresContext, this);
nsHTMLContainerFrame::StyleChangeReflow(*aPresContext, this);
}
return NS_OK;
}

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

@ -28,19 +28,23 @@
*/
class nsLeafFrame : public nsFrame {
public:
// nsIFrame replacements
NS_IMETHOD Paint(nsIPresContext& aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect);
NS_IMETHOD Reflow(nsIPresContext& aPresContext,
nsReflowMetrics& aDesiredSize,
const nsReflowState& aReflowState,
nsReflowStatus& aStatus);
NS_IMETHOD ContentChanged(nsIPresShell* aShell,
nsIPresContext* aPresContext,
nsIContent* aChild,
nsISupports* aSubContent);
NS_IMETHOD AttributeChanged(nsIPresShell* aShell,
nsIPresContext* aPresContext,
nsIContent* aChild,
nsIAtom* aAttribute);
protected:
nsLeafFrame(nsIContent* aContent, nsIFrame* aParentFrame);