Work in progress on absolutely positioned elements
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
#include "nsHTMLAtoms.h"
|
#include "nsHTMLAtoms.h"
|
||||||
#include "nsHTMLValue.h"
|
#include "nsHTMLValue.h"
|
||||||
#include "nsIHTMLContent.h"
|
#include "nsIHTMLContent.h"
|
||||||
|
#include "nsAbsoluteFrame.h"
|
||||||
#include "nsIPtr.h"
|
#include "nsIPtr.h"
|
||||||
|
|
||||||
#ifdef NS_DEBUG
|
#ifdef NS_DEBUG
|
||||||
@@ -1294,8 +1295,11 @@ nsBlockFrame::ReflowAppendedChildren(nsIPresContext* aCX,
|
|||||||
nsIStyleContextPtr kidSC = aCX->ResolveStyleContextFor(kid, this);
|
nsIStyleContextPtr kidSC = aCX->ResolveStyleContextFor(kid, this);
|
||||||
nsStyleMolecule* kidMol = (nsStyleMolecule*)kidSC->GetData(kStyleMoleculeSID);
|
nsStyleMolecule* kidMol = (nsStyleMolecule*)kidSC->GetData(kStyleMoleculeSID);
|
||||||
|
|
||||||
// Is it a floater?
|
// Check whether it wants to floated or absolutely positioned
|
||||||
if (kidMol->floats != NS_STYLE_FLOAT_NONE) {
|
if (NS_STYLE_POSITION_ABSOLUTE == kidMol->positionFlags) {
|
||||||
|
AbsoluteFrame::NewFrame(&kidFrame, kid, kidIndex, this);
|
||||||
|
kidFrame->SetStyleContext(kidSC);
|
||||||
|
} else if (kidMol->floats != NS_STYLE_FLOAT_NONE) {
|
||||||
PlaceholderFrame::NewFrame(&kidFrame, kid, kidIndex, this);
|
PlaceholderFrame::NewFrame(&kidFrame, kid, kidIndex, this);
|
||||||
kidFrame->SetStyleContext(kidSC);
|
kidFrame->SetStyleContext(kidSC);
|
||||||
} else if (nsnull == kidPrevInFlow) {
|
} else if (nsnull == kidPrevInFlow) {
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#include "nsHTMLAtoms.h"
|
#include "nsHTMLAtoms.h"
|
||||||
#include "nsHTMLValue.h"
|
#include "nsHTMLValue.h"
|
||||||
#include "nsIHTMLContent.h"
|
#include "nsIHTMLContent.h"
|
||||||
|
#include "nsAbsoluteFrame.h"
|
||||||
#include "nsIPtr.h"
|
#include "nsIPtr.h"
|
||||||
|
|
||||||
#ifdef NS_DEBUG
|
#ifdef NS_DEBUG
|
||||||
@@ -1294,8 +1295,11 @@ nsBlockFrame::ReflowAppendedChildren(nsIPresContext* aCX,
|
|||||||
nsIStyleContextPtr kidSC = aCX->ResolveStyleContextFor(kid, this);
|
nsIStyleContextPtr kidSC = aCX->ResolveStyleContextFor(kid, this);
|
||||||
nsStyleMolecule* kidMol = (nsStyleMolecule*)kidSC->GetData(kStyleMoleculeSID);
|
nsStyleMolecule* kidMol = (nsStyleMolecule*)kidSC->GetData(kStyleMoleculeSID);
|
||||||
|
|
||||||
// Is it a floater?
|
// Check whether it wants to floated or absolutely positioned
|
||||||
if (kidMol->floats != NS_STYLE_FLOAT_NONE) {
|
if (NS_STYLE_POSITION_ABSOLUTE == kidMol->positionFlags) {
|
||||||
|
AbsoluteFrame::NewFrame(&kidFrame, kid, kidIndex, this);
|
||||||
|
kidFrame->SetStyleContext(kidSC);
|
||||||
|
} else if (kidMol->floats != NS_STYLE_FLOAT_NONE) {
|
||||||
PlaceholderFrame::NewFrame(&kidFrame, kid, kidIndex, this);
|
PlaceholderFrame::NewFrame(&kidFrame, kid, kidIndex, this);
|
||||||
kidFrame->SetStyleContext(kidSC);
|
kidFrame->SetStyleContext(kidSC);
|
||||||
} else if (nsnull == kidPrevInFlow) {
|
} else if (nsnull == kidPrevInFlow) {
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#include "nsHTMLAtoms.h"
|
#include "nsHTMLAtoms.h"
|
||||||
#include "nsHTMLValue.h"
|
#include "nsHTMLValue.h"
|
||||||
#include "nsIHTMLContent.h"
|
#include "nsIHTMLContent.h"
|
||||||
|
#include "nsAbsoluteFrame.h"
|
||||||
#include "nsIPtr.h"
|
#include "nsIPtr.h"
|
||||||
|
|
||||||
#ifdef NS_DEBUG
|
#ifdef NS_DEBUG
|
||||||
@@ -1294,8 +1295,11 @@ nsBlockFrame::ReflowAppendedChildren(nsIPresContext* aCX,
|
|||||||
nsIStyleContextPtr kidSC = aCX->ResolveStyleContextFor(kid, this);
|
nsIStyleContextPtr kidSC = aCX->ResolveStyleContextFor(kid, this);
|
||||||
nsStyleMolecule* kidMol = (nsStyleMolecule*)kidSC->GetData(kStyleMoleculeSID);
|
nsStyleMolecule* kidMol = (nsStyleMolecule*)kidSC->GetData(kStyleMoleculeSID);
|
||||||
|
|
||||||
// Is it a floater?
|
// Check whether it wants to floated or absolutely positioned
|
||||||
if (kidMol->floats != NS_STYLE_FLOAT_NONE) {
|
if (NS_STYLE_POSITION_ABSOLUTE == kidMol->positionFlags) {
|
||||||
|
AbsoluteFrame::NewFrame(&kidFrame, kid, kidIndex, this);
|
||||||
|
kidFrame->SetStyleContext(kidSC);
|
||||||
|
} else if (kidMol->floats != NS_STYLE_FLOAT_NONE) {
|
||||||
PlaceholderFrame::NewFrame(&kidFrame, kid, kidIndex, this);
|
PlaceholderFrame::NewFrame(&kidFrame, kid, kidIndex, this);
|
||||||
kidFrame->SetStyleContext(kidSC);
|
kidFrame->SetStyleContext(kidSC);
|
||||||
} else if (nsnull == kidPrevInFlow) {
|
} else if (nsnull == kidPrevInFlow) {
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ REQUIRES=xpcom raptor
|
|||||||
DEFINES=-D_IMPL_NS_HTML
|
DEFINES=-D_IMPL_NS_HTML
|
||||||
|
|
||||||
CPPSRCS= \
|
CPPSRCS= \
|
||||||
|
nsAbsoluteFrame.cpp \
|
||||||
nsBRPart.cpp \
|
nsBRPart.cpp \
|
||||||
nsBlockFrame.cpp \
|
nsBlockFrame.cpp \
|
||||||
nsBodyFrame.cpp \
|
nsBodyFrame.cpp \
|
||||||
@@ -54,6 +55,7 @@ CPPSRCS= \
|
|||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
CPP_OBJS= \
|
CPP_OBJS= \
|
||||||
|
.\$(OBJDIR)\nsAbsoluteFrame.obj \
|
||||||
.\$(OBJDIR)\nsBRPart.obj \
|
.\$(OBJDIR)\nsBRPart.obj \
|
||||||
.\$(OBJDIR)\nsBlockFrame.obj \
|
.\$(OBJDIR)\nsBlockFrame.obj \
|
||||||
.\$(OBJDIR)\nsBodyFrame.obj \
|
.\$(OBJDIR)\nsBodyFrame.obj \
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#include "nsHTMLAtoms.h"
|
#include "nsHTMLAtoms.h"
|
||||||
#include "nsHTMLValue.h"
|
#include "nsHTMLValue.h"
|
||||||
#include "nsIHTMLContent.h"
|
#include "nsIHTMLContent.h"
|
||||||
|
#include "nsAbsoluteFrame.h"
|
||||||
#include "nsIPtr.h"
|
#include "nsIPtr.h"
|
||||||
|
|
||||||
#ifdef NS_DEBUG
|
#ifdef NS_DEBUG
|
||||||
@@ -1294,8 +1295,11 @@ nsBlockFrame::ReflowAppendedChildren(nsIPresContext* aCX,
|
|||||||
nsIStyleContextPtr kidSC = aCX->ResolveStyleContextFor(kid, this);
|
nsIStyleContextPtr kidSC = aCX->ResolveStyleContextFor(kid, this);
|
||||||
nsStyleMolecule* kidMol = (nsStyleMolecule*)kidSC->GetData(kStyleMoleculeSID);
|
nsStyleMolecule* kidMol = (nsStyleMolecule*)kidSC->GetData(kStyleMoleculeSID);
|
||||||
|
|
||||||
// Is it a floater?
|
// Check whether it wants to floated or absolutely positioned
|
||||||
if (kidMol->floats != NS_STYLE_FLOAT_NONE) {
|
if (NS_STYLE_POSITION_ABSOLUTE == kidMol->positionFlags) {
|
||||||
|
AbsoluteFrame::NewFrame(&kidFrame, kid, kidIndex, this);
|
||||||
|
kidFrame->SetStyleContext(kidSC);
|
||||||
|
} else if (kidMol->floats != NS_STYLE_FLOAT_NONE) {
|
||||||
PlaceholderFrame::NewFrame(&kidFrame, kid, kidIndex, this);
|
PlaceholderFrame::NewFrame(&kidFrame, kid, kidIndex, this);
|
||||||
kidFrame->SetStyleContext(kidSC);
|
kidFrame->SetStyleContext(kidSC);
|
||||||
} else if (nsnull == kidPrevInFlow) {
|
} else if (nsnull == kidPrevInFlow) {
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#include "nsHTMLAtoms.h"
|
#include "nsHTMLAtoms.h"
|
||||||
#include "nsHTMLValue.h"
|
#include "nsHTMLValue.h"
|
||||||
#include "nsIHTMLContent.h"
|
#include "nsIHTMLContent.h"
|
||||||
|
#include "nsAbsoluteFrame.h"
|
||||||
#include "nsIPtr.h"
|
#include "nsIPtr.h"
|
||||||
|
|
||||||
#ifdef NS_DEBUG
|
#ifdef NS_DEBUG
|
||||||
@@ -1294,8 +1295,11 @@ nsBlockFrame::ReflowAppendedChildren(nsIPresContext* aCX,
|
|||||||
nsIStyleContextPtr kidSC = aCX->ResolveStyleContextFor(kid, this);
|
nsIStyleContextPtr kidSC = aCX->ResolveStyleContextFor(kid, this);
|
||||||
nsStyleMolecule* kidMol = (nsStyleMolecule*)kidSC->GetData(kStyleMoleculeSID);
|
nsStyleMolecule* kidMol = (nsStyleMolecule*)kidSC->GetData(kStyleMoleculeSID);
|
||||||
|
|
||||||
// Is it a floater?
|
// Check whether it wants to floated or absolutely positioned
|
||||||
if (kidMol->floats != NS_STYLE_FLOAT_NONE) {
|
if (NS_STYLE_POSITION_ABSOLUTE == kidMol->positionFlags) {
|
||||||
|
AbsoluteFrame::NewFrame(&kidFrame, kid, kidIndex, this);
|
||||||
|
kidFrame->SetStyleContext(kidSC);
|
||||||
|
} else if (kidMol->floats != NS_STYLE_FLOAT_NONE) {
|
||||||
PlaceholderFrame::NewFrame(&kidFrame, kid, kidIndex, this);
|
PlaceholderFrame::NewFrame(&kidFrame, kid, kidIndex, this);
|
||||||
kidFrame->SetStyleContext(kidSC);
|
kidFrame->SetStyleContext(kidSC);
|
||||||
} else if (nsnull == kidPrevInFlow) {
|
} else if (nsnull == kidPrevInFlow) {
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
#include "nsHTMLAtoms.h"
|
#include "nsHTMLAtoms.h"
|
||||||
#include "nsHTMLValue.h"
|
#include "nsHTMLValue.h"
|
||||||
#include "nsIHTMLContent.h"
|
#include "nsIHTMLContent.h"
|
||||||
|
#include "nsAbsoluteFrame.h"
|
||||||
#include "nsIPtr.h"
|
#include "nsIPtr.h"
|
||||||
|
|
||||||
#ifdef NS_DEBUG
|
#ifdef NS_DEBUG
|
||||||
@@ -1294,8 +1295,11 @@ nsBlockFrame::ReflowAppendedChildren(nsIPresContext* aCX,
|
|||||||
nsIStyleContextPtr kidSC = aCX->ResolveStyleContextFor(kid, this);
|
nsIStyleContextPtr kidSC = aCX->ResolveStyleContextFor(kid, this);
|
||||||
nsStyleMolecule* kidMol = (nsStyleMolecule*)kidSC->GetData(kStyleMoleculeSID);
|
nsStyleMolecule* kidMol = (nsStyleMolecule*)kidSC->GetData(kStyleMoleculeSID);
|
||||||
|
|
||||||
// Is it a floater?
|
// Check whether it wants to floated or absolutely positioned
|
||||||
if (kidMol->floats != NS_STYLE_FLOAT_NONE) {
|
if (NS_STYLE_POSITION_ABSOLUTE == kidMol->positionFlags) {
|
||||||
|
AbsoluteFrame::NewFrame(&kidFrame, kid, kidIndex, this);
|
||||||
|
kidFrame->SetStyleContext(kidSC);
|
||||||
|
} else if (kidMol->floats != NS_STYLE_FLOAT_NONE) {
|
||||||
PlaceholderFrame::NewFrame(&kidFrame, kid, kidIndex, this);
|
PlaceholderFrame::NewFrame(&kidFrame, kid, kidIndex, this);
|
||||||
kidFrame->SetStyleContext(kidSC);
|
kidFrame->SetStyleContext(kidSC);
|
||||||
} else if (nsnull == kidPrevInFlow) {
|
} else if (nsnull == kidPrevInFlow) {
|
||||||
|
|||||||
Reference in New Issue
Block a user