mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Added new atoms to nsLayoutAtoms for additional named frame child lists
This commit is contained in:
parent
64ac3c15be
commit
7ec6a2c281
@ -33,23 +33,23 @@ public:
|
|||||||
static void AddrefAtoms();
|
static void AddrefAtoms();
|
||||||
static void ReleaseAtoms();
|
static void ReleaseAtoms();
|
||||||
|
|
||||||
// Alphabetical list of atoms
|
// Alphabetical list of media type atoms
|
||||||
static nsIAtom* all;
|
static nsIAtom* all;
|
||||||
static nsIAtom* aural;
|
static nsIAtom* aural;
|
||||||
|
|
||||||
static nsIAtom* braille;
|
static nsIAtom* braille;
|
||||||
|
|
||||||
static nsIAtom* embossed;
|
static nsIAtom* embossed;
|
||||||
|
|
||||||
static nsIAtom* handheld;
|
static nsIAtom* handheld;
|
||||||
|
|
||||||
static nsIAtom* print;
|
static nsIAtom* print;
|
||||||
static nsIAtom* projection;
|
static nsIAtom* projection;
|
||||||
|
|
||||||
static nsIAtom* screen;
|
static nsIAtom* screen;
|
||||||
|
|
||||||
static nsIAtom* tty;
|
static nsIAtom* tty;
|
||||||
static nsIAtom* tv;
|
static nsIAtom* tv;
|
||||||
|
|
||||||
|
// Alphabetical list of frame additional child list names
|
||||||
|
static nsIAtom* absoluteList;
|
||||||
|
static nsIAtom* colGroupList;
|
||||||
|
static nsIAtom* floaterList;
|
||||||
|
static nsIAtom* bulletList;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* nsLayoutAtoms_h___ */
|
#endif /* nsLayoutAtoms_h___ */
|
||||||
|
@ -30,6 +30,11 @@ nsIAtom* nsLayoutAtoms::screen;
|
|||||||
nsIAtom* nsLayoutAtoms::tty;
|
nsIAtom* nsLayoutAtoms::tty;
|
||||||
nsIAtom* nsLayoutAtoms::tv;
|
nsIAtom* nsLayoutAtoms::tv;
|
||||||
|
|
||||||
|
nsIAtom* nsLayoutAtoms::absoluteList;
|
||||||
|
nsIAtom* nsLayoutAtoms::colGroupList;
|
||||||
|
nsIAtom* nsLayoutAtoms::floaterList;
|
||||||
|
nsIAtom* nsLayoutAtoms::bulletList;
|
||||||
|
|
||||||
static nsrefcnt gRefCnt;
|
static nsrefcnt gRefCnt;
|
||||||
|
|
||||||
void nsLayoutAtoms::AddrefAtoms()
|
void nsLayoutAtoms::AddrefAtoms()
|
||||||
@ -45,6 +50,11 @@ void nsLayoutAtoms::AddrefAtoms()
|
|||||||
screen = NS_NewAtom("SCREEN");
|
screen = NS_NewAtom("SCREEN");
|
||||||
tty = NS_NewAtom("TTY");
|
tty = NS_NewAtom("TTY");
|
||||||
tv = NS_NewAtom("TV");
|
tv = NS_NewAtom("TV");
|
||||||
|
|
||||||
|
absoluteList = NS_NewAtom("Absolute-list");
|
||||||
|
colGroupList = NS_NewAtom("ColGroup-list");
|
||||||
|
floaterList = NS_NewAtom("Floater-list");
|
||||||
|
bulletList = NS_NewAtom("Bullet-list");
|
||||||
}
|
}
|
||||||
++gRefCnt;
|
++gRefCnt;
|
||||||
}
|
}
|
||||||
@ -63,6 +73,11 @@ void nsLayoutAtoms::ReleaseAtoms()
|
|||||||
NS_RELEASE(screen);
|
NS_RELEASE(screen);
|
||||||
NS_RELEASE(tty);
|
NS_RELEASE(tty);
|
||||||
NS_RELEASE(tv);
|
NS_RELEASE(tv);
|
||||||
|
|
||||||
|
NS_RELEASE(absoluteList);
|
||||||
|
NS_RELEASE(colGroupList);
|
||||||
|
NS_RELEASE(floaterList);
|
||||||
|
NS_RELEASE(bulletList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,6 +30,11 @@ nsIAtom* nsLayoutAtoms::screen;
|
|||||||
nsIAtom* nsLayoutAtoms::tty;
|
nsIAtom* nsLayoutAtoms::tty;
|
||||||
nsIAtom* nsLayoutAtoms::tv;
|
nsIAtom* nsLayoutAtoms::tv;
|
||||||
|
|
||||||
|
nsIAtom* nsLayoutAtoms::absoluteList;
|
||||||
|
nsIAtom* nsLayoutAtoms::colGroupList;
|
||||||
|
nsIAtom* nsLayoutAtoms::floaterList;
|
||||||
|
nsIAtom* nsLayoutAtoms::bulletList;
|
||||||
|
|
||||||
static nsrefcnt gRefCnt;
|
static nsrefcnt gRefCnt;
|
||||||
|
|
||||||
void nsLayoutAtoms::AddrefAtoms()
|
void nsLayoutAtoms::AddrefAtoms()
|
||||||
@ -45,6 +50,11 @@ void nsLayoutAtoms::AddrefAtoms()
|
|||||||
screen = NS_NewAtom("SCREEN");
|
screen = NS_NewAtom("SCREEN");
|
||||||
tty = NS_NewAtom("TTY");
|
tty = NS_NewAtom("TTY");
|
||||||
tv = NS_NewAtom("TV");
|
tv = NS_NewAtom("TV");
|
||||||
|
|
||||||
|
absoluteList = NS_NewAtom("Absolute-list");
|
||||||
|
colGroupList = NS_NewAtom("ColGroup-list");
|
||||||
|
floaterList = NS_NewAtom("Floater-list");
|
||||||
|
bulletList = NS_NewAtom("Bullet-list");
|
||||||
}
|
}
|
||||||
++gRefCnt;
|
++gRefCnt;
|
||||||
}
|
}
|
||||||
@ -63,6 +73,11 @@ void nsLayoutAtoms::ReleaseAtoms()
|
|||||||
NS_RELEASE(screen);
|
NS_RELEASE(screen);
|
||||||
NS_RELEASE(tty);
|
NS_RELEASE(tty);
|
||||||
NS_RELEASE(tv);
|
NS_RELEASE(tv);
|
||||||
|
|
||||||
|
NS_RELEASE(absoluteList);
|
||||||
|
NS_RELEASE(colGroupList);
|
||||||
|
NS_RELEASE(floaterList);
|
||||||
|
NS_RELEASE(bulletList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,23 +33,23 @@ public:
|
|||||||
static void AddrefAtoms();
|
static void AddrefAtoms();
|
||||||
static void ReleaseAtoms();
|
static void ReleaseAtoms();
|
||||||
|
|
||||||
// Alphabetical list of atoms
|
// Alphabetical list of media type atoms
|
||||||
static nsIAtom* all;
|
static nsIAtom* all;
|
||||||
static nsIAtom* aural;
|
static nsIAtom* aural;
|
||||||
|
|
||||||
static nsIAtom* braille;
|
static nsIAtom* braille;
|
||||||
|
|
||||||
static nsIAtom* embossed;
|
static nsIAtom* embossed;
|
||||||
|
|
||||||
static nsIAtom* handheld;
|
static nsIAtom* handheld;
|
||||||
|
|
||||||
static nsIAtom* print;
|
static nsIAtom* print;
|
||||||
static nsIAtom* projection;
|
static nsIAtom* projection;
|
||||||
|
|
||||||
static nsIAtom* screen;
|
static nsIAtom* screen;
|
||||||
|
|
||||||
static nsIAtom* tty;
|
static nsIAtom* tty;
|
||||||
static nsIAtom* tv;
|
static nsIAtom* tv;
|
||||||
|
|
||||||
|
// Alphabetical list of frame additional child list names
|
||||||
|
static nsIAtom* absoluteList;
|
||||||
|
static nsIAtom* colGroupList;
|
||||||
|
static nsIAtom* floaterList;
|
||||||
|
static nsIAtom* bulletList;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* nsLayoutAtoms_h___ */
|
#endif /* nsLayoutAtoms_h___ */
|
||||||
|
@ -33,23 +33,23 @@ public:
|
|||||||
static void AddrefAtoms();
|
static void AddrefAtoms();
|
||||||
static void ReleaseAtoms();
|
static void ReleaseAtoms();
|
||||||
|
|
||||||
// Alphabetical list of atoms
|
// Alphabetical list of media type atoms
|
||||||
static nsIAtom* all;
|
static nsIAtom* all;
|
||||||
static nsIAtom* aural;
|
static nsIAtom* aural;
|
||||||
|
|
||||||
static nsIAtom* braille;
|
static nsIAtom* braille;
|
||||||
|
|
||||||
static nsIAtom* embossed;
|
static nsIAtom* embossed;
|
||||||
|
|
||||||
static nsIAtom* handheld;
|
static nsIAtom* handheld;
|
||||||
|
|
||||||
static nsIAtom* print;
|
static nsIAtom* print;
|
||||||
static nsIAtom* projection;
|
static nsIAtom* projection;
|
||||||
|
|
||||||
static nsIAtom* screen;
|
static nsIAtom* screen;
|
||||||
|
|
||||||
static nsIAtom* tty;
|
static nsIAtom* tty;
|
||||||
static nsIAtom* tv;
|
static nsIAtom* tv;
|
||||||
|
|
||||||
|
// Alphabetical list of frame additional child list names
|
||||||
|
static nsIAtom* absoluteList;
|
||||||
|
static nsIAtom* colGroupList;
|
||||||
|
static nsIAtom* floaterList;
|
||||||
|
static nsIAtom* bulletList;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* nsLayoutAtoms_h___ */
|
#endif /* nsLayoutAtoms_h___ */
|
||||||
|
@ -30,6 +30,11 @@ nsIAtom* nsLayoutAtoms::screen;
|
|||||||
nsIAtom* nsLayoutAtoms::tty;
|
nsIAtom* nsLayoutAtoms::tty;
|
||||||
nsIAtom* nsLayoutAtoms::tv;
|
nsIAtom* nsLayoutAtoms::tv;
|
||||||
|
|
||||||
|
nsIAtom* nsLayoutAtoms::absoluteList;
|
||||||
|
nsIAtom* nsLayoutAtoms::colGroupList;
|
||||||
|
nsIAtom* nsLayoutAtoms::floaterList;
|
||||||
|
nsIAtom* nsLayoutAtoms::bulletList;
|
||||||
|
|
||||||
static nsrefcnt gRefCnt;
|
static nsrefcnt gRefCnt;
|
||||||
|
|
||||||
void nsLayoutAtoms::AddrefAtoms()
|
void nsLayoutAtoms::AddrefAtoms()
|
||||||
@ -45,6 +50,11 @@ void nsLayoutAtoms::AddrefAtoms()
|
|||||||
screen = NS_NewAtom("SCREEN");
|
screen = NS_NewAtom("SCREEN");
|
||||||
tty = NS_NewAtom("TTY");
|
tty = NS_NewAtom("TTY");
|
||||||
tv = NS_NewAtom("TV");
|
tv = NS_NewAtom("TV");
|
||||||
|
|
||||||
|
absoluteList = NS_NewAtom("Absolute-list");
|
||||||
|
colGroupList = NS_NewAtom("ColGroup-list");
|
||||||
|
floaterList = NS_NewAtom("Floater-list");
|
||||||
|
bulletList = NS_NewAtom("Bullet-list");
|
||||||
}
|
}
|
||||||
++gRefCnt;
|
++gRefCnt;
|
||||||
}
|
}
|
||||||
@ -63,6 +73,11 @@ void nsLayoutAtoms::ReleaseAtoms()
|
|||||||
NS_RELEASE(screen);
|
NS_RELEASE(screen);
|
||||||
NS_RELEASE(tty);
|
NS_RELEASE(tty);
|
||||||
NS_RELEASE(tv);
|
NS_RELEASE(tv);
|
||||||
|
|
||||||
|
NS_RELEASE(absoluteList);
|
||||||
|
NS_RELEASE(colGroupList);
|
||||||
|
NS_RELEASE(floaterList);
|
||||||
|
NS_RELEASE(bulletList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
#include "nsDOMEvent.h"
|
#include "nsDOMEvent.h"
|
||||||
#include "nsIHTMLContent.h"
|
#include "nsIHTMLContent.h"
|
||||||
#include "prprf.h"
|
#include "prprf.h"
|
||||||
|
#include "nsLayoutAtoms.h"
|
||||||
|
|
||||||
// XXX temporary for :first-letter support
|
// XXX temporary for :first-letter support
|
||||||
#include "nsITextContent.h"
|
#include "nsITextContent.h"
|
||||||
@ -395,9 +396,6 @@ nsBlockReflowState::GetAvailableSpace()
|
|||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
nsIAtom* nsBaseIBFrame::gFloaterAtom;
|
|
||||||
nsIAtom* nsBaseIBFrame::gBulletAtom;
|
|
||||||
|
|
||||||
/* 52b33130-0b99-11d2-932e-00805f8add32 */
|
/* 52b33130-0b99-11d2-932e-00805f8add32 */
|
||||||
#define NS_BLOCK_FRAME_CID \
|
#define NS_BLOCK_FRAME_CID \
|
||||||
{ 0x52b33130, 0x0b99, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
{ 0x52b33130, 0x0b99, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
||||||
@ -406,13 +404,6 @@ static const nsIID kBlockFrameCID = NS_BLOCK_FRAME_CID;
|
|||||||
|
|
||||||
nsBaseIBFrame::nsBaseIBFrame()
|
nsBaseIBFrame::nsBaseIBFrame()
|
||||||
{
|
{
|
||||||
// XXX for now these are a memory leak
|
|
||||||
if (nsnull == gFloaterAtom) {
|
|
||||||
gFloaterAtom = NS_NewAtom("Floater-list");
|
|
||||||
}
|
|
||||||
if (nsnull == gBulletAtom) {
|
|
||||||
gBulletAtom = NS_NewAtom("Bullet-list");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBaseIBFrame::~nsBaseIBFrame()
|
nsBaseIBFrame::~nsBaseIBFrame()
|
||||||
@ -4208,11 +4199,11 @@ nsBlockFrame::FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const
|
|||||||
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
else if (aListName == gFloaterAtom) {
|
else if (aListName == nsLayoutAtoms::floaterList) {
|
||||||
aFirstChild = mFloaters;
|
aFirstChild = mFloaters;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
else if (aListName == gBulletAtom) {
|
else if (aListName == nsLayoutAtoms::bulletList) {
|
||||||
aFirstChild = mBullet;
|
aFirstChild = mBullet;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
@ -4230,11 +4221,11 @@ nsBlockFrame::GetAdditionalChildListName(PRInt32 aIndex,
|
|||||||
nsIAtom* atom = nsnull;
|
nsIAtom* atom = nsnull;
|
||||||
switch (aIndex) {
|
switch (aIndex) {
|
||||||
case NS_BLOCK_FRAME_FLOATER_LIST_INDEX:
|
case NS_BLOCK_FRAME_FLOATER_LIST_INDEX:
|
||||||
atom = gFloaterAtom;
|
atom = nsLayoutAtoms::floaterList;
|
||||||
NS_ADDREF(atom);
|
NS_ADDREF(atom);
|
||||||
break;
|
break;
|
||||||
case NS_BLOCK_FRAME_BULLET_LIST_INDEX:
|
case NS_BLOCK_FRAME_BULLET_LIST_INDEX:
|
||||||
atom = gBulletAtom;
|
atom = nsLayoutAtoms::bulletList;
|
||||||
NS_ADDREF(atom);
|
NS_ADDREF(atom);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4701,13 +4692,13 @@ nsBlockFrame::GetFrameForPoint(const nsPoint& aPoint, nsIFrame** aFrame)
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
if (nsnull != mBullet) {
|
if (nsnull != mBullet) {
|
||||||
rv = GetFrameForPointUsing(aPoint, gBulletAtom, aFrame);
|
rv = GetFrameForPointUsing(aPoint, nsLayoutAtoms::bulletList, aFrame);
|
||||||
if (NS_OK == rv) {
|
if (NS_OK == rv) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (nsnull != mFloaters) {
|
if (nsnull != mFloaters) {
|
||||||
rv = GetFrameForPointUsing(aPoint, gFloaterAtom, aFrame);
|
rv = GetFrameForPointUsing(aPoint, nsLayoutAtoms::floaterList, aFrame);
|
||||||
if (NS_OK == rv) {
|
if (NS_OK == rv) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -274,6 +274,14 @@ protected:
|
|||||||
|
|
||||||
#define nsBlockFrameSuper nsBaseIBFrame
|
#define nsBlockFrameSuper nsBaseIBFrame
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The block frame has two additional named child lists:
|
||||||
|
* - "Floater-list" which contains the floated frames
|
||||||
|
* - "Bullet-list" which contains the bullet frame
|
||||||
|
*
|
||||||
|
* @see nsLayoutAtoms::bulletList
|
||||||
|
* @see nsLayoutAtoms::floaterList
|
||||||
|
*/
|
||||||
class nsBlockFrame : public nsBlockFrameSuper
|
class nsBlockFrame : public nsBlockFrameSuper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
#include "nsDOMEvent.h"
|
#include "nsDOMEvent.h"
|
||||||
#include "nsIHTMLContent.h"
|
#include "nsIHTMLContent.h"
|
||||||
#include "prprf.h"
|
#include "prprf.h"
|
||||||
|
#include "nsLayoutAtoms.h"
|
||||||
|
|
||||||
// XXX temporary for :first-letter support
|
// XXX temporary for :first-letter support
|
||||||
#include "nsITextContent.h"
|
#include "nsITextContent.h"
|
||||||
@ -395,9 +396,6 @@ nsBlockReflowState::GetAvailableSpace()
|
|||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
nsIAtom* nsBaseIBFrame::gFloaterAtom;
|
|
||||||
nsIAtom* nsBaseIBFrame::gBulletAtom;
|
|
||||||
|
|
||||||
/* 52b33130-0b99-11d2-932e-00805f8add32 */
|
/* 52b33130-0b99-11d2-932e-00805f8add32 */
|
||||||
#define NS_BLOCK_FRAME_CID \
|
#define NS_BLOCK_FRAME_CID \
|
||||||
{ 0x52b33130, 0x0b99, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
{ 0x52b33130, 0x0b99, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
||||||
@ -406,13 +404,6 @@ static const nsIID kBlockFrameCID = NS_BLOCK_FRAME_CID;
|
|||||||
|
|
||||||
nsBaseIBFrame::nsBaseIBFrame()
|
nsBaseIBFrame::nsBaseIBFrame()
|
||||||
{
|
{
|
||||||
// XXX for now these are a memory leak
|
|
||||||
if (nsnull == gFloaterAtom) {
|
|
||||||
gFloaterAtom = NS_NewAtom("Floater-list");
|
|
||||||
}
|
|
||||||
if (nsnull == gBulletAtom) {
|
|
||||||
gBulletAtom = NS_NewAtom("Bullet-list");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBaseIBFrame::~nsBaseIBFrame()
|
nsBaseIBFrame::~nsBaseIBFrame()
|
||||||
@ -4208,11 +4199,11 @@ nsBlockFrame::FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const
|
|||||||
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
else if (aListName == gFloaterAtom) {
|
else if (aListName == nsLayoutAtoms::floaterList) {
|
||||||
aFirstChild = mFloaters;
|
aFirstChild = mFloaters;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
else if (aListName == gBulletAtom) {
|
else if (aListName == nsLayoutAtoms::bulletList) {
|
||||||
aFirstChild = mBullet;
|
aFirstChild = mBullet;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
@ -4230,11 +4221,11 @@ nsBlockFrame::GetAdditionalChildListName(PRInt32 aIndex,
|
|||||||
nsIAtom* atom = nsnull;
|
nsIAtom* atom = nsnull;
|
||||||
switch (aIndex) {
|
switch (aIndex) {
|
||||||
case NS_BLOCK_FRAME_FLOATER_LIST_INDEX:
|
case NS_BLOCK_FRAME_FLOATER_LIST_INDEX:
|
||||||
atom = gFloaterAtom;
|
atom = nsLayoutAtoms::floaterList;
|
||||||
NS_ADDREF(atom);
|
NS_ADDREF(atom);
|
||||||
break;
|
break;
|
||||||
case NS_BLOCK_FRAME_BULLET_LIST_INDEX:
|
case NS_BLOCK_FRAME_BULLET_LIST_INDEX:
|
||||||
atom = gBulletAtom;
|
atom = nsLayoutAtoms::bulletList;
|
||||||
NS_ADDREF(atom);
|
NS_ADDREF(atom);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4701,13 +4692,13 @@ nsBlockFrame::GetFrameForPoint(const nsPoint& aPoint, nsIFrame** aFrame)
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
if (nsnull != mBullet) {
|
if (nsnull != mBullet) {
|
||||||
rv = GetFrameForPointUsing(aPoint, gBulletAtom, aFrame);
|
rv = GetFrameForPointUsing(aPoint, nsLayoutAtoms::bulletList, aFrame);
|
||||||
if (NS_OK == rv) {
|
if (NS_OK == rv) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (nsnull != mFloaters) {
|
if (nsnull != mFloaters) {
|
||||||
rv = GetFrameForPointUsing(aPoint, gFloaterAtom, aFrame);
|
rv = GetFrameForPointUsing(aPoint, nsLayoutAtoms::floaterList, aFrame);
|
||||||
if (NS_OK == rv) {
|
if (NS_OK == rv) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
#include "nsDOMEvent.h"
|
#include "nsDOMEvent.h"
|
||||||
#include "nsIHTMLContent.h"
|
#include "nsIHTMLContent.h"
|
||||||
#include "prprf.h"
|
#include "prprf.h"
|
||||||
|
#include "nsLayoutAtoms.h"
|
||||||
|
|
||||||
// XXX temporary for :first-letter support
|
// XXX temporary for :first-letter support
|
||||||
#include "nsITextContent.h"
|
#include "nsITextContent.h"
|
||||||
@ -395,9 +396,6 @@ nsBlockReflowState::GetAvailableSpace()
|
|||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
nsIAtom* nsBaseIBFrame::gFloaterAtom;
|
|
||||||
nsIAtom* nsBaseIBFrame::gBulletAtom;
|
|
||||||
|
|
||||||
/* 52b33130-0b99-11d2-932e-00805f8add32 */
|
/* 52b33130-0b99-11d2-932e-00805f8add32 */
|
||||||
#define NS_BLOCK_FRAME_CID \
|
#define NS_BLOCK_FRAME_CID \
|
||||||
{ 0x52b33130, 0x0b99, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
{ 0x52b33130, 0x0b99, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
||||||
@ -406,13 +404,6 @@ static const nsIID kBlockFrameCID = NS_BLOCK_FRAME_CID;
|
|||||||
|
|
||||||
nsBaseIBFrame::nsBaseIBFrame()
|
nsBaseIBFrame::nsBaseIBFrame()
|
||||||
{
|
{
|
||||||
// XXX for now these are a memory leak
|
|
||||||
if (nsnull == gFloaterAtom) {
|
|
||||||
gFloaterAtom = NS_NewAtom("Floater-list");
|
|
||||||
}
|
|
||||||
if (nsnull == gBulletAtom) {
|
|
||||||
gBulletAtom = NS_NewAtom("Bullet-list");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBaseIBFrame::~nsBaseIBFrame()
|
nsBaseIBFrame::~nsBaseIBFrame()
|
||||||
@ -4208,11 +4199,11 @@ nsBlockFrame::FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const
|
|||||||
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
else if (aListName == gFloaterAtom) {
|
else if (aListName == nsLayoutAtoms::floaterList) {
|
||||||
aFirstChild = mFloaters;
|
aFirstChild = mFloaters;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
else if (aListName == gBulletAtom) {
|
else if (aListName == nsLayoutAtoms::bulletList) {
|
||||||
aFirstChild = mBullet;
|
aFirstChild = mBullet;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
@ -4230,11 +4221,11 @@ nsBlockFrame::GetAdditionalChildListName(PRInt32 aIndex,
|
|||||||
nsIAtom* atom = nsnull;
|
nsIAtom* atom = nsnull;
|
||||||
switch (aIndex) {
|
switch (aIndex) {
|
||||||
case NS_BLOCK_FRAME_FLOATER_LIST_INDEX:
|
case NS_BLOCK_FRAME_FLOATER_LIST_INDEX:
|
||||||
atom = gFloaterAtom;
|
atom = nsLayoutAtoms::floaterList;
|
||||||
NS_ADDREF(atom);
|
NS_ADDREF(atom);
|
||||||
break;
|
break;
|
||||||
case NS_BLOCK_FRAME_BULLET_LIST_INDEX:
|
case NS_BLOCK_FRAME_BULLET_LIST_INDEX:
|
||||||
atom = gBulletAtom;
|
atom = nsLayoutAtoms::bulletList;
|
||||||
NS_ADDREF(atom);
|
NS_ADDREF(atom);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4701,13 +4692,13 @@ nsBlockFrame::GetFrameForPoint(const nsPoint& aPoint, nsIFrame** aFrame)
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
if (nsnull != mBullet) {
|
if (nsnull != mBullet) {
|
||||||
rv = GetFrameForPointUsing(aPoint, gBulletAtom, aFrame);
|
rv = GetFrameForPointUsing(aPoint, nsLayoutAtoms::bulletList, aFrame);
|
||||||
if (NS_OK == rv) {
|
if (NS_OK == rv) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (nsnull != mFloaters) {
|
if (nsnull != mFloaters) {
|
||||||
rv = GetFrameForPointUsing(aPoint, gFloaterAtom, aFrame);
|
rv = GetFrameForPointUsing(aPoint, nsLayoutAtoms::floaterList, aFrame);
|
||||||
if (NS_OK == rv) {
|
if (NS_OK == rv) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
#include "nsDOMEvent.h"
|
#include "nsDOMEvent.h"
|
||||||
#include "nsIHTMLContent.h"
|
#include "nsIHTMLContent.h"
|
||||||
#include "prprf.h"
|
#include "prprf.h"
|
||||||
|
#include "nsLayoutAtoms.h"
|
||||||
|
|
||||||
// XXX temporary for :first-letter support
|
// XXX temporary for :first-letter support
|
||||||
#include "nsITextContent.h"
|
#include "nsITextContent.h"
|
||||||
@ -395,9 +396,6 @@ nsBlockReflowState::GetAvailableSpace()
|
|||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
nsIAtom* nsBaseIBFrame::gFloaterAtom;
|
|
||||||
nsIAtom* nsBaseIBFrame::gBulletAtom;
|
|
||||||
|
|
||||||
/* 52b33130-0b99-11d2-932e-00805f8add32 */
|
/* 52b33130-0b99-11d2-932e-00805f8add32 */
|
||||||
#define NS_BLOCK_FRAME_CID \
|
#define NS_BLOCK_FRAME_CID \
|
||||||
{ 0x52b33130, 0x0b99, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
{ 0x52b33130, 0x0b99, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
||||||
@ -406,13 +404,6 @@ static const nsIID kBlockFrameCID = NS_BLOCK_FRAME_CID;
|
|||||||
|
|
||||||
nsBaseIBFrame::nsBaseIBFrame()
|
nsBaseIBFrame::nsBaseIBFrame()
|
||||||
{
|
{
|
||||||
// XXX for now these are a memory leak
|
|
||||||
if (nsnull == gFloaterAtom) {
|
|
||||||
gFloaterAtom = NS_NewAtom("Floater-list");
|
|
||||||
}
|
|
||||||
if (nsnull == gBulletAtom) {
|
|
||||||
gBulletAtom = NS_NewAtom("Bullet-list");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBaseIBFrame::~nsBaseIBFrame()
|
nsBaseIBFrame::~nsBaseIBFrame()
|
||||||
@ -4208,11 +4199,11 @@ nsBlockFrame::FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const
|
|||||||
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
else if (aListName == gFloaterAtom) {
|
else if (aListName == nsLayoutAtoms::floaterList) {
|
||||||
aFirstChild = mFloaters;
|
aFirstChild = mFloaters;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
else if (aListName == gBulletAtom) {
|
else if (aListName == nsLayoutAtoms::bulletList) {
|
||||||
aFirstChild = mBullet;
|
aFirstChild = mBullet;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
@ -4230,11 +4221,11 @@ nsBlockFrame::GetAdditionalChildListName(PRInt32 aIndex,
|
|||||||
nsIAtom* atom = nsnull;
|
nsIAtom* atom = nsnull;
|
||||||
switch (aIndex) {
|
switch (aIndex) {
|
||||||
case NS_BLOCK_FRAME_FLOATER_LIST_INDEX:
|
case NS_BLOCK_FRAME_FLOATER_LIST_INDEX:
|
||||||
atom = gFloaterAtom;
|
atom = nsLayoutAtoms::floaterList;
|
||||||
NS_ADDREF(atom);
|
NS_ADDREF(atom);
|
||||||
break;
|
break;
|
||||||
case NS_BLOCK_FRAME_BULLET_LIST_INDEX:
|
case NS_BLOCK_FRAME_BULLET_LIST_INDEX:
|
||||||
atom = gBulletAtom;
|
atom = nsLayoutAtoms::bulletList;
|
||||||
NS_ADDREF(atom);
|
NS_ADDREF(atom);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4701,13 +4692,13 @@ nsBlockFrame::GetFrameForPoint(const nsPoint& aPoint, nsIFrame** aFrame)
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
if (nsnull != mBullet) {
|
if (nsnull != mBullet) {
|
||||||
rv = GetFrameForPointUsing(aPoint, gBulletAtom, aFrame);
|
rv = GetFrameForPointUsing(aPoint, nsLayoutAtoms::bulletList, aFrame);
|
||||||
if (NS_OK == rv) {
|
if (NS_OK == rv) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (nsnull != mFloaters) {
|
if (nsnull != mFloaters) {
|
||||||
rv = GetFrameForPointUsing(aPoint, gFloaterAtom, aFrame);
|
rv = GetFrameForPointUsing(aPoint, nsLayoutAtoms::floaterList, aFrame);
|
||||||
if (NS_OK == rv) {
|
if (NS_OK == rv) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -274,6 +274,14 @@ protected:
|
|||||||
|
|
||||||
#define nsBlockFrameSuper nsBaseIBFrame
|
#define nsBlockFrameSuper nsBaseIBFrame
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The block frame has two additional named child lists:
|
||||||
|
* - "Floater-list" which contains the floated frames
|
||||||
|
* - "Bullet-list" which contains the bullet frame
|
||||||
|
*
|
||||||
|
* @see nsLayoutAtoms::bulletList
|
||||||
|
* @see nsLayoutAtoms::floaterList
|
||||||
|
*/
|
||||||
class nsBlockFrame : public nsBlockFrameSuper
|
class nsBlockFrame : public nsBlockFrameSuper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
#include "nsDOMEvent.h"
|
#include "nsDOMEvent.h"
|
||||||
#include "nsIHTMLContent.h"
|
#include "nsIHTMLContent.h"
|
||||||
#include "prprf.h"
|
#include "prprf.h"
|
||||||
|
#include "nsLayoutAtoms.h"
|
||||||
|
|
||||||
// XXX temporary for :first-letter support
|
// XXX temporary for :first-letter support
|
||||||
#include "nsITextContent.h"
|
#include "nsITextContent.h"
|
||||||
@ -395,9 +396,6 @@ nsBlockReflowState::GetAvailableSpace()
|
|||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
nsIAtom* nsBaseIBFrame::gFloaterAtom;
|
|
||||||
nsIAtom* nsBaseIBFrame::gBulletAtom;
|
|
||||||
|
|
||||||
/* 52b33130-0b99-11d2-932e-00805f8add32 */
|
/* 52b33130-0b99-11d2-932e-00805f8add32 */
|
||||||
#define NS_BLOCK_FRAME_CID \
|
#define NS_BLOCK_FRAME_CID \
|
||||||
{ 0x52b33130, 0x0b99, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
{ 0x52b33130, 0x0b99, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
||||||
@ -406,13 +404,6 @@ static const nsIID kBlockFrameCID = NS_BLOCK_FRAME_CID;
|
|||||||
|
|
||||||
nsBaseIBFrame::nsBaseIBFrame()
|
nsBaseIBFrame::nsBaseIBFrame()
|
||||||
{
|
{
|
||||||
// XXX for now these are a memory leak
|
|
||||||
if (nsnull == gFloaterAtom) {
|
|
||||||
gFloaterAtom = NS_NewAtom("Floater-list");
|
|
||||||
}
|
|
||||||
if (nsnull == gBulletAtom) {
|
|
||||||
gBulletAtom = NS_NewAtom("Bullet-list");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBaseIBFrame::~nsBaseIBFrame()
|
nsBaseIBFrame::~nsBaseIBFrame()
|
||||||
@ -4208,11 +4199,11 @@ nsBlockFrame::FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const
|
|||||||
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
else if (aListName == gFloaterAtom) {
|
else if (aListName == nsLayoutAtoms::floaterList) {
|
||||||
aFirstChild = mFloaters;
|
aFirstChild = mFloaters;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
else if (aListName == gBulletAtom) {
|
else if (aListName == nsLayoutAtoms::bulletList) {
|
||||||
aFirstChild = mBullet;
|
aFirstChild = mBullet;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
@ -4230,11 +4221,11 @@ nsBlockFrame::GetAdditionalChildListName(PRInt32 aIndex,
|
|||||||
nsIAtom* atom = nsnull;
|
nsIAtom* atom = nsnull;
|
||||||
switch (aIndex) {
|
switch (aIndex) {
|
||||||
case NS_BLOCK_FRAME_FLOATER_LIST_INDEX:
|
case NS_BLOCK_FRAME_FLOATER_LIST_INDEX:
|
||||||
atom = gFloaterAtom;
|
atom = nsLayoutAtoms::floaterList;
|
||||||
NS_ADDREF(atom);
|
NS_ADDREF(atom);
|
||||||
break;
|
break;
|
||||||
case NS_BLOCK_FRAME_BULLET_LIST_INDEX:
|
case NS_BLOCK_FRAME_BULLET_LIST_INDEX:
|
||||||
atom = gBulletAtom;
|
atom = nsLayoutAtoms::bulletList;
|
||||||
NS_ADDREF(atom);
|
NS_ADDREF(atom);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4701,13 +4692,13 @@ nsBlockFrame::GetFrameForPoint(const nsPoint& aPoint, nsIFrame** aFrame)
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
if (nsnull != mBullet) {
|
if (nsnull != mBullet) {
|
||||||
rv = GetFrameForPointUsing(aPoint, gBulletAtom, aFrame);
|
rv = GetFrameForPointUsing(aPoint, nsLayoutAtoms::bulletList, aFrame);
|
||||||
if (NS_OK == rv) {
|
if (NS_OK == rv) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (nsnull != mFloaters) {
|
if (nsnull != mFloaters) {
|
||||||
rv = GetFrameForPointUsing(aPoint, gFloaterAtom, aFrame);
|
rv = GetFrameForPointUsing(aPoint, nsLayoutAtoms::floaterList, aFrame);
|
||||||
if (NS_OK == rv) {
|
if (NS_OK == rv) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
#include "nsDOMEvent.h"
|
#include "nsDOMEvent.h"
|
||||||
#include "nsIHTMLContent.h"
|
#include "nsIHTMLContent.h"
|
||||||
#include "prprf.h"
|
#include "prprf.h"
|
||||||
|
#include "nsLayoutAtoms.h"
|
||||||
|
|
||||||
// XXX temporary for :first-letter support
|
// XXX temporary for :first-letter support
|
||||||
#include "nsITextContent.h"
|
#include "nsITextContent.h"
|
||||||
@ -395,9 +396,6 @@ nsBlockReflowState::GetAvailableSpace()
|
|||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
nsIAtom* nsBaseIBFrame::gFloaterAtom;
|
|
||||||
nsIAtom* nsBaseIBFrame::gBulletAtom;
|
|
||||||
|
|
||||||
/* 52b33130-0b99-11d2-932e-00805f8add32 */
|
/* 52b33130-0b99-11d2-932e-00805f8add32 */
|
||||||
#define NS_BLOCK_FRAME_CID \
|
#define NS_BLOCK_FRAME_CID \
|
||||||
{ 0x52b33130, 0x0b99, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
{ 0x52b33130, 0x0b99, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
||||||
@ -406,13 +404,6 @@ static const nsIID kBlockFrameCID = NS_BLOCK_FRAME_CID;
|
|||||||
|
|
||||||
nsBaseIBFrame::nsBaseIBFrame()
|
nsBaseIBFrame::nsBaseIBFrame()
|
||||||
{
|
{
|
||||||
// XXX for now these are a memory leak
|
|
||||||
if (nsnull == gFloaterAtom) {
|
|
||||||
gFloaterAtom = NS_NewAtom("Floater-list");
|
|
||||||
}
|
|
||||||
if (nsnull == gBulletAtom) {
|
|
||||||
gBulletAtom = NS_NewAtom("Bullet-list");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBaseIBFrame::~nsBaseIBFrame()
|
nsBaseIBFrame::~nsBaseIBFrame()
|
||||||
@ -4208,11 +4199,11 @@ nsBlockFrame::FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const
|
|||||||
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
else if (aListName == gFloaterAtom) {
|
else if (aListName == nsLayoutAtoms::floaterList) {
|
||||||
aFirstChild = mFloaters;
|
aFirstChild = mFloaters;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
else if (aListName == gBulletAtom) {
|
else if (aListName == nsLayoutAtoms::bulletList) {
|
||||||
aFirstChild = mBullet;
|
aFirstChild = mBullet;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
@ -4230,11 +4221,11 @@ nsBlockFrame::GetAdditionalChildListName(PRInt32 aIndex,
|
|||||||
nsIAtom* atom = nsnull;
|
nsIAtom* atom = nsnull;
|
||||||
switch (aIndex) {
|
switch (aIndex) {
|
||||||
case NS_BLOCK_FRAME_FLOATER_LIST_INDEX:
|
case NS_BLOCK_FRAME_FLOATER_LIST_INDEX:
|
||||||
atom = gFloaterAtom;
|
atom = nsLayoutAtoms::floaterList;
|
||||||
NS_ADDREF(atom);
|
NS_ADDREF(atom);
|
||||||
break;
|
break;
|
||||||
case NS_BLOCK_FRAME_BULLET_LIST_INDEX:
|
case NS_BLOCK_FRAME_BULLET_LIST_INDEX:
|
||||||
atom = gBulletAtom;
|
atom = nsLayoutAtoms::bulletList;
|
||||||
NS_ADDREF(atom);
|
NS_ADDREF(atom);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4701,13 +4692,13 @@ nsBlockFrame::GetFrameForPoint(const nsPoint& aPoint, nsIFrame** aFrame)
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
if (nsnull != mBullet) {
|
if (nsnull != mBullet) {
|
||||||
rv = GetFrameForPointUsing(aPoint, gBulletAtom, aFrame);
|
rv = GetFrameForPointUsing(aPoint, nsLayoutAtoms::bulletList, aFrame);
|
||||||
if (NS_OK == rv) {
|
if (NS_OK == rv) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (nsnull != mFloaters) {
|
if (nsnull != mFloaters) {
|
||||||
rv = GetFrameForPointUsing(aPoint, gFloaterAtom, aFrame);
|
rv = GetFrameForPointUsing(aPoint, nsLayoutAtoms::floaterList, aFrame);
|
||||||
if (NS_OK == rv) {
|
if (NS_OK == rv) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -34,11 +34,10 @@
|
|||||||
#include "nsIWebShell.h"
|
#include "nsIWebShell.h"
|
||||||
#include "nsHTMLValue.h"
|
#include "nsHTMLValue.h"
|
||||||
#include "nsHTMLParts.h"
|
#include "nsHTMLParts.h"
|
||||||
|
#include "nsLayoutAtoms.h"
|
||||||
|
|
||||||
static NS_DEFINE_IID(kIWebShellIID, NS_IWEB_SHELL_IID);
|
static NS_DEFINE_IID(kIWebShellIID, NS_IWEB_SHELL_IID);
|
||||||
|
|
||||||
nsIAtom* nsBodyFrame::gAbsoluteAtom;
|
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
NS_NewBodyFrame(nsIFrame*& aResult, PRUint32 aFlags)
|
NS_NewBodyFrame(nsIFrame*& aResult, PRUint32 aFlags)
|
||||||
{
|
{
|
||||||
@ -55,10 +54,6 @@ nsBodyFrame::nsBodyFrame()
|
|||||||
{
|
{
|
||||||
mSpaceManager = new nsSpaceManager(this);
|
mSpaceManager = new nsSpaceManager(this);
|
||||||
NS_ADDREF(mSpaceManager);
|
NS_ADDREF(mSpaceManager);
|
||||||
// XXX for now this is a memory leak
|
|
||||||
if (nsnull == gAbsoluteAtom) {
|
|
||||||
gAbsoluteAtom = NS_NewAtom("Absolute-list");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsBodyFrame::~nsBodyFrame()
|
nsBodyFrame::~nsBodyFrame()
|
||||||
@ -104,7 +99,7 @@ nsBodyFrame::GetAdditionalChildListName(PRInt32 aIndex,
|
|||||||
|
|
||||||
nsIAtom* atom = nsnull;
|
nsIAtom* atom = nsnull;
|
||||||
if (NS_BODY_FRAME_ABSOLUTE_LIST_INDEX == aIndex) {
|
if (NS_BODY_FRAME_ABSOLUTE_LIST_INDEX == aIndex) {
|
||||||
atom = gAbsoluteAtom;
|
atom = nsLayoutAtoms::absoluteList;
|
||||||
NS_ADDREF(atom);
|
NS_ADDREF(atom);
|
||||||
}
|
}
|
||||||
aListName = atom;
|
aListName = atom;
|
||||||
@ -114,7 +109,7 @@ nsBodyFrame::GetAdditionalChildListName(PRInt32 aIndex,
|
|||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsBodyFrame::FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const
|
nsBodyFrame::FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const
|
||||||
{
|
{
|
||||||
if (aListName == gAbsoluteAtom) {
|
if (aListName == nsLayoutAtoms::absoluteList) {
|
||||||
aFirstChild = mAbsoluteFrames;
|
aFirstChild = mAbsoluteFrames;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,12 @@ struct nsStylePosition;
|
|||||||
*/
|
*/
|
||||||
#define NS_BODY_FRAME_ABSOLUTE_LIST_INDEX (NS_BLOCK_FRAME_LAST_LIST_INDEX + 1)
|
#define NS_BODY_FRAME_ABSOLUTE_LIST_INDEX (NS_BLOCK_FRAME_LAST_LIST_INDEX + 1)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The body frame has an additional named child list:
|
||||||
|
* - "Absolute-list" which contains the absolutely positioned frames
|
||||||
|
*
|
||||||
|
* @see nsLayoutAtoms::absoluteList
|
||||||
|
*/
|
||||||
class nsBodyFrame : public nsBlockFrame,
|
class nsBodyFrame : public nsBlockFrame,
|
||||||
public nsIAbsoluteItems
|
public nsIAbsoluteItems
|
||||||
{
|
{
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include "nsHTMLAtoms.h"
|
#include "nsHTMLAtoms.h"
|
||||||
#include "nsHTMLIIDs.h"
|
#include "nsHTMLIIDs.h"
|
||||||
#include "nsIReflowCommand.h"
|
#include "nsIReflowCommand.h"
|
||||||
|
#include "nsLayoutAtoms.h"
|
||||||
|
|
||||||
#ifdef NS_DEBUG
|
#ifdef NS_DEBUG
|
||||||
static PRBool gsDebug = PR_FALSE;
|
static PRBool gsDebug = PR_FALSE;
|
||||||
@ -266,8 +267,6 @@ void ColumnInfoCache::GetColumnsByType(const nsStyleUnit aType,
|
|||||||
/* --------------------- nsTableFrame -------------------- */
|
/* --------------------- nsTableFrame -------------------- */
|
||||||
|
|
||||||
|
|
||||||
nsIAtom* nsTableFrame::gColGroupAtom=nsnull;
|
|
||||||
|
|
||||||
nsTableFrame::nsTableFrame()
|
nsTableFrame::nsTableFrame()
|
||||||
: nsHTMLContainerFrame(),
|
: nsHTMLContainerFrame(),
|
||||||
mCellMap(nsnull),
|
mCellMap(nsnull),
|
||||||
@ -288,10 +287,6 @@ nsTableFrame::nsTableFrame()
|
|||||||
mColGroups=nsnull;
|
mColGroups=nsnull;
|
||||||
mDefaultCellSpacing=0;
|
mDefaultCellSpacing=0;
|
||||||
mDefaultCellPadding=0;
|
mDefaultCellPadding=0;
|
||||||
// XXX for now these are a memory leak
|
|
||||||
if (nsnull == gColGroupAtom) {
|
|
||||||
gColGroupAtom = NS_NewAtom("ColGroup-list");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
@ -1370,7 +1365,7 @@ nsTableFrame::FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const
|
|||||||
aFirstChild = mFirstChild;
|
aFirstChild = mFirstChild;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
else if (aListName == gColGroupAtom) {
|
else if (aListName == nsLayoutAtoms::colGroupList) {
|
||||||
aFirstChild = mColGroups;
|
aFirstChild = mColGroups;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
@ -1388,7 +1383,7 @@ nsTableFrame::GetAdditionalChildListName(PRInt32 aIndex,
|
|||||||
nsIAtom* atom = nsnull;
|
nsIAtom* atom = nsnull;
|
||||||
switch (aIndex) {
|
switch (aIndex) {
|
||||||
case NS_TABLE_FRAME_COLGROUP_LIST_INDEX:
|
case NS_TABLE_FRAME_COLGROUP_LIST_INDEX:
|
||||||
atom = gColGroupAtom;
|
atom = nsLayoutAtoms::colGroupList;
|
||||||
NS_ADDREF(atom);
|
NS_ADDREF(atom);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ struct nsStyleSpacing;
|
|||||||
* named child list:
|
* named child list:
|
||||||
* - "ColGroup-list" which contains the col group frames
|
* - "ColGroup-list" which contains the col group frames
|
||||||
*
|
*
|
||||||
* @author sclark
|
* @see nsLayoutAtoms::colGroupList
|
||||||
*
|
*
|
||||||
* TODO: make methods virtual so nsTableFrame can be used as a base class in the future.
|
* TODO: make methods virtual so nsTableFrame can be used as a base class in the future.
|
||||||
*/
|
*/
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include "nsHTMLAtoms.h"
|
#include "nsHTMLAtoms.h"
|
||||||
#include "nsHTMLIIDs.h"
|
#include "nsHTMLIIDs.h"
|
||||||
#include "nsIReflowCommand.h"
|
#include "nsIReflowCommand.h"
|
||||||
|
#include "nsLayoutAtoms.h"
|
||||||
|
|
||||||
#ifdef NS_DEBUG
|
#ifdef NS_DEBUG
|
||||||
static PRBool gsDebug = PR_FALSE;
|
static PRBool gsDebug = PR_FALSE;
|
||||||
@ -266,8 +267,6 @@ void ColumnInfoCache::GetColumnsByType(const nsStyleUnit aType,
|
|||||||
/* --------------------- nsTableFrame -------------------- */
|
/* --------------------- nsTableFrame -------------------- */
|
||||||
|
|
||||||
|
|
||||||
nsIAtom* nsTableFrame::gColGroupAtom=nsnull;
|
|
||||||
|
|
||||||
nsTableFrame::nsTableFrame()
|
nsTableFrame::nsTableFrame()
|
||||||
: nsHTMLContainerFrame(),
|
: nsHTMLContainerFrame(),
|
||||||
mCellMap(nsnull),
|
mCellMap(nsnull),
|
||||||
@ -288,10 +287,6 @@ nsTableFrame::nsTableFrame()
|
|||||||
mColGroups=nsnull;
|
mColGroups=nsnull;
|
||||||
mDefaultCellSpacing=0;
|
mDefaultCellSpacing=0;
|
||||||
mDefaultCellPadding=0;
|
mDefaultCellPadding=0;
|
||||||
// XXX for now these are a memory leak
|
|
||||||
if (nsnull == gColGroupAtom) {
|
|
||||||
gColGroupAtom = NS_NewAtom("ColGroup-list");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
@ -1370,7 +1365,7 @@ nsTableFrame::FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const
|
|||||||
aFirstChild = mFirstChild;
|
aFirstChild = mFirstChild;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
else if (aListName == gColGroupAtom) {
|
else if (aListName == nsLayoutAtoms::colGroupList) {
|
||||||
aFirstChild = mColGroups;
|
aFirstChild = mColGroups;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
@ -1388,7 +1383,7 @@ nsTableFrame::GetAdditionalChildListName(PRInt32 aIndex,
|
|||||||
nsIAtom* atom = nsnull;
|
nsIAtom* atom = nsnull;
|
||||||
switch (aIndex) {
|
switch (aIndex) {
|
||||||
case NS_TABLE_FRAME_COLGROUP_LIST_INDEX:
|
case NS_TABLE_FRAME_COLGROUP_LIST_INDEX:
|
||||||
atom = gColGroupAtom;
|
atom = nsLayoutAtoms::colGroupList;
|
||||||
NS_ADDREF(atom);
|
NS_ADDREF(atom);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ struct nsStyleSpacing;
|
|||||||
* named child list:
|
* named child list:
|
||||||
* - "ColGroup-list" which contains the col group frames
|
* - "ColGroup-list" which contains the col group frames
|
||||||
*
|
*
|
||||||
* @author sclark
|
* @see nsLayoutAtoms::colGroupList
|
||||||
*
|
*
|
||||||
* TODO: make methods virtual so nsTableFrame can be used as a base class in the future.
|
* TODO: make methods virtual so nsTableFrame can be used as a base class in the future.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user